Axes are one of the most important aspects of a chart because they provide users with a visual means to read and analyze
data. Therefore, a charting tool must provide mechanisms to
manipulate axis settings programmatically.
Chart FX for Java automatically configures axes accommodating
the data that was used to populate the chart. This behavior
will minimize the initial programming effort of customizing
the chart's axes. However, in some cases, programmers will
face complex needs like special labeling, scrolling, formatting
and scaling that must be addressed via code. To achieve this,
Chart FX for Java provides a powerful object-oriented API letting programmers customize virtually anY-axis setting.
Note: Scrolling axes are only supported with active charts.
In this section, you will learn how to use the Chart FX for Java API to customize any of the chart's axes. We will also describe special techniques that are used to enhance the chart's
readability through axis customization and the creation of multiple axes.
Note: Chart FX for Java gives end users the ability
to change axis settings at run time by simply right-clicking
and accessing axis properties through an intuitive interface.
For more information, please refer to the "Chart FX for Java User Interface" later in this manual.
The AxisX, AxisY and Axis Objects
Most charts contain 2 axes: a numerical axis (Y-axis) and categorical axis (X-axis).
Chart FX for Java exposes 2 objects (AxisX and AxisY)
that list a myriad of properties that allow control over many
axis settings, including labeling, scaling and formatting
attributes like colors, gridlines and tick marks. These objects,
and their properties, can be accessed directly from your IDE
at design time by clicking on a chart control and using the
properties list or they can be accessed directly via code.
The Axis object is also provided to extend the capabilities
of Chart FX for Java to support an unlimited number of axes.
Multiple axes support (including a Secondary Y-axis) is described
later in this section.
|