Version

Set Minimum and Maximum Data Values

This topic will describe how the ZeroAligned property can be used to change the minimum and maximum data values of the Chart control’s axis. Depending on the value of this property, the data will either be charted from the minimum data value to the maximum data value, or from zero to the minimum data value, or from zero to the maximum data value, based on whether these values are positive or negative. The table below shows all possibilities. DataMin and DataMax are the minimum and maximum values of the set of data that will be charted. When the ZeroAligned property is set to False, the chart will always use an interval from DataMin to DataMax.

Data Min Data Max Zero Interval Interval Charted

Negative

Negative

True

DataMin…​0

Negative

Positive

True

DataMin…​Data Max

Positive

Maximum

True

0…​DataMax

Negative

Negative

False

DataMin…​DataMax

Negative

Positive

False

DataMin…​DataMax

Positive

Positive

False

DataMin…​DataMax

You can set the ZeroAligned property using the following code:

In Visual Basic:

Me.UltraChart1.Data.ZeroAligned = True

In C#:

this.UltraChart1.Data.ZeroAligned = true;