Skip to content

Commit

Permalink
Add API for show
Browse files Browse the repository at this point in the history
  • Loading branch information
mayrop committed Aug 5, 2016
1 parent c83f29b commit ec83d58
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
17 changes: 17 additions & 0 deletions c3.js
Original file line number Diff line number Diff line change
Expand Up @@ -6866,6 +6866,23 @@
}
// TODO: return some values?
};
c3_chart_fn.axis.show = function (show) {
var $$ = this.internal, config = $$.config;
if (arguments.length) {
if (typeof show === 'object') {
if (isDefined(show.x)) { config.axis_x_show = show.x; }
if (isDefined(show.y)) { config.axis_y_show = show.y; }
if (isDefined(show.y2)) { config.axis_y2_show = show.y2; }
}
$$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true});
} else {
return {
x: config.axis_x_show,
y: config.axis_y_show,
y2: config.axis_y2_show
};
}
};
c3_chart_fn.axis.max = function (max) {
var $$ = this.internal, config = $$.config;
if (arguments.length) {
Expand Down
Loading

0 comments on commit ec83d58

Please sign in to comment.