@oliasoft-open-source/charts-library 4.1.7 → 4.1.8

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.
package/dist/index.js CHANGED
@@ -24903,9 +24903,13 @@ const getAxesDataFromMetasets = (chartRef, scalesKeys, annotationsData) => {
24903
24903
  }, {}));
24904
24904
  };
24905
24905
  const autoScale = (options, state, generatedDatasets, chartRef) => {
24906
- const { additionalAxesOptions, annotations: { annotationsData = [] } = {} } = options || {};
24906
+ const {
24907
+ additionalAxesOptions,
24908
+ annotations: { annotationsData = [], controlAnnotation = false } = {}
24909
+ } = options || {};
24907
24910
  const scales = getLineChartScales(options, state) || {};
24908
- if (!(additionalAxesOptions == null ? void 0 : additionalAxesOptions.autoAxisPadding) && !estimateDataSeriesHaveCloseValues(generatedDatasets)) {
24911
+ const datasets = controlAnnotation ? generatedDatasets.filter(({ isAnnotation }) => !isAnnotation) : generatedDatasets;
24912
+ if (!(additionalAxesOptions == null ? void 0 : additionalAxesOptions.autoAxisPadding) && !estimateDataSeriesHaveCloseValues(datasets)) {
24909
24913
  return scales;
24910
24914
  }
24911
24915
  const scalesKeys = Object.keys(scales) ?? [];