Skip to content
Snippets Groups Projects
Unverified Commit 0e5ac729 authored by Muhammad Redho Ayassa's avatar Muhammad Redho Ayassa Committed by GitHub
Browse files

Fix empty result with suffix "%" shows "null%" in Gauge visualization (#19558)

* convert null value to 0 for gauge viz

* set null segment range to 0
parent 81f2bd1f
No related branches found
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ export default class Gauge extends Component {
getDefault(series) {
let value = 100;
try {
value = series[0].data.rows[0][0];
value = series[0].data.rows[0][0] || 0;
} catch (e) {}
return [
{ min: 0, max: value / 2, color: color("error"), label: "" },
......@@ -203,7 +203,7 @@ export default class Gauge extends Component {
])
.clamp(true);
const value = rows[0][0];
const value = rows[0][0] || 0;
const column = cols[0];
const valuePosition = (value, distance) => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment