score:1
Accepted answer
You might want to add json
as the 4th argument of your $.post
to get the JSON parsed as an object, more info here: jQuery.post()
.
$.post('getData.php', {b: begin,e: end}, function(data){
}, 'json');
Reading your code tells us the structure of your data is as follows:
Array (
[0] => Array
(
[name] => V
[data] => Array
(
[0] => Array
(
[0] => value of $dateTimer1
[1] => value of $row['v1']
Therefore the data series are:
data[0][data]
forV
.data[1][data]
forSpeed
.
Therefore:
chart.series[0].setData( data[0][data] );
chart.series[1].setData( data[1][data] );
When in doubt about a structure, simply print it out:
print_r($data);
in PHP.console.log(data);
in JavaScript.
Source: stackoverflow.com
Related Query
- Extract data series from a JSON array for a Highcharts chart with 2 y-axis
- Data Conversion from SQL, C# with Linq to JSON for Highcharts Line chart
- Passing data from PHP array to Highcharts chart with JSON
- How to populate a Highcharts axis with string formatted data from a PHP array
- Pass array from js for loop to highcharts series data
- Highcharts Polar Chart - Specify Data Series & Tooltips for each Axis
- HighCharts column chart populated with series data from a function
- Highcharts : Display static Y axis labels from array when series data is null , else auto generated label
- Highcharts displays series names but missing data points from json source
- Highcharts (highcharts-ng) with ng-repeat worked, But need to pass the data for each chart from the attributes
- Highcharts data from Google spreadsheet show line chart for one series
- Reload chart data via JSON with Highcharts
- Use an array of objects for series data in Highcharts
- Highcharts - best way to handle and display zero (or negative) values in a line chart series with logarithmic Y axis
- Highcharts with JSON data and multiple series
- Add dynamic data to line chart from mysql database with highcharts
- Highcharts not displaying series data for graph with multiple Y-axes
- Formatting JSON Data with ColdFusion for HighCharts
- How to format my json data for stack column chart in HighCharts
- Splitted bar chart for paired data with highcharts
- Formatting JSON from a Pandas data frame for Highcharts within a Django template
- Retrieving JSON data for Highcharts with multiple series?
- Extracting data from a JSON call to a Postgres table for use in Highcharts (without PHP)
- Charts using Highcharts with multiple series from JSON
- Highcharts polar chart wind rose data from JSON
- Highcharts with multiple series from JSON Dynamically
- highcharts example for using data from database with mvc
- Highcharts series showing different data for 'column' and 'line' chart
- Returning JSON file with cURL to use data in a HighCharts stock chart
- Issue with JSON data encoded from the server, not able to plot the chart
More Query from same tag
- Highcharts sync is not working horizontally
- Highchart with dual y-axis with date
- Always display value in highcharts column chart
- Highcharts how to use a percentage area with time
- Highcharts drilldown treemap legend
- How to update data table on data change highcharts
- Highstock Stockchart with custom color for single grouped column
- Tooltip Options not working for Highcharts Treemap
- How to set the graph line chart dynamically?
- Angular 2 Highcharts Cannot read property 'info' of undefined
- How to load 60,000 data points without datagrouping in highstock chart?
- Change highcharts data label position
- How to make json object for this type in c#?
- DIsplay Ajax data in Highchart js
- Highcharts columns not displaying different color
- Highcharts: how to export several charts from the browser?
- How can we achieve high chart with complex json data?
- Legend overlapping on drilldown pie chart
- Highcharts: Displaying zero values in logarithmic scale
- how to increase Y-Axis height in Highcharts
- Live Graph in HighCharts
- Highcharts diffent color @ Temperature Line
- BootStrap collapse incorrect sizes
- Highstock step multiple data points on same x axis
- Not interpolate missing dates in Highcharts
- How to get Highchart plots plotted only for starting and ending points
- correct positioning with Highcharts renderer on a bar chart
- How to create multiple highchart and print in HTML page by using for loop?
- Highcharts: How to push the categories to the side?
- Highcharts: save chart parameters when user changes them