[],d,h,e;for(d=0;d<a.length;d++)for(e=a[d][0],h=1;h<a[d].length;h++)s(b[h-1])&&(b[h-1]={}),b[h-1][e]=a[d][h];returnb}functionIa(a){varb=e.keys(a[0]).filter(function(a){returna!==na}),d=0,h;if(z&&!na)returnga.alert('data.x must be specified when axis.x.type == "timeseries"'),[];a.forEach(function(a){if(z){if(!(naina))throwError("'"+na+"' must be included in data");h=ma(a[na]);if(null===h)throwError("Failed to parse timeseries date in data");a.x=h}elsea.x=Vb?a[na]:d++;null===Za&&(Za=newDate(a.x));
l=D(a[c-1].value,a[c].value);g=b(a[c].x)-b(a[c-1].x);u=d(a[c].value)-d(a[c-1].value);g=Math.sqrt(Math.pow(g,2)+Math.pow(u,2));u=2/g;vart=2*u;for(g=u;1>=g;g+=t)r+=e(a[c-1],a[c],g,u)}returnr}functionrb(a){varb=k.data.targets=Ia(a),d,c;lc=e.select(ua);if(lc.empty())ga.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{Q();zb();l.domain(e.extent(a.map(function(a){returna.x})));y.domain(ia("y"));R.domain(ia("y2"));
function(){}),$c=c(["onleave"],function(){});if(!("data"inU))throwError("data is required in config");varna=c(["data","x"],void0),ld=c(["data","x_format"],"%Y-%m-%d"),Kc=c(["data","id_converter"],function(a){returna}),Ha=c(["data","names"],{}),v=c(["data","groups"],[]),Rb=c(["data","axes"],{}),ba=c(["data","types"],{}),uc=c(["data","regions"],{}),md=c(["data","colors"],{}),da=c(["data","selection","enabled"],!1),pa=c(["data","selection","grouped"],!1),qa=c(["data","selection","isselectable"],
if("cacheIds"ina&&sa(a.cacheIds))Oa(Ra(a.cacheIds),a.done);elseif("data"ina)Oa(Ia(a.data),a.done);elseif("url"ina)e.csv(a.url,function(b,d){Oa(Ia(d),a.done)});elseif("rows"ina)Oa(Ia(Tb(a.rows)),a.done);elseif("columns"ina)Oa(Ia(Ub(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};k.unload=function(a){k.data.targets=k.data.targets.filter(function(b){returnb.id!==a});e.selectAll(".target-"+a).transition().style("opacity",0).remove();za&&(e.selectAll(".legend-item-"+
[],d,h,e;for(d=0;d<a.length;d++)for(e=a[d][0],h=1;h<a[d].length;h++)s(b[h-1])&&(b[h-1]={}),b[h-1][e]=a[d][h];returnb}functionIa(a){varb=e.keys(a[0]).filter(function(a){returna!==T}),d,h;if(z&&!T)returnha.alert('data.x must be specified when axis.x.type == "timeseries"'),[];kb&&s(k.data.x)&&(k.data.x=a.map(function(a){returna[T]}));d=0;a.forEach(function(a){if(z){if(!(Tina))throwError("'"+T+"' must be included in data");h=na(a[T]);if(null===h)throwError("Failed to parse timeseries date in data");
a.length;c++)if(s(q)||!Qc(a[c].x,q))r+=" "+kc(a[c])+" "+n(a[c]);else{k=I(a[c-1].x,a[c].x);l=D(a[c-1].value,a[c].value);g=b(a[c].x)-b(a[c-1].x);u=d(a[c].value)-d(a[c-1].value);g=Math.sqrt(Math.pow(g,2)+Math.pow(u,2));u=2/g;vart=2*u;for(g=u;1>=g;g+=t)r+=e(a[c-1],a[c],g,u)}returnr}functionsb(a){varb=k.data.targets=Ia(a),d,c;lc=e.select(ua);if(lc.empty())ha.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{Q();
null),oa=c(["zoom","enabled"],!1),tc=c(["zoom","extent"],null),ed=c(["zoom","privileged"],!1),Zc=c(["onenter"],function(){}),$c=c(["onleave"],function(){});if(!("data"inV))throwError("data is required in config");varT=c(["data","x"],void0),ld=c(["data","x_format"],"%Y-%m-%d"),Kc=c(["data","id_converter"],function(a){returna}),Ha=c(["data","names"],{}),v=c(["data","groups"],[]),Sb=c(["data","axes"],{}),ca=c(["data","types"],{}),uc=c(["data","regions"],{}),md=c(["data","colors"],{}),ea=c(["data",
if("cacheIds"ina&&sa(a.cacheIds))Oa(Ra(a.cacheIds),a.done);elseif("data"ina)Oa(Ia(a.data),a.done);elseif("url"ina)e.csv(a.url,function(b,d){Oa(Ia(d),a.done)});elseif("rows"ina)Oa(Ia(Ub(a.rows)),a.done);elseif("columns"ina)Oa(Ia(Vb(a.columns)),a.done);elsethrowError("url or rows or columns is required.");};k.unload=function(a){k.data.targets=k.data.targets.filter(function(b){returnb.id!==a});e.selectAll(".target-"+a).transition().style("opacity",0).remove();za&&(e.selectAll(".legend-item-"+
Xa(function(b){returnb.id===a});return0<b.length?b[0]:void0};if("url"inU.data)e.csv(U.data.url,function(a,b){rb(b)});elseif("rows"inU.data)rb(Tb(U.data.rows));elseif("columns"inU.data)rb(Ub(U.data.columns));elsethrowError("url or rows or columns is required.");ga.onresize=function(){Q();zb();F.x(Y);oa&&G.x(l);e.select("svg").attr("width",fb).attr("height",va);e.select("#"+sb).select("rect").attr("width",q).attr("height",t);e.select("#xaxis-clip").select("rect").attr("width",V);e.select(".zoom-rect").attr("width",
Xa(function(b){returnb.id===a});return0<b.length?b[0]:void0};if("url"inV.data)e.csv(V.data.url,function(a,b){sb(b)});elseif("rows"inV.data)sb(Ub(V.data.rows));elseif("columns"inV.data)sb(Vb(V.data.columns));elsethrowError("url or rows or columns is required.");ha.onresize=function(){Q();Ab();F.x(Z);oa&&G.x(l);e.select("svg").attr("width",fb).attr("height",va);e.select("#"+tb).select("rect").attr("width",q).attr("height",t);e.select("#xaxis-clip").select("rect").attr("width",W);e.select(".zoom-rect").attr("width",