|
|
|
(function(e){"use strict";function r(e){return e||e===0}function i(e){return typeof e==="undefined"}function s(e){return typeof e!=="undefined"}var t={version:"0.1.27"};var n={target:"c3-target",chart:"c3-chart",chartLine:"c3-chart-line",chartLines:"c3-chart-lines",chartBar:"c3-chart-bar",chartBars:"c3-chart-bars",chartText:"c3-chart-text",chartTexts:"c3-chart-texts",chartArc:"c3-chart-arc",chartArcs:"c3-chart-arcs",chartArcsTitle:"c3-chart-arcs-title",gaugeArc:"c3-gauge-arc",gaugeArcs:"c3-gauge-arcs",gaugeArcsTitle:"c3-gauge-arcs-title",selectedCircle:"c3-selected-circle",selectedCircles:"c3-selected-circles",eventRect:"c3-event-rect",eventRects:"c3-event-rects",zoomRect:"c3-zoom-rect",brush:"c3-brush",focused:"c3-focused",region:"c3-region",regions:"c3-regions",tooltip:"c3-tooltip",tooltipName:"c3-tooltip-name",shape:"c3-shape",shapes:"c3-shapes",line:"c3-line",step:"c3-step",bar:"c3-bar",bars:"c3-bars",circle:"c3-circle",circles:"c3-circles",arc:"c3-arc",area:"c3-area",text:"c3-text",texts:"c3-texts",grid:"c3-grid",xgrid:"c3-xgrid",xgrids:"c3-xgrids",xgridLine:"c3-xgrid-line",xgridLines:"c3-xgrid-lines",xgridFocus:"c3-xgrid-focus",ygrid:"c3-ygrid",ygrids:"c3-ygrids",ygridLine:"c3-ygrid-line",ygridLines:"c3-ygrid-lines",axisX:"c3-axis-x",axisXLabel:"c3-axis-x-label",axisY:"c3-axis-y",axisYLabel:"c3-axis-y-label",axisY2:"c3-axis-y2",axisY2Label:"c3-axis-y2-label",legendItem:"c3-legend-item",legendItemEvent:"c3-legend-item-event",legendItemTile:"c3-legend-item-tile",dragarea:"c3-dragarea",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"};t.generate=function(t){function f(e,n){if(!(e in t)){throw Error(n)}}function l(e,n){var r=t,i,s,o;for(i=0;i<e.length;i++){if(typeof r==="object"&&!(e[i]in r)){return n}s=i===e.length-1;o=r[e[i]];if(!s&&typeof o!=="object"||s&&typeof n!=="object"&&typeof o==="object"&&o!==null){return n}r=o}return r}function Br(e){return"url("+document.URL.split("#")[0]+"#"+e+")"}function jr(){xa.attr("transform",Mr.main);xa.select("."+n.axisX).attr("transform",Mr.x);xa.select("."+n.axisY).attr("transform",Mr.y);xa.select("."+n.axisY2).attr("transform",Mr.y2);xa.select("."+n.chartArcs).attr("transform",Mr.arc)}function Fr(){if(Q){Ta.attr("transform",Mr.context);Ta.select("."+n.axisX).attr("transform",Mr.subx)}}function Ir(e){var t=e!==false?250:0;if(tt){Na.transition().duration(t).attr("transform",Mr.legend)}}function qr(e){jr(e);Fr(e);Ir(e)}function Wr(){Yn=$r();Zn=Jr();er=yi();tr=gi();Xn={top:st?Yr("y2"):zr,right:Qr(),bottom:Yr(st?"y":"x")+(st?0:G)+(_r?0:er),left:(st?G+Ur:0)+Kr()};Jn=Yn-Xn.left-Xn.right;Qn=Zn-Xn.top-Xn.bottom;if(Jn<0){Jn=0}if(Qn<0){Qn=0}Vn={top:st?Xn.top:Zn-G-(_r?0:er),right:NaN,bottom:20+(_r?0:er),left:st?Rr:Xn.left};Kn=st?Xn.left-Rr-Ur:Jn;Gn=st?Qn:Zn-Vn.top-Vn.bottom;if(Kn<0){Kn=0}if(Gn<0){Gn=0}$n={top:_r?0:Zn-er,right:NaN,bottom:0,left:_r?Yn-tr:0};Xr();if(_r&&Su(u.data.targets)){$n.left=Jn/2+rr}}function Xr(){rr=Qn/2;nr=rr*.95;var e=pn?(nr-pn)/nr:.6;ir=Eu(u.data.targets)||wu(u.data.targets)?nr*e:0}function Vr(){var e=st?n.axisX:n.axisY,t=o.select("."+e).node(),r=t?t.getBoundingClientRect():{right:0},i=o.select(c).node().getBoundingClientRect(),s=r.right-i.left-Kr();return s>0?s:0}function $r(){return h?h:Zr()}function Jr(){var e=p?p:ei();return e>0?e:320}function Kr(){if(Su(u.data.targets)){return 0}else if(d){return d}else{return st||!yt||xt?1:Gr("y")}}function Qr(){var e=1;if(Su(u.data.targets)){return 0}else if(v){return v}else if(_r){return tr+(kt&&!st?Gr("y2"):e)}else if(kt){return _t||st?e:Gr("y2")}else{return e}}function Gr(e){var t=Bi(e);return t.isInner?20+ts(e):40+ts(e)}function Yr(e){if(e==="y"&&!yt){return tt&&!_r?10:1}if(e==="y2"&&!kt){return zr}return(Bi(e).isInner?30:40)+(e==="y2"?-10:0)}function Zr(){return+o.select(c).style("width").replace("px","")}function ei(){return+o.select(c).style("height").replace("px","")}function ti(e){return e?-(1+4):-(Xn.left-1)}function ni(e){return e?-20:-1}function ri(){return ti(!st)}function ii(){return ni(!st)}function si(){return ti(st)}function oi(){return ni(st)}function ui(e){return e?Jn+2+4:Xn.left+20}functio
|