HighCharts xAxis - tickInterval的月份 [英] HighCharts xAxis - tickInterval for month

查看:694
本文介绍了HighCharts xAxis - tickInterval的月份的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图根据小时/日期/月/年通过/失败的测试案例绘制样条曲线图并对它们进行分组,然后将此值作为不规则系列(即)如果其小时,数据将不可用于所有24小时。其他分组的情况相同。由于数据是不规则的,因此需要将x轴刻度间隔设为月份,尝试使用dateTimeLabelFormats,它对标签的格式没有太大的帮助。



我需要的是tickInterval需要成为月份副本,并在工具提示中包含日期和时间。



对不起,我无法发布数据/小提琴作为我在商业智能工具(SpagoBI)中使用这个HighCharts,它需要模板。



预先感谢。 >解决方案

尝试以下方法,设置序号错误修复了时间间隔,而不是为了获得最佳可视化而进行更改。

  xAxis:{
类型:'datetime',
minTickInterval:3600 * 24 * 30 * 1000,//以毫秒为单位的时间
minRange:3600 * 24 * 30 * 1000,
ordinal:false //这会设置固定时间格式
},


Am trying to plot spline graph for the no of passed/failed testcases and grouping them based on hour/date/month/year and I am getting this value as irregular series (i.e) if its hours, datas won't be available for all 24 hours. Its the same case for other groupings. As the datas are irregular need the x-axis tick interval to be month vice, Have tried using the dateTimeLabelFormats, It didn't help me much as its only formats the label.

All i need is the tickInterval needs to be month vice and both date&time in tooltip.

Sorry that i won't be able to post data/fiddle as am using this HighCharts in an BI tool(SpagoBI) and it requires templates.

Thanks in advance.

解决方案

Try the following, setting ordinal false fixes the time intervals and not changed for best visualization.

xAxis: {
    type: 'datetime',
    minTickInterval: 3600*24*30*1000,//time in milliseconds
    minRange: 3600*24*30*1000,
    ordinal: false //this sets the fixed time formats                        
},

这篇关于HighCharts xAxis - tickInterval的月份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆