From 41fe08898c219dccc8a909597d40f770023752aa Mon Sep 17 00:00:00 2001 From: novykh Date: Wed, 13 Mar 2024 13:53:55 +0200 Subject: [PATCH] v4.4.7 --- package.json | 2 +- src/chartLibraries/dygraph/plotters/annotations.js | 2 ++ src/chartLibraries/dygraph/plotters/anomaly.js | 2 +- src/components/filterToolbox/label.js | 8 ++------ src/components/line/legend/dimension.js | 4 ++-- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index e4f621f4..452d02b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/charts", - "version": "4.4.6", + "version": "4.4.7", "description": "Netdata frontend SDK and chart utilities", "main": "dist/index.js", "module": "dist/es6/index.js", diff --git a/src/chartLibraries/dygraph/plotters/annotations.js b/src/chartLibraries/dygraph/plotters/annotations.js index 0d1f1e72..ce45ec60 100644 --- a/src/chartLibraries/dygraph/plotters/annotations.js +++ b/src/chartLibraries/dygraph/plotters/annotations.js @@ -9,6 +9,8 @@ export default chartUI => plotter => { const ctx = plotter.drawingContext const points = plotter.points + if (!points.length || !points[1]) return + let min_sep = points[1].canvasx - points[0].canvasx + 1 const bar_width = Math.floor(min_sep) diff --git a/src/chartLibraries/dygraph/plotters/anomaly.js b/src/chartLibraries/dygraph/plotters/anomaly.js index d14c4f00..32e4e9ab 100644 --- a/src/chartLibraries/dygraph/plotters/anomaly.js +++ b/src/chartLibraries/dygraph/plotters/anomaly.js @@ -9,7 +9,7 @@ export default chartUI => plotter => { const ctx = plotter.drawingContext const points = plotter.points - if (!points.length) return + if (!points.length || !points[1]) return let min_sep = points[1].canvasx - points[0].canvasx + 1 diff --git a/src/components/filterToolbox/label.js b/src/components/filterToolbox/label.js index 43410aa3..ec73809c 100644 --- a/src/components/filterToolbox/label.js +++ b/src/components/filterToolbox/label.js @@ -56,12 +56,8 @@ const Label = forwardRef( const TooltipContent = ({ heading, body }) => ( - {heading && ( - - {heading} - - )} - {body && {body}} + {heading && {heading}} + {body && {body}} ) diff --git a/src/components/line/legend/dimension.js b/src/components/line/legend/dimension.js index 3ed65ccf..e7ea32db 100644 --- a/src/components/line/legend/dimension.js +++ b/src/components/line/legend/dimension.js @@ -69,10 +69,10 @@ const TooltipValue = ({ id, name }) => { return ( <> - + {name} - + {value} {units}