@oliasoft-open-source/charts-library 2.9.1 → 2.9.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 +1 -1
- package/release-notes.md +4 -0
- package/src/helpers/range/range.js +4 -2
package/package.json
CHANGED
package/release-notes.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Charts Library Release Notes
|
|
2
2
|
|
|
3
|
+
## 2.9.2
|
|
4
|
+
|
|
5
|
+
- Fix missing axis scale when in dataset is one point with negative values ([OW-10616](https://oliasoft.atlassian.net/browse/OW-10616))
|
|
6
|
+
|
|
3
7
|
## 2.9.1
|
|
4
8
|
|
|
5
9
|
- Fix decimal values in BarChart in tooltips for locales with comma decimal ([OW-10632](https://oliasoft.atlassian.net/browse/OW-10632))
|
|
@@ -54,9 +54,11 @@ export const getSuggestedAxisRange = ({
|
|
|
54
54
|
const padding = point * whiteSpacePercentage;
|
|
55
55
|
const minAxisValue = beginAtZero && !isNegative ? 0 : point - padding;
|
|
56
56
|
const maxAxisValue = beginAtZero && isNegative ? 0 : point + padding;
|
|
57
|
+
const roundedMinAxisValue = round(maxAxisValue);
|
|
58
|
+
const roundedMaxAxisValue = round(minAxisValue);
|
|
57
59
|
return {
|
|
58
|
-
min:
|
|
59
|
-
max:
|
|
60
|
+
min: roundedMinAxisValue < 0 ? roundedMinAxisValue : roundedMaxAxisValue,
|
|
61
|
+
max: roundedMaxAxisValue < 0 ? roundedMaxAxisValue : roundedMinAxisValue,
|
|
60
62
|
};
|
|
61
63
|
}
|
|
62
64
|
|