Articles in this section
Category / Section

How to set range for log axis?

1 min read

To set a range for the WinForms charts in logarithmic axis, specify the range in logarithmic value. Check the following code snippet for setting a range for logarithmic axis.

By default, the labels of y-axis will be rendered with respect to the specified range. To get the output of y-axis labels in 10 power format, specify the LogLabelsDisplayMode property to IntegerLogValues, so that the y-axis labels will be rendered in 10 multiples, i.e. 100, 1000, 10000, etc. with respect to the specified range. Check the following code snippet to get the output of the y-axis labels 10 power format.

 

this.chart.PrimaryYAxis.LogLabelsDisplayMode = LogLabelsDisplayMode.IntegerLogValues;

 

Chart with y-axis in 10power format in WinForms charts

 

Sample: logaxis-sample

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied