@oliasoft-open-source/charts-library 2.5.4 → 2.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/charts-library",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
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
@@ -1,5 +1,9 @@
1
1
  # Charts Library Release Notes
2
2
 
3
+ ## 2.5.5
4
+
5
+ - Removed empty label annotations
6
+
3
7
  ## 2.5.4
4
8
 
5
9
  - Fixed onPointHover event
@@ -106,12 +106,13 @@ const getAnnotation = (options, state) => {
106
106
  const isAnnotationShown = annotations?.showAnnotations;
107
107
  const isAnnotationDataProvided = annotations?.annotationsData?.length;
108
108
 
109
- const formAnnotation = {
110
- ...getLabelAnnotation(options),
111
- ...(isAnnotationShown && isAnnotationDataProvided
112
- ? generateAnnotations(options, state)
113
- : []),
114
- };
109
+ const formAnnotation =
110
+ isAnnotationShown && isAnnotationDataProvided
111
+ ? {
112
+ ...getLabelAnnotation(options),
113
+ ...generateAnnotations(options, state),
114
+ }
115
+ : null;
115
116
 
116
117
  return {
117
118
  annotations: formAnnotation,