apache/echarts · error
Line not support coordinateSystem besides cartesian and pola
Error message
Line not support coordinateSystem besides cartesian and polar
What it means
DEV-only guard in LineSeries.getInitialData: the line series only renders on the 'cartesian2d' (grid) or 'polar' coordinate systems. Any other coordinateSystem value (geo, singleAxis, calendar, or a typo) is rejected. Stripped in production.
Source
Thrown at src/chart/line/LineSeries.ts:151
*/
triggerEvent?: boolean | 'line' | 'area'
}
class LineSeriesModel extends SeriesModel<LineSeriesOption> {
static readonly type = 'series.line';
type = LineSeriesModel.type;
static readonly dependencies = ['grid', 'polar'];
coordinateSystem: Cartesian2D | Polar;
hasSymbolVisual = true;
getInitialData(option: LineSeriesOption): SeriesData {
if (__DEV__) {
const coordSys = option.coordinateSystem;
if (coordSys !== 'polar' && coordSys !== 'cartesian2d') {
throw new Error('Line not support coordinateSystem besides cartesian and polar');
}
}
return createSeriesData(null, this, {
useEncodeDefaulter: true
});
}
static defaultOption: LineSeriesOption = {
// zlevel: 0,
z: 3,
coordinateSystem: 'cartesian2d',
legendHoverLink: true,
clip: true,
label: {
position: 'top'
},View on GitHub (pinned to 30076aedcd)
Solutions
- Use 'cartesian2d' or 'polar' (or omit coordinateSystem to get the cartesian2d default)
- For map-based lines, switch to the 'lines' series with coordinateSystem 'geo'
- Check coordinateSystem for typos
Example fix
// before
{ type: 'line', coordinateSystem: 'singleAxis', data: [...] }
// after
{ type: 'line', coordinateSystem: 'cartesian2d', data: [...] }
// or, for map lines:
{ type: 'lines', coordinateSystem: 'geo', data: [{ coords: [...] }] } Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED = ['cartesian2d', 'polar'];
(option.series || []).forEach((s: any) => {
if (s.type === 'line' && s.coordinateSystem != null && !ALLOWED.includes(s.coordinateSystem)) {
console.error('[line] unsupported coordinateSystem: ' + s.coordinateSystem);
}
}); Type guard
const isLineCoordSys = (cs?: string): cs is 'cartesian2d' | 'polar' => cs === 'cartesian2d' || cs === 'polar';
Prevention
- Leave coordinateSystem unset (defaults to cartesian2d) unless you need polar
- Validate before setOption
- Use the 'lines' series for geo-based line visuals
When it happens
Trigger: Setting series.coordinateSystem to 'geo', 'singleAxis', 'calendar', or any other/unknown value on a line series.
Common situations: Migrating a line chart onto a singleAxis or geo without switching to a compatible series type; typo in coordinateSystem; leftover config from a different chart type.
Related errors
- Unknown coordinate system {}
- Grid "{}" not found
- key must not be "{}"
- Heatmap must use with visualMap
- Heatmap on cartesian must have two category axes
AI-assisted analysis of apache/echarts@30076aedcd (2026-08-12).
Data as JSON: /api/errors/7fe1bb73daa55a6a.
Report an issue: GitHub.