您如何在X轴上更正ApexCharts DateTime范围?
我已经在Vanilla JavaScript中使用ApexCharts创建了一个线图。串联值具有相应的日期,但由于某种原因,3月份被排除在X轴日期标签之外。
示例数据:
series: [
{
name: "Parker, D (1250)",
data: [
{ x: "28-Feb-2017 GMT", y: 34 },
{ x: "31-Mar-2017 GMT", y: 43 },
{ x: "30-Apr-2017 GMT", y: 31 },
{ x: "31-May-2017 GMT", y: 43 },
{ x: "30-Jun-2017 GMT", y: 33 },
{ x: "31-Jul-2017 GMT", y: 52 }
]
}
输出:
出于某种原因,图表正在绘制第一个数据点(日期为日期2月28日的2月1日,我想要的预期行为是3月1日的日期轴。
有人知道如何解决此问题吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也在观察类似的问题。您可能遇到时区问题,请从那时起仔细检查。此外,Apexchart 很少出现图表显示错误时区的问题,这可以在图表选项中进行配置。
请检查
https://github.com/apexcharts/apexcharts.js/issues/958
https://github.com/apexcharts/apexcharts.js/issues/110
I was observing similar issue on my side. You probably have issues with timezones, please double check from that point. Also there were few Apexchart issues with chart showing wrong timezone, which could be configurable in charts options.
Please check
https://github.com/apexcharts/apexcharts.js/issues/958
https://github.com/apexcharts/apexcharts.js/issues/110