TiPlotAxis.DesiredIncrement

TiPlotAxis

Specifies the desired increment of values in the axis scale

property DesiredIncrement : Double;

Description

Use DesiredIncrement to get or set the desired increment for the axis scale.

If this property is set to 0, then the AutoScale feature of the axis scale will automatically adjust the scale to follow a 1-2-5 rule, which ensures that the scale major ticks and labels fall along "human-readable" whole numbers such as "0,25,50,75,100", "0,10,20,30,40,50,60,70,80,90,100", etc. depending on your min and span property settings.

If this property is greater than zero, the AutoScale feature will attempt to create a scale using your increment values depending on your min and span property settings, adding major ticks and labels that will fit in the area used by the scale. If the AutoScale finds that not all of the labels will fit in the scale area (depends on your font properties), then it will attempt to fit as many labels as possible using this setting.

For example, if you want the scale to increment by values of "2.5", and your min and span properties are 0 and 50, then the AutoScale code will attempt to create a scale with "0, 2.5, 5.0, 7.5, 10, 12.5, …, 40, 42.5, 45, 47.5, 50". If not all of the labels can fit in the space allocated to the scale, it will attempt to fit as many labels as possible using the 1-2-5 rule.

Example

Delphi

iComponent.XAxis[0].DesiredIncrement := 2.5;

iComponent.YAxis[0].DesiredIncrement := 2.5;

C++ Builder

iComponent->XAxis[0]->DesiredIncrement = 2.5;

iComponent->YAxis[0]->DesiredIncrement = 2.5;

Contents | Index | Previous | Next