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

Autoscale minvalue YAxis RadHtmlChart

4 Answers 146 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Luc Émond
Top achievements
Rank 1
Luc Émond asked on 06 Nov 2013, 02:22 PM
Hi i'am using RadHTMLChart with LineSeries.

When i don't pu anything for the minValue in the YAxis the minValue is set automatic.
But it not working all the time, is it me or it a bug?
I have 2 diffrent graphs the first one the lowest number is 77 and the and the minValue autoscale to 72
I have a second graphs with almost with the samething but the smalest number is 58 and the minValue is set to 0??

What i am doing wrong?
I want the minValue and maxValue to autoscale
Sorry for my bad English!
Tks
Luc



<telerik:RadHtmlChart runat="server" ChartTitle-Text="Courbe FR" DataSourceID="SqlDataSource1" ID="RadHtmlChart1" Width="800" Height="500">
                          <PlotArea>
                               <Series>
                                      
                                    <telerik:LineSeries Name="École" DataFieldY="rlEcole"
                                      <Appearance>
                                              <FillStyle BackgroundColor="Blue" />
                                         </Appearance
                                      <TooltipsAppearance Color="White" /> 
                                  </telerik:LineSeries
                                      
                                    <telerik:LineSeries Name="District"  DataFieldY="rlDistrict"
                                      <Appearance>
                                              <FillStyle BackgroundColor="Green" />
                                         </Appearance
                                      <TooltipsAppearance Color="White" /> 
                                  </telerik:LineSeries
  
                                                                       
                                    <telerik:LineSeries Name="Province"  DataFieldY="rlProvince"
                                      <Appearance>
                                              <FillStyle BackgroundColor="Red" />
                                         </Appearance
                                      <TooltipsAppearance Color="White" /> 
                                  </telerik:LineSeries
                               </Series>
                                 
  
                               <YAxis
                                    <TitleAppearance Text="%" >
                                        <TextStyle FontSize="16px"></TextStyle>
                                    </TitleAppearance>
                               </YAxis>
  
                                
                               <XAxis DataLabelsField="strAnnee">
                                    <LabelsAppearance />
                               </XAxis>
                                             
                          </PlotArea>

4 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 11 Nov 2013, 06:38 AM
Hello Luc,

In general, if the value of the series' items are positive numbers only, then YAxis' MinValue should be equal to zero. Could you confirm that you want to display positive numbers only as well?

Furthermore, I could not find a case where MinValue is bigger than that, so I created a sample page to demonstrate this. Could you modify  it, so that I can investigate your issue and give you further assistance?

Regards,
Stamo Gochev
Telerik
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 the blog feed now.
0
Luc Émond
Top achievements
Rank 1
answered on 12 Nov 2013, 12:30 PM
Hi,

Tks for the repy.

Yes i only use positive value.

I try your sample (copy paste) and the lowest value is 58.
So should the minValue be set automaticly arround 50 since the lowest number is 58?
With your exemple the minValue Start at 0?

Is it doing the samething for you?
Please check the picture.

Tks

Luc
0
Luc Émond
Top achievements
Rank 1
answered on 12 Nov 2013, 12:40 PM
Hi create sample to replicate the error

The first graphs the minValue is autoset to 62 and in the second graph the minValue autoset to 0.
Can you copy paste my example and try it?
So the first one is ok but not second one :)
You should have the same error in the second graphs
Tks
Luc


<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Width="800" Height="500" Skin="Black">
            <PlotArea>
                <Series>
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="75" />
                            <telerik:CategorySeriesItem Y="72" />
                            <telerik:CategorySeriesItem Y="67" />
  
                        </SeriesItems>
                    </telerik:LineSeries>
  
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="74" />
                            <telerik:CategorySeriesItem Y="74" />
                            <telerik:CategorySeriesItem Y="71" />
                        </SeriesItems>
                    </telerik:LineSeries>
  
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="74" />
                            <telerik:CategorySeriesItem Y="72" />
                            <telerik:CategorySeriesItem Y="68" />
                        </SeriesItems>
                    </telerik:LineSeries>
                </Series>
            </PlotArea>
  
        </telerik:RadHtmlChart>
          
        <telerik:RadHtmlChart runat="server" ID="RadHtmlChart2" Width="800" Height="500" Skin="Black">
            <PlotArea>
                <Series>
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="68" />
                            <telerik:CategorySeriesItem Y="73" />
                            <telerik:CategorySeriesItem Y="58" />
  
                        </SeriesItems>
                    </telerik:LineSeries>
  
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="64" />
                            <telerik:CategorySeriesItem Y="66" />
                            <telerik:CategorySeriesItem Y="66" />
                        </SeriesItems>
                    </telerik:LineSeries>
  
                    <telerik:LineSeries>
                        <SeriesItems>
                            <telerik:CategorySeriesItem Y="67" />
                            <telerik:CategorySeriesItem Y="66" />
                            <telerik:CategorySeriesItem Y="67" />
                        </SeriesItems>
                    </telerik:LineSeries>
                </Series>
            </PlotArea>
  
        </telerik:RadHtmlChart>

0
Stamo Gochev
Telerik team
answered on 14 Nov 2013, 10:01 AM
Hi Luc,

Thanks for your effort. I can see the same result as you do and there is a difference in the YAxis' scaling.

However, the automatic YAxis' scaling depends on the values of the series' items and their distribution in the chart. This means that there might be cases (such as the second example with MinValue of 0) when the combination of default chart's height, scaling and items' values will make the chart look unreadable, so  the YAxis is scaled in such a way to fix all visual glitches.

In short, there is no "ultimate" solution of the YAxis' scaling that will make the chart look fine in all cases. This is the reason why we have implemented the MinValue property so that the scaling could be configured.

Regards,
Stamo Gochev
Telerik
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 the blog feed now.
Tags
Chart (Obsolete)
Asked by
Luc Émond
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Luc Émond
Top achievements
Rank 1
Share this question
or