score:3
It's not possible as far as I can see. The highcharts-ng.js
renders the chart to element[0]
always. This is initialised within the link
function of the angular directive. The value provided in the config options is overridden.
This is a reduced call stack and extract from highcharts-ng.js
link: function (scope, element, attrs) {
...
var mergedOptions = getMergedOptions(scope, element, config);
...
}
var getMergedOptions = function (scope, element, config) {
...
mergedOptions.chart.renderTo = element[0]; //line 96
...
}
score:3
Since you state that you want to render your chart to a given div using the renterTo from highcharts and ask what you are doing wrong, the best answer is probably that you should not use the renderTo at all. As in a other answer, it does not seem to work with HighChartsNG.
To give you nevertheless a solution to the current issue: Simply place the directive of HighChartsNg into the div where it should be displayed as follows:
<div ng-app="myapp">
<div ng-controller="myctrl">
<div>top</div>
<hr/>
<div id="middle">middle
<highchart id="chart1" config="highchartsNG"></highchart>
</div>
<hr/>
<div>bottom</div>
<hr/>
</div>
</div>
Source: stackoverflow.com
Related Query
- angularjs and highcharts / highchartsNG - renderTo not working
- highcharts redraw and reflow not working
- Highcharts shared tooltip for line series and scatter plot not working
- Highcharts and jquery-simple-slider seems to be not working together
- HighCharts not working on Safari but works fine on Firefox and Chrome
- Data and tooltip not working for graph using highcharts
- Highcharts - Axis minPadding and maxPadding not working
- Highcharts range selector buttons and input filter not working
- Highcharts Javascript - Synchronize Chart and Table not working - Cant read property cell of undefined
- Highcharts arearange draggableHigh and draggableLow not working
- Using Highcharts with minutes, seconds and milliseconds as Data not working
- HighCharts Map Point with lat and long is not working
- Highcharts (grouped_category styling) and tooltip formatter not working
- Dynamically changing Highcharts Theme through Jquery code not working
- Highcharts yAxis max not working
- Resize highcharts using react-grid-layout not working
- Angular HighCharts ParlimentChart is not working
- Highcharts - yAxis logarithmic scale and allowDecimals set to false not seeming to have any effect
- DataLabels formatter not working in Highcharts Sankey Diagram
- Highcharts async drilldown (3 level) - drillup not working
- Color contrast setting on dataLabels style parameter using Highcharts 5 is not working on some colors
- Legend and Axis titles not showing in Highcharts Graph
- Legend and Axis titles not showing in Highcharts Graph
- Highcharts - Global configuration with common code and unique data & Headings
- JavaScript code inside TypeScript file .ts not working
- Highcharts - update column graph with setData() not working
- how to pass values to tooltip which not in x and y axis in highcharts
- Multi-Line Title is not working when we export to PNG using CanVG - Highcharts
- Highcharts not working on Heroku environment, works on local environment
- yAxis tickinterval in highcharts is not working as per the value
More Query from same tag
- highcharts-angular dynamically update from DB
- Highcharts stock animation
- How to make highchart span over whole x-axis?
- Creating depth chart using highcharts and creating bids and asks in such a way that bids and asks are created from center of chart
- Highstock: How to combine lazy loading AND dynamic data?
- How to include highcharts motion plugin for bubble plot using R wrapper?
- Is it possible? xAxis categories with Json?
- HighCharts - Logarithmic X Axis malfunction
- want to remove this bullet in front of these labels of highcharts graph
- How to set the width within axis label in highcharts
- Stop hide/show of series but grey out legend on click
- How to pinPoint highchart grouped barchart variables
- change the legend.y property on browser resize
- highcharts hover.state.halo color malfunction?
- How to create more gap between axis labels on a stacked bar chart?
- Using dropdown filter to dynamic update Highchart
- DotNet.Highcharts ChartTypes reference?
- Highcharts: how to group data points and display the total accordingly?
- Change HighStock chart label on changing rangeselector button
- Combine multiple Yaxis in one
- X-axis interval in Highcharts
- How do I style the series labels on a Highcharts pie chart?
- Don't display not present date values
- Spiderweb chart with different axis ranges (parallel-coordinates)
- Arrows only for rangeSelector in HighCharts
- How to position the customed tootip of HighCharts?
- How to dynamically set title in Pie Chart of Highcharts
- Uncaught TypeError adding chart in markdown using Jekyll
- How to disable HighCharts re-rendering while exporting charting into file?
- highcharts for Angular 2 - No Directive annotation found on ChartComponent