@oliasoft-open-source/charts-library 2.5.1 → 2.5.2

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.1",
3
+ "version": "2.5.2",
4
4
  "description": "React Chart Library (based on Chart.js and react-chart-js-2)",
5
5
  "main": "index.js",
6
6
  "files": [
package/release-notes.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## 2.5.1
4
4
 
5
+ - Fix crashes when type a non number into the axis range - add validation in getLinechartAxis method
6
+
7
+ ## 2.5.1
8
+
5
9
  - Added resize delay for performance
6
10
 
7
11
  ## 2.5.0
@@ -57,8 +57,12 @@ const getLineChartAxis = (options, axisType, state, currentScales, i = 0) => {
57
57
  reverse: axisType === AxisType.Y ? additionalAxesOptions.reverse : false,
58
58
  suggestedMax: additionalAxesOptions.suggestedMax,
59
59
  suggestedMin: additionalAxesOptions.suggestedMin,
60
- min: stateAxis.min?.value || additionalAxesOptions?.range?.[axisType]?.min,
61
- max: stateAxis.max?.value || additionalAxesOptions?.range?.[axisType]?.max,
60
+ min: stateAxis.min?.valid
61
+ ? stateAxis.min?.value
62
+ : additionalAxesOptions?.range?.[axisType]?.min,
63
+ max: stateAxis.max?.valid
64
+ ? stateAxis.max?.value
65
+ : additionalAxesOptions?.range?.[axisType]?.max,
62
66
  title: {
63
67
  display: axisData.label?.length,
64
68
  text: axisData.label,
@@ -104,6 +108,7 @@ const getLineChartScales = (options, state) => {
104
108
  const yAxes = hasMultipleYAxes
105
109
  ? getLineChartAxes(options, AxisType.Y, state)
106
110
  : { y: getLineChartAxis(options, AxisType.Y, state) };
111
+
107
112
  return {
108
113
  ...xAxes,
109
114
  ...yAxes,