Chart FX-Axes Introduction
Axes are one of the most important elements since they contain information that help the user interpret the chart. In most instances, charts are drawn in an XY-coordinate system. The Value or Y axis displays a range of values represented by the numeric data, and the Category or X axis displays how the data is broken down in the chart. The following picture highlights the Value (Y) Axis and the Category (X) Axis:
When you first create and populate a chart, Chart FX uses a “best-fit" algorithm that accommodates axis settings automatically. This behavior minimizes the initial programming effort of customizing the chart’s axes. However, in most cases, programmers will face complex axis configuration scenarios like labeling, scrolling, scaling and formatting that must be used in order to help users follow and analyze data.
This section describes the most common axis manipulation scenarios and advanced features and techniques that are used to enhance the chart’s readability like creation of logarithmic scales, multiple axes as well as axis sections and panes.
Numerical and Categorical Axes
The first step to properly configure an axis is to recognize whether you are dealing with a numerical or categorical axis. Sometimes this is not trivial and you may need to closely inspect the chart. In most cases, you will have a categorical axis accompanied by a numerical axis, like the image shown above.
However, in an XY or scatter, both axes are numerical. Similarly, for some chart types like Gantt or horizontal bars, you can tilt the x axis to be vertical and while still remaining a categorical axis. Also, some chart types don’t even have X or Y axes; for example a pie chart will not respond to any of the properties provided in the Axis object.
These situations are depicted in the following images:
In essence, a numerical axis will contain numbers associated with each tick mark and, therefore, will respond to any property that is used to scale or format such numbers. When dealing with numerical axis you don’t have to worry about labeling each tick mark as Chart FX will automatically select the label (or number) for each tickmark in the axis.
On the contrary, a categorical axis displays labels (not numbers). In most cases, you will need to label each tick mark to improve the chart’s readability. If no labels are specified for a categorical axis, Chart FX will assign numerical tags (1,2,3,…) to each tickmark in the axis.
© Copyright 2000-2023 COGITO SOFTWARE CO.,LTD. All rights reserved