I have an area chart that show some values and datetime in tooltip like picture below :
This is the options i used :
const getConfig = data => ({
chart: {
type: 'area'
},
rangeSelector: {
selected: 1
},
title: {
text: 'Highcharts',
},
xAxis: {
tickInterval: 1000,
},
yAxis: {
allowDecimals: false,
labels: {
format: '{value}'
}
},
tooltip: {
pointFormat: "{point.y:.0f}"
},
series: [
{
name: 'Data',
data: data,
},
],
});
I already tried this customize highcharts tooltip to show datetime, with this code :
tooltip: {
formatter: function() {
return '<b>' + this.series.name +'</b><br/>' +
Highcharts.dateFormat('%e - %b - %Y',
new Date(this.x))
+ ' date, ' + this.y + ' Kg.';
}
}
But still not change the lower tooltip (datetime), it just change the upper tooltip (122 value).
How to remove decimal value at tooltip so the time just like Sunday, Jul 29, 15:50:14
?