hi i am working on highcharts with net transactions on y-axis and type datetime on x-axis. i have shown month and date on x-axis point label as (jan 2016) and want to show the same date format on tooltip. but its showing full date with day as well like "Monday, jan 1, 2016.
here is my js code.
tooltip: {
headerFormat: '<span style="font-size:10px">{point.x:%Y-%m}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0;font-size:11px;">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:,.0f}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
Thanks for any help
Just change your point.X: format string from {point.x:%Y-%m} to {point.x:%b-%Y} as shown bellow
tooltip: {
headerFormat: '<span style="font-size:10px">{point.x:%b-%Y}</span><table>',
pointFormat: '<tr><td style="color:{series.color};padding:0;font-size:11px;">{series.name}: </td>' +
'<td style="padding:0"><b>{point.y:,.0f}</b></td></tr>',
footerFormat: '</table>',
shared: true,
useHTML: true
},
use html in tooltip and format using dateFormat
Highcharts.dateFormat(%Y-%m,this.x)
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