UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

38 lines (28 loc) 1.34 kB
import { Factory } from "./../core/factory"; import { SeriesTypeEnum } from "../series/interface/type"; import { BaseLineMark } from "./base/base-line"; import { registerLineOrAreaAnimation } from "../animation/config"; import { createLine } from "@visactor/vrender-core"; import { registerLine, registerShadowRoot } from "@visactor/vrender-kits"; import { registerLineDataLabel, registerSymbolDataLabel } from "@visactor/vrender-components"; export class LineMark extends BaseLineMark { constructor() { super(...arguments), this.type = LineMark.type; } _getDefaultStyle() { return Object.assign(Object.assign({}, super._getDefaultStyle()), { lineWidth: 1 }); } _getIgnoreAttributes() { var _a, _b; return (null === (_a = this.model) || void 0 === _a ? void 0 : _a.type) === SeriesTypeEnum.radar && "polar" === (null === (_b = this.model) || void 0 === _b ? void 0 : _b.coordinate) ? [] : [ "fill", "fillOpacity" ]; } } LineMark.type = "line"; export const registerLineMark = () => { Factory.registerMark(LineMark.type, LineMark), registerShadowRoot(), registerLine(), registerLineDataLabel(), registerSymbolDataLabel(), registerLineOrAreaAnimation(), Factory.registerGraphicComponent("line", createLine); }; //# sourceMappingURL=line.js.map