Help needed in rad chart

Thread is closed for posting
3 posts, 1 answers
  1. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 19 Jun 2012 Link to this post

    Hi all,

    I have two issues in rad chart.

    1. How to inclined the x-axis values i.e. rotate the x-axis series in 45 or 270 degree to clear view the x-axis in rad chart.
    2. How to remove or giving null value to the values which is zero in chart area.



    Thanks in Advance.
    Akki
  2. Answer
    Peshito
    Admin
    Peshito avatar
    497 posts

    Posted 20 Jun 2012 Link to this post

    Hi Akki,

    You can control rotation of the axis labels using the LabelAppearance.RotationAngle property of your axis like this:
    RadChart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 45;
    Regarding your other question, in order to show dates to an axis, values should be converted to OleAutomation types. It can be accomplished by using the DateTime.ToOADate() method.

    As for removing zeroes from your series items, attach to the chart's  ItemDataBound event like this:
    void RadChart1_ItemDataBound(object sender, ChartItemDataBoundEventArgs e)
        {
            if (e.SeriesItem.YValue == 0)
            {
                e.SeriesItem.Label.TextBlock.Text = " ";
            }
        }
    I have also attached  a sample project that you could refer to for more information.

    Kind regards,
    Peshito
    the Telerik team
    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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Akki
    Akki avatar
    79 posts
    Member since:
    Nov 2011

    Posted 20 Jun 2012 Link to this post

    Thanks Peshito,

    Both the fix solved my issues. Thanks once again.

    Cheers,
    Akki
Back to Top