@oliasoft-open-source/charts-library 3.2.3 → 3.2.5

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
@@ -31166,9 +31166,10 @@ const reducer$1 = (state, action) => {
31166
31166
  break;
31167
31167
  }
31168
31168
  case RESET_AXES_RANGES: {
31169
- const { axes } = draft;
31170
- draft.axes = axes.map((axis) => ({
31171
- id: axis.id
31169
+ const { initialAxesRanges } = draft;
31170
+ draft.axes = initialAxesRanges.map((axis) => ({
31171
+ id: axis.id,
31172
+ ...axis.unit && { unit: axis.unit }
31172
31173
  }));
31173
31174
  break;
31174
31175
  }
@@ -32163,7 +32164,7 @@ const AxesOptionsPopover = ({
32163
32164
  const minError = (_e2 = (_d2 = errors == null ? void 0 : errors.find((a2) => a2.id === axis.id)) == null ? void 0 : _d2.min) == null ? void 0 : _e2[0];
32164
32165
  const maxError = (_g2 = (_f2 = errors == null ? void 0 : errors.find((a2) => a2.id === axis.id)) == null ? void 0 : _f2.max) == null ? void 0 : _g2[0];
32165
32166
  const unit = (_h2 = formState.find((a2) => a2.id === axis.id)) == null ? void 0 : _h2.unit;
32166
- return /* @__PURE__ */ jsx(Field, { label: axisLabel || axis.id || "", children: /* @__PURE__ */ jsxs(InputGroup, { small: true, children: [
32167
+ return /* @__PURE__ */ jsx(Field, { label: axisLabel || axis.id || "", children: /* @__PURE__ */ jsxs(InputGroup, { small: true, width: "300px", children: [
32167
32168
  /* @__PURE__ */ jsx(
32168
32169
  NumberInput,
32169
32170
  {
@@ -32210,7 +32211,8 @@ const AxesOptionsPopover = ({
32210
32211
  id: axis.id
32211
32212
  });
32212
32213
  },
32213
- width: "auto"
32214
+ autoLayerWidth: true,
32215
+ width: "15%"
32214
32216
  }
32215
32217
  ) : null
32216
32218
  ] }) }, i2);
@@ -32870,16 +32872,17 @@ const formatAxisLabelNumbers = (tickValue, ticks, locale = "en-gb") => {
32870
32872
  Math.abs(ticks[0].value),
32871
32873
  Math.abs(ticks[ticks.length - 1].value)
32872
32874
  );
32873
- if (maxTick < 1e-4 || maxTick > 1e15) {
32875
+ if (maxTick < 1e-4 || maxTick > 1e7) {
32874
32876
  notation = "scientific";
32875
32877
  }
32876
32878
  delta = calculateDelta(tickValue, ticks);
32877
32879
  }
32878
32880
  const logDelta = Math.log10(Math.abs(delta));
32879
32881
  const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);
32882
+ const roundScientificCoefficient = numDecimal === 0 ? 1 : numDecimal;
32880
32883
  return displayNumber(round$2(tickValue, numDecimal), {
32881
32884
  scientific: notation === "scientific",
32882
- roundScientificCoefficientToNDecimals: numDecimal
32885
+ roundScientificCoefficient
32883
32886
  });
32884
32887
  };
32885
32888
  const getLineChartAxis = (options, axisType, state, currentScales, i2 = 0) => {