BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi Kalpa,
Thanks for using Syncfusion products.
Query: How to format legend value?
We can use legendItemRendering event of Chart to format the text in legend item.
Please refer the following code snippet to achieve this.
<code>
[JS]
$("#container").ejChart(
{
//Event for rendering legend items
legendItemRendering: 'LegendRendering',
. . . . . .
. . . . . .
});
//Formatting legend item text in event handler
function LegendRendering(sender) {
var seriesIndex = sender.data.legendItem.SeriesIndex;
var pointIndex = sender.data.legendItem.PointIndex;
//Formatting legend item text
sender.data.legendItem.Text = Globalize.format(sender.model.series[seriesIndex].points[pointIndex].y, "c0");
}
</code>
We have also prepared a sample for formatting legend text and it can be downloaded from the following link
http://www.syncfusion.com/downloads/support/directtrac/118470/ChartLegend-120210264.zip
[Screenshot]
Chart with formatted text in legend
Please let us know if you have any concern.
Regards,
Anandaraj
Hi Kalpa,
Thanks for your update.
Please let us know if you need any furture assitance.
Regrads,
Jayavigneshwaran