@oliasoft-open-source/charts-library 2.5.19 → 2.5.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "2.5.19",
3
+ "version": "2.5.21",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/release-notes.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Charts Library Release Notes
2
2
 
3
+ ## 2.5.21
4
+
5
+ - Revert changes from `2.5.12` / [OW-10320](https://oliasoft.atlassian.net/browse/OW-10320)
6
+ - Changing thousands separators broke decimal separators in some locales
7
+ - Resolves [OW-10320](https://oliasoft.atlassian.net/browse/OW-10320)
8
+
9
+ ## 2.5.20
10
+
11
+ - Minor refactor (code cleanup)
12
+
3
13
  ## 2.5.19
4
14
 
5
15
  - Hide irregular major axis ticks ([OW-10088](https://oliasoft.atlassian.net/browse/OW-10088))
@@ -48,10 +48,6 @@ const getLineChartAxis = (options, axisType, state, currentScales, i = 0) => {
48
48
  },
49
49
  }
50
50
  : {
51
- callback(val) {
52
- const value = this.getLabelForValue(val);
53
- return value.replaceAll(/,/g, ' ');
54
- },
55
51
  stepSize:
56
52
  axisData.stepSize ||
57
53
  (axisType === AxisType.Y ? additionalAxesOptions.stepSize : null),
@@ -79,9 +79,8 @@ export const reducer = (state, action) => {
79
79
  };
80
80
  }
81
81
  case SET_AXIS_VALUE: {
82
- const valiateElement = (name, nextInputValue, id) => {
82
+ const validateElement = (name, nextInputValue, id) => {
83
83
  const nextValue = cleanNumStr(nextInputValue);
84
-
85
84
  const axis = newState.axes.find((a) => a.id === id);
86
85
  axis.min = getAxisValue(name === 'min' ? nextValue : axis.min?.value);
87
86
  axis.max = getAxisValue(name === 'max' ? nextValue : axis.max?.value);
@@ -109,11 +108,11 @@ export const reducer = (state, action) => {
109
108
  if (Array.isArray(action.payload)) {
110
109
  action.payload.forEach((element) => {
111
110
  const { name, value: nextInputValue, id } = element;
112
- valiateElement(name, nextInputValue, id);
111
+ validateElement(name, nextInputValue, id);
113
112
  });
114
113
  } else {
115
114
  const { name, value: nextInputValue, id } = action.payload;
116
- valiateElement(name, nextInputValue, id);
115
+ validateElement(name, nextInputValue, id);
117
116
  }
118
117
 
119
118
  return newState;