UNPKG

zz-chart

Version:

Alauda Chart components by Alauda Frontend Team

45 lines 1.11 kB
export class Shape { constructor(ctrl, opt = {}) { /** 是否连接空值 */ this.connectNulls = false; this.ctrl = ctrl; const { connectNulls = false } = opt; this.connectNulls = connectNulls; this.option = opt; } getData() { const data = this.ctrl.getData(); const values = this.mapName ? data.filter(d => d.id ? d.id === this.mapName : d.name === this.mapName) : data; return values; } getBaseSeries() { const { points } = this.option; return { spanGaps: this.connectNulls, points: points ? { show: true, ...points } : { show: false }, }; } getOptions() { return {}; } destroy() { this.mapName = ''; } } export class PolarShape { constructor(ctrl, opt = {}) { this.ctrl = ctrl; this.option = opt; } getData() { return this.ctrl.getData(); } destroy() { this.container?.remove(); } } //# sourceMappingURL=index.js.map