The Mark Point component marks specific data points in a series with customizable symbols, labels, and positioning. It’s useful for highlighting maximum values, minimum values, averages, or custom data points.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/apache/echarts/llms.txt
Use this file to discover all available pages before exploring further.
Purpose
Mark Point enables visual emphasis of important data points within a chart. From~/workspace/source/src/component/marker/MarkPointModel.ts, it supports both statistical markers (min, max, average) and custom positioned markers with rich styling options.
Basic Usage
Configuration Options
Array of mark point data items. Each item can specify a position, value, or statistical type.
Symbol type for mark points. Can be built-in symbols like ‘circle’, ‘rect’, ‘pin’, ‘arrow’, or custom SVG paths.
Size of the symbol. Can be a single number or
[width, height].Rotation angle of the symbol in degrees.
Offset of the symbol position as
[x, y]. Can be absolute values or percentages.Decimal precision for automatically calculated values.
Style of the mark point symbols.
Label configuration for mark points.
Emphasis (hover) state configuration.
Data Item Configuration
Each item in thedata array can have the following properties:
Name of the mark point, displayed in labels and tooltips.
Statistical type for automatic positioning:
'min': Marks the minimum value point'max': Marks the maximum value point'average': Marks the average value point'median': Marks the median value point
When using
type, specifies which dimension to calculate statistics on.Dimension name for statistical calculation.
Coordinates for the mark point in the data coordinate system.
Absolute x position in pixels or percentage.
Absolute y position in pixels or percentage.
X coordinate on the x-axis (for Cartesian coordinates).
Y coordinate on the y-axis (for Cartesian coordinates).
Value to be displayed as the label.
Symbol type for this specific mark point (overrides global symbol).
Symbol size for this specific mark point.
Item style for this specific mark point.
Label configuration for this specific mark point.
Examples
Statistical Mark Points
Custom Positioned Mark Points
Styled Mark Points
Multiple Series with Different Mark Points
Custom Symbol Mark Point
Implementation Details
From~/workspace/source/src/component/marker/MarkPointModel.ts:59-97, the Mark Point component:
- Z-index: Defaults to 5, ensuring mark points appear above series data
- Default Symbol: Uses ‘pin’ symbol by default
- Tooltip: Supports item-based tooltips
- Labels: Shows labels inside symbols by default
- Border: Default border width of 2 pixels
- Parent Component: Extends MarkerModel base class from
~/workspace/source/src/component/marker/MarkerModel.ts - Series Integration: Automatically attaches to parent series
- Statistical Calculation: Supports min, max, average, and median calculations on any dimension