From a8f5445d47b856414a3ca2a469815bb393dbd36a Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Fri, 23 Jul 2021 20:52:54 +0200 Subject: [PATCH] check for bar value visibility never (#37122) (#37141) (cherry picked from commit 1de14ea2570117928bae6b5bad899f7074cd8ccf) Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com> --- public/app/plugins/panel/barchart/bars.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/plugins/panel/barchart/bars.ts b/public/app/plugins/panel/barchart/bars.ts index 70db4071150..40f693aabc3 100644 --- a/public/app/plugins/panel/barchart/bars.ts +++ b/public/app/plugins/panel/barchart/bars.ts @@ -192,6 +192,9 @@ export function getConfig(opts: BarsOptions, theme: GrafanaTheme2) { // uPlot hook to draw the labels on the bar chart. const draw = (u: uPlot) => { + if (showValue === BarValueVisibility.Never) { + return; + } // pre-cache formatted labels let texts = Array(barRects.length); let labelOffset = LABEL_OFFSET_MAX;