Commit b1e7a8c3 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Set name individually by data.name API - #100

parent cb5c0170
...@@ -3895,7 +3895,9 @@ ...@@ -3895,7 +3895,9 @@
}; };
c3.data.names = function (names) { c3.data.names = function (names) {
if (!arguments.length) { return __data_names; } if (!arguments.length) { return __data_names; }
__data_names = names; Object.keys(names).forEach(function (id) {
__data_names[id] = names[id];
});
updateLegend(c3.data.targets, {withTransition: true}); updateLegend(c3.data.targets, {withTransition: true});
return __data_names; return __data_names;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment