Home forums Using CanvasJS axisX as datetime Reply To: axisX as datetime

#22372

nkfNovalume
Member

Changing the interval type isn’t working. the issue is that im having troubble getting the chart to accept a date property for the x-axis. the chart can take a date property from javascript Date(YYYY, MM, DD, HH, ii, SS) however it can’t take anything from php other than a number. it therefor puts my php dates on x-axis dates that arent correct because its trying to put them as if they were numbers (taking their position on the chart using their position in the array as the number) and therefor if i have two arrays with different length but they both start and end on same dates, it will make the shorter array apear shorter on the graph i.e. end it sooner than supposed.

i can’t see any other fix for this than trying to obtain the data in javascript somehow and enter it there as javascript Date.

  • This reply was modified 2 months, 3 weeks ago by  nkfNovalume.
  • This reply was modified 2 months, 3 weeks ago by  nkfNovalume.