Glossary Item Box

Scale Enumeration | Scale Property

Tutorials: Data Field Mapping | Data Engine

See Also .netCHARTING v3.1 Documentation Send comments on this topic.

Elements And Axis Scales

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

 

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)

Y Axis using ChartType.ComboHorizontal

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:

 

Even if all numeric or time value are provided, setting one name of the elements will yield a category axis scale and values will become names.
 
The data engine will always provide elements with both,  names and values if the names represent numeric or time values. By default this creates a category scale. To use a value scale instead, set the axis scale property to the appropriate scale.
Setting the scale through DefaultAxis.Scale will not produce the same result.
Another simple shortcut to force elements to use a value axis instead of their names is to set ChartType.Scatter but this will only provide a Combo chart type. 
 
Smart Category Axis
 
A smart category axis scale is one that contains elements with names but where the names represent values. The 'smart' part will sequence the element names appropriately based on the values they represent.
 
To use this axis type you must use the DataEngine and specify 'XAxis=valueDBColumn' in its DataFields property.

Scale Enumeration | Scale Property

Tutorials: Data Field Mapping | Data Engine


2002 - 2005 Webavail Productions Inc. & Corporate Web Solutions Ltd.. All Rights Reserved.