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 Query
- Multiple dynamic Highcharts on one page with json
- Highcharts with JSON data and multiple series
- Multiple highcharts charts dynamically created in angular2 on one page
- dynamic highcharts with json data
- Retrieving JSON data for Highcharts with multiple series?
- Charts using Highcharts with multiple series from JSON
- Multiple Highcharts in one page - only one chart displays
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts with multiple series from JSON Dynamically
- Is it possible to have multiple highcharts with one id?
- How to show multiple Highcharts graph on one page
- Highcharts with JSON to customize multiple series
- Building dynamic HighCharts and image Highcharts with (mostly) one codebase?
- Highcharts with multiple series from JSON
- dynamic chart with Highcharts using json
- Highcharts - how to display multiple graphs on one page using multiple xml files
- 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
- Why does highcharts sankey chart sometimes combine multiple nodes with same node name but different Id into one and hide the lines?
- Behavior of multiple HighCharts on single page when removing one div
- Highcharts multiple dynamic panes with single legend
- How to update multiple highcharts charts with one function
- 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?
- HighCharts - two Y-axis, one with max value
More Query from same tag
- JavaScript code inside TypeScript file .ts not working
- Highmaps min/max color not working as expected
- How to add categories' separation lines
- How are Highcharts event listeners handled
- Price line disappears in HighChart
- Group By DATE_FORMAT in SQL and Return Group of Unix Timestamps
- Highcharts, add icon to plotline?
- Highcharts - Issue with showing and hiding plot lines and bands on legendItemClick
- Highcharts line chart with multi colored areas
- Use return data from dynamic highcharts chart in Shiny
- Yii2 Highcharts syntax in function
- Highchart prevent auto reload
- Locating the legend in Release Burndown Chart Code
- How to use high charts in Angular?
- Highcharts 7.0.3 with Xpages/dojo
- pie chart highcharter R
- Highchart, how to vertically align in the middle a line?
- HighCharts Pie Chart - Displaying multiple series values in Tooltip
- How do you set the text-overflow property of a highcharts-legend-item to ellipsis in styled mode?
- Highchart yAxis opposite is not working in type datetime
- Tooltip z-Index in Multiple highcharts charts
- Possible to use Highcharts Scatter Plot with categories?
- highstock: how to change color in areaspline when series intersect sma
- Highcharts not rendering in internet explorer
- Updating Highcharts series live data in Swift
- How do I change the opacity of a series in Highcharts?
- How to turn off inner padding in highcharts?
- Highchart generate array series
- In Highcharts, how to avoid auto tick interval in a container with limited height
- Select format mysql to highchart in php