RadChart Spline ChartSeries not displayed correctly

Thread is closed for posting
2 posts, 0 answers
  1. Claudio
    Claudio avatar
    3 posts
    Member since:
    Oct 2012

    Posted 18 Nov 2012 Link to this post

    here you can see my code:

    <telerik:RadChart ID="RadChart12" runat="server" Width="600px" Height="400px" DataSourceID="SqlDataSource12" AutoLayout="true" SeriesOrientation="Vertical" Style="float: left;">
                <ChartTitle TextBlock-Text="Slot History" TextBlock-Appearance-TextProperties-Color="#333333" Appearance-FillStyle-MainColor="Transparent"></ChartTitle>
                 <Appearance Border-Color="Transparent" >
                        <FillStyle   MainColor="Transparent" />               
                <Legend Visible="false">
                    <Appearance ItemTextAppearance-TextProperties-Color="White" FillStyle-MainColor="Transparent" GroupNameFormat="#VALUE">
                    <telerik:ChartSeries Name="Total Trains" DataYColumn="count" >
                            <LabelAppearance Visible="FALSE"></LabelAppearance>
                            <FillStyle MainColor="#fbb03b" SecondColor="#fbb03b" >
                    <telerik:ChartSeries Name="Cumulative Percentage" YAxisType="Secondary" DataYColumn="Pct_To_Total" DataLabelsColumn="labelPerc" Type="Spline">
                         <TextAppearance  TextProperties-Color="Black"></TextAppearance>
                            <FillStyle  MainColor="Red">
                <PlotArea Appearance-FillStyle-MainColor="Transparent" Appearance-FillStyle-SecondColor="Transparent" >
                            <YAxis2 Appearance-TextAppearance-TextProperties-Color="#333333" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false"></YAxis2>
                            <YAxis Appearance-TextAppearance-TextProperties-Color="#333333" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false"></YAxis>
                            <XAxis  Appearance-LabelAppearance-RotationAngle="45"  Appearance-TextAppearance-TextProperties-Color="#333333" DataLabelsColumn="slotcount" Appearance-MajorGridLines-Visible="false" Appearance-MinorGridLines-Visible="false">

    here the sql result:

    slotcount count pc_to_total labelPerc
    n°1 Slot 24 6.25 6.25%
    n°2 Slot 3 7.81 7.81%
    n°10 Slot 1 10.42 10.42%
    n°11 Slot 1 13.28 13.28%
    n°333 Slot 1 100 100.00%

    and here the result:

    My problem is that the line does not have to go down and it happens when i use type=Spline to have the curved line...
    Can You please help me to understand if this is my fault or if this is telerik issue and can i do anything to show a correct curved line?

  2. Petar Kirov
    Petar Kirov avatar
    425 posts

    Posted 21 Nov 2012 Link to this post

    Hi Claudio,

    What you identify as a problem is actually caused by the nature of spline algorithms.

    The curve between 2 points P1 and P2 actually depends on the points before and after them.

    For example in order to draw a smooth curve between n°10 Slot and n°11 Slot, you have to take into account that the next value at n°333 Slot is quite high (compared to the previous two) and should first bend down to leave some room for the turn at n°11 Slot or otherwise the turn will be too sharp.

    This may show seemingly wrong trend in situations like this, but this is how smoothness is achieved. If this is a problem, you can always use line series, instead of spline.

    Kind Regards,
    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.
Back to Top