score:2
Accepted answer
Try this :
options.series = [];
$('tr', table).each( function(i) {
var tr = this;
$('th, td', tr).each( function(j) {
if (j == 2) { // get only column 2
if (i == 0) { // get the name and init the series
options.series[0] = {
name: this.innerHTML,
data: []
};
} else { // add values
options.series[0].data.push(parseFloat(this.innerHTML));
}
}
});
});
You need to check that j == 2
so that you only get the data in the 2nd column and then when you create the options.series
array you need to use 0
- Highcharts expects at least data in series[0]
Source: stackoverflow.com
Related Query
- Highcharts Chart Bar - How can I display in the chart, only one column from my HTML table?
- How can I display crosshair labels on top of the chart with Highcharts
- How can i load external json data in highcharts to show the bar chart
- Highcharts - Column Chart Drilldown, how to change the drilldown bar color based on some value
- How can I get HighCharts column chart to scale the yAxis to not have so much whitespace?
- Highcharts: How to move the column bar to the left most side when there is only one point in drilldown
- How to render a bar chart with different series with only one entry per category in HighCharts
- how to enable only 1 out of 2 column column graph by default when page loads in highcharts and the 2nd one gets visible when toggled in the legend
- How can I pull only specific columns \ cells from csv in <pre> tag, into highcharts pie chart
- How to display legend in Highcharts Waterfall Chart and make the sum column of waterfall appear in multiple colors?
- How to draw a chart from one array of data and make labels on the chart from another array of data? Highcharts v.4.0.4
- Highcharts - Display only one name at each end of the bar's chart
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- How can I remove the white border from HighCharts pie chart?
- Highcharts Bar Chart - How to set the minimum bar width/length
- Highcharts - How can I remove starting and ending padding from area chart
- How can I delete all of the points from a highcharts series
- Highcharts: How to provide a custom stack label in highcharts bar graph from within the stackLabel formatter?
- How can I prevent my HighChart bar chart from being inverted?
- Highcharts basic bar graphs. How to remove strokewith from the bars
- How to add a horizontal line in Column bar chart in Highcharts plugin?
- How Can I Hide a Pie Chart's Slice in HighCharts Without Removing It From the Legend?
- how to display 2 same highcharts without duplicate the code
- Get the end points of each bar in a highcharts column chart
- Highcharts - position column chart from the top
- How can I display the outcome of the for loop in highcharts
- How to hardcode chart data in my Model then have my Controller pull it from there to display it. Using Highcharts
- How to remove sliced line from pie high chart if there there is only one object in data
- Is it possible to have two Y Axis in a highstock chart from highcharts one on the left and another on the right?
- How can I make milestone lines with a GANTT chart using the highcharts library?
More Query from same tag
- Highcharts - Place the y-axis plot-line label outside the chart area
- tool that shows javascript errors in code
- Is it possible in Vue JS to make several vue components reuse existing data structure with different data?
- Highcharts - heatmap : avoid 0 on resize chart
- Add Local HTML and JS file using React Native Webview
- Highstock scroll bar-Single scroll bar for 4 charts
- Disable tooltip for one point?
- Highchart: How to graph from Radio Button
- How to enable scrollbar in highchart
- Highchart highstock startOnTick Error
- Handling null value when casting to float
- Change Highchart Options dynamically in angular
- Highcharts tooltip not working
- Hide navigator's top outline outside of selection
- get data from the server using radio buttons, highcharts, vb.net
- Better way to use Ruby/Sinatra to pass data to Highcharts?
- How to append highcharts on same div?
- How to assign .POST return value to a variable
- Highstock xAxis label formatting
- Highcharts.SVGRenderer not working properly with Drill Down
- Setting Min and Max values for more than two Highchart Solid Gauges using function
- How to add group secondary x-axis to highcharts
- How to add more columns to this JS PNG converter? [Highcharts]
- How to plot data in Highcharts where time and value are swapped?
- Changing chart type give: Uncaught TypeError: Cannot read property 'length' of undefined Highcharts
- Read Values of a Scatter Plot Programatically- Highstock
- Center text inside rect using Highcharts Drawing API
- How to use date range for highcharter columnrange plot?
- highcharts filename from canvas
- Highcharts warning: Invalid attribute 'src' in config