$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Chart Control for C# Windows Forms
Design Bar, Pie, Line, Area, Polar, Radar and Scatter for C# Windows Forms application
Home > WinForms UI Controls > User Manual > Chart Axes Logarithmic in C#

Logarithmic Axes in Chart for WinForms C# Tutorial

The Logarithmic Axes is a collection of Logarithmic that are able to plot any data containing numeric values in Cartesian Area for Chart in Windows Forms C# template projects. The Logarithmic Axes is only valid in the context of Cartesian Area. The tick value of the Logarithmic axis will increase in exponent, in contrast to the linear axis, whose tick values will increase in linear. Logarithmic axis is typically used when the data values fall in a large range. The logarithmic axis will calculate the exponent value automatically in according to the input data.

Properties of Logarithmic Axis in Chart

  • ValidRange , this is a property used to set the valid range of mini and maximum value to plan data.
  • DesiredTickCount , the property is used to set the number of ticks on the axis.
  • Mini , the property is used to set the minimum value of the axis.
  • Max , this is a property used to set the user-defined maximum of the axis.
  • LogarithmBase , this is a property used to configure the base of the logarithm for normalizing data.
  • ExponentStep , this is a property used to show the exponent step between axes Logarithmic ticks.
  • RangeExtendDirection , the property is used to set the value to specify the automatic extended range of the axis. Its valid values include None, Positive, Negative, and Both.
    • None, the valid value of RangeExtendDirection, used to sets the minimum range to the minimum data point value and the maximum range to the maximum data point value
    • Positive, the valid value of RangeExtendDirection, extends the range maximum with one major step if necessary.
    • Negative, the valid value of RangeExtendDirection, extends the range minimum with one major step if necessary.
    • Both, the valid value of RangeExtendDirection, extend the range in both negative and positive direction.
  • HPosition, the property is used to fix the position of the horizontal place of the axis against the plot area. Its valid values include Top, which displays the axis above the area, and Bottom, which is the default value and displays the axis below the area.
  • VPosition , the property is used to fix the position of the vertical place of the axis in against the plot area. Its valid values include Left, which displays the axis on the left in the area, and Right, which is the default value and displays the axis on the right in the area.
In addition, Logarithmic Axis is not the default value to Cartesian series. As the descendant of Axis class, it will inherit all properties of the Axis class. Developers need to create an instance of the property and assign Logarithmic Axis to the series. The below C# code shows the steps.

BarSeries series = new BarSeries();
series.DataPoints.Add(new CategoricalDataPoint(1000, "Category 1"));
series.DataPoints.Add(new CategoricalDataPoint(10, "Category 2"));
series.DataPoints.Add(new CategoricalDataPoint(100, "Category 3"));
series.DataPoints.Add(new CategoricalDataPoint(10000, "Category 4"));

LogarithmicAxis verticalAxis = new LogarithmicAxis();
verticalAxis.AxisType = AxisType.Second;
verticalAxis.LogarithmBase = 100;

series.VerticalAxis = verticalAxis;
chart1.Series.Add(series);
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls