fix bucket color, tooltip status shadow, undefined color error.

This commit is contained in:
Ivan Mikheykin
2018-09-06 13:58:22 +03:00
parent a48bbf1945
commit 4a81b3a7bb
4 changed files with 67 additions and 90 deletions
+2 -4
View File
@@ -266,9 +266,7 @@ export default function link(scope, elem, attrs, ctrl) {
let maxValue = panel.color.max || cardsData.maxValue;
let minValue = panel.color.min || cardsData.minValue;
if (panel.color.mode === 'discrete') {
colorScale = ctrl.discreteHelper.getDiscreteColorScale();
} else {
if (panel.color.mode !== 'discrete') {
colorScale = getColorScale(maxValue, minValue);
}
setOpacityScale(maxValue);
@@ -421,7 +419,7 @@ export default function link(scope, elem, attrs, ctrl) {
} else if (panel.color.mode === 'spectrum') {
return colorScale(d.value);
} else if (panel.color.mode === 'discrete') {
return colorScale(d.value);
return ctrl.discreteHelper.getBucketColor(d.values);
}
}