Home Forums Chart Support EPOCH not formated

EPOCH not formated

Viewing 3 posts - 1 through 3 (of 3 total)
  • #44874

    Hi,
    I made an array with PHP with epoch time and data :
    Array ( [0] => Array ( [x] => 1711793085000 [y] => 193 ) [1] => Array ( [x] => 1711793097000 [y] => 190 ) [2] => Array ( [x] => 1711793110000 [y] => 190 ) [3]etc

    With no axisX valueFormatString chart is well displayed but with epoch time format on X axis.
    If I format X axis:
    axisX: {xValueType: “dateTime”, title: “Date”, valueFormatString: “YYYY-MM-DD HH:mm:ss”},
    chart is well displayed but there is no X axis values, just YYYY-MM-DD HH:mm:ss is displayed.
    What am I doing wrong ?
    Thank you for any help.

    #44875

    Oups I found the solution. In my code I forgot to write: xValueType: “dateTime”. Works fine, sorry for my beginner question.
    Regards.

    #44886

    @yannou,

    Glad that it worked fine for you :)

    Sachin Bisht
    Team CanvasJS

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.