diff --git a/dist/src/index.js b/dist/src/index.js index 9789354..a821834 100644 --- a/dist/src/index.js +++ b/dist/src/index.js @@ -2427,7 +2427,7 @@ } }; } else { - init(); + init("."); } }()); diff --git a/dist/src/index.min.js b/dist/src/index.min.js index a38b78a..769b8ba 100644 --- a/dist/src/index.min.js +++ b/dist/src/index.min.js @@ -1 +1 @@ -!function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}function a(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+s).toString(36))}function i(t){return"object"==typeof t?null!==t:"function"==typeof t}function o(t){if(!i(t))throw TypeError(t+" is not an object!");return t}function n(t){try{return!!t()}catch(t){return!0}}function r(t){return d?f.createElement(t):{}}function v(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}var h=t(function(t){var e=t.exports={version:"2.6.9"};"number"==typeof __e&&(__e=e)}),y=(h.version,t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)})),c=t(function(t){var e="__core-js_shared__",n=y[e]||(y[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:h.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),e=0,s=Math.random(),l=t(function(t){var e=c("wks"),n=y.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:a)("Symbol."+t))}).store=e}),u=!n(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),f=y.document,d=i(f)&&i(f.createElement),p=!u&&!n(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),g=Object.defineProperty,m={f:u?Object.defineProperty:function(t,e,n){if(o(t),e=function(t,e){if(!i(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!i(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!i(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}(e,!0),o(n),p)try{return g(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},b=u?function(t,e,n){return m.f(t,e,v(1,n))}:function(t,e,n){return t[e]=n,t},x=l("unscopables"),A=Array.prototype;null==A[x]&&b(A,x,{});function w(t){A[x][t]=!0}function _(t,e){return{value:e,done:!!t}}function O(t){return R.call(t).slice(8,-1)}function C(t){if(null==t)throw TypeError("Can't call method on "+t);return t}function L(t){return P(C(t))}function T(t,e){return D.call(t,e)}function k(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}function S(r,a,t){if(k(r),void 0===a)return r;switch(t){case 1:return function(t){return r.call(a,t)};case 2:return function(t,e){return r.call(a,t,e)};case 3:return function(t,e,n){return r.call(a,t,e,n)}}return function(){return r.apply(a,arguments)}}var F={},R={}.toString,P=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==O(t)?t.split(""):Object(t)},D={}.hasOwnProperty,N=c("native-function-to-string",Function.toString),j=t(function(t){var i=a("src"),e="toString",o=(""+N).split(e);h.inspectSource=function(t){return N.call(t)},(t.exports=function(t,e,n,r){var a="function"==typeof n;a&&(T(n,"name")||b(n,"name",e)),t[e]!==n&&(a&&(T(n,i)||b(n,i,t[e]?""+t[e]:o.join(String(e)))),t===y?t[e]=n:r?t[e]?t[e]=n:b(t,e,n):(delete t[e],b(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[i]||N.call(this)})}),E="prototype",I=function(t,e,n){var r,a,i,o,c=t&I.F,s=t&I.G,l=t&I.S,u=t&I.P,f=t&I.B,d=s?y:l?y[e]||(y[e]={}):(y[e]||{})[E],p=s?h:h[e]||(h[e]={}),g=p[E]||(p[E]={});for(r in s&&(n=e),n)i=((a=!c&&d&&void 0!==d[r])?d:n)[r],o=f&&a?S(i,y):u&&"function"==typeof i?S(Function.call,i):i,d&&j(d,r,i,t&I.U),p[r]!=i&&b(p,r,o),u&&g[r]!=i&&(g[r]=i)};y.core=h,I.F=1,I.G=2,I.S=4,I.P=8,I.B=16,I.W=32,I.U=64,I.R=128;function B(t){return isNaN(t=+t)?0:(0a;)T(r,n=e[a++])&&(~J(i,n)||i.push(n));return i}(t,tt)},nt=u?Object.defineProperties:function(t,e){o(t);for(var n,r=et(e),a=r.length,i=0;idocument.F=Object<\/script>"),t.close(),ct=t.F;n--;)delete ct[ot][tt[n]];return ct()},st=Object.create||function(t,e){var n;return null!==t?(H[ot]=o(t),n=new H,H[ot]=null,n[it]=t):n=ct(),void 0===e?n:nt(n,e)},lt=m.f,ut=l("toStringTag"),ft={};b(ft,l("iterator"),function(){return this});function dt(t){return Object(C(t))}function pt(){return this}var gt=V("IE_PROTO"),ht=Object.prototype,yt=Object.getPrototypeOf||function(t){return t=dt(t),T(t,gt)?t[gt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ht:null},mt=l("iterator"),xt=!([].keys&&"next"in[].keys()),vt="values",bt=function(t,e,n,r,a,i,o){!function(t,e,n){t.prototype=st(ft,{next:v(1,n)}),U(t,e+" Iterator")}(n,e,r);function c(t){if(!xt&&t in g)return g[t];switch(t){case"keys":case vt:return function(){return new n(this,t)}}return function(){return new n(this,t)}}var s,l,u,f=e+" Iterator",d=a==vt,p=!1,g=t.prototype,h=g[mt]||g["@@iterator"]||a&&g[a],y=h||c(a),m=a?d?c("entries"):y:void 0,x="Array"==e&&g.entries||h;if(x&&(u=yt(x.call(new t)))!==Object.prototype&&u.next&&(U(u,f,!0),"function"!=typeof u[mt]&&b(u,mt,pt)),d&&h&&h.name!==vt&&(p=!0,y=function(){return h.call(this)}),!xt&&!p&&g[mt]||b(g,mt,y),F[e]=y,F[f]=pt,a)if(s={values:d?y:c(vt),keys:i?y:c("keys"),entries:m},o)for(l in s)l in g||j(g,l,s[l]);else G(G.P+G.F*(xt||p),e,s);return s}(Array,"Array",function(t,e){this._t=L(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,_(1)):_(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");F.Arguments=F.Array,w("keys"),w("values"),w("entries");for(var At=l("iterator"),wt=l("toStringTag"),_t=F.Array,Ot={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ct=et(Ot),Lt=0;Lt").concat(he.formatNum(i)," ").concat(i18next.t("emissions per cap",{ns:"units"}))).style("left",d3.event.pageX+30+"px").style("top",d3.event.pageY+-50+"px")}).on("mouseout",function(t){l.style("opacity",0),L();var e=d3.select(".enlarged").text();d3.select(".bar-group.".concat(i18next.t(e,{ns:"cities"}))).select("rect").classed("active",!0),d3.select("#city".concat(i18next.t(e,{ns:"cities"}))).classed("cityactive",!0)})}function w(){function t(t,e){return ue[u].colourRange[e]}function e(t,e){return"protocol"===u?i18next.t("".concat(u).concat(e+1),{ns:"legend"}):"region"===u?"":(n=0===e?l[u].lims[e]:l[u].levels[e-1],n=ue[u].formatLevel?ue[u].formatLevel(n):n,"".concat(n,"+"));var n}var n=ue[u].xpos,r=d3.select("body").append("div").attr("class","tooltip-legend").style("opacity",0),a=g.attr("class","legendCB").selectAll(".legend").data(ue[u].colourRange),i=a.enter().append("g").attr("class","legend").attr("id",function(t,e){return"cb".concat(e)});i.append("rect").attr("width",15).attr("height",15).attr("y",5).attr("x",function(t,e){return 51+85*e}).attr("fill",t),i.selectAll(".legend rect").on("touchmove mousemove",function(t,e){if("protocol"===u){var n=i18next.t("".concat(u).concat(e+1),{ns:"legend"});r.style("opacity",1),r.html("".concat(n,": ").concat(i18next.t("".concat(n),{ns:"protocolFullName"}))).style("left",d3.event.pageX-100+"px").style("top",d3.event.pageY-70+"px")}}).on("mouseout",function(t){r.style("opacity",0)}),i.append("text").attr("class","legendText").text(e).attr("y",18).attr("x",function(t,e){return n[e]}),a.select("rect").attr("fill",t),a.select("text").text(e).attr("x",function(t,e){return n[e]}),a.exit().remove();var o=ue[u].units,c=d3.select(".units");c.text(o),"HDD"===u||"CDD"===u||"low_bua_pc_2014"===u||"high_bua_pc_2014"===u?d3.select(".units").classed("unitsactive",!0):d3.select(".units").classed("unitsactive",!1);var s=d3.select("body").append("div").attr("class","tooltip-units").style("opacity",0);c.on("touchmove mousemove",function(){ue[u].unitdef&&(s.style("opacity",1),s.html("".concat(i18next.t(u,{ns:"attributes"}),": ").concat(ue[u].unitdef)).style("left",d3.event.pageX-100+"px").style("top",d3.event.pageY-70+"px"))}).on("mouseout",function(t){s.style("opacity",0)})}function _(t){d3.select("#".concat(t)).text(i18next.t(t,{ns:"chartHeadings"}))}function O(e){var t=i18next.t(e,{ns:"cities"});L();var n=x.filter(function(t){return t.city===e})[0].country,r=x.filter(function(t){return t.city===e})[0].scope1,a=x.filter(function(t){return t.city===e})[0].year,i=x.filter(function(t){return t.city===e})[0].dataset,o=x.filter(function(t){return t.city===e})[0].protocol,c=i18next.t(e,{ns:"displayName"});s=[{id:1,text:"".concat(c,", ").concat(n)},{id:2,text:i18next.t("scope1Row",{ns:"cityCard"})},{id:3,text:"".concat(r," ").concat(i18next.t("scope1",{ns:"units"})," ").concat(i18next.t("defn",{ns:"units"}))},{id:4,text:i18next.t("yearRow",{ns:"cityCard"})},{id:5,text:a},{id:6,text:i18next.t("datasetRow",{ns:"cityCard"})},{id:7,text:i18next.t(i,{ns:"datasets"})},{id:8,text:i18next.t("protocolRow",{ns:"cityCard"})},{id:9,text:i18next.t(o,{ns:"protocol"})}],l[u]&&"protocol"!==u&"year"!==u&&C(u,e),m(s),d3.select(".bar-group.".concat(t)).select("rect").classed("active",!0),d3.selectAll(".bar-group:not(.".concat(t,")")).select("rect").classed("fade",!0),d3.selectAll("#city"+t).classed("cityactive",!0),d3.selectAll(".worldcity:not(#city"+t+")").classed("cityfade",!0),d3.selectAll(".worldcountry:not(#map".concat(i18next.t(n,{ns:"countries"}),")")).classed("countryfade",!0)}function C(t,e){var n,r=l[t].filter(function(t){return t.city===e})[0].value,a="N/A"===(n="string"==typeof r||r instanceof String?r:null===r?"N/A":d3.format(",")(r)?d3.format(",")(r):r)?"":i18next.t(t,{ns:"units"});s.push({id:10,text:i18next.t(t,{ns:"attributes"})},{id:11,text:"".concat(n," ").concat(a)})}function L(){d3.selectAll(".bar-group").selectAll("rect").classed("active",!1).classed("fade",!1),d3.selectAll(".cityactive").classed("cityactive",!1),d3.selectAll(".cityfade").classed("cityfade",!1),d3.selectAll(".countryfade").classed("countryfade",!1)}function T(e){var a,i=[],o=i18next.t(e,{ns:"barchartGroups"});a="Europe"===e?"".concat(o,"_").concat(e):"Southeast Asia"===e?"".concat(o,"_SEasia"):"Latin America & Caribbean"===e?"".concat(o,"_LA"):"South Asia"===e?"".concat(o,"_SA"):"N Africa & W Asia"===e?"".concat(o,"_NAWA"):o;var c=pe[a].xpos,s=pe[a].ypos,l=pe[a].arrowlength,u=pe[a].gid,f=0,d=0,p=0,g=0,h=200-g-d,y=200-f-p,m=[],n=0;x.filter(function(t){t.region===e&&t.storeOrig&&(m.push(t.storeOrig),i.push({id:n,name:"arrow"+n,path:"M 2,2 L2,11 L10,6 L2,2"}),n++)});for(var t=function(e){var t=d3.select("#barChart_".concat(o)).append("g").attr("class","barMarker").attr("id","g_".concat(u).concat(e)).attr("height",y+f+p).attr("transform","translate("+c[e]+","+s[e]+")").append("svg").attr("width",h+g+d),n=t.append("svg:defs"),r=t.append("svg:g").attr("id","markers".concat(e));n.selectAll("marker").data(i).enter().append("svg:marker").attr("id",function(t){return"marker_arrow".concat(e)}).attr("markerHeight",13).attr("markerWidth",13).attr("markerUnits","strokeWidth").attr("orient","auto").attr("refX",9.5).attr("refY",6).append("svg:path").attr("d",function(t){return t.path}),r.selectAll("path").data(i).enter().append("svg:path").attr("d",function(t,e){return"M 100, 0 V ".concat(l,", 0 ")}).attr("stroke-width",1.2).attr("marker-start",function(t){return"url(#marker_stub".concat(e,")")}).attr("marker-end",function(t){return"url(#marker_arrow".concat(e,")")}).attr("transform",function(t){return"scale(".concat(pe[a].arrowscale[0]," ").concat(pe[a].arrowscale[1],")")}).append("svg:path").attr("d",function(t){return t.path}),d3.select("#g_".concat(u).concat(e)).append("text").text(m[e]).attr("transform",function(){return"scale(".concat(pe[a].textscale[0]," ").concat(pe[a].textscale[1],")\n translate(").concat(pe[a].textposx[e]," ").concat(pe[a].textposy[e],")")})},r=0;ra;)T(r,n=e[a++])&&(~J(i,n)||i.push(n));return i}(t,tt)},nt=u?Object.defineProperties:function(t,e){o(t);for(var n,r=et(e),a=r.length,i=0;idocument.F=Object<\/script>"),t.close(),ct=t.F;n--;)delete ct[ot][tt[n]];return ct()},st=Object.create||function(t,e){var n;return null!==t?(H[ot]=o(t),n=new H,H[ot]=null,n[it]=t):n=ct(),void 0===e?n:nt(n,e)},lt=m.f,ut=l("toStringTag"),ft={};b(ft,l("iterator"),function(){return this});function dt(t){return Object(C(t))}function pt(){return this}var gt=V("IE_PROTO"),ht=Object.prototype,yt=Object.getPrototypeOf||function(t){return t=dt(t),T(t,gt)?t[gt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?ht:null},mt=l("iterator"),xt=!([].keys&&"next"in[].keys()),vt="values",bt=function(t,e,n,r,a,i,o){!function(t,e,n){t.prototype=st(ft,{next:v(1,n)}),U(t,e+" Iterator")}(n,e,r);function c(t){if(!xt&&t in g)return g[t];switch(t){case"keys":case vt:return function(){return new n(this,t)}}return function(){return new n(this,t)}}var s,l,u,f=e+" Iterator",d=a==vt,p=!1,g=t.prototype,h=g[mt]||g["@@iterator"]||a&&g[a],y=h||c(a),m=a?d?c("entries"):y:void 0,x="Array"==e&&g.entries||h;if(x&&(u=yt(x.call(new t)))!==Object.prototype&&u.next&&(U(u,f,!0),"function"!=typeof u[mt]&&b(u,mt,pt)),d&&h&&h.name!==vt&&(p=!0,y=function(){return h.call(this)}),!xt&&!p&&g[mt]||b(g,mt,y),F[e]=y,F[f]=pt,a)if(s={values:d?y:c(vt),keys:i?y:c("keys"),entries:m},o)for(l in s)l in g||j(g,l,s[l]);else G(G.P+G.F*(xt||p),e,s);return s}(Array,"Array",function(t,e){this._t=L(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,_(1)):_(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");F.Arguments=F.Array,w("keys"),w("values"),w("entries");for(var At=l("iterator"),wt=l("toStringTag"),_t=F.Array,Ot={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Ct=et(Ot),Lt=0;Lt").concat(he.formatNum(i)," ").concat(i18next.t("emissions per cap",{ns:"units"}))).style("left",d3.event.pageX+30+"px").style("top",d3.event.pageY+-50+"px")}).on("mouseout",function(t){l.style("opacity",0),L();var e=d3.select(".enlarged").text();d3.select(".bar-group.".concat(i18next.t(e,{ns:"cities"}))).select("rect").classed("active",!0),d3.select("#city".concat(i18next.t(e,{ns:"cities"}))).classed("cityactive",!0)})}function w(){function t(t,e){return ue[u].colourRange[e]}function e(t,e){return"protocol"===u?i18next.t("".concat(u).concat(e+1),{ns:"legend"}):"region"===u?"":(n=0===e?l[u].lims[e]:l[u].levels[e-1],n=ue[u].formatLevel?ue[u].formatLevel(n):n,"".concat(n,"+"));var n}var n=ue[u].xpos,r=d3.select("body").append("div").attr("class","tooltip-legend").style("opacity",0),a=g.attr("class","legendCB").selectAll(".legend").data(ue[u].colourRange),i=a.enter().append("g").attr("class","legend").attr("id",function(t,e){return"cb".concat(e)});i.append("rect").attr("width",15).attr("height",15).attr("y",5).attr("x",function(t,e){return 51+85*e}).attr("fill",t),i.selectAll(".legend rect").on("touchmove mousemove",function(t,e){if("protocol"===u){var n=i18next.t("".concat(u).concat(e+1),{ns:"legend"});r.style("opacity",1),r.html("".concat(n,": ").concat(i18next.t("".concat(n),{ns:"protocolFullName"}))).style("left",d3.event.pageX-100+"px").style("top",d3.event.pageY-70+"px")}}).on("mouseout",function(t){r.style("opacity",0)}),i.append("text").attr("class","legendText").text(e).attr("y",18).attr("x",function(t,e){return n[e]}),a.select("rect").attr("fill",t),a.select("text").text(e).attr("x",function(t,e){return n[e]}),a.exit().remove();var o=ue[u].units,c=d3.select(".units");c.text(o),"HDD"===u||"CDD"===u||"low_bua_pc_2014"===u||"high_bua_pc_2014"===u?d3.select(".units").classed("unitsactive",!0):d3.select(".units").classed("unitsactive",!1);var s=d3.select("body").append("div").attr("class","tooltip-units").style("opacity",0);c.on("touchmove mousemove",function(){ue[u].unitdef&&(s.style("opacity",1),s.html("".concat(i18next.t(u,{ns:"attributes"}),": ").concat(ue[u].unitdef)).style("left",d3.event.pageX-100+"px").style("top",d3.event.pageY-70+"px"))}).on("mouseout",function(t){s.style("opacity",0)})}function _(t){d3.select("#".concat(t)).text(i18next.t(t,{ns:"chartHeadings"}))}function O(e){var t=i18next.t(e,{ns:"cities"});L();var n=x.filter(function(t){return t.city===e})[0].country,r=x.filter(function(t){return t.city===e})[0].scope1,a=x.filter(function(t){return t.city===e})[0].year,i=x.filter(function(t){return t.city===e})[0].dataset,o=x.filter(function(t){return t.city===e})[0].protocol,c=i18next.t(e,{ns:"displayName"});s=[{id:1,text:"".concat(c,", ").concat(n)},{id:2,text:i18next.t("scope1Row",{ns:"cityCard"})},{id:3,text:"".concat(r," ").concat(i18next.t("scope1",{ns:"units"})," ").concat(i18next.t("defn",{ns:"units"}))},{id:4,text:i18next.t("yearRow",{ns:"cityCard"})},{id:5,text:a},{id:6,text:i18next.t("datasetRow",{ns:"cityCard"})},{id:7,text:i18next.t(i,{ns:"datasets"})},{id:8,text:i18next.t("protocolRow",{ns:"cityCard"})},{id:9,text:i18next.t(o,{ns:"protocol"})}],l[u]&&"protocol"!==u&"year"!==u&&C(u,e),m(s),d3.select(".bar-group.".concat(t)).select("rect").classed("active",!0),d3.selectAll(".bar-group:not(.".concat(t,")")).select("rect").classed("fade",!0),d3.selectAll("#city"+t).classed("cityactive",!0),d3.selectAll(".worldcity:not(#city"+t+")").classed("cityfade",!0),d3.selectAll(".worldcountry:not(#map".concat(i18next.t(n,{ns:"countries"}),")")).classed("countryfade",!0)}function C(t,e){var n,r=l[t].filter(function(t){return t.city===e})[0].value,a="N/A"===(n="string"==typeof r||r instanceof String?r:null===r?"N/A":d3.format(",")(r)?d3.format(",")(r):r)?"":i18next.t(t,{ns:"units"});s.push({id:10,text:i18next.t(t,{ns:"attributes"})},{id:11,text:"".concat(n," ").concat(a)})}function L(){d3.selectAll(".bar-group").selectAll("rect").classed("active",!1).classed("fade",!1),d3.selectAll(".cityactive").classed("cityactive",!1),d3.selectAll(".cityfade").classed("cityfade",!1),d3.selectAll(".countryfade").classed("countryfade",!1)}function T(e){var a,i=[],o=i18next.t(e,{ns:"barchartGroups"});a="Europe"===e?"".concat(o,"_").concat(e):"Southeast Asia"===e?"".concat(o,"_SEasia"):"Latin America & Caribbean"===e?"".concat(o,"_LA"):"South Asia"===e?"".concat(o,"_SA"):"N Africa & W Asia"===e?"".concat(o,"_NAWA"):o;var c=pe[a].xpos,s=pe[a].ypos,l=pe[a].arrowlength,u=pe[a].gid,f=0,d=0,p=0,g=0,h=200-g-d,y=200-f-p,m=[],n=0;x.filter(function(t){t.region===e&&t.storeOrig&&(m.push(t.storeOrig),i.push({id:n,name:"arrow"+n,path:"M 2,2 L2,11 L10,6 L2,2"}),n++)});for(var t=function(e){var t=d3.select("#barChart_".concat(o)).append("g").attr("class","barMarker").attr("id","g_".concat(u).concat(e)).attr("height",y+f+p).attr("transform","translate("+c[e]+","+s[e]+")").append("svg").attr("width",h+g+d),n=t.append("svg:defs"),r=t.append("svg:g").attr("id","markers".concat(e));n.selectAll("marker").data(i).enter().append("svg:marker").attr("id",function(t){return"marker_arrow".concat(e)}).attr("markerHeight",13).attr("markerWidth",13).attr("markerUnits","strokeWidth").attr("orient","auto").attr("refX",9.5).attr("refY",6).append("svg:path").attr("d",function(t){return t.path}),r.selectAll("path").data(i).enter().append("svg:path").attr("d",function(t,e){return"M 100, 0 V ".concat(l,", 0 ")}).attr("stroke-width",1.2).attr("marker-start",function(t){return"url(#marker_stub".concat(e,")")}).attr("marker-end",function(t){return"url(#marker_arrow".concat(e,")")}).attr("transform",function(t){return"scale(".concat(pe[a].arrowscale[0]," ").concat(pe[a].arrowscale[1],")")}).append("svg:path").attr("d",function(t){return t.path}),d3.select("#g_".concat(u).concat(e)).append("text").text(m[e]).attr("transform",function(){return"scale(".concat(pe[a].textscale[0]," ").concat(pe[a].textscale[1],")\n translate(").concat(pe[a].textposx[e]," ").concat(pe[a].textposy[e],")")})},r=0;r