data label customization in RadChart

Thread is closed for posting
2 posts, 0 answers
  1. Kavita
    Kavita avatar
    39 posts
    Member since:
    Feb 2013

    Posted 04 Feb 2014 Link to this post

    I have attached one image for explaining my problem.
    I do not want to use HTML chart as my coding has been done using Rad Chart.
    I just want some GUI changes.
  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 06 Feb 2014 Link to this post

    Hi Kavita,

    You can set an appropriate format for the labels through the DefaultLabelValue property of the chart (see this help article). As for the visibility of the labels you can handle, for example the BeforeLayout server-side event of the chart where series items labels can be hidden. For example:

    <telerik:RadChart ID="RadChart1" runat="server" Width="600px" Height="400px" OnBeforeLayout="RadChart1_BeforeLayout">
            <telerik:ChartSeries Type="Bar" Name="Series 1" DefaultLabelValue="#Y{F2}">
                    <telerik:ChartSeriesItem YValue="247775"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="3900"></telerik:ChartSeriesItem>
                    <telerik:ChartSeriesItem YValue="74877.9345"></telerik:ChartSeriesItem>
            <YAxis AxisMode="Extended"></YAxis>
    protected void RadChart1_BeforeLayout(object sender, EventArgs e)
        foreach (ChartSeriesItem item in RadChart1.Series[0].Items)
            if (item.YValue < 4000)
                item.Label.Visible = false;

    Danail Vasilev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the UI for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top