We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Logarithmic values on line chart

Hi,

I have been trying to make use of the logarithmic axis functionality in syncfusion chart. I'm using values in the range 1e-9 and 1e-5 and plotting them on a line chart. The line chart plots correctly however the axes are not displayed correctly. I have set the IsLogarithmic property to true and the Logarithmic base to 10. The results are values in the range 0.001 - 1 floating above the chart and no values on the axis below this.

I get the same results setting the IsAutoSetRange or defining the range manually.

Any help will be much appreciated.

Regards,

Matthew




5 Replies

PJ Pavithra J Syncfusion Team May 20, 2009 01:05 PM UTC

Hi Mathew,

Thanks for your interest in Syncfusion products.

Since you need exponential values to be displayed in Secondary axis, kindly set Math.E as LograthimicBase value.

Below given code snippet illustrates setting the same.

area.SecondaryAxis.LogarithmicBase = Math.E;

Please let us know if you have further queries.

Regards,
Pavithra.J


MT Matthew Thomas May 21, 2009 07:34 AM UTC

Setting the logarithmic base to Math.E does not help and is also not what is desired as I want the scale displayed split into powers of 10 (i.e. with a logarithm of base 10 as I stated in my first post). It should be made clear that the chart appears to plot correctly although there is an error with the display of the values on the axis. Is it possible the formatting of the axis needs changing?

Regards,

Matthew


PJ Pavithra J Syncfusion Team May 22, 2009 06:38 AM UTC

Hi Matthew,

Thanks for your interest in Syncfusion products.

For any point if the Y-Value is below 0 (Zero), then our Chart Control will plot the graph in the negative half. Obviously the value returned by exp(-9) is below zero and hence the values are plotted in the negative half.

Please refer to the attached sample from the below given link that illustrates this behavior.

Logarithmic Sample

Please let us know if you have further queries.

Regards,
Pavithra.J


SR Sudharsini Ravikumar July 18, 2012 10:34 PM UTC

The link is broken. Could you please let me download the logrithmic sample? Thanks.


MP Michael Prabhu M Syncfusion Team July 26, 2012 04:07 AM UTC

Hi Sudharsini Ravikumar,

Thanks for your interest in Syncfusion Products.

 

The link for the sample which you have asked for has been expired, however we have created a new sample for you. To enable logarithmic values you have to set the ChartAxis ValueType Property to Logarithmic and LogarithmicBase property to your desired log base as in below code snippet.

 

Code Snippet [Xaml]

 

<syncfusion:ChartAxis  ValueType=”Logarithmic” LogarithmicBase=”10”/>

 

Code Snippet [C#]

 

Chart1.Areas[0].SecondaryAxis.ValueType= ChartValueType.Logarithmic;

Chart1.Areas[0].SecondaryAxis.LogarithmicBase=10;

 

We also like to inform you that we have enhanced the Logarithmic feature in our upcoming Volume 3 Release (2012). Please create a direct track incident to know more about this enhancement in our upcoming release.

 

Please let us know if you have any concerns.

 

Thanks

Michael Prabhu.

 



10738_be18e8c2.zip

Loader.
Live Chat Icon For mobile
Up arrow icon