使用pointFormat时的Highcharts工具提示日期格式

Sai*_*lvi 3 tooltip datetime-format highcharts

嗨我正在使用y轴上的净交易和在x轴上键入日期时间的高价图表.我已经在x轴点标签上显示了月份和日期(2016年1月),并希望在工具提示上显示相同的日期格式.但它显示日期和日期一样,"2016年1月1日星期一.

这是我的js代码.

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
    },
Run Code Online (Sandbox Code Playgroud)

谢谢你的帮助

and*_*ulo 7

只需更改你的point.X:格式字符串from {point.x:%Y-%m} to {point.x:%b-%Y},如下所示

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
    },
Run Code Online (Sandbox Code Playgroud)