Manage color attribute on graph view
issue6341 review35281002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Manage color attribute on graph view
|
||||
* Add support for size on Many2Many
|
||||
* Allow to show plain text in password field
|
||||
|
||||
|
||||
@@ -221,6 +221,18 @@
|
||||
}
|
||||
};
|
||||
}
|
||||
var colors = {};
|
||||
for (var i = 0; i < this.yfields.length; i++) {
|
||||
var field = this.yfields[i];
|
||||
if (field.color) {
|
||||
colors[field.name] = field.color;
|
||||
}
|
||||
}
|
||||
c3_config.data.color = function(color, column) {
|
||||
// column is an object when called for legend
|
||||
var name = column.id || column;
|
||||
return colors[name] || color;
|
||||
};
|
||||
return c3_config;
|
||||
},
|
||||
action: function(data, element) {
|
||||
|
||||
Reference in New Issue
Block a user