javascript - How to remove year from Highchart -
i new use highchart
http://jsfiddle.net/ktmfy6qe/1/ here want remove year listening. first want listen old data ( name: 'random data', data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
) after directly listen current time without showing year. please me remove year.
you can use xaxis-> labels -> formatter function foramt date want.
here in case since have not mentioned start of time , interval value , library started plotting default values.
now same way did tooltip can formatting labels well
xaxis: { type: 'datetime', tickpixelinterval: 150, labels: { formatter: function() { console.log(highcharts.dateformat('%h:%m:%s', this.value)) return highcharts.dateformat('%h:%m:%s', this.value) } } },
here fiddle
Comments
Post a Comment