I am using the chart.js to generate a chart. All works fine !
But how can I format the tooltip information? It should be: 28.04.2020 - 05:00
You need to define time.tooltipFormat
for your xAxis
.
See Moment.js for the allowed format tokens.
options: {
...
scales: {
xAxes: [{
type: 'time',
time: {
unit: 'hour',
tooltipFormat: 'DD.MM.YYYY - HH:mm'
}
...
}]
}
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With