Add dataLabel to Area chart in Highcharts.js

后端 未结 1 1736
小蘑菇
小蘑菇 2021-01-20 03:57

I want to add a data label to specific point in the \'Area\' chart. I\'m using \'Highchart\' for making graph. I want a data label in chart design as following image. What s

相关标签:
1条回答
  • 2021-01-20 04:45

    For the relevant point in your data use the object notation and enabled data labels. You can use format and formatter to display the desired information.

    Example of your series would be:

    series: [{
        name: 'My series name',
        data: [5, 10, 30, 100, 200, 300, 600,
            { 
                y: 900, 
                dataLabels: {
                   enabled: true,
                   format: '{series.name}'
                }
            },
            700, 400, 100]
    }]
    

    Or see this more elaborate JSFiddle example.

    0 讨论(0)
提交回复
热议问题