Home Forums Report Bugs Line Graph Point Connection Bug Reply To: Line Graph Point Connection Bug

#14401

@saul_romero,

The legendText was showing NaN because the JSON you were using didn’t had valuey in the last object.
{"valuex":"2017-02-20 17:44:36"}
Also the legendText had a redundant 0 in front of it, because value (a number) was concatenated to a string deltaX.
value = value + deltaX;
You will need to initialize value as an empty string. To format the the legend text you can use CanvasJS.formatDate() with "YYYY-MM-DD hh:mm:ss:fff" valueFormatString. Please check this updated JSFiddle.

__

Suyash Singh
Team CanvasJS

  • This reply was modified 7 years, 1 month ago by Suyash Singh. Reason: indent
  • This reply was modified 3 years, 1 month ago by Vishwas R.