Home Forums Chart Support Creating a chart from data with SQL DB [PHP] Reply To: Creating a chart from data with SQL DB [PHP]

#22169

@d3bsky,

valueFormatString is used to format numbers and date time values (x-values) that appears on axisX but not for labels. Passing x-value to dataPoints should work fine in your case dps.push({"x":new Date(result[i].time), "y":result[i].humidity});.

To format labels, you can use labelFormatter.
Formatting labels using labelformatter


Vishwas R
Team CanvasJS