@oliasoft-open-source/charts-library 2.3.1 → 2.3.3

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.3.1",
3
+ "version": "2.3.3",
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,13 @@
1
1
  # Charts Library Release Notes
2
2
 
3
+ ## 2.3.3
4
+
5
+ - restrict suggestedMin/Max by X axe OW-4327
6
+
7
+ ## 2.3.2
8
+
9
+ - added default values for axis ticks (suggestedMin/Max) OW-4327
10
+
3
11
  ## 2.3.0
4
12
 
5
13
  - Text annotations in line chart
@@ -55,8 +55,10 @@ const getLineChartAxis = (options, axisType, state, currentScales, i = 0) => {
55
55
  position: axisData.position,
56
56
  beginAtZero: additionalAxesOptions.beginAtZero,
57
57
  reverse: axisType === AxisType.Y ? additionalAxesOptions.reverse : false,
58
- suggestedMax: additionalAxesOptions.suggestedMax,
59
- suggestedMin: additionalAxesOptions.suggestedMin,
58
+ suggestedMax:
59
+ axisType === AxisType.X ? additionalAxesOptions.suggestedMax : null,
60
+ suggestedMin:
61
+ axisType === AxisType.X ? additionalAxesOptions.suggestedMin : null,
60
62
  min: stateAxis.min?.value || additionalAxesOptions?.range?.[axisType]?.min,
61
63
  max: stateAxis.max?.value || additionalAxesOptions?.range?.[axisType]?.max,
62
64
  title: {
@@ -136,8 +136,10 @@ export const getDefaultProps = (props) => {
136
136
  truncateAxisNumbersToDigitsCallback:
137
137
  props.chart.options.additionalAxesOptions
138
138
  .truncateAxisNumbersToDigitsCallback,
139
- suggestedMin: props.chart.options.additionalAxesOptions.suggestedMin,
140
- suggestedMax: props.chart.options.additionalAxesOptions.suggestedMax,
139
+ suggestedMin:
140
+ props.chart.options.additionalAxesOptions.suggestedMin ?? -1,
141
+ suggestedMax:
142
+ props.chart.options.additionalAxesOptions.suggestedMax ?? 1,
141
143
  range: props.chart.options.additionalAxesOptions.range,
142
144
  },
143
145
  chartStyling: {