mirror of
https://github.com/timberjoegithub/grafana-statusmap.git
synced 2026-07-22 07:49:47 +00:00
fix spectrum as zero
This commit is contained in:
committed by
Ivan Mikheykin
parent
74dd7ca41e
commit
c1a3b91082
+8
-2
@@ -578,8 +578,14 @@ export class StatusmapRenderer {
|
||||
if (this.panel.color.mode === 'opacity') {
|
||||
return this.panel.color.cardColor;
|
||||
} else if (this.panel.color.mode === 'spectrum') {
|
||||
return this.colorScale(bucket.value);
|
||||
} else if (this.panel.color.mode === 'discrete') {
|
||||
if(bucket.value !== null) {
|
||||
return this.colorScale(bucket.value);
|
||||
} else {
|
||||
if(this.panel.nullPointMode == 'as zero') {
|
||||
return this.colorScale(0);
|
||||
}
|
||||
}
|
||||
} else if (this.panel.color.mode === 'discrete') {
|
||||
if (this.panel.seriesFilterIndex !== null && this.panel.seriesFilterIndex !== -1) {
|
||||
return this.ctrl.discreteExtraSeries.getBucketColorSingle(bucket.values[this.panel.seriesFilterIndex]);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user