Date-time axis working as string, not as proper continuous date/time axis in Zing Chart

一世执手 提交于 2019-12-23 14:56:43

问题


I am plotting date-time vs integer in ZingChart. Even if there is difference of one second or the difference of 1 hour, the width is same between the two points. If the starting time is same as the previous one, like in my attached image at 23:24:40, there should not a white gap in between if it is proper date and time axis. Is there any solution to this problem? You can also view it on alnnovative.com/zing6.php


回答1:


ZingChart will automatically place values at each index, unless you use key, value pairs as your data points. To do this, set your series object values like so:

"values":[
    [1420070400000,50],
    [1420071000000,50],
    [1420070520000,50],
    [1420070640000,50],
    [1420070700000,50],
    [1420070760000,50],
    [1420070820000,50],
    [1420070940000,50],
    [1420071060000,50]
]

Take a look at this demo. I'm a member of the ZingChart team, let me know if you need more help.



来源:https://stackoverflow.com/questions/31608347/date-time-axis-working-as-string-not-as-proper-continuous-date-time-axis-in-zin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!