Reputation: 474
How can i remove day name from the tooltip (highlighted in red) in high-stock chart.
Upvotes: 1
Views: 1339
Reputation:
You can change the standard dateTimeFormat
for the day* label this chart uses.
* It might be you need to change something else as day
, depending on your chart content. See the dateTimeLabel API for all possibilities you can change.
tooltip: {
dateTimeLabelFormats: {
day: '%b %e, %Y'
}
},
This changes the format to Mar 01, 2000
, for example.
If you want a different time format you can check out the PHP strftime
which Highcharts uses for their formatting as stated in their dateFormat API
Here you can find a working JSFiddle
Upvotes: 1
Reputation: 21
I guess you can achieve this by editing your tooltip format during the declaration.
example of tooltip configuration
tooltip: {
formatter: function() {
return '<b>' + this.series.name +'</b><br/>' +
Highcharts.dateFormat('%e %b %Y',
new Date(this.x))
+ ' date, ' + this.y;
}
},
You can also customize your X axis tooltip by using this doc :
https://api.highcharts.com/highcharts/plotOptions.series.tooltip
Upvotes: 0