score:2
Accepted answer
I looked at your code and spotted some errors at the javascript part.
You define on options an series array. Later on you try to assign on index 0 of the series array an object with the attribute data which doesn't work since series is an empty array.
You also don't need for every single chart to make an request since the data seems to be the same for all other charts.
A possible approach could look like this:
var chart1,
chart2;
// define all other charts here
// now, make only one request for the data
$.getJSON('data.php', function(json){
// and create the charts
// chart 1
options.chart.renderTo = 'pressure';
options.title.text = 'Pressure (hPa)';
options.yAxis.title.text = 'Pressure (hPa)';
options.xAxis.categories = json[0]['data'];
// push the data to the series
options.series.push(json[1]);
options.series.push(json[2]);
// create the first chart
chart1 = new Highcharts.Chart(options);
// reset the series to prepare them for the next chart
options.series = [];
// chart 2
options.chart.renderTo = 'altitude';
options.title.text = 'Altitude (m)';
options.yAxis.title.text = 'Altitude (m)';
options.xAxis.categories = json[0]['data'];
options.series.push(json[3]);
options.series.push(json[4]);
chart2 = new Highcharts.Chart(options);
// and so on
});
Here's also an working example.
You'll need to populate the other charts, i created only the first two.
Source: stackoverflow.com
Related Articles
- Multiple dynamic Highcharts on one page with json
- Highcharts with JSON data and multiple series
- dynamic highcharts with json data
- Retrieving JSON data for Highcharts with multiple series?
- Charts using Highcharts with multiple series from JSON
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts with multiple series from JSON Dynamically
- Highcharts with JSON to customize multiple series
- Highcharts with multiple series from JSON
- dynamic chart with Highcharts using json
- Loading json data to highcharts with multiple series
- How to have multiple highcharts with different series data in vuejs without repeating code
- Highcharts with values from multiple JSON file
- Highcharts multiple dynamic panes with single legend
- Adding multiple dynamic series and axes via JSON into Highcharts
- dynamic highcharts with json data every 1 second
- Highcharts multiple series from JSON with different style depending on serie name
- Can I create multiple dynamic carts with Highcharts
- Reload chart data via JSON with Highcharts
- Highcharts - how to have a chart with dynamic height?
- How to export the whole page or html content with Highcharts not just the chart?
- Dynamic update of multiple series in highcharts
- Loading multiple Highcharts with jquery.load
- Highcharts polar spider with multiple y-axis scale
- Highcharts - Issue with negative values when displaying multiple axes
- Highcharts - multiple plot with the same x scale
- How to structure Angular with Highcharts and lots of dynamic data
- Add dynamic data to line chart from mysql database with highcharts
- Adding multiple dynamic lines to highcharts
- Highcharts - Global configuration with common code and unique data & Headings
- highcharts legend overlapping
- Highcharts Column chart Series data formatting change
- Title of highchart rendering bad
- Way to shorten / refactor multiple plugin values
- Highchart is not showing inside bootstrap div
- Edit Donut Highchart
- Change marker line color in highstocks
- JavaScript - Highcharts : How to prevent double click?
- Change height of Highcharts with JavaScript. By default only re-sizes on window re-size
- How to change tooltip valueSuffix after chart is rendered?
- Highstock: export CVS/XML only visible/selected range
- High chart problwm with multiple axes with dynamic data
- Highchart Absolute Percentage Stacked Area
- Custom Notation in HighChart series
- in highchars can we give x axis and y axis plots together
- Format highcharts tooltip
- Highcharts original background color always gets exported
- Label individual bars in a grouped bar chart in Highcharts
- how to change grid alternate color in highcharts
- Remove day name from highstock chart tooltip