Linear Axis Label Format - 0

5 posts, 0 answers
  1. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 14 Oct 2013 Link to this post

    Hi,

    I have a  chart which has a linear axis and with a range of -150 to 150. As soon as I zoom the label for 0 is displayed in scientific notation (see attached image). Is there a way I can stop this? I would prefer to not have to set a format string on the axis as I would like the labels to show more decimal places as the user zooms in to view the data in more detail.

    Thanks,

    Steven
  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 14 Oct 2013 Link to this post

    Hello Steven,

    I tried to reproduce the unwanted behavior you are facing but to no avail. You may find below my sample code and a snapshot of the result I get:
     
    <telerik:RadCartesianChart x:Name="telerik" >
              <telerik:RadCartesianChart.HorizontalAxis>
                  <telerik:LinearAxis Maximum="150" Minimum="-150" MajorStep="50"/>
              </telerik:RadCartesianChart.HorizontalAxis>
     
              <telerik:RadCartesianChart.VerticalAxis>
                  <telerik:LinearAxis/>
              </telerik:RadCartesianChart.VerticalAxis>
     
              <telerik:RadCartesianChart.Behaviors>
                  <telerik:ChartPanAndZoomBehavior ZoomMode="Both">
                  </telerik:ChartPanAndZoomBehavior>
              </telerik:RadCartesianChart.Behaviors>
     
              <telerik:RadCartesianChart.Series>
                  <telerik:ScatterPointSeries>
                      <telerik:ScatterPointSeries.DataPoints>
                          <telerik:ScatterDataPoint YValue="10"
                                               XValue="100"/>
                          <telerik:ScatterDataPoint YValue="4"
                                               XValue="20"/>
                          <telerik:ScatterDataPoint YValue="7"
                                               XValue="30"/>
                          <telerik:ScatterDataPoint YValue="11"
                                               XValue="40"/>
                          <telerik:ScatterDataPoint YValue="15"
                                               XValue="50"/>
                          <telerik:ScatterDataPoint YValue="10"
                                               XValue="-60"/>
                          <telerik:ScatterDataPoint YValue="4"
                                               XValue="70"/>
                          <telerik:ScatterDataPoint YValue="7"
                                               XValue="-80"/>
                          <telerik:ScatterDataPoint YValue="11"
                                               XValue="90"/>
                          <telerik:ScatterDataPoint YValue="15"
                                               XValue="120"/>
                          </telerik:ScatterPointSeries.DataPoints>
                  </telerik:ScatterPointSeries>
              </telerik:RadCartesianChart.Series>
          </telerik:RadCartesianChart>

    As you will see everything is working as expected. Could you please isolate the problem in a sample runnable project and send it to us? This way we will be able to inspect what's wrong and get back to you with more detailed feedback.

    Regards,
    Evgenia
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 14 Oct 2013 Link to this post

    HI Evgenia ,

    Thanks for the quick response.

    One thing that you do differently is that you specify values for the Minimum, Maximum and MajorStep properties on the axis, I am not able to do that as the range could (and almost certainly will) vary  and I want the MajorStep to adjust based on the range of the data and the zoom level.

    I will try and isolate the problem into a simple solution and send it to you asap.

    Thanks,

    Steven
  5. Steven
    Steven avatar
    37 posts
    Member since:
    Jul 2012

    Posted 15 Oct 2013 Link to this post

    Hi Evgenia ,

    I made an isolated copy of my chart using the same data from my application and I do not get the error so I guess it is something we are doing on our side (though I am not sure what as the same code within our application is consistently having this problem).

    Do you have any idea at all as to what could cause this issue?

    If not, I will keep looking.

    Thanks,

    Steven
  6. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 16 Oct 2013 Link to this post

    Hello Steven,

     We haven't had such feedback from other clients of ours and I'm perplexed since this is now working in an isolated project for you. Any details that you might give us may be of help, like do you zoom/pan to get the unwanted result or this appears on initial load of the project?

    Regards,
    Evgenia
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WPF is Visual Studio 2017 Ready