Category / Section
How to add additional text in datalabel of the column chart?
3 mins read
Description
This article shows how to add additional text in the datalabel of the JavaScript Charts.
Solution
By default, the y values are displayed in data labels. To add additional text to the data label, you can use the text argument in the textRender event of the chart.
Code Snippet
The following shows how to add additional text to the datalabel.
textRender: (args) => {
args.text = args.series.points[args.point.index].y + ' ' + args.text;
}
The following image illustrates the output of the above code.