diff --git a/c3.js b/c3.js index 8e53354..e4b3ab9 100644 --- a/c3.js +++ b/c3.js @@ -2767,10 +2767,7 @@ .remove(); if (__legend_show) { - svg.selectAll('.legend-item' + getTargetSelectorSuffix(targetId)) - .transition() - .style("opacity", 0) - .remove(); + svg.selectAll('.legend-item' + getTargetSelectorSuffix(targetId)).remove(); updateLegend(c3.data.targets); } diff --git a/c3.min.js b/c3.min.js index 668a4df..6c02d64 100644 --- a/c3.min.js +++ b/c3.min.js @@ -82,9 +82,9 @@ Sc).y(h?Sc:function(a){return ha(a.id)(a.value)});return function(b){var c=$b(b. F.scale=function(a){return h?this.y(a):this.x(a)};F.orgScaleExtent=function(){var a=vd?vd:[1,10];return[a[0],Math.max(La()/a[1],a[1])]};F.updateScaleExtent=function(){var a,b;la?(a=Ba(m.orgDomain())/Ba($),b=this.orgScaleExtent(),a=[b[0]*a,b[1]*a]):ma&&(a=[1,1]);return this.scaleExtent(a)};var n,tb,l,G,Ga,X,sb,$,ud,Wb={};k.focus=function(a){var b=n.selectAll(ka(a)),c=b.filter(oc),b=b.filter(pc);k.revert();k.defocus();c.classed("focused",!0).transition().duration(100).style("opacity",1);b.transition().duration(100).style("opacity", 1);E(k.data.targets)&&Bc(a,!0);mc(a)};k.defocus=function(a){var b=n.selectAll(ka(a)),c=b.filter(oc),b=b.filter(pc);k.revert();c.classed("focused",!1).transition().duration(100).style("opacity",0.3);b.transition().duration(100).style("opacity",0.3);E(k.data.targets)&&Sb(a);Me(a)};k.revert=function(a){var b=n.selectAll(ka(a)),c=b.filter(oc),b=b.filter(pc);c.classed("focused",!1).transition().duration(100).style("opacity",1);b.transition().duration(100).style("opacity",1);E(k.data.targets)&&Sb(a);nc()}; k.show=function(a){n.selectAll(ka(a)).transition().style("opacity",1)};k.hide=function(a){n.selectAll(ka(a)).transition().style("opacity",0)};k.unzoom=function(){I.clear().update();w({withUpdateXDomain:!0})};k.load=function(a){"function"!==typeof a.done&&(a.done=function(){});a.xs&&be(a.xs);"categories"in a&&ja&&(Na=a.categories,N.categories(Na));if("cacheIds"in a&&Yd(a.cacheIds))$a(Zd(a.cacheIds),a.done);else if("data"in a)$a(Ra(a.data),a.done);else if("url"in a)e.csv(a.url,function(b,c){$a(Ra(c), -a.done)});else if("rows"in a)$a(Ra(Hc(a.rows)),a.done);else if("columns"in a)$a(Ra(Ic(a.columns)),a.done);else throw Error("url or rows or columns is required.");};k.unload=function(a){k.data.targets=k.data.targets.filter(function(b){return b.id!==a});n.selectAll(ka(a)).transition().style("opacity",0).remove();Ha&&(n.selectAll(".legend-item"+xb(a)).transition().style("opacity",0).remove(),vb(k.data.targets));0 -b.classes.indexOf(a)})});return Q};k.data.get=function(a){a=k.data.getAsTarget(a);return y(a)?a.values.map(function(a){return a.value}):void 0};k.data.getAsTarget=function(a){var b=nb(function(b){return b.id===a});return 0b.classes.indexOf(a)})});return Q};k.data.get=function(a){a=k.data.getAsTarget(a); +return y(a)?a.values.map(function(a){return a.value}):void 0};k.data.getAsTarget=function(a){var b=nb(function(b){return b.id===a});return 0