Overview
Axes are fundamental components that define the coordinate system and scale of your charts. TeeChart supports:- Standard axes (Left, Right, Top, Bottom)
- Custom axes for multi-axis charts
- Depth axes for 3D charts
- Automatic and manual scaling
- Custom labels and formatting
Key Classes
TChartAxis
The main axis class that controls all axis properties and behavior. Location:TeEngine.pas
Key Properties:
Minimum,Maximum- Axis scale rangeIncrement- Distance between labelsVisible- Show/hide axisGrid- Grid line propertiesMinorGrid- Minor grid linesLabelsFont- Label font propertiesTitle- Axis title text and formatAutomatic- Auto-calculate scaleAutomaticMinimum,AutomaticMaximum- Auto-calculate min/max individually
Basic Axis Configuration
Setting Axis Scale
Custom Axis Labels
Use theOnGetAxisLabel event to customize axis label text and formatting:
Axis_LabelsFormat.pas:29
Minor Grid Lines
Display additional grid lines between major ticks:Axis_MinorGrid.pas:35
Custom Axes
Create additional axes for multi-scale charts:Axis_Custom.pas:48
Clipping to Axis Area
Restrict series drawing to axis boundaries:Axis_Custom.pas:74
Advanced Features
Grid Band Centering
Center grid lines between data points:Axis_GridBandCentered.pas:37
Logarithmic Axes
DateTime Axes
Axis Items
Manually define axis labels:Configuration Options
Label Position
Axis Line Style
Multi-Line Axis Titles
Common Use Cases
Financial Charts (Dual Axes)
Price on left axis, volume on right axis:Scientific Data (Isometric View)
Maintain equal scaling on both axes:Time Series
Optimize for time-based data:Real-Time Charts
Optimize axis calculations for performance:FastLine_Realtime.pas:99
Related Topics
Series Types
Different chart series types
Real-Time Data
High-performance real-time charting
