Articles in this section
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.

image.png

View Sample in Stackblitz

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied