#6537 add simple check to enable coloring in viz (data table), too

This commit is contained in:
Marcel Hallmann 2016-10-08 20:01:12 +02:00
parent a4bf798e29
commit e67f6ebf5c

View file

@ -45,7 +45,7 @@ export default function ColorFormatProvider(Private) {
html(val, field) {
var color;
if (field.type === 'string') {
if (field.type === 'string' || field === 'string') {
color = _.findLast(this.param('colors'), (colorParam) => {
return new RegExp(colorParam.regex).test(val);
});
@ -67,5 +67,6 @@ export default function ColorFormatProvider(Private) {
}
};
return _Color;
};