c.keys(a[0]).filter(id),d=c.keys(a[0]).filter(fc);if(C&&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=C?pa(a[e]):tb?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])?
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])?
(b="scatter"===Y["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),
(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),
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;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=La(a);ua();Nb();m.domain(c.extent(Va()));v.domain(ka("y"));U.domain(ka("y2"));ea.domain(m.domain());Za.domain(v.domain());$a.domain(U.domain());B.ticks(10>a.length?a.length:10);na.ticks(ud).outerTickSize(0).tickFormat(vd);
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());
"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"inaa))throwError("data is required in config");varqa=e(["data","x"],null),X=e(["data","xs"],null),zb=e(["data","x_format"],"%Y-%m-%d"),jd=e(["data","id_converter"],function(a){returna}),Ka=e(["data","names"],{}),u=e(["data","groups"],[]),bc=e(["data","axes"],{}),Y=e(["data","types"],{}),Qc=e(["data","regions"],{}),Od=e(["data",
{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"),
if("cacheIds"ina&&Wa(a.cacheIds))Sa(mb(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(gc(a.rows)),a.done);elseif("columns"ina)Sa(La(hc(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();Ba&&(c.selectAll(".legend-item-"+
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__})}))};
void0};h.data.getAsTarget=function(a){varb=cb(function(b){returnb.id===a});return0<b.length?b[0]:void0};h.destroy=function(){h.data.targets=void0;h.data.x={};hb.html("");P.onresize=null};if("url"inaa.data)c.csv(aa.data.url,function(a,b){Eb(b)});elseif("rows"inaa.data)Eb(gc(aa.data.rows));elseif("columns"inaa.data)Eb(hc(aa.data.columns));elsethrowError("url or rows or columns is required.");returnh}})(window);