0===d.length)returnQ.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];sb&&b.forEach(function(b){varc=qa?qa:X?X[b]:null;0<=d.indexOf(c)&&(h.data.x[b]=a.map(function(a){returna[c]}))});b=b.map(function(b){vard=cd(b);return{id:d,id_org:b,values:a.map(function(a,c){vare;e=qa?qa:X?X[b]:null;e=A?pa(a[e]):sb?a[e]?a[e]:h.data.x[b][c]:c;if(e<xa||null===xa)xa=e;Ma<e&&(Ma=e);a.x=e;return{x:e,value:null===a[b]||isNaN(a[b])?null:+a[b],id:d,index:c}})}});b.forEach(function(a){db[a.id_org]=
0===d.length)returnQ.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];rb&&b.forEach(function(b){varc=qa?qa:X?X[b]:null;0<=d.indexOf(c)&&(h.data.x[b]=a.map(function(a){returna[c]}))});b=b.map(function(b){vard=gd(b);return{id:d,id_org:b,values:a.map(function(a,c){vare;e=qa?qa:X?X[b]:null;e=A?pa(a[e]):rb?a[e]?a[e]:h.data.x[b][c]:c;if(e<xa||null===xa)xa=e;Ma<e&&(Ma=e);a.x=e;return{x:e,value:null===a[b]||isNaN(a[b])?null:+a[b],id:d,index:c}})}});b.forEach(function(a){eb[a.id_org]=
ha["string"===typeofa?a:a.id]}functionhd(a){returnxb(a)?a.values:[]}functionpc(a){returnHa(a)?a.values:[]}functionpa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+yb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");b=c.time.format(yb).parse(a);if(!b)throwError("Failed to parse '"+a+"' with format "+yb);returnb}functionqc(a,b){vard=c.mouse(a),f=c.select(a),e=1*f.attr("cx"),f=1*f.attr("cy");returnMath.sqrt(Math.pow(e-d[0],2)+Math.pow(f-
a:a.id;return!(ainha)||"line"===ha[a]||"spline"===ha[a]}functionHa(a){return"bar"===ha["string"===typeofa?a:a.id]}functionld(a){returnwb(a)?a.values:[]}functionsc(a){returnHa(a)?a.values:[]}functionpa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+xb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");b=c.time.format(xb).parse(a);if(!b)throwError("Failed to parse '"+a+"' with format "+xb);returnb}functiontc(a,b){vard=c.mouse(a),f=c.select(a),
function(a,c,f,e){return"M"+b(k(f))+" "+d(m(f))+" "+b(k(f+e))+" "+d(m(f+e))};for(c=0;c<a.length;c++)if(s(p)||!id(a[c].x,p))h+=" "+yc(a[c])+" "+q(a[c]);else{k=H(a[c-1].x,a[c].x);m=D(a[c-1].value,a[c].value);e=b(a[c].x)-b(a[c-1].x);l=d(a[c].value)-d(a[c-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(l,2));l=2/e;varr=2*l;for(e=l;1>=e;e+=r)h+=f(a[c-1],a[c],e,l)}returnh}functionAb(a){varb,d;gb=c.select(wa);if(gb.empty())Q.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');
" "+Cc(a[c])+" "+q(a[c]);else{k=H(a[c-1].x,a[c].x);m=D(a[c-1].value,a[c].value);e=b(a[c].x)-b(a[c-1].x);l=d(a[c].value)-d(a[c-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(l,2));l=2/e;varr=2*l;for(e=l;1>=e;e+=r)h+=f(a[c-1],a[c],e,l)}returnh}functionCb(a){varb,d;hb=c.select(wa);if(hb.empty())Q.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{hb.html("");h.data.x={};h.data.targets=La(a);ua();Lb();m.domain(c.extent([xa,
"right"],null),ra=e(["zoom","enabled"],!1),Hc=e(["zoom","extent"],null),yd=e(["zoom","privileged"],!1),rd=e(["onenter"],function(){}),sd=e(["onleave"],function(){});if(!("data"in$))throwError("data is required in config");varqa=e(["data","x"],null),X=e(["data","xs"],null),yb=e(["data","x_format"],"%Y-%m-%d"),cd=e(["data","id_converter"],function(a){returna}),Ka=e(["data","names"],{}),t=e(["data","groups"],[]),Zb=e(["data","axes"],{}),ha=e(["data","types"],{}),Ic=e(["data","regions"],{}),Hd=e(["data",
{data:{}},eb={},Z="_expanded_",ja="_selected_",Kb="_included_",wa=e(["bindto"],"#chart"),Ya=e(["size","width"],null),Yb=e(["size","height"],null),Ub=e(["padding","left"],null),Sb=e(["padding","right"],null),ra=e(["zoom","enabled"],!1),Lc=e(["zoom","extent"],null),Cd=e(["zoom","privileged"],!1),vd=e(["onenter"],function(){}),wd=e(["onleave"],function(){});if(!("data"in$))throwError("data is required in config");varqa=e(["data","x"],null),X=e(["data","xs"],null),xb=e(["data","x_format"],"%Y-%m-%d"),
if("cacheIds"ina&&Va(a.cacheIds))Sa(Wa(a.cacheIds),a.done);elseif("data"ina)Sa(La(a.data),a.done);elseif("url"ina)c.csv(a.url,function(b,c){Sa(La(c),a.done)});elseif("rows"ina)Sa(La(bc(a.rows)),a.done);elseif("columns"ina)Sa(La(cc(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};h.unload=function(a){h.data.targets=h.data.targets.filter(function(b){returnb.id!==a});c.selectAll(".target-"+a).transition().style("opacity",0).remove();Aa&&(c.selectAll(".legend-item-"+
0)};h.unzoom=function(){G.clear().update();C({withUpdateXDomain:!0})};h.load=function(a){s(a.done)&&(a.done=function(){});"categories"ina&&ea&&(Ga=a.categories,z.categories(Ga));if("cacheIds"ina&&Wa(a.cacheIds))Ta(Xa(a.cacheIds),a.done);elseif("data"ina)Ta(La(a.data),a.done);elseif("url"ina)c.csv(a.url,function(b,c){Ta(La(c),a.done)});elseif("rows"ina)Ta(La(dc(a.rows)),a.done);elseif("columns"ina)Ta(La(ec(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};h.unload=
cb(function(b){returnb.id===a});return0<b.length?b[0]:void0};h.destroy=function(){h.data.targets=void0;h.data.x={};gb.html("");Q.onresize=null};if("url"in$.data)c.csv($.data.url,function(a,b){Ab(b)});elseif("rows"in$.data)Ab(bc($.data.rows));elseif("columns"in$.data)Ab(cc($.data.columns));elsethrowError("url or rows or columns is required.");returnh}})(window);
h.data.get=function(a){a=h.data.getAsTarget(a);returnn(a)?a.values.map(function(a){returna.value}):void0};h.data.getAsTarget=function(a){varb=db(function(b){returnb.id===a});return0<b.length?b[0]:void0};h.destroy=function(){h.data.targets=void0;h.data.x={};hb.html("");Q.onresize=null};if("url"in$.data)c.csv($.data.url,function(a,b){Cb(b)});elseif("rows"in$.data)Cb(dc($.data.rows));elseif("columns"in$.data)Cb(ec($.data.columns));elsethrowError("url or rows or columns is required.");