Commit 7148dea7 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix interface of toggle API - #776

parent b0e78535
......@@ -5731,9 +5731,11 @@
$$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});
};
c3_chart_fn.toggle = function (targetId) {
var $$ = this.internal;
$$.isTargetToShow(targetId) ? this.hide(targetId) : this.show(targetId);
c3_chart_fn.toggle = function (targetIds) {
var that = this, $$ = this.internal;
$$.mapToTargetIds(targetIds).forEach(function (targetId) {
$$.isTargetToShow(targetId) ? that.hide(targetId) : that.show(targetId);
});
};
c3_chart_fn.zoom = function (domain) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -42,7 +42,9 @@ c3_chart_fn.hide = function (targetIds, options) {
$$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});
};
c3_chart_fn.toggle = function (targetId) {
var $$ = this.internal;
$$.isTargetToShow(targetId) ? this.hide(targetId) : this.show(targetId);
c3_chart_fn.toggle = function (targetIds) {
var that = this, $$ = this.internal;
$$.mapToTargetIds(targetIds).forEach(function (targetId) {
$$.isTargetToShow(targetId) ? that.hide(targetId) : that.show(targetId);
});
};
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