Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions projects/charts-ng/common/si-chart-base.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@
}
if (changes.theme || changes.renderer) {
// need to completely redo the chart for the theme change to take effect
return this.resetChart();

Check warning on line 392 in projects/charts-ng/common/si-chart-base.component.ts

View workflow job for this annotation

GitHub Actions / verification

`resetChart` is deprecated. The method is deprecated and should not be used directly by the consumer
}

let updates = 0;
Expand Down Expand Up @@ -518,6 +518,7 @@
});
}
this.applyOptions();
this.ensureAriaConfiguration();
this.applyAdditionalOptions();
this.applyDataZoom();
this.applyStyles();
Expand Down Expand Up @@ -726,6 +727,17 @@

protected applyOptions(): void {}

private ensureAriaConfiguration(): void {
if (!this.actualOptions.aria) {

Check failure on line 731 in projects/charts-ng/common/si-chart-base.component.ts

View workflow job for this annotation

GitHub Actions / verification

Prefer using nullish coalescing operator (`??=`) instead of an assignment expression, as it is simpler to read
this.actualOptions.aria = {
enabled: true,
label: {
enabled: true
}
};
}
}

protected applyCustomLegendPosition(): void {
if (this.showLegend() && this.showCustomLegend()) {
this.customLegend.forEach(cl => {
Expand Down Expand Up @@ -818,7 +830,7 @@
? this.getThemeCustomValue(['externalZoomSlider', 'grid'], {})
: this.getThemeCustomValue(['dataZoom', 'grid'], {});

if (this.showTimeRangeBar()) {

Check warning on line 833 in projects/charts-ng/common/si-chart-base.component.ts

View workflow job for this annotation

GitHub Actions / verification

`showTimeRangeBar` is deprecated. The input will be removed in future versions as the time range bar slot is deprecated
const timeBarOptions = this.getThemeCustomValue(['timeRangeBar'], {});
if (customOptions.height && customOptions.bottom) {
this.timeBarBottom.set(customOptions.height + customOptions.bottom);
Expand Down
Loading