check for bar value visibility never (#37122) (#37141)

(cherry picked from commit 1de14ea257)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
This commit is contained in:
Grot (@grafanabot)
2021-07-23 20:52:54 +02:00
committed by GitHub
parent 631c12ec91
commit a8f5445d47
@@ -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;