Browse Source

Add the ability to load data with colors

pull/1018/head
SegFaultx64 10 years ago
parent
commit
94009b248b
  1. 6
      src/api.load.js

6
src/api.load.js

@ -20,6 +20,12 @@ c3_chart_fn.load = function (args) {
config.data_axes[id] = args.axes[id];
});
}
// update colors if exists
if ('colors' in args) {
Object.keys(args.colors).forEach(function (id) {
config.data_colors[id] = args.colors[id];
});
}
// use cache if exists
if ('cacheIds' in args && $$.hasCaches(args.cacheIds)) {
$$.load($$.getCaches(args.cacheIds), args.done);

Loading…
Cancel
Save