score:2
Accepted answer
From your code it appears that your months are in thead
and not tbody
. So you should be really using $('thead th')
selector. I would also recommend using the :parent
selector to filter out empty th
s
$('thead th:parent', table).each( function(i) {
var month=$(this).text();
options.xAxis.categories.push(month);
});
Also, your series data needs to be changed if you want the x-axis to be months, you should now have only 3 series, instead of the earlier 6. And each series will now have 6 points (one for each month) instead of previous 3 points/series. So your table parsing would need to change to something like this.
options.series = [];
$('tbody tr', table).each(function (i) {
var tr = this;
var serie = {};
serie.name = $('th', tr).text();
serie.data = [];
$('td', tr).each(function (j) {
serie.data.push(parseFloat(this.innerHTML));
});
options.series.push(serie);
});
Source: stackoverflow.com
Related Query
- Reverse Axis in Highcharts get data from table
- get highcharts data from table angularjs
- How to populate a Highcharts axis with string formatted data from a PHP array
- Highcharts get data from database
- How To Get Data From Database To Highcharts Plugin in cakephp
- Extracting data from a JSON call to a Postgres table for use in Highcharts (without PHP)
- Highcharts loading data from a HTML table with a title
- How to make the Y Axis values not start from 0 in highcharts? How to display forcefully display the last category data on X axis in HighCharts ?
- Can we get index from series data in highcharts
- Highcharts display label for pie chart using html table as data source
- using dynamic data from highcharts in a html table
- Can I add on the webpage, data that I get from a Highcharts function?
- highcharts from HTML table does not getting the x axis key
- Loading string data from table gets parsed as Date on Chrome - Highcharts
- HTML table as data source for highstock charts using highcharts
- Fomatting labels on Y-axis in Highcharts with Data from HTML table
- Stacked Bar type of jquery Highcharts with data from HTML Table
- Highcharts column chart, disable interpolation when loading from data table
- Highcharts (Highstock): Get data from external CSV, doesn't display date correctly
- Configuring Data Table from Highcharts Basic Column Chart
- Plot Y axis data based on x axis values from a csv file : Highcharts
- how to make chart real time with 2 line and get data from php with highcharts
- get data from hashmap into highcharts
- Highcharts giving an extra legend when I get data dynamically from Highcharts
- Angular 5 - Highcharts cannot load data from a HTML table
- gow to get Highcharts solid Gauge data from a JS variable?
- Use HTML class as Highcharts table data source
- Invert axis on highchart diagram with data from table
- highcharts pulling data from database table
- Get Data from text and plot on Highcharts
More Query from same tag
- Highchart Heatmap shows index number in YAxis
- HighCharts Not Adding Series Data Points
- Add CSS to a specific series' legend label in Highcharts
- HighCharts : dataLabels errorBar
- Highcharts is not responsive in ajax call
- save charts as image and include in pdf export
- Highchart maps show some states as selected with feasibility to select other states
- Highcharts - add border radius to boxplot chart
- how to make my highcharts reverse
- yAxis Categories on Scatter Plot
- How to programmatically set selection Highchats master-detail chart?
- does Highstock support a right border for a panel (yAxis)?
- Custom Label Show Percentage on Highcharts
- Highcharts yAxis text rotation issue in IE8
- Dates are overlapped in Highchart's areachart
- Highcharts - How to get Max and Min value between 2 dates
- Highcharts json data format
- Highchart axis hover
- Display count of grouped points on Highcharts dataGrouping
- Feeding the data through an angular factory to a controller
- how to display hctreemap2 unique levels?
- Highcharts: with multiple axes
- highcharts responsive method in Highcharts.net wrapper
- Showing HighCharts series name on x-axis and in legend
- Center Highstock chart scrollbar handle
- Highcharts.js - Switch label axis and hiding legend
- Select default view on charts as 1month rather than all
- Highcharts javascript
- How to set minimum height of data element of series in stacked bar chart?
- Highcharts Tootip in wrong location for multiple x axis