)
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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

What are the options available in ejChart to place data labels in the accumulation series?

Platform: ASP.NET MVC |
Control: Chart |
Published Date: August 6, 2015 |
Last Revised Date: July 1, 2019

Essential chart supports customizing the placement of labels in the accumulation series by using the LabelPosition property. Pie, doughnut, pyramid, and funnel are the different types of the series. Data labels can be placed inside, outside, and at outside extended positions. Labels overlapping can be avoided by setting the EnableSmartLabels property to true.

 

Inside

In the inside position, the data labels are placed inside the segments of the accumulation series. The following code example illustrates this.

        @(Html.EJ().Chart("container")
              .CommonSeriesOptions(options=>        
                     options.Type(SeriesType.Pie)
                     .Marker(marker=>
                             marker.DataLabel(label=>
                                    label.Font(font=>
                                            font.Color("white").Size("16px").FontFamily("arial"))
                                    .Visible(true)))
              .LabelPosition(ChartLabelPosition.Inside)
              )   
        ) 

 

The following screenshot displays the data labels placed inside the segments of a pie series.

 

 

The data labels placed inside the segments

Figure 1: The data labels placed inside

 

Outside

In the outside position, the data labels are placed outside the segment of the accumulation series. The following code example illustrates this.

        @(Html.EJ().Chart("container")
              .CommonSeriesOptions(options=>        
                     options.Type(SeriesType.Pie)
                     .Marker(marker=>
                             marker.DataLabel(label=>
                                    label.Font(font=>
                                            font.Color("black").Size("16px").FontFamily("arial"))
                                    .Visible(true)))
              .LabelPosition(ChartLabelPosition.Outside)
              )   
        ) 

 

The following screenshot displays the data labels at the outside position.

The data labels placed outside the segments

Figure 2: Data labels at the outside position

 

Outside extended

In the outside extended position, the data labels are placed outside the segments of the accumulation series. The difference between outside and outside extended placement is that the labels are present at the right and left sides of the chart area in the outside extended position; whereas, in the outside position labels are placed outside with respect to the segments instead of the Chart. The following code example illustrates this.

        @(Html.EJ().Chart("container")
              .CommonSeriesOptions(options=>        
                     options.Type(SeriesType.Pie)
                     .Marker(marker=>
                             marker.DataLabel(label=>
                                    label.Font(font=>
                                            font.Color("black").Size("16px").FontFamily("arial"))
                                    .Visible(true)))
              .LabelPosition(ChartLabelPosition.OutsideExtended)
              )   
        ) 

 

The following screenshot displays labels at the outside extended position.

The data labels placed outside the segments with extended position

Figure 3: Data labels at the outside extended position

 

Sample Link: Pie Chart

2X faster development

The ultimate ASP.NET MVC UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon