From 651a26a5aaf227a3f09e33cddfea42b961259540 Mon Sep 17 00:00:00 2001 From: Masayuki Tanaka Date: Mon, 28 Oct 2013 13:37:18 +0900 Subject: [PATCH] Set withUpdateXDomain false --- c3.js | 12 ++++++------ c3.min.js | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/c3.js b/c3.js index 78c2a64..00ef300 100644 --- a/c3.js +++ b/c3.js @@ -1217,7 +1217,7 @@ updateTargets(targets); // Draw with targets - redraw({withTransition:false}); + redraw({withTransition:false, withUpdateXDomain:true}); // Show tooltip if needed if (__tooltip_init_show) { @@ -1250,7 +1250,7 @@ withY = isDefined(options.withY) ? options.withY : true; withSubchart = isDefined(options.withSubchart) ? options.withSubchart : true; withTransition = isDefined(options.withTransition) ? options.withTransition : true; - withUpdateXDomain = isDefined(options.withUpdateXDomain) ? options.withUpdateXDomain : true; + withUpdateXDomain = isDefined(options.withUpdateXDomain) ? options.withUpdateXDomain : false; duration = withTransition ? 250 : 0; @@ -1452,15 +1452,15 @@ redraw({ withTransition: false, withY: false, - withSubchart: false + withSubchart: false, + withUpdateXDomain: true }); } function redrawForZoom() { redraw({ withTransition: false, withY: false, - withSubchart: false, - withUpdateXDomain: false + withSubchart: false }); if (d3.event.sourceEvent.type === 'mousemove') { cancelClick = true; @@ -1495,7 +1495,7 @@ updateLegend(c3.data.targets, {withTransition:false}); } // Draw with new sizes & scales - redraw({withTransition:false}); + redraw({withTransition:false, withUpdateXDomain:true}); } function updateTargets (targets) { diff --git a/c3.min.js b/c3.min.js index 6e19dad..8afe030 100644 --- a/c3.min.js +++ b/c3.min.js @@ -29,16 +29,16 @@ c).classed($,!1)}).on("mousemove",function(a,c){Z&&!$a&&(ha||g.selectAll(".-shap a.attr("r",Fa));d3.select(".event-rect-"+c).style("cursor","pointer")}))}).on("click",function(a,c){ub?ub=!1:g.selectAll(".-shape-"+c).each(function(a){var d=d3.select(this),b=d.classed(aa),f=!1,e;"circle"===this.nodeName?(f=Vb(this,1.5*Fa),e=Yb):"rect"===this.nodeName&&(f=Wb(this),e=$b);if(ha||f)Z&&ia(a)&&(d.classed(aa,!b),e(!b,d,a,c)),Oc(a,d)})}).call(d3.behavior.drag().origin(Object).on("drag",function(a){if(Z&&!oa){a=vb[0];var c=vb[1],d=d3.mouse(this),b=d[0],d=d[1],e=Math.min(a,b),m=Math.max(a, b),k=ha?v:Math.min(c,d),l=ha?t:Math.max(c,d);g.select(".dragarea").attr("x",e).attr("y",k).attr("width",m-e).attr("height",l-k);g.selectAll(".-shapes").selectAll(".-shape").filter(function(a){return ia(a)}).each(function(a,c){var d=d3.select(this),b=d.classed(aa),f=d.classed(wb),g,p,h,n;g=!1;"circle"===this.nodeName?(g=1*d.attr("cx"),p=1*d.attr("cy"),n=Yb,g=eb.classes.indexOf(a)})});return J};k.data.get=function(a){a=k.data.getAsTarget(a);return l(a)?a.values.map(function(a){return a.value}):void 0};k.data.getAsTarget=function(a){var b=Ta(function(b){return b.id==a});return 0