mdt-charts 1.28.1 → 1.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,7 +42,7 @@ export declare class CanvasValueLabels {
|
|
|
42
42
|
private chartsValueLabels;
|
|
43
43
|
constructor(options: ValueLabelsOptions);
|
|
44
44
|
render(scales: ScalesWithSecondary, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData): void;
|
|
45
|
-
update(scales: ScalesWithSecondary, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData): void;
|
|
45
|
+
update(scales: ScalesWithSecondary, charts: TwoDimensionalChartModel[], data: MdtChartsDataSource, dataOptions: OptionsModelData, newCanvasOptions: TwoDimensionalValueLabels): void;
|
|
46
46
|
private toggleOldValueLabelsVisibility;
|
|
47
47
|
private getAllValueLabels;
|
|
48
48
|
private getChartScales;
|
|
@@ -148,8 +148,8 @@ export class CanvasValueLabels {
|
|
|
148
148
|
const valueLabels = this.getAllValueLabels();
|
|
149
149
|
ValueLabelsCollision.resolveValueLabelsCollisions(valueLabels, valueLabelsSettings);
|
|
150
150
|
}
|
|
151
|
-
update(scales, charts, data, dataOptions) {
|
|
152
|
-
|
|
151
|
+
update(scales, charts, data, dataOptions, newCanvasOptions) {
|
|
152
|
+
this.options.canvas.valueLabels = newCanvasOptions;
|
|
153
153
|
const chartsWithLabels = charts.filter((chart) => { var _a; return (_a = chart.valueLabels) === null || _a === void 0 ? void 0 : _a.show; });
|
|
154
154
|
if (chartsWithLabels.length === 0)
|
|
155
155
|
return;
|
|
@@ -160,7 +160,7 @@ export class CanvasValueLabels {
|
|
|
160
160
|
return this.chartsValueLabels[index].update(chartScales, data[dataOptions.dataSource], chart.valueLabels);
|
|
161
161
|
});
|
|
162
162
|
Promise.all(chartsUpdatePromises).then(() => {
|
|
163
|
-
ValueLabelsCollision.resolveValueLabelsCollisions(this.getAllValueLabels(),
|
|
163
|
+
ValueLabelsCollision.resolveValueLabelsCollisions(this.getAllValueLabels(), this.options.canvas.valueLabels);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
166
|
toggleOldValueLabelsVisibility() {
|
|
@@ -97,7 +97,7 @@ export class TwoDimensionalManager {
|
|
|
97
97
|
chartOrientation: options.orient
|
|
98
98
|
});
|
|
99
99
|
if (this.canvasValueLabels)
|
|
100
|
-
this.canvasValueLabels.update(scales, options.charts, data, model.options.data);
|
|
100
|
+
this.canvasValueLabels.update(scales, options.charts, data, model.options.data, options.valueLabels);
|
|
101
101
|
}
|
|
102
102
|
updateColors(block, model) {
|
|
103
103
|
var _a;
|