This is a migrated thread and some comments may be shown as answers.

RadChart Spline ChartSeries not displayed correctly

1 Answer 73 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Claudio
Top achievements
Rank 1
Claudio asked on 19 Nov 2012, 05:27 AM
Hi,
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" />               
               </Appearance>
            <Legend Visible="false">
                <Appearance ItemTextAppearance-TextProperties-Color="White" FillStyle-MainColor="Transparent" GroupNameFormat="#VALUE">
                </Appearance>
            </Legend>
            <Series>
            
                <telerik:ChartSeries Name="Total Trains" DataYColumn="count" >
                    <Appearance>
                       
                        <LabelAppearance Visible="FALSE"></LabelAppearance>
                        <FillStyle MainColor="#fbb03b" SecondColor="#fbb03b" >
                        </FillStyle>
                    </Appearance>
                    
                </telerik:ChartSeries>
                <telerik:ChartSeries Name="Cumulative Percentage" YAxisType="Secondary" DataYColumn="Pct_To_Total" DataLabelsColumn="labelPerc" Type="Spline">
                     <Appearance>
                     
                     <TextAppearance  TextProperties-Color="Black"></TextAppearance>
                        
                        <FillStyle  MainColor="Red">
                        </FillStyle>
                    </Appearance>
                </telerik:ChartSeries>
            </Series>
            <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">
                        </XAxis>
            </PlotArea>
        </telerik:RadChart>

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?

1 Answer, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 21 Nov 2012, 07:23 PM
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.
Tags
Chart (Obsolete)
Asked by
Claudio
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Share this question
or