How to use the tooltip formatter and still display chart color (like it does by default)?

前端 未结 4 1153
野趣味
野趣味 2020-12-24 05:26

If I\'m using the default Highcharts tooltip, it displays a circle the color of the chart data (the light/dark blue circles at http://jsfiddle.net/WOUNDEDStevenJones/mpMvk/1

4条回答
  •  独厮守ぢ
    2020-12-24 06:20

    If you want the main part of the tooltip look the same, and just the x-value to be formatted differently, you can use the headerFormat property instead and use point.key rather than this.x. This will accomplish the same thing without having to reproduce the series body.

    tooltip: {
        headerFormat: '{point.key}
    ' }

提交回复
热议问题