Rad Chart XAxis DataLabelsColumn Bug

Thread is closed for posting
2 posts, 0 answers
  1. Shakti SIngh Dulawat
    Shakti SIngh Dulawat avatar
    89 posts
    Member since:
    Oct 2009

    Posted 20 Sep 2012 Link to this post

    Dear Friend I will add two Scanerio that will explain you the clear bugs that we have with rad Chart XAxis!
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsTotalStakesForEachShop"
        IntelligentLabelsEnabled="true">
        <Series>
            <telerik:ChartSeries Name="Series 2" DataXColumn="ShopId" DataYColumn="TotalStakes">
            </telerik:ChartSeries>
        </Series>
        <PlotArea>
            <XAxis AutoScale="False" DataLabelsColumn="Name" MaxValue="7" MinValue="1" Step="1"
              >
                <AxisLabel>
                    <Appearance>
                    </Appearance>
                </AxisLabel>
                <Appearance>
                    <LabelAppearance RotationAngle="90">
                    </LabelAppearance>
                </Appearance>
            </XAxis>
        </PlotArea>
    </telerik:RadChart>

    I am using above code and in this I add XAxis DataLabel Column when we use this it will show me result mention in screen shots A.

    Now when we comment this XAxis check below code
    <telerik:RadChart ID="RadChart1" runat="server" DataSourceID="edsTotalStakesForEachShop"
        IntelligentLabelsEnabled="true">
        <Series>
            <telerik:ChartSeries Name="Series 2" DataXColumn="ShopId" DataYColumn="TotalStakes">
            </telerik:ChartSeries>
        </Series>
        <PlotArea>
            <%--<XAxis AutoScale="False" DataLabelsColumn="Name" MaxValue="7" MinValue="1" Step="1"
              >
                <AxisLabel>
                    <Appearance>
                    </Appearance>
                </AxisLabel>
                <Appearance>
                    <LabelAppearance RotationAngle="90">
                    </LabelAppearance>
                </Appearance>
            </XAxis>--%>
        </PlotArea>
    </telerik:RadChart>

    It will show the result mention in Image B!

    SO the problem is When we will use X Axis DataLable Column
    1) It will hide the last series 
    2) The Label got messup

    Plesase suggest good ways to fix it!

    Thanks
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 25 Sep 2012 Link to this post

    Hello,

    The problem is that the DataXColumn and DataLabelsColumn bindings are not compatible with each other.

    Basically the DataXColumn binding tells the RadChart that it should create one axis item (label)  per each data point. Then it puts the labels on the first x slots (if you have x data points). The chart visualizes only the data points in the range [1,  x] and if there is an item outside of this range - it gets clipped.
    Removing the DataXColumn  binding should solve your issue.

    The other problem - with labels getting messed up can be solved by setting RadChart1.AutoLayout to true.

    I hope this helps.

    All the best,
    Petar Kirov
    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
Back to Top