score:18
Accepted answer
Yes you can. See their example here: http://jsfiddle.net/gh/get/jquery/1.7.1/highslide-software/highcharts.com/tree/master/samples/highcharts/chart/renderto-jquery/
basically you assign an jQuery element to a variable:
renderTo: $('.myclass')[0]
score:14
As Ido already said, you can't have multiple ids, but you can have multiple classes.
I had to do the following:
var $containers = $('.container'),
chartConfig = {
chart: {
renderTo: null,
defaultSeriesType: 'column'
}
};
$containers.each(function(i, e){
chartConfig.chart.renderTo = e;
new Highcharts.Chart(chartConfig);
});
Also, you don't really have to assign the Chart object to a variable - at least I didn't want to.
Hope it helps somebody.
Source: stackoverflow.com
Related Query
- Rendering HighCharts to class instead of id?
- Use HTML class as Highcharts table data source
- Rendering Highcharts using Angular js Directives
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Highcharts jQuery rendering problem - all browsers
- How do you increase the performance of highcharts chart creation and rendering
- How to update new plotline values instead of removing and adding new ones in highcharts
- Using a fill pattern instead of colour with HighCharts
- php: laravel slow view render time when rendering javascript for highcharts
- Highcharts - Draw Crosshairs / Tooltip on Mouse Position Instead of Snapping to Data Point
- Use CSS Class in HighCharts
- Labels are not rendering for plotLines highcharts
- Not rendering VU-meter Gauge chart using HighCharts in Durandal
- How get data name in Highcharts pie chart legend instead of "Slice" using array of values?
- HighCharts Rendering Issue In Chrome
- Can we change highcharts legend to work as radio button instead of checkbox style?
- Highcharts reflow does not work on class selector
- highcharts zero values results in graph half way instead at the bottom
- Symfony2 - Highcharts rendering a blank div
- Highcharts applying custom style to context button using css class
- Highcharts gauge not rendering text
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- rendering Highcharts datatimes on the x axis at regular intervals
- Highcharts - Global configuration with common code and unique data & Headings
- creating a bar chart using Highcharts with React - getting an error that rendering div isn't found
- Highcharts server side rendering draw a mysterious semi circle donut shape
- HighCharts - compare series with values instead of percentage
- AJAX displaying values from two different functions in a single Highcharts chart instead of two different ones
- Rails collecting and rendering JSON data in to a Highcharts graph
- Highcharts Isomorphic rendering / web-workers
More Query from same tag
- Slider on barchart
- Legend and Axis titles not showing in Highcharts Graph
- What are the attributes that can be used in Highcharts' legend.labelFormat property?
- Why is "Download CSV" repeated in my charts dropdown?
- Highcharts update graph from array data
- Highcharts csv export issue
- Highcharts & Angularjs: update chart from $broadcast in the main controller doesn't update the chart like a $watch would in the chart's controller
- Highcharts Point.update() Crash On Google Chrome Version 49
- Why doesn't dataGrouping.units work here?
- How to prevent a React onClick event from being consumed by child
- Want to retrieve Array from database
- Searching for JS based (Highcharts, AnyChart, etc) thermometer or vertical linear gauge with multiple pointers
- HighCharts xAxis show on 0 line with tick marks between all columns
- Remove quotes from an item in list in django for highcharts
- highcharts not responsive after reflow
- Highcharts Export Chart To PDF on The Fly Using TCPDF
- How can I align the scale on my HighCharts graph with the axis rather than the margins?
- "Nested labels" in Highcharts
- Highcharts with ajax/ json and SQL Server ASP.NET
- Highcharts fill area point interval issue
- Is it possible to mix columns with a horizontal line on each category?
- why $scope variable inside directive is not getting updated?
- How to change names of menuItems in R highcharter when exporting
- highcharts, Set minimum height for stacked column chart?
- Show only the first and last y-axis label on a graph highcharts
- High Chart set x axis value in hours format
- Combine xAxis Highcharts
- Export Server not configured for Highcharts-export-server
- GWT Highcharts : Displaying 'Date' values on X-Axis
- "this.point.config" is not working anymore in highcharts tooltip