UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

32 lines (24 loc) 1.06 kB
import { Factory } from "./../core/factory"; import { SeriesTypeEnum } from "../series/interface/type"; import { BaseLineMark } from "./base/base-line"; import { registerLineGraphic } from "@visactor/vgrammar-core"; import { registerVGrammarLineOrAreaAnimation } from "../animation/config"; 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), registerLineGraphic(), registerVGrammarLineOrAreaAnimation(); }; //# sourceMappingURL=line.js.map