Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts - remove times between dates on a datetime xaxis type

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?

Image

Here's an example jsFiddle.

like image 423
Cople Avatar asked Sep 16 '12 14:09

Cople


2 Answers

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

like image 102
Jugal Thakkar Avatar answered Nov 02 '22 20:11

Jugal Thakkar


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

like image 1
yckart Avatar answered Nov 02 '22 20:11

yckart