Open jmtavares opened 8 years ago
Hey! We at Etersoft implemented it in our fork as follows
c3_chart_fn.axis.showX = function (value){
var $$ = this.internal;
$$.config.axis_x_show = !!value;
$$.axes.x.style("visibility", $$.config.axis_x_show ? 'visible' : 'hidden');
$$.redraw();
};
c3_chart_fn.axis.showY = function (value){
var $$ = this.internal;
$$.config.axis_y_show = !!value;
$$.axes.y.style("visibility", $$.config.axis_y_show ? 'visible' : 'hidden');
$$.redraw();
};
so chart.axis.showX(true)
will make x asix visible, and chart.axis.showX(false)
will make it disapear.
I will submit PR soon for fixing this issue.
Maybe names will need to be changed, so this methods can be used both as setters and getters.
Created #1760 to close this