Highcharts - remove times between dates on a datetime xaxis type

廉价感情. 提交于 2019-12-23 07:33:36

问题


I'd like to make it so that only dates, not times, are displayed as labels on my Highcharts chart. How can I do that?

Here's an example jsFiddle.


回答1:


you should set the xAxis.minTickInterval

xAxis: {
        minTickInterval: 24 * 3600 * 1000
}

jsFiddle 1
jsFiddle 2

I highly encourage going through the vast and useful highcharts api reference before posting questions




回答2:


http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/type-datetime/



来源:https://stackoverflow.com/questions/12447771/highcharts-remove-times-between-dates-on-a-datetime-xaxis-type

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