fix null not mapped error

This commit is contained in:
Ivan Mikheykin
2018-09-03 16:50:26 +03:00
parent 77aa35be7d
commit 90dd85da7b
2 changed files with 14 additions and 30 deletions
+14
View File
@@ -65,6 +65,20 @@ export class ColorModeDiscrete {
}
getMatchedThreshold(value) {
if (value == null) {
if (this.panel.color.nullPointMode == 'as empty') {
// FIXME: make this explicit for user
// Right now this color never used because null as empty handles in getCardOpacity method.
return {
"color": "rgba(0,0,0,0)",
"value": "null",
"tooltip": "null",
}
} else {
value = 0;
}
}
let thresholds = this.panel.color.thresholds;
for (let k = 0; k < thresholds.length; k++) {
if (value == thresholds[k].value) {