Overview
Contour charts represent three-dimensional data in two dimensions by drawing lines that connect points of equal value (isolines). Like topographic maps showing elevation, contour charts are ideal for visualizing continuous data fields, identifying patterns, and displaying areas of equal value. They can be displayed in 2D or 3D and often complement surface charts. Use cases:- Topographic and terrain mapping
- Temperature and weather patterns
- Scientific field data visualization
- Stress and strain analysis
- Density and concentration maps
- Mathematical function visualization
Series Class
TContourSeries - The primary class for creating contour chartsKey Properties
| Property | Type | Description |
|---|---|---|
NumLevels | Integer | Number of contour levels to display |
YPosition | Double | Y-axis position of contour plane in 3D |
YPositionLevel | Boolean | Auto-position levels vertically |
ColorEachPoint | Boolean | Use different colors per level |
AutomaticLevels | Boolean | Automatically calculate level values |
OnGetLevel | TContourLevelEvent | Customize individual level values and colors |
Pen | TPen | Customize contour line appearance |
Marks | TSeriesMarks | Configure level labels |
Pointer | TSeriesPointer | Show data points |
SmoothSegments | Integer | Number of segments for smooth curves |
Code Examples
Basic Contour Chart
From VCL/TeeNew/SeriesType_Contour.pas:50:2D Contour View
From VCL/TeeNew/Contour_View2D.pas (example pattern):Contour with Surface
From VCL/TeeNew/SeriesType_Contour.pas:78:Custom Contour Levels
From VCL/TeeNew/SeriesType_Contour.pas:92:Filled Contours
From VCL/TeeNew/Series_ContourFilled.pas (example pattern):Contour Level Marks
From VCL/TeeNew/Series_ContourLevelMarks.pas (example pattern):Contour with Pointers
From VCL/TeeNew/Series_ContourPointer.pas (example pattern):Customization Options
Contour Line Appearance
Color Each Level
From VCL/TeeNew/SeriesType_Contour.pas:87:Y Position Control
From VCL/TeeNew/SeriesType_Contour.pas:128:Smooth Contours
From VCL/TeeNew/Contour_SmoothSegments.pas (example pattern):Contour Palette
From VCL/TeeNew/Contour_Palette.pas (example pattern):Advanced Features
Contour with Footer/Legend
From VCL/TeeNew/Contour_Foot.pas (example pattern):OnBeforeDraw Event
From VCL/TeeNew/Contour_OnBeforeDraw.pas (example pattern):Interactive Level Adjustment
Rotate Contour in 3D
Export Contour Levels
Highlight Specific Level
Contour from Grid Data
Polar Contour
From VCL/PolarContour/UPolarContour.pas (example pattern):Best Practices
- Choose appropriate number of levels - Too few miss detail, too many create clutter (8-12 typically)
- Use 2D for clarity - 2D view is often clearer for contour interpretation
- Color code thoughtfully - Rainbow for progression, grayscale for technical
- Label key levels - Don’t label every contour line
- Provide scale reference - Include legend or footer with value range
- Combine with surface - Show both contour and surface for complete picture
Related Chart Types
- Surface Charts - 3D representation of the same data
- Heat Maps - Color-coded intensity without contour lines
- Isometric Charts - Alternative 3D visualization
- Polar Charts - Contours in polar coordinates
