How to Add Additional Text in Datalabel of the Column Chart?
Description
This article explains how to add additional text in the data label 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:
Refer to the working sample for additional details and implementation: View Sample in Stackblitz
Conclusion
We hope you enjoyed learning about how to add additional text in the data label of the JavaScript Column Charts.
You can refer to our JavaScript Chart feature tour page to learn about its other groundbreaking feature representations and documentation, as well as how to quickly get started with 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!