c.keys(a[0]).filter(jd),d=c.keys(a[0]).filter(fc);if(C&&0===d.length)returnQ.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];ub&&b.forEach(function(b){varc=qa?qa:Y?Y[b]:null;0<=d.indexOf(c)&&(h.data.x[b]=a.map(function(a){returna[c]}))});b=b.map(function(b){vard=kd(b);return{id:d,id_org:b,values:a.map(function(a,c){vare;e=qa?qa:Y?Y[b]:null;e=C?pa(a[e]):ub?a[e]?a[e]:h.data.x[b][c]:c;if(e<oa||null===oa)oa=e;ya<e&&(ya=e);a.x=e;return{x:e,value:null===a[b]||isNaN(a[b])?
1])&&(b[f-1]={}),b[f-1][c]=a[d][f];returnb}functionKa(a){varb=c.keys(a[0]).filter(id),d=c.keys(a[0]).filter(ec);if(r&&0===d.length)returnP.alert('data.x or data.xs must be specified when axis.x.type == "timeseries"'),[];tb&&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=jd(b);return{id:d,id_org:b,values:a.map(function(a,c){vare;e=qa?qa:X?X[b]:null;e=r?pa(a[e]):tb?a[e]?a[e]:h.data.x[b][c]:c;if(e<ea||null===
(b="scatter"===P["string"===typeofa?a:a.id]);returnb?a.values:[]}functionpa(a){varb;if(!a)throwError(a+" can not be parsed as d3.time with format "+zb+". Maybe 'x' of this data is not defined. See data.x or data.xs option.");b=c.time.format(zb).parse(a);if(!b)throwError("Failed to parse '"+a+"' with format "+zb);returnb}functionyc(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-d[1],2))<b}functionzc(a){varb=c.mouse(a),
a:a.id]}functionwc(a){returnGa(a)?a.values:[]}functionod(a){varb;(b=xb(a))||(b="scatter"===O["string"===typeofa?a:a.id]);returnb?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}functionxc(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-
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}functionEb(a){varb,d;ib=c.select(wa);if(ib.empty())Q.alert('No bind element found. Check the selector specified by "bindto" and existance of that element. Default "bindto" is "#chart".');else{ib.html("");h.data.x={};h.data.targets=La(a);Hc&&Oa(gb().filter(function(a){return!(ainP)}),Hc);ua();Nb();m.domain(c.extent(Wa()));v.domain(ka("y"));V.domain(ka("y2"));ea.domain(m.domain());$a.domain(v.domain());ab.domain(V.domain());
d(a[c-1].value);e=Math.sqrt(Math.pow(e,2)+Math.pow(l,2));l=2/e;vars=2*l;for(e=l;1>=e;e+=s)h+=f(a[c-1],a[c],e,l)}returnh}functionDb(a){varb,d;hb=c.select(wa);if(hb.empty())P.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=Ka(a);Gc&&Na(fb().filter(function(a){return!(ainO)}),Gc);ua();Mb();m.domain(c.extent(Va()));w.domain(ka("y"));U.domain(ka("y2"));da.domain(m.domain());
{data:{}},eb={},$="_expanded_",ia="_selected_",Mb="_included_",wa=e(["bindto"],"#chart"),Ya=e(["size","width"],null),Zb=e(["size","height"],null),Vb=e(["padding","left"],null),Tb=e(["padding","right"],null),ra=e(["zoom","enabled"],!1),Qc=e(["zoom","extent"],null),Gd=e(["zoom","privileged"],!1),zd=e(["onenter"],function(){}),Ad=e(["onleave"],function(){});if(!("data"inaa))throwError("data is required in config");varqa=e(["data","x"],null),Y=e(["data","xs"],null),zb=e(["data","x_format"],"%Y-%m-%d"),
{data:{}},db={},Z="_expanded_",ia="_selected_",Lb="_included_",wa=e(["bindto"],"#chart"),Xa=e(["size","width"],null),Yb=e(["size","height"],null),Ub=e(["padding","left"],null),Sb=e(["padding","right"],null),ra=e(["zoom","enabled"],!1),Pc=e(["zoom","extent"],null),Fd=e(["zoom","privileged"],!1),yd=e(["onenter"],function(){}),zd=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"),
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();Ba&&(c.selectAll(".legend-item-"+a).remove(),lb(h.data.targets));0<h.data.targets.length&&z()};h.selected=function(a){a=n(a)?"-"+a:"";returnc.merge(k.selectAll(".-shapes"+a).selectAll(".-shape").filter(function(){returnc.select(this).classed(ia)}).map(function(a){returna.map(function(a){returna.__data__})}))};
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-"+a).remove(),kb(h.data.targets));0<h.data.targets.length&&z()};h.selected=function(a){a=n(a)?"-"+a:"";returnc.merge(k.selectAll(".-shapes"+a).selectAll(".-shape").filter(function(){returnc.select(this).classed(ia)}).map(function(a){returna.map(function(a){returna.__data__})}))};