fix spectrum as zero

This commit is contained in:
Grigorii Khmelnitskii
2021-07-19 21:00:26 +03:00
committed by Ivan Mikheykin
parent 74dd7ca41e
commit c1a3b91082
+8 -2
View File
@@ -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 {