Overview
Line charts connect data points with straight or curved lines, making them ideal for displaying trends over time or continuous data. They’re one of the most versatile chart types and can be combined with point markers, area fills, and various styling options. TeeChart offers both regular line series and fast line series optimized for large datasets. Use cases:- Showing trends over time
- Displaying continuous data
- Comparing multiple data series
- Real-time data monitoring
- Scientific and technical data visualization
Series Classes
TLineSeries - Standard line charts with full features TFastLineSeries - Optimized for large datasets and real-time data THorizLineSeries - Horizontal line chartsKey Properties
| Property | Type | Description |
|---|---|---|
Pointer | TSeriesPointer | Configure point markers |
LinePen | TChartPen | Customize line appearance |
Stairs | Boolean | Display as stepped lines |
Smoothed | Boolean | Apply curve smoothing (Bezier) |
Stacked | TCustomStack | Stack multiple series |
OutLine | TChartPen | Add outline effect |
TreatNulls | TTreatNullsStyle | How to handle null values |
DrawAllPoints | Boolean | Draw all points (FastLine only) |
DrawAllPointsStyle | TDrawAllPointsStyle | Point drawing style (FastLine) |
Code Examples
Basic Line Chart
From VCL/TeeNew/SeriesType_Line.pas:49:Line Chart with Point Markers
From FMX/Demo/Standard/DemoLine.pas:84:Stairs Line Chart
From VCL/TeeNew/SeriesType_Line.pas:43:Smoothed (Bezier) Lines
From FMX/Demo/Standard/DemoLine.pas:49:Stacked Line Charts
From VCL/TeeNew/SeriesType_Line.pas:80:Line Chart with Outline Effect
From FMX/Demo/Standard/DemoLine.pas:64:Fast Line for Real-Time Data
From VCL/TeeNew/FastLine_Realtime.pas (example pattern):Line with Gradient
From VCL/TeeNew/Series_LineGradient.pas (example pattern):Customization Options
Line Appearance
Point Markers
Handling Null Values
Color Each Line Segment
From VCL/TeeNew/Line_ColorEachLine.pas (example pattern):Line Patterns
From VCL/TeeNew/Line_Pattern.pas (example pattern):Advanced Features
3D Lines
Click Detection on Lines
From VCL/TeeNew/Line_Clickable.pas (example pattern):Line Interpolation
From VCL/TeeNew/Line_Interpolate.pas (example pattern):Horizontal Lines
Performance Optimization
Use FastLine for Large Datasets
Optimize Real-Time Updates
Related Chart Types
- Area Charts - Lines with filled areas
- Point Charts - Individual markers without lines
- Bar Charts - Categorical data with bars
- High-Low Charts - Lines with high-low ranges
