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
close icon

Creating YAxis with Logarithmic scale from code behind doesn't seem to be working.

 Hi, 
I tried creating YAxis with logarithmic scale from code behind with the following setting, however its not working. 

 chart1.Areas[0].SecondaryAxis.SetValue(SyncfusionChartAxis.IsLogarithmicProperty,true);            
 chart1.Areas[0].SecondaryAxis.LogarithmicRange = new DoubleRange(0, 10000);
 chart1.Areas[0].SecondaryAxis.LogarithmicInterval = 1;
 chart1.Areas[0].SecondaryAxis.ValueType = ChartValueType.Logarithmic;
 chart1.Areas[0].SecondaryAxis.LogarithmicBase = 10;                                  

Please find attached screenshot of resultant chart ui for above settings.


From the samples from Syncfusion, it seems logarithmic scales are working if these properties are set in XAML.

A quick help would be highly appreciated.                                  . 
Thanks
Suneel




ChartWithLogarithmicScale_ce7657fb.rar

1 Reply

MK Muneesh Kumar G Syncfusion Team August 12, 2013 12:46 PM UTC

Hi SuneelKumar,

Thanks for using Syncfusion products,

We are able to reproduce the reported issue. We would like to inform you that this is not an issue if we need to set Custom range(LograthamicRange) have to set IsAutoSetRange as false as per the below code snippet.

Code Snippet[C#]:
 chart1.Areas[0].SecondaryAxis.IsAutoSetRange=false;
 chart1.Areas[0].SecondaryAxis.LogarithmicRange=new Syncfusion.Windows.Chart.DoubleRange(1,100000000000);

We have prepared a sample based on this and you can find the sample under the following location:

Please let us know if you have any queries.

Regards,
Muneesh Kumar G.




CS_8e0dc7f9.zip

Loader.
Live Chat Icon For mobile
Up arrow icon