We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Chart DataLabel Position or other view


I show only DataLabel for the last week. But there are overlapping issues.

I want to like the image below or do not wish overlap.

and I refer to the following url. 
But DataLabel must always be visible in the last week.
Points p = new Points();
p.= weekValue;
p.= Math.Round(value, 2);
if (ds.Tables[0].Columns[j].ToString().Split('&')[1].Replace("[""").Replace("]"""== this.LastWeekNumber)
    //p.Marker.DataLabel.Visible = true;
    ////p.Marker.Size.Width = 10;
    ////p.Marker.Size.Height= 10;
    //p.Marker.DataLabel.TextPosition = Syncfusion.JavaScript.DataVisualization.TextPosition.Middle;
    ////p.Marker.Shape= Syncfusion.JavaScript.DataVisualization.ChartShape.Circle; 
    ////p.Marker.DataLabel.Shape= Syncfusion.JavaScript.DataVisualization.ChartShape.Rectangle;
    //p.Marker.DataLabel.Font.Color = "#000000";
    //p.Marker.DataLabel.Font.FontWeight = Syncfusion.JavaScript.DataVisualization.ChartFontWeight.Bold;
    //p.Marker.DataLabel.Opacity = 0;
    p.Marker.DataLabel.Visible = true;
    p.Marker.DataLabel.HorizontalTextAlignment = Syncfusion.JavaScript.DataVisualization.TextAlignment.Near;
    p.Marker.DataLabel.VerticalTextAlignment = Syncfusion.JavaScript.DataVisualization.TextAlignment.Near;
    p.Marker.DataLabel.TextPosition = Syncfusion.JavaScript.DataVisualization.TextPosition.Middle;
    p.Marker.DataLabel.Fill = "#FFFFFF";
    p.Marker.DataLabel.Offset = "20";
    p.Marker.DataLabel.Shape = Syncfusion.JavaScript.DataVisualization.ChartShape.Rectangle;
    p.Marker.DataLabel.Font.Color = "#000000";
    p.Marker.DataLabel.Border.Width = 0.7;
    p.Marker.DataLabel.Border.Color = "#000000";
    p.Marker.DataLabel.Opacity = 0.8;

Thanks and Regards,
Jinchul Oh.

3 Replies

DP Deepaa Pragaasam Syncfusion Team December 1, 2015 09:04 AM UTC

Hi Jinchul,

Thanks for contacting Syncfusion Support.

We have analyzed your query.

To avoid the overlapping of the datalabels , we can enable the  SmartLabels . The EnableSmartLabels Property is used to place the datalabels smartly without overlapping.
Code example:

<ej:Series EnableSmartLabels="true" Name="India" Fill="#8CC640" >


To know more about the smartlabels please refer our online sample Link

Online Link: http://asp.syncfusion.com/demos/web/chart/smartlabels.aspx

We have attached the sample for your reference

Sample Link: http://www.syncfusion.com/downloads/support/forum/121317/ze/WebApplication1704257377
Please let us know if you have any concerns


JO jinchul oh December 4, 2015 10:04 AM UTC

Hello Deepaa,

Thanks for your help.
I've already set the "EnableSmartLabels = true;".
But not works. 

and I have another question.
I want to thousand comma Axes Label.

I've tried setting the LabelFormat.
<PrimaryYAxis  Title-Text="Efficiency"  LabelFormat="n0" />

jinchul oh

Attachment: WebApplication_6e44bad1.zip

BK Bharathiraja K Syncfusion Team December 8, 2015 10:26 AM UTC

Hi Jinchul ,

Thanks for your update.

We have analyzed your below query.

Query-1: I've already set the "EnableSmartLabels = true;” But no works.
We have run your attached sample with EnableSmartLabels in false state and taken the below screenshot. In that, dataLabels are overlapped with one another.

In the second screenshot, we have set EnableSmartLabels as true. Now you can see the dataLabel displays without overlapping. SmartLabel behavior is working fine.
Query-2: I've tried setting the LabelFormat. – DataLabel text issue.
We can reproduce the issue and logged issue report on “Label Format support needs to be provided for datalabels”. We have created separate incident under your account for the better follow-up.

Please let us know, if you have any other concern on this.


Live Chat Icon For mobile
Up arrow icon