From 38cd5b60cec6ecbe893fd767654f5434a1679a38 Mon Sep 17 00:00:00 2001 From: Vladimir Petriko Date: Tue, 2 Dec 2014 19:50:54 +0300 Subject: [PATCH] release 0.1.18 --- build/color-brewer.js | 646 ++++++++++++++++++++--------------------- build/tauCharts.js | 159 +++++----- build/tauCharts.min.js | 4 +- 3 files changed, 393 insertions(+), 416 deletions(-) diff --git a/build/color-brewer.js b/build/color-brewer.js index 90215ee69..749b9cd7b 100644 --- a/build/color-brewer.js +++ b/build/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.js b/build/tauCharts.js index 9dab57aec..a7d4c954f 100644 --- a/build/tauCharts.js +++ b/build/tauCharts.js @@ -1,16 +1,16 @@ /*! tauCharts - v0.1.18 - 2014-12-02 * 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.tauChart = 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.tauChart = 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"); @@ -470,16 +470,21 @@ define('utils/utils-dom',["exports"], function (exports) { getStyle: function (el, prop) { return window.getComputedStyle(el, undefined).getPropertyValue(prop); }, + + getStyleAsNum: function (el, prop) { + return parseInt(this.getStyle(el, prop) || 0, 10); + }, + getContainerSize: function (el) { - var pl = parseInt(this.getStyle(el, "padding-left") || 0, 10); - var pr = parseInt(this.getStyle(el, "padding-right") || 0, 10); - var pb = parseInt(this.getStyle(el, "padding-bottom") || 0, 10); - var pt = parseInt(this.getStyle(el, "padding-top") || 0, 10); + var pl = this.getStyleAsNum(el, "padding-left"); + var pr = this.getStyleAsNum(el, "padding-right"); + var pb = this.getStyleAsNum(el, "padding-bottom"); + var pt = this.getStyleAsNum(el, "padding-top"); - var borderWidthT = parseInt(this.getStyle(el, "border-top-width") || 0, 10); - var borderWidthL = parseInt(this.getStyle(el, "border-left-width") || 0, 10); - var borderWidthR = parseInt(this.getStyle(el, "border-right-width") || 0, 10); - var borderWidthB = parseInt(this.getStyle(el, "border-bottom-width") || 0, 10); + var borderWidthT = this.getStyleAsNum(el, "border-top-width"); + var borderWidthL = this.getStyleAsNum(el, "border-left-width"); + var borderWidthR = this.getStyleAsNum(el, "border-right-width"); + var borderWidthB = this.getStyleAsNum(el, "border-bottom-width"); var bw = borderWidthT + borderWidthL + borderWidthR + borderWidthB; @@ -534,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); }; @@ -548,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); }; @@ -621,6 +628,7 @@ define('dsl-reader',["exports"], function (exports) { writable: true, value: function (styledGraph, target) { var _this2 = this; + styledGraph.options.container = target; var renderRecursively = function (unit) { return _this2.UnitsRegistry.get(unit.type).draw(_this2.domain.mix(unit), renderRecursively); @@ -713,10 +721,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) { @@ -769,9 +779,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) { @@ -814,7 +824,6 @@ define('utils/utils-draw',["exports", "../utils/utils", "../formatter-registry"] var utils = _utilsUtils.utils; var FormatterRegistry = _formatterRegistry.FormatterRegistry; - var translate = function (left, top) { return "translate(" + left + "," + top + ")"; }; @@ -825,7 +834,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); @@ -1116,7 +1124,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 : {}; @@ -1342,7 +1349,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); @@ -1353,7 +1359,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; @@ -1399,7 +1404,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; @@ -1408,15 +1412,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; @@ -1447,7 +1448,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); @@ -1533,11 +1533,9 @@ 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 || { l: 0, b: 0, r: 0, t: 0 }; + var p = spec.guide.padding; box.depth += 1; box.paddings.unshift({ l: p.l, b: p.b, r: p.r, t: p.t }); @@ -1653,21 +1651,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) { + var Plugins = function Plugins(plugins) { this._plugins = plugins; }; @@ -1717,9 +1714,6 @@ define('plugins',["exports"], function (exports) { return Plugins; })(); - - - var propagateDatumEvents = function (plugins) { return function () { this.on("click", function (d) { @@ -1734,40 +1728,20 @@ define('plugins',["exports"], function (exports) { }; }; - /** @class ChartElementTools*/ - var ChartElementTools = - /** @constructs */ - function ChartElementTools(element) { + var ChartElementTools = function ChartElementTools(element) { this.element = element; }; - /** @class RenderContext*/ - var RenderContext = - /** @constructs */ - function RenderContext(dataSource) { + var RenderContext = function RenderContext(dataSource) { this.data = dataSource; }; - /** @class ElementContext */ - var ElementContext = - /** - * @constructs - * @param datum - * - * */ - function ElementContext(datum) { + var ElementContext = function ElementContext(datum) { this.datum = datum; }; - /** @class ChartTools */ var ChartTools = (function () { - var ChartTools = - /** - * @constructs - * @param {ChartLayout} layout - * @param {Mapper} mapper - **/ - function ChartTools(layout, mapper) { + var ChartTools = function ChartTools(layout, mapper) { this.svg = layout.svg; this.html = layout.html; this.mapper = mapper; @@ -1886,6 +1860,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); }; @@ -1893,6 +1868,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 = { @@ -1950,7 +1926,8 @@ define('unit-domain-mixin',["exports", "./unit-domain-period-generator", "./util var UnitDomainMixin = function UnitDomainMixin(meta, data) { var getPropMapper = function (prop) { return (function (propObj) { - return propObj[prop]; + var xObject = (propObj || {}); + return xObject.hasOwnProperty(prop) ? xObject[prop] : null; }); }; @@ -2166,7 +2143,6 @@ define('data-processor',["exports", "./utils/utils"], function (exports, _utilsU var utils = _utilsUtils.utils; - var DataProcessor = { isYFunctionOfX: function (data, xFields, yFields) { var isRelationAFunction = true; @@ -2318,6 +2294,7 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../spec-engine-factory", var _classProps = function (child, staticProps, instanceProps) { if (staticProps) Object.defineProperties(child, staticProps); + if (instanceProps) Object.defineProperties(child.prototype, instanceProps); }; @@ -2445,7 +2422,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../spec-engine-factory", size.height = screenH - scrollH; size.width = screenW - scrollW; - // optimize full spec depending on size var localSettings = this.config.settings; var traverseToDeep = function (root, size) { @@ -2480,7 +2456,6 @@ define('charts/tau.plot',["exports", "../dsl-reader", "../spec-engine-factory", traverseToDeep(fullSpec.unit, size); - var reader = new DSLReader(domainMixin, UnitsRegistry); var logicXGraph = reader.buildGraph(fullSpec); @@ -2519,7 +2494,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; }; @@ -2725,7 +2699,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); @@ -2757,7 +2730,7 @@ define('elements/coords',["exports", "../utils/utils-draw", "../const", "../util 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 || {})); + r.guide = _.extend(utils.clone(root.guide), r.guide); return r; }; @@ -2855,6 +2828,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; @@ -2888,6 +2862,7 @@ define('elements/line',["exports", "../utils/utils-draw", "../const", "../utils/ var CSS_PREFIX = _const.CSS_PREFIX; var getLineClassesByWidth = _utilsCssClassMap.getLineClassesByWidth; var getLineClassesByCount = _utilsCssClassMap.getLineClassesByCount; + var line = function (node) { var options = node.options; @@ -2936,7 +2911,6 @@ define('elements/line',["exports", "../utils/utils-draw", "../const", "../utils/ elements.enter().append("circle").call(update); }; - var line = d3.svg.line().x(function (d) { return xScale(d[node.x.scaleDim]); }).y(function (d) { @@ -2976,6 +2950,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; @@ -3015,6 +2990,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"; @@ -3060,8 +3036,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({ @@ -3073,6 +3051,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])); @@ -3098,8 +3077,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({ @@ -3111,6 +3092,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); @@ -3167,7 +3149,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 || {})); @@ -3216,7 +3197,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 + ")"; }; @@ -3224,7 +3204,6 @@ define('elements/coords-parallel',["exports", "../utils/utils-draw", "../const", return "rotate(" + angle + ")"; }; - var fnDrawDimAxis = function (xScaleObj, AXIS_POSITION) { var container = this; @@ -3258,7 +3237,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); @@ -3331,7 +3309,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); @@ -3408,8 +3385,8 @@ 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 colorBrewers = {}; var __api__ = { UnitDomainMixin: UnitDomainMixin, @@ -3490,11 +3467,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 12823e450..179bfa366 100644 --- a/build/tauCharts.min.js +++ b/build/tauCharts.min.js @@ -1,5 +1,5 @@ /*! tauCharts - v0.1.18 - 2014-12-02 * 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.tauChart=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){var c=this;a.options.container=b;var d=function(a){return c.UnitsRegistry.get(a.type).draw(c.domain.mix(a),d)};return d(a),a.options.container}}}),b}();b.DSLReader=d}),e("utils/utils",["exports"],function(a){var b=function(a,c,d,e){var f=e(d(a),a);return(f[c]||[]).forEach(function(a){return b(a,c,d,e)}),f},c={clone:function(a){return JSON.parse(JSON.stringify(a))},isArray:function(a){return Array.isArray(a)},autoScale:function(a){var b=10,c=Math.min.apply(null,a),d=Math.max.apply(null,a);if(c===d){var e=d>=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]],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||{l:0,b:0,r:0,t:0};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){this._plugins=a};return c(a,null,{_call:{writable:!0,value:function(a,b){for(var c=0;c=0?g.width:m,A=y>=0?0:r,B=y>=0?g.height:n,C=t>=0?0:r;g.height=B-C,g.width=z-A;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 o(h,x),G=F.buildGraph(j),H=q.get(this.config.settings.layoutEngine)(G),I=F.calcLayout(H,g),J=F.renderGraph(I,e.append("svg").attr("class",v+"svg").attr("width",g.width).attr("height",g.height));J.selectAll(".i-role-datum").call(s(this._plugins)),this._plugins.render(J)}}}}),c}();c.Plot=z}),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));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("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","../const","../utils/css-class-map"],function(a,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.getLineClassesByWidth,i=e.getLineClassesByCount,j=function(a){var c=a.options,d=c.xScale,e=c.yScale,j=f.generateColor(a),k=b.nest().key(function(a){return a[j.dimension]}).entries(a.partition()),l=h(c.width),m=i(k.length),n=function(){this.attr("class",function(a){return[g+"line","line",j.get(a.key),l,m].join(" ")});var a=this.selectAll("path").data(function(a){return[a.values]});a.call(q),a.enter().append("path").call(q),a.exit().remove()},o=function(b){var f=b.reduce(function(a,b){var c=b.values;return 1===c.length&&a.push(c[0]),a},[]),h=function(){return this.attr("r",1.5).attr("class",function(a){return g+"dot-line dot-line "+g+"dot i-role-datum "+j.get(a[j.dimension])}).attr("cx",function(b){return d(b[a.x.scaleDim])}).attr("cy",function(b){return e(b[a.y.scaleDim])})},i=c.container.selectAll(".dot-line").data(f);i.call(h),i.exit().remove(),i.enter().append("circle").call(h)},p=b.svg.line().x(function(b){return d(b[a.x.scaleDim])}).y(function(b){return e(b[a.y.scaleDim])}),q=function(){this.attr("d",p)};o(k);var r=c.container.selectAll(".line").data(k);r.call(n),r.enter().append("g").call(n),r.exit().remove()};a.line=j}),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("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(a,b,c,d,e,f,g,h,i,j,k,l){var m=b.utilsDom,n=c.Plot,o=d.Chart,p=e.UnitDomainMixin,q=f.UnitDomainPeriodGenerator,r=g.DSLReader,s=h.SpecEngineFactory,t=i.LayoutEngineFactory,u=j.FormatterRegistry,v=k.nodeMap,w=l.UnitsRegistry,x={},y={UnitDomainMixin:p,UnitDomainPeriodGenerator:q,DSLReader:r,SpecEngineFactory:s,LayoutEngineFactory:t},z={UnitsRegistry:w,tickFormat:u,tickPeriod:q,colorBrewers:{add:function(a,b){a in x||(x[a]=b)},get:function(a){return x[a]}},globalSettings:{log:function(a,b){b=b||"INFO",console.log(b+": "+a)},excludeNull:!0,specEngine:"AUTO",layoutEngine:"EXTRACT",getAxisTickLabelSize:m.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"}}};n.globalSettings=z.globalSettings,z.UnitsRegistry.add("COORDS.PARALLEL",v["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",v["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",v["COORDS.RECT"]).add("ELEMENT.POINT",v["ELEMENT.POINT"]).add("ELEMENT.LINE",v["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",v["ELEMENT.INTERVAL"]),a.Plot=n,a.Chart=o,a.__api__=y,a.api=z}),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.tauChart=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){var c=this;a.options.container=b;var d=function(a){return c.UnitsRegistry.get(a.type).draw(c.domain.mix(a),d)};return d(a),a.options.container}}}),b}();b.DSLReader=d}),e("utils/utils",["exports"],function(a){var b=function(a,c,d,e){var f=e(d(a),a);return(f[c]||[]).forEach(function(a){return b(a,c,d,e)}),f},c={clone:function(a){return JSON.parse(JSON.stringify(a))},isArray:function(a){return Array.isArray(a)},autoScale:function(a){var b=10,c=Math.min.apply(null,a),d=Math.max.apply(null,a);if(c===d){var e=d>=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]],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){this._plugins=a};return c(a,null,{_call:{writable:!0,value:function(a,b){for(var c=0;c=0?g.width:m,A=y>=0?0:r,B=y>=0?g.height:n,C=t>=0?0:r;g.height=B-C,g.width=z-A;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 o(h,x),G=F.buildGraph(j),H=q.get(this.config.settings.layoutEngine)(G),I=F.calcLayout(H,g),J=F.renderGraph(I,e.append("svg").attr("class",v+"svg").attr("width",g.width).attr("height",g.height));J.selectAll(".i-role-datum").call(s(this._plugins)),this._plugins.render(J)}}}}),c}();c.Plot=z}),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));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("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","../const","../utils/css-class-map"],function(a,c,d,e){var f=c.utilsDraw,g=d.CSS_PREFIX,h=e.getLineClassesByWidth,i=e.getLineClassesByCount,j=function(a){var c=a.options,d=c.xScale,e=c.yScale,j=f.generateColor(a),k=b.nest().key(function(a){return a[j.dimension]}).entries(a.partition()),l=h(c.width),m=i(k.length),n=function(){this.attr("class",function(a){return[g+"line","line",j.get(a.key),l,m].join(" ")});var a=this.selectAll("path").data(function(a){return[a.values]});a.call(q),a.enter().append("path").call(q),a.exit().remove()},o=function(b){var f=b.reduce(function(a,b){var c=b.values;return 1===c.length&&a.push(c[0]),a},[]),h=function(){return this.attr("r",1.5).attr("class",function(a){return g+"dot-line dot-line "+g+"dot i-role-datum "+j.get(a[j.dimension])}).attr("cx",function(b){return d(b[a.x.scaleDim])}).attr("cy",function(b){return e(b[a.y.scaleDim])})},i=c.container.selectAll(".dot-line").data(f);i.call(h),i.exit().remove(),i.enter().append("circle").call(h)},p=b.svg.line().x(function(b){return d(b[a.x.scaleDim])}).y(function(b){return e(b[a.y.scaleDim])}),q=function(){this.attr("d",p)};o(k);var r=c.container.selectAll(".line").data(k);r.call(n),r.enter().append("g").call(n),r.exit().remove()};a.line=j}),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("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(a,b,c,d,e,f,g,h,i,j,k,l){var m=b.utilsDom,n=c.Plot,o=d.Chart,p=e.UnitDomainMixin,q=f.UnitDomainPeriodGenerator,r=g.DSLReader,s=h.SpecEngineFactory,t=i.LayoutEngineFactory,u=j.FormatterRegistry,v=k.nodeMap,w=l.UnitsRegistry,x={},y={UnitDomainMixin:p,UnitDomainPeriodGenerator:q,DSLReader:r,SpecEngineFactory:s,LayoutEngineFactory:t},z={UnitsRegistry:w,tickFormat:u,tickPeriod:q,colorBrewers:{add:function(a,b){a in x||(x[a]=b)},get:function(a){return x[a]}},globalSettings:{log:function(a,b){b=b||"INFO",console.log(b+": "+a)},excludeNull:!0,specEngine:"AUTO",layoutEngine:"EXTRACT",getAxisTickLabelSize:m.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"}}};n.globalSettings=z.globalSettings,z.UnitsRegistry.add("COORDS.PARALLEL",v["COORDS.PARALLEL"]).add("PARALLEL/ELEMENT.LINE",v["PARALLEL/ELEMENT.LINE"]).add("COORDS.RECT",v["COORDS.RECT"]).add("ELEMENT.POINT",v["ELEMENT.POINT"]).add("ELEMENT.LINE",v["ELEMENT.LINE"]).add("ELEMENT.INTERVAL",v["ELEMENT.INTERVAL"]),a.Plot=n,a.Chart=o,a.__api__=y,a.api=z}),e("underscore",function(){return a}),e("d3",function(){return b}),d("tau.newCharts")}); \ No newline at end of file