|
|
@ -27,9 +27,8 @@ export const CORE_SERIE_DEFAULTS = { |
|
|
|
|
|
|
|
|
|
|
|
export class CoreSeries<T extends Serie> { |
|
|
|
export class CoreSeries<T extends Serie> { |
|
|
|
_series: Array<T> = []; |
|
|
|
_series: Array<T> = []; |
|
|
|
protected podDefaults?: Partial<T>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(series: T[]) { |
|
|
|
constructor(series: T[], private _podDefaults?: Partial<T>) { |
|
|
|
this.setSeries(series); |
|
|
|
this.setSeries(series); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -60,7 +59,7 @@ export class CoreSeries<T extends Serie> { |
|
|
|
|
|
|
|
|
|
|
|
// this getter can be overrited in Pod
|
|
|
|
// this getter can be overrited in Pod
|
|
|
|
protected getDefaults(): Partial<T> { |
|
|
|
protected getDefaults(): Partial<T> { |
|
|
|
return lodashDefaultsDeep(this.podDefaults, CORE_SERIE_DEFAULTS); |
|
|
|
return lodashDefaultsDeep(this._podDefaults, CORE_SERIE_DEFAULTS); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private _isSerieEmpty(serie: T): boolean { |
|
|
|
private _isSerieEmpty(serie: T): boolean { |
|
|
|