Commit b93b77d0 authored by Leonardo Bortoli's avatar Leonardo Bortoli

Update c3 API:

Added 'c3chart.data.axes' function, it works similar to 'c3chart.data.colors' and it allows to change the data Y axes dynamically.
parent 313ed15d
...@@ -6068,6 +6068,15 @@ ...@@ -6068,6 +6068,15 @@
$$.redraw({withLegend: true}); $$.redraw({withLegend: true});
return config.data_colors; return config.data_colors;
}; };
c3_chart_fn.data.axes = function (axes) {
var $$ = this.internal, config = $$.config;
if (!arguments.length) { return config.data_axes; }
Object.keys(axes).forEach(function (id) {
config.data_axes[id] = axes[id];
});
$$.redraw({withLegend: true});
return config.data_axes;
};
c3_chart_fn.category = function (i, category) { c3_chart_fn.category = function (i, category) {
var $$ = this.internal, config = $$.config; var $$ = this.internal, config = $$.config;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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