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

Conclusion

We hope you enjoyed learning about How to add additional text in datalabel of the Javascript Column Charts.

You can refer to our Javascript Chart feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our Angular Chart example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, BoldDesk Support, or feedback portal. We are always happy to assist you!

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