Skip to content Skip to sidebar Skip to footer

Highcharts And Php Json_encode. Data From Mysql. No Data On Chart

Trying to produce HighCharts with data from MySQL. Parsing data from MySQL using PHP and the json_encode function. Problem: No data on chart. This is my javascript:

Solution 1:

The issue is caused by 3 reasons.

  1. Values should be named like x and y, not custom fields
  2. The y value should be number, not string like you have (use the JSON_NUMERIC_CHECK flag in json_encode)
  3. The x value, should be timestamp (time in miliseconds). In PHP you can use strtotime() function

Post a Comment for "Highcharts And Php Json_encode. Data From Mysql. No Data On Chart"