Add API for switching axes

parent 6a114310
......@@ -58,3 +58,19 @@ c3_chart_fn.axis.range = function (range) {
};
}
};
c3_chart_fn.axisX = function (value){
var $$ = this.internal;
$$.config.axis_x_show = !!value;
$$.axes.x.style("visibility", $$.config.axis_x_show ? 'visible' : 'hidden');
$$.redraw();
};
c3_chart_fn.axisY = function (value){
var $$ = this.internal;
$$.config.axis_y_show = !!value;
$$.axes.y.style("visibility", $$.config.axis_y_show ? 'visible' : 'hidden');
$$.redraw();
};
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