From 42d493c03ea4d9053a1442b3595fcfc203848b96 Mon Sep 17 00:00:00 2001 From: Xuefeng Zhu Date: Thu, 14 Sep 2017 15:01:11 -0500 Subject: [PATCH] make the target hidden completely --- src/api.show.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api.show.js b/src/api.show.js index 5a34031..c434f9c 100644 --- a/src/api.show.js +++ b/src/api.show.js @@ -10,6 +10,7 @@ c3_chart_fn.show = function (targetIds, options) { targets = $$.svg.selectAll($$.selectorTargets(targetIds)); targets.transition() + .style('display', 'initial', 'important') .style('opacity', 1, 'important') .call($$.endall, function () { targets.style('opacity', null).style('opacity', 1); @@ -35,6 +36,7 @@ c3_chart_fn.hide = function (targetIds, options) { .style('opacity', 0, 'important') .call($$.endall, function () { targets.style('opacity', null).style('opacity', 0); + targets.style('display', 'none'); }); if (options.withLegend) {