chart 0.1.4.2 → 0.1.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,45 +1,147 @@
1
-
2
- if(!window['googleLT_']){window['googleLT_']=(new Date()).getTime();}if (!window['google']) {
3
- window['google'] = {};
4
- }
5
- if (!window['google']['loader']) {
6
- window['google']['loader'] = {};
7
- google.loader.ServiceBase = 'https://www.google.com/uds';
8
- google.loader.GoogleApisBase = 'https://ajax.googleapis.com/ajax';
9
- google.loader.ApiKey = 'notsupplied';
10
- google.loader.KeyVerified = true;
11
- google.loader.LoadFailure = false;
12
- google.loader.Secure = true;
13
- google.loader.GoogleLocale = 'www.google.com';
14
- google.loader.ClientLocation = null;
15
- google.loader.AdditionalParams = '';
16
- (function() {function g(a){return a in l?l[a]:l[a]=-1!=navigator.userAgent.toLowerCase().indexOf(a)}var l={};function m(a,b){var c=function(){};c.prototype=b.prototype;a.ca=b.prototype;a.prototype=new c}function n(a,b,c){var d=Array.prototype.slice.call(arguments,2)||[];return function(){return a.apply(b,d.concat(Array.prototype.slice.call(arguments)))}}function p(a){a=Error(a);a.toString=function(){return this.message};return a}
17
- function q(a,b){for(var c=a.split(/\./),d=window,e=0;e<c.length-1;e++)d[c[e]]||(d[c[e]]={}),d=d[c[e]];d[c[c.length-1]]=b}function r(a,b,c){a[b]=c}if(!t)var t=q;if(!u)var u=r;google.loader.F={};t("google.loader.callbacks",google.loader.F);var v={},w={};google.loader.eval={};t("google.loader.eval",google.loader.eval);
18
- google.load=function(a,b,c){function d(a){var b=a.split(".");if(2<b.length)throw p("Module: '"+a+"' not found!");"undefined"!=typeof b[1]&&(e=b[0],c.packages=c.packages||[],c.packages.push(b[1]))}var e=a;c=c||{};if(a instanceof Array||a&&"object"==typeof a&&"function"==typeof a.join&&"function"==typeof a.reverse)for(var f=0;f<a.length;f++)d(a[f]);else d(a);if(a=v[":"+e]){c&&!c.language&&c.locale&&(c.language=c.locale);c&&"string"==typeof c.callback&&(f=c.callback,f.match(/^[[\]A-Za-z0-9._]+$/)&&(f=
19
- window.eval(f),c.callback=f));if((f=c&&null!=c.callback)&&!a.D(b))throw p("Module: '"+e+"' must be loaded before DOM onLoad!");f?a.u(b,c)?window.setTimeout(c.callback,0):a.load(b,c):a.u(b,c)||a.load(b,c)}else throw p("Module: '"+e+"' not found!");};t("google.load",google.load);
20
- google.ba=function(a,b){b?(0==x.length&&(y(window,"load",z),!g("msie")&&!g("safari")&&!g("konqueror")&&g("mozilla")||window.opera?window.addEventListener("DOMContentLoaded",z,!1):g("msie")?document.write("<script defer onreadystatechange='google.loader.domReady()' src=//:>\x3c/script>"):(g("safari")||g("konqueror"))&&window.setTimeout(B,10)),x.push(a)):y(window,"load",a)};t("google.setOnLoadCallback",google.ba);
21
- function y(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a["on"+b];a["on"+b]=null!=d?C([c,d]):c}}function C(a){return function(){for(var b=0;b<a.length;b++)a[b]()}}var x=[];google.loader.W=function(){var a=window.event.srcElement;"complete"==a.readyState&&(a.onreadystatechange=null,a.parentNode.removeChild(a),z())};t("google.loader.domReady",google.loader.W);var D={loaded:!0,complete:!0};
22
- function B(){D[document.readyState]?z():0<x.length&&window.setTimeout(B,10)}function z(){for(var a=0;a<x.length;a++)x[a]();x.length=0}
23
- google.loader.f=function(a,b,c){if(c){var d;"script"==a?(d=document.createElement("script"),d.type="text/javascript",d.src=b):"css"==a&&(d=document.createElement("link"),d.type="text/css",d.href=b,d.rel="stylesheet");(a=document.getElementsByTagName("head")[0])||(a=document.body.parentNode.appendChild(document.createElement("head")));a.appendChild(d)}else"script"==a?document.write('<script src="'+b+'" type="text/javascript">\x3c/script>'):"css"==a&&document.write('<link href="'+b+'" type="text/css" rel="stylesheet"></link>')};
24
- t("google.loader.writeLoadTag",google.loader.f);google.loader.Z=function(a){w=a};t("google.loader.rfm",google.loader.Z);google.loader.aa=function(a){for(var b in a)"string"==typeof b&&b&&":"==b.charAt(0)&&!v[b]&&(v[b]=new E(b.substring(1),a[b]))};t("google.loader.rpl",google.loader.aa);google.loader.$=function(a){if((a=a.specs)&&a.length)for(var b=0;b<a.length;++b){var c=a[b];"string"==typeof c?v[":"+c]=new F(c):(c=new G(c.name,c.baseSpec,c.customSpecs),v[":"+c.name]=c)}};t("google.loader.rm",google.loader.$);
25
- google.loader.loaded=function(a){v[":"+a.module].o(a)};t("google.loader.loaded",google.loader.loaded);google.loader.V=function(){return"qid="+((new Date).getTime().toString(16)+Math.floor(1E7*Math.random()).toString(16))};t("google.loader.createGuidArg_",google.loader.V);q("google_exportSymbol",q);q("google_exportProperty",r);google.loader.a={};t("google.loader.themes",google.loader.a);google.loader.a.K="//www.google.com/cse/style/look/bubblegum.css";u(google.loader.a,"BUBBLEGUM",google.loader.a.K);
26
- google.loader.a.M="//www.google.com/cse/style/look/greensky.css";u(google.loader.a,"GREENSKY",google.loader.a.M);google.loader.a.L="//www.google.com/cse/style/look/espresso.css";u(google.loader.a,"ESPRESSO",google.loader.a.L);google.loader.a.O="//www.google.com/cse/style/look/shiny.css";u(google.loader.a,"SHINY",google.loader.a.O);google.loader.a.N="//www.google.com/cse/style/look/minimalist.css";u(google.loader.a,"MINIMALIST",google.loader.a.N);google.loader.a.P="//www.google.com/cse/style/look/v2/default.css";
27
- u(google.loader.a,"V2_DEFAULT",google.loader.a.P);function F(a){this.b=a;this.B=[];this.A={};this.l={};this.g={};this.s=!0;this.c=-1}
28
- F.prototype.i=function(a,b){var c="";void 0!=b&&(void 0!=b.language&&(c+="&hl="+encodeURIComponent(b.language)),void 0!=b.nocss&&(c+="&output="+encodeURIComponent("nocss="+b.nocss)),void 0!=b.nooldnames&&(c+="&nooldnames="+encodeURIComponent(b.nooldnames)),void 0!=b.packages&&(c+="&packages="+encodeURIComponent(b.packages)),null!=b.callback&&(c+="&async=2"),void 0!=b.style&&(c+="&style="+encodeURIComponent(b.style)),void 0!=b.noexp&&(c+="&noexp=true"),void 0!=b.other_params&&(c+="&"+b.other_params));
29
- if(!this.s){google[this.b]&&google[this.b].JSHash&&(c+="&sig="+encodeURIComponent(google[this.b].JSHash));var d=[],e;for(e in this.A)":"==e.charAt(0)&&d.push(e.substring(1));for(e in this.l)":"==e.charAt(0)&&this.l[e]&&d.push(e.substring(1));c+="&have="+encodeURIComponent(d.join(","))}return google.loader.ServiceBase+"/?file="+this.b+"&v="+a+google.loader.AdditionalParams+c};
30
- F.prototype.H=function(a){var b=null;a&&(b=a.packages);var c=null;if(b)if("string"==typeof b)c=[a.packages];else if(b.length)for(c=[],a=0;a<b.length;a++)"string"==typeof b[a]&&c.push(b[a].replace(/^\s*|\s*$/,"").toLowerCase());c||(c=["default"]);b=[];for(a=0;a<c.length;a++)this.A[":"+c[a]]||b.push(c[a]);return b};
31
- F.prototype.load=function(a,b){var c=this.H(b),d=b&&null!=b.callback;if(d)var e=new H(b.callback);for(var f=[],h=c.length-1;0<=h;h--){var k=c[h];d&&e.R(k);this.l[":"+k]?(c.splice(h,1),d&&this.g[":"+k].push(e)):f.push(k)}if(c.length){b&&b.packages&&(b.packages=c.sort().join(","));for(h=0;h<f.length;h++)k=f[h],this.g[":"+k]=[],d&&this.g[":"+k].push(e);if(b||null==w[":"+this.b]||null==w[":"+this.b].versions[":"+a]||google.loader.AdditionalParams||!this.s)b&&b.autoloaded||google.loader.f("script",this.i(a,
32
- b),d);else{c=w[":"+this.b];google[this.b]=google[this.b]||{};for(var A in c.properties)A&&":"==A.charAt(0)&&(google[this.b][A.substring(1)]=c.properties[A]);google.loader.f("script",google.loader.ServiceBase+c.path+c.js,d);c.css&&google.loader.f("css",google.loader.ServiceBase+c.path+c.css,d)}this.s&&(this.s=!1,this.c=(new Date).getTime(),1!=this.c%100&&(this.c=-1));for(h=0;h<f.length;h++)k=f[h],this.l[":"+k]=!0}};
33
- F.prototype.o=function(a){-1!=this.c&&(I("al_"+this.b,"jl."+((new Date).getTime()-this.c),!0),this.c=-1);this.B=this.B.concat(a.components);google.loader[this.b]||(google.loader[this.b]={});google.loader[this.b].packages=this.B.slice(0);for(var b=0;b<a.components.length;b++){this.A[":"+a.components[b]]=!0;this.l[":"+a.components[b]]=!1;var c=this.g[":"+a.components[b]];if(c){for(var d=0;d<c.length;d++)c[d].U(a.components[b]);delete this.g[":"+a.components[b]]}}};
34
- F.prototype.u=function(a,b){return 0==this.H(b).length};F.prototype.D=function(){return!0};function H(a){this.T=a;this.v={};this.C=0}H.prototype.R=function(a){this.C++;this.v[":"+a]=!0};H.prototype.U=function(a){this.v[":"+a]&&(this.v[":"+a]=!1,this.C--,0==this.C&&window.setTimeout(this.T,0))};function G(a,b,c){this.name=a;this.S=b;this.w=c;this.G=this.j=!1;this.m=[];google.loader.F[this.name]=n(this.o,this)}m(G,F);G.prototype.load=function(a,b){var c=b&&null!=b.callback;c?(this.m.push(b.callback),b.callback="google.loader.callbacks."+this.name):this.j=!0;b&&b.autoloaded||google.loader.f("script",this.i(a,b),c)};G.prototype.u=function(a,b){return b&&null!=b.callback?this.G:this.j};G.prototype.o=function(){this.G=!0;for(var a=0;a<this.m.length;a++)window.setTimeout(this.m[a],0);this.m=[]};
35
- var J=function(a,b){return a.string?encodeURIComponent(a.string)+"="+encodeURIComponent(b):a.regex?b.replace(/(^.*$)/,a.regex):""};G.prototype.i=function(a,b){return this.X(this.I(a),a,b)};
36
- G.prototype.X=function(a,b,c){var d="";a.key&&(d+="&"+J(a.key,google.loader.ApiKey));a.version&&(d+="&"+J(a.version,b));b=google.loader.Secure&&a.ssl?a.ssl:a.uri;if(null!=c)for(var e in c)a.params[e]?d+="&"+J(a.params[e],c[e]):"other_params"==e?d+="&"+c[e]:"base_domain"==e&&(b="http://"+c[e]+a.uri.substring(a.uri.indexOf("/",7)));google[this.name]={};-1==b.indexOf("?")&&d&&(d="?"+d.substring(1));return b+d};G.prototype.D=function(a){return this.I(a).deferred};
37
- G.prototype.I=function(a){if(this.w)for(var b=0;b<this.w.length;++b){var c=this.w[b];if((new RegExp(c.pattern)).test(a))return c}return this.S};function E(a,b){this.b=a;this.h=b;this.j=!1}m(E,F);E.prototype.load=function(a,b){this.j=!0;google.loader.f("script",this.i(a,b),!1)};E.prototype.u=function(){return this.j};E.prototype.o=function(){};
38
- E.prototype.i=function(a,b){if(!this.h.versions[":"+a]){if(this.h.aliases){var c=this.h.aliases[":"+a];c&&(a=c)}if(!this.h.versions[":"+a])throw p("Module: '"+this.b+"' with version '"+a+"' not found!");}return google.loader.GoogleApisBase+"/libs/"+this.b+"/"+a+"/"+this.h.versions[":"+a][b&&b.uncompressed?"uncompressed":"compressed"]};E.prototype.D=function(){return!1};var K=!1,L=[],M=(new Date).getTime(),O=function(){K||(y(window,"unload",N),K=!0)},Q=function(a,b){O();if(!(google.loader.Secure||google.loader.Options&&!1!==google.loader.Options.csi)){for(var c=0;c<a.length;c++)a[c]=encodeURIComponent(a[c].toLowerCase().replace(/[^a-z0-9_.]+/g,"_"));for(c=0;c<b.length;c++)b[c]=encodeURIComponent(b[c].toLowerCase().replace(/[^a-z0-9_.]+/g,"_"));window.setTimeout(n(P,null,"//gg.google.com/csi?s=uds&v=2&action="+a.join(",")+"&it="+b.join(",")),1E4)}},I=function(a,b,
39
- c){c?Q([a],[b]):(O(),L.push("r"+L.length+"="+encodeURIComponent(a+(b?"|"+b:""))),window.setTimeout(N,5<L.length?0:15E3))},N=function(){if(L.length){var a=google.loader.ServiceBase;0==a.indexOf("http:")&&(a=a.replace(/^http:/,"https:"));P(a+"/stats?"+L.join("&")+"&nc="+(new Date).getTime()+"_"+((new Date).getTime()-M));L.length=0}},P=function(a){var b=new Image,c=P.Y++;P.J[c]=b;b.onload=b.onerror=function(){delete P.J[c]};b.src=a;b=null};P.J={};P.Y=0;q("google.loader.recordCsiStat",Q);
40
- q("google.loader.recordStat",I);q("google.loader.createImageForLogging",P);
41
-
42
- }) ();google.loader.rm({"specs":["visualization","payments",{"name":"annotations","baseSpec":{"uri":"http://www.google.com/reviews/scripts/annotations_bootstrap.js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"country":{"string":"gl"},"callback":{"string":"callback"},"language":{"string":"hl"}}}},"language","gdata","wave","spreadsheets","search","orkut","feeds","annotations_v2","picker","identitytoolkit",{"name":"maps","baseSpec":{"uri":"http://maps.google.com/maps?file\u003dgoogleapi","ssl":"https://maps-api-ssl.google.com/maps?file\u003dgoogleapi","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"regex":"callback\u003d$1\u0026async\u003d2"},"language":{"string":"hl"}}},"customSpecs":[{"uri":"http://maps.googleapis.com/maps/api/js","ssl":"https://maps.googleapis.com/maps/api/js","version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}},"pattern":"^(3|3..*)$"}]},{"name":"friendconnect","baseSpec":{"uri":"http://www.google.com/friendconnect/script/friendconnect.js","ssl":"https://www.google.com/friendconnect/script/friendconnect.js","key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{}}},{"name":"sharing","baseSpec":{"uri":"http://www.google.com/s2/sharing/js","ssl":null,"key":{"string":"key"},"version":{"string":"v"},"deferred":false,"params":{"language":{"string":"hl"}}}},"ads",{"name":"books","baseSpec":{"uri":"http://books.google.com/books/api.js","ssl":"https://encrypted.google.com/books/api.js","key":{"string":"key"},"version":{"string":"v"},"deferred":true,"params":{"callback":{"string":"callback"},"language":{"string":"hl"}}}},"elements","earth","ima"]});
43
- google.loader.rfm({":search":{"versions":{":1":"1",":1.0":"1"},"path":"/api/search/1.0/432dd570d1a386253361f581254f9ca1/","js":"default+en.I.js","css":"default+en.css","properties":{":Version":"1.0",":NoOldNames":false,":JSHash":"432dd570d1a386253361f581254f9ca1"}},":language":{"versions":{":1":"1",":1.0":"1"},"path":"/api/language/1.0/6b1de1a1a3e9141f53c9ad23b2b4e1b3/","js":"default+en.I.js","properties":{":Version":"1.0",":JSHash":"6b1de1a1a3e9141f53c9ad23b2b4e1b3"}},":annotations":{"versions":{":1":"1",":1.0":"1"},"path":"/api/annotations/1.0/3b0f18d6e7bf8cf053640179ef6d98d1/","js":"default+en.I.js","properties":{":Version":"1.0",":JSHash":"3b0f18d6e7bf8cf053640179ef6d98d1"}},":wave":{"versions":{":1":"1",":1.0":"1"},"path":"/api/wave/1.0/3b6f7573ff78da6602dda5e09c9025bf/","js":"default.I.js","properties":{":Version":"1.0",":JSHash":"3b6f7573ff78da6602dda5e09c9025bf"}},":earth":{"versions":{":1":"1",":1.0":"1"},"path":"/api/earth/1.0/db22e5693e0a8de1f62f3536f5a8d7d3/","js":"default.I.js","properties":{":Version":"1.0",":JSHash":"db22e5693e0a8de1f62f3536f5a8d7d3"}},":feeds":{"versions":{":1":"1",":1.0":"1"},"path":"/api/feeds/1.0/482f2817cdf8982edf2e5669f9e3a627/","js":"default+en.I.js","css":"default+en.css","properties":{":Version":"1.0",":JSHash":"482f2817cdf8982edf2e5669f9e3a627"}},":picker":{"versions":{":1":"1",":1.0":"1"},"path":"/api/picker/1.0/1c635e91b9d0c082c660a42091913907/","js":"default.I.js","css":"default.css","properties":{":Version":"1.0",":JSHash":"1c635e91b9d0c082c660a42091913907"}},":ima":{"versions":{":3":"1",":3.0":"1"},"path":"/api/ima/3.0/28a914332232c9a8ac0ae8da68b1006e/","js":"default.I.js","properties":{":Version":"3.0",":JSHash":"28a914332232c9a8ac0ae8da68b1006e"}}});
44
- google.loader.rpl({":swfobject":{"versions":{":2.1":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"},":2.2":{"uncompressed":"swfobject_src.js","compressed":"swfobject.js"}},"aliases":{":2":"2.2"}},":chrome-frame":{"versions":{":1.0.0":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"},":1.0.1":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"},":1.0.2":{"uncompressed":"CFInstall.js","compressed":"CFInstall.min.js"}},"aliases":{":1":"1.0.2",":1.0":"1.0.2"}},":ext-core":{"versions":{":3.1.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"},":3.0.0":{"uncompressed":"ext-core-debug.js","compressed":"ext-core.js"}},"aliases":{":3":"3.1.0",":3.0":"3.0.0",":3.1":"3.1.0"}},":webfont":{"versions":{":1.0.12":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.13":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.14":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.15":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.10":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.11":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.27":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.28":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.29":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.23":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.24":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.25":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.26":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.21":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.22":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.3":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.4":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.5":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.6":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.9":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.16":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.17":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.0":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.18":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.1":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.19":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"},":1.0.2":{"uncompressed":"webfont_debug.js","compressed":"webfont.js"}},"aliases":{":1":"1.0.29",":1.0":"1.0.29"}},":scriptaculous":{"versions":{":1.8.3":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.9.0":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.1":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"},":1.8.2":{"uncompressed":"scriptaculous.js","compressed":"scriptaculous.js"}},"aliases":{":1":"1.9.0",":1.8":"1.8.3",":1.9":"1.9.0"}},":jqueryui":{"versions":{":1.8.17":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.16":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.15":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.14":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.4":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.13":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.5":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.12":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.6":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.11":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.7":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.10":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.8":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.9":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.6.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.0":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.5.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.1":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.8.2":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"},":1.7.3":{"uncompressed":"jquery-ui.js","compressed":"jquery-ui.min.js"}},"aliases":{":1":"1.8.17",":1.8.3":"1.8.4",":1.5":"1.5.3",":1.6":"1.6.0",":1.7":"1.7.3",":1.8":"1.8.17"}},":mootools":{"versions":{":1.3.0":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.0":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.3.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.3.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.3":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.4.2":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.4":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.2.5":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"},":1.1.1":{"uncompressed":"mootools.js","compressed":"mootools-yui-compressed.js"}},"aliases":{":1":"1.1.2",":1.1":"1.1.2",":1.2":"1.2.5",":1.3":"1.3.2",":1.4":"1.4.2",":1.11":"1.1.1"}},":yui":{"versions":{":2.8.0r4":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.9.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.8.1":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.6.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":2.7.0":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"},":3.3.0":{"uncompressed":"build/yui/yui.js","compressed":"build/yui/yui-min.js"},":2.8.2r1":{"uncompressed":"build/yuiloader/yuiloader.js","compressed":"build/yuiloader/yuiloader-min.js"}},"aliases":{":2":"2.9.0",":3":"3.3.0",":2.8.2":"2.8.2r1",":2.8.0":"2.8.0r4",":3.3":"3.3.0",":2.6":"2.6.0",":2.7":"2.7.0",":2.8":"2.8.2r1",":2.9":"2.9.0"}},":prototype":{"versions":{":1.6.1.0":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.2":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.7.0.0":{"uncompressed":"prototype.js","compressed":"prototype.js"},":1.6.0.3":{"uncompressed":"prototype.js","compressed":"prototype.js"}},"aliases":{":1":"1.7.0.0",":1.6.0":"1.6.0.3",":1.6.1":"1.6.1.0",":1.7.0":"1.7.0.0",":1.6":"1.6.1.0",":1.7":"1.7.0.0"}},":jquery":{"versions":{":1.3.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.3.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.7.0":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.5.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.7.1":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.2":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.4.4":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.2.6":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.3":{"uncompressed":"jquery.js","compressed":"jquery.min.js"},":1.6.4":{"uncompressed":"jquery.js","compressed":"jquery.min.js"}},"aliases":{":1":"1.7.1",":1.2":"1.2.6",":1.3":"1.3.2",":1.4":"1.4.4",":1.5":"1.5.2",":1.6":"1.6.4",":1.7":"1.7.1"}},":dojo":{"versions":{":1.3.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.5.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.3.2":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.2.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.6.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.5.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.7.0":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.6.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.4.3":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.7.1":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.7.2":{"uncompressed":"dojo/dojo.js.uncompressed.js","compressed":"dojo/dojo.js"},":1.2.0":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"},":1.1.1":{"uncompressed":"dojo/dojo.xd.js.uncompressed.js","compressed":"dojo/dojo.xd.js"}},"aliases":{":1":"1.6.1",":1.1":"1.1.1",":1.2":"1.2.3",":1.3":"1.3.2",":1.4":"1.4.3",":1.5":"1.5.1",":1.6":"1.6.1",":1.7":"1.7.2"}}});
45
- }
1
+ (function (){ var b="",aa="\x00",ba="\n",ca="\n//# sourceURL=",da="\n;return exports});\n//# sourceURL=",k=" ",ea=" &#160;",fa=" onreadystatechange='goog.onScriptLoad_(this, ",ga=" should not be enumerable in Object.prototype.",l='"',ha='");',ia='">\x3c/script>',ja="#",ka="$1",la="%s",q="&",ma="&#0;",na="&#101;",oa="&#39;",pa="&amp;",qa="&gt;",ra="&lt;",sa="&quot;",ta="'",ua="(^",va=")' ",wa=")([a-z])",xa=");",ya=", ",za="-",Aa="-$1",r=".",Ba="..",Ca="...",u="/",Da="/loader.js",v="0",Ea="0,(function(){",w=": ",
2
+ x="<",Fa="\x3c/script>",Ga="<br />",Ha="<br>",Ia='<script type="text/javascript" src="',Ja='<script type="text/javascript">',Ka=">",La=">\x3c/script>",Ma="?",Na="Already loaded ",Pa="American Samoa",Qa="Antigua and Barbuda",Ra="Assertion failed",Sa="BY_WHOLE",y="Bolivia",z="Bosna i Hercegovina",Ta="Botswana",Ua="British Virgin Islands",Va="Cayman Islands",Wa="Christmas Island",Xa="Expected Element but got %s: %s.",Ya="Expected array but got %s: %s.",Za="Expected boolean but got %s: %s.",$a="Expected function but got %s: %s.",
3
+ ab="Expected instanceof %s but got %s.",bb="Expected number but got %s: %s.",cb="Expected object but got %s: %s.",db="Expected string but got %s: %s.",eb="Failure",fb="Falkland Islands",B="Ghana",gb="Guin\u00e9e \u00e9quatoriale",hb="Guyane fran\u00e7aise",ib="HEAD",jb="Honduras",kb="Indonesia",lb="Itoophiyaa",mb="JavaScript",nb="Kalaallit Nunaat",ob="Kiribati",pb="Load packages + dependencies - previous: ",qb="Loading css files: ",rb="LocaleNameConstants",sb="Luxembourg",tb="Madagascar",ub="Marshall Islands",
4
+ C="Micronesia",vb="Moldova, Republica",wb="Nederlandse Antillen",xb="New Zealand",D="Nigeria",yb="Norfolk Island",zb="Northern Mariana Islands",Ab="Nouvelle-Cal\u00e9donie",E="Papua New Guinea",Bb="Paraguay",Cb="Philippines",Db="Polyn\u00e9sie fran\u00e7aise",Eb="Puerto Rico",Fb="Rep\u00fablica Dominicana",F="Rwanda",Gb="Rywvaneth Unys",Hb="R\u00e9publique centrafricaine",Ib="R\u00e9publique d\u00e9mocratique du Congo",Jb="SCRIPT",Kb="Saint Kitts and Nevis",Lb="Saint Vincent and the Grenadines",Mb=
5
+ "Saint-Pierre-et-Miquelon",Nb="Serbia and Montenegro",Ob="Seychelles",Pb="Slovensk\u00e1 republika",Qb="Solomon Islands",G="South Africa",Rb="Svalbard og Jan Mayen",Ub="Swaziland",Vb="S\u00e3o Tom\u00e9 e Pr\u00edncipe",H="S\u00e9n\u00e9gal",Wb="Tanzania",Xb="Timor Leste",I="Tokelau",Yb="Turks and Caicos Islands",J="Tuvalu",K="T\u00fcrkiye",Zb="U.S. Virgin Islands",$b="United Kingdom",ac="United States",bc="United States Minor Outlying Islands",cc="Unknown or Invalid Region",L="Vanuatu",dc="Wallis-et-Futuna",
6
+ ec="[object Array]",fc="[object Function]",gc="[object Window]",hc="\\$1",ic="\\s",jc="\\u",kc="\\x",lc="\\x08",mc="]+",M="_",nc="amp",oc="annotatedtimeline",N="array",pc="base.js",qc="boolean",O="browserchart",rc="call",sc="callback after loading ",tc="charts",P="complete",uc="corechart",vc="div",wc="document",Q="dygraph",xc="e",yc="en",zc="end loadScript: ",Ac="error",R="function",Bc="g",Cc="get",Dc="goog",Ec="goog.loadModule(",Fc='goog.loadModule(function(exports) {"use strict";',Gc='goog.retrieveAndExecModule_("',
7
+ Hc="goog_",Ic="google",Jc="google.charts.load",Kc="google.charts.load version ",Lc="gt",Mc="head",Nc="href",Oc="id",Pc="iframe",S="imagechart",Qc="javascript",Rc="link",Sc="load",Tc="load-css-",Uc="loadCSSFile: ",Vc="loadScript: ",Wc="loading css failed: ",Xc="lt",Yc="native code",Zc="none",$c="null",ad="number",bd="o",T="object",cd="onload",dd="quot",ed="rel",fd="removeAttribute",gd="script",hd="splice",id="string",jd="stylesheet",kd="text/css",ld="text/javascript",U="top",md="type",V="ui",nd="ui_base",
8
+ od="unknown",pd="unknown type name",qd="var ",rd="var _evalTest_ = 1;",sd="visualization",td="webfontloader",ud="write",vd="{cssFile}",wd="{language}",xd="{package}",yd="{prefix}",zd="{prefix}/{version}/css/{cssFile}",Ad="{prefix}/{version}/third_party/{package}",Bd="{version}",Cd="|[",Dd="})",Ed="~",Fd="\u0080",Gd="\u010cesk\u00e1 republika",Hd="\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u044c",Id="\u041a\u044b\u0440\u0433\u044b\u0437\u0441\u0442\u0430\u043d",Jd="\u043c\u043e\u043d\u0433\u043e\u043b\u044c\u0441\u043a\u0438\u0439",
9
+ Kd="\u0540\u0561\u0575\u0561\u057d\u057f\u0561\u0576\u056b \u0540\u0561\u0576\u0580\u0561\u057a\u0565\u057f\u0578\u0582\u0569\u056b\u0582\u0576",Ld="\u0627\u0641\u063a\u0627\u0646\u0633\u062a\u0627\u0646",Md="\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062a \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0645\u062a\u062d\u062f\u0629",Nd="\u0627\u0644\u0635\u062d\u0631\u0627\u0621 \u0627\u0644\u063a\u0631\u0628\u064a\u0629",Od="\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064a\u0629 \u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629",
10
+ Pd="\u0627\u0644\u0648\u0644\u0627\u064a\u0627\u062a \u0627\u0644\u0645\u062a\u062d\u062f\u0629 \u0627\u0644\u0623\u0645\u0631\u064a\u0643\u064a\u0629",Qd="\u062c\u0632\u0631 \u0627\u0644\u0642\u0645\u0631",Rd="\u067e\u0627\u06a9\u0633\u062a\u0627\u0646",W="\u092d\u093e\u0930\u0924",X="\u12a2\u1275\u12ee\u1335\u12eb",Sd="\uc870\uc120 \ubbfc\uc8fc\uc8fc\uc758 \uc778\ubbfc \uacf5\ud654\uad6d",Td="\ufffd";function Y(){return function(){}}var Z=Z||{};Z.global=this;Z.P=function(a){return void 0!==a};
11
+ Z.Aa=function(a,c,d){a=a.split(r);d=d||Z.global;a[0]in d||!d.execScript||d.execScript(qd+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&Z.P(c)?d[e]=c:d=d[e]?d[e]:d[e]={}};Z.ue=function(a,c){Z.Aa(a,c)};Z.H=!0;Z.Cd=yc;Z.ra=!0;Z.ec=!1;Z.Ob=!Z.H;Z.Ya=!1;Z.Gf=function(a){if(Z.La())throw Error("goog.provide can not be used within a goog.module.");Z.fb(a)};Z.fb=function(a,c){Z.Aa(a,c)};Z.mc=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
12
+ Z.Oa=function(a){if(!Z.h(a)||!a||-1==a.search(Z.mc))throw Error("Invalid module identifier");if(!Z.La())throw Error("Module "+a+" has been loaded incorrectly.");if(Z.j.Pa)throw Error("goog.module may only be called once per module.");Z.j.Pa=a};Z.Oa.get=Y();Z.Oa.Ge=Y();Z.j=null;Z.La=function(){return null!=Z.j};Z.Oa.xa=function(){Z.j.xa=!0};Z.Zf=function(a){if(Z.Ob)throw a=a||b,Error("Importing test-only code into non-debug environment"+(a?w+a:r));};Z.Be=Y();
13
+ Z.kb=function(){for(var a=[Ic,tc,Sc],c=Z.global,d;d=a.shift();)if(Z.Ic(c[d]))c=c[d];else return null;return c};Z.Re=function(a,c){var d=c||Z.global,e;for(e in a)d[e]=a[e]};Z.Id=function(a,c,d,e){if(Z.Wa){var f;a=a.replace(/\\/g,u);var g=Z.i;e&&typeof e!==qc||(e=e?{module:Dc}:{});for(var h=0;f=c[h];h++)g.U[f]=a,g.Ra[a]=e.module==Dc;for(e=0;c=d[e];e++)a in g.G||(g.G[a]={}),g.G[a][c]=!0}};Z.yg=!1;Z.zd=!0;Z.uf=function(a){Z.global.console&&Z.global.console.error(a)};Z.Uf=Y();Z.F=b;Z.Bf=Y();
14
+ Z.Hd=function(){throw Error("unimplemented abstract method");};Z.Jd=function(a){a.Fe=function(){if(a.vb)return a.vb;Z.H&&(Z.wb[Z.wb.length]=a);return a.vb=new a}};Z.wb=[];Z.Vb=!0;Z.cc=Z.H;Z.Sc={};Z.Wa=!1;
15
+ Z.Wa&&(Z.i={Ra:{},U:{},G:{},Hb:{},qa:{},X:{}},Z.tb=function(){var a=Z.global.document;return null!=a&&ud in a},Z.Ac=function(){if(Z.P(Z.global.Lb))Z.F=Z.global.Lb;else if(Z.tb())for(var a=Z.global.document.getElementsByTagName(Jb),c=a.length-1;0<=c;--c){var d=a[c].src,e=d.lastIndexOf(Ma),e=-1==e?d.length:e;if(d.substr(e-7,7)==pc){Z.F=d.substr(0,e-7);break}}},Z.Ha=function(a,c){(Z.global.rd||Z.od)(a,c)&&(Z.i.qa[a]=!0)},Z.Ub=!(Z.global.atob||!Z.global.document||!Z.global.document.all),Z.Gc=function(a){Z.Ha(b,
16
+ Gc+a+ha)&&(Z.i.qa[a]=!0)},Z.Sa=[],Z.Ag=function(a,c){return Z.Vb&&Z.P(Z.global.JSON)?Ec+Z.global.JSON.stringify(c+ca+a+ba)+xa:Fc+c+da+a+ba},Z.Rc=function(){var a=Z.Sa.length;if(0<a){var c=Z.Sa;Z.Sa=[];for(var d=0;d<a;d++)Z.Bb(c[d])}},Z.vf=function(a){Z.xb(a)&&Z.nc(a)&&Z.Bb(Z.F+Z.Ga(a))},Z.xb=function(a){return(a=Z.Ga(a))&&Z.i.Ra[a]?Z.F+a in Z.i.X:!1},Z.nc=function(a){if((a=Z.Ga(a))&&a in Z.i.G)for(var c in Z.i.G[a])if(!Z.Mc(c)&&!Z.xb(c))return!1;return!0},Z.Bb=function(a){if(a in Z.i.X){var c=Z.i.X[a];
17
+ delete Z.i.X[a];Z.Fc(c)}},Z.tf=Y(),Z.sf=function(a){var c=Z.j;try{Z.j={Pa:void 0,xa:!1};var d;if(Z.yb(a))d=a.call(Z.global,{});else if(Z.h(a))d=Z.Pc.call(Z.global,a);else throw Error("Invalid module definition");var e=Z.j.Pa;if(!Z.h(e)||!e)throw Error('Invalid module name "'+e+l);Z.j.xa?Z.fb(e,d):Z.cc&&Object.seal&&Object.seal(d);Z.Sc[e]=d}finally{Z.j=c}},Z.Pc=function(a){eval(a);return{}},Z.md=function(a){Z.global.document.write(Ia+a+ia)},Z.pc=function(a){var c=Z.global.document,d=c.createElement(gd);
18
+ d.type=ld;d.src=a;d.defer=!1;d.async=!1;c.head.appendChild(d)},Z.od=function(a,c){if(Z.tb()){var d=Z.global.document;if(!Z.Ya&&d.readyState==P){if(/\bdeps.js$/.test(a))return!1;throw Error('Cannot write "'+a+'" after document load');}var e=Z.Ub;void 0===c?e?(e=fa+ ++Z.zb+va,d.write(Ia+a+l+e+La)):Z.Ya?Z.pc(a):Z.md(a):d.write(Ja+c+Fa);return!0}return!1},Z.zb=0,Z.Df=function(a,c){a.readyState==P&&Z.zb==c&&Z.Rc();return!0},Z.Bg=function(a){function c(a){if(!(a in f.qa||a in f.Hb)){f.Hb[a]=!0;if(a in f.G)for(var g in f.G[a])if(!Z.Mc(g))if(g in
19
+ f.U)c(f.U[g]);else throw Error("Undefined nameToPath for "+g);a in e||(e[a]=!0,d.push(a))}}var d=[],e={},f=Z.i;c(a);for(a=0;a<d.length;a++){var g=d[a];Z.i.qa[g]=!0}var h=Z.j;Z.j=null;for(a=0;a<d.length;a++)if(g=d[a])f.Ra[g]?Z.Gc(Z.F+g):Z.Ha(Z.F+g);else throw Z.j=h,Error("Undefined script input");Z.j=h},Z.Ga=function(a){return a in Z.i.U?Z.i.U[a]:null},Z.Ac(),Z.global.td||Z.Ha(Z.F+"deps.js"));
20
+ Z.yf=function(a){a=a.split(u);for(var c=0;c<a.length;)a[c]==r?a.splice(c,1):c&&a[c]==Ba&&a[c-1]&&a[c-1]!=Ba?a.splice(--c,2):c++;return a.join(u)};Z.rf=function(a){if(Z.global.Mb)return Z.global.Mb(a);var c=new Z.global.XMLHttpRequest;c.open(Cc,a,!1);c.send();return c.responseText};Z.Vf=Y();
21
+ Z.s=function(a){var c=typeof a;if(c==T)if(a){if(a instanceof Array)return N;if(a instanceof Object)return c;var d=Object.prototype.toString.call(a);if(d==gc)return T;if(d==ec||typeof a.length==ad&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(hd))return N;if(d==fc||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(rc))return R}else return $c;else if(c==R&&"undefined"==typeof a.call)return T;return c};
22
+ Z.gf=function(a){return null===a};Z.Ic=function(a){return null!=a};Z.isArray=function(a){return Z.s(a)==N};Z.Ja=function(a){var c=Z.s(a);return c==N||c==T&&typeof a.length==ad};Z.bf=function(a){return Z.$(a)&&typeof a.getFullYear==R};Z.h=function(a){return typeof a==id};Z.Hc=function(a){return typeof a==qc};Z.Lc=function(a){return typeof a==ad};Z.yb=function(a){return Z.s(a)==R};Z.$=function(a){var c=typeof a;return c==T&&null!=a||c==R};Z.qb=function(a){return a[Z.D]||(a[Z.D]=++Z.hd)};Z.Se=function(a){return!!a[Z.D]};
23
+ Z.Zc=function(a){null!==a&&fd in a&&a.removeAttribute(Z.D);try{delete a[Z.D]}catch(c){}};Z.D="closure_uid_"+(1E9*Math.random()>>>0);Z.hd=0;Z.De=Z.qb;Z.Rf=Z.Zc;Z.uc=function(a){var c=Z.s(a);if(c==T||c==N){if(a.clone)return a.clone();var c=c==N?[]:{},d;for(d in a)c[d]=Z.uc(a[d]);return c}return a};Z.tc=function(a,c,d){return a.call.apply(a.bind,arguments)};
24
+ Z.rc=function(a,c,d){if(!a)throw Error();if(2<arguments.length){var e=Array.prototype.slice.call(arguments,2);return function(){var d=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(d,e);return a.apply(c,d)}}return function(){return a.apply(c,arguments)}};Z.bind=function(a,c,d){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(Yc)?Z.bind=Z.tc:Z.bind=Z.rc;return Z.bind.apply(null,arguments)};
25
+ Z.Wc=function(a,c){var d=Array.prototype.slice.call(arguments,1);return function(){var c=d.slice();c.push.apply(c,arguments);return a.apply(this,c)}};Z.wf=function(a,c){for(var d in c)a[d]=c[d]};Z.now=Z.ra&&Date.now||function(){return+new Date};
26
+ Z.Fc=function(a){if(Z.global.execScript)Z.global.execScript(a,mb);else if(Z.global.eval){if(null==Z.Y)if(Z.global.eval(rd),"undefined"!=typeof Z.global._evalTest_){try{delete Z.global._evalTest_}catch(e){}Z.Y=!0}else Z.Y=!1;if(Z.Y)Z.global.eval(a);else{var c=Z.global.document,d=c.createElement(Jb);d.type=ld;d.defer=!1;d.appendChild(c.createTextNode(a));c.body.appendChild(d);c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};Z.Y=null;
27
+ Z.Ce=function(a,c){function d(a){a=a.split(za);for(var c=[],d=0;d<a.length;d++)c.push(e(a[d]));return c.join(za)}function e(a){return Z.gb[a]||a}var f;f=Z.gb?Z.xc==Sa?e:d:function(a){return a};return c?a+za+f(c):f(a)};Z.Wf=function(a,c){Z.gb=a;Z.xc=c};Z.Je=function(a,c){c&&(a=a.replace(/\{\$([^}]+)}/g,function(a,e){return null!=c&&e in c?c[e]:a}));return a};Z.Ke=function(a){return a};Z.Ba=function(a,c){Z.Aa(a,c,void 0)};Z.ze=function(a,c,d){a[c]=d};
28
+ Z.Ia=function(a,c){function d(){}d.prototype=c.prototype;a.oa=c.prototype;a.prototype=new d;a.prototype.constructor=a;a.qc=function(a,d,g){for(var h=Array(arguments.length-2),m=2;m<arguments.length;m++)h[m-2]=arguments[m];return c.prototype[d].apply(a,h)}};
29
+ Z.qc=function(a,c,d){var e=arguments.callee.caller;if(Z.ec||Z.H&&!e)throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");if(e.oa){for(var f=Array(arguments.length-1),g=1;g<arguments.length;g++)f[g-1]=arguments[g];return e.oa.constructor.apply(a,f)}f=Array(arguments.length-2);for(g=2;g<arguments.length;g++)f[g-2]=arguments[g];for(var g=!1,h=a.constructor;h;h=h.oa&&h.oa.constructor)if(h.prototype[c]===
30
+ e)g=!0;else if(g)return h.prototype[c].apply(a,f);if(a[c]===e)return a.constructor.prototype[c].apply(a,f);throw Error("goog.base called from a method of one name to a method of a different name");};Z.scope=function(a){if(Z.La())throw Error("goog.scope is not supported within a goog.module.");a.call(Z.global)};
31
+ Z.u=function(a,c){var d=c.constructor,e=c.cd;d&&d!=Object.prototype.constructor||(d=function(){throw Error("cannot instantiate an interface (no constructor defined).");});d=Z.u.vc(d,a);a&&Z.Ia(d,a);delete c.constructor;delete c.cd;Z.u.$a(d.prototype,c);null!=e&&(e instanceof Function?e(d):Z.u.$a(d,e));return d};Z.u.bc=Z.H;
32
+ Z.u.vc=function(a,c){if(Z.u.bc&&Object.seal instanceof Function){if(c&&c.prototype&&c.prototype[Z.kc])return a;var d=function(){var c=a.apply(this,arguments)||this;c[Z.D]=c[Z.D];this.constructor===d&&Object.seal(c);return c};return d}return a};Z.u.Za="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
33
+ Z.u.$a=function(a,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d]);for(var e=0;e<Z.u.Za.length;e++)d=Z.u.Za[e],Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])};Z.gg=Y();Z.kc="goog_defineClass_legacy_unsealable";Z.debug={};Z.debug.Error=function(a){if(Error.captureStackTrace)Error.captureStackTrace(this,Z.debug.Error);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a))};Z.Ia(Z.debug.Error,Error);Z.debug.Error.prototype.name="CustomError";Z.hb={};Z.hb.$b={Pb:1,pd:2,Gd:3,qd:4,Bd:5,Ad:6,Fd:7,ud:8,wd:9,yd:10,xd:11,Dd:12};Z.c={};Z.c.Xa=!1;Z.c.Rb=!1;Z.c.lc={Yb:"\u00a0"};Z.c.startsWith=function(a,c){return 0==a.lastIndexOf(c,0)};Z.c.endsWith=function(a,c){var d=a.length-c.length;return 0<=d&&a.indexOf(c,d)==d};Z.c.je=function(a,c){return 0==Z.c.eb(c,a.substr(0,c.length))};Z.c.fe=function(a,c){return 0==Z.c.eb(c,a.substr(a.length-c.length,c.length))};Z.c.ge=function(a,c){return a.toLowerCase()==c.toLowerCase()};
34
+ Z.c.dd=function(a,c){for(var d=a.split(la),e=b,f=Array.prototype.slice.call(arguments,1);f.length&&1<d.length;)e+=d.shift()+f.shift();return e+d.join(la)};Z.c.le=function(a){return a.replace(/[\s\xa0]+/g,k).replace(/^\s+|\s+$/g,b)};Z.c.Ka=function(a){return/^[\s\xa0]*$/.test(a)};Z.c.df=function(a){return 0==a.length};Z.c.Jc=Z.c.Ka;Z.c.Kc=function(a){return Z.c.Ka(Z.c.Tc(a))};Z.c.cf=Z.c.Kc;Z.c.$e=function(a){return!/[^\t\n\r ]/.test(a)};Z.c.Ye=function(a){return!/[^a-zA-Z]/.test(a)};Z.c.hf=function(a){return!/[^0-9]/.test(a)};
35
+ Z.c.Ze=function(a){return!/[^a-zA-Z0-9]/.test(a)};Z.c.lf=function(a){return a==k};Z.c.mf=function(a){return 1==a.length&&a>=k&&a<=Ed||a>=Fd&&a<=Td};Z.c.eg=function(a){return a.replace(/(\r\n|\r|\n)+/g,k)};Z.c.Yd=function(a){return a.replace(/(\r\n|\r|\n)/g,ba)};Z.c.Af=function(a){return a.replace(/\xa0|\s/g,k)};Z.c.zf=function(a){return a.replace(/\xa0|[ \t]+/g,k)};Z.c.ke=function(a){return a.replace(/[\t\r\n ]+/g,k).replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,b)};
36
+ Z.c.trim=Z.ra&&String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,b)};Z.c.trimLeft=function(a){return a.replace(/^[\s\xa0]+/,b)};Z.c.trimRight=function(a){return a.replace(/[\s\xa0]+$/,b)};Z.c.eb=function(a,c){var d=String(a).toLowerCase(),e=String(c).toLowerCase();return d<e?-1:d==e?0:1};
37
+ Z.c.Db=function(a,c,d){if(a==c)return 0;if(!a)return-1;if(!c)return 1;for(var e=a.toLowerCase().match(d),f=c.toLowerCase().match(d),g=Math.min(e.length,f.length),h=0;h<g;h++){d=e[h];var m=f[h];if(d!=m)return a=parseInt(d,10),!isNaN(a)&&(c=parseInt(m,10),!isNaN(c)&&a-c)?a-c:d<m?-1:1}return e.length!=f.length?e.length-f.length:a<c?-1:1};Z.c.We=function(a,c){return Z.c.Db(a,c,/\d+|\D+/g)};Z.c.Dc=function(a,c){return Z.c.Db(a,c,/\d+|\.\d+|\D+/g)};Z.c.Cf=Z.c.Dc;Z.c.xg=function(a){return encodeURIComponent(String(a))};
38
+ Z.c.wg=function(a){return decodeURIComponent(a.replace(/\+/g,k))};Z.c.Uc=function(a,c){return a.replace(/(\r\n|\r|\n)/g,c?Ga:Ha)};Z.c.rb=function(a){if(!Z.c.Jb.test(a))return a;-1!=a.indexOf(q)&&(a=a.replace(Z.c.Kb,pa));-1!=a.indexOf(x)&&(a=a.replace(Z.c.Xb,ra));-1!=a.indexOf(Ka)&&(a=a.replace(Z.c.Sb,qa));-1!=a.indexOf(l)&&(a=a.replace(Z.c.ac,sa));-1!=a.indexOf(ta)&&(a=a.replace(Z.c.dc,oa));-1!=a.indexOf(aa)&&(a=a.replace(Z.c.Zb,ma));Z.c.Xa&&-1!=a.indexOf(xc)&&(a=a.replace(Z.c.Qb,na));return a};
39
+ Z.c.Kb=/&/g;Z.c.Xb=/</g;Z.c.Sb=/>/g;Z.c.ac=/"/g;Z.c.dc=/'/g;Z.c.Zb=/\x00/g;Z.c.Qb=/e/g;Z.c.Jb=Z.c.Xa?/[\x00&<>"'e]/:/[\x00&<>"']/;Z.c.Fb=function(a){return Z.c.contains(a,q)?!Z.c.Rb&&wc in Z.global?Z.c.Gb(a):Z.c.jd(a):a};Z.c.vg=function(a,c){return Z.c.contains(a,q)?Z.c.Gb(a,c):a};
40
+ Z.c.Gb=function(a,c){var d={"&amp;":q,"&lt;":x,"&gt;":Ka,"&quot;":l},e;e=c?c.createElement(vc):Z.global.document.createElement(vc);return a.replace(Z.c.Tb,function(a,c){var h=d[a];if(h)return h;if(c.charAt(0)==ja){var m=Number(v+c.substr(1));isNaN(m)||(h=String.fromCharCode(m))}h||(e.innerHTML=a+k,h=e.firstChild.nodeValue.slice(0,-1));return d[a]=h})};
41
+ Z.c.jd=function(a){return a.replace(/&([^;]+);/g,function(a,d){switch(d){case nc:return q;case Xc:return x;case Lc:return Ka;case dd:return l;default:if(d.charAt(0)==ja){var e=Number(v+d.substr(1));if(!isNaN(e))return String.fromCharCode(e)}return a}})};Z.c.Tb=/&([^;\s<&]+);?/g;Z.c.zg=function(a,c){return Z.c.Uc(a.replace(/ /g,ea),c)};Z.c.Ff=function(a){return a.replace(/(^|[\n ]) /g,ka+Z.c.lc.Yb)};
42
+ Z.c.fg=function(a,c){for(var d=c.length,e=0;e<d;e++){var f=1==d?c:c.charAt(e);if(a.charAt(0)==f&&a.charAt(a.length-1)==f)return a.substring(1,a.length-1)}return a};Z.c.truncate=function(a,c,d){d&&(a=Z.c.Fb(a));a.length>c&&(a=a.substring(0,c-3)+Ca);d&&(a=Z.c.rb(a));return a};
43
+ Z.c.rg=function(a,c,d,e){d&&(a=Z.c.Fb(a));if(e&&a.length>c)e>c&&(e=c),a=a.substring(0,c-e)+Ca+a.substring(a.length-e);else if(a.length>c){e=Math.floor(c/2);var f=a.length-e;a=a.substring(0,e+c%2)+Ca+a.substring(f)}d&&(a=Z.c.rb(a));return a};Z.c.Va={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":x};Z.c.ea={"'":"\\'"};
44
+ Z.c.quote=function(a){a=String(a);for(var c=[l],d=0;d<a.length;d++){var e=a.charAt(d),f=e.charCodeAt(0);c[d+1]=Z.c.Va[e]||(31<f&&127>f?e:Z.c.ib(e))}c.push(l);return c.join(b)};Z.c.ye=function(a){for(var c=[],d=0;d<a.length;d++)c[d]=Z.c.ib(a.charAt(d));return c.join(b)};
45
+ Z.c.ib=function(a){if(a in Z.c.ea)return Z.c.ea[a];if(a in Z.c.Va)return Z.c.ea[a]=Z.c.Va[a];var c=a,d=a.charCodeAt(0);if(31<d&&127>d)c=a;else{if(256>d){if(c=kc,16>d||256<d)c+=v}else c=jc,4096>d&&(c+=v);c+=d.toString(16).toUpperCase()}return Z.c.ea[a]=c};Z.c.contains=function(a,c){return-1!=a.indexOf(c)};Z.c.$d=function(a,c){return Z.c.contains(a.toLowerCase(),c.toLowerCase())};Z.c.qe=function(a,c){return a&&c?a.split(c).length-1:0};
46
+ Z.c.L=function(a,c,d){var e=a;0<=c&&c<a.length&&0<d&&(e=a.substr(0,c)+a.substr(c+d,a.length-c-d));return e};Z.c.remove=function(a,c){var d=new RegExp(Z.c.Ta(c),b);return a.replace(d,b)};Z.c.Of=function(a,c){var d=new RegExp(Z.c.Ta(c),Bc);return a.replace(d,b)};Z.c.Ta=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,hc).replace(/\x08/g,lc)};Z.c.repeat=String.prototype.repeat?function(a,c){return a.repeat(c)}:function(a,c){return Array(c+1).join(a)};
47
+ Z.c.Ef=function(a,c,d){a=Z.P(d)?a.toFixed(d):String(a);d=a.indexOf(r);-1==d&&(d=a.length);return Z.c.repeat(v,Math.max(0,c-d))+a};Z.c.Tc=function(a){return null==a?b:String(a)};Z.c.Xd=function(a){return Array.prototype.join.call(arguments,b)};Z.c.Ne=function(){return Math.floor(2147483648*Math.random()).toString(36)+Math.abs(Math.floor(2147483648*Math.random())^Z.now()).toString(36)};
48
+ Z.c.oe=function(a,c){for(var d=0,e=Z.c.trim(String(a)).split(r),f=Z.c.trim(String(c)).split(r),g=Math.max(e.length,f.length),h=0;0==d&&h<g;h++){var m=e[h]||b,n=f[h]||b,p=/(\d*)(\D*)/g,Oa=/(\d*)(\D*)/g;do{var A=p.exec(m)||[b,b,b],t=Oa.exec(n)||[b,b,b];if(0==A[0].length&&0==t[0].length)break;d=Z.c.ua(0==A[1].length?0:parseInt(A[1],10),0==t[1].length?0:parseInt(t[1],10))||Z.c.ua(0==A[2].length,0==t[2].length)||Z.c.ua(A[2],t[2])}while(0==d)}return d};Z.c.ua=function(a,c){return a<c?-1:a>c?1:0};
49
+ Z.c.Te=function(a){for(var c=0,d=0;d<a.length;++d)c=31*c+a.charCodeAt(d)>>>0;return c};Z.c.kd=2147483648*Math.random()|0;Z.c.re=function(){return Hc+Z.c.kd++};Z.c.jg=function(a){var c=Number(a);return 0==c&&Z.c.Ka(a)?NaN:c};Z.c.ef=function(a){return/^[a-z]+([A-Z][a-z]*)*$/.test(a)};Z.c.nf=function(a){return/^([A-Z][a-z]*)+$/.test(a)};Z.c.hg=function(a){return String(a).replace(/\-([a-z])/g,function(a,d){return d.toUpperCase()})};Z.c.pg=function(a){return String(a).replace(/([A-Z])/g,Aa).toLowerCase()};
50
+ Z.c.qg=function(a,c){var d=Z.h(c)?Z.c.Ta(c):ic;return a.replace(new RegExp(ua+(d?Cd+d+mc:b)+wa,Bc),function(a,c,d){return c+d.toUpperCase()})};Z.c.Zd=function(a){return String(a.charAt(0)).toUpperCase()+String(a.substr(1)).toLowerCase()};Z.c.parseInt=function(a){isFinite(a)&&(a=String(a));return Z.h(a)?/^\s*-?0x/i.test(a)?parseInt(a,16):parseInt(a,10):NaN};Z.c.cg=function(a,c,d){a=a.split(c);for(var e=[];0<d&&a.length;)e.push(a.shift()),d--;a.length&&e.push(a.join(c));return e};
51
+ Z.c.qf=function(a,c){if(c)typeof c==id&&(c=[c]);else return a;for(var d=-1,e=0;e<c.length;e++)if(c[e]!=b){var f=a.lastIndexOf(c[e]);f>d&&(d=f)}return-1==d?a:a.slice(d+1)};Z.c.we=function(a,c){var d=[],e=[];if(a==c)return 0;if(!a.length||!c.length)return Math.max(a.length,c.length);for(var f=0;f<c.length+1;f++)d[f]=f;for(f=0;f<a.length;f++){e[0]=f+1;for(var g=0;g<c.length;g++)e[g+1]=Math.min(e[g]+1,d[g+1]+1,d[g]+Number(a[f]!=c[g]));for(g=0;g<d.length;g++)d[g]=e[g]}return e[c.length]};Z.g={};Z.g.o=Z.H;Z.g.V=function(a,c){c.unshift(a);Z.debug.Error.call(this,Z.c.dd.apply(null,c));c.shift()};Z.Ia(Z.g.V,Z.debug.Error);Z.g.V.prototype.name="AssertionError";Z.g.Nb=function(a){throw a;};Z.g.ya=Z.g.Nb;Z.g.A=function(a,c,d,e){var f=Ra;if(d)var f=f+(w+d),g=e;else a&&(f+=w+a,g=c);a=new Z.g.V(b+f,g||[]);Z.g.ya(a)};Z.g.Xf=function(a){Z.g.o&&(Z.g.ya=a)};Z.g.assert=function(a,c,d){Z.g.o&&!a&&Z.g.A(b,null,c,Array.prototype.slice.call(arguments,2));return a};
52
+ Z.g.Ca=function(a,c){Z.g.o&&Z.g.ya(new Z.g.V(eb+(a?w+a:b),Array.prototype.slice.call(arguments,1)))};Z.g.Pd=function(a,c,d){Z.g.o&&!Z.Lc(a)&&Z.g.A(bb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Sd=function(a,c,d){Z.g.o&&!Z.h(a)&&Z.g.A(db,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Nd=function(a,c,d){Z.g.o&&!Z.yb(a)&&Z.g.A($a,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
53
+ Z.g.Qd=function(a,c,d){Z.g.o&&!Z.$(a)&&Z.g.A(cb,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Kd=function(a,c,d){Z.g.o&&!Z.isArray(a)&&Z.g.A(Ya,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Ld=function(a,c,d){Z.g.o&&!Z.Hc(a)&&Z.g.A(Za,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};Z.g.Md=function(a,c,d){!Z.g.o||Z.$(a)&&a.nodeType==Z.hb.$b.Pb||Z.g.A(Xa,[Z.s(a),a],c,Array.prototype.slice.call(arguments,2));return a};
54
+ Z.g.Od=function(a,c,d,e){!Z.g.o||a instanceof c||Z.g.A(ab,[Z.g.pb(c),Z.g.pb(a)],d,Array.prototype.slice.call(arguments,3));return a};Z.g.Rd=function(){for(var a in Object.prototype)Z.g.Ca(a+ga)};Z.g.pb=function(a){return a instanceof Function?a.displayName||a.name||pd:a instanceof Object?a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a):null===a?$c:typeof a};Z.f={};Z.w=Z.ra;Z.f.v=!1;Z.f.Xc=function(a){return a[a.length-1]};Z.f.pf=Z.f.Xc;Z.f.indexOf=Z.w&&(Z.f.v||Array.prototype.indexOf)?function(a,c,d){return Array.prototype.indexOf.call(a,c,d)}:function(a,c,d){d=null==d?0:0>d?Math.max(0,a.length+d):d;if(Z.h(a))return Z.h(c)&&1==c.length?a.indexOf(c,d):-1;for(;d<a.length;d++)if(d in a&&a[d]===c)return d;return-1};
55
+ Z.f.lastIndexOf=Z.w&&(Z.f.v||Array.prototype.lastIndexOf)?function(a,c,d){return Array.prototype.lastIndexOf.call(a,c,null==d?a.length-1:d)}:function(a,c,d){d=null==d?a.length-1:d;0>d&&(d=Math.max(0,a.length+d));if(Z.h(a))return Z.h(c)&&1==c.length?a.lastIndexOf(c,d):-1;for(;0<=d;d--)if(d in a&&a[d]===c)return d;return-1};
56
+ Z.f.forEach=Z.w&&(Z.f.v||Array.prototype.forEach)?function(a,c,d){Array.prototype.forEach.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)g in f&&c.call(d,f[g],g,a)};Z.f.jb=function(a,c){for(var d=Z.h(a)?a.split(b):a,e=a.length-1;0<=e;--e)e in d&&c.call(void 0,d[e],e,a)};
57
+ Z.f.filter=Z.w&&(Z.f.v||Array.prototype.filter)?function(a,c,d){return Array.prototype.filter.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=[],g=0,h=Z.h(a)?a.split(b):a,m=0;m<e;m++)if(m in h){var n=h[m];c.call(d,n,m,a)&&(f[g++]=n)}return f};Z.f.map=Z.w&&(Z.f.v||Array.prototype.map)?function(a,c,d){return Array.prototype.map.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Array(e),g=Z.h(a)?a.split(b):a,h=0;h<e;h++)h in g&&(f[h]=c.call(d,g[h],h,a));return f};
58
+ Z.f.reduce=Z.w&&(Z.f.v||Array.prototype.reduce)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduce.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.forEach(a,function(d,h){f=c.call(e,f,d,h,a)});return f};Z.f.reduceRight=Z.w&&(Z.f.v||Array.prototype.reduceRight)?function(a,c,d,e){e&&(c=Z.bind(c,e));return Array.prototype.reduceRight.call(a,c,d)}:function(a,c,d,e){var f=d;Z.f.jb(a,function(d,h){f=c.call(e,f,d,h,a)});return f};
59
+ Z.f.some=Z.w&&(Z.f.v||Array.prototype.some)?function(a,c,d){return Array.prototype.some.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return!0;return!1};Z.f.every=Z.w&&(Z.f.v||Array.prototype.every)?function(a,c,d){return Array.prototype.every.call(a,c,d)}:function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&!c.call(d,f[g],g,a))return!1;return!0};
60
+ Z.f.count=function(a,c,d){var e=0;Z.f.forEach(a,function(a,g,h){c.call(d,a,g,h)&&++e},d);return e};Z.f.find=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};Z.f.findIndex=function(a,c,d){for(var e=a.length,f=Z.h(a)?a.split(b):a,g=0;g<e;g++)if(g in f&&c.call(d,f[g],g,a))return g;return-1};Z.f.Ae=function(a,c,d){c=Z.f.Bc(a,c,d);return 0>c?null:Z.h(a)?a.charAt(c):a[c]};
61
+ Z.f.Bc=function(a,c,d){for(var e=Z.h(a)?a.split(b):a,f=a.length-1;0<=f;f--)if(f in e&&c.call(d,e[f],f,a))return f;return-1};Z.f.contains=function(a,c){return 0<=Z.f.indexOf(a,c)};Z.f.Jc=function(a){return 0==a.length};Z.f.clear=function(a){if(!Z.isArray(a))for(var c=a.length-1;0<=c;c--)delete a[c];a.length=0};Z.f.Ue=function(a,c){Z.f.contains(a,c)||a.push(c)};Z.f.ub=function(a,c,d){Z.f.splice(a,d,0,c)};Z.f.Ve=function(a,c,d){Z.Wc(Z.f.splice,a,d,0).apply(null,c)};
62
+ Z.f.insertBefore=function(a,c,d){var e;2==arguments.length||0>(e=Z.f.indexOf(a,d))?a.push(c):Z.f.ub(a,c,e)};Z.f.remove=function(a,c){var d=Z.f.indexOf(a,c),e;(e=0<=d)&&Z.f.L(a,d);return e};Z.f.Tf=function(a,c){var d=Z.f.lastIndexOf(a,c);return 0<=d?(Z.f.L(a,d),!0):!1};Z.f.L=function(a,c){return 1==Array.prototype.splice.call(a,c,1).length};Z.f.Sf=function(a,c,d){c=Z.f.findIndex(a,c,d);return 0<=c?(Z.f.L(a,c),!0):!1};
63
+ Z.f.Pf=function(a,c,d){var e=0;Z.f.jb(a,function(f,g){c.call(d,f,g,a)&&Z.f.L(a,g)&&e++});return e};Z.f.concat=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.join=function(a){return Array.prototype.concat.apply(Array.prototype,arguments)};Z.f.fd=function(a){var c=a.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=a[e];return d}return[]};Z.f.clone=Z.f.fd;
64
+ Z.f.extend=function(a,c){for(var d=1;d<arguments.length;d++){var e=arguments[d];if(Z.Ja(e)){var f=a.length||0,g=e.length||0;a.length=f+g;for(var h=0;h<g;h++)a[f+h]=e[h]}else a.push(e)}};Z.f.splice=function(a,c,d,e){return Array.prototype.splice.apply(a,Z.f.slice(arguments,1))};Z.f.slice=function(a,c,d){return 2>=arguments.length?Array.prototype.slice.call(a,c):Array.prototype.slice.call(a,c,d)};
65
+ Z.f.Qf=function(a,c,d){function e(a){return Z.$(a)?bd+Z.qb(a):(typeof a).charAt(0)+a}c=c||a;d=d||e;for(var f={},g=0,h=0;h<a.length;){var m=a[h++],n=d(m);Object.prototype.hasOwnProperty.call(f,n)||(f[n]=!0,c[g++]=m)}c.length=g};Z.f.bb=function(a,c,d){return Z.f.cb(a,d||Z.f.B,!1,c)};Z.f.Vd=function(a,c,d){return Z.f.cb(a,c,!0,void 0,d)};Z.f.cb=function(a,c,d,e,f){for(var g=0,h=a.length,m;g<h;){var n=g+h>>1,p;p=d?c.call(f,a[n],n,a):c(e,a[n]);0<p?g=n+1:(h=n,m=!p)}return m?g:~g};
66
+ Z.f.sort=function(a,c){a.sort(c||Z.f.B)};Z.f.dg=function(a,c){for(var d=Array(a.length),e=0;e<a.length;e++)d[e]={index:e,value:a[e]};var f=c||Z.f.B;Z.f.sort(d,function(a,c){return f(a.value,c.value)||a.index-c.index});for(e=0;e<a.length;e++)a[e]=d[e].value};Z.f.bd=function(a,c,d){var e=d||Z.f.B;Z.f.sort(a,function(a,d){return e(c(a),c(d))})};Z.f.ag=function(a,c,d){Z.f.bd(a,function(a){return a[c]},d)};
67
+ Z.f.kf=function(a,c,d){c=c||Z.f.B;for(var e=1;e<a.length;e++){var f=c(a[e-1],a[e]);if(0<f||0==f&&d)return!1}return!0};Z.f.xe=function(a,c,d){if(!Z.Ja(a)||!Z.Ja(c)||a.length!=c.length)return!1;var e=a.length;d=d||Z.f.yc;for(var f=0;f<e;f++)if(!d(a[f],c[f]))return!1;return!0};Z.f.me=function(a,c,d){d=d||Z.f.B;for(var e=Math.min(a.length,c.length),f=0;f<e;f++){var g=d(a[f],c[f]);if(0!=g)return g}return Z.f.B(a.length,c.length)};Z.f.B=function(a,c){return a>c?1:a<c?-1:0};
68
+ Z.f.Xe=function(a,c){return-Z.f.B(a,c)};Z.f.yc=function(a,c){return a===c};Z.f.Td=function(a,c,d){d=Z.f.bb(a,c,d);return 0>d?(Z.f.ub(a,c,-(d+1)),!0):!1};Z.f.Ud=function(a,c,d){c=Z.f.bb(a,c,d);return 0<=c?Z.f.L(a,c):!1};Z.f.Wd=function(a,c,d){for(var e={},f=0;f<a.length;f++){var g=a[f],h=c.call(d,g,f,a);Z.P(h)&&(e[h]||(e[h]=[])).push(g)}return e};Z.f.og=function(a,c,d){var e={};Z.f.forEach(a,function(f,g){e[c.call(d,f,g,a)]=f});return e};
69
+ Z.f.Hf=function(a,c,d){var e=[],f=0,g=a;d=d||1;void 0!==c&&(f=a,g=c);if(0>d*(g-f))return[];if(0<d)for(a=f;a<g;a+=d)e.push(a);else for(a=f;a>g;a+=d)e.push(a);return e};Z.f.repeat=function(a,c){for(var d=[],e=0;e<c;e++)d[e]=a;return d};Z.f.Cc=function(a){for(var c=[],d=0;d<arguments.length;d++){var e=arguments[d];if(Z.isArray(e))for(var f=0;f<e.length;f+=8192)for(var g=Z.f.Cc.apply(null,Z.f.slice(e,f,f+8192)),h=0;h<g.length;h++)c.push(g[h]);else c.push(e)}return c};
70
+ Z.f.rotate=function(a,c){a.length&&(c%=a.length,0<c?Array.prototype.unshift.apply(a,a.splice(-c,c)):0>c&&Array.prototype.push.apply(a,a.splice(0,-c)));return a};Z.f.xf=function(a,c,d){c=Array.prototype.splice.call(a,c,1);Array.prototype.splice.call(a,d,0,c[0])};
71
+ Z.f.Cg=function(a){if(!arguments.length)return[];for(var c=[],d=arguments[0].length,e=1;e<arguments.length;e++)arguments[e].length<d&&(d=arguments[e].length);for(e=0;e<d;e++){for(var f=[],g=0;g<arguments.length;g++)f.push(arguments[g][e]);c.push(f)}return c};Z.f.$f=function(a,c){for(var d=c||Math.random,e=a.length-1;0<e;e--){var f=Math.floor(d()*(e+1)),g=a[e];a[e]=a[f];a[f]=g}};Z.f.pe=function(a,c){var d=[];Z.f.forEach(c,function(c){d.push(a[c])});return d};Z.locale={};
72
+ Z.locale.J={COUNTRY:{AD:"Andorra",AE:Md,AF:Ld,AG:Qa,AI:"Anguilla",AL:"Shqip\u00ebria",AM:Kd,AN:wb,AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:Pa,AT:"\u00d6sterreich",AU:"Australia",AW:"Aruba",AX:"\u00c5land",AZ:"Az\u0259rbaycan",BA:z,BB:"Barbados",BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",BE:"Belgi\u00eb",BF:"Burkina Faso",BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",BI:"Burundi",BJ:"B\u00e9nin",BM:"Bermuda",BN:"Brunei",BO:y,BR:"Brasil",
73
+ BS:"Bahamas",BT:"\u092d\u0942\u091f\u093e\u0928",BV:"Bouvet Island",BW:Ta,BY:Hd,BZ:"Belize",CA:"Canada",CC:"Cocos (Keeling) Islands",CD:Ib,CF:Hb,CG:"Congo",CH:"Schweiz",CI:"C\u00f4te d\u2019Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroun",CN:"\u4e2d\u56fd",CO:"Colombia",CR:"Costa Rica",CS:Nb,CU:"Cuba",CV:"Cabo Verde",CX:Wa,CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",CZ:Gd,DD:"East Germany",DE:"Deutschland",DJ:"Jabuuti",DK:"Danmark",DM:"Dominica",DO:Fb,DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",
74
+ EC:"Ecuador",EE:"Eesti",EG:"\u0645\u0635\u0631",EH:Nd,ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ES:"Espa\u00f1a",ET:X,FI:"Suomi",FJ:"\u092b\u093f\u091c\u0940",FK:fb,FM:C,FO:"F\u00f8royar",FR:"France",FX:"Metropolitan France",GA:"Gabon",GB:$b,GD:"Grenada",GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",GF:hb,GG:"Guernsey",GH:B,GI:"Gibraltar",GL:nb,GM:"Gambia",GN:"Guin\u00e9e",GP:"Guadeloupe",GQ:gb,GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",GS:"South Georgia and the South Sandwich Islands",
75
+ GT:"Guatemala",GU:"Guam",GW:"Guin\u00e9 Bissau",GY:"Guyana",HK:"\u9999\u6e2f",HM:"Heard Island and McDonald Islands",HN:jb,HR:"Hrvatska",HT:"Ha\u00efti",HU:"Magyarorsz\u00e1g",ID:kb,IE:"Ireland",IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",IM:"Isle of Man",IN:W,IO:"British Indian Ocean Territory",IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",IR:"\u0627\u06cc\u0631\u0627\u0646",IS:"\u00cdsland",IT:"Italia",JE:"Jersey",JM:"Jamaica",JO:"\u0627\u0644\u0623\u0631\u062f\u0646",JP:"\u65e5\u672c",KE:"Kenya",KG:Id,KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
76
+ KI:ob,KM:Qd,KN:Kb,KP:Sd,KR:"\ub300\ud55c\ubbfc\uad6d",KW:"\u0627\u0644\u0643\u0648\u064a\u062a",KY:Va,KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",LA:"\u0e25\u0e32\u0e27",LB:"\u0644\u0628\u0646\u0627\u0646",LC:"Saint Lucia",LI:"Liechtenstein",LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",LR:"Liberia",LS:"Lesotho",LT:"Lietuva",LU:sb,LV:"Latvija",LY:"\u0644\u064a\u0628\u064a\u0627",MA:"\u0627\u0644\u0645\u063a\u0631\u0628",MC:"Monaco",MD:vb,ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",
77
+ MG:tb,MH:ub,MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",ML:"\u0645\u0627\u0644\u064a",MM:"Myanmar",MN:"\u8499\u53e4",MO:"\u6fb3\u95e8",MP:zb,MQ:"Martinique",MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"M\u00e9xico",MY:"Malaysia",MZ:"Mo\u00e7ambique",NA:"Namibia",NC:Ab,NE:"Niger",NF:yb,NG:D,NI:"Nicaragua",NL:"Nederland",NO:"Norge",NP:"\u0928\u0947\u092a\u093e\u0932",NR:"Nauru",NT:"Neutral Zone",
78
+ NU:"Niue",NZ:xb,OM:"\u0639\u0645\u0627\u0646",PA:"Panam\u00e1",PE:"Per\u00fa",PF:Db,PG:E,PH:Cb,PK:Rd,PL:"Polska",PM:Mb,PN:"Pitcairn",PR:Eb,PS:"\u0641\u0644\u0633\u0637\u064a\u0646",PT:"Portugal",PW:"Palau",PY:Bb,QA:"\u0642\u0637\u0631",QO:"Outlying Oceania",QU:"European Union",RE:"R\u00e9union",RO:"Rom\u00e2nia",RS:"\u0421\u0440\u0431\u0438\u0458\u0430",RU:"\u0420\u043e\u0441\u0441\u0438\u044f",RW:F,SA:Od,SB:Qb,SC:Ob,SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",SE:"Sverige",SG:"\u65b0\u52a0\u5761",
79
+ SH:"Saint Helena",SI:"Slovenija",SJ:Rb,SK:Pb,SL:"Sierra Leone",SM:"San Marino",SN:H,SO:"Somali",SR:"Suriname",ST:Vb,SU:"Union of Soviet Socialist Republics",SV:"El Salvador",SY:"\u0633\u0648\u0631\u064a\u0627",SZ:Ub,TC:Yb,TD:"\u062a\u0634\u0627\u062f",TF:"French Southern Territories",TG:"Togo",TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",TJ:"\u062a\u0627\u062c\u06cc\u06a9\u0633\u062a\u0627\u0646",TK:I,TL:Xb,TM:"\u0422\u0443\u0440\u043a\u043c\u0435\u043d\u0438\u0441\u0442\u0430\u043d",
80
+ TN:"\u062a\u0648\u0646\u0633",TO:"Tonga",TR:K,TT:"Trinidad y Tobago",TV:J,TW:"\u53f0\u6e7e",TZ:Wb,UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",UG:"Uganda",UM:bc,US:ac,UY:"Uruguay",UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",VA:"Vaticano",VC:Lb,VE:"Venezuela",VG:Ua,VI:Zb,VN:"Vi\u1ec7t Nam",VU:L,WF:dc,WS:"Samoa",YD:"People's Democratic Republic of Yemen",YE:"\u0627\u0644\u064a\u0645\u0646",YT:"Mayotte",ZA:G,ZM:"Zambia",ZW:"Zimbabwe",ZZ:cc,aa_DJ:"Jabuuti",aa_ER:"\u00c9rythr\u00e9e",
81
+ aa_ER_SAAHO:"\u00c9rythr\u00e9e",aa_ET:lb,af_NA:"Namibi\u00eb",af_ZA:"Suid-Afrika",ak_GH:B,am_ET:X,ar_AE:Md,ar_BH:"\u0627\u0644\u0628\u062d\u0631\u064a\u0646",ar_DJ:"\u062c\u064a\u0628\u0648\u062a\u064a",ar_DZ:"\u0627\u0644\u062c\u0632\u0627\u0626\u0631",ar_EG:"\u0645\u0635\u0631",ar_EH:Nd,ar_ER:"\u0627\u0631\u064a\u062a\u0631\u064a\u0627",ar_IL:"\u0627\u0633\u0631\u0627\u0626\u064a\u0644",ar_IQ:"\u0627\u0644\u0639\u0631\u0627\u0642",ar_JO:"\u0627\u0644\u0623\u0631\u062f\u0646",ar_KM:Qd,ar_KW:"\u0627\u0644\u0643\u0648\u064a\u062a",
82
+ ar_LB:"\u0644\u0628\u0646\u0627\u0646",ar_LY:"\u0644\u064a\u0628\u064a\u0627",ar_MA:"\u0627\u0644\u0645\u063a\u0631\u0628",ar_MR:"\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627",ar_OM:"\u0639\u0645\u0627\u0646",ar_PS:"\u0641\u0644\u0633\u0637\u064a\u0646",ar_QA:"\u0642\u0637\u0631",ar_SA:Od,ar_SD:"\u0627\u0644\u0633\u0648\u062f\u0627\u0646",ar_SY:"\u0633\u0648\u0631\u064a\u0627",ar_TD:"\u062a\u0634\u0627\u062f",ar_TN:"\u062a\u0648\u0646\u0633",ar_YE:"\u0627\u0644\u064a\u0645\u0646",as_IN:"\u09ad\u09be\u09f0\u09a4",
83
+ ay_BO:y,az_AZ:"Az\u0259rbaycan",az_Cyrl_AZ:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",az_Latn_AZ:"Azerbaycan",be_BY:Hd,bg_BG:"\u0411\u044a\u043b\u0433\u0430\u0440\u0438\u044f",bi_VU:L,bn_BD:"\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6",bn_IN:"\u09ad\u09be\u09b0\u09a4",bo_CN:"\u0f62\u0f92\u0fb1\u0f0b\u0f53\u0f42",bo_IN:"\u0f62\u0f92\u0fb1\u0f0b\u0f42\u0f62\u0f0b",bs_BA:z,byn_ER:"\u12a4\u122d\u1275\u122b",ca_AD:"Andorra",ca_ES:"Espanya",cch_NG:D,ch_GU:"Guam",chk_FM:C,cop_Arab_EG:"\u0645\u0635\u0631",
84
+ cop_Arab_US:Pd,cop_EG:"\u0645\u0635\u0631",cop_US:Pd,cs_CZ:Gd,cy_GB:"Prydain Fawr",da_DK:"Danmark",da_GL:"Gr\u00f8nland",de_AT:"\u00d6sterreich",de_BE:"Belgien",de_CH:"Schweiz",de_DE:"Deutschland",de_LI:"Liechtenstein",de_LU:"Luxemburg",dv_MV:"Maldives",dz_BT:"Bhutan",ee_GH:B,ee_TG:"Togo",efi_NG:D,el_CY:"\u039a\u03cd\u03c0\u03c1\u03bf\u03c2",el_GR:"\u0395\u03bb\u03bb\u03ac\u03b4\u03b1",en_AG:Qa,en_AI:"Anguilla",en_AS:Pa,en_AU:"Australia",en_BB:"Barbados",en_BE:"Belgium",en_BM:"Bermuda",en_BS:"Bahamas",
85
+ en_BW:Ta,en_BZ:"Belize",en_CA:"Canada",en_CC:"Cocos Islands",en_CK:"Cook Islands",en_CM:"Cameroon",en_CX:Wa,en_DM:"Dominica",en_FJ:"Fiji",en_FK:fb,en_FM:C,en_GB:$b,en_GD:"Grenada",en_GG:"Guernsey",en_GH:B,en_GI:"Gibraltar",en_GM:"Gambia",en_GU:"Guam",en_GY:"Guyana",en_HK:"Hong Kong",en_HN:jb,en_IE:"Ireland",en_IM:"Isle of Man",en_IN:"India",en_JE:"Jersey",en_JM:"Jamaica",en_KE:"Kenya",en_KI:ob,en_KN:Kb,en_KY:Va,en_LC:"Saint Lucia",en_LR:"Liberia",en_LS:"Lesotho",en_MH:ub,en_MP:zb,en_MS:"Montserrat",
86
+ en_MT:"Malta",en_MU:"Mauritius",en_MW:"Malawi",en_NA:"Namibia",en_NF:yb,en_NG:D,en_NR:"Nauru",en_NU:"Niue",en_NZ:xb,en_PG:E,en_PH:Cb,en_PK:"Pakistan",en_PN:"Pitcairn",en_PR:Eb,en_RW:F,en_SB:Qb,en_SC:Ob,en_SG:"Singapore",en_SH:"Saint Helena",en_SL:"Sierra Leone",en_SZ:Ub,en_TC:Yb,en_TK:I,en_TO:"Tonga",en_TT:"Trinidad and Tobago",en_TV:J,en_TZ:Wb,en_UG:"Uganda",en_UM:bc,en_US:ac,en_US_POSIX:ac,en_VC:Lb,en_VG:Ua,en_VI:Zb,en_VU:L,en_WS:"Samoa",en_ZA:G,en_ZM:"Zambia",en_ZW:"Zimbabwe",es_AR:"Argentina",
87
+ es_BO:y,es_CL:"Chile",es_CO:"Colombia",es_CR:"Costa Rica",es_CU:"Cuba",es_DO:Fb,es_EC:"Ecuador",es_ES:"Espa\u00f1a",es_GQ:"Guinea Ecuatorial",es_GT:"Guatemala",es_HN:jb,es_MX:"M\u00e9xico",es_NI:"Nicaragua",es_PA:"Panam\u00e1",es_PE:"Per\u00fa",es_PH:"Filipinas",es_PR:Eb,es_PY:Bb,es_SV:"El Salvador",es_US:"Estados Unidos",es_UY:"Uruguay",es_VE:"Venezuela",et_EE:"Eesti",eu_ES:"Espainia",fa_AF:Ld,fa_IR:"\u0627\u06cc\u0631\u0627\u0646",fi_FI:"Suomi",fil_PH:Cb,fj_FJ:"Fiji",fo_FO:"F\u00f8royar",fr_BE:"Belgique",
88
+ fr_BF:"Burkina Faso",fr_BI:"Burundi",fr_BJ:"B\u00e9nin",fr_CA:"Canada",fr_CD:Ib,fr_CF:Hb,fr_CG:"Congo",fr_CH:"Suisse",fr_CI:"C\u00f4te d\u2019Ivoire",fr_CM:"Cameroun",fr_DJ:"Djibouti",fr_DZ:"Alg\u00e9rie",fr_FR:"France",fr_GA:"Gabon",fr_GF:hb,fr_GN:"Guin\u00e9e",fr_GP:"Guadeloupe",fr_GQ:gb,fr_HT:"Ha\u00efti",fr_KM:"Comores",fr_LU:sb,fr_MA:"Maroc",fr_MC:"Monaco",fr_MG:tb,fr_ML:"Mali",fr_MQ:"Martinique",fr_MU:"Maurice",fr_NC:Ab,fr_NE:"Niger",fr_PF:Db,fr_PM:Mb,fr_RE:"R\u00e9union",fr_RW:F,fr_SC:Ob,fr_SN:H,
89
+ fr_SY:"Syrie",fr_TD:"Tchad",fr_TG:"Togo",fr_TN:"Tunisie",fr_VU:L,fr_WF:dc,fr_YT:"Mayotte",fur_IT:"Italia",ga_IE:"\u00c9ire",gaa_GH:B,gez_ER:"\u12a4\u122d\u1275\u122b",gez_ET:X,gil_KI:ob,gl_ES:"Espa\u00f1a",gn_PY:Bb,gu_IN:"\u0aad\u0abe\u0ab0\u0aa4",gv_GB:Gb,ha_Arab_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",ha_GH:"\u063a\u0627\u0646\u0627",ha_Latn_GH:B,ha_Latn_NE:"Niger",ha_Latn_NG:"Nig\u00e9ria",ha_NE:"\u0627\u0644\u0646\u064a\u062c\u0631",ha_NG:"\u0646\u064a\u062c\u064a\u0631\u064a\u0627",haw_US:"\u02bbAmelika Hui P\u016b \u02bbIa",
90
+ he_IL:"\u05d9\u05e9\u05e8\u05d0\u05dc",hi_IN:W,ho_PG:E,hr_BA:z,hr_HR:"Hrvatska",ht_HT:"Ha\u00efti",hu_HU:"Magyarorsz\u00e1g",hy_AM:Kd,hy_AM_REVISED:Kd,id_ID:kb,ig_NG:D,ii_CN:"\ua34f\ua1e9",is_IS:"\u00cdsland",it_CH:"Svizzera",it_IT:"Italia",it_SM:"San Marino",ja_JP:"\u65e5\u672c",ka_GE:"\u10e1\u10d0\u10e5\u10d0\u10e0\u10d7\u10d5\u10d4\u10da\u10dd",kaj_NG:D,kam_KE:"Kenya",kcg_NG:D,kfo_NG:"Nig\u00e9ria",kk_KZ:"\u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d",kl_GL:nb,km_KH:"\u1780\u1798\u17d2\u1796\u17bb\u1787\u17b6",
91
+ kn_IN:"\u0cad\u0cbe\u0cb0\u0ca4",ko_KP:Sd,ko_KR:"\ub300\ud55c\ubbfc\uad6d",kok_IN:W,kos_FM:C,kpe_GN:"Guin\u00e9e",kpe_LR:"Lib\u00e9ria",ks_IN:W,ku_IQ:"Irak",ku_IR:"\u0130ran",ku_Latn_IQ:"Irak",ku_Latn_IR:"\u0130ran",ku_Latn_SY:"Suriye",ku_Latn_TR:K,ku_SY:"Suriye",ku_TR:K,kw_GB:Gb,ky_Cyrl_KG:Id,ky_KG:"K\u0131rg\u0131zistan",la_VA:"Vaticano",lb_LU:sb,ln_CD:Ib,ln_CG:"Kongo",lo_LA:"Laos",lt_LT:"Lietuva",lv_LV:"Latvija",mg_MG:tb,mh_MH:ub,mi_NZ:xb,mk_MK:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0438\u0458\u0430",
92
+ ml_IN:"\u0d07\u0d28\u0d4d\u0d24\u0d4d\u0d2f",mn_Cyrl_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mn_MN:"\u041c\u043e\u043d\u0433\u043e\u043b\u0438\u044f",mr_IN:W,ms_BN:"Brunei",ms_MY:"Malaysia",ms_SG:"Singapura",mt_MT:"Malta",my_MM:"Myanmar",na_NR:"Nauru",nb_NO:"Norge",nb_SJ:Rb,ne_NP:"\u0928\u0947\u092a\u093e\u0932",niu_NU:"Niue",nl_AN:wb,nl_AW:"Aruba",nl_BE:"Belgi\u00eb",nl_NL:"Nederland",nl_SR:"Suriname",nn_NO:"Noreg",nr_ZA:G,nso_ZA:G,ny_MW:"Malawi",om_ET:lb,om_KE:"Keeniyaa",or_IN:"\u0b2d\u0b3e\u0b30\u0b24",
93
+ pa_Arab_PK:Rd,pa_Guru_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_IN:"\u0a2d\u0a3e\u0a30\u0a24",pa_PK:Rd,pap_AN:wb,pau_PW:"Palau",pl_PL:"Polska",pon_FM:C,ps_AF:Ld,pt_AO:"Angola",pt_BR:"Brasil",pt_CV:"Cabo Verde",pt_GW:"Guin\u00e9 Bissau",pt_MZ:"Mo\u00e7ambique",pt_PT:"Portugal",pt_ST:Vb,pt_TL:Xb,qu_BO:y,qu_PE:"Per\u00fa",rm_CH:"Schweiz",rn_BI:"Burundi",ro_MD:vb,ro_RO:"Rom\u00e2nia",ru_BY:Hd,ru_KG:Id,ru_KZ:"\u041a\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043d",ru_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",ru_UA:"\u0423\u043a\u0440\u0430\u0438\u043d\u0430",
94
+ rw_RW:F,sa_IN:W,sd_Deva_IN:W,sd_IN:W,se_FI:"Finland",se_NO:"Norge",sg_CF:Hb,sh_BA:"Bosnia and Herzegovina",sh_CS:Nb,si_LK:"Sri Lanka",sid_ET:lb,sk_SK:Pb,sl_SI:"Slovenija",sm_AS:Pa,sm_WS:"Samoa",so_DJ:"Jabuuti",so_ET:"Itoobiya",so_KE:"Kiiniya",so_SO:"Soomaaliya",sq_AL:"Shqip\u00ebria",sr_BA:"\u0411\u043e\u0441\u043d\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043e\u0432\u0438\u043d\u0430",sr_CS:"\u0421\u0440\u0431\u0438\u0458\u0430 \u0438 \u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_Cyrl_BA:"\u0411\u043e\u0441\u043d\u0438\u044f",
95
+ sr_Cyrl_CS:"\u0421\u0435\u0440\u0431\u0438\u044f \u0438 \u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_ME:"\u0427\u0435\u0440\u043d\u043e\u0433\u043e\u0440\u0438\u044f",sr_Cyrl_RS:"\u0421\u0435\u0440\u0431\u0438\u044f",sr_Latn_BA:z,sr_Latn_CS:"Srbija i Crna Gora",sr_Latn_ME:"Crna Gora",sr_Latn_RS:"Srbija",sr_ME:"\u0426\u0440\u043d\u0430 \u0413\u043e\u0440\u0430",sr_RS:"\u0421\u0440\u0431\u0438\u0458\u0430",ss_SZ:Ub,ss_ZA:G,st_LS:"Lesotho",st_ZA:G,su_ID:kb,sv_AX:"\u00c5land",
96
+ sv_FI:"Finland",sv_SE:"Sverige",sw_KE:"Kenya",sw_TZ:Wb,sw_UG:"Uganda",swb_KM:Qd,syr_SY:"Syria",ta_IN:"\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe",ta_LK:"\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8",ta_SG:"\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd",te_IN:"\u0c2d\u0c3e\u0c30\u0c24 \u0c26\u0c47\u0c33\u0c02",tet_TL:Xb,tg_Cyrl_TJ:"\u0422\u0430\u0434\u0436\u0438\u043a\u0438\u0441\u0442\u0430\u043d",tg_TJ:"\u062a\u0627\u062c\u06a9\u0633\u062a\u0627\u0646",th_TH:"\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22",
97
+ ti_ER:"\u12a4\u122d\u1275\u122b",ti_ET:X,tig_ER:"\u12a4\u122d\u1275\u122b",tk_TM:"\u062a\u0631\u06a9\u0645\u0646\u0633\u062a\u0627\u0646",tkl_TK:I,tn_BW:Ta,tn_ZA:G,to_TO:"Tonga",tpi_PG:E,tr_CY:"G\u00fcney K\u0131br\u0131s Rum Kesimi",tr_TR:K,ts_ZA:G,tt_RU:"\u0420\u043e\u0441\u0441\u0438\u044f",tvl_TV:J,ty_PF:Db,uk_UA:"\u0423\u043a\u0440\u0430\u0457\u043d\u0430",uli_FM:C,und_ZZ:cc,ur_IN:"\u0628\u06be\u0627\u0631\u062a",ur_PK:Rd,uz_AF:"Afganistan",uz_Arab_AF:Ld,uz_Cyrl_UZ:"\u0423\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u0430\u043d",
98
+ uz_Latn_UZ:"O\u02bfzbekiston",uz_UZ:"\u040e\u0437\u0431\u0435\u043a\u0438\u0441\u0442\u043e\u043d",ve_ZA:G,vi_VN:"Vi\u1ec7t Nam",wal_ET:X,wo_Arab_SN:"\u0627\u0644\u0633\u0646\u063a\u0627\u0644",wo_Latn_SN:H,wo_SN:H,xh_ZA:G,yap_FM:C,yo_NG:D,zh_CN:"\u4e2d\u56fd",zh_HK:"\u9999\u6e2f",zh_Hans_CN:"\u4e2d\u56fd",zh_Hans_SG:"\u65b0\u52a0\u5761",zh_Hant_HK:"\u4e2d\u83ef\u4eba\u6c11\u5171\u548c\u570b\u9999\u6e2f\u7279\u5225\u884c\u653f\u5340",zh_Hant_MO:"\u6fb3\u9580",zh_Hant_TW:"\u81fa\u7063",zh_MO:"\u6fb3\u95e8",
99
+ zh_SG:"\u65b0\u52a0\u5761",zh_TW:"\u53f0\u6e7e",zu_ZA:G},LANGUAGE:{aa:"afar",ab:"\u0430\u0431\u0445\u0430\u0437\u0441\u043a\u0438\u0439",ace:"Aceh",ach:"Acoli",ada:"Adangme",ady:"\u0430\u0434\u044b\u0433\u0435\u0439\u0441\u043a\u0438\u0439",ae:"Avestan",af:"Afrikaans",afa:"Afro-Asiatic Language",afh:"Afrihili",ain:"Ainu",ak:"Akan",akk:"Akkadian",ale:"Aleut",alg:"Algonquian Language",alt:"Southern Altai",am:"\u12a0\u121b\u122d\u129b",an:"Aragonese",ang:"Old English",anp:"Angika",apa:"Apache Language",
100
+ ar:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",arc:"Aramaic",arn:"Araucanian",arp:"Arapaho",art:"Artificial Language",arw:"Arawak",as:"\u0985\u09b8\u09ae\u09c0\u09af\u09bc\u09be",ast:"asturiano",ath:"Athapascan Language",aus:"Australian Language",av:"\u0430\u0432\u0430\u0440\u0441\u043a\u0438\u0439",awa:"Awadhi",ay:"aimara",az:"az\u0259rbaycanca",az_Arab:"\u062a\u0631\u06a9\u06cc \u0622\u0630\u0631\u0628\u0627\u06cc\u062c\u0627\u0646\u06cc",az_Cyrl:"\u0410\u0437\u04d9\u0440\u0431\u0430\u0458\u04b9\u0430\u043d",
101
+ az_Latn:"Azerice",ba:"\u0431\u0430\u0448\u043a\u0438\u0440\u0441\u043a\u0438\u0439",bad:"Banda",bai:"Bamileke Language",bal:"\u0628\u0644\u0648\u0686\u06cc",ban:"Balin",bas:"Basa",bat:"Baltic Language",be:"\u0431\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",bej:"Beja",bem:"Bemba",ber:"Berber",bg:"\u0431\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",bh:"\u092c\u093f\u0939\u093e\u0930\u0940",bho:"Bhojpuri",bi:"bichelamar ; bislama",bik:"Bikol",bin:"Bini",bla:"Siksika",bm:"bambara",bn:"\u09ac\u09be\u0982\u09b2\u09be",
102
+ bnt:"Bantu",bo:"\u0f54\u0f7c\u0f51\u0f0b\u0f66\u0f90\u0f51\u0f0b",br:"breton",bra:"Braj",bs:"Bosanski",btk:"Batak",bua:"Buriat",bug:"Bugis",byn:"\u1265\u120a\u1295",ca:"catal\u00e0",cad:"Caddo",cai:"Central American Indian Language",car:"Carib",cau:"Caucasian Language",cch:"Atsam",ce:"\u0447\u0435\u0447\u0435\u043d\u0441\u043a\u0438\u0439",ceb:"Cebuano",cel:"Celtic Language",ch:"Chamorro",chb:"Chibcha",chg:"Chagatai",chk:"Chuukese",chm:"\u043c\u0430\u0440\u0438\u0439\u0441\u043a\u0438\u0439 (\u0447\u0435\u0440\u0435\u043c\u0438\u0441\u0441\u043a\u0438\u0439)",
103
+ chn:"Chinook Jargon",cho:"Choctaw",chp:"Chipewyan",chr:"Cherokee",chy:"Cheyenne",cmc:"Chamic Language",co:"corse",cop:"\u0642\u0628\u0637\u064a\u0629",cop_Arab:"\u0642\u0628\u0637\u064a\u0629",cpe:"English-based Creole or Pidgin",cpf:"French-based Creole or Pidgin",cpp:"Portuguese-based Creole or Pidgin",cr:"Cree",crh:"Crimean Turkish",crp:"Creole or Pidgin",cs:"\u010de\u0161tina",csb:"Kashubian",cu:"Church Slavic",cus:"Cushitic Language",cv:"\u0447\u0443\u0432\u0430\u0448\u0441\u043a\u0438\u0439",
104
+ cy:"Cymraeg",da:"dansk",dak:"Dakota",dar:"\u0434\u0430\u0440\u0433\u0432\u0430",day:"Dayak",de:"Deutsch",del:"Delaware",den:"Slave",dgr:"Dogrib",din:"Dinka",doi:"\u0627\u0644\u062f\u0648\u062c\u0631\u0649",dra:"Dravidian Language",dsb:"Lower Sorbian",dua:"Duala",dum:"Middle Dutch",dv:"Divehi",dyu:"dioula",dz:"\u0f62\u0fab\u0f7c\u0f44\u0f0b\u0f41",ee:"Ewe",efi:"Efik",egy:"Ancient Egyptian",eka:"Ekajuk",el:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",elx:"Elamite",en:"English",enm:"Middle English",
105
+ eo:"esperanto",es:"espa\u00f1ol",et:"eesti",eu:"euskara",ewo:"Ewondo",fa:"\u0641\u0627\u0631\u0633\u06cc",fan:"fang",fat:"Fanti",ff:"Fulah",fi:"suomi",fil:"Filipino",fiu:"Finno-Ugrian Language",fj:"Fijian",fo:"f\u00f8royskt",fon:"Fon",fr:"fran\u00e7ais",frm:"Middle French",fro:"Old French",frr:"Northern Frisian",frs:"Eastern Frisian",fur:"friulano",fy:"Fries",ga:"Gaeilge",gaa:"Ga",gay:"Gayo",gba:"Gbaya",gd:"Scottish Gaelic",gem:"Germanic Language",gez:"\u130d\u12d5\u12dd\u129b",gil:"Gilbertese",gl:"galego",
106
+ gmh:"Middle High German",gn:"guaran\u00ed",goh:"Old High German",gon:"Gondi",gor:"Gorontalo",got:"Gothic",grb:"Grebo",grc:"\u0391\u03c1\u03c7\u03b1\u03af\u03b1 \u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",gsw:"Schweizerdeutsch",gu:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",gv:"Gaelg",gwi:"Gwich\u02bcin",ha:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Arab:"\u0627\u0644\u0647\u0648\u0633\u0627",ha_Latn:"haoussa",hai:"Haida",haw:"\u02bb\u014dlelo Hawai\u02bbi",he:"\u05e2\u05d1\u05e8\u05d9\u05ea",
107
+ hi:"\u0939\u093f\u0902\u0926\u0940",hil:"Hiligaynon",him:"Himachali",hit:"Hittite",hmn:"Hmong",ho:"Hiri Motu",hr:"hrvatski",hsb:"Upper Sorbian",ht:"ha\u00eftien",hu:"magyar",hup:"Hupa",hy:"\u0540\u0561\u0575\u0565\u0580\u0567\u0576",hz:"Herero",ia:"interlingvao",iba:"Iban",id:"Bahasa Indonesia",ie:"Interlingue",ig:"Igbo",ii:"\ua188\ua320\ua259",ijo:"Ijo",ik:"Inupiaq",ilo:"Iloko",inc:"Indic Language",ine:"Indo-European Language",inh:"\u0438\u043d\u0433\u0443\u0448\u0441\u043a\u0438\u0439",io:"Ido",
108
+ ira:"Iranian Language",iro:"Iroquoian Language",is:"\u00edslenska",it:"italiano",iu:"Inuktitut",ja:"\u65e5\u672c\u8a9e",jbo:"Lojban",jpr:"Judeo-Persian",jrb:"Judeo-Arabic",jv:"Jawa",ka:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",kaa:"\u043a\u0430\u0440\u0430\u043a\u0430\u043b\u043f\u0430\u043a\u0441\u043a\u0438\u0439",kab:"kabyle",kac:"Kachin",kaj:"Jju",kam:"Kamba",kar:"Karen",kaw:"Kawi",kbd:"\u043a\u0430\u0431\u0430\u0440\u0434\u0438\u043d\u0441\u043a\u0438\u0439",kcg:"Tyap",kfo:"koro",kg:"Kongo",
109
+ kha:"Khasi",khi:"Khoisan Language",kho:"Khotanese",ki:"Kikuyu",kj:"Kuanyama",kk:"\u049a\u0430\u0437\u0430\u049b",kl:"kalaallisut",km:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",kmb:"quimbundo",kn:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",ko:"\ud55c\uad6d\uc5b4",kok:"\u0915\u094b\u0902\u0915\u0923\u0940",kos:"Kosraean",kpe:"kpell\u00e9",kr:"Kanuri",krc:"\u043a\u0430\u0440\u0430\u0447\u0430\u0435\u0432\u043e-\u0431\u0430\u043b\u043a\u0430\u0440\u0441\u043a\u0438\u0439",krl:"\u043a\u0430\u0440\u0435\u043b\u044c\u0441\u043a\u0438\u0439",
110
+ kro:"Kru",kru:"Kurukh",ks:"\u0915\u093e\u0936\u094d\u092e\u093f\u0930\u0940",ku:"K\u00fcrt\u00e7e",ku_Arab:"\u0627\u0644\u0643\u0631\u062f\u064a\u0629",ku_Latn:"K\u00fcrt\u00e7e",kum:"\u043a\u0443\u043c\u044b\u043a\u0441\u043a\u0438\u0439",kut:"Kutenai",kv:"Komi",kw:"kernewek",ky:"K\u0131rg\u0131zca",ky_Arab:"\u0627\u0644\u0642\u064a\u0631\u063a\u0633\u062a\u0627\u0646\u064a\u0629",ky_Cyrl:"\u043a\u0438\u0440\u0433\u0438\u0437\u0441\u043a\u0438\u0439",la:"latino",lad:"\u05dc\u05d3\u05d9\u05e0\u05d5",
111
+ lah:"\u0644\u0627\u0647\u0646\u062f\u0627",lam:"Lamba",lb:"luxembourgeois",lez:"\u043b\u0435\u0437\u0433\u0438\u043d\u0441\u043a\u0438\u0439",lg:"Ganda",li:"Limburgs",ln:"lingala",lo:"Lao",lol:"mongo",loz:"Lozi",lt:"lietuvi\u0173",lu:"luba-katanga",lua:"luba-lulua",lui:"Luiseno",lun:"Lunda",luo:"Luo",lus:"Lushai",lv:"latvie\u0161u",mad:"Madura",mag:"Magahi",mai:"Maithili",mak:"Makassar",man:"Mandingo",map:"Austronesian",mas:"Masai",mdf:"\u043c\u043e\u043a\u0448\u0430",mdr:"Mandar",men:"Mende",mg:"malgache",
112
+ mga:"Middle Irish",mh:"Marshallese",mi:"Maori",mic:"Micmac",min:"Minangkabau",mis:"Miscellaneous Language",mk:"\u043c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",mkh:"Mon-Khmer Language",ml:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",mn:Jd,mn_Cyrl:Jd,mn_Mong:Jd,mnc:"Manchu",mni:"Manipuri",mno:"Manobo Language",mo:"Moldavian",moh:"Mohawk",mos:"mor\u00e9 ; mossi",mr:"\u092e\u0930\u093e\u0920\u0940",ms:"Bahasa Melayu",mt:"Malti",mul:"Multiple Languages",mun:"Munda Language",mus:"Creek",mwl:"Mirandese",
113
+ mwr:"Marwari",my:"Burmese",myn:"Mayan Language",myv:"\u044d\u0440\u0437\u044f",na:"Nauru",nah:"Nahuatl",nai:"North American Indian Language",nap:"napoletano",nb:"norsk bokm\u00e5l",nd:"North Ndebele",nds:"Low German",ne:"\u0928\u0947\u092a\u093e\u0932\u0940","new":"Newari",ng:"Ndonga",nia:"Nias",nic:"Niger-Kordofanian Language",niu:"Niuean",nl:"Nederlands",nn:"nynorsk",no:"Norwegian",nog:"\u043d\u043e\u0433\u0430\u0439\u0441\u043a\u0438\u0439",non:"Old Norse",nqo:"N\u2019Ko",nr:"South Ndebele",nso:"Northern Sotho",
114
+ nub:"Nubian Language",nv:"Navajo",nwc:"Classical Newari",ny:"nianja; chicheua; cheua",nym:"Nyamwezi",nyn:"Nyankole",nyo:"Nyoro",nzi:"Nzima",oc:"occitan",oj:"Ojibwa",om:"Oromoo",or:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",os:"\u043e\u0441\u0435\u0442\u0438\u043d\u0441\u043a\u0438\u0439",osa:"Osage",ota:"Ottoman Turkish",oto:"Otomian Language",pa:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",pa_Arab:"\u067e\u0646\u062c\u0627\u0628",pa_Guru:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",paa:"Papuan Language",pag:"Pangasinan",
115
+ pal:"Pahlavi",pam:"Pampanga",pap:"Papiamento",pau:"Palauan",peo:"Old Persian",phi:"Philippine Language",phn:"Phoenician",pi:"\u0e1a\u0e32\u0e25\u0e35",pl:"polski",pon:"Pohnpeian",pra:"Prakrit Language",pro:"Old Proven\u00e7al",ps:"\u067e\u069a\u062a\u0648",pt:"portugu\u00eas",qu:"quechua",raj:"Rajasthani",rap:"Rapanui",rar:"Rarotongan",rm:"R\u00e4toromanisch",rn:"roundi",ro:"rom\u00e2n\u0103",roa:"Romance Language",rom:"Romany",ru:"\u0440\u0443\u0441\u0441\u043a\u0438\u0439",rup:"Aromanian",rw:"rwanda",
116
+ sa:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924 \u092d\u093e\u0937\u093e",sad:"Sandawe",sah:"\u044f\u043a\u0443\u0442\u0441\u043a\u0438\u0439",sai:"South American Indian Language",sal:"Salishan Language",sam:"\u05d0\u05e8\u05de\u05d9\u05ea \u05e9\u05d5\u05de\u05e8\u05d5\u05e0\u05d9\u05ea",sas:"Sasak",sat:"Santali",sc:"Sardinian",scn:"siciliano",sco:"Scots",sd:"\u0938\u093f\u0928\u094d\u0927\u0940",sd_Arab:"\u0633\u0646\u062f\u06cc",sd_Deva:"\u0938\u093f\u0928\u094d\u0927\u0940",se:"nordsamiska",sel:"\u0441\u0435\u043b\u044c\u043a\u0443\u043f\u0441\u043a\u0438\u0439",
117
+ sem:"Semitic Language",sg:"sangho",sga:"Old Irish",sgn:"Sign Language",sh:"Serbo-Croatian",shn:"Shan",si:"Sinhalese",sid:"Sidamo",sio:"Siouan Language",sit:"Sino-Tibetan Language",sk:"slovensk\u00fd",sl:"sloven\u0161\u010dina",sla:"Slavic Language",sm:"Samoan",sma:"sydsamiska",smi:"Sami Language",smj:"lulesamiska",smn:"Inari Sami",sms:"Skolt Sami",sn:"Shona",snk:"sonink\u00e9",so:"Soomaali",sog:"Sogdien",son:"Songhai",sq:"shqipe",sr:"\u0421\u0440\u043f\u0441\u043a\u0438",sr_Cyrl:"\u0441\u0435\u0440\u0431\u0441\u043a\u0438\u0439",
118
+ sr_Latn:"Srpski",srn:"Sranantongo",srr:"s\u00e9r\u00e8re",ss:"Swati",ssa:"Nilo-Saharan Language",st:"Sesotho",su:"Sundan",suk:"Sukuma",sus:"soussou",sux:"Sumerian",sv:"svenska",sw:"Kiswahili",syc:"Classical Syriac",syr:"Syriac",ta:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",tai:"Tai Language",te:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",tem:"Timne",ter:"Tereno",tet:"t\u00e9tum",tg:"\u062a\u0627\u062c\u06a9",tg_Arab:"\u062a\u0627\u062c\u06a9",tg_Cyrl:"\u0442\u0430\u0434\u0436\u0438\u043a\u0441\u043a\u0438\u0439",
119
+ th:"\u0e44\u0e17\u0e22",ti:"\u1275\u130d\u122d\u129b",tig:"\u1275\u130d\u1228",tiv:"Tiv",tk:"\u062a\u0631\u06a9\u0645\u0646\u06cc",tkl:I,tl:"Tagalog",tlh:"Klingon",tli:"Tlingit",tmh:"tamacheq",tn:"Tswana",to:"Tonga",tog:"Nyasa Tonga",tpi:"Tok Pisin",tr:"T\u00fcrk\u00e7e",ts:"Tsonga",tsi:"Tsimshian",tt:"\u0442\u0430\u0442\u0430\u0440\u0441\u043a\u0438\u0439",tum:"Tumbuka",tup:"Tupi Language",tut:"\u0430\u043b\u0442\u0430\u0439\u0441\u043a\u0438\u0435 (\u0434\u0440\u0443\u0433\u0438\u0435)",tvl:J,tw:"Twi",
120
+ ty:"tahitien",tyv:"\u0442\u0443\u0432\u0438\u043d\u0441\u043a\u0438\u0439",udm:"\u0443\u0434\u043c\u0443\u0440\u0442\u0441\u043a\u0438\u0439",ug:"\u0443\u0439\u0433\u0443\u0440\u0441\u043a\u0438\u0439",uga:"Ugaritic",uk:"\u0443\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",umb:"umbundu",und:"English",ur:"\u0627\u0631\u062f\u0648",uz:"\u040e\u0437\u0431\u0435\u043a",uz_Arab:"\u0627\u06c9\u0632\u0628\u06d0\u06a9",uz_Cyrl:"\u0443\u0437\u0431\u0435\u043a\u0441\u043a\u0438\u0439",uz_Latn:"o'zbekcha",
121
+ vai:"Vai",ve:"Venda",vi:"Ti\u1ebfng Vi\u1ec7t",vo:"volapuko",vot:"Votic",wa:"Wallonisch",wak:"Wakashan Language",wal:"Walamo",war:"Waray",was:"Washo",wen:"Sorbian Language",wo:"wolof",wo_Arab:"\u0627\u0644\u0648\u0644\u0648\u0641",wo_Latn:"wolof",xal:"\u043a\u0430\u043b\u043c\u044b\u0446\u043a\u0438\u0439",xh:"Xhosa",yao:"iao",yap:"Yapese",yi:"\u05d9\u05d9\u05d3\u05d9\u05e9",yo:"Yoruba",ypk:"Yupik Language",za:"Zhuang",zap:"Zapotec",zen:"Zenaga",zh:"\u4e2d\u6587",zh_Hans:"\u4e2d\u6587",zh_Hant:"\u4e2d\u6587",
122
+ znd:"Zande",zu:"Zulu",zun:"Zuni",zxx:"No linguistic content",zza:"Zaza"}};Z.locale.Yf=function(a){a=a.replace(/-/g,M);Z.locale.N=a};Z.locale.Fa=function(){Z.locale.N||(Z.locale.N=yc);return Z.locale.N};Z.locale.I={vd:"DateTimeConstants",Ed:"NumberFormatConstants",gc:"TimeZoneConstants",Wb:rb,hc:"TimeZoneSelectedIds",jc:"TimeZoneSelectedShortNames",ic:"TimeZoneSelectedLongNames",fc:"TimeZoneAllLongNames"};Z.locale.Ea=function(a){return(a=a.match(/^\w{2,3}([-_]|$)/))?a[0].replace(/[_-]/g,b):b};
123
+ Z.locale.mb=function(a){return(a=a.match(/[-_]([a-zA-Z]{2}|\d{3})([-_]|$)/))?a[0].replace(/[_-]/g,b):b};Z.locale.Pe=function(a){a=a.split(/[-_]/g);return 1<a.length&&a[1].match(/^[a-zA-Z]{4}$/)?a[1]:b};Z.locale.Qe=function(a){return(a=a.match(/[-_]([a-z]{2,})/))?a[1]:b};Z.locale.Le=function(a){var c=Z.locale.Ea(a)+M+Z.locale.mb(a);return c in Z.locale.J.COUNTRY?Z.locale.J.COUNTRY[c]:a};Z.locale.He=function(a,c){c||(c=Z.locale.ob());var d=Z.locale.mb(a);return d in c.COUNTRY?c.COUNTRY[d]:a};
124
+ Z.locale.Me=function(a){if(a in Z.locale.J.LANGUAGE)return Z.locale.J.LANGUAGE[a];var c=Z.locale.Ea(a);return c in Z.locale.J.LANGUAGE?Z.locale.J.LANGUAGE[c]:a};Z.locale.Ie=function(a,c){c||(c=Z.locale.ob());if(a in c.LANGUAGE)return c.LANGUAGE[a];var d=Z.locale.Ea(a);return d in c.LANGUAGE?c.LANGUAGE[d]:a};Z.locale.K=function(a,c,d){Z.locale.l[c]||(Z.locale.l[c]={});Z.locale.l[c][d]=a;Z.locale.N||(Z.locale.N=d)};Z.locale.jf=function(a,c){return a in Z.locale.l&&c in Z.locale.l[a]};Z.locale.l={};
125
+ Z.locale.Kf=function(a,c){Z.locale.K(a,Z.locale.I.gc,c)};Z.locale.If=function(a,c){Z.locale.K(a,Z.locale.I.Wb,c)};Z.locale.Lf=function(a,c){Z.locale.K(a,Z.locale.I.hc,c)};Z.locale.Nf=function(a,c){Z.locale.K(a,Z.locale.I.jc,c)};Z.locale.Mf=function(a,c){Z.locale.K(a,Z.locale.I.ic,c)};Z.locale.Jf=function(a,c){Z.locale.K(a,Z.locale.I.fc,c)};Z.locale.ob=function(){var a=Z.locale.Fa(),a=a?a:Z.locale.Fa();return rb in Z.locale.l?Z.locale.l.LocaleNameConstants[a]:void 0};
126
+ Z.locale.Oe=function(a,c){var d=c?c:Z.locale.Fa();if(a in Z.locale.l){if(d in Z.locale.l[a])return Z.locale.l[a][d];d=d.split(M);return 1<d.length&&d[0]in Z.locale.l[a]?Z.locale.l[a][d[0]]:Z.locale.l[a].en}};var google={a:{}};google.a.b={};
127
+ google.a.b.languages={af:!0,am:!0,az:!0,ar:!0,arb:"ar",bg:!0,bn:!0,ca:!0,cs:!0,cmn:"zh",da:!0,de:!0,el:!0,en:!0,en_gb:!0,es:!0,es_419:!0,et:!0,eu:!0,fa:!0,fi:!0,fil:!0,fr:!0,fr_ca:!0,gl:!0,ka:!0,gu:!0,he:"iw",hi:!0,hr:!0,hu:!0,hy:!0,id:!0,"in":Oc,is:!0,it:!0,iw:!0,ja:!0,ji:"yi",jv:!1,jw:"jv",km:!0,kn:!0,ko:!0,lo:!0,lt:!0,lv:!0,ml:!0,mn:!0,mo:"ro",mr:!0,ms:!0,nb:"no",ne:!0,nl:!0,no:!0,pl:!0,pt:"pt_br",pt_br:!0,pt_pt:!0,ro:!0,ru:!0,si:!0,sk:!0,sl:!0,sr:!0,sv:!0,sw:!0,swh:"sw",ta:!0,te:!0,th:!0,tl:"fil",
128
+ tr:!0,uk:!0,ur:!0,vi:!0,yi:!1,zh:"zh_cn",zh_cn:!0,zh_hk:!0,zh_tw:!0,zsm:"ms",zu:!0};google.a.b.S={};google.a.b.T=od;google.a.b.log=Y();google.a.b.error=Y();google.a.b.Z=!1;google.a.b.O=window;google.a.b.ld={current:"44",upcoming:"44",41:U,42:U,43:U,44:U};google.a.b.Ua={gstatic:{prefix:"https://www.gstatic.com/charts",debug:"{prefix}/debug/{version}/jsapi_debug_{package}_module.js",compiled:"{prefix}/{version}/js/jsapi_compiled_{package}_module.js",i18n:"{prefix}/{version}/i18n/jsapi_compiled_i18n_{package}_module__{language}.js",css:zd,css_debug:zd,third_party:Ad,third_party_gen:Ad}};
129
+ google.a.b.m=google.a.b.Ua.gstatic;
130
+ google.a.b.zc={"default":[],format:[],ui:["format","default"],ui_base:["format","default"],annotatedtimeline:[V],annotationchart:[V,"controls",uc,"table"],areachart:[V,O],bar:[V,Q,td],barchart:[V,O],browserchart:[V],calendar:[V],charteditor:[V,uc,S,oc,"gauge","motionchart","orgchart","table"],charteditor_base:[nd,uc,S,oc,"gauge","motionchart","orgchart","table_base"],columnchart:[V,O],controls:[V],controls_base:[nd],corechart:[V],gantt:[V,Q],gauge:[V],geochart:[V],geomap:[V],geomap_base:[nd],helloworld:[V],
131
+ imageareachart:[V,S],imagebarchart:[V,S],imagelinechart:[V,S],imagechart:[V],imagepiechart:[V,S],imagesparkline:[V,S],intensitymap:[V],line:[V,Q,td],linechart:[V,O],map:[V],motionchart:[V],orgchart:[V],overtimecharts:[V,uc],piechart:[V,O],sankey:["d3","d3.sankey",V],scatter:[V,Q,td],scatterchart:[V,O],table:[V],table_base:[nd],timeline:[V,Q],treemap:[V],wordtree:[V]};google.a.b.ed={d3:"d3/d3.js","d3.sankey":"d3/d3.sankey.js",webfontloader:"webfontloader/webfont.js"};google.a.b.Eb={dygraph:"dygraphs/dygraph-tickers-combined.js"};
132
+ google.a.b.wc={annotatedtimeline:"/annotatedtimeline/annotatedtimeline.css",annotationchart:"annotationchart/annotationchart.css",charteditor:"charteditor/charteditor.css",charteditor_base:"charteditor/charteditor_base.css",controls:"controls/controls.css",imagesparkline:"imagesparkline/imagesparkline.css",intensitymap:"intensitymap/intensitymap.css",orgchart:"orgchart/orgchart.css",table:"table/table.css",table_base:"table/table_base.css",ui:["util/util.css","core/tooltip.css"],ui_base:"util/util_base.css"};
133
+ google.a.b.va=function(a,c){for(var d=c||{},e=[],f=0;f<a.length;f++){var g=a[f];if(!d[g]){d[g]=!0;var h=google.a.b.zc[g]||[];0<h.length&&(e=e.concat(google.a.b.va(h,d)));e.push(g)}}return e};google.a.b.Ec=function(a){for(var c={},d=[],e=0;e<a.length;e++){var f=google.a.b.wc[a[e]];Z.isArray(f)||(f=[f]);for(var g=0;g<f.length;g++){var h=f[g];h&&!c[h]&&(c[h]=!0,d.push(h))}}return d};
134
+ google.a.b.$c=function(a,c){if(c)if("undefined"===typeof a.onload){var d=!1;a.onreadystatechange=function(){d||(a.readyState&&a.readyState!==P?google.a.b.O.setTimeout(a.onreadystatechange,0):(d=!0,delete a.onreadystatechange,google.a.b.O.setTimeout(c,0)))}}else a.onload=c};
135
+ google.a.b.Ab=function(a,c,d){google.a.b.log(Vc+a);var e=c.createElement(gd);e.type=ld;e.language=Qc;e.async=!1;e.defer=!1;c=c.body||c.head||c.getElementsByTagName(ib).item(0)||c.documentElement;c.insertBefore(e,c.lastChild);d&&google.a.b.$c(e,d);e.src=a;google.a.b.log(zc+a)};
136
+ google.a.b.Qc=function(a,c){function d(c){var e=google.a.b.sb,f=a[c++];if(f){var g=f,h=google.a.b.ed[f];h?(g=h,f===td&&(e=window.document),f=google.a.b.m.third_party):google.a.b.Eb[f]?(g=google.a.b.Eb[f],f=google.a.b.m.third_party_gen):f=google.a.b.Z?n:t?Oa:p;g=f.replace(yd,m).replace(Bd,A).replace(wd,t).replace(xd,g);google.a.b.Ab(g,e);d(c)}}function e(){for(var d=[],e=0;e<a.length;e++)d.push(Sb[a[e]]);eval(Ea+d.join(b)+Dd)();google.a.b.O.setTimeout(c,0)}a=google.a.b.va(a);for(var f=[],g=0;g<a.length;g++){var h=
137
+ a[g];google.a.b.S[h]||f.push(h)}a=f;google.a.b.log(pb+a);var m=google.a.b.m.prefix,n=google.a.b.m.debug,p=google.a.b.m.compiled,Oa=google.a.b.m.i18n,A=google.a.b.T,t=google.a.b.Ma;t===yc&&(t=null);var Sb={},Tb=a.length;google.a.b.Vc=function(a,c){google.a.b.log(sc+a);Sb[a]=c;google.a.b.S[a]=!0;Tb--;0===Tb&&e()};d(0)};
138
+ google.a.b.W=function(a){function c(){g=!0;for(var a=e.length,c=0;c<a;c++)e[c]()}function d(){h=!0;for(var a=f.length,c=0;c<a;c++)f[c]()}var e=[],f=[],g=!1,h=!1;google.a.b.W.count||(google.a.b.W.count=0);var m=Tc+google.a.b.W.count++,n={done:function(a){e.push(a);g&&a();return n},Ca:function(a){f.push(a);h&&a();return n}},p=document.createElement(Rc);p.setAttribute(Oc,m);p.setAttribute(ed,jd);p.setAttribute(md,kd);"undefined"!==typeof p.addEventListener?(p.addEventListener(Sc,c,!1),p.addEventListener(Ac,
139
+ d,!1)):"undefined"!==typeof p.attachEvent&&p.attachEvent(cd,function(){var a,e=document.styleSheets.length;try{for(;e--;)if(a=document.styleSheets[e],a.id===m){c();return}}catch(f){}g||d()});document.getElementsByTagName(Mc)[0].appendChild(p);p.setAttribute(Nc,a);return n};google.a.b.Nc=function(a,c){google.a.b.log(Uc+a);google.a.b.W(a).done(c).Ca(function(){google.a.b.error(Wc+a)})};
140
+ google.a.b.Oc=function(a,c){a=google.a.b.va(a);var d=google.a.b.Ec(a);if(null===d||0===d.length)c();else{google.a.b.log(qb+d.join(ya));var e=google.a.b.m.prefix,f=google.a.b.m.css;google.a.b.Z&&(f=google.a.b.m.css_debug||f);var g=google.a.b.T,h=function(a){var n=d[a],p;p=a<d.length-1?function(){h(a+1)}:c;google.a.b.S[n]?(google.a.b.log(Na+n),google.a.b.O.setTimeout(p,0)):(google.a.b.S[n]=!0,n=f.replace(yd,e).replace(Bd,g).replace(vd,n),google.a.b.Nc(n,p))};h(0)}};
141
+ google.a.b.Ee=function(){var a=google.a.b.C;if(!a){a=google.a.b.C=document.createElement(Pc);google.a.b.C=a;a.name=Jc;(document.body||document.head||document).appendChild(a);a.style.display=Zc;var c=google.a.b.sb=a.contentDocument?a.contentDocument:a.contentWindow?a.contentWindow.document:a.document;c.open();c.writeln(b);c.close()}return a};
142
+ google.a.b.Cb=function(a){for(var c=a.replace(/-/g,M).toLowerCase();Z.h(c);)a=c,c=google.a.b.languages[c],c===a&&(c=!1);c||(a.match(/_[^_]+$/)?(a=a.replace(/_[^_]+$/,b),a=google.a.b.Cb(a)):a=yc);return a};
143
+ google.a.b.Yc=function(a,c){c.log&&(google.a.b.log=c.log);c.error&&(google.a.b.error=c.error);var d=c.debug,e=c.language||b,e=google.a.b.Cb(e);a||(a=c.version||od);(google.a.b.T&&google.a.b.T!==a||google.a.b.Ma&&google.a.b.Ma!==e||google.a.b.Z!==d)&&google.a.b.C&&google.a.b.C.parentNode&&(google.a.b.C.parentNode.removeChild(google.a.b.C),google.a.b.C=null,google.a.b.S={});google.a.b.T=a;google.a.b.Ma=e;google.a.b.Z=d};google.a.b.R=!1;google.a.b.ma=!1;google.a.b.loaded=!1;google.a.b.Da=[];
144
+ google.a.b.load=function(a,c,d){var e;e=a.match(/^(testing\/)?(.*)/);var f=e[1]||b;for(a=e[2];;){e=google.a.b.ld[a];if(null==e||e===U)break;a=e}google.a.b.m=d||google.a.b.Ua[a]||google.a.b.Ua.gstatic;a=f+a;if(null==e)f=function(){Z.kb()(a,c,d)},google.a.b.R?google.a.b.M(f):(google.a.b.R=!0,google.a.b.Ab(google.a.b.m.prefix+u+a+Da,window.document,f));else{if(google.a.b.R)throw Error("google.charts.load() cannot be called more than once with version 44 or earlier.");google.a.b.R=!0;if(google.a.b.ma)google.a.b.M(function(){google.a.b.load(a,
145
+ c)});else{google.a.b.loaded=!1;google.a.b.ma=!0;google.a.b.Yc(a,c);google.a.b.log(Kc+a);window.google=window.google||{};google.visualization=google.visualization||{};google.visualization.ModulePath=google.a.b.m.prefix;google.a.b.C=null;google.a.b.O=window;google.a.b.sb=document;var g=function(){google.a.b.ma=!1;google.a.b.loaded=!0;google.a.b.Na()},h=c.packages;google.a.b.M(c.callback);google.a.b.Oc(h,function(){google.a.b.Qc(h,g)})}}};
146
+ google.a.b.M=function(a){a&&google.a.b.Da.push(a);google.a.b.loaded&&!google.a.b.ma&&google.a.b.Na()};google.a.b.ad=function(a){if(window.addEventListener)window.addEventListener(Sc,a,!1);else if(window.attachEvent)window.attachEvent(cd,a);else{var c=window.onload;window.onload=function(d){c&&c(d);a()}}};google.a.b.Ib=document&&document.readyState===P;google.a.b.ad(function(){google.a.b.Ib=!0;google.a.b.Na()});
147
+ google.a.b.Na=function(){if(google.a.b.R&&google.a.b.loaded&&(google.a.b.Ib||document.readyState===P))for(;0<google.a.b.Da.length;)google.a.b.Da.shift()()};google.a.b.Qa=function(a,c){google.a.b.Vc(a,c)};if(Z.kb())throw Error("Google Charts loader.js can only be loaded once.");google.a.load=function(a,c,d){a===sd&&(a=c,c=d);google.a.b.load(String(a),c||{})};google.a.M=function(a){google.a.b.M(a)};google.a.Qa=function(a,c){google.a.b.Qa(a,c)};Z.Ba(Jc,google.a.load);Z.Ba("google.charts.setOnLoadCallback",google.a.M);Z.Ba("google.charts.packageLoadedCallback",google.a.Qa); })();
@@ -1,4 +1,4 @@
1
- /* nvd3 version 1.8.2 (https://github.com/novus/nvd3) 2016-01-24 */
1
+ /* nvd3 version 1.8.3 (https://github.com/novus/nvd3) 2016-04-26 */
2
2
  (function(){
3
3
 
4
4
  // set up main nv object
@@ -13,6 +13,11 @@ nv.charts = {}; //stores all the ready to use charts
13
13
  nv.logs = {}; //stores some statistics and potential error messages
14
14
  nv.dom = {}; //DOM manipulation functions
15
15
 
16
+ // Node/CommonJS - require D3
17
+ if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined' && typeof(d3) == 'undefined') {
18
+ d3 = require('d3');
19
+ }
20
+
16
21
  nv.dispatch = d3.dispatch('render_start', 'render_end');
17
22
 
18
23
  // Function bind polyfill
@@ -157,7 +162,7 @@ if (typeof(window) !== 'undefined') {
157
162
  */
158
163
  nv.dom.write = function(callback) {
159
164
  if (window.fastdom !== undefined) {
160
- return fastdom.write(callback);
165
+ return fastdom.mutate(callback);
161
166
  }
162
167
  return callback();
163
168
  };
@@ -170,10 +175,11 @@ nv.dom.write = function(callback) {
170
175
  */
171
176
  nv.dom.read = function(callback) {
172
177
  if (window.fastdom !== undefined) {
173
- return fastdom.read(callback);
178
+ return fastdom.measure(callback);
174
179
  }
175
180
  return callback();
176
- };/* Utility class to handle creation of an interactive layer.
181
+ };
182
+ /* Utility class to handle creation of an interactive layer.
177
183
  This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
178
184
  containing the X-coordinate. It can also render a vertical line where the mouse is located.
179
185
 
@@ -258,7 +264,8 @@ nv.interactiveGuideline = function() {
258
264
  /* If mouseX/Y is outside of the chart's bounds,
259
265
  trigger a mouseOut event.
260
266
  */
261
- if (mouseX < 0 || mouseY < 0
267
+ if (d3.event.type === 'mouseout'
268
+ || mouseX < 0 || mouseY < 0
262
269
  || mouseX > availableWidth || mouseY > availableHeight
263
270
  || (d3.event.relatedTarget && d3.event.relatedTarget.ownerSVGElement === undefined)
264
271
  || mouseOutAnyReason
@@ -642,11 +649,11 @@ nv.models.tooltip = function() {
642
649
 
643
650
  var dataSeriesExists = function(d) {
644
651
  if (d && d.series) {
645
- if (d.series instanceof Array) {
646
- return !!d.series.length;
652
+ if (nv.utils.isArray(d.series)) {
653
+ return true;
647
654
  }
648
655
  // if object, it's okay just convert to array of the object
649
- if (d.series instanceof Object) {
656
+ if (nv.utils.isObject(d.series)) {
650
657
  d.series = [d.series];
651
658
  return true;
652
659
  }
@@ -754,18 +761,23 @@ nv.models.tooltip = function() {
754
761
 
755
762
  // Creates new tooltip container, or uses existing one on DOM.
756
763
  function initTooltip() {
757
- if (!tooltip) {
764
+ if (!tooltip || !tooltip.node()) {
758
765
  var container = chartContainer ? chartContainer : document.body;
759
-
760
766
  // Create new tooltip div if it doesn't exist on DOM.
761
- tooltip = d3.select(container).append("div")
762
- .attr("class", "nvtooltip " + (classes ? classes : "xy-tooltip"))
763
- .attr("id", id);
764
- tooltip.style("top", 0).style("left", 0);
765
- tooltip.style('opacity', 0);
766
- tooltip.style('position', 'fixed');
767
- tooltip.selectAll("div, table, td, tr").classed(nvPointerEventsClass, true);
768
- tooltip.classed(nvPointerEventsClass, true);
767
+
768
+ var data = [1];
769
+ tooltip = d3.select(container).selectAll('.nvtooltip').data(data);
770
+
771
+ tooltip.enter().append('div')
772
+ .attr("class", "nvtooltip " + (classes ? classes : "xy-tooltip"))
773
+ .attr("id", id)
774
+ .style("top", 0).style("left", 0)
775
+ .style('opacity', 0)
776
+ .style('position', 'fixed')
777
+ .selectAll("div, table, td, tr").classed(nvPointerEventsClass, true)
778
+ .classed(nvPointerEventsClass, true);
779
+
780
+ tooltip.exit().remove()
769
781
  }
770
782
  }
771
783
 
@@ -884,6 +896,25 @@ nv.utils.windowSize = function() {
884
896
  return (size);
885
897
  };
886
898
 
899
+
900
+ /* handle dumb browser quirks... isinstance breaks if you use frames
901
+ typeof returns 'object' for null, NaN is a number, etc.
902
+ */
903
+ nv.utils.isArray = Array.isArray;
904
+ nv.utils.isObject = function(a) {
905
+ return a !== null && typeof a === 'object';
906
+ };
907
+ nv.utils.isFunction = function(a) {
908
+ return typeof a === 'function';
909
+ };
910
+ nv.utils.isDate = function(a) {
911
+ return toString.call(a) === '[object Date]';
912
+ };
913
+ nv.utils.isNumber = function(a) {
914
+ return !isNaN(a) && typeof a === 'number';
915
+ };
916
+
917
+
887
918
  /*
888
919
  Binds callback function to run when window is resized
889
920
  */
@@ -915,8 +946,7 @@ nv.utils.getColor = function(color) {
915
946
  return nv.utils.defaultColor();
916
947
 
917
948
  //if passed an array, turn it into a color scale
918
- // use isArray, instanceof fails if d3 range is created in an iframe
919
- } else if(Array.isArray(color)) {
949
+ } else if(nv.utils.isArray(color)) {
920
950
  var color_scale = d3.scale.ordinal().range(color);
921
951
  return function(d, i) {
922
952
  var key = i === undefined ? d : i;
@@ -956,7 +986,7 @@ nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
956
986
 
957
987
  return function(series, index) {
958
988
  var key = getKey(series);
959
- if (typeof dictionary[key] === 'function') {
989
+ if (nv.utils.isFunction(dictionary[key])) {
960
990
  return dictionary[key]();
961
991
  } else if (dictionary[key] !== undefined) {
962
992
  return dictionary[key];
@@ -1010,12 +1040,10 @@ Most common instance is when the element is in a display:none; container.
1010
1040
  Forumla is : text.length * font-size * constant_factor
1011
1041
  */
1012
1042
  nv.utils.calcApproxTextWidth = function (svgTextElem) {
1013
- if (typeof svgTextElem.style === 'function'
1014
- && typeof svgTextElem.text === 'function') {
1015
-
1043
+ if (nv.utils.isFunction(svgTextElem.style) && nv.utils.isFunction(svgTextElem.text)) {
1016
1044
  var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""), 10);
1017
1045
  var textLength = svgTextElem.text().length;
1018
- return textLength * fontSize * 0.5;
1046
+ return nv.utils.NaNtoZero(textLength * fontSize * 0.5);
1019
1047
  }
1020
1048
  return 0;
1021
1049
  };
@@ -1025,7 +1053,7 @@ nv.utils.calcApproxTextWidth = function (svgTextElem) {
1025
1053
  Numbers that are undefined, null or NaN, convert them to zeros.
1026
1054
  */
1027
1055
  nv.utils.NaNtoZero = function(n) {
1028
- if (typeof n !== 'number'
1056
+ if (!nv.utils.isNumber(n)
1029
1057
  || isNaN(n)
1030
1058
  || n === null
1031
1059
  || n === Infinity
@@ -1143,9 +1171,9 @@ nv.utils.deepExtend = function(dst){
1143
1171
  var sources = arguments.length > 1 ? [].slice.call(arguments, 1) : [];
1144
1172
  sources.forEach(function(source) {
1145
1173
  for (var key in source) {
1146
- var isArray = dst[key] instanceof Array;
1147
- var isObject = typeof dst[key] === 'object';
1148
- var srcObj = typeof source[key] === 'object';
1174
+ var isArray = nv.utils.isArray(dst[key]);
1175
+ var isObject = nv.utils.isObject(dst[key]);
1176
+ var srcObj = nv.utils.isObject(source[key]);
1149
1177
 
1150
1178
  if (isObject && !isArray && srcObj) {
1151
1179
  nv.utils.deepExtend(dst[key], source[key]);
@@ -1244,7 +1272,7 @@ chart.options = nv.utils.optionsFunc.bind(chart);
1244
1272
  nv.utils.optionsFunc = function(args) {
1245
1273
  if (args) {
1246
1274
  d3.map(args).forEach((function(key,value) {
1247
- if (typeof this[key] === "function") {
1275
+ if (nv.utils.isFunction(this[key])) {
1248
1276
  this[key](value);
1249
1277
  }
1250
1278
  }).bind(this));
@@ -1522,7 +1550,7 @@ nv.utils.arrayEquals = function (array1, array2) {
1522
1550
  if (!array1 || !array2)
1523
1551
  return false;
1524
1552
 
1525
- // compare lengths - can save a lot of time
1553
+ // compare lengths - can save a lot of time
1526
1554
  if (array1.length != array2.length)
1527
1555
  return false;
1528
1556
 
@@ -1560,6 +1588,7 @@ nv.utils.arrayEquals = function (array1, array2) {
1560
1588
  , isOrdinal = false
1561
1589
  , ticks = null
1562
1590
  , axisLabelDistance = 0
1591
+ , fontSize = undefined
1563
1592
  , duration = 250
1564
1593
  , dispatch = d3.dispatch('renderEnd')
1565
1594
  ;
@@ -1607,6 +1636,11 @@ nv.utils.arrayEquals = function (array1, array2) {
1607
1636
  .data([axisLabelText || null]);
1608
1637
  axisLabel.exit().remove();
1609
1638
 
1639
+ //only skip when fontSize is undefined so it can be cleared with a null or blank string
1640
+ if (fontSize !== undefined) {
1641
+ g.selectAll('g').select("text").style('font-size', fontSize);
1642
+ }
1643
+
1610
1644
  var xLabelMargin;
1611
1645
  var axisMaxMin;
1612
1646
  var w;
@@ -1657,6 +1691,8 @@ nv.utils.arrayEquals = function (array1, array2) {
1657
1691
  var xTicks = g.selectAll('g').select("text");
1658
1692
  var rotateLabelsRule = '';
1659
1693
  if (rotateLabels%360) {
1694
+ //Reset transform on ticks so textHeight can be calculated correctly
1695
+ xTicks.attr('transform', '');
1660
1696
  //Calculate the longest xTick width
1661
1697
  xTicks.each(function(d,i){
1662
1698
  var box = this.getBoundingClientRect();
@@ -1864,9 +1900,9 @@ nv.utils.arrayEquals = function (array1, array2) {
1864
1900
  and the arithmetic trick below solves that.
1865
1901
  */
1866
1902
  return !parseFloat(Math.round(d * 100000) / 1000000) && (d !== undefined)
1867
- })
1903
+ })
1868
1904
  .classed('zero', true);
1869
-
1905
+
1870
1906
  //store old scales for use in transitions on update
1871
1907
  scale0 = scale.copy();
1872
1908
 
@@ -1896,6 +1932,7 @@ nv.utils.arrayEquals = function (array1, array2) {
1896
1932
  height: {get: function(){return height;}, set: function(_){height=_;}},
1897
1933
  ticks: {get: function(){return ticks;}, set: function(_){ticks=_;}},
1898
1934
  width: {get: function(){return width;}, set: function(_){width=_;}},
1935
+ fontSize: {get: function(){return fontSize;}, set: function(_){fontSize=_;}},
1899
1936
 
1900
1937
  // options that require extra logic in the setter
1901
1938
  margin: {get: function(){return margin;}, set: function(_){
@@ -1929,30 +1966,36 @@ nv.models.boxPlot = function() {
1929
1966
  // Public Variables with Default Settings
1930
1967
  //------------------------------------------------------------
1931
1968
 
1932
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
1933
- , width = 960
1934
- , height = 500
1935
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
1936
- , x = d3.scale.ordinal()
1937
- , y = d3.scale.linear()
1938
- , getX = function(d) { return d.x }
1939
- , getY = function(d) { return d.y }
1940
- , color = nv.utils.defaultColor()
1941
- , container = null
1942
- , xDomain
1943
- , yDomain
1944
- , xRange
1945
- , yRange
1946
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout', 'elementMousemove', 'renderEnd')
1947
- , duration = 250
1948
- , maxBoxWidth = null
1949
- ;
1969
+ var margin = {top: 0, right: 0, bottom: 0, left: 0},
1970
+ width = 960,
1971
+ height = 500,
1972
+ id = Math.floor(Math.random() * 10000), // Create semi-unique ID in case user doesn't select one
1973
+ xScale = d3.scale.ordinal(),
1974
+ yScale = d3.scale.linear(),
1975
+ getX = function(d) { return d.label }, // Default data model selectors.
1976
+ getQ1 = function(d) { return d.values.Q1 },
1977
+ getQ2 = function(d) { return d.values.Q2 },
1978
+ getQ3 = function(d) { return d.values.Q3 },
1979
+ getWl = function(d) { return d.values.whisker_low },
1980
+ getWh = function(d) { return d.values.whisker_high },
1981
+ getColor = function(d) { return d.color },
1982
+ getOlItems = function(d) { return d.values.outliers },
1983
+ getOlValue = function(d, i, j) { return d },
1984
+ getOlLabel = function(d, i, j) { return d },
1985
+ getOlColor = function(d, i, j) { return undefined },
1986
+ color = nv.utils.defaultColor(),
1987
+ container = null,
1988
+ xDomain, xRange,
1989
+ yDomain, yRange,
1990
+ dispatch = d3.dispatch('elementMouseover', 'elementMouseout', 'elementMousemove', 'renderEnd'),
1991
+ duration = 250,
1992
+ maxBoxWidth = null;
1950
1993
 
1951
1994
  //============================================================
1952
1995
  // Private Variables
1953
1996
  //------------------------------------------------------------
1954
1997
 
1955
- var x0, y0;
1998
+ var xScale0, yScale0;
1956
1999
  var renderWatch = nv.utils.renderWatch(dispatch, duration);
1957
2000
 
1958
2001
  function chart(selection) {
@@ -1965,45 +2008,38 @@ nv.models.boxPlot = function() {
1965
2008
  nv.utils.initSVG(container);
1966
2009
 
1967
2010
  // Setup Scales
1968
- x .domain(xDomain || data.map(function(d,i) { return getX(d,i); }))
1969
- .rangeBands(xRange || [0, availableWidth], .1);
2011
+ xScale.domain(xDomain || data.map(function(d,i) { return getX(d,i); }))
2012
+ .rangeBands(xRange || [0, availableWidth], 0.1);
1970
2013
 
1971
2014
  // if we know yDomain, no need to calculate
1972
2015
  var yData = []
1973
2016
  if (!yDomain) {
1974
2017
  // (y-range is based on quartiles, whiskers and outliers)
1975
-
1976
- // lower values
1977
- var yMin = d3.min(data.map(function(d) {
1978
- var min_arr = [];
1979
-
1980
- min_arr.push(d.values.Q1);
1981
- if (d.values.hasOwnProperty('whisker_low') && d.values.whisker_low !== null) { min_arr.push(d.values.whisker_low); }
1982
- if (d.values.hasOwnProperty('outliers') && d.values.outliers !== null) { min_arr = min_arr.concat(d.values.outliers); }
1983
-
1984
- return d3.min(min_arr);
1985
- }));
1986
-
1987
- // upper values
1988
- var yMax = d3.max(data.map(function(d) {
1989
- var max_arr = [];
1990
-
1991
- max_arr.push(d.values.Q3);
1992
- if (d.values.hasOwnProperty('whisker_high') && d.values.whisker_high !== null) { max_arr.push(d.values.whisker_high); }
1993
- if (d.values.hasOwnProperty('outliers') && d.values.outliers !== null) { max_arr = max_arr.concat(d.values.outliers); }
1994
-
1995
- return d3.max(max_arr);
1996
- }));
1997
-
2018
+ var values = [], yMin, yMax;
2019
+ data.forEach(function (d, i) {
2020
+ var q1 = getQ1(d), q3 = getQ3(d), wl = getWl(d), wh = getWh(d);
2021
+ var olItems = getOlItems(d);
2022
+ if (olItems) {
2023
+ olItems.forEach(function (e, i) {
2024
+ values.push(getOlValue(e, i, undefined));
2025
+ });
2026
+ }
2027
+ if (wl) { values.push(wl) }
2028
+ if (q1) { values.push(q1) }
2029
+ if (q3) { values.push(q3) }
2030
+ if (wh) { values.push(wh) }
2031
+ });
2032
+ yMin = d3.min(values);
2033
+ yMax = d3.max(values);
1998
2034
  yData = [ yMin, yMax ] ;
1999
2035
  }
2000
2036
 
2001
- y.domain(yDomain || yData);
2002
- y.range(yRange || [availableHeight, 0]);
2037
+ yScale.domain(yDomain || yData);
2038
+ yScale.range(yRange || [availableHeight, 0]);
2003
2039
 
2004
2040
  //store old scales if they exist
2005
- x0 = x0 || x;
2006
- y0 = y0 || y.copy().range([y(0),y(0)]);
2041
+ xScale0 = xScale0 || xScale;
2042
+ yScale0 = yScale0 || yScale.copy().range([yScale(0),yScale(0)]);
2007
2043
 
2008
2044
  // Setup containers and skeleton of chart
2009
2045
  var wrap = container.selectAll('g.nv-wrap').data([data]);
@@ -2014,15 +2050,15 @@ nv.models.boxPlot = function() {
2014
2050
  var boxEnter = boxplots.enter().append('g').style('stroke-opacity', 1e-6).style('fill-opacity', 1e-6);
2015
2051
  boxplots
2016
2052
  .attr('class', 'nv-boxplot')
2017
- .attr('transform', function(d,i,j) { return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05) + ', 0)'; })
2053
+ .attr('transform', function(d,i,j) { return 'translate(' + (xScale(getX(d,i)) + xScale.rangeBand() * 0.05) + ', 0)'; })
2018
2054
  .classed('hover', function(d) { return d.hover });
2019
2055
  boxplots
2020
2056
  .watchTransition(renderWatch, 'nv-boxplot: boxplots')
2021
2057
  .style('stroke-opacity', 1)
2022
- .style('fill-opacity', .75)
2058
+ .style('fill-opacity', 0.75)
2023
2059
  .delay(function(d,i) { return i * duration / data.length })
2024
2060
  .attr('transform', function(d,i) {
2025
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05) + ', 0)';
2061
+ return 'translate(' + (xScale(getX(d,i)) + xScale.rangeBand() * 0.05) + ', 0)';
2026
2062
  });
2027
2063
  boxplots.exit().remove();
2028
2064
 
@@ -2030,97 +2066,62 @@ nv.models.boxPlot = function() {
2030
2066
 
2031
2067
  // conditionally append whisker lines
2032
2068
  boxEnter.each(function(d,i) {
2033
- var box = d3.select(this);
2034
-
2035
- ['low', 'high'].forEach(function(key) {
2036
- if (d.values.hasOwnProperty('whisker_' + key) && d.values['whisker_' + key] !== null) {
2037
- box.append('line')
2038
- .style('stroke', (d.color) ? d.color : color(d,i))
2039
- .attr('class', 'nv-boxplot-whisker nv-boxplot-' + key);
2040
-
2041
- box.append('line')
2042
- .style('stroke', (d.color) ? d.color : color(d,i))
2043
- .attr('class', 'nv-boxplot-tick nv-boxplot-' + key);
2044
- }
2045
- });
2046
- });
2047
-
2048
- // outliers
2049
- // TODO: support custom colors here
2050
- var outliers = boxplots.selectAll('.nv-boxplot-outlier').data(function(d) {
2051
- if (d.values.hasOwnProperty('outliers') && d.values.outliers !== null) { return d.values.outliers; }
2052
- else { return []; }
2053
- });
2054
- outliers.enter().append('circle')
2055
- .style('fill', function(d,i,j) { return color(d,j) }).style('stroke', function(d,i,j) { return color(d,j) })
2056
- .on('mouseover', function(d,i,j) {
2057
- d3.select(this).classed('hover', true);
2058
- dispatch.elementMouseover({
2059
- series: { key: d, color: color(d,j) },
2060
- e: d3.event
2061
- });
2062
- })
2063
- .on('mouseout', function(d,i,j) {
2064
- d3.select(this).classed('hover', false);
2065
- dispatch.elementMouseout({
2066
- series: { key: d, color: color(d,j) },
2067
- e: d3.event
2068
- });
2069
- })
2070
- .on('mousemove', function(d,i) {
2071
- dispatch.elementMousemove({e: d3.event});
2069
+ var box = d3.select(this);
2070
+ [getWl, getWh].forEach(function (f) {
2071
+ if (f(d)) {
2072
+ var key = (f === getWl) ? 'low' : 'high';
2073
+ box.append('line')
2074
+ .style('stroke', getColor(d) || color(d,i))
2075
+ .attr('class', 'nv-boxplot-whisker nv-boxplot-' + key);
2076
+ box.append('line')
2077
+ .style('stroke', getColor(d) || color(d,i))
2078
+ .attr('class', 'nv-boxplot-tick nv-boxplot-' + key);
2079
+ }
2072
2080
  });
2081
+ });
2073
2082
 
2074
- outliers.attr('class', 'nv-boxplot-outlier');
2075
- outliers
2076
- .watchTransition(renderWatch, 'nv-boxplot: nv-boxplot-outlier')
2077
- .attr('cx', x.rangeBand() * .45)
2078
- .attr('cy', function(d,i,j) { return y(d); })
2079
- .attr('r', '3');
2080
- outliers.exit().remove();
2081
-
2082
- var box_width = function() { return (maxBoxWidth === null ? x.rangeBand() * .9 : Math.min(75, x.rangeBand() * .9)); };
2083
- var box_left = function() { return x.rangeBand() * .45 - box_width()/2; };
2084
- var box_right = function() { return x.rangeBand() * .45 + box_width()/2; };
2083
+ var box_width = function() { return (maxBoxWidth === null ? xScale.rangeBand() * 0.9 : Math.min(75, xScale.rangeBand() * 0.9)); };
2084
+ var box_left = function() { return xScale.rangeBand() * 0.45 - box_width()/2; };
2085
+ var box_right = function() { return xScale.rangeBand() * 0.45 + box_width()/2; };
2085
2086
 
2086
2087
  // update whisker lines and ticks
2087
- ['low', 'high'].forEach(function(key) {
2088
- var endpoint = (key === 'low') ? 'Q1' : 'Q3';
2089
-
2090
- boxplots.select('line.nv-boxplot-whisker.nv-boxplot-' + key)
2091
- .watchTransition(renderWatch, 'nv-boxplot: boxplots')
2092
- .attr('x1', x.rangeBand() * .45 )
2093
- .attr('y1', function(d,i) { return y(d.values['whisker_' + key]); })
2094
- .attr('x2', x.rangeBand() * .45 )
2095
- .attr('y2', function(d,i) { return y(d.values[endpoint]); });
2096
-
2097
- boxplots.select('line.nv-boxplot-tick.nv-boxplot-' + key)
2098
- .watchTransition(renderWatch, 'nv-boxplot: boxplots')
2099
- .attr('x1', box_left )
2100
- .attr('y1', function(d,i) { return y(d.values['whisker_' + key]); })
2101
- .attr('x2', box_right )
2102
- .attr('y2', function(d,i) { return y(d.values['whisker_' + key]); });
2088
+ [getWl, getWh].forEach(function (f) {
2089
+ var key = (f === getWl) ? 'low' : 'high';
2090
+ var endpoint = (f === getWl) ? getQ1 : getQ3;
2091
+ boxplots.select('line.nv-boxplot-whisker.nv-boxplot-' + key)
2092
+ .watchTransition(renderWatch, 'nv-boxplot: boxplots')
2093
+ .attr('x1', xScale.rangeBand() * 0.45 )
2094
+ .attr('y1', function(d,i) { return yScale(f(d)); })
2095
+ .attr('x2', xScale.rangeBand() * 0.45 )
2096
+ .attr('y2', function(d,i) { return yScale(endpoint(d)); });
2097
+ boxplots.select('line.nv-boxplot-tick.nv-boxplot-' + key)
2098
+ .watchTransition(renderWatch, 'nv-boxplot: boxplots')
2099
+ .attr('x1', box_left )
2100
+ .attr('y1', function(d,i) { return yScale(f(d)); })
2101
+ .attr('x2', box_right )
2102
+ .attr('y2', function(d,i) { return yScale(f(d)); });
2103
2103
  });
2104
2104
 
2105
- ['low', 'high'].forEach(function(key) {
2106
- boxEnter.selectAll('.nv-boxplot-' + key)
2107
- .on('mouseover', function(d,i,j) {
2108
- d3.select(this).classed('hover', true);
2109
- dispatch.elementMouseover({
2110
- series: { key: d.values['whisker_' + key], color: color(d,j) },
2111
- e: d3.event
2112
- });
2113
- })
2114
- .on('mouseout', function(d,i,j) {
2115
- d3.select(this).classed('hover', false);
2116
- dispatch.elementMouseout({
2117
- series: { key: d.values['whisker_' + key], color: color(d,j) },
2118
- e: d3.event
2119
- });
2120
- })
2121
- .on('mousemove', function(d,i) {
2122
- dispatch.elementMousemove({e: d3.event});
2123
- });
2105
+ [getWl, getWh].forEach(function (f) {
2106
+ var key = (f === getWl) ? 'low' : 'high';
2107
+ boxEnter.selectAll('.nv-boxplot-' + key)
2108
+ .on('mouseover', function(d,i,j) {
2109
+ d3.select(this).classed('hover', true);
2110
+ dispatch.elementMouseover({
2111
+ series: { key: f(d), color: getColor(d) || color(d,j) },
2112
+ e: d3.event
2113
+ });
2114
+ })
2115
+ .on('mouseout', function(d,i,j) {
2116
+ d3.select(this).classed('hover', false);
2117
+ dispatch.elementMouseout({
2118
+ series: { key: f(d), color: getColor(d) || color(d,j) },
2119
+ e: d3.event
2120
+ });
2121
+ })
2122
+ .on('mousemove', function(d,i) {
2123
+ dispatch.elementMousemove({e: d3.event});
2124
+ });
2124
2125
  });
2125
2126
 
2126
2127
  // boxes
@@ -2130,12 +2131,12 @@ nv.models.boxPlot = function() {
2130
2131
  .on('mouseover', function(d,i) {
2131
2132
  d3.select(this).classed('hover', true);
2132
2133
  dispatch.elementMouseover({
2133
- key: d.label,
2134
- value: d.label,
2134
+ key: getX(d),
2135
+ value: getX(d),
2135
2136
  series: [
2136
- { key: 'Q3', value: d.values.Q3, color: d.color || color(d,i) },
2137
- { key: 'Q2', value: d.values.Q2, color: d.color || color(d,i) },
2138
- { key: 'Q1', value: d.values.Q1, color: d.color || color(d,i) }
2137
+ { key: 'Q3', value: getQ3(d), color: getColor(d) || color(d,i) },
2138
+ { key: 'Q2', value: getQ2(d), color: getColor(d) || color(d,i) },
2139
+ { key: 'Q1', value: getQ1(d), color: getColor(d) || color(d,i) }
2139
2140
  ],
2140
2141
  data: d,
2141
2142
  index: i,
@@ -2145,12 +2146,12 @@ nv.models.boxPlot = function() {
2145
2146
  .on('mouseout', function(d,i) {
2146
2147
  d3.select(this).classed('hover', false);
2147
2148
  dispatch.elementMouseout({
2148
- key: d.label,
2149
- value: d.label,
2149
+ key: getX(d),
2150
+ value: getX(d),
2150
2151
  series: [
2151
- { key: 'Q3', value: d.values.Q3, color: d.color || color(d,i) },
2152
- { key: 'Q2', value: d.values.Q2, color: d.color || color(d,i) },
2153
- { key: 'Q1', value: d.values.Q1, color: d.color || color(d,i) }
2152
+ { key: 'Q3', value: getQ3(d), color: getColor(d) || color(d,i) },
2153
+ { key: 'Q2', value: getQ2(d), color: getColor(d) || color(d,i) },
2154
+ { key: 'Q1', value: getQ1(d), color: getColor(d) || color(d,i) }
2154
2155
  ],
2155
2156
  data: d,
2156
2157
  index: i,
@@ -2164,13 +2165,12 @@ nv.models.boxPlot = function() {
2164
2165
  // box transitions
2165
2166
  boxplots.select('rect.nv-boxplot-box')
2166
2167
  .watchTransition(renderWatch, 'nv-boxplot: boxes')
2167
- .attr('y', function(d,i) { return y(d.values.Q3); })
2168
+ .attr('y', function(d,i) { return yScale(getQ3(d)); })
2168
2169
  .attr('width', box_width)
2169
2170
  .attr('x', box_left )
2170
-
2171
- .attr('height', function(d,i) { return Math.abs(y(d.values.Q3) - y(d.values.Q1)) || 1 })
2172
- .style('fill', function(d,i) { return d.color || color(d,i) })
2173
- .style('stroke', function(d,i) { return d.color || color(d,i) });
2171
+ .attr('height', function(d,i) { return Math.abs(yScale(getQ3(d)) - yScale(getQ1(d))) || 1 })
2172
+ .style('fill', function(d,i) { return getColor(d) || color(d,i) })
2173
+ .style('stroke', function(d,i) { return getColor(d) || color(d,i) });
2174
2174
 
2175
2175
  // median line
2176
2176
  boxEnter.append('line').attr('class', 'nv-boxplot-median');
@@ -2178,13 +2178,46 @@ nv.models.boxPlot = function() {
2178
2178
  boxplots.select('line.nv-boxplot-median')
2179
2179
  .watchTransition(renderWatch, 'nv-boxplot: boxplots line')
2180
2180
  .attr('x1', box_left)
2181
- .attr('y1', function(d,i) { return y(d.values.Q2); })
2181
+ .attr('y1', function(d,i) { return yScale(getQ2(d)); })
2182
2182
  .attr('x2', box_right)
2183
- .attr('y2', function(d,i) { return y(d.values.Q2); });
2183
+ .attr('y2', function(d,i) { return yScale(getQ2(d)); });
2184
+
2185
+ // outliers
2186
+ var outliers = boxplots.selectAll('.nv-boxplot-outlier').data(function(d) {
2187
+ return getOlItems(d) || [];
2188
+ });
2189
+ outliers.enter().append('circle')
2190
+ .style('fill', function(d,i,j) { return getOlColor(d,i,j) || color(d,j) })
2191
+ .style('stroke', function(d,i,j) { return getOlColor(d,i,j) || color(d,j) })
2192
+ .style('z-index', 9000)
2193
+ .on('mouseover', function(d,i,j) {
2194
+ d3.select(this).classed('hover', true);
2195
+ dispatch.elementMouseover({
2196
+ series: { key: getOlLabel(d,i,j), color: getOlColor(d,i,j) || color(d,j) },
2197
+ e: d3.event
2198
+ });
2199
+ })
2200
+ .on('mouseout', function(d,i,j) {
2201
+ d3.select(this).classed('hover', false);
2202
+ dispatch.elementMouseout({
2203
+ series: { key: getOlLabel(d,i,j), color: getOlColor(d,i,j) || color(d,j) },
2204
+ e: d3.event
2205
+ });
2206
+ })
2207
+ .on('mousemove', function(d,i) {
2208
+ dispatch.elementMousemove({e: d3.event});
2209
+ });
2210
+ outliers.attr('class', 'nv-boxplot-outlier');
2211
+ outliers
2212
+ .watchTransition(renderWatch, 'nv-boxplot: nv-boxplot-outlier')
2213
+ .attr('cx', xScale.rangeBand() * 0.45)
2214
+ .attr('cy', function(d,i,j) { return yScale(getOlValue(d,i,j)); })
2215
+ .attr('r', '3');
2216
+ outliers.exit().remove();
2184
2217
 
2185
2218
  //store old scales for use in transitions on update
2186
- x0 = x.copy();
2187
- y0 = y.copy();
2219
+ xScale0 = xScale.copy();
2220
+ yScale0 = yScale.copy();
2188
2221
  });
2189
2222
 
2190
2223
  renderWatch.renderEnd('nv-boxplot immediate');
@@ -2200,20 +2233,37 @@ nv.models.boxPlot = function() {
2200
2233
 
2201
2234
  chart._options = Object.create({}, {
2202
2235
  // simple options, just get/set the necessary values
2203
- width: {get: function(){return width;}, set: function(_){width=_;}},
2204
- height: {get: function(){return height;}, set: function(_){height=_;}},
2236
+ width: {get: function(){return width;}, set: function(_){width=_;}},
2237
+ height: {get: function(){return height;}, set: function(_){height=_;}},
2205
2238
  maxBoxWidth: {get: function(){return maxBoxWidth;}, set: function(_){maxBoxWidth=_;}},
2206
- x: {get: function(){return getX;}, set: function(_){getX=_;}},
2207
- y: {get: function(){return getY;}, set: function(_){getY=_;}},
2208
- xScale: {get: function(){return x;}, set: function(_){x=_;}},
2209
- yScale: {get: function(){return y;}, set: function(_){y=_;}},
2239
+ x: {get: function(){return getX;}, set: function(_){getX=_;}},
2240
+ q1: {get: function(){return getQ1;}, set: function(_){getQ1=_;}},
2241
+ q2: {get: function(){return getQ2;}, set: function(_){getQ2=_;}},
2242
+ q3: {get: function(){return getQ3;}, set: function(_){getQ3=_;}},
2243
+ wl: {get: function(){return getWl;}, set: function(_){getWl=_;}},
2244
+ wh: {get: function(){return getWh;}, set: function(_){getWh=_;}},
2245
+ itemColor: {get: function(){return getColor;}, set: function(_){getColor=_;}},
2246
+ outliers: {get: function(){return getOlItems;}, set: function(_){getOlItems=_;}},
2247
+ outlierValue: {get: function(){return getOlValue;}, set: function(_){getOlValue=_;}},
2248
+ outlierLabel: {get: function(){return getOlLabel;}, set: function(_){getOlLabel=_;}},
2249
+ outlierColor: {get: function(){return getOlColor;}, set: function(_){getOlColor=_;}},
2250
+ xScale: {get: function(){return xScale;}, set: function(_){xScale=_;}},
2251
+ yScale: {get: function(){return yScale;}, set: function(_){yScale=_;}},
2210
2252
  xDomain: {get: function(){return xDomain;}, set: function(_){xDomain=_;}},
2211
2253
  yDomain: {get: function(){return yDomain;}, set: function(_){yDomain=_;}},
2212
2254
  xRange: {get: function(){return xRange;}, set: function(_){xRange=_;}},
2213
2255
  yRange: {get: function(){return yRange;}, set: function(_){yRange=_;}},
2214
2256
  id: {get: function(){return id;}, set: function(_){id=_;}},
2215
2257
  // rectClass: {get: function(){return rectClass;}, set: function(_){rectClass=_;}},
2216
-
2258
+ y: {
2259
+ get: function() {
2260
+ console.warn('BoxPlot \'y\' chart option is deprecated. Please use model overrides instead.');
2261
+ return {};
2262
+ },
2263
+ set: function(_) {
2264
+ console.warn('BoxPlot \'y\' chart option is deprecated. Please use model overrides instead.');
2265
+ }
2266
+ },
2217
2267
  // options that require extra logic in the setter
2218
2268
  margin: {get: function(){return margin;}, set: function(_){
2219
2269
  margin.top = _.top !== undefined ? _.top : margin.top;
@@ -2241,26 +2291,23 @@ nv.models.boxPlotChart = function() {
2241
2291
  // Public Variables with Default Settings
2242
2292
  //------------------------------------------------------------
2243
2293
 
2244
- var boxplot = nv.models.boxPlot()
2245
- , xAxis = nv.models.axis()
2246
- , yAxis = nv.models.axis()
2247
- ;
2294
+ var boxplot = nv.models.boxPlot(),
2295
+ xAxis = nv.models.axis(),
2296
+ yAxis = nv.models.axis();
2248
2297
 
2249
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
2250
- , width = null
2251
- , height = null
2252
- , color = nv.utils.getColor()
2253
- , showXAxis = true
2254
- , showYAxis = true
2255
- , rightAlignYAxis = false
2256
- , staggerLabels = false
2257
- , tooltip = nv.models.tooltip()
2258
- , x
2259
- , y
2260
- , noData = "No Data Available."
2261
- , dispatch = d3.dispatch('beforeUpdate', 'renderEnd')
2262
- , duration = 250
2263
- ;
2298
+ var margin = {top: 15, right: 10, bottom: 50, left: 60},
2299
+ width = null,
2300
+ height = null,
2301
+ color = nv.utils.getColor(),
2302
+ showXAxis = true,
2303
+ showYAxis = true,
2304
+ rightAlignYAxis = false,
2305
+ staggerLabels = false,
2306
+ tooltip = nv.models.tooltip(),
2307
+ x, y,
2308
+ noData = 'No Data Available.',
2309
+ dispatch = d3.dispatch('beforeUpdate', 'renderEnd'),
2310
+ duration = 250;
2264
2311
 
2265
2312
  xAxis
2266
2313
  .orient('bottom')
@@ -2287,13 +2334,10 @@ nv.models.boxPlotChart = function() {
2287
2334
  if (showYAxis) renderWatch.models(yAxis);
2288
2335
 
2289
2336
  selection.each(function(data) {
2290
- var container = d3.select(this),
2291
- that = this;
2337
+ var container = d3.select(this), that = this;
2292
2338
  nv.utils.initSVG(container);
2293
- var availableWidth = (width || parseInt(container.style('width')) || 960)
2294
- - margin.left - margin.right,
2295
- availableHeight = (height || parseInt(container.style('height')) || 400)
2296
- - margin.top - margin.bottom;
2339
+ var availableWidth = (width || parseInt(container.style('width')) || 960) - margin.left - margin.right;
2340
+ var availableHeight = (height || parseInt(container.style('height')) || 400) - margin.top - margin.bottom;
2297
2341
 
2298
2342
  chart.update = function() {
2299
2343
  dispatch.beforeUpdate();
@@ -2301,9 +2345,9 @@ nv.models.boxPlotChart = function() {
2301
2345
  };
2302
2346
  chart.container = this;
2303
2347
 
2304
- // Display No Data message if there's nothing to show. (quartiles required at minimum)
2305
- if (!data || !data.length ||
2306
- !data.filter(function(d) { return d.values.hasOwnProperty("Q1") && d.values.hasOwnProperty("Q2") && d.values.hasOwnProperty("Q3"); }).length) {
2348
+ // TODO still need to find a way to validate quartile data presence using boxPlot callbacks.
2349
+ // Display No Data message if there's nothing to show. (quartiles required at minimum).
2350
+ if (!data || !data.length) {
2307
2351
  var noDataText = container.selectAll('.nv-noData').data([noData]);
2308
2352
 
2309
2353
  noDataText.enter().append('text')
@@ -2337,25 +2381,21 @@ nv.models.boxPlotChart = function() {
2337
2381
  .append('line');
2338
2382
 
2339
2383
  gEnter.append('g').attr('class', 'nv-barsWrap');
2340
-
2341
2384
  g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
2342
2385
 
2343
2386
  if (rightAlignYAxis) {
2344
- g.select(".nv-y.nv-axis")
2345
- .attr("transform", "translate(" + availableWidth + ",0)");
2387
+ g.select('.nv-y.nv-axis')
2388
+ .attr('transform', 'translate(' + availableWidth + ',0)');
2346
2389
  }
2347
2390
 
2348
2391
  // Main Chart Component(s)
2349
- boxplot
2350
- .width(availableWidth)
2351
- .height(availableHeight);
2392
+ boxplot.width(availableWidth).height(availableHeight);
2352
2393
 
2353
2394
  var barsWrap = g.select('.nv-barsWrap')
2354
2395
  .datum(data.filter(function(d) { return !d.disabled }))
2355
2396
 
2356
2397
  barsWrap.transition().call(boxplot);
2357
2398
 
2358
-
2359
2399
  defsEnter.append('clipPath')
2360
2400
  .attr('id', 'nv-x-label-clip-' + boxplot.id())
2361
2401
  .append('rect');
@@ -2379,7 +2419,7 @@ nv.models.boxPlotChart = function() {
2379
2419
  if (staggerLabels) {
2380
2420
  xTicks
2381
2421
  .selectAll('text')
2382
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
2422
+ .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 === 0 ? '5' : '17') + ')' })
2383
2423
  }
2384
2424
  }
2385
2425
 
@@ -2393,11 +2433,11 @@ nv.models.boxPlotChart = function() {
2393
2433
  }
2394
2434
 
2395
2435
  // Zero line
2396
- g.select(".nv-zeroLine line")
2397
- .attr("x1",0)
2398
- .attr("x2",availableWidth)
2399
- .attr("y1", y(0))
2400
- .attr("y2", y(0))
2436
+ g.select('.nv-zeroLine line')
2437
+ .attr('x1',0)
2438
+ .attr('x2',availableWidth)
2439
+ .attr('y1', y(0))
2440
+ .attr('y2', y(0))
2401
2441
  ;
2402
2442
 
2403
2443
  //============================================================
@@ -2504,8 +2544,19 @@ nv.models.bullet = function() {
2504
2544
  , tickFormat = null
2505
2545
  , color = nv.utils.getColor(['#1f77b4'])
2506
2546
  , dispatch = d3.dispatch('elementMouseover', 'elementMouseout', 'elementMousemove')
2547
+ , defaultRangeLabels = ["Maximum", "Mean", "Minimum"]
2548
+ , legacyRangeClassNames = ["Max", "Avg", "Min"]
2507
2549
  ;
2508
2550
 
2551
+ function sortLabels(labels, values){
2552
+ var lz = labels.slice();
2553
+ labels.sort(function(a, b){
2554
+ var iA = lz.indexOf(a);
2555
+ var iB = lz.indexOf(b);
2556
+ return d3.descending(values[iA], values[iB]);
2557
+ });
2558
+ };
2559
+
2509
2560
  function chart(selection) {
2510
2561
  selection.each(function(d, i) {
2511
2562
  var availableWidth = width - margin.left - margin.right,
@@ -2514,13 +2565,23 @@ nv.models.bullet = function() {
2514
2565
  container = d3.select(this);
2515
2566
  nv.utils.initSVG(container);
2516
2567
 
2517
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
2518
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
2519
- measurez = measures.call(this, d, i).slice().sort(d3.descending),
2568
+ var rangez = ranges.call(this, d, i).slice(),
2569
+ markerz = markers.call(this, d, i).slice(),
2570
+ measurez = measures.call(this, d, i).slice(),
2520
2571
  rangeLabelz = rangeLabels.call(this, d, i).slice(),
2521
2572
  markerLabelz = markerLabels.call(this, d, i).slice(),
2522
2573
  measureLabelz = measureLabels.call(this, d, i).slice();
2523
2574
 
2575
+ // Sort labels according to their sorted values
2576
+ sortLabels(rangeLabelz, rangez);
2577
+ sortLabels(markerLabelz, markerz);
2578
+ sortLabels(measureLabelz, measurez);
2579
+
2580
+ // sort values descending
2581
+ rangez.sort(d3.descending);
2582
+ markerz.sort(d3.descending);
2583
+ measurez.sort(d3.descending);
2584
+
2524
2585
  // Setup Scales
2525
2586
  // Compute the new x-scale.
2526
2587
  var x1 = d3.scale.linear()
@@ -2545,9 +2606,14 @@ nv.models.bullet = function() {
2545
2606
  var gEnter = wrapEnter.append('g');
2546
2607
  var g = wrap.select('g');
2547
2608
 
2548
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
2549
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
2550
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
2609
+ for(var i=0,il=rangez.length; i<il; i++){
2610
+ var rangeClassNames = 'nv-range nv-range'+i;
2611
+ if(i <= 2){
2612
+ rangeClassNames = rangeClassNames + ' nv-range'+legacyRangeClassNames[i];
2613
+ }
2614
+ gEnter.append('rect').attr('class', rangeClassNames);
2615
+ }
2616
+
2551
2617
  gEnter.append('rect').attr('class', 'nv-measure');
2552
2618
 
2553
2619
  wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
@@ -2557,25 +2623,14 @@ nv.models.bullet = function() {
2557
2623
  var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
2558
2624
  xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
2559
2625
 
2560
- g.select('rect.nv-rangeMax')
2561
- .attr('height', availableHeight)
2562
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
2563
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
2564
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
2565
-
2566
- g.select('rect.nv-rangeAvg')
2567
- .attr('height', availableHeight)
2568
- .attr('width', w1(rangeAvg))
2569
- .attr('x', xp1(rangeAvg))
2570
- .datum(rangeAvg)
2571
-
2572
- g.select('rect.nv-rangeMin')
2573
- .attr('height', availableHeight)
2574
- .attr('width', w1(rangeMax))
2575
- .attr('x', xp1(rangeMax))
2576
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
2577
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
2578
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
2626
+ for(var i=0,il=rangez.length; i<il; i++){
2627
+ var range = rangez[i];
2628
+ g.select('rect.nv-range'+i)
2629
+ .attr('height', availableHeight)
2630
+ .attr('width', w1(range))
2631
+ .attr('x', xp1(range))
2632
+ .datum(range)
2633
+ }
2579
2634
 
2580
2635
  g.select('rect.nv-measure')
2581
2636
  .style('fill', color)
@@ -2649,7 +2704,7 @@ nv.models.bullet = function() {
2649
2704
 
2650
2705
  wrap.selectAll('.nv-range')
2651
2706
  .on('mouseover', function(d,i) {
2652
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
2707
+ var label = rangeLabelz[i] || defaultRangeLabels[i];
2653
2708
  dispatch.elementMouseover({
2654
2709
  value: d,
2655
2710
  label: label,
@@ -2664,7 +2719,7 @@ nv.models.bullet = function() {
2664
2719
  })
2665
2720
  })
2666
2721
  .on('mouseout', function(d,i) {
2667
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
2722
+ var label = rangeLabelz[i] || defaultRangeLabels[i];
2668
2723
  dispatch.elementMouseout({
2669
2724
  value: d,
2670
2725
  label: label,
@@ -3365,7 +3420,9 @@ nv.models.cumulativeLineChart = function() {
3365
3420
  gEnter.append('g').attr('class', 'nv-controlsWrap');
3366
3421
 
3367
3422
  // Legend
3368
- if (showLegend) {
3423
+ if (!showLegend) {
3424
+ g.select('.nv-legendWrap').selectAll('*').remove();
3425
+ } else {
3369
3426
  legend.width(availableWidth);
3370
3427
 
3371
3428
  g.select('.nv-legendWrap')
@@ -3382,7 +3439,9 @@ nv.models.cumulativeLineChart = function() {
3382
3439
  }
3383
3440
 
3384
3441
  // Controls
3385
- if (showControls) {
3442
+ if (!showControls) {
3443
+ g.select('.nv-controlsWrap').selectAll('*').remove();
3444
+ } else {
3386
3445
  var controlsData = [
3387
3446
  { key: 'Re-scale y-axis', disabled: !rescaleY }
3388
3447
  ];
@@ -4159,7 +4218,10 @@ nv.models.discreteBarChart = function() {
4159
4218
 
4160
4219
  g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
4161
4220
 
4162
- if (showLegend) {
4221
+ // Legend
4222
+ if (!showLegend) {
4223
+ g.select('.nv-legendWrap').selectAll('*').remove();
4224
+ } else {
4163
4225
  legend.width(availableWidth);
4164
4226
 
4165
4227
  g.select('.nv-legendWrap')
@@ -4174,16 +4236,11 @@ nv.models.discreteBarChart = function() {
4174
4236
  wrap.select('.nv-legendWrap')
4175
4237
  .attr('transform', 'translate(0,' + (-margin.top) +')')
4176
4238
  }
4177
-
4239
+
4178
4240
  if (rightAlignYAxis) {
4179
4241
  g.select(".nv-y.nv-axis")
4180
4242
  .attr("transform", "translate(" + availableWidth + ",0)");
4181
- }
4182
-
4183
- if (rightAlignYAxis) {
4184
- g.select(".nv-y.nv-axis")
4185
- .attr("transform", "translate(" + availableWidth + ",0)");
4186
- }
4243
+ }
4187
4244
 
4188
4245
  // Main Chart Component(s)
4189
4246
  discretebar
@@ -4494,6 +4551,195 @@ nv.models.distribution = function() {
4494
4551
 
4495
4552
  return chart;
4496
4553
  }
4554
+ nv.models.forceDirectedGraph = function() {
4555
+ "use strict";
4556
+
4557
+ //============================================================
4558
+ // Public Variables with Default Settings
4559
+ //------------------------------------------------------------
4560
+ var margin = {top: 2, right: 0, bottom: 2, left: 0}
4561
+ , width = 400
4562
+ , height = 32
4563
+ , container = null
4564
+ , dispatch = d3.dispatch('renderEnd')
4565
+ , color = nv.utils.getColor(['#000'])
4566
+ , tooltip = nv.models.tooltip()
4567
+ , noData = null
4568
+ // Force directed graph specific parameters [default values]
4569
+ , linkStrength = 0.1
4570
+ , friction = 0.9
4571
+ , linkDist = 30
4572
+ , charge = -120
4573
+ , gravity = 0.1
4574
+ , theta = 0.8
4575
+ , alpha = 0.1
4576
+ , radius = 5
4577
+ // These functions allow to add extra attributes to ndes and links
4578
+ ,nodeExtras = function(nodes) { /* Do nothing */ }
4579
+ ,linkExtras = function(links) { /* Do nothing */ }
4580
+ ;
4581
+
4582
+
4583
+ //============================================================
4584
+ // Private Variables
4585
+ //------------------------------------------------------------
4586
+
4587
+ var renderWatch = nv.utils.renderWatch(dispatch);
4588
+
4589
+ function chart(selection) {
4590
+ renderWatch.reset();
4591
+
4592
+ selection.each(function(data) {
4593
+ container = d3.select(this);
4594
+ nv.utils.initSVG(container);
4595
+
4596
+ var availableWidth = nv.utils.availableWidth(width, container, margin),
4597
+ availableHeight = nv.utils.availableHeight(height, container, margin);
4598
+
4599
+ container
4600
+ .attr("width", availableWidth)
4601
+ .attr("height", availableHeight);
4602
+
4603
+ // Display No Data message if there's nothing to show.
4604
+ if (!data || !data.links || !data.nodes) {
4605
+ nv.utils.noData(chart, container)
4606
+ return chart;
4607
+ } else {
4608
+ container.selectAll('.nv-noData').remove();
4609
+ }
4610
+ container.selectAll('*').remove();
4611
+
4612
+ // Collect names of all fields in the nodes
4613
+ var nodeFieldSet = new Set();
4614
+ data.nodes.forEach(function(node) {
4615
+ var keys = Object.keys(node);
4616
+ keys.forEach(function(key) {
4617
+ nodeFieldSet.add(key);
4618
+ });
4619
+ });
4620
+
4621
+ var force = d3.layout.force()
4622
+ .nodes(data.nodes)
4623
+ .links(data.links)
4624
+ .size([availableWidth, availableHeight])
4625
+ .linkStrength(linkStrength)
4626
+ .friction(friction)
4627
+ .linkDistance(linkDist)
4628
+ .charge(charge)
4629
+ .gravity(gravity)
4630
+ .theta(theta)
4631
+ .alpha(alpha)
4632
+ .start();
4633
+
4634
+ var link = container.selectAll(".link")
4635
+ .data(data.links)
4636
+ .enter().append("line")
4637
+ .attr("class", "nv-force-link")
4638
+ .style("stroke-width", function(d) { return Math.sqrt(d.value); });
4639
+
4640
+ var node = container.selectAll(".node")
4641
+ .data(data.nodes)
4642
+ .enter()
4643
+ .append("g")
4644
+ .attr("class", "nv-force-node")
4645
+ .call(force.drag);
4646
+
4647
+ node
4648
+ .append("circle")
4649
+ .attr("r", radius)
4650
+ .style("fill", function(d) { return color(d) } )
4651
+ .on("mouseover", function(evt) {
4652
+ container.select('.nv-series-' + evt.seriesIndex + ' .nv-distx-' + evt.pointIndex)
4653
+ .attr('y1', evt.py);
4654
+ container.select('.nv-series-' + evt.seriesIndex + ' .nv-disty-' + evt.pointIndex)
4655
+ .attr('x2', evt.px);
4656
+
4657
+ // Add 'series' object to
4658
+ var nodeColor = color(evt);
4659
+ evt.series = [];
4660
+ nodeFieldSet.forEach(function(field) {
4661
+ evt.series.push({
4662
+ color: nodeColor,
4663
+ key: field,
4664
+ value: evt[field]
4665
+ });
4666
+ });
4667
+ tooltip.data(evt).hidden(false);
4668
+ })
4669
+ .on("mouseout", function(d) {
4670
+ tooltip.hidden(true);
4671
+ });
4672
+
4673
+ tooltip.headerFormatter(function(d) {return "Node";});
4674
+
4675
+ // Apply extra attributes to nodes and links (if any)
4676
+ linkExtras(link);
4677
+ nodeExtras(node);
4678
+
4679
+ force.on("tick", function() {
4680
+ link.attr("x1", function(d) { return d.source.x; })
4681
+ .attr("y1", function(d) { return d.source.y; })
4682
+ .attr("x2", function(d) { return d.target.x; })
4683
+ .attr("y2", function(d) { return d.target.y; });
4684
+
4685
+ node.attr("transform", function(d) {
4686
+ return "translate(" + d.x + ", " + d.y + ")";
4687
+ });
4688
+ });
4689
+ });
4690
+
4691
+ return chart;
4692
+ }
4693
+
4694
+ //============================================================
4695
+ // Expose Public Variables
4696
+ //------------------------------------------------------------
4697
+
4698
+ chart.options = nv.utils.optionsFunc.bind(chart);
4699
+
4700
+ chart._options = Object.create({}, {
4701
+ // simple options, just get/set the necessary values
4702
+ width: {get: function(){return width;}, set: function(_){width=_;}},
4703
+ height: {get: function(){return height;}, set: function(_){height=_;}},
4704
+
4705
+ // Force directed graph specific parameters
4706
+ linkStrength:{get: function(){return linkStrength;}, set: function(_){linkStrength=_;}},
4707
+ friction: {get: function(){return friction;}, set: function(_){friction=_;}},
4708
+ linkDist: {get: function(){return linkDist;}, set: function(_){linkDist=_;}},
4709
+ charge: {get: function(){return charge;}, set: function(_){charge=_;}},
4710
+ gravity: {get: function(){return gravity;}, set: function(_){gravity=_;}},
4711
+ theta: {get: function(){return theta;}, set: function(_){theta=_;}},
4712
+ alpha: {get: function(){return alpha;}, set: function(_){alpha=_;}},
4713
+ radius: {get: function(){return radius;}, set: function(_){radius=_;}},
4714
+
4715
+ //functor options
4716
+ x: {get: function(){return getX;}, set: function(_){getX=d3.functor(_);}},
4717
+ y: {get: function(){return getY;}, set: function(_){getY=d3.functor(_);}},
4718
+
4719
+ // options that require extra logic in the setter
4720
+ margin: {get: function(){return margin;}, set: function(_){
4721
+ margin.top = _.top !== undefined ? _.top : margin.top;
4722
+ margin.right = _.right !== undefined ? _.right : margin.right;
4723
+ margin.bottom = _.bottom !== undefined ? _.bottom : margin.bottom;
4724
+ margin.left = _.left !== undefined ? _.left : margin.left;
4725
+ }},
4726
+ color: {get: function(){return color;}, set: function(_){
4727
+ color = nv.utils.getColor(_);
4728
+ }},
4729
+ noData: {get: function(){return noData;}, set: function(_){noData=_;}},
4730
+ nodeExtras: {get: function(){return nodeExtras;}, set: function(_){
4731
+ nodeExtras = _;
4732
+ }},
4733
+ linkExtras: {get: function(){return linkExtras;}, set: function(_){
4734
+ linkExtras = _;
4735
+ }}
4736
+ });
4737
+
4738
+ chart.dispatch = dispatch;
4739
+ chart.tooltip = tooltip;
4740
+ nv.utils.initOptions(chart);
4741
+ return chart;
4742
+ };
4497
4743
  nv.models.furiousLegend = function() {
4498
4744
  "use strict";
4499
4745
 
@@ -4675,7 +4921,7 @@ nv.models.furiousLegend = function() {
4675
4921
  var seriesWidths = [];
4676
4922
  series.each(function(d,i) {
4677
4923
  var legendText;
4678
- if (getKey(d).length > maxKeyLength) {
4924
+ if (getKey(d) && (getKey(d).length > maxKeyLength)) {
4679
4925
  var trimmedKey = getKey(d).substring(0, maxKeyLength);
4680
4926
  legendText = d3.select(this).select('text').text(trimmedKey + "...");
4681
4927
  d3.select(this).append("svg:title").text(getKey(d));
@@ -5180,7 +5426,9 @@ nv.models.historicalBarChart = function(bar_model) {
5180
5426
  gEnter.append('g').attr('class', 'nv-interactive');
5181
5427
 
5182
5428
  // Legend
5183
- if (showLegend) {
5429
+ if (!showLegend) {
5430
+ g.select('.nv-legendWrap').selectAll('*').remove();
5431
+ } else {
5184
5432
  legend.width(availableWidth);
5185
5433
 
5186
5434
  g.select('.nv-legendWrap')
@@ -5534,7 +5782,7 @@ nv.models.legend = function() {
5534
5782
  .attr('class','nv-legend-symbol')
5535
5783
  .attr('r', 5);
5536
5784
 
5537
- seriesShape = series.select('circle');
5785
+ seriesShape = series.select('.nv-legend-symbol');
5538
5786
  } else if (vers == 'furious') {
5539
5787
  seriesEnter.append('rect')
5540
5788
  .style('stroke-width', 2)
@@ -5651,7 +5899,7 @@ nv.models.legend = function() {
5651
5899
  var seriesWidths = [];
5652
5900
  series.each(function(d,i) {
5653
5901
  var legendText;
5654
- if (getKey(d).length > maxKeyLength) {
5902
+ if (getKey(d) && (getKey(d).length > maxKeyLength)) {
5655
5903
  var trimmedKey = getKey(d).substring(0, maxKeyLength);
5656
5904
  legendText = d3.select(this).select('text').text(trimmedKey + "...");
5657
5905
  d3.select(this).append("svg:title").text(getKey(d));
@@ -6104,6 +6352,7 @@ nv.models.lineChart = function() {
6104
6352
  , width = null
6105
6353
  , height = null
6106
6354
  , showLegend = true
6355
+ , legendPosition = 'top'
6107
6356
  , showXAxis = true
6108
6357
  , showYAxis = true
6109
6358
  , rightAlignYAxis = false
@@ -6141,7 +6390,7 @@ nv.models.lineChart = function() {
6141
6390
  }).headerFormatter(function(d, i) {
6142
6391
  return xAxis.tickFormat()(d, i);
6143
6392
  });
6144
-
6393
+
6145
6394
  interactiveLayer.tooltip.valueFormatter(function(d, i) {
6146
6395
  return yAxis.tickFormat()(d, i);
6147
6396
  }).headerFormatter(function(d, i) {
@@ -6188,7 +6437,7 @@ nv.models.lineChart = function() {
6188
6437
  availableHeight1 = nv.utils.availableHeight(height, container, margin) - (focusEnable ? focusHeight : 0),
6189
6438
  availableHeight2 = focusHeight - margin2.top - margin2.bottom;
6190
6439
 
6191
- chart.update = function() {
6440
+ chart.update = function() {
6192
6441
  if( duration === 0 ) {
6193
6442
  container.call( chart );
6194
6443
  } else {
@@ -6254,20 +6503,27 @@ nv.models.lineChart = function() {
6254
6503
  contextEnter.append('g').attr('class', 'nv-x nv-brush');
6255
6504
 
6256
6505
  // Legend
6257
- if (showLegend) {
6506
+ if (!showLegend) {
6507
+ g.select('.nv-legendWrap').selectAll('*').remove();
6508
+ } else {
6258
6509
  legend.width(availableWidth);
6259
6510
 
6260
6511
  g.select('.nv-legendWrap')
6261
6512
  .datum(data)
6262
6513
  .call(legend);
6263
6514
 
6264
- if ( margin.top != legend.height()) {
6265
- margin.top = legend.height();
6266
- availableHeight1 = nv.utils.availableHeight(height, container, margin) - (focusEnable ? focusHeight : 0);
6267
- }
6515
+ if (legendPosition === 'bottom') {
6516
+ wrap.select('.nv-legendWrap')
6517
+ .attr('transform', 'translate(0,' + (availableHeight1) +')');
6518
+ } else if (legendPosition === 'top') {
6519
+ if ( margin.top != legend.height()) {
6520
+ margin.top = legend.height();
6521
+ availableHeight1 = nv.utils.availableHeight(height, container, margin) - (focusEnable ? focusHeight : 0);
6522
+ }
6268
6523
 
6269
- wrap.select('.nv-legendWrap')
6270
- .attr('transform', 'translate(0,' + (-margin.top) +')');
6524
+ wrap.select('.nv-legendWrap')
6525
+ .attr('transform', 'translate(0,' + (-margin.top) +')');
6526
+ }
6271
6527
  }
6272
6528
 
6273
6529
  wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
@@ -6291,7 +6547,7 @@ nv.models.lineChart = function() {
6291
6547
  g.select('.nv-focus .nv-background rect')
6292
6548
  .attr('width', availableWidth)
6293
6549
  .attr('height', availableHeight1);
6294
-
6550
+
6295
6551
  lines
6296
6552
  .width(availableWidth)
6297
6553
  .height(availableHeight1)
@@ -6342,7 +6598,7 @@ nv.models.lineChart = function() {
6342
6598
  ;
6343
6599
  }
6344
6600
  }
6345
-
6601
+
6346
6602
  g.select('.nv-focus .nv-x.nv-axis')
6347
6603
  .attr('transform', 'translate(0,' + availableHeight1 + ')');
6348
6604
 
@@ -6361,81 +6617,81 @@ nv.models.lineChart = function() {
6361
6617
  .color(data.map(function(d,i) {
6362
6618
  return d.color || color(d, i);
6363
6619
  }).filter(function(d,i) { return !data[i].disabled; }));
6364
-
6620
+
6365
6621
  g.select('.nv-context')
6366
6622
  .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
6367
6623
  .style('display', focusEnable ? 'initial' : 'none')
6368
6624
  ;
6369
-
6625
+
6370
6626
  var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
6371
6627
  .datum(data.filter(function(d) { return !d.disabled; }))
6372
6628
  ;
6373
-
6629
+
6374
6630
  d3.transition(contextLinesWrap).call(lines2);
6375
-
6376
-
6631
+
6632
+
6377
6633
  // Setup Brush
6378
6634
  brush
6379
6635
  .x(x2)
6380
6636
  .on('brush', function() {
6381
6637
  onBrush();
6382
6638
  });
6383
-
6639
+
6384
6640
  if (brushExtent) brush.extent(brushExtent);
6385
-
6641
+
6386
6642
  var brushBG = g.select('.nv-brushBackground').selectAll('g')
6387
6643
  .data([brushExtent || brush.extent()]);
6388
-
6644
+
6389
6645
  var brushBGenter = brushBG.enter()
6390
6646
  .append('g');
6391
-
6647
+
6392
6648
  brushBGenter.append('rect')
6393
6649
  .attr('class', 'left')
6394
6650
  .attr('x', 0)
6395
6651
  .attr('y', 0)
6396
6652
  .attr('height', availableHeight2);
6397
-
6653
+
6398
6654
  brushBGenter.append('rect')
6399
6655
  .attr('class', 'right')
6400
6656
  .attr('x', 0)
6401
6657
  .attr('y', 0)
6402
6658
  .attr('height', availableHeight2);
6403
-
6659
+
6404
6660
  var gBrush = g.select('.nv-x.nv-brush')
6405
6661
  .call(brush);
6406
6662
  gBrush.selectAll('rect')
6407
6663
  .attr('height', availableHeight2);
6408
6664
  gBrush.selectAll('.resize').append('path').attr('d', resizePath);
6409
-
6665
+
6410
6666
  onBrush();
6411
-
6667
+
6412
6668
  g.select('.nv-context .nv-background rect')
6413
6669
  .attr('width', availableWidth)
6414
6670
  .attr('height', availableHeight2);
6415
-
6671
+
6416
6672
  // Setup Secondary (Context) Axes
6417
6673
  if (focusShowAxisX) {
6418
6674
  x2Axis
6419
6675
  .scale(x2)
6420
6676
  ._ticks( nv.utils.calcTicksX(availableWidth/100, data) )
6421
6677
  .tickSize(-availableHeight2, 0);
6422
-
6678
+
6423
6679
  g.select('.nv-context .nv-x.nv-axis')
6424
6680
  .attr('transform', 'translate(0,' + y2.range()[0] + ')');
6425
6681
  d3.transition(g.select('.nv-context .nv-x.nv-axis'))
6426
6682
  .call(x2Axis);
6427
6683
  }
6428
-
6684
+
6429
6685
  if (focusShowAxisY) {
6430
6686
  y2Axis
6431
6687
  .scale(y2)
6432
6688
  ._ticks( nv.utils.calcTicksY(availableHeight2/36, data) )
6433
6689
  .tickSize( -availableWidth, 0);
6434
-
6690
+
6435
6691
  d3.transition(g.select('.nv-context .nv-y.nv-axis'))
6436
6692
  .call(y2Axis);
6437
6693
  }
6438
-
6694
+
6439
6695
  g.select('.nv-context .nv-x.nv-axis')
6440
6696
  .attr('transform', 'translate(0,' + y2.range()[0] + ')');
6441
6697
  }
@@ -6491,11 +6747,13 @@ nv.models.lineChart = function() {
6491
6747
  allData[indexToHighlight].highlight = true;
6492
6748
  }
6493
6749
 
6750
+ var defaultValueFormatter = function(d,i) {
6751
+ return d == null ? "N/A" : yAxis.tickFormat()(d);
6752
+ };
6753
+
6494
6754
  interactiveLayer.tooltip
6495
6755
  .chartContainer(chart.container.parentNode)
6496
- .valueFormatter(function(d,i) {
6497
- return d === null ? "N/A" : yAxis.tickFormat()(d);
6498
- })
6756
+ .valueFormatter(interactiveLayer.tooltip.valueFormatter() || defaultValueFormatter)
6499
6757
  .data({
6500
6758
  value: chart.x()( singlePoint,pointIndex ),
6501
6759
  index: pointIndex,
@@ -6549,7 +6807,7 @@ nv.models.lineChart = function() {
6549
6807
  //============================================================
6550
6808
  // Functions
6551
6809
  //------------------------------------------------------------
6552
-
6810
+
6553
6811
  // Taken from crossfilter (http://square.github.com/crossfilter/)
6554
6812
  function resizePath(d) {
6555
6813
  var e = +(d == 'e'),
@@ -6565,8 +6823,8 @@ nv.models.lineChart = function() {
6565
6823
  + 'M' + (4.5 * x) + ',' + (y + 8)
6566
6824
  + 'V' + (2 * y - 8);
6567
6825
  }
6568
-
6569
-
6826
+
6827
+
6570
6828
  function updateBrushBG() {
6571
6829
  if (!brush.empty()) brush.extent(brushExtent);
6572
6830
  brushBG
@@ -6576,28 +6834,28 @@ nv.models.lineChart = function() {
6576
6834
  rightWidth = availableWidth - x2(d[1]);
6577
6835
  d3.select(this).select('.left')
6578
6836
  .attr('width', leftWidth < 0 ? 0 : leftWidth);
6579
-
6837
+
6580
6838
  d3.select(this).select('.right')
6581
6839
  .attr('x', x2(d[1]))
6582
6840
  .attr('width', rightWidth < 0 ? 0 : rightWidth);
6583
6841
  });
6584
6842
  }
6585
-
6586
-
6843
+
6844
+
6587
6845
  function onBrush() {
6588
6846
  brushExtent = brush.empty() ? null : brush.extent();
6589
6847
  var extent = brush.empty() ? x2.domain() : brush.extent();
6590
-
6848
+
6591
6849
  //The brush extent cannot be less than one. If it is, don't update the line chart.
6592
6850
  if (Math.abs(extent[0] - extent[1]) <= 1) {
6593
6851
  return;
6594
6852
  }
6595
-
6853
+
6596
6854
  dispatch.brush({extent: extent, brush: brush});
6597
-
6598
-
6855
+
6856
+
6599
6857
  updateBrushBG();
6600
-
6858
+
6601
6859
  // Update Main (Focus)
6602
6860
  var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
6603
6861
  .datum(
@@ -6616,8 +6874,8 @@ nv.models.lineChart = function() {
6616
6874
  })
6617
6875
  );
6618
6876
  focusLinesWrap.transition().duration(duration).call(lines);
6619
-
6620
-
6877
+
6878
+
6621
6879
  // Update Main (Focus) Axes
6622
6880
  updateXAxis();
6623
6881
  updateYAxis();
@@ -6669,6 +6927,7 @@ nv.models.lineChart = function() {
6669
6927
  width: {get: function(){return width;}, set: function(_){width=_;}},
6670
6928
  height: {get: function(){return height;}, set: function(_){height=_;}},
6671
6929
  showLegend: {get: function(){return showLegend;}, set: function(_){showLegend=_;}},
6930
+ legendPosition: {get: function(){return legendPosition;}, set: function(_){legendPosition=_;}},
6672
6931
  showXAxis: {get: function(){return showXAxis;}, set: function(_){showXAxis=_;}},
6673
6932
  showYAxis: {get: function(){return showYAxis;}, set: function(_){showYAxis=_;}},
6674
6933
  focusEnable: {get: function(){return focusEnable;}, set: function(_){focusEnable=_;}},
@@ -6747,10 +7006,9 @@ nv.models.lineChart = function() {
6747
7006
 
6748
7007
  nv.models.lineWithFocusChart = function() {
6749
7008
  return nv.models.lineChart()
6750
- .margin({ bottom: 30 })
7009
+ .margin({ bottom: 30 })
6751
7010
  .focusEnable( true );
6752
- };
6753
- nv.models.linePlusBarChart = function() {
7011
+ };nv.models.linePlusBarChart = function() {
6754
7012
  "use strict";
6755
7013
 
6756
7014
  //============================================================
@@ -6822,15 +7080,15 @@ nv.models.linePlusBarChart = function() {
6822
7080
  //------------------------------------------------------------
6823
7081
 
6824
7082
  var getBarsAxis = function() {
6825
- return switchYAxisOrder
6826
- ? { main: y1Axis, focus: y3Axis }
6827
- : { main: y2Axis, focus: y4Axis }
7083
+ return !switchYAxisOrder
7084
+ ? { main: y2Axis, focus: y4Axis }
7085
+ : { main: y1Axis, focus: y3Axis }
6828
7086
  }
6829
7087
 
6830
7088
  var getLinesAxis = function() {
6831
- return switchYAxisOrder
6832
- ? { main: y2Axis, focus: y4Axis }
6833
- : { main: y1Axis, focus: y3Axis }
7089
+ return !switchYAxisOrder
7090
+ ? { main: y1Axis, focus: y3Axis }
7091
+ : { main: y2Axis, focus: y4Axis }
6834
7092
  }
6835
7093
 
6836
7094
  var stateGetter = function(data) {
@@ -6900,7 +7158,12 @@ nv.models.linePlusBarChart = function() {
6900
7158
  var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
6901
7159
  var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
6902
7160
 
6903
- x = bars.xScale();
7161
+ if (dataBars.length && !switchYAxisOrder) {
7162
+ x = bars.xScale();
7163
+ } else {
7164
+ x = lines.xScale();
7165
+ }
7166
+
6904
7167
  x2 = x2Axis.scale();
6905
7168
 
6906
7169
  // select the scales and series based on the position of the yAxis
@@ -6959,7 +7222,9 @@ nv.models.linePlusBarChart = function() {
6959
7222
  // Legend
6960
7223
  //------------------------------------------------------------
6961
7224
 
6962
- if (showLegend) {
7225
+ if (!showLegend) {
7226
+ g.select('.nv-legendWrap').selectAll('*').remove();
7227
+ } else {
6963
7228
  var legendWidth = legend.align() ? availableWidth / 2 : availableWidth;
6964
7229
  var legendXPosition = legend.align() ? legendWidth : 0;
6965
7230
 
@@ -7234,8 +7499,14 @@ nv.models.linePlusBarChart = function() {
7234
7499
  .tickSize(-availableWidth, 0);
7235
7500
  y2Axis
7236
7501
  .scale(y2)
7237
- ._ticks( nv.utils.calcTicksY(availableHeight1/36, data) )
7238
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
7502
+ ._ticks( nv.utils.calcTicksY(availableHeight1/36, data) );
7503
+
7504
+ // Show the y2 rules only if y1 has none
7505
+ if(!switchYAxisOrder) {
7506
+ y2Axis.tickSize(dataBars.length ? 0 : -availableWidth, 0);
7507
+ } else {
7508
+ y2Axis.tickSize(dataLines.length ? 0 : -availableWidth, 0);
7509
+ }
7239
7510
 
7240
7511
  // Calculate opacity of the axis
7241
7512
  var barsOpacity = dataBars.length ? 1 : 0;
@@ -7379,11 +7650,20 @@ nv.models.linePlusBarChart = function() {
7379
7650
  switchYAxisOrder: {get: function(){return switchYAxisOrder;}, set: function(_){
7380
7651
  // Switch the tick format for the yAxis
7381
7652
  if(switchYAxisOrder !== _) {
7382
- var tickFormat = y1Axis.tickFormat();
7383
- y1Axis.tickFormat(y2Axis.tickFormat());
7384
- y2Axis.tickFormat(tickFormat);
7653
+ var y1 = y1Axis;
7654
+ y1Axis = y2Axis;
7655
+ y2Axis = y1;
7656
+
7657
+ var y3 = y3Axis;
7658
+ y3Axis = y4Axis;
7659
+ y4Axis = y3;
7385
7660
  }
7386
7661
  switchYAxisOrder=_;
7662
+
7663
+ y1Axis.orient('left');
7664
+ y2Axis.orient('right');
7665
+ y3Axis.orient('left');
7666
+ y4Axis.orient('right');
7387
7667
  }}
7388
7668
  });
7389
7669
 
@@ -7495,7 +7775,7 @@ nv.models.multiBar = function() {
7495
7775
  });
7496
7776
 
7497
7777
  // HACK for negative value stacking
7498
- if (stacked) {
7778
+ if (stacked && data.length > 0) {
7499
7779
  data[0].values.map(function(d,i) {
7500
7780
  var posBase = 0, negBase = 0;
7501
7781
  data.map(function(d, idx) {
@@ -7819,7 +8099,8 @@ nv.models.multiBar = function() {
7819
8099
  nv.utils.initOptions(chart);
7820
8100
 
7821
8101
  return chart;
7822
- };nv.models.multiBarChart = function() {
8102
+ };
8103
+ nv.models.multiBarChart = function() {
7823
8104
  "use strict";
7824
8105
 
7825
8106
  //============================================================
@@ -7979,7 +8260,9 @@ nv.models.multiBar = function() {
7979
8260
  gEnter.append('g').attr('class', 'nv-interactive');
7980
8261
 
7981
8262
  // Legend
7982
- if (showLegend) {
8263
+ if (!showLegend) {
8264
+ g.select('.nv-legendWrap').selectAll('*').remove();
8265
+ } else {
7983
8266
  legend.width(availableWidth - controlWidth());
7984
8267
 
7985
8268
  g.select('.nv-legendWrap')
@@ -7996,7 +8279,9 @@ nv.models.multiBar = function() {
7996
8279
  }
7997
8280
 
7998
8281
  // Controls
7999
- if (showControls) {
8282
+ if (!showControls) {
8283
+ g.select('.nv-controlsWrap').selectAll('*').remove();
8284
+ } else {
8000
8285
  var controlsData = [
8001
8286
  { key: controlLabels.grouped || 'Grouped', disabled: multibar.stacked() },
8002
8287
  { key: controlLabels.stacked || 'Stacked', disabled: !multibar.stacked() }
@@ -8480,10 +8765,13 @@ nv.models.multiBarHorizontal = function() {
8480
8765
  });
8481
8766
  })
8482
8767
  .on('click', function(d,i) {
8768
+ var element = this;
8483
8769
  dispatch.elementClick({
8484
8770
  data: d,
8485
8771
  index: i,
8486
- color: d3.select(this).style("fill")
8772
+ color: d3.select(this).style("fill"),
8773
+ event: d3.event,
8774
+ element: element
8487
8775
  });
8488
8776
  d3.event.stopPropagation();
8489
8777
  })
@@ -8807,7 +9095,9 @@ nv.models.multiBarHorizontalChart = function() {
8807
9095
  gEnter.append('g').attr('class', 'nv-controlsWrap');
8808
9096
 
8809
9097
  // Legend
8810
- if (showLegend) {
9098
+ if (!showLegend) {
9099
+ g.select('.nv-legendWrap').selectAll('*').remove();
9100
+ } else {
8811
9101
  legend.width(availableWidth - controlWidth());
8812
9102
 
8813
9103
  g.select('.nv-legendWrap')
@@ -8824,7 +9114,9 @@ nv.models.multiBarHorizontalChart = function() {
8824
9114
  }
8825
9115
 
8826
9116
  // Controls
8827
- if (showControls) {
9117
+ if (!showControls) {
9118
+ g.select('.nv-controlsWrap').selectAll('*').remove();
9119
+ } else {
8828
9120
  var controlsData = [
8829
9121
  { key: controlLabels.grouped || 'Grouped', disabled: multibar.stacked() },
8830
9122
  { key: controlLabels.stacked || 'Stacked', disabled: !multibar.stacked() }
@@ -9044,7 +9336,7 @@ nv.models.multiChart = function() {
9044
9336
  yDomain2,
9045
9337
  getX = function(d) { return d.x },
9046
9338
  getY = function(d) { return d.y},
9047
- interpolate = 'monotone',
9339
+ interpolate = 'linear',
9048
9340
  useVoronoi = true,
9049
9341
  interactiveLayer = nv.interactiveGuideline(),
9050
9342
  useInteractiveGuideline = false,
@@ -9124,7 +9416,7 @@ nv.models.multiChart = function() {
9124
9416
  })
9125
9417
  });
9126
9418
 
9127
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return getX(d) }))
9419
+ x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x }))
9128
9420
  .range([0, availableWidth]);
9129
9421
 
9130
9422
  var wrap = container.selectAll('g.wrap.multiChart').data([data]);
@@ -9150,7 +9442,10 @@ nv.models.multiChart = function() {
9150
9442
  return data[i].color || color(d, i);
9151
9443
  });
9152
9444
 
9153
- if (showLegend) {
9445
+ // Legend
9446
+ if (!showLegend) {
9447
+ g.select('.legendWrap').selectAll('*').remove();
9448
+ } else {
9154
9449
  var legendWidth = legend.align() ? availableWidth / 2 : availableWidth;
9155
9450
  var legendXPosition = legend.align() ? legendWidth : 0;
9156
9451
 
@@ -9203,10 +9498,12 @@ nv.models.multiChart = function() {
9203
9498
  stack1
9204
9499
  .width(availableWidth)
9205
9500
  .height(availableHeight)
9501
+ .interpolate(interpolate)
9206
9502
  .color(color_array.filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
9207
9503
  stack2
9208
9504
  .width(availableWidth)
9209
9505
  .height(availableHeight)
9506
+ .interpolate(interpolate)
9210
9507
  .color(color_array.filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
9211
9508
 
9212
9509
  g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
@@ -9323,6 +9620,9 @@ nv.models.multiChart = function() {
9323
9620
  };
9324
9621
  tooltip
9325
9622
  .duration(0)
9623
+ .headerFormatter(function(d, i) {
9624
+ return xAxis.tickFormat()(d, i);
9625
+ })
9326
9626
  .valueFormatter(function(d, i) {
9327
9627
  return yaxis.tickFormat()(d, i);
9328
9628
  })
@@ -9340,6 +9640,9 @@ nv.models.multiChart = function() {
9340
9640
  };
9341
9641
  tooltip
9342
9642
  .duration(100)
9643
+ .headerFormatter(function(d, i) {
9644
+ return xAxis.tickFormat()(d, i);
9645
+ })
9343
9646
  .valueFormatter(function(d, i) {
9344
9647
  return yaxis.tickFormat()(d, i);
9345
9648
  })
@@ -9353,6 +9656,9 @@ nv.models.multiChart = function() {
9353
9656
  evt.point['y'] = stack1.y()(evt.point);
9354
9657
  tooltip
9355
9658
  .duration(0)
9659
+ .headerFormatter(function(d, i) {
9660
+ return xAxis.tickFormat()(d, i);
9661
+ })
9356
9662
  .valueFormatter(function(d, i) {
9357
9663
  return yaxis.tickFormat()(d, i);
9358
9664
  })
@@ -9371,6 +9677,9 @@ nv.models.multiChart = function() {
9371
9677
  };
9372
9678
  tooltip
9373
9679
  .duration(0)
9680
+ .headerFormatter(function(d, i) {
9681
+ return xAxis.tickFormat()(d, i);
9682
+ })
9374
9683
  .valueFormatter(function(d, i) {
9375
9684
  return yaxis.tickFormat()(d, i);
9376
9685
  })
@@ -9433,6 +9742,9 @@ nv.models.multiChart = function() {
9433
9742
 
9434
9743
  interactiveLayer.tooltip
9435
9744
  .chartContainer(chart.container.parentNode)
9745
+ .headerFormatter(function(d, i) {
9746
+ return xAxis.tickFormat()(d, i);
9747
+ })
9436
9748
  .valueFormatter(function(d,i) {
9437
9749
  var yAxis = allData[i].yAxis;
9438
9750
  return d === null ? "N/A" : yAxis.tickFormat()(d);
@@ -9835,8 +10147,11 @@ nv.models.parallelCoordinates = function() {
9835
10147
  var margin = {top: 30, right: 0, bottom: 10, left: 0}
9836
10148
  , width = null
9837
10149
  , height = null
10150
+ , availableWidth = null
10151
+ , availableHeight = null
9838
10152
  , x = d3.scale.ordinal()
9839
10153
  , y = {}
10154
+ , undefinedValuesLabel = "undefined values"
9840
10155
  , dimensionData = []
9841
10156
  , enabledDimensions = []
9842
10157
  , dimensionNames = []
@@ -9859,19 +10174,17 @@ nv.models.parallelCoordinates = function() {
9859
10174
  // Private Variables
9860
10175
  //------------------------------------------------------------
9861
10176
 
9862
-
9863
10177
  var renderWatch = nv.utils.renderWatch(dispatch);
9864
10178
 
9865
10179
  function chart(selection) {
9866
10180
  renderWatch.reset();
9867
10181
  selection.each(function(data) {
9868
10182
  var container = d3.select(this);
9869
- var availableWidth = nv.utils.availableWidth(width, container, margin),
9870
- availableHeight = nv.utils.availableHeight(height, container, margin);
10183
+ availableWidth = nv.utils.availableWidth(width, container, margin);
10184
+ availableHeight = nv.utils.availableHeight(height, container, margin);
9871
10185
 
9872
10186
  nv.utils.initSVG(container);
9873
10187
 
9874
-
9875
10188
  //Convert old data to new format (name, values)
9876
10189
  if (data[0].values === undefined) {
9877
10190
  var newData = [];
@@ -9888,11 +10201,10 @@ nv.models.parallelCoordinates = function() {
9888
10201
  if (active.length === 0) {
9889
10202
  active = data;
9890
10203
  }; //set all active before first brush call
9891
-
10204
+
9892
10205
  dimensionNames = dimensionData.sort(function (a, b) { return a.currentPosition - b.currentPosition; }).map(function (d) { return d.key });
9893
10206
  enabledDimensions = dimensionData.filter(function (d) { return !d.disabled; });
9894
-
9895
-
10207
+
9896
10208
  // Setup Scales
9897
10209
  x.rangePoints([0, availableWidth], 1).domain(enabledDimensions.map(function (d) { return d.key; }));
9898
10210
 
@@ -9900,7 +10212,8 @@ nv.models.parallelCoordinates = function() {
9900
10212
  // Extract the list of dimensions and create a scale for each.
9901
10213
  var oldDomainMaxValue = {};
9902
10214
  var displayMissingValuesline = false;
9903
-
10215
+ var currentTicks = [];
10216
+
9904
10217
  dimensionNames.forEach(function(d) {
9905
10218
  var extent = d3.extent(dataValues, function (p) { return +p[d]; });
9906
10219
  var min = extent[0];
@@ -9943,7 +10256,6 @@ nv.models.parallelCoordinates = function() {
9943
10256
  .range([(availableHeight - 12) * 0.9, 0]);
9944
10257
 
9945
10258
  axisWithUndefinedValues = [];
9946
-
9947
10259
  y[d].brush = d3.svg.brush().y(y[d]).on('brushstart', brushstart).on('brush', brush).on('brushend', brushend);
9948
10260
  });
9949
10261
 
@@ -9978,10 +10290,10 @@ nv.models.parallelCoordinates = function() {
9978
10290
  .attr("y1", function(d) { return d[1]; })
9979
10291
  .attr("x2", function(d) { return d[2]; })
9980
10292
  .attr("y2", function(d) { return d[3]; });
9981
-
10293
+
9982
10294
  //Add the text "undefined values" under the missing value line
9983
- missingValueslineText = wrap.select('.missingValuesline').selectAll('text').data(["undefined values"]);
9984
- missingValueslineText.append('text').data(["undefined values"]);
10295
+ missingValueslineText = wrap.select('.missingValuesline').selectAll('text').data([undefinedValuesLabel]);
10296
+ missingValueslineText.append('text').data([undefinedValuesLabel]);
9985
10297
  missingValueslineText.enter().append('text');
9986
10298
  missingValueslineText.exit().remove();
9987
10299
  missingValueslineText.attr("y", availableHeight)
@@ -10007,7 +10319,9 @@ nv.models.parallelCoordinates = function() {
10007
10319
  d3.select(this).classed('hover', true).style("stroke-width", d.strokeWidth + 2 + "px").style("stroke-opacity", 1);
10008
10320
  dispatch.elementMouseover({
10009
10321
  label: d.name,
10010
- color: d.color || color(d, i)
10322
+ color: d.color || color(d, i),
10323
+ values: d.values,
10324
+ dimensions: enabledDimensions
10011
10325
  });
10012
10326
 
10013
10327
  });
@@ -10035,13 +10349,14 @@ nv.models.parallelCoordinates = function() {
10035
10349
 
10036
10350
  // Add an axis and title.
10037
10351
  dimensionsEnter.append('text')
10038
- .attr('class', 'nv-label')
10352
+ .attr('class', 'nv-label')
10039
10353
  .style("cursor", "move")
10040
10354
  .attr('dy', '-1em')
10041
10355
  .attr('text-anchor', 'middle')
10042
10356
  .on("mouseover", function(d, i) {
10043
10357
  dispatch.elementMouseover({
10044
- label: d.tooltip || d.key
10358
+ label: d.tooltip || d.key,
10359
+ color: d.color
10045
10360
  });
10046
10361
  })
10047
10362
  .on("mouseout", function(d, i) {
@@ -10057,10 +10372,6 @@ nv.models.parallelCoordinates = function() {
10057
10372
  dimensionsEnter.append('g').attr('class', 'nv-brushBackground');
10058
10373
  dimensions.exit().remove();
10059
10374
  dimensions.select('.nv-label').text(function (d) { return d.key });
10060
- dimensions.select('.nv-axis')
10061
- .each(function (d, i) {
10062
- d3.select(this).call(axis.scale(y[d.key]).tickFormat(d3.format(d.format)));
10063
- });
10064
10375
 
10065
10376
  // Add and store a brush for each axis.
10066
10377
  restoreBrush(displayBrush);
@@ -10136,29 +10447,32 @@ nv.models.parallelCoordinates = function() {
10136
10447
  if (visible)
10137
10448
  y[f.dimension].brush.extent(f.extent);
10138
10449
  });
10139
-
10450
+
10140
10451
  dimensions.select('.nv-brushBackground')
10141
- .each(function (d) {
10142
- d3.select(this).call(y[d.key].brush);
10452
+ .each(function (d) {
10453
+ d3.select(this).call(y[d.key].brush);
10143
10454
 
10144
- })
10145
- .selectAll('rect')
10146
- .attr('x', -8)
10147
- .attr('width', 16);
10455
+ })
10456
+ .selectAll('rect')
10457
+ .attr('x', -8)
10458
+ .attr('width', 16);
10459
+
10460
+ updateTicks();
10148
10461
  }
10149
-
10462
+
10150
10463
  // Handles a brush event, toggling the display of foreground lines.
10151
10464
  function brushstart() {
10152
10465
  //If brush aren't visible, show it before brushing again.
10153
10466
  if (displayBrush === false) {
10467
+ displayBrush = true;
10154
10468
  restoreBrush(true);
10155
10469
  }
10156
10470
  }
10157
-
10471
+
10158
10472
  // Handles a brush event, toggling the display of foreground lines.
10159
10473
  function brush() {
10160
- actives = dimensionNames.filter(function (p) { return !y[p].brush.empty(); }),
10161
- extents = actives.map(function(p) { return y[p].brush.extent(); });
10474
+ actives = dimensionNames.filter(function (p) { return !y[p].brush.empty(); });
10475
+ extents = actives.map(function(p) { return y[p].brush.extent(); });
10162
10476
 
10163
10477
  filters = []; //erase current filters
10164
10478
  actives.forEach(function(d,i) {
@@ -10179,7 +10493,9 @@ nv.models.parallelCoordinates = function() {
10179
10493
  if (isActive) active.push(d);
10180
10494
  return isActive ? null : 'none';
10181
10495
  });
10182
-
10496
+
10497
+ updateTicks();
10498
+
10183
10499
  dispatch.brush({
10184
10500
  filters: filters,
10185
10501
  active: active
@@ -10194,13 +10510,30 @@ nv.models.parallelCoordinates = function() {
10194
10510
  f.hasOnlyNaN = true;
10195
10511
  });
10196
10512
  dispatch.brushEnd(active, hasActiveBrush);
10513
+ }
10514
+ function updateTicks() {
10515
+ dimensions.select('.nv-axis')
10516
+ .each(function (d, i) {
10517
+ var f = filters.filter(function (k) { return k.dimension == d.key; });
10518
+ currentTicks[d.key] = y[d.key].domain();
10519
+
10520
+ //If brush are available, display brush extent
10521
+ if (f.length != 0 && displayBrush)
10522
+ {
10523
+ currentTicks[d.key] = [];
10524
+ if (f[0].extent[1] > y[d.key].domain()[0])
10525
+ currentTicks[d.key] = [f[0].extent[1]];
10526
+ if (f[0].extent[0] >= y[d.key].domain()[0])
10527
+ currentTicks[d.key].push(f[0].extent[0]);
10528
+ }
10529
+
10530
+ d3.select(this).call(axis.scale(y[d.key]).tickFormat(d.format).tickValues(currentTicks[d.key]));
10531
+ });
10197
10532
  }
10198
10533
  function dragStart(d) {
10199
10534
  dragging[d.key] = this.parentNode.__origin__ = x(d.key);
10200
10535
  background.attr("visibility", "hidden");
10201
-
10202
10536
  }
10203
-
10204
10537
  function dragMove(d) {
10205
10538
  dragging[d.key] = Math.min(availableWidth, Math.max(0, this.parentNode.__origin__ += d3.event.x));
10206
10539
  foreground.attr("d", path);
@@ -10209,7 +10542,6 @@ nv.models.parallelCoordinates = function() {
10209
10542
  x.domain(enabledDimensions.map(function (d) { return d.key; }));
10210
10543
  dimensions.attr("transform", function(d) { return "translate(" + dimensionPosition(d.key) + ")"; });
10211
10544
  }
10212
-
10213
10545
  function dragEnd(d, i) {
10214
10546
  delete this.parentNode.__origin__;
10215
10547
  delete dragging[d.key];
@@ -10222,22 +10554,11 @@ nv.models.parallelCoordinates = function() {
10222
10554
 
10223
10555
  dispatch.dimensionsOrder(enabledDimensions);
10224
10556
  }
10225
- function resetBrush() {
10226
- filters = [];
10227
- active = [];
10228
- dispatch.stateChange();
10229
- }
10230
- function resetDrag() {
10231
- dimensionName.map(function (d, i) { return d.currentPosition = d.originalPosition; });
10232
- dispatch.stateChange();
10233
- }
10234
-
10235
10557
  function dimensionPosition(d) {
10236
10558
  var v = dragging[d];
10237
10559
  return v == null ? x(d) : v;
10238
10560
  }
10239
10561
  });
10240
-
10241
10562
  return chart;
10242
10563
  }
10243
10564
 
@@ -10257,7 +10578,8 @@ nv.models.parallelCoordinates = function() {
10257
10578
  filters: { get: function () { return filters; }, set: function (_) { filters = _; } },
10258
10579
  active: { get: function () { return active; }, set: function (_) { active = _; } },
10259
10580
  lineTension: {get: function(){return lineTension;}, set: function(_){lineTension = _;}},
10260
-
10581
+ undefinedValuesLabel : {get: function(){return undefinedValuesLabel;}, set: function(_){undefinedValuesLabel=_;}},
10582
+
10261
10583
  // deprecated options
10262
10584
  dimensions: {get: function () { return dimensionData.map(function (d){return d.key}); }, set: function (_) {
10263
10585
  // deprecated after 1.8.1
@@ -10267,8 +10589,7 @@ nv.models.parallelCoordinates = function() {
10267
10589
  } else {
10268
10590
  _.forEach(function (k, i) { dimensionData[i].key= k })
10269
10591
  }
10270
- }
10271
- },
10592
+ }},
10272
10593
  dimensionNames: {get: function () { return dimensionData.map(function (d){return d.key}); }, set: function (_) {
10273
10594
  // deprecated after 1.8.1
10274
10595
  nv.deprecated('dimensionNames', 'use dimensionData instead');
@@ -10278,7 +10599,7 @@ nv.models.parallelCoordinates = function() {
10278
10599
  } else {
10279
10600
  _.forEach(function (k, i) { dimensionData[i].key = k })
10280
10601
  }
10281
-
10602
+
10282
10603
  }},
10283
10604
  dimensionFormats: {get: function () { return dimensionData.map(function (d) { return d.format }); }, set: function (_) {
10284
10605
  // deprecated after 1.8.1
@@ -10290,7 +10611,6 @@ nv.models.parallelCoordinates = function() {
10290
10611
  }
10291
10612
 
10292
10613
  }},
10293
-
10294
10614
  // options that require extra logic in the setter
10295
10615
  margin: {get: function(){return margin;}, set: function(_){
10296
10616
  margin.top = _.top !== undefined ? _.top : margin.top;
@@ -10302,7 +10622,6 @@ nv.models.parallelCoordinates = function() {
10302
10622
  color = nv.utils.getColor(_);
10303
10623
  }}
10304
10624
  });
10305
-
10306
10625
  nv.utils.initOptions(chart);
10307
10626
  return chart;
10308
10627
  };
@@ -10324,16 +10643,16 @@ nv.models.parallelCoordinatesChart = function () {
10324
10643
  , color = nv.utils.defaultColor()
10325
10644
  , state = nv.utils.state()
10326
10645
  , dimensionData = []
10327
- , dimensionNames = []
10328
10646
  , displayBrush = true
10329
10647
  , defaultState = null
10330
10648
  , noData = null
10649
+ , nanValue = "undefined"
10331
10650
  , dispatch = d3.dispatch('dimensionsOrder', 'brushEnd', 'stateChange', 'changeState', 'renderEnd')
10332
10651
  , controlWidth = function () { return showControls ? 180 : 0 }
10333
10652
  ;
10334
10653
 
10335
10654
  //============================================================
10336
-
10655
+
10337
10656
  //============================================================
10338
10657
  // Private Variables
10339
10658
  //------------------------------------------------------------
@@ -10358,6 +10677,20 @@ nv.models.parallelCoordinatesChart = function () {
10358
10677
  }
10359
10678
  };
10360
10679
 
10680
+ tooltip.contentGenerator(function(data) {
10681
+ var str = '<table><thead><tr><td class="legend-color-guide"><div style="background-color:' + data.color + '"></div></td><td><strong>' + data.key + '</strong></td></tr></thead>';
10682
+ if(data.series.length !== 0)
10683
+ {
10684
+ str = str + '<tbody><tr><td height ="10px"></td></tr>';
10685
+ data.series.forEach(function(d){
10686
+ str = str + '<tr><td class="legend-color-guide"><div style="background-color:' + d.color + '"></div></td><td class="key">' + d.key + '</td><td class="value">' + d.value + '</td></tr>';
10687
+ });
10688
+ str = str + '</tbody>';
10689
+ }
10690
+ str = str + '</table>';
10691
+ return str;
10692
+ });
10693
+
10361
10694
  //============================================================
10362
10695
  // Chart function
10363
10696
  //------------------------------------------------------------
@@ -10392,21 +10725,6 @@ nv.models.parallelCoordinatesChart = function () {
10392
10725
  d.currentPosition = isNaN(d.currentPosition) ? i : d.currentPosition;
10393
10726
  });
10394
10727
 
10395
- var currentDimensions = dimensionNames.map(function (d) { return d.key; });
10396
- var newDimensions = dimensionData.map(function (d) { return d.key; });
10397
- dimensionData.forEach(function (k, i) {
10398
- var idx = currentDimensions.indexOf(k.key);
10399
- if (idx < 0) {
10400
- dimensionNames.splice(i, 0, k);
10401
- } else {
10402
- var gap = dimensionNames[idx].currentPosition - dimensionNames[idx].originalPosition;
10403
- dimensionNames[idx].originalPosition = k.originalPosition;
10404
- dimensionNames[idx].currentPosition = k.originalPosition + gap;
10405
- }
10406
- });
10407
- //Remove old dimensions
10408
- dimensionNames = dimensionNames.filter(function (d) { return newDimensions.indexOf(d.key) >= 0; });
10409
-
10410
10728
  if (!defaultState) {
10411
10729
  var key;
10412
10730
  defaultState = {};
@@ -10425,7 +10743,7 @@ nv.models.parallelCoordinatesChart = function () {
10425
10743
  } else {
10426
10744
  container.selectAll('.nv-noData').remove();
10427
10745
  }
10428
-
10746
+
10429
10747
  //------------------------------------------------------------
10430
10748
  // Setup containers and skeleton of chart
10431
10749
 
@@ -10433,7 +10751,7 @@ nv.models.parallelCoordinatesChart = function () {
10433
10751
  var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-parallelCoordinatesChart').append('g');
10434
10752
 
10435
10753
  var g = wrap.select('g');
10436
-
10754
+
10437
10755
  gEnter.append('g').attr('class', 'nv-parallelCoordinatesWrap');
10438
10756
  gEnter.append('g').attr('class', 'nv-legendWrap');
10439
10757
 
@@ -10442,12 +10760,14 @@ nv.models.parallelCoordinatesChart = function () {
10442
10760
  .attr("height", (availableHeight > 0) ? availableHeight : 0);
10443
10761
 
10444
10762
  // Legend
10445
- if (showLegend) {
10763
+ if (!showLegend) {
10764
+ g.select('.nv-legendWrap').selectAll('*').remove();
10765
+ } else {
10446
10766
  legend.width(availableWidth)
10447
10767
  .color(function (d) { return "rgb(188,190,192)"; });
10448
10768
 
10449
10769
  g.select('.nv-legendWrap')
10450
- .datum(dimensionNames.sort(function (a, b) { return a.originalPosition - b.originalPosition; }))
10770
+ .datum(dimensionData.sort(function (a, b) { return a.originalPosition - b.originalPosition; }))
10451
10771
  .call(legend);
10452
10772
 
10453
10773
  if (margin.top != legend.height()) {
@@ -10459,21 +10779,18 @@ nv.models.parallelCoordinatesChart = function () {
10459
10779
  }
10460
10780
  wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
10461
10781
 
10462
-
10463
-
10464
-
10465
10782
  // Main Chart Component(s)
10466
10783
  parallelCoordinates
10467
10784
  .width(availableWidth)
10468
10785
  .height(availableHeight)
10469
- .dimensionData(dimensionNames)
10786
+ .dimensionData(dimensionData)
10470
10787
  .displayBrush(displayBrush);
10471
-
10788
+
10472
10789
  var parallelCoordinatesWrap = g.select('.nv-parallelCoordinatesWrap ')
10473
10790
  .datum(data);
10474
10791
 
10475
10792
  parallelCoordinatesWrap.transition().call(parallelCoordinates);
10476
-
10793
+
10477
10794
  //============================================================
10478
10795
  // Event Handling/Dispatching (in chart's scope)
10479
10796
  //------------------------------------------------------------
@@ -10498,21 +10815,21 @@ nv.models.parallelCoordinatesChart = function () {
10498
10815
 
10499
10816
  //Update dimensions order and display reset sorting button
10500
10817
  parallelCoordinates.dispatch.on('dimensionsOrder', function (e) {
10501
- dimensionNames.sort(function (a, b) { return a.currentPosition - b.currentPosition; });
10818
+ dimensionData.sort(function (a, b) { return a.currentPosition - b.currentPosition; });
10502
10819
  var isSorted = false;
10503
- dimensionNames.forEach(function (d, i) {
10820
+ dimensionData.forEach(function (d, i) {
10504
10821
  d.currentPosition = i;
10505
10822
  if (d.currentPosition !== d.originalPosition)
10506
10823
  isSorted = true;
10507
10824
  });
10508
- dispatch.dimensionsOrder(dimensionNames, isSorted);
10825
+ dispatch.dimensionsOrder(dimensionData, isSorted);
10509
10826
  });
10510
10827
 
10511
10828
  // Update chart from a state object passed to event handler
10512
10829
  dispatch.on('changeState', function (e) {
10513
10830
 
10514
10831
  if (typeof e.disabled !== 'undefined') {
10515
- dimensionNames.forEach(function (series, i) {
10832
+ dimensionData.forEach(function (series, i) {
10516
10833
  series.disabled = e.disabled[i];
10517
10834
  });
10518
10835
  state.disabled = e.disabled;
@@ -10530,11 +10847,27 @@ nv.models.parallelCoordinatesChart = function () {
10530
10847
  //------------------------------------------------------------
10531
10848
 
10532
10849
  parallelCoordinates.dispatch.on('elementMouseover.tooltip', function (evt) {
10533
- evt['series'] = {
10850
+ var tp = {
10534
10851
  key: evt.label,
10535
- color: evt.color
10536
- };
10537
- tooltip.data(evt).hidden(false);
10852
+ color: evt.color,
10853
+ series: []
10854
+ }
10855
+ if(evt.values){
10856
+ Object.keys(evt.values).forEach(function (d) {
10857
+ var dim = evt.dimensions.filter(function (dd) {return dd.key === d;})[0];
10858
+ if(dim){
10859
+ var v;
10860
+ if (isNaN(evt.values[d]) || isNaN(parseFloat(evt.values[d]))) {
10861
+ v = nanValue;
10862
+ } else {
10863
+ v = dim.format(evt.values[d]);
10864
+ }
10865
+ tp.series.push({ idx: dim.currentPosition, key: d, value: v, color: dim.color });
10866
+ }
10867
+ });
10868
+ tp.series.sort(function(a,b) {return a.idx - b.idx});
10869
+ }
10870
+ tooltip.data(tp).hidden(false);
10538
10871
  });
10539
10872
 
10540
10873
  parallelCoordinates.dispatch.on('elementMouseout.tooltip', function(evt) {
@@ -10547,13 +10880,12 @@ nv.models.parallelCoordinatesChart = function () {
10547
10880
  //============================================================
10548
10881
  // Expose Public Variables
10549
10882
  //------------------------------------------------------------
10550
-
10883
+
10551
10884
  // expose chart's sub-components
10552
10885
  chart.dispatch = dispatch;
10553
10886
  chart.parallelCoordinates = parallelCoordinates;
10554
10887
  chart.legend = legend;
10555
10888
  chart.tooltip = tooltip;
10556
-
10557
10889
  chart.options = nv.utils.optionsFunc.bind(chart);
10558
10890
 
10559
10891
  chart._options = Object.create({}, {
@@ -10565,7 +10897,8 @@ nv.models.parallelCoordinatesChart = function () {
10565
10897
  dimensionData: { get: function () { return dimensionData; }, set: function (_) { dimensionData = _; } },
10566
10898
  displayBrush: { get: function () { return displayBrush; }, set: function (_) { displayBrush = _; } },
10567
10899
  noData: { get: function () { return noData; }, set: function (_) { noData = _; } },
10568
-
10900
+ nanValue: { get: function () { return nanValue; }, set: function (_) { nanValue = _; } },
10901
+
10569
10902
  // options that require extra logic in the setter
10570
10903
  margin: {
10571
10904
  get: function () { return margin; },
@@ -10587,7 +10920,8 @@ nv.models.parallelCoordinatesChart = function () {
10587
10920
  nv.utils.initOptions(chart);
10588
10921
 
10589
10922
  return chart;
10590
- };nv.models.pie = function() {
10923
+ };
10924
+ nv.models.pie = function() {
10591
10925
  "use strict";
10592
10926
 
10593
10927
  //============================================================
@@ -10649,9 +10983,15 @@ nv.models.parallelCoordinatesChart = function () {
10649
10983
  arcsRadiusInner.push(inner);
10650
10984
  }
10651
10985
  } else {
10652
- arcsRadiusOuter = arcsRadius.map(function (d) { return (d.outer - d.outer / 5) * radius; });
10653
- arcsRadiusInner = arcsRadius.map(function (d) { return (d.inner - d.inner / 5) * radius; });
10654
- donutRatio = d3.min(arcsRadius.map(function (d) { return (d.inner - d.inner / 5); }));
10986
+ if(growOnHover){
10987
+ arcsRadiusOuter = arcsRadius.map(function (d) { return (d.outer - d.outer / 5) * radius; });
10988
+ arcsRadiusInner = arcsRadius.map(function (d) { return (d.inner - d.inner / 5) * radius; });
10989
+ donutRatio = d3.min(arcsRadius.map(function (d) { return (d.inner - d.inner / 5); }));
10990
+ } else {
10991
+ arcsRadiusOuter = arcsRadius.map(function (d) { return d.outer * radius; });
10992
+ arcsRadiusInner = arcsRadius.map(function (d) { return d.inner * radius; });
10993
+ donutRatio = d3.min(arcsRadius.map(function (d) { return d.inner; }));
10994
+ }
10655
10995
  }
10656
10996
  nv.utils.initSVG(container);
10657
10997
 
@@ -11119,7 +11459,9 @@ nv.models.pieChart = function() {
11119
11459
  gEnter.append('g').attr('class', 'nv-legendWrap');
11120
11460
 
11121
11461
  // Legend
11122
- if (showLegend) {
11462
+ if (!showLegend) {
11463
+ g.select('.nv-legendWrap').selectAll('*').remove();
11464
+ } else {
11123
11465
  if (legendPosition === "top") {
11124
11466
  legend.width( availableWidth ).key(pie.x());
11125
11467
 
@@ -11219,6 +11561,8 @@ nv.models.pieChart = function() {
11219
11561
  // use Object get/set functionality to map between vars and chart functions
11220
11562
  chart._options = Object.create({}, {
11221
11563
  // simple options, just get/set the necessary values
11564
+ width: {get: function(){return width;}, set: function(_){width=_;}},
11565
+ height: {get: function(){return height;}, set: function(_){height=_;}},
11222
11566
  noData: {get: function(){return noData;}, set: function(_){noData=_;}},
11223
11567
  showLegend: {get: function(){return showLegend;}, set: function(_){showLegend=_;}},
11224
11568
  legendPosition: {get: function(){return legendPosition;}, set: function(_){legendPosition=_;}},
@@ -11288,6 +11632,7 @@ nv.models.scatter = function() {
11288
11632
  , useVoronoi = true
11289
11633
  , duration = 250
11290
11634
  , interactiveUpdateDelay = 300
11635
+ , showLabels = false
11291
11636
  ;
11292
11637
 
11293
11638
 
@@ -11300,8 +11645,34 @@ nv.models.scatter = function() {
11300
11645
  , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
11301
11646
  , renderWatch = nv.utils.renderWatch(dispatch, duration)
11302
11647
  , _sizeRange_def = [16, 256]
11648
+ , _caches
11303
11649
  ;
11304
11650
 
11651
+ function getCache(d) {
11652
+ var cache, i;
11653
+ cache = _caches = _caches || {};
11654
+ i = d[0].series;
11655
+ cache = cache[i] = cache[i] || {};
11656
+ i = d[1];
11657
+ cache = cache[i] = cache[i] || {};
11658
+ return cache;
11659
+ }
11660
+
11661
+ function getDiffs(d) {
11662
+ var i, key,
11663
+ point = d[0],
11664
+ cache = getCache(d),
11665
+ diffs = false;
11666
+ for (i = 1; i < arguments.length; i ++) {
11667
+ key = arguments[i];
11668
+ if (cache[key] !== point[key] || !cache.hasOwnProperty(key)) {
11669
+ cache[key] = point[key];
11670
+ diffs = true;
11671
+ }
11672
+ }
11673
+ return diffs;
11674
+ }
11675
+
11305
11676
  function chart(selection) {
11306
11677
  renderWatch.reset();
11307
11678
  selection.each(function(data) {
@@ -11319,6 +11690,7 @@ nv.models.scatter = function() {
11319
11690
  });
11320
11691
 
11321
11692
  // Setup Scales
11693
+ var logScale = chart.yScale().name === d3.scale.log().name ? true : false;
11322
11694
  // remap and flatten the data for use in calculating the scales' domains
11323
11695
  var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
11324
11696
  d3.merge(
@@ -11337,7 +11709,7 @@ nv.models.scatter = function() {
11337
11709
  else
11338
11710
  x.range(xRange || [0, availableWidth]);
11339
11711
 
11340
- if (chart.yScale().name === "o") {
11712
+ if (logScale) {
11341
11713
  var min = d3.min(seriesData.map(function(d) { if (d.y !== 0) return d.y; }));
11342
11714
  y.clamp(true)
11343
11715
  .domain(yDomain || d3.extent(seriesData.map(function(d) {
@@ -11378,6 +11750,8 @@ nv.models.scatter = function() {
11378
11750
  y0 = y0 || y;
11379
11751
  z0 = z0 || z;
11380
11752
 
11753
+ var scaleDiff = x(1) !== x0(1) || y(1) !== y0(1) || z(1) !== z0(1);
11754
+
11381
11755
  // Setup containers and skeleton of chart
11382
11756
  var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
11383
11757
  var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id);
@@ -11421,8 +11795,8 @@ nv.models.scatter = function() {
11421
11795
  var pX = getX(point,pointIndex);
11422
11796
  var pY = getY(point,pointIndex);
11423
11797
 
11424
- return [x(pX)+ Math.random() * 1e-4,
11425
- y(pY)+ Math.random() * 1e-4,
11798
+ return [nv.utils.NaNtoZero(x(pX))+ Math.random() * 1e-4,
11799
+ nv.utils.NaNtoZero(y(pY))+ Math.random() * 1e-4,
11426
11800
  groupIndex,
11427
11801
  pointIndex, point]; //temp hack to add noise until I think of a better way so there are no duplicates
11428
11802
  })
@@ -11621,6 +11995,7 @@ nv.models.scatter = function() {
11621
11995
  .attr('class', function(d,i) {
11622
11996
  return (d.classed || '') + ' nv-group nv-series-' + i;
11623
11997
  })
11998
+ .classed('nv-noninteractive', !interactive)
11624
11999
  .classed('hover', function(d) { return d.hover });
11625
12000
  groups.watchTransition(renderWatch, 'scatter: groups')
11626
12001
  .style('fill', function(d,i) { return color(d, i) })
@@ -11640,6 +12015,9 @@ nv.models.scatter = function() {
11640
12015
  })
11641
12016
  });
11642
12017
  points.enter().append('path')
12018
+ .attr('class', function (d) {
12019
+ return 'nv-point nv-point-' + d[1];
12020
+ })
11643
12021
  .style('fill', function (d) { return d.color })
11644
12022
  .style('stroke', function (d) { return d.color })
11645
12023
  .attr('transform', function(d) {
@@ -11657,25 +12035,66 @@ nv.models.scatter = function() {
11657
12035
  return 'translate(' + nv.utils.NaNtoZero(x(getX(d[0],d[1]))) + ',' + nv.utils.NaNtoZero(y(getY(d[0],d[1]))) + ')'
11658
12036
  })
11659
12037
  .remove();
11660
- points.each(function(d) {
11661
- d3.select(this)
11662
- .classed('nv-point', true)
11663
- .classed('nv-point-' + d[1], true)
11664
- .classed('nv-noninteractive', !interactive)
11665
- .classed('hover',false)
11666
- ;
11667
- });
11668
- points
12038
+ points.filter(function (d) { return scaleDiff || getDiffs(d, 'x', 'y'); })
11669
12039
  .watchTransition(renderWatch, 'scatter points')
11670
12040
  .attr('transform', function(d) {
11671
12041
  //nv.log(d, getX(d[0],d[1]), x(getX(d[0],d[1])));
11672
12042
  return 'translate(' + nv.utils.NaNtoZero(x(getX(d[0],d[1]))) + ',' + nv.utils.NaNtoZero(y(getY(d[0],d[1]))) + ')'
11673
- })
12043
+ });
12044
+ points.filter(function (d) { return scaleDiff || getDiffs(d, 'shape', 'size'); })
12045
+ .watchTransition(renderWatch, 'scatter points')
11674
12046
  .attr('d',
11675
12047
  nv.utils.symbol()
11676
12048
  .type(function(d) { return getShape(d[0]); })
11677
12049
  .size(function(d) { return z(getSize(d[0],d[1])) })
11678
12050
  );
12051
+
12052
+ // add label a label to scatter chart
12053
+ if(showLabels)
12054
+ {
12055
+ var titles = groups.selectAll('.nv-label')
12056
+ .data(function(d) {
12057
+ return d.values.map(
12058
+ function (point, pointIndex) {
12059
+ return [point, pointIndex]
12060
+ }).filter(
12061
+ function(pointArray, pointIndex) {
12062
+ return pointActive(pointArray[0], pointIndex)
12063
+ })
12064
+ });
12065
+
12066
+ titles.enter().append('text')
12067
+ .style('fill', function (d,i) {
12068
+ return d.color })
12069
+ .style('stroke-opacity', 0)
12070
+ .style('fill-opacity', 1)
12071
+ .attr('transform', function(d) {
12072
+ var dx = nv.utils.NaNtoZero(x0(getX(d[0],d[1]))) + Math.sqrt(z(getSize(d[0],d[1]))/Math.PI) + 2;
12073
+ return 'translate(' + dx + ',' + nv.utils.NaNtoZero(y0(getY(d[0],d[1]))) + ')';
12074
+ })
12075
+ .text(function(d,i){
12076
+ return d[0].label;});
12077
+
12078
+ titles.exit().remove();
12079
+ groups.exit().selectAll('path.nv-label')
12080
+ .watchTransition(renderWatch, 'scatter exit')
12081
+ .attr('transform', function(d) {
12082
+ var dx = nv.utils.NaNtoZero(x(getX(d[0],d[1])))+ Math.sqrt(z(getSize(d[0],d[1]))/Math.PI)+2;
12083
+ return 'translate(' + dx + ',' + nv.utils.NaNtoZero(y(getY(d[0],d[1]))) + ')';
12084
+ })
12085
+ .remove();
12086
+ titles.each(function(d) {
12087
+ d3.select(this)
12088
+ .classed('nv-label', true)
12089
+ .classed('nv-label-' + d[1], false)
12090
+ .classed('hover',false);
12091
+ });
12092
+ titles.watchTransition(renderWatch, 'scatter labels')
12093
+ .attr('transform', function(d) {
12094
+ var dx = nv.utils.NaNtoZero(x(getX(d[0],d[1])))+ Math.sqrt(z(getSize(d[0],d[1]))/Math.PI)+2;
12095
+ return 'translate(' + dx + ',' + nv.utils.NaNtoZero(y(getY(d[0],d[1]))) + ')'
12096
+ });
12097
+ }
11679
12098
 
11680
12099
  // Delay updating the invisible interactive layer for smoother animation
11681
12100
  if( interactiveUpdateDelay )
@@ -11758,7 +12177,7 @@ nv.models.scatter = function() {
11758
12177
  showVoronoi: {get: function(){return showVoronoi;}, set: function(_){showVoronoi=_;}},
11759
12178
  id: {get: function(){return id;}, set: function(_){id=_;}},
11760
12179
  interactiveUpdateDelay: {get:function(){return interactiveUpdateDelay;}, set: function(_){interactiveUpdateDelay=_;}},
11761
-
12180
+ showLabels: {get: function(){return showLabels;}, set: function(_){ showLabels = _;}},
11762
12181
 
11763
12182
  // simple functor options
11764
12183
  x: {get: function(){return getX;}, set: function(_){getX = d3.functor(_);}},
@@ -11826,6 +12245,7 @@ nv.models.scatterChart = function() {
11826
12245
  , dispatch = d3.dispatch('stateChange', 'changeState', 'renderEnd')
11827
12246
  , noData = null
11828
12247
  , duration = 250
12248
+ , showLabels = false
11829
12249
  ;
11830
12250
 
11831
12251
  scatter.xScale(x).yScale(y);
@@ -11947,7 +12367,9 @@ nv.models.scatterChart = function() {
11947
12367
  }
11948
12368
 
11949
12369
  // Legend
11950
- if (showLegend) {
12370
+ if (!showLegend) {
12371
+ g.select('.nv-legendWrap').selectAll('*').remove();
12372
+ } else {
11951
12373
  var legendWidth = availableWidth;
11952
12374
  legend.width(legendWidth);
11953
12375
 
@@ -11973,7 +12395,8 @@ nv.models.scatterChart = function() {
11973
12395
  .color(data.map(function(d,i) {
11974
12396
  d.color = d.color || color(d, i);
11975
12397
  return d.color;
11976
- }).filter(function(d,i) { return !data[i].disabled }));
12398
+ }).filter(function(d,i) { return !data[i].disabled }))
12399
+ .showLabels(showLabels);
11977
12400
 
11978
12401
  wrap.select('.nv-scatterWrap')
11979
12402
  .datum(data.filter(function(d) { return !d.disabled }))
@@ -12151,6 +12574,7 @@ nv.models.scatterChart = function() {
12151
12574
  defaultState: {get: function(){return defaultState;}, set: function(_){defaultState=_;}},
12152
12575
  noData: {get: function(){return noData;}, set: function(_){noData=_;}},
12153
12576
  duration: {get: function(){return duration;}, set: function(_){duration=_;}},
12577
+ showLabels: {get: function(){return showLabels;}, set: function(_){showLabels=_;}},
12154
12578
 
12155
12579
  // options that require extra logic in the setter
12156
12580
  margin: {get: function(){return margin;}, set: function(_){
@@ -12197,6 +12621,8 @@ nv.models.sparkline = function() {
12197
12621
  , yDomain
12198
12622
  , xRange
12199
12623
  , yRange
12624
+ , showMinMaxPoints = true
12625
+ , showCurrentPoint = true
12200
12626
  , dispatch = d3.dispatch('renderEnd')
12201
12627
  ;
12202
12628
 
@@ -12205,7 +12631,7 @@ nv.models.sparkline = function() {
12205
12631
  //------------------------------------------------------------
12206
12632
 
12207
12633
  var renderWatch = nv.utils.renderWatch(dispatch);
12208
-
12634
+
12209
12635
  function chart(selection) {
12210
12636
  renderWatch.reset();
12211
12637
  selection.each(function(data) {
@@ -12257,7 +12683,7 @@ nv.models.sparkline = function() {
12257
12683
  var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
12258
12684
  minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
12259
12685
  currentPoint = pointIndex(yValues.length - 1);
12260
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
12686
+ return [(showMinMaxPoints ? minPoint : null), (showMinMaxPoints ? maxPoint : null), (showCurrentPoint ? currentPoint : null)].filter(function (d) {return d != null;});
12261
12687
  });
12262
12688
  points.enter().append('circle');
12263
12689
  points.exit().remove();
@@ -12270,7 +12696,7 @@ nv.models.sparkline = function() {
12270
12696
  getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
12271
12697
  });
12272
12698
  });
12273
-
12699
+
12274
12700
  renderWatch.renderEnd('sparkline immediate');
12275
12701
  return chart;
12276
12702
  }
@@ -12283,15 +12709,17 @@ nv.models.sparkline = function() {
12283
12709
 
12284
12710
  chart._options = Object.create({}, {
12285
12711
  // simple options, just get/set the necessary values
12286
- width: {get: function(){return width;}, set: function(_){width=_;}},
12287
- height: {get: function(){return height;}, set: function(_){height=_;}},
12288
- xDomain: {get: function(){return xDomain;}, set: function(_){xDomain=_;}},
12289
- yDomain: {get: function(){return yDomain;}, set: function(_){yDomain=_;}},
12290
- xRange: {get: function(){return xRange;}, set: function(_){xRange=_;}},
12291
- yRange: {get: function(){return yRange;}, set: function(_){yRange=_;}},
12292
- xScale: {get: function(){return x;}, set: function(_){x=_;}},
12293
- yScale: {get: function(){return y;}, set: function(_){y=_;}},
12294
- animate: {get: function(){return animate;}, set: function(_){animate=_;}},
12712
+ width: {get: function(){return width;}, set: function(_){width=_;}},
12713
+ height: {get: function(){return height;}, set: function(_){height=_;}},
12714
+ xDomain: {get: function(){return xDomain;}, set: function(_){xDomain=_;}},
12715
+ yDomain: {get: function(){return yDomain;}, set: function(_){yDomain=_;}},
12716
+ xRange: {get: function(){return xRange;}, set: function(_){xRange=_;}},
12717
+ yRange: {get: function(){return yRange;}, set: function(_){yRange=_;}},
12718
+ xScale: {get: function(){return x;}, set: function(_){x=_;}},
12719
+ yScale: {get: function(){return y;}, set: function(_){y=_;}},
12720
+ animate: {get: function(){return animate;}, set: function(_){animate=_;}},
12721
+ showMinMaxPoints: {get: function(){return showMinMaxPoints;}, set: function(_){showMinMaxPoints=_;}},
12722
+ showCurrentPoint: {get: function(){return showCurrentPoint;}, set: function(_){showCurrentPoint=_;}},
12295
12723
 
12296
12724
  //functor options
12297
12725
  x: {get: function(){return getX;}, set: function(_){getX=d3.functor(_);}},
@@ -12338,7 +12766,7 @@ nv.models.sparklinePlus = function() {
12338
12766
  , noData = null
12339
12767
  , dispatch = d3.dispatch('renderEnd')
12340
12768
  ;
12341
-
12769
+
12342
12770
  //============================================================
12343
12771
  // Private Variables
12344
12772
  //------------------------------------------------------------
@@ -12632,13 +13060,13 @@ nv.models.stackedArea = function() {
12632
13060
  gEnter.append('g').attr('class', 'nv-scatterWrap');
12633
13061
 
12634
13062
  wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
12635
-
13063
+
12636
13064
  // If the user has not specified forceY, make sure 0 is included in the domain
12637
13065
  // Otherwise, use user-specified values for forceY
12638
13066
  if (scatter.forceY().length == 0) {
12639
13067
  scatter.forceY().push(0);
12640
13068
  }
12641
-
13069
+
12642
13070
  scatter
12643
13071
  .width(availableWidth)
12644
13072
  .height(availableHeight)
@@ -12646,7 +13074,6 @@ nv.models.stackedArea = function() {
12646
13074
  .y(function(d) {
12647
13075
  if (d.display !== undefined) { return d.display.y + d.display.y0; }
12648
13076
  })
12649
- .forceY([0])
12650
13077
  .color(data.map(function(d,i) {
12651
13078
  d.color = d.color || color(d, d.seriesIndex);
12652
13079
  return d.color;
@@ -13021,7 +13448,9 @@ nv.models.stackedAreaChart = function() {
13021
13448
  g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
13022
13449
 
13023
13450
  // Legend
13024
- if (showLegend) {
13451
+ if (!showLegend) {
13452
+ g.select('.nv-legendWrap').selectAll('*').remove();
13453
+ } else {
13025
13454
  var legendWidth = (showControls) ? availableWidth - controlWidth : availableWidth;
13026
13455
 
13027
13456
  legend.width(legendWidth);
@@ -13037,7 +13466,9 @@ nv.models.stackedAreaChart = function() {
13037
13466
  }
13038
13467
 
13039
13468
  // Controls
13040
- if (showControls) {
13469
+ if (!showControls) {
13470
+ g.select('.nv-controlsWrap').selectAll('*').remove();
13471
+ } else {
13041
13472
  var controlsData = [
13042
13473
  {
13043
13474
  key: controlLabels.stacked || 'Stacked',
@@ -13231,7 +13662,7 @@ nv.models.stackedAreaChart = function() {
13231
13662
  key: series.key,
13232
13663
  value: tooltipValue,
13233
13664
  color: color(series,series.seriesIndex),
13234
- stackedValue: point.display
13665
+ point: point
13235
13666
  });
13236
13667
 
13237
13668
  if (showTotalInTooltip && stacked.style() != 'expand') {
@@ -13250,8 +13681,8 @@ nv.models.stackedAreaChart = function() {
13250
13681
  //To handle situation where the stacked area chart is negative, we need to use absolute values
13251
13682
  //when checking if the mouse Y value is within the stack area.
13252
13683
  yValue = Math.abs(yValue);
13253
- var stackedY0 = Math.abs(series.stackedValue.y0);
13254
- var stackedY = Math.abs(series.stackedValue.y);
13684
+ var stackedY0 = Math.abs(series.point.display.y0);
13685
+ var stackedY = Math.abs(series.point.display.y);
13255
13686
  if ( yValue >= stackedY0 && yValue <= (stackedY + stackedY0))
13256
13687
  {
13257
13688
  indexToHighlight = i;
@@ -13423,70 +13854,208 @@ nv.models.sunburst = function() {
13423
13854
  //------------------------------------------------------------
13424
13855
 
13425
13856
  var margin = {top: 0, right: 0, bottom: 0, left: 0}
13426
- , width = null
13427
- , height = null
13857
+ , width = 600
13858
+ , height = 600
13428
13859
  , mode = "count"
13429
- , modes = {count: function(d) { return 1; }, size: function(d) { return d.size }}
13860
+ , modes = {count: function(d) { return 1; }, value: function(d) { return d.value || d.size }, size: function(d) { return d.value || d.size }}
13430
13861
  , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
13431
13862
  , container = null
13432
13863
  , color = nv.utils.defaultColor()
13864
+ , showLabels = false
13865
+ , labelFormat = function(d){if(mode === 'count'){return d.name + ' #' + d.value}else{return d.name + ' ' + (d.value || d.size)}}
13866
+ , labelThreshold = 0.02
13867
+ , sort = function(d1, d2){return d1.name > d2.name;}
13868
+ , key = function(d,i){return d.name;}
13433
13869
  , groupColorByParent = true
13434
13870
  , duration = 500
13435
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMousemove', 'elementMouseover', 'elementMouseout', 'renderEnd')
13436
- ;
13871
+ , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMousemove', 'elementMouseover', 'elementMouseout', 'renderEnd');
13872
+
13873
+ //============================================================
13874
+ // aux functions and setup
13875
+ //------------------------------------------------------------
13437
13876
 
13438
13877
  var x = d3.scale.linear().range([0, 2 * Math.PI]);
13439
13878
  var y = d3.scale.sqrt();
13440
13879
 
13441
- var partition = d3.layout.partition()
13442
- .sort(null)
13443
- .value(function(d) { return 1; });
13880
+ var partition = d3.layout.partition().sort(sort);
13881
+
13882
+ var node, availableWidth, availableHeight, radius;
13883
+ var prevPositions = {};
13444
13884
 
13445
13885
  var arc = d3.svg.arc()
13446
- .startAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x))); })
13447
- .endAngle(function(d) { return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx))); })
13448
- .innerRadius(function(d) { return Math.max(0, y(d.y)); })
13449
- .outerRadius(function(d) { return Math.max(0, y(d.y + d.dy)); });
13886
+ .startAngle(function(d) {return Math.max(0, Math.min(2 * Math.PI, x(d.x))) })
13887
+ .endAngle(function(d) {return Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx))) })
13888
+ .innerRadius(function(d) {return Math.max(0, y(d.y)) })
13889
+ .outerRadius(function(d) {return Math.max(0, y(d.y + d.dy)) });
13890
+
13891
+ function rotationToAvoidUpsideDown(d) {
13892
+ var centerAngle = computeCenterAngle(d);
13893
+ if(centerAngle > 90){
13894
+ return 180;
13895
+ }
13896
+ else {
13897
+ return 0;
13898
+ }
13899
+ }
13900
+
13901
+ function computeCenterAngle(d) {
13902
+ var startAngle = Math.max(0, Math.min(2 * Math.PI, x(d.x)));
13903
+ var endAngle = Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
13904
+ var centerAngle = (((startAngle + endAngle) / 2) * (180 / Math.PI)) - 90;
13905
+ return centerAngle;
13906
+ }
13907
+
13908
+ function labelThresholdMatched(d) {
13909
+ var startAngle = Math.max(0, Math.min(2 * Math.PI, x(d.x)));
13910
+ var endAngle = Math.max(0, Math.min(2 * Math.PI, x(d.x + d.dx)));
13911
+
13912
+ var size = endAngle - startAngle;
13913
+ return size > labelThreshold;
13914
+ }
13915
+
13916
+ // When zooming: interpolate the scales.
13917
+ function arcTweenZoom(e,i) {
13918
+ var xd = d3.interpolate(x.domain(), [node.x, node.x + node.dx]),
13919
+ yd = d3.interpolate(y.domain(), [node.y, 1]),
13920
+ yr = d3.interpolate(y.range(), [node.y ? 20 : 0, radius]);
13921
+
13922
+ if (i === 0) {
13923
+ return function() {return arc(e);}
13924
+ }
13925
+ else {
13926
+ return function (t) {
13927
+ x.domain(xd(t));
13928
+ y.domain(yd(t)).range(yr(t));
13929
+ return arc(e);
13930
+ }
13931
+ };
13932
+ }
13933
+
13934
+ function arcTweenUpdate(d) {
13935
+ var ipo = d3.interpolate({x: d.x0, dx: d.dx0, y: d.y0, dy: d.dy0}, d);
13936
+
13937
+ return function (t) {
13938
+ var b = ipo(t);
13939
+
13940
+ d.x0 = b.x;
13941
+ d.dx0 = b.dx;
13942
+ d.y0 = b.y;
13943
+ d.dy0 = b.dy;
13944
+
13945
+ return arc(b);
13946
+ };
13947
+ }
13948
+
13949
+ function updatePrevPosition(node) {
13950
+ var k = key(node);
13951
+ if(! prevPositions[k]) prevPositions[k] = {};
13952
+ var pP = prevPositions[k];
13953
+ pP.dx = node.dx;
13954
+ pP.x = node.x;
13955
+ pP.dy = node.dy;
13956
+ pP.y = node.y;
13957
+ }
13958
+
13959
+ function storeRetrievePrevPositions(nodes) {
13960
+ nodes.forEach(function(n){
13961
+ var k = key(n);
13962
+ var pP = prevPositions[k];
13963
+ //console.log(k,n,pP);
13964
+ if( pP ){
13965
+ n.dx0 = pP.dx;
13966
+ n.x0 = pP.x;
13967
+ n.dy0 = pP.dy;
13968
+ n.y0 = pP.y;
13969
+ }
13970
+ else {
13971
+ n.dx0 = n.dx;
13972
+ n.x0 = n.x;
13973
+ n.dy0 = n.dy;
13974
+ n.y0 = n.y;
13975
+ }
13976
+ updatePrevPosition(n);
13977
+ });
13978
+ }
13450
13979
 
13451
- // Keep track of the current and previous node being displayed as the root.
13452
- var node, prevNode;
13453
- // Keep track of the root node
13454
- var rootNode;
13980
+ function zoomClick(d) {
13981
+ var labels = container.selectAll('text')
13982
+ var path = container.selectAll('path')
13983
+
13984
+ // fade out all text elements
13985
+ labels.transition().attr("opacity",0);
13986
+
13987
+ // to allow reference to the new center node
13988
+ node = d;
13989
+
13990
+ path.transition()
13991
+ .duration(duration)
13992
+ .attrTween("d", arcTweenZoom)
13993
+ .each('end', function(e) {
13994
+ // partially taken from here: http://bl.ocks.org/metmajer/5480307
13995
+ // check if the animated element's data e lies within the visible angle span given in d
13996
+ if(e.x >= d.x && e.x < (d.x + d.dx) ){
13997
+ if(e.depth >= d.depth){
13998
+ // get a selection of the associated text element
13999
+ var parentNode = d3.select(this.parentNode);
14000
+ var arcText = parentNode.select('text');
14001
+
14002
+ // fade in the text element and recalculate positions
14003
+ arcText.transition().duration(duration)
14004
+ .text( function(e){return labelFormat(e) })
14005
+ .attr("opacity", function(d){
14006
+ if(labelThresholdMatched(d)) {
14007
+ return 1;
14008
+ }
14009
+ else {
14010
+ return 0;
14011
+ }
14012
+ })
14013
+ .attr("transform", function() {
14014
+ var width = this.getBBox().width;
14015
+ if(e.depth === 0)
14016
+ return "translate(" + (width / 2 * - 1) + ",0)";
14017
+ else if(e.depth === d.depth){
14018
+ return "translate(" + (y(e.y) + 5) + ",0)";
14019
+ }
14020
+ else {
14021
+ var centerAngle = computeCenterAngle(e);
14022
+ var rotation = rotationToAvoidUpsideDown(e);
14023
+ if (rotation === 0) {
14024
+ return 'rotate('+ centerAngle +')translate(' + (y(e.y) + 5) + ',0)';
14025
+ }
14026
+ else {
14027
+ return 'rotate('+ centerAngle +')translate(' + (y(e.y) + width + 5) + ',0)rotate(' + rotation + ')';
14028
+ }
14029
+ }
14030
+ });
14031
+ }
14032
+ }
14033
+ })
14034
+ }
13455
14035
 
13456
14036
  //============================================================
13457
14037
  // chart function
13458
14038
  //------------------------------------------------------------
13459
-
13460
14039
  var renderWatch = nv.utils.renderWatch(dispatch);
13461
14040
 
13462
14041
  function chart(selection) {
13463
14042
  renderWatch.reset();
14043
+
13464
14044
  selection.each(function(data) {
13465
14045
  container = d3.select(this);
13466
- var availableWidth = nv.utils.availableWidth(width, container, margin);
13467
- var availableHeight = nv.utils.availableHeight(height, container, margin);
13468
- var radius = Math.min(availableWidth, availableHeight) / 2;
13469
- var path;
14046
+ availableWidth = nv.utils.availableWidth(width, container, margin);
14047
+ availableHeight = nv.utils.availableHeight(height, container, margin);
14048
+ radius = Math.min(availableWidth, availableHeight) / 2;
13470
14049
 
13471
- nv.utils.initSVG(container);
14050
+ y.range([0, radius]);
13472
14051
 
13473
14052
  // Setup containers and skeleton of chart
13474
- var wrap = container.selectAll('.nv-wrap.nv-sunburst').data(data);
13475
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sunburst nv-chart-' + id);
13476
-
13477
- var g = wrapEnter.selectAll('nv-sunburst');
13478
-
13479
- chart.update = function() {
13480
- if ( duration === 0 ) {
13481
- container.call(chart);
13482
- } else {
13483
- container.transition().duration(duration).call(chart);
13484
- }
13485
- };
13486
- chart.container = this;
13487
-
13488
-
13489
- wrap.attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
14053
+ var wrap = container.select('g.nvd3.nv-wrap.nv-sunburst');
14054
+ if( !wrap[0][0] ) {
14055
+ wrap = container.append('g')
14056
+ .attr('class', 'nvd3 nv-wrap nv-sunburst nv-chart-' + id)
14057
+ .attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
14058
+ }
13490
14059
 
13491
14060
  container.on('click', function (d, i) {
13492
14061
  dispatch.chartClick({
@@ -13497,13 +14066,21 @@ nv.models.sunburst = function() {
13497
14066
  });
13498
14067
  });
13499
14068
 
13500
- y.range([0, radius]);
13501
-
13502
- node = node || data;
13503
- rootNode = data[0];
13504
14069
  partition.value(modes[mode] || modes["count"]);
13505
- path = g.data(partition.nodes).enter()
13506
- .append("path")
14070
+
14071
+ //reverse the drawing order so that the labels of inner
14072
+ //arcs are drawn on top of the outer arcs.
14073
+ var nodes = partition.nodes(data[0]).reverse()
14074
+
14075
+ storeRetrievePrevPositions(nodes);
14076
+ var cG = wrap.selectAll('.arc-container').data(nodes, key)
14077
+
14078
+ //handle new datapoints
14079
+ var cGE = cG.enter()
14080
+ .append("g")
14081
+ .attr("class",'arc-container')
14082
+
14083
+ cGE.append("path")
13507
14084
  .attr("d", arc)
13508
14085
  .style("fill", function (d) {
13509
14086
  if (d.color) {
@@ -13517,22 +14094,7 @@ nv.models.sunburst = function() {
13517
14094
  }
13518
14095
  })
13519
14096
  .style("stroke", "#FFF")
13520
- .on("click", function(d) {
13521
- if (prevNode !== node && node !== d) prevNode = node;
13522
- node = d;
13523
- path.transition()
13524
- .duration(duration)
13525
- .attrTween("d", arcTweenZoom(d));
13526
- })
13527
- .each(stash)
13528
- .on("dblclick", function(d) {
13529
- if (prevNode.parent == d) {
13530
- path.transition()
13531
- .duration(duration)
13532
- .attrTween("d", arcTweenZoom(rootNode));
13533
- }
13534
- })
13535
- .each(stash)
14097
+ .on("click", zoomClick)
13536
14098
  .on('mouseover', function(d,i){
13537
14099
  d3.select(this).classed('hover', true).style('opacity', 0.8);
13538
14100
  dispatch.elementMouseover({
@@ -13552,58 +14114,68 @@ nv.models.sunburst = function() {
13552
14114
  });
13553
14115
  });
13554
14116
 
14117
+ ///Iterating via each and selecting based on the this
14118
+ ///makes it work ... a cG.selectAll('path') doesn't.
14119
+ ///Without iteration the data (in the element) didn't update.
14120
+ cG.each(function(d){
14121
+ d3.select(this).select('path')
14122
+ .transition()
14123
+ .duration(duration)
14124
+ .attrTween('d', arcTweenUpdate);
14125
+ });
13555
14126
 
14127
+ if(showLabels){
14128
+ //remove labels first and add them back
14129
+ cG.selectAll('text').remove();
13556
14130
 
13557
- // Setup for switching data: stash the old values for transition.
13558
- function stash(d) {
13559
- d.x0 = d.x;
13560
- d.dx0 = d.dx;
14131
+ //this way labels are on top of newly added arcs
14132
+ cG.append('text')
14133
+ .text( function(e){ return labelFormat(e)})
14134
+ .transition()
14135
+ .duration(duration)
14136
+ .attr("opacity", function(d){
14137
+ if(labelThresholdMatched(d)) {
14138
+ return 1;
14139
+ }
14140
+ else {
14141
+ return 0;
14142
+ }
14143
+ })
14144
+ .attr("transform", function(d) {
14145
+ var width = this.getBBox().width;
14146
+ if(d.depth === 0){
14147
+ return "rotate(0)translate(" + (width / 2 * -1) + ",0)";
14148
+ }
14149
+ else {
14150
+ var centerAngle = computeCenterAngle(d);
14151
+ var rotation = rotationToAvoidUpsideDown(d);
14152
+ if (rotation === 0) {
14153
+ return 'rotate('+ centerAngle +')translate(' + (y(d.y) + 5) + ',0)';
14154
+ }
14155
+ else {
14156
+ return 'rotate('+ centerAngle +')translate(' + (y(d.y) + width + 5) + ',0)rotate(' + rotation + ')';
14157
+ }
14158
+ }
14159
+ });
13561
14160
  }
13562
14161
 
13563
- // When switching data: interpolate the arcs in data space.
13564
- function arcTweenData(a, i) {
13565
- var oi = d3.interpolate({x: a.x0, dx: a.dx0}, a);
13566
-
13567
- function tween(t) {
13568
- var b = oi(t);
13569
- a.x0 = b.x;
13570
- a.dx0 = b.dx;
13571
- return arc(b);
13572
- }
13573
-
13574
- if (i == 0) {
13575
- // If we are on the first arc, adjust the x domain to match the root node
13576
- // at the current zoom level. (We only need to do this once.)
13577
- var xd = d3.interpolate(x.domain(), [node.x, node.x + node.dx]);
13578
- return function (t) {
13579
- x.domain(xd(t));
13580
- return tween(t);
13581
- };
13582
- } else {
13583
- return tween;
13584
- }
13585
- }
14162
+ //zoom out to the center when the data is updated.
14163
+ zoomClick(nodes[nodes.length - 1])
13586
14164
 
13587
- // When zooming: interpolate the scales.
13588
- function arcTweenZoom(d) {
13589
- var xd = d3.interpolate(x.domain(), [d.x, d.x + d.dx]),
13590
- yd = d3.interpolate(y.domain(), [d.y, 1]),
13591
- yr = d3.interpolate(y.range(), [d.y ? 20 : 0, radius]);
13592
- return function (d, i) {
13593
- return i
13594
- ? function (t) {
13595
- return arc(d);
13596
- }
13597
- : function (t) {
13598
- x.domain(xd(t));
13599
- y.domain(yd(t)).range(yr(t));
13600
- return arc(d);
13601
- };
13602
- };
13603
- }
13604
14165
 
14166
+ //remove unmatched elements ...
14167
+ cG.exit()
14168
+ .transition()
14169
+ .duration(duration)
14170
+ .attr('opacity',0)
14171
+ .each('end',function(d){
14172
+ var k = key(d);
14173
+ prevPositions[k] = undefined;
14174
+ })
14175
+ .remove();
13605
14176
  });
13606
14177
 
14178
+
13607
14179
  renderWatch.renderEnd('sunburst immediate');
13608
14180
  return chart;
13609
14181
  }
@@ -13623,7 +14195,11 @@ nv.models.sunburst = function() {
13623
14195
  id: {get: function(){return id;}, set: function(_){id=_;}},
13624
14196
  duration: {get: function(){return duration;}, set: function(_){duration=_;}},
13625
14197
  groupColorByParent: {get: function(){return groupColorByParent;}, set: function(_){groupColorByParent=!!_;}},
13626
-
14198
+ showLabels: {get: function(){return showLabels;}, set: function(_){showLabels=!!_}},
14199
+ labelFormat: {get: function(){return labelFormat;}, set: function(_){labelFormat=_}},
14200
+ labelThreshold: {get: function(){return labelThreshold;}, set: function(_){labelThreshold=_}},
14201
+ sort: {get: function(){return sort;}, set: function(_){sort=_}},
14202
+ key: {get: function(){return key;}, set: function(_){key=_}},
13627
14203
  // options that require extra logic in the setter
13628
14204
  margin: {get: function(){return margin;}, set: function(_){
13629
14205
  margin.top = _.top != undefined ? _.top : margin.top;
@@ -13657,21 +14233,19 @@ nv.models.sunburstChart = function() {
13657
14233
  , defaultState = null
13658
14234
  , noData = null
13659
14235
  , duration = 250
13660
- , dispatch = d3.dispatch('stateChange', 'changeState','renderEnd')
13661
- ;
14236
+ , dispatch = d3.dispatch('stateChange', 'changeState','renderEnd');
13662
14237
 
13663
- tooltip.duration(0);
13664
14238
 
13665
14239
  //============================================================
13666
14240
  // Private Variables
13667
14241
  //------------------------------------------------------------
13668
14242
 
13669
14243
  var renderWatch = nv.utils.renderWatch(dispatch);
14244
+
13670
14245
  tooltip
14246
+ .duration(0)
13671
14247
  .headerEnabled(false)
13672
- .valueFormatter(function(d, i) {
13673
- return d;
13674
- });
14248
+ .valueFormatter(function(d){return d;});
13675
14249
 
13676
14250
  //============================================================
13677
14251
  // Chart function
@@ -13683,11 +14257,11 @@ nv.models.sunburstChart = function() {
13683
14257
 
13684
14258
  selection.each(function(data) {
13685
14259
  var container = d3.select(this);
14260
+
13686
14261
  nv.utils.initSVG(container);
13687
14262
 
13688
- var that = this;
13689
- var availableWidth = nv.utils.availableWidth(width, container, margin),
13690
- availableHeight = nv.utils.availableHeight(height, container, margin);
14263
+ var availableWidth = nv.utils.availableWidth(width, container, margin);
14264
+ var availableHeight = nv.utils.availableHeight(height, container, margin);
13691
14265
 
13692
14266
  chart.update = function() {
13693
14267
  if (duration === 0) {
@@ -13696,7 +14270,7 @@ nv.models.sunburstChart = function() {
13696
14270
  container.transition().duration(duration).call(chart);
13697
14271
  }
13698
14272
  };
13699
- chart.container = this;
14273
+ chart.container = container;
13700
14274
 
13701
14275
  // Display No Data message if there's nothing to show.
13702
14276
  if (!data || !data.length) {
@@ -13706,20 +14280,8 @@ nv.models.sunburstChart = function() {
13706
14280
  container.selectAll('.nv-noData').remove();
13707
14281
  }
13708
14282
 
13709
- // Setup containers and skeleton of chart
13710
- var wrap = container.selectAll('g.nv-wrap.nv-sunburstChart').data(data);
13711
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sunburstChart').append('g');
13712
- var g = wrap.select('g');
13713
-
13714
- gEnter.append('g').attr('class', 'nv-sunburstWrap');
13715
-
13716
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
13717
-
13718
- // Main Chart Component(s)
13719
14283
  sunburst.width(availableWidth).height(availableHeight);
13720
- var sunWrap = g.select('.nv-sunburstWrap').datum(data);
13721
- d3.transition(sunWrap).call(sunburst);
13722
-
14284
+ container.call(sunburst);
13723
14285
  });
13724
14286
 
13725
14287
  renderWatch.renderEnd('sunburstChart immediate');
@@ -13731,9 +14293,9 @@ nv.models.sunburstChart = function() {
13731
14293
  //------------------------------------------------------------
13732
14294
 
13733
14295
  sunburst.dispatch.on('elementMouseover.tooltip', function(evt) {
13734
- evt['series'] = {
14296
+ evt.series = {
13735
14297
  key: evt.data.name,
13736
- value: evt.data.size,
14298
+ value: (evt.data.value || evt.data.size),
13737
14299
  color: evt.color
13738
14300
  };
13739
14301
  tooltip.data(evt).hidden(false);
@@ -13783,7 +14345,8 @@ nv.models.sunburstChart = function() {
13783
14345
  nv.utils.inheritOptions(chart, sunburst);
13784
14346
  nv.utils.initOptions(chart);
13785
14347
  return chart;
14348
+
13786
14349
  };
13787
14350
 
13788
- nv.version = "1.8.2";
13789
- })();
14351
+ nv.version = "1.8.3";
14352
+ })();