|
|
|
@ -194,10 +194,19 @@ abstract class ChartwerkPod<T extends TimeSerie, O extends Options> {
|
|
|
|
|
this.updateSeries(series); |
|
|
|
|
this.updateOptions(options); |
|
|
|
|
if(shouldRerender) { |
|
|
|
|
this.render(); |
|
|
|
|
this.forceRerender(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public forceRerender(): void { |
|
|
|
|
// TODO: it is a hack. It is not nessesary to recreate svg.
|
|
|
|
|
// the only purpose for this action, to clear d3.zoom.transform (see https://gitlab.com/chartwerk/core/-/issues/10)
|
|
|
|
|
this.createSvg(); |
|
|
|
|
this.initPodState(); |
|
|
|
|
this.initComponents(); |
|
|
|
|
this.render(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected updateOptions(newOptions: O): void { |
|
|
|
|
if(newOptions === undefined) { |
|
|
|
|
return; |
|
|
|
|