@c8y/ngx-components 1023.17.11 → 1023.17.13

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.
@@ -2096,7 +2096,13 @@ class ChartsComponent {
2096
2096
  return options?.series?.[0]?.markArea?.data?.length > 0;
2097
2097
  }
2098
2098
  saveAsImage() {
2099
- this.echartsInstance.setOption({ legend: { show: true } });
2099
+ const dataZoom = this.echartsInstance.getOption().dataZoom;
2100
+ const grid = this.echartsInstance.getOption().grid;
2101
+ this.echartsInstance.setOption({
2102
+ grid: { bottom: 8 },
2103
+ dataZoom: [{}, { show: false }]
2104
+ });
2105
+ this.echartsInstance.resize();
2100
2106
  const url = this.echartsInstance.getDataURL({
2101
2107
  pixelRatio: 2,
2102
2108
  backgroundColor: '#fff',
@@ -2108,7 +2114,8 @@ class ChartsComponent {
2108
2114
  document.body.appendChild(link);
2109
2115
  link.click();
2110
2116
  document.body.removeChild(link);
2111
- this.echartsInstance.setOption({ legend: { show: false } });
2117
+ this.echartsInstance.setOption({ dataZoom, grid });
2118
+ this.echartsInstance.resize(); // force resize to original state
2112
2119
  }
2113
2120
  loadMoreData() {
2114
2121
  const currentRange = this.widgetTimeContextDateRangeService.initialTimeRange();