diff --git a/src/index.ts b/src/index.ts index 80688df..e03acf7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,9 @@ export class LinePod extends ChartwerkPod { constructor(_el: HTMLElement, _series: LineTimeSerie[] = [], _options: LineOptions = {}) { super(_el, _series, _options); + console.log('coreSeries', this.coreSeries); this.coreSeries = new LineSeries(_series); + console.log('lineseries', this.coreSeries); } renderMetrics(): void { @@ -32,6 +34,7 @@ export class LinePod extends ChartwerkPod { return; } + console.log('series', this.coreSeries.visibleSeries) for(const serie of this.coreSeries.visibleSeries) { this._renderMetric(serie); } diff --git a/src/models/line-series.ts b/src/models/line-series.ts index 4b4f8f2..b14a3a0 100644 --- a/src/models/line-series.ts +++ b/src/models/line-series.ts @@ -14,13 +14,12 @@ const LINE_SERIE_DEFAULTS = { }; export class LineSeries extends CoreSeries { - _lineDefaults = LINE_SERIE_DEFAULTS; constructor(series: LineTimeSerie[]) { super(series); } protected get defaults(): LineTimeSerie { - return { ...this._coreDefaults, ...this._lineDefaults }; + return { ...this._coreDefaults, ...LINE_SERIE_DEFAULTS }; } }