From 934fe51fc1c46cef9ed394279cae44973528b19b Mon Sep 17 00:00:00 2001 From: Vladimir Petriko Date: Thu, 4 Dec 2014 14:25:47 +0300 Subject: [PATCH] middle build --- build/css/tauCharts.graphic-elements.css | 1 + build/css/tauCharts.graphic-elements.min.css | 2 +- build/plugins/tauCharts.tooltip.js | 75 ++- build/plugins/tauCharts.tooltip.min.js | 4 +- build/tauCharts.color-brewer.js | 646 +++++++++---------- build/tauCharts.color-brewer.min.js | 2 +- build/tauCharts.js | 625 +++++++++--------- build/tauCharts.min.js | 6 +- css/graphic-elements.css | 1 + 9 files changed, 694 insertions(+), 668 deletions(-) diff --git a/build/css/tauCharts.graphic-elements.css b/build/css/tauCharts.graphic-elements.css index db3cd6a01..06bb6b65c 100644 --- a/build/css/tauCharts.graphic-elements.css +++ b/build/css/tauCharts.graphic-elements.css @@ -146,6 +146,7 @@ .graphical-report__svg .label .label-token { font-size: 11px; font-weight: bold; + letter-spacing: 1px; } .graphical-report__svg .label .label-token-1, .graphical-report__svg .label .label-token-2 { diff --git a/build/css/tauCharts.graphic-elements.min.css b/build/css/tauCharts.graphic-elements.min.css index 26fed0cbc..04b6dc618 100644 --- a/build/css/tauCharts.graphic-elements.min.css +++ b/build/css/tauCharts.graphic-elements.min.css @@ -1 +1 @@ -.graphical-report__svg .color10-1{stroke:#e41a1c;fill:#e41a1c}.graphical-report__svg .color10-2{stroke:#377eb8;fill:#377eb8}.graphical-report__svg .color10-3{stroke:#4daf4a;fill:#4daf4a}.graphical-report__svg .color10-4{stroke:#984ea3;fill:#984ea3}.graphical-report__svg .color10-5{stroke:#ff7f00;fill:#ff7f00}.graphical-report__svg .color10-6{stroke:#e9e964;fill:#e9e964}.graphical-report__svg .color10-7{stroke:#a65628;fill:#a65628}.graphical-report__svg .color10-8{stroke:#f781bf;fill:#f781bf}.graphical-report__svg .color10-9{stroke:#999;fill:#999}.graphical-report__svg .color10-10{stroke:#222;fill:#222}.graphical-report__svg .color-default{stroke:#377eb8;fill:#377eb8}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962ff;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#e17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__chart{position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__svg{display:block}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:#bdc3cd;shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick text{font-weight:700}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid path{fill:none;shape-rendering:crispEdges}.graphical-report__svg .grid line{fill:none;stroke:rgba(189,195,205,.5);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .label,.graphical-report__svg .label .label-token{font-size:11px;font-weight:700}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__dot{opacity:.6;transition:stroke-width .1s ease,opacity .1s ease;stroke-width:0;cursor:pointer}.graphical-report__line{fill:none}.graphical-report__dot-line{opacity:1}.graphical-report__dot.highlighted{stroke-width:6;stroke-opacity:.4;opacity:1} \ No newline at end of file +.graphical-report__svg .color10-1{stroke:#e41a1c;fill:#e41a1c}.graphical-report__svg .color10-2{stroke:#377eb8;fill:#377eb8}.graphical-report__svg .color10-3{stroke:#4daf4a;fill:#4daf4a}.graphical-report__svg .color10-4{stroke:#984ea3;fill:#984ea3}.graphical-report__svg .color10-5{stroke:#ff7f00;fill:#ff7f00}.graphical-report__svg .color10-6{stroke:#e9e964;fill:#e9e964}.graphical-report__svg .color10-7{stroke:#a65628;fill:#a65628}.graphical-report__svg .color10-8{stroke:#f781bf;fill:#f781bf}.graphical-report__svg .color10-9{stroke:#999;fill:#999}.graphical-report__svg .color10-10{stroke:#222;fill:#222}.graphical-report__svg .color-default{stroke:#377eb8;fill:#377eb8}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962ff;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#e17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__chart{position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__svg{display:block}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:#bdc3cd;shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick text{font-weight:700}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid path{fill:none;shape-rendering:crispEdges}.graphical-report__svg .grid line{fill:none;stroke:rgba(189,195,205,.5);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .label{font-size:11px;font-weight:700}.graphical-report__svg .label .label-token{font-size:11px;font-weight:700;letter-spacing:1px}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__dot{opacity:.6;transition:stroke-width .1s ease,opacity .1s ease;stroke-width:0;cursor:pointer}.graphical-report__line{fill:none}.graphical-report__dot-line{opacity:1}.graphical-report__dot.highlighted{stroke-width:6;stroke-opacity:.4;opacity:1} \ No newline at end of file diff --git a/build/plugins/tauCharts.tooltip.js b/build/plugins/tauCharts.tooltip.js index 3102c14c1..d3a8d6b13 100644 --- a/build/plugins/tauCharts.tooltip.js +++ b/build/plugins/tauCharts.tooltip.js @@ -1,6 +1,6 @@ -(function(factory) { +(function (factory) { if (typeof define === "function" && define.amd) { - define(['tauCharts'], function(tauPlugins) { + define(['tauCharts'], function (tauPlugins) { return factory(tauPlugins); }); } else if (typeof module === "object" && module.exports) { @@ -9,7 +9,7 @@ } else { factory(this.tauCharts); } -})(function(tauCharts) { +})(function (tauCharts) { /** @class Tooltip * @extends Plugin */ /* Usage @@ -18,6 +18,7 @@ */ var _ = tauCharts.api._; var d3 = tauCharts.api.d3; + function tooltip(settings) { settings = settings || {}; return { @@ -32,10 +33,10 @@ '
<%=value%>
', '' ].join(''), - onExcludeData: function() { + onExcludeData: function () { }, - _drawPoint: function(container, x, y, color) { + _drawPoint: function (container, x, y, color) { if (this.circle) { this.circle.remove(); } @@ -44,17 +45,17 @@ .attr("cy", y) .attr('class', color) .attr("r", 4); - this.circle.node().addEventListener('mouseover', function() { + this.circle.node().addEventListener('mouseover', function () { clearTimeout(this._interval); }.bind(this), false); - this.circle.node().addEventListener('mouseleave', function() { + this.circle.node().addEventListener('mouseleave', function () { this._hide(); }.bind(this), false); }, - init: function(chart) { + init: function (chart) { this._chart = chart; this._dataFields = settings.fields; - _.extend(this,_.omit(settings,'fields')); + _.extend(this, _.omit(settings, 'fields')); this._interval = null; this._dataWithCoords = {}; this._unitMeta = {}; @@ -62,13 +63,13 @@ this._tooltip = chart.addBalloon({spacing: 5, auto: true}); this._elementTooltip = this._tooltip.getElement(); var elementTooltip = this._elementTooltip; - elementTooltip.addEventListener('mouseover', function() { + elementTooltip.addEventListener('mouseover', function () { clearTimeout(this._interval); }.bind(this), false); - elementTooltip.addEventListener('mouseleave', function() { + elementTooltip.addEventListener('mouseleave', function () { this._hide(); }.bind(this), false); - elementTooltip.addEventListener('click', function(e) { + elementTooltip.addEventListener('click', function (e) { var target = e.target; if (target.classList.contains('i-role-exclude')) { this._exclude(); @@ -77,12 +78,12 @@ }.bind(this), false); elementTooltip.insertAdjacentHTML('afterbegin', this.template); }, - onUnitReady: function(chart, unitMeta) { + onUnitReady: function (chart, unitMeta) { if (unitMeta.type && unitMeta.type.indexOf('ELEMENT') === 0) { var key = this._generateKey(unitMeta.$where); this._unitMeta[key] = unitMeta; var values = unitMeta.partition(); - this._dataWithCoords[key] = values.map(function(item) { + this._dataWithCoords[key] = values.map(function (item) { return { x: unitMeta.options.xScale(item[unitMeta.x.scaleDim]), y: unitMeta.options.yScale(item[unitMeta.y.scaleDim]), @@ -92,27 +93,42 @@ } }, - render: function(data) { - return this._dataFields.map(function(field) { + render: function (data, fields) { + return fields.map(function (field) { return this._templateItem({label: field, value: data[field]}); }, this).join(''); }, - _exclude: function() { + _exclude: function () { var dataChart = this._chart.getData(); this._chart.setData(_.without(dataChart, this._currentElement)); this.onExcludeData(this._currentElement); }, - _calculateLength: function(x1, y1, x2, y2) { + _calculateLength: function (x1, y1, x2, y2) { return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); }, - _generateKey: function(data) { + _generateKey: function (data) { return JSON.stringify(data); }, - onElementMouseOver: function(chart, data) { + _getFields: function (unit) { + if (this._dataFields) { + return this._dataFields; + } + var fields = [unit.size.scaleDim, unit.color.scaleDim]; + var x = []; + var y = []; + while (unit = unit.parentUnit) { + x.push(unit.x.scaleDim); + y.push(unit.y.scaleDim); + } + + return _.compact(fields.concat(y, x).reverse()); + + }, + onElementMouseOver: function (chart, data) { clearInterval(this._interval); var coord = d3.mouse(data.element); var key = this._generateKey(data.cellData.$where); - var item = _.min(this._dataWithCoords[key], function(a) { + var item = _.min(this._dataWithCoords[key], function (a) { return this._calculateLength(a.x, a.y, coord[0], coord[1]); }, this); if (this._currentElement === item) { @@ -122,8 +138,9 @@ this._drawPoint(d3.select(data.element.parentNode), item.x, item.y, this._unitMeta[key].options.color.get(data.elementData.key)); } var content = this._elementTooltip.querySelectorAll('.i-role-content'); - if(content[0]) { - content[0].innerHTML = this.render(item.item); + if (content[0]) { + var fields = this._getFields(this._unitMeta[key]); + content[0].innerHTML = this.render(item.item, fields); } else { console.log('template should contain i-role-content class'); } @@ -131,16 +148,16 @@ this._show(); this._currentElement = item.item; }, - onElementMouseOut: function() { + onElementMouseOut: function () { this._hide(); }, - _show: function() { + _show: function () { this._tooltip.show(); var el = d3.mouse(this._elementTooltip.parentNode); this._tooltip.position(el[0], el[1]).updateSize(); }, - _hide: function() { - this._interval = setTimeout(function() { + _hide: function () { + this._interval = setTimeout(function () { this._currentElement = null; this._tooltip.hide(); if (this.circle) { @@ -148,13 +165,13 @@ } }.bind(this), 300); }, - _destroyTooltip: function() { + _destroyTooltip: function () { if (this.circle) { this.circle.remove(); } this._tooltip.destroy(); }, - destroy: function() { + destroy: function () { this._destroyTooltip(); } }; diff --git a/build/plugins/tauCharts.tooltip.min.js b/build/plugins/tauCharts.tooltip.min.js index f811ee0bf..57e8766b7 100644 --- a/build/plugins/tauCharts.tooltip.min.js +++ b/build/plugins/tauCharts.tooltip.min.js @@ -1,4 +1,4 @@ -/*! tauCharts - v0.2.0 - 2014-12-03 +/*! tauCharts - v0.2.0 - 2014-12-04 * https://github.com/TargetProcess/tauCharts * Copyright (c) 2014 Taucraft Limited; Licensed Creative Commons */ -!function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){{require("tauCharts")}module.exports=a()}else a(this.tauCharts)}(function(a){function b(a){return a=a||{},{template:['
','
Exclude
'].join(""),itemTemplate:['
','
<%=label%>
','
<%=value%>
',"
"].join(""),onExcludeData:function(){},_drawPoint:function(a,b,c,d){this.circle&&this.circle.remove(),this.circle=a.append("circle").attr("cx",b).attr("cy",c).attr("class",d).attr("r",4),this.circle.node().addEventListener("mouseover",function(){clearTimeout(this._interval)}.bind(this),!1),this.circle.node().addEventListener("mouseleave",function(){this._hide()}.bind(this),!1)},init:function(b){this._chart=b,this._dataFields=a.fields,c.extend(this,c.omit(a,"fields")),this._interval=null,this._dataWithCoords={},this._unitMeta={},this._templateItem=c.template(this.itemTemplate),this._tooltip=b.addBalloon({spacing:5,auto:!0}),this._elementTooltip=this._tooltip.getElement();var d=this._elementTooltip;d.addEventListener("mouseover",function(){clearTimeout(this._interval)}.bind(this),!1),d.addEventListener("mouseleave",function(){this._hide()}.bind(this),!1),d.addEventListener("click",function(a){var b=a.target;b.classList.contains("i-role-exclude")&&(this._exclude(),this._hide())}.bind(this),!1),d.insertAdjacentHTML("afterbegin",this.template)},onUnitReady:function(a,b){if(b.type&&0===b.type.indexOf("ELEMENT")){var c=this._generateKey(b.$where);this._unitMeta[c]=b;var d=b.partition();this._dataWithCoords[c]=d.map(function(a){return{x:b.options.xScale(a[b.x.scaleDim]),y:b.options.yScale(a[b.y.scaleDim]),item:a}},this)}},render:function(a){return this._dataFields.map(function(b){return this._templateItem({label:b,value:a[b]})},this).join("")},_exclude:function(){var a=this._chart.getData();this._chart.setData(c.without(a,this._currentElement)),this.onExcludeData(this._currentElement)},_calculateLength:function(a,b,c,d){return(c-a)*(c-a)+(d-b)*(d-b)},_generateKey:function(a){return JSON.stringify(a)},onElementMouseOver:function(a,b){clearInterval(this._interval);var e=d.mouse(b.element),f=this._generateKey(b.cellData.$where),g=c.min(this._dataWithCoords[f],function(a){return this._calculateLength(a.x,a.y,e[0],e[1])},this);if(this._currentElement!==g){b.elementData.key&&Array.isArray(b.elementData.values)&&this._drawPoint(d.select(b.element.parentNode),g.x,g.y,this._unitMeta[f].options.color.get(b.elementData.key));var h=this._elementTooltip.querySelectorAll(".i-role-content");h[0]?h[0].innerHTML=this.render(g.item):console.log("template should contain i-role-content class"),this._show(),this._currentElement=g.item}},onElementMouseOut:function(){this._hide()},_show:function(){this._tooltip.show();var a=d.mouse(this._elementTooltip.parentNode);this._tooltip.position(a[0],a[1]).updateSize()},_hide:function(){this._interval=setTimeout(function(){this._currentElement=null,this._tooltip.hide(),this.circle&&this.circle.remove()}.bind(this),300)},_destroyTooltip:function(){this.circle&&this.circle.remove(),this._tooltip.destroy()},destroy:function(){this._destroyTooltip()}}}var c=a.api._,d=a.api.d3;a.api.plugins.add("tooltip",b)}); +!function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){{require("tauCharts")}module.exports=a()}else a(this.tauCharts)}(function(a){function b(a){return a=a||{},{template:['
','
Exclude
'].join(""),itemTemplate:['
','
<%=label%>
','
<%=value%>
',"
"].join(""),onExcludeData:function(){},_drawPoint:function(a,b,c,d){this.circle&&this.circle.remove(),this.circle=a.append("circle").attr("cx",b).attr("cy",c).attr("class",d).attr("r",4),this.circle.node().addEventListener("mouseover",function(){clearTimeout(this._interval)}.bind(this),!1),this.circle.node().addEventListener("mouseleave",function(){this._hide()}.bind(this),!1)},init:function(b){this._chart=b,this._dataFields=a.fields,c.extend(this,c.omit(a,"fields")),this._interval=null,this._dataWithCoords={},this._unitMeta={},this._templateItem=c.template(this.itemTemplate),this._tooltip=b.addBalloon({spacing:5,auto:!0}),this._elementTooltip=this._tooltip.getElement();var d=this._elementTooltip;d.addEventListener("mouseover",function(){clearTimeout(this._interval)}.bind(this),!1),d.addEventListener("mouseleave",function(){this._hide()}.bind(this),!1),d.addEventListener("click",function(a){var b=a.target;b.classList.contains("i-role-exclude")&&(this._exclude(),this._hide())}.bind(this),!1),d.insertAdjacentHTML("afterbegin",this.template)},onUnitReady:function(a,b){if(b.type&&0===b.type.indexOf("ELEMENT")){var c=this._generateKey(b.$where);this._unitMeta[c]=b;var d=b.partition();this._dataWithCoords[c]=d.map(function(a){return{x:b.options.xScale(a[b.x.scaleDim]),y:b.options.yScale(a[b.y.scaleDim]),item:a}},this)}},render:function(a,b){return b.map(function(b){return this._templateItem({label:b,value:a[b]})},this).join("")},_exclude:function(){var a=this._chart.getData();this._chart.setData(c.without(a,this._currentElement)),this.onExcludeData(this._currentElement)},_calculateLength:function(a,b,c,d){return(c-a)*(c-a)+(d-b)*(d-b)},_generateKey:function(a){return JSON.stringify(a)},_getFields:function(a){if(this._dataFields)return this._dataFields;for(var b=[a.size.scaleDim,a.color.scaleDim],d=[],e=[];a=a.parentUnit;)d.push(a.x.scaleDim),e.push(a.y.scaleDim);return c.compact(b.concat(e,d).reverse())},onElementMouseOver:function(a,b){clearInterval(this._interval);var e=d.mouse(b.element),f=this._generateKey(b.cellData.$where),g=c.min(this._dataWithCoords[f],function(a){return this._calculateLength(a.x,a.y,e[0],e[1])},this);if(this._currentElement!==g){b.elementData.key&&Array.isArray(b.elementData.values)&&this._drawPoint(d.select(b.element.parentNode),g.x,g.y,this._unitMeta[f].options.color.get(b.elementData.key));var h=this._elementTooltip.querySelectorAll(".i-role-content");if(h[0]){var i=this._getFields(this._unitMeta[f]);h[0].innerHTML=this.render(g.item,i)}else console.log("template should contain i-role-content class");this._show(),this._currentElement=g.item}},onElementMouseOut:function(){this._hide()},_show:function(){this._tooltip.show();var a=d.mouse(this._elementTooltip.parentNode);this._tooltip.position(a[0],a[1]).updateSize()},_hide:function(){this._interval=setTimeout(function(){this._currentElement=null,this._tooltip.hide(),this.circle&&this.circle.remove()}.bind(this),300)},_destroyTooltip:function(){this.circle&&this.circle.remove(),this._tooltip.destroy()},destroy:function(){this._destroyTooltip()}}}var c=a.api._,d=a.api.d3;a.api.plugins.add("tooltip",b)}); \ No newline at end of file diff --git a/build/tauCharts.color-brewer.js b/build/tauCharts.color-brewer.js index 90215ee69..749b9cd7b 100644 --- a/build/tauCharts.color-brewer.js +++ b/build/tauCharts.color-brewer.js @@ -1,324 +1,324 @@ -(function (definition) { - if (typeof define === "function" && define.amd) { - define(['tauCharts'], function (tauCharts) { - return definition(tauCharts); - }); - } else if (typeof module === "object" && module.exports) { - var tauCharts = require('tauCharts'); - module.exports = definition(tauCharts); - } else { - definition(this.tauCharts); - } -})(function (tauCharts) { - // This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). - var colorbrewer = { - YlGn: { - 3: ["#f7fcb9", "#addd8e", "#31a354"], - 4: ["#ffffcc", "#c2e699", "#78c679", "#238443"], - 5: ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"], - 6: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"], - 7: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], - 8: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], - 9: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"] - }, YlGnBu: { - 3: ["#edf8b1", "#7fcdbb", "#2c7fb8"], - 4: ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"], - 5: ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"], - 6: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"], - 7: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], - 8: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], - 9: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"] - }, GnBu: { - 3: ["#e0f3db", "#a8ddb5", "#43a2ca"], - 4: ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"], - 5: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"], - 6: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"], - 7: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], - 8: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], - 9: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"] - }, BuGn: { - 3: ["#e5f5f9", "#99d8c9", "#2ca25f"], - 4: ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"], - 5: ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"], - 6: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"], - 7: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], - 8: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], - 9: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"] - }, PuBuGn: { - 3: ["#ece2f0", "#a6bddb", "#1c9099"], - 4: ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"], - 5: ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"], - 6: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"], - 7: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], - 8: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], - 9: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"] - }, PuBu: { - 3: ["#ece7f2", "#a6bddb", "#2b8cbe"], - 4: ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"], - 5: ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"], - 6: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"], - 7: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], - 8: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], - 9: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"] - }, BuPu: { - 3: ["#e0ecf4", "#9ebcda", "#8856a7"], - 4: ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"], - 5: ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"], - 6: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"], - 7: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], - 8: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], - 9: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"] - }, RdPu: { - 3: ["#fde0dd", "#fa9fb5", "#c51b8a"], - 4: ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"], - 5: ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"], - 6: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"], - 7: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], - 8: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], - 9: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"] - }, PuRd: { - 3: ["#e7e1ef", "#c994c7", "#dd1c77"], - 4: ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"], - 5: ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"], - 6: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"], - 7: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], - 8: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], - 9: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"] - }, OrRd: { - 3: ["#fee8c8", "#fdbb84", "#e34a33"], - 4: ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"], - 5: ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"], - 6: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"], - 7: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], - 8: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], - 9: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"] - }, YlOrRd: { - 3: ["#ffeda0", "#feb24c", "#f03b20"], - 4: ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"], - 5: ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"], - 6: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"], - 7: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], - 8: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], - 9: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"] - }, YlOrBr: { - 3: ["#fff7bc", "#fec44f", "#d95f0e"], - 4: ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"], - 5: ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"], - 6: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"], - 7: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], - 8: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], - 9: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"] - }, Purples: { - 3: ["#efedf5", "#bcbddc", "#756bb1"], - 4: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"], - 5: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"], - 6: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"], - 7: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], - 8: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], - 9: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"] - }, Blues: { - 3: ["#deebf7", "#9ecae1", "#3182bd"], - 4: ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"], - 5: ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"], - 6: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"], - 7: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], - 8: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], - 9: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"] - }, Greens: { - 3: ["#e5f5e0", "#a1d99b", "#31a354"], - 4: ["#edf8e9", "#bae4b3", "#74c476", "#238b45"], - 5: ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"], - 6: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"], - 7: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], - 8: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], - 9: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"] - }, Oranges: { - 3: ["#fee6ce", "#fdae6b", "#e6550d"], - 4: ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"], - 5: ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"], - 6: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"], - 7: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], - 8: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], - 9: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"] - }, Reds: { - 3: ["#fee0d2", "#fc9272", "#de2d26"], - 4: ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"], - 5: ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"], - 6: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"], - 7: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], - 8: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], - 9: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"] - }, Greys: { - 3: ["#f0f0f0", "#bdbdbd", "#636363"], - 4: ["#f7f7f7", "#cccccc", "#969696", "#525252"], - 5: ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"], - 6: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"], - 7: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], - 8: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], - 9: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"] - }, PuOr: { - 3: ["#f1a340", "#f7f7f7", "#998ec3"], - 4: ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"], - 5: ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"], - 6: ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"], - 7: ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"], - 8: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], - 9: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], - 10: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"], - 11: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"] - }, BrBG: { - 3: ["#d8b365", "#f5f5f5", "#5ab4ac"], - 4: ["#a6611a", "#dfc27d", "#80cdc1", "#018571"], - 5: ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"], - 6: ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"], - 7: ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"], - 8: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], - 9: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], - 10: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"], - 11: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"] - }, PRGn: { - 3: ["#af8dc3", "#f7f7f7", "#7fbf7b"], - 4: ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"], - 5: ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"], - 6: ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"], - 7: ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"], - 8: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], - 9: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], - 10: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"], - 11: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"] - }, PiYG: { - 3: ["#e9a3c9", "#f7f7f7", "#a1d76a"], - 4: ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"], - 5: ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"], - 6: ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"], - 7: ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"], - 8: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], - 9: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], - 10: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"], - 11: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"] - }, RdBu: { - 3: ["#ef8a62", "#f7f7f7", "#67a9cf"], - 4: ["#ca0020", "#f4a582", "#92c5de", "#0571b0"], - 5: ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"], - 6: ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"], - 7: ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"], - 8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], - 9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], - 10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"], - 11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"] - }, RdGy: { - 3: ["#ef8a62", "#ffffff", "#999999"], - 4: ["#ca0020", "#f4a582", "#bababa", "#404040"], - 5: ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"], - 6: ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"], - 7: ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"], - 8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], - 9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], - 10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"], - 11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"] - }, RdYlBu: { - 3: ["#fc8d59", "#ffffbf", "#91bfdb"], - 4: ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"], - 5: ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"], - 6: ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"], - 7: ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"], - 8: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], - 9: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], - 10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"], - 11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"] - }, Spectral: { - 3: ["#fc8d59", "#ffffbf", "#99d594"], - 4: ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"], - 5: ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"], - 6: ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"], - 7: ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"], - 8: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], - 9: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], - 10: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"], - 11: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"] - }, RdYlGn: { - 3: ["#fc8d59", "#ffffbf", "#91cf60"], - 4: ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"], - 5: ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"], - 6: ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"], - 7: ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"], - 8: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], - 9: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], - 10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"], - 11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"] - }, Accent: { - 3: ["#7fc97f", "#beaed4", "#fdc086"], - 4: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"], - 5: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"], - 6: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"], - 7: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"], - 8: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"] - }, Dark2: { - 3: ["#1b9e77", "#d95f02", "#7570b3"], - 4: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"], - 5: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"], - 6: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"], - 7: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"], - 8: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"] - }, Paired: { - 3: ["#a6cee3", "#1f78b4", "#b2df8a"], - 4: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"], - 5: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"], - 6: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"], - 7: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"], - 8: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"], - 9: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"], - 10: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"], - 11: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"], - 12: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"] - }, Pastel1: { - 3: ["#fbb4ae", "#b3cde3", "#ccebc5"], - 4: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"], - 5: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"], - 6: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"], - 7: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"], - 8: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"], - 9: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"] - }, Pastel2: { - 3: ["#b3e2cd", "#fdcdac", "#cbd5e8"], - 4: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"], - 5: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"], - 6: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"], - 7: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"], - 8: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"] - }, Set1: { - 3: ["#e41a1c", "#377eb8", "#4daf4a"], - 4: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"], - 5: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"], - 6: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"], - 7: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"], - 8: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"], - 9: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"] - }, Set2: { - 3: ["#66c2a5", "#fc8d62", "#8da0cb"], - 4: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"], - 5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"], - 6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"], - 7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"], - 8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"] - }, Set3: { - 3: ["#8dd3c7", "#ffffb3", "#bebada"], - 4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"], - 5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"], - 6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"], - 7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"], - 8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"], - 9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"], - 10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"], - 11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"], - 12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"] - } - }; - var tauBrewer = function (hueSet, colorNumber) { - return colorbrewer[hueSet][colorNumber].map(function (element, index) { - return hueSet + ' ' + 'q' + index + '-' + colorNumber; - }); - }; - tauCharts.api.colorBrewers.add('tauBrewer', tauBrewer); - return tauBrewer; +(function (definition) { + if (typeof define === "function" && define.amd) { + define(['tauCharts'], function (tauCharts) { + return definition(tauCharts); + }); + } else if (typeof module === "object" && module.exports) { + var tauCharts = require('tauCharts'); + module.exports = definition(tauCharts); + } else { + definition(this.tauCharts); + } +})(function (tauCharts) { + // This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). + var colorbrewer = { + YlGn: { + 3: ["#f7fcb9", "#addd8e", "#31a354"], + 4: ["#ffffcc", "#c2e699", "#78c679", "#238443"], + 5: ["#ffffcc", "#c2e699", "#78c679", "#31a354", "#006837"], + 6: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#31a354", "#006837"], + 7: ["#ffffcc", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], + 8: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#005a32"], + 9: ["#ffffe5", "#f7fcb9", "#d9f0a3", "#addd8e", "#78c679", "#41ab5d", "#238443", "#006837", "#004529"] + }, YlGnBu: { + 3: ["#edf8b1", "#7fcdbb", "#2c7fb8"], + 4: ["#ffffcc", "#a1dab4", "#41b6c4", "#225ea8"], + 5: ["#ffffcc", "#a1dab4", "#41b6c4", "#2c7fb8", "#253494"], + 6: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#2c7fb8", "#253494"], + 7: ["#ffffcc", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], + 8: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#0c2c84"], + 9: ["#ffffd9", "#edf8b1", "#c7e9b4", "#7fcdbb", "#41b6c4", "#1d91c0", "#225ea8", "#253494", "#081d58"] + }, GnBu: { + 3: ["#e0f3db", "#a8ddb5", "#43a2ca"], + 4: ["#f0f9e8", "#bae4bc", "#7bccc4", "#2b8cbe"], + 5: ["#f0f9e8", "#bae4bc", "#7bccc4", "#43a2ca", "#0868ac"], + 6: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#43a2ca", "#0868ac"], + 7: ["#f0f9e8", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], + 8: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#08589e"], + 9: ["#f7fcf0", "#e0f3db", "#ccebc5", "#a8ddb5", "#7bccc4", "#4eb3d3", "#2b8cbe", "#0868ac", "#084081"] + }, BuGn: { + 3: ["#e5f5f9", "#99d8c9", "#2ca25f"], + 4: ["#edf8fb", "#b2e2e2", "#66c2a4", "#238b45"], + 5: ["#edf8fb", "#b2e2e2", "#66c2a4", "#2ca25f", "#006d2c"], + 6: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#2ca25f", "#006d2c"], + 7: ["#edf8fb", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], + 8: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#005824"], + 9: ["#f7fcfd", "#e5f5f9", "#ccece6", "#99d8c9", "#66c2a4", "#41ae76", "#238b45", "#006d2c", "#00441b"] + }, PuBuGn: { + 3: ["#ece2f0", "#a6bddb", "#1c9099"], + 4: ["#f6eff7", "#bdc9e1", "#67a9cf", "#02818a"], + 5: ["#f6eff7", "#bdc9e1", "#67a9cf", "#1c9099", "#016c59"], + 6: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#1c9099", "#016c59"], + 7: ["#f6eff7", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], + 8: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016450"], + 9: ["#fff7fb", "#ece2f0", "#d0d1e6", "#a6bddb", "#67a9cf", "#3690c0", "#02818a", "#016c59", "#014636"] + }, PuBu: { + 3: ["#ece7f2", "#a6bddb", "#2b8cbe"], + 4: ["#f1eef6", "#bdc9e1", "#74a9cf", "#0570b0"], + 5: ["#f1eef6", "#bdc9e1", "#74a9cf", "#2b8cbe", "#045a8d"], + 6: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#2b8cbe", "#045a8d"], + 7: ["#f1eef6", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], + 8: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#034e7b"], + 9: ["#fff7fb", "#ece7f2", "#d0d1e6", "#a6bddb", "#74a9cf", "#3690c0", "#0570b0", "#045a8d", "#023858"] + }, BuPu: { + 3: ["#e0ecf4", "#9ebcda", "#8856a7"], + 4: ["#edf8fb", "#b3cde3", "#8c96c6", "#88419d"], + 5: ["#edf8fb", "#b3cde3", "#8c96c6", "#8856a7", "#810f7c"], + 6: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8856a7", "#810f7c"], + 7: ["#edf8fb", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], + 8: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#6e016b"], + 9: ["#f7fcfd", "#e0ecf4", "#bfd3e6", "#9ebcda", "#8c96c6", "#8c6bb1", "#88419d", "#810f7c", "#4d004b"] + }, RdPu: { + 3: ["#fde0dd", "#fa9fb5", "#c51b8a"], + 4: ["#feebe2", "#fbb4b9", "#f768a1", "#ae017e"], + 5: ["#feebe2", "#fbb4b9", "#f768a1", "#c51b8a", "#7a0177"], + 6: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#c51b8a", "#7a0177"], + 7: ["#feebe2", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], + 8: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177"], + 9: ["#fff7f3", "#fde0dd", "#fcc5c0", "#fa9fb5", "#f768a1", "#dd3497", "#ae017e", "#7a0177", "#49006a"] + }, PuRd: { + 3: ["#e7e1ef", "#c994c7", "#dd1c77"], + 4: ["#f1eef6", "#d7b5d8", "#df65b0", "#ce1256"], + 5: ["#f1eef6", "#d7b5d8", "#df65b0", "#dd1c77", "#980043"], + 6: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#dd1c77", "#980043"], + 7: ["#f1eef6", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], + 8: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#91003f"], + 9: ["#f7f4f9", "#e7e1ef", "#d4b9da", "#c994c7", "#df65b0", "#e7298a", "#ce1256", "#980043", "#67001f"] + }, OrRd: { + 3: ["#fee8c8", "#fdbb84", "#e34a33"], + 4: ["#fef0d9", "#fdcc8a", "#fc8d59", "#d7301f"], + 5: ["#fef0d9", "#fdcc8a", "#fc8d59", "#e34a33", "#b30000"], + 6: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#e34a33", "#b30000"], + 7: ["#fef0d9", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], + 8: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#990000"], + 9: ["#fff7ec", "#fee8c8", "#fdd49e", "#fdbb84", "#fc8d59", "#ef6548", "#d7301f", "#b30000", "#7f0000"] + }, YlOrRd: { + 3: ["#ffeda0", "#feb24c", "#f03b20"], + 4: ["#ffffb2", "#fecc5c", "#fd8d3c", "#e31a1c"], + 5: ["#ffffb2", "#fecc5c", "#fd8d3c", "#f03b20", "#bd0026"], + 6: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#f03b20", "#bd0026"], + 7: ["#ffffb2", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], + 8: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#b10026"], + 9: ["#ffffcc", "#ffeda0", "#fed976", "#feb24c", "#fd8d3c", "#fc4e2a", "#e31a1c", "#bd0026", "#800026"] + }, YlOrBr: { + 3: ["#fff7bc", "#fec44f", "#d95f0e"], + 4: ["#ffffd4", "#fed98e", "#fe9929", "#cc4c02"], + 5: ["#ffffd4", "#fed98e", "#fe9929", "#d95f0e", "#993404"], + 6: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#d95f0e", "#993404"], + 7: ["#ffffd4", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], + 8: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#8c2d04"], + 9: ["#ffffe5", "#fff7bc", "#fee391", "#fec44f", "#fe9929", "#ec7014", "#cc4c02", "#993404", "#662506"] + }, Purples: { + 3: ["#efedf5", "#bcbddc", "#756bb1"], + 4: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#6a51a3"], + 5: ["#f2f0f7", "#cbc9e2", "#9e9ac8", "#756bb1", "#54278f"], + 6: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#756bb1", "#54278f"], + 7: ["#f2f0f7", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], + 8: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#4a1486"], + 9: ["#fcfbfd", "#efedf5", "#dadaeb", "#bcbddc", "#9e9ac8", "#807dba", "#6a51a3", "#54278f", "#3f007d"] + }, Blues: { + 3: ["#deebf7", "#9ecae1", "#3182bd"], + 4: ["#eff3ff", "#bdd7e7", "#6baed6", "#2171b5"], + 5: ["#eff3ff", "#bdd7e7", "#6baed6", "#3182bd", "#08519c"], + 6: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#3182bd", "#08519c"], + 7: ["#eff3ff", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], + 8: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#084594"], + 9: ["#f7fbff", "#deebf7", "#c6dbef", "#9ecae1", "#6baed6", "#4292c6", "#2171b5", "#08519c", "#08306b"] + }, Greens: { + 3: ["#e5f5e0", "#a1d99b", "#31a354"], + 4: ["#edf8e9", "#bae4b3", "#74c476", "#238b45"], + 5: ["#edf8e9", "#bae4b3", "#74c476", "#31a354", "#006d2c"], + 6: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#31a354", "#006d2c"], + 7: ["#edf8e9", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], + 8: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#005a32"], + 9: ["#f7fcf5", "#e5f5e0", "#c7e9c0", "#a1d99b", "#74c476", "#41ab5d", "#238b45", "#006d2c", "#00441b"] + }, Oranges: { + 3: ["#fee6ce", "#fdae6b", "#e6550d"], + 4: ["#feedde", "#fdbe85", "#fd8d3c", "#d94701"], + 5: ["#feedde", "#fdbe85", "#fd8d3c", "#e6550d", "#a63603"], + 6: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#e6550d", "#a63603"], + 7: ["#feedde", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], + 8: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#8c2d04"], + 9: ["#fff5eb", "#fee6ce", "#fdd0a2", "#fdae6b", "#fd8d3c", "#f16913", "#d94801", "#a63603", "#7f2704"] + }, Reds: { + 3: ["#fee0d2", "#fc9272", "#de2d26"], + 4: ["#fee5d9", "#fcae91", "#fb6a4a", "#cb181d"], + 5: ["#fee5d9", "#fcae91", "#fb6a4a", "#de2d26", "#a50f15"], + 6: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#de2d26", "#a50f15"], + 7: ["#fee5d9", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], + 8: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#99000d"], + 9: ["#fff5f0", "#fee0d2", "#fcbba1", "#fc9272", "#fb6a4a", "#ef3b2c", "#cb181d", "#a50f15", "#67000d"] + }, Greys: { + 3: ["#f0f0f0", "#bdbdbd", "#636363"], + 4: ["#f7f7f7", "#cccccc", "#969696", "#525252"], + 5: ["#f7f7f7", "#cccccc", "#969696", "#636363", "#252525"], + 6: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#636363", "#252525"], + 7: ["#f7f7f7", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], + 8: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525"], + 9: ["#ffffff", "#f0f0f0", "#d9d9d9", "#bdbdbd", "#969696", "#737373", "#525252", "#252525", "#000000"] + }, PuOr: { + 3: ["#f1a340", "#f7f7f7", "#998ec3"], + 4: ["#e66101", "#fdb863", "#b2abd2", "#5e3c99"], + 5: ["#e66101", "#fdb863", "#f7f7f7", "#b2abd2", "#5e3c99"], + 6: ["#b35806", "#f1a340", "#fee0b6", "#d8daeb", "#998ec3", "#542788"], + 7: ["#b35806", "#f1a340", "#fee0b6", "#f7f7f7", "#d8daeb", "#998ec3", "#542788"], + 8: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], + 9: ["#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788"], + 10: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"], + 11: ["#7f3b08", "#b35806", "#e08214", "#fdb863", "#fee0b6", "#f7f7f7", "#d8daeb", "#b2abd2", "#8073ac", "#542788", "#2d004b"] + }, BrBG: { + 3: ["#d8b365", "#f5f5f5", "#5ab4ac"], + 4: ["#a6611a", "#dfc27d", "#80cdc1", "#018571"], + 5: ["#a6611a", "#dfc27d", "#f5f5f5", "#80cdc1", "#018571"], + 6: ["#8c510a", "#d8b365", "#f6e8c3", "#c7eae5", "#5ab4ac", "#01665e"], + 7: ["#8c510a", "#d8b365", "#f6e8c3", "#f5f5f5", "#c7eae5", "#5ab4ac", "#01665e"], + 8: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], + 9: ["#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e"], + 10: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"], + 11: ["#543005", "#8c510a", "#bf812d", "#dfc27d", "#f6e8c3", "#f5f5f5", "#c7eae5", "#80cdc1", "#35978f", "#01665e", "#003c30"] + }, PRGn: { + 3: ["#af8dc3", "#f7f7f7", "#7fbf7b"], + 4: ["#7b3294", "#c2a5cf", "#a6dba0", "#008837"], + 5: ["#7b3294", "#c2a5cf", "#f7f7f7", "#a6dba0", "#008837"], + 6: ["#762a83", "#af8dc3", "#e7d4e8", "#d9f0d3", "#7fbf7b", "#1b7837"], + 7: ["#762a83", "#af8dc3", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#7fbf7b", "#1b7837"], + 8: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], + 9: ["#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837"], + 10: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"], + 11: ["#40004b", "#762a83", "#9970ab", "#c2a5cf", "#e7d4e8", "#f7f7f7", "#d9f0d3", "#a6dba0", "#5aae61", "#1b7837", "#00441b"] + }, PiYG: { + 3: ["#e9a3c9", "#f7f7f7", "#a1d76a"], + 4: ["#d01c8b", "#f1b6da", "#b8e186", "#4dac26"], + 5: ["#d01c8b", "#f1b6da", "#f7f7f7", "#b8e186", "#4dac26"], + 6: ["#c51b7d", "#e9a3c9", "#fde0ef", "#e6f5d0", "#a1d76a", "#4d9221"], + 7: ["#c51b7d", "#e9a3c9", "#fde0ef", "#f7f7f7", "#e6f5d0", "#a1d76a", "#4d9221"], + 8: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], + 9: ["#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221"], + 10: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"], + 11: ["#8e0152", "#c51b7d", "#de77ae", "#f1b6da", "#fde0ef", "#f7f7f7", "#e6f5d0", "#b8e186", "#7fbc41", "#4d9221", "#276419"] + }, RdBu: { + 3: ["#ef8a62", "#f7f7f7", "#67a9cf"], + 4: ["#ca0020", "#f4a582", "#92c5de", "#0571b0"], + 5: ["#ca0020", "#f4a582", "#f7f7f7", "#92c5de", "#0571b0"], + 6: ["#b2182b", "#ef8a62", "#fddbc7", "#d1e5f0", "#67a9cf", "#2166ac"], + 7: ["#b2182b", "#ef8a62", "#fddbc7", "#f7f7f7", "#d1e5f0", "#67a9cf", "#2166ac"], + 8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], + 9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac"], + 10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"], + 11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#f7f7f7", "#d1e5f0", "#92c5de", "#4393c3", "#2166ac", "#053061"] + }, RdGy: { + 3: ["#ef8a62", "#ffffff", "#999999"], + 4: ["#ca0020", "#f4a582", "#bababa", "#404040"], + 5: ["#ca0020", "#f4a582", "#ffffff", "#bababa", "#404040"], + 6: ["#b2182b", "#ef8a62", "#fddbc7", "#e0e0e0", "#999999", "#4d4d4d"], + 7: ["#b2182b", "#ef8a62", "#fddbc7", "#ffffff", "#e0e0e0", "#999999", "#4d4d4d"], + 8: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], + 9: ["#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d"], + 10: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"], + 11: ["#67001f", "#b2182b", "#d6604d", "#f4a582", "#fddbc7", "#ffffff", "#e0e0e0", "#bababa", "#878787", "#4d4d4d", "#1a1a1a"] + }, RdYlBu: { + 3: ["#fc8d59", "#ffffbf", "#91bfdb"], + 4: ["#d7191c", "#fdae61", "#abd9e9", "#2c7bb6"], + 5: ["#d7191c", "#fdae61", "#ffffbf", "#abd9e9", "#2c7bb6"], + 6: ["#d73027", "#fc8d59", "#fee090", "#e0f3f8", "#91bfdb", "#4575b4"], + 7: ["#d73027", "#fc8d59", "#fee090", "#ffffbf", "#e0f3f8", "#91bfdb", "#4575b4"], + 8: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], + 9: ["#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4"], + 10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"], + 11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee090", "#ffffbf", "#e0f3f8", "#abd9e9", "#74add1", "#4575b4", "#313695"] + }, Spectral: { + 3: ["#fc8d59", "#ffffbf", "#99d594"], + 4: ["#d7191c", "#fdae61", "#abdda4", "#2b83ba"], + 5: ["#d7191c", "#fdae61", "#ffffbf", "#abdda4", "#2b83ba"], + 6: ["#d53e4f", "#fc8d59", "#fee08b", "#e6f598", "#99d594", "#3288bd"], + 7: ["#d53e4f", "#fc8d59", "#fee08b", "#ffffbf", "#e6f598", "#99d594", "#3288bd"], + 8: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], + 9: ["#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd"], + 10: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"], + 11: ["#9e0142", "#d53e4f", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#e6f598", "#abdda4", "#66c2a5", "#3288bd", "#5e4fa2"] + }, RdYlGn: { + 3: ["#fc8d59", "#ffffbf", "#91cf60"], + 4: ["#d7191c", "#fdae61", "#a6d96a", "#1a9641"], + 5: ["#d7191c", "#fdae61", "#ffffbf", "#a6d96a", "#1a9641"], + 6: ["#d73027", "#fc8d59", "#fee08b", "#d9ef8b", "#91cf60", "#1a9850"], + 7: ["#d73027", "#fc8d59", "#fee08b", "#ffffbf", "#d9ef8b", "#91cf60", "#1a9850"], + 8: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], + 9: ["#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850"], + 10: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"], + 11: ["#a50026", "#d73027", "#f46d43", "#fdae61", "#fee08b", "#ffffbf", "#d9ef8b", "#a6d96a", "#66bd63", "#1a9850", "#006837"] + }, Accent: { + 3: ["#7fc97f", "#beaed4", "#fdc086"], + 4: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99"], + 5: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0"], + 6: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f"], + 7: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17"], + 8: ["#7fc97f", "#beaed4", "#fdc086", "#ffff99", "#386cb0", "#f0027f", "#bf5b17", "#666666"] + }, Dark2: { + 3: ["#1b9e77", "#d95f02", "#7570b3"], + 4: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a"], + 5: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e"], + 6: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02"], + 7: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d"], + 8: ["#1b9e77", "#d95f02", "#7570b3", "#e7298a", "#66a61e", "#e6ab02", "#a6761d", "#666666"] + }, Paired: { + 3: ["#a6cee3", "#1f78b4", "#b2df8a"], + 4: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c"], + 5: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99"], + 6: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c"], + 7: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f"], + 8: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00"], + 9: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6"], + 10: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a"], + 11: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99"], + 12: ["#a6cee3", "#1f78b4", "#b2df8a", "#33a02c", "#fb9a99", "#e31a1c", "#fdbf6f", "#ff7f00", "#cab2d6", "#6a3d9a", "#ffff99", "#b15928"] + }, Pastel1: { + 3: ["#fbb4ae", "#b3cde3", "#ccebc5"], + 4: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4"], + 5: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6"], + 6: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc"], + 7: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd"], + 8: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec"], + 9: ["#fbb4ae", "#b3cde3", "#ccebc5", "#decbe4", "#fed9a6", "#ffffcc", "#e5d8bd", "#fddaec", "#f2f2f2"] + }, Pastel2: { + 3: ["#b3e2cd", "#fdcdac", "#cbd5e8"], + 4: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4"], + 5: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9"], + 6: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae"], + 7: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc"], + 8: ["#b3e2cd", "#fdcdac", "#cbd5e8", "#f4cae4", "#e6f5c9", "#fff2ae", "#f1e2cc", "#cccccc"] + }, Set1: { + 3: ["#e41a1c", "#377eb8", "#4daf4a"], + 4: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3"], + 5: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00"], + 6: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33"], + 7: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628"], + 8: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf"], + 9: ["#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628", "#f781bf", "#999999"] + }, Set2: { + 3: ["#66c2a5", "#fc8d62", "#8da0cb"], + 4: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3"], + 5: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854"], + 6: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f"], + 7: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494"], + 8: ["#66c2a5", "#fc8d62", "#8da0cb", "#e78ac3", "#a6d854", "#ffd92f", "#e5c494", "#b3b3b3"] + }, Set3: { + 3: ["#8dd3c7", "#ffffb3", "#bebada"], + 4: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072"], + 5: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3"], + 6: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462"], + 7: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69"], + 8: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5"], + 9: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9"], + 10: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd"], + 11: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5"], + 12: ["#8dd3c7", "#ffffb3", "#bebada", "#fb8072", "#80b1d3", "#fdb462", "#b3de69", "#fccde5", "#d9d9d9", "#bc80bd", "#ccebc5", "#ffed6f"] + } + }; + var tauBrewer = function (hueSet, colorNumber) { + return colorbrewer[hueSet][colorNumber].map(function (element, index) { + return hueSet + ' ' + 'q' + index + '-' + colorNumber; + }); + }; + tauCharts.api.colorBrewers.add('tauBrewer', tauBrewer); + return tauBrewer; }); \ No newline at end of file diff --git a/build/tauCharts.color-brewer.min.js b/build/tauCharts.color-brewer.min.js index b3fa0552f..959c7d2d2 100644 --- a/build/tauCharts.color-brewer.min.js +++ b/build/tauCharts.color-brewer.min.js @@ -1,4 +1,4 @@ -/*! tauCharts - v0.2.0 - 2014-12-03 +/*! tauCharts - v0.2.0 - 2014-12-04 * https://github.com/TargetProcess/tauCharts * Copyright (c) 2014 Taucraft Limited; Licensed Creative Commons */ !function(a){if("function"==typeof define&&define.amd)define(["tauCharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("tauCharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){var b={YlGn:{3:["#f7fcb9","#addd8e","#31a354"],4:["#ffffcc","#c2e699","#78c679","#238443"],5:["#ffffcc","#c2e699","#78c679","#31a354","#006837"],6:["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],7:["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],8:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],9:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]},YlGnBu:{3:["#edf8b1","#7fcdbb","#2c7fb8"],4:["#ffffcc","#a1dab4","#41b6c4","#225ea8"],5:["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],6:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],7:["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],8:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],9:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]},GnBu:{3:["#e0f3db","#a8ddb5","#43a2ca"],4:["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],5:["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],6:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],7:["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],8:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],9:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]},BuGn:{3:["#e5f5f9","#99d8c9","#2ca25f"],4:["#edf8fb","#b2e2e2","#66c2a4","#238b45"],5:["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],6:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],7:["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],8:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],9:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]},PuBuGn:{3:["#ece2f0","#a6bddb","#1c9099"],4:["#f6eff7","#bdc9e1","#67a9cf","#02818a"],5:["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],6:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],7:["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],8:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],9:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]},PuBu:{3:["#ece7f2","#a6bddb","#2b8cbe"],4:["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],5:["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],6:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],7:["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],8:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],9:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]},BuPu:{3:["#e0ecf4","#9ebcda","#8856a7"],4:["#edf8fb","#b3cde3","#8c96c6","#88419d"],5:["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],6:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],7:["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],8:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],9:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]},RdPu:{3:["#fde0dd","#fa9fb5","#c51b8a"],4:["#feebe2","#fbb4b9","#f768a1","#ae017e"],5:["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],6:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],7:["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],8:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],9:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]},PuRd:{3:["#e7e1ef","#c994c7","#dd1c77"],4:["#f1eef6","#d7b5d8","#df65b0","#ce1256"],5:["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],6:["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],7:["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],8:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],9:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]},OrRd:{3:["#fee8c8","#fdbb84","#e34a33"],4:["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],5:["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],6:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],7:["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],8:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],9:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]},YlOrRd:{3:["#ffeda0","#feb24c","#f03b20"],4:["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],5:["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],6:["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],7:["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],8:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],9:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]},YlOrBr:{3:["#fff7bc","#fec44f","#d95f0e"],4:["#ffffd4","#fed98e","#fe9929","#cc4c02"],5:["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],6:["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],7:["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],8:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],9:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]},Purples:{3:["#efedf5","#bcbddc","#756bb1"],4:["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],5:["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],6:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],7:["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],8:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],9:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]},Blues:{3:["#deebf7","#9ecae1","#3182bd"],4:["#eff3ff","#bdd7e7","#6baed6","#2171b5"],5:["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],6:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],7:["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],8:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],9:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]},Greens:{3:["#e5f5e0","#a1d99b","#31a354"],4:["#edf8e9","#bae4b3","#74c476","#238b45"],5:["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],6:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],7:["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],8:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],9:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]},Oranges:{3:["#fee6ce","#fdae6b","#e6550d"],4:["#feedde","#fdbe85","#fd8d3c","#d94701"],5:["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],6:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],7:["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],8:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],9:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]},Reds:{3:["#fee0d2","#fc9272","#de2d26"],4:["#fee5d9","#fcae91","#fb6a4a","#cb181d"],5:["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],6:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],7:["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],8:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],9:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]},Greys:{3:["#f0f0f0","#bdbdbd","#636363"],4:["#f7f7f7","#cccccc","#969696","#525252"],5:["#f7f7f7","#cccccc","#969696","#636363","#252525"],6:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],7:["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],8:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],9:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]},PuOr:{3:["#f1a340","#f7f7f7","#998ec3"],4:["#e66101","#fdb863","#b2abd2","#5e3c99"],5:["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],6:["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],7:["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],8:["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],9:["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],10:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],11:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]},BrBG:{3:["#d8b365","#f5f5f5","#5ab4ac"],4:["#a6611a","#dfc27d","#80cdc1","#018571"],5:["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],6:["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],7:["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],8:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],9:["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],10:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],11:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]},PRGn:{3:["#af8dc3","#f7f7f7","#7fbf7b"],4:["#7b3294","#c2a5cf","#a6dba0","#008837"],5:["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],6:["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],7:["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],8:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],9:["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],10:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],11:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]},PiYG:{3:["#e9a3c9","#f7f7f7","#a1d76a"],4:["#d01c8b","#f1b6da","#b8e186","#4dac26"],5:["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],6:["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],7:["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],8:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],9:["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],10:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],11:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]},RdBu:{3:["#ef8a62","#f7f7f7","#67a9cf"],4:["#ca0020","#f4a582","#92c5de","#0571b0"],5:["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],6:["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],7:["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]},RdGy:{3:["#ef8a62","#ffffff","#999999"],4:["#ca0020","#f4a582","#bababa","#404040"],5:["#ca0020","#f4a582","#ffffff","#bababa","#404040"],6:["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],7:["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],8:["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],9:["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],10:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],11:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]},RdYlBu:{3:["#fc8d59","#ffffbf","#91bfdb"],4:["#d7191c","#fdae61","#abd9e9","#2c7bb6"],5:["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],6:["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],7:["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],8:["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],9:["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]},Spectral:{3:["#fc8d59","#ffffbf","#99d594"],4:["#d7191c","#fdae61","#abdda4","#2b83ba"],5:["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],6:["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],7:["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],8:["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],9:["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],10:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],11:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]},RdYlGn:{3:["#fc8d59","#ffffbf","#91cf60"],4:["#d7191c","#fdae61","#a6d96a","#1a9641"],5:["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],6:["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],7:["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],8:["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],9:["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],10:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],11:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]},Accent:{3:["#7fc97f","#beaed4","#fdc086"],4:["#7fc97f","#beaed4","#fdc086","#ffff99"],5:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],6:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],7:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],8:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]},Dark2:{3:["#1b9e77","#d95f02","#7570b3"],4:["#1b9e77","#d95f02","#7570b3","#e7298a"],5:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],6:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],7:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],8:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]},Paired:{3:["#a6cee3","#1f78b4","#b2df8a"],4:["#a6cee3","#1f78b4","#b2df8a","#33a02c"],5:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],6:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],7:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],8:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],9:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],10:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],11:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],12:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]},Pastel1:{3:["#fbb4ae","#b3cde3","#ccebc5"],4:["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],5:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],6:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],7:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],8:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],9:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},Pastel2:{3:["#b3e2cd","#fdcdac","#cbd5e8"],4:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],5:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],6:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],7:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],8:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]},Set1:{3:["#e41a1c","#377eb8","#4daf4a"],4:["#e41a1c","#377eb8","#4daf4a","#984ea3"],5:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],6:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],7:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],8:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],9:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]},Set2:{3:["#66c2a5","#fc8d62","#8da0cb"],4:["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],5:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],6:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],7:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],8:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]},Set3:{3:["#8dd3c7","#ffffb3","#bebada"],4:["#8dd3c7","#ffffb3","#bebada","#fb8072"],5:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],6:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],7:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],8:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],9:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],10:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],11:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],12:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]}},c=function(a,c){return b[a][c].map(function(b,d){return a+" q"+d+"-"+c})};return a.api.colorBrewers.add("tauBrewer",c),c}); \ No newline at end of file diff --git a/build/tauCharts.js b/build/tauCharts.js index 0d0bc69ec..b48085d24 100644 --- a/build/tauCharts.js +++ b/build/tauCharts.js @@ -1,16 +1,16 @@ -/*! tauCharts - v0.2.0 - 2014-12-03 +/*! tauCharts - v0.2.0 - 2014-12-04 * https://github.com/TargetProcess/tauCharts * Copyright (c) 2014 Taucraft Limited; Licensed Creative Commons */ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - define(['underscore', 'd3'],function(_,d3){return factory(_, d3);}); - } else if (typeof module === "object" && module.exports) { - var _ = require('underscore'); - var d3 = require('d3'); - module.exports = factory(_); - } else { - root.tauCharts = factory(root._, root.d3); - } +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + define(['underscore', 'd3'],function(_,d3){return factory(_, d3);}); + } else if (typeof module === "object" && module.exports) { + var _ = require('underscore'); + var d3 = require('d3'); + module.exports = factory(_); + } else { + root.tauCharts = factory(root._, root.d3); + } }(this, function (_, d3) {/** * @license almond 0.3.0 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. @@ -443,12 +443,12 @@ var requirejs, require, define; define("../node_modules/almond/almond", function(){}); +/** + * Internal method to return CSS value for given element and property + */ define('utils/utils-dom',["exports"], function (exports) { - /** - * Internal method to return CSS value for given element and property - */ var utilsDom = { getScrollbarWidth: function () { var div = document.createElement("div"); @@ -539,6 +539,7 @@ define('dsl-reader',["exports"], function (exports) { var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; @@ -553,6 +554,7 @@ define('dsl-reader',["exports"], function (exports) { writable: true, value: function (spec) { var _this = this; + var buildRecursively = function (unit) { return _this.UnitsRegistry.get(unit.type).walk(_this.domain.mix(unit), buildRecursively); }; @@ -626,13 +628,18 @@ define('dsl-reader',["exports"], function (exports) { writable: true, value: function (styledGraph, target, chart) { var _this2 = this; + styledGraph.options.container = target; var renderRecursively = function (unit) { - _this2.UnitsRegistry.get(unit.type).draw(_this2.domain.mix(unit), renderRecursively); + _this2.UnitsRegistry.get(unit.type).draw(_this2.domain.mix(unit), function (childUnit) { + childUnit.parentUnit = unit; + renderRecursively(childUnit); + }); if (chart) { chart.fire("unitready", unit); } }; + styledGraph.parentUnit = null; renderRecursively(styledGraph); return styledGraph.options.container; } @@ -653,6 +660,7 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { var CSS_PREFIX = _const.CSS_PREFIX; + // jshint ignore: start var classes = function (el) { return { @@ -665,14 +673,12 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { }; }; - - var indexOf = function (arr, obj) { return arr.indexOf(obj); }; - /** - * Globals. + /** + * Globals. */ var win = window; var doc = win.document; @@ -680,13 +686,13 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { var docEl = doc.documentElement; var verticalPlaces = ["top", "bottom"]; - /** - * Poor man's shallow object extend. - * - * @param {Object} a - * @param {Object} b - * - * @return {Object} + /** + * Poor man's shallow object extend. + * + * @param {Object} a + * @param {Object} b + * + * @return {Object} */ function extend(a, b) { for (var key in b) { @@ -696,24 +702,24 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return a; } - /** - * Checks whether object is window. - * - * @param {Object} obj - * - * @return {Boolean} + /** + * Checks whether object is window. + * + * @param {Object} obj + * + * @return {Boolean} */ function isWin(obj) { return obj && obj.setInterval != null; } - /** - * Returns element's object with `left`, `top`, `bottom`, `right`, `width`, and `height` - * properties indicating the position and dimensions of element on a page. - * - * @param {Element} element - * - * @return {Object} + /** + * Returns element's object with `left`, `top`, `bottom`, `right`, `width`, and `height` + * properties indicating the position and dimensions of element on a page. + * + * @param {Element} element + * + * @return {Object} */ function position(element) { var winTop = win.pageYOffset || docEl.scrollTop; @@ -739,32 +745,32 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return box; } - /** - * Parse integer from strings like '-50px'. - * - * @param {Mixed} value - * - * @return {Integer} + /** + * Parse integer from strings like '-50px'. + * + * @param {Mixed} value + * + * @return {Integer} */ function parsePx(value) { return 0 | Math.round(String(value).replace(/[^\-0-9.]/g, "")); } - /** - * Get computed style of element. - * - * @param {Element} element - * - * @type {String} + /** + * Get computed style of element. + * + * @param {Element} element + * + * @type {String} */ var style = win.getComputedStyle; - /** - * Returns transition duration of element in ms. - * - * @param {Element} element - * - * @return {Integer} + /** + * Returns transition duration of element in ms. + * + * @param {Element} element + * + * @return {Integer} */ function transitionDuration(element) { var duration = String(style(element, transitionDuration.propName)); @@ -789,13 +795,13 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } }()); var objectCreate = Object.create; - /** - * Tooltip construnctor. - * - * @param {String|Element} content - * @param {Object} options - * - * @return {Tooltip} + /** + * Tooltip construnctor. + * + * @param {String|Element} content + * @param {Object} options + * + * @return {Tooltip} */ function Tooltip(content, options) { if (!(this instanceof Tooltip)) { @@ -807,10 +813,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { this.content(content); } - /** - * Creates a tooltip element. - * - * @return {Void} + /** + * Creates a tooltip element. + * + * @return {Void} */ Tooltip.prototype._createElement = function () { this.element = doc.createElement("div"); @@ -825,35 +831,35 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } }; - /** - * Changes tooltip's type class type. - * - * @param {String} name - * - * @return {Tooltip} + /** + * Changes tooltip's type class type. + * + * @param {String} name + * + * @return {Tooltip} */ Tooltip.prototype.type = function (name) { return this.changeClassType("type", name); }; - /** - * Changes tooltip's effect class type. - * - * @param {String} name - * - * @return {Tooltip} + /** + * Changes tooltip's effect class type. + * + * @param {String} name + * + * @return {Tooltip} */ Tooltip.prototype.effect = function (name) { return this.changeClassType("effect", name); }; - /** - * Changes class type. - * - * @param {String} propName - * @param {String} newClass - * - * @return {Tooltip} + /** + * Changes class type. + * + * @param {String} propName + * @param {String} newClass + * + * @return {Tooltip} */ Tooltip.prototype.changeClassType = function (propName, newClass) { propName += "Class"; @@ -867,10 +873,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Updates tooltip's dimensions. - * - * @return {Tooltip} + /** + * Updates tooltip's dimensions. + * + * @return {Tooltip} */ Tooltip.prototype.updateSize = function () { if (this.hidden) { @@ -891,15 +897,15 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Change tooltip content. - * - * When tooltip is visible, its size is automatically - * synced and tooltip correctly repositioned. - * - * @param {String|Element} content - * - * @return {Tooltip} + /** + * Change tooltip content. + * + * When tooltip is visible, its size is automatically + * synced and tooltip correctly repositioned. + * + * @param {String|Element} content + * + * @return {Tooltip} */ Tooltip.prototype.content = function (content) { if (typeof content === "object") { @@ -912,14 +918,14 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Pick new place tooltip should be displayed at. - * - * When the tooltip is visible, it is automatically positioned there. - * - * @param {String} place - * - * @return {Tooltip} + /** + * Pick new place tooltip should be displayed at. + * + * When the tooltip is visible, it is automatically positioned there. + * + * @param {String} place + * + * @return {Tooltip} */ Tooltip.prototype.place = function (place) { this.options.place = place; @@ -929,12 +935,12 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Attach tooltip to an element. - * - * @param {Element} element - * - * @return {Tooltip} + /** + * Attach tooltip to an element. + * + * @param {Element} element + * + * @return {Tooltip} */ Tooltip.prototype.attach = function (element) { this.attachedTo = element; @@ -944,10 +950,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Detach tooltip from element. - * - * @return {Tooltip} + /** + * Detach tooltip from element. + * + * @return {Tooltip} */ Tooltip.prototype.detach = function () { this.hide(); @@ -955,12 +961,12 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Pick the most reasonable place for target position. - * - * @param {Object} target - * - * @return {Tooltip} + /** + * Pick the most reasonable place for target position. + * + * @param {Object} target + * + * @return {Tooltip} */ Tooltip.prototype._pickPlace = function (target) { if (!this.options.auto) { @@ -978,21 +984,22 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } switch (place[1]) { case "left": + if (target.right - this.width <= winPos.left) { place[1] = "right"; } break; case "right": + if (target.left + this.width >= winPos.right) { place[1] = "left"; } break; - default: - if (target.left + target.width / 2 + this.width / 2 >= winPos.right) { - place[1] = "left"; - } else if (target.right - target.width / 2 - this.width / 2 <= winPos.left) { - place[1] = "right"; - } + default: if (target.left + target.width / 2 + this.width / 2 >= winPos.right) { + place[1] = "left"; + } else if (target.right - target.width / 2 - this.width / 2 <= winPos.left) { + place[1] = "right"; + } } } else { if (target.left - this.width - spacing <= winPos.left) { @@ -1002,34 +1009,35 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } switch (place[1]) { case "top": + if (target.bottom - this.height <= winPos.top) { place[1] = "bottom"; } break; case "bottom": + if (target.top + this.height >= winPos.bottom) { place[1] = "top"; } break; - default: - if (target.top + target.height / 2 + this.height / 2 >= winPos.bottom) { - place[1] = "top"; - } else if (target.bottom - target.height / 2 - this.height / 2 <= winPos.top) { - place[1] = "bottom"; - } + default: if (target.top + target.height / 2 + this.height / 2 >= winPos.bottom) { + place[1] = "top"; + } else if (target.bottom - target.height / 2 - this.height / 2 <= winPos.top) { + place[1] = "bottom"; + } } } return place.join("-"); }; - /** - * Position the element to an element or a specific coordinates. - * - * @param {Integer|Element} x - * @param {Integer} y - * - * @return {Tooltip} + /** + * Position the element to an element or a specific coordinates. + * + * @param {Integer|Element} x + * @param {Integer} y + * + * @return {Tooltip} */ Tooltip.prototype.position = function (x, y) { if (this.attachedTo) { @@ -1065,53 +1073,65 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { var top, left; switch (this.curPlace) { case "top": + top = target.top - this.height - spacing; left = target.left + target.width / 2 - this.width / 2; break; case "top-left": + top = target.top - this.height - spacing; left = target.right - this.width; break; case "top-right": + top = target.top - this.height - spacing; left = target.left; break; case "bottom": + top = target.bottom + spacing; left = target.left + target.width / 2 - this.width / 2; break; case "bottom-left": + top = target.bottom + spacing; left = target.right - this.width; break; case "bottom-right": + top = target.bottom + spacing; left = target.left; break; case "left": + top = target.top + target.height / 2 - this.height / 2; left = target.left - this.width - spacing; break; case "left-top": + top = target.bottom - this.height; left = target.left - this.width - spacing; break; case "left-bottom": + top = target.top; left = target.left - this.width - spacing; break; case "right": + top = target.top + target.height / 2 - this.height / 2; left = target.right + spacing; break; case "right-top": + top = target.bottom - this.height; left = target.right + spacing; break; case "right-bottom": + top = target.top; left = target.right + spacing; break; @@ -1124,13 +1144,13 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this; }; - /** - * Show the tooltip. - * - * @param {Integer|Element} x - * @param {Integer} y - * - * @return {Tooltip} + /** + * Show the tooltip. + * + * @param {Integer|Element} x + * @param {Integer} y + * + * @return {Tooltip} */ Tooltip.prototype.show = function (x, y) { x = this.attachedTo ? this.attachedTo : x; @@ -1168,10 +1188,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { return this.element; }; - /** - * Hide the tooltip. - * - * @return {Tooltip} + /** + * Hide the tooltip. + * + * @return {Tooltip} */ Tooltip.prototype.hide = function () { if (this.hidden) { @@ -1218,10 +1238,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { this.element = this.options = null; }; - /** - * Make the tip window resize aware. - * - * @return {Void} + /** + * Make the tip window resize aware. + * + * @return {Void} */ Tooltip.prototype._aware = function () { var index = indexOf(Tooltip.winAware, this); @@ -1230,10 +1250,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } }; - /** - * Remove the window resize awareness. - * - * @return {Void} + /** + * Remove the window resize awareness. + * + * @return {Void} */ Tooltip.prototype._unaware = function () { var index = indexOf(Tooltip.winAware, this); @@ -1242,10 +1262,10 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { } }; - /** - * Handles repositioning of tooltips on window resize. - * - * @return {Void} + /** + * Handles repositioning of tooltips on window resize. + * + * @return {Void} */ Tooltip.reposition = (function () { var rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) { @@ -1277,17 +1297,17 @@ define('api/balloon',["exports", "../const"], function (exports, _const) { window.addEventListener("resize", Tooltip.reposition); window.addEventListener("scroll", Tooltip.reposition); - /** - * Array with dynamic class types. - * - * @type {Array} + /** + * Array with dynamic class types. + * + * @type {Array} */ Tooltip.classTypes = ["type", "effect"]; - /** - * Default options for Tooltip constructor. - * - * @type {Object} + /** + * Default options for Tooltip constructor. + * + * @type {Object} */ Tooltip.defaults = { baseClass: CSS_PREFIX + "tooltip", // Base tooltip class name. @@ -1306,17 +1326,17 @@ define('event',["exports"], function (exports) { var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; var NULL_HANDLER = {}; var events = {}; - - /** - * Creates new type of event or returns existing one, if it was created before. - * @param {string} eventName - * @return {function(..eventArgs)} + /** + * Creates new type of event or returns existing one, if it was created before. + * @param {string} eventName + * @return {function(..eventArgs)} */ function createDispatcher(eventName) { var eventFunction = events[eventName]; @@ -1371,18 +1391,8 @@ define('event',["exports"], function (exports) { return eventFunction; } - /** - * Base class for event dispatching. It provides interface for instance - * to add and remove handler for desired events, and call it when event happens. - * @class - */ - var Emitter = (function () { - var Emitter = - /** - * @constructor - */ - function Emitter() { + var Emitter = function Emitter() { this.handler = null; this.emit_destroy = createDispatcher("destroy"); }; @@ -1390,13 +1400,6 @@ define('event',["exports"], function (exports) { _classProps(Emitter, null, { addHandler: { writable: true, - - - /** - * Adds new event handler to object. - * @param {object} callbacks Callback set. - * @param {object=} context Context object. - */ value: function (callbacks, context) { context = context || this; // add handler @@ -1424,14 +1427,6 @@ define('event',["exports"], function (exports) { }, removeHandler: { writable: true, - - - /** - * Removes event handler set from object. For this operation parameters - * must be the same (equivalent) as used for addHandler method. - * @param {object} callbacks Callback set. - * @param {object=} context Context object. - */ value: function (callbacks, context) { var cursor = this; var prev; @@ -1451,17 +1446,10 @@ define('event',["exports"], function (exports) { return; } } - - } }, destroy: { writable: true, - - - /** - * @destructor - */ value: function () { // fire object destroy event handlers this.emit_destroy(); @@ -1553,10 +1541,12 @@ define('utils/utils',["exports"], function (exports) { exports.utils = utils; }); +/* jshint ignore:start */ define('formatter-registry',["exports", "d3"], function (exports, _d3) { var d3 = _d3; + /* jshint ignore:end */ var FORMATS_MAP = { "x-num-auto": function (x) { @@ -1609,9 +1599,9 @@ define('formatter-registry',["exports", "d3"], function (exports, _d3) { FORMATS_MAP["x-time-hour"] = FORMATS_MAP["x-time-auto"]; FORMATS_MAP["x-time-day"] = FORMATS_MAP["x-time-auto"]; FORMATS_MAP["x-time-week"] = FORMATS_MAP["x-time-auto"]; - FORMATS_MAP["x-time-month"] = FORMATS_MAP.month; - FORMATS_MAP["x-time-quarter"] = FORMATS_MAP.quarter; - FORMATS_MAP["x-time-year"] = FORMATS_MAP.year; + FORMATS_MAP["x-time-month"] = FORMATS_MAP["month"]; + FORMATS_MAP["x-time-quarter"] = FORMATS_MAP["quarter"]; + FORMATS_MAP["x-time-year"] = FORMATS_MAP["year"]; /* jshint ignore:end */ var identity = (function (x) { @@ -1648,12 +1638,15 @@ define('formatter-registry',["exports", "d3"], function (exports, _d3) { exports.FormatterRegistry = FormatterRegistry; }); -define('utils/utils-draw',["exports", "../utils/utils", "../formatter-registry"], function (exports, _utilsUtils, _formatterRegistry) { +define('utils/utils-draw',["exports", "../utils/utils", "../formatter-registry", "underscore", "d3"], function (exports, _utilsUtils, _formatterRegistry, _underscore, _d3) { var utils = _utilsUtils.utils; var FormatterRegistry = _formatterRegistry.FormatterRegistry; + var _ = _underscore; + var d3 = _d3; + /* jshint ignore:end */ var translate = function (left, top) { return "translate(" + left + "," + top + ")"; @@ -1665,7 +1658,6 @@ define('utils/utils-draw',["exports", "../utils/utils", "../formatter-registry"] return _.contains(["bottom", "top"], scaleOrient.toLowerCase()) ? "h" : "v"; }; - var cutText = function (textString, widthLimit) { textString.each(function () { var textD3 = d3.select(this); @@ -1956,7 +1948,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var utilsDraw = _utilsUtilsDraw.utilsDraw; var FormatterRegistry = _formatterRegistry.FormatterRegistry; - var applyCustomProps = function (targetUnit, customUnit) { var guide = customUnit.guide || {}; var guide_x = guide.hasOwnProperty("x") ? guide.x : {}; @@ -2020,7 +2011,13 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var maxXTickText = _.max(domainValues, function (x) { return formatter(x).toString().length; }); - return fnCalcTickLabelSize(formatter(maxXTickText)); + + // d3 sometimes produce fractional ticks on wide space + // so we intentionally add fractional suffix + // to foresee scale density issues + var suffix = _.isNumber(maxXTickText) ? ".00" : ""; + + return fnCalcTickLabelSize(formatter(maxXTickText) + suffix); }; var getTickFormat = function (dim, meta, defaultFormats) { @@ -2182,7 +2179,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var yMeta = meta.scaleMeta(unit.y, yScaleOptions); var yValues = yMeta.values; - unit.guide.x.tickFormat = unit.guide.x.tickFormat || getTickFormat(dimX, xMeta, settings.defaultFormats); unit.guide.y.tickFormat = unit.guide.y.tickFormat || getTickFormat(dimY, yMeta, settings.defaultFormats); @@ -2193,7 +2189,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var maxYTickSize = getMaxTickLabelSize(yValues, FormatterRegistry.get(unit.guide.y.tickFormat), settings.getAxisTickLabelSize, settings.yAxisTickLabelLimit); - var xAxisPadding = selectorPredicates.isLeafParent ? settings.xAxisPadding : 0; var yAxisPadding = selectorPredicates.isLeafParent ? settings.yAxisPadding : 0; @@ -2239,7 +2234,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var distToXAxisLabel = settings.distToXAxisLabel; var distToYAxisLabel = settings.distToYAxisLabel; - var xTickLabelW = Math.min(settings.xAxisTickLabelLimit, (isXVertical ? maxXTickSize.height : maxXTickSize.width)); unit.guide.x.density = settings.xDensityKoeff * xTickLabelW; @@ -2248,15 +2242,12 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", var yTickLabelH = Math.min(settings.yAxisTickLabelLimit, koeffLinesCount * maxYTickSize.height); unit.guide.y.density = settings.yDensityKoeff * yTickLabelH; - unit.guide.x.label.padding = (unit.guide.x.label.text) ? (xFontH + distToXAxisLabel) : 0; unit.guide.y.label.padding = (unit.guide.y.label.text) ? (yFontW + distToYAxisLabel) : 0; - var xLabelPadding = (unit.guide.x.label.text) ? (unit.guide.x.label.padding + xFontLabelHeight) : (xFontH); var yLabelPadding = (unit.guide.y.label.text) ? (unit.guide.y.label.padding + yFontLabelHeight) : (yFontW); - unit.guide.padding.b = xAxisPadding + xLabelPadding; unit.guide.padding.l = yAxisPadding + yLabelPadding; @@ -2287,7 +2278,6 @@ define('spec-engine-factory',["exports", "./utils/utils", "./utils/utils-draw", }, srcSpec); }; - var fnTraverseSpec = function (orig, specUnitRef, transformRules) { var xRef = utilsDraw.applyNodeDefaults(specUnitRef); xRef = transformRules(createSelectorPredicates(xRef), xRef); @@ -2373,8 +2363,6 @@ define('layout-engine-factory',["exports", "./utils/utils", "./utils/utils-draw" var utilsDraw = _utilsUtilsDraw.utilsDraw; var TMatrix = _matrix.TMatrix; - - var specUnitSummary = function (spec, boxOpt) { var box = boxOpt ? boxOpt : { depth: -1, paddings: [] }; var p = spec.guide.padding; @@ -2493,21 +2481,20 @@ define('layout-engine-factory',["exports", "./utils/utils", "./utils/utils-draw" exports.LayoutEngineFactory = LayoutEngineFactory; }); +//plugins +/** @class + * @extends Plugin */ define('plugins',["exports"], function (exports) { var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; - //plugins - /** @class - * @extends Plugin */ var Plugins = (function () { - var Plugins = - /** @constructs */ - function Plugins(plugins, chart) { + var Plugins = function Plugins(plugins, chart) { this.chart = chart; this._plugins = plugins.map(this.initPlugin, this); }; @@ -2517,6 +2504,7 @@ define('plugins',["exports"], function (exports) { writable: true, value: function (plugin) { var _this = this; + if (plugin.init) { plugin.init(this.chart); } @@ -2549,7 +2537,6 @@ define('plugins',["exports"], function (exports) { }; }; - exports.propagateDatumEvents = propagateDatumEvents; exports.Plugins = Plugins; }); @@ -2646,6 +2633,7 @@ define('unit-domain-mixin',["exports", "./unit-domain-period-generator", "./util var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; @@ -2653,6 +2641,7 @@ define('unit-domain-mixin',["exports", "./unit-domain-period-generator", "./util var utils = _utilsUtils.utils; var _ = _underscore; var d3 = _d3; + /* jshint ignore:end */ var autoScaleMethods = { @@ -2926,7 +2915,6 @@ define('data-processor',["exports", "./utils/utils"], function (exports, _utilsU var utils = _utilsUtils.utils; - var DataProcessor = { isYFunctionOfX: function (data, xFields, yFields) { var isRelationAFunction = true; @@ -3078,6 +3066,7 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; @@ -3135,7 +3124,13 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even this.config.settings = this.setupSettings(this.config.settings); this.config.spec.dimensions = this.setupMetaInfo(this.config.spec.dimensions, this.config.data); + var prevLength = this.config.data.length; this.config.data = this.config.settings.excludeNull ? DataProcessor.excludeNullValues(this.config.spec.dimensions, this.config.data) : this.config.data; + var currLength = this.config.data.length; + var diffLength = prevLength - currLength; + if (diffLength > 0) { + this.config.settings.log(diffLength + " data points were excluded, because they have undefined values.", "WARN"); + } } }, setupMetaInfo: { @@ -3159,17 +3154,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even }, addBalloon: { writable: true, - /* addLine (conf) { - var unitContainer = this._spec.unit.unit; - while(true) { - if(unitContainer[0].unit) { - unitContainer = unitContainer[0].unit; - } else { - break; - } - } - unitContainer.push(conf); - }*/ value: function (conf) { return new Tooltip("", conf || {}); } @@ -3195,7 +3179,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even } containerNode.innerHTML = ""; - var domainMixin = new UnitDomainMixin(this.config.spec.dimensions, this.config.data); var specEngine = SpecEngineFactory.get(this.config.settings.specEngine, this.config.settings); @@ -3242,7 +3225,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even size.height = screenH - scrollH; size.width = screenW - scrollW; - // optimize full spec depending on size var localSettings = this.config.settings; var traverseToDeep = function (root, size) { @@ -3277,7 +3259,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../api/balloon", "../even traverseToDeep(fullSpec.unit, size); - var reader = new DSLReader(domainMixin, UnitsRegistry); var logicXGraph = reader.buildGraph(fullSpec); @@ -3327,7 +3308,6 @@ define('charts/tau.chart',["exports", "./tau.plot", "../utils/utils", "../data-p var utils = _utilsUtils.utils; var DataProcessor = _dataProcessor.DataProcessor; - var convertAxis = function (data) { return (!data) ? null : data; }; @@ -3460,42 +3440,65 @@ define('charts/tau.chart',["exports", "./tau.plot", "../utils/utils", "../data-p var log = config.settings.log; - if (!config.sortedBy) { - var xs = _.isArray(config.x) ? config.x : [config.x]; - var ys = _.isArray(config.y) ? config.y : [config.y]; - var primaryX = xs[xs.length - 1]; - var secondaryX = xs.slice(0, xs.length - 1); - var primaryY = ys[ys.length - 1]; - var secondaryY = ys.slice(0, ys.length - 1); - var colorProp = config.color; - - var rest = secondaryX.concat(secondaryY).concat([colorProp]).filter(function (x) { - return x !== null; - }); + var lineOrientationStrategies = { + none: function (config) { + return null; + }, - var variantIndex = -1; - var variations = [[[primaryX].concat(rest), primaryY], [[primaryY].concat(rest), primaryX]]; - var isMatchAny = variations.some(function (item, i) { - var domainFields = item[0]; - var rangeProperty = item[1]; - var r = DataProcessor.isYFunctionOfX(data, domainFields, [rangeProperty]); - if (r.result) { - variantIndex = i; + horizontal: function (config) { + var xs = utils.isArray(config.x) ? config.x : [config.x]; + return xs[xs.length - 1]; + }, + + vertical: function (config) { + var ys = utils.isArray(config.y) ? config.y : [config.y]; + return ys[ys.length - 1]; + }, + + auto: function (config) { + var xs = utils.isArray(config.x) ? config.x : [config.x]; + var ys = utils.isArray(config.y) ? config.y : [config.y]; + var primaryX = xs[xs.length - 1]; + var secondaryX = xs.slice(0, xs.length - 1); + var primaryY = ys[ys.length - 1]; + var secondaryY = ys.slice(0, ys.length - 1); + var colorProp = config.color; + + var rest = secondaryX.concat(secondaryY).concat([colorProp]).filter(function (x) { + return x !== null; + }); + + var variantIndex = -1; + var variations = [[[primaryX].concat(rest), primaryY], [[primaryY].concat(rest), primaryX]]; + var isMatchAny = variations.some(function (item, i) { + var domainFields = item[0]; + var rangeProperty = item[1]; + var r = DataProcessor.isYFunctionOfX(data, domainFields, [rangeProperty]); + if (r.result) { + variantIndex = i; + } else { + log(["Attempt to find a functional relation between", item[0] + " and " + item[1] + " is failed.", "There are several " + r.error.keyY + " values (e.g. " + r.error.errY.join(",") + ")", "for (" + r.error.keyX + " = " + r.error.valX + ")."].join(" ")); + } + return r.result; + }); + + var propSortBy; + if (isMatchAny) { + propSortBy = variations[variantIndex][0][0]; } else { - log(["Attempt to find a functional relation between", item[0] + " and " + item[1] + " is failed.", "There are several " + r.error.keyY + " values (e.g. " + r.error.errY.join(",") + ")", "for (" + r.error.keyX + " = " + r.error.valX + ")."].join(" ")); + log(["All attempts are failed.", "Will orient line horizontally by default.", "NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")); + propSortBy = primaryX; } - return r.result; - }); - var propSortBy; - if (isMatchAny) { - propSortBy = variations[variantIndex][0][0]; - } else { - log("All attempts are failed. Will use " + primaryX + " property as a sorting key by default."); - log("It is better to use [scatterplot] here."); - propSortBy = primaryX; + return propSortBy; } + }; + + var orient = (config.lineOrientation || "auto").toLowerCase(); + var strategy = lineOrientationStrategies.hasOwnProperty(orient) ? lineOrientationStrategies[orient] : lineOrientationStrategies.auto; + var propSortBy = strategy(config); + if (propSortBy !== null) { config.data = _(data).sortBy(propSortBy); } @@ -3533,7 +3536,6 @@ define('elements/coords',["exports", "../utils/utils-draw", "../const", "../util var utils = _utilsUtils.utils; var TMatrix = _matrix.TMatrix; - var FacetAlgebra = { CROSS: function (root, dimX, dimY) { var domainX = root.domain(dimX); @@ -3681,6 +3683,7 @@ define('elements/point',["exports", "../utils/utils-draw", "../const", "./size"] var utilsDraw = _utilsUtilsDraw.utilsDraw; var CSS_PREFIX = _const.CSS_PREFIX; var sizeScale = _size.sizeScale; + var point = function (node) { var options = node.options; @@ -3719,6 +3722,7 @@ define('utils/css-class-map',["exports", "../const"], function (exports, _const) var CSS_PREFIX = _const.CSS_PREFIX; + var arrayNumber = [1, 2, 3, 4, 5]; var countLineClasses = arrayNumber.map(function (i) { return CSS_PREFIX + "line-opacity-" + i; @@ -3753,6 +3757,7 @@ define('elements/line',["exports", "../utils/utils-draw", "./point", "../const", var CSS_PREFIX = _const.CSS_PREFIX; var getLineClassesByWidth = _utilsCssClassMap.getLineClassesByWidth; var getLineClassesByCount = _utilsCssClassMap.getLineClassesByCount; + var line = function (node) { var options = node.options; @@ -3802,20 +3807,20 @@ define('elements/line',["exports", "../utils/utils-draw", "./point", "../const", }; var line; - /*if(node.isGuide) { - var i = 0; - line = d3 - .svg - .line() - .x((d) => { - if(i) { - return xScale.rangeExtent()[1]; - } else { - i++; - return 0; - } - }) - .y((d) => yScale(45)); + /*if(node.isGuide) { + var i = 0; + line = d3 + .svg + .line() + .x((d) => { + if(i) { + return xScale.rangeExtent()[1]; + } else { + i++; + return 0; + } + }) + .y((d) => yScale(45)); } else {*/ line = d3.svg.line().x(function (d) { return xScale(d[node.x.scaleDim]); @@ -3824,7 +3829,6 @@ define('elements/line',["exports", "../utils/utils-draw", "./point", "../const", }); /*}*/ - var updatePaths = function () { this.attr("d", line); }; @@ -3841,6 +3845,7 @@ define('elements/interval',["exports", "../utils/utils-draw", "../const"], funct var utilsDraw = _utilsUtilsDraw.utilsDraw; var CSS_PREFIX = _const.CSS_PREFIX; + var BAR_GROUP = "i-role-bar-group"; var isMeasure = function (dim) { return dim.dimType === "measure"; @@ -3886,8 +3891,10 @@ define('elements/interval',["exports", "../utils/utils-draw", "../const"], funct var tickWidth; var intervalWidth; var offsetCategory; + (function () { xMin = Math.min.apply(null, xScale.domain()); + var startPoint = (xMin <= 0) ? 0 : xMin; _ref = getSizesParams({ @@ -3899,6 +3906,7 @@ define('elements/interval',["exports", "../utils/utils-draw", "../const"], funct tickWidth = _ref.tickWidth; intervalWidth = _ref.intervalWidth; offsetCategory = _ref.offsetCategory; + /* jshint ignore:end */ calculateX = isMeasure(node.x) ? function (d) { return xScale(Math.min(startPoint, d[node.x.scaleDim])); @@ -3924,8 +3932,10 @@ define('elements/interval',["exports", "../utils/utils-draw", "../const"], funct var tickWidth; var intervalWidth; var offsetCategory; + (function () { yMin = Math.min.apply(null, yScale.domain()); + var startPoint = (yMin <= 0) ? 0 : yMin; _ref2 = getSizesParams({ @@ -3937,6 +3947,7 @@ define('elements/interval',["exports", "../utils/utils-draw", "../const"], funct tickWidth = _ref2.tickWidth; intervalWidth = _ref2.intervalWidth; offsetCategory = _ref2.offsetCategory; + /* jshint ignore:end */ calculateX = function (d) { return xScale(d[node.x.scaleDim]) - (tickWidth / 2); @@ -3993,7 +4004,6 @@ define('elements/coords-parallel',["exports", "../utils/utils-draw", "../const", var utils = _utilsUtils.utils; var TMatrix = _matrix.TMatrix; - var inheritRootProps = function (unit, root, props) { var r = _.defaults(utils.clone(unit), _.pick.apply(_, [root].concat(props))); r.guide = _.extend(utils.clone(root.guide || {}), (r.guide || {})); @@ -4042,7 +4052,6 @@ define('elements/coords-parallel',["exports", "../utils/utils-draw", "../const", var container = options.container.append("g").attr("class", "graphical-report__" + "cell " + "cell").attr("transform", utilsDraw.translate(L, T)); - var translate = function (left, top) { return "translate(" + left + "," + top + ")"; }; @@ -4050,7 +4059,6 @@ define('elements/coords-parallel',["exports", "../utils/utils-draw", "../const", return "rotate(" + angle + ")"; }; - var fnDrawDimAxis = function (xScaleObj, AXIS_POSITION) { var container = this; @@ -4084,7 +4092,6 @@ define('elements/coords-parallel-line',["exports", "../utils/utils-draw", "../co var utilsDraw = _utilsUtilsDraw.utilsDraw; var CSS_PREFIX = _const.CSS_PREFIX; - var CoordsParallelLine = { draw: function (node) { node.color = node.dimension(node.color, node); @@ -4157,7 +4164,6 @@ define('node-map',["exports", "./elements/coords", "./elements/line", "./element var CoordsParallel = _elementsCoordsParallel.CoordsParallel; var CoordsParallelLine = _elementsCoordsParallelLine.CoordsParallelLine; - var setupElementNode = function (node, dimensions) { dimensions.forEach(function (dimName) { node[dimName] = node.dimension(node[dimName], node); @@ -4234,6 +4240,7 @@ define('tau.newCharts',["exports", "./utils/utils-dom", "./charts/tau.plot", "./ var FormatterRegistry = _formatterRegistry.FormatterRegistry; var nodeMap = _nodeMap.nodeMap; var UnitsRegistry = _unitsRegistry.UnitsRegistry; + var colorBrewers = {}; var plugins = {}; @@ -4328,11 +4335,11 @@ define('tau.newCharts',["exports", "./utils/utils-dom", "./charts/tau.plot", "./ exports.__api__ = __api__; exports.api = api; }); - define('underscore',function(){ - return _; - }); - define('d3',function(){ - return d3; - }); - return require('tau.newCharts'); + define('underscore',function(){ + return _; + }); + define('d3',function(){ + return d3; + }); + return require('tau.newCharts'); })); \ No newline at end of file diff --git a/build/tauCharts.min.js b/build/tauCharts.min.js index 7665ca1a7..d64c39510 100644 --- a/build/tauCharts.min.js +++ b/build/tauCharts.min.js @@ -1,5 +1,5 @@ -/*! tauCharts - v0.2.0 - 2014-12-03 +/*! tauCharts - v0.2.0 - 2014-12-04 * https://github.com/TargetProcess/tauCharts * Copyright (c) 2014 Taucraft Limited; Licensed Creative Commons */ -!function(a,b){if("function"==typeof define&&define.amd)define(["underscore","d3"],function(a,c){return b(a,c)});else if("object"==typeof module&&module.exports){{var c=require("underscore");require("d3")}module.exports=b(c)}else a.tauCharts=b(a._,a.d3)}(this,function(a,b){var c,d,e;return function(a){function b(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(c){if(b(r,c)){var d=r[c];delete r[c],t[c]=!0,m.apply(a,d)}if(!b(q,c)&&!b(t,c))throw new Error("No "+c);return q[c]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(c,d,e,f){var h,k,l,m,n,s,u=[],v=typeof e;if(f=f||c,"undefined"===v||"function"===v){for(d=!d.length&&e.length?["require","exports","module"]:d,n=0;n','','','<%= xTick %>',"","",""].join(""),e=a.template(d),f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.width="100px",f.style.height="100px",f.style.border="1px solid green",document.body.appendChild(f),f.innerHTML=e({xTick:c});var g=b.select(f).selectAll(".x.axis .tick text")[0][0],h={width:0,height:0},i=g.getBoundingClientRect();return h.width=i.right-i.left,h.height=i.bottom-i.top,document.body.removeChild(f),h}};c.utilsDom=d}),e("dsl-reader",["exports"],function(b){var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var b=function(a,b){this.domain=a,this.UnitsRegistry=b};return c(b,null,{buildGraph:{writable:!0,value:function(a){var b=this,c=function(a){return b.UnitsRegistry.get(a.type).walk(b.domain.mix(a),c)};return c(a.unit)}},calcLayout:{writable:!0,value:function(b,c){b.options={top:0,left:0,width:c.width,height:c.height};var d=function(b){if(!b.$matrix)return b;var c,e=b.options,f=b.guide.padding,g=e.width-(f.l+f.r),h=e.height-(f.t+f.b),i=b.$matrix.sizeR(),j=b.$matrix.sizeC(),k=g/j,l=h/i;return c=b.guide.split?{calcHeight:function(a,b,c,d){return a/d},calcTop:function(a,b,c,d){return(b+1)*(a/d)*c}}:{calcHeight:function(a){return a},calcTop:function(a,b){return b*l}},b.$matrix.iterate(function(b,e,f){var g=f.length;a.each(f,function(a,f){a.options={width:k,left:e*k,height:c.calcHeight(l,b,f,g),top:c.calcTop(l,b,f,g)},d(a)})}),b};return d(b)}},renderGraph:{writable:!0,value:function(a,b,c){var d=this;a.options.container=b;var e=function(a){d.UnitsRegistry.get(a.type).draw(d.domain.mix(a),e),c&&c.fire("unitready",a)};return e(a),a.options.container}}}),b}();b.DSLReader=d}),e("const",["exports"],function(a){a.CSS_PREFIX="graphical-report__"}),e("api/balloon",["exports","../const"],function(a,b){function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=l.pageYOffset||o.scrollTop,e=l.pageXOffset||o.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=l.innerWidth||o.clientWidth,f.height=l.innerHeight||o.clientHeight;else{if(!o.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-o.clientTop,f.left=f.left+e-o.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\-0-9.]/g,""))}function g(a){var b=String(q(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(r(h.defaults),b),this._createElement(),void this.content(a)):new h(a,b)}var i=b.CSS_PREFIX,j=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},k=function(a,b){return a.indexOf(b)},l=window,m=l.document,n=m.body,o=m.documentElement,p=["top","bottom"],q=l.getComputedStyle;g.propName=function(){for(var a=m.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,n.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,n.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||n.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=k(h.winAware,this);~a||h.winAware.push(this)},h.prototype._unaware=function(){var a=k(h.winAware,this);~a&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;d>b;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:i+"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},a.Tooltip=h}),e("event",["exports"],function(a){function b(a){var b=e[a];return b||(b=function(){for(var b,c,d=this,e=0;d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e=0?-1:1,f=d||1;d-=e*f/b}for(var g=[c,d],h=g[1]-g[0],i=Math.pow(10,Math.floor(Math.log(h/b)/Math.LN10)),j=b/h*i,k=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],l=-1;j>k[++l][0];);i*=k[l][1],g[0]=Math.floor(g[0]/i)*i,g[1]=Math.ceil(g[1]/i)*i;var m=c-g[0],n=g[1]-d,o=i/2;if(c>=0)g[0]=0;else{var p=o>=m?i:0;g[0]=g[0]-p}if(0>=d)g[1]=0;else{var q=o>=n?i:0;g[1]=g[1]+q}return[parseFloat(g[0].toFixed(15)),parseFloat(g[1].toFixed(15))]},traverseJSON:b};a.utils=c}),e("formatter-registry",["exports","d3"],function(b,c){var d=c,e={"x-num-auto":function(a){var b=parseFloat(a.toFixed(2));return Math.abs(b)<1?b.toString():d.format("s")(b)},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:d.time.format("%d-%b-%Y"),week:d.time.format("%d-%b-%Y"),"week-range":function(a){var b=new Date(a),c=new Date(a),e=new Date(c.setDate(c.getDate()+7)),f=d.time.format("%d-%b-%Y");return f(b)+" - "+f(e)},month:function(a){var b=new Date(a),c=b.getMonth(),e=0===c?"%B, %Y":"%B";return d.time.format(e)(a)},"month-year":d.time.format("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},year:d.time.format("%Y"),"x-time-auto":null};e["x-time-ms"]=e["x-time-auto"],e["x-time-sec"]=e["x-time-auto"],e["x-time-min"]=e["x-time-auto"],e["x-time-hour"]=e["x-time-auto"],e["x-time-day"]=e["x-time-auto"],e["x-time-week"]=e["x-time-auto"],e["x-time-month"]=e.month,e["x-time-quarter"]=e.quarter,e["x-time-year"]=e.year;var f=function(a){return(null===a||"undefined"==typeof a?"":a).toString()},g={get:function(b){var c=e.hasOwnProperty(b),g=c?e[b]:f;return c&&(g=e[b]),!c&&b&&(g=function(c){var e=a.isDate(c)?d.time.format(b):d.format(b);return e(c)}),c||b||(g=f),g},add:function(a,b){e[a]=b}};b.FormatterRegistry=g}),e("utils/utils-draw",["exports","../utils/utils","../formatter-registry"],function(c,d,e){var f=d.utils,g=e.FormatterRegistry,h=function(a,b){return"translate("+a+","+b+")"},i=function(a){return"rotate("+a+")"},j=function(b){return a.contains(["bottom","top"],b.toLowerCase())?"h":"v"},k=function(a,c){a.each(function(){var a=b.select(this),d=a.text().split(/\s+/).reverse();a.text(null);for(var e,f=[],g=!1;!g&&(e=d.pop());)if(f.push(e),a.text(f.join(" ")),a.node().getComputedTextLength()>c){f.pop();var h=f.join(" ");h+="...",a.text(h),g=!0}})},l=function(a,c,d,e,f){var g=function(a,b,c,d,e,f,g){var h=g*c+f,i=a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b);return i};a.each(function(){var a=b.select(this),h=a.text().split(/\s+/),i=1.1,j=a.attr("x"),k=a.attr("y"),l=parseFloat(a.attr("dy"));a.text(null);var m=g(a,null,i,j,k,l,0),n=!1,o=h.reduce(function(a,b){if(n)return a;var e=a.length===d,f=a[a.length-1],g=m.text(f+b).node().getComputedTextLength()>c;return g&&e&&(a[a.length-1]=f+"...",n=!0),g&&!e&&a.push(b),g||(a[a.length-1]=f+" "+b),a},[""]);k=f?-1*(o.length-1)*Math.floor(.5*e):k,o.forEach(function(b,c){return g(a,b,i,j,k,l,c)}),m.remove()})},m=function(a,b,c){var d=a.selectAll(".tick line"),e=c/d[0].length,f=e/2;if("ordinal"===b.scaleType||"period"===b.scaleType){var g="h"===j(b.guide.scaleOrient),h=g?"x":"y",i=g?f:-f;d.attr(h+"1",i).attr(h+"2",i)}},n=function(a,b){var c="h"===j(b.guide.scaleOrient)?1:-1,d=a.append("text").attr("transform",i(b.guide.label.rotate)).attr("class","label").attr("x",c*b.guide.size*.5).attr("y",c*b.guide.label.padding).style("text-anchor",b.guide.label.textAnchor),e=" > ",f=b.guide.label.text.split(e),g=f.length;f.forEach(function(a,b){d.append("tspan").attr("class","label-token label-token-"+b).text(a),g-1>b&&d.append("tspan").attr("class","label-token-delimiter label-token-delimiter-"+b).text(e)})},o=function(a,b){var c="h"===j(b.guide.scaleOrient),d=b.guide.rotate,e=a.selectAll(".tick text");e.attr("transform",i(d)).style("text-anchor",b.guide.textAnchor),90===d&&e.attr("x",9).attr("y",0),b.guide.tickFormatWordWrap?e.call(l,b.guide.tickFormatWordWrapLimit,b.guide.tickFormatWordWrapLines,b.guide.$maxTickTextH,!c):e.call(k,b.guide.tickFormatWordWrapLimit)},p=function(a,c,d){var e=this;if(a.scaleDim){var f=b.svg.axis().scale(a.scaleObj).orient(a.guide.scaleOrient),i=g.get(a.guide.tickFormat);null!==i&&(f.ticks(Math.round(d/a.guide.density)),f.tickFormat(i));var j=e.append("g").attr("class",a.guide.cssClass).attr("transform",h.apply(null,c)).call(f);m(j,a,d),o(j,a),n(j,a)}},q=function(a,c,d){var e=this,f=e.append("g").attr("class","grid").attr("transform",h(0,0)),i=(a.guide.showGridLines||"").toLowerCase();if(i.length>0){var j=f.append("g").attr("class","grid-lines");if(i.indexOf("x")>-1&&a.x.scaleDim){var k=a.x,l=b.svg.axis().scale(k.scaleObj).orient(k.guide.scaleOrient).tickSize(c),n=g.get(k.guide.tickFormat);null!==n&&(l.ticks(Math.round(d/k.guide.density)),l.tickFormat(n));var o=j.append("g").attr("class","grid-lines-x").call(l);m(o,k,d);var p=o.select("g.tick");if(p.node()&&"translate(0,0)"!==p.attr("transform")){var q=p.node().cloneNode(!0);j.node().appendChild(q),b.select(q).attr("class","border").attr("transform",h(0,0)).select("line").attr("x1",0).attr("x2",0)}}if(i.indexOf("y")>-1&&a.y.scaleDim){var r=a.y,s=b.svg.axis().scale(r.scaleObj).orient(r.guide.scaleOrient).tickSize(-d),n=g.get(r.guide.tickFormat);null!==n&&(s.ticks(Math.round(c/r.guide.density)),s.tickFormat(n));var t=j.append("g").attr("class","grid-lines-y").call(s);m(t,r,c)}j.selectAll("text").remove()}return f},r=a.times(10,function(a){return"color10-"+(1+a)}),s=function(a){var c,d,e=a.guide.color||{},g=a.color,h=g.scaleDim,i=e.brewer||r;f.isArray(i)?(d=a.domain(h),c=i):(d=Object.keys(i),c=d.map(function(a){return i[a]}));var j=b.scale.ordinal().range(c).domain(d),k=function(a){return d.indexOf(a)>-1?j(a):"color-default"};return{get:function(a){return k(a)},dimension:h}},t=function(b){return b.options=b.options||{},b.guide=b.guide||{},b.guide.padding=a.defaults(b.guide.padding||{},{l:0,b:0,r:0,t:0}),b.guide.x=a.defaults(b.guide.x||{},{label:"",padding:0,density:30,cssClass:"x axis",scaleOrient:"bottom",rotate:0,textAnchor:"middle",tickPeriod:null,tickFormat:null,autoScale:!0}),b.guide.x.label=a.isObject(b.guide.x.label)?b.guide.x.label:{text:b.guide.x.label},b.guide.x.label=a.defaults(b.guide.x.label,{padding:32,rotate:0,textAnchor:"middle"}),b.guide.x.tickFormat=b.guide.x.tickFormat||b.guide.x.tickPeriod,b.guide.y=a.defaults(b.guide.y||{},{label:"",padding:0,density:30,cssClass:"y axis",scaleOrient:"left",rotate:0,textAnchor:"end",tickPeriod:null,tickFormat:null,autoScale:!0}),b.guide.y.label=a.isObject(b.guide.y.label)?b.guide.y.label:{text:b.guide.y.label},b.guide.y.label=a.defaults(b.guide.y.label,{padding:32,rotate:-90,textAnchor:"middle"}),b.guide.y.tickFormat=b.guide.y.tickFormat||b.guide.y.tickPeriod,b},u={translate:h,rotate:i,getOrientation:j,fnDrawDimAxis:p,fnDrawGrid:q,generateColor:s,applyNodeDefaults:t};c.utilsDraw=u}),e("spec-engine-factory",["exports","./utils/utils","./utils/utils-draw","./formatter-registry"],function(b,c,d,e){var f=c.utils,g=d.utilsDraw,h=e.FormatterRegistry,i=function(b,c){var d=c.guide||{},e=d.hasOwnProperty("x")?d.x:{},f=d.hasOwnProperty("y")?d.y:{},g=d.hasOwnProperty("padding")?d.padding:{};return a.extend(b.guide.padding,g),a.extend(b.guide.x.label,e.label),a.extend(b.guide.x,a.omit(e,"label")),a.extend(b.guide.y.label,f.label),a.extend(b.guide.y,a.omit(f,"label")),a.extend(b.guide,a.omit(d,"x","y","padding")),b},j=function(b,c){return b.guide=b.guide||{},b.guide.padding=b.guide.padding||{l:0,t:0,r:0,b:0},b.hasOwnProperty("unit")||(b=a.defaults(b,c),b.guide=a.defaults(b.guide,f.clone(c.guide)),b.guide.x=a.defaults(b.guide.x,f.clone(c.guide.x)),b.guide.y=a.defaults(b.guide.y,f.clone(c.guide.y))),b},k=function(a){var b=a.unit||[],c=!a.hasOwnProperty("unit"),d=!b.some(function(a){return a.hasOwnProperty("unit")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},l=function(b,c,d,e){if(0===b.length)return{width:0,height:0};if(null===c){var f=d("TauChart Library");return f.width=.625*e,f}var g=a.max(b,function(a){return c(a).toString().length});return d(c(g))},m=function(a,b,c){var d=a.dimType,e=a.scaleType,f="*";if("measure"===d&&"time"===e){var g=b.source.filter(function(a){return null!==a}).sort(),h=0;if(g.length>1){for(var i=1,j=g.length,k=[];j>i;)k.push(g[i]-g[i-1]),++i;var l=k.reduce(function(a,b){return a+=b},0);h=l/k.length}var m=[[31536e6,"year"],[7776e6,"quarter"],[2592e6,"month"],[6048e5,"week"],[864e5,"day"],[36e5,"hour"],[6e4,"min"],[1e3,"sec"],[0,"ms"]],n=-1;do++n;while(m[n][0]>h);f=m[n][1]}var o=[d,e,f].join(":"),p=[d,e].join(":");return c[o]||c[p]||c[d]||null},n={NONE:function(a,b,c){var d=f.clone(a);return o(f.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b}),d},"BUILD-LABELS":function(b){var c=f.clone(b),d=[],e=[],g=null,h=null;return f.traverseJSON(c.unit,"unit",k,function(b,c){if(b.isLeaf)return c;!g&&c.x&&(g=c),!h&&c.y&&(h=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=a.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=a.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||c.x),c.y&&(c.guide.y.label.text=c.guide.y.label.text||c.y);var f=c.guide.x.label.text;f&&(d.push(f),c.guide.x.label.text="");var i=c.guide.y.label.text;return i&&(e.push(i),c.guide.y.label.text=""),c}),g&&(g.guide.x.label.text=d.map(function(a){return a.toUpperCase()}).join(" > ")),h&&(h.guide.y.label.text=e.map(function(a){return a.toUpperCase()}).join(" > ")),c},"BUILD-GUIDE":function(a,b,c){var d=f.clone(a);return o(f.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;a.isLeafParent&&!d.guide.hasOwnProperty("showGridLines")&&(d.guide.showGridLines="xy");var e=!a.isLeaf&&!a.isLeafParent;e&&(d.guide.x.cssClass+=" facet-axis",d.guide.y.cssClass+=" facet-axis");var f=b.dimension(d.x),g=b.dimension(d.y),i="measure"===f.dimType,j="measure"===g.dimType,k={map:d.guide.x.tickLabel,min:d.guide.x.tickMin,max:d.guide.x.tickMax,period:d.guide.x.tickPeriod,autoScale:d.guide.x.autoScale},n={map:d.guide.y.tickLabel,min:d.guide.y.tickMin,max:d.guide.y.tickMax,period:d.guide.y.tickPeriod,autoScale:d.guide.y.autoScale},o=b.scaleMeta(d.x,k),p=o.values,q=b.scaleMeta(d.y,n),r=q.values;d.guide.x.tickFormat=d.guide.x.tickFormat||m(f,o,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||m(g,q,c.defaultFormats);var s=0===p.length,t=0===r.length,u=l(p,h.get(d.guide.x.tickFormat),c.getAxisTickLabelSize,c.xAxisTickLabelLimit),v=l(r,h.get(d.guide.y.tickFormat),c.getAxisTickLabelSize,c.yAxisTickLabelLimit),w=a.isLeafParent?c.xAxisPadding:0,x=a.isLeafParent?c.yAxisPadding:0,y=!e&&!!f.dimType&&"measure"!==f.dimType;d.guide.x.padding=s?0:w,d.guide.y.padding=t?0:x,d.guide.x.rotate=y?90:0,d.guide.x.textAnchor=y?"start":d.guide.x.textAnchor;var z=s?0:c.xTickWidth,A=t?0:c.yTickWidth;d.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,d.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit;var B=y?u.width:u.height;!i&&B>c.xAxisTickLabelLimit&&(B=c.xAxisTickLabelLimit),!y&&u.width>c.xAxisTickLabelLimit&&(d.guide.x.tickFormatWordWrap=!0,d.guide.x.tickFormatWordWrapLines=c.xTickWordWrapLinesLimit,B=c.xTickWordWrapLinesLimit*u.height);var C=v.width;!j&&C>c.yAxisTickLabelLimit&&(C=c.yAxisTickLabelLimit,d.guide.y.tickFormatWordWrap=!0,d.guide.y.tickFormatWordWrapLines=c.yTickWordWrapLinesLimit);var D=z+B,E=A+C,F=c.xFontLabelHeight,G=c.yFontLabelHeight,H=c.distToXAxisLabel,I=c.distToYAxisLabel,J=Math.min(c.xAxisTickLabelLimit,y?u.height:u.width);d.guide.x.density=c.xDensityKoeff*J;var K=Math.ceil(v.width/c.yAxisTickLabelLimit),L=Math.min(K,c.yTickWordWrapLinesLimit),M=Math.min(c.yAxisTickLabelLimit,L*v.height);d.guide.y.density=c.yDensityKoeff*M,d.guide.x.label.padding=d.guide.x.label.text?D+H:0,d.guide.y.label.padding=d.guide.y.label.text?E+I:0;var N=d.guide.x.label.text?d.guide.x.label.padding+F:D,O=d.guide.y.label.text?d.guide.y.label.padding+G:E;return d.guide.padding.b=w+N,d.guide.padding.l=x+O,d.guide.padding.b=d.guide.x.hide?0:d.guide.padding.b,d.guide.padding.l=d.guide.y.hide?0:d.guide.padding.l,d.guide.x.tickFontHeight=u.height,d.guide.y.tickFontHeight=v.height,d.guide.x.$minimalDomain=p.length,d.guide.y.$minimalDomain=r.length,d.guide.x.$maxTickTextW=u.width,d.guide.x.$maxTickTextH=u.height,d.guide.y.$maxTickTextW=v.width,d.guide.y.$maxTickTextH=v.height,d}),d}};n.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return n[d](a,b,c)},a)};var o=function(b,c,d){var e=g.applyNodeDefaults(c);e=d(k(e),e),e=i(e,b);var h=a.omit(e,"unit");return(e.unit||[]).forEach(function(a){return o(f.clone(a),j(a,h),d)}),e},p={get:function(a,b){var c=n[a]||n.NONE;return function(a,d){return c(a,d,b)}}};b.SpecEngineFactory=p}),e("matrix",["exports"],function(b){var c=function(){var b=function(b,c){var d,e=a.toArray(arguments);d=a.isArray(e[0])?e[0]:a.times(b,function(){return a.times(c,function(){return null})}),this.cube=d};return b.prototype={iterate:function(b){var c=this.cube;return a.each(c,function(c,d){a.each(c,function(a,c){b(d,c,a)})}),this},getRC:function(a,b){return this.cube[a][b]},setRC:function(a,b,c){return this.cube[a][b]=c,this},sizeR:function(){return this.cube.length},sizeC:function(){var a=this.cube[0]||[];return a.length}},b}();b.TMatrix=c}),e("layout-engine-factory",["exports","./utils/utils","./utils/utils-draw","./matrix"],function(a,b,c,d){var e=b.utils,f=c.utilsDraw,g=d.TMatrix,h=function(a,b){var c=b?b:{depth:-1,paddings:[]},d=a.guide.padding;return c.depth+=1,c.paddings.unshift({l:d.l,b:d.b,r:d.r,t:d.t}),a.unit&&a.unit.length&&h(a.unit[0],c),c},i={NONE:function(a){return a},EXTRACT:function(a){var b=function(a,c,d){var e=a,f=e.sizeR(),h=e.sizeC();e.iterate(function(a,e,i){i.forEach(function(b){return d(b,{firstRow:0===a,firstCol:0===e,lastRow:a===f-1,lastCol:e===h-1,depth:c})}),i.filter(function(a){return a.$matrix}).forEach(function(a){a.$matrix=new g(a.$matrix.cube),b(a.$matrix,c-1,d)})})},c=e.clone(a),d=new g([[[c]]]),i=h(c),j=i.paddings.reduce(function(a,b){return a.l+=b.l,a.b+=b.b,a},{l:0,b:0}),k=e.clone(j),l=i.paddings.reverse().map(function(a){return a.l=k.l-a.l,a.b=k.b-a.b,k={l:a.l,b:a.b},a});i.paddings=l.reverse();var m=10,n=f.applyNodeDefaults({type:"COORDS.RECT",options:e.clone(a.options),$matrix:new g([[[c]]]),guide:{padding:{l:j.l-m,b:j.b-m,r:0,t:0}}});return b(d,i.depth,function(a,b){var c=b.depth;a.guide.x.hide=a.guide.x.hide?a.guide.x.hide:!b.lastRow,a.guide.y.hide=a.guide.y.hide?a.guide.y.hide:!b.firstCol;var d=c>1?0:m,e=c>1?m:0;return a.guide.x.padding+=i.paddings[c].b,a.guide.y.padding+=i.paddings[c].l,a.guide.x.padding-=e,a.guide.y.padding-=e,a.guide.padding.l=d,a.guide.padding.b=d,a.guide.padding.r=d,a.guide.padding.t=d,a}),n}},j={get:function(a){return i[a]||i.NONE}};a.LayoutEngineFactory=j}),e("plugins",["exports"],function(a){var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var a=function(a,b){this.chart=b,this._plugins=a.map(this.initPlugin,this)};return c(a,null,{initPlugin:{writable:!0,value:function(a){var b=this;a.init&&a.init(this.chart),this.chart.on("destroy",a.destroy||function(){}),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}}),a}(),e=["click","mouseover","mouseout","mousemove"],f=function(a){return function(){e.forEach(function(c){this.on(c,function(d){a.fire("element"+c,{elementData:d,element:this,cellData:b.select(this.parentNode.parentNode).datum()})})},this)}};a.propagateDatumEvents=f,a.Plugins=d}),e("unit-domain-period-generator",["exports"],function(a){var b={day:{cast:function(a){return new Date(a.setHours(0,0,0,0))},next:function(a){return new Date(a.setDate(a.getDate()+1))}},week:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(a.getDate()-a.getDay()))},next:function(a){return new Date(a.setDate(a.getDate()+7))}},month:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1))},next:function(a){return new Date(a.setMonth(a.getMonth()+1))}},quarter:{cast:function(a){a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1));var b=a.getMonth(),c=b-b%3;return new Date(a.setMonth(c))},next:function(a){return new Date(a.setMonth(a.getMonth()+3))}},year:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1)),a=new Date(a.setMonth(0))},next:function(a){return new Date(a.setFullYear(a.getFullYear()+1))}}},c={add:function(a,c){return b[a.toLowerCase()]=c,this},get:function(a){return b[a.toLowerCase()]},generate:function(a,c,d){var e=[],f=b[d.toLowerCase()];if(f){var g=f.cast(new Date(c)),h=f.cast(new Date(a));for(e.push(h);(h=f.next(new Date(h)))<=g;)e.push(h)}return e}};a.UnitDomainPeriodGenerator=c}),e("unit-domain-mixin",["exports","./unit-domain-period-generator","./utils/utils","underscore","d3"],function(a,b,c,d,e){var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=b.UnitDomainPeriodGenerator,h=c.utils,i=d,j=e,k={ordinal:function(a){return a},linear:function(a,b){var c=b.autoScale?h.autoScale(a):j.extent(a),d=i.isNumber(b.min)?b.min:c[0],e=i.isNumber(b.max)?b.max:c[1];return[Math.min(d,c[0]),Math.max(e,c[1])]},period:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime(),f=[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))];return g.generate(f[0],f[1],b.period)},time:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime();return[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))]}},l={ordinal:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1)},linear:function(a,b){return j.scale.linear().domain(a).rangeRound(b,1)},period:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1) -},time:function(a,b){return j.time.scale().domain(a).range(b)}},m=function(){var a=function(a,b){var c=function(a){return function(b){var c=b||{};return c.hasOwnProperty(a)?c[a]:null}},d=function(b){var d=a[b]||{},e=d.value?c(d.value):function(a){return a},f=i.contains(["period","time"],d.scale);return f?i.compose(function(a){return new Date(a).getTime()},e):e},e=function(b){var c=a[b]||{};return c.order||null},f=function(a){var b={category:function(a,b,c){return c},order:function(a,b,c){var d=e(a);return d?i.union(d,c):i.sortBy(c,b)},measure:function(a,b,c){return i.sortBy(c,b)},"as-is":function(a,b,c){return c}};return b[a]||b["as-is"]},h=function(a){var b={category:f("category"),order:function(a,b,c){var d=e(a);return d?i.union(c,d):c},measure:f("measure"),"as-is":f("as-is")};return b[a]||b["as-is"]};this.fnDimension=function(b,c){var d=(c||{}).dimensions||{},e=a[b]||{},f=d[b]||{};return{scaleDim:b,scaleType:f.scale||e.scale,dimType:f.type||e.type}},this.fnSource=function(a){var c=i.map(a,function(a,b){return function(c){return d(b)(c[b])===a}});return i(b).filter(function(a){return i.every(c,function(b){return b(a)})})};var j=function(c,e){if(!a[c])return[null];var f=d(c),g=i(b).chain().pluck(c).uniq(f).value();return e(c,f,g)};this.fnDomain=function(b){var c=d(b),e=(a[b]||{}).type,g=j(b,f(e));return g.map(c)};var m=function(b,e){var f=e||{},l=i.defaults({},a[b]),m={"order:period":function(a){return function(b){return g.get(a.period).cast(new Date(b))}},"*":function(){return function(a){return a}}},n=f.map?c(f.map):d(b),o=[l.type,l.scale].join(":"),p=(m[o]||m["*"])(f),q=j(b,h(l.type)).map(n),r=l.scale?k[l.scale](q,f):[];return{extract:function(a){return p(n(a))},values:r,source:q}};this.fnScaleMeta=m,this.fnScaleTo=function(b,c,d){var e=d||{},f=i.defaults({},a[b]),g=m(b,d),h=l[f.scale](g.values,c,e),j=function(a){return h(g.extract(a))};return Object.keys(h).forEach(function(a){return j[a]=h[a]}),j}};return f(a,null,{mix:{writable:!0,value:function(a){return a.dimension=this.fnDimension,a.source=this.fnSource,a.domain=this.fnDomain,a.scaleMeta=this.fnScaleMeta,a.scaleTo=this.fnScaleTo,a.partition=function(){return a.data||a.source(a.$where)},a}}}),a}();a.UnitDomainMixin=m}),e("units-registry",["exports"],function(a){var b={},c={add:function(a,c){var d={};return d.draw="function"==typeof c?c:c.draw,d.walk=c.walk||function(a){return a},b[a]=d,this},get:function(a){if(!b.hasOwnProperty(a))throw new Error("Unknown unit type: "+a);return b[a]}};a.UnitsRegistry=c}),e("data-processor",["exports","./utils/utils"],function(b,c){var d=c.utils,e={isYFunctionOfX:function(a,b,c){var d=!0,e=null;try{a.reduce(function(a,d){var f=function(a,b){return a.push(d[b]),a},g=b.reduce(f,[]).join("/"),h=c.reduce(f,[]).join("/");if(a.hasOwnProperty(g)){var i=a[g];if(i!==h)throw e={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:g,errY:[i,h]},new Error("RelationIsNotAFunction")}else a[g]=h;return a},{})}catch(f){if("RelationIsNotAFunction"!==f.message)throw f;d=!1}return{result:d,error:e}},excludeNullValues:function(a,b){var c=[];Object.keys(a).forEach(function(b){var d=a[b];d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||c.push(b)});var d;return d=0===c.length?b:b.filter(function(a){return!c.some(function(b){return!a.hasOwnProperty(b)||null===a[b]})})},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]={},d[e].type=g,d[e].scale=f.scale||c[g],d[e].value=f.value}),d},autoDetectDimTypes:function(b){var c={type:"category",scale:"ordinal"},e=function(b,c){var d=c;return a.isDate(b)?(d.type="measure",d.scale="time"):a.isObject(b)?(d.type="order",d.scale="ordinal"):a.isNumber(b)&&(d.type="measure",d.scale="linear"),d},f=function(a,b){return Object.keys(b).forEach(function(f){var g=b.hasOwnProperty(f)?b[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=e(g,d.clone(c)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?c.type:i,a[f].scale=k?c.scale:j}}),a};return a.reduce(b,f,{})}};b.DataProcessor=e}),e("charts/tau.plot",["exports","../dsl-reader","../api/balloon","../event","../spec-engine-factory","../layout-engine-factory","../plugins","../utils/utils","../utils/utils-dom","../const","../unit-domain-mixin","../units-registry","../data-processor"],function(c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},q=function(a,b){a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),a.__proto__=b},r=d.DSLReader,s=e.Tooltip,t=f.Emitter,u=g.SpecEngineFactory,v=h.LayoutEngineFactory,w=i.Plugins,x=i.propagateDatumEvents,y=j.utils,z=k.utilsDom,A=l.CSS_PREFIX,B=m.UnitDomainMixin,C=n.UnitsRegistry,D=o.DataProcessor,E=function(c){var d=function(a){c.call(this),this.setupConfig(a),this._plugins=new w(this.config.plugins,this),this._emptyContainer=a.emptyContainer||""};return q(d,c),p(d,null,{setupConfig:{writable:!0,value:function(b){this.config=a.defaults(b,{spec:{},data:[],plugins:[],settings:{}}),this.config.settings.specEngine=this.config.specEngine||this.config.settings.specEngine,this.config.settings.layoutEngine=this.config.layoutEngine||this.config.settings.layoutEngine,this.config.settings=this.setupSettings(this.config.settings),this.config.spec.dimensions=this.setupMetaInfo(this.config.spec.dimensions,this.config.data),this.config.data=this.config.settings.excludeNull?D.excludeNullValues(this.config.spec.dimensions,this.config.data):this.config.data}},setupMetaInfo:{writable:!0,value:function(a,b){var c=a?a:D.autoDetectDimTypes(b);return D.autoAssignScales(c)}},setupSettings:{writable:!0,value:function(b){var c=d.globalSettings,e={};return Object.keys(c).forEach(function(b){e[b]=a.isFunction(c[b])?c[b]:y.clone(c[b])}),a.defaults(b||{},e)}},addBalloon:{writable:!0,value:function(a){return new s("",a||{})}},renderTo:{writable:!0,value:function(c,d){var e=b.select(c),f=e[0][0];if(this.target=c,this.targetSizes=d,null===f)throw new Error("Target element not found");var g=a.defaults(d||{},z.getContainerSize(f));if(0===this.config.data.length)return void(f.innerHTML=this._emptyContainer);f.innerHTML="";var h=new B(this.config.spec.dimensions,this.config.data),i=u.get(this.config.settings.specEngine,this.config.settings),j=i(this.config.spec,h.mix({})),k=function(a){var b;if(a.unit){var c=k(a.unit[0]),d=a.guide,e=d.x.$minimalDomain||1,f=d.y.$minimalDomain||1,g=Math.max(e*d.x.density,e*c.w),h=Math.max(f*d.y.density,f*c.h);b={w:g+d.padding.l+d.padding.r,h:h+d.padding.t+d.padding.b}}else b={w:0,h:0};return b},l=k(j.unit),m=l.w,n=l.h,o=z.getScrollbarWidth(),p=g.width-m,q=g.height-n,s=p>=0?g.width:m,t=q>=0?0:o,w=q>=0?g.height:n,y=p>=0?0:o;g.height=w-y,g.width=s-t;var D=this.config.settings,E=function(a,b){var c=a.guide.x.$minimalDomain||1,d=a.guide.y.$minimalDomain||1,e=b.width/c,f=b.height/d,g=D.xMinimumDensityKoeff;if(a.guide.x.hide!==!0&&0!==a.guide.x.rotate&&e>g*a.guide.x.$maxTickTextW){a.guide.x.rotate=0,a.guide.x.textAnchor="middle",a.guide.x.tickFormatWordWrapLimit=e;var h=Math.min(D.xAxisTickLabelLimit,a.guide.x.$maxTickTextW),i=0-h+a.guide.x.$maxTickTextH;a.guide.x.label.padding=a.guide.x.label.padding>0?a.guide.x.label.padding+i:a.guide.x.label.padding,a.guide.padding.b=a.guide.padding.b>0?a.guide.padding.b+i:a.guide.padding.b}var j={width:e,height:f};a.unit&&E(a.unit[0],j)};E(j.unit,g);var F=new r(h,C),G=F.buildGraph(j),H=v.get(this.config.settings.layoutEngine)(G),I=F.calcLayout(H,g),J=F.renderGraph(I,e.append("svg").attr("class",A+"svg").attr("width",g.width).attr("height",g.height),this);J.selectAll(".i-role-datum").call(x(this)),this.fire("render",J.node())}},getData:{writable:!0,value:function(){return this.config.data}},setData:{writable:!0,value:function(a){this.config.data=a,this.renderTo(this.target,this.targetSizes)}}}),d}(t);c.Plot=E}),e("charts/tau.chart",["exports","./tau.plot","../utils/utils","../data-processor"],function(b,c,d,e){function f(a,b){return b.reduce(function(b,c,d){return"measure"===a[c].type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(d)),"measure"!==a[c].type&&1===b.countMeasureAxis?b.status=o.WARNING:b.countMeasureAxis>1&&(b.status=o.FAIL),b},{status:o.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[]})}function g(b,c){var d=m(c.x),e=m(c.y),g=f(c.dimensions,d),h=f(c.dimensions,e);d=p[g.status](d,g),e=p[h.status](e,h);for(var i=m(c.guide),j=Math.max(d.length,e.length);i.length0;r--){var s=d.pop(),t=e.pop(),u=i.pop()||{};r===j?(k.x=s,k.y=t,k.unit.push(n(b,{x:l(s),y:l(t),color:c.color,size:c.size,flip:c.flip,colorGuide:q})),k.guide=a.defaults(u,{x:{label:s},y:{label:t}})):k={type:"COORDS.RECT",x:l(s),y:l(t),unit:[k],guide:a.defaults(u,{x:{label:s},y:{label:t}})}}return c.spec={dimensions:c.dimensions,unit:k},c}var h=function(a,b){a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),a.__proto__=b},i=c.Plot,j=d.utils,k=e.DataProcessor,l=function(a){return a?a:null},m=function(a){return j.isArray(a)?a:[a]},n=function(a,b){return{type:a,x:b.x,y:b.y,color:b.color,guide:{color:b.colorGuide},flip:b.flip,size:b.size}},o={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},p=function(b){return b[o.SUCCESS]=function(a){return a},b[o.FAIL]=function(){throw new Error("This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")},b[o.WARNING]=function(b,c){var d=b[c.indexMeasureAxis[0]],e=a.without(b,d);return e.push(d),e},b}({}),q={scatterplot:function(a){return g("ELEMENT.POINT",a)},line:function(b){var c=b.data,d=b.settings.log;if(!b.sortedBy){var e,f=a.isArray(b.x)?b.x:[b.x],h=a.isArray(b.y)?b.y:[b.y],i=f[f.length-1],j=f.slice(0,f.length-1),l=h[h.length-1],m=h.slice(0,h.length-1),n=b.color,o=j.concat(m).concat([n]).filter(function(a){return null!==a}),p=-1,q=[[[i].concat(o),l],[[l].concat(o),i]],r=q.some(function(a,b){var e=a[0],f=a[1],g=k.isYFunctionOfX(c,e,[f]);return g.result?p=b:d(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+g.error.keyY+" values (e.g. "+g.error.errY.join(",")+")","for ("+g.error.keyX+" = "+g.error.valX+")."].join(" ")),g.result});r?e=q[p][0][0]:(d("All attempts are failed. Will use "+i+" property as a sorting key by default."),d("It is better to use [scatterplot] here."),e=i),b.data=a(c).sortBy(e)}return g("ELEMENT.LINE",b)},bar:function(a){return a.flip=!1,g("ELEMENT.INTERVAL",a)},horizontalBar:function(a){return a.flip=!0,g("ELEMENT.INTERVAL",a)}},r=function(a){var b=function(b){b.settings=this.setupSettings(b.settings),b.dimensions=this.setupMetaInfo(b.dimensions,b.data),a.call(this,q[b.type](b))};return h(b,a),b}(i);b.Chart=r}),e("elements/coords",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(b,c,d,e,f){var g=c.utilsDraw,h=d.CSS_PREFIX,i=e.utils,j=f.TMatrix,k={CROSS:function(b,c,d){var e=b.domain(c),f=b.domain(d).reverse();return a(f).map(function(b){return a(e).map(function(a){var e={};return c&&(e[c]=a),d&&(e[d]=b),e})})}},l=function(a){return k[a]||function(){return[[{}]]}},m=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide),e.guide),e},n={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=a.any(d.unit,function(a){return 0===a.type.indexOf("COORDS.")}),f=l(e?"CROSS":""),g=new j(f(d,d.x,d.y)),h=new j(g.sizeR(),g.sizeC());return g.iterate(function(b,c,e){var f=a.extend({},d.$where,e),g=a(d.unit).map(function(b){return a.extend(m(b,d,["x","y"]),{$where:f})});h.setRC(b,c,g)}),d.$matrix=h,h.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(b,c){var d=b.options,e=b.guide.padding;b.x.guide=b.guide.x,b.y.guide=b.guide.y;var f=d.left+e.l,i=d.top+e.t,j=d.width-(e.l+e.r),k=d.height-(e.t+e.b),l={map:b.x.guide.tickLabel,min:b.x.guide.tickMin,max:b.x.guide.tickMax,period:b.x.guide.tickPeriod,autoScale:b.x.guide.autoScale};b.x.scaleObj=b.x.scaleDim&&b.scaleTo(b.x.scaleDim,[0,j],l);var m={map:b.y.guide.tickLabel,min:b.y.guide.tickMin,max:b.y.guide.tickMax,period:b.y.guide.tickPeriod,autoScale:b.y.guide.autoScale};b.y.scaleObj=b.y.scaleDim&&b.scaleTo(b.y.scaleDim,[k,0],m),b.x.guide.size=j,b.y.guide.size=k;var n=[0,k+b.guide.x.padding],o=[0-b.guide.y.padding,0],p=d.container.append("g").attr("class",h+"cell cell").attr("transform",g.translate(f,i)).datum({$where:b.$where});b.x.guide.hide||g.fnDrawDimAxis.call(p,b.x,n,j),b.y.guide.hide||g.fnDrawDimAxis.call(p,b.y,o,k);var q=g.fnDrawGrid.call(p,b,k,j);b.$matrix.iterate(function(b,d,e){e.forEach(function(b){b.options=a.extend({container:q},b.options),c(b)})})}};b.coords=n}),e("elements/size",["exports"],function(c){var d=function(c,d){c=a.filter(c,a.isFinite);var e=[Math.min.apply(null,c),Math.max.apply(null,c)],f=0===e[0]?e[1]:Math.max(1,e[1]/e[0]),g=[Math.max(1,d/(Math.log(f)+1)),d];return b.scale.linear().range(g).domain(e)};c.sizeScale=d}),e("elements/point",["exports","../utils/utils-draw","../const","./size"],function(b,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.sizeScale,i=function(b){var c=b.options,d=c.xScale,e=c.yScale,i=f.generateColor(b),j=a.max([b.guide.x.tickFontHeight,b.guide.y.tickFontHeight].filter(function(a){return 0!==a}))/2,k=h(b.domain(b.size.scaleDim),j),l=function(){return this.attr("r",function(c){var d=k(c[b.size.scaleDim]);return a.isFinite(d)?d:j}).attr("class",function(a){return g+"dot dot i-role-datum "+i.get(a[i.dimension])}).attr("cx",function(a){return d(a[b.x.scaleDim])}).attr("cy",function(a){return e(a[b.y.scaleDim])})},m=c.container.selectAll(".dot").data(b.partition());m.call(l),m.exit().remove(),m.enter().append("circle").call(l)};b.point=i}),e("utils/css-class-map",["exports","../const"],function(a,b){function c(a){return g[a-1]||g[4]}function d(a){var b=0;return a>=160&&320>a?b=1:a>=320&&480>a?b=2:a>=480&&640>a?b=3:a>=640&&(b=4),h[b]}var e=b.CSS_PREFIX,f=[1,2,3,4,5],g=f.map(function(a){return e+"line-opacity-"+a}),h=f.map(function(a){return e+"line-width-"+a});a.getLineClassesByWidth=d,a.getLineClassesByCount=c}),e("elements/line",["exports","../utils/utils-draw","./point","../const","../utils/css-class-map"],function(a,c,d,e,f){var g=c.utilsDraw,h=(d.point,e.CSS_PREFIX),i=f.getLineClassesByWidth,j=f.getLineClassesByCount,k=function(a){var c=a.options,d=c.xScale,e=c.yScale;a.size={};var f=g.generateColor(a);c.color=f;var k,l=b.nest().key(function(a){return a[f.dimension]}).entries(a.partition()),m=i(c.width),n=j(l.length),o=function(){this.attr("class",function(a){return[h+"line i-role-datum ","line",f.get(a.key),m,n].join(" ")});var a=this.selectAll("path").data(function(a){return[a.values]});a.call(q),a.enter().append("path").call(q),a.exit().remove()},p=function(b){var g=b.reduce(function(a,b){var c=b.values;return 1===c.length&&a.push(c[0]),a},[]),i=function(){return this.attr("r",1.5).attr("class",function(a){return h+"dot-line dot-line i-role-datum "+h+"dot i-role-datum "+f.get(a[f.dimension])}).attr("cx",function(b){return d(b[a.x.scaleDim])}).attr("cy",function(b){return e(b[a.y.scaleDim])})},j=c.container.selectAll(".dot-line").data(g);j.call(i),j.exit().remove(),j.enter().append("circle").call(i)};k=b.svg.line().x(function(b){return d(b[a.x.scaleDim])}).y(function(b){return e(b[a.y.scaleDim])});var q=function(){this.attr("d",k)};p(l);var r=c.container.selectAll(".line").data(l);r.call(o),r.enter().append("g").call(o),r.exit().remove()};a.line=k}),e("elements/interval",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=d.CSS_PREFIX,g="i-role-bar-group",h=function(a){return"measure"===a.dimType},i=function(a){var b,c,d;return h(a.dim)?(b=5,c=5,d=0):(b=a.size/a.domain().length,c=b/(a.categories.length+1),d=c),{tickWidth:b,intervalWidth:c,offsetCategory:d}},j=function(a){var c,d,j,k,l,m=a.options,n=e.generateColor(a),o=a.partition(),p=b.nest().key(function(a){return a[n.dimension]}).entries(o),q=m.xScale,r=m.yScale;if(a.flip){var s,t,u,v,w;!function(){s=Math.min.apply(null,q.domain());var b=0>=s?0:s;t=i({domain:r.domain,dim:a.y,categories:p,size:m.height}),u=t.tickWidth,v=t.intervalWidth,w=t.offsetCategory,c=h(a.x)?function(c){return q(Math.min(b,c[a.x.scaleDim]))}:0,d=function(b){return r(b[a.y.scaleDim])-u/2},j=h(a.x)?function(c){return Math.abs(q(c[a.x.scaleDim])-q(b))}:function(b){return q(b[a.x.scaleDim])},k=function(){return v},l=function(a,b){return e.translate(0,b*w+w/2)}}()}else{var x,y,u,v,w;!function(){x=Math.min.apply(null,r.domain());var b=0>=x?0:x;y=i({domain:q.domain,dim:a.x,categories:p,size:m.width}),u=y.tickWidth,v=y.intervalWidth,w=y.offsetCategory,c=function(b){return q(b[a.x.scaleDim])-u/2},d=h(a.y)?function(c){return r(Math.max(b,c[a.y.scaleDim]))}:function(b){return r(b[a.y.scaleDim])},j=function(){return v},k=h(a.y)?function(c){return Math.abs(r(c[a.y.scaleDim])-r(b))}:function(b){return m.height-r(b[a.y.scaleDim])},l=function(a,b){return e.translate(b*w+w/2,0)}}()}var z=function(){return this.attr("class",function(a){return"i-role-datum bar "+f+"bar "+n.get(a[n.dimension])}).attr("x",c).attr("y",d).attr("width",j).attr("height",k)},A=function(){this.attr("class",g).attr("transform",l);var a=this.selectAll("bar").data(function(a){return a.values});a.call(z),a.enter().append("rect").call(z),a.exit().remove()},B=m.container.selectAll("."+g).data(p);B.call(A),B.enter().append("g").call(A),B.exit().remove()};a.interval=j}),e("elements/coords-parallel",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(c,d,e,f,g){var h=d.utilsDraw,i=(e.CSS_PREFIX,f.utils),j=g.TMatrix,k=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide||{}),e.guide||{}),e},l={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=new j(1,1),f=new j(1,1);return e.iterate(function(b,c){var e=a.extend({},d.$where),g=a(d.unit).map(function(b){return a.extend(k(b,d,["x"]),{$where:e})});f.setRC(b,c,g)}),d.$matrix=f,f.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(c,d){var e=c.options,f=c.guide.padding,g=e.left+f.l,i=e.top+f.t,j=e.width-(f.l+f.r),k=e.height-(f.t+f.b),l=c.x.map(function(a){return c.scaleTo(a,[k,0],{})}),m=e.container.append("g").attr("class","graphical-report__cell cell").attr("transform",h.translate(g,i)),n=function(a,b){return"translate("+a+","+b+")"},o=function(a){return"rotate("+a+")"},p=function(a,c){var d=this,e=b.svg.axis().scale(a).orient("left"),f=d.append("g").attr("class","y axis").attr("transform",n.apply(null,c)).call(e);f.selectAll(".tick text").attr("transform",o(0)).style("text-anchor","end")},q=j/(c.x.length-1);l.forEach(function(a,b){p.call(m,a,[b*q,0])});var r=m.append("g").attr("class","grid").attr("transform",n(0,0));c.$matrix.iterate(function(b,c,e){e.forEach(function(b){b.options=a.extend({container:r},b.options),d(b)})})}};c.CoordsParallel=l}),e("elements/coords-parallel-line",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=(d.CSS_PREFIX,{draw:function(a){a.color=a.dimension(a.color,a);var c=a.options,d=a.x.reduce(function(b,d){return b[d]=a.scaleTo(d,[c.height,0],{}),b},{}),f=e.generateColor(a),g=b.nest().key(function(a){return a[f.dimension]}).entries(a.partition()).map(function(b){var c=b.values[0],d=[];return a.x.forEach(function(a){d.push({key:a,val:c[a]})}),d}),h=function(){this.attr("class",function(){return"graphical-report__line line color10-9"});var a=this.selectAll("path").data(function(a){return[a]});a.call(l),a.enter().append("path").call(l),a.exit().remove()},i=c.width/(a.x.length-1),j={};a.x.forEach(function(a,b){j[a]=b*i});var k=b.svg.line().x(function(a){return j[a.key]}).y(function(a){return d[a.key](a.val)}),l=function(){this.attr("d",k)},m=c.container.selectAll(".line").data(g);m.call(h),m.enter().append("g").call(h),m.exit().remove()}});a.CoordsParallelLine=f}),e("node-map",["exports","./elements/coords","./elements/line","./elements/point","./elements/interval","./utils/utils-draw","./elements/coords-parallel","./elements/coords-parallel-line"],function(a,b,c,d,e,f,g,h){var i=b.coords,j=c.line,k=d.point,l=e.interval,m=(f.utilsDraw,g.CoordsParallel),n=h.CoordsParallelLine,o=function(a,b){b.forEach(function(b){a[b]=a.dimension(a[b],a)});var c=a.options,d=c.width,e=c.height;a.x.guide=a.guide.x,a.y.guide=a.guide.y;var f={map:a.x.guide.tickLabel,min:a.x.guide.tickMin,max:a.x.guide.tickMax,period:a.x.guide.tickPeriod,autoScale:a.x.guide.autoScale};a.options.xScale=a.x.scaleDim&&a.scaleTo(a.x.scaleDim,[0,d],f);var g={map:a.y.guide.tickLabel,min:a.y.guide.tickMin,max:a.y.guide.tickMax,period:a.y.guide.tickPeriod,autoScale:a.y.guide.autoScale};return a.options.yScale=a.y.scaleDim&&a.scaleTo(a.y.scaleDim,[e,0],g),a},p={"COORDS.RECT":{walk:i.walk,draw:function(a,b){a.x=a.dimension(a.x,a),a.y=a.dimension(a.y,a),i.draw(a,b)}},"ELEMENT.POINT":function(a){k(o(a,["x","y","color","size"]))},"ELEMENT.LINE":function(a){j(o(a,["x","y","color"]))},"ELEMENT.INTERVAL":function(a){l(o(a,["x","y","color"]))},"COORDS.PARALLEL":m,"PARALLEL/ELEMENT.LINE":n};a.nodeMap=p}),e("tau.newCharts",["exports","./utils/utils-dom","./charts/tau.plot","./charts/tau.chart","./unit-domain-mixin","./unit-domain-period-generator","./dsl-reader","./spec-engine-factory","./layout-engine-factory","./formatter-registry","./node-map","./units-registry"],function(c,d,e,f,g,h,i,j,k,l,m,n){var o=d.utilsDom,p=e.Plot,q=f.Chart,r=g.UnitDomainMixin,s=h.UnitDomainPeriodGenerator,t=i.DSLReader,u=j.SpecEngineFactory,v=k.LayoutEngineFactory,w=l.FormatterRegistry,x=m.nodeMap,y=n.UnitsRegistry,z={},A={},B={UnitDomainMixin:r,UnitDomainPeriodGenerator:s,DSLReader:t,SpecEngineFactory:u,LayoutEngineFactory:v},C={UnitsRegistry:y,tickFormat:w,d3:b,_:a,tickPeriod:s,colorBrewers:{add:function(a,b){a in z||(z[a]=b)},get:function(a){return z[a]}},plugins:{add:function(a,b){a in A||(A[a]=b)},get:function(a){return A[a]}},globalSettings:{log:function(a,b){b=b||"INFO",console.log(b+": "+a)},excludeNull:!0,specEngine:"AUTO",layoutEngine:"EXTRACT",getAxisTickLabelSize:o.getAxisTickLabelSize,xAxisTickLabelLimit:100,yAxisTickLabelLimit:100,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:3,xTickWidth:9,yTickWidth:9,distToXAxisLabel:20,distToYAxisLabel:20,xAxisPadding:20,yAxisPadding:20,xFontLabelHeight:15,yFontLabelHeight:15,xDensityKoeff:2.2,xMinimumDensityKoeff:1.1,yDensityKoeff:2.2,yMinimumDensityKoeff:1.1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto","measure:time:year":"x-time-year","measure:time:quarter":"x-time-quarter","measure:time:month":"x-time-month","measure:time:week":"x-time-week","measure:time:day":"x-time-day","measure:time:hour":"x-time-hour","measure:time:min":"x-time-min","measure:time:sec":"x-time-sec","measure:time:ms":"x-time-ms"}}};p.globalSettings=C.globalSettings,C.UnitsRegistry.add("COORDS.PARALLEL",x["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",x["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",x["COORDS.RECT"]).add("ELEMENT.POINT",x["ELEMENT.POINT"]).add("ELEMENT.LINE",x["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",x["ELEMENT.INTERVAL"]),c.Plot=p,c.Chart=q,c.__api__=B,c.api=C}),e("underscore",function(){return a}),e("d3",function(){return b}),d("tau.newCharts")}); \ No newline at end of file +!function(a,b){if("function"==typeof define&&define.amd)define(["underscore","d3"],function(a,c){return b(a,c)});else if("object"==typeof module&&module.exports){{var c=require("underscore");require("d3")}module.exports=b(c)}else a.tauCharts=b(a._,a.d3)}(this,function(a,b){var c,d,e;return function(a){function b(a,b){return u.call(a,b)}function f(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=b&&b.split("/"),o=s.map,p=o&&o["*"]||{};if(a&&"."===a.charAt(0))if(b){for(n=n.slice(0,n.length-1),a=a.split("/"),g=a.length-1,s.nodeIdCompat&&w.test(a[g])&&(a[g]=a[g].replace(w,"")),a=n.concat(a),k=0;k0&&(a.splice(k-1,2),k-=2)}a=a.join("/")}else 0===a.indexOf("./")&&(a=a.substring(2));if((n||p)&&o){for(c=a.split("/"),k=c.length;k>0;k-=1){if(d=c.slice(0,k).join("/"),n)for(l=n.length;l>0;l-=1)if(e=o[n.slice(0,l).join("/")],e&&(e=e[d])){f=e,h=k;break}if(f)break;!i&&p&&p[d]&&(i=p[d],j=k)}!f&&i&&(f=i,h=j),f&&(c.splice(0,h,f),a=c.join("/"))}return a}function g(b,c){return function(){var d=v.call(arguments,0);return"string"!=typeof d[0]&&1===d.length&&d.push(null),n.apply(a,d.concat([b,c]))}}function h(a){return function(b){return f(b,a)}}function i(a){return function(b){q[a]=b}}function j(c){if(b(r,c)){var d=r[c];delete r[c],t[c]=!0,m.apply(a,d)}if(!b(q,c)&&!b(t,c))throw new Error("No "+c);return q[c]}function k(a){var b,c=a?a.indexOf("!"):-1;return c>-1&&(b=a.substring(0,c),a=a.substring(c+1,a.length)),[b,a]}function l(a){return function(){return s&&s.config&&s.config[a]||{}}}var m,n,o,p,q={},r={},s={},t={},u=Object.prototype.hasOwnProperty,v=[].slice,w=/\.js$/;o=function(a,b){var c,d=k(a),e=d[0];return a=d[1],e&&(e=f(e,b),c=j(e)),e?a=c&&c.normalize?c.normalize(a,h(b)):f(a,b):(a=f(a,b),d=k(a),e=d[0],a=d[1],e&&(c=j(e))),{f:e?e+"!"+a:a,n:a,pr:e,p:c}},p={require:function(a){return g(a)},exports:function(a){var b=q[a];return"undefined"!=typeof b?b:q[a]={}},module:function(a){return{id:a,uri:"",exports:q[a],config:l(a)}}},m=function(c,d,e,f){var h,k,l,m,n,s,u=[],v=typeof e;if(f=f||c,"undefined"===v||"function"===v){for(d=!d.length&&e.length?["require","exports","module"]:d,n=0;n','','','<%= xTick %>',"","",""].join(""),e=a.template(d),f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.width="100px",f.style.height="100px",f.style.border="1px solid green",document.body.appendChild(f),f.innerHTML=e({xTick:c});var g=b.select(f).selectAll(".x.axis .tick text")[0][0],h={width:0,height:0},i=g.getBoundingClientRect();return h.width=i.right-i.left,h.height=i.bottom-i.top,document.body.removeChild(f),h}};c.utilsDom=d}),e("dsl-reader",["exports"],function(b){var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var b=function(a,b){this.domain=a,this.UnitsRegistry=b};return c(b,null,{buildGraph:{writable:!0,value:function(a){var b=this,c=function(a){return b.UnitsRegistry.get(a.type).walk(b.domain.mix(a),c)};return c(a.unit)}},calcLayout:{writable:!0,value:function(b,c){b.options={top:0,left:0,width:c.width,height:c.height};var d=function(b){if(!b.$matrix)return b;var c,e=b.options,f=b.guide.padding,g=e.width-(f.l+f.r),h=e.height-(f.t+f.b),i=b.$matrix.sizeR(),j=b.$matrix.sizeC(),k=g/j,l=h/i;return c=b.guide.split?{calcHeight:function(a,b,c,d){return a/d},calcTop:function(a,b,c,d){return(b+1)*(a/d)*c}}:{calcHeight:function(a){return a},calcTop:function(a,b){return b*l}},b.$matrix.iterate(function(b,e,f){var g=f.length;a.each(f,function(a,f){a.options={width:k,left:e*k,height:c.calcHeight(l,b,f,g),top:c.calcTop(l,b,f,g)},d(a)})}),b};return d(b)}},renderGraph:{writable:!0,value:function(a,b,c){var d=this;a.options.container=b;var e=function(a){d.UnitsRegistry.get(a.type).draw(d.domain.mix(a),function(b){b.parentUnit=a,e(b)}),c&&c.fire("unitready",a)};return a.parentUnit=null,e(a),a.options.container}}}),b}();b.DSLReader=d}),e("const",["exports"],function(a){a.CSS_PREFIX="graphical-report__"}),e("api/balloon",["exports","../const"],function(a,b){function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=l.pageYOffset||o.scrollTop,e=l.pageXOffset||o.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=l.innerWidth||o.clientWidth,f.height=l.innerHeight||o.clientHeight;else{if(!o.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-o.clientTop,f.left=f.left+e-o.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\-0-9.]/g,""))}function g(a){var b=String(q(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(r(h.defaults),b),this._createElement(),void this.content(a)):new h(a,b)}var i=b.CSS_PREFIX,j=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},k=function(a,b){return a.indexOf(b)},l=window,m=l.document,n=m.body,o=m.documentElement,p=["top","bottom"],q=l.getComputedStyle;g.propName=function(){for(var a=m.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,n.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,n.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||n.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=k(h.winAware,this);~a||h.winAware.push(this)},h.prototype._unaware=function(){var a=k(h.winAware,this);~a&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;d>b;b++)a=h.winAware[b],a.position()}var c,d=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(a){return setTimeout(a,17)};return a}(),h.winAware=[],window.addEventListener("resize",h.reposition),window.addEventListener("scroll",h.reposition),h.classTypes=["type","effect"],h.defaults={baseClass:i+"tooltip",typeClass:null,effectClass:null,inClass:"in",place:"top",spacing:null,auto:0},a.Tooltip=h}),e("event",["exports"],function(a){function b(a){var b=e[a];return b||(b=function(){for(var b,c,d=this,e=0;d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e=0?-1:1,f=d||1;d-=e*f/b}for(var g=[c,d],h=g[1]-g[0],i=Math.pow(10,Math.floor(Math.log(h/b)/Math.LN10)),j=b/h*i,k=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],l=-1;j>k[++l][0];);i*=k[l][1],g[0]=Math.floor(g[0]/i)*i,g[1]=Math.ceil(g[1]/i)*i;var m=c-g[0],n=g[1]-d,o=i/2;if(c>=0)g[0]=0;else{var p=o>=m?i:0;g[0]=g[0]-p}if(0>=d)g[1]=0;else{var q=o>=n?i:0;g[1]=g[1]+q}return[parseFloat(g[0].toFixed(15)),parseFloat(g[1].toFixed(15))]},traverseJSON:b};a.utils=c}),e("formatter-registry",["exports","d3"],function(b,c){var d=c,e={"x-num-auto":function(a){var b=parseFloat(a.toFixed(2));return Math.abs(b)<1?b.toString():d.format("s")(b)},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:d.time.format("%d-%b-%Y"),week:d.time.format("%d-%b-%Y"),"week-range":function(a){var b=new Date(a),c=new Date(a),e=new Date(c.setDate(c.getDate()+7)),f=d.time.format("%d-%b-%Y");return f(b)+" - "+f(e)},month:function(a){var b=new Date(a),c=b.getMonth(),e=0===c?"%B, %Y":"%B";return d.time.format(e)(a)},"month-year":d.time.format("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},year:d.time.format("%Y"),"x-time-auto":null};e["x-time-ms"]=e["x-time-auto"],e["x-time-sec"]=e["x-time-auto"],e["x-time-min"]=e["x-time-auto"],e["x-time-hour"]=e["x-time-auto"],e["x-time-day"]=e["x-time-auto"],e["x-time-week"]=e["x-time-auto"],e["x-time-month"]=e.month,e["x-time-quarter"]=e.quarter,e["x-time-year"]=e.year;var f=function(a){return(null===a||"undefined"==typeof a?"":a).toString()},g={get:function(b){var c=e.hasOwnProperty(b),g=c?e[b]:f;return c&&(g=e[b]),!c&&b&&(g=function(c){var e=a.isDate(c)?d.time.format(b):d.format(b);return e(c)}),c||b||(g=f),g},add:function(a,b){e[a]=b}};b.FormatterRegistry=g}),e("utils/utils-draw",["exports","../utils/utils","../formatter-registry","underscore","d3"],function(a,b,c,d,e){var f=b.utils,g=c.FormatterRegistry,h=d,i=e,j=function(a,b){return"translate("+a+","+b+")"},k=function(a){return"rotate("+a+")"},l=function(a){return h.contains(["bottom","top"],a.toLowerCase())?"h":"v"},m=function(a,b){a.each(function(){var a=i.select(this),c=a.text().split(/\s+/).reverse();a.text(null);for(var d,e=[],f=!1;!f&&(d=c.pop());)if(e.push(d),a.text(e.join(" ")),a.node().getComputedTextLength()>b){e.pop();var g=e.join(" ");g+="...",a.text(g),f=!0}})},n=function(a,b,c,d,e){var f=function(a,b,c,d,e,f,g){var h=g*c+f,i=a.append("tspan").attr("x",d).attr("y",e).attr("dy",h+"em").text(b);return i};a.each(function(){var a=i.select(this),g=a.text().split(/\s+/),h=1.1,j=a.attr("x"),k=a.attr("y"),l=parseFloat(a.attr("dy"));a.text(null);var m=f(a,null,h,j,k,l,0),n=!1,o=g.reduce(function(a,d){if(n)return a;var e=a.length===c,f=a[a.length-1],g=m.text(f+d).node().getComputedTextLength()>b;return g&&e&&(a[a.length-1]=f+"...",n=!0),g&&!e&&a.push(d),g||(a[a.length-1]=f+" "+d),a},[""]);k=e?-1*(o.length-1)*Math.floor(.5*d):k,o.forEach(function(b,c){return f(a,b,h,j,k,l,c)}),m.remove()})},o=function(a,b,c){var d=a.selectAll(".tick line"),e=c/d[0].length,f=e/2;if("ordinal"===b.scaleType||"period"===b.scaleType){var g="h"===l(b.guide.scaleOrient),h=g?"x":"y",i=g?f:-f;d.attr(h+"1",i).attr(h+"2",i)}},p=function(a,b){var c="h"===l(b.guide.scaleOrient)?1:-1,d=a.append("text").attr("transform",k(b.guide.label.rotate)).attr("class","label").attr("x",c*b.guide.size*.5).attr("y",c*b.guide.label.padding).style("text-anchor",b.guide.label.textAnchor),e=" > ",f=b.guide.label.text.split(e),g=f.length;f.forEach(function(a,b){d.append("tspan").attr("class","label-token label-token-"+b).text(a),g-1>b&&d.append("tspan").attr("class","label-token-delimiter label-token-delimiter-"+b).text(e)})},q=function(a,b){var c="h"===l(b.guide.scaleOrient),d=b.guide.rotate,e=a.selectAll(".tick text");e.attr("transform",k(d)).style("text-anchor",b.guide.textAnchor),90===d&&e.attr("x",9).attr("y",0),b.guide.tickFormatWordWrap?e.call(n,b.guide.tickFormatWordWrapLimit,b.guide.tickFormatWordWrapLines,b.guide.$maxTickTextH,!c):e.call(m,b.guide.tickFormatWordWrapLimit)},r=function(a,b,c){var d=this;if(a.scaleDim){var e=i.svg.axis().scale(a.scaleObj).orient(a.guide.scaleOrient),f=g.get(a.guide.tickFormat);null!==f&&(e.ticks(Math.round(c/a.guide.density)),e.tickFormat(f));var h=d.append("g").attr("class",a.guide.cssClass).attr("transform",j.apply(null,b)).call(e);o(h,a,c),q(h,a),p(h,a)}},s=function(a,b,c){var d=this,e=d.append("g").attr("class","grid").attr("transform",j(0,0)),f=(a.guide.showGridLines||"").toLowerCase();if(f.length>0){var h=e.append("g").attr("class","grid-lines");if(f.indexOf("x")>-1&&a.x.scaleDim){var k=a.x,l=i.svg.axis().scale(k.scaleObj).orient(k.guide.scaleOrient).tickSize(b),m=g.get(k.guide.tickFormat);null!==m&&(l.ticks(Math.round(c/k.guide.density)),l.tickFormat(m));var n=h.append("g").attr("class","grid-lines-x").call(l);o(n,k,c);var p=n.select("g.tick");if(p.node()&&"translate(0,0)"!==p.attr("transform")){var q=p.node().cloneNode(!0);h.node().appendChild(q),i.select(q).attr("class","border").attr("transform",j(0,0)).select("line").attr("x1",0).attr("x2",0)}}if(f.indexOf("y")>-1&&a.y.scaleDim){var r=a.y,s=i.svg.axis().scale(r.scaleObj).orient(r.guide.scaleOrient).tickSize(-c),m=g.get(r.guide.tickFormat);null!==m&&(s.ticks(Math.round(b/r.guide.density)),s.tickFormat(m));var t=h.append("g").attr("class","grid-lines-y").call(s);o(t,r,b)}h.selectAll("text").remove()}return e},t=h.times(10,function(a){return"color10-"+(1+a)}),u=function(a){var b,c,d=a.guide.color||{},e=a.color,g=e.scaleDim,h=d.brewer||t;f.isArray(h)?(c=a.domain(g),b=h):(c=Object.keys(h),b=c.map(function(a){return h[a]}));var j=i.scale.ordinal().range(b).domain(c),k=function(a){return c.indexOf(a)>-1?j(a):"color-default"};return{get:function(a){return k(a)},dimension:g}},v=function(a){return a.options=a.options||{},a.guide=a.guide||{},a.guide.padding=h.defaults(a.guide.padding||{},{l:0,b:0,r:0,t:0}),a.guide.x=h.defaults(a.guide.x||{},{label:"",padding:0,density:30,cssClass:"x axis",scaleOrient:"bottom",rotate:0,textAnchor:"middle",tickPeriod:null,tickFormat:null,autoScale:!0}),a.guide.x.label=h.isObject(a.guide.x.label)?a.guide.x.label:{text:a.guide.x.label},a.guide.x.label=h.defaults(a.guide.x.label,{padding:32,rotate:0,textAnchor:"middle"}),a.guide.x.tickFormat=a.guide.x.tickFormat||a.guide.x.tickPeriod,a.guide.y=h.defaults(a.guide.y||{},{label:"",padding:0,density:30,cssClass:"y axis",scaleOrient:"left",rotate:0,textAnchor:"end",tickPeriod:null,tickFormat:null,autoScale:!0}),a.guide.y.label=h.isObject(a.guide.y.label)?a.guide.y.label:{text:a.guide.y.label},a.guide.y.label=h.defaults(a.guide.y.label,{padding:32,rotate:-90,textAnchor:"middle"}),a.guide.y.tickFormat=a.guide.y.tickFormat||a.guide.y.tickPeriod,a},w={translate:j,rotate:k,getOrientation:l,fnDrawDimAxis:r,fnDrawGrid:s,generateColor:u,applyNodeDefaults:v};a.utilsDraw=w}),e("spec-engine-factory",["exports","./utils/utils","./utils/utils-draw","./formatter-registry"],function(b,c,d,e){var f=c.utils,g=d.utilsDraw,h=e.FormatterRegistry,i=function(b,c){var d=c.guide||{},e=d.hasOwnProperty("x")?d.x:{},f=d.hasOwnProperty("y")?d.y:{},g=d.hasOwnProperty("padding")?d.padding:{};return a.extend(b.guide.padding,g),a.extend(b.guide.x.label,e.label),a.extend(b.guide.x,a.omit(e,"label")),a.extend(b.guide.y.label,f.label),a.extend(b.guide.y,a.omit(f,"label")),a.extend(b.guide,a.omit(d,"x","y","padding")),b},j=function(b,c){return b.guide=b.guide||{},b.guide.padding=b.guide.padding||{l:0,t:0,r:0,b:0},b.hasOwnProperty("unit")||(b=a.defaults(b,c),b.guide=a.defaults(b.guide,f.clone(c.guide)),b.guide.x=a.defaults(b.guide.x,f.clone(c.guide.x)),b.guide.y=a.defaults(b.guide.y,f.clone(c.guide.y))),b},k=function(a){var b=a.unit||[],c=!a.hasOwnProperty("unit"),d=!b.some(function(a){return a.hasOwnProperty("unit")});return{type:a.type,isLeaf:c,isLeafParent:!c&&d}},l=function(b,c,d,e){if(0===b.length)return{width:0,height:0};if(null===c){var f=d("TauChart Library");return f.width=.625*e,f}var g=a.max(b,function(a){return c(a).toString().length}),h=a.isNumber(g)?".00":"";return d(c(g)+h)},m=function(a,b,c){var d=a.dimType,e=a.scaleType,f="*";if("measure"===d&&"time"===e){var g=b.source.filter(function(a){return null!==a}).sort(),h=0;if(g.length>1){for(var i=1,j=g.length,k=[];j>i;)k.push(g[i]-g[i-1]),++i;var l=k.reduce(function(a,b){return a+=b},0);h=l/k.length}var m=[[31536e6,"year"],[7776e6,"quarter"],[2592e6,"month"],[6048e5,"week"],[864e5,"day"],[36e5,"hour"],[6e4,"min"],[1e3,"sec"],[0,"ms"]],n=-1;do++n;while(m[n][0]>h);f=m[n][1]}var o=[d,e,f].join(":"),p=[d,e].join(":");return c[o]||c[p]||c[d]||null},n={NONE:function(a,b,c){var d=f.clone(a);return o(f.clone(d.unit),d.unit,function(a,b){return b.guide.x.tickFontHeight=c.getAxisTickLabelSize("X").height,b.guide.y.tickFontHeight=c.getAxisTickLabelSize("Y").height,b}),d},"BUILD-LABELS":function(b){var c=f.clone(b),d=[],e=[],g=null,h=null;return f.traverseJSON(c.unit,"unit",k,function(b,c){if(b.isLeaf)return c;!g&&c.x&&(g=c),!h&&c.y&&(h=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=a.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=a.isObject(c.guide.y.label)?c.guide.y.label:{text:c.guide.y.label},c.x&&(c.guide.x.label.text=c.guide.x.label.text||c.x),c.y&&(c.guide.y.label.text=c.guide.y.label.text||c.y);var f=c.guide.x.label.text;f&&(d.push(f),c.guide.x.label.text="");var i=c.guide.y.label.text;return i&&(e.push(i),c.guide.y.label.text=""),c}),g&&(g.guide.x.label.text=d.map(function(a){return a.toUpperCase()}).join(" > ")),h&&(h.guide.y.label.text=e.map(function(a){return a.toUpperCase()}).join(" > ")),c},"BUILD-GUIDE":function(a,b,c){var d=f.clone(a);return o(f.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;a.isLeafParent&&!d.guide.hasOwnProperty("showGridLines")&&(d.guide.showGridLines="xy");var e=!a.isLeaf&&!a.isLeafParent;e&&(d.guide.x.cssClass+=" facet-axis",d.guide.y.cssClass+=" facet-axis");var f=b.dimension(d.x),g=b.dimension(d.y),i="measure"===f.dimType,j="measure"===g.dimType,k={map:d.guide.x.tickLabel,min:d.guide.x.tickMin,max:d.guide.x.tickMax,period:d.guide.x.tickPeriod,autoScale:d.guide.x.autoScale},n={map:d.guide.y.tickLabel,min:d.guide.y.tickMin,max:d.guide.y.tickMax,period:d.guide.y.tickPeriod,autoScale:d.guide.y.autoScale},o=b.scaleMeta(d.x,k),p=o.values,q=b.scaleMeta(d.y,n),r=q.values;d.guide.x.tickFormat=d.guide.x.tickFormat||m(f,o,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||m(g,q,c.defaultFormats);var s=0===p.length,t=0===r.length,u=l(p,h.get(d.guide.x.tickFormat),c.getAxisTickLabelSize,c.xAxisTickLabelLimit),v=l(r,h.get(d.guide.y.tickFormat),c.getAxisTickLabelSize,c.yAxisTickLabelLimit),w=a.isLeafParent?c.xAxisPadding:0,x=a.isLeafParent?c.yAxisPadding:0,y=!e&&!!f.dimType&&"measure"!==f.dimType;d.guide.x.padding=s?0:w,d.guide.y.padding=t?0:x,d.guide.x.rotate=y?90:0,d.guide.x.textAnchor=y?"start":d.guide.x.textAnchor;var z=s?0:c.xTickWidth,A=t?0:c.yTickWidth;d.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,d.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit;var B=y?u.width:u.height;!i&&B>c.xAxisTickLabelLimit&&(B=c.xAxisTickLabelLimit),!y&&u.width>c.xAxisTickLabelLimit&&(d.guide.x.tickFormatWordWrap=!0,d.guide.x.tickFormatWordWrapLines=c.xTickWordWrapLinesLimit,B=c.xTickWordWrapLinesLimit*u.height);var C=v.width;!j&&C>c.yAxisTickLabelLimit&&(C=c.yAxisTickLabelLimit,d.guide.y.tickFormatWordWrap=!0,d.guide.y.tickFormatWordWrapLines=c.yTickWordWrapLinesLimit);var D=z+B,E=A+C,F=c.xFontLabelHeight,G=c.yFontLabelHeight,H=c.distToXAxisLabel,I=c.distToYAxisLabel,J=Math.min(c.xAxisTickLabelLimit,y?u.height:u.width);d.guide.x.density=c.xDensityKoeff*J;var K=Math.ceil(v.width/c.yAxisTickLabelLimit),L=Math.min(K,c.yTickWordWrapLinesLimit),M=Math.min(c.yAxisTickLabelLimit,L*v.height);d.guide.y.density=c.yDensityKoeff*M,d.guide.x.label.padding=d.guide.x.label.text?D+H:0,d.guide.y.label.padding=d.guide.y.label.text?E+I:0;var N=d.guide.x.label.text?d.guide.x.label.padding+F:D,O=d.guide.y.label.text?d.guide.y.label.padding+G:E;return d.guide.padding.b=w+N,d.guide.padding.l=x+O,d.guide.padding.b=d.guide.x.hide?0:d.guide.padding.b,d.guide.padding.l=d.guide.y.hide?0:d.guide.padding.l,d.guide.x.tickFontHeight=u.height,d.guide.y.tickFontHeight=v.height,d.guide.x.$minimalDomain=p.length,d.guide.y.$minimalDomain=r.length,d.guide.x.$maxTickTextW=u.width,d.guide.x.$maxTickTextH=u.height,d.guide.y.$maxTickTextW=v.width,d.guide.y.$maxTickTextH=v.height,d}),d}};n.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return n[d](a,b,c)},a)};var o=function(b,c,d){var e=g.applyNodeDefaults(c);e=d(k(e),e),e=i(e,b);var h=a.omit(e,"unit");return(e.unit||[]).forEach(function(a){return o(f.clone(a),j(a,h),d)}),e},p={get:function(a,b){var c=n[a]||n.NONE;return function(a,d){return c(a,d,b)}}};b.SpecEngineFactory=p}),e("matrix",["exports"],function(b){var c=function(){var b=function(b,c){var d,e=a.toArray(arguments);d=a.isArray(e[0])?e[0]:a.times(b,function(){return a.times(c,function(){return null})}),this.cube=d};return b.prototype={iterate:function(b){var c=this.cube;return a.each(c,function(c,d){a.each(c,function(a,c){b(d,c,a)})}),this},getRC:function(a,b){return this.cube[a][b]},setRC:function(a,b,c){return this.cube[a][b]=c,this},sizeR:function(){return this.cube.length},sizeC:function(){var a=this.cube[0]||[];return a.length}},b}();b.TMatrix=c}),e("layout-engine-factory",["exports","./utils/utils","./utils/utils-draw","./matrix"],function(a,b,c,d){var e=b.utils,f=c.utilsDraw,g=d.TMatrix,h=function(a,b){var c=b?b:{depth:-1,paddings:[]},d=a.guide.padding;return c.depth+=1,c.paddings.unshift({l:d.l,b:d.b,r:d.r,t:d.t}),a.unit&&a.unit.length&&h(a.unit[0],c),c},i={NONE:function(a){return a},EXTRACT:function(a){var b=function(a,c,d){var e=a,f=e.sizeR(),h=e.sizeC();e.iterate(function(a,e,i){i.forEach(function(b){return d(b,{firstRow:0===a,firstCol:0===e,lastRow:a===f-1,lastCol:e===h-1,depth:c})}),i.filter(function(a){return a.$matrix}).forEach(function(a){a.$matrix=new g(a.$matrix.cube),b(a.$matrix,c-1,d)})})},c=e.clone(a),d=new g([[[c]]]),i=h(c),j=i.paddings.reduce(function(a,b){return a.l+=b.l,a.b+=b.b,a},{l:0,b:0}),k=e.clone(j),l=i.paddings.reverse().map(function(a){return a.l=k.l-a.l,a.b=k.b-a.b,k={l:a.l,b:a.b},a});i.paddings=l.reverse();var m=10,n=f.applyNodeDefaults({type:"COORDS.RECT",options:e.clone(a.options),$matrix:new g([[[c]]]),guide:{padding:{l:j.l-m,b:j.b-m,r:0,t:0}}});return b(d,i.depth,function(a,b){var c=b.depth;a.guide.x.hide=a.guide.x.hide?a.guide.x.hide:!b.lastRow,a.guide.y.hide=a.guide.y.hide?a.guide.y.hide:!b.firstCol;var d=c>1?0:m,e=c>1?m:0;return a.guide.x.padding+=i.paddings[c].b,a.guide.y.padding+=i.paddings[c].l,a.guide.x.padding-=e,a.guide.y.padding-=e,a.guide.padding.l=d,a.guide.padding.b=d,a.guide.padding.r=d,a.guide.padding.t=d,a}),n}},j={get:function(a){return i[a]||i.NONE}};a.LayoutEngineFactory=j}),e("plugins",["exports"],function(a){var c=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},d=function(){var a=function(a,b){this.chart=b,this._plugins=a.map(this.initPlugin,this)};return c(a,null,{initPlugin:{writable:!0,value:function(a){var b=this;a.init&&a.init(this.chart),this.chart.on("destroy",a.destroy||function(){}),Object.keys(a).forEach(function(c){if(0===c.indexOf("on")){var d=c.substr(2);b.chart.on(d.toLowerCase(),a[c].bind(a))}})}}}),a}(),e=["click","mouseover","mouseout","mousemove"],f=function(a){return function(){e.forEach(function(c){this.on(c,function(d){a.fire("element"+c,{elementData:d,element:this,cellData:b.select(this.parentNode.parentNode).datum()})})},this)}};a.propagateDatumEvents=f,a.Plugins=d}),e("unit-domain-period-generator",["exports"],function(a){var b={day:{cast:function(a){return new Date(a.setHours(0,0,0,0))},next:function(a){return new Date(a.setDate(a.getDate()+1))}},week:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(a.getDate()-a.getDay()))},next:function(a){return new Date(a.setDate(a.getDate()+7))}},month:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1))},next:function(a){return new Date(a.setMonth(a.getMonth()+1))}},quarter:{cast:function(a){a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1));var b=a.getMonth(),c=b-b%3;return new Date(a.setMonth(c))},next:function(a){return new Date(a.setMonth(a.getMonth()+3))}},year:{cast:function(a){return a=new Date(a.setHours(0,0,0,0)),a=new Date(a.setDate(1)),a=new Date(a.setMonth(0))},next:function(a){return new Date(a.setFullYear(a.getFullYear()+1))}}},c={add:function(a,c){return b[a.toLowerCase()]=c,this},get:function(a){return b[a.toLowerCase()]},generate:function(a,c,d){var e=[],f=b[d.toLowerCase()];if(f){var g=f.cast(new Date(c)),h=f.cast(new Date(a));for(e.push(h);(h=f.next(new Date(h)))<=g;)e.push(h)}return e}};a.UnitDomainPeriodGenerator=c}),e("unit-domain-mixin",["exports","./unit-domain-period-generator","./utils/utils","underscore","d3"],function(a,b,c,d,e){var f=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},g=b.UnitDomainPeriodGenerator,h=c.utils,i=d,j=e,k={ordinal:function(a){return a},linear:function(a,b){var c=b.autoScale?h.autoScale(a):j.extent(a),d=i.isNumber(b.min)?b.min:c[0],e=i.isNumber(b.max)?b.max:c[1];return[Math.min(d,c[0]),Math.max(e,c[1])]},period:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime(),f=[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))];return g.generate(f[0],f[1],b.period)},time:function(a,b){var c=j.extent(a),d=i.isNull(b.min)||i.isUndefined(b.min)?c[0]:new Date(b.min).getTime(),e=i.isNull(b.max)||i.isUndefined(b.max)?c[1]:new Date(b.max).getTime();return[new Date(Math.min(d,c[0])),new Date(Math.max(e,c[1]))]}},l={ordinal:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1) +},linear:function(a,b){return j.scale.linear().domain(a).rangeRound(b,1)},period:function(a,b){return j.scale.ordinal().domain(a).rangePoints(b,1)},time:function(a,b){return j.time.scale().domain(a).range(b)}},m=function(){var a=function(a,b){var c=function(a){return function(b){var c=b||{};return c.hasOwnProperty(a)?c[a]:null}},d=function(b){var d=a[b]||{},e=d.value?c(d.value):function(a){return a},f=i.contains(["period","time"],d.scale);return f?i.compose(function(a){return new Date(a).getTime()},e):e},e=function(b){var c=a[b]||{};return c.order||null},f=function(a){var b={category:function(a,b,c){return c},order:function(a,b,c){var d=e(a);return d?i.union(d,c):i.sortBy(c,b)},measure:function(a,b,c){return i.sortBy(c,b)},"as-is":function(a,b,c){return c}};return b[a]||b["as-is"]},h=function(a){var b={category:f("category"),order:function(a,b,c){var d=e(a);return d?i.union(c,d):c},measure:f("measure"),"as-is":f("as-is")};return b[a]||b["as-is"]};this.fnDimension=function(b,c){var d=(c||{}).dimensions||{},e=a[b]||{},f=d[b]||{};return{scaleDim:b,scaleType:f.scale||e.scale,dimType:f.type||e.type}},this.fnSource=function(a){var c=i.map(a,function(a,b){return function(c){return d(b)(c[b])===a}});return i(b).filter(function(a){return i.every(c,function(b){return b(a)})})};var j=function(c,e){if(!a[c])return[null];var f=d(c),g=i(b).chain().pluck(c).uniq(f).value();return e(c,f,g)};this.fnDomain=function(b){var c=d(b),e=(a[b]||{}).type,g=j(b,f(e));return g.map(c)};var m=function(b,e){var f=e||{},l=i.defaults({},a[b]),m={"order:period":function(a){return function(b){return g.get(a.period).cast(new Date(b))}},"*":function(){return function(a){return a}}},n=f.map?c(f.map):d(b),o=[l.type,l.scale].join(":"),p=(m[o]||m["*"])(f),q=j(b,h(l.type)).map(n),r=l.scale?k[l.scale](q,f):[];return{extract:function(a){return p(n(a))},values:r,source:q}};this.fnScaleMeta=m,this.fnScaleTo=function(b,c,d){var e=d||{},f=i.defaults({},a[b]),g=m(b,d),h=l[f.scale](g.values,c,e),j=function(a){return h(g.extract(a))};return Object.keys(h).forEach(function(a){return j[a]=h[a]}),j}};return f(a,null,{mix:{writable:!0,value:function(a){return a.dimension=this.fnDimension,a.source=this.fnSource,a.domain=this.fnDomain,a.scaleMeta=this.fnScaleMeta,a.scaleTo=this.fnScaleTo,a.partition=function(){return a.data||a.source(a.$where)},a}}}),a}();a.UnitDomainMixin=m}),e("units-registry",["exports"],function(a){var b={},c={add:function(a,c){var d={};return d.draw="function"==typeof c?c:c.draw,d.walk=c.walk||function(a){return a},b[a]=d,this},get:function(a){if(!b.hasOwnProperty(a))throw new Error("Unknown unit type: "+a);return b[a]}};a.UnitsRegistry=c}),e("data-processor",["exports","./utils/utils"],function(b,c){var d=c.utils,e={isYFunctionOfX:function(a,b,c){var d=!0,e=null;try{a.reduce(function(a,d){var f=function(a,b){return a.push(d[b]),a},g=b.reduce(f,[]).join("/"),h=c.reduce(f,[]).join("/");if(a.hasOwnProperty(g)){var i=a[g];if(i!==h)throw e={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:g,errY:[i,h]},new Error("RelationIsNotAFunction")}else a[g]=h;return a},{})}catch(f){if("RelationIsNotAFunction"!==f.message)throw f;d=!1}return{result:d,error:e}},excludeNullValues:function(a,b){var c=[];Object.keys(a).forEach(function(b){var d=a[b];d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||c.push(b)});var d;return d=0===c.length?b:b.filter(function(a){return!c.some(function(b){return!a.hasOwnProperty(b)||null===a[b]})})},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]={},d[e].type=g,d[e].scale=f.scale||c[g],d[e].value=f.value}),d},autoDetectDimTypes:function(b){var c={type:"category",scale:"ordinal"},e=function(b,c){var d=c;return a.isDate(b)?(d.type="measure",d.scale="time"):a.isObject(b)?(d.type="order",d.scale="ordinal"):a.isNumber(b)&&(d.type="measure",d.scale="linear"),d},f=function(a,b){return Object.keys(b).forEach(function(f){var g=b.hasOwnProperty(f)?b[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=e(g,d.clone(c)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?c.type:i,a[f].scale=k?c.scale:j}}),a};return a.reduce(b,f,{})}};b.DataProcessor=e}),e("charts/tau.plot",["exports","../dsl-reader","../api/balloon","../event","../spec-engine-factory","../layout-engine-factory","../plugins","../utils/utils","../utils/utils-dom","../const","../unit-domain-mixin","../units-registry","../data-processor"],function(c,d,e,f,g,h,i,j,k,l,m,n,o){var p=function(a,b,c){b&&Object.defineProperties(a,b),c&&Object.defineProperties(a.prototype,c)},q=function(a,b){a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),a.__proto__=b},r=d.DSLReader,s=e.Tooltip,t=f.Emitter,u=g.SpecEngineFactory,v=h.LayoutEngineFactory,w=i.Plugins,x=i.propagateDatumEvents,y=j.utils,z=k.utilsDom,A=l.CSS_PREFIX,B=m.UnitDomainMixin,C=n.UnitsRegistry,D=o.DataProcessor,E=function(c){var d=function(a){c.call(this),this.setupConfig(a),this._plugins=new w(this.config.plugins,this),this._emptyContainer=a.emptyContainer||""};return q(d,c),p(d,null,{setupConfig:{writable:!0,value:function(b){this.config=a.defaults(b,{spec:{},data:[],plugins:[],settings:{}}),this.config.settings.specEngine=this.config.specEngine||this.config.settings.specEngine,this.config.settings.layoutEngine=this.config.layoutEngine||this.config.settings.layoutEngine,this.config.settings=this.setupSettings(this.config.settings),this.config.spec.dimensions=this.setupMetaInfo(this.config.spec.dimensions,this.config.data);var c=this.config.data.length;this.config.data=this.config.settings.excludeNull?D.excludeNullValues(this.config.spec.dimensions,this.config.data):this.config.data;var d=this.config.data.length,e=c-d;e>0&&this.config.settings.log(e+" data points were excluded, because they have undefined values.","WARN")}},setupMetaInfo:{writable:!0,value:function(a,b){var c=a?a:D.autoDetectDimTypes(b);return D.autoAssignScales(c)}},setupSettings:{writable:!0,value:function(b){var c=d.globalSettings,e={};return Object.keys(c).forEach(function(b){e[b]=a.isFunction(c[b])?c[b]:y.clone(c[b])}),a.defaults(b||{},e)}},addBalloon:{writable:!0,value:function(a){return new s("",a||{})}},renderTo:{writable:!0,value:function(c,d){var e=b.select(c),f=e[0][0];if(this.target=c,this.targetSizes=d,null===f)throw new Error("Target element not found");var g=a.defaults(d||{},z.getContainerSize(f));if(0===this.config.data.length)return void(f.innerHTML=this._emptyContainer);f.innerHTML="";var h=new B(this.config.spec.dimensions,this.config.data),i=u.get(this.config.settings.specEngine,this.config.settings),j=i(this.config.spec,h.mix({})),k=function(a){var b;if(a.unit){var c=k(a.unit[0]),d=a.guide,e=d.x.$minimalDomain||1,f=d.y.$minimalDomain||1,g=Math.max(e*d.x.density,e*c.w),h=Math.max(f*d.y.density,f*c.h);b={w:g+d.padding.l+d.padding.r,h:h+d.padding.t+d.padding.b}}else b={w:0,h:0};return b},l=k(j.unit),m=l.w,n=l.h,o=z.getScrollbarWidth(),p=g.width-m,q=g.height-n,s=p>=0?g.width:m,t=q>=0?0:o,w=q>=0?g.height:n,y=p>=0?0:o;g.height=w-y,g.width=s-t;var D=this.config.settings,E=function(a,b){var c=a.guide.x.$minimalDomain||1,d=a.guide.y.$minimalDomain||1,e=b.width/c,f=b.height/d,g=D.xMinimumDensityKoeff;if(a.guide.x.hide!==!0&&0!==a.guide.x.rotate&&e>g*a.guide.x.$maxTickTextW){a.guide.x.rotate=0,a.guide.x.textAnchor="middle",a.guide.x.tickFormatWordWrapLimit=e;var h=Math.min(D.xAxisTickLabelLimit,a.guide.x.$maxTickTextW),i=0-h+a.guide.x.$maxTickTextH;a.guide.x.label.padding=a.guide.x.label.padding>0?a.guide.x.label.padding+i:a.guide.x.label.padding,a.guide.padding.b=a.guide.padding.b>0?a.guide.padding.b+i:a.guide.padding.b}var j={width:e,height:f};a.unit&&E(a.unit[0],j)};E(j.unit,g);var F=new r(h,C),G=F.buildGraph(j),H=v.get(this.config.settings.layoutEngine)(G),I=F.calcLayout(H,g),J=F.renderGraph(I,e.append("svg").attr("class",A+"svg").attr("width",g.width).attr("height",g.height),this);J.selectAll(".i-role-datum").call(x(this)),this.fire("render",J.node())}},getData:{writable:!0,value:function(){return this.config.data}},setData:{writable:!0,value:function(a){this.config.data=a,this.renderTo(this.target,this.targetSizes)}}}),d}(t);c.Plot=E}),e("charts/tau.chart",["exports","./tau.plot","../utils/utils","../data-processor"],function(b,c,d,e){function f(a,b){return b.reduce(function(b,c,d){return"measure"===a[c].type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(d)),"measure"!==a[c].type&&1===b.countMeasureAxis?b.status=o.WARNING:b.countMeasureAxis>1&&(b.status=o.FAIL),b},{status:o.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[]})}function g(b,c){var d=m(c.x),e=m(c.y),g=f(c.dimensions,d),h=f(c.dimensions,e);d=p[g.status](d,g),e=p[h.status](e,h);for(var i=m(c.guide),j=Math.max(d.length,e.length);i.length0;r--){var s=d.pop(),t=e.pop(),u=i.pop()||{};r===j?(k.x=s,k.y=t,k.unit.push(n(b,{x:l(s),y:l(t),color:c.color,size:c.size,flip:c.flip,colorGuide:q})),k.guide=a.defaults(u,{x:{label:s},y:{label:t}})):k={type:"COORDS.RECT",x:l(s),y:l(t),unit:[k],guide:a.defaults(u,{x:{label:s},y:{label:t}})}}return c.spec={dimensions:c.dimensions,unit:k},c}var h=function(a,b){a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),a.__proto__=b},i=c.Plot,j=d.utils,k=e.DataProcessor,l=function(a){return a?a:null},m=function(a){return j.isArray(a)?a:[a]},n=function(a,b){return{type:a,x:b.x,y:b.y,color:b.color,guide:{color:b.colorGuide},flip:b.flip,size:b.size}},o={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},p=function(b){return b[o.SUCCESS]=function(a){return a},b[o.FAIL]=function(){throw new Error("This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")},b[o.WARNING]=function(b,c){var d=b[c.indexMeasureAxis[0]],e=a.without(b,d);return e.push(d),e},b}({}),q={scatterplot:function(a){return g("ELEMENT.POINT",a)},line:function(b){var c=b.data,d=b.settings.log,e={none:function(){return null},horizontal:function(a){var b=j.isArray(a.x)?a.x:[a.x];return b[b.length-1]},vertical:function(a){var b=j.isArray(a.y)?a.y:[a.y];return b[b.length-1]},auto:function(a){var b,e=j.isArray(a.x)?a.x:[a.x],f=j.isArray(a.y)?a.y:[a.y],g=e[e.length-1],h=e.slice(0,e.length-1),i=f[f.length-1],l=f.slice(0,f.length-1),m=a.color,n=h.concat(l).concat([m]).filter(function(a){return null!==a}),o=-1,p=[[[g].concat(n),i],[[i].concat(n),g]],q=p.some(function(a,b){var e=a[0],f=a[1],g=k.isYFunctionOfX(c,e,[f]);return g.result?o=b:d(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+g.error.keyY+" values (e.g. "+g.error.errY.join(",")+")","for ("+g.error.keyX+" = "+g.error.valX+")."].join(" ")),g.result});return q?b=p[o][0][0]:(d(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=g),b}},f=(b.lineOrientation||"auto").toLowerCase(),h=e.hasOwnProperty(f)?e[f]:e.auto,i=h(b);return null!==i&&(b.data=a(c).sortBy(i)),g("ELEMENT.LINE",b)},bar:function(a){return a.flip=!1,g("ELEMENT.INTERVAL",a)},horizontalBar:function(a){return a.flip=!0,g("ELEMENT.INTERVAL",a)}},r=function(a){var b=function(b){b.settings=this.setupSettings(b.settings),b.dimensions=this.setupMetaInfo(b.dimensions,b.data),a.call(this,q[b.type](b))};return h(b,a),b}(i);b.Chart=r}),e("elements/coords",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(b,c,d,e,f){var g=c.utilsDraw,h=d.CSS_PREFIX,i=e.utils,j=f.TMatrix,k={CROSS:function(b,c,d){var e=b.domain(c),f=b.domain(d).reverse();return a(f).map(function(b){return a(e).map(function(a){var e={};return c&&(e[c]=a),d&&(e[d]=b),e})})}},l=function(a){return k[a]||function(){return[[{}]]}},m=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide),e.guide),e},n={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=a.any(d.unit,function(a){return 0===a.type.indexOf("COORDS.")}),f=l(e?"CROSS":""),g=new j(f(d,d.x,d.y)),h=new j(g.sizeR(),g.sizeC());return g.iterate(function(b,c,e){var f=a.extend({},d.$where,e),g=a(d.unit).map(function(b){return a.extend(m(b,d,["x","y"]),{$where:f})});h.setRC(b,c,g)}),d.$matrix=h,h.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(b,c){var d=b.options,e=b.guide.padding;b.x.guide=b.guide.x,b.y.guide=b.guide.y;var f=d.left+e.l,i=d.top+e.t,j=d.width-(e.l+e.r),k=d.height-(e.t+e.b),l={map:b.x.guide.tickLabel,min:b.x.guide.tickMin,max:b.x.guide.tickMax,period:b.x.guide.tickPeriod,autoScale:b.x.guide.autoScale};b.x.scaleObj=b.x.scaleDim&&b.scaleTo(b.x.scaleDim,[0,j],l);var m={map:b.y.guide.tickLabel,min:b.y.guide.tickMin,max:b.y.guide.tickMax,period:b.y.guide.tickPeriod,autoScale:b.y.guide.autoScale};b.y.scaleObj=b.y.scaleDim&&b.scaleTo(b.y.scaleDim,[k,0],m),b.x.guide.size=j,b.y.guide.size=k;var n=[0,k+b.guide.x.padding],o=[0-b.guide.y.padding,0],p=d.container.append("g").attr("class",h+"cell cell").attr("transform",g.translate(f,i)).datum({$where:b.$where});b.x.guide.hide||g.fnDrawDimAxis.call(p,b.x,n,j),b.y.guide.hide||g.fnDrawDimAxis.call(p,b.y,o,k);var q=g.fnDrawGrid.call(p,b,k,j);b.$matrix.iterate(function(b,d,e){e.forEach(function(b){b.options=a.extend({container:q},b.options),c(b)})})}};b.coords=n}),e("elements/size",["exports"],function(c){var d=function(c,d){c=a.filter(c,a.isFinite);var e=[Math.min.apply(null,c),Math.max.apply(null,c)],f=0===e[0]?e[1]:Math.max(1,e[1]/e[0]),g=[Math.max(1,d/(Math.log(f)+1)),d];return b.scale.linear().range(g).domain(e)};c.sizeScale=d}),e("elements/point",["exports","../utils/utils-draw","../const","./size"],function(b,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.sizeScale,i=function(b){var c=b.options,d=c.xScale,e=c.yScale,i=f.generateColor(b),j=a.max([b.guide.x.tickFontHeight,b.guide.y.tickFontHeight].filter(function(a){return 0!==a}))/2,k=h(b.domain(b.size.scaleDim),j),l=function(){return this.attr("r",function(c){var d=k(c[b.size.scaleDim]);return a.isFinite(d)?d:j}).attr("class",function(a){return g+"dot dot i-role-datum "+i.get(a[i.dimension])}).attr("cx",function(a){return d(a[b.x.scaleDim])}).attr("cy",function(a){return e(a[b.y.scaleDim])})},m=c.container.selectAll(".dot").data(b.partition());m.call(l),m.exit().remove(),m.enter().append("circle").call(l)};b.point=i}),e("utils/css-class-map",["exports","../const"],function(a,b){function c(a){return g[a-1]||g[4]}function d(a){var b=0;return a>=160&&320>a?b=1:a>=320&&480>a?b=2:a>=480&&640>a?b=3:a>=640&&(b=4),h[b]}var e=b.CSS_PREFIX,f=[1,2,3,4,5],g=f.map(function(a){return e+"line-opacity-"+a}),h=f.map(function(a){return e+"line-width-"+a});a.getLineClassesByWidth=d,a.getLineClassesByCount=c}),e("elements/line",["exports","../utils/utils-draw","./point","../const","../utils/css-class-map"],function(a,c,d,e,f){var g=c.utilsDraw,h=(d.point,e.CSS_PREFIX),i=f.getLineClassesByWidth,j=f.getLineClassesByCount,k=function(a){var c=a.options,d=c.xScale,e=c.yScale;a.size={};var f=g.generateColor(a);c.color=f;var k,l=b.nest().key(function(a){return a[f.dimension]}).entries(a.partition()),m=i(c.width),n=j(l.length),o=function(){this.attr("class",function(a){return[h+"line i-role-datum ","line",f.get(a.key),m,n].join(" ")});var a=this.selectAll("path").data(function(a){return[a.values]});a.call(q),a.enter().append("path").call(q),a.exit().remove()},p=function(b){var g=b.reduce(function(a,b){var c=b.values;return 1===c.length&&a.push(c[0]),a},[]),i=function(){return this.attr("r",1.5).attr("class",function(a){return h+"dot-line dot-line i-role-datum "+h+"dot i-role-datum "+f.get(a[f.dimension])}).attr("cx",function(b){return d(b[a.x.scaleDim])}).attr("cy",function(b){return e(b[a.y.scaleDim])})},j=c.container.selectAll(".dot-line").data(g);j.call(i),j.exit().remove(),j.enter().append("circle").call(i)};k=b.svg.line().x(function(b){return d(b[a.x.scaleDim])}).y(function(b){return e(b[a.y.scaleDim])});var q=function(){this.attr("d",k)};p(l);var r=c.container.selectAll(".line").data(l);r.call(o),r.enter().append("g").call(o),r.exit().remove()};a.line=k}),e("elements/interval",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=d.CSS_PREFIX,g="i-role-bar-group",h=function(a){return"measure"===a.dimType},i=function(a){var b,c,d;return h(a.dim)?(b=5,c=5,d=0):(b=a.size/a.domain().length,c=b/(a.categories.length+1),d=c),{tickWidth:b,intervalWidth:c,offsetCategory:d}},j=function(a){var c,d,j,k,l,m=a.options,n=e.generateColor(a),o=a.partition(),p=b.nest().key(function(a){return a[n.dimension]}).entries(o),q=m.xScale,r=m.yScale;if(a.flip){var s,t,u,v,w;!function(){s=Math.min.apply(null,q.domain());var b=0>=s?0:s;t=i({domain:r.domain,dim:a.y,categories:p,size:m.height}),u=t.tickWidth,v=t.intervalWidth,w=t.offsetCategory,c=h(a.x)?function(c){return q(Math.min(b,c[a.x.scaleDim]))}:0,d=function(b){return r(b[a.y.scaleDim])-u/2},j=h(a.x)?function(c){return Math.abs(q(c[a.x.scaleDim])-q(b))}:function(b){return q(b[a.x.scaleDim])},k=function(){return v},l=function(a,b){return e.translate(0,b*w+w/2)}}()}else{var x,y,u,v,w;!function(){x=Math.min.apply(null,r.domain());var b=0>=x?0:x;y=i({domain:q.domain,dim:a.x,categories:p,size:m.width}),u=y.tickWidth,v=y.intervalWidth,w=y.offsetCategory,c=function(b){return q(b[a.x.scaleDim])-u/2},d=h(a.y)?function(c){return r(Math.max(b,c[a.y.scaleDim]))}:function(b){return r(b[a.y.scaleDim])},j=function(){return v},k=h(a.y)?function(c){return Math.abs(r(c[a.y.scaleDim])-r(b))}:function(b){return m.height-r(b[a.y.scaleDim])},l=function(a,b){return e.translate(b*w+w/2,0)}}()}var z=function(){return this.attr("class",function(a){return"i-role-datum bar "+f+"bar "+n.get(a[n.dimension])}).attr("x",c).attr("y",d).attr("width",j).attr("height",k)},A=function(){this.attr("class",g).attr("transform",l);var a=this.selectAll("bar").data(function(a){return a.values});a.call(z),a.enter().append("rect").call(z),a.exit().remove()},B=m.container.selectAll("."+g).data(p);B.call(A),B.enter().append("g").call(A),B.exit().remove()};a.interval=j}),e("elements/coords-parallel",["exports","../utils/utils-draw","../const","../utils/utils","../matrix"],function(c,d,e,f,g){var h=d.utilsDraw,i=(e.CSS_PREFIX,f.utils),j=g.TMatrix,k=function(b,c,d){var e=a.defaults(i.clone(b),a.pick.apply(a,[c].concat(d)));return e.guide=a.extend(i.clone(c.guide||{}),e.guide||{}),e},l={walk:function(b,c){var d=a.defaults(b,{$where:{}}),e=new j(1,1),f=new j(1,1);return e.iterate(function(b,c){var e=a.extend({},d.$where),g=a(d.unit).map(function(b){return a.extend(k(b,d,["x"]),{$where:e})});f.setRC(b,c,g)}),d.$matrix=f,f.iterate(function(b,d,e){a.each(e,function(a){return c(a)})}),d},draw:function(c,d){var e=c.options,f=c.guide.padding,g=e.left+f.l,i=e.top+f.t,j=e.width-(f.l+f.r),k=e.height-(f.t+f.b),l=c.x.map(function(a){return c.scaleTo(a,[k,0],{})}),m=e.container.append("g").attr("class","graphical-report__cell cell").attr("transform",h.translate(g,i)),n=function(a,b){return"translate("+a+","+b+")"},o=function(a){return"rotate("+a+")"},p=function(a,c){var d=this,e=b.svg.axis().scale(a).orient("left"),f=d.append("g").attr("class","y axis").attr("transform",n.apply(null,c)).call(e);f.selectAll(".tick text").attr("transform",o(0)).style("text-anchor","end")},q=j/(c.x.length-1);l.forEach(function(a,b){p.call(m,a,[b*q,0])});var r=m.append("g").attr("class","grid").attr("transform",n(0,0));c.$matrix.iterate(function(b,c,e){e.forEach(function(b){b.options=a.extend({container:r},b.options),d(b)})})}};c.CoordsParallel=l}),e("elements/coords-parallel-line",["exports","../utils/utils-draw","../const"],function(a,c,d){var e=c.utilsDraw,f=(d.CSS_PREFIX,{draw:function(a){a.color=a.dimension(a.color,a);var c=a.options,d=a.x.reduce(function(b,d){return b[d]=a.scaleTo(d,[c.height,0],{}),b},{}),f=e.generateColor(a),g=b.nest().key(function(a){return a[f.dimension]}).entries(a.partition()).map(function(b){var c=b.values[0],d=[];return a.x.forEach(function(a){d.push({key:a,val:c[a]})}),d}),h=function(){this.attr("class",function(){return"graphical-report__line line color10-9"});var a=this.selectAll("path").data(function(a){return[a]});a.call(l),a.enter().append("path").call(l),a.exit().remove()},i=c.width/(a.x.length-1),j={};a.x.forEach(function(a,b){j[a]=b*i});var k=b.svg.line().x(function(a){return j[a.key]}).y(function(a){return d[a.key](a.val)}),l=function(){this.attr("d",k)},m=c.container.selectAll(".line").data(g);m.call(h),m.enter().append("g").call(h),m.exit().remove()}});a.CoordsParallelLine=f}),e("node-map",["exports","./elements/coords","./elements/line","./elements/point","./elements/interval","./utils/utils-draw","./elements/coords-parallel","./elements/coords-parallel-line"],function(a,b,c,d,e,f,g,h){var i=b.coords,j=c.line,k=d.point,l=e.interval,m=(f.utilsDraw,g.CoordsParallel),n=h.CoordsParallelLine,o=function(a,b){b.forEach(function(b){a[b]=a.dimension(a[b],a)});var c=a.options,d=c.width,e=c.height;a.x.guide=a.guide.x,a.y.guide=a.guide.y;var f={map:a.x.guide.tickLabel,min:a.x.guide.tickMin,max:a.x.guide.tickMax,period:a.x.guide.tickPeriod,autoScale:a.x.guide.autoScale};a.options.xScale=a.x.scaleDim&&a.scaleTo(a.x.scaleDim,[0,d],f);var g={map:a.y.guide.tickLabel,min:a.y.guide.tickMin,max:a.y.guide.tickMax,period:a.y.guide.tickPeriod,autoScale:a.y.guide.autoScale};return a.options.yScale=a.y.scaleDim&&a.scaleTo(a.y.scaleDim,[e,0],g),a},p={"COORDS.RECT":{walk:i.walk,draw:function(a,b){a.x=a.dimension(a.x,a),a.y=a.dimension(a.y,a),i.draw(a,b)}},"ELEMENT.POINT":function(a){k(o(a,["x","y","color","size"]))},"ELEMENT.LINE":function(a){j(o(a,["x","y","color"]))},"ELEMENT.INTERVAL":function(a){l(o(a,["x","y","color"]))},"COORDS.PARALLEL":m,"PARALLEL/ELEMENT.LINE":n};a.nodeMap=p}),e("tau.newCharts",["exports","./utils/utils-dom","./charts/tau.plot","./charts/tau.chart","./unit-domain-mixin","./unit-domain-period-generator","./dsl-reader","./spec-engine-factory","./layout-engine-factory","./formatter-registry","./node-map","./units-registry"],function(c,d,e,f,g,h,i,j,k,l,m,n){var o=d.utilsDom,p=e.Plot,q=f.Chart,r=g.UnitDomainMixin,s=h.UnitDomainPeriodGenerator,t=i.DSLReader,u=j.SpecEngineFactory,v=k.LayoutEngineFactory,w=l.FormatterRegistry,x=m.nodeMap,y=n.UnitsRegistry,z={},A={},B={UnitDomainMixin:r,UnitDomainPeriodGenerator:s,DSLReader:t,SpecEngineFactory:u,LayoutEngineFactory:v},C={UnitsRegistry:y,tickFormat:w,d3:b,_:a,tickPeriod:s,colorBrewers:{add:function(a,b){a in z||(z[a]=b)},get:function(a){return z[a]}},plugins:{add:function(a,b){a in A||(A[a]=b)},get:function(a){return A[a]}},globalSettings:{log:function(a,b){b=b||"INFO",console.log(b+": "+a)},excludeNull:!0,specEngine:"AUTO",layoutEngine:"EXTRACT",getAxisTickLabelSize:o.getAxisTickLabelSize,xAxisTickLabelLimit:100,yAxisTickLabelLimit:100,xTickWordWrapLinesLimit:2,yTickWordWrapLinesLimit:3,xTickWidth:9,yTickWidth:9,distToXAxisLabel:20,distToYAxisLabel:20,xAxisPadding:20,yAxisPadding:20,xFontLabelHeight:15,yFontLabelHeight:15,xDensityKoeff:2.2,xMinimumDensityKoeff:1.1,yDensityKoeff:2.2,yMinimumDensityKoeff:1.1,defaultFormats:{measure:"x-num-auto","measure:time":"x-time-auto","measure:time:year":"x-time-year","measure:time:quarter":"x-time-quarter","measure:time:month":"x-time-month","measure:time:week":"x-time-week","measure:time:day":"x-time-day","measure:time:hour":"x-time-hour","measure:time:min":"x-time-min","measure:time:sec":"x-time-sec","measure:time:ms":"x-time-ms"}}};p.globalSettings=C.globalSettings,C.UnitsRegistry.add("COORDS.PARALLEL",x["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",x["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",x["COORDS.RECT"]).add("ELEMENT.POINT",x["ELEMENT.POINT"]).add("ELEMENT.LINE",x["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",x["ELEMENT.INTERVAL"]),c.Plot=p,c.Chart=q,c.__api__=B,c.api=C}),e("underscore",function(){return a}),e("d3",function(){return b}),d("tau.newCharts")}); \ No newline at end of file diff --git a/css/graphic-elements.css b/css/graphic-elements.css index db3cd6a01..06bb6b65c 100644 --- a/css/graphic-elements.css +++ b/css/graphic-elements.css @@ -146,6 +146,7 @@ .graphical-report__svg .label .label-token { font-size: 11px; font-weight: bold; + letter-spacing: 1px; } .graphical-report__svg .label .label-token-1, .graphical-report__svg .label .label-token-2 {