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