{"record":{"id":"2f08a3f30c001e1f","repo":"apache/echarts","slug":"marker-component-is-abstract-component-use-markli","errorCode":null,"errorMessage":"Marker component is abstract component. Use markLine, markPoint, markArea instead.","messagePattern":"Marker component is abstract component\\. Use markLine, markPoint, markArea instead\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/component/marker/MarkerModel.ts","lineNumber":126,"sourceCode":"     */\n    createdBySelf = false;\n\n    preventAutoZ = true;\n\n    static readonly dependencies = ['series', 'grid', 'polar', 'geo'];\n\n    __hostSeries: SeriesModel;\n\n    private _data: SeriesData;\n\n    /**\n     * @overrite\n     */\n    init(option: Opts, parentModel: Model, ecModel: GlobalModel) {\n\n        if (__DEV__) {\n            if (this.type === 'marker') {\n                throw new Error('Marker component is abstract component. Use markLine, markPoint, markArea instead.');\n            }\n        }\n        this.mergeDefaultAndTheme(option, ecModel);\n        this._mergeOption(option, ecModel, false, true);\n    }\n\n    isAnimationEnabled(): boolean {\n        if (env.node) {\n            return false;\n        }\n\n        const hostSeries = this.__hostSeries;\n        return this.getShallow('animation') && hostSeries && hostSeries.isAnimationEnabled();\n    }\n\n    /**\n     * @overrite\n     */","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/echarts/blob/30076aedcd7b7f65d8dd8e8d9ece46ce778133a3/src/component/marker/MarkerModel.ts#L108-L144","documentation":"DEV-only guard in MarkerModel.init: 'marker' is the abstract base mainType; only its concrete subtypes markLine, markPoint, markArea are instantiable as components. The check fires when a model of type 'marker' (the base) is actually constructed. Stripped in production.","triggerScenarios":"Registering or specifying a component/series with type:'marker' instead of one of the concrete marker subtypes.","commonSituations":"Mistakenly writing type:'marker' in an option; bad option serialization; copy-paste errors from docs.","solutions":["Use type 'markLine', 'markPoint', or 'markArea'","Do not register a custom component under the reserved 'marker' mainType"],"exampleFix":"// before\nseries: [{ type: 'marker', data: [...] }]\n\n// after\nseries: [{ type: 'markLine', data: [{ coord: [0, 0] }] }]\n// or markPoint / markArea","handlingStrategy":"validation","validationCode":"const CONCRETE = new Set(['markLine', 'markPoint', 'markArea']);\nconst scan = (arr: any[]) => (arr || []).forEach((s: any) => {\n  if (s && s.type === 'marker') console.error('[marker] use markLine/markPoint/markArea, not marker');\n});\nscan(option.series); scan(option.markLine); scan(option.markPoint); scan(option.markArea);","typeGuard":"const isConcreteMarker = (t: string): boolean =>\n  t === 'markLine' || t === 'markPoint' || t === 'markArea';","tryCatchPattern":null,"preventionTips":["Never use type:'marker' in user options","Use only the concrete marker subtypes","Validate option.type against the concrete marker set"],"tags":["marker","abstract-component","configuration","dev-only"],"backgroundTag":null,"analyzedSha":"30076aedcd7b7f65d8dd8e8d9ece46ce778133a3","analyzedAt":"2026-08-12T12:42:28.134Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}