|
|
@ -175,16 +175,13 @@ export class GfLineChartComponent |
|
|
|
|
|
|
|
|
if (this.chart) { |
|
|
if (this.chart) { |
|
|
this.chart.data = data; |
|
|
this.chart.data = data; |
|
|
|
|
|
|
|
|
if (!this.chart.options.plugins) { |
|
|
|
|
|
this.chart.options.plugins = {}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.chart.options.plugins.tooltip = |
|
|
|
|
|
this.getTooltipPluginConfiguration(); |
|
|
|
|
|
this.chart.options.animations = this.isAnimated |
|
|
this.chart.options.animations = this.isAnimated |
|
|
? animations |
|
|
? animations |
|
|
: undefined; |
|
|
: undefined; |
|
|
|
|
|
this.chart.options.plugins ??= {}; |
|
|
|
|
|
this.chart.options.plugins.tooltip = |
|
|
|
|
|
this.getTooltipPluginConfiguration(); |
|
|
|
|
|
|
|
|
this.chart.update(); |
|
|
this.chart.update(); |
|
|
} else { |
|
|
} else { |
|
|
this.chart = new Chart(this.chartCanvas.nativeElement, { |
|
|
this.chart = new Chart(this.chartCanvas.nativeElement, { |
|
|
|