Introduction
While there are many options for scales, .netCHARTING can automatically determine the appropriate scales based on your data. This tutorial will demonstrate how element data influences axis scales.
The Y Axis ( value axis )
We will call this the y axis but by 'value axis' we don't literally mean (Y) axis. With ChartType.ComboHorizontal for instance we would be referring to the x axis. For all others however it is the y axis. The element values that influence this axis are
- YValue
- YValueStart
- YDateTime
- YDateTimeStart
The elements of a series can be excluded from the axis scale range using Series.ExcludeFromAxisRange = true
The automatically chosen axis scales here are either Normal or Time. It is determined by whether the YValue (numeric) or YDateTime (time) values are specified for each element.
The following table shows value settings of these element properties that the chart engine will consider not set.
- YValue & YValueStart
Setting: double.NaN - YDateTime & YDateTimeStart
Setting: DateTime.MinValue
The X Axis (Category / Value Axis)
The x axis is very powerful, it can operate just like the y axis value axis as well as a category axis. If the elements have names (Element.Name) specified, the axis scale will be a category scale. However, if the elements have either XValue or XDateTime properties set, the appropriate value axis scale will be chosen.
The element properties that influence the x axis type are:
- Name
- XValue
- XValueStart
- XDateTime
- XDateTimeStart