diff --git a/license.txt b/LICENSE similarity index 85% rename from license.txt rename to LICENSE index 62be93a6c..f99e0d6a2 100644 --- a/license.txt +++ b/LICENSE @@ -1,10 +1,10 @@ -Copyright 2015 Taucraft Limited +Copyright 2017 Targetprocess, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, diff --git a/README.md b/README.md index 058e50498..a1fe86e36 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,22 @@ Taucharts [![Build Status](https://travis-ci.org/TargetProcess/tauCharts.png?branch=master)](https://travis-ci.org/TargetProcess/tauCharts) [![Coverage Status](https://img.shields.io/coveralls/TargetProcess/tauCharts.svg)](https://coveralls.io/r/TargetProcess/tauCharts) [![Code Climate](https://codeclimate.com/github/TargetProcess/tauCharts/badges/gpa.svg)](https://codeclimate.com/github/TargetProcess/tauCharts) -[![Slack Status](http://slack.taucharts.com/badge.svg)](http://slack.taucharts.com/) +[![Slack Status](https://slack.taucharts.com/badge.svg)](https://slack.taucharts.com/) ====== -![NPM downloads](https://nodei.co/npm-dl/taucharts.png?months=6) +Taucharts is a [data-focused JavaScript charting library](https://blog.taucharts.com/taucharts-data-focused-charting-library/) based on D3 and designed with passion. - -Taucharts is a [data-focused JavaScript charting library](http://blog.taucharts.com/taucharts-data-focused-charting-library/) based on D3 and designed with passion. - -##### Official website: [www.taucharts.com](http://www.taucharts.com) -##### Documentation: [api.taucharts.com](http://api.taucharts.com) -##### Project blog: [blog.taucharts.com](http://blog.taucharts.com) +##### Official website: [www.taucharts.com](https://www.taucharts.com) +##### Documentation: [api.taucharts.com](https://api.taucharts.com) +##### Project blog: [blog.taucharts.com](https://blog.taucharts.com) ## Why use Taucharts? #### Simplicity Data plays a key role in Taucharts. The library provides a declarative interface for fast mapping of data fields to visual properties. #### Flexibility -The library's architecture allows you to build [facets](http://api.taucharts.com/basic/facet.html) and extend chart behaviour with reusable plugins. +The library's architecture allows you to build [facets](https://api.taucharts.com/basic/facet.html) and extend chart behaviour with reusable plugins. #### Design The Taucharts team is passionate about beautiful design. #### ... -Dive into the high-level [Taucharts concepts](http://blog.taucharts.com/taucharts-data-focused-charting-library/) and [usage reviews](#taucharts-examples--usage-reviews). +Dive into the high-level [Taucharts concepts](https://blog.taucharts.com/taucharts-data-focused-charting-library/) and [usage reviews](#taucharts-examples--usage-reviews). If you want to contribute - see [how to run the project locally](#how-to-run-the-project-locally) ## How to use Taucharts @@ -30,15 +27,17 @@ Load JavaScript dependencies ```html - + ``` Include a CSS file, as well ```html - + ``` +NOTE: taucharts@2 is compatible with D3 v4 only. Use taucharts@1 if you work with obsolete D3 versions. + #### Downloading Taucharts using Bower ```bash @@ -57,46 +56,46 @@ Below are some popular usage scenarios. For more examples, see our experimental #### Scatter plot ```javascript -var chart = new tauCharts.Chart({ - 'type' : 'scatterplot', - 'x' : 'Cycle Time', - 'y' : 'SUM(Bugs Count)', - 'color': 'Team', - 'size' : 'Sum(User Stories Count)', - 'data' : [{'Cycle Time': 186, 'SUM(Bugs Count)': 34, 'Team': 'HDP'...}, ...], - 'plugins': [ - tauCharts.api.plugins.get('legend'), - tauCharts.api.plugins.get('tooltip') +var chart = new Taucharts.Chart({ + type : 'scatterplot', + x : 'Cycle Time', + y : 'SUM(Bugs Count)', + color : 'Team', + size : 'Sum(User Stories Count)', + data : [{'Cycle Time': 186, 'SUM(Bugs Count)': 34, 'Team': 'HDP'...}, ...], + plugins: [ + Taucharts.api.plugins.get('legend'), + Taucharts.api.plugins.get('tooltip') ] }); ``` -[![Scatterplot](examples/screenshots/Taucharts_Scatterplot.png)](http://api.taucharts.com/basic/scatterplot.html) +[![Scatterplot](examples/screenshots/Taucharts_Scatterplot.png)](https://api.taucharts.com/basic/scatterplot.html) -See [scatter plot documentation](http://api.taucharts.com/basic/scatterplot.html) +See [scatter plot documentation](https://api.taucharts.com/basic/scatterplot.html) ___ #### Line chart ```javascript -var chart = new tauCharts.Chart({ - 'type' : 'line', - 'y' : 'Y Scale', - 'x' : 'X Scale', - 'color': 'Team', - 'size' : 'Effort', - 'label': 'Effort', - 'data' : [{'Team': 'Alpha', 'Effort': 40, 'Y Scale': 23, 'X Scale': 72 }, ...] +var chart = new Taucharts.Chart({ + type : 'line', + y : 'Y Scale', + x : 'X Scale', + color: 'Team', + size : 'Effort', + label: 'Effort', + data : [{'Team': 'Alpha', 'Effort': 40, 'Y Scale': 23, 'X Scale': 72 }, ...] }); ``` -[![Line Chart](examples/screenshots/Taucharts_Line.png)](http://api.taucharts.com/basic/line.html) +[![Line Chart](examples/screenshots/Taucharts_Line.png)](https://api.taucharts.com/basic/line.html) -See [line chart documentation](http://api.taucharts.com/basic/line.html) +See [line chart documentation](https://api.taucharts.com/basic/line.html) ___ #### Bar chart ```javascript -var chart = new tauCharts.Chart({ +var chart = new Taucharts.Chart({ type : 'bar', x : 'team', y : 'effort', @@ -104,15 +103,15 @@ var chart = new tauCharts.Chart({ data : [{'team': 'd', 'effort': 1, 'count': 1, 'priority': 'low'}, ...] }); ``` -[![Bar Chart](examples/screenshots/Taucharts_Bar.png)](http://api.taucharts.com/basic/bar.html) +[![Bar Chart](examples/screenshots/Taucharts_Bar.png)](https://api.taucharts.com/basic/bar.html) -See [bar chart documentation](http://api.taucharts.com/basic/bar.html) +See [bar chart documentation](https://api.taucharts.com/basic/bar.html) ___ #### Horizontal bar chart ```javascript -var chart = new tauCharts.Chart({ +var chart = new Taucharts.Chart({ type : 'horizontal-bar', x : 'count', y : 'team', @@ -120,15 +119,15 @@ var chart = new tauCharts.Chart({ data : [{'team': 'alpha', 'effort': 8, 'priority': 'major'}, ...] }); ``` -[![Horizontal Bar Chart](examples/screenshots/Taucharts_Horizontal-bar.png)](http://api.taucharts.com/basic/horizontal-bar.html) +[![Horizontal Bar Chart](examples/screenshots/Taucharts_Horizontal-bar.png)](https://api.taucharts.com/basic/horizontal-bar.html) -See [horizontal bar chart documentation](http://api.taucharts.com/basic/horizontal-bar.html) +See [horizontal bar chart documentation](https://api.taucharts.com/basic/horizontal-bar.html) ___ #### Stacked bar chart ```javascript -var chart = new tauCharts.Chart({ +var chart = new Taucharts.Chart({ type : 'stacked-bar', x : 'age', y : ['count', 'sport'], @@ -136,15 +135,15 @@ var chart = new tauCharts.Chart({ data : [{country: 'Canada', sport: 'Biathlon', medals: 20, age: 22}, ...] }); ``` -[![Stacked Bar Chart](examples/screenshots/Taucharts_Stacked-bar.png)](http://api.taucharts.com/basic/stacked-bar.html) +[![Stacked Bar Chart](examples/screenshots/Taucharts_Stacked-bar.png)](https://api.taucharts.com/basic/stacked-bar.html) -See [stacked bar chart documentation](http://api.taucharts.com/basic/stacked-bar.html) +See [stacked bar chart documentation](https://api.taucharts.com/basic/stacked-bar.html) ___ #### Horizontal stacked bar chart ```javascript -var chart = new tauCharts.Chart({ +var chart = new Taucharts.Chart({ type : 'horizontal-stacked-bar', y : 'process', x : 'count', @@ -152,15 +151,15 @@ var chart = new tauCharts.Chart({ data : [{process: 'sales', stage: 'visit', count: 100}, ...] }); ``` -[![Horizontal Stacked Bar Chart](examples/screenshots/Taucharts_Horizontal-stacked-bar.png)](http://api.taucharts.com/basic/horizontal-stacked-bar.html) +[![Horizontal Stacked Bar Chart](examples/screenshots/Taucharts_Horizontal-stacked-bar.png)](https://api.taucharts.com/basic/horizontal-stacked-bar.html) -See [horizontal stacked bar chart documentation](http://api.taucharts.com/basic/horizontal-stacked-bar.html) +See [horizontal stacked bar chart documentation](https://api.taucharts.com/basic/horizontal-stacked-bar.html) ___ #### Stacked area chart ```javascript -var chart = new tauCharts.Chart({ +var chart = new Taucharts.Chart({ type : 'stacked-area', y : 'effort', x : 'date', @@ -171,15 +170,15 @@ var chart = new tauCharts.Chart({ data : [{date: '2015-07-15', effort: 400, team: 'Alpha'}, ...] }); ``` -[![Horizontal Stacked Bar Chart](examples/screenshots/Taucharts_Stacked-area.png)](http://api.taucharts.com/basic/stacked-area.html) +[![Horizontal Stacked Bar Chart](examples/screenshots/Taucharts_Stacked-area.png)](https://api.taucharts.com/basic/stacked-area.html) -See [stacked area chart documentation](http://api.taucharts.com/basic/stacked-area.html) +See [stacked area chart documentation](https://api.taucharts.com/basic/stacked-area.html) ___ #### Facet chart ```javascript -var chart1 = new tauCharts.Chart({ +var chart1 = new Taucharts.Chart({ type : 'scatterplot', x : ['milespergallon'], y : ['class', 'price'], @@ -187,15 +186,15 @@ var chart1 = new tauCharts.Chart({ data : [{class: "C", milespergallon: 41.26, price: 24509.74, vehicle: "Prius1"}, ...] }); ``` -[![Facet scatterplot chart](examples/screenshots/Taucharts_Facet.png)](http://api.taucharts.com/basic/facet.html) +[![Facet scatterplot chart](examples/screenshots/Taucharts_Facet.png)](https://api.taucharts.com/basic/facet.html) -See [facet charts documentation](http://api.taucharts.com/basic/facet.html) +See [facet charts documentation](https://api.taucharts.com/basic/facet.html) ___ #### Data Streaming ```javascript -var chart1 = new tauCharts.Chart({ +var chart1 = new Taucharts.Chart({ type : 'line', x : 'x', y : 'y', @@ -212,9 +211,19 @@ See [streaming sample online](//jsfiddle.net/taucharts/qdn76nab/) ___ #### Complex Composable charts -[![Composable Chart](examples/screenshots/Taucharts_Composable.png)](http://jsfiddle.net/6LzefLo4/4/) +[![Composable Chart](examples/screenshots/Taucharts_Composable.png)](https://jsfiddle.net/6LzefLo4/4/) -See [composable chart sample online](http://jsfiddle.net/6LzefLo4/4/) +See [composable chart sample online](https://jsfiddle.net/6LzefLo4/4/) + +___ + +## Migrating from Taucharts v1 to v2 + +- D3 v4 is now dependency. +- `Taucharts` global object name (was `tauCharts`). +- `.tau-chart__` CSS class prefix (was`.graphical-report__`). +- `export-to` plugin alias changed (was `exportTo`). +- Distributive files paths changed. `dist/taucharts.min.js` and `dist/taucharts.min.css` contain the core and all the plugins minified together. `dist/taucharts.js` and `dist/taucharts.css` contain unfinified core, JS and CSS for plugins can be found in `dist/plugins/` folder (e.g. to import a plugin you should do something like `import tooltip from 'taucharts/dist/plugins/tooltip';`). ___ @@ -222,7 +231,7 @@ ___ Clone (forked) repository: ``` -git clone https://github.com/TargetProcess/tauCharts.git +git clone https://github.com/TargetProcess/taucharts.git ``` Initialize dependencies: @@ -232,12 +241,12 @@ npm install Run local webpack dev server (with hot reload): ``` -npm run devserver +npm start ``` Local server will be started on port 9000 and live taucharts assembly will be exposed by url: ``` -http://localhost:9000/tauCharts.js +http://localhost:9000/dist/taucharts.js ``` Now you can see some taucharts examples: @@ -254,26 +263,32 @@ To build a static assembly: ``` npm run build ``` -This command creates development and production assemblies in a *[./build]* folder. +This command creates development and production assemblies in a *[./dist]* folder. + +See the [Developer Guide](DEVELOPER-GUIDE.md) for more info. ## Taucharts examples / usage reviews -[R Wrapper](http://www.buildingwidgets.com/blog/2015/8/5/week-31-taucharts) +[R Wrapper](https://www.buildingwidgets.com/blog/2015/8/5/week-31-taucharts) -[SqlPad Project](http://rickbergfalk.github.io/sqlpad/chart-tutorials/) +[SqlPad Project](https://rickbergfalk.github.io/sqlpad/) [Targetprocess Graphical Reports](https://www.targetprocess.com/blog/2015/09/prototype-for-new-custom-graphical-reports-editor/) -[Vizydrop project](http://vizydrop.com/) +[Vizydrop project](https://vizydrop.com/) [Taucharts Twitter channel](https://twitter.com/search?q=taucharts) [Taucharts demo page](https://demo.taucharts.com/) -[GeoTremor mobile app](http://geotremor.tangentapps.com) +[GeoTremor mobile app](https://geotremor.tangentapps.com) + +[Dex](https://dexvis.net/) + +[Dex integration video](https://youtu.be/mxD4aQmC4sg) ## License -Licensing: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) +Licensing: [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) Have questions? [Contact us](mailto:michael@targetprocess.com) diff --git a/bower.json b/bower.json deleted file mode 100644 index 7617a9eac..000000000 --- a/bower.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "taucharts", - "version": "1.2.2", - "homepage": "https://github.com/TargetProcess/tauCharts", - "description": "D3 based data-focused charting library", - "keywords": [ - "d3", - "charts" - ], - "main": [ - "build/production/tauCharts.min.js", - "build/production/tauCharts.min.css" - ], - "license": "Apache License 2.0", - "private": false, - "ignore": [ - "/*", - "!build/**", - "!license.txt" - ], - "dependencies": { - "d3": "~3.5.17" - }, - "devDependencies": { - "modernizer": "2.8.2", - "canvg": "https://github.com/gabelerner/canvg.git#v1.4", - "FileSaver.js": "https://github.com/Mavrin/FileSaver.js.git", - "fetch": "~0.6.1", - "es6-promise": "~2.0.1" - } -} diff --git a/build/development/css/tauCharts.colorbrewer.dark.css b/build/development/css/tauCharts.colorbrewer.dark.css deleted file mode 100644 index 713b5c3d2..000000000 --- a/build/development/css/tauCharts.colorbrewer.dark.css +++ /dev/null @@ -1,8456 +0,0 @@ -/* This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). */ -/* - generate from addons color-brewer.js - copy(_.flatten(_.map(res, function(value, hue){ - return _.map(value, function(value, number) { - return _.map(value,function(value,index) { - return ['.', hue, '.', 'q', index, '-', number, '{fill:', value, ';stroke:', value, ';}'].join(''); - }) - }) -})).join('')) -*/ -.YlGn.q0-3 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q1-3 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q2-3 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q0-4 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-4 { - fill: #c2e699; - background: #c2e699; - stroke: #c2e699; -} -.YlGn.q2-4 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q3-4 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q0-5 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-5 { - fill: #c2e699; - background: #c2e699; - stroke: #c2e699; -} -.YlGn.q2-5 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q3-5 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q4-5 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q0-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-6 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q2-6 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q3-6 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q4-6 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q5-6 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q0-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-7 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q2-7 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q3-7 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q4-7 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q5-7 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q6-7 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.YlGn.q0-8 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlGn.q1-8 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q2-8 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q3-8 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q4-8 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q5-8 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q6-8 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q7-8 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.YlGn.q0-9 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlGn.q1-9 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q2-9 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q3-9 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q4-9 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q5-9 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q6-9 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q7-9 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q8-9 { - fill: #004529; - background: #004529; - stroke: #004529; -} -.YlGnBu.q0-3 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q1-3 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q2-3 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q0-4 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-4 { - fill: #a1dab4; - background: #a1dab4; - stroke: #a1dab4; -} -.YlGnBu.q2-4 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q3-4 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q0-5 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-5 { - fill: #a1dab4; - background: #a1dab4; - stroke: #a1dab4; -} -.YlGnBu.q2-5 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q3-5 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q4-5 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q0-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-6 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q2-6 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q3-6 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q4-6 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q5-6 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q0-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-7 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q2-7 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q3-7 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q4-7 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q5-7 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q6-7 { - fill: #0c2c84; - background: #0c2c84; - stroke: #0c2c84; -} -.YlGnBu.q0-8 { - fill: #ffffd9; - background: #ffffd9; - stroke: #ffffd9; -} -.YlGnBu.q1-8 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q2-8 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q3-8 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q4-8 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q5-8 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q6-8 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q7-8 { - fill: #0c2c84; - background: #0c2c84; - stroke: #0c2c84; -} -.YlGnBu.q0-9 { - fill: #ffffd9; - background: #ffffd9; - stroke: #ffffd9; -} -.YlGnBu.q1-9 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q2-9 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q3-9 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q4-9 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q5-9 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q6-9 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q7-9 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q8-9 { - fill: #081d58; - background: #081d58; - stroke: #081d58; -} -.GnBu.q0-3 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q1-3 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q2-3 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q0-4 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-4 { - fill: #bae4bc; - background: #bae4bc; - stroke: #bae4bc; -} -.GnBu.q2-4 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q3-4 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q0-5 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-5 { - fill: #bae4bc; - background: #bae4bc; - stroke: #bae4bc; -} -.GnBu.q2-5 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q3-5 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q4-5 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q0-6 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-6 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q2-6 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q3-6 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q4-6 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q5-6 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q0-7 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-7 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q2-7 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q3-7 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q4-7 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q5-7 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q6-7 { - fill: #08589e; - background: #08589e; - stroke: #08589e; -} -.GnBu.q0-8 { - fill: #f7fcf0; - background: #f7fcf0; - stroke: #f7fcf0; -} -.GnBu.q1-8 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q2-8 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q3-8 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q4-8 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q5-8 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q6-8 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q7-8 { - fill: #08589e; - background: #08589e; - stroke: #08589e; -} -.GnBu.q0-9 { - fill: #f7fcf0; - background: #f7fcf0; - stroke: #f7fcf0; -} -.GnBu.q1-9 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q2-9 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q3-9 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q4-9 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q5-9 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q6-9 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q7-9 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q8-9 { - fill: #084081; - background: #084081; - stroke: #084081; -} -.BuGn.q0-3 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q1-3 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q2-3 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q0-4 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-4 { - fill: #b2e2e2; - background: #b2e2e2; - stroke: #b2e2e2; -} -.BuGn.q2-4 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q3-4 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q0-5 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-5 { - fill: #b2e2e2; - background: #b2e2e2; - stroke: #b2e2e2; -} -.BuGn.q2-5 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q3-5 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q4-5 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q0-6 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-6 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q2-6 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q3-6 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q4-6 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q5-6 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q0-7 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-7 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q2-7 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q3-7 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q4-7 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q5-7 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q6-7 { - fill: #005824; - background: #005824; - stroke: #005824; -} -.BuGn.q0-8 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuGn.q1-8 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q2-8 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q3-8 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q4-8 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q5-8 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q6-8 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q7-8 { - fill: #005824; - background: #005824; - stroke: #005824; -} -.BuGn.q0-9 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuGn.q1-9 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q2-9 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q3-9 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q4-9 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q5-9 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q6-9 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q7-9 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q8-9 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PuBuGn.q0-3 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q1-3 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q2-3 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q0-4 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-4 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBuGn.q2-4 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q3-4 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q0-5 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-5 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBuGn.q2-5 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q3-5 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q4-5 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q0-6 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-6 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q2-6 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q3-6 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q4-6 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q5-6 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q0-7 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-7 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q2-7 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q3-7 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q4-7 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q5-7 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q6-7 { - fill: #016450; - background: #016450; - stroke: #016450; -} -.PuBuGn.q0-8 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBuGn.q1-8 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q2-8 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q3-8 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q4-8 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q5-8 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q6-8 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q7-8 { - fill: #016450; - background: #016450; - stroke: #016450; -} -.PuBuGn.q0-9 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBuGn.q1-9 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q2-9 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q3-9 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q4-9 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q5-9 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q6-9 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q7-9 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q8-9 { - fill: #014636; - background: #014636; - stroke: #014636; -} -.PuBu.q0-3 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q1-3 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q2-3 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q0-4 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-4 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBu.q2-4 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q3-4 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q0-5 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-5 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBu.q2-5 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q3-5 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q4-5 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q0-6 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-6 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q2-6 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q3-6 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q4-6 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q5-6 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q0-7 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-7 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q2-7 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q3-7 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q4-7 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q5-7 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q6-7 { - fill: #034e7b; - background: #034e7b; - stroke: #034e7b; -} -.PuBu.q0-8 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBu.q1-8 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q2-8 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q3-8 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q4-8 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q5-8 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q6-8 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q7-8 { - fill: #034e7b; - background: #034e7b; - stroke: #034e7b; -} -.PuBu.q0-9 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBu.q1-9 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q2-9 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q3-9 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q4-9 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q5-9 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q6-9 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q7-9 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q8-9 { - fill: #023858; - background: #023858; - stroke: #023858; -} -.BuPu.q0-3 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q1-3 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q2-3 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q0-4 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-4 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.BuPu.q2-4 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q3-4 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q0-5 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-5 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.BuPu.q2-5 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q3-5 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q4-5 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q0-6 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-6 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q2-6 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q3-6 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q4-6 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q5-6 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q0-7 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-7 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q2-7 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q3-7 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q4-7 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q5-7 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q6-7 { - fill: #6e016b; - background: #6e016b; - stroke: #6e016b; -} -.BuPu.q0-8 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuPu.q1-8 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q2-8 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q3-8 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q4-8 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q5-8 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q6-8 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q7-8 { - fill: #6e016b; - background: #6e016b; - stroke: #6e016b; -} -.BuPu.q0-9 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuPu.q1-9 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q2-9 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q3-9 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q4-9 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q5-9 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q6-9 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q7-9 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q8-9 { - fill: #4d004b; - background: #4d004b; - stroke: #4d004b; -} -.RdPu.q0-3 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q1-3 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q2-3 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q0-4 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-4 { - fill: #fbb4b9; - background: #fbb4b9; - stroke: #fbb4b9; -} -.RdPu.q2-4 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q3-4 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q0-5 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-5 { - fill: #fbb4b9; - background: #fbb4b9; - stroke: #fbb4b9; -} -.RdPu.q2-5 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q3-5 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q4-5 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-6 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-6 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q2-6 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q3-6 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q4-6 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q5-6 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-7 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-7 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q2-7 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q3-7 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q4-7 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q5-7 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q6-7 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-8 { - fill: #fff7f3; - background: #fff7f3; - stroke: #fff7f3; -} -.RdPu.q1-8 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q2-8 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q3-8 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q4-8 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q5-8 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q6-8 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q7-8 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-9 { - fill: #fff7f3; - background: #fff7f3; - stroke: #fff7f3; -} -.RdPu.q1-9 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q2-9 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q3-9 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q4-9 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q5-9 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q6-9 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q7-9 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q8-9 { - fill: #49006a; - background: #49006a; - stroke: #49006a; -} -.PuRd.q0-3 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q1-3 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q2-3 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q0-4 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-4 { - fill: #d7b5d8; - background: #d7b5d8; - stroke: #d7b5d8; -} -.PuRd.q2-4 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q3-4 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q0-5 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-5 { - fill: #d7b5d8; - background: #d7b5d8; - stroke: #d7b5d8; -} -.PuRd.q2-5 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q3-5 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q4-5 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q0-6 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-6 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q2-6 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q3-6 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q4-6 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q5-6 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q0-7 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-7 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q2-7 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q3-7 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q4-7 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q5-7 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q6-7 { - fill: #91003f; - background: #91003f; - stroke: #91003f; -} -.PuRd.q0-8 { - fill: #f7f4f9; - background: #f7f4f9; - stroke: #f7f4f9; -} -.PuRd.q1-8 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q2-8 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q3-8 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q4-8 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q5-8 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q6-8 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q7-8 { - fill: #91003f; - background: #91003f; - stroke: #91003f; -} -.PuRd.q0-9 { - fill: #f7f4f9; - background: #f7f4f9; - stroke: #f7f4f9; -} -.PuRd.q1-9 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q2-9 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q3-9 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q4-9 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q5-9 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q6-9 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q7-9 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q8-9 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.OrRd.q0-3 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q1-3 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q2-3 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q0-4 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-4 { - fill: #fdcc8a; - background: #fdcc8a; - stroke: #fdcc8a; -} -.OrRd.q2-4 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q3-4 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q0-5 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-5 { - fill: #fdcc8a; - background: #fdcc8a; - stroke: #fdcc8a; -} -.OrRd.q2-5 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q3-5 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q4-5 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q0-6 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-6 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q2-6 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q3-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q4-6 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q5-6 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q0-7 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-7 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q2-7 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q3-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q4-7 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q5-7 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q6-7 { - fill: #990000; - background: #990000; - stroke: #990000; -} -.OrRd.q0-8 { - fill: #fff7ec; - background: #fff7ec; - stroke: #fff7ec; -} -.OrRd.q1-8 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q2-8 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q3-8 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q4-8 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q5-8 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q6-8 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q7-8 { - fill: #990000; - background: #990000; - stroke: #990000; -} -.OrRd.q0-9 { - fill: #fff7ec; - background: #fff7ec; - stroke: #fff7ec; -} -.OrRd.q1-9 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q2-9 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q3-9 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q4-9 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q5-9 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q6-9 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q7-9 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q8-9 { - fill: #7f0000; - background: #7f0000; - stroke: #7f0000; -} -.YlOrRd.q0-3 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q1-3 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q2-3 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q0-4 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-4 { - fill: #fecc5c; - background: #fecc5c; - stroke: #fecc5c; -} -.YlOrRd.q2-4 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q3-4 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q0-5 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-5 { - fill: #fecc5c; - background: #fecc5c; - stroke: #fecc5c; -} -.YlOrRd.q2-5 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q3-5 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q4-5 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q0-6 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-6 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q2-6 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q3-6 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q4-6 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q5-6 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q0-7 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-7 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q2-7 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q3-7 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q4-7 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q5-7 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q6-7 { - fill: #b10026; - background: #b10026; - stroke: #b10026; -} -.YlOrRd.q0-8 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlOrRd.q1-8 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q2-8 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q3-8 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q4-8 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q5-8 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q6-8 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q7-8 { - fill: #b10026; - background: #b10026; - stroke: #b10026; -} -.YlOrRd.q0-9 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlOrRd.q1-9 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q2-9 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q3-9 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q4-9 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q5-9 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q6-9 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q7-9 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q8-9 { - fill: #800026; - background: #800026; - stroke: #800026; -} -.YlOrBr.q0-3 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q1-3 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q2-3 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q0-4 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-4 { - fill: #fed98e; - background: #fed98e; - stroke: #fed98e; -} -.YlOrBr.q2-4 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q3-4 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q0-5 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-5 { - fill: #fed98e; - background: #fed98e; - stroke: #fed98e; -} -.YlOrBr.q2-5 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q3-5 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q4-5 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q0-6 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-6 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q2-6 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q3-6 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q4-6 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q5-6 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q0-7 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-7 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q2-7 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q3-7 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q4-7 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q5-7 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q6-7 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.YlOrBr.q0-8 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlOrBr.q1-8 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q2-8 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q3-8 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q4-8 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q5-8 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q6-8 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q7-8 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.YlOrBr.q0-9 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlOrBr.q1-9 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q2-9 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q3-9 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q4-9 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q5-9 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q6-9 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q7-9 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q8-9 { - fill: #662506; - background: #662506; - stroke: #662506; -} -.Purples.q0-3 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q1-3 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q2-3 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q0-4 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-4 { - fill: #cbc9e2; - background: #cbc9e2; - stroke: #cbc9e2; -} -.Purples.q2-4 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q3-4 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q0-5 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-5 { - fill: #cbc9e2; - background: #cbc9e2; - stroke: #cbc9e2; -} -.Purples.q2-5 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q3-5 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q4-5 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q0-6 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-6 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q2-6 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q3-6 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q4-6 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q5-6 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q0-7 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-7 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q2-7 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q3-7 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q4-7 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q5-7 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q6-7 { - fill: #4a1486; - background: #4a1486; - stroke: #4a1486; -} -.Purples.q0-8 { - fill: #fcfbfd; - background: #fcfbfd; - stroke: #fcfbfd; -} -.Purples.q1-8 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q2-8 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q3-8 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q4-8 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q5-8 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q6-8 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q7-8 { - fill: #4a1486; - background: #4a1486; - stroke: #4a1486; -} -.Purples.q0-9 { - fill: #fcfbfd; - background: #fcfbfd; - stroke: #fcfbfd; -} -.Purples.q1-9 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q2-9 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q3-9 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q4-9 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q5-9 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q6-9 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q7-9 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q8-9 { - fill: #3f007d; - background: #3f007d; - stroke: #3f007d; -} -.Blues.q0-3 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q1-3 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q2-3 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q0-4 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-4 { - fill: #bdd7e7; - background: #bdd7e7; - stroke: #bdd7e7; -} -.Blues.q2-4 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q3-4 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q0-5 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-5 { - fill: #bdd7e7; - background: #bdd7e7; - stroke: #bdd7e7; -} -.Blues.q2-5 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q3-5 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q4-5 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q0-6 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-6 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q2-6 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q3-6 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q4-6 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q5-6 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q0-7 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-7 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q2-7 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q3-7 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q4-7 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q5-7 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q6-7 { - fill: #084594; - background: #084594; - stroke: #084594; -} -.Blues.q0-8 { - fill: #f7fbff; - background: #f7fbff; - stroke: #f7fbff; -} -.Blues.q1-8 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q2-8 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q3-8 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q4-8 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q5-8 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q6-8 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q7-8 { - fill: #084594; - background: #084594; - stroke: #084594; -} -.Blues.q0-9 { - fill: #f7fbff; - background: #f7fbff; - stroke: #f7fbff; -} -.Blues.q1-9 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q2-9 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q3-9 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q4-9 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q5-9 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q6-9 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q7-9 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q8-9 { - fill: #08306b; - background: #08306b; - stroke: #08306b; -} -.Greens.q0-3 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q1-3 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q2-3 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q0-4 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-4 { - fill: #bae4b3; - background: #bae4b3; - stroke: #bae4b3; -} -.Greens.q2-4 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q3-4 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q0-5 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-5 { - fill: #bae4b3; - background: #bae4b3; - stroke: #bae4b3; -} -.Greens.q2-5 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q3-5 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q4-5 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q0-6 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-6 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q2-6 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q3-6 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q4-6 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q5-6 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q0-7 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-7 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q2-7 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q3-7 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q4-7 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q5-7 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q6-7 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.Greens.q0-8 { - fill: #f7fcf5; - background: #f7fcf5; - stroke: #f7fcf5; -} -.Greens.q1-8 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q2-8 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q3-8 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q4-8 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q5-8 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q6-8 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q7-8 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.Greens.q0-9 { - fill: #f7fcf5; - background: #f7fcf5; - stroke: #f7fcf5; -} -.Greens.q1-9 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q2-9 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q3-9 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q4-9 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q5-9 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q6-9 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q7-9 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q8-9 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.Oranges.q0-3 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q1-3 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q2-3 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q0-4 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-4 { - fill: #fdbe85; - background: #fdbe85; - stroke: #fdbe85; -} -.Oranges.q2-4 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q3-4 { - fill: #d94701; - background: #d94701; - stroke: #d94701; -} -.Oranges.q0-5 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-5 { - fill: #fdbe85; - background: #fdbe85; - stroke: #fdbe85; -} -.Oranges.q2-5 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q3-5 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q4-5 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q0-6 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-6 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q2-6 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q3-6 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q4-6 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q5-6 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q0-7 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-7 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q2-7 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q3-7 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q4-7 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q5-7 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q6-7 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.Oranges.q0-8 { - fill: #fff5eb; - background: #fff5eb; - stroke: #fff5eb; -} -.Oranges.q1-8 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q2-8 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q3-8 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q4-8 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q5-8 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q6-8 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q7-8 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.Oranges.q0-9 { - fill: #fff5eb; - background: #fff5eb; - stroke: #fff5eb; -} -.Oranges.q1-9 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q2-9 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q3-9 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q4-9 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q5-9 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q6-9 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q7-9 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q8-9 { - fill: #7f2704; - background: #7f2704; - stroke: #7f2704; -} -.Reds.q0-3 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q1-3 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q2-3 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q0-4 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-4 { - fill: #fcae91; - background: #fcae91; - stroke: #fcae91; -} -.Reds.q2-4 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q3-4 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q0-5 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-5 { - fill: #fcae91; - background: #fcae91; - stroke: #fcae91; -} -.Reds.q2-5 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q3-5 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q4-5 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q0-6 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-6 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q2-6 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q3-6 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q4-6 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q5-6 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q0-7 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-7 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q2-7 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q3-7 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q4-7 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q5-7 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q6-7 { - fill: #99000d; - background: #99000d; - stroke: #99000d; -} -.Reds.q0-8 { - fill: #fff5f0; - background: #fff5f0; - stroke: #fff5f0; -} -.Reds.q1-8 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q2-8 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q3-8 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q4-8 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q5-8 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q6-8 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q7-8 { - fill: #99000d; - background: #99000d; - stroke: #99000d; -} -.Reds.q0-9 { - fill: #fff5f0; - background: #fff5f0; - stroke: #fff5f0; -} -.Reds.q1-9 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q2-9 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q3-9 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q4-9 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q5-9 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q6-9 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q7-9 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q8-9 { - fill: #67000d; - background: #67000d; - stroke: #67000d; -} -.Greys.q0-3 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q1-3 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q2-3 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q0-4 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-4 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Greys.q2-4 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q3-4 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q0-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-5 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Greys.q2-5 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q3-5 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q4-5 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-6 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-6 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q2-6 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q3-6 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q4-6 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q5-6 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-7 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q2-7 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q3-7 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q4-7 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q5-7 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q6-7 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-8 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.Greys.q1-8 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q2-8 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q3-8 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q4-8 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q5-8 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q6-8 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q7-8 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-9 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.Greys.q1-9 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q2-9 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q3-9 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q4-9 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q5-9 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q6-9 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q7-9 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q8-9 { - fill: #000000; - background: #000000; - stroke: #000000; -} -.PuOr.q0-3 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q2-3 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q0-4 { - fill: #e66101; - background: #e66101; - stroke: #e66101; -} -.PuOr.q1-4 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q2-4 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q3-4 { - fill: #5e3c99; - background: #5e3c99; - stroke: #5e3c99; -} -.PuOr.q0-5 { - fill: #e66101; - background: #e66101; - stroke: #e66101; -} -.PuOr.q1-5 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q3-5 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q4-5 { - fill: #5e3c99; - background: #5e3c99; - stroke: #5e3c99; -} -.PuOr.q0-6 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-6 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q2-6 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q3-6 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q4-6 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q5-6 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-7 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-7 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q2-7 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q4-7 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q5-7 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q6-7 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-8 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-8 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q2-8 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q3-8 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q4-8 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q5-8 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q6-8 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q7-8 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-9 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-9 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q2-9 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q3-9 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q5-9 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q6-9 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q7-9 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q8-9 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-10 { - fill: #7f3b08; - background: #7f3b08; - stroke: #7f3b08; -} -.PuOr.q1-10 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q2-10 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q3-10 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q4-10 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q5-10 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q6-10 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q7-10 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q8-10 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q9-10 { - fill: #2d004b; - background: #2d004b; - stroke: #2d004b; -} -.PuOr.q0-11 { - fill: #7f3b08; - background: #7f3b08; - stroke: #7f3b08; -} -.PuOr.q1-11 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q2-11 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q3-11 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q4-11 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q6-11 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q7-11 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q8-11 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q9-11 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q10-11 { - fill: #2d004b; - background: #2d004b; - stroke: #2d004b; -} -.BrBG.q0-3 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q1-3 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q2-3 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q0-4 { - fill: #a6611a; - background: #a6611a; - stroke: #a6611a; -} -.BrBG.q1-4 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q2-4 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q3-4 { - fill: #018571; - background: #018571; - stroke: #018571; -} -.BrBG.q0-5 { - fill: #a6611a; - background: #a6611a; - stroke: #a6611a; -} -.BrBG.q1-5 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q2-5 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q3-5 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q4-5 { - fill: #018571; - background: #018571; - stroke: #018571; -} -.BrBG.q0-6 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-6 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q2-6 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q3-6 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q4-6 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q5-6 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-7 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-7 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q2-7 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q3-7 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q4-7 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q5-7 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q6-7 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-8 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-8 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q2-8 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q3-8 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q4-8 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q5-8 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q6-8 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q7-8 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-9 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-9 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q2-9 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q3-9 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q4-9 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q5-9 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q6-9 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q7-9 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q8-9 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-10 { - fill: #543005; - background: #543005; - stroke: #543005; -} -.BrBG.q1-10 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q2-10 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q3-10 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q4-10 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q5-10 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q6-10 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q7-10 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q8-10 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q9-10 { - fill: #003c30; - background: #003c30; - stroke: #003c30; -} -.BrBG.q0-11 { - fill: #543005; - background: #543005; - stroke: #543005; -} -.BrBG.q1-11 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q2-11 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q3-11 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q4-11 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q5-11 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q6-11 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q7-11 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q8-11 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q9-11 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q10-11 { - fill: #003c30; - background: #003c30; - stroke: #003c30; -} -.PRGn.q0-3 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q2-3 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q0-4 { - fill: #7b3294; - background: #7b3294; - stroke: #7b3294; -} -.PRGn.q1-4 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q2-4 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q3-4 { - fill: #008837; - background: #008837; - stroke: #008837; -} -.PRGn.q0-5 { - fill: #7b3294; - background: #7b3294; - stroke: #7b3294; -} -.PRGn.q1-5 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q3-5 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q4-5 { - fill: #008837; - background: #008837; - stroke: #008837; -} -.PRGn.q0-6 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-6 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q2-6 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q3-6 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q4-6 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q5-6 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-7 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-7 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q2-7 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q4-7 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q5-7 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q6-7 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-8 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-8 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q2-8 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q3-8 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q4-8 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q5-8 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q6-8 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q7-8 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-9 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-9 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q2-9 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q3-9 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q5-9 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q6-9 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q7-9 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q8-9 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-10 { - fill: #40004b; - background: #40004b; - stroke: #40004b; -} -.PRGn.q1-10 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q2-10 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q3-10 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q4-10 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q5-10 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q6-10 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q7-10 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q8-10 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q9-10 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PRGn.q0-11 { - fill: #40004b; - background: #40004b; - stroke: #40004b; -} -.PRGn.q1-11 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q2-11 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q3-11 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q4-11 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q6-11 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q7-11 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q8-11 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q9-11 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q10-11 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PiYG.q0-3 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q2-3 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q0-4 { - fill: #d01c8b; - background: #d01c8b; - stroke: #d01c8b; -} -.PiYG.q1-4 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q2-4 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q3-4 { - fill: #4dac26; - background: #4dac26; - stroke: #4dac26; -} -.PiYG.q0-5 { - fill: #d01c8b; - background: #d01c8b; - stroke: #d01c8b; -} -.PiYG.q1-5 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q3-5 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q4-5 { - fill: #4dac26; - background: #4dac26; - stroke: #4dac26; -} -.PiYG.q0-6 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-6 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q2-6 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q3-6 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q4-6 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q5-6 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-7 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-7 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q2-7 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q4-7 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q5-7 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q6-7 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-8 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-8 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q2-8 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q3-8 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q4-8 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q5-8 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q6-8 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q7-8 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-9 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-9 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q2-9 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q3-9 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q5-9 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q6-9 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q7-9 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q8-9 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-10 { - fill: #8e0152; - background: #8e0152; - stroke: #8e0152; -} -.PiYG.q1-10 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q2-10 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q3-10 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q4-10 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q5-10 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q6-10 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q7-10 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q8-10 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q9-10 { - fill: #276419; - background: #276419; - stroke: #276419; -} -.PiYG.q0-11 { - fill: #8e0152; - background: #8e0152; - stroke: #8e0152; -} -.PiYG.q1-11 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q2-11 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q3-11 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q4-11 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q6-11 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q7-11 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q8-11 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q9-11 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q10-11 { - fill: #276419; - background: #276419; - stroke: #276419; -} -.RdBu.q0-3 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q2-3 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q0-4 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdBu.q1-4 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q2-4 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q3-4 { - fill: #0571b0; - background: #0571b0; - stroke: #0571b0; -} -.RdBu.q0-5 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdBu.q1-5 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q3-5 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q4-5 { - fill: #0571b0; - background: #0571b0; - stroke: #0571b0; -} -.RdBu.q0-6 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-6 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q2-6 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q3-6 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q4-6 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q5-6 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-7 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-7 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q2-7 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q4-7 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q5-7 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q6-7 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-8 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-8 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q2-8 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q3-8 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q4-8 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q5-8 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q6-8 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q7-8 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-9 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-9 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q2-9 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q3-9 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q5-9 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q6-9 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q7-9 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q8-9 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-10 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdBu.q1-10 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q2-10 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q3-10 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q4-10 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q5-10 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q6-10 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q7-10 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q8-10 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q9-10 { - fill: #053061; - background: #053061; - stroke: #053061; -} -.RdBu.q0-11 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdBu.q1-11 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q2-11 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q3-11 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q4-11 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q6-11 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q7-11 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q8-11 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q9-11 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q10-11 { - fill: #053061; - background: #053061; - stroke: #053061; -} -.RdGy.q0-3 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q1-3 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q2-3 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q0-4 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdGy.q1-4 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q2-4 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q3-4 { - fill: #404040; - background: #404040; - stroke: #404040; -} -.RdGy.q0-5 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdGy.q1-5 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q2-5 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q3-5 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q4-5 { - fill: #404040; - background: #404040; - stroke: #404040; -} -.RdGy.q0-6 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-6 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q2-6 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q3-6 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q4-6 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q5-6 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-7 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-7 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q2-7 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q3-7 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q4-7 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q5-7 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q6-7 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-8 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-8 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q2-8 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q3-8 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q4-8 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q5-8 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q6-8 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q7-8 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-9 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-9 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q2-9 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q3-9 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q4-9 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q5-9 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q6-9 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q7-9 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q8-9 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-10 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdGy.q1-10 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q2-10 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q3-10 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q4-10 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q5-10 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q6-10 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q7-10 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q8-10 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q9-10 { - fill: #1a1a1a; - background: #1a1a1a; - stroke: #1a1a1a; -} -.RdGy.q0-11 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdGy.q1-11 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q2-11 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q3-11 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q4-11 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q5-11 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q6-11 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q7-11 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q8-11 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q9-11 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q10-11 { - fill: #1a1a1a; - background: #1a1a1a; - stroke: #1a1a1a; -} -.RdYlBu.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q2-3 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlBu.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q2-4 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q3-4 { - fill: #2c7bb6; - background: #2c7bb6; - stroke: #2c7bb6; -} -.RdYlBu.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlBu.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q3-5 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q4-5 { - fill: #2c7bb6; - background: #2c7bb6; - stroke: #2c7bb6; -} -.RdYlBu.q0-6 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q2-6 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q3-6 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q4-6 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q5-6 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-7 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q2-7 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q4-7 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q5-7 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q6-7 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-8 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q3-8 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q4-8 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q5-8 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q6-8 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q7-8 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-9 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q3-9 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q5-9 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q6-9 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q7-9 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q8-9 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-10 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlBu.q1-10 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q4-10 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q5-10 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q6-10 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q7-10 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q8-10 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q9-10 { - fill: #313695; - background: #313695; - stroke: #313695; -} -.RdYlBu.q0-11 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlBu.q1-11 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q4-11 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q6-11 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q7-11 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q8-11 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q9-11 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q10-11 { - fill: #313695; - background: #313695; - stroke: #313695; -} -.Spectral.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q2-3 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.Spectral.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q2-4 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q3-4 { - fill: #2b83ba; - background: #2b83ba; - stroke: #2b83ba; -} -.Spectral.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.Spectral.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q3-5 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q4-5 { - fill: #2b83ba; - background: #2b83ba; - stroke: #2b83ba; -} -.Spectral.q0-6 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q2-6 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q3-6 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q4-6 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q5-6 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-7 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q2-7 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q4-7 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q5-7 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q6-7 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-8 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q3-8 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q4-8 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q5-8 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q6-8 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q7-8 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-9 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q3-9 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q5-9 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q6-9 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q7-9 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q8-9 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-10 { - fill: #9e0142; - background: #9e0142; - stroke: #9e0142; -} -.Spectral.q1-10 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q4-10 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q5-10 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q6-10 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q7-10 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q8-10 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q9-10 { - fill: #5e4fa2; - background: #5e4fa2; - stroke: #5e4fa2; -} -.Spectral.q0-11 { - fill: #9e0142; - background: #9e0142; - stroke: #9e0142; -} -.Spectral.q1-11 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q4-11 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q6-11 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q7-11 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q8-11 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q9-11 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q10-11 { - fill: #5e4fa2; - background: #5e4fa2; - stroke: #5e4fa2; -} -.RdYlGn.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q2-3 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlGn.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q2-4 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q3-4 { - fill: #1a9641; - background: #1a9641; - stroke: #1a9641; -} -.RdYlGn.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlGn.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q3-5 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q4-5 { - fill: #1a9641; - background: #1a9641; - stroke: #1a9641; -} -.RdYlGn.q0-6 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q2-6 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q3-6 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q4-6 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q5-6 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-7 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q2-7 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q4-7 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q5-7 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q6-7 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-8 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q3-8 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q4-8 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q5-8 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q6-8 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q7-8 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-9 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q3-9 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q5-9 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q6-9 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q7-9 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q8-9 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-10 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlGn.q1-10 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q4-10 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q5-10 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q6-10 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q7-10 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q8-10 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q9-10 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.RdYlGn.q0-11 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlGn.q1-11 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q4-11 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q6-11 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q7-11 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q8-11 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q9-11 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q10-11 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.Accent.q0-3 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-3 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-3 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q0-4 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-4 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-4 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-4 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q0-5 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-5 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-5 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-5 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-5 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q0-6 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-6 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-6 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-6 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-6 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-6 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q0-7 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-7 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-7 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-7 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-7 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-7 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q6-7 { - fill: #bf5b17; - background: #bf5b17; - stroke: #bf5b17; -} -.Accent.q0-8 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-8 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-8 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-8 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-8 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-8 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q6-8 { - fill: #bf5b17; - background: #bf5b17; - stroke: #bf5b17; -} -.Accent.q7-8 { - fill: #666666; - background: #666666; - stroke: #666666; -} -.Dark2.q0-3 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-3 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-3 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q0-4 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-4 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-4 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-4 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q0-5 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-5 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-5 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-5 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-5 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q0-6 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-6 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-6 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-6 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-6 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-6 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q0-7 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-7 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-7 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-7 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-7 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-7 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q6-7 { - fill: #a6761d; - background: #a6761d; - stroke: #a6761d; -} -.Dark2.q0-8 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-8 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-8 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-8 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-8 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-8 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q6-8 { - fill: #a6761d; - background: #a6761d; - stroke: #a6761d; -} -.Dark2.q7-8 { - fill: #666666; - background: #666666; - stroke: #666666; -} -.Paired.q0-3 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-3 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-3 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q0-4 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-4 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-4 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-4 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q0-5 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-5 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-5 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-5 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-5 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q0-6 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-6 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-6 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-6 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-6 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-6 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q0-7 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-7 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-7 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-7 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-7 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-7 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-7 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q0-8 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-8 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-8 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-8 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-8 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-8 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-8 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-8 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q0-9 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-9 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-9 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-9 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-9 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-9 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-9 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-9 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-9 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q0-10 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-10 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-10 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-10 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-10 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-10 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-10 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-10 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-10 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-10 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q0-11 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-11 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-11 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-11 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-11 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-11 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-11 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-11 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-11 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-11 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q10-11 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Paired.q0-12 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-12 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-12 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-12 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-12 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-12 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-12 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-12 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-12 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-12 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q10-12 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Paired.q11-12 { - fill: #b15928; - background: #b15928; - stroke: #b15928; -} -.Pastel1.q0-3 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-3 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-3 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q0-4 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-4 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-4 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-4 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q0-5 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-5 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-5 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-5 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-5 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q0-6 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-6 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-6 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-6 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-6 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q0-7 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-7 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-7 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-7 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-7 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-7 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q0-8 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-8 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-8 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-8 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-8 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-8 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-8 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q7-8 { - fill: #fddaec; - background: #fddaec; - stroke: #fddaec; -} -.Pastel1.q0-9 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-9 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-9 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-9 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-9 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-9 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-9 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q7-9 { - fill: #fddaec; - background: #fddaec; - stroke: #fddaec; -} -.Pastel1.q8-9 { - fill: #f2f2f2; - background: #f2f2f2; - stroke: #f2f2f2; -} -.Pastel2.q0-3 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-3 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-3 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q0-4 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-4 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-4 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-4 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q0-5 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-5 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-5 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-5 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-5 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q0-6 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-6 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-6 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-6 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-6 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-6 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q0-7 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-7 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-7 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-7 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-7 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-7 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q6-7 { - fill: #f1e2cc; - background: #f1e2cc; - stroke: #f1e2cc; -} -.Pastel2.q0-8 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-8 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-8 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-8 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-8 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-8 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q6-8 { - fill: #f1e2cc; - background: #f1e2cc; - stroke: #f1e2cc; -} -.Pastel2.q7-8 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Set1.q0-3 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-3 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-3 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q0-4 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-4 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-4 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-4 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q0-5 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-5 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-5 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-5 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-5 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q0-6 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-6 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-6 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-6 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-6 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-6 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q0-7 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-7 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-7 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-7 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-7 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-7 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-7 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q0-8 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-8 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-8 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-8 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-8 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-8 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-8 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q7-8 { - fill: #f781bf; - background: #f781bf; - stroke: #f781bf; -} -.Set1.q0-9 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-9 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-9 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-9 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-9 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-9 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-9 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q7-9 { - fill: #f781bf; - background: #f781bf; - stroke: #f781bf; -} -.Set1.q8-9 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.Set2.q0-3 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-3 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-3 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q0-4 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-4 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-4 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-4 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q0-5 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-5 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-5 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-5 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-5 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q0-6 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-6 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-6 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-6 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-6 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-6 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q0-7 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-7 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-7 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-7 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-7 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-7 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q6-7 { - fill: #e5c494; - background: #e5c494; - stroke: #e5c494; -} -.Set2.q0-8 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-8 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-8 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-8 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-8 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-8 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q6-8 { - fill: #e5c494; - background: #e5c494; - stroke: #e5c494; -} -.Set2.q7-8 { - fill: #b3b3b3; - background: #b3b3b3; - stroke: #b3b3b3; -} -.Set3.q0-3 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-3 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-3 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q0-4 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-4 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-4 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-4 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q0-5 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-5 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-5 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-5 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-5 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q0-6 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-6 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-6 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-6 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-6 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-6 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q0-7 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-7 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-7 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-7 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-7 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-7 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-7 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q0-8 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-8 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-8 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-8 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-8 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-8 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-8 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-8 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q0-9 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-9 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-9 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-9 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-9 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-9 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-9 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-9 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-9 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q0-10 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-10 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-10 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-10 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-10 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-10 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-10 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-10 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-10 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-10 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q0-11 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-11 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-11 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-11 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-11 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-11 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-11 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-11 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-11 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-11 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q10-11 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Set3.q0-12 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-12 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-12 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-12 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-12 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-12 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-12 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-12 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-12 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-12 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q10-12 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Set3.q11-12 { - fill: #ffed6f; - background: #ffed6f; - stroke: #ffed6f; -} diff --git a/build/development/css/tauCharts.colorbrewer.default.css b/build/development/css/tauCharts.colorbrewer.default.css deleted file mode 100644 index 713b5c3d2..000000000 --- a/build/development/css/tauCharts.colorbrewer.default.css +++ /dev/null @@ -1,8456 +0,0 @@ -/* This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). */ -/* - generate from addons color-brewer.js - copy(_.flatten(_.map(res, function(value, hue){ - return _.map(value, function(value, number) { - return _.map(value,function(value,index) { - return ['.', hue, '.', 'q', index, '-', number, '{fill:', value, ';stroke:', value, ';}'].join(''); - }) - }) -})).join('')) -*/ -.YlGn.q0-3 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q1-3 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q2-3 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q0-4 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-4 { - fill: #c2e699; - background: #c2e699; - stroke: #c2e699; -} -.YlGn.q2-4 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q3-4 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q0-5 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-5 { - fill: #c2e699; - background: #c2e699; - stroke: #c2e699; -} -.YlGn.q2-5 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q3-5 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q4-5 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q0-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-6 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q2-6 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q3-6 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q4-6 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.YlGn.q5-6 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q0-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGn.q1-7 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q2-7 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q3-7 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q4-7 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q5-7 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q6-7 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.YlGn.q0-8 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlGn.q1-8 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q2-8 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q3-8 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q4-8 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q5-8 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q6-8 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q7-8 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.YlGn.q0-9 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlGn.q1-9 { - fill: #f7fcb9; - background: #f7fcb9; - stroke: #f7fcb9; -} -.YlGn.q2-9 { - fill: #d9f0a3; - background: #d9f0a3; - stroke: #d9f0a3; -} -.YlGn.q3-9 { - fill: #addd8e; - background: #addd8e; - stroke: #addd8e; -} -.YlGn.q4-9 { - fill: #78c679; - background: #78c679; - stroke: #78c679; -} -.YlGn.q5-9 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.YlGn.q6-9 { - fill: #238443; - background: #238443; - stroke: #238443; -} -.YlGn.q7-9 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.YlGn.q8-9 { - fill: #004529; - background: #004529; - stroke: #004529; -} -.YlGnBu.q0-3 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q1-3 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q2-3 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q0-4 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-4 { - fill: #a1dab4; - background: #a1dab4; - stroke: #a1dab4; -} -.YlGnBu.q2-4 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q3-4 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q0-5 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-5 { - fill: #a1dab4; - background: #a1dab4; - stroke: #a1dab4; -} -.YlGnBu.q2-5 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q3-5 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q4-5 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q0-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-6 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q2-6 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q3-6 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q4-6 { - fill: #2c7fb8; - background: #2c7fb8; - stroke: #2c7fb8; -} -.YlGnBu.q5-6 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q0-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlGnBu.q1-7 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q2-7 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q3-7 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q4-7 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q5-7 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q6-7 { - fill: #0c2c84; - background: #0c2c84; - stroke: #0c2c84; -} -.YlGnBu.q0-8 { - fill: #ffffd9; - background: #ffffd9; - stroke: #ffffd9; -} -.YlGnBu.q1-8 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q2-8 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q3-8 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q4-8 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q5-8 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q6-8 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q7-8 { - fill: #0c2c84; - background: #0c2c84; - stroke: #0c2c84; -} -.YlGnBu.q0-9 { - fill: #ffffd9; - background: #ffffd9; - stroke: #ffffd9; -} -.YlGnBu.q1-9 { - fill: #edf8b1; - background: #edf8b1; - stroke: #edf8b1; -} -.YlGnBu.q2-9 { - fill: #c7e9b4; - background: #c7e9b4; - stroke: #c7e9b4; -} -.YlGnBu.q3-9 { - fill: #7fcdbb; - background: #7fcdbb; - stroke: #7fcdbb; -} -.YlGnBu.q4-9 { - fill: #41b6c4; - background: #41b6c4; - stroke: #41b6c4; -} -.YlGnBu.q5-9 { - fill: #1d91c0; - background: #1d91c0; - stroke: #1d91c0; -} -.YlGnBu.q6-9 { - fill: #225ea8; - background: #225ea8; - stroke: #225ea8; -} -.YlGnBu.q7-9 { - fill: #253494; - background: #253494; - stroke: #253494; -} -.YlGnBu.q8-9 { - fill: #081d58; - background: #081d58; - stroke: #081d58; -} -.GnBu.q0-3 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q1-3 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q2-3 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q0-4 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-4 { - fill: #bae4bc; - background: #bae4bc; - stroke: #bae4bc; -} -.GnBu.q2-4 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q3-4 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q0-5 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-5 { - fill: #bae4bc; - background: #bae4bc; - stroke: #bae4bc; -} -.GnBu.q2-5 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q3-5 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q4-5 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q0-6 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-6 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q2-6 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q3-6 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q4-6 { - fill: #43a2ca; - background: #43a2ca; - stroke: #43a2ca; -} -.GnBu.q5-6 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q0-7 { - fill: #f0f9e8; - background: #f0f9e8; - stroke: #f0f9e8; -} -.GnBu.q1-7 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q2-7 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q3-7 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q4-7 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q5-7 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q6-7 { - fill: #08589e; - background: #08589e; - stroke: #08589e; -} -.GnBu.q0-8 { - fill: #f7fcf0; - background: #f7fcf0; - stroke: #f7fcf0; -} -.GnBu.q1-8 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q2-8 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q3-8 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q4-8 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q5-8 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q6-8 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q7-8 { - fill: #08589e; - background: #08589e; - stroke: #08589e; -} -.GnBu.q0-9 { - fill: #f7fcf0; - background: #f7fcf0; - stroke: #f7fcf0; -} -.GnBu.q1-9 { - fill: #e0f3db; - background: #e0f3db; - stroke: #e0f3db; -} -.GnBu.q2-9 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.GnBu.q3-9 { - fill: #a8ddb5; - background: #a8ddb5; - stroke: #a8ddb5; -} -.GnBu.q4-9 { - fill: #7bccc4; - background: #7bccc4; - stroke: #7bccc4; -} -.GnBu.q5-9 { - fill: #4eb3d3; - background: #4eb3d3; - stroke: #4eb3d3; -} -.GnBu.q6-9 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.GnBu.q7-9 { - fill: #0868ac; - background: #0868ac; - stroke: #0868ac; -} -.GnBu.q8-9 { - fill: #084081; - background: #084081; - stroke: #084081; -} -.BuGn.q0-3 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q1-3 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q2-3 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q0-4 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-4 { - fill: #b2e2e2; - background: #b2e2e2; - stroke: #b2e2e2; -} -.BuGn.q2-4 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q3-4 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q0-5 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-5 { - fill: #b2e2e2; - background: #b2e2e2; - stroke: #b2e2e2; -} -.BuGn.q2-5 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q3-5 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q4-5 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q0-6 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-6 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q2-6 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q3-6 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q4-6 { - fill: #2ca25f; - background: #2ca25f; - stroke: #2ca25f; -} -.BuGn.q5-6 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q0-7 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuGn.q1-7 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q2-7 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q3-7 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q4-7 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q5-7 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q6-7 { - fill: #005824; - background: #005824; - stroke: #005824; -} -.BuGn.q0-8 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuGn.q1-8 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q2-8 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q3-8 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q4-8 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q5-8 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q6-8 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q7-8 { - fill: #005824; - background: #005824; - stroke: #005824; -} -.BuGn.q0-9 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuGn.q1-9 { - fill: #e5f5f9; - background: #e5f5f9; - stroke: #e5f5f9; -} -.BuGn.q2-9 { - fill: #ccece6; - background: #ccece6; - stroke: #ccece6; -} -.BuGn.q3-9 { - fill: #99d8c9; - background: #99d8c9; - stroke: #99d8c9; -} -.BuGn.q4-9 { - fill: #66c2a4; - background: #66c2a4; - stroke: #66c2a4; -} -.BuGn.q5-9 { - fill: #41ae76; - background: #41ae76; - stroke: #41ae76; -} -.BuGn.q6-9 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.BuGn.q7-9 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.BuGn.q8-9 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PuBuGn.q0-3 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q1-3 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q2-3 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q0-4 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-4 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBuGn.q2-4 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q3-4 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q0-5 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-5 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBuGn.q2-5 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q3-5 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q4-5 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q0-6 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-6 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q2-6 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q3-6 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q4-6 { - fill: #1c9099; - background: #1c9099; - stroke: #1c9099; -} -.PuBuGn.q5-6 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q0-7 { - fill: #f6eff7; - background: #f6eff7; - stroke: #f6eff7; -} -.PuBuGn.q1-7 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q2-7 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q3-7 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q4-7 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q5-7 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q6-7 { - fill: #016450; - background: #016450; - stroke: #016450; -} -.PuBuGn.q0-8 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBuGn.q1-8 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q2-8 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q3-8 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q4-8 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q5-8 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q6-8 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q7-8 { - fill: #016450; - background: #016450; - stroke: #016450; -} -.PuBuGn.q0-9 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBuGn.q1-9 { - fill: #ece2f0; - background: #ece2f0; - stroke: #ece2f0; -} -.PuBuGn.q2-9 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBuGn.q3-9 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBuGn.q4-9 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.PuBuGn.q5-9 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBuGn.q6-9 { - fill: #02818a; - background: #02818a; - stroke: #02818a; -} -.PuBuGn.q7-9 { - fill: #016c59; - background: #016c59; - stroke: #016c59; -} -.PuBuGn.q8-9 { - fill: #014636; - background: #014636; - stroke: #014636; -} -.PuBu.q0-3 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q1-3 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q2-3 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q0-4 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-4 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBu.q2-4 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q3-4 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q0-5 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-5 { - fill: #bdc9e1; - background: #bdc9e1; - stroke: #bdc9e1; -} -.PuBu.q2-5 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q3-5 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q4-5 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q0-6 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-6 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q2-6 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q3-6 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q4-6 { - fill: #2b8cbe; - background: #2b8cbe; - stroke: #2b8cbe; -} -.PuBu.q5-6 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q0-7 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuBu.q1-7 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q2-7 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q3-7 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q4-7 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q5-7 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q6-7 { - fill: #034e7b; - background: #034e7b; - stroke: #034e7b; -} -.PuBu.q0-8 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBu.q1-8 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q2-8 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q3-8 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q4-8 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q5-8 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q6-8 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q7-8 { - fill: #034e7b; - background: #034e7b; - stroke: #034e7b; -} -.PuBu.q0-9 { - fill: #fff7fb; - background: #fff7fb; - stroke: #fff7fb; -} -.PuBu.q1-9 { - fill: #ece7f2; - background: #ece7f2; - stroke: #ece7f2; -} -.PuBu.q2-9 { - fill: #d0d1e6; - background: #d0d1e6; - stroke: #d0d1e6; -} -.PuBu.q3-9 { - fill: #a6bddb; - background: #a6bddb; - stroke: #a6bddb; -} -.PuBu.q4-9 { - fill: #74a9cf; - background: #74a9cf; - stroke: #74a9cf; -} -.PuBu.q5-9 { - fill: #3690c0; - background: #3690c0; - stroke: #3690c0; -} -.PuBu.q6-9 { - fill: #0570b0; - background: #0570b0; - stroke: #0570b0; -} -.PuBu.q7-9 { - fill: #045a8d; - background: #045a8d; - stroke: #045a8d; -} -.PuBu.q8-9 { - fill: #023858; - background: #023858; - stroke: #023858; -} -.BuPu.q0-3 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q1-3 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q2-3 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q0-4 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-4 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.BuPu.q2-4 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q3-4 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q0-5 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-5 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.BuPu.q2-5 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q3-5 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q4-5 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q0-6 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-6 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q2-6 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q3-6 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q4-6 { - fill: #8856a7; - background: #8856a7; - stroke: #8856a7; -} -.BuPu.q5-6 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q0-7 { - fill: #edf8fb; - background: #edf8fb; - stroke: #edf8fb; -} -.BuPu.q1-7 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q2-7 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q3-7 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q4-7 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q5-7 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q6-7 { - fill: #6e016b; - background: #6e016b; - stroke: #6e016b; -} -.BuPu.q0-8 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuPu.q1-8 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q2-8 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q3-8 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q4-8 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q5-8 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q6-8 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q7-8 { - fill: #6e016b; - background: #6e016b; - stroke: #6e016b; -} -.BuPu.q0-9 { - fill: #f7fcfd; - background: #f7fcfd; - stroke: #f7fcfd; -} -.BuPu.q1-9 { - fill: #e0ecf4; - background: #e0ecf4; - stroke: #e0ecf4; -} -.BuPu.q2-9 { - fill: #bfd3e6; - background: #bfd3e6; - stroke: #bfd3e6; -} -.BuPu.q3-9 { - fill: #9ebcda; - background: #9ebcda; - stroke: #9ebcda; -} -.BuPu.q4-9 { - fill: #8c96c6; - background: #8c96c6; - stroke: #8c96c6; -} -.BuPu.q5-9 { - fill: #8c6bb1; - background: #8c6bb1; - stroke: #8c6bb1; -} -.BuPu.q6-9 { - fill: #88419d; - background: #88419d; - stroke: #88419d; -} -.BuPu.q7-9 { - fill: #810f7c; - background: #810f7c; - stroke: #810f7c; -} -.BuPu.q8-9 { - fill: #4d004b; - background: #4d004b; - stroke: #4d004b; -} -.RdPu.q0-3 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q1-3 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q2-3 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q0-4 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-4 { - fill: #fbb4b9; - background: #fbb4b9; - stroke: #fbb4b9; -} -.RdPu.q2-4 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q3-4 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q0-5 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-5 { - fill: #fbb4b9; - background: #fbb4b9; - stroke: #fbb4b9; -} -.RdPu.q2-5 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q3-5 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q4-5 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-6 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-6 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q2-6 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q3-6 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q4-6 { - fill: #c51b8a; - background: #c51b8a; - stroke: #c51b8a; -} -.RdPu.q5-6 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-7 { - fill: #feebe2; - background: #feebe2; - stroke: #feebe2; -} -.RdPu.q1-7 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q2-7 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q3-7 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q4-7 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q5-7 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q6-7 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-8 { - fill: #fff7f3; - background: #fff7f3; - stroke: #fff7f3; -} -.RdPu.q1-8 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q2-8 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q3-8 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q4-8 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q5-8 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q6-8 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q7-8 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q0-9 { - fill: #fff7f3; - background: #fff7f3; - stroke: #fff7f3; -} -.RdPu.q1-9 { - fill: #fde0dd; - background: #fde0dd; - stroke: #fde0dd; -} -.RdPu.q2-9 { - fill: #fcc5c0; - background: #fcc5c0; - stroke: #fcc5c0; -} -.RdPu.q3-9 { - fill: #fa9fb5; - background: #fa9fb5; - stroke: #fa9fb5; -} -.RdPu.q4-9 { - fill: #f768a1; - background: #f768a1; - stroke: #f768a1; -} -.RdPu.q5-9 { - fill: #dd3497; - background: #dd3497; - stroke: #dd3497; -} -.RdPu.q6-9 { - fill: #ae017e; - background: #ae017e; - stroke: #ae017e; -} -.RdPu.q7-9 { - fill: #7a0177; - background: #7a0177; - stroke: #7a0177; -} -.RdPu.q8-9 { - fill: #49006a; - background: #49006a; - stroke: #49006a; -} -.PuRd.q0-3 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q1-3 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q2-3 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q0-4 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-4 { - fill: #d7b5d8; - background: #d7b5d8; - stroke: #d7b5d8; -} -.PuRd.q2-4 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q3-4 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q0-5 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-5 { - fill: #d7b5d8; - background: #d7b5d8; - stroke: #d7b5d8; -} -.PuRd.q2-5 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q3-5 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q4-5 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q0-6 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-6 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q2-6 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q3-6 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q4-6 { - fill: #dd1c77; - background: #dd1c77; - stroke: #dd1c77; -} -.PuRd.q5-6 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q0-7 { - fill: #f1eef6; - background: #f1eef6; - stroke: #f1eef6; -} -.PuRd.q1-7 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q2-7 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q3-7 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q4-7 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q5-7 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q6-7 { - fill: #91003f; - background: #91003f; - stroke: #91003f; -} -.PuRd.q0-8 { - fill: #f7f4f9; - background: #f7f4f9; - stroke: #f7f4f9; -} -.PuRd.q1-8 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q2-8 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q3-8 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q4-8 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q5-8 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q6-8 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q7-8 { - fill: #91003f; - background: #91003f; - stroke: #91003f; -} -.PuRd.q0-9 { - fill: #f7f4f9; - background: #f7f4f9; - stroke: #f7f4f9; -} -.PuRd.q1-9 { - fill: #e7e1ef; - background: #e7e1ef; - stroke: #e7e1ef; -} -.PuRd.q2-9 { - fill: #d4b9da; - background: #d4b9da; - stroke: #d4b9da; -} -.PuRd.q3-9 { - fill: #c994c7; - background: #c994c7; - stroke: #c994c7; -} -.PuRd.q4-9 { - fill: #df65b0; - background: #df65b0; - stroke: #df65b0; -} -.PuRd.q5-9 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.PuRd.q6-9 { - fill: #ce1256; - background: #ce1256; - stroke: #ce1256; -} -.PuRd.q7-9 { - fill: #980043; - background: #980043; - stroke: #980043; -} -.PuRd.q8-9 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.OrRd.q0-3 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q1-3 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q2-3 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q0-4 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-4 { - fill: #fdcc8a; - background: #fdcc8a; - stroke: #fdcc8a; -} -.OrRd.q2-4 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q3-4 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q0-5 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-5 { - fill: #fdcc8a; - background: #fdcc8a; - stroke: #fdcc8a; -} -.OrRd.q2-5 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q3-5 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q4-5 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q0-6 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-6 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q2-6 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q3-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q4-6 { - fill: #e34a33; - background: #e34a33; - stroke: #e34a33; -} -.OrRd.q5-6 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q0-7 { - fill: #fef0d9; - background: #fef0d9; - stroke: #fef0d9; -} -.OrRd.q1-7 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q2-7 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q3-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q4-7 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q5-7 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q6-7 { - fill: #990000; - background: #990000; - stroke: #990000; -} -.OrRd.q0-8 { - fill: #fff7ec; - background: #fff7ec; - stroke: #fff7ec; -} -.OrRd.q1-8 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q2-8 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q3-8 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q4-8 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q5-8 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q6-8 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q7-8 { - fill: #990000; - background: #990000; - stroke: #990000; -} -.OrRd.q0-9 { - fill: #fff7ec; - background: #fff7ec; - stroke: #fff7ec; -} -.OrRd.q1-9 { - fill: #fee8c8; - background: #fee8c8; - stroke: #fee8c8; -} -.OrRd.q2-9 { - fill: #fdd49e; - background: #fdd49e; - stroke: #fdd49e; -} -.OrRd.q3-9 { - fill: #fdbb84; - background: #fdbb84; - stroke: #fdbb84; -} -.OrRd.q4-9 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.OrRd.q5-9 { - fill: #ef6548; - background: #ef6548; - stroke: #ef6548; -} -.OrRd.q6-9 { - fill: #d7301f; - background: #d7301f; - stroke: #d7301f; -} -.OrRd.q7-9 { - fill: #b30000; - background: #b30000; - stroke: #b30000; -} -.OrRd.q8-9 { - fill: #7f0000; - background: #7f0000; - stroke: #7f0000; -} -.YlOrRd.q0-3 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q1-3 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q2-3 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q0-4 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-4 { - fill: #fecc5c; - background: #fecc5c; - stroke: #fecc5c; -} -.YlOrRd.q2-4 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q3-4 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q0-5 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-5 { - fill: #fecc5c; - background: #fecc5c; - stroke: #fecc5c; -} -.YlOrRd.q2-5 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q3-5 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q4-5 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q0-6 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-6 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q2-6 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q3-6 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q4-6 { - fill: #f03b20; - background: #f03b20; - stroke: #f03b20; -} -.YlOrRd.q5-6 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q0-7 { - fill: #ffffb2; - background: #ffffb2; - stroke: #ffffb2; -} -.YlOrRd.q1-7 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q2-7 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q3-7 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q4-7 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q5-7 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q6-7 { - fill: #b10026; - background: #b10026; - stroke: #b10026; -} -.YlOrRd.q0-8 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlOrRd.q1-8 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q2-8 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q3-8 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q4-8 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q5-8 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q6-8 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q7-8 { - fill: #b10026; - background: #b10026; - stroke: #b10026; -} -.YlOrRd.q0-9 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.YlOrRd.q1-9 { - fill: #ffeda0; - background: #ffeda0; - stroke: #ffeda0; -} -.YlOrRd.q2-9 { - fill: #fed976; - background: #fed976; - stroke: #fed976; -} -.YlOrRd.q3-9 { - fill: #feb24c; - background: #feb24c; - stroke: #feb24c; -} -.YlOrRd.q4-9 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.YlOrRd.q5-9 { - fill: #fc4e2a; - background: #fc4e2a; - stroke: #fc4e2a; -} -.YlOrRd.q6-9 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.YlOrRd.q7-9 { - fill: #bd0026; - background: #bd0026; - stroke: #bd0026; -} -.YlOrRd.q8-9 { - fill: #800026; - background: #800026; - stroke: #800026; -} -.YlOrBr.q0-3 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q1-3 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q2-3 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q0-4 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-4 { - fill: #fed98e; - background: #fed98e; - stroke: #fed98e; -} -.YlOrBr.q2-4 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q3-4 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q0-5 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-5 { - fill: #fed98e; - background: #fed98e; - stroke: #fed98e; -} -.YlOrBr.q2-5 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q3-5 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q4-5 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q0-6 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-6 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q2-6 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q3-6 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q4-6 { - fill: #d95f0e; - background: #d95f0e; - stroke: #d95f0e; -} -.YlOrBr.q5-6 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q0-7 { - fill: #ffffd4; - background: #ffffd4; - stroke: #ffffd4; -} -.YlOrBr.q1-7 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q2-7 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q3-7 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q4-7 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q5-7 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q6-7 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.YlOrBr.q0-8 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlOrBr.q1-8 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q2-8 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q3-8 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q4-8 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q5-8 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q6-8 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q7-8 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.YlOrBr.q0-9 { - fill: #ffffe5; - background: #ffffe5; - stroke: #ffffe5; -} -.YlOrBr.q1-9 { - fill: #fff7bc; - background: #fff7bc; - stroke: #fff7bc; -} -.YlOrBr.q2-9 { - fill: #fee391; - background: #fee391; - stroke: #fee391; -} -.YlOrBr.q3-9 { - fill: #fec44f; - background: #fec44f; - stroke: #fec44f; -} -.YlOrBr.q4-9 { - fill: #fe9929; - background: #fe9929; - stroke: #fe9929; -} -.YlOrBr.q5-9 { - fill: #ec7014; - background: #ec7014; - stroke: #ec7014; -} -.YlOrBr.q6-9 { - fill: #cc4c02; - background: #cc4c02; - stroke: #cc4c02; -} -.YlOrBr.q7-9 { - fill: #993404; - background: #993404; - stroke: #993404; -} -.YlOrBr.q8-9 { - fill: #662506; - background: #662506; - stroke: #662506; -} -.Purples.q0-3 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q1-3 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q2-3 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q0-4 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-4 { - fill: #cbc9e2; - background: #cbc9e2; - stroke: #cbc9e2; -} -.Purples.q2-4 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q3-4 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q0-5 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-5 { - fill: #cbc9e2; - background: #cbc9e2; - stroke: #cbc9e2; -} -.Purples.q2-5 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q3-5 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q4-5 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q0-6 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-6 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q2-6 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q3-6 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q4-6 { - fill: #756bb1; - background: #756bb1; - stroke: #756bb1; -} -.Purples.q5-6 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q0-7 { - fill: #f2f0f7; - background: #f2f0f7; - stroke: #f2f0f7; -} -.Purples.q1-7 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q2-7 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q3-7 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q4-7 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q5-7 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q6-7 { - fill: #4a1486; - background: #4a1486; - stroke: #4a1486; -} -.Purples.q0-8 { - fill: #fcfbfd; - background: #fcfbfd; - stroke: #fcfbfd; -} -.Purples.q1-8 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q2-8 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q3-8 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q4-8 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q5-8 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q6-8 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q7-8 { - fill: #4a1486; - background: #4a1486; - stroke: #4a1486; -} -.Purples.q0-9 { - fill: #fcfbfd; - background: #fcfbfd; - stroke: #fcfbfd; -} -.Purples.q1-9 { - fill: #efedf5; - background: #efedf5; - stroke: #efedf5; -} -.Purples.q2-9 { - fill: #dadaeb; - background: #dadaeb; - stroke: #dadaeb; -} -.Purples.q3-9 { - fill: #bcbddc; - background: #bcbddc; - stroke: #bcbddc; -} -.Purples.q4-9 { - fill: #9e9ac8; - background: #9e9ac8; - stroke: #9e9ac8; -} -.Purples.q5-9 { - fill: #807dba; - background: #807dba; - stroke: #807dba; -} -.Purples.q6-9 { - fill: #6a51a3; - background: #6a51a3; - stroke: #6a51a3; -} -.Purples.q7-9 { - fill: #54278f; - background: #54278f; - stroke: #54278f; -} -.Purples.q8-9 { - fill: #3f007d; - background: #3f007d; - stroke: #3f007d; -} -.Blues.q0-3 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q1-3 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q2-3 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q0-4 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-4 { - fill: #bdd7e7; - background: #bdd7e7; - stroke: #bdd7e7; -} -.Blues.q2-4 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q3-4 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q0-5 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-5 { - fill: #bdd7e7; - background: #bdd7e7; - stroke: #bdd7e7; -} -.Blues.q2-5 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q3-5 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q4-5 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q0-6 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-6 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q2-6 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q3-6 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q4-6 { - fill: #3182bd; - background: #3182bd; - stroke: #3182bd; -} -.Blues.q5-6 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q0-7 { - fill: #eff3ff; - background: #eff3ff; - stroke: #eff3ff; -} -.Blues.q1-7 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q2-7 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q3-7 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q4-7 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q5-7 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q6-7 { - fill: #084594; - background: #084594; - stroke: #084594; -} -.Blues.q0-8 { - fill: #f7fbff; - background: #f7fbff; - stroke: #f7fbff; -} -.Blues.q1-8 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q2-8 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q3-8 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q4-8 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q5-8 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q6-8 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q7-8 { - fill: #084594; - background: #084594; - stroke: #084594; -} -.Blues.q0-9 { - fill: #f7fbff; - background: #f7fbff; - stroke: #f7fbff; -} -.Blues.q1-9 { - fill: #deebf7; - background: #deebf7; - stroke: #deebf7; -} -.Blues.q2-9 { - fill: #c6dbef; - background: #c6dbef; - stroke: #c6dbef; -} -.Blues.q3-9 { - fill: #9ecae1; - background: #9ecae1; - stroke: #9ecae1; -} -.Blues.q4-9 { - fill: #6baed6; - background: #6baed6; - stroke: #6baed6; -} -.Blues.q5-9 { - fill: #4292c6; - background: #4292c6; - stroke: #4292c6; -} -.Blues.q6-9 { - fill: #2171b5; - background: #2171b5; - stroke: #2171b5; -} -.Blues.q7-9 { - fill: #08519c; - background: #08519c; - stroke: #08519c; -} -.Blues.q8-9 { - fill: #08306b; - background: #08306b; - stroke: #08306b; -} -.Greens.q0-3 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q1-3 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q2-3 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q0-4 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-4 { - fill: #bae4b3; - background: #bae4b3; - stroke: #bae4b3; -} -.Greens.q2-4 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q3-4 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q0-5 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-5 { - fill: #bae4b3; - background: #bae4b3; - stroke: #bae4b3; -} -.Greens.q2-5 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q3-5 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q4-5 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q0-6 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-6 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q2-6 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q3-6 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q4-6 { - fill: #31a354; - background: #31a354; - stroke: #31a354; -} -.Greens.q5-6 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q0-7 { - fill: #edf8e9; - background: #edf8e9; - stroke: #edf8e9; -} -.Greens.q1-7 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q2-7 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q3-7 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q4-7 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q5-7 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q6-7 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.Greens.q0-8 { - fill: #f7fcf5; - background: #f7fcf5; - stroke: #f7fcf5; -} -.Greens.q1-8 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q2-8 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q3-8 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q4-8 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q5-8 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q6-8 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q7-8 { - fill: #005a32; - background: #005a32; - stroke: #005a32; -} -.Greens.q0-9 { - fill: #f7fcf5; - background: #f7fcf5; - stroke: #f7fcf5; -} -.Greens.q1-9 { - fill: #e5f5e0; - background: #e5f5e0; - stroke: #e5f5e0; -} -.Greens.q2-9 { - fill: #c7e9c0; - background: #c7e9c0; - stroke: #c7e9c0; -} -.Greens.q3-9 { - fill: #a1d99b; - background: #a1d99b; - stroke: #a1d99b; -} -.Greens.q4-9 { - fill: #74c476; - background: #74c476; - stroke: #74c476; -} -.Greens.q5-9 { - fill: #41ab5d; - background: #41ab5d; - stroke: #41ab5d; -} -.Greens.q6-9 { - fill: #238b45; - background: #238b45; - stroke: #238b45; -} -.Greens.q7-9 { - fill: #006d2c; - background: #006d2c; - stroke: #006d2c; -} -.Greens.q8-9 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.Oranges.q0-3 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q1-3 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q2-3 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q0-4 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-4 { - fill: #fdbe85; - background: #fdbe85; - stroke: #fdbe85; -} -.Oranges.q2-4 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q3-4 { - fill: #d94701; - background: #d94701; - stroke: #d94701; -} -.Oranges.q0-5 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-5 { - fill: #fdbe85; - background: #fdbe85; - stroke: #fdbe85; -} -.Oranges.q2-5 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q3-5 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q4-5 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q0-6 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-6 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q2-6 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q3-6 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q4-6 { - fill: #e6550d; - background: #e6550d; - stroke: #e6550d; -} -.Oranges.q5-6 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q0-7 { - fill: #feedde; - background: #feedde; - stroke: #feedde; -} -.Oranges.q1-7 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q2-7 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q3-7 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q4-7 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q5-7 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q6-7 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.Oranges.q0-8 { - fill: #fff5eb; - background: #fff5eb; - stroke: #fff5eb; -} -.Oranges.q1-8 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q2-8 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q3-8 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q4-8 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q5-8 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q6-8 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q7-8 { - fill: #8c2d04; - background: #8c2d04; - stroke: #8c2d04; -} -.Oranges.q0-9 { - fill: #fff5eb; - background: #fff5eb; - stroke: #fff5eb; -} -.Oranges.q1-9 { - fill: #fee6ce; - background: #fee6ce; - stroke: #fee6ce; -} -.Oranges.q2-9 { - fill: #fdd0a2; - background: #fdd0a2; - stroke: #fdd0a2; -} -.Oranges.q3-9 { - fill: #fdae6b; - background: #fdae6b; - stroke: #fdae6b; -} -.Oranges.q4-9 { - fill: #fd8d3c; - background: #fd8d3c; - stroke: #fd8d3c; -} -.Oranges.q5-9 { - fill: #f16913; - background: #f16913; - stroke: #f16913; -} -.Oranges.q6-9 { - fill: #d94801; - background: #d94801; - stroke: #d94801; -} -.Oranges.q7-9 { - fill: #a63603; - background: #a63603; - stroke: #a63603; -} -.Oranges.q8-9 { - fill: #7f2704; - background: #7f2704; - stroke: #7f2704; -} -.Reds.q0-3 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q1-3 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q2-3 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q0-4 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-4 { - fill: #fcae91; - background: #fcae91; - stroke: #fcae91; -} -.Reds.q2-4 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q3-4 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q0-5 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-5 { - fill: #fcae91; - background: #fcae91; - stroke: #fcae91; -} -.Reds.q2-5 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q3-5 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q4-5 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q0-6 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-6 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q2-6 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q3-6 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q4-6 { - fill: #de2d26; - background: #de2d26; - stroke: #de2d26; -} -.Reds.q5-6 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q0-7 { - fill: #fee5d9; - background: #fee5d9; - stroke: #fee5d9; -} -.Reds.q1-7 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q2-7 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q3-7 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q4-7 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q5-7 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q6-7 { - fill: #99000d; - background: #99000d; - stroke: #99000d; -} -.Reds.q0-8 { - fill: #fff5f0; - background: #fff5f0; - stroke: #fff5f0; -} -.Reds.q1-8 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q2-8 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q3-8 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q4-8 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q5-8 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q6-8 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q7-8 { - fill: #99000d; - background: #99000d; - stroke: #99000d; -} -.Reds.q0-9 { - fill: #fff5f0; - background: #fff5f0; - stroke: #fff5f0; -} -.Reds.q1-9 { - fill: #fee0d2; - background: #fee0d2; - stroke: #fee0d2; -} -.Reds.q2-9 { - fill: #fcbba1; - background: #fcbba1; - stroke: #fcbba1; -} -.Reds.q3-9 { - fill: #fc9272; - background: #fc9272; - stroke: #fc9272; -} -.Reds.q4-9 { - fill: #fb6a4a; - background: #fb6a4a; - stroke: #fb6a4a; -} -.Reds.q5-9 { - fill: #ef3b2c; - background: #ef3b2c; - stroke: #ef3b2c; -} -.Reds.q6-9 { - fill: #cb181d; - background: #cb181d; - stroke: #cb181d; -} -.Reds.q7-9 { - fill: #a50f15; - background: #a50f15; - stroke: #a50f15; -} -.Reds.q8-9 { - fill: #67000d; - background: #67000d; - stroke: #67000d; -} -.Greys.q0-3 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q1-3 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q2-3 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q0-4 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-4 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Greys.q2-4 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q3-4 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q0-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-5 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Greys.q2-5 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q3-5 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q4-5 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-6 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-6 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q2-6 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q3-6 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q4-6 { - fill: #636363; - background: #636363; - stroke: #636363; -} -.Greys.q5-6 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.Greys.q1-7 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q2-7 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q3-7 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q4-7 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q5-7 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q6-7 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-8 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.Greys.q1-8 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q2-8 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q3-8 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q4-8 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q5-8 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q6-8 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q7-8 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q0-9 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.Greys.q1-9 { - fill: #f0f0f0; - background: #f0f0f0; - stroke: #f0f0f0; -} -.Greys.q2-9 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Greys.q3-9 { - fill: #bdbdbd; - background: #bdbdbd; - stroke: #bdbdbd; -} -.Greys.q4-9 { - fill: #969696; - background: #969696; - stroke: #969696; -} -.Greys.q5-9 { - fill: #737373; - background: #737373; - stroke: #737373; -} -.Greys.q6-9 { - fill: #525252; - background: #525252; - stroke: #525252; -} -.Greys.q7-9 { - fill: #252525; - background: #252525; - stroke: #252525; -} -.Greys.q8-9 { - fill: #000000; - background: #000000; - stroke: #000000; -} -.PuOr.q0-3 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q2-3 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q0-4 { - fill: #e66101; - background: #e66101; - stroke: #e66101; -} -.PuOr.q1-4 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q2-4 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q3-4 { - fill: #5e3c99; - background: #5e3c99; - stroke: #5e3c99; -} -.PuOr.q0-5 { - fill: #e66101; - background: #e66101; - stroke: #e66101; -} -.PuOr.q1-5 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q3-5 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q4-5 { - fill: #5e3c99; - background: #5e3c99; - stroke: #5e3c99; -} -.PuOr.q0-6 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-6 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q2-6 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q3-6 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q4-6 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q5-6 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-7 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-7 { - fill: #f1a340; - background: #f1a340; - stroke: #f1a340; -} -.PuOr.q2-7 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q4-7 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q5-7 { - fill: #998ec3; - background: #998ec3; - stroke: #998ec3; -} -.PuOr.q6-7 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-8 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-8 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q2-8 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q3-8 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q4-8 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q5-8 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q6-8 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q7-8 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-9 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q1-9 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q2-9 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q3-9 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q5-9 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q6-9 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q7-9 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q8-9 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q0-10 { - fill: #7f3b08; - background: #7f3b08; - stroke: #7f3b08; -} -.PuOr.q1-10 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q2-10 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q3-10 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q4-10 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q5-10 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q6-10 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q7-10 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q8-10 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q9-10 { - fill: #2d004b; - background: #2d004b; - stroke: #2d004b; -} -.PuOr.q0-11 { - fill: #7f3b08; - background: #7f3b08; - stroke: #7f3b08; -} -.PuOr.q1-11 { - fill: #b35806; - background: #b35806; - stroke: #b35806; -} -.PuOr.q2-11 { - fill: #e08214; - background: #e08214; - stroke: #e08214; -} -.PuOr.q3-11 { - fill: #fdb863; - background: #fdb863; - stroke: #fdb863; -} -.PuOr.q4-11 { - fill: #fee0b6; - background: #fee0b6; - stroke: #fee0b6; -} -.PuOr.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PuOr.q6-11 { - fill: #d8daeb; - background: #d8daeb; - stroke: #d8daeb; -} -.PuOr.q7-11 { - fill: #b2abd2; - background: #b2abd2; - stroke: #b2abd2; -} -.PuOr.q8-11 { - fill: #8073ac; - background: #8073ac; - stroke: #8073ac; -} -.PuOr.q9-11 { - fill: #542788; - background: #542788; - stroke: #542788; -} -.PuOr.q10-11 { - fill: #2d004b; - background: #2d004b; - stroke: #2d004b; -} -.BrBG.q0-3 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q1-3 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q2-3 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q0-4 { - fill: #a6611a; - background: #a6611a; - stroke: #a6611a; -} -.BrBG.q1-4 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q2-4 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q3-4 { - fill: #018571; - background: #018571; - stroke: #018571; -} -.BrBG.q0-5 { - fill: #a6611a; - background: #a6611a; - stroke: #a6611a; -} -.BrBG.q1-5 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q2-5 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q3-5 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q4-5 { - fill: #018571; - background: #018571; - stroke: #018571; -} -.BrBG.q0-6 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-6 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q2-6 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q3-6 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q4-6 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q5-6 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-7 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-7 { - fill: #d8b365; - background: #d8b365; - stroke: #d8b365; -} -.BrBG.q2-7 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q3-7 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q4-7 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q5-7 { - fill: #5ab4ac; - background: #5ab4ac; - stroke: #5ab4ac; -} -.BrBG.q6-7 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-8 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-8 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q2-8 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q3-8 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q4-8 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q5-8 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q6-8 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q7-8 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-9 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q1-9 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q2-9 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q3-9 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q4-9 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q5-9 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q6-9 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q7-9 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q8-9 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q0-10 { - fill: #543005; - background: #543005; - stroke: #543005; -} -.BrBG.q1-10 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q2-10 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q3-10 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q4-10 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q5-10 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q6-10 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q7-10 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q8-10 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q9-10 { - fill: #003c30; - background: #003c30; - stroke: #003c30; -} -.BrBG.q0-11 { - fill: #543005; - background: #543005; - stroke: #543005; -} -.BrBG.q1-11 { - fill: #8c510a; - background: #8c510a; - stroke: #8c510a; -} -.BrBG.q2-11 { - fill: #bf812d; - background: #bf812d; - stroke: #bf812d; -} -.BrBG.q3-11 { - fill: #dfc27d; - background: #dfc27d; - stroke: #dfc27d; -} -.BrBG.q4-11 { - fill: #f6e8c3; - background: #f6e8c3; - stroke: #f6e8c3; -} -.BrBG.q5-11 { - fill: #f5f5f5; - background: #f5f5f5; - stroke: #f5f5f5; -} -.BrBG.q6-11 { - fill: #c7eae5; - background: #c7eae5; - stroke: #c7eae5; -} -.BrBG.q7-11 { - fill: #80cdc1; - background: #80cdc1; - stroke: #80cdc1; -} -.BrBG.q8-11 { - fill: #35978f; - background: #35978f; - stroke: #35978f; -} -.BrBG.q9-11 { - fill: #01665e; - background: #01665e; - stroke: #01665e; -} -.BrBG.q10-11 { - fill: #003c30; - background: #003c30; - stroke: #003c30; -} -.PRGn.q0-3 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q2-3 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q0-4 { - fill: #7b3294; - background: #7b3294; - stroke: #7b3294; -} -.PRGn.q1-4 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q2-4 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q3-4 { - fill: #008837; - background: #008837; - stroke: #008837; -} -.PRGn.q0-5 { - fill: #7b3294; - background: #7b3294; - stroke: #7b3294; -} -.PRGn.q1-5 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q3-5 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q4-5 { - fill: #008837; - background: #008837; - stroke: #008837; -} -.PRGn.q0-6 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-6 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q2-6 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q3-6 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q4-6 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q5-6 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-7 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-7 { - fill: #af8dc3; - background: #af8dc3; - stroke: #af8dc3; -} -.PRGn.q2-7 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q4-7 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q5-7 { - fill: #7fbf7b; - background: #7fbf7b; - stroke: #7fbf7b; -} -.PRGn.q6-7 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-8 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-8 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q2-8 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q3-8 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q4-8 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q5-8 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q6-8 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q7-8 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-9 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q1-9 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q2-9 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q3-9 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q5-9 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q6-9 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q7-9 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q8-9 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q0-10 { - fill: #40004b; - background: #40004b; - stroke: #40004b; -} -.PRGn.q1-10 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q2-10 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q3-10 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q4-10 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q5-10 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q6-10 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q7-10 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q8-10 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q9-10 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PRGn.q0-11 { - fill: #40004b; - background: #40004b; - stroke: #40004b; -} -.PRGn.q1-11 { - fill: #762a83; - background: #762a83; - stroke: #762a83; -} -.PRGn.q2-11 { - fill: #9970ab; - background: #9970ab; - stroke: #9970ab; -} -.PRGn.q3-11 { - fill: #c2a5cf; - background: #c2a5cf; - stroke: #c2a5cf; -} -.PRGn.q4-11 { - fill: #e7d4e8; - background: #e7d4e8; - stroke: #e7d4e8; -} -.PRGn.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PRGn.q6-11 { - fill: #d9f0d3; - background: #d9f0d3; - stroke: #d9f0d3; -} -.PRGn.q7-11 { - fill: #a6dba0; - background: #a6dba0; - stroke: #a6dba0; -} -.PRGn.q8-11 { - fill: #5aae61; - background: #5aae61; - stroke: #5aae61; -} -.PRGn.q9-11 { - fill: #1b7837; - background: #1b7837; - stroke: #1b7837; -} -.PRGn.q10-11 { - fill: #00441b; - background: #00441b; - stroke: #00441b; -} -.PiYG.q0-3 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q2-3 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q0-4 { - fill: #d01c8b; - background: #d01c8b; - stroke: #d01c8b; -} -.PiYG.q1-4 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q2-4 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q3-4 { - fill: #4dac26; - background: #4dac26; - stroke: #4dac26; -} -.PiYG.q0-5 { - fill: #d01c8b; - background: #d01c8b; - stroke: #d01c8b; -} -.PiYG.q1-5 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q3-5 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q4-5 { - fill: #4dac26; - background: #4dac26; - stroke: #4dac26; -} -.PiYG.q0-6 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-6 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q2-6 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q3-6 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q4-6 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q5-6 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-7 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-7 { - fill: #e9a3c9; - background: #e9a3c9; - stroke: #e9a3c9; -} -.PiYG.q2-7 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q4-7 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q5-7 { - fill: #a1d76a; - background: #a1d76a; - stroke: #a1d76a; -} -.PiYG.q6-7 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-8 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-8 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q2-8 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q3-8 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q4-8 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q5-8 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q6-8 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q7-8 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-9 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q1-9 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q2-9 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q3-9 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q5-9 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q6-9 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q7-9 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q8-9 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q0-10 { - fill: #8e0152; - background: #8e0152; - stroke: #8e0152; -} -.PiYG.q1-10 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q2-10 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q3-10 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q4-10 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q5-10 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q6-10 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q7-10 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q8-10 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q9-10 { - fill: #276419; - background: #276419; - stroke: #276419; -} -.PiYG.q0-11 { - fill: #8e0152; - background: #8e0152; - stroke: #8e0152; -} -.PiYG.q1-11 { - fill: #c51b7d; - background: #c51b7d; - stroke: #c51b7d; -} -.PiYG.q2-11 { - fill: #de77ae; - background: #de77ae; - stroke: #de77ae; -} -.PiYG.q3-11 { - fill: #f1b6da; - background: #f1b6da; - stroke: #f1b6da; -} -.PiYG.q4-11 { - fill: #fde0ef; - background: #fde0ef; - stroke: #fde0ef; -} -.PiYG.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.PiYG.q6-11 { - fill: #e6f5d0; - background: #e6f5d0; - stroke: #e6f5d0; -} -.PiYG.q7-11 { - fill: #b8e186; - background: #b8e186; - stroke: #b8e186; -} -.PiYG.q8-11 { - fill: #7fbc41; - background: #7fbc41; - stroke: #7fbc41; -} -.PiYG.q9-11 { - fill: #4d9221; - background: #4d9221; - stroke: #4d9221; -} -.PiYG.q10-11 { - fill: #276419; - background: #276419; - stroke: #276419; -} -.RdBu.q0-3 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q1-3 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q2-3 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q0-4 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdBu.q1-4 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q2-4 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q3-4 { - fill: #0571b0; - background: #0571b0; - stroke: #0571b0; -} -.RdBu.q0-5 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdBu.q1-5 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q2-5 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q3-5 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q4-5 { - fill: #0571b0; - background: #0571b0; - stroke: #0571b0; -} -.RdBu.q0-6 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-6 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q2-6 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q3-6 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q4-6 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q5-6 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-7 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-7 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdBu.q2-7 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q3-7 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q4-7 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q5-7 { - fill: #67a9cf; - background: #67a9cf; - stroke: #67a9cf; -} -.RdBu.q6-7 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-8 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-8 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q2-8 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q3-8 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q4-8 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q5-8 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q6-8 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q7-8 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-9 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q1-9 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q2-9 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q3-9 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q4-9 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q5-9 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q6-9 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q7-9 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q8-9 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q0-10 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdBu.q1-10 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q2-10 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q3-10 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q4-10 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q5-10 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q6-10 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q7-10 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q8-10 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q9-10 { - fill: #053061; - background: #053061; - stroke: #053061; -} -.RdBu.q0-11 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdBu.q1-11 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdBu.q2-11 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdBu.q3-11 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdBu.q4-11 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdBu.q5-11 { - fill: #f7f7f7; - background: #f7f7f7; - stroke: #f7f7f7; -} -.RdBu.q6-11 { - fill: #d1e5f0; - background: #d1e5f0; - stroke: #d1e5f0; -} -.RdBu.q7-11 { - fill: #92c5de; - background: #92c5de; - stroke: #92c5de; -} -.RdBu.q8-11 { - fill: #4393c3; - background: #4393c3; - stroke: #4393c3; -} -.RdBu.q9-11 { - fill: #2166ac; - background: #2166ac; - stroke: #2166ac; -} -.RdBu.q10-11 { - fill: #053061; - background: #053061; - stroke: #053061; -} -.RdGy.q0-3 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q1-3 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q2-3 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q0-4 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdGy.q1-4 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q2-4 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q3-4 { - fill: #404040; - background: #404040; - stroke: #404040; -} -.RdGy.q0-5 { - fill: #ca0020; - background: #ca0020; - stroke: #ca0020; -} -.RdGy.q1-5 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q2-5 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q3-5 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q4-5 { - fill: #404040; - background: #404040; - stroke: #404040; -} -.RdGy.q0-6 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-6 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q2-6 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q3-6 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q4-6 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q5-6 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-7 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-7 { - fill: #ef8a62; - background: #ef8a62; - stroke: #ef8a62; -} -.RdGy.q2-7 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q3-7 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q4-7 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q5-7 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.RdGy.q6-7 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-8 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-8 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q2-8 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q3-8 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q4-8 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q5-8 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q6-8 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q7-8 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-9 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q1-9 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q2-9 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q3-9 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q4-9 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q5-9 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q6-9 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q7-9 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q8-9 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q0-10 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdGy.q1-10 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q2-10 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q3-10 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q4-10 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q5-10 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q6-10 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q7-10 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q8-10 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q9-10 { - fill: #1a1a1a; - background: #1a1a1a; - stroke: #1a1a1a; -} -.RdGy.q0-11 { - fill: #67001f; - background: #67001f; - stroke: #67001f; -} -.RdGy.q1-11 { - fill: #b2182b; - background: #b2182b; - stroke: #b2182b; -} -.RdGy.q2-11 { - fill: #d6604d; - background: #d6604d; - stroke: #d6604d; -} -.RdGy.q3-11 { - fill: #f4a582; - background: #f4a582; - stroke: #f4a582; -} -.RdGy.q4-11 { - fill: #fddbc7; - background: #fddbc7; - stroke: #fddbc7; -} -.RdGy.q5-11 { - fill: #ffffff; - background: #ffffff; - stroke: #ffffff; -} -.RdGy.q6-11 { - fill: #e0e0e0; - background: #e0e0e0; - stroke: #e0e0e0; -} -.RdGy.q7-11 { - fill: #bababa; - background: #bababa; - stroke: #bababa; -} -.RdGy.q8-11 { - fill: #878787; - background: #878787; - stroke: #878787; -} -.RdGy.q9-11 { - fill: #4d4d4d; - background: #4d4d4d; - stroke: #4d4d4d; -} -.RdGy.q10-11 { - fill: #1a1a1a; - background: #1a1a1a; - stroke: #1a1a1a; -} -.RdYlBu.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q2-3 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlBu.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q2-4 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q3-4 { - fill: #2c7bb6; - background: #2c7bb6; - stroke: #2c7bb6; -} -.RdYlBu.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlBu.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q3-5 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q4-5 { - fill: #2c7bb6; - background: #2c7bb6; - stroke: #2c7bb6; -} -.RdYlBu.q0-6 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q2-6 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q3-6 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q4-6 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q5-6 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-7 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlBu.q2-7 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q4-7 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q5-7 { - fill: #91bfdb; - background: #91bfdb; - stroke: #91bfdb; -} -.RdYlBu.q6-7 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-8 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q3-8 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q4-8 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q5-8 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q6-8 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q7-8 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-9 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q3-9 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q5-9 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q6-9 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q7-9 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q8-9 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q0-10 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlBu.q1-10 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q4-10 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q5-10 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q6-10 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q7-10 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q8-10 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q9-10 { - fill: #313695; - background: #313695; - stroke: #313695; -} -.RdYlBu.q0-11 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlBu.q1-11 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlBu.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlBu.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlBu.q4-11 { - fill: #fee090; - background: #fee090; - stroke: #fee090; -} -.RdYlBu.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlBu.q6-11 { - fill: #e0f3f8; - background: #e0f3f8; - stroke: #e0f3f8; -} -.RdYlBu.q7-11 { - fill: #abd9e9; - background: #abd9e9; - stroke: #abd9e9; -} -.RdYlBu.q8-11 { - fill: #74add1; - background: #74add1; - stroke: #74add1; -} -.RdYlBu.q9-11 { - fill: #4575b4; - background: #4575b4; - stroke: #4575b4; -} -.RdYlBu.q10-11 { - fill: #313695; - background: #313695; - stroke: #313695; -} -.Spectral.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q2-3 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.Spectral.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q2-4 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q3-4 { - fill: #2b83ba; - background: #2b83ba; - stroke: #2b83ba; -} -.Spectral.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.Spectral.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q3-5 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q4-5 { - fill: #2b83ba; - background: #2b83ba; - stroke: #2b83ba; -} -.Spectral.q0-6 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q2-6 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q3-6 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q4-6 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q5-6 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-7 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.Spectral.q2-7 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q4-7 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q5-7 { - fill: #99d594; - background: #99d594; - stroke: #99d594; -} -.Spectral.q6-7 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-8 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q3-8 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q4-8 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q5-8 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q6-8 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q7-8 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-9 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q3-9 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q5-9 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q6-9 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q7-9 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q8-9 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q0-10 { - fill: #9e0142; - background: #9e0142; - stroke: #9e0142; -} -.Spectral.q1-10 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q4-10 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q5-10 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q6-10 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q7-10 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q8-10 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q9-10 { - fill: #5e4fa2; - background: #5e4fa2; - stroke: #5e4fa2; -} -.Spectral.q0-11 { - fill: #9e0142; - background: #9e0142; - stroke: #9e0142; -} -.Spectral.q1-11 { - fill: #d53e4f; - background: #d53e4f; - stroke: #d53e4f; -} -.Spectral.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.Spectral.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.Spectral.q4-11 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.Spectral.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.Spectral.q6-11 { - fill: #e6f598; - background: #e6f598; - stroke: #e6f598; -} -.Spectral.q7-11 { - fill: #abdda4; - background: #abdda4; - stroke: #abdda4; -} -.Spectral.q8-11 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Spectral.q9-11 { - fill: #3288bd; - background: #3288bd; - stroke: #3288bd; -} -.Spectral.q10-11 { - fill: #5e4fa2; - background: #5e4fa2; - stroke: #5e4fa2; -} -.RdYlGn.q0-3 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q1-3 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q2-3 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q0-4 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlGn.q1-4 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q2-4 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q3-4 { - fill: #1a9641; - background: #1a9641; - stroke: #1a9641; -} -.RdYlGn.q0-5 { - fill: #d7191c; - background: #d7191c; - stroke: #d7191c; -} -.RdYlGn.q1-5 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q2-5 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q3-5 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q4-5 { - fill: #1a9641; - background: #1a9641; - stroke: #1a9641; -} -.RdYlGn.q0-6 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-6 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q2-6 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q3-6 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q4-6 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q5-6 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-7 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-7 { - fill: #fc8d59; - background: #fc8d59; - stroke: #fc8d59; -} -.RdYlGn.q2-7 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q3-7 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q4-7 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q5-7 { - fill: #91cf60; - background: #91cf60; - stroke: #91cf60; -} -.RdYlGn.q6-7 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-8 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-8 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q2-8 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q3-8 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q4-8 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q5-8 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q6-8 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q7-8 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-9 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q1-9 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q2-9 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q3-9 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q4-9 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q5-9 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q6-9 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q7-9 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q8-9 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q0-10 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlGn.q1-10 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q2-10 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q3-10 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q4-10 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q5-10 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q6-10 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q7-10 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q8-10 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q9-10 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.RdYlGn.q0-11 { - fill: #a50026; - background: #a50026; - stroke: #a50026; -} -.RdYlGn.q1-11 { - fill: #d73027; - background: #d73027; - stroke: #d73027; -} -.RdYlGn.q2-11 { - fill: #f46d43; - background: #f46d43; - stroke: #f46d43; -} -.RdYlGn.q3-11 { - fill: #fdae61; - background: #fdae61; - stroke: #fdae61; -} -.RdYlGn.q4-11 { - fill: #fee08b; - background: #fee08b; - stroke: #fee08b; -} -.RdYlGn.q5-11 { - fill: #ffffbf; - background: #ffffbf; - stroke: #ffffbf; -} -.RdYlGn.q6-11 { - fill: #d9ef8b; - background: #d9ef8b; - stroke: #d9ef8b; -} -.RdYlGn.q7-11 { - fill: #a6d96a; - background: #a6d96a; - stroke: #a6d96a; -} -.RdYlGn.q8-11 { - fill: #66bd63; - background: #66bd63; - stroke: #66bd63; -} -.RdYlGn.q9-11 { - fill: #1a9850; - background: #1a9850; - stroke: #1a9850; -} -.RdYlGn.q10-11 { - fill: #006837; - background: #006837; - stroke: #006837; -} -.Accent.q0-3 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-3 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-3 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q0-4 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-4 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-4 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-4 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q0-5 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-5 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-5 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-5 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-5 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q0-6 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-6 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-6 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-6 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-6 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-6 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q0-7 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-7 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-7 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-7 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-7 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-7 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q6-7 { - fill: #bf5b17; - background: #bf5b17; - stroke: #bf5b17; -} -.Accent.q0-8 { - fill: #7fc97f; - background: #7fc97f; - stroke: #7fc97f; -} -.Accent.q1-8 { - fill: #beaed4; - background: #beaed4; - stroke: #beaed4; -} -.Accent.q2-8 { - fill: #fdc086; - background: #fdc086; - stroke: #fdc086; -} -.Accent.q3-8 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Accent.q4-8 { - fill: #386cb0; - background: #386cb0; - stroke: #386cb0; -} -.Accent.q5-8 { - fill: #f0027f; - background: #f0027f; - stroke: #f0027f; -} -.Accent.q6-8 { - fill: #bf5b17; - background: #bf5b17; - stroke: #bf5b17; -} -.Accent.q7-8 { - fill: #666666; - background: #666666; - stroke: #666666; -} -.Dark2.q0-3 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-3 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-3 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q0-4 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-4 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-4 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-4 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q0-5 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-5 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-5 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-5 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-5 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q0-6 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-6 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-6 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-6 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-6 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-6 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q0-7 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-7 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-7 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-7 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-7 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-7 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q6-7 { - fill: #a6761d; - background: #a6761d; - stroke: #a6761d; -} -.Dark2.q0-8 { - fill: #1b9e77; - background: #1b9e77; - stroke: #1b9e77; -} -.Dark2.q1-8 { - fill: #d95f02; - background: #d95f02; - stroke: #d95f02; -} -.Dark2.q2-8 { - fill: #7570b3; - background: #7570b3; - stroke: #7570b3; -} -.Dark2.q3-8 { - fill: #e7298a; - background: #e7298a; - stroke: #e7298a; -} -.Dark2.q4-8 { - fill: #66a61e; - background: #66a61e; - stroke: #66a61e; -} -.Dark2.q5-8 { - fill: #e6ab02; - background: #e6ab02; - stroke: #e6ab02; -} -.Dark2.q6-8 { - fill: #a6761d; - background: #a6761d; - stroke: #a6761d; -} -.Dark2.q7-8 { - fill: #666666; - background: #666666; - stroke: #666666; -} -.Paired.q0-3 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-3 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-3 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q0-4 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-4 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-4 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-4 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q0-5 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-5 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-5 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-5 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-5 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q0-6 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-6 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-6 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-6 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-6 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-6 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q0-7 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-7 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-7 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-7 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-7 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-7 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-7 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q0-8 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-8 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-8 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-8 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-8 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-8 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-8 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-8 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q0-9 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-9 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-9 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-9 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-9 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-9 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-9 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-9 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-9 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q0-10 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-10 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-10 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-10 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-10 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-10 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-10 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-10 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-10 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-10 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q0-11 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-11 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-11 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-11 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-11 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-11 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-11 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-11 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-11 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-11 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q10-11 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Paired.q0-12 { - fill: #a6cee3; - background: #a6cee3; - stroke: #a6cee3; -} -.Paired.q1-12 { - fill: #1f78b4; - background: #1f78b4; - stroke: #1f78b4; -} -.Paired.q2-12 { - fill: #b2df8a; - background: #b2df8a; - stroke: #b2df8a; -} -.Paired.q3-12 { - fill: #33a02c; - background: #33a02c; - stroke: #33a02c; -} -.Paired.q4-12 { - fill: #fb9a99; - background: #fb9a99; - stroke: #fb9a99; -} -.Paired.q5-12 { - fill: #e31a1c; - background: #e31a1c; - stroke: #e31a1c; -} -.Paired.q6-12 { - fill: #fdbf6f; - background: #fdbf6f; - stroke: #fdbf6f; -} -.Paired.q7-12 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Paired.q8-12 { - fill: #cab2d6; - background: #cab2d6; - stroke: #cab2d6; -} -.Paired.q9-12 { - fill: #6a3d9a; - background: #6a3d9a; - stroke: #6a3d9a; -} -.Paired.q10-12 { - fill: #ffff99; - background: #ffff99; - stroke: #ffff99; -} -.Paired.q11-12 { - fill: #b15928; - background: #b15928; - stroke: #b15928; -} -.Pastel1.q0-3 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-3 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-3 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q0-4 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-4 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-4 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-4 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q0-5 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-5 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-5 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-5 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-5 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q0-6 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-6 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-6 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-6 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-6 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-6 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q0-7 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-7 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-7 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-7 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-7 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-7 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-7 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q0-8 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-8 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-8 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-8 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-8 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-8 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-8 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q7-8 { - fill: #fddaec; - background: #fddaec; - stroke: #fddaec; -} -.Pastel1.q0-9 { - fill: #fbb4ae; - background: #fbb4ae; - stroke: #fbb4ae; -} -.Pastel1.q1-9 { - fill: #b3cde3; - background: #b3cde3; - stroke: #b3cde3; -} -.Pastel1.q2-9 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Pastel1.q3-9 { - fill: #decbe4; - background: #decbe4; - stroke: #decbe4; -} -.Pastel1.q4-9 { - fill: #fed9a6; - background: #fed9a6; - stroke: #fed9a6; -} -.Pastel1.q5-9 { - fill: #ffffcc; - background: #ffffcc; - stroke: #ffffcc; -} -.Pastel1.q6-9 { - fill: #e5d8bd; - background: #e5d8bd; - stroke: #e5d8bd; -} -.Pastel1.q7-9 { - fill: #fddaec; - background: #fddaec; - stroke: #fddaec; -} -.Pastel1.q8-9 { - fill: #f2f2f2; - background: #f2f2f2; - stroke: #f2f2f2; -} -.Pastel2.q0-3 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-3 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-3 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q0-4 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-4 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-4 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-4 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q0-5 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-5 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-5 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-5 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-5 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q0-6 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-6 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-6 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-6 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-6 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-6 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q0-7 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-7 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-7 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-7 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-7 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-7 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q6-7 { - fill: #f1e2cc; - background: #f1e2cc; - stroke: #f1e2cc; -} -.Pastel2.q0-8 { - fill: #b3e2cd; - background: #b3e2cd; - stroke: #b3e2cd; -} -.Pastel2.q1-8 { - fill: #fdcdac; - background: #fdcdac; - stroke: #fdcdac; -} -.Pastel2.q2-8 { - fill: #cbd5e8; - background: #cbd5e8; - stroke: #cbd5e8; -} -.Pastel2.q3-8 { - fill: #f4cae4; - background: #f4cae4; - stroke: #f4cae4; -} -.Pastel2.q4-8 { - fill: #e6f5c9; - background: #e6f5c9; - stroke: #e6f5c9; -} -.Pastel2.q5-8 { - fill: #fff2ae; - background: #fff2ae; - stroke: #fff2ae; -} -.Pastel2.q6-8 { - fill: #f1e2cc; - background: #f1e2cc; - stroke: #f1e2cc; -} -.Pastel2.q7-8 { - fill: #cccccc; - background: #cccccc; - stroke: #cccccc; -} -.Set1.q0-3 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-3 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-3 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q0-4 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-4 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-4 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-4 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q0-5 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-5 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-5 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-5 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-5 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q0-6 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-6 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-6 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-6 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-6 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-6 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q0-7 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-7 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-7 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-7 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-7 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-7 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-7 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q0-8 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-8 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-8 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-8 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-8 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-8 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-8 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q7-8 { - fill: #f781bf; - background: #f781bf; - stroke: #f781bf; -} -.Set1.q0-9 { - fill: #e41a1c; - background: #e41a1c; - stroke: #e41a1c; -} -.Set1.q1-9 { - fill: #377eb8; - background: #377eb8; - stroke: #377eb8; -} -.Set1.q2-9 { - fill: #4daf4a; - background: #4daf4a; - stroke: #4daf4a; -} -.Set1.q3-9 { - fill: #984ea3; - background: #984ea3; - stroke: #984ea3; -} -.Set1.q4-9 { - fill: #ff7f00; - background: #ff7f00; - stroke: #ff7f00; -} -.Set1.q5-9 { - fill: #ffff33; - background: #ffff33; - stroke: #ffff33; -} -.Set1.q6-9 { - fill: #a65628; - background: #a65628; - stroke: #a65628; -} -.Set1.q7-9 { - fill: #f781bf; - background: #f781bf; - stroke: #f781bf; -} -.Set1.q8-9 { - fill: #999999; - background: #999999; - stroke: #999999; -} -.Set2.q0-3 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-3 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-3 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q0-4 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-4 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-4 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-4 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q0-5 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-5 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-5 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-5 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-5 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q0-6 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-6 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-6 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-6 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-6 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-6 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q0-7 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-7 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-7 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-7 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-7 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-7 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q6-7 { - fill: #e5c494; - background: #e5c494; - stroke: #e5c494; -} -.Set2.q0-8 { - fill: #66c2a5; - background: #66c2a5; - stroke: #66c2a5; -} -.Set2.q1-8 { - fill: #fc8d62; - background: #fc8d62; - stroke: #fc8d62; -} -.Set2.q2-8 { - fill: #8da0cb; - background: #8da0cb; - stroke: #8da0cb; -} -.Set2.q3-8 { - fill: #e78ac3; - background: #e78ac3; - stroke: #e78ac3; -} -.Set2.q4-8 { - fill: #a6d854; - background: #a6d854; - stroke: #a6d854; -} -.Set2.q5-8 { - fill: #ffd92f; - background: #ffd92f; - stroke: #ffd92f; -} -.Set2.q6-8 { - fill: #e5c494; - background: #e5c494; - stroke: #e5c494; -} -.Set2.q7-8 { - fill: #b3b3b3; - background: #b3b3b3; - stroke: #b3b3b3; -} -.Set3.q0-3 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-3 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-3 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q0-4 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-4 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-4 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-4 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q0-5 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-5 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-5 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-5 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-5 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q0-6 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-6 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-6 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-6 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-6 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-6 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q0-7 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-7 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-7 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-7 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-7 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-7 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-7 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q0-8 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-8 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-8 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-8 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-8 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-8 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-8 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-8 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q0-9 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-9 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-9 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-9 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-9 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-9 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-9 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-9 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-9 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q0-10 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-10 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-10 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-10 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-10 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-10 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-10 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-10 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-10 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-10 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q0-11 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-11 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-11 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-11 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-11 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-11 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-11 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-11 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-11 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-11 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q10-11 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Set3.q0-12 { - fill: #8dd3c7; - background: #8dd3c7; - stroke: #8dd3c7; -} -.Set3.q1-12 { - fill: #ffffb3; - background: #ffffb3; - stroke: #ffffb3; -} -.Set3.q2-12 { - fill: #bebada; - background: #bebada; - stroke: #bebada; -} -.Set3.q3-12 { - fill: #fb8072; - background: #fb8072; - stroke: #fb8072; -} -.Set3.q4-12 { - fill: #80b1d3; - background: #80b1d3; - stroke: #80b1d3; -} -.Set3.q5-12 { - fill: #fdb462; - background: #fdb462; - stroke: #fdb462; -} -.Set3.q6-12 { - fill: #b3de69; - background: #b3de69; - stroke: #b3de69; -} -.Set3.q7-12 { - fill: #fccde5; - background: #fccde5; - stroke: #fccde5; -} -.Set3.q8-12 { - fill: #d9d9d9; - background: #d9d9d9; - stroke: #d9d9d9; -} -.Set3.q9-12 { - fill: #bc80bd; - background: #bc80bd; - stroke: #bc80bd; -} -.Set3.q10-12 { - fill: #ccebc5; - background: #ccebc5; - stroke: #ccebc5; -} -.Set3.q11-12 { - fill: #ffed6f; - background: #ffed6f; - stroke: #ffed6f; -} diff --git a/build/development/css/tauCharts.default.css b/build/development/css/tauCharts.default.css deleted file mode 100644 index b79932b0c..000000000 --- a/build/development/css/tauCharts.default.css +++ /dev/null @@ -1,562 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout { - line-height: 1; - font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; -} -.graphical-report__layout text { - font: normal 13px Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; -} -.graphical-report__chart { - font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; - position: absolute; - height: 100%; - width: 100%; - overflow: auto; -} -.graphical-report__layout { - display: -webkit-flexbox; - display: -ms-flexbox; - display: flex; - -ms-flex-align: stretch; - align-items: stretch; - -ms-flex-direction: column; - flex-direction: column; - height: 100%; - width: 100%; - overflow: auto; - background: transparent; - color: #333; -} -.graphical-report__layout__header { - -ms-flex: 0 0.1 auto; - flex: 0 0.1 auto; - position: relative; -} -.graphical-report__layout__container { - display: -webkit-flexbox; - display: -ms-flexbox; - display: flex; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - height: 100%; -} -.graphical-report__layout__footer { - -ms-flex: 0 1 auto; - flex: 0 1 auto; -} -.graphical-report__layout__sidebar { - -ms-flex: 0 1 auto; - flex: 0 1 auto; -} -.graphical-report__layout__content { - -ms-flex: 1 1 auto; - flex: 1 1 auto; - overflow: hidden; -} -.graphical-report__layout__sidebar-right { - position: relative; - overflow: hidden; - -ms-flex: 0 0 auto; - flex: 0 0 auto; -} -.graphical-report__layout__sidebar-right__wrap { - max-height: 100%; - box-sizing: border-box; -} -.graphical-report__layout text { - fill: #333; -} -.graphical-report__layout.graphical-report__layout_rendering-error { - opacity: 0.75; -} -.graphical-report__rendering-timeout-warning { - -ms-flex-align: center; - align-items: center; - background: rgba(255, 255, 255, 0.5); - display: -ms-flexbox; - display: flex; - -ms-flex-direction: column; - flex-direction: column; - height: 100%; - position: absolute; - top: 0; - width: 100%; -} -.graphical-report__rendering-timeout-warning svg { - height: 100%; - max-width: 32em; - width: 100%; -} -.graphical-report__rendering-timeout-warning text { - font-weight: 300; -} -.graphical-report__progress { - box-sizing: border-box; - height: 0.25em; - opacity: 0; - overflow: hidden; - pointer-events: none; - position: absolute; - top: 0; - transition: opacity 1s 0.75s; - width: 100%; -} -.graphical-report__progress_active { - opacity: 1; -} -.graphical-report__progress__value { - background: rgba(51, 51, 51, 0.25); - height: 100%; - transition: width 0.75s; -} -.graphical-report { - /* region Select --------------------------------------------------*/ -} -.graphical-report__checkbox { - position: relative; - display: block; -} -.graphical-report__checkbox__input { - position: absolute; - z-index: -1; - opacity: 0; -} -.graphical-report__checkbox__icon { - position: relative; - width: 14px; - height: 14px; - top: 3px; - display: inline-block; - border: 1px solid #c3c3c3; - border-radius: 2px; - background: linear-gradient(to bottom, #fff 0%, #dbdbde 100%); -} -.graphical-report__checkbox__icon:before { - display: none; - content: ''; - background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC'); - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; -} -.graphical-report__checkbox__text { - margin-left: 5px; -} -.graphical-report__checkbox__input ~ .graphical-report__checkbox__text { - cursor: pointer; -} -.graphical-report__checkbox__input:disabled ~ .graphical-report__checkbox__text { - cursor: default; - opacity: 0.3; -} -.graphical-report__checkbox__input:not(:disabled):focus + .graphical-report__checkbox__icon { - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 7px 0 #52a8ec; - outline: none; -} -.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled) ~ .graphical-report__checkbox__icon { - border-color: #999; -} -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon { - background: linear-gradient(to bottom, #fff 0%, #dbdbde 100%); -} -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon:before { - display: block; -} -.graphical-report__select { - font-size: 13px; - font-family: inherit; - display: inline-block; - height: 24px; - line-height: 24px; - vertical-align: middle; - padding: 2px; - background-color: #fff; - border: 1px solid #c3c3c3; - border-radius: 2px; - color: #333; -} -.graphical-report__select:focus { - box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 7px 0 #52a8ec; - outline: none; -} -.graphical-report__select[disabled] { - opacity: 0.3; - cursor: default; -} -.graphical-report__select[multiple] { - height: auto; -} -.graphical-report__select option[disabled] { - opacity: 0.6; -} -.graphical-report-btn { - background-color: rgba(255, 255, 255, 0.9); - border: 1px solid currentColor; - border-radius: 4px; - box-shadow: 0 0 1px rgba(0, 0, 0, 0.1); - box-sizing: border-box; - color: #b3b3b3; - cursor: pointer; - font-size: 13px; - padding: 0 6px; - line-height: 1.5em; - height: calc(1.5em + 2px); -} -.graphical-report-btn:hover { - border-color: #999999; - color: #333; -} -/* region Generate .color@{n}-@{i} function */ -.graphical-report__svg .color20-1 { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__svg .color20-2 { - stroke: #DF2B59; - fill: #DF2B59; -} -.graphical-report__svg .color20-3 { - stroke: #66DA26; - fill: #66DA26; -} -.graphical-report__svg .color20-4 { - stroke: #4C3862; - fill: #4C3862; -} -.graphical-report__svg .color20-5 { - stroke: #E5B011; - fill: #E5B011; -} -.graphical-report__svg .color20-6 { - stroke: #3A3226; - fill: #3A3226; -} -.graphical-report__svg .color20-7 { - stroke: #CB461A; - fill: #CB461A; -} -.graphical-report__svg .color20-8 { - stroke: #C7CE23; - fill: #C7CE23; -} -.graphical-report__svg .color20-9 { - stroke: #7FCDC2; - fill: #7FCDC2; -} -.graphical-report__svg .color20-10 { - stroke: #CCA1C8; - fill: #CCA1C8; -} -.graphical-report__svg .color20-11 { - stroke: #C84CCE; - fill: #C84CCE; -} -.graphical-report__svg .color20-12 { - stroke: #54762E; - fill: #54762E; -} -.graphical-report__svg .color20-13 { - stroke: #746BC9; - fill: #746BC9; -} -.graphical-report__svg .color20-14 { - stroke: #953441; - fill: #953441; -} -.graphical-report__svg .color20-15 { - stroke: #5C7A76; - fill: #5C7A76; -} -.graphical-report__svg .color20-16 { - stroke: #C8BF87; - fill: #C8BF87; -} -.graphical-report__svg .color20-17 { - stroke: #BFC1C3; - fill: #BFC1C3; -} -.graphical-report__svg .color20-18 { - stroke: #8E5C31; - fill: #8E5C31; -} -.graphical-report__svg .color20-19 { - stroke: #71CE7B; - fill: #71CE7B; -} -.graphical-report__svg .color20-20 { - stroke: #BE478B; - fill: #BE478B; -} -.graphical-report__svg .color-default { - stroke: #6FA1D9; - fill: #6FA1D9; -} -/* endregion */ -/* region Generate .line-params-@{n} function */ -/* Generate .line-size-@{n} */ -.graphical-report__line-width-1 { - stroke-width: 1px; -} -.graphical-report__line-width-2 { - stroke-width: 1.5px; -} -.graphical-report__line-width-3 { - stroke-width: 2px; -} -.graphical-report__line-width-4 { - stroke-width: 2.5px; -} -.graphical-report__line-width-5 { - stroke-width: 3px; -} -/* Generate .line-opacity-@{n} */ -.graphical-report__line-opacity-1 { - stroke-opacity: 1; -} -.graphical-report__line-opacity-2 { - stroke-opacity: 0.95; -} -.graphical-report__line-opacity-3 { - stroke-opacity: 0.9; -} -.graphical-report__line-opacity-4 { - stroke-opacity: 0.85; -} -.graphical-report__line-opacity-5 { - stroke-opacity: 0.8; -} -/* endregion */ -/* endregion */ -.graphical-report { - /* Links */ - /* Axises and Grid */ - /* Scatterplot */ - /* Linechart */ - /* Bar */ - /* TODO: fix to avoid conflict on "stroke" with color brewer */ - /* TODO: remove this when CSS for color brewer is fixed */ - /* PLUGINS */ - /* Highlighter */ -} -.graphical-report a { - color: #3962FF; - border-bottom: 1px solid rgba(57, 98, 255, 0.3); - text-decoration: none; -} -.graphical-report a:hover { - color: #E17152; - border-bottom: 1px solid rgba(225, 113, 82, 0.3); -} -.graphical-report__d3-time-overflown .tick:nth-child(even) { - display: none; -} -.graphical-report__svg { - display: block; - overflow: hidden; -} -.graphical-report__svg .place { - fill: #fff; - stroke: #000; - stroke-opacity: 0.7; - stroke-width: 0.5; -} -.graphical-report__svg .place-label { - opacity: 0.7; - font-size: 11px; - color: #000000; - line-height: 13px; - text-anchor: start; -} -.graphical-report__svg .place-label-countries, -.graphical-report__svg .place-label-subunits, -.graphical-report__svg .place-label-states { - text-anchor: middle; - font-size: 10px; - fill: rgba(51, 51, 51, 0.5); - line-height: 10px; - text-transform: capitalize; -} -.graphical-report__svg .map-contour-level path { - stroke-opacity: 0.5; - stroke-linejoin: 'round'; -} -.graphical-report__svg .map-contour-level-0 path { - stroke: #fff; -} -.graphical-report__svg .map-contour-level-1 path { - stroke: #fff; -} -.graphical-report__svg .map-contour-level-2 path { - stroke: #fff; -} -.graphical-report__svg .map-contour-level-3 path { - stroke: #fff; -} -.graphical-report__svg .map-contour-level-4 path { - stroke: #fff; -} -.graphical-report__svg .map-contour-highlighted, -.graphical-report__svg .map-contour:hover { - fill: #FFBF00; -} -.graphical-report__svg .map-contour-highlighted path, -.graphical-report__svg .map-contour:hover path { - stroke: #fff; -} -.graphical-report__svg .map-contour-highlighted text, -.graphical-report__svg .map-contour:hover text { - fill: #000; -} -.graphical-report__svg .axis line, -.graphical-report__svg .axis path { - stroke-width: 1; - fill: none; - stroke: rgba(189, 195, 205, 0.4); - shape-rendering: crispEdges; -} -.graphical-report__svg .axis.facet-axis .tick line { - opacity: 0; -} -.graphical-report__svg .axis.facet-axis .tick line.label-ref { - opacity: 1; -} -.graphical-report__svg .axis.facet-axis .tick text { - font-weight: 600; -} -.graphical-report__svg .axis.facet-axis path.domain { - opacity: 0; -} -.graphical-report__svg .axis.facet-axis.compact .tick text { - font-weight: normal; -} -.graphical-report__svg .axis.facet-axis.compact .label { - font-weight: normal; -} -.graphical-report__svg .axis.facet-axis.compact .label .label-token { - font-weight: normal; -} -.graphical-report__svg .tick text { - font-size: 11px; -} -.graphical-report__svg .grid .grid-lines path { - shape-rendering: crispEdges; -} -.graphical-report__svg .grid .line path, -.graphical-report__svg .grid path.line, -.graphical-report__svg .grid path.domain { - fill: none; -} -.graphical-report__svg .grid .tick > line { - fill: none; - stroke: rgba(189, 195, 205, 0.4); - stroke-width: 1px; - shape-rendering: crispEdges; -} -.graphical-report__svg .grid .tick.zero-tick > line { - stroke: rgba(126, 129, 134, 0.505); -} -.graphical-report__svg .grid .line path { - shape-rendering: auto; -} -.graphical-report__svg .grid .cursor-line { - shape-rendering: crispEdges; - stroke: #cccccc; - stroke-width: 1px; -} -.graphical-report__svg .label { - font-size: 12px; - font-weight: 600; -} -.graphical-report__svg .label .label-token { - font-size: 12px; - font-weight: 600; - text-transform: capitalize; -} -.graphical-report__svg .label .label-token-1, -.graphical-report__svg .label .label-token-2 { - font-weight: normal; -} -.graphical-report__svg .label .label-token-2 { - fill: gray; -} -.graphical-report__svg .label .label-token-delimiter { - font-weight: normal; - fill: gray; -} -.graphical-report__svg .label.inline .label-token { - font-weight: normal; - fill: gray; - text-transform: none; -} -.graphical-report__svg .brush .extent { - fill-opacity: .3; - stroke: #fff; - shape-rendering: crispEdges; -} -.graphical-report__svg .background { - stroke: #f2f2f2; -} -.graphical-report__dot { - opacity: 0.7; - stroke-width: 0; - transition: stroke-width 0.1s ease, opacity 0.2s ease; -} -.graphical-report__line { - fill: none; - transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; -} -.graphical-report__dot-line { - opacity: 1; - transition: stroke-opacity 0.2s ease; -} -.graphical-report__bar { - opacity: 0.7; - shape-rendering: geometricPrecision; - stroke-opacity: 0.5; - stroke-width: 1; - stroke: #fff; - transition: opacity 0.2s ease; -} -.graphical-report__area { - transition: opacity 0.2s ease; -} -.graphical-report__area path, -.graphical-report__area polygon { - opacity: 0.6; - transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; -} -.graphical-report__svg .graphical-report__bar { - stroke: #fff; -} -.graphical-report__dot.graphical-report__highlighted { - stroke-width: 1; - opacity: 1; -} -.graphical-report__dot.graphical-report__dimmed { - opacity: 0.2; -} -.graphical-report__line.graphical-report__highlighted { - stroke-opacity: 1; - stroke-width: 3; -} -.graphical-report__line.graphical-report__dimmed { - stroke-opacity: 0.2; -} -.i-role-label.graphical-report__highlighted, -.graphical-report__area.graphical-report__highlighted, -.graphical-report__bar.graphical-report__highlighted { - stroke-opacity: 1; - opacity: 1; -} -.i-role-label.graphical-report__dimmed, -.graphical-report__area.graphical-report__dimmed, -.graphical-report__bar.graphical-report__dimmed { - opacity: 0.2; -} diff --git a/build/development/plugins/tauCharts.annotations.css b/build/development/plugins/tauCharts.annotations.css deleted file mode 100644 index f54544aef..000000000 --- a/build/development/plugins/tauCharts.annotations.css +++ /dev/null @@ -1,14 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__annotation-line { - stroke-width: 2px; - stroke-dasharray: 1,1; - shape-rendering: crispEdges; -} -.graphical-report__annotation-area.graphical-report__area polygon { - opacity: 0.1; -} diff --git a/build/development/plugins/tauCharts.annotations.dark.css b/build/development/plugins/tauCharts.annotations.dark.css deleted file mode 100644 index f54544aef..000000000 --- a/build/development/plugins/tauCharts.annotations.dark.css +++ /dev/null @@ -1,14 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__annotation-line { - stroke-width: 2px; - stroke-dasharray: 1,1; - shape-rendering: crispEdges; -} -.graphical-report__annotation-area.graphical-report__area polygon { - opacity: 0.1; -} diff --git a/build/development/plugins/tauCharts.annotations.default.css b/build/development/plugins/tauCharts.annotations.default.css deleted file mode 100644 index f54544aef..000000000 --- a/build/development/plugins/tauCharts.annotations.default.css +++ /dev/null @@ -1,14 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__annotation-line { - stroke-width: 2px; - stroke-dasharray: 1,1; - shape-rendering: crispEdges; -} -.graphical-report__annotation-area.graphical-report__area polygon { - opacity: 0.1; -} diff --git a/build/development/plugins/tauCharts.annotations.js b/build/development/plugins/tauCharts.annotations.js deleted file mode 100644 index e5ec638f1..000000000 --- a/build/development/plugins/tauCharts.annotations.js +++ /dev/null @@ -1,362 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var utils = tauCharts.api.utils; - var d3 = tauCharts.api.d3; - var pluginsSDK = tauCharts.api.pluginsSDK; - - var addToUnits = function (units, newUnit, position) { - if (position === 'front') { - units.push(newUnit); - } else { - // behind by default - units.unshift(newUnit); - } - }; - - var stretchByOrdinalAxis = function (noteItem) { - return function (model) { - var res = {}; - var seed = [ - { - dim: model.scaleX.dim, - scale: model.scaleY, - method: 'yi', - k: -1 - }, - { - dim: model.scaleY.dim, - scale: model.scaleX, - method: 'xi', - k: 1 - }, - { - dim: null, - scale: null, - method: null - } - ].find(function (a) { - return a.dim === noteItem.dim; - }); - - if (seed.method === null) { - return res; - } - - var marker = '__pos__'; - var kAxis = seed.k; - var koeff = {l: -0.5, r: 0.5}; - var method = seed.method; - var scale = seed.scale; - res[method] = (function (row) { - var k = (koeff[row[marker]] || 0) * kAxis; - return (scale.discrete ? - (model[method](row) + scale.stepSize(row[scale.dim]) * k) : - (model[method](row))); - }); - return res; - }; - }; - - function annotations(xSettings) { - - var settings = utils.defaults(xSettings || {}, {items: []}); - var textScaleName = 'annotation_text'; - - return { - - init: function (chart) { - this._chart = chart; - - var specRef = chart.getSpec(); - specRef.scales[textScaleName] = {type: 'value', dim: 'text', source: '?'}; - specRef.transformations = specRef.transformations || {}; - - specRef.transformations.dataRange = function (data, metaInfo) { - - var from = metaInfo.from; - var to = metaInfo.to; - - var primaryScaleInfo = chart.getScaleInfo(metaInfo.primaryScale); - - if ((primaryScaleInfo.scaleType === 'period')) { - var periodCaster = tauCharts.api.tickPeriod.get(primaryScaleInfo.period, - {utc: specRef.settings.utcTime}); - from = periodCaster.cast(new Date(metaInfo.from)); - to = periodCaster.cast(new Date(metaInfo.to)); - } - - var isX0OutOfDomain = !primaryScaleInfo.isInDomain(from); - var isX1OutOfDomain = !primaryScaleInfo.isInDomain(to); - - var isOutOfDomain = (primaryScaleInfo.discrete ? - (isX0OutOfDomain || isX1OutOfDomain) : - (isX0OutOfDomain && isX1OutOfDomain) - ); - - if (isOutOfDomain) { - console.log('Annotation is out of domain'); - return []; - } - - var secondaryScaleInfo = chart.getScaleInfo(metaInfo.secondaryScale); - var secDomain = secondaryScaleInfo.domain(); - var boundaries = [secDomain[0], secDomain[secDomain.length - 1]]; - - var a = primaryScaleInfo.dim; - var b = secondaryScaleInfo.dim; - var z = '__pos__'; - - var leftBtm = {}; - var leftTop = {}; - var rghtTop = {}; - var rghtBtm = {}; - - leftBtm[z] = 'l'; - leftBtm[a] = from; - leftBtm[b] = boundaries[0]; - - leftTop[z] = 'l'; - leftTop[a] = to; - leftTop[b] = boundaries[0]; - - rghtTop[z] = 'r'; - rghtTop[a] = to; - rghtTop[b] = boundaries[1]; - - rghtBtm[z] = 'r'; - rghtBtm[a] = from; - rghtBtm[b] = boundaries[1]; - - ((metaInfo.axis === 'y') ? rghtTop : rghtBtm).text = metaInfo.text; - - return [leftBtm, leftTop, rghtTop, rghtBtm]; - }; - - specRef.transformations.dataLimit = function (data, metaInfo) { - - var primary = metaInfo.primaryScale; - var secondary = metaInfo.secondaryScale; - - var primaryScaleInfo = chart.getScaleInfo(primary); - var from = ((primaryScaleInfo.scaleType === 'period') ? - tauCharts.api.tickPeriod.get(primaryScaleInfo.period, {utc: specRef.settings.utcTime}) - .cast(new Date(metaInfo.from)) : - metaInfo.from); - var isOutOfDomain = (!primaryScaleInfo.isInDomain(from)); - - if (isOutOfDomain) { - console.log('Annotation is out of domain'); - return []; - } - - var secondaryScaleInfo = chart.getScaleInfo(secondary); - var secDomain = secondaryScaleInfo.domain(); - var boundaries = [secDomain[0], secDomain[secDomain.length - 1]]; - - var src = {}; - var dst = {}; - - var a = primaryScaleInfo.dim; - var b = secondaryScaleInfo.dim; - var z = '__pos__'; - - src[a] = from; - src[b] = boundaries[0]; - src[z] = 'l'; - - dst[a] = from; - dst[b] = boundaries[1]; - dst[z] = 'r'; - - dst.text = metaInfo.text; - - return [src, dst]; - }; - }, - - addAreaNote: function (specRef, coordsUnit, noteItem) { - - var xScale = specRef.scales[coordsUnit.x]; - var yScale = specRef.scales[coordsUnit.y]; - - var axes = ((noteItem.dim === xScale.dim) ? - ['x', 'y'] : - ((noteItem.dim === yScale.dim) ? - ['y', 'x'] : - (null))); - - if (axes === null) { - console.log('Annotation doesn\'t match any data field'); - return; - } - - var from = noteItem.val[0]; - var to = noteItem.val[1]; - - var annotatedArea = { - type: 'ELEMENT.PATH', - namespace: 'annotations', - x: coordsUnit.x, - y: coordsUnit.y, - color: noteItem.colorScaleName, - label: textScaleName, - expression: { - inherit: false, - operator: 'none', - params: [], - source: '/' - }, - transformModel: [stretchByOrdinalAxis(noteItem)], - transformation: [ - { - type: 'dataRange', - args: { - axis: axes[0], - text: noteItem.text, - from: from, - to: to, - primaryScale: coordsUnit[axes[0]], - secondaryScale: coordsUnit[axes[1]] - } - } - ], - guide: { - showAnchors: 'never', - cssClass: 'graphical-report__annotation-area', - label: { - fontColor: noteItem.color, - position: ['r', 'b', 'keep-in-box'] - } - } - }; - - addToUnits(coordsUnit.units, annotatedArea, noteItem.position); - }, - - addLineNote: function (specRef, coordsUnit, noteItem) { - - var xScale = specRef.scales[coordsUnit.x]; - var yScale = specRef.scales[coordsUnit.y]; - - var axes = ((noteItem.dim === xScale.dim) ? - ['x', 'y'] : - ((noteItem.dim === yScale.dim) ? - ['y', 'x'] : - (null))); - - if (axes === null) { - console.log('Annotation doesn\'t match any field'); - return; - } - - var text = noteItem.text; - var from = noteItem.val; - - var annotatedLine = { - type: 'ELEMENT.LINE', - namespace: 'annotations', - x: coordsUnit.x, - y: coordsUnit.y, - label: textScaleName, - color: noteItem.colorScaleName, - transformModel: [stretchByOrdinalAxis(noteItem)], - expression: { - inherit: false, - operator: 'none', - params: [], - source: '/' - }, - transformation: [ - { - type: 'dataLimit', - args: { - from: from, - text: text, - primaryScale: coordsUnit[axes[0]], - secondaryScale: coordsUnit[axes[1]] - } - } - ], - guide: { - showAnchors: 'never', - widthCssClass: 'graphical-report__line-width-2', - cssClass: 'graphical-report__annotation-line', - label: { - fontColor: noteItem.color, - position: ['r', 'b', 'keep-in-box'] - } - } - }; - - addToUnits(coordsUnit.units, annotatedLine, noteItem.position); - }, - - onSpecReady: function (chart, specRef) { - - var self = this; - var units = []; - chart.traverseSpec(specRef, function (unit) { - if (unit && (unit.type === 'COORDS.RECT') && (unit.units)) { - units.push(unit); - } - }); - - var specApi = pluginsSDK.spec(specRef); - - units.forEach(function (coordsUnit) { - - settings.items - .map(function (item, i) { - - var color = (item.color || '#BD10E0').toLowerCase(); - var rgbCode = d3.rgb(color).toString().toUpperCase(); - if ((color !== 'black') && (rgbCode === '#000000')) { - rgbCode = null; - } - var colorStr = rgbCode || color; - - var colorScaleName = 'annotation_color_' + i; - specApi.addScale( - colorScaleName, - { - type: 'color', - source: '?', - brewer: [colorStr] - }); - - return { - dim: item.dim, - val: item.val, - text: item.text, - color: colorStr, - position: item.position, - colorScaleName: colorScaleName - }; - }) - .forEach(function (item) { - if (Array.isArray(item.val)) { - self.addAreaNote(specRef, coordsUnit, item); - } else { - self.addLineNote(specRef, coordsUnit, item); - } - }); - }); - } - }; - } - - tauCharts.api.plugins.add('annotations', annotations); - - return annotations; -}); \ No newline at end of file diff --git a/build/development/plugins/tauCharts.bar-as-span.js b/build/development/plugins/tauCharts.bar-as-span.js deleted file mode 100644 index 252b0c26d..000000000 --- a/build/development/plugins/tauCharts.bar-as-span.js +++ /dev/null @@ -1,203 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - -var d3 = tauCharts.api.d3; -var utils = tauCharts.api.utils; - -function BarAsSpan(settings) { - - var xDim0 = settings.x0; - var yDim0 = settings.y0; - var collapse = (settings.collapse != null ? settings.collapse : true); - - var transformX0 = function (model) { - return { - y0: function y0(dataRow) { - return model.scaleY.value(dataRow[xDim0]); - } - }; - }; - var transformY0 = function (model) { - return { - y0: function y0(dataRow) { - return model.scaleY.value(dataRow[yDim0]); - } - }; - }; - - var adjustValueScale = function (model) { - - var data = model.data(); - if (data.length === 0) { - return {}; - } - - var yScale = model.scaleY; - var minY = Number.MAX_VALUE; - var maxY = Number.MIN_VALUE; - var dim0 = (model.flip ? xDim0 : yDim0); - var dim = yScale.dim; - data.forEach(function (d) { - var y0 = d[dim0]; - var y = d[dim]; - var min = (y0 < y ? y0 : y); - var max = (y > y0 ? y : y0); - minY = (min < minY ? min : minY); - maxY = (max > maxY ? max : maxY); - }); - - yScale.fixup(function (yScaleConfig) { - - var newConf = {}; - - if (!yScaleConfig.hasOwnProperty('max') || yScaleConfig.max < maxY) { - newConf.max = maxY; - } - - if (!yScaleConfig.hasOwnProperty('min') || yScaleConfig.min > minY) { - newConf.min = minY; - } - - return newConf; - }); - - return {}; - }; - - // Todo: Categories names can repeat among facets. - var totalLines = {}; - var totalLinesPerFacet = {}; - - var transformMultiline = function (model) { - - var data = model.data().slice(); - var xScale = model.scaleX; - var yScale = model.scaleY; - - if (data.length === 0 || !xScale.discrete) { - return {}; - } - - var dim0 = (model.flip ? xDim0 : yDim0); - var dim = yScale.dim; - data.sort(utils.createMultiSorter( - function (a, b) { return (a[dim0] - b[dim0]); }, - function (a, b) { return (a[dim] - b[dim]); } - )); - - var catDim = xScale.dim; - var categories = xScale.domain(); - var categoryLines = categories.reduce(function (map, c) { - map[c] = []; - return map; - }, {}); - var itemLine = new Map(); - - var collapseIteratee = function (d) { - var cat = d[catDim]; - var lines = categoryLines[cat]; - var lineNum = lines.findIndex(function (l) { - return (l[l.length - 1][dim] <= d[dim0]); - }); - if (lineNum < 0) { - lineNum = lines.length; - lines.push([]); - } - lines[lineNum].push(d); - itemLine.set(d, lineNum); - }; - var expandIteratee = function (d) { - var cat = d[catDim]; - var lines = categoryLines[cat]; - var lineNum = lineNum = lines.length; - lines.push([]); - lines[lineNum].push(d); - itemLine.set(d, lineNum); - }; - - data.forEach(collapse ? collapseIteratee : expandIteratee); - - Object.keys(categoryLines).forEach(function (key) { - totalLines[key] = categoryLines[key]; - }); - - xScale.fixup(function (xScaleConfig) { - - var newConf = {}; - - var totalRows = xScale.domain().reduce(function (sum, cat) { - return (sum + totalLines[cat].length); - }, 0); - - xScale.domain().forEach(function (cat) { - totalLinesPerFacet[cat] = totalRows; - }); - - newConf.ratio = function (cat) { - return (totalLines[cat].length / totalLinesPerFacet[cat]); - }; - - return newConf; - }); - - return { - xi: function (row) { - var cat = row[catDim]; - var catHeight = xScale.stepSize(cat); - var top = (model.xi(row) - catHeight / 2); - var lineHeight = (catHeight / totalLines[cat].length); - var lineIndex = itemLine.get(row); - return (top + lineHeight * (lineIndex + 0.5)); - } - }; - }; - - return { - - onSpecReady: function (chart, specRef) { - - chart.traverseSpec( - specRef, - function (unit, parentUnit) { - - if (unit.type === 'ELEMENT.INTERVAL') { - - unit.transformModel = [ - (unit.flip ? transformX0 : transformY0), - transformMultiline - ]; - - unit.adjustScales = [ - adjustValueScale - ]; - - unit.guide.enableColorToBarPosition = false; - - unit.guide.label = (unit.guide.label || {}); - unit.guide.label.position = (unit.guide.label.position || (unit.flip ? [ - 'inside-start-then-outside-end-horizontal', - 'hide-by-label-height-horizontal' - ] : [ - 'inside-start-then-outside-end-vertical' - ])); - } - }); - } - }; -} - -tauCharts.api.plugins.add('bar-as-span', BarAsSpan); - -return BarAsSpan; - -}); diff --git a/build/development/plugins/tauCharts.box-whiskers.js b/build/development/plugins/tauCharts.box-whiskers.js deleted file mode 100644 index fc0fcbf6b..000000000 --- a/build/development/plugins/tauCharts.box-whiskers.js +++ /dev/null @@ -1,389 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var utils = tauCharts.api.utils; - - var MIN = 'minimum'; - var MAX = 'maximum'; - var MEDIAN = 'median'; - var Q1 = 'Q1'; - var Q3 = 'Q3'; - - var KEYS = { - MIN: MIN, - MAX: MAX, - MEDIAN: MEDIAN, - Q1: Q1, - Q3: Q3 - }; - - function percentile(sortedArr, perc) { - var n = sortedArr.length - 1; - var pos = perc / 100 * n; - var posFloor = Math.floor(pos); - - if (posFloor === 0) { - return { - pos: 0, - value: sortedArr[0] - }; - } else if (posFloor === n) { - return { - pos: n, - value: sortedArr[n] - }; - } else { - var module = pos - posFloor; - if (module) { - return { - pos: pos, - value: sortedArr[posFloor] + (module * (sortedArr[posFloor + 1] - sortedArr[posFloor])) - }; - } else { - return { - pos: pos, - value: sortedArr[pos] - }; - } - } - } - - function calculateStatistics(fiber, summary, keys) { - - var values = fiber.sort(function (a, b) { - return a - b; - }); - - var q1 = percentile(values, 25); - var median = percentile(values, 50); - var q3 = percentile(values, 75); - - var iqr = q3.value - q1.value; - var lowerMildOutlierLimmit = q1.value - 1.5 * iqr; - var upperMildOutlierLimmit = q3.value + 1.5 * iqr; - - var lowerWhisker = values[0]; - var upperWhisker = values[values.length - 1]; - - for (var l = 0; l <= q1.pos; l++) { - var itemLower = values[l]; - if (itemLower > lowerMildOutlierLimmit) { - lowerWhisker = itemLower; - break; - } - } - - for (var u = values.length - 1; u >= q3.pos; u--) { - var itemUpper = values[u]; - if (itemUpper < upperMildOutlierLimmit) { - upperWhisker = itemUpper; - break; - } - } - - summary[keys.MIN] = lowerWhisker; - summary[keys.MAX] = upperWhisker; - summary[keys.MEDIAN] = median.value; - summary[keys.Q1] = q1.value; - summary[keys.Q3] = q3.value; - - return summary; - } - - tauCharts.api.unitsRegistry.reg( - 'ELEMENT.BOX-WHISKERS', - { - getAdjustScalesRules: function () { - var self = this; - var node = self.node(); - var rules = []; - if (node.config.guide.fitScale) { - rules.push(function (prevGrammarModel) { - self.fixScale(prevGrammarModel, self.calcStat(prevGrammarModel)); - }); - } - return rules; - }, - - fixScale: function (grammarModel, stat) { - var vals = stat - .reduce(function (memo, row) { - return memo.concat([row[KEYS.MIN], row[KEYS.MAX]]); - }, []) - .sort(function (a, b) { - return a - b; - }); - - var minY = vals[0]; - var maxY = vals[vals.length - 1]; - grammarModel.scaleY.fixup(function (yScaleConfig) { - var newConf = {}; - - if (!yScaleConfig.hasOwnProperty('series')) { - newConf.series = [minY, maxY]; - } else { - var min = Math.min(yScaleConfig.series[0], minY); - var max = Math.max(yScaleConfig.series[1], maxY); - newConf.series = [min, max]; - } - - return newConf; - }); - }, - - calcStat: function (grammarModel) { - var cats = grammarModel.data().reduce(function (memo, row) { - var k = row[grammarModel.scaleX.dim]; - memo[k] = memo[k] || []; - memo[k].push(row[grammarModel.scaleY.dim]); - return memo; - }, {}); - - return Object.keys(cats).reduce(function (memo, k) { - var base = {}; - base[grammarModel.scaleX.dim] = k; - return memo.concat(calculateStatistics(cats[k], base, KEYS)); - }, []); - }, - - buildRangeModel: function (screenModel, cfg) { - var flip = screenModel.flip; - - var x = flip ? 'y' : 'x'; - var y = flip ? 'x' : 'y'; - var w = flip ? 'height' : 'width'; - var h = flip ? 'width' : 'height'; - - var y0 = flip ? cfg.y1 : cfg.y0; - var y1 = flip ? cfg.y0 : cfg.y1; - var size = cfg.size; - var xs = screenModel.model.scaleX; - var ys = screenModel.model.scaleY; - var model = {class: cfg.class}; - model[x] = function (d) { - return xs(d[xs.dim]) - size * 0.5; - }; - model[y] = function (d) { - return ys(d[y1]); - }; - model[w] = function () { - return size; - }; - model[h] = function (d) { - return Math.max(cfg.minHeight || 1, Math.abs(ys(d[y0]) - ys(d[y1]))); - }; - - return Object.assign( - model, - { - fill: function () { - return cfg.color || 'rgba(0,0,256, 0.5)'; - } - }); - }, - - draw: function () { - var cfg = this.node().config; - var container = cfg.options.slot(cfg.uid); - var summary = this.calcStat(this.node().screenModel.model); - this.drawElement(container, summary); - }, - - drawElement: function (container, tuples) { - - var self = this; - var screenModel = this.node().screenModel; - - var createUpdateFunc = tauCharts.api.d3_animationInterceptor; - - var drawPart = function (that, props) { - var speed = self.node().config.guide.animationSpeed; - var part = that - .selectAll('.' + props.class) - .data(function(row) { - return [row]; - }, screenModel.id); - part.exit() - .call(createUpdateFunc(speed, null, {width: 0}, function (node) { - d3.select(node).remove(); - })); - part.call(createUpdateFunc(speed, null, props)); - part.enter() - .append('rect') - .style('stroke-width', 0) - .call(createUpdateFunc(speed, {width: 0}, props)); - }; - - var drawElement = function () { - - drawPart(this, self.buildRangeModel(screenModel, { - size: 2, - y0: MIN, - y1: Q1, - class: 'range-min-Q1' - })); - - drawPart(this, self.buildRangeModel(screenModel, { - size: 2, - y0: Q3, - y1: MAX, - class: 'range-Q3-max' - })); - - drawPart(this, self.buildRangeModel(screenModel, { - size: 20, - y0: Q1, - y1: Q3, - class: 'range-Q1-Q3' - })); - - drawPart(this, self.buildRangeModel(screenModel, { - size: 20, - minHeight: 1, - y0: MAX, - y1: MAX, - class: 'limit-max' - })); - - drawPart(this, self.buildRangeModel(screenModel, { - size: 20, - minHeight: 1, - y0: MIN, - y1: MIN, - class: 'limit-min' - })); - - drawPart(this, self.buildRangeModel(screenModel, { - size: 20, - minHeight: 2, - y0: MEDIAN, - y1: MEDIAN, - color: '#ff0000', - class: 'limit-median' - })); - }; - - var frameGroups = container - .selectAll('.box-whiskers-node') - .data(tuples); - frameGroups - .exit() - .remove(); - frameGroups - .call(drawElement); - frameGroups - .enter() - .append('g') - .attr('class', 'box-whiskers-node') - .call(drawElement); - } - }, - 'ELEMENT.GENERIC.CARTESIAN'); - - function boxWhiskersPlot(xSettings) { - - xSettings = utils.defaults((xSettings || {}), {mode: 'outliers-only'}); - - return { - - init: function (chart) { - this._chart = chart; - }, - - onSpecReady: function (chart, specRef) { - - var flip = (xSettings.flip === true); - - specRef.transformations = specRef.transformations || {}; - - specRef.transformations.empty = function () { - return []; - }; - - specRef.transformations.outliers = function (data, props) { - - var x = props.x.dim; - var y = props.y.dim; - - var groups = data.reduce(function (memo, row) { - var k = row[x]; - memo[k] = memo[k] || []; - memo[k].push(row[y]); - return memo; - }, {}); - - var filters = Object.keys(groups).reduce(function (filters, k) { - - var stat = calculateStatistics(groups[k], {}, KEYS); - var max = stat[KEYS.MAX]; - var min = stat[KEYS.MIN]; - - return filters.concat(function (row) { - if (row[x] === k) { - return (row[y] > max) || (row[y] < min); - } - return true; - }); - }, []); - - return data.filter(function (row) { - var deny = filters.some(function (f) { - return !f(row); - }); - - return !deny; - }); - }; - - chart.traverseSpec( - specRef, - function (unit, parentUnit) { - - if (unit.type !== 'ELEMENT.POINT') { - return; - } - - var boxWhiskers = JSON.parse(JSON.stringify(unit)); - boxWhiskers.type = 'ELEMENT.BOX-WHISKERS'; - boxWhiskers.flip = flip; - boxWhiskers.namespace = 'boxwhiskers'; - boxWhiskers.guide = boxWhiskers.guide || {}; - boxWhiskers.guide.fitScale = (xSettings.mode === 'hide-scatter'); - - var strategies = { - 'show-scatter': [], - 'hide-scatter': [ - {type: 'empty'} - ], - 'outliers-only': [{ - type: 'outliers', - args: { - x: specRef.scales[flip ? unit.y : unit.x], - y: specRef.scales[flip ? unit.x : unit.y] - } - }] - }; - - unit.transformation = unit.transformation || []; - unit.transformation = unit.transformation.concat(strategies[xSettings.mode]); - - parentUnit.units.push(boxWhiskers); - }); - } - }; - } - - tauCharts.api.plugins.add('box-whiskers', boxWhiskersPlot); - - return boxWhiskersPlot; -}); diff --git a/build/development/plugins/tauCharts.crosshair.css b/build/development/plugins/tauCharts.crosshair.css deleted file mode 100644 index b8ba44f9c..000000000 --- a/build/development/plugins/tauCharts.crosshair.css +++ /dev/null @@ -1,222 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout .tau-crosshair__line { - shape-rendering: crispEdges; - stroke-dasharray: 1px 1px; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__label__text { - fill: #fff; - stroke: none; -} -.graphical-report__layout .tau-crosshair__label__text, -.graphical-report__layout .tau-crosshair__label__text-shadow { - font-size: 12px; - font-weight: normal; -} -.graphical-report__layout .tau-crosshair__line-shadow { - shape-rendering: crispEdges; - stroke: #fff; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { - transform: translateX(-0.5px); -} -.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { - transform: translateY(0.5px); -} -.graphical-report__layout .tau-crosshair__label__text-shadow { - stroke-linejoin: round; - stroke-width: 3px; - visibility: hidden; -} -.graphical-report__layout .tau-crosshair__label__box { - fill-opacity: 0.85; - rx: 3px; - ry: 3px; - stroke: none; -} -.graphical-report__layout .tau-crosshair__line.color20-1 { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { - fill: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__line.color20-2 { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { - fill: #DF2B59; -} -.graphical-report__layout .tau-crosshair__line.color20-3 { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { - fill: #66DA26; -} -.graphical-report__layout .tau-crosshair__line.color20-4 { - stroke: #4C3862; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { - stroke: #4C3862; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { - fill: #4C3862; -} -.graphical-report__layout .tau-crosshair__line.color20-5 { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { - fill: #E5B011; -} -.graphical-report__layout .tau-crosshair__line.color20-6 { - stroke: #3A3226; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { - stroke: #3A3226; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { - fill: #3A3226; -} -.graphical-report__layout .tau-crosshair__line.color20-7 { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { - fill: #CB461A; -} -.graphical-report__layout .tau-crosshair__line.color20-8 { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { - fill: #C7CE23; -} -.graphical-report__layout .tau-crosshair__line.color20-9 { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { - fill: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__line.color20-10 { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { - fill: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__line.color20-11 { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { - fill: #C84CCE; -} -.graphical-report__layout .tau-crosshair__line.color20-12 { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { - fill: #54762E; -} -.graphical-report__layout .tau-crosshair__line.color20-13 { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { - fill: #746BC9; -} -.graphical-report__layout .tau-crosshair__line.color20-14 { - stroke: #953441; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { - stroke: #953441; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { - fill: #953441; -} -.graphical-report__layout .tau-crosshair__line.color20-15 { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { - fill: #5C7A76; -} -.graphical-report__layout .tau-crosshair__line.color20-16 { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { - fill: #C8BF87; -} -.graphical-report__layout .tau-crosshair__line.color20-17 { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { - fill: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__line.color20-18 { - stroke: #8E5C31; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { - stroke: #8E5C31; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { - fill: #8E5C31; -} -.graphical-report__layout .tau-crosshair__line.color20-19 { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { - fill: #71CE7B; -} -.graphical-report__layout .tau-crosshair__line.color20-20 { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { - fill: #BE478B; -} diff --git a/build/development/plugins/tauCharts.crosshair.dark.css b/build/development/plugins/tauCharts.crosshair.dark.css deleted file mode 100644 index 6e36e2098..000000000 --- a/build/development/plugins/tauCharts.crosshair.dark.css +++ /dev/null @@ -1,222 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout .tau-crosshair__line { - shape-rendering: crispEdges; - stroke-dasharray: 1px 1px; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__label__text { - fill: #000; - stroke: none; -} -.graphical-report__layout .tau-crosshair__label__text, -.graphical-report__layout .tau-crosshair__label__text-shadow { - font-size: 12px; - font-weight: normal; -} -.graphical-report__layout .tau-crosshair__line-shadow { - shape-rendering: crispEdges; - stroke: #000; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { - transform: translateX(-0.5px); -} -.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { - transform: translateY(0.5px); -} -.graphical-report__layout .tau-crosshair__label__text-shadow { - stroke-linejoin: round; - stroke-width: 3px; - visibility: hidden; -} -.graphical-report__layout .tau-crosshair__label__box { - fill-opacity: 0.85; - rx: 3px; - ry: 3px; - stroke: none; -} -.graphical-report__layout .tau-crosshair__line.color20-1 { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { - fill: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__line.color20-2 { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { - fill: #DF2B59; -} -.graphical-report__layout .tau-crosshair__line.color20-3 { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { - fill: #66DA26; -} -.graphical-report__layout .tau-crosshair__line.color20-4 { - stroke: #755797; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { - stroke: #755797; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { - fill: #755797; -} -.graphical-report__layout .tau-crosshair__line.color20-5 { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { - fill: #E5B011; -} -.graphical-report__layout .tau-crosshair__line.color20-6 { - stroke: #746650; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { - stroke: #746650; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { - fill: #746650; -} -.graphical-report__layout .tau-crosshair__line.color20-7 { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { - fill: #CB461A; -} -.graphical-report__layout .tau-crosshair__line.color20-8 { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { - fill: #C7CE23; -} -.graphical-report__layout .tau-crosshair__line.color20-9 { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { - fill: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__line.color20-10 { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { - fill: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__line.color20-11 { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { - fill: #C84CCE; -} -.graphical-report__layout .tau-crosshair__line.color20-12 { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { - fill: #54762E; -} -.graphical-report__layout .tau-crosshair__line.color20-13 { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { - fill: #746BC9; -} -.graphical-report__layout .tau-crosshair__line.color20-14 { - stroke: #A43B49; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { - stroke: #A43B49; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { - fill: #A43B49; -} -.graphical-report__layout .tau-crosshair__line.color20-15 { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { - fill: #5C7A76; -} -.graphical-report__layout .tau-crosshair__line.color20-16 { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { - fill: #C8BF87; -} -.graphical-report__layout .tau-crosshair__line.color20-17 { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { - fill: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__line.color20-18 { - stroke: #AA7243; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { - stroke: #AA7243; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { - fill: #AA7243; -} -.graphical-report__layout .tau-crosshair__line.color20-19 { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { - fill: #71CE7B; -} -.graphical-report__layout .tau-crosshair__line.color20-20 { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { - fill: #BE478B; -} diff --git a/build/development/plugins/tauCharts.crosshair.default.css b/build/development/plugins/tauCharts.crosshair.default.css deleted file mode 100644 index b8ba44f9c..000000000 --- a/build/development/plugins/tauCharts.crosshair.default.css +++ /dev/null @@ -1,222 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout .tau-crosshair__line { - shape-rendering: crispEdges; - stroke-dasharray: 1px 1px; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__label__text { - fill: #fff; - stroke: none; -} -.graphical-report__layout .tau-crosshair__label__text, -.graphical-report__layout .tau-crosshair__label__text-shadow { - font-size: 12px; - font-weight: normal; -} -.graphical-report__layout .tau-crosshair__line-shadow { - shape-rendering: crispEdges; - stroke: #fff; - stroke-width: 1px; -} -.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { - transform: translateX(-0.5px); -} -.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { - transform: translateY(0.5px); -} -.graphical-report__layout .tau-crosshair__label__text-shadow { - stroke-linejoin: round; - stroke-width: 3px; - visibility: hidden; -} -.graphical-report__layout .tau-crosshair__label__box { - fill-opacity: 0.85; - rx: 3px; - ry: 3px; - stroke: none; -} -.graphical-report__layout .tau-crosshair__line.color20-1 { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { - stroke: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { - fill: #6FA1D9; -} -.graphical-report__layout .tau-crosshair__line.color20-2 { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { - stroke: #DF2B59; -} -.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { - fill: #DF2B59; -} -.graphical-report__layout .tau-crosshair__line.color20-3 { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { - stroke: #66DA26; -} -.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { - fill: #66DA26; -} -.graphical-report__layout .tau-crosshair__line.color20-4 { - stroke: #4C3862; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { - stroke: #4C3862; -} -.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { - fill: #4C3862; -} -.graphical-report__layout .tau-crosshair__line.color20-5 { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { - stroke: #E5B011; -} -.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { - fill: #E5B011; -} -.graphical-report__layout .tau-crosshair__line.color20-6 { - stroke: #3A3226; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { - stroke: #3A3226; -} -.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { - fill: #3A3226; -} -.graphical-report__layout .tau-crosshair__line.color20-7 { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { - stroke: #CB461A; -} -.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { - fill: #CB461A; -} -.graphical-report__layout .tau-crosshair__line.color20-8 { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { - stroke: #C7CE23; -} -.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { - fill: #C7CE23; -} -.graphical-report__layout .tau-crosshair__line.color20-9 { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { - stroke: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { - fill: #7FCDC2; -} -.graphical-report__layout .tau-crosshair__line.color20-10 { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { - stroke: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { - fill: #CCA1C8; -} -.graphical-report__layout .tau-crosshair__line.color20-11 { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { - stroke: #C84CCE; -} -.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { - fill: #C84CCE; -} -.graphical-report__layout .tau-crosshair__line.color20-12 { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { - stroke: #54762E; -} -.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { - fill: #54762E; -} -.graphical-report__layout .tau-crosshair__line.color20-13 { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { - stroke: #746BC9; -} -.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { - fill: #746BC9; -} -.graphical-report__layout .tau-crosshair__line.color20-14 { - stroke: #953441; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { - stroke: #953441; -} -.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { - fill: #953441; -} -.graphical-report__layout .tau-crosshair__line.color20-15 { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { - stroke: #5C7A76; -} -.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { - fill: #5C7A76; -} -.graphical-report__layout .tau-crosshair__line.color20-16 { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { - stroke: #C8BF87; -} -.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { - fill: #C8BF87; -} -.graphical-report__layout .tau-crosshair__line.color20-17 { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { - stroke: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { - fill: #BFC1C3; -} -.graphical-report__layout .tau-crosshair__line.color20-18 { - stroke: #8E5C31; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { - stroke: #8E5C31; -} -.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { - fill: #8E5C31; -} -.graphical-report__layout .tau-crosshair__line.color20-19 { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { - stroke: #71CE7B; -} -.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { - fill: #71CE7B; -} -.graphical-report__layout .tau-crosshair__line.color20-20 { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { - stroke: #BE478B; -} -.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { - fill: #BE478B; -} diff --git a/build/development/plugins/tauCharts.crosshair.js b/build/development/plugins/tauCharts.crosshair.js deleted file mode 100644 index d97cfc260..000000000 --- a/build/development/plugins/tauCharts.crosshair.js +++ /dev/null @@ -1,455 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var d3 = tauCharts.api.d3; - var utils = tauCharts.api.utils; - var svgUtils = tauCharts.api.svgUtils; - var pluginsSDK = tauCharts.api.pluginsSDK; - - function labelBox(options) { - - options = (options || {}); - - var node = document.createElementNS(d3.ns.prefix.svg, 'g'); - - var g = d3.select(node).attr('class', 'tau-crosshair__label'); - g.append('rect').attr('class', 'tau-crosshair__label__box'); - g.append('text').attr('class', 'tau-crosshair__label__text-shadow'); - g.append('text').attr('class', 'tau-crosshair__label__text'); - - var setValues = function (args) { - - var x = args.x; - var y = args.y; - var text = args.text; - var color = args.color; - var colorCls = args.colorCls; - - g.attr('class', 'tau-crosshair__label ' + colorCls); - - var halign = options.halign; - var valign = options.valign; - var hpad = options.hpad; - var vpad = options.vpad; - - var textAnchor = ({ - left: 'end', - middle: 'middle', - right: 'start' - }[halign]); - var textDx = ({ - left: -hpad, - middle: 0, - right: hpad - }[halign]); - - var t = g.select('.tau-crosshair__label__text') - .attr('fill', color); - var tAndBg = g.selectAll('.tau-crosshair__label__text, .tau-crosshair__label__text-shadow') - .attr('text-anchor', textAnchor) - .attr('x', x + textDx) - .attr('y', 0) - .text(text); - var textBBox = t.node().getBBox(); - var textDy = ({ - top: -vpad - textBBox.height / 2, - middle: 0, - bottom: vpad + textBBox.height / 2 - }[valign] - textBBox.height / 2 - textBBox.y); - tAndBg - .attr('y', y + textDy); - - var boxWidth = (textBBox.width + 2 * hpad); - var boxHeight = (textBBox.height + 2 * vpad); - var boxDx = ({ - left: -boxWidth, - middle: -boxWidth / 2, - right: 0 - }[halign]); - var boxDy = ({ - top: -boxHeight, - middle: -boxHeight / 2, - bottom: 0 - }[valign]); - - g.select('.tau-crosshair__label__box') - .attr('fill', color) - .attr('rx', options.boxCornerRadius) - .attr('ry', options.boxCornerRadius) - .attr('x', x + boxDx) - .attr('y', y + boxDy) - .attr('width', boxWidth) - .attr('height', boxHeight); - }; - - var fixOverflow = function () { - g.attr('transform', ''); - var view = options.chart.getLayout().contentContainer.getBoundingClientRect(); - var svg = options.chart.getSVG().getBoundingClientRect(); - var label = node.getBoundingClientRect(); - - var dx = ( - Math.max(0, Math.max(view.left, svg.left) - label.left) || - Math.min(0, Math.min(view.right, svg.right) - label.right) - ); - var dy = ( - Math.max(0, Math.max(view.top, svg.top) - label.top) || - Math.min(0, Math.min(view.bottom, svg.bottom) - label.bottom) - ); - g.attr('transform', 'translate(' + dx + ',' + dy + ')'); - }; - - var instance = { - - options: function (obj) { - options = Object.assign(options, obj); - return instance; - }, - - show: function (args) { - options.container.appendChild(node); - setValues(args); - fixOverflow(); - return instance; - }, - - hide: function () { - if (node.parentNode) { - node.parentNode.removeChild(node); - } - return instance; - } - }; - - return instance; - } - - function Crosshair(xSettings) { - - var settings = utils.defaults( - xSettings || {}, - { - xAxis: true, - yAxis: true, - formatters: {}, - labelBoxHPadding: 5, - labelBoxVPadding: 3, - labelBoxCornerRadius: 3, - axisHPadding: 22, - axisVPadding: 22 - }); - - var plugin = { - - init: function (chart) { - - this._chart = chart; - this._formatters = {}; - - this._createNode(); - - }, - - _createNode: function () { - - var root = d3.select( - document.createElementNS(d3.ns.prefix.svg, 'g')) - .attr('class', 'tau-crosshair'); - this._labels = {x: null, y: null}; - var createAxisNode = function (dir) { - var g = root.append('g').attr('class', 'tau-crosshair__group ' + dir); - g.append('line').attr('class', 'tau-crosshair__line-shadow'); - g.append('line').attr('class', 'tau-crosshair__line'); - - this._labels[dir] = labelBox({ - container: g.node(), - chart: this._chart, - halign: dir === 'x' ? 'middle' : 'left', - valign: dir === 'x' ? 'bottom' : 'middle', - boxCornerRadius: settings.labelBoxCornerRadius, - hpad: settings.labelBoxHPadding, - vpad: settings.labelBoxVPadding - }); - }.bind(this); - - if (settings.xAxis) { - createAxisNode('x'); - } - if (settings.yAxis) { - createAxisNode('y'); - } - - this._element = root; - }, - - _setValues: function (xData, yData, colorData) { - - var setCrosshairGroupValues = function (data) { - - var g = this._element.select('.tau-crosshair__group.' + data.dir); - - g.select('.tau-crosshair__line') - .attr('class', 'tau-crosshair__line ' + colorData.cls) - .attr('stroke', colorData.color); - g.selectAll('.tau-crosshair__line, .tau-crosshair__line-shadow') - .attr('x1', data.startPt.x) - .attr('x2', data.valuePt.x) - .attr('y1', data.startPt.y) - .attr('y2', data.valuePt.y); - - if ( - (data.dir === 'x' && settings.xAxis) || - (data.dir === 'y' && settings.yAxis) - ) { - this._labels[data.dir] - .options({ - halign: data.labelHAlign, - valign: data.labelVAlign - }) - .show({ - x: data.startPt.x, - y: data.startPt.y, - text: data.label, - color: colorData.color, - colorCls: colorData.cls - }); - } - - }.bind(this); - - setCrosshairGroupValues({ - dir: 'x', - startPt: { - x: xData.value, - y: yData.start + (xData.minMode ? 0 : settings.axisVPadding) - }, - valuePt: { - x: xData.value, - y: yData.value + yData.crossPadding - }, - label: xData.label, - labelHAlign: 'middle', - labelVAlign: 'bottom' - }); - - setCrosshairGroupValues({ - dir: 'y', - startPt: { - x: xData.start - (yData.minMode ? 0 : settings.axisHPadding), - y: yData.value - }, - valuePt: { - x: xData.value - xData.crossPadding, - y: yData.value - }, - label: yData.label, - labelHAlign: 'left', - labelVAlign: 'middle' - }); - }, - - _showCrosshair: function (e, unit, parentUnit) { - var svg = this._chart.getSVG(); - var target = unit.config.options.container.node(); - var translate = svgUtils.getDeepTransformTranslate(target); - this._element.attr('transform', svgUtils.translate(translate.x, translate.y)); - svg.appendChild(this._element.node()); - - var scaleX = unit.getScale('x'); - var scaleY = unit.getScale('y'); - var scaleColor = unit.getScale('color'); - var color = scaleColor(e.data[scaleColor.dim]); - var xValue = e.data[scaleX.dim]; - var yValue = e.data[scaleY.dim]; - var ex = unit.screenModel.x(e.data); - var ey = unit.screenModel.y(e.data); - if (unit.config.stack) { - if (unit.config.flip) { - var xSameSign = unit.data().filter(function (d) { - var dy = d[scaleY.dim]; - return ( - (d === e.data) || - ((dy === yValue) || (dy - yValue === 0)) && - ((unit.screenModel.x(e.data) - unit.screenModel.x(d)) * d[scaleX.dim] > 0) - ); - }); - ex = (xValue < 0 ? Math.min : Math.max).apply(null, xSameSign.map(function (d) { - return unit.screenModel.x(d); - }, 0)); - xValue = xSameSign.reduce(function (total, d) { - return (total + d[scaleX.dim]); - }, 0); - } else { - var ySameSign = unit.data().filter(function (d) { - var dx = d[scaleX.dim]; - return ( - (d === e.data) || - ((dx === xValue) || (dx - xValue === 0)) && - ((unit.screenModel.y(d) - unit.screenModel.y(e.data)) * d[scaleY.dim] > 0) - ); - }); - ey = (yValue < 0 ? Math.max : Math.min).apply(null, ySameSign.map(function (d) { - return unit.screenModel.y(d); - }, 0)); - yValue = ySameSign.reduce(function (total, d) { - return (total + d[scaleY.dim]); - }, 0); - } - } - - var box = e.node.getBBox(); - var pad = (function getCrossPadding() { - if (unit.config.type === 'ELEMENT.INTERVAL' || - unit.config.type === 'ELEMENT.INTERVAL.STACKED') { - return { - x: (box.width * (unit.config.flip ? xValue > 0 ? 1 : 0 : 0.5)), - y: (box.height * (unit.config.flip ? 0.5 : yValue > 0 ? 1 : 0)) - }; - } - return { - x: (box.width / 2), - y: (box.height / 2) - }; - })(); - - this._setValues( - { - label: this._getFormat(scaleX.dim)(xValue), - start: 0, - value: ex, - crossPadding: pad.x, - minMode: (parentUnit && parentUnit.guide.x.hide) - }, - { - label: this._getFormat(scaleY.dim)(yValue), - start: unit.config.options.height, - value: ey, - crossPadding: pad.y, - minMode: (parentUnit && parentUnit.guide.y.hide) - }, - { - cls: (scaleColor.toColor(color) ? '' : color), - color: (scaleColor.toColor(color) ? color : '') - } - ); - }, - - _hideCrosshair: function () { - var el = this._element.node(); - if (el.parentNode) { - el.parentNode.removeChild(el); - } - }, - - destroy: function () { - this._hideCrosshair(); - }, - - _subscribeToHover: function () { - - var elementsToMatch = [ - 'ELEMENT.LINE', - 'ELEMENT.AREA', - 'ELEMENT.PATH', - 'ELEMENT.INTERVAL', - 'ELEMENT.INTERVAL.STACKED', - 'ELEMENT.POINT' - ]; - - this._chart - .select(function (node) { - return (elementsToMatch.indexOf(node.config.type) >= 0); - }) - .forEach(function (node) { - - node.on('data-hover', function (unit, e) { - if (!e.data) { - this._hideCrosshair(); - return; - } - if (unit.data().indexOf(e.data) >= 0) { - var parentUnit = pluginsSDK.getParentUnit(this._chart.getSpec(), unit.config); - this._showCrosshair(e, unit, parentUnit); - } - }.bind(this)); - }, this); - }, - - _getFormat: function (k) { - var info = this._formatters[k] || { - format: function (x) { - return String(x); - } - }; - return info.format; - }, - - onRender: function () { - - this._formatters = this._getFormatters(); - this._subscribeToHover(); - }, - - _getFormatters: function () { - - var info = pluginsSDK.extractFieldsFormatInfo(this._chart.getSpec()); - Object.keys(info).forEach(function (k) { - if (info[k].parentField) { - delete info[k]; - } - }); - - var toLabelValuePair = function (x) { - - var res = {}; - - if (typeof x === 'function' || typeof x === 'string') { - res = {format: x}; - } else if (utils.isObject(x)) { - res = utils.pick(x, 'label', 'format', 'nullAlias'); - } - - return res; - }; - - Object.keys(settings.formatters).forEach(function (k) { - - var fmt = toLabelValuePair(settings.formatters[k]); - - info[k] = Object.assign( - ({label: k, nullAlias: ('No ' + k)}), - (info[k] || {}), - (utils.pick(fmt, 'label', 'nullAlias'))); - - if (fmt.hasOwnProperty('format')) { - info[k].format = (typeof fmt.format === 'function') ? - (fmt.format) : - (tauCharts.api.tickFormat.get(fmt.format, info[k].nullAlias)); - } else { - info[k].format = (info[k].hasOwnProperty('format')) ? - (info[k].format) : - (tauCharts.api.tickFormat.get(null, info[k].nullAlias)); - } - }); - - return info; - } - }; - - return plugin; - } - - tauCharts.api.plugins.add('crosshair', Crosshair); - - return Crosshair; -}); \ No newline at end of file diff --git a/build/development/plugins/tauCharts.export.default.css b/build/development/plugins/tauCharts.export.default.css deleted file mode 100644 index 986f50287..000000000 --- a/build/development/plugins/tauCharts.export.default.css +++ /dev/null @@ -1,52 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__print-block { - display: none; -} -.graphical-report__export { - float: right; - margin: 0 20px 0 0; - display: block; - text-indent: 20px; - overflow: hidden; - background-repeat: no-repeat; - background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=); - width: 20px; - height: 20px; - color: transparent; - opacity: 0.6; - cursor: pointer; - text-decoration: none; - position: relative; - z-index: 2; -} -.graphical-report__export:hover { - opacity: 1; - text-decoration: none; -} -.graphical-report__export__list { - font-size: 11px; - margin: 0; - padding: 0; -} -.graphical-report__export__item { - overflow: hidden; - box-sizing: border-box; -} -.graphical-report__export__item > a { - display: block; - padding: 7px 15px; - color: inherit; - text-decoration: none; - cursor: pointer; -} -.graphical-report__export__item > a:hover, -.graphical-report__export__item > a:focus { - background: #EAF2FC; - outline: none; - box-shadow: none; -} diff --git a/build/development/plugins/tauCharts.export.js b/build/development/plugins/tauCharts.export.js deleted file mode 100644 index 120bfbf4d..000000000 --- a/build/development/plugins/tauCharts.export.js +++ /dev/null @@ -1,6484 +0,0 @@ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("taucharts")); - else if(typeof define === 'function' && define.amd) - define(["taucharts"], factory); - else if(typeof exports === 'object') - exports["exportTo"] = factory(require("taucharts")); - else - root["exportTo"] = factory(root["tauCharts"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;'use strict'; - - (function (factory) { - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1), __webpack_require__(2), __webpack_require__(5), __webpack_require__(6), __webpack_require__(10), __webpack_require__(11)], __WEBPACK_AMD_DEFINE_RESULT__ = function (tauPlugins, canvg, saveAs, Promise, printCss) { - window.Promise = window.Promise || Promise.Promise; - return factory(tauPlugins, canvg, saveAs, window.Promise, printCss); - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else { - factory(this.tauCharts, this.canvg, this.saveAs); - } - })(function (tauCharts, canvg, saveAs, Promise, printCss) { - var d3 = tauCharts.api.d3; - var utils = tauCharts.api.utils; - var pluginsSDK = tauCharts.api.pluginsSDK; - var tokens = pluginsSDK.tokens(); - - var trimChar = function trimChar(str, char) { - // return str.replace(/^\s+|\s+$/g, ''); - return str.replace(new RegExp('^' + char + '+|' + char + '+$', 'g'), ''); - }; - - var doEven = function doEven(n) { - n = Math.round(n); - return n % 2 ? n + 1 : n; - }; - - var isEmpty = function isEmpty(x) { - return x === null || x === '' || typeof x === 'undefined'; - }; - - function log10(x) { - return Math.log(x) / Math.LN10; - } - - var keyCode = { - BACKSPACE: 8, - COMMA: 188, - DELETE: 46, - DOWN: 40, - END: 35, - ENTER: 13, - ESCAPE: 27, - HOME: 36, - LEFT: 37, - PAGE_DOWN: 34, - PAGE_UP: 33, - PERIOD: 190, - RIGHT: 39, - SPACE: 32, - TAB: 9, - UP: 38 - }; - - var createStyleElement = function createStyleElement(styles, mediaType) { - mediaType = mediaType || 'all'; - var style = document.createElement('style'); - style.setAttribute('media', mediaType); - style.innerHTML = styles; - return style; - }; - - var printStyles = createStyleElement(printCss, 'print'); - var imagePlaceHolder; - var removePrintStyles = function removePrintStyles() { - if (printStyles && printStyles.parentNode) { - printStyles.parentNode.removeChild(printStyles); - } - if (imagePlaceHolder && imagePlaceHolder.parentNode) { - imagePlaceHolder.parentNode.removeChild(imagePlaceHolder); - } - }; - - var isPhantomJS = /PhantomJS/.test(navigator.userAgent); - - if (!isPhantomJS) { - if ('onafterprint' in window) { - window.addEventListener('afterprint', removePrintStyles); - } else { - window.matchMedia('screen').addListener(function (exp) { - if (exp.matches) { - removePrintStyles(); - } - }); - } - } - - // http://jsfiddle.net/kimiliini/HM4rW/show/light/ - var downloadExportFile = function downloadExportFile(fileName, type, strContent) { - var utf8BOM = '%ef%bb%bf'; - var content = 'data:' + type + ';charset=UTF-8,' + utf8BOM + encodeURIComponent(strContent); - - var link = document.createElement('a'); - link.setAttribute('href', content); - link.setAttribute('download', fileName); - link.setAttribute('target', '_new'); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); - link = null; - }; - - var fixSVGForCanvgCompatibility = function fixSVGForCanvgCompatibility(svg) { - [].slice.call(svg.querySelectorAll('text.label')).forEach(function (textNode) { - textNode.innerHTML = [].slice.call(textNode.querySelectorAll('tspan')).reduce(function (memo, node) { - var partText = node.value || node.text || node.textContent || ''; - partText = partText.charAt(0).toUpperCase() + partText.substr(1); - return memo + partText; - }, ''); - }); - - return svg; - }; - - var getGuideLabel = function getGuideLabel(guide, key, defaultLabel) { - - defaultLabel = defaultLabel == null ? '' : String(defaultLabel); - var kGuide = (guide || {})[key] || {}; - var kLabel = utils.isObject(kGuide.label) ? kGuide.label.text : kGuide.label; - - return kLabel || defaultLabel; - }; - - function exportTo(settings) { - return { - - onRender: function onRender() { - this._info = pluginsSDK.extractFieldsFormatInfo(this._chart.getSpec()); - }, - - _normalizeExportFields: function _normalizeExportFields(fields, excludeFields) { - var info = this._info; - - return fields.map(function (token) { - - var r = token; - var fieldInfo = info[token] || {}; - - if (typeof token === 'string') { - r = { - field: token, - title: fieldInfo.label || token - }; - } - - if (typeof r.value !== 'function') { - r.value = function (row) { - var fieldValue = row[this.field]; - return fieldInfo.isComplexField ? (fieldValue || {})[fieldInfo.tickLabel] : fieldValue; - }; - } - - return r; - }).filter(function (item) { - return !excludeFields.find(function (exFieldName) { - return item.field === exFieldName; - }); - }); - }, - - _createDataUrl: function _createDataUrl(chart) { - var cssPromises = this._cssPaths.map(function (css) { - return fetch(css).then(function (r) { - return r.text(); - }); - }); - return Promise.all(cssPromises).then(function (res) { - return res.join(' ').replace(/&/g, ''); - }).then(function (res) { - var style = createStyleElement(res); - var div = document.createElement('div'); - chart.fire('beforeExportSVGNode'); - var svg = chart.getSVG().cloneNode(true); - chart.fire('afterExportSVGNode'); - div.appendChild(fixSVGForCanvgCompatibility(svg)); - d3.select(svg).attr('version', 1.1).attr('xmlns', 'http://www.w3.org/2000/svg'); - svg.insertBefore(style, svg.firstChild); - this._renderAdditionalInfo(svg, chart); - this._addBackground(svg, this._backgroundColor); - var canvas = document.createElement('canvas'); - canvas.height = svg.getAttribute('height'); - canvas.width = svg.getAttribute('width'); - return new Promise(function (resolve) { - canvg(canvas, svg.parentNode.innerHTML, { - renderCallback: function renderCallback(dom) { - var domStr = new XMLSerializer().serializeToString(dom); - var isError = domStr.substring(0, 5).toLowerCase() === '= 0; - })); - origStr = needEncoding ? '"' + trimStr + '"' : trimStr; - } - - return csvRow.concat(origStr); - }, []).join(separator)); - }, [fields.map(function (f) { - return f.title; - }).join(separator)]).join('\r\n'); - - var fileName = (this._fileName || 'export') + '.csv'; - - downloadExportFile(fileName, 'text/csv', csv); - }, - - _renderFillLegend: function _renderFillLegend(configUnit, svg, chart, width) { - - var splitEvenly = function splitEvenly(domain, parts) { - var min = domain[0]; - var max = domain[1]; - var segment = (max - min) / (parts - 1); - var chunks = utils.range(parts - 2).map(function (n) { - return min + segment * (n + 1); - }); - return [min].concat(chunks).concat(max); - }; - - var fillScale = this._unit.getScale('color'); - var title = getGuideLabel(configUnit.guide, 'color', fillScale.dim).toUpperCase(); - var titleStyle = 'text-transform:uppercase;font-weight:600;font-size:' + settings.fontSize + 'px'; - - var domain = fillScale.domain().sort(function (a, b) { - return a - b; - }); - var brewerLength = fillScale.brewer.length; - var labelsLength = 3; - var height = 120; - var fontHeight = settings.fontSize; - var titlePadding = 20; - - var stops = splitEvenly(domain, brewerLength).reverse().map(function (x, i) { - var p = i / (brewerLength - 1) * 100; - return ''; - }); - - var labels = splitEvenly(domain, labelsLength).reverse().map(function (x, i, list) { - var p = i / (labelsLength - 1); - var vPad = 0.5 * (i === 0 ? fontHeight : i === list.length - 1 ? -fontHeight : 0); - var y = (height - titlePadding) * p + vPad + fontHeight / 2; - return '' + x + ''; - }); - - var gradient = ['', ' ', ' ', stops.join(''), ' ', ' ', ' ' + title + '', ' ', ' ', ' ', labels.join(''), ' ', ' Sorry, your browser does not support inline SVG.', ''].join(''); - - // insert to live document before attaching to export SVG (IE9 issue) - var doc = new DOMParser().parseFromString(gradient, 'application/xml').documentElement; - document.body.appendChild(doc); - - svg.append('g').attr('class', 'legend').attr('transform', 'translate(' + (width + 10) + ',' + settings.paddingTop + ')').node().appendChild(doc); - - return { h: height, w: 0 }; - }, - - _renderColorLegend: function _renderColorLegend(configUnit, svg, chart, width) { - - var colorScale = this._unit.getScale('color'); - var colorScaleName = getGuideLabel(configUnit.guide, 'color', colorScale.dim).toUpperCase(); - - var data = this._getColorMap(chart.getChartModelData({ excludeFilter: ['legend'] }), colorScale, colorScale.dim).values; - - var draw = function draw() { - - this.attr('transform', function (d, index) { - return 'translate(5,' + 20 * (index + 1) + ')'; - }); - - this.append('circle').attr('r', 6).attr('fill', function (d) { - return colorScale.toColor(d.color); - }).attr('class', function (d) { - return colorScale.toClass(d.color); - }); - - this.append('text').attr('x', 12).attr('y', 5).text(function (d) { - return utils.escape(isEmpty(d.label) ? 'No ' + colorScaleName : d.label); - }).style({ 'font-size': settings.fontSize + 'px' }); - }; - - var container = svg.append('g').attr('class', 'legend').attr('transform', 'translate(' + (width + 10) + ',' + settings.paddingTop + ')'); - - container.append('text').text(colorScaleName.toUpperCase()).style({ - 'text-transform': 'uppercase', - 'font-weight': '600', - 'font-size': settings.fontSize + 'px' - }); - - container.selectAll('g').data(data).enter().append('g').call(draw); - - return { h: data.length * 20, w: 0 }; - }, - - _renderSizeLegend: function _renderSizeLegend(configUnit, svg, chart, width, offset) { - - var sizeScale = this._unit.getScale('size'); - var sizeScaleName = getGuideLabel(configUnit.guide, 'size', sizeScale.dim).toUpperCase(); - - var chartData = chart.getChartModelData().sort(function (x1, x2) { - return sizeScale(x1[sizeScale.dim]) - sizeScale(x2[sizeScale.dim]); - }); - - var chartDataLength = chartData.length; - var first = chartData[0][sizeScale.dim]; - var last = chartData[chartDataLength - 1][sizeScale.dim]; - var values; - if (last - first) { - var count = log10(last - first); - var xF = 4 - count < 0 ? 0 : Math.round(4 - count); - var base = Math.pow(10, xF); - var step = (last - first) / 5; - values = utils.unique([first, first + step, first + step * 2, first + step * 3, last].map(function (x) { - return x === last || x === first ? x : Math.round(x * base) / base; - })); - } else { - values = [first]; - } - - var data = values.map(function (value) { - var diameter = sizeScale(value); - var radius = diameter / 2; - return { - diameter: doEven(diameter + 2), - radius: radius, - value: value, - className: configUnit.color ? 'color-definite' : '' - }; - }.bind(this)).reverse(); - - var maxDiameter = Math.max.apply(null, data.map(function (x) { - return x.diameter; - })); - var fontSize = settings.fontSize; - - var offsetInner = 0; - var draw = function draw() { - - this.attr('transform', function () { - offsetInner += maxDiameter; - var transform = 'translate(5,' + offsetInner + ')'; - offsetInner += 10; - return transform; - }); - - this.append('circle').attr({ - r: function r(d) { - return d.radius; - }, - class: function _class(d) { - return d.className; - } - }).style({ opacity: 0.4 }); - - this.append('g').attr('transform', function () { - return 'translate(' + maxDiameter + ',' + fontSize / 2 + ')'; - }).append('text').attr({ x: 0, y: 0 }).text(function (d) { - return d.value; - }).style({ 'font-size': fontSize + 'px' }); - }; - - var container = svg.append('g').attr('class', 'legend').attr('transform', 'translate(' + (width + 10) + ',' + (settings.paddingTop + offset.h + 20) + ')'); - - container.append('text').text(sizeScaleName.toUpperCase()).style({ - 'text-transform': 'uppercase', - 'font-weight': '600', - 'font-size': fontSize + 'px' - }); - - container.selectAll('g').data(data).enter().append('g').call(draw); - }, - - _renderAdditionalInfo: function _renderAdditionalInfo(svg, chart) { - var configUnit = this._findUnit(chart); - if (!configUnit) { - return; - } - - var offset = { h: 0, w: 0 }; - svg = d3.select(svg); - var width = parseInt(svg.attr('width'), 10); - var height = svg.attr('height'); - svg.attr('width', width + 160); - - var colorScale = chart.getScaleInfo(configUnit.color); - if (colorScale.dim && !colorScale.discrete) { - // draw gradient - var offsetFillLegend = this._renderFillLegend(configUnit, svg, chart, width); - offset.h = offsetFillLegend.h + 20; - offset.w = offsetFillLegend.w; - } - - if (colorScale.dim && colorScale.discrete) { - var offsetColorLegend = this._renderColorLegend(configUnit, svg, chart, width); - offset.h = offsetColorLegend.h + 20; - offset.w = offsetColorLegend.w; - } - - var sizeScale = chart.getScaleInfo(configUnit.size); - if (sizeScale.dim && !sizeScale.discrete) { - this._renderSizeLegend(configUnit, svg, chart, width, offset); - } - }, - - _addBackground: function _addBackground(svg, color) { - if (!color || color === 'transparent') { - return; - } - var rect = document.createElementNS('http://www.w3.org/2000/svg', 'rect'); - rect.setAttribute('fill', color); - rect.setAttribute('x', 0); - rect.setAttribute('y', 0); - rect.setAttribute('width', svg.getAttribute('width')); - rect.setAttribute('height', svg.getAttribute('height')); - svg.insertBefore(rect, svg.firstChild); - }, - - onUnitDraw: function onUnitDraw(chart, unit) { - if (tauCharts.api.isChartElement(unit) && unit.config.namespace === 'chart') { - this._unit = unit; - } - }, - - _getColorMap: function _getColorMap(data, colorScale, colorDimension) { - - return utils.unique(data.map(function (item) { - var value = item[colorDimension]; - return { color: colorScale(value), value: value, label: value }; - }), function (legendItem) { - return legendItem.value; - }).reduce(function (memo, item) { - memo.brewer[item.value] = item.color; - memo.values.push(item); - return memo; - }, { brewer: {}, values: [] }); - }, - - _select: function _select(value, chart) { - value = value || ''; - var method = this['_to' + value.charAt(0).toUpperCase() + value.slice(1)]; - if (method) { - method.call(this, chart); - } - }, - - _handleMenu: function _handleMenu(popupElement, chart, popup) { - popupElement.addEventListener('click', function (e) { - if (e.target.tagName.toLowerCase() === 'a') { - var value = e.target.getAttribute('data-value'); - this._select(value, chart); - popup.hide(); - } - }.bind(this)); - popupElement.addEventListener('mouseover', function (e) { - if (e.target.tagName.toLowerCase() === 'a') { - e.target.focus(); - } - }.bind(this)); - - popupElement.addEventListener('keydown', function (e) { - if (e.keyCode === keyCode.ESCAPE) { - popup.hide(); - } - if (e.keyCode === keyCode.DOWN) { - if (e.target.parentNode.nextSibling) { - e.target.parentNode.nextSibling.childNodes[0].focus(); - } else { - e.target.parentNode.parentNode.firstChild.childNodes[0].focus(); - } - } - if (e.keyCode === keyCode.UP) { - if (e.target.parentNode.previousSibling) { - e.target.parentNode.previousSibling.childNodes[0].focus(); - } else { - e.target.parentNode.parentNode.lastChild.childNodes[0].focus(); - } - } - if (e.keyCode === keyCode.ENTER) { - var value = e.target.getAttribute('data-value'); - this._select(value, chart); - } - e.preventDefault(); - }.bind(this)); - var timeoutID = null; - - var onBlur = function onBlur() { - timeoutID = setTimeout(function () { - popup.hide(); - }, 100); - }; - var onFocus = function onFocus() { - clearTimeout(timeoutID); - }; - var onClick = function onClick() { - popup.toggle(); - if (!popup.hidden) { - popupElement.querySelectorAll('a')[0].focus(); - } - }; - popupElement.addEventListener('blur', onBlur, true); - popupElement.addEventListener('focus', onFocus, true); - this._container.addEventListener('click', onClick); - this._onDestroy(function () { - popupElement.removeEventListener('blur', onBlur, true); - popupElement.removeEventListener('focus', onFocus, true); - this._container.removeEventListener('click', onClick); - clearTimeout(timeoutID); - }); - }, - - init: function init(chart) { - settings = settings || {}; - settings = utils.defaults(settings, { - backgroundColor: 'white', - visible: true, - fontSize: 13, - paddingTop: 30 - }); - - this._chart = chart; - this._info = {}; - this._cssPaths = settings.cssPaths; - this._fileName = settings.fileName; - this._backgroundColor = settings.backgroundColor || 'white'; - this._destroyListeners = []; - - this._csvSeparator = settings.csvSeparator || ','; - this._exportFields = settings.exportFields || []; - this._appendFields = settings.appendFields || []; - this._excludeFields = settings.excludeFields || []; - - if (!this._cssPaths) { - this._cssPaths = []; - tauCharts.api.globalSettings.log('[export plugin]: the "cssPath" parameter should be specified for correct operation', 'warn'); - } - - var menuStyle = settings.visible ? '' : 'display:none'; - this._container = chart.insertToHeader('Export'); - var popup = chart.addBalloon({ - place: 'bottom-left' - }); - // jscs:disable maximumLineLength - popup.content([''].join('')); - // jscs:enable maximumLineLength - popup.attach(this._container); - var popupElement = popup.getElement(); - popupElement.setAttribute('tabindex', '-1'); - this._handleMenu(popupElement, chart, popup); - chart.on('exportTo', function (chart, type) { - this._select(type, chart); - }.bind(this)); - this._onDestroy(function () { - popup.destroy(); - }); - }, - - _onDestroy: function _onDestroy(listener) { - this._destroyListeners.push(listener); - }, - - destroy: function destroy() { - this._destroyListeners.forEach(function (listener) { - listener.call(this); - }, this); - } - }; - } - - tauCharts.api.plugins.add('exportTo', exportTo); - - return exportTo; - }); - -/***/ }, -/* 1 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_1__; - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/* - * canvg.js - Javascript SVG parser and renderer on Canvas - * MIT Licensed - * Gabe Lerner (gabelerner@gmail.com) - * http://code.google.com/p/canvg/ - * - * Requires: rgbcolor.js - http://www.phpied.com/rgb-color-parser-in-javascript/ - */ - (function ( global, factory ) { - - 'use strict'; - - // export as AMD... - if ( true ) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(3), __webpack_require__(4) ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - - // ...or as browserify - else if ( typeof module !== 'undefined' && module.exports ) { - module.exports = factory( require( 'rgbcolor' ), require( 'stackblur' ) ); - } - - global.canvg = factory( global.RGBColor, global.stackBlur ); - - }( typeof window !== 'undefined' ? window : this, function ( RGBColor, stackBlur ) { - - // canvg(target, s) - // empty parameters: replace all 'svg' elements on page with 'canvas' elements - // target: canvas element or the id of a canvas element - // s: svg string, url to svg file, or xml document - // opts: optional hash of options - // ignoreMouse: true => ignore mouse events - // ignoreAnimation: true => ignore animations - // ignoreDimensions: true => does not try to resize canvas - // ignoreClear: true => does not clear canvas - // offsetX: int => draws at a x offset - // offsetY: int => draws at a y offset - // scaleWidth: int => scales horizontally to width - // scaleHeight: int => scales vertically to height - // renderCallback: function => will call the function after the first render is completed - // forceRedraw: function => will call the function on every frame, if it returns true, will redraw - var canvg = function (target, s, opts) { - // no parameters - if (target == null && s == null && opts == null) { - var svgTags = document.querySelectorAll('svg'); - for (var i=0; i~\.\[:]+)/g; - var classRegex = /(\.[^\s\+>~\.\[:]+)/g; - var pseudoElementRegex = /(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi; - var pseudoClassWithBracketsRegex = /(:[\w-]+\([^\)]*\))/gi; - var pseudoClassRegex = /(:[^\s\+>~\.\[:]+)/g; - var elementRegex = /([^\s\+>~\.\[:]+)/g; - function getSelectorSpecificity(selector) { - var typeCount = [0, 0, 0]; - var findMatch = function(regex, type) { - var matches = selector.match(regex); - if (matches == null) { - return; - } - typeCount[type] += matches.length; - selector = selector.replace(regex, ' '); - }; - - selector = selector.replace(/:not\(([^\)]*)\)/g, ' $1 '); - selector = selector.replace(/{[^]*/gm, ' '); - findMatch(attributeRegex, 1); - findMatch(idRegex, 0); - findMatch(classRegex, 1); - findMatch(pseudoElementRegex, 2); - findMatch(pseudoClassWithBracketsRegex, 1); - findMatch(pseudoClassRegex, 1); - selector = selector.replace(/[\*\s\+>~]/g, ' '); - selector = selector.replace(/[#\.]/g, ' '); - findMatch(elementRegex, 2); - return typeCount.join(''); - } - - function build(opts) { - var svg = { opts: opts }; - - svg.FRAMERATE = 30; - svg.MAX_VIRTUAL_PIXELS = 30000; - - svg.log = function(msg) {}; - if (svg.opts['log'] == true && typeof(console) != 'undefined') { - svg.log = function(msg) { console.log(msg); }; - }; - - // globals - svg.init = function(ctx) { - var uniqueId = 0; - svg.UniqueId = function () { uniqueId++; return 'canvg' + uniqueId; }; - svg.Definitions = {}; - svg.Styles = {}; - svg.StylesSpecificity = {}; - svg.Animations = []; - svg.Images = []; - svg.ctx = ctx; - svg.ViewPort = new (function () { - this.viewPorts = []; - this.Clear = function() { this.viewPorts = []; } - this.SetCurrent = function(width, height) { this.viewPorts.push({ width: width, height: height }); } - this.RemoveCurrent = function() { this.viewPorts.pop(); } - this.Current = function() { return this.viewPorts[this.viewPorts.length - 1]; } - this.width = function() { return this.Current().width; } - this.height = function() { return this.Current().height; } - this.ComputeSize = function(d) { - if (d != null && typeof(d) == 'number') return d; - if (d == 'x') return this.width(); - if (d == 'y') return this.height(); - return Math.sqrt(Math.pow(this.width(), 2) + Math.pow(this.height(), 2)) / Math.sqrt(2); - } - }); - } - svg.init(); - - // images loaded - svg.ImagesLoaded = function() { - for (var i=0; i]*>/, ''); - var xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); - xmlDoc.async = 'false'; - xmlDoc.loadXML(xml); - return xmlDoc; - } - } - - svg.Property = function(name, value) { - this.name = name; - this.value = value; - } - svg.Property.prototype.getValue = function() { - return this.value; - } - - svg.Property.prototype.hasValue = function() { - return (this.value != null && this.value !== ''); - } - - // return the numerical value of the property - svg.Property.prototype.numValue = function() { - if (!this.hasValue()) return 0; - - var n = parseFloat(this.value); - if ((this.value + '').match(/%$/)) { - n = n / 100.0; - } - return n; - } - - svg.Property.prototype.valueOrDefault = function(def) { - if (this.hasValue()) return this.value; - return def; - } - - svg.Property.prototype.numValueOrDefault = function(def) { - if (this.hasValue()) return this.numValue(); - return def; - } - - // color extensions - // augment the current color value with the opacity - svg.Property.prototype.addOpacity = function(opacityProp) { - var newValue = this.value; - if (opacityProp.value != null && opacityProp.value != '' && typeof(this.value)=='string') { // can only add opacity to colors, not patterns - var color = new RGBColor(this.value); - if (color.ok) { - newValue = 'rgba(' + color.r + ', ' + color.g + ', ' + color.b + ', ' + opacityProp.numValue() + ')'; - } - } - return new svg.Property(this.name, newValue); - } - - // definition extensions - // get the definition from the definitions table - svg.Property.prototype.getDefinition = function() { - var name = this.value.match(/#([^\)'"]+)/); - if (name) { name = name[1]; } - if (!name) { name = this.value; } - return svg.Definitions[name]; - } - - svg.Property.prototype.isUrlDefinition = function() { - return this.value.indexOf('url(') == 0 - } - - svg.Property.prototype.getFillStyleDefinition = function(e, opacityProp) { - var def = this.getDefinition(); - - // gradient - if (def != null && def.createGradient) { - return def.createGradient(svg.ctx, e, opacityProp); - } - - // pattern - if (def != null && def.createPattern) { - if (def.getHrefAttribute().hasValue()) { - var pt = def.attribute('patternTransform'); - def = def.getHrefAttribute().getDefinition(); - if (pt.hasValue()) { def.attribute('patternTransform', true).value = pt.value; } - } - return def.createPattern(svg.ctx, e); - } - - return null; - } - - // length extensions - svg.Property.prototype.getDPI = function(viewPort) { - return 96.0; // TODO: compute? - } - - svg.Property.prototype.getEM = function(viewPort) { - var em = 12; - - var fontSize = new svg.Property('fontSize', svg.Font.Parse(svg.ctx.font).fontSize); - if (fontSize.hasValue()) em = fontSize.toPixels(viewPort); - - return em; - } - - svg.Property.prototype.getUnits = function() { - var s = this.value+''; - return s.replace(/[0-9\.\-]/g,''); - } - - // get the length as pixels - svg.Property.prototype.toPixels = function(viewPort, processPercent) { - if (!this.hasValue()) return 0; - var s = this.value+''; - if (s.match(/em$/)) return this.numValue() * this.getEM(viewPort); - if (s.match(/ex$/)) return this.numValue() * this.getEM(viewPort) / 2.0; - if (s.match(/px$/)) return this.numValue(); - if (s.match(/pt$/)) return this.numValue() * this.getDPI(viewPort) * (1.0 / 72.0); - if (s.match(/pc$/)) return this.numValue() * 15; - if (s.match(/cm$/)) return this.numValue() * this.getDPI(viewPort) / 2.54; - if (s.match(/mm$/)) return this.numValue() * this.getDPI(viewPort) / 25.4; - if (s.match(/in$/)) return this.numValue() * this.getDPI(viewPort); - if (s.match(/%$/)) return this.numValue() * svg.ViewPort.ComputeSize(viewPort); - var n = this.numValue(); - if (processPercent && n < 1.0) return n * svg.ViewPort.ComputeSize(viewPort); - return n; - } - - // time extensions - // get the time as milliseconds - svg.Property.prototype.toMilliseconds = function() { - if (!this.hasValue()) return 0; - var s = this.value+''; - if (s.match(/s$/)) return this.numValue() * 1000; - if (s.match(/ms$/)) return this.numValue(); - return this.numValue(); - } - - // angle extensions - // get the angle as radians - svg.Property.prototype.toRadians = function() { - if (!this.hasValue()) return 0; - var s = this.value+''; - if (s.match(/deg$/)) return this.numValue() * (Math.PI / 180.0); - if (s.match(/grad$/)) return this.numValue() * (Math.PI / 200.0); - if (s.match(/rad$/)) return this.numValue(); - return this.numValue() * (Math.PI / 180.0); - } - - // text extensions - // get the text baseline - var textBaselineMapping = { - 'baseline': 'alphabetic', - 'before-edge': 'top', - 'text-before-edge': 'top', - 'middle': 'middle', - 'central': 'middle', - 'after-edge': 'bottom', - 'text-after-edge': 'bottom', - 'ideographic': 'ideographic', - 'alphabetic': 'alphabetic', - 'hanging': 'hanging', - 'mathematical': 'alphabetic' - }; - svg.Property.prototype.toTextBaseline = function () { - if (!this.hasValue()) return null; - return textBaselineMapping[this.value]; - } - - // fonts - svg.Font = new (function() { - this.Styles = 'normal|italic|oblique|inherit'; - this.Variants = 'normal|small-caps|inherit'; - this.Weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit'; - - this.CreateFont = function(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit) { - var f = inherit != null ? this.Parse(inherit) : this.CreateFont('', '', '', '', '', svg.ctx.font); - return { - fontFamily: fontFamily || f.fontFamily, - fontSize: fontSize || f.fontSize, - fontStyle: fontStyle || f.fontStyle, - fontWeight: fontWeight || f.fontWeight, - fontVariant: fontVariant || f.fontVariant, - toString: function () { return [this.fontStyle, this.fontVariant, this.fontWeight, this.fontSize, this.fontFamily].join(' ') } - } - } - - var that = this; - this.Parse = function(s) { - var f = {}; - var d = svg.trim(svg.compressSpaces(s || '')).split(' '); - var set = { fontSize: false, fontStyle: false, fontWeight: false, fontVariant: false } - var ff = ''; - for (var i=0; i this.x2) this.x2 = x; - } - - if (y != null) { - if (isNaN(this.y1) || isNaN(this.y2)) { - this.y1 = y; - this.y2 = y; - } - if (y < this.y1) this.y1 = y; - if (y > this.y2) this.y2 = y; - } - } - this.addX = function(x) { this.addPoint(x, null); } - this.addY = function(y) { this.addPoint(null, y); } - - this.addBoundingBox = function(bb) { - this.addPoint(bb.x1, bb.y1); - this.addPoint(bb.x2, bb.y2); - } - - this.addQuadraticCurve = function(p0x, p0y, p1x, p1y, p2x, p2y) { - var cp1x = p0x + 2/3 * (p1x - p0x); // CP1 = QP0 + 2/3 *(QP1-QP0) - var cp1y = p0y + 2/3 * (p1y - p0y); // CP1 = QP0 + 2/3 *(QP1-QP0) - var cp2x = cp1x + 1/3 * (p2x - p0x); // CP2 = CP1 + 1/3 *(QP2-QP0) - var cp2y = cp1y + 1/3 * (p2y - p0y); // CP2 = CP1 + 1/3 *(QP2-QP0) - this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y); - } - - this.addBezierCurve = function(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) { - // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html - var p0 = [p0x, p0y], p1 = [p1x, p1y], p2 = [p2x, p2y], p3 = [p3x, p3y]; - this.addPoint(p0[0], p0[1]); - this.addPoint(p3[0], p3[1]); - - for (i=0; i<=1; i++) { - var f = function(t) { - return Math.pow(1-t, 3) * p0[i] - + 3 * Math.pow(1-t, 2) * t * p1[i] - + 3 * (1-t) * Math.pow(t, 2) * p2[i] - + Math.pow(t, 3) * p3[i]; - } - - var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; - var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; - var c = 3 * p1[i] - 3 * p0[i]; - - if (a == 0) { - if (b == 0) continue; - var t = -c / b; - if (0 < t && t < 1) { - if (i == 0) this.addX(f(t)); - if (i == 1) this.addY(f(t)); - } - continue; - } - - var b2ac = Math.pow(b, 2) - 4 * c * a; - if (b2ac < 0) continue; - var t1 = (-b + Math.sqrt(b2ac)) / (2 * a); - if (0 < t1 && t1 < 1) { - if (i == 0) this.addX(f(t1)); - if (i == 1) this.addY(f(t1)); - } - var t2 = (-b - Math.sqrt(b2ac)) / (2 * a); - if (0 < t2 && t2 < 1) { - if (i == 0) this.addX(f(t2)); - if (i == 1) this.addY(f(t2)); - } - } - } - - this.isPointInBox = function(x, y) { - return (this.x1 <= x && x <= this.x2 && this.y1 <= y && y <= this.y2); - } - - this.addPoint(x1, y1); - this.addPoint(x2, y2); - } - - // transforms - svg.Transform = function(v) { - var that = this; - this.Type = {} - - // translate - this.Type.translate = function(s) { - this.p = svg.CreatePoint(s); - this.apply = function(ctx) { - ctx.translate(this.p.x || 0.0, this.p.y || 0.0); - } - this.unapply = function(ctx) { - ctx.translate(-1.0 * this.p.x || 0.0, -1.0 * this.p.y || 0.0); - } - this.applyToPoint = function(p) { - p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); - } - } - - // rotate - this.Type.rotate = function(s) { - var a = svg.ToNumberArray(s); - this.angle = new svg.Property('angle', a[0]); - this.cx = a[1] || 0; - this.cy = a[2] || 0; - this.apply = function(ctx) { - ctx.translate(this.cx, this.cy); - ctx.rotate(this.angle.toRadians()); - ctx.translate(-this.cx, -this.cy); - } - this.unapply = function(ctx) { - ctx.translate(this.cx, this.cy); - ctx.rotate(-1.0 * this.angle.toRadians()); - ctx.translate(-this.cx, -this.cy); - } - this.applyToPoint = function(p) { - var a = this.angle.toRadians(); - p.applyTransform([1, 0, 0, 1, this.p.x || 0.0, this.p.y || 0.0]); - p.applyTransform([Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0]); - p.applyTransform([1, 0, 0, 1, -this.p.x || 0.0, -this.p.y || 0.0]); - } - } - - this.Type.scale = function(s) { - this.p = svg.CreatePoint(s); - this.apply = function(ctx) { - ctx.scale(this.p.x || 1.0, this.p.y || this.p.x || 1.0); - } - this.unapply = function(ctx) { - ctx.scale(1.0 / this.p.x || 1.0, 1.0 / this.p.y || this.p.x || 1.0); - } - this.applyToPoint = function(p) { - p.applyTransform([this.p.x || 0.0, 0, 0, this.p.y || 0.0, 0, 0]); - } - } - - this.Type.matrix = function(s) { - this.m = svg.ToNumberArray(s); - this.apply = function(ctx) { - ctx.transform(this.m[0], this.m[1], this.m[2], this.m[3], this.m[4], this.m[5]); - } - this.unapply = function(ctx) { - var a = this.m[0]; - var b = this.m[2]; - var c = this.m[4]; - var d = this.m[1]; - var e = this.m[3]; - var f = this.m[5]; - var g = 0.0; - var h = 0.0; - var i = 1.0; - var det = 1 / (a*(e*i-f*h)-b*(d*i-f*g)+c*(d*h-e*g)); - ctx.transform( - det*(e*i-f*h), - det*(f*g-d*i), - det*(c*h-b*i), - det*(a*i-c*g), - det*(b*f-c*e), - det*(c*d-a*f) - ); - } - this.applyToPoint = function(p) { - p.applyTransform(this.m); - } - } - - this.Type.SkewBase = function(s) { - this.base = that.Type.matrix; - this.base(s); - this.angle = new svg.Property('angle', s); - } - this.Type.SkewBase.prototype = new this.Type.matrix; - - this.Type.skewX = function(s) { - this.base = that.Type.SkewBase; - this.base(s); - this.m = [1, 0, Math.tan(this.angle.toRadians()), 1, 0, 0]; - } - this.Type.skewX.prototype = new this.Type.SkewBase; - - this.Type.skewY = function(s) { - this.base = that.Type.SkewBase; - this.base(s); - this.m = [1, Math.tan(this.angle.toRadians()), 0, 1, 0, 0]; - } - this.Type.skewY.prototype = new this.Type.SkewBase; - - this.transforms = []; - - this.apply = function(ctx) { - for (var i=0; i=0; i--) { - this.transforms[i].unapply(ctx); - } - } - - this.applyToPoint = function(p) { - for (var i=0; i existingSpecificity) { - this.styles[name] = styles[name]; - this.stylesSpecificity[name] = specificity; - } - } - } - } - } - }; - - if (node != null && node.nodeType == 1) { //ELEMENT_NODE - // add attributes - for (var i=0; i= this.tokens.length - 1; - } - - this.isCommandOrEnd = function() { - if (this.isEnd()) return true; - return this.tokens[this.i + 1].match(/^[A-Za-z]$/) != null; - } - - this.isRelativeCommand = function() { - switch(this.command) - { - case 'm': - case 'l': - case 'h': - case 'v': - case 'c': - case 's': - case 'q': - case 't': - case 'a': - case 'z': - return true; - break; - } - return false; - } - - this.getToken = function() { - this.i++; - return this.tokens[this.i]; - } - - this.getScalar = function() { - return parseFloat(this.getToken()); - } - - this.nextCommand = function() { - this.previousCommand = this.command; - this.command = this.getToken(); - } - - this.getPoint = function() { - var p = new svg.Point(this.getScalar(), this.getScalar()); - return this.makeAbsolute(p); - } - - this.getAsControlPoint = function() { - var p = this.getPoint(); - this.control = p; - return p; - } - - this.getAsCurrentPoint = function() { - var p = this.getPoint(); - this.current = p; - return p; - } - - this.getReflectedControlPoint = function() { - if (this.previousCommand.toLowerCase() != 'c' && - this.previousCommand.toLowerCase() != 's' && - this.previousCommand.toLowerCase() != 'q' && - this.previousCommand.toLowerCase() != 't' ){ - return this.current; - } - - // reflect point - var p = new svg.Point(2 * this.current.x - this.control.x, 2 * this.current.y - this.control.y); - return p; - } - - this.makeAbsolute = function(p) { - if (this.isRelativeCommand()) { - p.x += this.current.x; - p.y += this.current.y; - } - return p; - } - - this.addMarker = function(p, from, priorTo) { - // if the last angle isn't filled in because we didn't have this point yet ... - if (priorTo != null && this.angles.length > 0 && this.angles[this.angles.length-1] == null) { - this.angles[this.angles.length-1] = this.points[this.points.length-1].angleTo(priorTo); - } - this.addMarkerAngle(p, from == null ? null : from.angleTo(p)); - } - - this.addMarkerAngle = function(p, a) { - this.points.push(p); - this.angles.push(a); - } - - this.getMarkerPoints = function() { return this.points; } - this.getMarkerAngles = function() { - for (var i=0; i 1) { - rx *= Math.sqrt(l); - ry *= Math.sqrt(l); - } - // cx', cy' - var s = (largeArcFlag == sweepFlag ? -1 : 1) * Math.sqrt( - ((Math.pow(rx,2)*Math.pow(ry,2))-(Math.pow(rx,2)*Math.pow(currp.y,2))-(Math.pow(ry,2)*Math.pow(currp.x,2))) / - (Math.pow(rx,2)*Math.pow(currp.y,2)+Math.pow(ry,2)*Math.pow(currp.x,2)) - ); - if (isNaN(s)) s = 0; - var cpp = new svg.Point(s * rx * currp.y / ry, s * -ry * currp.x / rx); - // cx, cy - var centp = new svg.Point( - (curr.x + cp.x) / 2.0 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, - (curr.y + cp.y) / 2.0 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y - ); - // vector magnitude - var m = function(v) { return Math.sqrt(Math.pow(v[0],2) + Math.pow(v[1],2)); } - // ratio between two vectors - var r = function(u, v) { return (u[0]*v[0]+u[1]*v[1]) / (m(u)*m(v)) } - // angle between two vectors - var a = function(u, v) { return (u[0]*v[1] < u[1]*v[0] ? -1 : 1) * Math.acos(r(u,v)); } - // initial angle - var a1 = a([1,0], [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]); - // angle delta - var u = [(currp.x-cpp.x)/rx,(currp.y-cpp.y)/ry]; - var v = [(-currp.x-cpp.x)/rx,(-currp.y-cpp.y)/ry]; - var ad = a(u, v); - if (r(u,v) <= -1) ad = Math.PI; - if (r(u,v) >= 1) ad = 0; - - // for markers - var dir = 1 - sweepFlag ? 1.0 : -1.0; - var ah = a1 + dir * (ad / 2.0); - var halfWay = new svg.Point( - centp.x + rx * Math.cos(ah), - centp.y + ry * Math.sin(ah) - ); - pp.addMarkerAngle(halfWay, ah - dir * Math.PI / 2); - pp.addMarkerAngle(cp, ah - dir * Math.PI); - - bb.addPoint(cp.x, cp.y); // TODO: this is too naive, make it better - if (ctx != null) { - var r = rx > ry ? rx : ry; - var sx = rx > ry ? 1 : rx / ry; - var sy = rx > ry ? ry / rx : 1; - - ctx.translate(centp.x, centp.y); - ctx.rotate(xAxisRotation); - ctx.scale(sx, sy); - ctx.arc(0, 0, r, a1, a1 + ad, 1 - sweepFlag); - ctx.scale(1/sx, 1/sy); - ctx.rotate(-xAxisRotation); - ctx.translate(-centp.x, -centp.y); - } - } - break; - case 'Z': - case 'z': - if (ctx != null) ctx.closePath(); - pp.current = pp.start; - } - } - - return bb; - } - - this.getMarkers = function() { - var points = this.PathParser.getMarkerPoints(); - var angles = this.PathParser.getMarkerAngles(); - - var markers = []; - for (var i=0; i 1) this.offset = 1; - - var stopColor = this.style('stop-color', true); - if (stopColor.value === '') stopColor.value = '#000'; - if (this.style('stop-opacity').hasValue()) stopColor = stopColor.addOpacity(this.style('stop-opacity')); - this.color = stopColor.value; - } - svg.Element.stop.prototype = new svg.Element.ElementBase; - - // animation base element - svg.Element.AnimateBase = function(node) { - this.base = svg.Element.ElementBase; - this.base(node); - - svg.Animations.push(this); - - this.duration = 0.0; - this.begin = this.attribute('begin').toMilliseconds(); - this.maxDuration = this.begin + this.attribute('dur').toMilliseconds(); - - this.getProperty = function() { - var attributeType = this.attribute('attributeType').value; - var attributeName = this.attribute('attributeName').value; - - if (attributeType == 'CSS') { - return this.parent.style(attributeName, true); - } - return this.parent.attribute(attributeName, true); - }; - - this.initialValue = null; - this.initialUnits = ''; - this.removed = false; - - this.calcValue = function() { - // OVERRIDE ME! - return ''; - } - - this.update = function(delta) { - // set initial value - if (this.initialValue == null) { - this.initialValue = this.getProperty().value; - this.initialUnits = this.getProperty().getUnits(); - } - - // if we're past the end time - if (this.duration > this.maxDuration) { - // loop for indefinitely repeating animations - if (this.attribute('repeatCount').value == 'indefinite' - || this.attribute('repeatDur').value == 'indefinite') { - this.duration = 0.0 - } - else if (this.attribute('fill').valueOrDefault('remove') == 'freeze' && !this.frozen) { - this.frozen = true; - this.parent.animationFrozen = true; - this.parent.animationFrozenValue = this.getProperty().value; - } - else if (this.attribute('fill').valueOrDefault('remove') == 'remove' && !this.removed) { - this.removed = true; - this.getProperty().value = this.parent.animationFrozen ? this.parent.animationFrozenValue : this.initialValue; - return true; - } - return false; - } - this.duration = this.duration + delta; - - // if we're past the begin time - var updated = false; - if (this.begin < this.duration) { - var newValue = this.calcValue(); // tween - - if (this.attribute('type').hasValue()) { - // for transform, etc. - var type = this.attribute('type').value; - newValue = type + '(' + newValue + ')'; - } - - this.getProperty().value = newValue; - updated = true; - } - - return updated; - } - - this.from = this.attribute('from'); - this.to = this.attribute('to'); - this.values = this.attribute('values'); - if (this.values.hasValue()) this.values.value = this.values.value.split(';'); - - // fraction of duration we've covered - this.progress = function() { - var ret = { progress: (this.duration - this.begin) / (this.maxDuration - this.begin) }; - if (this.values.hasValue()) { - var p = ret.progress * (this.values.value.length - 1); - var lb = Math.floor(p), ub = Math.ceil(p); - ret.from = new svg.Property('from', parseFloat(this.values.value[lb])); - ret.to = new svg.Property('to', parseFloat(this.values.value[ub])); - ret.progress = (p - lb) / (ub - lb); - } - else { - ret.from = this.from; - ret.to = this.to; - } - return ret; - } - } - svg.Element.AnimateBase.prototype = new svg.Element.ElementBase; - - // animate element - svg.Element.animate = function(node) { - this.base = svg.Element.AnimateBase; - this.base(node); - - this.calcValue = function() { - var p = this.progress(); - - // tween value linearly - var newValue = p.from.numValue() + (p.to.numValue() - p.from.numValue()) * p.progress; - return newValue + this.initialUnits; - }; - } - svg.Element.animate.prototype = new svg.Element.AnimateBase; - - // animate color element - svg.Element.animateColor = function(node) { - this.base = svg.Element.AnimateBase; - this.base(node); - - this.calcValue = function() { - var p = this.progress(); - var from = new RGBColor(p.from.value); - var to = new RGBColor(p.to.value); - - if (from.ok && to.ok) { - // tween color linearly - var r = from.r + (to.r - from.r) * p.progress; - var g = from.g + (to.g - from.g) * p.progress; - var b = from.b + (to.b - from.b) * p.progress; - return 'rgb('+parseInt(r,10)+','+parseInt(g,10)+','+parseInt(b,10)+')'; - } - return this.attribute('from').value; - }; - } - svg.Element.animateColor.prototype = new svg.Element.AnimateBase; - - // animate transform element - svg.Element.animateTransform = function(node) { - this.base = svg.Element.AnimateBase; - this.base(node); - - this.calcValue = function() { - var p = this.progress(); - - // tween value linearly - var from = svg.ToNumberArray(p.from.value); - var to = svg.ToNumberArray(p.to.value); - var newValue = ''; - for (var i=0; i startI && child.attribute('x').hasValue()) break; // new group - width += child.measureTextRecursive(ctx); - } - return -1 * (textAnchor == 'end' ? width : width / 2.0); - } - return 0; - } - - this.renderChild = function(ctx, parent, i) { - var child = parent.children[i]; - if (child.attribute('x').hasValue()) { - child.x = child.attribute('x').toPixels('x') + parent.getAnchorDelta(ctx, parent, i); - if (child.attribute('dx').hasValue()) child.x += child.attribute('dx').toPixels('x'); - } - else { - if (child.attribute('dx').hasValue()) parent.x += child.attribute('dx').toPixels('x'); - child.x = parent.x; - } - parent.x = child.x + child.measureText(ctx); - - if (child.attribute('y').hasValue()) { - child.y = child.attribute('y').toPixels('y'); - if (child.attribute('dy').hasValue()) child.y += child.attribute('dy').toPixels('y'); - } - else { - if (child.attribute('dy').hasValue()) parent.y += child.attribute('dy').toPixels('y'); - child.y = parent.y; - } - parent.y = child.y; - - child.render(ctx); - - for (var i=0; i0 && text[i-1]!=' ' && i0 && text[i-1]!=' ' && (i == text.length-1 || text[i+1]==' ')) arabicForm = 'initial'; - if (typeof(font.glyphs[c]) != 'undefined') { - glyph = font.glyphs[c][arabicForm]; - if (glyph == null && font.glyphs[c].type == 'glyph') glyph = font.glyphs[c]; - } - } - else { - glyph = font.glyphs[c]; - } - if (glyph == null) glyph = font.missingGlyph; - return glyph; - } - - this.renderChildren = function(ctx) { - var customFont = this.parent.style('font-family').getDefinition(); - if (customFont != null) { - var fontSize = this.parent.style('font-size').numValueOrDefault(svg.Font.Parse(svg.ctx.font).fontSize); - var fontStyle = this.parent.style('font-style').valueOrDefault(svg.Font.Parse(svg.ctx.font).fontStyle); - var text = this.getText(); - if (customFont.isRTL) text = text.split("").reverse().join(""); - - var dx = svg.ToNumberArray(this.parent.attribute('dx').value); - for (var i=0; i 0) { return ''; } - return this.text; - } - } - svg.Element.tspan.prototype = new svg.Element.TextElementBase; - - // tref - svg.Element.tref = function(node) { - this.base = svg.Element.TextElementBase; - this.base(node); - - this.getText = function() { - var element = this.getHrefAttribute().getDefinition(); - if (element != null) return element.children[0].getText(); - } - } - svg.Element.tref.prototype = new svg.Element.TextElementBase; - - // a element - svg.Element.a = function(node) { - this.base = svg.Element.TextElementBase; - this.base(node); - - this.hasText = node.childNodes.length > 0; - for (var i=0; i 0) { - // render as temporary group - var g = new svg.Element.g(); - g.children = this.children; - g.parent = this; - g.render(ctx); - } - } - - this.onclick = function() { - window.open(this.getHrefAttribute().value); - } - - this.onmousemove = function() { - svg.ctx.canvas.style.cursor = 'pointer'; - } - } - svg.Element.a.prototype = new svg.Element.TextElementBase; - - // image element - svg.Element.image = function(node) { - this.base = svg.Element.RenderedElementBase; - this.base(node); - - var href = this.getHrefAttribute().value; - if (href == '') { return; } - var isSvg = href.match(/\.svg$/) - - svg.Images.push(this); - this.loaded = false; - if (!isSvg) { - this.img = document.createElement('img'); - if (svg.opts['useCORS'] == true) { this.img.crossOrigin = 'Anonymous'; } - var self = this; - this.img.onload = function() { self.loaded = true; } - this.img.onerror = function() { svg.log('ERROR: image "' + href + '" not found'); self.loaded = true; } - this.img.src = href; - } - else { - this.img = svg.ajax(href); - this.loaded = true; - } - - this.renderChildren = function(ctx) { - var x = this.attribute('x').toPixels('x'); - var y = this.attribute('y').toPixels('y'); - - var width = this.attribute('width').toPixels('x'); - var height = this.attribute('height').toPixels('y'); - if (width == 0 || height == 0) return; - - ctx.save(); - if (isSvg) { - ctx.drawSvg(this.img, x, y, width, height); - } - else { - ctx.translate(x, y); - svg.AspectRatio(ctx, - this.attribute('preserveAspectRatio').value, - width, - this.img.width, - height, - this.img.height, - 0, - 0); - ctx.drawImage(this.img, 0, 0); - } - ctx.restore(); - } - - this.getBoundingBox = function() { - var x = this.attribute('x').toPixels('x'); - var y = this.attribute('y').toPixels('y'); - var width = this.attribute('width').toPixels('x'); - var height = this.attribute('height').toPixels('y'); - return new svg.BoundingBox(x, y, x + width, y + height); - } - } - svg.Element.image.prototype = new svg.Element.RenderedElementBase; - - // group element - svg.Element.g = function(node) { - this.base = svg.Element.RenderedElementBase; - this.base(node); - - this.getBoundingBox = function() { - var bb = new svg.BoundingBox(); - for (var i=0; i 0) { - var urlStart = srcs[s].indexOf('url'); - var urlEnd = srcs[s].indexOf(')', urlStart); - var url = srcs[s].substr(urlStart + 5, urlEnd - urlStart - 6); - var doc = svg.parseXml(svg.ajax(url)); - var fonts = doc.getElementsByTagName('font'); - for (var f=0; f - * @link http://www.phpied.com/rgb-color-parser-in-javascript/ - * @license Use it if you like it - */ - - (function ( global ) { - - function RGBColor(color_string) - { - this.ok = false; - - // strip any leading # - if (color_string.charAt(0) == '#') { // remove # if any - color_string = color_string.substr(1,6); - } - - color_string = color_string.replace(/ /g,''); - color_string = color_string.toLowerCase(); - - // before getting into regexps, try simple matches - // and overwrite the input - var simple_colors = { - aliceblue: 'f0f8ff', - antiquewhite: 'faebd7', - aqua: '00ffff', - aquamarine: '7fffd4', - azure: 'f0ffff', - beige: 'f5f5dc', - bisque: 'ffe4c4', - black: '000000', - blanchedalmond: 'ffebcd', - blue: '0000ff', - blueviolet: '8a2be2', - brown: 'a52a2a', - burlywood: 'deb887', - cadetblue: '5f9ea0', - chartreuse: '7fff00', - chocolate: 'd2691e', - coral: 'ff7f50', - cornflowerblue: '6495ed', - cornsilk: 'fff8dc', - crimson: 'dc143c', - cyan: '00ffff', - darkblue: '00008b', - darkcyan: '008b8b', - darkgoldenrod: 'b8860b', - darkgray: 'a9a9a9', - darkgreen: '006400', - darkkhaki: 'bdb76b', - darkmagenta: '8b008b', - darkolivegreen: '556b2f', - darkorange: 'ff8c00', - darkorchid: '9932cc', - darkred: '8b0000', - darksalmon: 'e9967a', - darkseagreen: '8fbc8f', - darkslateblue: '483d8b', - darkslategray: '2f4f4f', - darkturquoise: '00ced1', - darkviolet: '9400d3', - deeppink: 'ff1493', - deepskyblue: '00bfff', - dimgray: '696969', - dodgerblue: '1e90ff', - feldspar: 'd19275', - firebrick: 'b22222', - floralwhite: 'fffaf0', - forestgreen: '228b22', - fuchsia: 'ff00ff', - gainsboro: 'dcdcdc', - ghostwhite: 'f8f8ff', - gold: 'ffd700', - goldenrod: 'daa520', - gray: '808080', - green: '008000', - greenyellow: 'adff2f', - honeydew: 'f0fff0', - hotpink: 'ff69b4', - indianred : 'cd5c5c', - indigo : '4b0082', - ivory: 'fffff0', - khaki: 'f0e68c', - lavender: 'e6e6fa', - lavenderblush: 'fff0f5', - lawngreen: '7cfc00', - lemonchiffon: 'fffacd', - lightblue: 'add8e6', - lightcoral: 'f08080', - lightcyan: 'e0ffff', - lightgoldenrodyellow: 'fafad2', - lightgrey: 'd3d3d3', - lightgreen: '90ee90', - lightpink: 'ffb6c1', - lightsalmon: 'ffa07a', - lightseagreen: '20b2aa', - lightskyblue: '87cefa', - lightslateblue: '8470ff', - lightslategray: '778899', - lightsteelblue: 'b0c4de', - lightyellow: 'ffffe0', - lime: '00ff00', - limegreen: '32cd32', - linen: 'faf0e6', - magenta: 'ff00ff', - maroon: '800000', - mediumaquamarine: '66cdaa', - mediumblue: '0000cd', - mediumorchid: 'ba55d3', - mediumpurple: '9370d8', - mediumseagreen: '3cb371', - mediumslateblue: '7b68ee', - mediumspringgreen: '00fa9a', - mediumturquoise: '48d1cc', - mediumvioletred: 'c71585', - midnightblue: '191970', - mintcream: 'f5fffa', - mistyrose: 'ffe4e1', - moccasin: 'ffe4b5', - navajowhite: 'ffdead', - navy: '000080', - oldlace: 'fdf5e6', - olive: '808000', - olivedrab: '6b8e23', - orange: 'ffa500', - orangered: 'ff4500', - orchid: 'da70d6', - palegoldenrod: 'eee8aa', - palegreen: '98fb98', - paleturquoise: 'afeeee', - palevioletred: 'd87093', - papayawhip: 'ffefd5', - peachpuff: 'ffdab9', - peru: 'cd853f', - pink: 'ffc0cb', - plum: 'dda0dd', - powderblue: 'b0e0e6', - purple: '800080', - red: 'ff0000', - rosybrown: 'bc8f8f', - royalblue: '4169e1', - saddlebrown: '8b4513', - salmon: 'fa8072', - sandybrown: 'f4a460', - seagreen: '2e8b57', - seashell: 'fff5ee', - sienna: 'a0522d', - silver: 'c0c0c0', - skyblue: '87ceeb', - slateblue: '6a5acd', - slategray: '708090', - snow: 'fffafa', - springgreen: '00ff7f', - steelblue: '4682b4', - tan: 'd2b48c', - teal: '008080', - thistle: 'd8bfd8', - tomato: 'ff6347', - turquoise: '40e0d0', - violet: 'ee82ee', - violetred: 'd02090', - wheat: 'f5deb3', - white: 'ffffff', - whitesmoke: 'f5f5f5', - yellow: 'ffff00', - yellowgreen: '9acd32' - }; - for (var key in simple_colors) { - if (color_string == key) { - color_string = simple_colors[key]; - } - } - // emd of simple type-in colors - - // array of color definition objects - var color_defs = [ - { - re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, - example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'], - process: function (bits){ - return [ - parseInt(bits[1]), - parseInt(bits[2]), - parseInt(bits[3]) - ]; - } - }, - { - re: /^(\w{2})(\w{2})(\w{2})$/, - example: ['#00ff00', '336699'], - process: function (bits){ - return [ - parseInt(bits[1], 16), - parseInt(bits[2], 16), - parseInt(bits[3], 16) - ]; - } - }, - { - re: /^(\w{1})(\w{1})(\w{1})$/, - example: ['#fb0', 'f0f'], - process: function (bits){ - return [ - parseInt(bits[1] + bits[1], 16), - parseInt(bits[2] + bits[2], 16), - parseInt(bits[3] + bits[3], 16) - ]; - } - } - ]; - - // search through the definitions to find a match - for (var i = 0; i < color_defs.length; i++) { - var re = color_defs[i].re; - var processor = color_defs[i].process; - var bits = re.exec(color_string); - if (bits) { - channels = processor(bits); - this.r = channels[0]; - this.g = channels[1]; - this.b = channels[2]; - this.ok = true; - } - - } - - // validate/cleanup values - this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r); - this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g); - this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b); - - // some getters - this.toRGB = function () { - return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')'; - } - this.toHex = function () { - var r = this.r.toString(16); - var g = this.g.toString(16); - var b = this.b.toString(16); - if (r.length == 1) r = '0' + r; - if (g.length == 1) g = '0' + g; - if (b.length == 1) b = '0' + b; - return '#' + r + g + b; - } - - // help - this.getHelpXML = function () { - - var examples = new Array(); - // add regexps - for (var i = 0; i < color_defs.length; i++) { - var example = color_defs[i].example; - for (var j = 0; j < example.length; j++) { - examples[examples.length] = example[j]; - } - } - // add type-in colors - for (var sc in simple_colors) { - examples[examples.length] = sc; - } - - var xml = document.createElement('ul'); - xml.setAttribute('id', 'rgbcolor-examples'); - for (var i = 0; i < examples.length; i++) { - try { - var list_item = document.createElement('li'); - var list_color = new RGBColor(examples[i]); - var example_div = document.createElement('div'); - example_div.style.cssText = - 'margin: 3px; ' - + 'border: 1px solid black; ' - + 'background:' + list_color.toHex() + '; ' - + 'color:' + list_color.toHex() - ; - example_div.appendChild(document.createTextNode('test')); - var list_item_value = document.createTextNode( - ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex() - ); - list_item.appendChild(example_div); - list_item.appendChild(list_item_value); - xml.appendChild(list_item); - - } catch(e){} - } - return xml; - - } - - } - - // export as AMD... - if ( true ) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { return RGBColor; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - - // ...or as browserify - else if ( typeof module !== 'undefined' && module.exports ) { - module.exports = RGBColor; - } - - global.RGBColor = RGBColor; - - }( typeof window !== 'undefined' ? window : this )); - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_RESULT__;/* - - StackBlur - a fast almost Gaussian Blur For Canvas - - Version: 0.5 - Author: Mario Klingemann - Contact: mario@quasimondo.com - Website: http://www.quasimondo.com/StackBlurForCanvas - Twitter: @quasimondo - - In case you find this class useful - especially in commercial projects - - I am not totally unhappy for a small donation to my PayPal account - mario@quasimondo.de - - Or support me on flattr: - https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript - - Copyright (c) 2010 Mario Klingemann - - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the "Software"), to deal in the Software without - restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - */ - - (function ( global ) { - - var mul_table = [ - 512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512, - 454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512, - 482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456, - 437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512, - 497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328, - 320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456, - 446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335, - 329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512, - 505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405, - 399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328, - 324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271, - 268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456, - 451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388, - 385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335, - 332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292, - 289,287,285,282,280,278,275,273,271,269,267,265,263,261,259]; - - - var shg_table = [ - 9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, - 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, - 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, - 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, - 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, - 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ]; - - function premultiplyAlpha(imageData) - { - var pixels = imageData.data; - var size = imageData.width * imageData.height * 4; - - for (var i=0; i> shg_sum; - pixels[yi+1] = (g_sum * mul_sum) >> shg_sum; - pixels[yi+2] = (b_sum * mul_sum) >> shg_sum; - pixels[yi+3] = (a_sum * mul_sum) >> shg_sum; - - r_sum -= r_out_sum; - g_sum -= g_out_sum; - b_sum -= b_out_sum; - a_sum -= a_out_sum; - - r_out_sum -= stackIn.r; - g_out_sum -= stackIn.g; - b_out_sum -= stackIn.b; - a_out_sum -= stackIn.a; - - p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2; - - r_in_sum += ( stackIn.r = pixels[p]); - g_in_sum += ( stackIn.g = pixels[p+1]); - b_in_sum += ( stackIn.b = pixels[p+2]); - a_in_sum += ( stackIn.a = pixels[p+3]); - - r_sum += r_in_sum; - g_sum += g_in_sum; - b_sum += b_in_sum; - a_sum += a_in_sum; - - stackIn = stackIn.next; - - r_out_sum += ( pr = stackOut.r ); - g_out_sum += ( pg = stackOut.g ); - b_out_sum += ( pb = stackOut.b ); - a_out_sum += ( pa = stackOut.a ); - - r_in_sum -= pr; - g_in_sum -= pg; - b_in_sum -= pb; - a_in_sum -= pa; - - stackOut = stackOut.next; - - yi += 4; - } - yw += width; - } - - - for ( x = 0; x < width; x++ ) - { - g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0; - - yi = x << 2; - r_out_sum = radiusPlus1 * ( pr = pixels[yi]); - g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]); - b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]); - a_out_sum = radiusPlus1 * ( pa = pixels[yi+3]); - - r_sum += sumFactor * pr; - g_sum += sumFactor * pg; - b_sum += sumFactor * pb; - a_sum += sumFactor * pa; - - stack = stackStart; - - for( i = 0; i < radiusPlus1; i++ ) - { - stack.r = pr; - stack.g = pg; - stack.b = pb; - stack.a = pa; - stack = stack.next; - } - - yp = width; - - for( i = 1; i <= radius; i++ ) - { - yi = ( yp + x ) << 2; - - r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i ); - g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs; - b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs; - a_sum += ( stack.a = ( pa = pixels[yi+3])) * rbs; - - r_in_sum += pr; - g_in_sum += pg; - b_in_sum += pb; - a_in_sum += pa; - - stack = stack.next; - - if( i < heightMinus1 ) - { - yp += width; - } - } - - yi = x; - stackIn = stackStart; - stackOut = stackEnd; - for ( y = 0; y < height; y++ ) - { - p = yi << 2; - pixels[p] = (r_sum * mul_sum) >> shg_sum; - pixels[p+1] = (g_sum * mul_sum) >> shg_sum; - pixels[p+2] = (b_sum * mul_sum) >> shg_sum; - pixels[p+3] = (a_sum * mul_sum) >> shg_sum; - - r_sum -= r_out_sum; - g_sum -= g_out_sum; - b_sum -= b_out_sum; - a_sum -= a_out_sum; - - r_out_sum -= stackIn.r; - g_out_sum -= stackIn.g; - b_out_sum -= stackIn.b; - a_out_sum -= stackIn.a; - - p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2; - - r_sum += ( r_in_sum += ( stackIn.r = pixels[p])); - g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1])); - b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2])); - a_sum += ( a_in_sum += ( stackIn.a = pixels[p+3])); - - stackIn = stackIn.next; - - r_out_sum += ( pr = stackOut.r ); - g_out_sum += ( pg = stackOut.g ); - b_out_sum += ( pb = stackOut.b ); - a_out_sum += ( pa = stackOut.a ); - - r_in_sum -= pr; - g_in_sum -= pg; - b_in_sum -= pb; - a_in_sum -= pa; - - stackOut = stackOut.next; - - yi += width; - } - } - - unpremultiplyAlpha(imageData); - - context.putImageData( imageData, top_x, top_y ); - } - - - function stackBlurCanvasRGB( id, top_x, top_y, width, height, radius ) - { - if ( isNaN(radius) || radius < 1 ) return; - radius |= 0; - - var canvas = document.getElementById( id ); - var context = canvas.getContext("2d"); - var imageData; - - try { - try { - imageData = context.getImageData( top_x, top_y, width, height ); - } catch(e) { - - // NOTE: this part is supposedly only needed if you want to work with local files - // so it might be okay to remove the whole try/catch block and just use - // imageData = context.getImageData( top_x, top_y, width, height ); - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); - imageData = context.getImageData( top_x, top_y, width, height ); - } catch(e) { - alert("Cannot access local image"); - throw new Error("unable to access local image data: " + e); - return; - } - } - } catch(e) { - alert("Cannot access image"); - throw new Error("unable to access image data: " + e); - } - - var pixels = imageData.data; - - var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, - r_out_sum, g_out_sum, b_out_sum, - r_in_sum, g_in_sum, b_in_sum, - pr, pg, pb, rbs; - - var div = radius + radius + 1; - var w4 = width << 2; - var widthMinus1 = width - 1; - var heightMinus1 = height - 1; - var radiusPlus1 = radius + 1; - var sumFactor = radiusPlus1 * ( radiusPlus1 + 1 ) / 2; - - var stackStart = new BlurStack(); - var stack = stackStart; - for ( i = 1; i < div; i++ ) - { - stack = stack.next = new BlurStack(); - if ( i == radiusPlus1 ) var stackEnd = stack; - } - stack.next = stackStart; - var stackIn = null; - var stackOut = null; - - yw = yi = 0; - - var mul_sum = mul_table[radius]; - var shg_sum = shg_table[radius]; - - for ( y = 0; y < height; y++ ) - { - r_in_sum = g_in_sum = b_in_sum = r_sum = g_sum = b_sum = 0; - - r_out_sum = radiusPlus1 * ( pr = pixels[yi] ); - g_out_sum = radiusPlus1 * ( pg = pixels[yi+1] ); - b_out_sum = radiusPlus1 * ( pb = pixels[yi+2] ); - - r_sum += sumFactor * pr; - g_sum += sumFactor * pg; - b_sum += sumFactor * pb; - - stack = stackStart; - - for( i = 0; i < radiusPlus1; i++ ) - { - stack.r = pr; - stack.g = pg; - stack.b = pb; - stack = stack.next; - } - - for( i = 1; i < radiusPlus1; i++ ) - { - p = yi + (( widthMinus1 < i ? widthMinus1 : i ) << 2 ); - r_sum += ( stack.r = ( pr = pixels[p])) * ( rbs = radiusPlus1 - i ); - g_sum += ( stack.g = ( pg = pixels[p+1])) * rbs; - b_sum += ( stack.b = ( pb = pixels[p+2])) * rbs; - - r_in_sum += pr; - g_in_sum += pg; - b_in_sum += pb; - - stack = stack.next; - } - - - stackIn = stackStart; - stackOut = stackEnd; - for ( x = 0; x < width; x++ ) - { - pixels[yi] = (r_sum * mul_sum) >> shg_sum; - pixels[yi+1] = (g_sum * mul_sum) >> shg_sum; - pixels[yi+2] = (b_sum * mul_sum) >> shg_sum; - - r_sum -= r_out_sum; - g_sum -= g_out_sum; - b_sum -= b_out_sum; - - r_out_sum -= stackIn.r; - g_out_sum -= stackIn.g; - b_out_sum -= stackIn.b; - - p = ( yw + ( ( p = x + radius + 1 ) < widthMinus1 ? p : widthMinus1 ) ) << 2; - - r_in_sum += ( stackIn.r = pixels[p]); - g_in_sum += ( stackIn.g = pixels[p+1]); - b_in_sum += ( stackIn.b = pixels[p+2]); - - r_sum += r_in_sum; - g_sum += g_in_sum; - b_sum += b_in_sum; - - stackIn = stackIn.next; - - r_out_sum += ( pr = stackOut.r ); - g_out_sum += ( pg = stackOut.g ); - b_out_sum += ( pb = stackOut.b ); - - r_in_sum -= pr; - g_in_sum -= pg; - b_in_sum -= pb; - - stackOut = stackOut.next; - - yi += 4; - } - yw += width; - } - - - for ( x = 0; x < width; x++ ) - { - g_in_sum = b_in_sum = r_in_sum = g_sum = b_sum = r_sum = 0; - - yi = x << 2; - r_out_sum = radiusPlus1 * ( pr = pixels[yi]); - g_out_sum = radiusPlus1 * ( pg = pixels[yi+1]); - b_out_sum = radiusPlus1 * ( pb = pixels[yi+2]); - - r_sum += sumFactor * pr; - g_sum += sumFactor * pg; - b_sum += sumFactor * pb; - - stack = stackStart; - - for( i = 0; i < radiusPlus1; i++ ) - { - stack.r = pr; - stack.g = pg; - stack.b = pb; - stack = stack.next; - } - - yp = width; - - for( i = 1; i <= radius; i++ ) - { - yi = ( yp + x ) << 2; - - r_sum += ( stack.r = ( pr = pixels[yi])) * ( rbs = radiusPlus1 - i ); - g_sum += ( stack.g = ( pg = pixels[yi+1])) * rbs; - b_sum += ( stack.b = ( pb = pixels[yi+2])) * rbs; - - r_in_sum += pr; - g_in_sum += pg; - b_in_sum += pb; - - stack = stack.next; - - if( i < heightMinus1 ) - { - yp += width; - } - } - - yi = x; - stackIn = stackStart; - stackOut = stackEnd; - for ( y = 0; y < height; y++ ) - { - p = yi << 2; - pixels[p] = (r_sum * mul_sum) >> shg_sum; - pixels[p+1] = (g_sum * mul_sum) >> shg_sum; - pixels[p+2] = (b_sum * mul_sum) >> shg_sum; - - r_sum -= r_out_sum; - g_sum -= g_out_sum; - b_sum -= b_out_sum; - - r_out_sum -= stackIn.r; - g_out_sum -= stackIn.g; - b_out_sum -= stackIn.b; - - p = ( x + (( ( p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1 ) * width )) << 2; - - r_sum += ( r_in_sum += ( stackIn.r = pixels[p])); - g_sum += ( g_in_sum += ( stackIn.g = pixels[p+1])); - b_sum += ( b_in_sum += ( stackIn.b = pixels[p+2])); - - stackIn = stackIn.next; - - r_out_sum += ( pr = stackOut.r ); - g_out_sum += ( pg = stackOut.g ); - b_out_sum += ( pb = stackOut.b ); - - r_in_sum -= pr; - g_in_sum -= pg; - b_in_sum -= pb; - - stackOut = stackOut.next; - - yi += width; - } - } - - context.putImageData( imageData, top_x, top_y ); - - } - - function BlurStack() - { - this.r = 0; - this.g = 0; - this.b = 0; - this.a = 0; - this.next = null; - } - - var stackBlur = { - image: stackBlurImage, - canvasRGBA: stackBlurCanvasRGBA, - canvasRGB: stackBlurCanvasRGB - }; - - // export as AMD... - if ( true ) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function () { return stackBlur; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - - // ...or as browserify - else if ( typeof module !== 'undefined' && module.exports ) { - module.exports = stackBlur; - } - - global.stackBlur = stackBlur; - - }( typeof window !== 'undefined' ? window : this )); - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function() { - /* FileSaver.js - * A saveAs() FileSaver implementation. - * 2015-01-04 - * - * By Eli Grey, http://eligrey.com - * License: X11/MIT - * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md - */ - - /*global self */ - /*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ - - /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ - - return window.saveAs - // IE 10+ (native saveAs) - || (typeof navigator !== "undefined" && - navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) - // Everyone else - || (function (view) { - "use strict"; - // IE <10 is explicitly unsupported - if (typeof navigator !== "undefined" && - /MSIE [1-9]\./.test(navigator.userAgent)) { - return; - } - var - doc = view.document - // only get URL when necessary in case Blob.js hasn't overridden it yet - , get_URL = function () { - return view.URL || view.webkitURL || view; - } - , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") - , can_use_save_link = "download" in save_link - , click = function (node) { - var event = doc.createEvent("MouseEvents"); - event.initMouseEvent( - "click", true, false, view, 0, 0, 0, 0, 0 - , false, false, false, false, 0, null - ); - node.dispatchEvent(event); - } - , webkit_req_fs = view.webkitRequestFileSystem - , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem - , throw_outside = function (ex) { - (view.setImmediate || view.setTimeout)(function () { - throw ex; - }, 0); - } - , force_saveable_type = "application/octet-stream" - , fs_min_size = 0 - // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and - // https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047 - // for the reasoning behind the timeout and revocation flow - , arbitrary_revoke_timeout = 500 // in ms - , revoke = function (file) { - var revoker = function () { - if (typeof file === "string") { // file is an object URL - get_URL().revokeObjectURL(file); - } else { // file is a File - file.remove(); - } - }; - if (view.chrome) { - revoker(); - } else { - setTimeout(revoker, arbitrary_revoke_timeout); - } - } - , dispatch = function (filesaver, event_types, event) { - event_types = [].concat(event_types); - var i = event_types.length; - while (i--) { - var listener = filesaver["on" + event_types[i]]; - if (typeof listener === "function") { - try { - listener.call(filesaver, event || filesaver); - } catch (ex) { - throw_outside(ex); - } - } - } - } - , FileSaver = function (blob, name) { - // First try a.download, then web filesystem, then object URLs - var - filesaver = this - , type = blob.type - , blob_changed = false - , object_url - , target_view - , dispatch_all = function () { - dispatch(filesaver, "writestart progress write writeend".split(" ")); - } - // on any filesys errors revert to saving with object URLs - , fs_error = function () { - // don't create more object URLs than needed - if (blob_changed || !object_url) { - object_url = get_URL().createObjectURL(blob); - } - if (target_view) { - target_view.location.href = object_url; - } else { - var new_tab = view.open(object_url, "_blank"); - if (new_tab == undefined && typeof safari !== "undefined") { - //Apple do not allow window.open, see http://bit.ly/1kZffRI - view.location.href = object_url - } - } - filesaver.readyState = filesaver.DONE; - dispatch_all(); - revoke(object_url); - } - , abortable = function (func) { - return function () { - if (filesaver.readyState !== filesaver.DONE) { - return func.apply(this, arguments); - } - }; - } - , create_if_not_found = {create: true, exclusive: false} - , slice - ; - filesaver.readyState = filesaver.INIT; - if (!name) { - name = "download"; - } - if (can_use_save_link) { - object_url = get_URL().createObjectURL(blob); - save_link.href = object_url; - save_link.download = name; - click(save_link); - filesaver.readyState = filesaver.DONE; - dispatch_all(); - revoke(object_url); - return; - } - // Object and web filesystem URLs have a problem saving in Google Chrome when - // viewed in a tab, so I force save with application/octet-stream - // http://code.google.com/p/chromium/issues/detail?id=91158 - // Update: Google errantly closed 91158, I submitted it again: - // https://code.google.com/p/chromium/issues/detail?id=389642 - if (view.chrome && type && type !== force_saveable_type) { - slice = blob.slice || blob.webkitSlice; - blob = slice.call(blob, 0, blob.size, force_saveable_type); - blob_changed = true; - } - // Since I can't be sure that the guessed media type will trigger a download - // in WebKit, I append .download to the filename. - // https://bugs.webkit.org/show_bug.cgi?id=65440 - if (webkit_req_fs && name !== "download") { - name += ".download"; - } - if (type === force_saveable_type || webkit_req_fs) { - target_view = view; - } - if (!req_fs) { - fs_error(); - return; - } - fs_min_size += blob.size; - req_fs(view.TEMPORARY, fs_min_size, abortable(function (fs) { - fs.root.getDirectory("saved", create_if_not_found, abortable(function (dir) { - var save = function () { - dir.getFile(name, create_if_not_found, abortable(function (file) { - file.createWriter(abortable(function (writer) { - writer.onwriteend = function (event) { - target_view.location.href = file.toURL(); - filesaver.readyState = filesaver.DONE; - dispatch(filesaver, "writeend", event); - revoke(file); - }; - writer.onerror = function () { - var error = writer.error; - if (error.code !== error.ABORT_ERR) { - fs_error(); - } - }; - "writestart progress write abort".split(" ").forEach(function (event) { - writer["on" + event] = filesaver["on" + event]; - }); - writer.write(blob); - filesaver.abort = function () { - writer.abort(); - filesaver.readyState = filesaver.DONE; - }; - filesaver.readyState = filesaver.WRITING; - }), fs_error); - }), fs_error); - }; - dir.getFile(name, {create: false}, abortable(function (file) { - // delete file if it already exists - file.remove(); - save(); - }), abortable(function (ex) { - if (ex.code === ex.NOT_FOUND_ERR) { - save(); - } else { - fs_error(); - } - })); - }), fs_error); - }), fs_error); - } - , FS_proto = FileSaver.prototype - , saveAs = function (blob, name) { - return new FileSaver(blob, name); - } - ; - FS_proto.abort = function () { - var filesaver = this; - filesaver.readyState = filesaver.DONE; - dispatch(filesaver, "abort"); - }; - FS_proto.readyState = FS_proto.INIT = 0; - FS_proto.WRITING = 1; - FS_proto.DONE = 2; - - FS_proto.error = - FS_proto.onwritestart = - FS_proto.onprogress = - FS_proto.onwrite = - FS_proto.onabort = - FS_proto.onerror = - FS_proto.onwriteend = - null; - - return saveAs; - }(window)); - }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - - - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_RESULT__;/* WEBPACK VAR INJECTION */(function(process, global, module) {/*! - * @overview es6-promise - a tiny implementation of Promises/A+. - * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) - * @license Licensed under MIT license - * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE - * @version 2.0.0 - */ - - (function() { - "use strict"; - - function $$utils$$objectOrFunction(x) { - return typeof x === 'function' || (typeof x === 'object' && x !== null); - } - - function $$utils$$isFunction(x) { - return typeof x === 'function'; - } - - function $$utils$$isMaybeThenable(x) { - return typeof x === 'object' && x !== null; - } - - var $$utils$$_isArray; - - if (!Array.isArray) { - $$utils$$_isArray = function (x) { - return Object.prototype.toString.call(x) === '[object Array]'; - }; - } else { - $$utils$$_isArray = Array.isArray; - } - - var $$utils$$isArray = $$utils$$_isArray; - var $$utils$$now = Date.now || function() { return new Date().getTime(); }; - function $$utils$$F() { } - - var $$utils$$o_create = (Object.create || function (o) { - if (arguments.length > 1) { - throw new Error('Second argument not supported'); - } - if (typeof o !== 'object') { - throw new TypeError('Argument must be an object'); - } - $$utils$$F.prototype = o; - return new $$utils$$F(); - }); - - var $$asap$$len = 0; - - var $$asap$$default = function asap(callback, arg) { - $$asap$$queue[$$asap$$len] = callback; - $$asap$$queue[$$asap$$len + 1] = arg; - $$asap$$len += 2; - if ($$asap$$len === 2) { - // If len is 1, that means that we need to schedule an async flush. - // If additional callbacks are queued before the queue is flushed, they - // will be processed by this flush that we are scheduling. - $$asap$$scheduleFlush(); - } - }; - - var $$asap$$browserGlobal = (typeof window !== 'undefined') ? window : {}; - var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver; - - // test for web worker but not in IE10 - var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && - typeof importScripts !== 'undefined' && - typeof MessageChannel !== 'undefined'; - - // node - function $$asap$$useNextTick() { - return function() { - process.nextTick($$asap$$flush); - }; - } - - function $$asap$$useMutationObserver() { - var iterations = 0; - var observer = new $$asap$$BrowserMutationObserver($$asap$$flush); - var node = document.createTextNode(''); - observer.observe(node, { characterData: true }); - - return function() { - node.data = (iterations = ++iterations % 2); - }; - } - - // web worker - function $$asap$$useMessageChannel() { - var channel = new MessageChannel(); - channel.port1.onmessage = $$asap$$flush; - return function () { - channel.port2.postMessage(0); - }; - } - - function $$asap$$useSetTimeout() { - return function() { - setTimeout($$asap$$flush, 1); - }; - } - - var $$asap$$queue = new Array(1000); - - function $$asap$$flush() { - for (var i = 0; i < $$asap$$len; i+=2) { - var callback = $$asap$$queue[i]; - var arg = $$asap$$queue[i+1]; - - callback(arg); - - $$asap$$queue[i] = undefined; - $$asap$$queue[i+1] = undefined; - } - - $$asap$$len = 0; - } - - var $$asap$$scheduleFlush; - - // Decide what async method to use to triggering processing of queued callbacks: - if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { - $$asap$$scheduleFlush = $$asap$$useNextTick(); - } else if ($$asap$$BrowserMutationObserver) { - $$asap$$scheduleFlush = $$asap$$useMutationObserver(); - } else if ($$asap$$isWorker) { - $$asap$$scheduleFlush = $$asap$$useMessageChannel(); - } else { - $$asap$$scheduleFlush = $$asap$$useSetTimeout(); - } - - function $$$internal$$noop() {} - var $$$internal$$PENDING = void 0; - var $$$internal$$FULFILLED = 1; - var $$$internal$$REJECTED = 2; - var $$$internal$$GET_THEN_ERROR = new $$$internal$$ErrorObject(); - - function $$$internal$$selfFullfillment() { - return new TypeError("You cannot resolve a promise with itself"); - } - - function $$$internal$$cannotReturnOwn() { - return new TypeError('A promises callback cannot return that same promise.') - } - - function $$$internal$$getThen(promise) { - try { - return promise.then; - } catch(error) { - $$$internal$$GET_THEN_ERROR.error = error; - return $$$internal$$GET_THEN_ERROR; - } - } - - function $$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { - try { - then.call(value, fulfillmentHandler, rejectionHandler); - } catch(e) { - return e; - } - } - - function $$$internal$$handleForeignThenable(promise, thenable, then) { - $$asap$$default(function(promise) { - var sealed = false; - var error = $$$internal$$tryThen(then, thenable, function(value) { - if (sealed) { return; } - sealed = true; - if (thenable !== value) { - $$$internal$$resolve(promise, value); - } else { - $$$internal$$fulfill(promise, value); - } - }, function(reason) { - if (sealed) { return; } - sealed = true; - - $$$internal$$reject(promise, reason); - }, 'Settle: ' + (promise._label || ' unknown promise')); - - if (!sealed && error) { - sealed = true; - $$$internal$$reject(promise, error); - } - }, promise); - } - - function $$$internal$$handleOwnThenable(promise, thenable) { - if (thenable._state === $$$internal$$FULFILLED) { - $$$internal$$fulfill(promise, thenable._result); - } else if (promise._state === $$$internal$$REJECTED) { - $$$internal$$reject(promise, thenable._result); - } else { - $$$internal$$subscribe(thenable, undefined, function(value) { - $$$internal$$resolve(promise, value); - }, function(reason) { - $$$internal$$reject(promise, reason); - }); - } - } - - function $$$internal$$handleMaybeThenable(promise, maybeThenable) { - if (maybeThenable.constructor === promise.constructor) { - $$$internal$$handleOwnThenable(promise, maybeThenable); - } else { - var then = $$$internal$$getThen(maybeThenable); - - if (then === $$$internal$$GET_THEN_ERROR) { - $$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error); - } else if (then === undefined) { - $$$internal$$fulfill(promise, maybeThenable); - } else if ($$utils$$isFunction(then)) { - $$$internal$$handleForeignThenable(promise, maybeThenable, then); - } else { - $$$internal$$fulfill(promise, maybeThenable); - } - } - } - - function $$$internal$$resolve(promise, value) { - if (promise === value) { - $$$internal$$reject(promise, $$$internal$$selfFullfillment()); - } else if ($$utils$$objectOrFunction(value)) { - $$$internal$$handleMaybeThenable(promise, value); - } else { - $$$internal$$fulfill(promise, value); - } - } - - function $$$internal$$publishRejection(promise) { - if (promise._onerror) { - promise._onerror(promise._result); - } - - $$$internal$$publish(promise); - } - - function $$$internal$$fulfill(promise, value) { - if (promise._state !== $$$internal$$PENDING) { return; } - - promise._result = value; - promise._state = $$$internal$$FULFILLED; - - if (promise._subscribers.length === 0) { - } else { - $$asap$$default($$$internal$$publish, promise); - } - } - - function $$$internal$$reject(promise, reason) { - if (promise._state !== $$$internal$$PENDING) { return; } - promise._state = $$$internal$$REJECTED; - promise._result = reason; - - $$asap$$default($$$internal$$publishRejection, promise); - } - - function $$$internal$$subscribe(parent, child, onFulfillment, onRejection) { - var subscribers = parent._subscribers; - var length = subscribers.length; - - parent._onerror = null; - - subscribers[length] = child; - subscribers[length + $$$internal$$FULFILLED] = onFulfillment; - subscribers[length + $$$internal$$REJECTED] = onRejection; - - if (length === 0 && parent._state) { - $$asap$$default($$$internal$$publish, parent); - } - } - - function $$$internal$$publish(promise) { - var subscribers = promise._subscribers; - var settled = promise._state; - - if (subscribers.length === 0) { return; } - - var child, callback, detail = promise._result; - - for (var i = 0; i < subscribers.length; i += 3) { - child = subscribers[i]; - callback = subscribers[i + settled]; - - if (child) { - $$$internal$$invokeCallback(settled, child, callback, detail); - } else { - callback(detail); - } - } - - promise._subscribers.length = 0; - } - - function $$$internal$$ErrorObject() { - this.error = null; - } - - var $$$internal$$TRY_CATCH_ERROR = new $$$internal$$ErrorObject(); - - function $$$internal$$tryCatch(callback, detail) { - try { - return callback(detail); - } catch(e) { - $$$internal$$TRY_CATCH_ERROR.error = e; - return $$$internal$$TRY_CATCH_ERROR; - } - } - - function $$$internal$$invokeCallback(settled, promise, callback, detail) { - var hasCallback = $$utils$$isFunction(callback), - value, error, succeeded, failed; - - if (hasCallback) { - value = $$$internal$$tryCatch(callback, detail); - - if (value === $$$internal$$TRY_CATCH_ERROR) { - failed = true; - error = value.error; - value = null; - } else { - succeeded = true; - } - - if (promise === value) { - $$$internal$$reject(promise, $$$internal$$cannotReturnOwn()); - return; - } - - } else { - value = detail; - succeeded = true; - } - - if (promise._state !== $$$internal$$PENDING) { - // noop - } else if (hasCallback && succeeded) { - $$$internal$$resolve(promise, value); - } else if (failed) { - $$$internal$$reject(promise, error); - } else if (settled === $$$internal$$FULFILLED) { - $$$internal$$fulfill(promise, value); - } else if (settled === $$$internal$$REJECTED) { - $$$internal$$reject(promise, value); - } - } - - function $$$internal$$initializePromise(promise, resolver) { - try { - resolver(function resolvePromise(value){ - $$$internal$$resolve(promise, value); - }, function rejectPromise(reason) { - $$$internal$$reject(promise, reason); - }); - } catch(e) { - $$$internal$$reject(promise, e); - } - } - - function $$$enumerator$$makeSettledResult(state, position, value) { - if (state === $$$internal$$FULFILLED) { - return { - state: 'fulfilled', - value: value - }; - } else { - return { - state: 'rejected', - reason: value - }; - } - } - - function $$$enumerator$$Enumerator(Constructor, input, abortOnReject, label) { - this._instanceConstructor = Constructor; - this.promise = new Constructor($$$internal$$noop, label); - this._abortOnReject = abortOnReject; - - if (this._validateInput(input)) { - this._input = input; - this.length = input.length; - this._remaining = input.length; - - this._init(); - - if (this.length === 0) { - $$$internal$$fulfill(this.promise, this._result); - } else { - this.length = this.length || 0; - this._enumerate(); - if (this._remaining === 0) { - $$$internal$$fulfill(this.promise, this._result); - } - } - } else { - $$$internal$$reject(this.promise, this._validationError()); - } - } - - $$$enumerator$$Enumerator.prototype._validateInput = function(input) { - return $$utils$$isArray(input); - }; - - $$$enumerator$$Enumerator.prototype._validationError = function() { - return new Error('Array Methods must be provided an Array'); - }; - - $$$enumerator$$Enumerator.prototype._init = function() { - this._result = new Array(this.length); - }; - - var $$$enumerator$$default = $$$enumerator$$Enumerator; - - $$$enumerator$$Enumerator.prototype._enumerate = function() { - var length = this.length; - var promise = this.promise; - var input = this._input; - - for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) { - this._eachEntry(input[i], i); - } - }; - - $$$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) { - var c = this._instanceConstructor; - if ($$utils$$isMaybeThenable(entry)) { - if (entry.constructor === c && entry._state !== $$$internal$$PENDING) { - entry._onerror = null; - this._settledAt(entry._state, i, entry._result); - } else { - this._willSettleAt(c.resolve(entry), i); - } - } else { - this._remaining--; - this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry); - } - }; - - $$$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) { - var promise = this.promise; - - if (promise._state === $$$internal$$PENDING) { - this._remaining--; - - if (this._abortOnReject && state === $$$internal$$REJECTED) { - $$$internal$$reject(promise, value); - } else { - this._result[i] = this._makeResult(state, i, value); - } - } - - if (this._remaining === 0) { - $$$internal$$fulfill(promise, this._result); - } - }; - - $$$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) { - return value; - }; - - $$$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) { - var enumerator = this; - - $$$internal$$subscribe(promise, undefined, function(value) { - enumerator._settledAt($$$internal$$FULFILLED, i, value); - }, function(reason) { - enumerator._settledAt($$$internal$$REJECTED, i, reason); - }); - }; - - var $$promise$all$$default = function all(entries, label) { - return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise; - }; - - var $$promise$race$$default = function race(entries, label) { - /*jshint validthis:true */ - var Constructor = this; - - var promise = new Constructor($$$internal$$noop, label); - - if (!$$utils$$isArray(entries)) { - $$$internal$$reject(promise, new TypeError('You must pass an array to race.')); - return promise; - } - - var length = entries.length; - - function onFulfillment(value) { - $$$internal$$resolve(promise, value); - } - - function onRejection(reason) { - $$$internal$$reject(promise, reason); - } - - for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) { - $$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); - } - - return promise; - }; - - var $$promise$resolve$$default = function resolve(object, label) { - /*jshint validthis:true */ - var Constructor = this; - - if (object && typeof object === 'object' && object.constructor === Constructor) { - return object; - } - - var promise = new Constructor($$$internal$$noop, label); - $$$internal$$resolve(promise, object); - return promise; - }; - - var $$promise$reject$$default = function reject(reason, label) { - /*jshint validthis:true */ - var Constructor = this; - var promise = new Constructor($$$internal$$noop, label); - $$$internal$$reject(promise, reason); - return promise; - }; - - var $$es6$promise$promise$$counter = 0; - - function $$es6$promise$promise$$needsResolver() { - throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); - } - - function $$es6$promise$promise$$needsNew() { - throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); - } - - var $$es6$promise$promise$$default = $$es6$promise$promise$$Promise; - - /** - Promise objects represent the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise’s eventual value or the reason - why the promise cannot be fulfilled. - - Terminology - ----------- - - - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - - `thenable` is an object or function that defines a `then` method. - - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - - `exception` is a value that is thrown using the throw statement. - - `reason` is a value that indicates why a promise was rejected. - - `settled` the final resting state of a promise, fulfilled or rejected. - - A promise can be in one of three states: pending, fulfilled, or rejected. - - Promises that are fulfilled have a fulfillment value and are in the fulfilled - state. Promises that are rejected have a rejection reason and are in the - rejected state. A fulfillment value is never a thenable. - - Promises can also be said to *resolve* a value. If this value is also a - promise, then the original promise's settled state will match the value's - settled state. So a promise that *resolves* a promise that rejects will - itself reject, and a promise that *resolves* a promise that fulfills will - itself fulfill. - - - Basic Usage: - ------------ - - ```js - var promise = new Promise(function(resolve, reject) { - // on success - resolve(value); - - // on failure - reject(reason); - }); - - promise.then(function(value) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Advanced Usage: - --------------- - - Promises shine when abstracting away asynchronous interactions such as - `XMLHttpRequest`s. - - ```js - function getJSON(url) { - return new Promise(function(resolve, reject){ - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url); - xhr.onreadystatechange = handler; - xhr.responseType = 'json'; - xhr.setRequestHeader('Accept', 'application/json'); - xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200) { - resolve(this.response); - } else { - reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); - } - } - }; - }); - } - - getJSON('/posts.json').then(function(json) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Unlike callbacks, promises are great composable primitives. - - ```js - Promise.all([ - getJSON('/posts'), - getJSON('/comments') - ]).then(function(values){ - values[0] // => postsJSON - values[1] // => commentsJSON - - return values; - }); - ``` - - @class Promise - @param {function} resolver - Useful for tooling. - @constructor - */ - function $$es6$promise$promise$$Promise(resolver) { - this._id = $$es6$promise$promise$$counter++; - this._state = undefined; - this._result = undefined; - this._subscribers = []; - - if ($$$internal$$noop !== resolver) { - if (!$$utils$$isFunction(resolver)) { - $$es6$promise$promise$$needsResolver(); - } - - if (!(this instanceof $$es6$promise$promise$$Promise)) { - $$es6$promise$promise$$needsNew(); - } - - $$$internal$$initializePromise(this, resolver); - } - } - - $$es6$promise$promise$$Promise.all = $$promise$all$$default; - $$es6$promise$promise$$Promise.race = $$promise$race$$default; - $$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default; - $$es6$promise$promise$$Promise.reject = $$promise$reject$$default; - - $$es6$promise$promise$$Promise.prototype = { - constructor: $$es6$promise$promise$$Promise, - - /** - The primary way of interacting with a promise is through its `then` method, - which registers callbacks to receive either a promise's eventual value or the - reason why the promise cannot be fulfilled. - - ```js - findUser().then(function(user){ - // user is available - }, function(reason){ - // user is unavailable, and you are given the reason why - }); - ``` - - Chaining - -------- - - The return value of `then` is itself a promise. This second, 'downstream' - promise is resolved with the return value of the first promise's fulfillment - or rejection handler, or rejected if the handler throws an exception. - - ```js - findUser().then(function (user) { - return user.name; - }, function (reason) { - return 'default name'; - }).then(function (userName) { - // If `findUser` fulfilled, `userName` will be the user's name, otherwise it - // will be `'default name'` - }); - - findUser().then(function (user) { - throw new Error('Found user, but still unhappy'); - }, function (reason) { - throw new Error('`findUser` rejected and we're unhappy'); - }).then(function (value) { - // never reached - }, function (reason) { - // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. - // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. - }); - ``` - If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. - - ```js - findUser().then(function (user) { - throw new PedagogicalException('Upstream error'); - }).then(function (value) { - // never reached - }).then(function (value) { - // never reached - }, function (reason) { - // The `PedgagocialException` is propagated all the way down to here - }); - ``` - - Assimilation - ------------ - - Sometimes the value you want to propagate to a downstream promise can only be - retrieved asynchronously. This can be achieved by returning a promise in the - fulfillment or rejection handler. The downstream promise will then be pending - until the returned promise is settled. This is called *assimilation*. - - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // The user's comments are now available - }); - ``` - - If the assimliated promise rejects, then the downstream promise will also reject. - - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // If `findCommentsByAuthor` fulfills, we'll have the value here - }, function (reason) { - // If `findCommentsByAuthor` rejects, we'll have the reason here - }); - ``` - - Simple Example - -------------- - - Synchronous Example - - ```javascript - var result; - - try { - result = findResult(); - // success - } catch(reason) { - // failure - } - ``` - - Errback Example - - ```js - findResult(function(result, err){ - if (err) { - // failure - } else { - // success - } - }); - ``` - - Promise Example; - - ```javascript - findResult().then(function(result){ - // success - }, function(reason){ - // failure - }); - ``` - - Advanced Example - -------------- - - Synchronous Example - - ```javascript - var author, books; - - try { - author = findAuthor(); - books = findBooksByAuthor(author); - // success - } catch(reason) { - // failure - } - ``` - - Errback Example - - ```js - - function foundBooks(books) { - - } - - function failure(reason) { - - } - - findAuthor(function(author, err){ - if (err) { - failure(err); - // failure - } else { - try { - findBoooksByAuthor(author, function(books, err) { - if (err) { - failure(err); - } else { - try { - foundBooks(books); - } catch(reason) { - failure(reason); - } - } - }); - } catch(error) { - failure(err); - } - // success - } - }); - ``` - - Promise Example; - - ```javascript - findAuthor(). - then(findBooksByAuthor). - then(function(books){ - // found books - }).catch(function(reason){ - // something went wrong - }); - ``` - - @method then - @param {Function} onFulfilled - @param {Function} onRejected - Useful for tooling. - @return {Promise} - */ - then: function(onFulfillment, onRejection) { - var parent = this; - var state = parent._state; - - if (state === $$$internal$$FULFILLED && !onFulfillment || state === $$$internal$$REJECTED && !onRejection) { - return this; - } - - var child = new this.constructor($$$internal$$noop); - var result = parent._result; - - if (state) { - var callback = arguments[state - 1]; - $$asap$$default(function(){ - $$$internal$$invokeCallback(state, child, callback, result); - }); - } else { - $$$internal$$subscribe(parent, child, onFulfillment, onRejection); - } - - return child; - }, - - /** - `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same - as the catch block of a try/catch statement. - - ```js - function findAuthor(){ - throw new Error('couldn't find that author'); - } - - // synchronous - try { - findAuthor(); - } catch(reason) { - // something went wrong - } - - // async with promises - findAuthor().catch(function(reason){ - // something went wrong - }); - ``` - - @method catch - @param {Function} onRejection - Useful for tooling. - @return {Promise} - */ - 'catch': function(onRejection) { - return this.then(null, onRejection); - } - }; - - var $$es6$promise$polyfill$$default = function polyfill() { - var local; - - if (typeof global !== 'undefined') { - local = global; - } else if (typeof window !== 'undefined' && window.document) { - local = window; - } else { - local = self; - } - - var es6PromiseSupport = - "Promise" in local && - // Some of these methods are missing from - // Firefox/Chrome experimental implementations - "resolve" in local.Promise && - "reject" in local.Promise && - "all" in local.Promise && - "race" in local.Promise && - // Older version of the spec had a resolver object - // as the arg rather than a function - (function() { - var resolve; - new local.Promise(function(r) { resolve = r; }); - return $$utils$$isFunction(resolve); - }()); - - if (!es6PromiseSupport) { - local.Promise = $$es6$promise$promise$$default; - } - }; - - var es6$promise$umd$$ES6Promise = { - 'Promise': $$es6$promise$promise$$default, - 'polyfill': $$es6$promise$polyfill$$default - }; - - /* global define:true module:true window: true */ - if ("function" === 'function' && __webpack_require__(9)['amd']) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { return es6$promise$umd$$ES6Promise; }.call(exports, __webpack_require__, exports, module), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } else if (typeof module !== 'undefined' && module['exports']) { - module['exports'] = es6$promise$umd$$ES6Promise; - } else if (typeof this !== 'undefined') { - this['ES6Promise'] = es6$promise$umd$$ES6Promise; - } - }).call(this); - /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(7), (function() { return this; }()), __webpack_require__(8)(module))) - -/***/ }, -/* 7 */ -/***/ function(module, exports) { - - // shim for using process in browser - var process = module.exports = {}; - - // cached from whatever global is present so that test runners that stub it - // don't break things. But we need to wrap it in a try catch in case it is - // wrapped in strict mode code which doesn't define any globals. It's inside a - // function because try/catches deoptimize in certain engines. - - var cachedSetTimeout; - var cachedClearTimeout; - - function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); - } - function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); - } - (function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } - } ()) - function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - - } - function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - - } - var queue = []; - var draining = false; - var currentQueue; - var queueIndex = -1; - - function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } - } - - function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); - } - - process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } - }; - - // v8 likes predictible objects - function Item(fun, array) { - this.fun = fun; - this.array = array; - } - Item.prototype.run = function () { - this.fun.apply(null, this.array); - }; - process.title = 'browser'; - process.browser = true; - process.env = {}; - process.argv = []; - process.version = ''; // empty string to avoid regexp issues - process.versions = {}; - - function noop() {} - - process.on = noop; - process.addListener = noop; - process.once = noop; - process.off = noop; - process.removeListener = noop; - process.removeAllListeners = noop; - process.emit = noop; - process.prependListener = noop; - process.prependOnceListener = noop; - - process.listeners = function (name) { return [] } - - process.binding = function (name) { - throw new Error('process.binding is not supported'); - }; - - process.cwd = function () { return '/' }; - process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); - }; - process.umask = function() { return 0; }; - - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - module.children = []; - module.webpackPolyfill = 1; - } - return module; - } - - -/***/ }, -/* 9 */ -/***/ function(module, exports) { - - module.exports = function() { throw new Error("define cannot be used indirect"); }; - - -/***/ }, -/* 10 */ -/***/ function(module, exports) { - - module.exports = "body > * {\r\n visibility: hidden;\r\n}\r\nbody {\r\n overflow: hidden;\r\n}\r\nbody * {\r\n visibility: hidden !important;\r\n}\r\n\r\n.graphical-report__print-block {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n visibility: visible !important;\r\n display: block !important;\r\n width: 100%;\r\n /*height: 100%;*/\r\n}\r\n" - -/***/ }, -/* 11 */ -/***/ function(module, exports) { - - (function() { - 'use strict'; - - if (self.fetch) { - return - } - - function Headers(headers) { - this.map = {} - - var self = this - if (headers instanceof Headers) { - headers.forEach(function(name, values) { - values.forEach(function(value) { - self.append(name, value) - }) - }) - - } else if (headers) { - Object.getOwnPropertyNames(headers).forEach(function(name) { - self.append(name, headers[name]) - }) - } - } - - Headers.prototype.append = function(name, value) { - name = name.toLowerCase() - var list = this.map[name] - if (!list) { - list = [] - this.map[name] = list - } - list.push(value) - } - - Headers.prototype['delete'] = function(name) { - delete this.map[name.toLowerCase()] - } - - Headers.prototype.get = function(name) { - var values = this.map[name.toLowerCase()] - return values ? values[0] : null - } - - Headers.prototype.getAll = function(name) { - return this.map[name.toLowerCase()] || [] - } - - Headers.prototype.has = function(name) { - return this.map.hasOwnProperty(name.toLowerCase()) - } - - Headers.prototype.set = function(name, value) { - this.map[name.toLowerCase()] = [value] - } - - // Instead of iterable for now. - Headers.prototype.forEach = function(callback) { - var self = this - Object.getOwnPropertyNames(this.map).forEach(function(name) { - callback(name, self.map[name]) - }) - } - - function consumed(body) { - if (body.bodyUsed) { - return Promise.reject(new TypeError('Already read')) - } - body.bodyUsed = true - } - - function fileReaderReady(reader) { - return new Promise(function(resolve, reject) { - reader.onload = function() { - resolve(reader.result) - } - reader.onerror = function() { - reject(reader.error) - } - }) - } - - function readBlobAsArrayBuffer(blob) { - var reader = new FileReader() - reader.readAsArrayBuffer(blob) - return fileReaderReady(reader) - } - - function readBlobAsText(blob) { - var reader = new FileReader() - reader.readAsText(blob) - return fileReaderReady(reader) - } - - var blobSupport = 'FileReader' in self && 'Blob' in self && (function() { - try { - new Blob(); - return true - } catch(e) { - return false - } - })(); - - function Body() { - this.bodyUsed = false - - if (blobSupport) { - this.blob = function() { - var rejected = consumed(this) - return rejected ? rejected : Promise.resolve(this._bodyBlob) - } - - this.arrayBuffer = function() { - return this.blob().then(readBlobAsArrayBuffer) - } - - this.text = function() { - return this.blob().then(readBlobAsText) - } - } else { - this.text = function() { - var rejected = consumed(this) - return rejected ? rejected : Promise.resolve(this._bodyText) - } - } - - if ('FormData' in self) { - this.formData = function() { - return this.text().then(decode) - } - } - - this.json = function() { - return this.text().then(JSON.parse) - } - - return this - } - - // HTTP methods whose capitalization should be normalized - var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] - - function normalizeMethod(method) { - var upcased = method.toUpperCase() - return (methods.indexOf(upcased) > -1) ? upcased : method - } - - function Request(url, options) { - options = options || {} - this.url = url - this._body = options.body - this.credentials = options.credentials || 'omit' - this.headers = new Headers(options.headers) - this.method = normalizeMethod(options.method || 'GET') - this.mode = options.mode || null - this.referrer = null - } - - function decode(body) { - var form = new FormData() - body.trim().split('&').forEach(function(bytes) { - if (bytes) { - var split = bytes.split('=') - var name = split.shift().replace(/\+/g, ' ') - var value = split.join('=').replace(/\+/g, ' ') - form.append(decodeURIComponent(name), decodeURIComponent(value)) - } - }) - return form - } - - function headers(xhr) { - var head = new Headers() - var pairs = xhr.getAllResponseHeaders().trim().split('\n') - pairs.forEach(function(header) { - var split = header.trim().split(':') - var key = split.shift().trim() - var value = split.join(':').trim() - head.append(key, value) - }) - return head - } - - Request.prototype.fetch = function() { - var self = this - - return new Promise(function(resolve, reject) { - var xhr = new XMLHttpRequest() - - function responseURL() { - if ('responseURL' in xhr) { - return xhr.responseURL - } - - // Avoid security warnings on getResponseHeader when not allowed by CORS - if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) { - return xhr.getResponseHeader('X-Request-URL') - } - - return; - } - - xhr.onload = function() { - var status = (xhr.status === 1223) ? 204 : xhr.status - if (status < 100 || status > 599) { - reject(new TypeError('Network request failed')) - return - } - var options = { - status: status, - statusText: xhr.statusText, - headers: headers(xhr), - url: responseURL() - } - var body = 'response' in xhr ? xhr.response : xhr.responseText; - resolve(new Response(body, options)) - } - - xhr.onerror = function() { - reject(new TypeError('Network request failed')) - } - - xhr.open(self.method, self.url) - if ('responseType' in xhr && blobSupport) { - xhr.responseType = 'blob' - } - - self.headers.forEach(function(name, values) { - values.forEach(function(value) { - xhr.setRequestHeader(name, value) - }) - }) - - xhr.send((self._body === undefined) ? null : self._body) - }) - } - - Body.call(Request.prototype) - - function Response(bodyInit, options) { - if (!options) { - options = {} - } - - if (blobSupport) { - if (typeof bodyInit === 'string') { - this._bodyBlob = new Blob([bodyInit]) - } else { - this._bodyBlob = bodyInit - } - } else { - this._bodyText = bodyInit - } - this.type = 'default' - this.url = null - this.status = options.status - this.statusText = options.statusText - this.headers = options.headers - this.url = options.url || '' - } - - Body.call(Response.prototype) - - self.Headers = Headers; - self.Request = Request; - self.Response = Response; - - self.fetch = function (url, options) { - return new Request(url, options).fetch() - } - self.fetch.polyfill = true - })(); - - -/***/ } -/******/ ]) -}); -; \ No newline at end of file diff --git a/build/development/plugins/tauCharts.floating-axes.js b/build/development/plugins/tauCharts.floating-axes.js deleted file mode 100644 index 6671d4282..000000000 --- a/build/development/plugins/tauCharts.floating-axes.js +++ /dev/null @@ -1,646 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var utils = tauCharts.api.utils; - var d3 = tauCharts.api.d3; - - var SHADOW_SIZE = 16; - var SHADOW_COLOR_0 = '#E5E7EB'; - var SHADOW_COLOR_1 = '#FFFFFF'; - var SHADOW_OPACITY_0 = 1; - var SHADOW_OPACITY_1 = 0; - - var storeProp = '__transitionAttrs__'; - var parentProp = '__floatingAxesSrcParent__'; - var transProp = '__floatingAxesSrcTransform__'; - - var counter = 0; - var getId = function () { - return ++counter; - }; - - function floatingAxes(_settings) { - - var settings = utils.defaults(_settings || {}, { - detectBackground: true, - bgcolor: '#fff' - }); - - return { - - init: function (chart) { - this.instanceId = getId(); - this.chart = chart; - this.rootNode = chart.getLayout().contentContainer; - - this.beforeExportHandler = chart.on('beforeExportSVGNode', function () { - this.removeFloatingLayout(); - }, this); - this.afterExportHandler = chart.on('afterExportSVGNode', function () { - this.createFloatingLayout(); - }, this); - }, - - onBeforeRender: function () { - this.removeFloatingLayout(); - }, - - onRender: function () { - - if (settings.detectBackground) { - var bg = this.detectChartBackgroundColor(); - if (bg) { - settings.bgcolor = bg; - } - } - SHADOW_COLOR_1 = settings.bgcolor; - - var applicable = true; - this.chart.traverseSpec(this.chart.getSpec(), function (unit) { - var isCoordNode = (unit && (unit.type.indexOf('COORDS.') === 0)); - if (isCoordNode) { - if (unit.type !== 'COORDS.RECT') { - // non-rectangular coordinates - applicable = false; - } else { - var guide = unit.guide || {}; - if (guide.autoLayout !== 'extract-axes') { - // non-extract axes - applicable = false; - } - } - } - }); - - if (applicable) { - this.createFloatingLayout(); - } - }, - - destroy: function () { - this.removeFloatingLayout(); - this.chart.removeHandler(this.beforeExportHandler, this); - this.chart.removeHandler(this.afterExportHandler, this); - }, - - createFloatingLayout: function () { - - var id = this.instanceId; - var root = this.rootNode; - var svg = this.chart.getSVG(); - var d3Svg = d3.select(svg); - var animationSpeed = this.chart.configGPL.settings.animationSpeed; - var scrollManager = this.scrollManager = new ScrollManager(root); - - var axes = (function () { - var getAxesSelector = function (axis) { - var rootPart = '.frame-root.tau-active '; - var axisPart = '> .' + axis + '.axis.tau-active'; - return [ - rootPart + axisPart, - rootPart + '.cell.tau-active ' + axisPart - ].join(', '); - }; - return { - x: Array.prototype.slice.call( - svg.querySelectorAll(getAxesSelector('x')), 0 - ), - y: Array.prototype.slice.call( - svg.querySelectorAll(getAxesSelector('y')), 0 - ) - }; - })(); - - var axesInfo = (function () { - function getAxisInfo(axis) { - var parentTransform = getDeepTransform(axis.parentNode); - var axisTransform = getDynamicTransform(axis); - return { - axis: axis, - parentTransform: parentTransform, - axisTransform: axisTransform - }; - } - return { - x: axes.x.map(getAxisInfo), - y: axes.y.map(getAxisInfo) - }; - })(); - - var maxYAxesX = mmax(axesInfo.y.map(function (i) { - return (i.axisTransform.translate.x + i.parentTransform.translate.x); - })) + 1; - var minXAxesY = mmin(axesInfo.x.map(function (i) { - return (i.axisTransform.translate.y + i.parentTransform.translate.y); - })) - 1; - var scrollbars = tauCharts.api.globalSettings.getScrollbarSize(root); - - function getPositions() { - return { - scrollLeft: root.scrollLeft, - scrollTop: root.scrollTop, - visibleWidth: root.clientWidth, - visibleHeight: root.clientHeight, - scrollbarWidth: scrollbars.width, - scrollbarHeight: scrollbars.height, - svgWidth: Number(d3Svg.attr('width')), - svgHeight: Number(d3Svg.attr('height')), - minXAxesY: minXAxesY, - maxYAxesX: maxYAxesX - }; - }; - - var pos = getPositions(); - - var defs = (function createSVGDefinitions() { - var defs = d3Svg.append('defs') - .attr('class', 'floating-axes floating-axes__defs'); - - var directions = { - ns: {x1: 0, y1: 0, x2: 0, y2: 1}, - ew: {x1: 1, y1: 0, x2: 0, y2: 0}, - sn: {x1: 0, y1: 1, x2: 0, y2: 0}, - we: {x1: 0, y1: 0, x2: 1, y2: 0} - }; - Object.keys(directions).forEach(function (d) { - var coords = directions[d]; - var g = defs.append('linearGradient') - .attr('id', 'shadow-gradient-' + d + '-' + id) - .attr('x1', coords.x1) - .attr('y1', coords.y1) - .attr('x2', coords.x2) - .attr('y2', coords.y2); - g.append('stop') - .attr('class', 'floating-axes__shadow-start') - .attr('offset', '0%') - .attr('stop-color', SHADOW_COLOR_0) - .attr('stop-opacity', SHADOW_OPACITY_0); - g.append('stop') - .attr('class', 'floating-axes__shadow-end') - .attr('offset', '100%') - .attr('stop-color', SHADOW_COLOR_1) - .attr('stop-opacity', SHADOW_OPACITY_1); - }); - - return defs; - })(); - - function transferAxes(floating, axesInfo) { - axesInfo.forEach(function (i) { - - // Save axis parent node to restore later - i.axis[parentProp] = i.axis.parentNode; - - // NOTE: Put axis into a group with transform - // that is equal to transform of all axis parents. - var g = floating.append('g'); - if (animationSpeed) { - g.attr('transform', translate( - i.parentTransform.translate0.x, - i.parentTransform.translate0.y - )).transition() - .duration(animationSpeed) - .attr('transform', translate( - i.parentTransform.translate.x, - i.parentTransform.translate.y - )); - } else { - g.attr('transform', translate( - i.parentTransform.translate.x, - i.parentTransform.translate.y - )); - } - g.node() - .appendChild(i.axis); - - // Save initial labels transform - Array.prototype.forEach.call( - i.axis.querySelectorAll('.label'), - function (label) { - label[transProp] = label.getAttribute('transform'); - } - ); - }); - }; - - var xAxes = (function extractXAxes() { - var axisHeight = pos.svgHeight - pos.minXAxesY + 1 + pos.scrollbarHeight; - - var g = d3Svg.append('g') - .attr('class', 'floating-axes floating-axes__x') - .call(addBackground, pos.svgWidth, axisHeight, 0, pos.minXAxesY); - - transferAxes(g, axesInfo.x); - - var labels = g.selectAll('.label'); - - scrollManager - .handleVisibilityFor(g, 'y') - .handleVisibilityFor(labels, 'x') - .onScroll(function (scrollLeft, scrollTop) { - var x = 0; - var yLimit = 0; - var y = Math.min( - (pos.visibleHeight + scrollTop - pos.svgHeight - pos.scrollbarHeight), - yLimit - ); - g.attr('transform', translate(x, y)); - labels.each(function () { - var t = parseTransform(this[transProp]); - var dx = -pos.svgWidth / 2 + pos.visibleWidth / 2 + scrollLeft; - this.setAttribute( - 'transform', - 'translate(' + (t.x + dx) + ',' + t.y + ') rotate(' + t.r + ')' - ); - }); - }); - - return g; - })(); - - var yAxes = (function extractYAxes() { - var g = d3Svg.append('g') - .attr('class', 'floating-axes floating-axes__y') - .call(addBackground, pos.maxYAxesX, pos.svgHeight); - - transferAxes(g, axesInfo.y); - - var labels = g.selectAll('.label'); - - scrollManager - .handleVisibilityFor(g, 'x') - .handleVisibilityFor(labels, 'y') - .onScroll(function (scrollLeft, scrollTop) { - var xLimit = 0; - var x = Math.max(scrollLeft, xLimit); - var y = 0; - g.attr('transform', translate(x, y)); - labels.each(function () { - var t = parseTransform(this[transProp]); - var dy = (this.matches('.inline') ? - (scrollTop) : - (scrollTop - pos.svgHeight / 2 + pos.visibleHeight / 2) - ); - this.setAttribute( - 'transform', - 'translate(' + t.x + ',' + (t.y + dy) + ') rotate(' + t.r + ')' - ); - }); - }); - - return g; - })(); - - var corner = (function createCorner() { - var xAxesHeight = pos.svgHeight - pos.minXAxesY + pos.scrollbarHeight; - - var g = d3Svg.append('g') - .attr('class', 'floating-axes floating-axes__corner') - .call(addBackground, pos.maxYAxesX, xAxesHeight); - - scrollManager - .handleVisibilityFor(g, 'xy') - .onScroll(function (scrollLeft, scrollTop) { - var bottomY = scrollTop + pos.visibleHeight; - var xLimit = 0; - var x = Math.max(scrollLeft, xLimit); - var yLimit = pos.minXAxesY; - var y = Math.min( - (scrollTop + pos.visibleHeight - xAxesHeight), - yLimit - ); - g.attr('transform', translate(x, y)); - }); - - return g; - })(); - - function addBackground(g, w, h, x, y) { - x = x || 0; - y = y || 0; - g.append('rect') - .attr('class', 'i-role-bg') - .attr('x', x - 1) - .attr('y', y - 1) - .attr('width', Math.max(0, w + 2)) - .attr('height', Math.max(0, h + 2)) - .attr('fill', settings.bgcolor); - } - - var shadows = (function createShadows() { - var yAxesWidth = pos.maxYAxesX; - var xAxesHeight = pos.svgHeight - pos.minXAxesY + pos.scrollbarHeight; - - var g = d3Svg.append('g') - .attr('class', 'floating-axes floating-axes__shadows') - .attr('pointer-events', 'none'); - - var createShadow = function (direction, x, y, width, height) { - return g.append('rect') - .attr('fill', 'url(#shadow-gradient-' + direction + '-' + id + ')') - .attr('x', x) - .attr('y', y) - .attr('width', Math.max(0, width)) - .attr('height', Math.max(0, height)); - }; - var shadowNS = createShadow('ns', 0, 0, yAxesWidth, SHADOW_SIZE); - var shadowEW = createShadow('ew', - pos.visibleWidth - SHADOW_SIZE, - pos.visibleHeight - xAxesHeight, - SHADOW_SIZE, - xAxesHeight - ); - var shadowSN = createShadow('sn', - 0, - pos.visibleHeight - xAxesHeight - SHADOW_SIZE, - yAxesWidth, - SHADOW_SIZE - ); - var shadowWE = createShadow('we', - yAxesWidth, - pos.visibleHeight - xAxesHeight, - SHADOW_SIZE, - xAxesHeight - ); - - scrollManager - .handleVisibilityFor(shadowNS, 'xy') - .handleVisibilityFor(shadowEW, 'xy') - .handleVisibilityFor(shadowSN, 'xy') - .handleVisibilityFor(shadowWE, 'xy') - .onScroll(function (scrollLeft, scrollTop) { - var x = scrollLeft; - var y = scrollTop; - g.attr('transform', translate(x, y)); - - // Hide/show shadows - var toggle = function (el, show) { - el.style('visibility', show ? '' : 'hidden'); - }; - toggle(shadowNS, scrollTop > 0 && pos.svgHeight > pos.visibleHeight); - toggle(shadowEW, - (scrollLeft + pos.visibleWidth < pos.svgWidth) && - (pos.svgWidth > pos.visibleWidth)); - toggle(shadowSN, - (scrollTop + pos.visibleHeight < pos.svgHeight) && - (pos.svgHeight > pos.visibleHeight)); - toggle(shadowWE, scrollLeft > 0 && pos.svgWidth > pos.visibleWidth); - }); - })(); - - // Place X-axis over Y and corner when not scrolled - // to fix left tick overflow - var xAxesNode = xAxes.node(); - var yAxesNode = yAxes.node(); - var cornerNode = corner.node(); - scrollManager.onScroll(function (scrollLeft) { - svg.insertBefore(xAxesNode, (scrollLeft === 0 ? - cornerNode.nextElementSibling : - yAxesNode) - ); - }); - - // Setup initial position - scrollManager.fireScroll(); - - this.floatingLayout = { - defs: defs, - xAxes: xAxes, - yAxes: yAxes, - shadows: shadows - }; - - // Fix invoking unexpected chart pointer events - d3Svg.selectAll('.floating-axes') - .on('mouseenter', function () { - var evt = document.createEvent('MouseEvents'); - evt.initMouseEvent('mouseleave', - true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - svg.dispatchEvent(evt); - }) - .on('mousemove', function () { - d3.event.stopPropagation(); - }) - .on('click', function () { - d3.event.stopPropagation(); - }); - }, - - removeFloatingLayout: function () { - - if (this.floatingLayout) { - this.floatingLayout.xAxes.call(returnAxes); - this.floatingLayout.yAxes.call(returnAxes); - this.scrollManager.destroy(); - this.floatingLayout = null; - } - - var d3Svg = d3.select(this.chart.getSVG()); - - // TODO: Reuse elements. - d3Svg.selectAll('.floating-axes').remove(); - - function returnAxes(g) { - g.selectAll('.axis').each(function () { - - // Return axis to it's initial parent - this[parentProp].appendChild(this); - delete this[parentProp]; - - // Return initial labels transform - Array.prototype.forEach.call( - this.querySelectorAll('.label'), - function (label) { - label.setAttribute('transform', label[transProp]); - delete label[transProp]; - } - ); - }); - } - }, - - detectChartBackgroundColor: function () { - var current = this.chart.getLayout().layout; - var s; - do { - s = window.getComputedStyle(current); - if (s.backgroundImage !== 'none') { - return null; - } - if (s.backgroundColor !== 'transparent' && s.backgroundColor !== 'rgba(0, 0, 0, 0)') { - return s.backgroundColor; - } - } while (current = current.parentElement); - return null; - } - }; - } - - function mmin(arr) { - return Math.min.apply(null, arr); - }; - - function mmax(arr) { - return Math.max.apply(null, arr); - }; - - function translate(x, y) { - return ('translate(' + x + ',' + y + ')'); - }; - - function parseTransform(transform) { - var result = {x: 0, y: 0, r: 0}; - if (!transform) { - return result; - } - var ts = transform.indexOf('translate('); - if (ts >= 0) { - var te = transform.indexOf(')', ts + 10); - var translateStr = transform.substring(ts + 10, te); - var translateParts = translateStr.trim().replace(',', ' ').replace(/\s+/, ' ').split(' '); - result.x = parseFloat(translateParts[0]); - if (translateParts.length > 1) { - result.y = parseFloat(translateParts[1]); - } - } - var rs = transform.indexOf('rotate('); - if (rs >= 0) { - var re = transform.indexOf(')', rs + 7); - var rotateStr = transform.substring(rs + 7, re); - result.r = parseFloat(rotateStr.trim()); - } - return result; - }; - - /** - * Returns current transform value and transform value - * that element will have when animation ends. - */ - function getDynamicTransform(node) { - var isTransformInTransition = (node[storeProp] && - node[storeProp].transform); - var currentTransform = parseTransform(node.getAttribute('transform')); - var nextTransform = (isTransformInTransition ? - parseTransform(node[storeProp].transform) : - currentTransform); - return { - translate0: currentTransform, - translate: nextTransform - }; - }; - - /** - * Returns sum of dynamic transform of an element - * including all it's parents transform. - */ - function getDeepTransform(node) { - var info = { - translate0: {x: 0, y: 0}, - translate: {x: 0, y: 0} - }; - var parent = node; - var transform; - while (parent && parent.nodeName.toUpperCase() !== 'SVG') { - transform = getDynamicTransform(parent); - info.translate0.x += transform.translate0.x; - info.translate0.y += transform.translate0.y; - info.translate.x += transform.translate.x; - info.translate.y += transform.translate.y; - parent = parent.parentNode; - } - return info; - }; - - function ScrollManager(_scrollContainer) { - - var HIDE_SCROLL_ITEMS_DURATION = 128; - var SHOW_SCROLL_ITEMS_DURATION = 256; - - var items = {x: [], y: []}; - var prevScroll = {x: 0, y: 0}; - var scrollTimeout = {x: null, y: null}; - var scrollContainer = _scrollContainer; - var scrollListeners = []; - - this.onScroll = function (listener) { - scrollListeners.push(listener); - return this; - }; - - /** - * NOTE: As far as floating axes and labels jump during scroll - * in most of browsers (except Chrome with big delta mousewheel) - * due to the fact, that browser renders scrolled content first, - * and only later fires `scroll` event, letting us return axes in place, - * we are hiding floating axes, and show them after some delay. - */ - this.handleVisibilityFor = function (d3Selection, scrollDirection) { - if (scrollDirection.indexOf('x') >= 0) { - items.x.push(d3Selection); - } - if (scrollDirection.indexOf('y') >= 0) { - items.y.push(d3Selection); - } - return this; - }; - - var scrollListener = function () { - var scrollLeft = scrollContainer.scrollLeft; - var scrollTop = scrollContainer.scrollTop; - scrollListeners.forEach(function (fn) { - fn.call(null, scrollLeft, scrollTop); - }); - - var setupVisibility = function (d) { - var scrollPos = (d === 'x' ? scrollLeft : scrollTop); - if (scrollPos !== prevScroll[d]) { - clearTimeout(scrollTimeout[d]); - callSelections(items[d], function (s) { - s.transition('floatingAxes_scrollVisibility'); // Stop transition - s.attr('opacity', 1e-6); - }); - scrollTimeout[d] = setTimeout(function () { - callSelections(items[d], function (s) { - scrollTimeout[d] = null; - s.transition('floatingAxes_scrollVisibility') - .duration(SHOW_SCROLL_ITEMS_DURATION) - .attr('opacity', 1); - }); - }, HIDE_SCROLL_ITEMS_DURATION); - } - prevScroll[d] = scrollPos; - }; - setupVisibility('x'); - setupVisibility('y'); - }; - scrollContainer.addEventListener('scroll', scrollListener); - - this.fireScroll = function () { - scrollListener.call(null, scrollContainer.scrollLeft, scrollContainer.scrollTop); - }; - - this.destroy = function () { - scrollContainer.removeEventListener('scroll', scrollListener); - }; - - function callSelections(arrayOfSelections, fn, context) { - arrayOfSelections.forEach(function (s) { - fn.call(context, s); - }); - }; - }; - - tauCharts.api.plugins.add('floating-axes', floatingAxes); - - return floatingAxes; -}); \ No newline at end of file diff --git a/build/development/plugins/tauCharts.layers.js b/build/development/plugins/tauCharts.layers.js deleted file mode 100644 index 46f9f1f2c..000000000 --- a/build/development/plugins/tauCharts.layers.js +++ /dev/null @@ -1,632 +0,0 @@ -// jscs:disable * -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var utils = tauCharts.api.utils; - var pluginsSDK = tauCharts.api.pluginsSDK; - var tokens = pluginsSDK.tokens(); - - function Layers(xSettings) { - - var settings = utils.defaults( - xSettings || {}, - { - title: 'Layers', - label: 'Layer Type', - showPanel: true, - showLayers: true, - mode: 'merge', - axisWidth: 45, - layers: [] - }); - - settings.layers.forEach(function (layer) { - layer.guide = utils.defaults( - (layer.guide || {}), - { - scaleOrient: 'left', - textAnchor: 'end', - hide: false - }); - }); - - var createFunc = function (args) { - return function (unit) { - return Object.assign(unit, args); - } - }; - - var ELEMENT_TYPE = { - line: createFunc({type: 'ELEMENT.LINE'}), - area: createFunc({type: 'ELEMENT.AREA'}), - dots: createFunc({type: 'ELEMENT.POINT'}), - scatterplot: createFunc({type: 'ELEMENT.POINT'}), - bar: createFunc({type: 'ELEMENT.INTERVAL'}), - 'stacked-bar': createFunc({type: 'ELEMENT.INTERVAL', stack: true}), - }; - - return { - - init: function (chart) { - - this._chart = chart; - - var spec = pluginsSDK.spec(this._chart.getSpec()); - var errors = this.checkIfApplicable(spec); - this._isApplicable = (errors.length === 0); - - spec.addTransformation('defined-only', function (data, props) { - var k = props.key; - return data - .filter(function (row) { - return ((row[k] !== null) && (typeof (row[k]) !== 'undefined')); - }); - }); - - if (!this._isApplicable) { - var log = spec.getSettings('log'); - log('[layers plugin]: is not applicable. ' + errors.join(' / ')); - return; - } - - this.isFacet = this.checkIsFacet(spec); - this.primaryY = this.findPrimaryLayer(spec); - var layersText = this.getLayersText(); - var layersGroup = this.getLayersGroup(); - - var metaField = settings.label; - this.fieldColorScale = metaField; - - spec.setSettings('excludeNull', false) - .setSettings('fitModel', null) - .addScale(metaField, {type: 'color', source: '/', dim: metaField, brewer: settings.brewer}) - .addTransformation('slice-layer', function (data, props) { - var k = props.key; - var g = props.group; - if (g) { - return data.filter(function (row) { - var groupKey = row[g]; - var groupVal = row[groupKey]; - return ( - (groupKey) - && - (groupVal !== null) - && - (typeof (groupVal) !== 'undefined') - ); - }); - } else { - return data.filter(function (row) { - return ( - (row[metaField] === layersText[k]) - && - (row[k] !== null) - && - (typeof (row[k]) !== 'undefined') - ); - }); - } - }); - - var layersDims = [this.primaryY] - .concat(settings.layers) - .reduce(function (memo, layer) { - return memo.concat(layer.y); - }, []); - - chart.setupChartSourceModel(function (originalSources) { - - var newDim = {}; - newDim[metaField] = {type: 'category'}; - - var sources = { - '/':{ - dims: newDim, - data: [] - } - }; - - sources['/'].dims = Object.assign(newDim, originalSources['/'].dims); - sources['/'].data = originalSources['/'].data.reduce(function (memo, row) { - return memo.concat(layersDims.map(function (layerDim) { - var seed = {}; - seed[metaField] = layersText[layerDim]; - var g = layersGroup[layerDim]; - if (g) { - seed[g] = row[layerDim]; - seed['subLayer'] = g; - } - return Object.assign(seed, row); - })); - }, []); - - return Object.assign(sources, utils.omit(originalSources, '/')); - }); - - if (settings.showPanel) { - - this._container = chart.insertToRightSidebar(this.containerTemplate); - this._container.classList.add('applicable-true'); - - this.uiChangeEventsDispatcher = function (e) { - - var target = e.target; - var selector = target.classList; - - if (selector.contains('i-role-show-layers')) { - settings.showLayers = target.checked; - } - - if (selector.contains('i-role-change-mode')) { - settings.mode = target.value; - } - - this._chart.refresh(); - - }.bind(this); - - this._container - .addEventListener('change', this.uiChangeEventsDispatcher, false); - } - }, - - getLayersText: function () { - return ([this.primaryY] - .concat(settings.layers) - .reduce(function (memo, layer) { - var ys = (Array.isArray(layer.y) ? layer.y : [layer.y]); - return ys.reduce(function (state, y) { - state[y] = this.extractLabelForKey(layer, y); - return state; - }.bind(this), memo); - - }.bind(this), {})); - }, - - getLayersGroup: function () { - return ([this.primaryY] - .concat(settings.layers) - .reduce(function (memo, layer) { - var g = null; - if (Array.isArray(layer.y)) { - g = layer.y.join(', '); - } - - return utils.flatten([layer.y]).reduce(function (memo, y) { - memo[y] = g; - return memo; - }, memo); - }.bind(this), {})); - }, - - checkIsFacet: function (spec) { - - return spec.unit().reduce(function (state, unit, parent) { - - if (state) { - return state; - } - - if (parent && (parent.type === 'COORDS.RECT') && (unit.type === 'COORDS.RECT')) { - state = true; - return state; - } - - return state; - - }, false); - }, - - checkIfApplicable: function (spec) { - - return spec.unit().reduce(function (errors, unit, parent) { - - if (parent && (parent.type !== 'COORDS.RECT')) { - return errors.concat('Chart specification contains non-rectangular coordinates'); - } - - if (parent && (parent.type === 'COORDS.RECT') && (unit.type !== 'COORDS.RECT')) { - // is Y axis a measure? - var yScale = spec.getScale(unit.y); - if (spec.getSourceDim(yScale.source, yScale.dim).type !== 'measure') { - return errors.concat('Y scale is not a measure'); - } - } - - return errors; - - }, []); - }, - - isLeafElement: function (unit, parent) { - return ((parent) && (parent.type === 'COORDS.RECT') && (unit.type !== 'COORDS.RECT')); - }, - - isFirstCoordNode: function (unit, parent) { - return (!parent && unit && (unit.type === 'COORDS.RECT')); - }, - - isFinalCoordNode: function (unit, parent) { - return ((unit) && (unit.type === 'COORDS.RECT') - && - (unit.units).every(function (subUnit) { - return subUnit.type !== 'COORDS.RECT'; - }) - ); - }, - - buildLayersLayout: function (fullSpec) { - - return (fullSpec.regSource('$', - { - dims: { - x: {type: 'category'}, - y: {type: 'category'} - }, - data: [{x: 1, y: 1}] - }) - .addScale('xLayoutScale', {type: 'ordinal', source: '$', dim: 'x'}) - .addScale('yLayoutScale', {type: 'ordinal', source: '$', dim: 'y'}) - .unit({ - type: 'COORDS.RECT', - x: 'xLayoutScale', - y: 'yLayoutScale', - expression: { - source: '$', - inherit: false, - operator: false - }, - guide: { - showGridLines: '', - x: {cssClass: 'facet-axis'}, - y: {cssClass: 'facet-axis'} - } - })); - }, - - findPrimaryLayer: function (spec) { - var self = this; - var resY = spec.unit().reduce(function (memo, unit) { - return memo.concat(self.isFinalCoordNode(unit) ? - ({ - y: spec.getScale(unit.y).dim, - isPrimary: true, - guide: unit.guide.y, - scaleName: unit.y - }) : - ([])); - }, []); - - return pluginsSDK.cloneObject(resY[0]); - }, - - createPrimaryUnitReducer: function (fullSpec, currLayers, lPad, rPad) { - - var self = this; - - return function (memo, unit, parent) { - - var isVisibleAxis = function (layer) { - return (layer.guide.hide !== true); - }; - - if (self.isFacet && self.isFirstCoordNode(unit, parent)) { - unit.guide.y.label = (unit.guide.y.label || {}); - var facetLabelSeed = unit.guide.y.label._original_text || unit.guide.y.label.text; - unit.guide.y.label.text = [ - facetLabelSeed - , - currLayers.filter(isVisibleAxis).map(self.extractLayerLabel.bind(self)).join(', ') - ].join(fullSpec.getSettings('facetLabelDelimiter')); - - if (settings.mode === 'dock') { - unit.guide.y.label.padding -= 15; - unit.guide.y.padding += 15; - unit.guide.y.rotate = (-90); - unit.guide.y.textAnchor = 'middle'; - } - } - - if (self.isLeafElement(unit, parent)) { - - parent.units = parent.units.filter(function (pUnit) { - return (pUnit !== unit); - }); - } - - if (self.isFinalCoordNode(unit)) { - - unit.guide.y.label = (unit.guide.y.label || {}); - - if (settings.mode === 'dock') { - unit.guide.padding.l = lPad; - unit.guide.padding.r = rPad; - unit.guide.y.hide = true; - } - - if (settings.mode === 'merge') { - unit.guide.y.label.text = (self.isFacet ? - ('') : - currLayers.filter(isVisibleAxis).map(self.extractLayerLabel.bind(self)).join(', ')); - } - } - return memo; - }; - }, - - createSecondaryUnitReducer: function (fullSpec, xLayer, lPad, rPad, totalDif, iLeft, iRight, layerNum) { - - var self = this; - var layerScaleName = self.getScaleName(xLayer.scaleName || xLayer.y); - var layerScaleOrient = xLayer.guide.scaleOrient; - var isGroupedY = Array.isArray(xLayer.y); - var isPrimaryLayer = (xLayer.isPrimary); - - return function (memo, unit, parent) { - - if (self.isFacet && self.isFirstCoordNode(unit, parent)) { - unit.guide.y.label.text = ''; - unit.guide.x.hide = true; - unit.guide.y.hide = true; - } - - if (self.isLeafElement(unit, parent)) { - var method = xLayer.type ? - ELEMENT_TYPE[xLayer.type] : - (function (x) { - return x; - }); - method(unit); - unit.y = layerScaleName; - - var isNotEmptySizeScale = (fullSpec.getScale(unit.size).dim); - if (isPrimaryLayer && isNotEmptySizeScale) { - // leave original size scale - } else { - var sizeScaleName = ('size_null' + layerNum); - fullSpec.addScale(sizeScaleName, {type: 'size', source: '?', mid:1}); - unit.size = sizeScaleName; - } - - var isNotEmptyColorScale = (fullSpec.getScale(unit.color).dim); - if (isPrimaryLayer && isNotEmptyColorScale) { - // leave original color scale - } else { - unit.color = self.fieldColorScale; - unit.expression.operator = 'groupBy'; - unit.expression.params = (isGroupedY) ? ['subLayer'] : [self.fieldColorScale]; - } - - // slice frame data - var params = (isGroupedY) ? {group: 'subLayer'} : {key: xLayer.y}; - pluginsSDK - .unit(unit) - .addTransformation('slice-layer', params); - } - - var isFinalCoord = self.isFinalCoordNode(unit); - if (isFinalCoord) { - unit.y = layerScaleName; - unit.guide.y = Object.assign(unit.guide.y, (xLayer.guide || {})); - unit.guide.y.label = (unit.guide.y.label || {}); - unit.guide.y.label.text = self.extractLayerLabel(xLayer); - unit.guide.x.hide = true; - - if (settings.mode === 'dock') { - unit.guide.showGridLines = ''; - unit.guide.padding.l = lPad; - unit.guide.padding.r = rPad; - unit.guide.y.label.textAnchor = 'end'; - unit.guide.y.label.dock = 'right'; - unit.guide.y.label.padding = ((layerScaleOrient === 'right') ? 1 : (-10)); - unit.guide.y.label.cssClass = 'label inline'; - var iKoeff = ((layerScaleOrient === 'right') ? iRight : iLeft); - unit.guide.y.padding += (totalDif * iKoeff); - } - - if (settings.mode === 'merge') { - unit.guide.showGridLines = ''; - unit.guide.y.hide = true; - } - } - - return memo; - }; - }, - - getScaleName: function (layerY) { - return (Array.isArray(layerY)) ? layerY.join(', ') : layerY; - }, - - extractLabelForKey: function (layer, yKey) { - var g = layer.guide || {}; - g.label = ((typeof g.label === 'string') ? {text: g.label} : g.label); - var l = (g.label || {}); - var keys = l.byKeys || {}; - - if (Array.isArray(layer.y)) { - return keys[yKey] || yKey; - } - - return ((l.text) || (l._original_text) || layer.y); - }, - - extractLayerLabel: function (layer) { - var self = this; - var ys = (Array.isArray(layer.y) ? layer.y : [layer.y]); - return ys - .map(function (yKey) { - return self.extractLabelForKey(layer, yKey); - }) - .join(', '); - }, - - onSpecReady: function (chart, specRef) { - - var self = this; - - var fullSpec = pluginsSDK.spec(specRef); - - if (!settings.showLayers || !self._isApplicable) { - fullSpec.unit().traverse(function (unit, parentUnit) { - if (self.isLeafElement(unit, parentUnit)) { - pluginsSDK - .unit(unit) - .addTransformation('defined-only', {key: fullSpec.getScale(unit.y).dim}); - } - }); - return; - } - - fullSpec = settings - .layers - .reduce(function (memo, layer) { - var scaleName = self.getScaleName(layer.y); - return memo.addScale( - scaleName, - Object.assign( - {type: 'linear', source: '/', dim: scaleName, autoScale: true}, - (utils.pick(layer.guide || {}, 'min', 'max', 'autoScale', 'nice', 'niceInterval')))); - }, fullSpec); - - var currLayers = [this.primaryY].concat(settings.layers).sort(function (a, b) { - var zIndexA = a.guide.zIndex || 0; - var zIndexB = b.guide.zIndex || 0; - return (zIndexA - zIndexB); - }); - - var prevUnit = fullSpec.unit(); - var cursor; - var gap = settings.axisWidth; - - var checkOrient = function (expectedOrient) { - return function (layer) { - var layerOrient = layer.guide.scaleOrient || 'left'; - return ((layer.guide.hide !== true) && (layerOrient === expectedOrient)); - }; - }; - - var lCheck = checkOrient('left'); - var rCheck = checkOrient('right'); - - var lPad = (currLayers.filter(lCheck).length * gap); - var rPad = (currLayers.filter(rCheck).length * gap); - - var currUnit = self - .buildLayersLayout(fullSpec) - .addFrame({ - key: {x: 1, y: 1}, - units: [(cursor = (pluginsSDK - .unit(prevUnit.clone()))) - .reduce(self.createPrimaryUnitReducer(fullSpec, currLayers, lPad, rPad), cursor) - .value() - ] - }); - - var il = -1; - var ir = -1; - - currLayers.reduce(function (specUnitObject, layer, i) { - - il = (lCheck(layer) ? (il + 1) : il); - ir = (rCheck(layer) ? (ir + 1) : ir); - - return specUnitObject.addFrame({ - key: {x: 1, y: 1}, - units: [(cursor = (pluginsSDK - .unit(prevUnit.clone()))) - .reduce(self.createSecondaryUnitReducer(fullSpec, layer, lPad, rPad, gap, il, ir, i), cursor) - .value() - ] - }); - }, currUnit); - }, - - onUnitsStructureExpanded: function () { - - var self = this; - - if (self._isApplicable && (settings.mode === 'merge')) { - - var fullSpec = pluginsSDK.spec(self._chart.getSpec()); - var primaryY = self.primaryY.scaleName; - var scaleNames = settings.layers - .map(function (layer) { - return self.getScaleName(layer.y); - }) - .filter(function (name) { - return fullSpec.getScale(name); - }) - .concat(primaryY); - - var hashBounds = scaleNames.reduce(function (memo, yi) { - var info = self._chart.getScaleInfo(yi); - memo[yi] = info.domain().filter(function (n) { - return Number.isFinite(n); - }); - return memo; - }, - {}); - - var minMax = d3.extent(utils.flatten(Object.keys(hashBounds) - .map(function(key) { - return hashBounds[key]; - }))); - scaleNames.forEach(function (y) { - var yScale = fullSpec.getScale(y); - yScale.min = minMax[0]; - yScale.max = minMax[1]; - yScale.nice = false; - }); - } - }, - - // jscs:disable maximumLineLength - containerTemplate: '
', - template: utils.template([ - '', - - '
', - '', - '
' - ].join('')), - // jscs:enable maximumLineLength - - onRender: function () { - - if (this._isApplicable && settings.showPanel) { - this._container.innerHTML = this.template({ - title: settings.title, - mode: settings.mode, - showLayers: settings.showLayers - }); - } - } - }; - } - - tauCharts.api.plugins.add('layers', Layers); - - return Layers; -}); -// jscs:enable * \ No newline at end of file diff --git a/build/development/plugins/tauCharts.legend.css b/build/development/plugins/tauCharts.legend.css deleted file mode 100644 index 765b28c87..000000000 --- a/build/development/plugins/tauCharts.legend.css +++ /dev/null @@ -1,293 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__legend { - padding: 20px 0 10px 10px; - position: relative; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__legend__wrap { - margin-bottom: 30px; - position: relative; -} -.graphical-report__legend__wrap:last-child { - margin-bottom: 0; -} -.graphical-report__legend__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__legend__reset { - margin-top: -4px; - position: absolute; - right: -25px; - top: 0; - z-index: 1; -} -.graphical-report__legend__reset.disabled { - display: none; -} -.graphical-report__legend__reset + .graphical-report__legend__title { - margin-right: 1.7em; -} -.graphical-report__legend__item { - padding: 10px 20px 8px 40px; - position: relative; - font-size: 13px; - line-height: 1.2em; - cursor: pointer; -} -.graphical-report__legend__item:hover { - background-color: rgba(189, 195, 205, 0.2); -} -.graphical-report__legend__item--size { - cursor: default; -} -.graphical-report__legend__item--size:hover { - background: none; -} -.graphical-report__legend__item .color-default { - background: #6FA1D9; - border-color: #6FA1D9; -} -.graphical-report__legend__item:disabled, -.graphical-report__legend__item.disabled { - color: #ccc; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide { - background: transparent; -} -.graphical-report__legend__guide { - position: absolute; - box-sizing: border-box; - width: 100%; - height: 100%; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - border: 1px solid transparent; - border-radius: 50%; -} -.graphical-report__legend__guide__wrap { - position: absolute; - top: calc((10px - 8px) + 0.6em); - left: 10px; - width: 16px; - height: 16px; -} -.graphical-report__legend__guide--size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__guide--color__overlay { - background-color: transparent; - height: 36px; - left: -12px; - position: absolute; - top: -12px; - width: 36px; -} -.graphical-report__legend__guide--color::before { - content: ""; - display: none; - height: 2px; - left: 3px; - pointer-events: none; - position: absolute; - top: 6px; - width: 8px; -} -.graphical-report__legend__guide--color::after { - content: ""; - display: none; - height: 8px; - left: 6px; - pointer-events: none; - position: absolute; - top: 3px; - width: 2px; -} -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after { - background-color: #fff; - display: inline-block; - transform: rotate(45deg); -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover { - background: #fff; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after { - background-color: #333; - transform: none; -} -.graphical-report__legend__size-wrapper, -.graphical-report__legend__gradient-wrapper { - box-sizing: border-box; - margin: 10px; - overflow: visible; - width: 100%; -} -.graphical-report__legend__size, -.graphical-report__legend__gradient { - overflow: visible; -} -.graphical-report__legend__size__item__circle.color-definite { - stroke: #cacaca; - fill: #cacaca; -} -.graphical-report__legend__size__item__circle.color-default-size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__gradient__bar { - rx: 4px; - ry: 4px; -} -.graphical-report__legend__item .color20-1 { - background: #6FA1D9; - border: 1px solid #6FA1D9; -} -.graphical-report__legend__item.disabled .color20-1 { - background-color: transparent; -} -.graphical-report__legend__item .color20-2 { - background: #DF2B59; - border: 1px solid #DF2B59; -} -.graphical-report__legend__item.disabled .color20-2 { - background-color: transparent; -} -.graphical-report__legend__item .color20-3 { - background: #66DA26; - border: 1px solid #66DA26; -} -.graphical-report__legend__item.disabled .color20-3 { - background-color: transparent; -} -.graphical-report__legend__item .color20-4 { - background: #4C3862; - border: 1px solid #4C3862; -} -.graphical-report__legend__item.disabled .color20-4 { - background-color: transparent; -} -.graphical-report__legend__item .color20-5 { - background: #E5B011; - border: 1px solid #E5B011; -} -.graphical-report__legend__item.disabled .color20-5 { - background-color: transparent; -} -.graphical-report__legend__item .color20-6 { - background: #3A3226; - border: 1px solid #3A3226; -} -.graphical-report__legend__item.disabled .color20-6 { - background-color: transparent; -} -.graphical-report__legend__item .color20-7 { - background: #CB461A; - border: 1px solid #CB461A; -} -.graphical-report__legend__item.disabled .color20-7 { - background-color: transparent; -} -.graphical-report__legend__item .color20-8 { - background: #C7CE23; - border: 1px solid #C7CE23; -} -.graphical-report__legend__item.disabled .color20-8 { - background-color: transparent; -} -.graphical-report__legend__item .color20-9 { - background: #7FCDC2; - border: 1px solid #7FCDC2; -} -.graphical-report__legend__item.disabled .color20-9 { - background-color: transparent; -} -.graphical-report__legend__item .color20-10 { - background: #CCA1C8; - border: 1px solid #CCA1C8; -} -.graphical-report__legend__item.disabled .color20-10 { - background-color: transparent; -} -.graphical-report__legend__item .color20-11 { - background: #C84CCE; - border: 1px solid #C84CCE; -} -.graphical-report__legend__item.disabled .color20-11 { - background-color: transparent; -} -.graphical-report__legend__item .color20-12 { - background: #54762E; - border: 1px solid #54762E; -} -.graphical-report__legend__item.disabled .color20-12 { - background-color: transparent; -} -.graphical-report__legend__item .color20-13 { - background: #746BC9; - border: 1px solid #746BC9; -} -.graphical-report__legend__item.disabled .color20-13 { - background-color: transparent; -} -.graphical-report__legend__item .color20-14 { - background: #953441; - border: 1px solid #953441; -} -.graphical-report__legend__item.disabled .color20-14 { - background-color: transparent; -} -.graphical-report__legend__item .color20-15 { - background: #5C7A76; - border: 1px solid #5C7A76; -} -.graphical-report__legend__item.disabled .color20-15 { - background-color: transparent; -} -.graphical-report__legend__item .color20-16 { - background: #C8BF87; - border: 1px solid #C8BF87; -} -.graphical-report__legend__item.disabled .color20-16 { - background-color: transparent; -} -.graphical-report__legend__item .color20-17 { - background: #BFC1C3; - border: 1px solid #BFC1C3; -} -.graphical-report__legend__item.disabled .color20-17 { - background-color: transparent; -} -.graphical-report__legend__item .color20-18 { - background: #8E5C31; - border: 1px solid #8E5C31; -} -.graphical-report__legend__item.disabled .color20-18 { - background-color: transparent; -} -.graphical-report__legend__item .color20-19 { - background: #71CE7B; - border: 1px solid #71CE7B; -} -.graphical-report__legend__item.disabled .color20-19 { - background-color: transparent; -} -.graphical-report__legend__item .color20-20 { - background: #BE478B; - border: 1px solid #BE478B; -} -.graphical-report__legend__item.disabled .color20-20 { - background-color: transparent; -} diff --git a/build/development/plugins/tauCharts.legend.dark.css b/build/development/plugins/tauCharts.legend.dark.css deleted file mode 100644 index e0f97c6e4..000000000 --- a/build/development/plugins/tauCharts.legend.dark.css +++ /dev/null @@ -1,293 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__legend { - padding: 20px 0 10px 10px; - position: relative; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__legend__wrap { - margin-bottom: 30px; - position: relative; -} -.graphical-report__legend__wrap:last-child { - margin-bottom: 0; -} -.graphical-report__legend__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__legend__reset { - margin-top: -4px; - position: absolute; - right: -25px; - top: 0; - z-index: 1; -} -.graphical-report__legend__reset.disabled { - display: none; -} -.graphical-report__legend__reset + .graphical-report__legend__title { - margin-right: 1.7em; -} -.graphical-report__legend__item { - padding: 10px 20px 8px 40px; - position: relative; - font-size: 13px; - line-height: 1.2em; - cursor: pointer; -} -.graphical-report__legend__item:hover { - background-color: rgba(37, 39, 46, 0.2); -} -.graphical-report__legend__item--size { - cursor: default; -} -.graphical-report__legend__item--size:hover { - background: none; -} -.graphical-report__legend__item .color-default { - background: #6FA1D9; - border-color: #6FA1D9; -} -.graphical-report__legend__item:disabled, -.graphical-report__legend__item.disabled { - color: #8e8e8e; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide { - background: transparent; -} -.graphical-report__legend__guide { - position: absolute; - box-sizing: border-box; - width: 100%; - height: 100%; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - border: 1px solid transparent; - border-radius: 50%; -} -.graphical-report__legend__guide__wrap { - position: absolute; - top: calc((10px - 8px) + 0.6em); - left: 10px; - width: 16px; - height: 16px; -} -.graphical-report__legend__guide--size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__guide--color__overlay { - background-color: transparent; - height: 36px; - left: -12px; - position: absolute; - top: -12px; - width: 36px; -} -.graphical-report__legend__guide--color::before { - content: ""; - display: none; - height: 2px; - left: 3px; - pointer-events: none; - position: absolute; - top: 6px; - width: 8px; -} -.graphical-report__legend__guide--color::after { - content: ""; - display: none; - height: 8px; - left: 6px; - pointer-events: none; - position: absolute; - top: 3px; - width: 2px; -} -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after { - background-color: #000; - display: inline-block; - transform: rotate(45deg); -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover { - background: #000; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after { - background-color: #fff; - transform: none; -} -.graphical-report__legend__size-wrapper, -.graphical-report__legend__gradient-wrapper { - box-sizing: border-box; - margin: 10px; - overflow: visible; - width: 100%; -} -.graphical-report__legend__size, -.graphical-report__legend__gradient { - overflow: visible; -} -.graphical-report__legend__size__item__circle.color-definite { - stroke: #cacaca; - fill: #cacaca; -} -.graphical-report__legend__size__item__circle.color-default-size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__gradient__bar { - rx: 4px; - ry: 4px; -} -.graphical-report__legend__item .color20-1 { - background: #6FA1D9; - border: 1px solid #6FA1D9; -} -.graphical-report__legend__item.disabled .color20-1 { - background-color: transparent; -} -.graphical-report__legend__item .color20-2 { - background: #DF2B59; - border: 1px solid #DF2B59; -} -.graphical-report__legend__item.disabled .color20-2 { - background-color: transparent; -} -.graphical-report__legend__item .color20-3 { - background: #66DA26; - border: 1px solid #66DA26; -} -.graphical-report__legend__item.disabled .color20-3 { - background-color: transparent; -} -.graphical-report__legend__item .color20-4 { - background: #755797; - border: 1px solid #755797; -} -.graphical-report__legend__item.disabled .color20-4 { - background-color: transparent; -} -.graphical-report__legend__item .color20-5 { - background: #E5B011; - border: 1px solid #E5B011; -} -.graphical-report__legend__item.disabled .color20-5 { - background-color: transparent; -} -.graphical-report__legend__item .color20-6 { - background: #746650; - border: 1px solid #746650; -} -.graphical-report__legend__item.disabled .color20-6 { - background-color: transparent; -} -.graphical-report__legend__item .color20-7 { - background: #CB461A; - border: 1px solid #CB461A; -} -.graphical-report__legend__item.disabled .color20-7 { - background-color: transparent; -} -.graphical-report__legend__item .color20-8 { - background: #C7CE23; - border: 1px solid #C7CE23; -} -.graphical-report__legend__item.disabled .color20-8 { - background-color: transparent; -} -.graphical-report__legend__item .color20-9 { - background: #7FCDC2; - border: 1px solid #7FCDC2; -} -.graphical-report__legend__item.disabled .color20-9 { - background-color: transparent; -} -.graphical-report__legend__item .color20-10 { - background: #CCA1C8; - border: 1px solid #CCA1C8; -} -.graphical-report__legend__item.disabled .color20-10 { - background-color: transparent; -} -.graphical-report__legend__item .color20-11 { - background: #C84CCE; - border: 1px solid #C84CCE; -} -.graphical-report__legend__item.disabled .color20-11 { - background-color: transparent; -} -.graphical-report__legend__item .color20-12 { - background: #54762E; - border: 1px solid #54762E; -} -.graphical-report__legend__item.disabled .color20-12 { - background-color: transparent; -} -.graphical-report__legend__item .color20-13 { - background: #746BC9; - border: 1px solid #746BC9; -} -.graphical-report__legend__item.disabled .color20-13 { - background-color: transparent; -} -.graphical-report__legend__item .color20-14 { - background: #A43B49; - border: 1px solid #A43B49; -} -.graphical-report__legend__item.disabled .color20-14 { - background-color: transparent; -} -.graphical-report__legend__item .color20-15 { - background: #5C7A76; - border: 1px solid #5C7A76; -} -.graphical-report__legend__item.disabled .color20-15 { - background-color: transparent; -} -.graphical-report__legend__item .color20-16 { - background: #C8BF87; - border: 1px solid #C8BF87; -} -.graphical-report__legend__item.disabled .color20-16 { - background-color: transparent; -} -.graphical-report__legend__item .color20-17 { - background: #BFC1C3; - border: 1px solid #BFC1C3; -} -.graphical-report__legend__item.disabled .color20-17 { - background-color: transparent; -} -.graphical-report__legend__item .color20-18 { - background: #AA7243; - border: 1px solid #AA7243; -} -.graphical-report__legend__item.disabled .color20-18 { - background-color: transparent; -} -.graphical-report__legend__item .color20-19 { - background: #71CE7B; - border: 1px solid #71CE7B; -} -.graphical-report__legend__item.disabled .color20-19 { - background-color: transparent; -} -.graphical-report__legend__item .color20-20 { - background: #BE478B; - border: 1px solid #BE478B; -} -.graphical-report__legend__item.disabled .color20-20 { - background-color: transparent; -} diff --git a/build/development/plugins/tauCharts.legend.default.css b/build/development/plugins/tauCharts.legend.default.css deleted file mode 100644 index 765b28c87..000000000 --- a/build/development/plugins/tauCharts.legend.default.css +++ /dev/null @@ -1,293 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__legend { - padding: 20px 0 10px 10px; - position: relative; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__legend__wrap { - margin-bottom: 30px; - position: relative; -} -.graphical-report__legend__wrap:last-child { - margin-bottom: 0; -} -.graphical-report__legend__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__legend__reset { - margin-top: -4px; - position: absolute; - right: -25px; - top: 0; - z-index: 1; -} -.graphical-report__legend__reset.disabled { - display: none; -} -.graphical-report__legend__reset + .graphical-report__legend__title { - margin-right: 1.7em; -} -.graphical-report__legend__item { - padding: 10px 20px 8px 40px; - position: relative; - font-size: 13px; - line-height: 1.2em; - cursor: pointer; -} -.graphical-report__legend__item:hover { - background-color: rgba(189, 195, 205, 0.2); -} -.graphical-report__legend__item--size { - cursor: default; -} -.graphical-report__legend__item--size:hover { - background: none; -} -.graphical-report__legend__item .color-default { - background: #6FA1D9; - border-color: #6FA1D9; -} -.graphical-report__legend__item:disabled, -.graphical-report__legend__item.disabled { - color: #ccc; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide { - background: transparent; -} -.graphical-report__legend__guide { - position: absolute; - box-sizing: border-box; - width: 100%; - height: 100%; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - border: 1px solid transparent; - border-radius: 50%; -} -.graphical-report__legend__guide__wrap { - position: absolute; - top: calc((10px - 8px) + 0.6em); - left: 10px; - width: 16px; - height: 16px; -} -.graphical-report__legend__guide--size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__guide--color__overlay { - background-color: transparent; - height: 36px; - left: -12px; - position: absolute; - top: -12px; - width: 36px; -} -.graphical-report__legend__guide--color::before { - content: ""; - display: none; - height: 2px; - left: 3px; - pointer-events: none; - position: absolute; - top: 6px; - width: 8px; -} -.graphical-report__legend__guide--color::after { - content: ""; - display: none; - height: 8px; - left: 6px; - pointer-events: none; - position: absolute; - top: 3px; - width: 2px; -} -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after { - background-color: #fff; - display: inline-block; - transform: rotate(45deg); -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover { - background: #fff; -} -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before, -.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after { - background-color: #333; - transform: none; -} -.graphical-report__legend__size-wrapper, -.graphical-report__legend__gradient-wrapper { - box-sizing: border-box; - margin: 10px; - overflow: visible; - width: 100%; -} -.graphical-report__legend__size, -.graphical-report__legend__gradient { - overflow: visible; -} -.graphical-report__legend__size__item__circle.color-definite { - stroke: #cacaca; - fill: #cacaca; -} -.graphical-report__legend__size__item__circle.color-default-size { - stroke: #6FA1D9; - fill: #6FA1D9; -} -.graphical-report__legend__gradient__bar { - rx: 4px; - ry: 4px; -} -.graphical-report__legend__item .color20-1 { - background: #6FA1D9; - border: 1px solid #6FA1D9; -} -.graphical-report__legend__item.disabled .color20-1 { - background-color: transparent; -} -.graphical-report__legend__item .color20-2 { - background: #DF2B59; - border: 1px solid #DF2B59; -} -.graphical-report__legend__item.disabled .color20-2 { - background-color: transparent; -} -.graphical-report__legend__item .color20-3 { - background: #66DA26; - border: 1px solid #66DA26; -} -.graphical-report__legend__item.disabled .color20-3 { - background-color: transparent; -} -.graphical-report__legend__item .color20-4 { - background: #4C3862; - border: 1px solid #4C3862; -} -.graphical-report__legend__item.disabled .color20-4 { - background-color: transparent; -} -.graphical-report__legend__item .color20-5 { - background: #E5B011; - border: 1px solid #E5B011; -} -.graphical-report__legend__item.disabled .color20-5 { - background-color: transparent; -} -.graphical-report__legend__item .color20-6 { - background: #3A3226; - border: 1px solid #3A3226; -} -.graphical-report__legend__item.disabled .color20-6 { - background-color: transparent; -} -.graphical-report__legend__item .color20-7 { - background: #CB461A; - border: 1px solid #CB461A; -} -.graphical-report__legend__item.disabled .color20-7 { - background-color: transparent; -} -.graphical-report__legend__item .color20-8 { - background: #C7CE23; - border: 1px solid #C7CE23; -} -.graphical-report__legend__item.disabled .color20-8 { - background-color: transparent; -} -.graphical-report__legend__item .color20-9 { - background: #7FCDC2; - border: 1px solid #7FCDC2; -} -.graphical-report__legend__item.disabled .color20-9 { - background-color: transparent; -} -.graphical-report__legend__item .color20-10 { - background: #CCA1C8; - border: 1px solid #CCA1C8; -} -.graphical-report__legend__item.disabled .color20-10 { - background-color: transparent; -} -.graphical-report__legend__item .color20-11 { - background: #C84CCE; - border: 1px solid #C84CCE; -} -.graphical-report__legend__item.disabled .color20-11 { - background-color: transparent; -} -.graphical-report__legend__item .color20-12 { - background: #54762E; - border: 1px solid #54762E; -} -.graphical-report__legend__item.disabled .color20-12 { - background-color: transparent; -} -.graphical-report__legend__item .color20-13 { - background: #746BC9; - border: 1px solid #746BC9; -} -.graphical-report__legend__item.disabled .color20-13 { - background-color: transparent; -} -.graphical-report__legend__item .color20-14 { - background: #953441; - border: 1px solid #953441; -} -.graphical-report__legend__item.disabled .color20-14 { - background-color: transparent; -} -.graphical-report__legend__item .color20-15 { - background: #5C7A76; - border: 1px solid #5C7A76; -} -.graphical-report__legend__item.disabled .color20-15 { - background-color: transparent; -} -.graphical-report__legend__item .color20-16 { - background: #C8BF87; - border: 1px solid #C8BF87; -} -.graphical-report__legend__item.disabled .color20-16 { - background-color: transparent; -} -.graphical-report__legend__item .color20-17 { - background: #BFC1C3; - border: 1px solid #BFC1C3; -} -.graphical-report__legend__item.disabled .color20-17 { - background-color: transparent; -} -.graphical-report__legend__item .color20-18 { - background: #8E5C31; - border: 1px solid #8E5C31; -} -.graphical-report__legend__item.disabled .color20-18 { - background-color: transparent; -} -.graphical-report__legend__item .color20-19 { - background: #71CE7B; - border: 1px solid #71CE7B; -} -.graphical-report__legend__item.disabled .color20-19 { - background-color: transparent; -} -.graphical-report__legend__item .color20-20 { - background: #BE478B; - border: 1px solid #BE478B; -} -.graphical-report__legend__item.disabled .color20-20 { - background-color: transparent; -} diff --git a/build/development/plugins/tauCharts.legend.js b/build/development/plugins/tauCharts.legend.js deleted file mode 100644 index a5c425c0f..000000000 --- a/build/development/plugins/tauCharts.legend.js +++ /dev/null @@ -1,1018 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var d3 = tauCharts.api.d3; - var utils = tauCharts.api.utils; - var pluginsSDK = tauCharts.api.pluginsSDK; - var RESET_SELECTOR = '.graphical-report__legend__reset'; - var COLOR_ITEM_SELECTOR = '.graphical-report__legend__item-color'; - var COLOR_TOGGLE_SELECTOR = '.graphical-report__legend__guide--color__overlay'; - var SIZE_TICKS_COUNT = 4; - var FONT_SIZE = 13; - - var counter = 0; - var getId = function () { - return ++counter; - }; - - var xml = function (tag, _attrs) { - var childrenArgIndex = 2; - var attrs = _attrs; - if (typeof attrs !== 'object') { - childrenArgIndex = 1; - attrs = {}; - } - var children = Array.prototype.slice.call(arguments, childrenArgIndex); - return ( - '<' + tag + - Object.keys(attrs).map(function (key) { - return ' ' + key + '="' + attrs[key] + '"'; - }).join('') + - (children.length > 0 ? ('>' + children.join('') + '') : '/>') - ); - }; - - var splitEvenly = function (domain, parts) { - var min = domain[0]; - var max = domain[1]; - var segment = ((max - min) / (parts - 1)); - var chunks = utils.range(parts - 2).map(function (n) { - return (min + segment * (n + 1)); - }); - return [min].concat(chunks).concat(max); - }; - - var splitRealValuesEvenly = function (values, count, funcType) { - - if (values.length < 3) { - return values.slice(0); - } - if (count < 3) { - return [values[0], values[values.length - 1]]; - } - - var neg = (values[0] < 0 ? Math.abs(values[0]) : 0); - var repeat = function (x) { - return x; - }; - var sqrt = function (x) { - return Math.sqrt(x + neg); - }; - var square = function (x) { - return (Math.pow(x, 2) - neg); - }; - var input = (funcType === 'sqrt' ? sqrt : repeat); - var ouput = (funcType === 'sqrt' ? square : repeat); - - values = values.map(input); - var result = [values[0]]; - var length = (values[values.length - 1] - values[0]); - var halfStep = (0.5 * length / (count - 1)); - - var steps = utils.range(1, count - 1) - .map(function (i) { - var mid = (length * i / (count - 1)); - return { - min: mid - halfStep, - mid: mid, - max: mid + halfStep, - diff: Number.MAX_VALUE, - closest: null - }; - }); - var si = 0; - var step; - var nextStep = function () { - if (si === steps.length) { - return; - } - var prevStep = step; - step = steps[si++]; - step.min = Math.max( - (step.min), - ((prevStep && prevStep.closest !== null ? prevStep.closest : result[0]) + halfStep) - ); - }; - nextStep(); - - values.forEach(function (value) { - if (value < step.min) { - return; - } - if (value > step.max) { - nextStep(); - } - var diff = Math.abs(value - step.mid); - if (diff < step.diff && diff < halfStep) { - step.diff = diff; - step.closest = value; - } else { - nextStep(); - } - if (diff === 0) { - nextStep(); - } - }); - - steps.forEach(function (s) { - if (s.closest !== null) { - result.push(s.closest); - } - }); - - result.push(values[values.length - 1]); - - result = result.map(ouput); - - return result; - }; - - var log10 = function (x) { - return Math.log(x) / Math.LN10; - }; - - var getExponent = function (x) { - if (x === 0) { - return 0; - } - return Math.floor(log10(Math.abs(x))); - }; - - var removeRedundantZeros = (function () { - var zerosAfterDot = /\.0+([^\d].*)?$/; - var zerosAfterNotZero = /(\.\d+?)0+([^\d].*)?$/; - return function (str) { - return str - .replace(zerosAfterDot, '$1') - .replace(zerosAfterNotZero, '$1$2'); - }; - })(); - - var d3Format3S = d3.format('.3s'); - var shortNumFormat = function (num) { - return removeRedundantZeros(d3Format3S(num)); - }; - - var getNumberFormatter = function (start, end) { - - var max = Math.max(Math.abs(start), Math.abs(end)); - var absExp = getExponent(max); - var diff = (start * end > 0 ? Math.abs(end - start) : max); - var diffExp = getExponent(diff); - var absExpVsDiffExp = Math.abs(absExp - diffExp); - - if (Math.abs(absExp) > 3 && absExpVsDiffExp <= 3) { - // Short format - // 1k, 500k, 1M. - return shortNumFormat; - } - - // Show necessary digits: - // 100001, 100002, 100003; - // 0.10001, 0.10002, 0.10003. - return function (num) { - var numExp = getExponent(max - num); - var trailingDigits = Math.min(( - (diffExp < 0 ? Math.abs(diffExp) : 0) + - (numExp < diffExp ? 1 : 0) - ), 20); // NOTE: `toFixed` accepts values between 0 and 20. - return removeRedundantZeros(num.toFixed(trailingDigits)); - }; - }; - - function ChartLegend(xSettings) { - - var settings = utils.defaults( - xSettings || {}, - { - // add default settings here - }); - - var doEven = function (n) { - n = Math.round(n); - return n % 2 ? n + 1 : n; - }; - - var isEmpty = function (x) { - return (x === null) || (x === '') || (typeof x === 'undefined'); - }; - - var createIsRowMatchInterceptor = function (dim, val) { - return function (row) { - var d = row[dim]; - var r = JSON.stringify(isEmpty(d) ? null : d); - return (val === r); - }; - }; - - var _delegateEvent = function (element, eventName, selector, callback) { - element.addEventListener(eventName, function (e) { - var target = e.target; - while (target !== e.currentTarget && target !== null) { - if (target.matches(selector)) { - callback(e, target); - } - target = target.parentNode; - } - }); - }; - - return { - - init: function (chart) { - this.instanceId = getId(); - - this._chart = chart; - this._currentFilters = {}; - this._legendColorByScaleId = {}; - this._legendOrderState = {}; - - var spec = this._chart.getSpec(); - - var reducer = function (scaleType) { - return function (memo, k) { - var s = spec.scales[k]; - if (s.type === scaleType && s.dim) { - memo.push(k); - } - return memo; - }; - }; - - this._color = Object - .keys(spec.scales) - .reduce(reducer('color'), []) - .filter(function (scale) { - return chart.getScaleInfo(scale).discrete; - }); - - this._fill = Object - .keys(spec.scales) - .reduce(reducer('color'), []) - .filter(function (scale) { - return !chart.getScaleInfo(scale).discrete; - }); - - this._size = Object - .keys(spec.scales) - .reduce(reducer('size'), []); - - var hasColorScales = (this._color.length > 0); - var hasFillScales = (this._fill.length > 0); - var hasSizeScales = (this._size.length > 0); - - this._assignStaticBrewersOrEx(); - - if (hasColorScales || hasFillScales || hasSizeScales) { - - switch (settings.position) { - case 'left': - this._container = this._chart.insertToLeftSidebar(this._containerTemplate); - break; - case 'right': - this._container = this._chart.insertToRightSidebar(this._containerTemplate); - break; - case 'top': - this._container = this._chart.insertToHeader(this._containerTemplate); - break; - case 'bottom': - this._container = this._chart.insertToFooter(this._containerTemplate); - break; - default: - this._container = this._chart.insertToRightSidebar(this._containerTemplate); - break; - } - - if (hasColorScales) { - _delegateEvent( - this._container, - 'click', - RESET_SELECTOR, - function (e, currentTarget) { - this._toggleLegendItem(currentTarget, 'reset'); - }.bind(this)); - - _delegateEvent( - this._container, - 'click', - COLOR_ITEM_SELECTOR, - function (e, currentTarget) { - var mode = (e.ctrlKey || e.target.matches(COLOR_TOGGLE_SELECTOR) ? - 'leave-others' : - 'focus-single'); - this._toggleLegendItem(currentTarget, mode); - }.bind(this)); - - _delegateEvent( - this._container, - 'mouseover', - COLOR_ITEM_SELECTOR, - function (e, currentTarget) { - this._highlightToggle(currentTarget, true); - }.bind(this) - ); - - _delegateEvent( - this._container, - 'mouseout', - COLOR_ITEM_SELECTOR, - function (e, currentTarget) { - this._highlightToggle(currentTarget, false); - }.bind(this) - ); - } - } - }, - - onRender: function () { - this._clearPanel(); - this._drawColorLegend(); - this._drawFillLegend(); - this._drawSizeLegend(); - }, - - // jscs:disable maximumLineLength - _containerTemplate: '
', - _template: utils.template([ - '
', - '<%=top%>', - '
<%=name%>
', - '<%=items%>', - '
' - ].join('')), - _itemTemplate: utils.template([ - '
\' data-dim=\'<%= dim %>\' data-value=\'<%= value %>\' class="graphical-report__legend__item graphical-report__legend__item-color <%=classDisabled%>">', - '
', - '
', - '
', - '
', - '
', - '
', - ' <%=label%>', - '
' - ].join('')), - _resetTemplate: utils.template([ - '
', - '
Reset
', - '
' - ].join('')), - // jscs:enable maximumLineLength - - _clearPanel: function () { - if (this._container) { - this._getScrollContainer().removeEventListener('scroll', this._scrollListener); - this._container.innerHTML = ''; - } - }, - - _drawFillLegend: function () { - var self = this; - - self._fill.forEach(function (c) { - var firstNode = self - ._chart - .select(function (unit) { - return (unit.config.color === c); - }) - [0]; - - if (firstNode) { - - var guide = firstNode.config.guide || {}; - - var fillScale = firstNode.getScale('color'); - - var domain = fillScale.domain().sort(function (a, b) { - return a - b; - }); - - var isDate = domain.reduce(function (memo, x) { - return memo && utils.isDate(x); - }, true); - - var numDomain = (isDate ? - domain.map(Number) : - domain); - - var numFormatter = getNumberFormatter(numDomain[0], numDomain[numDomain.length - 1]); - var dateFormatter = (function () { - var spec = self._chart.getSpec(); - var formatter = pluginsSDK.extractFieldsFormatInfo(spec)[fillScale.dim].format; - if (!formatter) { - formatter = function (x) { - return new Date(x); - }; - } - return function (x) { - return String(formatter(x)); - }; - })(); - - var formatter = (isDate ? - dateFormatter : - numFormatter); - - var brewerLength = fillScale.brewer.length; - var title = ((guide.color || {}).label || {}).text || fillScale.dim; - - var getTextWidth = function (text) { - return (text.length * FONT_SIZE * 0.618); - }; - var labelsCount = (!fillScale.isInteger ? 3 : - ((numDomain[1] - numDomain[0]) % 3 === 0) ? 4 : - ((numDomain[1] - numDomain[0]) % 2 === 0) ? 3 : 2 - ); - var splitted = splitEvenly(numDomain, labelsCount); - var labels = (isDate ? splitted.map(function (x) { - return new Date(x); - }) : splitted).map(formatter); - if (labels[0] === labels[labels.length - 1]) { - labels = [labels[0]]; - } - - self._container - .insertAdjacentHTML('beforeend', self._template({ - name: title, - top: null, - items: '
' - })); - var container = self._container - .lastElementChild - .querySelector('.graphical-report__legend__gradient-wrapper'); - var width = container.getBoundingClientRect().width; - var totalLabelsW = labels.reduce(function (sum, label) { - return (sum + getTextWidth(label)); - }, 0); - var isVerticalLayout = false; - if (totalLabelsW > width) { - if (labels.length > 1 && - getTextWidth(labels[0]) + getTextWidth(labels[labels.length - 1]) > width - ) { - isVerticalLayout = true; - } else { - labels = [labels[0], labels[labels.length - 1]]; - } - } - - var barSize = 20; - var layout = (isVerticalLayout ? - (function () { - var height = 120; - var dy = (FONT_SIZE * (0.618 - 1) / 2); - return { - width: width, - height: height, - barX: 0, - barY: 0, - barWidth: barSize, - barHeight: height, - textAnchor: 'start', - textX: utils.range(labelsCount).map(function () { - return 25; - }), - textY: (labels.length === 1 ? - (height / 2 + FONT_SIZE * 0.618) : - labels.map(function (_, i) { - var t = ((labels.length - 1 - i) / (labels.length - 1)); - return (FONT_SIZE * (1 - t) + height * t + dy); - })) - }; - })() : - (function () { - var padL = (getTextWidth(labels[0]) / 2); - var padR = (getTextWidth(labels[labels.length - 1]) / 2); - var indent = 8; - return { - width: width, - height: (barSize + indent + FONT_SIZE), - barX: 0, - barY: 0, - barWidth: width, - barHeight: barSize, - textAnchor: 'middle', - textX: (labels.length === 1 ? - [width / 2] : - labels.map(function (_, i) { - var t = (i / (labels.length - 1)); - return (padL * (1 - t) + (width - padR) * t);; - })), - textY: utils.range(labelsCount).map(function () { - return (barSize + indent + FONT_SIZE); - }) - }; - })() - ); - - var stops = splitEvenly(numDomain, brewerLength) - .map(function (x, i) { - var p = (i / (brewerLength - 1)) * 100; - return ( - ''); - }); - - var gradientId = 'legend-gradient-' + self.instanceId; - - var gradient = ( - xml('svg', - { - class: 'graphical-report__legend__gradient', - width: layout.width, - height: layout.height - }, - xml('defs', - xml('linearGradient', - { - id: gradientId, - x1: '0%', - y1: (isVerticalLayout ? '100%' : '0%'), - x2: (isVerticalLayout ? '0%' : '100%'), - y2: '0%' - }, - stops.join('') - ) - ), - xml('rect', { - class: 'graphical-report__legend__gradient__bar', - x: layout.barX, - y: layout.barY, - width: layout.barWidth, - height: layout.barHeight, - fill: 'url(#' + gradientId + ')' - }), - labels.map(function (text, i) { - return xml('text', { - x: layout.textX[i], - y: layout.textY[i], - 'text-anchor': layout.textAnchor - }, text); - }).join('') - ) - ); - - container - .insertAdjacentHTML('beforeend', gradient); - } - }); - }, - - _drawSizeLegend: function () { - var self = this; - - self._size.forEach(function (c) { - var firstNode = self - ._chart - .select(function (unit) { - return (unit.config.size === c); - }) - [0]; - - if (firstNode) { - - var guide = firstNode.config.guide || {}; - - var sizeScale = firstNode.getScale('size'); - - var domain = sizeScale.domain().sort(function (a, b) { - return a - b; - }); - if (!Array.isArray(domain) || !domain.every(isFinite)) { - return; - } - - var title = ((guide.size || {}).label || {}).text || sizeScale.dim; - - var first = domain[0]; - var last = domain[domain.length - 1]; - - var values = [first]; - if ((last - first)) { - var count = log10(last - first); - var xF = Math.round((4 - count)); - var base = Math.pow(10, xF); - - var realValues = utils.unique( - self._chart - .getDataSources({ - excludeFilter: ['legend'] - })[sizeScale.source] - .data - .map(function (d) { - return d[sizeScale.dim]; - }) - .filter(function (s) { - return (s >= first && s <= last); - })) - .sort(function (a, b) { - return (a - b); - }); - var steps = splitRealValuesEvenly(realValues, SIZE_TICKS_COUNT, sizeScale.funcType); - - values = utils.unique(steps - .map(function (x) { - return (Math.round(x * base) / base); - })); - } - - var castNum = getNumberFormatter(values[0], values[values.length - 1]); - - var getTextWidth = function (text) { - return (text.length * FONT_SIZE * 0.618); - }; - values.reverse(); - var sizes = values.map(sizeScale); - var maxSize = Math.max.apply(null, sizes); - - var labels = values.map(castNum); - self._container - .insertAdjacentHTML('beforeend', self._template({ - name: title, - top: null, - items: '
' - })); - var container = self._container - .lastElementChild - .querySelector('.graphical-report__legend__size-wrapper'); - var width = container.getBoundingClientRect().width; - var maxLabelW = Math.max.apply(null, labels.map(getTextWidth)); - var isVerticalLayout = false; - if (maxLabelW > width / 4 || labels.length === 1) { - isVerticalLayout = true; - } - - var layout = (isVerticalLayout ? - (function () { - var gap = FONT_SIZE; - var padT = (sizes[0] / 2); - var padB = (sizes[sizes.length - 1] / 2); - var indent = 8; - var cy = [padT]; - for (var i = 1, n, p; i < sizes.length; i++) { - p = (sizes[i - 1] / 2); - n = (sizes[i] / 2); - cy.push(cy[i - 1] + Math.max(FONT_SIZE * 1.618, p + gap + n)); - } - var dy = (FONT_SIZE * 0.618 / 2); - return { - width: width, - height: (cy[cy.length - 1] + Math.max(padB, FONT_SIZE / 2)), - circleX: utils.range(sizes.length).map(function () { - return (maxSize / 2); - }), - circleY: cy, - textAnchor: 'start', - textX: utils.range(labels.length).map(function () { - return (maxSize + indent); - }), - textY: cy.map(function (y) { - return (y + dy); - }) - }; - })() : - (function () { - var padL = Math.max( - getTextWidth(labels[0]) / 2, - sizes[0] / 2 - ); - var padR = Math.max( - getTextWidth(labels[labels.length - 1]) / 2, - sizes[sizes.length - 1] / 2 - ); - var gap = (width - sizes.reduce(function (sum, n, i) { - return (sum + (i === 0 || i === sizes.length - 1 ? n / 2 : n)); - }, 0) - padL - padR) / (SIZE_TICKS_COUNT - 1); - var indent = 8; - var cx = [padL]; - for (var i = 1, n, p; i < sizes.length; i++) { - p = (sizes[i - 1] / 2); - n = (sizes[i] / 2); - cx.push(cx[i - 1] + p + gap + n); - } - var cy = sizes.map(function (size) { - return (maxSize - size / 2); - }); - return { - width: width, - height: (maxSize + indent + FONT_SIZE), - circleX: cx, - circleY: cy, - textAnchor: 'middle', - textX: cx, - textY: utils.range(labels.length).map(function () { - return (maxSize + indent + FONT_SIZE); - }), - }; - })() - ); - - var sizeLegend = ( - xml('svg', - { - class: 'graphical-report__legend__size', - width: layout.width, - height: layout.height - }, - sizes.map(function (size, i) { - return xml('circle', { - class: ( - 'graphical-report__legend__size__item__circle ' + - (firstNode.config.color ? 'color-definite' : 'color-default-size') - ), - cx: layout.circleX[i], - cy: layout.circleY[i], - r: (size / 2) - }); - }).join(''), - labels.map(function (text, i) { - return xml('text', { - class: 'graphical-report__legend__size__item__label', - x: layout.textX[i], - y: layout.textY[i], - 'text-anchor': layout.textAnchor - }, text); - }).join('') - ) - ); - - container - .insertAdjacentHTML('beforeend', sizeLegend); - } - }); - }, - - _drawColorLegend: function () { - var self = this; - - self._color.forEach(function (c) { - var firstNode = self - ._chart - .select(function (unit) { - return (unit.config.color === c); - }) - [0]; - - if (firstNode) { - - var guide = firstNode.config.guide || {}; - - var colorScale = firstNode.getScale('color'); - var dataSource = self - ._chart - .getDataSources({excludeFilter: ['legend']}); - - var domain = utils.unique(dataSource[colorScale.source].data - .map(function (x) { - return x[colorScale.dim]; - })); - - var colorScaleConfig = self._chart.getSpec().scales[c]; - if (colorScaleConfig.order) { - domain = utils.union(utils.intersection(colorScaleConfig.order, domain), domain); - } else { - var orderState = self._legendOrderState[c]; - domain = domain.sort(function (a, b) { - var diff = orderState[a] - orderState[b]; - return (diff && (diff / Math.abs(diff))); - }); - } - - var title = ((guide.color || {}).label || {}).text || colorScale.dim; - var noVal = ((guide.color || {}).tickFormatNullAlias || ('No ' + title)); - - var legendColorItems = domain.map(function (d) { - var val = JSON.stringify(isEmpty(d) ? null : d); - var key = colorScale.dim + val; - - return { - scaleId: c, - dim: colorScale.dim, - color: colorScale(d), - disabled: self._currentFilters.hasOwnProperty(key), - label: d, - value: val - }; - }); - - self._legendColorByScaleId[c] = legendColorItems; - self._container - .insertAdjacentHTML('beforeend', self._template({ - name: title, - top: self._resetTemplate({ - classDisabled: (legendColorItems.some(function (d) { - return d.disabled; - }) ? '' : 'disabled') - }), - items: legendColorItems - .map(function (d) { - return self._itemTemplate({ - scaleId: d.scaleId, - dim: utils.escape(d.dim), - color: d.color, - cssClass: (colorScale.toClass(d.color)), - cssColor: (d.disabled ? 'transparent' : colorScale.toColor(d.color)), - borderColor: colorScale.toColor(d.color), - classDisabled: d.disabled ? 'disabled' : '', - label: utils.escape(isEmpty(d.label) ? noVal : d.label), - value: utils.escape(d.value) - }); - }) - .join('') - })); - } - }); - - if (self._color.length > 0) { - self._updateResetButtonPosition(); - var scrollTimeout = null; - self._scrollListener = function () { - var reset = self._container.querySelector(RESET_SELECTOR); - reset.style.display = 'none'; - if (scrollTimeout) { - clearTimeout(scrollTimeout); - } - scrollTimeout = setTimeout(function () { - self._updateResetButtonPosition(); - reset.style.display = ''; - scrollTimeout = null; - }, 250); - }; - self._getScrollContainer().addEventListener('scroll', self._scrollListener); - } - }, - - _toggleLegendItem: function (target, mode) { - - var filters = this._currentFilters; - var colorNodes = (target ? Array.prototype.filter.call( - target.parentNode.childNodes, - function (el) { - return el.matches(COLOR_ITEM_SELECTOR); - } - ) : null); - - var getColorData = function (node) { - var dim = node.getAttribute('data-dim'); - var val = node.getAttribute('data-value'); - return { - sid: node.getAttribute('data-scale-id'), - dim: dim, - val: val, - key: (dim + val) - }; - }; - var isColorHidden = function (key) { - return (key in filters); - }; - var toggleColor = function (node, show) { - var data = getColorData(node); - if (isColorHidden(data.key) !== show) { - return; - } - if (show) { - var filterId = filters[data.key]; - delete filters[data.key]; - node.classList.remove('disabled'); - this._chart.removeFilter(filterId); - } else { - node.classList.add('disabled'); - var isRowMatch = createIsRowMatchInterceptor(data.dim, data.val); - filters[data.key] = this._chart.addFilter({ - tag: 'legend', - predicate: function (row) { - return !isRowMatch(row); - } - }); - } - }.bind(this); - var isTarget = function (node) { - return (node === target); - }; - var isTargetHidden = (target ? isColorHidden(getColorData(target).key) : false); - - var setGuideBackground = function (node, visible) { - node.querySelector('.graphical-report__legend__guide') - .style.backgroundColor = (visible ? '' : 'transparent'); - }; - - if (mode === 'reset') { - colorNodes.forEach(function (node) { - toggleColor(node, true); - setGuideBackground(node, true); - }); - } else if (mode === 'leave-others') { - colorNodes.forEach(function (node) { - if (isTarget(node)) { - toggleColor(node, isTargetHidden); - } - }); - setGuideBackground(target, isTargetHidden); - } else if (mode === 'focus-single') { - var onlyTargetIsVisible = (!isTargetHidden && colorNodes.every(function (node) { - return (isTarget(node) || isColorHidden(getColorData(node).key)); - })); - colorNodes.forEach(function (node) { - var show = (isTarget(node) || onlyTargetIsVisible); - toggleColor(node, show); - }); - if (isTargetHidden) { - setGuideBackground(target, true); - } - } - - this._chart.refresh(); - }, - - _highlightToggle: function (target, doHighlight) { - - if (target.matches('.disabled')) { - return; - } - - // var scaleId = target.getAttribute('data-scale-id'); - var dim = target.getAttribute('data-dim'); - var val = target.getAttribute('data-value'); - - var isRowMatch = doHighlight ? - (createIsRowMatchInterceptor(dim, val)) : - (function (row) { return null; }); - - this._chart - .select(function (unit) { - // return unit.config.color === scaleId; - // use all found elements - return true; - }) - .forEach(function (unit) { - unit.fire('highlight', isRowMatch); - }); - }, - - _getScrollContainer: function () { - return this._container.parentNode.parentNode; - }, - - _updateResetButtonPosition: function () { - var reset = this._container.querySelector(RESET_SELECTOR); - reset.style.top = this._getScrollContainer().scrollTop + 'px'; - }, - - _generateColorMap: function (domain, defBrewer) { - - var limit = defBrewer.length; // 20; - - return domain.reduce(function (memo, val, i) { - memo[val] = defBrewer[i % limit]; - return memo; - }, - {}); - }, - - _assignStaticBrewersOrEx: function () { - var self = this; - self._color.forEach(function (c) { - var scaleConfig = self - ._chart - .getSpec() - .scales[c]; - - var fullLegendDataSource = self - ._chart - .getDataSources({excludeFilter: ['legend']}); - - var fullLegendDomain = self - ._chart - .getScaleFactory(fullLegendDataSource) - .createScaleInfoByName(c) - .domain(); - - if (!scaleConfig.brewer || Array.isArray(scaleConfig.brewer)) { - var defBrewer = scaleConfig.brewer || utils.range(20).map(function (i) { - return 'color20-' + (1 + i); - }); - scaleConfig.brewer = self._generateColorMap(fullLegendDomain, defBrewer); - } - - self._legendOrderState[c] = fullLegendDomain.reduce(function (memo, x, i) { - memo[x] = i; - return memo; - }, {}); - }); - } - }; - } - - tauCharts.api.plugins.add('legend', ChartLegend); - - return ChartLegend; -}); diff --git a/build/development/plugins/tauCharts.quick-filter.css b/build/development/plugins/tauCharts.quick-filter.css deleted file mode 100644 index 0c10f88a6..000000000 --- a/build/development/plugins/tauCharts.quick-filter.css +++ /dev/null @@ -1,46 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__filter__wrap { - padding: 20px 0 10px 10px; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__filter__wrap__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__filter__wrap rect { - fill: rgba(0, 0, 0, 0.2); -} -.graphical-report__filter__wrap .brush .extent { - shape-rendering: crispEdges; - fill-opacity: 0.4; - fill: #0074FF; -} -.graphical-report__filter__wrap text.date-label { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap text.date-label .common { - font-weight: 600; -} -.graphical-report__filter__wrap .resize line { - stroke: #000; - stroke-width: 1px; - shape-rendering: crispEdges; -} -.graphical-report__filter__wrap .resize.e text { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap .resize.w text { - text-anchor: middle; - font-size: 12px; -} diff --git a/build/development/plugins/tauCharts.quick-filter.dark.css b/build/development/plugins/tauCharts.quick-filter.dark.css deleted file mode 100644 index 0c10f88a6..000000000 --- a/build/development/plugins/tauCharts.quick-filter.dark.css +++ /dev/null @@ -1,46 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__filter__wrap { - padding: 20px 0 10px 10px; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__filter__wrap__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__filter__wrap rect { - fill: rgba(0, 0, 0, 0.2); -} -.graphical-report__filter__wrap .brush .extent { - shape-rendering: crispEdges; - fill-opacity: 0.4; - fill: #0074FF; -} -.graphical-report__filter__wrap text.date-label { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap text.date-label .common { - font-weight: 600; -} -.graphical-report__filter__wrap .resize line { - stroke: #000; - stroke-width: 1px; - shape-rendering: crispEdges; -} -.graphical-report__filter__wrap .resize.e text { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap .resize.w text { - text-anchor: middle; - font-size: 12px; -} diff --git a/build/development/plugins/tauCharts.quick-filter.default.css b/build/development/plugins/tauCharts.quick-filter.default.css deleted file mode 100644 index 0c10f88a6..000000000 --- a/build/development/plugins/tauCharts.quick-filter.default.css +++ /dev/null @@ -1,46 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__filter__wrap { - padding: 20px 0 10px 10px; - margin-right: 30px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__filter__wrap__title { - margin: 0 0 10px 10px; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__filter__wrap rect { - fill: rgba(0, 0, 0, 0.2); -} -.graphical-report__filter__wrap .brush .extent { - shape-rendering: crispEdges; - fill-opacity: 0.4; - fill: #0074FF; -} -.graphical-report__filter__wrap text.date-label { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap text.date-label .common { - font-weight: 600; -} -.graphical-report__filter__wrap .resize line { - stroke: #000; - stroke-width: 1px; - shape-rendering: crispEdges; -} -.graphical-report__filter__wrap .resize.e text { - text-anchor: middle; - font-size: 12px; -} -.graphical-report__filter__wrap .resize.w text { - text-anchor: middle; - font-size: 12px; -} diff --git a/build/development/plugins/tauCharts.quick-filter.js b/build/development/plugins/tauCharts.quick-filter.js deleted file mode 100644 index 537a4c1e9..000000000 --- a/build/development/plugins/tauCharts.quick-filter.js +++ /dev/null @@ -1,267 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var utils = tauCharts.api.utils; - var REFRESH_DELAY = 0; - - function QuickFilter(xSettings) { - - var log10 = function (x) { - return Math.log(x) / Math.LN10; - }; - - var createIsRowMatchInterceptor = function (dim, valMin, valMax) { - return function (row) { - var d = row[dim]; - return (d < valMin || d > valMax); - }; - }; - - return { - - init: function (chart) { - - this._chart = chart; - this._currentFilters = {}; - this._data = {}; - this._bounds = {}; - this._filter = {}; - this._container = {}; - this._layout = this._chart.getLayout().layout; - - var self = this; - var spec = this._chart.getSpec(); - var sources = spec.sources['/']; - - var fields = (xSettings && xSettings.fields || xSettings); - - this._fields = ((Array.isArray(fields) && fields.length > 0) ? - (fields) : - (Object.keys(sources.dims))); - - this._applyImmediately = Boolean(xSettings && xSettings.applyImmediately); - - var chartData = self._chart.getChartModelData(); - - this._filtersContainer = self._chart.insertToRightSidebar(self._filtersContainer); - this._filtersContainer.style.maxHeight = '0px'; - - self._fields - .filter(function (dim) { - var isMeasure = (sources.dims[dim].type === 'measure'); - if (!isMeasure) { - spec.settings.log('The [' + dim + '] isn\'t measure so Quick Filter plugin skipped it'); - } - - return isMeasure; - }) - .forEach(function (dim) { - self._data[dim] = chartData.map(function (x) { - return x[dim]; - }); - self._bounds[dim] = d3.extent(self._data[dim]); - self._filter[dim] = self._bounds[dim]; - - self._filtersContainer.insertAdjacentHTML('beforeend', self._filterWrapper({name: dim})); - self._container[dim] = self._filtersContainer.lastChild; - - self._drawFilter(dim); - }); - }, - - onRender: function () { - this._filtersContainer.style.maxHeight = 'none'; - }, - - _filtersContainer: '
', - _filterWrapper: utils.template( - '
' + - '
<%=name%>
' + - '
' - ), - - _drawFilter: function (dim) { - - var data = this._data[dim]; - var bounds = this._bounds[dim]; - - var filter = this._filter[dim]; - var isDate = (utils.isDate(bounds[0]) || utils.isDate(bounds[1])); - - var self = this; - - var margin = {top: 0, right: 24, bottom: 21, left: 12}; - var padding = 4; - var width = 180 - margin.left - margin.right; - var height = 41 - margin.top - margin.bottom - 2 * padding; - - var x = d3.scale.linear() - .domain(bounds) - .range([0, width]); - - var brush = d3.svg.brush() - .x(x) - .extent(filter) - .on('brushstart', function () { - self._layout.style['overflow-y'] = 'hidden'; - }) - .on('brush', (this._applyImmediately ? applyBrush : updateBrush)) - .on('brushend', function () { - self._layout.style['overflow-y'] = ''; - applyBrush(); - }); - - var svg = d3.select(this._container[dim]).append('svg') - .attr('width', width + margin.left + margin.right) - .attr('height', height + margin.top + margin.bottom + 4) - .append('g') - .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); - - var rect = svg.append('g').selectAll('rect') - .data(data) - .enter().append('rect') - .attr('transform', function (d) {return 'translate(' + x(d) + ',' + (margin.top + padding) + ')'; }) - .attr('height', height) - .attr('width', 1); - - var brushg = svg.append('g') - .attr('class', 'brush') - .call(brush); - - brushg.selectAll('.resize').append('line') - .attr('transform', 'translate(0, 0)') - .attr('x1', 0) - .attr('x2', 0) - .attr('y1', 0) - .attr('y2', height + 2 * padding); - - brushg.selectAll('.resize').append('text') - .attr('x', 0) - .attr('y', 2 * (height + padding)); - - brushg.selectAll('rect') - .attr('height', height + 2 * padding); - - var dateText = svg.append('text') - .attr('x', width / 2) - .attr('y', 2 * (height + padding)) - .attr('class', 'date-label'); - - var count = log10(self._filter[dim][1] - self._filter[dim][0]); - var xF = Math.round(3 - count); - var base = Math.pow(10, xF); - - function getFormatters(formatters) { - - var index = formatters - .findIndex(function (token) { - var f = d3.time.format(token); - return (f(new Date(bounds[0])) !== f(new Date(bounds[1]))); - }); - - index = ((index < 0) ? (formatters.length) : (index)); - - return { - comm: formatters.slice(0, index), - diff: formatters.slice(index) - }; - } - - var compOrder = ['’%y', ' %b', '%d', '%H', ':%M', ':%S']; - if (isDate) { - var formatters = getFormatters(compOrder); - if (formatters.comm.length < 3) { - formatters.diff.splice(-3); - formatters.diff.reverse(); - formatters.comm.reverse(); - // Hide time at all if there're different days - } else { - if (formatters.comm.length < 5) { - formatters.diff.pop(); - } - // Hide seconds if it's not the same minute - - formatters.diff = formatters.comm.splice(3, formatters.comm.length - 3).concat(formatters.diff); - formatters.comm.reverse(); - // Move time to diff part if it's the same day - } - } - - applyBrush(); - - function updateBrush() { - var filter = self._filter[dim] = brush.extent(); - var filterMin = isDate ? (new Date(filter[0])).getTime() : filter[0]; - var filterMax = isDate ? (new Date(filter[1])).getTime() : filter[1]; - - var s = (Math.round(parseFloat(filterMin) * base) / base); - var e = (Math.round(parseFloat(filterMax) * base) / base); - - var sTxt = brushg.selectAll('.w text'); - var eTxt = brushg.selectAll('.e text'); - - if (isDate) { - var comm = d3.time.format(formatters.comm.join('')); - var diff = d3.time.format(formatters.diff.join('')); - - dateText.html(diff(new Date(s)) + ' .. ' + diff(new Date(e)) + - ' ' + comm(new Date(e)) + ''); - } else { - sTxt.text(s); - eTxt.text(e); - } - } - - function applyBrush() { - updateBrush(); - self._applyFilter(dim); - } - }, - - _applyFilter: function (dim) { - var state = this._currentFilters; - - var valMin = this._filter[dim][0]; - var valMax = this._filter[dim][1]; - var isRowMatch = createIsRowMatchInterceptor(dim, valMin, valMax); - - var filterId = state[dim]; - delete state[dim]; - this._chart.removeFilter(filterId); - - state[dim] = this._chart.addFilter({ - tag: 'quick-filter', - predicate: function (row) { - return !isRowMatch(row); - } - }); - - if (REFRESH_DELAY < 0) { - this._chart.refresh(); - } else { - if (this._refreshRequestId) { - clearTimeout(this._refreshRequestId); - } - this._refreshRequestId = setTimeout(function () { - this._refreshRequestId = null; - this._chart.refresh(); - }.bind(this), REFRESH_DELAY); - } - } - }; - } - - tauCharts.api.plugins.add('quick-filter', QuickFilter); - - return QuickFilter; -}); diff --git a/build/development/plugins/tauCharts.tooltip.css b/build/development/plugins/tauCharts.tooltip.css deleted file mode 100644 index 587de2fef..000000000 --- a/build/development/plugins/tauCharts.tooltip.css +++ /dev/null @@ -1,127 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__tooltip { - position: absolute; - top: 0; - left: 0; - max-width: none; - z-index: 900; - display: -ms-flexbox; - display: flex; - -ms-flex-align: stretch; - align-items: stretch; - font-size: 11px; - background: rgba(255, 255, 255, 0.9); - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); - overflow: hidden; - font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; - /* Fade */ -} -.graphical-report__tooltip.fade { - opacity: 0; - transition: opacity 200ms ease-out; -} -.graphical-report__tooltip.fade.in { - opacity: 1; - transition-duration: 500ms; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.bottom-right { - margin-left: 8px; -} -.graphical-report__tooltip.top-left, -.graphical-report__tooltip.bottom-left { - margin-left: -8px; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.top-left { - margin-top: 8px; -} -.graphical-report__tooltip__content { - max-width: 500px; - overflow: hidden; - padding: 15px 15px 10px 15px; - box-sizing: border-box; -} -.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude, -.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical { - width: 26px; -} -.graphical-report__tooltip__vertical, -.graphical-report__tooltip__exclude { - box-shadow: inset 2px 0 2px -2px rgba(0, 0, 0, 0.2); - -ms-flex: 0 0 auto; - flex: 0 0 auto; - color: rgba(101, 113, 127, 0.8); - cursor: pointer; - min-height: 86px; - overflow: hidden; - position: relative; - transition: width 500ms; - width: 0; -} -.graphical-report__tooltip__vertical__wrap, -.graphical-report__tooltip__exclude__wrap { - left: calc(100% - 26px); - line-height: 26px; - padding: 0 15px; - transform: rotate(-90deg); - transform-origin: 0 0; - height: 100%; - white-space: nowrap; - position: absolute; - top: 100%; - box-sizing: border-box; -} -.graphical-report__tooltip__vertical:hover, -.graphical-report__tooltip__exclude:hover { - color: #65717F; - background: linear-gradient(to right, rgba(235, 238, 241, 0.9) 0%, rgba(235, 238, 241, 0) 100%); -} -.graphical-report__tooltip__vertical .tau-icon-close-gray, -.graphical-report__tooltip__exclude .tau-icon-close-gray { - display: inline-block; - width: 12px; - height: 12px; - position: relative; - top: 3px; - margin-right: 5px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+); -} -.graphical-report__tooltip__list { - display: table; -} -.graphical-report__tooltip__list__item { - display: table-row; -} -.graphical-report__tooltip__list__elem { - display: table-cell; - padding-bottom: 4px; - line-height: 1.3; - color: #000; -} -.graphical-report__tooltip__list__elem:not(:first-child) { - padding-left: 15px; -} -.graphical-report__tooltip__list__elem:first-child { - color: #8e8e8e; -} -.graphical-report__tooltip__gray-text { - color: #8e8e8e; -} -.graphical-report__tooltip-target { - cursor: pointer; -} -.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted, -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted, -.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted { - stroke: #333; - stroke-width: 1; -} -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted { - shape-rendering: crispEdges; -} diff --git a/build/development/plugins/tauCharts.tooltip.dark.css b/build/development/plugins/tauCharts.tooltip.dark.css deleted file mode 100644 index 62eaf98fb..000000000 --- a/build/development/plugins/tauCharts.tooltip.dark.css +++ /dev/null @@ -1,127 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__tooltip { - position: absolute; - top: 0; - left: 0; - max-width: none; - z-index: 900; - display: -ms-flexbox; - display: flex; - -ms-flex-align: stretch; - align-items: stretch; - font-size: 11px; - background: rgba(0, 0, 0, 0.9); - box-shadow: 0 1px 4px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.005); - overflow: hidden; - font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; - /* Fade */ -} -.graphical-report__tooltip.fade { - opacity: 0; - transition: opacity 200ms ease-out; -} -.graphical-report__tooltip.fade.in { - opacity: 1; - transition-duration: 500ms; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.bottom-right { - margin-left: 8px; -} -.graphical-report__tooltip.top-left, -.graphical-report__tooltip.bottom-left { - margin-left: -8px; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.top-left { - margin-top: 8px; -} -.graphical-report__tooltip__content { - max-width: 500px; - overflow: hidden; - padding: 15px 15px 10px 15px; - box-sizing: border-box; -} -.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude, -.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical { - width: 26px; -} -.graphical-report__tooltip__vertical, -.graphical-report__tooltip__exclude { - box-shadow: inset 2px 0 2px -2px rgba(255, 255, 255, 0.2); - -ms-flex: 0 0 auto; - flex: 0 0 auto; - color: rgba(101, 113, 127, 0.8); - cursor: pointer; - min-height: 86px; - overflow: hidden; - position: relative; - transition: width 500ms; - width: 0; -} -.graphical-report__tooltip__vertical__wrap, -.graphical-report__tooltip__exclude__wrap { - left: calc(100% - 26px); - line-height: 26px; - padding: 0 15px; - transform: rotate(-90deg); - transform-origin: 0 0; - height: 100%; - white-space: nowrap; - position: absolute; - top: 100%; - box-sizing: border-box; -} -.graphical-report__tooltip__vertical:hover, -.graphical-report__tooltip__exclude:hover { - color: #65717F; - background: linear-gradient(to right, rgba(235, 238, 241, 0.9) 0%, rgba(235, 238, 241, 0) 100%); -} -.graphical-report__tooltip__vertical .tau-icon-close-gray, -.graphical-report__tooltip__exclude .tau-icon-close-gray { - display: inline-block; - width: 12px; - height: 12px; - position: relative; - top: 3px; - margin-right: 5px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+); -} -.graphical-report__tooltip__list { - display: table; -} -.graphical-report__tooltip__list__item { - display: table-row; -} -.graphical-report__tooltip__list__elem { - display: table-cell; - padding-bottom: 4px; - line-height: 1.3; - color: #fff; -} -.graphical-report__tooltip__list__elem:not(:first-child) { - padding-left: 15px; -} -.graphical-report__tooltip__list__elem:first-child { - color: #ccc; -} -.graphical-report__tooltip__gray-text { - color: #ccc; -} -.graphical-report__tooltip-target { - cursor: pointer; -} -.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted, -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted, -.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted { - stroke: #fff; - stroke-width: 1; -} -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted { - shape-rendering: crispEdges; -} diff --git a/build/development/plugins/tauCharts.tooltip.default.css b/build/development/plugins/tauCharts.tooltip.default.css deleted file mode 100644 index 587de2fef..000000000 --- a/build/development/plugins/tauCharts.tooltip.default.css +++ /dev/null @@ -1,127 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__tooltip { - position: absolute; - top: 0; - left: 0; - max-width: none; - z-index: 900; - display: -ms-flexbox; - display: flex; - -ms-flex-align: stretch; - align-items: stretch; - font-size: 11px; - background: rgba(255, 255, 255, 0.9); - box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); - overflow: hidden; - font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; - /* Fade */ -} -.graphical-report__tooltip.fade { - opacity: 0; - transition: opacity 200ms ease-out; -} -.graphical-report__tooltip.fade.in { - opacity: 1; - transition-duration: 500ms; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.bottom-right { - margin-left: 8px; -} -.graphical-report__tooltip.top-left, -.graphical-report__tooltip.bottom-left { - margin-left: -8px; -} -.graphical-report__tooltip.top-right, -.graphical-report__tooltip.top-left { - margin-top: 8px; -} -.graphical-report__tooltip__content { - max-width: 500px; - overflow: hidden; - padding: 15px 15px 10px 15px; - box-sizing: border-box; -} -.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude, -.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical { - width: 26px; -} -.graphical-report__tooltip__vertical, -.graphical-report__tooltip__exclude { - box-shadow: inset 2px 0 2px -2px rgba(0, 0, 0, 0.2); - -ms-flex: 0 0 auto; - flex: 0 0 auto; - color: rgba(101, 113, 127, 0.8); - cursor: pointer; - min-height: 86px; - overflow: hidden; - position: relative; - transition: width 500ms; - width: 0; -} -.graphical-report__tooltip__vertical__wrap, -.graphical-report__tooltip__exclude__wrap { - left: calc(100% - 26px); - line-height: 26px; - padding: 0 15px; - transform: rotate(-90deg); - transform-origin: 0 0; - height: 100%; - white-space: nowrap; - position: absolute; - top: 100%; - box-sizing: border-box; -} -.graphical-report__tooltip__vertical:hover, -.graphical-report__tooltip__exclude:hover { - color: #65717F; - background: linear-gradient(to right, rgba(235, 238, 241, 0.9) 0%, rgba(235, 238, 241, 0) 100%); -} -.graphical-report__tooltip__vertical .tau-icon-close-gray, -.graphical-report__tooltip__exclude .tau-icon-close-gray { - display: inline-block; - width: 12px; - height: 12px; - position: relative; - top: 3px; - margin-right: 5px; - background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+); -} -.graphical-report__tooltip__list { - display: table; -} -.graphical-report__tooltip__list__item { - display: table-row; -} -.graphical-report__tooltip__list__elem { - display: table-cell; - padding-bottom: 4px; - line-height: 1.3; - color: #000; -} -.graphical-report__tooltip__list__elem:not(:first-child) { - padding-left: 15px; -} -.graphical-report__tooltip__list__elem:first-child { - color: #8e8e8e; -} -.graphical-report__tooltip__gray-text { - color: #8e8e8e; -} -.graphical-report__tooltip-target { - cursor: pointer; -} -.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted, -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted, -.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted { - stroke: #333; - stroke-width: 1; -} -.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted { - shape-rendering: crispEdges; -} diff --git a/build/development/plugins/tauCharts.tooltip.js b/build/development/plugins/tauCharts.tooltip.js deleted file mode 100644 index dcb6a0ef1..000000000 --- a/build/development/plugins/tauCharts.tooltip.js +++ /dev/null @@ -1,498 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var d3 = tauCharts.api.d3; - var utils = tauCharts.api.utils; - var pluginsSDK = tauCharts.api.pluginsSDK; - var TARGET_SVG_CLASS = 'graphical-report__tooltip-target'; - - var escapeHtml = function (x) { - return String(x) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, '''); - }; - - function Tooltip(xSettings) { - - var settings = utils.defaults( - xSettings || {}, - { - // add default settings here - align: 'bottom-right', - escapeHtml: true, - fields: null, - formatters: {}, - dockToData: false, - aggregationGroupFields: [], - onRevealAggregation: function (filters, row) { - console.log( - 'Setup [onRevealAggregation] callback and filter original data by the following criteria: ', - JSON.stringify(filters, null, 2)); - }, - spacing: 24 - }); - - var plugin = { - - init: function (chart) { - - this._chart = chart; - this._metaInfo = {}; - this._skipInfo = {}; - - // NOTE: for compatibility with old Tooltip implementation. - Object.assign(this, utils.omit(settings, 'fields', 'getFields')); - - this._tooltip = this._chart.addBalloon( - { - spacing: settings.spacing, - auto: true, - effectClass: 'fade' - }); - - var revealAggregationBtn = ((settings.aggregationGroupFields.length > 0) ? - (this.templateRevealAggregation) : - ('') - ); - - var template = utils.template(this.template); - var tooltipNode = this.getTooltipNode(); - - this._tooltip - .content(template({ - revealTemplate: revealAggregationBtn, - excludeTemplate: this.templateExclude - })); - - tooltipNode - .addEventListener('click', function (e) { - - var target = e.target; - - while (target !== e.currentTarget && target !== null) { - if (target.classList.contains('i-role-exclude')) { - this._exclude(); - this.setState({ - highlight: null, - isStuck: false - }); - } - - if (target.classList.contains('i-role-reveal')) { - this._reveal(); - this.setState({ - highlight: null, - isStuck: false - }); - } - - target = target.parentNode; - } - - }.bind(this), false); - - this._scrollHandler = function () { - this.setState({ - highlight: null, - isStuck: false - }); - }.bind(this); - window.addEventListener('scroll', this._scrollHandler, true); - - this._outerClickHandler = function (e) { - var tooltipRect = this.getTooltipNode().getBoundingClientRect(); - if ((e.clientX < tooltipRect.left) || - (e.clientX > tooltipRect.right) || - (e.clientY < tooltipRect.top) || - (e.clientY > tooltipRect.bottom) - ) { - this.setState({ - highlight: null, - isStuck: false - }); - } - }.bind(this); - - // Handle initial state - this.setState(this.state); - - this.afterInit(tooltipNode); - }, - - getTooltipNode: function () { - return this._tooltip.getElement(); - }, - - state: { - highlight: null, - isStuck: false - }, - - setState: function (newState) { - var prev = this.state; - var state = this.state = Object.assign({}, prev, newState); - prev.highlight = prev.highlight || {data: null, cursor: null, unit: null}; - state.highlight = state.highlight || {data: null, cursor: null, unit: null}; - - // If stuck, treat that data has not changed - if (state.isStuck && prev.highlight.data) { - state.highlight = prev.highlight; - } - - // Show/hide tooltip - if (state.highlight.data !== prev.highlight.data) { - if (state.highlight.data) { - this.hideTooltip(); - this.showTooltip( - state.highlight.data, - state.highlight.cursor - ); - this._setTargetSvgClass(true); - requestAnimationFrame(function () { - this._setTargetSvgClass(true); - }.bind(this)); - } else if (!state.isStuck && prev.highlight.data && !state.highlight.data) { - this._removeFocus(); - this.hideTooltip(); - this._setTargetSvgClass(false); - } - } - - // Update tooltip position - if (state.highlight.data && ( - !prev.highlight.cursor || - state.highlight.cursor.x !== prev.highlight.cursor.x || - state.highlight.cursor.y !== prev.highlight.cursor.y - )) { - this._tooltip.position(state.highlight.cursor.x, state.highlight.cursor.y); - } - - // Stick/unstick tooltip - var tooltipNode = this.getTooltipNode(); - if (state.isStuck !== prev.isStuck) { - if (state.isStuck) { - window.addEventListener('click', this._outerClickHandler, true); - tooltipNode.classList.add('stuck'); - this._setTargetEventsEnabled(false); - this._accentFocus(state.highlight.data); - this._tooltip.updateSize(); - } else { - window.removeEventListener('click', this._outerClickHandler, true); - tooltipNode.classList.remove('stuck'); - // NOTE: Prevent showing tooltip immediately - // after pointer events appear. - requestAnimationFrame(function () { - this._setTargetEventsEnabled(true); - }.bind(this)); - } - } - }, - - showTooltip: function (data, cursor) { - - var content = this.getTooltipNode().querySelectorAll('.i-role-content')[0]; - if (content) { - var fields = ( - settings.fields - || - ((typeof settings.getFields === 'function') && settings.getFields(this._chart)) - || - Object.keys(data) - ); - content.innerHTML = this.render(data, fields); - } - - this._tooltip - .position(cursor.x, cursor.y) - .place(settings.align) - .show() - .updateSize(); - }, - - hideTooltip: function (e) { - window.removeEventListener('click', this._outerClickHandler, true); - this._tooltip.hide(); - }, - - destroy: function () { - window.removeEventListener('scroll', this._scrollHandler, true); - this._setTargetSvgClass(false); - this.setState({ - highlight: null, - isStuck: false - }); - this._tooltip.destroy(); - }, - - _subscribeToHover: function () { - - var elementsToMatch = [ - 'ELEMENT.LINE', - 'ELEMENT.AREA', - 'ELEMENT.PATH', - 'ELEMENT.INTERVAL', - 'ELEMENT.INTERVAL.STACKED', - 'ELEMENT.POINT' - ]; - - this._chart - .select(function (node) { - return (elementsToMatch.indexOf(node.config.type) >= 0); - }) - .forEach(function (node) { - - node.on('data-hover', function (sender, e) { - var bodyRect = document.body.getBoundingClientRect(); - this.setState({ - highlight: (e.data ? { - data: e.data, - cursor: { - x: (e.event.clientX - bodyRect.left), - y: (e.event.clientY - bodyRect.top) - }, - unit: sender - } : null) - }); - }.bind(this)); - - node.on('data-click', function (sender, e) { - var bodyRect = document.body.getBoundingClientRect(); - this.setState(e.data ? { - highlight: { - data: e.data, - cursor: { - x: (e.event.clientX - bodyRect.left), - y: (e.event.clientY - bodyRect.top) - }, - unit: sender - }, - isStuck: true - } : { - highlight: null, - isStuck: null - }); - }.bind(this)); - }, this); - }, - - afterInit: function (tooltipNode) { - // for override - }, - - render: function (data, fields) { - var self = this; - return fields - .filter(function (k) { - var tokens = k.split('.'); - var matchX = ((tokens.length === 2) && self._skipInfo[tokens[0]]); - return !matchX; - }) - .map(function (k) { - var key = k; - var val = data[k]; - return self.renderItem(self._getLabel(key), self._getFormat(key)(val), key, val); - }) - .join(''); - }, - - renderItem: function (label, formattedValue, fieldKey, fieldVal) { - return this.itemTemplate({ - label: settings.escapeHtml ? escapeHtml(label) : label, - value: settings.escapeHtml ? escapeHtml(formattedValue) : formattedValue - }); - }, - - _getFormat: function (k) { - var meta = this._metaInfo[k] || {format: function (x) { - return String(x); - }}; - return meta.format; - }, - - _getLabel: function (k) { - var meta = this._metaInfo[k] || {label: k}; - return meta.label; - }, - - _accentFocus: function (data) { - var filter = function (d) { - return (d === data); - }; - this._chart - .select(function () { - return true; - }).forEach(function (unit) { - unit.fire('highlight', filter); - }); - }, - - _removeFocus: function () { - var filter = function () { - return null; - }; - this._chart - .select(function () { - return true; - }).forEach(function (unit) { - unit.fire('highlight', filter); - unit.fire('highlight-data-points', filter); - }); - }, - - _reveal: function () { - var aggregatedRow = this.state.highlight.data; - var groupFields = (settings.aggregationGroupFields || []); - var descFilters = groupFields.reduce(function (memo, k) { - if (aggregatedRow.hasOwnProperty(k)) { - memo[k] = aggregatedRow[k]; - } - return memo; - }, {}); - - settings.onRevealAggregation(descFilters, aggregatedRow); - }, - - _exclude: function () { - this._chart - .addFilter({ - tag: 'exclude', - predicate: (function (element) { - return function (row) { - return JSON.stringify(row) !== JSON.stringify(element); - }; - }(this.state.highlight.data)) - }); - this._chart.refresh(); - }, - - onRender: function () { - - var info = this._getFormatters(); - this._metaInfo = info.meta; - this._skipInfo = info.skip; - - this._subscribeToHover(); - - this.setState({ - highlight: null, - isStuck: false - }); - }, - - _setTargetSvgClass: function (isSet) { - d3.select(this._chart.getSVG()).classed(TARGET_SVG_CLASS, isSet); - }, - - _setTargetEventsEnabled: function (isSet) { - if (isSet) { - this._chart.enablePointerEvents(); - } else { - this._chart.disablePointerEvents(); - } - }, - - templateRevealAggregation: [ - '
', - '
', - ' Reveal', - '
', - '
' - ].join(''), - - templateExclude: [ - '
', - '
', - ' ', - ' Exclude', - '
', - '
' - ].join(''), - - template: [ - '
', - '<%= revealTemplate %>', - '<%= excludeTemplate %>' - ].join(''), - - itemTemplate: utils.template([ - '
', - '
<%=label%>
', - '
<%=value%>
', - '
' - ].join('')), - - _getFormatters: function () { - - var info = pluginsSDK.extractFieldsFormatInfo(this._chart.getSpec()); - var skip = {}; - Object.keys(info).forEach(function (k) { - - if (info[k].isComplexField) { - skip[k] = true; - } - - if (info[k].parentField) { - delete info[k]; - } - }); - - var toLabelValuePair = function (x) { - - var res = {}; - - if (typeof x === 'function' || typeof x === 'string') { - res = {format: x}; - } else if (utils.isObject(x)) { - res = utils.pick(x, 'label', 'format', 'nullAlias'); - } - - return res; - }; - - Object.keys(settings.formatters).forEach(function (k) { - - var fmt = toLabelValuePair(settings.formatters[k]); - - info[k] = Object.assign( - ({label: k, nullAlias: ('No ' + k)}), - (info[k] || {}), - (utils.pick(fmt, 'label', 'nullAlias'))); - - if (fmt.hasOwnProperty('format')) { - info[k].format = (typeof fmt.format === 'function') ? - (fmt.format) : - (tauCharts.api.tickFormat.get(fmt.format, info[k].nullAlias)); - } else { - info[k].format = (info[k].hasOwnProperty('format')) ? - (info[k].format) : - (tauCharts.api.tickFormat.get(null, info[k].nullAlias)); - } - }); - - return { - meta: info, - skip: skip - }; - } - }; - - return plugin; - } - - tauCharts.api.plugins.add('tooltip', Tooltip); - - return Tooltip; -}); \ No newline at end of file diff --git a/build/development/plugins/tauCharts.trendline.css b/build/development/plugins/tauCharts.trendline.css deleted file mode 100644 index 9c4551f89..000000000 --- a/build/development/plugins/tauCharts.trendline.css +++ /dev/null @@ -1,101 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__svg .graphical-report__trendline.color20-1 { - stroke: #357ac7; -} -.graphical-report__svg .graphical-report__trendline.color20-2 { - stroke: #a5193d; -} -.graphical-report__svg .graphical-report__trendline.color20-3 { - stroke: #47991a; -} -.graphical-report__svg .graphical-report__trendline.color20-4 { - stroke: #261c31; -} -.graphical-report__svg .graphical-report__trendline.color20-5 { - stroke: #9e790c; -} -.graphical-report__svg .graphical-report__trendline.color20-6 { - stroke: #0c0a08; -} -.graphical-report__svg .graphical-report__trendline.color20-7 { - stroke: #872f11; -} -.graphical-report__svg .graphical-report__trendline.color20-8 { - stroke: #888d18; -} -.graphical-report__svg .graphical-report__trendline.color20-9 { - stroke: #48b8a8; -} -.graphical-report__svg .graphical-report__trendline.color20-10 { - stroke: #b16fab; -} -.graphical-report__svg .graphical-report__trendline.color20-11 { - stroke: #9c2ca1; -} -.graphical-report__svg .graphical-report__trendline.color20-12 { - stroke: #2d3f19; -} -.graphical-report__svg .graphical-report__trendline.color20-13 { - stroke: #483eaa; -} -.graphical-report__svg .graphical-report__trendline.color20-14 { - stroke: #5c2028; -} -.graphical-report__svg .graphical-report__trendline.color20-15 { - stroke: #3b4e4c; -} -.graphical-report__svg .graphical-report__trendline.color20-16 { - stroke: #b0a353; -} -.graphical-report__svg .graphical-report__trendline.color20-17 { - stroke: #989b9e; -} -.graphical-report__svg .graphical-report__trendline.color20-18 { - stroke: #55371d; -} -.graphical-report__svg .graphical-report__trendline.color20-19 { - stroke: #3eb44b; -} -.graphical-report__svg .graphical-report__trendline.color20-20 { - stroke: #883063; -} -.graphical-report__svg .graphical-report__trendline.color-default { - stroke: #357ac7; -} -.graphical-report { - /* TrendLine */ -} -.graphical-report__trendlinepanel { - padding: 20px 0 20px 20px; - margin-right: 20px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__trendlinepanel__title { - margin: 0 0 10px 0; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__trendlinepanel__control { - width: 100%; -} -.graphical-report__trendlinepanel__error-message { - font-size: 11px; - line-height: 16px; - margin-left: 5px; -} -.graphical-report__trendlinepanel.applicable-false.hide-trendline-error, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input, -.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon { - display: none; -} -.graphical-report__trendline { - stroke-dasharray: 4, 4; -} diff --git a/build/development/plugins/tauCharts.trendline.dark.css b/build/development/plugins/tauCharts.trendline.dark.css deleted file mode 100644 index 2d748ad68..000000000 --- a/build/development/plugins/tauCharts.trendline.dark.css +++ /dev/null @@ -1,101 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__svg .graphical-report__trendline.color20-1 { - stroke: #357ac7; -} -.graphical-report__svg .graphical-report__trendline.color20-2 { - stroke: #a5193d; -} -.graphical-report__svg .graphical-report__trendline.color20-3 { - stroke: #47991a; -} -.graphical-report__svg .graphical-report__trendline.color20-4 { - stroke: #4f3b66; -} -.graphical-report__svg .graphical-report__trendline.color20-5 { - stroke: #9e790c; -} -.graphical-report__svg .graphical-report__trendline.color20-6 { - stroke: #473e31; -} -.graphical-report__svg .graphical-report__trendline.color20-7 { - stroke: #872f11; -} -.graphical-report__svg .graphical-report__trendline.color20-8 { - stroke: #888d18; -} -.graphical-report__svg .graphical-report__trendline.color20-9 { - stroke: #48b8a8; -} -.graphical-report__svg .graphical-report__trendline.color20-10 { - stroke: #b16fab; -} -.graphical-report__svg .graphical-report__trendline.color20-11 { - stroke: #9c2ca1; -} -.graphical-report__svg .graphical-report__trendline.color20-12 { - stroke: #2d3f19; -} -.graphical-report__svg .graphical-report__trendline.color20-13 { - stroke: #483eaa; -} -.graphical-report__svg .graphical-report__trendline.color20-14 { - stroke: #6c2730; -} -.graphical-report__svg .graphical-report__trendline.color20-15 { - stroke: #3b4e4c; -} -.graphical-report__svg .graphical-report__trendline.color20-16 { - stroke: #b0a353; -} -.graphical-report__svg .graphical-report__trendline.color20-17 { - stroke: #989b9e; -} -.graphical-report__svg .graphical-report__trendline.color20-18 { - stroke: #734d2d; -} -.graphical-report__svg .graphical-report__trendline.color20-19 { - stroke: #3eb44b; -} -.graphical-report__svg .graphical-report__trendline.color20-20 { - stroke: #883063; -} -.graphical-report__svg .graphical-report__trendline.color-default { - stroke: #357ac7; -} -.graphical-report { - /* TrendLine */ -} -.graphical-report__trendlinepanel { - padding: 20px 0 20px 20px; - margin-right: 20px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__trendlinepanel__title { - margin: 0 0 10px 0; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__trendlinepanel__control { - width: 100%; -} -.graphical-report__trendlinepanel__error-message { - font-size: 11px; - line-height: 16px; - margin-left: 5px; -} -.graphical-report__trendlinepanel.applicable-false.hide-trendline-error, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input, -.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon { - display: none; -} -.graphical-report__trendline { - stroke-dasharray: 4, 4; -} diff --git a/build/development/plugins/tauCharts.trendline.default.css b/build/development/plugins/tauCharts.trendline.default.css deleted file mode 100644 index 9c4551f89..000000000 --- a/build/development/plugins/tauCharts.trendline.default.css +++ /dev/null @@ -1,101 +0,0 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__svg .graphical-report__trendline.color20-1 { - stroke: #357ac7; -} -.graphical-report__svg .graphical-report__trendline.color20-2 { - stroke: #a5193d; -} -.graphical-report__svg .graphical-report__trendline.color20-3 { - stroke: #47991a; -} -.graphical-report__svg .graphical-report__trendline.color20-4 { - stroke: #261c31; -} -.graphical-report__svg .graphical-report__trendline.color20-5 { - stroke: #9e790c; -} -.graphical-report__svg .graphical-report__trendline.color20-6 { - stroke: #0c0a08; -} -.graphical-report__svg .graphical-report__trendline.color20-7 { - stroke: #872f11; -} -.graphical-report__svg .graphical-report__trendline.color20-8 { - stroke: #888d18; -} -.graphical-report__svg .graphical-report__trendline.color20-9 { - stroke: #48b8a8; -} -.graphical-report__svg .graphical-report__trendline.color20-10 { - stroke: #b16fab; -} -.graphical-report__svg .graphical-report__trendline.color20-11 { - stroke: #9c2ca1; -} -.graphical-report__svg .graphical-report__trendline.color20-12 { - stroke: #2d3f19; -} -.graphical-report__svg .graphical-report__trendline.color20-13 { - stroke: #483eaa; -} -.graphical-report__svg .graphical-report__trendline.color20-14 { - stroke: #5c2028; -} -.graphical-report__svg .graphical-report__trendline.color20-15 { - stroke: #3b4e4c; -} -.graphical-report__svg .graphical-report__trendline.color20-16 { - stroke: #b0a353; -} -.graphical-report__svg .graphical-report__trendline.color20-17 { - stroke: #989b9e; -} -.graphical-report__svg .graphical-report__trendline.color20-18 { - stroke: #55371d; -} -.graphical-report__svg .graphical-report__trendline.color20-19 { - stroke: #3eb44b; -} -.graphical-report__svg .graphical-report__trendline.color20-20 { - stroke: #883063; -} -.graphical-report__svg .graphical-report__trendline.color-default { - stroke: #357ac7; -} -.graphical-report { - /* TrendLine */ -} -.graphical-report__trendlinepanel { - padding: 20px 0 20px 20px; - margin-right: 20px; - width: 160px; - box-sizing: border-box; -} -.graphical-report__trendlinepanel__title { - margin: 0 0 10px 0; - text-transform: capitalize; - font-weight: 600; - font-size: 13px; -} -.graphical-report__trendlinepanel__control { - width: 100%; -} -.graphical-report__trendlinepanel__error-message { - font-size: 11px; - line-height: 16px; - margin-left: 5px; -} -.graphical-report__trendlinepanel.applicable-false.hide-trendline-error, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input, -.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control, -.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon { - display: none; -} -.graphical-report__trendline { - stroke-dasharray: 4, 4; -} diff --git a/build/development/plugins/tauCharts.trendline.js b/build/development/plugins/tauCharts.trendline.js deleted file mode 100644 index 273ba5acd..000000000 --- a/build/development/plugins/tauCharts.trendline.js +++ /dev/null @@ -1,609 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - // jscs:disable - var regressionsHub = (function () { - - 'use strict'; - - var gaussianElimination = function (a, o) { - var i = 0, j = 0, k = 0, maxrow = 0, tmp = 0, n = a.length - 1, x = new Array(o); - for (i = 0; i < n; i++) { - maxrow = i; - for (j = i + 1; j < n; j++) { - if (Math.abs(a[i][j]) > Math.abs(a[i][maxrow])) - maxrow = j; - } - for (k = i; k < n + 1; k++) { - tmp = a[k][i]; - a[k][i] = a[k][maxrow]; - a[k][maxrow] = tmp; - } - for (j = i + 1; j < n; j++) { - for (k = n; k >= i; k--) { - a[k][j] -= a[k][i] * a[i][j] / a[i][i]; - } - } - } - for (j = n - 1; j >= 0; j--) { - tmp = 0; - for (k = j + 1; k < n; k++) - tmp += a[k][j] * x[k]; - x[j] = (a[n][j] - tmp) / a[j][j]; - } - return (x); - }; - - // GREAT THANKS to Tom Alexander! - // https://github.com/Tom-Alexander/regression-js - var methods = { - linear: function (data) { - var sum = [0, 0, 0, 0, 0], n = 0, results = []; - - for (; n < data.length; n++) { - if (data[n][1]) { - sum[0] += data[n][0]; - sum[1] += data[n][1]; - sum[2] += data[n][0] * data[n][0]; - sum[3] += data[n][0] * data[n][1]; - sum[4] += data[n][1] * data[n][1]; - } - } - - var gradient = (n * sum[3] - sum[0] * sum[1]) / (n * sum[2] - sum[0] * sum[0]); - - gradient = isNaN(gradient) ? 0 : gradient; - - var intercept = (sum[1] / n) - (gradient * sum[0]) / n; - // var correlation = (n * sum[3] - sum[0] * sum[1]) / Math.sqrt((n * sum[2] - sum[0] * sum[0]) * (n * sum[4] - sum[1] * sum[1])); - - for (var i = 0, len = data.length; i < len; i++) { - var coordinate = [data[i][0], data[i][0] * gradient + intercept]; - results.push(coordinate); - } - - var string = 'y = ' + Math.round(gradient * 100) / 100 + 'x + ' + Math.round(intercept * 100) / 100; - - return {equation: [gradient, intercept], points: results, string: string}; - }, - - exponential: function (data) { - var sum = [0, 0, 0, 0, 0, 0], n = 0, results = []; - - for (len = data.length; n < len; n++) { - if (data[n][1]) { - sum[0] += data[n][0]; - sum[1] += data[n][1]; - sum[2] += data[n][0] * data[n][0] * data[n][1]; - sum[3] += data[n][1] * Math.log(data[n][1]); - sum[4] += data[n][0] * data[n][1] * Math.log(data[n][1]); - sum[5] += data[n][0] * data[n][1]; - } - } - - var denominator = (sum[1] * sum[2] - sum[5] * sum[5]); - var A = Math.pow(Math.E, (sum[2] * sum[3] - sum[5] * sum[4]) / denominator); - var B = (sum[1] * sum[4] - sum[5] * sum[3]) / denominator; - - for (var i = 0, len = data.length; i < len; i++) { - var coordinate = [data[i][0], A * Math.pow(Math.E, B * data[i][0])]; - results.push(coordinate); - } - - var string = 'y = ' + Math.round(A * 100) / 100 + 'e^(' + Math.round(B * 100) / 100 + 'x)'; - - return {equation: [A, B], points: results, string: string}; - }, - - logarithmic: function (data) { - var sum = [0, 0, 0, 0], n = 0, results = []; - - for (len = data.length; n < len; n++) { - if (data[n][1]) { - sum[0] += Math.log(data[n][0]); - sum[1] += data[n][1] * Math.log(data[n][0]); - sum[2] += data[n][1]; - sum[3] += Math.pow(Math.log(data[n][0]), 2); - } - } - - var B = (n * sum[1] - sum[2] * sum[0]) / (n * sum[3] - sum[0] * sum[0]); - var A = (sum[2] - B * sum[0]) / n; - - for (var i = 0, len = data.length; i < len; i++) { - var coordinate = [data[i][0], A + B * Math.log(data[i][0])]; - results.push(coordinate); - } - - var string = 'y = ' + Math.round(A * 100) / 100 + ' + ' + Math.round(B * 100) / 100 + ' ln(x)'; - - return {equation: [A, B], points: results, string: string}; - }, - - power: function (data) { - var sum = [0, 0, 0, 0], n = 0, results = []; - - for (len = data.length; n < len; n++) { - if (data[n][1]) { - sum[0] += Math.log(data[n][0]); - sum[1] += Math.log(data[n][1]) * Math.log(data[n][0]); - sum[2] += Math.log(data[n][1]); - sum[3] += Math.pow(Math.log(data[n][0]), 2); - } - } - - var B = (n * sum[1] - sum[2] * sum[0]) / (n * sum[3] - sum[0] * sum[0]); - var A = Math.pow(Math.E, (sum[2] - B * sum[0]) / n); - - for (var i = 0, len = data.length; i < len; i++) { - var coordinate = [data[i][0], A * Math.pow(data[i][0], B)]; - results.push(coordinate); - } - - var string = 'y = ' + Math.round(A * 100) / 100 + 'x^' + Math.round(B * 100) / 100; - - return {equation: [A, B], points: results, string: string}; - }, - - polynomial: function (data, order) { - if (typeof order == 'undefined') { - order = 2; - } - var lhs = [], rhs = [], results = [], a = 0, b = 0, i = 0, k = order + 1; - - for (; i < k; i++) { - for (var l = 0, len = data.length; l < len; l++) { - if (data[l][1]) { - a += Math.pow(data[l][0], i) * data[l][1]; - } - } - lhs.push(a), a = 0; - var c = []; - for (var j = 0; j < k; j++) { - for (var l = 0, len = data.length; l < len; l++) { - if (data[l][1]) { - b += Math.pow(data[l][0], i + j); - } - } - c.push(b), b = 0; - } - rhs.push(c); - } - rhs.push(lhs); - - var equation = gaussianElimination(rhs, k); - - for (var i = 0, len = data.length; i < len; i++) { - var answer = 0; - for (var w = 0; w < equation.length; w++) { - answer += equation[w] * Math.pow(data[i][0], w); - } - results.push([data[i][0], answer]); - } - - var string = 'y = '; - - for (var i = equation.length - 1; i >= 0; i--) { - if (i > 1) string += Math.round(equation[i] * 100) / 100 + 'x^' + i + ' + '; - else if (i == 1) string += Math.round(equation[i] * 100) / 100 + 'x' + ' + '; - else string += Math.round(equation[i] * 100) / 100; - } - - return {equation: equation, points: results, string: string}; - }, - - lastvalue: function (data) { - var results = []; - var lastvalue = null; - for (var i = 0; i < data.length; i++) { - if (data[i][1]) { - lastvalue = data[i][1]; - results.push([data[i][0], data[i][1]]); - } - else { - results.push([data[i][0], lastvalue]); - } - } - - return {equation: [lastvalue], points: results, string: "" + lastvalue}; - }, - - loess: function (data) { - //adapted from the LoessInterpolator in org.apache.commons.math - function loess_pairs(pairs, bandwidth) { - var xval = pairs.map(function (pair) { - return pair[0] - }); - var yval = pairs.map(function (pair) { - return pair[1] - }); - var res = loess(xval, yval, bandwidth); - return xval.map(function (x, i) { - return [x, res[i]]; - }); - } - - function loess(xval, yval, bandwidth) { - function tricube(x) { - var tmp = 1 - x * x * x; - return tmp * tmp * tmp; - } - - var res = []; - - var left = 0; - var right = Math.floor(bandwidth * xval.length) - 1; - - for (var i = 0; i < xval.length; i++) { - - var x = xval[i]; - - if (i > 0) { - if (right < xval.length - 1 && - xval[right + 1] - xval[i] < xval[i] - xval[left]) { - left++; - right++; - } - } - - var edge; - if (xval[i] - xval[left] > xval[right] - xval[i]) - edge = left; - else - edge = right; - - var denom = Math.abs(1.0 / (xval[edge] - x)); - - var sumWeights = 0; - var sumX = 0, sumXSquared = 0, sumY = 0, sumXY = 0; - - var k = left; - while (k <= right) { - var xk = xval[k]; - var yk = yval[k]; - var dist; - if (k < i) { - dist = (x - xk); - } else { - dist = (xk - x); - } - var w = tricube(dist * denom); - var xkw = xk * w; - sumWeights += w; - sumX += xkw; - sumXSquared += xk * xkw; - sumY += yk * w; - sumXY += yk * xkw; - k++; - } - - var meanX = sumX / sumWeights; - var meanY = sumY / sumWeights; - var meanXY = sumXY / sumWeights; - var meanXSquared = sumXSquared / sumWeights; - - var beta; - if (meanXSquared == meanX * meanX) - beta = 0; - else - beta = (meanXY - meanX * meanY) / (meanXSquared - meanX * meanX); - - var alpha = meanY - beta * meanX; - - res[i] = beta * x + alpha; - } - - return res; - } - - return { - equation: 'loess', - points: loess_pairs(data, 0.5), - string: 'loess' - }; - } - }; - - return (function (method, data, order) { - if (typeof method == 'string') { - return methods[method](data, order); - } - }); - }()); - // jscs:enable - var utils = tauCharts.api.utils; - var d3 = tauCharts.api.d3; - - function trendline(xSettings) { - - var settings = utils.defaults( - xSettings || {}, - { - type: 'linear', - hideError: false, - showPanel: true, - showTrend: true, - models: ['linear', 'exponential', 'logarithmic'] - }); - - return { - - init: function (chart) { - - this._chart = chart; - this._applicableElements = [ - 'ELEMENT.POINT', - 'ELEMENT.LINE', - 'ELEMENT.AREA', - 'ELEMENT.INTERVAL' - ]; - - this._isApplicable = this.checkIfApplicable(chart); - - if (settings.showPanel) { - - this._container = chart.insertToRightSidebar(this.containerTemplate); - - var classToAdd = 'applicable-true'; - if (!this._isApplicable) { - classToAdd = 'applicable-false'; - this._error = [ - 'Trend line can\'t be computed for categorical data.', - 'Each axis should be either a measure or a date.' - ].join(' '); - } - - this._container.classList.add(classToAdd); - - if (settings.hideError) { - this._container - .classList - .add('hide-trendline-error'); - } - - this.uiChangeEventsDispatcher = function (e) { - - var target = e.target; - var selector = target.classList; - - if (selector.contains('i-role-show-trend')) { - settings.showTrend = target.checked; - } - - if (selector.contains('i-role-change-model')) { - settings.type = target.value; - } - - this._chart.refresh(); - - }.bind(this); - - this._container - .addEventListener('change', this.uiChangeEventsDispatcher, false); - } - }, - - checkIfApplicable: function (chart) { - - var self = this; - var specRef = chart.getSpec(); - var isApplicable = false; - - chart.traverseSpec(specRef, function (unit, parentUnit) { - if (self.predicateIsApplicable(specRef, unit, parentUnit)) { - isApplicable = true; - } - }); - - return isApplicable; - }, - - predicateIsApplicable: function (specRef, unit, parentUnit) { - - if (parentUnit && parentUnit.type !== 'COORDS.RECT') { - return false; - } - - if (parentUnit && !parentUnit.units) { - return false; - } - - if ((this._applicableElements.indexOf(unit.type) === -1) || (unit.stack)) { - return false; - } - - var xScale = specRef.scales[unit.x]; - var yScale = specRef.scales[unit.y]; - - return !(xScale.type === 'ordinal' || yScale.type === 'ordinal'); - }, - - onSpecReady: function (chart, specRef) { - - var self = this; - - if (!settings.showTrend) { - return; - } - - var periodGenerator = tauCharts.api.tickPeriod; - var createPeriodCaster = function (period) { - var gen = periodGenerator.get(period, {utc: specRef.settings.utcTime}); - return function (x) { - return gen.cast(new Date(x)); - }; - }; - - specRef.transformations = specRef.transformations || {}; - specRef.transformations.regression = function (data, props) { - - var x = props.x.dim; - var y = props.y.dim; - var g = props.g.dim; - - var isXPeriod = (props.x.type === 'period' && props.x.period); - var isYPeriod = (props.y.type === 'period' && props.y.period); - - var xMapper = isXPeriod ? - (createPeriodCaster(props.x.period)) : - (function (x) { - return x; - }); - - var yMapper = isYPeriod ? - (createPeriodCaster(props.y.period)) : - (function (x) { - return x; - }); - - var src = data.map(function (item) { - var ix = utils.isDate(item[x]) ? item[x].getTime() : item[x]; - var iy = utils.isDate(item[y]) ? item[y].getTime() : item[y]; - var ig = item[g]; - return [ix, iy, ig]; - }); - - var groups = utils.groupBy(src, function(x) { - return x['2']; - }); - return Object.keys(groups).reduce( - function (memo, k) { - var fiber = groups[k]; - var regression = regressionsHub(props.type, fiber); - var points = regression.points - .filter(function (p) { - return ((p[0] !== null) && (p[1] !== null)); - }) - .sort(function (p1, p2) { - return p1[0] - p2[0]; - }) - .map(function (p) { - var item = {}; - item[x] = xMapper(p[0]); - item[y] = yMapper(p[1]); - - if (g) { - item[g] = k; - } - - return item; - }); - - if ((points.length > 1) && (isXPeriod || isYPeriod)) { - points = [points[0], points[points.length - 1]]; - } - - return memo.concat(points.length > 1 ? points : []); - }, - []); - }; - - chart.traverseSpec( - specRef, - function (unit, parentUnit) { - - if (!self.predicateIsApplicable(specRef, unit, parentUnit)) { - return; - } - - var xScale = specRef.scales[unit.x]; - var yScale = specRef.scales[unit.y]; - var colorScale = specRef.scales[unit.color] || {}; - - var trend = JSON.parse(JSON.stringify(unit)); - - trend.type = 'ELEMENT.LINE'; - trend.size = 'size_null'; - trend.namespace = 'trendline'; - trend.transformation = trend.transformation || []; - trend.transformation.push({ - type: 'regression', - args: { - type: settings.type, - x: xScale, - y: yScale, - g: colorScale - } - }); - // var basicGuide = {interpolate: 'basis'}; - var basicGuide = {}; - trend.guide = utils.defaults(basicGuide, trend.guide || {}); - trend.guide.interpolate = 'linear'; - trend.guide.showAnchors = 'never'; - trend.guide.cssClass = 'graphical-report__trendline'; - trend.guide.widthCssClass = 'graphical-report__line-width-1'; - delete trend.guide.label; - delete trend.label; - - parentUnit.units.push(trend); - }); - }, - - // jscs:disable maximumLineLength - containerTemplate: '
', - template: utils.template([ - '', - - '
', - '', - '
', - - '
<%= error %>
' - ].join('')), - // jscs:enable maximumLineLength - - onRender: function (chart) { - - if (this._container) { - this._container.innerHTML = this.template({ - title: 'Trend line', - error: this._error, - showTrend: (settings.showTrend && this._isApplicable) ? 'checked' : '', - models: settings.models.map(function (x) { - var selected = (settings.type === x) ? 'selected' : ''; - return ''; - }) - }); - - var handleMouse = function (isActive) { - return function () { - d3 - .select(this) - .classed({ - active: isActive, - 'graphical-report__line-width-1': !isActive, - 'graphical-report__line-width-3': isActive - }); - }; - }; - - var canv = d3.select(chart.getSVG()); - canv.selectAll('.graphical-report__trendline') - .on('mouseenter', handleMouse(true)) - .on('mouseleave', handleMouse(false)); - } - } - }; - } - - tauCharts.api.plugins.add('trendline', trendline); - - return trendline; -}); \ No newline at end of file diff --git a/build/development/tauCharts.color-brewer.js b/build/development/tauCharts.color-brewer.js deleted file mode 100644 index 9320f8ec8..000000000 --- a/build/development/tauCharts.color-brewer.js +++ /dev/null @@ -1,324 +0,0 @@ -(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/development/tauCharts.js b/build/development/tauCharts.js deleted file mode 100644 index 3ee158b0b..000000000 --- a/build/development/tauCharts.js +++ /dev/null @@ -1,18077 +0,0 @@ -/*! taucharts - v1.2.2 - 2017-06-01 -* https://github.com/TargetProcess/tauCharts -* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */ -(function webpackUniversalModuleDefinition(root, factory) { - if(typeof exports === 'object' && typeof module === 'object') - module.exports = factory(require("d3")); - else if(typeof define === 'function' && define.amd) - define(["d3"], factory); - else if(typeof exports === 'object') - exports["tauCharts"] = factory(require("d3")); - else - root["tauCharts"] = factory(root["d3"]); -})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.version = exports.api = exports.__api__ = exports.Chart = exports.Plot = exports.GPL = undefined; - - var _utilsDom = __webpack_require__(1); - - var _utils = __webpack_require__(3); - - var _utilsDraw = __webpack_require__(10); - - var _tau = __webpack_require__(16); - - var _tau2 = __webpack_require__(20); - - var _tau3 = __webpack_require__(38); - - var _unitDomainPeriodGenerator = __webpack_require__(18); - - var _formatterRegistry = __webpack_require__(32); - - var _unitsRegistry = __webpack_require__(25); - - var _scalesRegistry = __webpack_require__(26); - - var _grammarRegistry = __webpack_require__(7); - - var _coords = __webpack_require__(40); - - var _coords2 = __webpack_require__(41); - - var _coords3 = __webpack_require__(42); - - var _elementGeneric = __webpack_require__(4); - - var _element = __webpack_require__(45); - - var _element2 = __webpack_require__(51); - - var _element3 = __webpack_require__(55); - - var _element4 = __webpack_require__(56); - - var _element5 = __webpack_require__(59); - - var _elementParallel = __webpack_require__(60); - - var _identity = __webpack_require__(61); - - var _color = __webpack_require__(63); - - var _size = __webpack_require__(64); - - var _ordinal = __webpack_require__(65); - - var _period = __webpack_require__(66); - - var _time = __webpack_require__(67); - - var _linear = __webpack_require__(68); - - var _logarithmic = __webpack_require__(69); - - var _value = __webpack_require__(70); - - var _fill = __webpack_require__(71); - - var _chartAliasRegistry = __webpack_require__(39); - - var _chartMap = __webpack_require__(72); - - var _chartInterval = __webpack_require__(73); - - var _chartScatterplot = __webpack_require__(75); - - var _chartLine = __webpack_require__(76); - - var _chartArea = __webpack_require__(77); - - var _chartParallel = __webpack_require__(78); - - var _d3Decorators = __webpack_require__(9); - - var _error = __webpack_require__(8); - - var _pluginsSdk = __webpack_require__(79); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - __webpack_require__(82); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - var colorBrewers = {}; - var plugins = {}; - - var __api__ = { - UnitDomainPeriodGenerator: _unitDomainPeriodGenerator.UnitDomainPeriodGenerator - }; - - var api = { - errorCodes: _error.errorCodes, - unitsRegistry: _unitsRegistry.unitsRegistry, - scalesRegistry: _scalesRegistry.scalesRegistry, - grammarRegistry: _grammarRegistry.GrammarRegistry, - tickFormat: _formatterRegistry.FormatterRegistry, - isChartElement: _utils.utils.isChartElement, - d3: _d2.default, - utils: _utils.utils, - svgUtils: _utilsDraw.utilsDraw, - tickPeriod: _unitDomainPeriodGenerator.UnitDomainPeriodGenerator, - colorBrewers: { - add: function add(name, brewer) { - if (!(name in colorBrewers)) { - colorBrewers[name] = brewer; - } - }, - get: function get(name) { - return colorBrewers[name]; - } - }, - d3_animationInterceptor: _d3Decorators.d3_animationInterceptor, - pluginsSDK: _pluginsSdk.PluginsSDK, - plugins: { - add: function add(name, brewer) { - if (!(name in plugins)) { - plugins[name] = brewer; - } else { - throw new Error('Plugin is already registered.'); - } - }, - get: function get(name) { - return plugins[name] || function (x) { - throw new Error(x + ' plugin is not defined'); - }; - } - }, - globalSettings: { - - animationSpeed: 750, - renderingTimeout: 10000, - asyncRendering: false, - syncRenderingInterval: 50, - syncPointerEvents: false, - handleRenderingErrors: true, - experimentalShouldAnimate: function experimentalShouldAnimate(spec) { - var createSvg = function createSvg(tag, attrs) { - var el = document.createElementNS('http://www.w3.org/2000/svg', tag); - Object.keys(attrs).forEach(function (k) { - return el.setAttribute(k, String(attrs[k])); - }); - return el; - }; - var div = document.createElement('div'); - div.style.position = 'absolute'; - div.style.visibility = 'hidden'; - document.body.appendChild(div); - var svg = createSvg('svg', { - width: 100, - height: 100 - }); - div.appendChild(svg); - var start = performance.now(); - var i, j, c; - for (i = 0, j, c; i < 10; i++) { - for (j = 0; j < 10; j++) { - c = createSvg('circle', { - fill: 'black', - r: 5, - cx: i * 10, - cy: j * 10 - }); - svg.appendChild(c); - } - } - var duration = performance.now() - start; - document.body.removeChild(div); - return spec.sources['/'].data.length * duration < 500; - }, - - defaultNiceColor: true, - - // jscs:disable - defaultColorBrewer: ["#fde725", "#fbe723", "#f8e621", "#f6e620", "#f4e61e", "#f1e51d", "#efe51c", "#ece51b", "#eae51a", "#e7e419", "#e5e419", "#e2e418", "#dfe318", "#dde318", "#dae319", "#d8e219", "#d5e21a", "#d2e21b", "#d0e11c", "#cde11d", "#cae11f", "#c8e020", "#c5e021", "#c2df23", "#c0df25", "#bddf26", "#bade28", "#b8de29", "#b5de2b", "#b2dd2d", "#b0dd2f", "#addc30", "#aadc32", "#a8db34", "#a5db36", "#a2da37", "#a0da39", "#9dd93b", "#9bd93c", "#98d83e", "#95d840", "#93d741", "#90d743", "#8ed645", "#8bd646", "#89d548", "#86d549", "#84d44b", "#81d34d", "#7fd34e", "#7cd250", "#7ad151", "#77d153", "#75d054", "#73d056", "#70cf57", "#6ece58", "#6ccd5a", "#69cd5b", "#67cc5c", "#65cb5e", "#63cb5f", "#60ca60", "#5ec962", "#5cc863", "#5ac864", "#58c765", "#56c667", "#54c568", "#52c569", "#50c46a", "#4ec36b", "#4cc26c", "#4ac16d", "#48c16e", "#46c06f", "#44bf70", "#42be71", "#40bd72", "#3fbc73", "#3dbc74", "#3bbb75", "#3aba76", "#38b977", "#37b878", "#35b779", "#34b679", "#32b67a", "#31b57b", "#2fb47c", "#2eb37c", "#2db27d", "#2cb17e", "#2ab07f", "#29af7f", "#28ae80", "#27ad81", "#26ad81", "#25ac82", "#25ab82", "#24aa83", "#23a983", "#22a884", "#22a785", "#21a685", "#21a585", "#20a486", "#20a386", "#1fa287", "#1fa187", "#1fa188", "#1fa088", "#1f9f88", "#1f9e89", "#1e9d89", "#1e9c89", "#1e9b8a", "#1f9a8a", "#1f998a", "#1f988b", "#1f978b", "#1f968b", "#1f958b", "#1f948c", "#20938c", "#20928c", "#20928c", "#21918c", "#21908d", "#218f8d", "#218e8d", "#228d8d", "#228c8d", "#228b8d", "#238a8d", "#23898e", "#23888e", "#24878e", "#24868e", "#25858e", "#25848e", "#25838e", "#26828e", "#26828e", "#26818e", "#27808e", "#277f8e", "#277e8e", "#287d8e", "#287c8e", "#297b8e", "#297a8e", "#29798e", "#2a788e", "#2a778e", "#2a768e", "#2b758e", "#2b748e", "#2c738e", "#2c728e", "#2c718e", "#2d718e", "#2d708e", "#2e6f8e", "#2e6e8e", "#2e6d8e", "#2f6c8e", "#2f6b8e", "#306a8e", "#30698e", "#31688e", "#31678e", "#31668e", "#32658e", "#32648e", "#33638d", "#33628d", "#34618d", "#34608d", "#355f8d", "#355e8d", "#365d8d", "#365c8d", "#375b8d", "#375a8c", "#38598c", "#38588c", "#39568c", "#39558c", "#3a548c", "#3a538b", "#3b528b", "#3b518b", "#3c508b", "#3c4f8a", "#3d4e8a", "#3d4d8a", "#3e4c8a", "#3e4a89", "#3e4989", "#3f4889", "#3f4788", "#404688", "#404588", "#414487", "#414287", "#424186", "#424086", "#423f85", "#433e85", "#433d84", "#443b84", "#443a83", "#443983", "#453882", "#453781", "#453581", "#463480", "#46337f", "#46327e", "#46307e", "#472f7d", "#472e7c", "#472d7b", "#472c7a", "#472a7a", "#482979", "#482878", "#482677", "#482576", "#482475", "#482374", "#482173", "#482071", "#481f70", "#481d6f", "#481c6e", "#481b6d", "#481a6c", "#48186a", "#481769", "#481668", "#481467", "#471365", "#471164", "#471063", "#470e61", "#470d60", "#460b5e", "#460a5d", "#46085c", "#46075a", "#450559", "#450457", "#440256", "#440154"], - // jscs:enable - - defaultClassBrewer: _utils.utils.range(20).map(function (i) { - return 'color20-' + (1 + i); - }), - - log: function log(msg, type) { - type = type || 'INFO'; - if (!Array.isArray(msg)) { - msg = [msg]; - } - console[type.toLowerCase()].apply(console, msg); // eslint-disable-line - }, - - facetLabelDelimiter: ' \u2192 ', - excludeNull: true, - minChartWidth: 300, - minChartHeight: 200, - minFacetWidth: 150, - minFacetHeight: 100, - specEngine: [{ - name: 'COMPACT', - width: 600, - height: 400 - }, { - name: 'AUTO', - width: Number.MAX_VALUE, - height: Number.MAX_VALUE - }], - - fitModel: 'normal', - layoutEngine: 'EXTRACT', - autoRatio: true, - defaultSourceMap: ['https://raw.githubusercontent.com', 'TargetProcess/tauCharts/master/src/addons', 'world-countries.json'].join('/'), - - getAxisTickLabelSize: _utils.utils.memoize(_utilsDom.utilsDom.getAxisTickLabelSize, function (text) { - return String(text).length; - }), - - getScrollbarSize: _utilsDom.utilsDom.getScrollbarSize, - - avoidScrollAtRatio: 1.5, - - xAxisTickLabelLimit: 150, - yAxisTickLabelLimit: 150, - - xTickWordWrapLinesLimit: 2, - yTickWordWrapLinesLimit: 2, - - xTickWidth: 6 + 3, - yTickWidth: 6 + 3, - - distToXAxisLabel: 10, - distToYAxisLabel: 10, - - xAxisPadding: 20, - yAxisPadding: 20, - - xFontLabelDescenderLineHeight: 4, - xFontLabelHeight: 10, - yFontLabelHeight: 10, - - xDensityPadding: 2, - yDensityPadding: 2, - 'xDensityPadding:measure': 8, - 'yDensityPadding:measure': 8, - - utcTime: false, - - defaultFormats: { - measure: 'x-num-auto', - 'measure:time': 'x-time-auto' - } - } - }; - - _tau2.Plot.__api__ = api; - _tau2.Plot.globalSettings = api.globalSettings; - - [['COORDS.RECT', _coords.Cartesian], ['COORDS.MAP', _coords3.GeoMap], ['COORDS.PARALLEL', _coords2.Parallel], ['ELEMENT.GENERIC.CARTESIAN', _elementGeneric.GenericCartesian], ['ELEMENT.POINT', _element.Point, 'ELEMENT.GENERIC.CARTESIAN'], ['ELEMENT.LINE', _element4.Line, 'ELEMENT.GENERIC.CARTESIAN'], ['ELEMENT.PATH', _element3.Path, 'ELEMENT.GENERIC.CARTESIAN'], ['ELEMENT.AREA', _element2.Area, 'ELEMENT.GENERIC.CARTESIAN'], ['ELEMENT.INTERVAL', _element5.Interval, 'ELEMENT.GENERIC.CARTESIAN'], ['ELEMENT.INTERVAL.STACKED', _element5.Interval, 'ELEMENT.GENERIC.CARTESIAN'], ['PARALLEL/ELEMENT.LINE', _elementParallel.ParallelLine]].reduce(function (memo, nv) { - return memo.reg.apply(memo, _toConsumableArray(nv)); - }, api.unitsRegistry); - - [['identity', _identity.IdentityScale, function (config, settings) { - return _utils.utils.defaults(config, { - references: settings.references, - refCounter: settings.refCounter - }); - }], ['color', _color.ColorScale, function (config, settings) { - return _utils.utils.defaults(config, { - nice: settings.defaultNiceColor, - brewer: config.dimType === 'measure' ? settings.defaultColorBrewer : settings.defaultClassBrewer - }); - }], ['fill', _fill.FillScale], ['size', _size.SizeScale], ['ordinal', _ordinal.OrdinalScale], ['period', _period.PeriodScale, function (config, settings) { - return _utils.utils.defaults(config, { - utcTime: settings.utcTime - }); - }], ['time', _time.TimeScale, function (config, settings) { - return _utils.utils.defaults(config, { - utcTime: settings.utcTime - }); - }], ['linear', _linear.LinearScale], ['logarithmic', _logarithmic.LogarithmicScale], ['value', _value.ValueScale]].reduce(function (memo, nv) { - return memo.reg.apply(memo, _toConsumableArray(nv)); - }, api.scalesRegistry); - - var commonRules = [function (config) { - return !config.data ? ['[data] must be specified'] : []; - }]; - - api.chartTypesRegistry = _chartAliasRegistry.chartTypesRegistry.add('scatterplot', _chartScatterplot.ChartScatterplot, commonRules).add('line', _chartLine.ChartLine, commonRules).add('area', _chartArea.ChartArea, commonRules).add('stacked-area', function (cfg) { - return (0, _chartArea.ChartArea)(_utils.utils.defaults(cfg, { stack: true })); - }, commonRules).add('bar', function (cfg) { - return (0, _chartInterval.ChartInterval)(_utils.utils.defaults(cfg, { flip: false })); - }, commonRules).add('horizontalBar', function (cfg) { - return (0, _chartInterval.ChartInterval)(_utils.utils.defaults({ flip: true }, cfg)); - }, commonRules).add('horizontal-bar', function (cfg) { - return (0, _chartInterval.ChartInterval)(_utils.utils.defaults({ flip: true }, cfg)); - }, commonRules).add('stacked-bar', function (cfg) { - return (0, _chartInterval.ChartInterval)(_utils.utils.defaults({ flip: false, stack: true }, cfg)); - }, commonRules).add('horizontal-stacked-bar', function (cfg) { - return (0, _chartInterval.ChartInterval)(_utils.utils.defaults({ flip: true, stack: true }, cfg)); - }, commonRules).add('map', _chartMap.ChartMap, commonRules.concat([function (config) { - var shouldSpecifyFillWithCode = config.fill && config.code; - if (config.fill && !shouldSpecifyFillWithCode) { - return '[code] must be specified when using [fill]'; - } - }, function (config) { - var shouldSpecifyBothLatLong = config.latitude && config.longitude; - if ((config.latitude || config.longitude) && !shouldSpecifyBothLatLong) { - return '[latitude] and [longitude] both must be specified'; - } - }])).add('parallel', _chartParallel.ChartParallel, commonRules.concat([function (config) { - var shouldSpecifyColumns = config.columns && config.columns.length > 1; - if (!shouldSpecifyColumns) { - return '[columns] property must contain at least 2 dimensions'; - } - }])); - - /* global VERSION:false */ - var version = ("1.2.2"); - exports.GPL = _tau.GPL; - exports.Plot = _tau2.Plot; - exports.Chart = _tau3.Chart; - exports.__api__ = __api__; - exports.api = api; - exports.version = version; - exports.default = { GPL: _tau.GPL, Plot: _tau2.Plot, Chart: _tau3.Chart, __api__: __api__, api: api, version: version }; - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.utilsDom = undefined; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /** - * Internal method to return CSS value for given element and property - */ - - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _utils = __webpack_require__(3); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - var tempDiv = document.createElement('div'); - - var scrollbarSizes = new WeakMap(); - - var utilsDom = { - appendTo: function appendTo(el, container) { - var node; - if (el instanceof Node) { - node = el; - } else { - tempDiv.insertAdjacentHTML('afterbegin', el); - node = tempDiv.childNodes[0]; - } - container.appendChild(node); - return node; - }, - getScrollbarSize: function getScrollbarSize(container) { - if (scrollbarSizes.has(container)) { - return scrollbarSizes.get(container); - } - var initialOverflow = container.style.overflow; - container.style.overflow = 'scroll'; - var size = { - width: container.offsetWidth - container.clientWidth, - height: container.offsetHeight - container.clientHeight - }; - container.style.overflow = initialOverflow; - scrollbarSizes.set(container, size); - return size; - }, - - /** - * Sets padding as a placeholder for scrollbars. - * @param el Target element. - * @param [direction=both] Scrollbar direction ("horizontal", "vertical" or "both"). - */ - setScrollPadding: function setScrollPadding(el, direction) { - direction = direction || 'both'; - var isBottom = direction === 'horizontal' || direction === 'both'; - var isRight = direction === 'vertical' || direction === 'both'; - - var scrollbars = utilsDom.getScrollbarSize(el); - var initialPaddingRight = isRight ? scrollbars.width + 'px' : '0'; - var initialPaddingBottom = isBottom ? scrollbars.height + 'px' : '0'; - el.style.overflow = 'hidden'; - el.style.padding = '0 ' + initialPaddingRight + ' ' + initialPaddingBottom + ' 0'; - - var hasBottomScroll = el.scrollWidth > el.clientWidth; - var hasRightScroll = el.scrollHeight > el.clientHeight; - var paddingRight = isRight && !hasRightScroll ? scrollbars.width + 'px' : '0'; - var paddingBottom = isBottom && !hasBottomScroll ? scrollbars.height + 'px' : '0'; - el.style.padding = '0 ' + paddingRight + ' ' + paddingBottom + ' 0'; - - // NOTE: Manually set scroll due to overflow:auto Chrome 53 bug - // https://bugs.chromium.org/p/chromium/issues/detail?id=644450 - el.style.overflow = ''; - el.style.overflowX = hasBottomScroll ? 'scroll' : 'hidden'; - el.style.overflowY = hasRightScroll ? 'scroll' : 'hidden'; - - return scrollbars; - }, - - getStyle: function getStyle(el, prop) { - return window.getComputedStyle(el, undefined).getPropertyValue(prop); - }, - - getStyleAsNum: function getStyleAsNum(el, prop) { - return parseInt(this.getStyle(el, prop) || 0, 10); - }, - - getContainerSize: function getContainerSize(el) { - 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 = 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; - - var rect = el.getBoundingClientRect(); - - return { - width: rect.width - pl - pr - 2 * bw, - height: rect.height - pb - pt - 2 * bw - }; - }, - - getAxisTickLabelSize: function getAxisTickLabelSize(text) { - var div = document.createElement('div'); - div.style.position = 'absolute'; - div.style.visibility = 'hidden'; - div.style.width = '100px'; - div.style.height = '100px'; - div.style.border = '1px solid green'; - div.style.top = '0'; - document.body.appendChild(div); - - div.innerHTML = '\n \n \n ' + text + '\n \n \n '; - - var textNode = _d2.default.select(div).selectAll('.x.axis .tick text')[0][0]; - - var size = { - width: 0, - height: 0 - }; - - // Internet Explorer, Firefox 3+, Google Chrome, Opera 9.5+, Safari 4+ - var rect = textNode.getBoundingClientRect(); - size.width = rect.right - rect.left; - size.height = rect.bottom - rect.top; - - var avgLetterSize = text.length !== 0 ? size.width / text.length : 0; - size.width = size.width + 1.5 * avgLetterSize; - - document.body.removeChild(div); - - return size; - }, - - getLabelSize: function getLabelSize(text, _ref) { - var fontSize = _ref.fontSize, - fontFamily = _ref.fontFamily, - fontWeight = _ref.fontWeight; - - - var xFontSize = typeof fontSize === 'string' ? fontSize : fontSize + 'px'; - var w = 0; - var h = 0; - var l = text.length - 1; - for (var i = 0; i <= l; i++) { - var char = text.charAt(i); - var s = utilsDom.getCharSize(char, { fontSize: xFontSize, fontFamily: fontFamily, fontWeight: fontWeight }); - w += s.width; - h = Math.max(h, s.height); - } - - return { width: w, height: parseInt(xFontSize) }; - }, - - getCharSize: _utils.utils.memoize(function (char, _ref2) { - var fontSize = _ref2.fontSize, - fontFamily = _ref2.fontFamily, - fontWeight = _ref2.fontWeight; - - - var div = document.createElement('div'); - div.style.position = 'absolute'; - div.style.visibility = 'hidden'; - div.style.border = '0px'; - div.style.top = '0'; - div.style.fontSize = fontSize; - div.style.fontFamily = fontFamily; - div.style.fontWeight = fontWeight; - - document.body.appendChild(div); - - div.innerHTML = char === ' ' ? ' ' : char; - - var size = { - width: 0, - height: 0 - }; - - // Internet Explorer, Firefox 3+, Google Chrome, Opera 9.5+, Safari 4+ - var rect = div.getBoundingClientRect(); - size.width = rect.right - rect.left; - size.height = rect.bottom - rect.top; - - document.body.removeChild(div); - - return size; - }, function (char, props) { - return char + '_' + JSON.stringify(props); - }), - - /** - * Searches for immediate child element by specified selector. - * If missing, creates an element that matches the selector. - */ - selectOrAppend: function selectOrAppend(container, selector) { - var delimitersActions = { - '.': function _(text, el) { - return el.classed(text, true); - }, - '#': function _(text, el) { - return el.attr('id', text); - } - }; - var delimiters = Object.keys(delimitersActions).join(''); - - if (selector.indexOf(' ') >= 0) { - throw new Error('Selector should not contain whitespaces.'); - } - if (delimiters.indexOf(selector[0]) >= 0) { - throw new Error('Selector must have tag at the beginning.'); - } - - var isElement = container instanceof Element; - if (isElement) { - container = _d2.default.select(container); - } - var result = function result(d3El) { - return isElement ? d3El.node() : d3El; - }; - - // Search for existing immediate child - var child = container.selectAll(selector).filter(function () { - return this.parentNode === container.node(); - }).filter(function (d, i) { - return i === 0; - }); - if (!child.empty()) { - return result(child); - } - - // Create new element - var element; - var lastFoundIndex = -1; - var lastFoundDelimiter = null; - for (var i = 1, l = selector.length, text; i <= l; i++) { - if (i == l || delimiters.indexOf(selector[i]) >= 0) { - text = selector.substring(lastFoundIndex + 1, i); - if (lastFoundIndex < 0) { - element = container.append(text); - } else { - delimitersActions[lastFoundDelimiter].call(null, text, element); - } - lastFoundDelimiter = selector[i]; - lastFoundIndex = i; - } - } - - return result(element); - }, - - selectImmediate: function selectImmediate(container, selector) { - return utilsDom.selectAllImmediate(container, selector)[0] || null; - }, - - selectAllImmediate: function selectAllImmediate(container, selector) { - var results = []; - var matches = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; - for (var child = container.firstElementChild; Boolean(child); child = child.nextElementSibling) { - if (matches.call(child, selector)) { - results.push(child); - } - } - return results; - }, - - sortChildren: function sortChildren(parent, sorter) { - if (parent.childElementCount > 0) { - - // Note: move DOM elements with - // minimal number of iterations - // and affected nodes to prevent - // unneccessary repaints. - - // Get from/to index pairs. - var unsorted = Array.prototype.filter.call(parent.childNodes, function (el) { - return el.nodeType === Node.ELEMENT_NODE; - }); - var sorted = unsorted.slice().sort(sorter); - var unsortedIndices = unsorted.reduce(function (map, el, i) { - map.set(el, i); - return map; - }, new Map()); - - // Get groups (sequences of elements with unchanged order) - var currGroup; - var currDiff; - var groups = sorted.reduce(function (groupsInfo, el, to) { - var from = unsortedIndices.get(el); - var diff = to - from; - if (diff !== currDiff) { - if (currGroup) { - groupsInfo.push(currGroup); - } - currDiff = diff; - currGroup = { - from: from, - to: to, - elements: [] - }; - } - currGroup.elements.push(el); - if (to === sorted.length - 1) { - groupsInfo.push(currGroup); - } - return groupsInfo; - }, []); - var unsortedGroups = groups.slice().sort(function (a, b) { - return a.from - b.from; - }); - var unsortedGroupsIndices = unsortedGroups.reduce(function (map, g, i) { - map.set(g, i); - return map; - }, new Map()); - - // Get required iterations - var createIterations = function createIterations(forward) { - var iterations = groups.map(function (g, i) { - return { - elements: g.elements, - from: unsortedGroupsIndices.get(g), - to: i - }; - }).sort(_utils.utils.createMultiSorter(function (a, b) { - return a.elements.length - b.elements.length; - }, forward ? function (a, b) { - return b.to - a.to; - } : function (a, b) { - return a.to - b.to; - })); - for (var i = 0, j, g, h; i < iterations.length; i++) { - g = iterations[i]; - if (g.from > g.to) { - for (j = i + 1; j < iterations.length; j++) { - h = iterations[j]; - if (h.from >= g.to && h.from < g.from) { - h.from++; - } - } - } - if (g.from < g.to) { - for (j = i + 1; j < iterations.length; j++) { - h = iterations[j]; - if (h.from > g.from && h.from <= g.to) { - h.from--; - } - } - } - } - return iterations.filter(function (g) { - return g.from !== g.to; - }); - }; - var forwardIterations = createIterations(true); - var backwardIterations = createIterations(false); - var iterations = forwardIterations.length < backwardIterations.length ? forwardIterations : backwardIterations; - - // Finally sort DOM nodes - var mirror = unsortedGroups.map(function (g) { - return g.elements; - }); - iterations.forEach(function (g) { - var targetGroup = mirror.splice(g.from, 1)[0]; - var groupAfter = mirror[g.to]; - var siblingAfter = groupAfter ? groupAfter[0] : null; - var targetNode; - if (g.elements.length === 1) { - targetNode = targetGroup[0]; - } else { - targetNode = document.createDocumentFragment(); - targetGroup.forEach(function (el) { - targetNode.appendChild(el); - }); - } - parent.insertBefore(targetNode, siblingAfter); - mirror.splice(g.to, 0, targetGroup); - }); - } - }, - - /** - * Generates "class" attribute string. - */ - classes: function classes() { - var classes = []; - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - args.filter(function (c) { - return Boolean(c); - }).forEach(function (c) { - if (typeof c === 'string') { - classes.push(c); - } else if ((typeof c === 'undefined' ? 'undefined' : _typeof(c)) === 'object') { - classes.push.apply(classes, Object.keys(c).filter(function (key) { - return Boolean(c[key]); - })); - } - }); - return _utils.utils.unique(classes).join(' ').trim().replace(/\s{2,}/g, ' '); - } - }; - // TODO: Export functions separately. - exports.utilsDom = utilsDom; - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - - module.exports = __WEBPACK_EXTERNAL_MODULE_2__; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.utils = undefined; - - var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var _elementGeneric = __webpack_require__(4); - - var _d2 = __webpack_require__(2); - - var _d3 = _interopRequireDefault(_d2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - var traverseJSON = function traverseJSON(srcObject, byProperty, fnSelectorPredicates, funcTransformRules) { - - var rootRef = funcTransformRules(fnSelectorPredicates(srcObject), srcObject); - - (rootRef[byProperty] || []).forEach(function (unit) { - return traverseJSON(unit, byProperty, fnSelectorPredicates, funcTransformRules); - }); - - return rootRef; - }; - - var traverseSpec = function traverseSpec(root, enterFn, exitFn) { - var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - - var shouldContinue = enterFn(root, level); - if (shouldContinue) { - (root.units || []).map(function (rect) { - return traverseSpec(rect, enterFn, exitFn, level + 1); - }); - } - exitFn(root, level); - }; - - var hashGen = 0; - var hashMap = {}; - - var deepClone = function () { - - // clone objects, skip other types. - function clone(target) { - if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) == 'object') { - return JSON.parse(JSON.stringify(target)); - } else { - return target; - } - } - - // Deep Copy - var deepCopiers = []; - - function DeepCopier(config) { - for (var key in config) { - this[key] = config[key]; - } - } - - DeepCopier.prototype = { - constructor: DeepCopier, - - // determines if this DeepCopier can handle the given object. - canCopy: function canCopy(source) { - // eslint-disable-line - return false; - }, - - // starts the deep copying process by creating the copy object. You - // can initialize any properties you want, but you can't call recursively - // into the DeeopCopyAlgorithm. - create: function create(source) {// eslint-disable-line - }, - - // Completes the deep copy of the source object by populating any properties - // that need to be recursively deep copied. You can do this by using the - // provided deepCopyAlgorithm instance's deepCopy() method. This will handle - // cyclic references for objects already deepCopied, including the source object - // itself. The "result" passed in is the object returned from create(). - populate: function populate(deepCopyAlgorithm, source, result) {// eslint-disable-line - } - }; - - function DeepCopyAlgorithm() { - // copiedObjects keeps track of objects already copied by this - // deepCopy operation, so we can correctly handle cyclic references. - this.copiedObjects = []; - var thisPass = this; - this.recursiveDeepCopy = function (source) { - return thisPass.deepCopy(source); - }; - this.depth = 0; - } - - DeepCopyAlgorithm.prototype = { - constructor: DeepCopyAlgorithm, - - maxDepth: 256, - - // add an object to the cache. No attempt is made to filter duplicates; - // we always check getCachedResult() before calling it. - cacheResult: function cacheResult(source, result) { - this.copiedObjects.push([source, result]); - }, - - // Returns the cached copy of a given object, or undefined if it's an - // object we haven't seen before. - getCachedResult: function getCachedResult(source) { - var copiedObjects = this.copiedObjects; - var length = copiedObjects.length; - for (var i = 0; i < length; i++) { - if (copiedObjects[i][0] === source) { - return copiedObjects[i][1]; - } - } - return undefined; - }, - - // deepCopy handles the simple cases itself: non-objects and object's we've seen before. - // For complex cases, it first identifies an appropriate DeepCopier, then calls - // applyDeepCopier() to delegate the details of copying the object to that DeepCopier. - deepCopy: function deepCopy(source) { - // null is a special case: it's the only value of type 'object' without properties. - if (source === null) { - return null; - } - - // All non-objects use value semantics and don't need explict copying. - if ((typeof source === 'undefined' ? 'undefined' : _typeof(source)) !== 'object') { - return source; - } - - var cachedResult = this.getCachedResult(source); - - // we've already seen this object during this deep copy operation - // so can immediately return the result. This preserves the cyclic - // reference structure and protects us from infinite recursion. - if (cachedResult) { - return cachedResult; - } - - // objects may need special handling depending on their class. There is - // a class of handlers call "DeepCopiers" that know how to copy certain - // objects. There is also a final, generic deep copier that can handle any object. - for (var i = 0; i < deepCopiers.length; i++) { - var deepCopier = deepCopiers[i]; - if (deepCopier.canCopy(source)) { - return this.applyDeepCopier(deepCopier, source); - } - } - // the generic copier can handle anything, so we should never reach this line. - throw new Error('no DeepCopier is able to copy ' + source); - }, - - // once we've identified which DeepCopier to use, we need to call it in a very - // particular order: create, cache, populate. This is the key to detecting cycles. - // We also keep track of recursion depth when calling the potentially recursive - // populate(): this is a fail-fast to prevent an infinite loop from consuming all - // available memory and crashing or slowing down the browser. - applyDeepCopier: function applyDeepCopier(deepCopier, source) { - // Start by creating a stub object that represents the copy. - var result = deepCopier.create(source); - - // we now know the deep copy of source should always be result, so if we encounter - // source again during this deep copy we can immediately use result instead of - // descending into it recursively. - this.cacheResult(source, result); - - // only DeepCopier::populate() can recursively deep copy. So, to keep track - // of recursion depth, we increment this shared counter before calling it, - // and decrement it afterwards. - this.depth++; - if (this.depth > this.maxDepth) { - throw new Error('Exceeded max recursion depth in deep copy.'); - } - - // It's now safe to let the deepCopier recursively deep copy its properties. - deepCopier.populate(this.recursiveDeepCopy, source, result); - - this.depth--; - - return result; - } - }; - - // entry point for deep copy. - // source is the object to be deep copied. - // maxDepth is an optional recursion limit. Defaults to 256. - function deepCopy(source, maxDepth) { - var deepCopyAlgorithm = new DeepCopyAlgorithm(); - if (maxDepth) { - deepCopyAlgorithm.maxDepth = maxDepth; - } - return deepCopyAlgorithm.deepCopy(source); - } - - // publicly expose the DeepCopier class. - deepCopy.DeepCopier = DeepCopier; - - // publicly expose the list of deepCopiers. - deepCopy.deepCopiers = deepCopiers; - - // make deepCopy() extensible by allowing others to - // register their own custom DeepCopiers. - deepCopy.register = function (deepCopier) { - if (!(deepCopier instanceof DeepCopier)) { - deepCopier = new DeepCopier(deepCopier); - } - deepCopiers.unshift(deepCopier); - }; - - // Generic Object copier - // the ultimate fallback DeepCopier, which tries to handle the generic case. This - // should work for base Objects and many user-defined classes. - deepCopy.register({ - - canCopy: function canCopy() { - return true; - }, - - create: function create(source) { - if (source instanceof source.constructor) { - return clone(source.constructor.prototype); - } else { - return {}; - } - }, - - populate: function populate(deepCopy, source, result) { - for (var key in source) { - if (source.hasOwnProperty(key)) { - result[key] = deepCopy(source[key]); - } - } - return result; - } - }); - - // Array copier - deepCopy.register({ - canCopy: function canCopy(source) { - return source instanceof Array; - }, - - create: function create(source) { - return new source.constructor(); - }, - - populate: function populate(deepCopy, source, result) { - for (var i = 0; i < source.length; i++) { - result.push(deepCopy(source[i])); - } - return result; - } - }); - - // Date copier - deepCopy.register({ - canCopy: function canCopy(source) { - return source instanceof Date; - }, - - create: function create(source) { - return new Date(source); - } - }); - - return deepCopy; - }(); - var chartElement = [_elementGeneric.GenericCartesian]; - - var testColorCode = function testColorCode(x) { - return (/^(#|rgb\(|rgba\()/.test(x) - ); - }; - - // TODO Remove this configs and its associated methods - // which are just for templating in some plugins - var noMatch = /(.)^/; - - var map = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', - '`': '`' - }; - var escapes = { - '\'': '\'', - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\u2028|\u2029/g; - - var source = '(?:' + Object.keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - - var templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - }; - // End of plugin configs - - var utils = { - clone: function clone(obj) { - return deepClone(obj); - }, - isDate: function isDate(obj) { - return obj instanceof Date && !isNaN(Number(obj)); - }, - isObject: function isObject(obj) { - return obj != null && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object'; - }, - isChartElement: function isChartElement(element) { - return chartElement.some(function (Element) { - return element instanceof Element; - }); - }, - niceZeroBased: function niceZeroBased(domain) { - - var m = 10; - - var low = parseFloat(Math.min.apply(Math, _toConsumableArray(domain)).toFixed(15)); - var top = parseFloat(Math.max.apply(Math, _toConsumableArray(domain)).toFixed(15)); - - if (low === top) { - var k = top >= 0 ? -1 : 1; - var d = top || 1; - top = top - k * d / m; - } - - // include 0 by default - low = Math.min(0, low); - top = Math.max(0, top); - - var extent = [low, top]; - var span = extent[1] - extent[0]; - var step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)); - var err = m / span * step; - - var correction = [[0.15, 10], [0.35, 5], [0.75, 2], [1.00, 1], [2.00, 1]]; - - var i = -1; - /*eslint-disable */ - while (err > correction[++i][0]) {} // jscs:ignore disallowEmptyBlocks - /*eslint-enable */ - - step *= correction[i][1]; - - extent[0] = Math.floor(extent[0] / step) * step; - extent[1] = Math.ceil(extent[1] / step) * step; - - var deltaLow = low - extent[0]; - var deltaTop = extent[1] - top; - - var limit = step / 2; - - if (low < 0) { - var koeffLow = deltaLow >= limit ? -deltaLow : 0; - extent[0] = extent[0] - koeffLow; - } - - if (top > 0) { - var koeffTop = deltaTop >= limit ? -deltaTop : 0; - extent[1] = extent[1] + koeffTop; - } - - return [parseFloat(extent[0].toFixed(15)), parseFloat(extent[1].toFixed(15))]; - }, - niceTimeDomain: function niceTimeDomain(domain, niceIntervalFn) { - var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { utc: false }, - utc = _ref.utc; - - var _d3$extent = _d3.default.extent(domain), - _d3$extent2 = _slicedToArray(_d3$extent, 2), - low = _d3$extent2[0], - top = _d3$extent2[1]; - - var span = top - low; - var d3TimeScale = utc ? _d3.default.time.scale.utc : _d3.default.time.scale; - - if (span === 0) { - var oneDay = 24 * 60 * 60 * 1000; - low = new Date(low.getTime() - oneDay); - top = new Date(top.getTime() + oneDay); - return d3TimeScale().domain([low, top]).nice(niceIntervalFn).domain(); - } - - var niceScale = d3TimeScale().domain([low, top]).nice(niceIntervalFn); - if (niceIntervalFn) { - return niceScale.domain(); - } - - var _d3TimeScale$domain$n = d3TimeScale().domain([low, top]).nice(niceIntervalFn).domain(), - _d3TimeScale$domain$n2 = _slicedToArray(_d3TimeScale$domain$n, 2), - niceLow = _d3TimeScale$domain$n2[0], - niceTop = _d3TimeScale$domain$n2[1]; - - var ticks = niceScale.ticks(); - var last = ticks.length - 1; - if ((low - niceLow) / (ticks[1] - niceLow) < 0.5) { - low = niceLow; - } - if ((niceTop - top) / (niceTop - ticks[last - 1]) < 0.5) { - top = niceTop; - } - - return [low, top]; - }, - - - traverseJSON: traverseJSON, - - generateHash: function generateHash(str) { - var r = btoa(encodeURIComponent(str)).replace(/=/g, '_'); - if (!hashMap.hasOwnProperty(r)) { - hashMap[r] = 'H' + ++hashGen; - } - return hashMap[r]; - }, - - generateRatioFunction: function generateRatioFunction(dimPropName, paramsList, chartInstanceRef) { - - var unify = function unify(v) { - return utils.isDate(v) ? v.getTime() : v; - }; - - var dataNewSnap = 0; - var dataPrevRef = null; - var xHash = utils.memoize(function (data, keys) { - return utils.unique(data.map(function (row) { - return keys.reduce(function (r, k) { - return r.concat(unify(row[k])); - }, []); - }), function (t) { - return JSON.stringify(t); - }).reduce(function (memo, t) { - var k = t[0]; - memo[k] = memo[k] || 0; - memo[k] += 1; - return memo; - }, {}); - }, function (data, keys) { - var seed = dataPrevRef === data ? dataNewSnap : ++dataNewSnap; - dataPrevRef = data; - return keys.join('') + '-' + seed; - }); - - return function (key, size, varSet) { - - var facetSize = varSet.length; - - var chartSpec = chartInstanceRef.getSpec(); - - var data = chartSpec.sources['/'].data; - - var level2Guide = chartSpec.unit.units[0].guide || {}; - level2Guide.padding = level2Guide.padding || { l: 0, r: 0, t: 0, b: 0 }; - - var pad = 0; - if (dimPropName === 'x') { - pad = level2Guide.padding.l + level2Guide.padding.r; - } else if (dimPropName === 'y') { - pad = level2Guide.padding.t + level2Guide.padding.b; - } - - var xTotal = function xTotal(keys) { - var arr = xHash(data, keys); - return Object.keys(arr).reduce(function (sum, k) { - return sum + arr[k]; - }, 0); - }; - - var xPart = function xPart(keys, k) { - return xHash(data, keys)[k]; - }; - - var totalItems = xTotal(paramsList); - - var tickPxSize = (size - facetSize * pad) / totalItems; - var countOfTicksInTheFacet = xPart(paramsList, key); - - return (countOfTicksInTheFacet * tickPxSize + pad) / size; - }; - }, - - traverseSpec: traverseSpec, - - isSpecRectCoordsOnly: function isSpecRectCoordsOnly(root) { - - var isApplicable = true; - - try { - utils.traverseSpec(root, function (unit) { - if (unit.type.indexOf('COORDS.') === 0 && unit.type !== 'COORDS.RECT') { - throw new Error('Not applicable'); - } - }, function (unit) { - return unit; - }); - } catch (e) { - if (e.message === 'Not applicable') { - isApplicable = false; - } - } - - return isApplicable; - }, - - throttleLastEvent: function throttleLastEvent(last, eventType, handler) { - var limitFromPrev = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - - - if (limitFromPrev === 'requestAnimationFrame') { - var frameRequested = false; - return function () { - if (!frameRequested) { - requestAnimationFrame(function () { - frameRequested = false; - }); - // NOTE: Have to call sync cause - // D3 event info disappears later. - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - handler.apply(this, args); - frameRequested = true; - } - last.e = eventType; - last.ts = new Date(); - }; - } - - return function () { - var curr = { e: eventType, ts: new Date() }; - var diff = last.e && last.e === curr.e ? curr.ts - last.ts : limitFromPrev; - - if (diff >= limitFromPrev) { - for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } - - handler.apply(this, args); - } - - last.e = curr.e; - last.ts = curr.ts; - }; - }, - - splitEvenly: function splitEvenly(domain, parts) { - var min = domain[0]; - var max = domain[1]; - var segment = (max - min) / (parts - 1); - var chunks = parts >= 2 ? utils.range(parts - 2).map(function (n) { - return min + segment * (n + 1); - }) : []; - return [min].concat(_toConsumableArray(chunks), [max]); - }, - - extRGBColor: function extRGBColor(x) { - return testColorCode(x) ? x : ''; - }, - - extCSSClass: function extCSSClass(x) { - return testColorCode(x) ? '' : x; - }, - - toRadian: function toRadian(degree) { - return degree / 180 * Math.PI; - }, - - normalizeAngle: function normalizeAngle(angle) { - if (Math.abs(angle) >= 360) { - angle = angle % 360; - } - - if (angle < 0) { - angle = 360 + angle; - } - - return angle; - }, - - range: function range(start, end) { - if (arguments.length === 1) { - end = start; - start = 0; - } - var arr = []; - for (var i = start; i < end; i++) { - arr.push(i); - } - return arr; - }, - - flatten: function flatten(array) { - var _ref2; - - if (!Array.isArray(array)) { - return array; - } - return (_ref2 = []).concat.apply(_ref2, _toConsumableArray(array.map(function (x) { - return utils.flatten(x); - }))); - }, - - unique: function unique(array, func) { - var hash = {}; - var result = []; - var len = array.length; - var hasher = func || function (x) { - return String(x); - }; - for (var i = 0; i < len; ++i) { - var item = array[i]; - var key = hasher(item); - if (!hash.hasOwnProperty(key)) { - hash[key] = true; - result.push(item); - } - } - return result; - }, - - groupBy: function groupBy(array, func) { - return array.reduce(function (obj, v) { - var group = func(v); - obj[group] = obj[group] || []; - obj[group].push(v); - return obj; - }, {}); - }, - - union: function union(arr1, arr2) { - return utils.unique(arr1.concat(arr2)); - }, - - intersection: function intersection(arr1, arr2) { - return arr1.filter(function (x) { - return arr2.indexOf(x) !== -1; - }); - }, - - defaults: function defaults(obj) { - for (var _len3 = arguments.length, defaultObjs = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { - defaultObjs[_key3 - 1] = arguments[_key3]; - } - - var length = defaultObjs.length; - if (length === 0 || !obj) { - return obj; - } - for (var index = 0; index < length; index++) { - var source = defaultObjs[index], - keys = utils.isObject(source) ? Object.keys(source) : [], - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (obj[key] === undefined) { - obj[key] = source[key]; - } - } - } - return obj; - }, - - omit: function omit(obj) { - for (var _len4 = arguments.length, props = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { - props[_key4 - 1] = arguments[_key4]; - } - - var newObj = Object.assign({}, obj); - props.forEach(function (prop) { - delete newObj[prop]; - }); - return newObj; - }, - - memoize: function memoize(func, hasher) { - var memoize = function memoize(key) { - var cache = memoize.cache; - var address = String(hasher ? hasher.apply(this, arguments) : key); - if (!cache.hasOwnProperty(address)) { - cache[address] = func.apply(this, arguments); - } - return cache[address]; - }; - memoize.cache = {}; - return memoize; - }, - - createMultiSorter: function createMultiSorter() { - for (var _len5 = arguments.length, sorters = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { - sorters[_key5] = arguments[_key5]; - } - - return function (a, b) { - var result = 0; - sorters.every(function (s) { - result = s(a, b); - return result === 0; - }); - return result; - }; - }, - - // TODO Remove this methods and its associated configs - // which are just for templating in some plugins - pick: function pick(object) { - for (var _len6 = arguments.length, props = Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) { - props[_key6 - 1] = arguments[_key6]; - } - - var result = {}; - if (object == null) { - return result; - } - - return props.reduce(function (result, prop) { - var value = object[prop]; - if (value) { - result[prop] = value; - } - return result; - }, {}); - }, - - escape: function escape(string) { - string = string == null ? '' : String(string); - return testRegexp.test(string) ? string.replace(replaceRegexp, function (match) { - return map[match]; - }) : string; - }, - - template: function template(text, settings, oldSettings) { - if (!settings && oldSettings) { - settings = oldSettings; - } - settings = utils.defaults({}, settings, templateSettings); - - var matcher = RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g'); - - var index = 0; - var source = '__p+=\''; - text.replace(matcher, function (match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escaper, function (match) { - return '\\' + escapes[match]; - }); - index = offset + match.length; - - if (escape) { - source += '\'+\n((__t=(' + escape + '))==null?\'\':utils.escape(__t))+\n\''; - } else if (interpolate) { - source += '\'+\n((__t=(' + interpolate + '))==null?\'\':__t)+\n\''; - } else if (evaluate) { - source += '\';\n' + evaluate + '\n__p+=\''; - } - - return match; - }); - source += '\';\n'; - - if (!settings.variable) { - source = 'with(obj||{}){\n' + source + '}\n'; - } - - source = 'var __t,__p=\'\',__j=Array.prototype.join,' + 'print=function(){__p+=__j.call(arguments,\'\');};\n' + source + 'return __p;\n'; - - try { - var render = new Function(settings.variable || 'obj', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function template(data) { - return render.call(this, data); - }; - - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - } - - // End of plugins methods - - }; - - exports.utils = utils; - -/***/ }, -/* 4 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.GenericCartesian = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _element = __webpack_require__(5); - - var _grammarRegistry = __webpack_require__(7); - - var _d3Decorators = __webpack_require__(9); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var GenericCartesian = exports.GenericCartesian = function (_Element) { - _inherits(GenericCartesian, _Element); - - function GenericCartesian(config) { - _classCallCheck(this, GenericCartesian); - - var _this = _possibleConstructorReturn(this, (GenericCartesian.__proto__ || Object.getPrototypeOf(GenericCartesian)).call(this, config)); - - _this.config = config; - - _this.config.guide = _utils.utils.defaults(_this.config.guide || {}, { - animationSpeed: 0, - enableColorToBarPosition: false - }); - - _this.config.guide.size = _this.config.guide.size || {}; - - var enableStack = _this.config.stack; - var enableColorPositioning = _this.config.guide.enableColorToBarPosition; - - var defaultDecorators = [config.flip && _grammarRegistry.GrammarRegistry.get('flip'), enableStack && _grammarRegistry.GrammarRegistry.get('stack'), enableColorPositioning && _grammarRegistry.GrammarRegistry.get('positioningByColor')]; - - _this.decorators = (_this.config.transformRules || defaultDecorators).concat(config.transformModel || []); - _this.adjusters = (_this.config.adjustRules || []).concat(config.adjustScales || []); - return _this; - } - - _createClass(GenericCartesian, [{ - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - var _this2 = this; - - var config = this.config; - this.regScale('x', fnCreateScale('pos', config.x, [0, config.options.width])).regScale('y', fnCreateScale('pos', config.y, [config.options.height, 0])).regScale('size', fnCreateScale('size', config.size, {})).regScale('color', fnCreateScale('color', config.color, {})).regScale('split', fnCreateScale('split', config.split, {})).regScale('label', fnCreateScale('label', config.label, {})).regScale('identity', fnCreateScale('identity', config.identity, {})); - - var scaleX = this.getScale('x'); - var scaleY = this.getScale('y'); - var scaleSize = this.getScale('size'); - var scaleLabel = this.getScale('label'); - var scaleColor = this.getScale('color'); - var scaleSplit = this.getScale('split'); - var scaleIdentity = this.getScale('identity'); - - var ys = scaleY.domain(); - var min = scaleY.discrete ? ys[0] : Math.max(0, Math.min.apply(Math, _toConsumableArray(ys))); // NOTE: max also can be below 0 - var _y = scaleY.value(min) + scaleY.stepSize(min) * 0.5; - var _order = scaleColor.domain(); - var delimiter = '(@taucharts@)'; - - return { - data: function data() { - return _this2.data(); - }, - flip: false, - scaleX: scaleX, - scaleY: scaleY, - scaleSize: scaleSize, - scaleLabel: scaleLabel, - scaleColor: scaleColor, - scaleSplit: scaleSplit, - scaleIdentity: scaleIdentity, - color: function color(d) { - return scaleColor.value(d[scaleColor.dim]); - }, - label: function label(d) { - return scaleLabel.value(d[scaleLabel.dim]); - }, - group: function group(d) { - return '' + d[scaleColor.dim] + delimiter + d[scaleSplit.dim]; - }, - order: function order(group) { - var color = group.split(delimiter)[0]; - var i = _order.indexOf(color); - return i < 0 ? Number.MAX_VALUE : i; - }, - size: function size(d) { - return scaleSize.value(d[scaleSize.dim]); - }, - id: function id(row) { - return scaleIdentity.value(row[scaleIdentity.dim], row); - }, - xi: function xi(d) { - return scaleX.value(d[scaleX.dim]); - }, - yi: function yi(d) { - return scaleY.value(d[scaleY.dim]); - }, - y0: function y0() { - return _y; - } - }; - } - }, { - key: 'getGrammarRules', - value: function getGrammarRules() { - return this.decorators.filter(function (x) { - return x; - }); - } - }, { - key: 'getAdjustScalesRules', - value: function getAdjustScalesRules() { - return (this.adjusters || []).filter(function (x) { - return x; - }); - } - }, { - key: 'createScreenModel', - value: function createScreenModel(grammarModel) { - var flip = grammarModel.flip; - var iff = function iff(statement, yes, no) { - return statement ? yes : no; - }; - return { - flip: flip, - id: grammarModel.id, - x: iff(flip, grammarModel.yi, grammarModel.xi), - y: iff(flip, grammarModel.xi, grammarModel.yi), - x0: iff(flip, grammarModel.y0, grammarModel.xi), - y0: iff(flip, grammarModel.xi, grammarModel.y0), - size: grammarModel.size, - group: grammarModel.group, - order: grammarModel.order, - label: grammarModel.label, - color: function color(d) { - return grammarModel.scaleColor.toColor(grammarModel.color(d)); - }, - class: function _class(d) { - return grammarModel.scaleColor.toClass(grammarModel.color(d)); - }, - model: grammarModel, - toFibers: function toFibers() { - var data = grammarModel.data(); - var groups = _utils.utils.groupBy(data, grammarModel.group); - return Object.keys(groups).sort(function (a, b) { - return grammarModel.order(a) - grammarModel.order(b); - }).reduce(function (memo, k) { - return memo.concat([groups[k]]); - }, []); - } - }; - } - }, { - key: 'drawFrames', - value: function drawFrames() { - - var self = this; - - var options = this.config.options; - - var round = function round(x, decimals) { - var kRound = Math.pow(10, decimals); - return Math.round(kRound * x) / kRound; - }; - var size = function size(d) { - return round(self.screenModel.size(d) / 2, 4); - }; - var createUpdateFunc = _d3Decorators.d3_animationInterceptor; - - var drawPart = function drawPart(that, id, props) { - var speed = self.config.guide.animationSpeed; - var part = that.selectAll('.' + id).data(function (row) { - return [row]; - }, self.screenModel.id); - part.exit().call(createUpdateFunc(speed, null, { width: 0 }, function (node) { - return _d2.default.select(node).remove(); - })); - part.call(createUpdateFunc(speed, null, props)); - part.enter().append('rect').style('stroke-width', 0).call(createUpdateFunc(speed, { width: 0 }, props)); - }; - - var flip = this.config.flip; - var x = flip ? 'y' : 'x'; - var y = flip ? 'x' : 'y'; - var y0 = flip ? 'x0' : 'y0'; - var w = flip ? 'height' : 'width'; - var h = flip ? 'width' : 'height'; - var drawElement = function drawElement() { - var _drawPart, _drawPart2, _drawPart3; - - drawPart(this, 'lvl-top', (_drawPart = {}, _defineProperty(_drawPart, w, function (d) { - return size(d); - }), _defineProperty(_drawPart, h, 1), _defineProperty(_drawPart, x, function (d) { - return self.screenModel[x](d) - size(d) / 2; - }), _defineProperty(_drawPart, y, function (d) { - return self.screenModel[y](d); - }), _defineProperty(_drawPart, 'fill', function fill(d) { - return self.screenModel.color(d); - }), _defineProperty(_drawPart, 'class', function _class(d) { - return 'lvl-top ' + self.screenModel.class(d); - }), _drawPart)); - drawPart(this, 'lvl-btm', (_drawPart2 = {}, _defineProperty(_drawPart2, w, function (d) { - return size(d); - }), _defineProperty(_drawPart2, h, 1), _defineProperty(_drawPart2, x, function (d) { - return self.screenModel[x](d) - size(d) / 2; - }), _defineProperty(_drawPart2, y, function (d) { - return self.screenModel[y0](d); - }), _defineProperty(_drawPart2, 'fill', function fill(d) { - return self.screenModel.color(d); - }), _defineProperty(_drawPart2, 'class', function _class(d) { - return 'lvl-btm ' + self.screenModel.class(d); - }), _drawPart2)); - drawPart(this, 'lvl-link', (_drawPart3 = {}, _defineProperty(_drawPart3, w, 0.5), _defineProperty(_drawPart3, h, function (d) { - return Math.abs(self.screenModel[y](d) - self.screenModel[y0](d)); - }), _defineProperty(_drawPart3, x, function (d) { - return self.screenModel[x](d) - 0.25; - }), _defineProperty(_drawPart3, y, function (d) { - return Math.min(self.screenModel[y](d), self.screenModel[y0](d)); - }), _defineProperty(_drawPart3, 'fill', function fill(d) { - return self.screenModel.color(d); - }), _defineProperty(_drawPart3, 'class', function _class(d) { - return 'lvl-link ' + self.screenModel.class(d); - }), _drawPart3)); - }; - - var updateGroups = function updateGroups() { - - this.attr('class', 'frame-id-' + self.config.uid).call(function () { - var generic = this.selectAll('.generic').data(function (fiber) { - return fiber; - }, self.screenModel.id); - generic.exit().remove(); - generic.call(drawElement); - generic.enter().append('g').attr('class', 'generic').call(drawElement); - }); - }; - - var groups = _utils.utils.groupBy(this.data(), self.screenModel.group); - var fibers = Object.keys(groups).sort(function (a, b) { - return self.screenModel.order(a) - self.screenModel.order(b); - }).reduce(function (memo, k) { - return memo.concat([groups[k]]); - }, []); - - var frameGroups = options.container.selectAll('.frame-id-' + self.config.uid).data(fibers); - frameGroups.exit().remove(); - frameGroups.call(updateGroups); - frameGroups.enter().append('g').call(updateGroups); - } - }]); - - return GenericCartesian; - }(_element.Element); - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Element = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _event = __webpack_require__(6); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var Element = exports.Element = function (_Emitter) { - _inherits(Element, _Emitter); - - // add base behaviour here - function Element(config) { - _classCallCheck(this, Element); - - var _this = _possibleConstructorReturn(this, (Element.__proto__ || Object.getPrototypeOf(Element)).call(this, config)); - - _this.screenModel = null; - _this._elementNameSpace = config.namespace || 'default'; - _this._elementScalesHub = {}; - return _this; - } - - _createClass(Element, [{ - key: 'regScale', - value: function regScale(paramId, scaleObj) { - this._elementScalesHub[paramId] = scaleObj; - return this; - } - }, { - key: 'getScale', - value: function getScale(paramId) { - return this._elementScalesHub[paramId] || null; - } - }, { - key: 'fireNameSpaceEvent', - value: function fireNameSpaceEvent(eventName, eventData) { - var namespace = this._elementNameSpace; - this.fire(eventName + '.' + namespace, eventData); - } - }, { - key: 'subscribe', - value: function subscribe(sel) { - var dataInterceptor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (x) { - return x; - }; - var eventInterceptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (x) { - return x; - }; - - var self = this; - var last = {}; - [{ - event: 'mouseover', - limit: 0 - }, { - event: 'mouseout', - limit: 0 - }, { - event: 'click', - limit: 0 - }, { - event: 'mousemove', - limit: 'requestAnimationFrame' - }].forEach(function (item) { - var eventName = item.event; - var limit = item.limit; - - var callback = function callback(d) { - var eventData = { - data: dataInterceptor.call(this, d), - event: eventInterceptor.call(this, _d2.default.event, d) - }; - self.fire(eventName, eventData); - self.fireNameSpaceEvent(eventName, eventData); - }; - - sel.on(eventName, _utils.utils.throttleLastEvent(last, eventName, callback, limit)); - }); - } - }, { - key: 'allocateRect', - value: function allocateRect() { - return { - left: 0, - top: 0, - width: 0, - height: 0 - }; - } - - /* eslint-disable */ - - }, { - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - return {}; - } - }, { - key: 'getGrammarRules', - value: function getGrammarRules() { - return []; - } - }, { - key: 'getAdjustScalesRules', - value: function getAdjustScalesRules() { - return []; - } - }, { - key: 'createScreenModel', - value: function createScreenModel(grammarModel) { - // return nothing - } - }, { - key: 'getClosestElement', - value: function getClosestElement(x, y) { - return null; - } - /* eslint-enable */ - - }, { - key: 'addInteraction', - value: function addInteraction() { - // do nothing - } - }, { - key: 'draw', - value: function draw() { - // TODO: expose to explicit call everywhere - this.config.options.container = this.config.options.slot(this.config.uid); - this.drawFrames(this.config.frames); - } - }, { - key: 'data', - value: function data() { - return this.config.frames.reduce(function (data, frame) { - return data.concat(frame.part()); - }, []); - } - }, { - key: 'node', - value: function node() { - return this; - } - }]); - - return Element; - }(_event.Emitter); - -/***/ }, -/* 6 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var NULL_HANDLER = {}; - var events = {}; - - /** - * Creates new type of event or returns existing one, if it was created before. - * @param {string} eventName - * @return {function(..eventArgs)} - */ - function createDispatcher(eventName) { - var eventFunction = events[eventName]; - - if (!eventFunction) { - eventFunction = function eventFunction() { - var cursor = this; - var args; - var fn; - var i = 0; - var queue = []; - while (cursor = cursor.handler) { - // eslint-disable-line - // callback call - fn = cursor.callbacks[eventName]; - if (typeof fn === 'function') { - if (!args) { - // it should be better for browser optimizations - // (instead of [this].concat(slice.call(arguments))) - args = [this]; - for (i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - } - - queue.unshift({ - fn: fn, - context: cursor.context, - args: args - }); - } - - // any event callback call - fn = cursor.callbacks['*']; - if (typeof fn === 'function') { - if (!args) { - // it should be better for browser optimizations - // (instead of [this].concat(slice.call(arguments))) - args = [this]; - for (i = 0; i < arguments.length; i++) { - args.push(arguments[i]); - } - } - - queue.unshift({ - fn: fn, - context: cursor.context, - args: [{ - sender: this, - type: eventName, - args: args - }] - }); - } - } - - queue.forEach(function (item) { - return item.fn.apply(item.context, item.args); - }); - }; - - events[eventName] = eventFunction; - } - - return eventFunction; - } - - /** - * Base class for event dispatching. It provides interface for instance - * to add and remove handler for desired events, and call it when event happens. - * @class - */ - - var Emitter = function () { - /** - * @constructor - */ - function Emitter() { - _classCallCheck(this, Emitter); - - this.handler = null; - this.emit_destroy = createDispatcher('destroy'); - } - - /** - * Adds new event handler to object. - * @param {object} callbacks Callback set. - * @param {object=} context Context object. - */ - - - _createClass(Emitter, [{ - key: 'addHandler', - value: function addHandler(callbacks, context) { - context = context || this; - // add handler - this.handler = { - callbacks: callbacks, - context: context, - handler: this.handler - }; - } - }, { - key: 'on', - value: function on(name, callback, context) { - var obj = {}; - obj[name] = callback; - this.addHandler(obj, context); - return obj; - } - }, { - key: 'fire', - value: function fire(name, data) { - createDispatcher.call(this, name).call(this, data); - } - - /** - * Removes event handler set from object. For this operation parameters - * must be the same (equivalent) as used for addHandler method. - * @param {object} callbacks Callback set. - * @param {object=} context Context object. - */ - - }, { - key: 'removeHandler', - value: function removeHandler(callbacks, context) { - var cursor = this; - var prev; - - context = context || this; - - // search for handler and remove it - while (prev = cursor, cursor = cursor.handler) { - // jshint ignore:line - if (cursor.callbacks === callbacks && cursor.context === context) { - // make it non-callable - cursor.callbacks = NULL_HANDLER; - - // remove from list - prev.handler = cursor.handler; - - return; - } - } - } - - /** - * @destructor - */ - - }, { - key: 'destroy', - value: function destroy() { - // fire object destroy event handlers - this.emit_destroy(); - // drop event handlers if any - this.handler = null; - } - }]); - - return Emitter; - }(); - - // - // export names - // - - - exports.Emitter = Emitter; - -/***/ }, -/* 7 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.GrammarRegistry = undefined; - - var _utils = __webpack_require__(3); - - var _error = __webpack_require__(8); - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - var rules = {}; - var GrammarRegistry = { - get: function get(name) { - return rules[name]; - }, - reg: function reg(name, func) { - rules[name] = func; - return this; - } - }; - - GrammarRegistry.reg('identity', function () { - return {}; - }).reg('flip', function (model) { - var baseScale = model.scaleY; - var valsScale = model.scaleX; - - var k = -0.5; - var ys = valsScale.domain(); - var min = valsScale.discrete ? ys[0] : Math.max(0, Math.min.apply(Math, _toConsumableArray(ys))); // NOTE: max also can be below 0 - var _y = valsScale.value(min) + valsScale.stepSize(min) * k; - - return { - flip: true, - scaleX: baseScale, - scaleY: valsScale, - xi: function xi(d) { - return baseScale.value(d[baseScale.dim]); - }, - yi: function yi(d) { - return valsScale.value(d[valsScale.dim]); - }, - y0: function y0() { - return _y; - } - }; - }).reg('positioningByColor', function (model) { - - var method = model.scaleX.discrete ? function (model) { - var dataSource = model.data(); - var xColors = dataSource.reduce(function (map, row) { - var x = row[model.scaleX.dim]; - var color = row[model.scaleColor.dim]; - if (!(x in map)) { - map[x] = []; - } - if (map[x].indexOf(color) < 0) { - map[x].push(color); - } - return map; - }, {}); - - var baseScale = model.scaleX; - var scaleColor = model.scaleColor; - var categories = scaleColor.discrete ? scaleColor.domain() : scaleColor.originalSeries().sort(function (a, b) { - return a - b; - }); - var categoriesCount = categories.length || 1; - var space = function space(d) { - return baseScale.stepSize(d[baseScale.dim]) * (categoriesCount / (1 + categoriesCount)); - }; - - return { - xi: function xi(d) { - var x = d[model.scaleX.dim]; - var colors = xColors[x] || [d[model.scaleColor.dim]]; - var total = colors.length; - var index = colors.indexOf(d[model.scaleColor.dim]); - var availableSpace = space(d); - var middleStep = availableSpace / (categoriesCount + 1); - var absTickStart = model.xi(d) - (total + 1) * middleStep / 2; - var relSegmStart = (1 + index) * middleStep; - return absTickStart + relSegmStart; - } - }; - } : function () { - return {}; - }; - - return method(model); - }).reg('groupOrderByAvg', function (model) { - - var dataSource = model.data(); - - var avg = function avg(arr) { - return arr.map(model.yi).reduce(function (sum, i) { - return sum + i; - }, 0) / arr.length; - }; - - var groups = dataSource.reduce(function (memo, row) { - var k = model.group(row); - memo[k] = memo[k] || []; - memo[k].push(row); - return memo; - }, {}); - - var _order = Object.keys(groups).map(function (k) { - return [k, avg(groups[k])]; - }).sort(function (a, b) { - return a[1] - b[1]; - }).map(function (r) { - return r[0]; - }); - - return { - order: function order(group) { - var i = _order.indexOf(group); - return i < 0 ? Number.MAX_VALUE : i; - } - }; - }).reg('stack', function (model) { - - var dataSource = model.data(); - - var xScale = model.scaleX; - var yScale = model.scaleY; - - if (yScale.discrete || yScale.domain().some(function (x) { - return typeof x !== 'number'; - })) { - throw new _error.TauChartError('Stacked field [' + yScale.dim + '] should be a number', _error.errorCodes.STACKED_FIELD_NOT_NUMBER, { field: yScale.dim }); - } - - var createFnStack = function createFnStack(totalState) { - return function (d) { - var x = d[xScale.dim]; - var y = d[yScale.dim]; - - var state = y >= 0 ? totalState.positive : totalState.negative; - - var prevStack = state[x] || 0; - var nextStack = prevStack + y; - state[x] = nextStack; - - return { nextStack: nextStack, prevStack: prevStack }; - }; - }; - - var stackYi = createFnStack({ positive: {}, negative: {} }); - var stackY0 = createFnStack({ positive: {}, negative: {} }); - - var memoize = function memoize(fn) { - return _utils.utils.memoize(fn, model.id); - }; - - var trackedMinY = Number.MAX_VALUE; - var trackedMaxY = Number.MIN_VALUE; - var trackAndEval = function trackAndEval(y) { - trackedMinY = y < trackedMinY ? y : trackedMinY; - trackedMaxY = y > trackedMaxY ? y : trackedMaxY; - return yScale.value(y); - }; - - var nextYi = memoize(function (d) { - return trackAndEval(stackYi(d).nextStack); - }); - var nextY0 = memoize(function (d) { - return trackAndEval(stackY0(d).prevStack); - }); - var nextGroup = function nextGroup(row) { - return model.group(row) + '/' + (row[yScale.dim] >= 0 ? 1 : -1); - }; - - var groups = _utils.utils.groupBy(dataSource, nextGroup); - var nextData = Object.keys(groups).sort(function (a, b) { - return model.order(a) - model.order(b); - }).reduce(function (memo, k) { - return memo.concat(groups[k]); - }, []); - - nextData.forEach(function (row) { - nextYi(row); - nextY0(row); - }); - - yScale.fixup(function (yScaleConfig) { - - var newConf = {}; - - if (!yScaleConfig.hasOwnProperty('max') || yScaleConfig.max < trackedMaxY) { - newConf.max = trackedMaxY; - } - - if (!yScaleConfig.hasOwnProperty('min') || yScaleConfig.min > trackedMinY) { - newConf.min = trackedMinY; - } - - return newConf; - }); - - return { - group: nextGroup, - data: function data() { - return nextData; - }, - yi: nextYi, - y0: nextY0 - }; - }).reg('size_distribute_evenly', function (model, _ref) { - var minLimit = _ref.minLimit, - maxLimit = _ref.maxLimit, - defMin = _ref.defMin, - defMax = _ref.defMax; - - - var dataSource = model.data(); - - var asc = function asc(a, b) { - return a - b; - }; - - var stepSize = model.scaleX.discrete ? model.scaleX.stepSize() / 2 : Number.MAX_VALUE; - - var xs = dataSource.map(function (row) { - return model.xi(row); - }).sort(asc); - - var prev = xs[0]; - var diff = xs.slice(1).map(function (curr) { - var diff = curr - prev; - prev = curr; - return diff; - }).filter(function (diff) { - return diff > 0; - }).sort(asc).concat(Number.MAX_VALUE)[0]; - - var minDiff = Math.min(diff, stepSize); - - var currMinSize = typeof minLimit === 'number' ? minLimit : defMin; - var curr = { - minSize: currMinSize, - maxSize: typeof maxLimit === 'number' ? maxLimit : Math.max(currMinSize, Math.min(defMax, minDiff)) - }; - - model.scaleSize.fixup(function (prev) { - - var next = {}; - - if (!prev.fixed) { - next.fixed = true; - next.minSize = curr.minSize; - next.maxSize = curr.maxSize; - } else { - if (prev.maxSize > curr.maxSize) { - next.maxSize = curr.maxSize; - } - } - - return next; - }); - - return {}; - }).reg('adjustStaticSizeScale', function (model, _ref2) { - var minLimit = _ref2.minLimit, - maxLimit = _ref2.maxLimit, - defMin = _ref2.defMin, - defMax = _ref2.defMax; - - - var curr = { - minSize: typeof minLimit === 'number' ? minLimit : defMin, - maxSize: typeof maxLimit === 'number' ? maxLimit : defMax - }; - - model.scaleSize.fixup(function (prev) { - - var next = {}; - - if (!prev.fixed) { - next.fixed = true; - next.minSize = curr.minSize; - next.maxSize = curr.maxSize; - } - - return next; - }); - - return {}; - }).reg('adjustSigmaSizeScale', function (model, _ref3) { - var minLimit = _ref3.minLimit, - maxLimit = _ref3.maxLimit, - defMin = _ref3.defMin, - defMax = _ref3.defMax; - - - var dataSource = model.data(); - - var asc = function asc(a, b) { - return a - b; - }; - - var xs = dataSource.map(function (row) { - return model.xi(row); - }).sort(asc); - - var prev = xs[0]; - var diffX = xs.slice(1).map(function (curr) { - var diff = curr - prev; - prev = curr; - return diff; - }).filter(function (diff) { - return diff > 0; - }).sort(asc).concat(Number.MAX_VALUE)[0]; - - var stepSize = model.scaleX.discrete ? model.scaleX.stepSize() / 2 : Number.MAX_VALUE; - - var maxSize = Math.min(diffX, stepSize); - - var currMinSize = typeof minLimit === 'number' ? minLimit : defMin; - var maxSizeLimit = typeof maxLimit === 'number' ? maxLimit : defMax; - - var sigma = function sigma(x) { - var Ab = (currMinSize + maxSizeLimit) / 2; - var At = maxSizeLimit; - var X0 = currMinSize; - var Wx = 0.5; - - return Math.round(Ab + (At - Ab) / (1 + Math.exp(-(x - X0) / Wx))); - }; - - var curr = { - minSize: currMinSize, - maxSize: Math.max(currMinSize, Math.min(maxSizeLimit, sigma(maxSize))) - }; - - model.scaleSize.fixup(function (prev) { - - var next = {}; - - if (!prev.fixed) { - next.fixed = true; - next.minSize = curr.minSize; - next.maxSize = curr.maxSize; - } else { - if (prev.maxSize > curr.maxSize) { - next.maxSize = curr.maxSize; - } - } - - return next; - }); - - return {}; - }).reg('avoidScalesOverflow', function (model, _ref4) { - var sizeDirection = _ref4.sizeDirection; - - - // TODO: Don't ignore logarithmic scale, - // add scale method for extending it's domain. - var shouldIgnoreScale = function shouldIgnoreScale(scale, direction) { - return !scale || scale.discrete || scale.scaleType === 'logarithmic' || sizeDirection.indexOf(direction) < 0; - }; - - var ignoreX = shouldIgnoreScale(model.scaleX, 'x'); - var ignoreY = shouldIgnoreScale(model.scaleY, 'y'); - - if (ignoreX && ignoreY) { - return {}; - } - - var plannedMinSize; - var plannedMaxSize; - model.scaleSize.fixup(function (prev) { - plannedMinSize = prev.minSize; - plannedMaxSize = prev.maxSize; - return prev; - }); - - var border = model.data().reduce(function (memo, row) { - var s = model.size(row); - var r = (s >= plannedMinSize ? s : plannedMinSize + s * (plannedMaxSize - plannedMinSize)) / 2; - var x, y; - if (!ignoreX) { - x = model.xi(row); - memo.left = Math.min(memo.left, x - r); - memo.right = Math.max(memo.right, x + r); - } - if (!ignoreY) { - y = model.yi(row); - memo.top = Math.min(memo.top, y - r); - memo.bottom = Math.max(memo.bottom, y + r); - } - return memo; - }, { - top: Number.MAX_VALUE, - right: -Number.MAX_VALUE, - bottom: -Number.MAX_VALUE, - left: Number.MAX_VALUE - }); - - var fixScale = function fixScale(scale, start, end, flip) { - - var domain = scale.domain(); - var length = Math.abs(scale.value(domain[1]) - scale.value(domain[0])); - var koeff = (domain[1] - domain[0]) / length; - - var _startPad = Math.max(0, -start); - var _endPad = Math.max(0, end - length); - - var startPad = model.flip ? _endPad : _startPad; - var endPad = model.flip ? _startPad : _endPad; - - var startVal = Number(domain[0]) - (flip ? endPad : startPad) * koeff; - var endVal = Number(domain[1]) + (flip ? startPad : endPad) * koeff; - - scale.fixup(function (prev) { - var next = {}; - if (!prev.fixed) { - next.fixed = true; - next.min = startVal; - next.max = endVal; - next.nice = false; - } else { - next.min = prev.min > startVal ? next.min : prev.min; - next.max = prev.max < endVal ? next.max : prev.max; - } - - return next; - }); - - return length / (startPad + length + endPad); - }; - - var kx = ignoreX ? 1 : fixScale(model.scaleX, border.left, border.right, false); - var ky = ignoreY ? 1 : fixScale(model.scaleY, border.top, border.bottom, true); - - var linearlyScaledMinSize = Math.min(plannedMinSize * kx, plannedMinSize * ky); - var linearlyScaledMaxSize = Math.min(plannedMaxSize * kx, plannedMaxSize * ky); - model.scaleSize.fixup(function () { - return { - minSize: linearlyScaledMinSize, - maxSize: linearlyScaledMaxSize - }; - }); - - return {}; - }); - - exports.GrammarRegistry = GrammarRegistry; - -/***/ }, -/* 8 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var TauChartError = function (_Error) { - _inherits(TauChartError, _Error); - - function TauChartError(message, errorCode, errorArgs) { - _classCallCheck(this, TauChartError); - - var _this = _possibleConstructorReturn(this, (TauChartError.__proto__ || Object.getPrototypeOf(TauChartError)).call(this)); - - _this.name = 'TauChartError'; - _this.message = message; - _this.errorCode = errorCode; - _this.errorArgs = errorArgs; - return _this; - } - - return TauChartError; - }(Error); - - var errorCodes = { - STACKED_FIELD_NOT_NUMBER: 'STACKED_FIELD_NOT_NUMBER', - NO_DATA: 'NO_DATA', - NOT_SUPPORTED_TYPE_CHART: 'NOT_SUPPORTED_TYPE_CHART', - UNKNOWN_UNIT_TYPE: 'UNKNOWN_UNIT_TYPE', - INVALID_LOG_DOMAIN: 'INVALID_LOG_DOMAIN' - }; - - exports.TauChartError = TauChartError; - exports.errorCodes = errorCodes; - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.cutText = exports.wrapText = exports.d3_selectAllImmediate = exports.d3_transition = exports.d3_decorator_avoidLabelsCollisions = exports.d3_decorator_prettify_categorical_axis_ticks = exports.d3_decorator_highlightZeroTick = exports.d3_decorator_fixEdgeAxisTicksOverflow = exports.d3_decorator_fixHorizontalAxisTicksOverflow = exports.d3_decorator_fix_axis_start_line = exports.d3_decorator_prettify_axis_label = exports.d3_decorator_wrap_tick_label = exports.d3_createPathTween = exports.d3_animationInterceptor = undefined; - - var _utils = __webpack_require__(3); - - var _utilsDom = __webpack_require__(1); - - var _utilsDraw = __webpack_require__(10); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _pathPoints = __webpack_require__(11); - - var _pathPoints2 = _interopRequireDefault(_pathPoints); - - var _interpolatorsRegistry = __webpack_require__(13); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - var d3getComputedTextLength = function d3getComputedTextLength() { - return _utils.utils.memoize(function (d3Text) { - return d3Text.node().getComputedTextLength(); - }, function (d3Text) { - return d3Text.node().textContent.length; - }); - }; - - var cutText = function cutText(textString, getScaleStepSize, getComputedTextLength) { - - getComputedTextLength = getComputedTextLength || d3getComputedTextLength(); - - textString.each(function () { - - var tickNode = _d2.default.select(this.parentNode); - var tickData = tickNode.data()[0]; - var stepSize = getScaleStepSize(tickData); - - var textD3 = _d2.default.select(this); - var tokens = textD3.text().split(/\s+/); - - var stop = false; - var parts = tokens.reduce(function (memo, t, i) { - - if (stop) { - return memo; - } - - var text = i > 0 ? [memo, t].join(' ') : t; - var len = getComputedTextLength(textD3.text(text)); - if (len < stepSize) { - memo = text; - } else { - var available = Math.floor(stepSize / len * text.length); - memo = text.substr(0, available - 4) + '...'; - stop = true; - } - - return memo; - }, ''); - - textD3.text(parts); - }); - }; - - var wrapText = function wrapText(textNode, getScaleStepSize, linesLimit, tickLabelFontHeight, isY, getComputedTextLength) { - - getComputedTextLength = getComputedTextLength || d3getComputedTextLength(); - - var addLine = function addLine(targetD3, text, lineHeight, x, y, dy, lineNumber) { - var dyNew = lineNumber * lineHeight + dy; - return targetD3.append('tspan').attr('x', x).attr('y', y).attr('dy', dyNew + 'em').text(text); - }; - - textNode.each(function () { - - var tickNode = _d2.default.select(this.parentNode); - var tickData = tickNode.data()[0]; - var stepSize = getScaleStepSize(tickData); - - var textD3 = _d2.default.select(this), - tokens = textD3.text().split(/\s+/), - lineHeight = 1.1, - // ems - x = textD3.attr('x'), - y = textD3.attr('y'), - dy = parseFloat(textD3.attr('dy')); - - textD3.text(null); - var tempSpan = addLine(textD3, null, lineHeight, x, y, dy, 0); - - var stopReduce = false; - var tokensCount = tokens.length - 1; - var lines = tokens.reduce(function (memo, next, i) { - - if (stopReduce) { - return memo; - } - - var isLimit = memo.length === linesLimit || i === tokensCount; - var last = memo[memo.length - 1]; - var text = last !== '' ? last + ' ' + next : next; - var tLen = getComputedTextLength(tempSpan.text(text)); - var over = tLen > stepSize; - - if (over && isLimit) { - var available = Math.floor(stepSize / tLen * text.length); - memo[memo.length - 1] = text.substr(0, available - 4) + '...'; - stopReduce = true; - } - - if (over && !isLimit) { - memo.push(next); - } - - if (!over) { - memo[memo.length - 1] = text; - } - - return memo; - }, ['']).filter(function (l) { - return l.length > 0; - }); - - y = isY ? -1 * (lines.length - 1) * Math.floor(tickLabelFontHeight * 0.5) : y; - lines.forEach(function (text, i) { - return addLine(textD3, text, lineHeight, x, y, dy, i); - }); - - tempSpan.remove(); - }); - }; - - /** - * Moves ticks from categories middle to categories top. - */ - var d3_decorator_prettify_categorical_axis_ticks = function d3_decorator_prettify_categorical_axis_ticks(nodeAxis, logicalScale, isHorizontal, animationSpeed) { - - nodeAxis.selectAll('.tick').each(function (tickData) { - // NOTE: Skip ticks removed by D3 axis call during transition. - if (logicalScale(tickData)) { - - var tickNode = _d2.default.select(this); - - var setAttr = function setAttr(selection) { - var _selection$select$att; - - var tickCoord = logicalScale(tickData); - var tx = isHorizontal ? tickCoord : 0; - var ty = isHorizontal ? 0 : tickCoord; - selection.attr('transform', 'translate(' + tx + ',' + ty + ')'); - - var offset = logicalScale.stepSize(tickData) * 0.5; - var key = isHorizontal ? 'x' : 'y'; - var val = isHorizontal ? offset : -offset; - selection.select('line').attr((_selection$select$att = {}, _defineProperty(_selection$select$att, key + '1', val), _defineProperty(_selection$select$att, key + '2', val), _selection$select$att)); - }; - - if (!tickNode.classed('tau-enter')) { - tickNode.call(setAttr); - tickNode.classed('tau-enter', true); - } - - d3_transition(tickNode, animationSpeed).call(setAttr); - } - }); - }; - - var d3_decorator_fixHorizontalAxisTicksOverflow = function d3_decorator_fixHorizontalAxisTicksOverflow(axisNode, activeTicks) { - - var isDate = activeTicks.length && activeTicks[0] instanceof Date; - if (isDate) { - activeTicks = activeTicks.map(function (d) { - return Number(d); - }); - } - - var timeTicks = axisNode.selectAll('.tick').filter(function (d) { - return activeTicks.indexOf(isDate ? Number(d) : d) >= 0; - })[0]; - if (timeTicks.length < 2) { - return; - } - - var tick0 = parseFloat(timeTicks[0].attributes.transform.value.replace('translate(', '')); - var tick1 = parseFloat(timeTicks[1].attributes.transform.value.replace('translate(', '')); - - var tickStep = tick1 - tick0; - - var maxTextLn = 0; - var iMaxTexts = -1; - var timeTexts = axisNode.selectAll('.tick text').filter(function (d) { - return activeTicks.indexOf(isDate ? Number(d) : d) >= 0; - })[0]; - timeTexts.forEach(function (textNode, i) { - var innerHTML = textNode.textContent || ''; - var textLength = innerHTML.length; - if (textLength > maxTextLn) { - maxTextLn = textLength; - iMaxTexts = i; - } - }); - - var hasOverflow = false; - if (iMaxTexts >= 0) { - var rect = timeTexts[iMaxTexts].getBoundingClientRect(); - hasOverflow = tickStep - rect.width < 8; // 2px from each side - } - axisNode.classed({ 'graphical-report__d3-time-overflown': hasOverflow }); - }; - - var d3_decorator_fixEdgeAxisTicksOverflow = function d3_decorator_fixEdgeAxisTicksOverflow(axisNode, activeTicks) { - - activeTicks = activeTicks.map(function (d) { - return Number(d); - }); - var texts = axisNode.selectAll('.tick text').filter(function (d) { - return activeTicks.indexOf(Number(d)) >= 0; - })[0]; - if (texts.length === 0) { - return; - } - - var svg = axisNode.node(); - while (svg && svg.tagName !== 'svg') { - svg = svg.parentNode; - } - var svgRect = svg.getBoundingClientRect(); - - texts.forEach(function (n) { - var t = _d2.default.select(n); - t.attr('dx', 0); - }); - - var fixText = function fixText(node, dir) { - var d3Node = _d2.default.select(node); - var rect = node.getBoundingClientRect(); - var side = dir > 0 ? 'right' : 'left'; - var diff = dir * (rect[side] - svgRect[side]); - d3Node.attr('dx', diff > 0 ? -dir * diff : 0); - }; - fixText(texts[0], -1); - fixText(texts[texts.length - 1], 1); - }; - - /** - * Adds extra tick to axis container. - */ - var d3_decorator_fix_axis_start_line = function d3_decorator_fix_axis_start_line(axisNode, isHorizontal, width, height, animationSpeed) { - - var setTransform = function setTransform(selection) { - selection.attr('transform', _utilsDraw.utilsDraw.translate(0, isHorizontal ? height : 0)); - return selection; - }; - - var setLineSize = function setLineSize(selection) { - if (isHorizontal) { - selection.attr('x2', width); - } else { - selection.attr('y2', height); - } - return selection; - }; - - var tickClass = 'tau-extra' + (isHorizontal ? 'Y' : 'X') + 'Tick'; - var extraTick = _utilsDom.utilsDom.selectOrAppend(axisNode, 'g.' + tickClass); - var extraLine = _utilsDom.utilsDom.selectOrAppend(extraTick, 'line'); - if (!extraTick.node().hasAttribute('opacity')) { - extraTick.attr('opacity', 1e-6); - } - d3_transition(extraTick, animationSpeed).call(setTransform); - d3_transition(extraLine, animationSpeed).call(setLineSize); - }; - - var d3_decorator_prettify_axis_label = function d3_decorator_prettify_axis_label(axisNode, guide, isHorizontal, size, animationSpeed) { - - var koeff = isHorizontal ? 1 : -1; - var labelTextNode = _utilsDom.utilsDom.selectOrAppend(axisNode, 'text.label').attr('class', _utilsDom.utilsDom.classes('label', guide.cssClass)).attr('transform', _utilsDraw.utilsDraw.rotate(guide.rotate)); - - var labelTextTrans = d3_transition(labelTextNode, animationSpeed).attr('x', koeff * guide.size * 0.5).attr('y', koeff * guide.padding).style('text-anchor', guide.textAnchor); - - var delimiter = ' \u2192 '; - var texts = function (parts) { - var result = []; - for (var i = 0; i < parts.length - 1; i++) { - result.push(parts[i], delimiter); - } - result.push(parts[i]); - return result; - }(guide.text.split(delimiter)); - - var tspans = labelTextNode.selectAll('tspan').data(texts); - tspans.enter().append('tspan').attr('class', function (d, i) { - return i % 2 ? 'label-token-delimiter label-token-delimiter-' + i : 'label-token label-token-' + i; - }).text(function (d) { - return d; - }); - tspans.exit().remove(); - - if (['left', 'right'].indexOf(guide.dock) >= 0) { - var labelX = { - left: [-size, 0], - right: [0, size] - }; - labelTextTrans.attr('x', labelX[guide.dock][Number(isHorizontal)]); - } - }; - - var d3_decorator_wrap_tick_label = function d3_decorator_wrap_tick_label(nodeScale, animationSpeed, guide, isHorizontal, logicalScale) { - - var angle = _utils.utils.normalizeAngle(guide.rotate); - - var tick = nodeScale.selectAll('.tick text').attr('transform', _utilsDraw.utilsDraw.rotate(angle)).style('text-anchor', guide.textAnchor); - - // TODO: Improve indent calculation for ratated text. - var segment = Math.abs(angle / 90); - if (segment % 2 > 0) { - var kRot = angle < 180 ? 1 : -1; - var k = isHorizontal ? 0.5 : -2; - var sign = guide.scaleOrient === 'top' || guide.scaleOrient === 'left' ? -1 : 1; - var dy = k * (guide.scaleOrient === 'bottom' || guide.scaleOrient === 'top' ? sign < 0 ? 0 : 0.71 : 0.32); - - var texts = nodeScale.selectAll('.tick text'); - var attrs = { - x: 9 * kRot, - y: 0, - dx: isHorizontal ? null : dy + 'em', - dy: dy + 'em' - }; - - // NOTE: Override d3 axis transition. - texts.transition(); - texts.attr(attrs); - d3_transition(texts, animationSpeed, 'axisTransition').attr(attrs); - } - - var limitFunc = function limitFunc(d) { - return Math.max(logicalScale.stepSize(d), guide.tickFormatWordWrapLimit); - }; - - if (guide.tickFormatWordWrap) { - tick.call(wrapText, limitFunc, guide.tickFormatWordWrapLines, guide.tickFontHeight, !isHorizontal); - } else { - tick.call(cutText, limitFunc, d3getComputedTextLength()); - } - }; - - var d3_decorator_avoidLabelsCollisions = function d3_decorator_avoidLabelsCollisions(nodeScale, isHorizontal, activeTicks) { - var isDate = activeTicks.length && activeTicks[0] instanceof Date; - if (isDate) { - activeTicks = activeTicks.map(function (d) { - return Number(d); - }); - } - var textOffsetStep = 11; - var refOffsetStart = isHorizontal ? -10 : 20; - var translateParam = isHorizontal ? 0 : 1; - var directionKoeff = isHorizontal ? 1 : -1; - var layoutModel = []; - nodeScale.selectAll('.tick').filter(function (d) { - return activeTicks.indexOf(isDate ? Number(d) : d) >= 0; - }).each(function () { - var tick = _d2.default.select(this); - - var translateXStr = tick.attr('transform').replace('translate(', '').replace(' ', ',') // IE specific - .split(',')[translateParam]; - - var translateX = directionKoeff * parseFloat(translateXStr); - var tNode = tick.selectAll('text'); - - var textWidth = tNode.node().getBBox().width; - - var halfText = textWidth / 2; - var s = translateX - halfText; - var e = translateX + halfText; - layoutModel.push({ c: translateX, s: s, e: e, l: 0, textRef: tNode, tickRef: tick }); - }); - - var iterateByTriples = function iterateByTriples(coll, iterator) { - return coll.map(function (curr, i, list) { - return iterator(list[i - 1] || { e: -Infinity, s: -Infinity, l: 0 }, curr, list[i + 1] || { e: Infinity, s: Infinity, l: 0 }); - }); - }; - - var resolveCollide = function resolveCollide(prevLevel, prevCollide) { - - var rules = { - '[T][1]': -1, - '[T][-1]': 0, - '[T][0]': 1, - '[F][0]': -1 - }; - - var k = '[' + prevCollide.toString().toUpperCase().charAt(0) + '][' + prevLevel + ']'; - - return rules.hasOwnProperty(k) ? rules[k] : 0; - }; - - var axisLayoutModel = layoutModel.sort(function (a, b) { - return a.c - b.c; - }); - - iterateByTriples(axisLayoutModel, function (prev, curr, next) { - - var collideL = prev.e > curr.s; - var collideR = next.s < curr.e; - - if (collideL || collideR) { - - curr.l = resolveCollide(prev.l, collideL); - - var size = curr.textRef[0].length; - var text = curr.textRef.text(); - - if (size > 1) { - text = text.replace(/([\.]*$)/gi, '') + '...'; - } - - var dy = curr.l * textOffsetStep; // -1 | 0 | +1 - var newY = parseFloat(curr.textRef.attr('y')) + dy; - var tx = isHorizontal ? 0 : dy; - var ty = isHorizontal ? dy : 0; - var tr = function (transform) { - var rotate = 0; - if (!transform) { - return rotate; - } - var rs = transform.indexOf('rotate('); - if (rs >= 0) { - var re = transform.indexOf(')', rs + 7); - var rotateStr = transform.substring(rs + 7, re); - rotate = parseFloat(rotateStr.trim()); - } - return rotate; - }(curr.textRef.attr('transform')); - - curr.textRef.text(function (d, i) { - return i === 0 ? text : ''; - }).attr('transform', 'translate(' + tx + ',' + ty + ') rotate(' + tr + ')'); - - var attrs = { - x1: 0, - x2: 0, - y1: newY + (isHorizontal ? -1 : 5), - y2: refOffsetStart - }; - - if (!isHorizontal) { - attrs.transform = 'rotate(-90)'; - } - - _utilsDom.utilsDom.selectOrAppend(curr.tickRef, 'line.label-ref').attr(attrs); - } else { - curr.tickRef.selectAll('line.label-ref').remove(); - } - - return curr; - }); - }; - - var d3_decorator_highlightZeroTick = function d3_decorator_highlightZeroTick(axisNode, scale) { - var ticks = scale.ticks(); - var domain = scale.domain(); - var last = ticks.length - 1; - var shouldHighlightZero = ticks.length > 1 && domain[0] * domain[1] < 0 && -domain[0] > (ticks[1] - ticks[0]) / 2 && domain[1] > (ticks[last] - ticks[last - 1]) / 2; - axisNode.selectAll('.tick').classed('zero-tick', function (d) { - return d === 0 && shouldHighlightZero; - }); - }; - - var d3_transition = function d3_transition(selection, animationSpeed, nameSpace) { - if (animationSpeed > 0) { - selection = selection.transition(nameSpace).duration(animationSpeed); - selection.attr = d3_transition_attr; - } - selection.onTransitionEnd = function (callback) { - d3_add_transition_end_listener(this, callback); - return this; - }; - return selection; - }; - - // TODO: Getting attribute value may be possible in D3 v4: - // http://stackoverflow.com/a/39024812/4137472 - // so it will be possible to get future attribute value. - var d3_transition_attr = function d3_transition_attr(keyOrMap, value) { - var d3AttrResult = _d2.default.transition.prototype.attr.apply(this, arguments); - - if (arguments.length === 0) { - throw new Error('Unexpected `transition().attr()` arguments.'); - } - var attrs; - if (arguments.length === 1) { - attrs = keyOrMap; - } else if (arguments.length > 1) { - attrs = _defineProperty({}, keyOrMap, value); - } - - // Store transitioned attributes values - // until transition ends. - var store = '__transitionAttrs__'; - var idStore = '__lastTransitions__'; - var id = getTransitionAttrId(); - this.each(function () { - var _this = this; - - var newAttrs = {}; - for (var key in attrs) { - if (typeof attrs[key] === 'function') { - newAttrs[key] = attrs[key].apply(this, arguments); - } else { - newAttrs[key] = attrs[key]; - } - } - this[store] = Object.assign(this[store] || {}, newAttrs); - - // NOTE: As far as d3 `interrupt` event is called asynchronously, - // we have to store ID to prevent removing attribute value from store, - // when new transition is applied for the same attribute. - if (!this[store][idStore]) { - Object.defineProperty(this[store], idStore, { value: {} }); - } - Object.keys(newAttrs).forEach(function (key) { - return _this[store][idStore][key] = id; - }); - }); - var onTransitionEnd = function onTransitionEnd() { - var _this2 = this; - - if (this[store]) { - Object.keys(attrs).filter(function (k) { - return _this2[store][idStore][k] === id; - }).forEach(function (k) { - return delete _this2[store][k]; - }); - if (Object.keys(this[store]).length === 0) { - delete this[store]; - } - } - }; - this.each('interrupt.' + id, onTransitionEnd); - this.each('end.' + id, onTransitionEnd); - - return d3AttrResult; - }; - var transitionsCounter = 0; - var getTransitionAttrId = function getTransitionAttrId() { - return ++transitionsCounter; - }; - - var d3_add_transition_end_listener = function d3_add_transition_end_listener(selection, callback) { - if (!_d2.default.transition.prototype.isPrototypeOf(selection) || selection.empty()) { - // If selection is not transition or empty, - // execute callback immediately. - callback.call(null, selection); - return; - } - var t = selection.size(); - var onTransitionEnd = function onTransitionEnd() { - t--; - if (t === 0) { - callback.call(null, selection); - } - }; - selection.each('interrupt.d3_on_transition_end', onTransitionEnd); - selection.each('end.d3_on_transition_end', onTransitionEnd); - return selection; - }; - - var d3_animationInterceptor = function d3_animationInterceptor(speed, initAttrs, doneAttrs, afterUpdate) { - - var xAfterUpdate = afterUpdate || function (x) { - return x; - }; - var afterUpdateIterator = function afterUpdateIterator() { - xAfterUpdate(this); - }; - - return function () { - - var flow = this; - - if (initAttrs) { - flow = flow.attr(_utils.utils.defaults(initAttrs, doneAttrs)); - } - - flow = d3_transition(flow, speed); - - flow = flow.attr(doneAttrs); - - if (speed > 0) { - flow.each('end.d3_animationInterceptor', afterUpdateIterator); - } else { - flow.each(afterUpdateIterator); - } - - return flow; - }; - }; - - var d3_selectAllImmediate = function d3_selectAllImmediate(container, selector) { - var node = container.node(); - return container.selectAll(selector).filter(function () { - return this.parentNode === node; - }); - }; - - var d3_createPathTween = function d3_createPathTween(attr, pathStringBuilder, pointConvertors, idGetter) { - var interpolationType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'linear'; - - var pointStore = '__pathPoints__'; - - return function (data) { - var _this3 = this; - - if (!this[pointStore]) { - this[pointStore] = pointConvertors.map(function () { - return []; - }); - } - - var frames = pointConvertors.map(function (convertor, i) { - var points = _utils.utils.unique(data, idGetter).map(convertor); - var interpolateLine = (0, _interpolatorsRegistry.getLineInterpolator)(interpolationType) || (0, _interpolatorsRegistry.getLineInterpolator)('linear'); - var pointsTo = interpolateLine(points); - var pointsFrom = _this3[pointStore][i]; - - var interpolate = (0, _pathPoints2.default)(pointsFrom, pointsTo, (0, _interpolatorsRegistry.getInterpolatorSplineType)(interpolationType)); - - return { - pointsFrom: pointsFrom, - pointsTo: pointsTo, - interpolate: interpolate - }; - }); - - return function (t) { - if (t === 0) { - var pointsFrom = frames.map(function (f) { - return f.pointsFrom; - }); - return pathStringBuilder.apply(undefined, _toConsumableArray(pointsFrom)); - } - if (t === 1) { - var pointsTo = frames.map(function (f) { - return f.pointsTo; - }); - _this3[pointStore] = pointsTo; - return pathStringBuilder.apply(undefined, _toConsumableArray(pointsTo)); - } - - var intermediate = frames.map(function (f) { - return f.interpolate(t); - }); - - // Save intermediate points to be able - // to continue transition after interrupt - _this3[pointStore] = intermediate; - - return pathStringBuilder.apply(undefined, _toConsumableArray(intermediate)); - }; - }; - }; - - exports.d3_animationInterceptor = d3_animationInterceptor; - exports.d3_createPathTween = d3_createPathTween; - exports.d3_decorator_wrap_tick_label = d3_decorator_wrap_tick_label; - exports.d3_decorator_prettify_axis_label = d3_decorator_prettify_axis_label; - exports.d3_decorator_fix_axis_start_line = d3_decorator_fix_axis_start_line; - exports.d3_decorator_fixHorizontalAxisTicksOverflow = d3_decorator_fixHorizontalAxisTicksOverflow; - exports.d3_decorator_fixEdgeAxisTicksOverflow = d3_decorator_fixEdgeAxisTicksOverflow; - exports.d3_decorator_highlightZeroTick = d3_decorator_highlightZeroTick; - exports.d3_decorator_prettify_categorical_axis_ticks = d3_decorator_prettify_categorical_axis_ticks; - exports.d3_decorator_avoidLabelsCollisions = d3_decorator_avoidLabelsCollisions; - exports.d3_transition = d3_transition; - exports.d3_selectAllImmediate = d3_selectAllImmediate; - exports.wrapText = wrapText; - exports.cutText = cutText; - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.utilsDraw = undefined; - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - var utilsDraw = { - translate: function translate(left, top) { - return 'translate(' + left + ',' + top + ')'; - }, - rotate: function rotate(angle) { - return 'rotate(' + angle + ')'; - }, - getOrientation: function getOrientation(scaleOrient) { - return ['bottom', 'top'].indexOf(scaleOrient.toLowerCase()) >= 0 ? 'h' : 'v'; - }, - isIntersect: function isIntersect(ax0, ay0, ax1, ay1, bx0, by0, bx1, by1) { - var s1_x, s1_y, s2_x, s2_y; - s1_x = ax1 - ax0; - s1_y = ay1 - ay0; - s2_x = bx1 - bx0; - s2_y = by1 - by0; - - var s, t; - s = (-s1_y * (ax0 - bx0) + s1_x * (ay0 - by0)) / (-s2_x * s1_y + s1_x * s2_y); - t = (s2_x * (ay0 - by0) - s2_y * (ax0 - bx0)) / (-s2_x * s1_y + s1_x * s2_y); - - return s >= 0 && s <= 1 && t >= 0 && t <= 1; - }, - getDeepTransformTranslate: function getDeepTransformTranslate(node) { - var parseTransformTranslate = function parseTransformTranslate(transform) { - var result = { x: 0, y: 0 }; - var ts = transform.indexOf('translate('); - if (ts >= 0) { - var te = transform.indexOf(')', ts + 10); - var translateStr = transform.substring(ts + 10, te); - var translateParts = translateStr.trim().replace(',', ' ').replace(/\s+/, ' ').split(' '); - result.x = parseFloat(translateParts[0]); - if (translateParts.length > 1) { - result.y = parseFloat(translateParts[1]); - } - } - return result; - }; - var translate = { x: 0, y: 0 }; - var parent = node; - var tr, attr; - while (parent && parent.nodeName.toUpperCase() !== 'SVG') { - attr = parent.getAttribute('transform'); - if (attr) { - tr = parseTransformTranslate(attr); - translate.x += tr.x; - translate.y += tr.y; - } - parent = parent.parentNode; - } - return translate; - }, - raiseElements: function raiseElements(container, selector, filter) { - var highlighted = container.selectAll(selector).filter(filter); - if (highlighted.empty()) { - return; - } - var untargeted = _d2.default.select(highlighted.node().parentNode).selectAll(selector).filter(function (d) { - return !filter(d); - })[0]; - var lastUntargeted = untargeted[untargeted.length - 1]; - if (lastUntargeted) { - var untargetedIndex = Array.prototype.indexOf.call(lastUntargeted.parentNode.childNodes, lastUntargeted); - var nextSibling = lastUntargeted.nextSibling; - highlighted.each(function () { - var index = Array.prototype.indexOf.call(this.parentNode.childNodes, this); - if (index > untargetedIndex) { - return; - } - this.parentNode.insertBefore(this, nextSibling); - }); - } - } - }; - - exports.utilsDraw = utilsDraw; - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - - exports.default = interpolatePathPoints; - - var _utils = __webpack_require__(3); - - var _bezier = __webpack_require__(12); - - /** - * Returns intermediate line or curve between two sources. - */ - function interpolatePathPoints(pointsFrom, pointsTo) { - var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'polyline'; - - - var interpolate; - - return function (t) { - if (t === 0) { - return pointsFrom; - } - if (t === 1) { - return pointsTo; - } - - if (!interpolate) { - interpolate = (type === 'cubic' ? getCubicInterpolator : getLinearInterpolator)(pointsFrom, pointsTo); - } - - return interpolate(t); - }; - } - - /** - * Creates intermediate points array, so that the number of points - * remains the same and added or excluded points are situated between - * existing points. - */ - function getLinearInterpolator(pointsFrom, pointsTo) { - - // TODO: Continue unfinished transition of ending points. - pointsFrom = pointsFrom.filter(function (d) { - return !d.isInterpolated; - }); - - // NOTE: Suppose data is already sorted by X. - var idsFrom = pointsFrom.map(function (d) { - return d.id; - }); - var idsTo = pointsTo.map(function (d) { - return d.id; - }); - var remainingIds = idsFrom.filter(function (id) { - return idsTo.indexOf(id) >= 0; - }); - - // - // Determine start and end scales difference to apply - // to initial target position of newly added points - // (or end position of deleted points) - - var stableFrom = pointsFrom.filter(function (d) { - return !d.positionIsBeingChanged; - }); - var stableTo = pointsTo.filter(function (d) { - return !d.positionIsBeingChanged; - }); - var toEndScale = getScaleDiffFn(stableFrom, stableTo); - var toStartScale = getScaleDiffFn(stableTo, stableFrom); - - var interpolators = []; - remainingIds.forEach(function (id, i) { - - var indexFrom = idsFrom.indexOf(id); - var indexTo = idsTo.indexOf(id); - - if (i === 0 && (indexFrom > 0 || indexTo > 0)) { - interpolators.push(getEndingInterpolator({ - polylineFrom: pointsFrom.slice(0, indexFrom + 1), - polylineTo: pointsTo.slice(0, indexTo + 1), - toOppositeScale: indexTo === 0 ? toEndScale : toStartScale - })); - } - - if (i > 0) { - var prevIndexFrom = idsFrom.indexOf(remainingIds[i - 1]); - var prevIndexTo = idsTo.indexOf(remainingIds[i - 1]); - if (indexFrom - prevIndexFrom > 1 || indexTo - prevIndexTo > 1) { - interpolators.push(getInnerInterpolator({ - polylineFrom: pointsFrom.slice(prevIndexFrom, indexFrom + 1), - polylineTo: pointsTo.slice(prevIndexTo, indexTo + 1) - })); - } - } - - interpolators.push(getRemainingPointInterpolator({ - pointFrom: pointsFrom[indexFrom], - pointTo: pointsTo[indexTo] - })); - - if (i === remainingIds.length - 1 && (pointsFrom.length - indexFrom - 1 > 0 || pointsTo.length - indexTo - 1 > 0)) { - interpolators.push(getEndingInterpolator({ - polylineFrom: pointsFrom.slice(indexFrom), - polylineTo: pointsTo.slice(indexTo), - toOppositeScale: pointsTo.length - indexTo === 1 ? toEndScale : toStartScale - })); - } - }); - - if (interpolators.length === 0 && (pointsTo.length > 0 && remainingIds.length === 0 || pointsFrom.length > 0 && remainingIds.length === 0)) { - interpolators.push(getNonRemainingPathInterpolator({ - polylineFrom: pointsFrom.slice(0), - polylineTo: pointsTo.slice(0) - })); - } - - return function (t) { - var intermediate = []; - interpolators.forEach(function (interpolator) { - var points = interpolator(t); - push(intermediate, points); - }); - return intermediate; - }; - } - - /** - * Creates intermediate cubic points array, so that the number of points - * remains the same and added or excluded points are situated between - * existing points. - */ - function getCubicInterpolator(pointsFrom, pointsTo) { - - for (var i = 2; i < pointsFrom.length - 1; i += 3) { - pointsFrom[i - 1].isCubicControl = true; - pointsFrom[i].isCubicControl = true; - } - for (i = 2; i < pointsTo.length - 1; i += 3) { - pointsTo[i - 1].isCubicControl = true; - pointsTo[i].isCubicControl = true; - } - - // Replace interpolated points sequence with straight segment - // TODO: Continue unfinished transition of ending points. - pointsFrom = pointsFrom.filter(function (d) { - return !d.isInterpolated; - }); - var d, p; - for (i = pointsFrom.length - 2; i >= 0; i--) { - p = pointsFrom[i + 1]; - d = pointsFrom[i]; - if (!d.isCubicControl && !p.isCubicControl) { - pointsFrom.splice(i + 1, 0, (0, _bezier.getBezierPoint)(1 / 3, p, d), (0, _bezier.getBezierPoint)(2 / 3, p, d)); - pointsFrom[i + 1].isCubicControl = true; - pointsFrom[i + 2].isCubicControl = true; - } - } - - // NOTE: Suppose data is already sorted by X. - // var anchorsFrom = pointsFrom.filter(d => !d.isCubicControl); - // var anchorsTo = pointsTo.filter(d => !d.isCubicControl); - var anchorsFrom = pointsFrom.filter(function (d, i) { - return i % 3 === 0; - }); - var anchorsTo = pointsTo.filter(function (d, i) { - return i % 3 === 0; - }); - var idsFrom = anchorsFrom.map(function (d) { - return d.id; - }); - var idsTo = anchorsTo.map(function (d) { - return d.id; - }); - var indicesFrom = idsFrom.reduce(function (memo, id) { - return memo[id] = pointsFrom.findIndex(function (d) { - return d.id === id; - }), memo; - }, {}); - var indicesTo = idsTo.reduce(function (memo, id) { - return memo[id] = pointsTo.findIndex(function (d) { - return d.id === id; - }), memo; - }, {}); - var remainingIds = idsFrom.filter(function (id) { - return idsTo.indexOf(id) >= 0; - }); - - // - // Determine start and end scales difference to apply - // to initial target position of newly added points - // (or end position of deleted points) - - var stableFrom = anchorsFrom.filter(function (d) { - return !d.positionIsBeingChanged; - }); - var stableTo = anchorsTo.filter(function (d) { - return !d.positionIsBeingChanged; - }); - var toEndScale = getScaleDiffFn(stableFrom, stableTo); - var toStartScale = getScaleDiffFn(stableTo, stableFrom); - - var interpolators = []; - remainingIds.forEach(function (id, i) { - - var indexFrom = indicesFrom[id]; - var indexTo = indicesTo[id]; - - if (i === 0 && (indexFrom > 0 || indexTo > 0)) { - interpolators.push(getEndingInterpolator({ - polylineFrom: pointsFrom.slice(0, indexFrom + 1), - polylineTo: pointsTo.slice(0, indexTo + 1), - toOppositeScale: indexTo === 0 ? toEndScale : toStartScale, - isCubic: true - })); - } - - if (i > 0) { - var prevIndexFrom = indicesFrom[remainingIds[i - 1]]; - var prevIndexTo = indicesTo[remainingIds[i - 1]]; - if (indexFrom - prevIndexFrom > 3 || indexTo - prevIndexTo > 3) { - interpolators.push(getInnerInterpolator({ - polylineFrom: pointsFrom.slice(prevIndexFrom, indexFrom + 1), - polylineTo: pointsTo.slice(prevIndexTo, indexTo + 1), - isCubic: true - })); - } else { - interpolators.push(getControlsBetweenRemainingInterpolator({ - polylineFrom: pointsFrom.slice(prevIndexFrom, indexFrom + 1), - polylineTo: pointsTo.slice(prevIndexTo, indexTo + 1) - })); - } - } - - interpolators.push(getRemainingPointInterpolator({ - pointFrom: pointsFrom[indexFrom], - pointTo: pointsTo[indexTo] - })); - - if (i === remainingIds.length - 1 && (pointsFrom.length - indexFrom - 1 > 0 || pointsTo.length - indexTo - 1 > 0)) { - interpolators.push(getEndingInterpolator({ - polylineFrom: pointsFrom.slice(indexFrom), - polylineTo: pointsTo.slice(indexTo), - toOppositeScale: pointsTo.length - indexTo === 1 ? toEndScale : toStartScale, - isCubic: true - })); - } - }); - - if (interpolators.length === 0 && (pointsTo.length > 0 && remainingIds.length === 0 || pointsFrom.length > 0 && remainingIds.length === 0)) { - interpolators.push(getNonRemainingPathInterpolator({ - polylineFrom: pointsFrom.slice(0), - polylineTo: pointsTo.slice(0), - isCubic: true - })); - } - - return function (t) { - var intermediate = []; - interpolators.forEach(function (ipl) { - var points = ipl(t); - push(intermediate, points); - }); - return intermediate; - }; - } - - function getEndingInterpolator(_ref) { - var polylineFrom = _ref.polylineFrom, - polylineTo = _ref.polylineTo, - isCubic = _ref.isCubic, - toOppositeScale = _ref.toOppositeScale; - - - var polyline = polylineFrom.length > polylineTo.length ? polylineFrom : polylineTo; - var decreasing = polylineTo.length === 1; - var isLeftEnding = polylineFrom[0].id !== polylineTo[0].id; - var rightToLeft = Boolean(isLeftEnding ^ decreasing); - - return function (t) { - var interpolated = (isCubic ? interpolateCubicEnding : interpolateEnding)({ - t: t, polyline: polyline, - decreasing: decreasing, - rightToLeft: rightToLeft - }); - if (decreasing === rightToLeft) { - interpolated.shift(); - } else { - interpolated.pop(); - } - var diffed = interpolated.map(toOppositeScale); - var points = interpolatePoints(diffed, interpolated, decreasing ? 1 - t : t); - points.forEach(function (d) { - return d.positionIsBeingChanged = true; - }); - return points; - }; - } - - function getInnerInterpolator(_ref2) { - var polylineFrom = _ref2.polylineFrom, - polylineTo = _ref2.polylineTo, - isCubic = _ref2.isCubic; - - - var oldCount = polylineFrom.length; - var newCount = polylineTo.length; - - if (newCount !== oldCount) { - var decreasing = newCount < oldCount; - var smallerPolyline = decreasing ? polylineTo : polylineFrom; - var biggerPolyline = decreasing ? polylineFrom : polylineTo; - var filledPolyline = (isCubic ? fillSmallerCubicLine : fillSmallerPolyline)({ - smallerPolyline: smallerPolyline, - biggerPolyline: biggerPolyline, - decreasing: decreasing - }); - var biggerInnerPoints = biggerPolyline.slice(1, biggerPolyline.length - 1); - var filledInnerPoints = filledPolyline.slice(1, filledPolyline.length - 1); - return function (t) { - var points = interpolatePoints(filledInnerPoints, biggerInnerPoints, decreasing ? 1 - t : t); - points.forEach(function (d) { - return d.positionIsBeingChanged = true; - }); - return points; - }; - } else { - var innerPointsFrom = polylineFrom.slice(1, polylineFrom.length - 1); - var innerPointsTo = polylineTo.slice(1, polylineTo.length - 1); - return function (t) { - var points = interpolatePoints(innerPointsFrom, innerPointsTo, t); - points.forEach(function (d) { - return d.positionIsBeingChanged = true; - }); - return points; - }; - } - } - - function getRemainingPointInterpolator(_ref3) { - var pointFrom = _ref3.pointFrom, - pointTo = _ref3.pointTo; - - return function (t) { - return [interpolatePoint(pointFrom, pointTo, t)]; - }; - } - - function getControlsBetweenRemainingInterpolator(_ref4) { - var polylineFrom = _ref4.polylineFrom, - polylineTo = _ref4.polylineTo; - - return function (t) { - return interpolatePoints(polylineFrom.slice(1, 3), polylineTo.slice(1, 3), t); - }; - } - - function getNonRemainingPathInterpolator(_ref5) { - var polylineFrom = _ref5.polylineFrom, - polylineTo = _ref5.polylineTo, - isCubic = _ref5.isCubic; - - - var decreasing = polylineTo.length === 0; - var rightToLeft = decreasing; - - var polyline = decreasing ? polylineFrom : polylineTo; - return function (t) { - var points = (isCubic ? interpolateCubicEnding : interpolateEnding)({ - t: t, - polyline: polyline, - decreasing: decreasing, - rightToLeft: rightToLeft - }); - points.forEach(function (d, i) { - if (i > 0) { - d.positionIsBeingChanged = true; - } - }); - return points; - }; - } - - function push(target, items) { - return Array.prototype.push.apply(target, items); - } - - function interpolateValue(a, b, t) { - if (b === undefined) { - return a; - } - if (typeof b === 'number') { - return a + t * (b - a); - } - return b; - } - - function interpolatePoint(a, b, t) { - if (a === b) { - return b; - } - var c = {}; - var props = Object.keys(a); - props.forEach(function (k) { - return c[k] = interpolateValue(a[k], b[k], t); - }); - if (b.id !== undefined) { - c.id = b.id; - } - return c; - } - - function interpolatePoints(pointsFrom, pointsTo, t) { - var result = pointsFrom.map(function (a, i) { - return interpolatePoint(a, pointsTo[i], t); - }); - return result; - } - - /** - * Returns a polyline with points that move along line - * from start point to full line (or vice versa). - */ - function interpolateEnding(_ref6) { - var t = _ref6.t, - polyline = _ref6.polyline, - decreasing = _ref6.decreasing, - rightToLeft = _ref6.rightToLeft; - - - var reverse = Boolean(decreasing) !== Boolean(rightToLeft); - - var result = function getLinePiece(t, line) { - var q = 0; - if (t > 0) { - var distance = [0]; - var totalDistance = 0; - for (var i = 1, x, y, x0, y0, d; i < line.length; i++) { - x0 = line[i - 1].x; - y0 = line[i - 1].y; - x = line[i].x; - y = line[i].y; - d = Math.sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0)); - totalDistance += d; - distance.push(totalDistance); - } - var passedDistance = t * totalDistance; - for (i = 1; i < distance.length; i++) { - if (passedDistance <= distance[i]) { - q = Math.min(1, (i - 1 + (passedDistance - distance[i - 1]) / (distance[i] - distance[i - 1])) / (line.length - 1)); - break; - } - } - } - - var existingCount = Math.floor((line.length - 1) * q) + 1; - var tempCount = line.length - existingCount; - var tempStartIdIndex = existingCount; - var result = line.slice(0, existingCount); - if (q < 1) { - var qi = q * (line.length - 1) % 1; - var midPt = interpolatePoint(line[existingCount - 1], line[existingCount], qi); - push(result, _utils.utils.range(tempCount).map(function (i) { - return Object.assign({}, midPt, { - id: line[tempStartIdIndex + i].id, - isInterpolated: true - }); - })); - } - return result; - }(decreasing ? 1 - t : t, reverse ? polyline.slice(0).reverse() : polyline); - if (reverse) { - result.reverse(); - } - - return result; - } - - /** - * Returns a cubic line with points that move along line - * from start point to full line (or vice versa). - */ - function interpolateCubicEnding(_ref7) { - var t = _ref7.t, - polyline = _ref7.polyline, - decreasing = _ref7.decreasing, - rightToLeft = _ref7.rightToLeft; - - - var reverse = Boolean(decreasing) !== Boolean(rightToLeft); - - var result = function getLinePiece(t, line) { - var pointsCount = (line.length - 1) / 3 + 1; - var q = 0; - if (t > 0) { - var distance = [0]; - var totalDistance = 0; - for (var i = 1, x1, y1, x0, y0, cx0, cy0, cx1, cy1, d; i < pointsCount; i++) { - x0 = line[i * 3 - 3].x; - y0 = line[i * 3 - 3].y; - cx0 = line[i * 3 - 2].x; - cy0 = line[i * 3 - 2].y; - cx1 = line[i * 3 - 1].x; - cy1 = line[i * 3 - 1].y; - x1 = line[i * 3].x; - y1 = line[i * 3].y; - d = (getDistance(x0, y0, cx0, cy0) + getDistance(cx0, cy0, cx1, cy1) + getDistance(cx1, cy1, x1, y1) + getDistance(x1, y1, x0, y0)) / 2; - totalDistance += d; - distance.push(totalDistance); - } - var passedDistance = t * totalDistance; - for (i = 1; i < distance.length; i++) { - if (passedDistance <= distance[i]) { - q = Math.min(1, (i - 1 + (passedDistance - distance[i - 1]) / (distance[i] - distance[i - 1])) / (pointsCount - 1)); - break; - } - } - } - - var existingCount = Math.floor((pointsCount - 1) * q) + 1; - var tempCount = pointsCount - existingCount; - var tempStartIdIndex = existingCount * 3; - var result = line.slice(0, (existingCount - 1) * 3 + 1); - if (q < 1) { - var qi = q * (pointsCount - 1) % 1; - var spl = splitCubicSegment(qi, line.slice((existingCount - 1) * 3, existingCount * 3 + 1)); - var newPiece = spl.slice(1, 4); - newPiece.forEach(function (p) { - return p.isInterpolated = true; - }); - newPiece[2].id = line[tempStartIdIndex].id; - push(result, newPiece); - _utils.utils.range(1, tempCount).forEach(function (i) { - push(result, [{ x: newPiece[2].x, y: newPiece[2].y, isCubicControl: true, isInterpolated: true }, { x: newPiece[2].x, y: newPiece[2].y, isCubicControl: true, isInterpolated: true }, Object.assign({}, newPiece[2], { - id: line[tempStartIdIndex + i * 3].id, - isInterpolated: true - })]); - }); - } - return result; - }(decreasing ? 1 - t : t, reverse ? polyline.slice(0).reverse() : polyline); - if (reverse) { - result.reverse(); - } - - return result; - } - - /** - * Returns a polyline filled with points, so that number of points - * becomes the same on both start and end polylines. - */ - function fillSmallerPolyline(_ref8) { - var smallerPolyline = _ref8.smallerPolyline, - biggerPolyline = _ref8.biggerPolyline, - decreasing = _ref8.decreasing; - - - var smallerSegCount = smallerPolyline.length - 1; - var biggerSegCount = biggerPolyline.length - 1; - var minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1; - var restPointsCount = biggerSegCount % smallerSegCount; - var segmentsPointsCount = _utils.utils.range(smallerSegCount).map(function (i) { - return minSegmentPointsCount + Number(i < restPointsCount); - }); - - var result = [smallerPolyline[0]]; - var smallPtIndex = 1; - segmentsPointsCount.forEach(function (segPtCount) { - _utils.utils.range(1, segPtCount).forEach(function (i) { - var newPt; - if (i === segPtCount - 1) { - newPt = Object.assign({}, smallerPolyline[smallPtIndex]); - if (!decreasing) { - newPt.id = biggerPolyline[result.length].id; - } - } else { - newPt = interpolatePoint(smallerPolyline[smallPtIndex - 1], smallerPolyline[smallPtIndex], i / (segPtCount - 1)); - newPt.id = biggerPolyline[result.length].id; - if (decreasing) { - newPt.isInterpolated = true; - } - } - result.push(newPt); - }); - smallPtIndex++; - }); - - return result; - } - - /** - * Returns a cubic line filled with points, so that number of points - * becomes the same on both start and end cubic lines. - */ - function fillSmallerCubicLine(_ref9) { - var smallerPolyline = _ref9.smallerPolyline, - biggerPolyline = _ref9.biggerPolyline, - decreasing = _ref9.decreasing; - - - var smallerSegCount = (smallerPolyline.length - 1) / 3; - var biggerSegCount = (biggerPolyline.length - 1) / 3; - var minSegmentPointsCount = Math.floor(biggerSegCount / smallerSegCount) + 1; - var restPointsCount = biggerSegCount % smallerSegCount; - var segmentsPointsCount = _utils.utils.range(smallerSegCount).map(function (i) { - return minSegmentPointsCount + Number(i < restPointsCount); - }); - - var result = [smallerPolyline[0]]; - var smallPtIndex = 3; - segmentsPointsCount.forEach(function (segPtCount) { - if (segPtCount > 2) { - var spl = multipleSplitCubicSegment(_utils.utils.range(1, segPtCount - 1).map(function (i) { - return i / (segPtCount - 1); - }), smallerPolyline.slice(smallPtIndex - 3, smallPtIndex + 1)); - _utils.utils.range(segPtCount - 2).forEach(function (i) { - return spl[(i + 1) * 3].id = biggerPolyline[result.length - 1 + i * 3].id; - }); - if (decreasing) { - spl.forEach(function (p, i) { - if (i > 0 && i < spl.length - 1) { - p.isInterpolated = true; - } - }); - } - push(result, spl.slice(1)); - } else { - var newC0 = Object.assign({}, smallerPolyline[smallPtIndex - 2]); - var newC1 = Object.assign({}, smallerPolyline[smallPtIndex - 1]); - var newPt = Object.assign({}, smallerPolyline[smallPtIndex]); - if (!decreasing) { - newPt.id = biggerPolyline[result.length + 2].id; - } - result.push(newC0, newC1, newPt); - } - smallPtIndex += 3; - }); - - return result; - } - - /** - * Returns a function which moves a point from it's scale - * to opposite scale (e.g. from start scale to end scale). - */ - function getScaleDiffFn(points1, points2) { - - // Find remaining points with predictable position - var src = []; - var dst = []; - var i, - j, - a, - b, - matchJ = 0; - var len1 = points1.length; - var len2 = points2.length; - for (i = 0; i < len1; i++) { - a = points1[i]; - for (j = matchJ; j < len2; j++) { - b = points2[j]; - if (a.id === b.id) { - matchJ = j + 1; - src.push(a); - dst.push(b); - break; - } - } - } - - if (src.length < 1 || dst.length < 1) { - // Applying scale difference will not be possible - return function (d) { - return d; - }; - } - - var numProps = Object.keys(src[0]).filter(function (prop) { - return typeof src[0][prop] === 'number'; - }).filter(function (prop) { - return prop !== 'id'; - }); - - var propDiffs = {}; - var createPropDiffFn = function createPropDiffFn(a0, b0, a, b) { - return function (c0) { - return b + (c0 - b0) * (b - a) / (b0 - a0); - }; - }; - var createSimpleDiffFn = function createSimpleDiffFn(a0, a) { - return function (c0) { - return c0 - a0 + a; - }; - }; - numProps.forEach(function (prop) { - var a0 = src[0][prop]; - var a = dst[0][prop]; - for (var i = src.length - 1, b0, b; i > 0; i--) { - b0 = src[i][prop]; - if (b0 !== a0) { - b = dst[i][prop]; - propDiffs[prop] = createPropDiffFn(a0, b0, a, b); - return; - } - } - propDiffs[prop] = createSimpleDiffFn(a0, a); - }); - - return function (c0) { - var c = Object.assign({}, c0); - numProps.forEach(function (p) { - c[p] = propDiffs[p](c0[p]); - }); - return c; - }; - } - - function getDistance(x0, y0, x, y) { - return Math.sqrt((x - x0) * (x - x0) + (y - y0) * (y - y0)); - } - - function splitCubicSegment(t, _ref10) { - var _ref11 = _slicedToArray(_ref10, 4), - p0 = _ref11[0], - c0 = _ref11[1], - c1 = _ref11[2], - p1 = _ref11[3]; - - var seg = (0, _bezier.splitCubicSegment)(t, p0, c0, c1, p1); - [seg[1], seg[2], seg[4], seg[5]].forEach(function (c) { - return c.isCubicControl = true; - }); - Object.keys(p1).forEach(function (k) { - if (k !== 'x' && k !== 'y' && k !== 'id') { - seg[3][k] = interpolateValue(p0[k], p1[k], t); - } - }); - - return seg; - } - - function multipleSplitCubicSegment(ts, seg) { - var result = [seg[0]]; - for (var i = 0, t, spl; i < ts.length; i++) { - t = i === 0 ? ts[0] : ts[i] / (1 - ts[i - 1]); - spl = splitCubicSegment(t, seg); - push(result, spl.slice(1, 4)); - seg = spl.slice(3); - } - push(result, seg.slice(1)); - - return result; - } - -/***/ }, -/* 12 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.bezier = bezier; - exports.getBezierPoint = getBezierPoint; - exports.splitCubicSegment = splitCubicSegment; - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function bezier(t) { - if ((arguments.length <= 1 ? 0 : arguments.length - 1) === 2) { - return (arguments.length <= 1 ? undefined : arguments[1]) * (1 - t) + (arguments.length <= 2 ? undefined : arguments[2]) * t; - } - if ((arguments.length <= 1 ? 0 : arguments.length - 1) === 3) { - return (arguments.length <= 1 ? undefined : arguments[1]) * (1 - t) * (1 - t) + 2 * (arguments.length <= 2 ? undefined : arguments[2]) * (1 - t) * t + (arguments.length <= 3 ? undefined : arguments[3]) * t * t; - } - return (arguments.length <= 1 ? undefined : arguments[1]) * (1 - t) * (1 - t) * (1 - t) + 3 * (arguments.length <= 2 ? undefined : arguments[2]) * (1 - t) * (1 - t) * t + 3 * (arguments.length <= 3 ? undefined : arguments[3]) * (1 - t) * t * t + (arguments.length <= 4 ? undefined : arguments[4]) * t * t * t; - } - - function getBezierPoint(t) { - for (var _len = arguments.length, p = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - p[_key - 1] = arguments[_key]; - } - - var x = p.map(function (p) { - return p.x; - }); - var y = p.map(function (p) { - return p.y; - }); - x.unshift(t); - y.unshift(t); - return { - x: bezier.apply(undefined, _toConsumableArray(x)), - y: bezier.apply(undefined, _toConsumableArray(y)) - }; - } - - function splitCubicSegment(t, p0, c0, c1, p1) { - var c2 = getBezierPoint(t, p0, c0); - var c3 = getBezierPoint(t, p0, c0, c1); - var c4 = getBezierPoint(t, c0, c1, p1); - var c5 = getBezierPoint(t, c1, p1); - var m = getBezierPoint(t, c3, c4); - return [p0, c2, c3, m, c4, c5, p1]; - } - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getLineInterpolator = getLineInterpolator; - exports.getInterpolatorSplineType = getInterpolatorSplineType; - - var _smooth = __webpack_require__(14); - - var _step = __webpack_require__(15); - - var polylineInterpolators = { - linear: function linear(d) { - return d; - }, - step: _step.getStepLine, - 'step-before': _step.getStepBeforeLine, - 'step-after': _step.getStepAfterLine - }; - var curveInterpolators = { - smooth: _smooth.getCurve, - 'smooth-keep-extremum': _smooth.getCurveKeepingExtremums - }; - - function getLineInterpolator(type) { - return polylineInterpolators[type] || curveInterpolators[type]; - } - - function getInterpolatorSplineType(type) { - if (curveInterpolators[type] !== undefined) { - return 'cubic'; - } - return 'polyline'; - } - -/***/ }, -/* 14 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getCurve = getCurve; - exports.getCurveKeepingExtremums = getCurveKeepingExtremums; - - var _bezier = __webpack_require__(12); - - /** - * Returns smooth cubic spline. - * Applicable to math functions. - */ - function getCurve(points) { - return getCubicSpline(points, false); - } - - /** - * Returns cubic spline that never exceeds extremums. - * Applicable to business data. - */ - function getCurveKeepingExtremums(points) { - return getCubicSpline(points, true); - } - - // TODO: Smooth sengments junctions. - function getCubicSpline(points, limited) { - if (points.length < 2) { - return points.slice(0); - } - if (points.length === 2) { - return [points[0], { - x: interpolate(points[0].x, points[1].x, 1 / 3), - y: interpolate(points[0].y, points[1].y, 1 / 3) - }, { - x: interpolate(points[0].x, points[1].x, 2 / 3), - y: interpolate(points[0].y, points[1].y, 2 / 3) - }, points[1]]; - } - - var curve = new Array((points.length - 1) * 3 + 1); - var c0, p1, c3, c1x, c1y, c2x, c2y, qx, qy, qt, tan, dx1, dx2, kl; - for (var i = 0; i < points.length; i++) { - curve[i * 3] = points[i]; - if (i > 0) { - curve[i * 3 - 2] = (0, _bezier.getBezierPoint)(1 / 3, points[i - 1], points[i]); - curve[i * 3 - 1] = (0, _bezier.getBezierPoint)(2 / 3, points[i - 1], points[i]); - } - } - var result = curve.slice(0); - for (var j = 0, last; j < 3; j++) { - for (i = 6; i < result.length; i += 3) { - c0 = result[i - 5]; - p1 = result[i - 3]; - c3 = result[i - 1]; - if ((p1.x - c0.x) * (c3.x - p1.x) * 1e12 < 1) { - c1x = interpolate(c0.x, p1.x, 0.5); - c2x = interpolate(p1.x, c3.x, 0.5); - c1y = interpolate(c0.y, p1.y, 0.5); - c2y = interpolate(p1.y, c3.y, 0.5); - } else { - qt = (p1.x - c0.x) / (c3.x - c0.x); - qx = (p1.x - c0.x * (1 - qt) * (1 - qt) - c3.x * qt * qt) / (2 * (1 - qt) * qt); - qy = (p1.y - c0.y * (1 - qt) * (1 - qt) - c3.y * qt * qt) / (2 * (1 - qt) * qt); - c1x = interpolate(c0.x, qx, qt); - c2x = interpolate(qx, c3.x, qt); - c1y = interpolate(c0.y, qy, qt); - c2y = interpolate(qy, c3.y, qt); - - if (limited) { - dx1 = p1.x - c1x; - dx2 = c2x - p1.x; - tan = (c2y - p1.y) / dx2; - if ((p1.y - c0.y) * (c3.y - p1.y) <= 0) { - tan = 0; - } else { - if (p1.y > c0.y === c2y > c3.y) { - kl = (c3.y - p1.y) / (c2y - p1.y); - dx2 = interpolate(dx2 * kl, dx2, 1 / (1 + Math.abs(kl))); - tan = (c3.y - p1.y) / dx2; - } - if (p1.y > c0.y === c1y < c0.y) { - kl = (p1.y - c0.y) / (p1.y - c1y); - dx1 = interpolate(dx1 * kl, dx1, 1 / (1 + Math.abs(kl))); - tan = (p1.y - c0.y) / dx1; - } - } - c1x = p1.x - dx1; - c2x = p1.x + dx2; - c1y = p1.y - tan * dx1; - c2y = p1.y + tan * dx2; - } - } - curve[i - 4] = { x: c1x, y: c1y }; - curve[i - 2] = { x: c2x, y: c2y }; - } - curve[1] = { - x: interpolate(curve[0].x, curve[3].x, 1 / 3), - y: interpolate(curve[0].y, interpolate(curve[3].y, curve[2].y, 3 / 2), 2 / 3) - }; - last = curve.length - 1; - curve[last - 1] = { - x: interpolate(curve[last].x, curve[last - 3].x, 1 / 3), - y: interpolate(curve[last].y, interpolate(curve[last - 3].y, curve[last - 2].y, 3 / 2), 2 / 3) - }; - result = curve.slice(0); - } - - return result; - } - - function interpolate(a, b, t) { - return a + t * (b - a); - } - -/***/ }, -/* 15 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getStepLine = getStepLine; - exports.getStepBeforeLine = getStepBeforeLine; - exports.getStepAfterLine = getStepAfterLine; - function getStepLine(points) { - var result = []; - var hasId = points[0].id !== undefined; - var hasSize = points[0].size !== undefined; - for (var i = 1, p0, p1, m0, m1; i < points.length; i++) { - p0 = points[i - 1]; - p1 = points[i]; - m0 = { - x: (p0.x + p1.x) / 2, - y: p0.y - }; - m1 = { - x: (p0.x + p1.x) / 2, - y: p1.y - }; - if (hasId) { - m0.id = p0.id + "-" + p1.id + "-1"; - m1.id = p0.id + "-" + p1.id + "-2"; - } - if (hasSize) { - m0.size = p0.size; - m1.size = p1.size; - } - if (i === 1) { - result.push(p0); - } - result.push(m0, m1, p1); - } - return result; - } - - function getStepBeforeLine(points) { - var result = []; - var hasId = points[0].id !== undefined; - var hasSize = points[0].size !== undefined; - for (var i = 1, p0, p1, m; i < points.length; i++) { - p0 = points[i - 1]; - p1 = points[i]; - m = { - x: p0.x, - y: p1.y - }; - if (hasId) { - m.id = p0.id + "-" + p1.id; - } - if (hasSize) { - m.size = p1.size; - } - if (i === 1) { - result.push(p0); - } - result.push(m, p1); - } - return result; - } - - function getStepAfterLine(points) { - var result = []; - var hasId = points[0].id !== undefined; - var hasSize = points[0].size !== undefined; - for (var i = 1, p0, p1, m; i < points.length; i++) { - p0 = points[i - 1]; - p1 = points[i]; - m = { - x: p1.x, - y: p0.y - }; - if (hasId) { - m.id = p0.id + "-" + p1.id; - } - if (hasSize) { - m.size = p0.size; - } - if (i === 1) { - result.push(p0); - } - result.push(m, p1); - } - return result; - } - -/***/ }, -/* 16 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.GPL = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _event = __webpack_require__(6); - - var _utils = __webpack_require__(3); - - var _algebra = __webpack_require__(17); - - var _dataFrame = __webpack_require__(19); - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var cast = function cast(v) { - return _utils.utils.isDate(v) ? v.getTime() : v; - }; - - var MixinModel = function MixinModel(prev) { - var _this = this; - - Object.keys(prev).forEach(function (k) { - return _this[k] = prev[k]; - }); - }; - - var compose = function compose(prev) { - var updates = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return Object.assign(new MixinModel(prev), updates); - }; - - var evalGrammarRules = function evalGrammarRules(grammarRules, initialGrammarModel, grammarRegistry) { - return grammarRules.map(function (rule) { - return typeof rule === 'string' ? grammarRegistry.get(rule) : rule; - }).filter(function (x) { - return x; - }).reduce(function (prevModel, rule) { - return compose(prevModel, rule(prevModel, {})); - }, initialGrammarModel); - }; - - var GPL = exports.GPL = function (_Emitter) { - _inherits(GPL, _Emitter); - - function GPL(config, scalesRegistryInstance, unitsRegistry, grammarRules) { - _classCallCheck(this, GPL); - - // jscs:disable - var _this2 = _possibleConstructorReturn(this, (GPL.__proto__ || Object.getPrototypeOf(GPL)).call(this)); - - _utils.utils.defaults(config.scales, { - 'size_null': { type: 'size', source: '?' }, - 'split_null': { type: 'value', source: '?' }, - 'label_null': { type: 'value', source: '?' }, - 'color_null': { type: 'color', source: '?' }, - 'identity_null': { type: 'identity', source: '?' }, - 'size:default': { type: 'size', source: '?' }, - 'color:default': { type: 'color', source: '?' }, - 'split:default': { type: 'value', source: '?' }, - 'label:default': { type: 'value', source: '?' }, - 'identity:default': { type: 'identity', source: '?' } - }); - // jscs:enable - - config.settings = config.settings || {}; - - _this2.config = config; - _this2.sources = config.sources; - _this2.scales = config.scales; - _this2.unitSet = unitsRegistry; - _this2.grammarRules = grammarRules; - _this2.scalesHub = scalesRegistryInstance; - - _this2.transformations = Object.assign(config.transformations || {}, { - where: function where(data, tuple) { - var predicates = Object.keys(tuple || {}).map(function (k) { - return function (row) { - return cast(row[k]) === tuple[k]; - }; - }); - return data.filter(function (row) { - return predicates.every(function (p) { - return p(row); - }); - }); - } - }); - return _this2; - } - - _createClass(GPL, [{ - key: 'unfoldStructure', - value: function unfoldStructure() { - this.root = this._expandUnitsStructure(this.config.unit); - return this.config; - } - }, { - key: 'getDrawScenarioQueue', - value: function getDrawScenarioQueue(root) { - var _this3 = this; - - var grammarRules = this.grammarRules; - var scaleInfoQueue = this._flattenDrawScenario(root, function (parentInstance, unit, rootFrame) { - // Rule to cancel parent frame inheritance - var frame = unit.expression.inherit === false ? null : rootFrame; - var scalesFactoryMethod = _this3._createFrameScalesFactoryMethod(frame); - var instance = _this3.unitSet.create(unit.type, Object.assign({}, unit, { options: parentInstance.allocateRect(rootFrame.key) })); - - var initialModel = new MixinModel(instance.defineGrammarModel(scalesFactoryMethod)); - var grammarModel = evalGrammarRules(instance.getGrammarRules(), initialModel, grammarRules); - evalGrammarRules(instance.getAdjustScalesRules(), grammarModel, grammarRules); - instance.node().screenModel = instance.createScreenModel(grammarModel); - - return instance; - }); - - var createScales = function createScales() { - Object.keys(_this3.scales).forEach(function (k) { - return _this3.scalesHub.createScaleInfo(_this3.scales[k]).commit(); - }); - }; - - var updateScalesQueue = this._flattenDrawScenario(root, function (parentInstance, unit, rootFrame) { - var frame = unit.expression.inherit === false ? null : rootFrame; - var scalesFactoryMethod = _this3._createFrameScalesFactoryMethod(frame); - var instance = _this3.unitSet.create(unit.type, Object.assign({}, unit, { options: parentInstance.allocateRect(rootFrame.key) })); - - var initialModel = new MixinModel(instance.defineGrammarModel(scalesFactoryMethod)); - var grammarModel = evalGrammarRules(instance.getGrammarRules(), initialModel, grammarRules); - instance.node().screenModel = instance.createScreenModel(grammarModel); - instance.parentUnit = parentInstance; - instance.addInteraction(); - - return instance; - }); - - return scaleInfoQueue.concat(createScales).concat(updateScalesQueue); - } - }, { - key: '_flattenDrawScenario', - value: function _flattenDrawScenario(root, iterator) { - - var uids = {}; - var scenario = []; - - var stack = [root]; - - var put = function put(x) { - return stack.unshift(x); - }; - var pop = function pop() { - return stack.shift(); - }; - var top = function top() { - return stack[0]; - }; - - var queue = GPL.traverseSpec({ unit: this.root }, - // enter - function (unit, parentUnit, currFrame) { - - unit.uid = function () { - var uid = _utils.utils.generateHash((parentUnit ? parentUnit.uid + '/' : '') + JSON.stringify(Object.keys(unit).filter(function (key) { - return typeof unit[key] === 'string'; - }).reduce(function (memo, key) { - return memo[key] = unit[key], memo; - }, {})) + ('-' + JSON.stringify(currFrame.pipe))); - if (uid in uids) { - uid += '-' + ++uids[uid]; - } else { - uids[uid] = 0; - } - return uid; - }(); - unit.guide = _utils.utils.clone(unit.guide); - - var instance = iterator(top(), unit, currFrame); - - scenario.push(instance); - - if (unit.type.indexOf('COORDS.') === 0) { - put(instance); - } - }, - // exit - function (unit) { - if (unit.type.indexOf('COORDS.') === 0) { - pop(); - } - }, null, this._datify({ - source: this.root.expression.source, - pipe: [] - })); - - queue.push(function () { - return scenario; - }); - - return queue; - } - }, { - key: '_expandUnitsStructure', - value: function _expandUnitsStructure(root) { - var _this4 = this; - - var parentPipe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - - - var self = this; - - if (root.expression.operator === false) { - - root.frames = root.frames.map(function (f) { - return self._datify(f); - }); - } else { - - var expr = this._parseExpression(root.expression, parentPipe, root.guide); - - root.transformation = root.transformation || []; - - root.frames = expr.exec().map(function (tuple) { - - var flow = expr.inherit ? parentPipe : []; - var pipe = flow.concat([{ type: 'where', args: tuple }]).concat(root.transformation); - - return self._datify({ - key: tuple, - pipe: pipe, - source: expr.source, - units: root.units ? root.units.map(function (unit) { - var clone = _utils.utils.clone(unit); - // pass guide by reference - clone.guide = unit.guide; - return clone; - }) : [] - }); - }); - } - - root.frames.forEach(function (f) { - return f.units.forEach(function (unit) { - return _this4._expandUnitsStructure(unit, f.pipe); - }); - }); - - return root; - } - }, { - key: '_createFrameScalesFactoryMethod', - value: function _createFrameScalesFactoryMethod(passFrame) { - var self = this; - return function (type, alias, dynamicProps) { - var key = alias || type + ':default'; - return self.scalesHub.createScaleInfo(self.scales[key], passFrame).create(dynamicProps); - }; - } - }, { - key: '_datify', - value: function _datify(frame) { - return new _dataFrame.DataFrame(frame, this.sources[frame.source].data, this.transformations); - } - }, { - key: '_parseExpression', - value: function _parseExpression(expr, parentPipe, guide) { - var _this5 = this; - - var funcName = expr.operator || 'none'; - var srcAlias = expr.source; - var bInherit = expr.inherit !== false; // true by default - var funcArgs = expr.params; - - var frameConfig = { - source: srcAlias, - pipe: bInherit ? parentPipe : [] - }; - - var dataFn = function dataFn() { - return _this5._datify(frameConfig).part(); - }; - - var func = _algebra.FramesAlgebra[funcName]; - - if (!func) { - throw new Error(funcName + ' operator is not supported'); - } - - return { - source: srcAlias, - inherit: bInherit, - func: func, - args: funcArgs, - exec: function exec() { - return func.apply(undefined, [dataFn].concat(_toConsumableArray(funcArgs || []), [guide])); - } - }; - } - }], [{ - key: 'traverseSpec', - value: function traverseSpec(spec, enter, exit) { - var rootNode = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - var rootFrame = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; - - - var queue = []; - - var traverse = function traverse(node, enter, exit, parentNode, currFrame) { - - queue.push(function () { - enter(node, parentNode, currFrame); - }); - - if (node.frames) { - node.frames.forEach(function (frame) { - (frame.units || []).map(function (subNode) { - return traverse(subNode, enter, exit, node, frame); - }); - }); - } - - queue.push(function () { - return exit(node, parentNode, currFrame); - }); - }; - - traverse(spec.unit, enter, exit, rootNode, rootFrame); - - return queue; - } - }]); - - return GPL; - }(_event.Emitter); - -/***/ }, -/* 17 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.FramesAlgebra = undefined; - - var _utils = __webpack_require__(3); - - var _unitDomainPeriodGenerator = __webpack_require__(18); - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - var unify = function unify(v) { - return _utils.utils.isDate(v) ? v.getTime() : v; - }; - - var FramesAlgebra = { - cross: function cross(dataFn, dimX, dimY) { - - var data = dataFn(); - - var domainX = _utils.utils.unique(data.map(function (x) { - return x[dimX]; - }), unify); - var domainY = _utils.utils.unique(data.map(function (x) { - return x[dimY]; - }), unify); - - var domX = domainX.length === 0 ? [null] : domainX; - var domY = domainY.length === 0 ? [null] : domainY; - - return domY.reduce(function (memo, rowVal) { - - return memo.concat(domX.map(function (colVal) { - - var r = {}; - - if (dimX) { - r[dimX] = unify(colVal); - } - - if (dimY) { - r[dimY] = unify(rowVal); - } - - return r; - })); - }, []); - }, - cross_period: function cross_period(dataFn, dimX, dimY, xPeriod, yPeriod, guide) { - var data = dataFn(); - var utc = guide ? guide.utcTime : false; - - var domainX = _utils.utils.unique(data.map(function (x) { - return x[dimX]; - }), unify); - var domainY = _utils.utils.unique(data.map(function (x) { - return x[dimY]; - }), unify); - - var domX = domainX.length === 0 ? [null] : domainX; - var domY = domainY.length === 0 ? [null] : domainY; - - if (xPeriod) { - domX = _unitDomainPeriodGenerator.UnitDomainPeriodGenerator.generate(Math.min.apply(Math, _toConsumableArray(domainX)), Math.max.apply(Math, _toConsumableArray(domainX)), xPeriod, { utc: utc }); - } - - if (yPeriod) { - domY = _unitDomainPeriodGenerator.UnitDomainPeriodGenerator.generate(Math.min.apply(Math, _toConsumableArray(domainY)), Math.max.apply(Math, _toConsumableArray(domainY)), yPeriod, { utc: utc }); - } - - return domY.reduce(function (memo, rowVal) { - - return memo.concat(domX.map(function (colVal) { - - var r = {}; - - if (dimX) { - r[dimX] = unify(colVal); - } - - if (dimY) { - r[dimY] = unify(rowVal); - } - - return r; - })); - }, []); - }, - groupBy: function groupBy(dataFn, dim) { - var data = dataFn(); - var domainX = _utils.utils.unique(data.map(function (x) { - return x[dim]; - }), unify); - return domainX.map(function (x) { - return _defineProperty({}, dim, unify(x)); - }); - }, - none: function none() { - return [null]; - } - }; - - exports.FramesAlgebra = FramesAlgebra; - -/***/ }, -/* 18 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var PERIODS_MAP = { - - day: { - cast: function cast(d) { - var date = new Date(d); - return new Date(date.setHours(0, 0, 0, 0)); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setDate(prev.getDate() + 1)); - return this.cast(next); - } - }, - - week: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setHours(0, 0, 0, 0)); - return new Date(date.setDate(date.getDate() - date.getDay())); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setDate(prev.getDate() + 7)); - return this.cast(next); - } - }, - - month: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setHours(0, 0, 0, 0)); - date = new Date(date.setDate(1)); - return date; - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setMonth(prev.getMonth() + 1)); - return this.cast(next); - } - }, - - quarter: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setHours(0, 0, 0, 0)); - date = new Date(date.setDate(1)); - var currentMonth = date.getMonth(); - var firstQuarterMonth = currentMonth - currentMonth % 3; - return new Date(date.setMonth(firstQuarterMonth)); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setMonth(prev.getMonth() + 3)); - return this.cast(next); - } - }, - - year: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setHours(0, 0, 0, 0)); - date = new Date(date.setDate(1)); - date = new Date(date.setMonth(0)); - return date; - }, - - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setFullYear(prev.getFullYear() + 1)); - return this.cast(next); - } - } - }; - - var PERIODS_MAP_UTC = { - - day: { - cast: function cast(d) { - var date = new Date(d); - return new Date(date.setUTCHours(0, 0, 0, 0)); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setUTCDate(prev.getUTCDate() + 1)); - return this.cast(next); - } - }, - - week: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setUTCHours(0, 0, 0, 0)); - return new Date(date.setUTCDate(date.getUTCDate() - date.getUTCDay())); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setUTCDate(prev.getUTCDate() + 7)); - return this.cast(next); - } - }, - - month: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setUTCHours(0, 0, 0, 0)); - date = new Date(date.setUTCDate(1)); - return date; - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setUTCMonth(prev.getUTCMonth() + 1)); - return this.cast(next); - } - }, - - quarter: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setUTCHours(0, 0, 0, 0)); - date = new Date(date.setUTCDate(1)); - var currentMonth = date.getUTCMonth(); - var firstQuarterMonth = currentMonth - currentMonth % 3; - return new Date(date.setUTCMonth(firstQuarterMonth)); - }, - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setUTCMonth(prev.getUTCMonth() + 3)); - return this.cast(next); - } - }, - - year: { - cast: function cast(d) { - var date = new Date(d); - date = new Date(date.setUTCHours(0, 0, 0, 0)); - date = new Date(date.setUTCDate(1)); - date = new Date(date.setUTCMonth(0)); - return date; - }, - - next: function next(d) { - var prev = new Date(d); - var next = new Date(prev.setUTCFullYear(prev.getUTCFullYear() + 1)); - return this.cast(next); - } - } - }; - - var UnitDomainPeriodGenerator = { - - add: function add(periodAlias, obj) { - var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : { utc: false }, - utc = _ref.utc; - - (utc ? PERIODS_MAP_UTC : PERIODS_MAP)[periodAlias.toLowerCase()] = obj; - return this; - }, - - get: function get(periodAlias) { - var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { utc: false }, - utc = _ref2.utc; - - var alias = periodAlias || ''; - return (utc ? PERIODS_MAP_UTC : PERIODS_MAP)[alias.toLowerCase()] || null; - }, - - generate: function generate(lTick, rTick, periodAlias) { - var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { utc: false }, - utc = _ref3.utc; - - var r = []; - var period = UnitDomainPeriodGenerator.get(periodAlias, { utc: utc }); - if (period) { - var last = period.cast(new Date(rTick)); - var curr = period.cast(new Date(lTick)); - r.push(curr); - while ((curr = period.next(new Date(curr))) <= last) { - r.push(curr); - } - } - return r; - } - }; - - exports.UnitDomainPeriodGenerator = UnitDomainPeriodGenerator; - -/***/ }, -/* 19 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DataFrame = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var DataFrame = exports.DataFrame = function () { - function DataFrame(_ref, dataSource) { - var key = _ref.key, - pipe = _ref.pipe, - source = _ref.source, - units = _ref.units; - var transformations = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - _classCallCheck(this, DataFrame); - - this.key = key; - this.pipe = pipe || []; - this.source = source; - this.units = units; - - this._frame = { key: key, source: source, pipe: this.pipe }; - this._data = dataSource; - this._pipeReducer = function (data, pipeCfg) { - return transformations[pipeCfg.type](data, pipeCfg.args); - }; - } - - _createClass(DataFrame, [{ - key: 'hash', - value: function hash() { - var x = [this._frame.pipe, this._frame.key, this._frame.source].map(JSON.stringify).join(''); - - return _utils.utils.generateHash(x); - } - }, { - key: 'full', - value: function full() { - return this._data; - } - }, { - key: 'part', - value: function part() { - var pipeMapper = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function (x) { - return x; - }; - - return this._frame.pipe.map(pipeMapper).reduce(this._pipeReducer, this._data); - } - }]); - - return DataFrame; - }(); - -/***/ }, -/* 20 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Plot = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - - var _balloon = __webpack_require__(21); - - var _event = __webpack_require__(6); - - var _plugins = __webpack_require__(24); - - var _utils = __webpack_require__(3); - - var _utilsDom = __webpack_require__(1); - - var _d3Decorators = __webpack_require__(9); - - var _grammarRegistry = __webpack_require__(7); - - var _unitsRegistry = __webpack_require__(25); - - var _scalesRegistry = __webpack_require__(26); - - var _scalesFactory = __webpack_require__(27); - - var _dataProcessor = __webpack_require__(28); - - var _layuotTemplate = __webpack_require__(29); - - var _specConverter = __webpack_require__(30); - - var _specTransformAutoLayout = __webpack_require__(31); - - var _specTransformCalcSize = __webpack_require__(33); - - var _specTransformApplyRatio = __webpack_require__(35); - - var _specTransformExtractAxes = __webpack_require__(36); - - var _const = __webpack_require__(22); - - var _tau = __webpack_require__(16); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _taskRunner = __webpack_require__(37); - - var _taskRunner2 = _interopRequireDefault(_taskRunner); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var selectOrAppend = _utilsDom.utilsDom.selectOrAppend; - var selectImmediate = _utilsDom.utilsDom.selectImmediate; - - var Plot = exports.Plot = function (_Emitter) { - _inherits(Plot, _Emitter); - - function Plot(config) { - _classCallCheck(this, Plot); - - var _this = _possibleConstructorReturn(this, (Plot.__proto__ || Object.getPrototypeOf(Plot)).call(this)); - - _this._nodes = []; - _this._svg = null; - _this._filtersStore = { - filters: {}, - tick: 0 - }; - _this._layout = (0, _layuotTemplate.getLayout)(); - - var iref = 0; - config.settings = Plot.setupSettings(_utils.utils.defaults(config.settings || {}, { - references: new WeakMap(), - refCounter: function refCounter() { - return ++iref; - } - })); - - if (['sources', 'scales'].filter(function (p) { - return config.hasOwnProperty(p); - }).length === 2) { - _this.configGPL = config; - } else { - _this.configGPL = new _specConverter.SpecConverter(_this.setupConfig(config)).convert(); - } - - _this.configGPL = Plot.setupPeriodData(_this.configGPL); - - var plugins = config.plugins || []; - - _this.transformers = [_specTransformApplyRatio.SpecTransformApplyRatio, _specTransformAutoLayout.SpecTransformAutoLayout]; - - _this.onUnitsStructureExpandedTransformers = [_specTransformExtractAxes.SpecTransformExtractAxes, _specTransformCalcSize.SpecTransformCalcSize]; - - _this._originData = Object.assign({}, _this.configGPL.sources); - _this._chartDataModel = function (src) { - return src; - }; - _this._liveSpec = _this.configGPL; - _this._plugins = new _plugins.Plugins(plugins, _this); - - _this._reportProgress = null; - _this._taskRunner = null; - _this._renderingPhase = null; - return _this; - } - - _createClass(Plot, [{ - key: 'destroy', - value: function destroy() { - this.destroyNodes(); - _d2.default.select(this._svg).remove(); - _d2.default.select(this._layout.layout).remove(); - this._cancelRendering(); - _get(Plot.prototype.__proto__ || Object.getPrototypeOf(Plot.prototype), 'destroy', this).call(this); - } - }, { - key: 'setupChartSourceModel', - value: function setupChartSourceModel(fnModelTransformation) { - this._chartDataModel = fnModelTransformation; - } - }, { - key: 'setupConfig', - value: function setupConfig(config) { - - if (!config.spec || !config.spec.unit) { - throw new Error('Provide spec for plot'); - } - - var resConfig = _utils.utils.defaults(config, { - spec: {}, - data: [], - plugins: [], - settings: {} - }); - - this._emptyContainer = config.emptyContainer || ''; - - resConfig.spec.dimensions = Plot.setupMetaInfo(resConfig.spec.dimensions, resConfig.data); - - var log = resConfig.settings.log; - if (resConfig.settings.excludeNull) { - this.addFilter({ - tag: 'default', - src: '/', - predicate: _dataProcessor.DataProcessor.excludeNullValues(resConfig.spec.dimensions, function (item) { - return log([item, 'point was excluded, because it has undefined values.'], 'WARN'); - }) - }); - } - - return resConfig; - } - }, { - key: 'insertToLeftSidebar', - value: function insertToLeftSidebar(el) { - return _utilsDom.utilsDom.appendTo(el, this._layout.leftSidebar); - } - }, { - key: 'insertToRightSidebar', - value: function insertToRightSidebar(el) { - return _utilsDom.utilsDom.appendTo(el, this._layout.rightSidebar); - } - }, { - key: 'insertToFooter', - value: function insertToFooter(el) { - return _utilsDom.utilsDom.appendTo(el, this._layout.footer); - } - }, { - key: 'insertToHeader', - value: function insertToHeader(el) { - return _utilsDom.utilsDom.appendTo(el, this._layout.header); - } - }, { - key: 'addBalloon', - value: function addBalloon(conf) { - return new _balloon.Tooltip('', conf || {}); - } - }, { - key: 'destroyNodes', - value: function destroyNodes() { - this._nodes.forEach(function (node) { - return node.destroy(); - }); - this._nodes = []; - this._renderedItems = []; - } - }, { - key: 'onUnitDraw', - value: function onUnitDraw(unitNode) { - var _this2 = this; - - this._nodes.push(unitNode); - this.fire('unitdraw', unitNode); - ['click', 'mouseover', 'mouseout'].forEach(function (eventName) { - return unitNode.on(eventName, function (sender, e) { - _this2.fire('element' + eventName, { - element: sender, - data: e.data, - event: e.event - }); - }); - }); - } - }, { - key: 'onUnitsStructureExpanded', - value: function onUnitsStructureExpanded(specRef) { - var _this3 = this; - - this.onUnitsStructureExpandedTransformers.forEach(function (TClass) { - return new TClass(specRef).transform(_this3); - }); - this.fire(['units', 'structure', 'expanded'].join(''), specRef); - } - }, { - key: '_getClosestElementPerUnit', - value: function _getClosestElementPerUnit(x0, y0) { - return this._renderedItems.filter(function (d) { - return d.getClosestElement; - }).map(function (item) { - var closest = item.getClosestElement(x0, y0); - var unit = item.node(); - return { unit: unit, closest: closest }; - }); - } - }, { - key: 'disablePointerEvents', - value: function disablePointerEvents() { - this._layout.layout.style.pointerEvents = 'none'; - } - }, { - key: 'enablePointerEvents', - value: function enablePointerEvents() { - this._layout.layout.style.pointerEvents = ''; - } - }, { - key: '_handlePointerEvent', - value: function _handlePointerEvent(event) { - // TODO: Highlight API seems not consistent. - // Just predicate is not enough, also - // need coordinates or event object. - var svgRect = this._svg.getBoundingClientRect(); - var x = event.clientX - svgRect.left; - var y = event.clientY - svgRect.top; - var eventType = event.type; - var isClick = eventType === 'click'; - var dataEvent = isClick ? 'data-click' : 'data-hover'; - var data = null; - var node = null; - var items = this._getClosestElementPerUnit(x, y); - var nonEmpty = items.filter(function (d) { - return d.closest; - }).sort(function (a, b) { - return a.closest.distance === b.closest.distance ? a.closest.secondaryDistance - b.closest.secondaryDistance : a.closest.distance - b.closest.distance; - }); - if (nonEmpty.length > 0) { - var largerDistIndex = nonEmpty.findIndex(function (d) { - return d.closest.distance !== nonEmpty[0].closest.distance || d.closest.secondaryDistance !== nonEmpty[0].closest.secondaryDistance; - }); - var sameDistItems = largerDistIndex < 0 ? nonEmpty : nonEmpty.slice(0, largerDistIndex); - if (sameDistItems.length === 1) { - data = sameDistItems[0].closest.data; - node = sameDistItems[0].closest.node; - } else { - var mx = sameDistItems.reduce(function (sum, item) { - return sum + item.closest.x; - }, 0) / sameDistItems.length; - var my = sameDistItems.reduce(function (sum, item) { - return sum + item.closest.y; - }, 0) / sameDistItems.length; - var angle = Math.atan2(my - y, mx - x) + Math.PI; - var closest = sameDistItems[Math.round((sameDistItems.length - 1) * angle / 2 / Math.PI)].closest; - - data = closest.data; - node = closest.node; - } - } - - items.forEach(function (item) { - return item.unit.fire(dataEvent, { event: event, data: data, node: node }); - }); - } - }, { - key: '_initPointerEvents', - value: function _initPointerEvents() { - var _this4 = this; - - if (!this._liveSpec.settings.syncPointerEvents) { - this._pointerAnimationFrameId = null; - } - var svg = _d2.default.select(this._svg); - var wrapEventHandler = this._liveSpec.settings.syncPointerEvents ? function (handler) { - return function () { - return handler(_d2.default.event); - }; - } : function (handler) { - return function () { - var e = _d2.default.event; - if (_this4._pointerAnimationFrameId && e.type !== 'mousemove') { - _this4._cancelPointerAnimationFrame(); - } - if (!_this4._pointerAnimationFrameId) { - _this4._pointerAnimationFrameId = requestAnimationFrame(function () { - _this4._pointerAnimationFrameId = null; - handler(e); - }); - } - }; - }; - var handler = function handler(e) { - return _this4._handlePointerEvent(e); - }; - svg.on('mousemove', wrapEventHandler(handler)); - svg.on('click', wrapEventHandler(handler)); - svg.on('mouseleave', wrapEventHandler(function (event) { - if (window.getComputedStyle(_this4._svg).pointerEvents !== 'none') { - _this4.select(function () { - return true; - }).forEach(function (unit) { - return unit.fire('data-hover', { event: event, data: null, node: null }); - }); - } - })); - } - }, { - key: '_cancelPointerAnimationFrame', - value: function _cancelPointerAnimationFrame() { - cancelAnimationFrame(this._pointerAnimationFrameId); - this._pointerAnimationFrameId = null; - } - }, { - key: '_setupTaskRunner', - value: function _setupTaskRunner(liveSpec) { - var _this5 = this; - - this._resetTaskRunner(); - this._taskRunner = new _taskRunner2.default({ - timeout: liveSpec.settings.renderingTimeout || Number.MAX_SAFE_INTEGER, - syncInterval: liveSpec.settings.asyncRendering ? liveSpec.settings.syncRenderingInterval : Number.MAX_SAFE_INTEGER, - callbacks: { - done: function done() { - _this5._completeRendering(); - _this5._renderingPhase = null; - }, - timeout: function timeout(_timeout, taskRunner) { - _this5._displayTimeoutWarning({ - timeout: _timeout, - proceed: function proceed() { - _this5.disablePointerEvents(); - taskRunner.setTimeout(Number.MAX_SAFE_INTEGER); - taskRunner.run(); - }, - cancel: function cancel() { - _this5._cancelRendering(); - } - }); - _this5.enablePointerEvents(); - _this5.fire('renderingtimeout'); - }, - progress: function progress(_progress) { - var phases = { - spec: 0, - draw: 1 - }; - var p = phases[_this5._renderingPhase] / 2 + _progress / 2; - _this5._reportProgress(p); - }, - error: liveSpec.settings.handleRenderingErrors ? function (err) { - _this5._cancelRendering(); - _this5._displayRenderingError(err); - _this5.fire('renderingerror', err); - liveSpec.settings.log(['An error occured during chart rendering.', 'Set "handleRenderingErrors: false" in chart settings to debug.', 'Error message: ' + err.message].join(' '), 'ERROR'); - } : null - } - }); - return this._taskRunner; - } - }, { - key: '_resetTaskRunner', - value: function _resetTaskRunner() { - if (this._taskRunner && this._taskRunner.isRunning()) { - this._taskRunner.stop(); - this._taskRunner = null; - } - } - }, { - key: 'renderTo', - value: function renderTo(target, xSize) { - - this._resetProgressLayout(); - - var liveSpec = this._createLiveSpec(target, xSize); - if (!liveSpec) { - this._svg = null; - this._layout.content.innerHTML = this._emptyContainer; - this.enablePointerEvents(); - return; - } - - var gpl = this._createGPL(liveSpec); - - var taskRunner = this._setupTaskRunner(liveSpec); - this._scheduleDrawScenario(taskRunner, gpl); - this._scheduleDrawing(taskRunner, gpl); - taskRunner.run(); - } - }, { - key: '_createLiveSpec', - value: function _createLiveSpec(target, xSize) { - var _this6 = this; - - this.disablePointerEvents(); - this._target = target; - this._defaultSize = Object.assign({}, xSize); - - var targetNode = _d2.default.select(target).node(); - if (targetNode === null) { - throw new Error('Target element not found'); - } - - if (this._layout.layout.parentNode !== targetNode) { - targetNode.appendChild(this._layout.layout); - } - - var content = this._layout.content; - - // Set padding to fit scrollbar size - var s = _utilsDom.utilsDom.getScrollbarSize(this._layout.contentContainer); - this._layout.contentContainer.style.padding = '0 ' + s.width + 'px ' + s.height + 'px 0'; - _utilsDom.utilsDom.setScrollPadding(this._layout.rightSidebarContainer, 'vertical'); - - var size = Object.assign({}, xSize) || {}; - if (!size.width || !size.height) { - var _content$parentElemen = content.parentElement, - scrollLeft = _content$parentElemen.scrollLeft, - scrollTop = _content$parentElemen.scrollTop; - - content.style.display = 'none'; - size = _utils.utils.defaults(size, _utilsDom.utilsDom.getContainerSize(content.parentNode)); - content.style.display = ''; - content.parentElement.scrollLeft = scrollLeft; - content.parentElement.scrollTop = scrollTop; - // TODO: fix this issue - if (!size.height) { - size.height = _utilsDom.utilsDom.getContainerSize(this._layout.layout).height; - } - } - - this.configGPL.settings.size = size; - - this._liveSpec = _utils.utils.clone(_utils.utils.omit(this.configGPL, 'plugins')); - this._liveSpec.sources = this.getDataSources(); - this._liveSpec.settings = this.configGPL.settings; - - this._experimentalSetupAnimationSpeed(this._liveSpec); - - if (this.isEmptySources(this._liveSpec.sources)) { - return null; - } - - this._liveSpec = this.transformers.reduce(function (memo, TransformClass) { - return new TransformClass(memo).transform(_this6); - }, this._liveSpec); - - this.destroyNodes(); - - this.fire('specready', this._liveSpec); - - return this._liveSpec; - } - }, { - key: '_experimentalSetupAnimationSpeed', - value: function _experimentalSetupAnimationSpeed(spec) { - // Determine if it's better to draw chart without animation - spec.settings.initialAnimationSpeed = spec.settings.initialAnimationSpeed || spec.settings.animationSpeed; - var animationSpeed = spec.settings.experimentalShouldAnimate(spec) ? spec.settings.initialAnimationSpeed : 0; - spec.settings.animationSpeed = animationSpeed; - var setUnitAnimation = function setUnitAnimation(u) { - u.guide = u.guide || {}; - u.guide.animationSpeed = animationSpeed; - if (u.units) { - u.units.forEach(setUnitAnimation); - } - }; - setUnitAnimation(spec.unit); - } - }, { - key: '_createGPL', - value: function _createGPL(liveSpec) { - var gpl = new _tau.GPL(liveSpec, this.getScaleFactory(), _unitsRegistry.unitsRegistry, _grammarRegistry.GrammarRegistry); - var structure = gpl.unfoldStructure(); - this.onUnitsStructureExpanded(structure); - - return gpl; - } - }, { - key: '_scheduleDrawScenario', - value: function _scheduleDrawScenario(taskRunner, gpl) { - var _this7 = this; - - var d3Target = _d2.default.select(this._layout.content); - var newSize = gpl.config.settings.size; - taskRunner.addTask(function () { - return _this7._renderingPhase = 'spec'; - }); - gpl.getDrawScenarioQueue({ - allocateRect: function allocateRect() { - return { - slot: function slot(uid) { - return d3Target.selectAll('.uid_' + uid); - }, - frameId: 'root', - left: 0, - top: 0, - width: newSize.width, - containerWidth: newSize.width, - height: newSize.height, - containerHeight: newSize.height - }; - } - }).forEach(function (task) { - return taskRunner.addTask(task); - }); - } - }, { - key: '_scheduleDrawing', - value: function _scheduleDrawing(taskRunner, gpl) { - var _this8 = this; - - var newSize = gpl.config.settings.size; - taskRunner.addTask(function (scenario) { - _this8._renderingPhase = 'draw'; - _this8._renderRoot({ scenario: scenario, newSize: newSize }); - _this8._cancelPointerAnimationFrame(); - _this8._scheduleRenderScenario(scenario); - }); - } - }, { - key: '_resetProgressLayout', - value: function _resetProgressLayout() { - this._createProgressBar(); - this._clearRenderingError(); - this._clearTimeoutWarning(); - } - }, { - key: '_renderRoot', - value: function _renderRoot(_ref) { - var _this9 = this; - - var scenario = _ref.scenario, - newSize = _ref.newSize; - - var d3Target = _d2.default.select(this._layout.content); - var frameRootId = scenario[0].config.uid; - var svg = selectOrAppend(d3Target, 'svg').attr({ - width: Math.floor(newSize.width), - height: Math.floor(newSize.height) - }); - if (!svg.attr('class')) { - svg.attr('class', _const.CSS_PREFIX + 'svg'); - } - this._svg = svg.node(); - this._initPointerEvents(); - this.fire('beforerender', this._svg); - var roots = svg.selectAll('g.frame-root').data([frameRootId], function (x) { - return x; - }); - - // NOTE: Fade out removed root, fade-in if removing interrupted. - roots.enter().append('g').classed(_const.CSS_PREFIX + 'cell cell frame-root uid_' + frameRootId, true); - roots.call(function (selection) { - selection.classed('tau-active', true); - (0, _d3Decorators.d3_transition)(selection, _this9.configGPL.settings.animationSpeed, 'frameRootToggle').attr('opacity', 1); - }); - roots.exit().call(function (selection) { - selection.classed('tau-active', false); - (0, _d3Decorators.d3_transition)(selection, _this9.configGPL.settings.animationSpeed, 'frameRootToggle').attr('opacity', 1e-6).remove(); - }); - } - }, { - key: '_scheduleRenderScenario', - value: function _scheduleRenderScenario(scenario) { - var _this10 = this; - - scenario.forEach(function (item) { - _this10._taskRunner.addTask(function () { - item.draw(); - _this10.onUnitDraw(item.node()); - _this10._renderedItems.push(item); - }); - }); - } - }, { - key: '_completeRendering', - value: function _completeRendering() { - // TODO: Render panels before chart, to - // prevent chart size shrink. Use some other event. - _utilsDom.utilsDom.setScrollPadding(this._layout.contentContainer); - this._layout.rightSidebar.style.maxHeight = this._liveSpec.settings.size.height + 'px'; - this.enablePointerEvents(); - if (this._svg) { - this.fire('render', this._svg); - } - - // NOTE: After plugins have rendered, the panel scrollbar may appear, so need to handle it again. - _utilsDom.utilsDom.setScrollPadding(this._layout.rightSidebarContainer, 'vertical'); - } - }, { - key: '_cancelRendering', - value: function _cancelRendering() { - this.enablePointerEvents(); - this._resetTaskRunner(); - this._cancelPointerAnimationFrame(); - } - }, { - key: '_createProgressBar', - value: function _createProgressBar() { - var header = _d2.default.select(this._layout.header); - var progressBar = selectOrAppend(header, 'div.' + _const.CSS_PREFIX + 'progress'); - progressBar.select('div.' + _const.CSS_PREFIX + 'progress__value').remove(); - var progressValue = progressBar.append('div').classed(_const.CSS_PREFIX + 'progress__value', true).style('width', 0); - this._reportProgress = function (value) { - requestAnimationFrame(function () { - progressBar.classed(_const.CSS_PREFIX + 'progress_active', value < 1); - progressValue.style('width', value * 100 + '%'); - }); - }; - } - }, { - key: '_displayRenderingError', - value: function _displayRenderingError() { - this._layout.layout.classList.add(_const.CSS_PREFIX + 'layout_rendering-error'); - } - }, { - key: '_clearRenderingError', - value: function _clearRenderingError() { - this._layout.layout.classList.remove(_const.CSS_PREFIX + 'layout_rendering-error'); - } - }, { - key: 'getScaleFactory', - value: function getScaleFactory() { - var dataSources = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - - return new _scalesFactory.ScalesFactory(_scalesRegistry.scalesRegistry.instance(this._liveSpec.settings), dataSources || this._liveSpec.sources, this._liveSpec.scales); - } - }, { - key: 'getScaleInfo', - value: function getScaleInfo(name) { - var dataFrame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - return this.getScaleFactory().createScaleInfoByName(name, dataFrame); - } - }, { - key: 'getSourceFiltersIterator', - value: function getSourceFiltersIterator(rejectFiltersPredicate) { - var _this11 = this; - - var filters = _utils.utils.flatten(Object.keys(this._filtersStore.filters).map(function (key) { - return _this11._filtersStore.filters[key]; - })).filter(function (f) { - return !rejectFiltersPredicate(f); - }).map(function (x) { - return x.predicate; - }); - - return function (row) { - return filters.reduce(function (prev, f) { - return prev && f(row); - }, true); - }; - } - }, { - key: 'getDataSources', - value: function getDataSources() { - var _this12 = this; - - var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - var excludeFiltersByTagAndSource = function excludeFiltersByTagAndSource(k) { - return function (f) { - return param.excludeFilter && param.excludeFilter.indexOf(f.tag) !== -1 || f.src !== k; - }; - }; - - var chartDataModel = this._chartDataModel(this._originData); - - return Object.keys(chartDataModel).filter(function (k) { - return k !== '?'; - }).reduce(function (memo, k) { - var item = chartDataModel[k]; - var filterIterator = _this12.getSourceFiltersIterator(excludeFiltersByTagAndSource(k)); - memo[k] = { - dims: item.dims, - data: item.data.filter(filterIterator) - }; - return memo; - }, { - '?': chartDataModel['?'] - }); - } - }, { - key: 'isEmptySources', - value: function isEmptySources(sources) { - - return !Object.keys(sources).filter(function (k) { - return k !== '?'; - }).filter(function (k) { - return sources[k].data.length > 0; - }).length; - } - }, { - key: 'getChartModelData', - value: function getChartModelData() { - var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var src = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '/'; - - var sources = this.getDataSources(param); - return sources[src].data; - } - }, { - key: 'getDataDims', - value: function getDataDims() { - var src = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; - - return this._originData[src].dims; - } - }, { - key: 'getData', - value: function getData() { - var src = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '/'; - - return this._originData[src].data; - } - }, { - key: 'setData', - value: function setData(data) { - var src = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '/'; - - this._originData[src].data = data; - this.refresh(); - } - }, { - key: 'getSVG', - value: function getSVG() { - return this._svg; - } - }, { - key: 'addFilter', - value: function addFilter(filter) { - filter.src = filter.src || '/'; - var tag = filter.tag; - var filters = this._filtersStore.filters[tag] = this._filtersStore.filters[tag] || []; - var id = this._filtersStore.tick++; - filter.id = id; - filters.push(filter); - return id; - } - }, { - key: 'removeFilter', - value: function removeFilter(id) { - var _this13 = this; - - Object.keys(this._filtersStore.filters).map(function (key) { - _this13._filtersStore.filters[key] = _this13._filtersStore.filters[key].filter(function (item) { - return item.id !== id; - }); - }); - return this; - } - }, { - key: 'refresh', - value: function refresh() { - if (this._target) { - this.renderTo(this._target, this._defaultSize); - } - } - }, { - key: 'resize', - value: function resize() { - var sizes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - this.renderTo(this._target, sizes); - } - }, { - key: 'select', - value: function select(queryFilter) { - return this._nodes.filter(queryFilter); - } - }, { - key: 'traverseSpec', - value: function traverseSpec(spec, iterator) { - - var traverse = function traverse(node, iterator, parentNode, parentFrame) { - - iterator(node, parentNode, parentFrame); - - if (node.frames) { - node.frames.forEach(function (frame) { - (frame.units || []).map(function (x) { - return traverse(x, iterator, node, frame); - }); - }); - } else { - (node.units || []).map(function (x) { - return traverse(x, iterator, node, null); - }); - } - }; - - traverse(spec.unit, iterator, null, null); - } - - // use from plugins to get the most actual chart config - - }, { - key: 'getSpec', - value: function getSpec() { - return this._liveSpec; - } - }, { - key: 'getLayout', - value: function getLayout() { - return this._layout; - } - }, { - key: '_displayTimeoutWarning', - value: function _displayTimeoutWarning(_ref2) { - var _this14 = this; - - var proceed = _ref2.proceed, - cancel = _ref2.cancel, - timeout = _ref2.timeout; - - var width = 200; - var height = 100; - var linesCount = 3; - var lineSpacing = 1.5; - var midX = width / 2; - var fontSize = Math.round(height / linesCount / lineSpacing); - var getY = function getY(line) { - return Math.round(height / linesCount / lineSpacing * line); - }; - this._layout.content.style.height = '100%'; - this._layout.content.insertAdjacentHTML('beforeend', '\n
\n \n \n Rendering took more than ' + Math.round(timeout) / 1000 + 's\n Would you like to continue?\n \n \n Continue\n \n \n Cancel\n \n \n
\n '); - this._layout.content.querySelector('.' + _const.CSS_PREFIX + 'rendering-timeout-continue-btn').addEventListener('click', function () { - _this14._clearTimeoutWarning(); - proceed.call(_this14); - }); - this._layout.content.querySelector('.' + _const.CSS_PREFIX + 'rendering-timeout-cancel-btn').addEventListener('click', function () { - _this14._clearTimeoutWarning(); - cancel.call(_this14); - }); - } - }, { - key: '_clearTimeoutWarning', - value: function _clearTimeoutWarning() { - var warning = selectImmediate(this._layout.content, '.' + _const.CSS_PREFIX + 'rendering-timeout-warning'); - if (warning) { - this._layout.content.removeChild(warning); - this._layout.content.style.height = ''; - } - } - }], [{ - key: 'setupPeriodData', - value: function setupPeriodData(spec) { - var tickPeriod = Plot.__api__.tickPeriod; - var log = spec.settings.log; - - var scales = Object.keys(spec.scales).map(function (s) { - return spec.scales[s]; - }); - - var workPlan = scales.filter(function (s) { - return s.type === 'period'; - }).reduce(function (memo, scaleRef) { - var periodCaster = tickPeriod.get(scaleRef.period, { utc: spec.settings.utcTime }); - if (periodCaster) { - memo.push({ source: scaleRef.source, dim: scaleRef.dim, period: periodCaster }); - } else { - log(['Unknown period "' + scaleRef.period + '".', 'Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period'], 'WARN'); - scaleRef.period = null; - } - - return memo; - }, []); - - var isNullOrUndefined = function isNullOrUndefined(x) { - return x === null || x === undefined; - }; - - var reducer = function reducer(refSources, metaDim) { - refSources[metaDim.source].data = refSources[metaDim.source].data.map(function (row) { - var val = row[metaDim.dim]; - if (!isNullOrUndefined(val)) { - row[metaDim.dim] = metaDim.period.cast(val); - } - return row; - }); - - return refSources; - }; - - spec.sources = workPlan.reduce(reducer, spec.sources); - - return spec; - } - }, { - key: 'setupMetaInfo', - value: function setupMetaInfo(dims, data) { - var meta = dims ? dims : _dataProcessor.DataProcessor.autoDetectDimTypes(data); - return _dataProcessor.DataProcessor.autoAssignScales(meta); - } - }, { - key: 'setupSettings', - value: function setupSettings(configSettings) { - var globalSettings = Plot.globalSettings; - var localSettings = Object.keys(globalSettings).reduce(function (memo, k) { - memo[k] = typeof globalSettings[k] === 'function' ? globalSettings[k] : _utils.utils.clone(globalSettings[k]); - return memo; - }, {}); - - var r = _utils.utils.defaults(configSettings || {}, localSettings); - - if (!Array.isArray(r.specEngine)) { - r.specEngine = [{ width: Number.MAX_VALUE, name: r.specEngine }]; - } - - return r; - } - }]); - - return Plot; - }(_event.Emitter); - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Tooltip = undefined; - - var _const = __webpack_require__(22); - - var _tauTooltip = __webpack_require__(23); - - _tauTooltip.Tooltip.defaults.baseClass = _const.CSS_PREFIX + 'tooltip'; - exports.Tooltip = _tauTooltip.Tooltip; - -/***/ }, -/* 22 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var CSS_PREFIX = exports.CSS_PREFIX = 'graphical-report__'; - -/***/ }, -/* 23 */ -/***/ function(module, exports, __webpack_require__) { - - var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function webpackUniversalModuleDefinition(root, factory) { - if(true) - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - else if(typeof module === "object" && module.exports) - module.exports = factory(); - else if(typeof exports === 'object') - exports["Tooltip"] = factory(); - else - root["Tooltip"] = factory(); - })(this, function() { - return /******/ (function(modules) { // webpackBootstrap - /******/ // The module cache - /******/ var installedModules = {}; - - /******/ // The require function - /******/ function __webpack_require__(moduleId) { - - /******/ // Check if module is in cache - /******/ if(installedModules[moduleId]) - /******/ return installedModules[moduleId].exports; - - /******/ // Create a new module (and put it into the cache) - /******/ var module = installedModules[moduleId] = { - /******/ exports: {}, - /******/ id: moduleId, - /******/ loaded: false - /******/ }; - - /******/ // Execute the module function - /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - - /******/ // Flag the module as loaded - /******/ module.loaded = true; - - /******/ // Return the exports of the module - /******/ return module.exports; - /******/ } - - - /******/ // expose the modules object (__webpack_modules__) - /******/ __webpack_require__.m = modules; - - /******/ // expose the module cache - /******/ __webpack_require__.c = installedModules; - - /******/ // __webpack_public_path__ - /******/ __webpack_require__.p = ""; - - /******/ // Load entry module and return exports - /******/ return __webpack_require__(0); - /******/ }) - /************************************************************************/ - /******/ ([ - /* 0 */ - /***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, '__esModule', { - value: true - }); - var classes = function classes(el) { - return { - add: function add(name) { - el.classList.add(name); - }, - remove: function remove(name) { - el.classList.remove(name); - } - }; - }; - - var indexOf = function indexOf(arr, obj) { - return arr.indexOf(obj); - }; - - /** - * Globals. - */ - var win = window; - var doc = win.document; - var docEl = doc.documentElement; - var verticalPlaces = ['top', 'bottom']; - - /** - * Poor man's shallow object extend. - * - * @param {Object} a - * @param {Object} b - * - * @return {Object} - */ - function extend(a, b) { - for (var key in b) { - // jshint ignore:line - a[key] = b[key]; - } - return a; - } - - /** - * Checks whether object is window. - * - * @param {Object} obj - * - * @return {Boolean} - */ - function isWin(obj) { - return obj && obj.setInterval != null; - } - - /** - * Returns element's object with `left`, `top`, `bottom`, `right`, `width`, and `height` - * properties indicating the position and dimensions of element on a page. - * - * @param {Element} element - * - * @return {Object} - */ - function position(element) { - var winTop = win.pageYOffset || docEl.scrollTop; - var winLeft = win.pageXOffset || docEl.scrollLeft; - var box = { left: 0, right: 0, top: 0, bottom: 0, width: 0, height: 0 }; - - if (isWin(element)) { - box.width = win.innerWidth || docEl.clientWidth; - box.height = win.innerHeight || docEl.clientHeight; - } else if (docEl.contains(element) && element.getBoundingClientRect != null) { - extend(box, element.getBoundingClientRect()); - // width & height don't exist in = winPos.bottom) { - place[0] = 'top'; - } - switch (place[1]) { - case 'left': - if (target.right - this.width <= winPos.left) { - place[1] = 'right'; - } - break; - case 'right': - if (target.left + this.width >= winPos.right) { - place[1] = 'left'; - } - break; - default: - if (target.left + target.width / 2 + this.width / 2 >= winPos.right) { - place[1] = 'left'; - } else if (target.right - target.width / 2 - this.width / 2 <= winPos.left) { - place[1] = 'right'; - } - } - } else { - if (target.left - this.width - spacing <= winPos.left) { - place[0] = 'right'; - } else if (target.right + this.width + spacing >= winPos.right) { - place[0] = 'left'; - } - switch (place[1]) { - case 'top': - if (target.bottom - this.height <= winPos.top) { - place[1] = 'bottom'; - } - break; - case 'bottom': - if (target.top + this.height >= winPos.bottom) { - place[1] = 'top'; - } - break; - default: - if (target.top + target.height / 2 + this.height / 2 >= winPos.bottom) { - place[1] = 'top'; - } else if (target.bottom - target.height / 2 - this.height / 2 <= winPos.top) { - place[1] = 'bottom'; - } - } - } - - return place.join('-'); - }; - - /** - * Position the element to an element or a specific coordinates. - * - * @param {Integer|Element} x - * @param {Integer} y - * - * @return {Tooltip} - */ - Tooltip.prototype.position = function (x, y) { - if (this.attachedTo) { - x = this.attachedTo; - } - if (x == null && this._p) { - x = this._p[0]; - y = this._p[1]; - } else { - this._p = arguments; - } - var target = typeof x === 'number' ? { - left: 0 | x, - right: 0 | x, - top: 0 | y, - bottom: 0 | y, - width: 0, - height: 0 - } : position(x); - var spacing = this.spacing; - var newPlace = this._pickPlace(target); - - // Add/Change place class when necessary - if (newPlace !== this.curPlace) { - if (this.curPlace) { - this.classes.remove(this.curPlace); - } - this.classes.add(newPlace); - this.curPlace = newPlace; - } - - // Position the tip - var top, left; - switch (this.curPlace) { - case 'top': - top = target.top - this.height - spacing; - left = target.left + target.width / 2 - this.width / 2; - break; - case 'top-left': - top = target.top - this.height - spacing; - left = target.right - this.width; - break; - case 'top-right': - top = target.top - this.height - spacing; - left = target.left; - break; - - case 'bottom': - top = target.bottom + spacing; - left = target.left + target.width / 2 - this.width / 2; - break; - case 'bottom-left': - top = target.bottom + spacing; - left = target.right - this.width; - break; - case 'bottom-right': - top = target.bottom + spacing; - left = target.left; - break; - - case 'left': - top = target.top + target.height / 2 - this.height / 2; - left = target.left - this.width - spacing; - break; - case 'left-top': - top = target.bottom - this.height; - left = target.left - this.width - spacing; - break; - case 'left-bottom': - top = target.top; - left = target.left - this.width - spacing; - break; - - case 'right': - top = target.top + target.height / 2 - this.height / 2; - left = target.right + spacing; - break; - case 'right-top': - top = target.bottom - this.height; - left = target.right + spacing; - break; - case 'right-bottom': - top = target.top; - left = target.right + spacing; - break; - } - - // Set tip position & class - this.element.style.top = Math.round(top) + 'px'; - this.element.style.left = Math.round(left) + 'px'; - - return this; - }; - - /** - * Show the tooltip. - * - * @param {Integer|Element} x - * @param {Integer} y - * - * @return {Tooltip} - */ - Tooltip.prototype.show = function (x, y) { - x = this.attachedTo ? this.attachedTo : x; - - // Clear potential ongoing animation - clearTimeout(this.aIndex); - - // Position the element when requested - if (x != null) { - this.position(x, y); - } - - // Stop here if tip is already visible - if (this.hidden) { - this.hidden = 0; - doc.body.appendChild(this.element); - } - - // Make tooltip aware of window resize - if (this.attachedTo) { - this._aware(); - } - - // Trigger layout and kick in the transition - if (this.options.inClass) { - if (this.options.effectClass) { - void this.element.clientHeight; - } - this.classes.add(this.options.inClass); - } - - return this; - }; - Tooltip.prototype.getElement = function () { - return this.element; - }; - - /** - * Hide the tooltip. - * - * @return {Tooltip} - */ - Tooltip.prototype.hide = function () { - if (this.hidden) { - return; - } - - var self = this; - var duration = 0; - - // Remove .in class and calculate transition duration if any - if (this.options.inClass) { - this.classes.remove(this.options.inClass); - if (this.options.effectClass) { - duration = transitionDuration(this.element); - } - } - - // Remove tip from window resize awareness - if (this.attachedTo) { - this._unaware(); - } - - // Remove the tip from the DOM when transition is done - clearTimeout(this.aIndex); - this.aIndex = setTimeout(function () { - self.aIndex = 0; - doc.body.removeChild(self.element); - self.hidden = 1; - }, duration); - - return this; - }; - - Tooltip.prototype.toggle = function (x, y) { - return this[this.hidden ? 'show' : 'hide'](x, y); - }; - - Tooltip.prototype.destroy = function () { - clearTimeout(this.aIndex); - this._unaware(); - if (!this.hidden) { - doc.body.removeChild(this.element); - } - this.element = this.options = null; - }; - - /** - * git remote add origin https://github.com/TargetProcess/tau-tooltip.git. - * - * @return {Void} - */ - Tooltip.prototype._aware = function () { - var index = indexOf(Tooltip.winAware, this); - if (index === -1) { - Tooltip.winAware.push(this); - } - }; - - /** - * Remove the window resize awareness. - * - * @return {Void} - */ - Tooltip.prototype._unaware = function () { - var index = indexOf(Tooltip.winAware, this); - if (index !== -1) { - Tooltip.winAware.splice(index, 1); - } - }; - - /** - * Handles repositioning of tooltips on window resize. - * - * @return {Void} - */ - Tooltip.reposition = (function () { - - var rAF = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) { - return setTimeout(fn, 17); - }; - var rIndex; - - function requestReposition() { - if (rIndex || !Tooltip.winAware.length) { - return; - } - rIndex = rAF(reposition); - } - - function reposition() { - rIndex = 0; - var tip; - for (var i = 0, l = Tooltip.winAware.length; i < l; i++) { - tip = Tooltip.winAware[i]; - tip.position(); - } - } - - return requestReposition; - })(); - Tooltip.winAware = []; - - // Bind winAware repositioning to window resize event - window.addEventListener('resize', Tooltip.reposition); - window.addEventListener('scroll', Tooltip.reposition); - - /** - * Array with dynamic class types. - * - * @type {Array} - */ - Tooltip.classTypes = ['type', 'effect']; - - /** - * Default options for Tooltip constructor. - * - * @type {Object} - */ - Tooltip.defaults = { - baseClass: 'tooltip', // Base tooltip class name. - typeClass: null, // Type tooltip class name. - effectClass: null, // Effect tooltip class name. - inClass: 'in', // Class used to transition stuff in. - place: 'top', // Default place. - spacing: null, // Gap between target and tooltip. - auto: 0 // Whether to automatically adjust place to fit into window. - }; - - exports.Tooltip = Tooltip; - - /***/ } - /******/ ]) - }); - ; - -/***/ }, -/* 24 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var Plugins = function () { - function Plugins(plugins, chart) { - _classCallCheck(this, Plugins); - - this.chart = chart; - this._plugins = plugins.map(this.initPlugin, this); - } - - _createClass(Plugins, [{ - key: 'initPlugin', - value: function initPlugin(plugin) { - var _this = this; - - if (plugin.init) { - plugin.init(this.chart); - } - - // jscs:disable disallowEmptyBlocks - var empty = function empty() { - // do nothing - }; - // jscs:enable disallowEmptyBlocks - - this.chart.on('destroy', plugin.destroy && plugin.destroy.bind(plugin) || empty); - - Object.keys(plugin).forEach(function (name) { - if (name.indexOf('on') === 0) { - var event = name.substr(2); - _this.chart.on(event.toLowerCase(), plugin[name].bind(plugin)); - } - }); - } - }]); - - return Plugins; - }(); - - exports.Plugins = Plugins; - -/***/ }, -/* 25 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.unitsRegistry = undefined; - - var _error = __webpack_require__(8); - - var UnitsMap = {}; - var SeedsMap = {}; - - var unitsRegistry = { - reg: function reg(unitType, xUnit, xSeed) { - - if (xSeed) { - SeedsMap[unitType] = xSeed; - UnitsMap[unitType] = function (config, Base) { - this.___tauchartsseed___ = new Base(this.init(config)); - }; - UnitsMap[unitType].prototype = Object.assign({ - init: function init(config) { - return config; - }, - defineGrammarModel: function defineGrammarModel(params) { - return this.node().defineGrammarModel(params); - }, - getGrammarRules: function getGrammarRules(grammarModel) { - return this.node().getGrammarRules(grammarModel); - }, - getAdjustScalesRules: function getAdjustScalesRules(grammarModel) { - return this.node().getAdjustScalesRules(grammarModel); - }, - createScreenModel: function createScreenModel(grammarModel) { - return this.node().createScreenModel(grammarModel); - }, - addInteraction: function addInteraction() { - this.node().addInteraction(); - }, - node: function node() { - return this.___tauchartsseed___; - }, - draw: function draw() { - this.node().draw(); - } - }, xUnit); - } else { - UnitsMap[unitType] = xUnit; - } - return this; - }, - get: function get(unitType) { - - if (!UnitsMap.hasOwnProperty(unitType)) { - throw new _error.TauChartError('Unknown unit type: ' + unitType, _error.errorCodes.UNKNOWN_UNIT_TYPE); - } - - return UnitsMap[unitType]; - }, - create: function create(unitType, unitConfig) { - var Unit = this.get(unitType); - var node; - if (SeedsMap[unitType]) { - var Base = this.get(SeedsMap[unitType]); - node = new Unit(unitConfig, Base); - } else { - node = new Unit(unitConfig); - } - - return node; - } - }; - - exports.unitsRegistry = unitsRegistry; - -/***/ }, -/* 26 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var ScalesMap = {}; - var ConfigMap = {}; - - var scalesRegistry = exports.scalesRegistry = function () { - function scalesRegistry() { - _classCallCheck(this, scalesRegistry); - } - - _createClass(scalesRegistry, null, [{ - key: "reg", - value: function reg(scaleType, scaleClass) { - var configInterceptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (x) { - return x; - }; - - ScalesMap[scaleType] = scaleClass; - ConfigMap[scaleType] = configInterceptor; - return this; - } - }, { - key: "get", - value: function get(scaleType) { - return ScalesMap[scaleType]; - } - }, { - key: "instance", - value: function instance() { - var settings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - return { - create: function create(scaleType, dataFrame, scaleConfig) { - var ScaleClass = scalesRegistry.get(scaleType); - var configFunc = ConfigMap[scaleType]; - return new ScaleClass(dataFrame, configFunc(scaleConfig, settings)); - } - }; - } - }]); - - return scalesRegistry; - }(); - -/***/ }, -/* 27 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ScalesFactory = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _dataFrame = __webpack_require__(19); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var ScalesFactory = exports.ScalesFactory = function () { - function ScalesFactory(scalesRegistry, sources, scales) { - _classCallCheck(this, ScalesFactory); - - this.registry = scalesRegistry; - this.sources = sources; - this.scales = scales; - } - - _createClass(ScalesFactory, [{ - key: 'createScaleInfo', - value: function createScaleInfo(scaleConfig) { - var dataFrame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - - var dim = scaleConfig.dim; - var src = scaleConfig.source; - - var type = (this.sources[src].dims[dim] || {}).type; - var data = this.sources[src].data; - - var frame = dataFrame || new _dataFrame.DataFrame({ source: src }, data); - - scaleConfig.dimType = type; - - return this.registry.create(scaleConfig.type, frame, scaleConfig); - } - }, { - key: 'createScaleInfoByName', - value: function createScaleInfoByName(name) { - var dataFrame = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - return this.createScaleInfo(this.scales[name], dataFrame); - } - }]); - - return ScalesFactory; - }(); - -/***/ }, -/* 28 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.DataProcessor = undefined; - - var _utils = __webpack_require__(3); - - var DataProcessor = { - - isYFunctionOfX: function isYFunctionOfX(data, xFields, yFields) { - var isRelationAFunction = true; - var error = null; - // domain should has only 1 value from range - try { - data.reduce(function (memo, item) { - - var fnVar = function fnVar(hash, f) { - var propValue = item[f]; - var hashValue = _utils.utils.isObject(propValue) ? JSON.stringify(propValue) : propValue; - hash.push(hashValue); - return hash; - }; - - var key = xFields.reduce(fnVar, []).join('/'); - var val = yFields.reduce(fnVar, []).join('/'); - - if (!memo.hasOwnProperty(key)) { - memo[key] = val; - } else { - var prevVal = memo[key]; - if (prevVal !== val) { - error = { - type: 'RelationIsNotAFunction', - keyX: xFields.join('/'), - keyY: yFields.join('/'), - valX: key, - errY: [prevVal, val] - }; - - throw new Error('RelationIsNotAFunction'); - } - } - return memo; - }, {}); - } catch (ex) { - - if (ex.message !== 'RelationIsNotAFunction') { - throw ex; - } - - isRelationAFunction = false; - } - - return { - result: isRelationAFunction, - error: error - }; - }, - - excludeNullValues: function excludeNullValues(dimensions, onExclude) { - var fields = Object.keys(dimensions).reduce(function (fields, k) { - var d = dimensions[k]; - if ((!d.hasOwnProperty('hasNull') || d.hasNull) && (d.type === 'measure' || d.scale === 'period')) { - // rule: exclude null values of "measure" type or "period" scale - fields.push(k); - } - return fields; - }, []); - return function (row) { - var result = !fields.some(function (f) { - return !(f in row) || row[f] === null; - }); - if (!result) { - onExclude(row); - } - return result; - }; - }, - - autoAssignScales: function autoAssignScales(dimensions) { - - var defaultType = 'category'; - var scaleMap = { - category: 'ordinal', - order: 'ordinal', - measure: 'linear' - }; - - var r = {}; - Object.keys(dimensions).forEach(function (k) { - var item = dimensions[k]; - var type = (item.type || defaultType).toLowerCase(); - r[k] = Object.assign({}, item, { - type: type, - scale: item.scale || scaleMap[type], - value: item.value - }); - }); - - return r; - }, - - autoDetectDimTypes: function autoDetectDimTypes(data) { - - var defaultDetect = { - type: 'category', - scale: 'ordinal' - }; - - var detectType = function detectType(propertyValue, defaultDetect) { - - var pair = defaultDetect; - - if (_utils.utils.isDate(propertyValue)) { - pair.type = 'measure'; - pair.scale = 'time'; - } else if (_utils.utils.isObject(propertyValue)) { - pair.type = 'order'; - pair.scale = 'ordinal'; - } else if (Number.isFinite(propertyValue)) { - pair.type = 'measure'; - pair.scale = 'linear'; - } - - return pair; - }; - - var reducer = function reducer(memo, rowItem) { - - Object.keys(rowItem).forEach(function (key) { - - var val = rowItem.hasOwnProperty(key) ? rowItem[key] : null; - - memo[key] = memo[key] || { - type: null, - hasNull: false - }; - - if (val === null) { - memo[key].hasNull = true; - } else { - var typeScalePair = detectType(val, _utils.utils.clone(defaultDetect)); - var detectedType = typeScalePair.type; - var detectedScale = typeScalePair.scale; - - var isInContraToPrev = memo[key].type !== null && memo[key].type !== detectedType; - memo[key].type = isInContraToPrev ? defaultDetect.type : detectedType; - memo[key].scale = isInContraToPrev ? defaultDetect.scale : detectedScale; - } - }); - - return memo; - }; - - return data.reduce(reducer, {}); - }, - - sortByDim: function sortByDim(data, dimName, dimInfo) { - var rows = data; - - var interceptor = ['period', 'time'].indexOf(dimInfo.scale) >= 0 ? function (x) { - return new Date(x); - } : function (x) { - return x; - }; - - if (dimInfo.type === 'measure' || dimInfo.scale === 'period') { - rows = data.map(function (r) { - return r; - }).sort(function (a, b) { - return interceptor(a[dimName]) - interceptor(b[dimName]); - }); - } else if (dimInfo.order) { - var hashOrder = dimInfo.order.reduce(function (memo, x, i) { - memo[x] = i; - return memo; - }, {}); - var defaultN = dimInfo.order.length; - var k = '(___' + dimName + '___)'; - rows = data.map(function (row) { - var orderN = hashOrder[row[dimName]]; - orderN = orderN >= 0 ? orderN : defaultN; - row[k] = orderN; - return row; - }).sort(function (a, b) { - return a[k] - b[k]; - }).map(function (row) { - delete row[k]; - return row; - }); - } - return rows; - } - }; - - exports.DataProcessor = DataProcessor; - -/***/ }, -/* 29 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getLayout = undefined; - - var _const = __webpack_require__(22); - - var createElement = function createElement(cssClass, parent) { - var tag = 'div'; - var element = document.createElement(tag); - element.classList.add(_const.CSS_PREFIX + cssClass); - if (parent) { - parent.appendChild(element); - } - return element; - }; - var getLayout = function getLayout() { - var layout = createElement('layout'); - var header = createElement('layout__header', layout); - var centerContainer = createElement('layout__container', layout); - var leftSidebar = createElement('layout__sidebar', centerContainer); - var contentContainer = createElement('layout__content', centerContainer); - var content = createElement('layout__content__wrap', contentContainer); - var rightSidebarContainer = createElement('layout__sidebar-right', centerContainer); - var rightSidebar = createElement('layout__sidebar-right__wrap', rightSidebarContainer); - var footer = createElement('layout__footer', layout); - /* jshint ignore:start */ - return { - layout: layout, - header: header, - content: content, - contentContainer: contentContainer, - leftSidebar: leftSidebar, - rightSidebar: rightSidebar, - rightSidebarContainer: rightSidebarContainer, - footer: footer - }; - /* jshint ignore:end */ - }; - - exports.getLayout = getLayout; - -/***/ }, -/* 30 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SpecConverter = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var SpecConverter = exports.SpecConverter = function () { - function SpecConverter(spec) { - _classCallCheck(this, SpecConverter); - - this.spec = spec; - - this.dist = { - sources: { - '?': { - dims: {}, - data: [{}] - }, - '/': { - dims: {}, - data: [] - } - }, - scales: { - // jscs:disable disallowQuotedKeysInObjects - 'x_null': { type: 'ordinal', source: '?' }, - 'y_null': { type: 'ordinal', source: '?' }, - 'size_null': { type: 'size', source: '?' }, - 'color_null': { type: 'color', source: '?' }, - 'split_null': { type: 'value', source: '?' }, - - 'pos:default': { type: 'ordinal', source: '?' }, - 'size:default': { type: 'size', source: '?' }, - 'label:default': { type: 'value', source: '?' }, - 'color:default': { type: 'color', source: '?' }, - 'split:default': { type: 'value', source: '?' } - // jscs:enable disallowQuotedKeysInObjects - }, - settings: spec.settings - }; - } - - _createClass(SpecConverter, [{ - key: 'convert', - value: function convert() { - var srcSpec = this.spec; - var gplSpec = this.dist; - this.ruleAssignSourceDims(srcSpec, gplSpec); - this.ruleAssignStructure(srcSpec, gplSpec); - this.ruleAssignSourceData(srcSpec, gplSpec); - this.ruleApplyDefaults(gplSpec); - - return gplSpec; - } - }, { - key: 'ruleApplyDefaults', - value: function ruleApplyDefaults(spec) { - - var settings = spec.settings || {}; - - var traverse = function traverse(node, iterator, parentNode) { - iterator(node, parentNode); - (node.units || []).map(function (x) { - return traverse(x, iterator, node); - }); - }; - - var iterator = function iterator(childUnit, root) { - - childUnit.namespace = 'chart'; - childUnit.guide = _utils.utils.defaults(childUnit.guide || {}, { - animationSpeed: settings.animationSpeed || 0, - utcTime: settings.utcTime || false - }); - - // leaf elements should inherit coordinates properties - if (root && !childUnit.hasOwnProperty('units')) { - childUnit = _utils.utils.defaults(childUnit, { x: root.x, y: root.y }); - - var parentGuide = _utils.utils.clone(root.guide) || {}; - childUnit.guide.x = _utils.utils.defaults(childUnit.guide.x || {}, parentGuide.x); - childUnit.guide.y = _utils.utils.defaults(childUnit.guide.y || {}, parentGuide.y); - - childUnit.expression.inherit = root.expression.inherit; - } - - return childUnit; - }; - - traverse(spec.unit, iterator, null); - } - }, { - key: 'ruleAssignSourceData', - value: function ruleAssignSourceData(srcSpec, gplSpec) { - - var meta = srcSpec.spec.dimensions || {}; - - var dims = gplSpec.sources['/'].dims; - - var reduceIterator = function reduceIterator(row, key) { - var rowKey = row[key]; - if (_utils.utils.isObject(rowKey) && !_utils.utils.isDate(rowKey)) { - Object.keys(rowKey).forEach(function (k) { - return row[key + '.' + k] = rowKey[k]; - }); - } - - return row; - }; - - gplSpec.sources['/'].data = srcSpec.data.map(function (rowN) { - var row = Object.keys(rowN).reduce(reduceIterator, rowN); - return Object.keys(dims).reduce(function (r, k) { - - if (!r.hasOwnProperty(k)) { - r[k] = null; - } - - if (r[k] !== null && meta[k] && ['period', 'time'].indexOf(meta[k].scale) >= 0) { - r[k] = new Date(r[k]); - } - - return r; - }, row); - }); - } - }, { - key: 'ruleAssignSourceDims', - value: function ruleAssignSourceDims(srcSpec, gplSpec) { - var dims = srcSpec.spec.dimensions; - gplSpec.sources['/'].dims = Object.keys(dims).reduce(function (memo, k) { - memo[k] = { type: dims[k].type }; - return memo; - }, {}); - } - }, { - key: 'ruleAssignStructure', - value: function ruleAssignStructure(srcSpec, gplSpec) { - var _this = this; - - var walkStructure = function walkStructure(srcUnit) { - var gplRoot = _utils.utils.clone(_utils.utils.omit(srcUnit, 'unit')); - _this.ruleCreateScales(srcUnit, gplRoot); - gplRoot.expression = _this.ruleInferExpression(srcUnit); - - if (srcUnit.unit) { - gplRoot.units = srcUnit.unit.map(walkStructure); - } - - return gplRoot; - }; - - var root = walkStructure(srcSpec.spec.unit); - root.expression.inherit = false; - gplSpec.unit = root; - } - }, { - key: 'ruleCreateScales', - value: function ruleCreateScales(srcUnit, gplRoot) { - var _this2 = this; - - var guide = srcUnit.guide || {}; - ['identity', 'color', 'size', 'label', 'x', 'y', 'split'].forEach(function (p) { - if (srcUnit.hasOwnProperty(p)) { - gplRoot[p] = _this2.scalesPool(p, srcUnit[p], guide[p] || {}); - } - }); - } - }, { - key: 'ruleInferDim', - value: function ruleInferDim(dimName, guide) { - - var r = dimName; - - var dims = this.spec.spec.dimensions; - - if (!dims.hasOwnProperty(r)) { - return r; - } - - if (guide.hasOwnProperty('tickLabel')) { - r = dimName + '.' + guide.tickLabel; - } else if (dims[dimName].value) { - r = dimName + '.' + dims[dimName].value; - } - - var myDims = this.dist.sources['/'].dims; - if (!myDims.hasOwnProperty(r)) { - myDims[r] = { type: myDims[dimName].type }; - delete myDims[dimName]; - } - - return r; - } - }, { - key: 'scalesPool', - value: function scalesPool(scaleType, dimName, guide) { - - var k = scaleType + '_' + dimName; - - if (this.dist.scales.hasOwnProperty(k)) { - return k; - } - - var dims = this.spec.spec.dimensions; - - var item = {}; - if (scaleType === 'color' && dimName !== null) { - item = { - type: 'color', - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - - if (guide.hasOwnProperty('brewer')) { - item.brewer = guide.brewer; - } - - if (dims[dimName] && dims[dimName].hasOwnProperty('order')) { - item.order = dims[dimName].order; - } - - if (guide.hasOwnProperty('min')) { - item.min = guide.min; - } - - if (guide.hasOwnProperty('max')) { - item.max = guide.max; - } - - if (guide.hasOwnProperty('nice')) { - item.nice = guide.nice; - } - } - - if (scaleType === 'size' && dimName !== null) { - item = { - type: 'size', - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - - if (guide.hasOwnProperty('func')) { - item.func = guide.func; - } - - if (guide.hasOwnProperty('min')) { - item.min = guide.min; - } - - if (guide.hasOwnProperty('max')) { - item.max = guide.max; - } - - if (guide.hasOwnProperty('minSize')) { - item.minSize = guide.minSize; - } - - if (guide.hasOwnProperty('maxSize')) { - item.maxSize = guide.maxSize; - } - } - - if (scaleType === 'label' && dimName !== null) { - item = { - type: 'value', - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - } - - if (scaleType === 'split' && dimName !== null) { - item = { - type: 'value', - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - } - - if (scaleType === 'identity' && dimName !== null) { - item = { - type: 'identity', - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - } - - if (dims.hasOwnProperty(dimName) && (scaleType === 'x' || scaleType === 'y')) { - item = { - type: dims[dimName].scale, - source: '/', - dim: this.ruleInferDim(dimName, guide) - }; - - if (dims[dimName].hasOwnProperty('order')) { - item.order = dims[dimName].order; - } - - if (guide.hasOwnProperty('min')) { - item.min = guide.min; - } - - if (guide.hasOwnProperty('max')) { - item.max = guide.max; - } - - if (guide.hasOwnProperty('autoScale')) { - item.autoScale = guide.autoScale; - } else { - item.autoScale = true; - } - - if (guide.hasOwnProperty('nice')) { - item.nice = guide.nice; - } else { - // #121763 - // for backward compatibility with "autoScale" property - item.nice = item.autoScale; - } - - if (guide.hasOwnProperty('niceInterval')) { - item.niceInterval = guide.niceInterval; - } else { - item.niceInterval = null; - } - - if (guide.hasOwnProperty('tickPeriod')) { - item.period = guide.tickPeriod; - item.type = 'period'; - } - - item.fitToFrameByDims = guide.fitToFrameByDims; - - item.ratio = guide.ratio; - } - - this.dist.scales[k] = item; - - return k; - } - }, { - key: 'getScaleConfig', - value: function getScaleConfig(scaleType, dimName) { - var k = scaleType + '_' + dimName; - return this.dist.scales[k]; - } - }, { - key: 'ruleInferExpression', - value: function ruleInferExpression(srcUnit) { - - var expr = { - operator: 'none', - params: [] - }; - - var g = srcUnit.guide || {}; - var gx = g.x || {}; - var gy = g.y || {}; - - var scaleX = this.getScaleConfig('x', srcUnit.x); - var scaleY = this.getScaleConfig('y', srcUnit.y); - - if (srcUnit.type.indexOf('ELEMENT.') === 0) { - - if (srcUnit.color) { - expr = { - operator: 'groupBy', - params: [this.ruleInferDim(srcUnit.color, g.color || {})] - }; - } - } else if (srcUnit.type === 'COORDS.RECT') { - - if (srcUnit.unit.length === 1 && srcUnit.unit[0].type === 'COORDS.RECT') { - - // jshint ignore:start - // jscs:disable requireDotNotation - if (scaleX.period || scaleY.period) { - expr = { - operator: 'cross_period', - params: [this.ruleInferDim(srcUnit.x, gx), this.ruleInferDim(srcUnit.y, gy), scaleX.period, scaleY.period] - }; - } else { - expr = { - operator: 'cross', - params: [this.ruleInferDim(srcUnit.x, gx), this.ruleInferDim(srcUnit.y, gy)] - }; - } - // jscs:enable requireDotNotation - // jshint ignore:end - } - } - - return Object.assign({ inherit: true, source: '/' }, expr); - } - }]); - - return SpecConverter; - }(); - -/***/ }, -/* 31 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SpecTransformAutoLayout = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - var _formatterRegistry = __webpack_require__(32); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var sum = function sum(arr) { - return arr.reduce(function (sum, x) { - return sum + x; - }, 0); - }; - - function extendGuide(guide, targetUnit, dimension, properties) { - var guide_dim = guide.hasOwnProperty(dimension) ? guide[dimension] : {}; - guide_dim = guide_dim || {}; - properties.forEach(function (prop) { - Object.assign(targetUnit.guide[dimension][prop], guide_dim[prop]); - }); - } - - var applyCustomProps = function applyCustomProps(targetUnit, customUnit) { - var guide = customUnit.guide || {}; - var config = { - x: ['label'], - y: ['label'], - size: ['label'], - color: ['label'], - padding: [] - }; - - Object.keys(config).forEach(function (name) { - var properties = config[name]; - extendGuide(guide, targetUnit, name, properties); - }); - Object.assign(targetUnit.guide, Object.keys(guide).reduce(function (obj, k) { - if (!config.hasOwnProperty(k)) { - obj[k] = guide[k]; - } - return obj; - }, {})); - - return targetUnit; - }; - - var extendLabel = function extendLabel(guide, dimension, extend) { - guide[dimension] = _utils.utils.defaults(guide[dimension] || {}, { - label: '' - }); - guide[dimension].label = _utils.utils.isObject(guide[dimension].label) ? guide[dimension].label : { text: guide[dimension].label }; - guide[dimension].label = _utils.utils.defaults(guide[dimension].label, extend || {}, { - padding: 32, - rotate: 0, - textAnchor: 'middle', - cssClass: 'label', - dock: null - }); - - return guide[dimension]; - }; - var extendAxis = function extendAxis(guide, dimension, extend) { - guide[dimension] = _utils.utils.defaults(guide[dimension], extend || {}, { - padding: 0, - density: 30, - rotate: 0, - tickPeriod: null, - tickFormat: null, - autoScale: true - }); - guide[dimension].tickFormat = guide[dimension].tickFormat || guide[dimension].tickPeriod; - guide[dimension].nice = guide[dimension].hasOwnProperty('nice') ? guide[dimension].nice : guide[dimension].autoScale; - - return guide[dimension]; - }; - - var applyNodeDefaults = function applyNodeDefaults(node) { - node.options = node.options || {}; - node.guide = node.guide || {}; - node.guide.padding = _utils.utils.defaults(node.guide.padding || {}, { l: 0, b: 0, r: 0, t: 0 }); - - node.guide.x = extendLabel(node.guide, 'x'); - node.guide.x = extendAxis(node.guide, 'x', { - cssClass: 'x axis', - scaleOrient: 'bottom', - textAnchor: 'middle' - }); - - node.guide.y = extendLabel(node.guide, 'y', { rotate: -90 }); - node.guide.y = extendAxis(node.guide, 'y', { - cssClass: 'y axis', - scaleOrient: 'left', - textAnchor: 'end' - }); - - node.guide.size = extendLabel(node.guide, 'size'); - node.guide.color = extendLabel(node.guide, 'color'); - - return node; - }; - - var inheritProps = function inheritProps(childUnit, root) { - - childUnit.guide = childUnit.guide || {}; - childUnit.guide.padding = childUnit.guide.padding || { l: 0, t: 0, r: 0, b: 0 }; - - // leaf elements should inherit coordinates properties - if (!childUnit.hasOwnProperty('units')) { - childUnit = _utils.utils.defaults(childUnit, root); - childUnit.guide = _utils.utils.defaults(childUnit.guide, _utils.utils.clone(root.guide)); - childUnit.guide.x = _utils.utils.defaults(childUnit.guide.x, _utils.utils.clone(root.guide.x)); - childUnit.guide.y = _utils.utils.defaults(childUnit.guide.y, _utils.utils.clone(root.guide.y)); - } - - return childUnit; - }; - - var createSelectorPredicates = function createSelectorPredicates(root) { - - var children = root.units || []; - - var isLeaf = !root.hasOwnProperty('units'); - var isLeafParent = !children.some(function (c) { - return c.hasOwnProperty('units'); - }); - - return { - type: root.type, - isLeaf: isLeaf, - isLeafParent: !isLeaf && isLeafParent - }; - }; - - var getMaxTickLabelSize = function getMaxTickLabelSize(domainValues, formatter, fnCalcTickLabelSize, axisLabelLimit) { - - if (domainValues.length === 0) { - return { width: 0, height: 0 }; - } - - if (formatter === null) { - var size = fnCalcTickLabelSize('TauChart Library'); - size.width = axisLabelLimit * 0.625; // golden ratio - return size; - } - - if (domainValues.every(function (d) { - return typeof d === 'number'; - })) { - domainValues = _d2.default.scale.linear().domain(domainValues).ticks(); - } - - var maxXTickText = domainValues.reduce(function (prev, value) { - var computed = formatter(value).toString().length; - - if (!prev.computed || computed > prev.computed) { - return { - value: value, - computed: computed - }; - } - return prev; - }, {}).value; - - return fnCalcTickLabelSize(formatter(maxXTickText)); - }; - - var getTickFormat = function getTickFormat(dim, defaultFormats) { - var dimType = dim.dimType; - var scaleType = dim.scaleType; - var specifier = '*'; - - var key = [dimType, scaleType, specifier].join(':'); - var tag = [dimType, scaleType].join(':'); - return defaultFormats[key] || defaultFormats[tag] || defaultFormats[dimType] || null; - }; - - var getSettings = function getSettings(settings, prop, dimType) { - return settings.hasOwnProperty(prop + ':' + dimType) ? settings[prop + ':' + dimType] : settings['' + prop]; - }; - - var shortFormat = function shortFormat(format, utc) { - var timeFormats = ['day', 'week', 'month']; - if (timeFormats.indexOf(format) >= 0) { - format += '-short' + (utc ? '-utc' : ''); - } - - return format; - }; - - var rotateBox = function rotateBox(_ref, angle) { - var width = _ref.width, - height = _ref.height; - - var rad = Math.abs(_utils.utils.toRadian(angle)); - return { - width: Math.max(Math.cos(rad) * width, height), - height: Math.max(Math.sin(rad) * width, height) - }; - }; - - var getTextAnchorByAngle = function getTextAnchorByAngle(xAngle) { - var xOrY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x'; - - - var angle = _utils.utils.normalizeAngle(xAngle); - - var xRules = xOrY === 'x' ? [[0, 45, 'middle'], [45, 135, 'start'], [135, 225, 'middle'], [225, 315, 'end'], [315, 360, 'middle']] : [[0, 90, 'end'], [90, 135, 'middle'], [135, 225, 'start'], [225, 315, 'middle'], [315, 360, 'end']]; - - var i = xRules.findIndex(function (r) { - return angle >= r[0] && angle < r[1]; - }); - - return xRules[i][2]; - }; - - var wrapLine = function wrapLine(box, lineWidthLimit, linesCountLimit) { - var guessLinesCount = Math.ceil(box.width / lineWidthLimit); - var koeffLinesCount = Math.min(guessLinesCount, linesCountLimit); - return { - height: koeffLinesCount * box.height, - width: lineWidthLimit - }; - }; - - var calcXYGuide = function calcXYGuide(guide, settings, xMeta, yMeta, inlineLabels) { - - var xValues = xMeta.values; - var yValues = yMeta.values; - var xIsEmptyAxis = xMeta.isEmpty || guide.x.hideTicks; - var yIsEmptyAxis = yMeta.isEmpty || guide.y.hideTicks; - - var maxXTickBox = getMaxTickLabelSize(xValues, _formatterRegistry.FormatterRegistry.get(guide.x.tickFormat, guide.x.tickFormatNullAlias), settings.getAxisTickLabelSize, settings.xAxisTickLabelLimit); - - var maxYTickBox = getMaxTickLabelSize(yValues, _formatterRegistry.FormatterRegistry.get(guide.y.tickFormat, guide.y.tickFormatNullAlias), settings.getAxisTickLabelSize, settings.yAxisTickLabelLimit); - - var multiLinesXBox = maxXTickBox; - var multiLinesYBox = maxYTickBox; - - if (maxXTickBox.width > settings.xAxisTickLabelLimit) { - guide.x.tickFormatWordWrap = true; - guide.x.tickFormatWordWrapLines = settings.xTickWordWrapLinesLimit; - multiLinesXBox = wrapLine(maxXTickBox, settings.xAxisTickLabelLimit, settings.xTickWordWrapLinesLimit); - } - - if (maxYTickBox.width > settings.yAxisTickLabelLimit) { - guide.y.tickFormatWordWrap = true; - guide.y.tickFormatWordWrapLines = settings.yTickWordWrapLinesLimit; - multiLinesYBox = wrapLine(maxYTickBox, settings.yAxisTickLabelLimit, settings.yTickWordWrapLinesLimit); - } - - var kxAxisW = xIsEmptyAxis ? 0 : 1; - var kyAxisW = yIsEmptyAxis ? 0 : 1; - - var xLabel = guide.x.label; - var yLabel = guide.y.label; - var kxLabelW = xLabel.text && !xLabel.hide ? 1 : 0; - var kyLabelW = yLabel.text && !yLabel.hide ? 1 : 0; - - var rotXBox = rotateBox(multiLinesXBox, guide.x.rotate); - var rotYBox = rotateBox(multiLinesYBox, guide.y.rotate); - - if (inlineLabels) { - - xLabel.padding = (-settings.xAxisPadding - settings.xFontLabelHeight) / 2 + settings.xFontLabelHeight; - xLabel.paddingNoTicks = xLabel.padding; - yLabel.padding = (-settings.yAxisPadding - settings.yFontLabelHeight) / 2; - yLabel.paddingNoTicks = yLabel.padding; - - kxLabelW = 0; - kyLabelW = 0; - } else { - - xLabel.padding = sum([kxAxisW * (settings.xTickWidth + rotXBox.height), kxLabelW * (settings.distToXAxisLabel + settings.xFontLabelHeight)]); - xLabel.paddingNoTicks = kxLabelW * (settings.distToXAxisLabel + settings.xFontLabelHeight); - - yLabel.padding = sum([kyAxisW * (settings.yTickWidth + rotYBox.width), kyLabelW * settings.distToYAxisLabel]); - yLabel.paddingNoTicks = kyLabelW * settings.distToYAxisLabel; - } - - var bottomBorder = settings.xFontLabelDescenderLineHeight; // for font descender line - guide.padding = Object.assign(guide.padding, { - b: guide.x.hide ? 0 : sum([guide.x.padding, kxAxisW * (settings.xTickWidth + rotXBox.height), kxLabelW * (settings.distToXAxisLabel + settings.xFontLabelHeight + bottomBorder)]), - l: guide.y.hide ? 0 : sum([guide.y.padding, kyAxisW * (settings.yTickWidth + rotYBox.width), kyLabelW * (settings.distToYAxisLabel + settings.yFontLabelHeight)]) - }); - guide.paddingNoTicks = Object.assign({}, guide.paddingNoTicks, { - b: guide.x.hide ? 0 : sum([guide.x.padding, kxLabelW * (settings.distToXAxisLabel + settings.xFontLabelHeight + bottomBorder)]), - l: guide.y.hide ? 0 : sum([guide.y.padding, kyLabelW * (settings.distToYAxisLabel + settings.yFontLabelHeight)]) - }); - - guide.x = Object.assign(guide.x, { - density: rotXBox.width + getSettings(settings, 'xDensityPadding', xMeta.dimType) * 2, - tickFontHeight: maxXTickBox.height, - $minimalDomain: xValues.length, - $maxTickTextW: multiLinesXBox.width, - $maxTickTextH: multiLinesXBox.height, - tickFormatWordWrapLimit: settings.xAxisTickLabelLimit - }); - - guide.y = Object.assign(guide.y, { - density: rotYBox.height + getSettings(settings, 'yDensityPadding', yMeta.dimType) * 2, - tickFontHeight: maxYTickBox.height, - $minimalDomain: yValues.length, - $maxTickTextW: multiLinesYBox.width, - $maxTickTextH: multiLinesYBox.height, - tickFormatWordWrapLimit: settings.yAxisTickLabelLimit - }); - - return guide; - }; - - var calcUnitGuide = function calcUnitGuide(_ref2) { - var unit = _ref2.unit, - meta = _ref2.meta, - settings = _ref2.settings, - allowXVertical = _ref2.allowXVertical, - allowYVertical = _ref2.allowYVertical, - inlineLabels = _ref2.inlineLabels; - - - var dimX = meta.dimension(unit.x); - var dimY = meta.dimension(unit.y); - - var xMeta = meta.scaleMeta(unit.x, unit.guide.x); - var yMeta = meta.scaleMeta(unit.y, unit.guide.y); - var xIsEmptyAxis = xMeta.isEmpty; - var yIsEmptyAxis = yMeta.isEmpty; - - unit.guide.x.tickFormat = shortFormat(unit.guide.x.tickFormat || getTickFormat(dimX, settings.defaultFormats), settings.utcTime); - unit.guide.y.tickFormat = shortFormat(unit.guide.y.tickFormat || getTickFormat(dimY, settings.defaultFormats), settings.utcTime); - - var isXVertical = allowXVertical ? !(dimX.dimType === 'measure') : false; - var isYVertical = allowYVertical ? !(dimY.dimType === 'measure') : false; - - unit.guide.x.padding = xIsEmptyAxis ? 0 : settings.xAxisPadding; - unit.guide.x.paddingNoTicks = unit.guide.x.padding; - unit.guide.y.padding = yIsEmptyAxis ? 0 : settings.yAxisPadding; - unit.guide.y.paddingNoTicks = unit.guide.y.padding; - - unit.guide.x.rotate = isXVertical ? -90 : 0; - unit.guide.x.textAnchor = getTextAnchorByAngle(unit.guide.x.rotate, 'x'); - - unit.guide.y.rotate = isYVertical ? -90 : 0; - unit.guide.y.textAnchor = getTextAnchorByAngle(unit.guide.y.rotate, 'y'); - - unit.guide = calcXYGuide(unit.guide, settings, xMeta, yMeta, inlineLabels); - - if (inlineLabels) { - - var xLabel = unit.guide.x.label; - var yLabel = unit.guide.y.label; - - xLabel.cssClass += ' inline'; - xLabel.dock = 'right'; - xLabel.textAnchor = 'end'; - - yLabel.cssClass += ' inline'; - yLabel.dock = 'right'; - yLabel.textAnchor = 'end'; - } - - return unit; - }; - - var SpecEngineTypeMap = { - - NONE: function NONE(srcSpec, meta, settings) { - - var spec = _utils.utils.clone(srcSpec); - fnTraverseSpec(_utils.utils.clone(spec.unit), spec.unit, function (selectorPredicates, unit) { - unit.guide.x.tickFontHeight = settings.getAxisTickLabelSize('X').height; - unit.guide.y.tickFontHeight = settings.getAxisTickLabelSize('Y').height; - - unit.guide.x.tickFormatWordWrapLimit = settings.xAxisTickLabelLimit; - unit.guide.y.tickFormatWordWrapLimit = settings.yAxisTickLabelLimit; - - return unit; - }); - return spec; - }, - - 'BUILD-LABELS': function BUILDLABELS(srcSpec, meta) { - - var spec = _utils.utils.clone(srcSpec); - - var xLabels = []; - var yLabels = []; - var xUnit = null; - var yUnit = null; - - _utils.utils.traverseJSON(spec.unit, 'units', createSelectorPredicates, function (selectors, unit) { - - if (selectors.isLeaf) { - return unit; - } - - if (!xUnit && unit.x) { - xUnit = unit; - } - - if (!yUnit && unit.y) { - yUnit = unit; - } - - unit.guide = unit.guide || {}; - - unit.guide.x = unit.guide.x || { label: '' }; - unit.guide.y = unit.guide.y || { label: '' }; - - unit.guide.x.label = _utils.utils.isObject(unit.guide.x.label) ? unit.guide.x.label : { text: unit.guide.x.label }; - unit.guide.y.label = _utils.utils.isObject(unit.guide.y.label) ? unit.guide.y.label : { text: unit.guide.y.label }; - - if (unit.x) { - unit.guide.x.label.text = unit.guide.x.label.text || meta.dimension(unit.x).dimName; - } - - if (unit.y) { - unit.guide.y.label.text = unit.guide.y.label.text || meta.dimension(unit.y).dimName; - } - - var x = unit.guide.x.label.text; - if (x) { - xLabels.push(x); - unit.guide.x.tickFormatNullAlias = unit.guide.x.hasOwnProperty('tickFormatNullAlias') ? unit.guide.x.tickFormatNullAlias : 'No ' + x; - unit.guide.x.label.text = ''; - unit.guide.x.label._original_text = x; - } - - var y = unit.guide.y.label.text; - if (y) { - yLabels.push(y); - unit.guide.y.tickFormatNullAlias = unit.guide.y.hasOwnProperty('tickFormatNullAlias') ? unit.guide.y.tickFormatNullAlias : 'No ' + y; - unit.guide.y.label.text = ''; - unit.guide.y.label._original_text = y; - } - - return unit; - }); - - var rightArrow = ' \u2192 '; - - if (xUnit) { - xUnit.guide.x.label.text = xUnit.guide.x.label.hide ? '' : xLabels.join(rightArrow); - } - - if (yUnit) { - yUnit.guide.y.label.text = yUnit.guide.y.label.hide ? '' : yLabels.join(rightArrow); - } - - return spec; - }, - - 'BUILD-GUIDE': function BUILDGUIDE(srcSpec, meta, settings) { - - var spec = _utils.utils.clone(srcSpec); - fnTraverseSpec(_utils.utils.clone(spec.unit), spec.unit, function (selectorPredicates, unit) { - - if (selectorPredicates.isLeaf) { - return unit; - } - - var isFacetUnit = !selectorPredicates.isLeaf && !selectorPredicates.isLeafParent; - - var xMeta = meta.scaleMeta(unit.x, unit.guide.x); - var yMeta = meta.scaleMeta(unit.y, unit.guide.y); - - var isXVertical = !isFacetUnit && Boolean(xMeta.dimType) && xMeta.dimType !== 'measure'; - - unit.guide.x.rotate = isXVertical ? -90 : 0; - unit.guide.x.textAnchor = getTextAnchorByAngle(unit.guide.x.rotate); - - unit.guide.x.tickFormat = unit.guide.x.tickFormat || getTickFormat(xMeta, settings.defaultFormats); - unit.guide.y.tickFormat = unit.guide.y.tickFormat || getTickFormat(yMeta, settings.defaultFormats); - - unit.guide.x.padding = isFacetUnit ? 0 : settings.xAxisPadding; - unit.guide.x.paddingNoTicks = unit.guide.x.padding; - unit.guide.y.padding = isFacetUnit ? 0 : settings.yAxisPadding; - unit.guide.y.paddingNoTicks = unit.guide.y.padding; - - unit.guide = calcXYGuide(unit.guide, _utils.utils.defaults({ - distToXAxisLabel: xMeta.isEmpty ? settings.xTickWidth : settings.distToXAxisLabel, - distToYAxisLabel: yMeta.isEmpty ? settings.yTickWidth : settings.distToYAxisLabel - }, settings), xMeta, yMeta); - - unit.guide.x = Object.assign(unit.guide.x, { - cssClass: isFacetUnit ? unit.guide.x.cssClass + ' facet-axis' : unit.guide.x.cssClass, - avoidCollisions: isFacetUnit ? true : unit.guide.x.avoidCollisions - }); - - unit.guide.y = Object.assign(unit.guide.y, { - cssClass: isFacetUnit ? unit.guide.y.cssClass + ' facet-axis' : unit.guide.y.cssClass, - avoidCollisions: isFacetUnit ? false : unit.guide.y.avoidCollisions - }); - - unit.guide = Object.assign(unit.guide, { - showGridLines: unit.guide.hasOwnProperty('showGridLines') ? unit.guide.showGridLines : selectorPredicates.isLeafParent ? 'xy' : '' - }); - - return unit; - }); - - return spec; - }, - - 'BUILD-COMPACT': function BUILDCOMPACT(srcSpec, meta, settings) { - - var spec = _utils.utils.clone(srcSpec); - fnTraverseSpec(_utils.utils.clone(spec.unit), spec.unit, function (selectorPredicates, unit) { - - if (selectorPredicates.isLeaf) { - return unit; - } - - if (!unit.guide.hasOwnProperty('showGridLines')) { - unit.guide.showGridLines = selectorPredicates.isLeafParent ? 'xy' : ''; - } - - if (selectorPredicates.isLeafParent) { - - return calcUnitGuide({ - unit: unit, - meta: meta, - settings: _utils.utils.defaults({ - xTickWordWrapLinesLimit: 1, - yTickWordWrapLinesLimit: 1 - }, settings), - allowXVertical: true, - allowYVertical: false, - inlineLabels: true - }); - } - - // facet level - unit.guide.x.cssClass += ' facet-axis compact'; - unit.guide.x.avoidCollisions = true; - unit.guide.y.cssClass += ' facet-axis compact'; - unit.guide.y.avoidCollisions = true; - - return calcUnitGuide({ - unit: unit, - meta: meta, - settings: _utils.utils.defaults({ - xAxisPadding: 0, - yAxisPadding: 0, - distToXAxisLabel: 0, - distToYAxisLabel: 0, - xTickWordWrapLinesLimit: 1, - yTickWordWrapLinesLimit: 1 - }, settings), - allowXVertical: false, - allowYVertical: true, - inlineLabels: false - }); - }); - - return spec; - } - }; - - SpecEngineTypeMap.AUTO = function (srcSpec, meta, settings) { - return ['BUILD-LABELS', 'BUILD-GUIDE'].reduce(function (spec, engineName) { - return SpecEngineTypeMap[engineName](spec, meta, settings); - }, srcSpec); - }; - - SpecEngineTypeMap.COMPACT = function (srcSpec, meta, settings) { - return ['BUILD-LABELS', 'BUILD-COMPACT'].reduce(function (spec, engineName) { - return SpecEngineTypeMap[engineName](spec, meta, settings); - }, srcSpec); - }; - - var fnTraverseSpec = function fnTraverseSpec(orig, specUnitRef, transformRules) { - var xRef = applyNodeDefaults(specUnitRef); - xRef = transformRules(createSelectorPredicates(xRef), xRef); - xRef = applyCustomProps(xRef, orig); - var prop = _utils.utils.omit(xRef, 'units'); - (xRef.units || []).forEach(function (unit) { - return fnTraverseSpec(_utils.utils.clone(unit), inheritProps(unit, prop), transformRules); - }); - return xRef; - }; - - var SpecEngineFactory = { - get: function get(typeName, settings, srcSpec, fnCreateScale) { - - var engine = SpecEngineTypeMap[typeName] || SpecEngineTypeMap.NONE; - var meta = { - - dimension: function dimension(scaleId) { - var scaleCfg = srcSpec.scales[scaleId]; - var dim = srcSpec.sources[scaleCfg.source].dims[scaleCfg.dim] || {}; - return { - dimName: scaleCfg.dim, - dimType: dim.type, - scaleType: scaleCfg.type - }; - }, - - scaleMeta: function scaleMeta(scaleId) { - var scale = fnCreateScale('pos', scaleId); - var values = scale.domain(); - - var scaleCfg = srcSpec.scales[scaleId]; - var dim = srcSpec.sources[scaleCfg.source].dims[scaleCfg.dim] || {}; - return { - dimName: scaleCfg.dim, - dimType: dim.type, - scaleType: scaleCfg.type, - values: values, - isEmpty: dim.type == null - // isEmpty: (source == '?') - // isEmpty: ((values.filter((x) => !(x === undefined)).length) === 0) - }; - } - }; - - var unitSpec = { unit: _utils.utils.clone(srcSpec.unit) }; - var fullSpec = engine(unitSpec, meta, settings); - srcSpec.unit = fullSpec.unit; - return srcSpec; - } - }; - - var SpecTransformAutoLayout = exports.SpecTransformAutoLayout = function () { - function SpecTransformAutoLayout(spec) { - _classCallCheck(this, SpecTransformAutoLayout); - - this.spec = spec; - this.isApplicable = _utils.utils.isSpecRectCoordsOnly(spec.unit); - } - - _createClass(SpecTransformAutoLayout, [{ - key: 'transform', - value: function transform(chart) { - - var spec = this.spec; - - if (!this.isApplicable) { - return spec; - } - - var size = spec.settings.size; - - var rule = spec.settings.specEngine.find(function (rule) { - return size.width <= rule.width || size.height <= rule.height; - }); - - return SpecEngineFactory.get(rule.name, spec.settings, spec, function (type, alias) { - return chart.getScaleInfo(alias || type + ':default'); - }); - } - }]); - - return SpecTransformAutoLayout; - }(); - -/***/ }, -/* 32 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.FormatterRegistry = undefined; - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - var d3Fromat4S = _d2.default.format('.4s'); - var d3Fromat2R = _d2.default.format('.2r'); - var d3Fromat1E = _d2.default.format('.1e'); - var removeRedundantZeros = function () { - var zerosAfterDot = /\.0+([^\d].*)?$/; - var zerosAfterNotZero = /(\.\d+?)0+([^\d].*)?$/; - return function (str) { - return str.replace(zerosAfterDot, '$1').replace(zerosAfterNotZero, '$1$2'); - }; - }(); - - var FORMATS_MAP = { - - 'x-num-auto': function xNumAuto(x) { - var abs = Math.abs(x); - var result = removeRedundantZeros(abs < 1 ? abs === 0 ? '0' : abs < 1e-6 ? d3Fromat1E(x) : d3Fromat2R(x) : d3Fromat4S(x)); - return result; - }, - - percent: function percent(x) { - var v = parseFloat((x * 100).toFixed(2)); - return v.toString() + '%'; - }, - - day: _d2.default.time.format('%d-%b-%Y'), - 'day-utc': _d2.default.time.format.utc('%d-%b-%Y'), - - 'day-short': _d2.default.time.format('%d-%b'), - 'day-short-utc': _d2.default.time.format.utc('%d-%b'), - - week: _d2.default.time.format('%d-%b-%Y'), - 'week-utc': _d2.default.time.format.utc('%d-%b-%Y'), - - 'week-short': _d2.default.time.format('%d-%b'), - 'week-short-utc': _d2.default.time.format.utc('%d-%b'), - - month: function month(x) { - var d = new Date(x); - var m = d.getMonth(); - var formatSpec = m === 0 ? '%B, %Y' : '%B'; - return _d2.default.time.format(formatSpec)(x); - }, - 'month-utc': function monthUtc(x) { - var d = new Date(x); - var m = d.getUTCMonth(); - var formatSpec = m === 0 ? '%B, %Y' : '%B'; - return _d2.default.time.format.utc(formatSpec)(x); - }, - - 'month-short': function monthShort(x) { - var d = new Date(x); - var m = d.getMonth(); - var formatSpec = m === 0 ? '%b \'%y' : '%b'; - return _d2.default.time.format(formatSpec)(x); - }, - 'month-short-utc': function monthShortUtc(x) { - var d = new Date(x); - var m = d.getUTCMonth(); - var formatSpec = m === 0 ? '%b \'%y' : '%b'; - return _d2.default.time.format.utc(formatSpec)(x); - }, - - 'month-year': _d2.default.time.format('%B, %Y'), - 'month-year-utc': _d2.default.time.format.utc('%B, %Y'), - - quarter: function quarter(x) { - var d = new Date(x); - var m = d.getMonth(); - var q = (m - m % 3) / 3; - return 'Q' + (q + 1) + ' ' + d.getFullYear(); - }, - 'quarter-utc': function quarterUtc(x) { - var d = new Date(x); - var m = d.getUTCMonth(); - var q = (m - m % 3) / 3; - return 'Q' + (q + 1) + ' ' + d.getUTCFullYear(); - }, - - year: _d2.default.time.format('%Y'), - 'year-utc': _d2.default.time.format.utc('%Y'), - - 'x-time-auto': null - }; - - var FormatterRegistry = { - - get: function get(formatAlias, nullOrUndefinedAlias) { - - var nullAlias = nullOrUndefinedAlias || ''; - - var identity = function identity(x) { - return (x === null || typeof x === 'undefined' ? nullAlias : x).toString(); - }; - - var hasFormat = FORMATS_MAP.hasOwnProperty(formatAlias); - var formatter = hasFormat ? FORMATS_MAP[formatAlias] : identity; - - if (hasFormat) { - formatter = FORMATS_MAP[formatAlias]; - } - - if (!hasFormat && formatAlias) { - formatter = function formatter(v) { - var f = _utils.utils.isDate(v) ? _d2.default.time.format(formatAlias) : _d2.default.format(formatAlias); - return f(v); - }; - } - - if (!hasFormat && !formatAlias) { - formatter = identity; - } - - return formatter; - }, - - add: function add(formatAlias, formatter) { - FORMATS_MAP[formatAlias] = formatter; - } - }; - - exports.FormatterRegistry = FormatterRegistry; - -/***/ }, -/* 33 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SpecTransformCalcSize = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - var _specTransformOptimize = __webpack_require__(34); - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var byOptimisticMaxText = function byOptimisticMaxText(gx) { - return gx.$maxTickTextW; - }; - var byPessimisticMaxText = function byPessimisticMaxText(gx) { - return gx.rotate == 0 ? gx.$maxTickTextW : gx.$maxTickTextH; - }; - var byDensity = function byDensity(gx) { - return gx.density; - }; - var getFacetCount = function getFacetCount(specRef) { - var xFacetKeys = []; - var yFacetKeys = []; - var getFacetKeys = function getFacetKeys(root) { - // TODO: Maybe there is an API to - // determine X and Y facet keys. - if (root.type === 'COORDS.RECT' && root.units && root.units[0] && root.units[0].type === 'COORDS.RECT') { - var x = root.x.replace(/^x_/, ''); - var y = root.y.replace(/^y_/, ''); - if (x !== 'null') { - xFacetKeys.push(x); - } - if (y !== 'null') { - yFacetKeys.push(y); - } - root.units.forEach(getFacetKeys); - } - }; - getFacetKeys(specRef.unit); - - var xFacetGroups = {}; - var yFacetGroups = {}; - var getFacetGroups = function getFacetGroups(root) { - if (root.type === 'COORDS.RECT') { - root.frames.forEach(function (f) { - if (f.key) { - var keys = Object.keys(f.key); - keys.forEach(function (key) { - if (xFacetKeys.indexOf(key) >= 0) { - if (!(key in xFacetGroups)) { - xFacetGroups[key] = []; - } - if (xFacetGroups[key].indexOf(f.key[key]) < 0) { - xFacetGroups[key].push(f.key[key]); - } - } - if (yFacetKeys.indexOf(key) >= 0) { - if (!(key in yFacetGroups)) { - yFacetGroups[key] = []; - } - if (yFacetGroups[key].indexOf(f.key[key]) < 0) { - yFacetGroups[key].push(f.key[key]); - } - } - }); - if (f.units) { - f.units.forEach(getFacetGroups); - } - } - }); - } - }; - getFacetGroups(specRef.unit); - - return { - xFacetCount: Object.keys(xFacetGroups).reduce(function (sum, key) { - return sum * xFacetGroups[key].length; - }, 1), - yFacetCount: Object.keys(yFacetGroups).reduce(function (sum, key) { - return sum * yFacetGroups[key].length; - }, 1) - }; - }; - - var fitModelStrategies = { - 'entire-view': function entireView(srcSize, calcSize, specRef, tryOptimizeSpec) { - - var g = specRef.unit.guide; - - var _getFacetCount = getFacetCount(specRef), - xFacetCount = _getFacetCount.xFacetCount, - yFacetCount = _getFacetCount.yFacetCount; - - var ticksLPad = g.paddingNoTicks ? g.padding.l - g.paddingNoTicks.l : 0; - var ticksBPad = g.paddingNoTicks ? g.padding.b - g.paddingNoTicks.b : 0; - var shouldHideXAxis = g.paddingNoTicks && srcSize.height - ticksBPad < specRef.settings.minChartHeight || yFacetCount * specRef.settings.minFacetHeight + ticksBPad > srcSize.height || xFacetCount * specRef.settings.minFacetWidth + ticksLPad > srcSize.width; - var shouldHideYAxis = g.paddingNoTicks && srcSize.width - ticksLPad < specRef.settings.minChartWidth || yFacetCount * specRef.settings.minFacetHeight + ticksBPad > srcSize.height || xFacetCount * specRef.settings.minFacetWidth + ticksLPad > srcSize.width; - if (shouldHideXAxis) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'x'); - } - if (shouldHideYAxis) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'y'); - } - - var normalW = srcSize.width; - var widthByMaxText = calcSize('x', specRef.unit, byOptimisticMaxText); - if (widthByMaxText <= srcSize.width) { - tryOptimizeSpec(specRef.unit, specRef.settings); - } else { - var pessimisticWidthByMaxText = calcSize('x', specRef.unit, byPessimisticMaxText); - if (pessimisticWidthByMaxText > srcSize.width) { - var widthByDensity = Math.max(srcSize.width, calcSize('x', specRef.unit, byDensity)); - normalW = Math.min(pessimisticWidthByMaxText, widthByDensity); - } - } - var normalH = Math.max(srcSize.height, calcSize('y', specRef.unit, byDensity)); - - if (!shouldHideXAxis && normalW > srcSize.width) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'x'); - } - - if (!shouldHideYAxis && normalH > srcSize.height) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'y'); - } - - var newW = srcSize.width; - var newH = srcSize.height; - - return { newW: newW, newH: newH }; - }, - minimal: function minimal(srcSize, calcSize, specRef) { - var newW = calcSize('x', specRef.unit, byDensity); - var newH = calcSize('y', specRef.unit, byDensity); - return { newW: newW, newH: newH }; - }, - normal: function normal(srcSize, calcSize, specRef, tryOptimizeSpec) { - - var g = specRef.unit.guide; - if (g.paddingNoTicks) { - if (srcSize.width - g.padding.l + g.paddingNoTicks.l < specRef.settings.minChartWidth) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'y'); - } - if (srcSize.height - g.padding.b + g.paddingNoTicks.b < specRef.settings.minChartHeight) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'x'); - } - } - - var newW = srcSize.width; - - var optimisticWidthByMaxText = calcSize('x', specRef.unit, byOptimisticMaxText); - if (optimisticWidthByMaxText <= srcSize.width) { - tryOptimizeSpec(specRef.unit, specRef.settings); - } else { - var pessimisticWidthByMaxText = calcSize('x', specRef.unit, byPessimisticMaxText); - if (pessimisticWidthByMaxText > srcSize.width) { - var widthByDensity = Math.max(srcSize.width, calcSize('x', specRef.unit, byDensity)); - newW = Math.min(pessimisticWidthByMaxText, widthByDensity); - } - } - - var newH = Math.max(srcSize.height, calcSize('y', specRef.unit, byDensity)); - - return { newW: newW, newH: newH }; - }, - 'fit-width': function fitWidth(srcSize, calcSize, specRef, tryOptimizeSpec) { - - var g = specRef.unit.guide; - var ticksLPad = g.paddingNoTicks ? g.padding.l - g.paddingNoTicks.l : 0; - if (g.paddingNoTicks && srcSize.width - ticksLPad < specRef.settings.minChartWidth || getFacetCount(specRef).xFacetCount * specRef.settings.minFacetWidth + ticksLPad > srcSize.width) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'y'); - } - var widthByMaxText = calcSize('x', specRef.unit, byOptimisticMaxText); - if (widthByMaxText <= srcSize.width) { - tryOptimizeSpec(specRef.unit, specRef.settings); - } - - var newW = srcSize.width; - var newH = calcSize('y', specRef.unit, byDensity); - return { newW: newW, newH: newH }; - }, - 'fit-height': function fitHeight(srcSize, calcSize, specRef) { - - var g = specRef.unit.guide; - var ticksBPad = g.paddingNoTicks ? g.padding.b - g.paddingNoTicks.b : 0; - if (g.paddingNoTicks && srcSize.height - ticksBPad < specRef.settings.minChartHeight || getFacetCount(specRef).yFacetCount * specRef.settings.minFacetHeight + ticksBPad > srcSize.height) { - _specTransformOptimize.SpecTransformOptimize.hideAxisTicks(specRef.unit, specRef.settings, 'x'); - } - var newW = calcSize('x', specRef.unit, byDensity); - var newH = srcSize.height; - return { newW: newW, newH: newH }; - } - }; - - var SpecTransformCalcSize = exports.SpecTransformCalcSize = function () { - function SpecTransformCalcSize(spec) { - _classCallCheck(this, SpecTransformCalcSize); - - this.spec = spec; - this.isApplicable = _utils.utils.isSpecRectCoordsOnly(spec.unit); - } - - _createClass(SpecTransformCalcSize, [{ - key: 'transform', - value: function transform(chart) { - - var specRef = this.spec; - - if (!this.isApplicable) { - return specRef; - } - - var fitModel = specRef.settings.fitModel; - - if (!fitModel) { - return specRef; - } - - var scales = specRef.scales; - - var groupFramesBy = function groupFramesBy(frames, dim) { - return frames.reduce(function (memo, f) { - var fKey = f.key || {}; - var fVal = fKey[dim]; - memo[fVal] = memo[fVal] || []; - memo[fVal].push(f); - return memo; - }, {}); - }; - - var calcScaleSize = function calcScaleSize(scaleInfo, maxTickText) { - - var r = 0; - - if (scaleInfo.discrete) { - r = maxTickText * scaleInfo.domain().length; - } else { - r = maxTickText * 4; - } - - return r; - }; - - var calcSizeRecursively = function calcSizeRecursively(prop, root, takeStepSizeStrategy) { - var frame = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; - - - var xCfg = prop === 'x' ? root.x : root.y; - var yCfg = prop === 'x' ? root.y : root.x; - var guide = root.guide; - var xSize = prop === 'x' ? takeStepSizeStrategy(guide.x) : takeStepSizeStrategy(guide.y); - - var resScaleSize = prop === 'x' ? guide.padding.l + guide.padding.r : guide.padding.b + guide.padding.t; - - if (root.units[0].type === 'ELEMENT.INTERVAL' && prop === 'y' === Boolean(root.units[0].flip) && root.units[0].label && !chart.getScaleInfo(root.units[0].label, frame).isEmpty()) { - - var labelFontSize = guide.label && guide.label.fontSize ? guide.label.fontSize : 10; - var rowsTotal = root.frames.reduce(function (sum, f) { - return f.full().length * labelFontSize; - }, 0); - var scaleSize = calcScaleSize(chart.getScaleInfo(xCfg, frame), xSize); - return resScaleSize + Math.max(rowsTotal, scaleSize); - } else if (root.units[0].type !== 'COORDS.RECT') { - - var xScale = chart.getScaleInfo(xCfg, frame); - return resScaleSize + calcScaleSize(xScale, xSize); - } else { - - var rows = groupFramesBy(root.frames, scales[yCfg].dim); - var rowsSizes = Object.keys(rows).map(function (kRow) { - return rows[kRow].map(function (f) { - return calcSizeRecursively(prop, f.units[0], takeStepSizeStrategy, f); - }).reduce(function (sum, size) { - return sum + size; - }, 0); - }); - - // pick up max row size - var maxRowSize = Math.max.apply(Math, _toConsumableArray(rowsSizes)); - return resScaleSize + maxRowSize; - } - }; - - var srcSize = specRef.settings.size; - - var newW = srcSize.width; - var newH = srcSize.height; - - var strategy = fitModelStrategies[fitModel]; - if (strategy) { - var newSize = strategy(srcSize, calcSizeRecursively, specRef, _specTransformOptimize.SpecTransformOptimize.optimizeXAxisLabel); - newW = newSize.newW; - newH = newSize.newH; - } - - var prettifySize = function prettifySize(srcSize, newSize, rScroll) { - - var scrollSize = specRef.settings.getScrollbarSize(chart.getLayout().contentContainer); - - var recommendedWidth = newSize.width > srcSize.width && newSize.width <= srcSize.width * rScroll ? srcSize.width : newSize.width; - var recommendedHeight = newSize.height > srcSize.height && newSize.height <= srcSize.height * rScroll ? srcSize.height : newSize.height; - - var deltaW = srcSize.width - recommendedWidth; - var deltaH = srcSize.height - recommendedHeight; - - var scrollW = deltaH >= 0 ? 0 : scrollSize.width; - var scrollH = deltaW >= 0 ? 0 : scrollSize.height; - - return { - height: recommendedHeight - scrollH, - width: recommendedWidth - scrollW - }; - }; - - specRef.settings.size = prettifySize(srcSize, { width: newW, height: newH }, specRef.settings.avoidScrollAtRatio); - - return specRef; - } - }]); - - return SpecTransformCalcSize; - }(); - -/***/ }, -/* 34 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var SpecTransformOptimize = exports.SpecTransformOptimize = function () { - function SpecTransformOptimize() { - _classCallCheck(this, SpecTransformOptimize); - } - - _createClass(SpecTransformOptimize, null, [{ - key: 'optimizeXAxisLabel', - value: function optimizeXAxisLabel(root, settings) { - var xAxisTickLabelLimit = settings.xAxisTickLabelLimit; - - - var enterSpec = function enterSpec(rootUnit) { - - if (!rootUnit.guide.x.hide && !rootUnit.guide.x.hideTicks && rootUnit.guide.x.rotate !== 0) { - rootUnit.guide.x.rotate = 0; - rootUnit.guide.x.textAnchor = 'middle'; - - var tickTextWidth = Math.min(xAxisTickLabelLimit, rootUnit.guide.x.$maxTickTextW); - var tickTextDelta = 0 - tickTextWidth + rootUnit.guide.x.$maxTickTextH; - - improvePadding(rootUnit, tickTextDelta); - } - - (rootUnit.units || []).filter(function (u) { - return u.type === 'COORDS.RECT'; - }).forEach(function (u) { - return enterSpec(u); - }); - }; - - var improvePadding = function improvePadding(unit, tickTextDelta) { - if (root !== unit && unit.guide.autoLayout === 'extract-axes') { - root.guide.x.padding += tickTextDelta; - root.guide.padding.b += tickTextDelta; - } else { - unit.guide.x.label.padding += unit.guide.x.label.padding > 0 ? tickTextDelta : 0; - unit.guide.padding.b += unit.guide.padding.b > 0 ? tickTextDelta : 0; - } - }; - - enterSpec(root); - } - }, { - key: 'hideAxisTicks', - value: function hideAxisTicks(root, settings, axis) { - var enterSpec = function enterSpec(rootUnit) { - var pad = axis === 'x' ? 'b' : 'l'; - var g = rootUnit.guide; - - if (!g[axis].hide && !g[axis].hideTicks) { - g[axis].hideTicks = true; - var hasLabel = g[axis].label.text && !g[axis].label.hide; - g.padding[pad] = g.paddingNoTicks ? g.paddingNoTicks[pad] : 0; - g[axis].padding = g[axis].paddingNoTicks || 0; - g[axis].label.padding = hasLabel ? g[axis].label.paddingNoTicks : 0; - } - - (rootUnit.units || []).filter(function (u) { - return u.type === 'COORDS.RECT'; - }).forEach(function (u) { - return enterSpec(u); - }); - }; - - enterSpec(root); - } - }]); - - return SpecTransformOptimize; - }(); - -/***/ }, -/* 35 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SpecTransformApplyRatio = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var SpecTransformApplyRatio = exports.SpecTransformApplyRatio = function () { - function SpecTransformApplyRatio(spec) { - _classCallCheck(this, SpecTransformApplyRatio); - - this.spec = spec; - this.isApplicable = spec.settings.autoRatio && _utils.utils.isSpecRectCoordsOnly(spec.unit); - } - - _createClass(SpecTransformApplyRatio, [{ - key: 'transform', - value: function transform(chartInstance) { - - var refSpec = this.spec; - - if (!this.isApplicable) { - return refSpec; - } - - try { - this.ruleApplyRatio(refSpec, chartInstance); - } catch (ex) { - if (ex.message !== 'Not applicable') { - throw ex; - } - } - - return refSpec; - } - }, { - key: 'ruleApplyRatio', - value: function ruleApplyRatio(spec, chartInstance) { - - var isCoordsRect = function isCoordsRect(unitRef) { - return unitRef.type === 'COORDS.RECT' || unitRef.type === 'RECT'; - }; - - var isElement = function isElement(unitRef) { - return unitRef.type.indexOf('ELEMENT.') === 0; - }; - - var traverse = function traverse(root, enterFn, exitFn) { - var level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; - - - var shouldContinue = enterFn(root, level); - - if (shouldContinue) { - (root.units || []).map(function (rect) { - return traverse(rect, enterFn, exitFn, level + 1); - }); - } - - exitFn(root, level); - }; - - var xs = []; - var ys = []; - - var enterIterator = function enterIterator(unitRef, level) { - - if (level > 1 || !isCoordsRect(unitRef)) { - throw new Error('Not applicable'); - } - - xs.push(unitRef.x); - ys.push(unitRef.y); - - var units = unitRef.units || []; - var rects = units.map(function (x) { - - if (!(isCoordsRect(x) || isElement(x))) { - throw new Error('Not applicable'); - } - - return x; - }).filter(isCoordsRect); - - return rects.length === 1; - }; - - traverse(spec.unit, enterIterator, function () { - return 0; - }); - - var toScaleConfig = function toScaleConfig(scaleName) { - return spec.scales[scaleName]; - }; - var isValidScale = function isValidScale(scale) { - return scale.source === '/' && !scale.ratio && !scale.fitToFrameByDims; - }; - var isOrdinalScale = function isOrdinalScale(scale) { - return scale.type === 'ordinal' || scale.type === 'period' && !scale.period; - }; - - var realXs = xs.map(toScaleConfig).filter(isValidScale); - var realYs = ys.map(toScaleConfig).filter(isValidScale); - - var xyProd = 2; - if ([realXs.length, realYs.length].some(function (l) { - return l === xyProd; - })) { - var exDim = function exDim(s) { - return s.dim; - }; - var scalesIterator = function scalesIterator(s, i, list) { - return s.fitToFrameByDims = list.slice(0, i).map(exDim); - }; - var tryApplyRatioToScales = function tryApplyRatioToScales(axis, scalesRef) { - if (scalesRef.filter(isOrdinalScale).length === xyProd) { - scalesRef.forEach(scalesIterator); - scalesRef[0].ratio = _utils.utils.generateRatioFunction(axis, scalesRef.map(exDim), chartInstance); - } - }; - - tryApplyRatioToScales('x', realXs); - tryApplyRatioToScales('y', realYs); - } - } - }]); - - return SpecTransformApplyRatio; - }(); - -/***/ }, -/* 36 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SpecTransformExtractAxes = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var SpecTransformExtractAxes = exports.SpecTransformExtractAxes = function () { - function SpecTransformExtractAxes(spec) { - _classCallCheck(this, SpecTransformExtractAxes); - - this.spec = spec; - this.isApplicable = spec.settings.layoutEngine === 'EXTRACT' && _utils.utils.isSpecRectCoordsOnly(spec.unit); - } - - _createClass(SpecTransformExtractAxes, [{ - key: 'transform', - value: function transform() { - - var refSpec = this.spec; - - if (!this.isApplicable) { - return refSpec; - } - - try { - this.ruleExtractAxes(refSpec); - } catch (ex) { - if (ex.message === 'Not applicable') { - console.log('[TauCharts]: can\'t extract axes for the given chart specification'); // eslint-disable-line - } else { - throw ex; - } - } - - return refSpec; - } - }, { - key: 'ruleExtractAxes', - value: function ruleExtractAxes(spec) { - - var isCoordsRect = function isCoordsRect(unitRef) { - return unitRef.type === 'COORDS.RECT' || unitRef.type === 'RECT'; - }; - - var isElement = function isElement(unitRef) { - return unitRef.type.indexOf('ELEMENT.') === 0; - }; - - var pad = function pad(x) { - return x ? 10 : 0; - }; - - var ttl = { l: 0, r: 10, t: 10, b: 0 }; - var ttlNoTicks = { l: 0, b: 0 }; - var seq = []; - var seqNoTicks = []; - - var enterIterator = function enterIterator(unitRef, level) { - - if (level > 1 || !isCoordsRect(unitRef)) { - throw new Error('Not applicable'); - } - - unitRef.guide = unitRef.guide || {}; - var guide = unitRef.guide; - - var p = guide.padding || { l: 0, r: 0, t: 0, b: 0 }; - var pNoTicks = guide.paddingNoTicks || { l: 0, b: 0 }; - - ttl.l += p.l; - ttl.r += p.r; - ttl.t += p.t; - ttl.b += p.b; - ttlNoTicks.l += pNoTicks.l; - ttlNoTicks.b += pNoTicks.b; - - seq.push(Object.assign({}, ttl)); - seqNoTicks.push(Object.assign({}, ttlNoTicks)); - - var units = unitRef.units || []; - var rects = units.map(function (x) { - - if (!(isCoordsRect(x) || isElement(x))) { - throw new Error('Not applicable'); - } - - return x; - }).filter(isCoordsRect); - - return rects.length === 1; - }; - - var exitIterator = function exitIterator(unitRef) { - - var lvl = seq.pop(); - var lvlNoTicks = seqNoTicks.pop(); - - var guide = unitRef.guide || {}; - guide.x = guide.x || {}; - guide.x.padding = guide.x.padding || 0; - guide.x.paddingNoTicks = guide.x.paddingNoTicks || 0; - guide.y = guide.y || {}; - guide.y.padding = guide.y.padding || 0; - guide.y.paddingNoTicks = guide.y.paddingNoTicks || 0; - - guide.padding = { - l: pad(unitRef.y), - r: pad(1), - t: pad(1), - b: pad(unitRef.x) - }; - guide.paddingNoTicks = { - l: 0, - b: 0 - }; - - guide.autoLayout = 'extract-axes'; - - guide.x.padding += ttl.b - lvl.b; - guide.y.padding += ttl.l - lvl.l; - guide.x.paddingNoTicks += ttlNoTicks.b - lvlNoTicks.b; - guide.y.paddingNoTicks += ttlNoTicks.l - lvlNoTicks.l; - }; - - _utils.utils.traverseSpec(spec.unit, enterIterator, exitIterator); - - spec.unit.guide.padding = ttl; - spec.unit.guide.paddingNoTicks = ttlNoTicks; - } - }]); - - return SpecTransformExtractAxes; - }(); - -/***/ }, -/* 37 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var TaskRunner = function () { - function TaskRunner() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$src = _ref.src, - src = _ref$src === undefined ? null : _ref$src, - _ref$timeout = _ref.timeout, - timeout = _ref$timeout === undefined ? Number.MAX_SAFE_INTEGER : _ref$timeout, - _ref$syncInterval = _ref.syncInterval, - syncInterval = _ref$syncInterval === undefined ? Number.MAX_SAFE_INTEGER : _ref$syncInterval, - _ref$callbacks = _ref.callbacks, - callbacks = _ref$callbacks === undefined ? {} : _ref$callbacks; - - _classCallCheck(this, TaskRunner); - - this.setTimeout(timeout); - this.setSyncInterval(syncInterval); - this.setCallbacks(callbacks); - - this._running = false; - this._queue = []; - this._result = src; - this._syncDuration = 0; - this._asyncDuration = 0; - this._lastCall = null; - this._requestedFrameId = null; - - this._tasksCount = 0; - this._finishedTasksCount = 0; - } - - _createClass(TaskRunner, [{ - key: 'setTimeout', - value: function setTimeout(timeout) { - TaskRunner.checkType(timeout, 'number', 'timeout'); - this._timeout = timeout; - } - }, { - key: 'setSyncInterval', - value: function setSyncInterval(syncInterval) { - TaskRunner.checkType(syncInterval, 'number', 'syncInterval'); - this._syncInterval = syncInterval; - } - }, { - key: 'setCallbacks', - value: function setCallbacks(callbacks) { - TaskRunner.checkType(callbacks, 'object', 'callbacks'); - this._callbacks = Object.assign(this._callbacks || {}, callbacks); - } - }, { - key: 'addTask', - value: function addTask(fn) { - this._queue.push(fn); - this._tasksCount++; - return this; - } - }, { - key: 'run', - value: function run() { - if (this._running) { - throw new Error('Task Runner is already running'); - } - this._running = true; - TaskRunner.runnersInProgress++; - this._loopTasks(); - } - }, { - key: 'isRunning', - value: function isRunning() { - return this._running; - } - }, { - key: '_loopTasks', - value: function _loopTasks() { - - var task; - var duration; - var frameDuration = 0; - var isTimeoutReached; - var isFrameTimeoutReached; - var syncInterval = this._syncInterval / TaskRunner.runnersInProgress; - while (this._running && !(isTimeoutReached = this._asyncDuration > this._timeout) && !(isFrameTimeoutReached = frameDuration > syncInterval) && (task = this._queue.shift())) { - duration = this._runTask(task); - if (duration === null) { - return; - } - this._syncDuration += duration; - this._asyncDuration += duration; - frameDuration += duration; - } - - if (isTimeoutReached && this._queue.length > 0) { - this.stop(); - if (this._callbacks.timeout) { - this._callbacks.timeout.call(null, this._asyncDuration, this); - } - } - - if (!isTimeoutReached && isFrameTimeoutReached && this._queue.length > 0) { - this._requestFrame(); - } - - if (this._queue.length === 0) { - this.stop(); - if (this._callbacks.done) { - this._callbacks.done.call(null, this._result, this); - } - } - } - }, { - key: '_runTask', - value: function _runTask(task) { - var start = performance.now(); - if (this._callbacks.error) { - try { - this._result = task.call(null, this._result, this); - } catch (err) { - this.stop(); - this._callbacks.error.call(null, err, this); - return null; - } - } else { - this._result = task.call(null, this._result, this); - } - var end = performance.now(); - var duration = end - start; - this._finishedTasksCount++; - if (this._callbacks.progress) { - this._callbacks.progress.call(null, this._finishedTasksCount / this._tasksCount, this); - } - return duration; - } - }, { - key: '_requestFrame', - value: function _requestFrame() { - var _this = this; - - var start = performance.now(); - this._requestedFrameId = requestAnimationFrame(function () { - _this._requestedFrameId = null; - var end = performance.now(); - _this._asyncDuration += end - start; - _this._loopTasks(); - }); - } - }, { - key: 'stop', - value: function stop() { - if (!this._running) { - throw new Error('Task Runner is already stopped'); - } - this._running = false; - TaskRunner.runnersInProgress--; - if (this._requestedFrameId) { - cancelAnimationFrame(this._requestedFrameId); - this._requestedFrameId = null; - } - } - }], [{ - key: 'checkType', - value: function checkType(x, t, name) { - if ((typeof x === 'undefined' ? 'undefined' : _typeof(x)) !== t) { - throw new Error('Task Runner "' + name + '" property is not "' + t + '"'); - } - } - }]); - - return TaskRunner; - }(); - - exports.default = TaskRunner; - - - TaskRunner.runnersInProgress = 0; - -/***/ }, -/* 38 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Chart = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - - var _tau = __webpack_require__(20); - - var _utils = __webpack_require__(3); - - var _chartAliasRegistry = __webpack_require__(39); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var Chart = function (_Plot) { - _inherits(Chart, _Plot); - - function Chart(config) { - _classCallCheck(this, Chart); - - var errors = _chartAliasRegistry.chartTypesRegistry.validate(config.type, config); - - if (errors.length > 0) { - throw new Error(errors[0]); - } - - var chartFactory = _chartAliasRegistry.chartTypesRegistry.get(config.type); - - config = _utils.utils.defaults(config, { autoResize: true }); - config.settings = _tau.Plot.setupSettings(config.settings); - config.dimensions = _tau.Plot.setupMetaInfo(config.dimensions, config.data); - - var _this = _possibleConstructorReturn(this, (Chart.__proto__ || Object.getPrototypeOf(Chart)).call(this, chartFactory(config))); - - if (config.autoResize) { - Chart.winAware.push(_this); - } - return _this; - } - - _createClass(Chart, [{ - key: 'destroy', - value: function destroy() { - var index = Chart.winAware.indexOf(this); - if (index !== -1) { - Chart.winAware.splice(index, 1); - } - _get(Chart.prototype.__proto__ || Object.getPrototypeOf(Chart.prototype), 'destroy', this).call(this); - } - }]); - - return Chart; - }(_tau.Plot); - - Chart.winAware = []; - - Chart.resizeOnWindowEvent = function () { - var rIndex = void 0; - - function requestReposition() { - if (rIndex || !Chart.winAware.length) { - return; - } - rIndex = window.requestAnimationFrame(resize); - } - - function resize() { - rIndex = 0; - for (var i = 0, l = Chart.winAware.length; i < l; i++) { - Chart.winAware[i].resize(); - } - } - - return requestReposition; - }(); - window.addEventListener('resize', Chart.resizeOnWindowEvent); - - exports.Chart = Chart; - -/***/ }, -/* 39 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.chartTypesRegistry = undefined; - - var _error = __webpack_require__(8); - - var chartTypes = {}; - var chartRules = {}; - - var throwNotSupported = function throwNotSupported(alias) { - var msg = 'Chart type ' + alias + ' is not supported.'; - console.log(msg); // eslint-disable-line - console.log('Use one of ' + Object.keys(chartTypes).join(', ') + '.'); // eslint-disable-line - throw new _error.TauChartError(msg, _error.errorCodes.NOT_SUPPORTED_TYPE_CHART); - }; - - var chartTypesRegistry = { - validate: function validate(alias, config) { - - if (!chartRules.hasOwnProperty(alias)) { - throwNotSupported(alias); - } - - return chartRules[alias].reduce(function (e, rule) { - return e.concat(rule(config) || []); - }, []); - }, - get: function get(alias) { - - var chartFactory = chartTypes[alias]; - - if (typeof chartFactory !== 'function') { - throwNotSupported(alias); - } - - return chartFactory; - }, - add: function add(alias, converter) { - var rules = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; - - chartTypes[alias] = converter; - chartRules[alias] = rules; - return this; - }, - - getAllRegisteredTypes: function getAllRegisteredTypes() { - return chartTypes; - } - }; - - exports.chartTypesRegistry = chartTypesRegistry; - -/***/ }, -/* 40 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Cartesian = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _element = __webpack_require__(5); - - var _utilsDom = __webpack_require__(1); - - var _utilsDraw = __webpack_require__(10); - - var _utils = __webpack_require__(3); - - var _const = __webpack_require__(22); - - var _formatterRegistry = __webpack_require__(32); - - var _d3Decorators = __webpack_require__(9); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var selectOrAppend = _utilsDom.utilsDom.selectOrAppend; - - var calcTicks = function calcTicks(distributionKoeff) { - var limit = 20; - var factor = distributionKoeff <= limit ? 1 : 0.75; - return Math.max(2, Math.round(distributionKoeff * factor)); - }; - - var Cartesian = exports.Cartesian = function (_Element) { - _inherits(Cartesian, _Element); - - function Cartesian(config) { - _classCallCheck(this, Cartesian); - - var _this = _possibleConstructorReturn(this, (Cartesian.__proto__ || Object.getPrototypeOf(Cartesian)).call(this, config)); - - _this.config = config; - - _this.config.guide = _utils.utils.defaults(_this.config.guide || {}, { - showGridLines: 'xy', - padding: { l: 50, r: 0, t: 0, b: 50 } - }); - - _this.config.guide.x = _this.config.guide.x || {}; - _this.config.guide.x = _utils.utils.defaults(_this.config.guide.x, { - cssClass: 'x axis', - textAnchor: 'middle', - padding: 10, - hide: false, - scaleOrient: 'bottom', - rotate: 0, - density: 20, - label: {}, - tickFormatWordWrapLimit: 100 - }); - - if (typeof _this.config.guide.x.label === 'string') { - _this.config.guide.x.label = { - text: _this.config.guide.x.label - }; - } - - _this.config.guide.x.label = _utils.utils.defaults(_this.config.guide.x.label, { - text: 'X', - rotate: 0, - padding: 40, - textAnchor: 'middle' - }); - - _this.config.guide.y = _this.config.guide.y || {}; - _this.config.guide.y = _utils.utils.defaults(_this.config.guide.y, { - cssClass: 'y axis', - textAnchor: 'start', - padding: 10, - hide: false, - scaleOrient: 'left', - rotate: 0, - density: 20, - label: {}, - tickFormatWordWrapLimit: 100 - }); - - if (typeof _this.config.guide.y.label === 'string') { - _this.config.guide.y.label = { - text: _this.config.guide.y.label - }; - } - - _this.config.guide.y.label = _utils.utils.defaults(_this.config.guide.y.label, { - text: 'Y', - rotate: -90, - padding: 20, - textAnchor: 'middle' - }); - - var unit = _this.config; - var guide = unit.guide; - if (guide.autoLayout === 'extract-axes') { - var containerHeight = unit.options.containerHeight; - var diff = containerHeight - (unit.options.top + unit.options.height); - guide.x.hide = Math.floor(diff) > 0; - guide.y.hide = Math.floor(unit.options.left) > 0; - } - - var options = _this.config.options; - var padding = _this.config.guide.padding; - - _this.L = options.left + padding.l; - _this.T = options.top + padding.t; - _this.W = options.width - (padding.l + padding.r); - _this.H = options.height - (padding.t + padding.b); - return _this; - } - - _createClass(Cartesian, [{ - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - var w = this.W; - var h = this.H; - this.xScale = fnCreateScale('pos', this.config.x, [0, w]); - this.yScale = fnCreateScale('pos', this.config.y, [h, 0]); - this.regScale('x', this.xScale).regScale('y', this.yScale); - return { - scaleX: this.xScale, - scaleY: this.yScale, - xi: function xi() { - return w / 2; - }, - yi: function yi() { - return h / 2; - }, - sizeX: function sizeX() { - return w; - }, - sizeY: function sizeY() { - return h; - } - }; - } - }, { - key: 'getGrammarRules', - value: function getGrammarRules() { - return [function (prevModel) { - var sx = prevModel.scaleX; - var sy = prevModel.scaleY; - return { - xi: function xi(d) { - return !d ? prevModel.xi(d) : sx(d[sx.dim]); - }, - yi: function yi(d) { - return !d ? prevModel.yi(d) : sy(d[sy.dim]); - }, - sizeX: function sizeX(d) { - return !d ? prevModel.sizeX(d) : sx.stepSize(d[sx.dim]); - }, - sizeY: function sizeY(d) { - return !d ? prevModel.sizeY(d) : sy.stepSize(d[sy.dim]); - } - }; - }]; - } - }, { - key: 'createScreenModel', - value: function createScreenModel(grammarModel) { - return grammarModel; - } - }, { - key: 'allocateRect', - value: function allocateRect(k) { - var _this2 = this; - - var model = this.screenModel; - return { - slot: function slot(uid) { - return _this2.config.options.container.selectAll('.uid_' + uid); - }, - left: model.xi(k) - model.sizeX(k) / 2, - top: model.yi(k) - model.sizeY(k) / 2, - width: model.sizeX(k), - height: model.sizeY(k), - // TODO: Fix autoLayout.. redundant properties - containerWidth: this.W, - containerHeight: this.H - }; - } - }, { - key: 'drawFrames', - value: function drawFrames(frames) { - - var node = Object.assign({}, this.config); - - var options = node.options; - - var innerWidth = this.W; - var innerHeight = this.H; - - node.x = this.xScale; - node.y = this.yScale; - - node.x.scaleObj = this.xScale; - node.y.scaleObj = this.yScale; - - node.x.guide = node.guide.x; - node.y.guide = node.guide.y; - - node.x.guide.label.size = innerWidth; - node.y.guide.label.size = innerHeight; - - // TODO: Should we modify transform of a container here or create own container? - (options.container.attr('transform') ? (0, _d3Decorators.d3_transition)(options.container, this.config.guide.animationSpeed, 'cartesianContainerTransform') : options.container).attr('transform', _utilsDraw.utilsDraw.translate(this.L, this.T)); - - if (!node.x.guide.hide) { - var orientX = node.x.guide.scaleOrient; - var positionX = orientX === 'top' ? [0, 0 - node.guide.x.padding] : [0, innerHeight + node.guide.x.padding]; - - this._drawDimAxis(options.container, node.x, positionX, innerWidth); - } else { - this._removeDimAxis(options.container, node.x); - } - - if (!node.y.guide.hide) { - var orientY = node.y.guide.scaleOrient; - var positionY = orientY === 'right' ? [innerWidth + node.guide.y.padding, 0] : [0 - node.guide.y.padding, 0]; - - this._drawDimAxis(options.container, node.y, positionY, innerHeight); - } else { - this._removeDimAxis(options.container, node.y); - } - - var xdata = frames.reduce(function (memo, f) { - return memo.concat((f.units || []).map(function (unit) { - return unit.uid; - })); - }, []); - - var grid = this._drawGrid(options.container, node, innerWidth, innerHeight, options); - var xcells = (0, _d3Decorators.d3_selectAllImmediate)(grid, '.cell').data(xdata, function (x) { - return x; - }); - xcells.enter().append('g').attr('class', function (d) { - return _const.CSS_PREFIX + 'cell cell uid_' + d; - }); - (0, _d3Decorators.d3_transition)(xcells.classed('tau-active', true), this.config.guide.animationSpeed).attr('opacity', 1); - (0, _d3Decorators.d3_transition)(xcells.exit().classed('tau-active', false), this.config.guide.animationSpeed).attr('opacity', 1e-6).remove(); - } - }, { - key: '_drawDimAxis', - value: function _drawDimAxis(container, scale, position, size) { - var _this3 = this; - - var axisScale = _d2.default.svg.axis().scale(scale.scaleObj).orient(scale.guide.scaleOrient); - - var formatter = _formatterRegistry.FormatterRegistry.get(scale.guide.tickFormat, scale.guide.tickFormatNullAlias); - if (formatter !== null) { - axisScale.ticks(calcTicks(size / scale.guide.density)); - axisScale.tickFormat(formatter); - } - - var animationSpeed = this.config.guide.animationSpeed; - - selectOrAppend(container, this._getAxisSelector(scale)).classed('tau-active', true).classed(scale.guide.cssClass, true).call(function (axis) { - - var transAxis = (0, _d3Decorators.d3_transition)(axis, animationSpeed, 'axisTransition'); - var prevAxisTranslate = axis.attr('transform'); - var nextAxisTranslate = _utilsDraw.utilsDraw.translate.apply(_utilsDraw.utilsDraw, _toConsumableArray(position)); - if (nextAxisTranslate !== prevAxisTranslate) { - (prevAxisTranslate ? transAxis : axis).attr('transform', _utilsDraw.utilsDraw.translate.apply(_utilsDraw.utilsDraw, _toConsumableArray(position))); - } - transAxis.call(axisScale); - transAxis.attr('opacity', 1); - - var isHorizontal = _utilsDraw.utilsDraw.getOrientation(scale.guide.scaleOrient) === 'h'; - var prettifyTick = scale.scaleType === 'ordinal' || scale.scaleType === 'period'; - if (prettifyTick && !scale.guide.hideTicks) { - (0, _d3Decorators.d3_decorator_prettify_categorical_axis_ticks)(transAxis, scale, isHorizontal, animationSpeed); - } - - if (scale.scaleType === 'linear') { - (0, _d3Decorators.d3_decorator_highlightZeroTick)(axis, scale.scaleObj); - } - - (0, _d3Decorators.d3_decorator_wrap_tick_label)(axis, animationSpeed, scale.guide, isHorizontal, scale); - - if (!scale.guide.label.hide) { - (0, _d3Decorators.d3_decorator_prettify_axis_label)(axis, scale.guide.label, isHorizontal, size, animationSpeed); - } - - if (scale.guide.hideTicks) { - axis.selectAll('.tick').remove(); - axis.selectAll('.domain').remove(); - return; - } - - var activeTicks = scale.scaleObj.ticks ? scale.scaleObj.ticks() : scale.scaleObj.domain(); - var fixAxesCollision = function fixAxesCollision() { - if (prettifyTick && scale.guide.avoidCollisions) { - (0, _d3Decorators.d3_decorator_avoidLabelsCollisions)(axis, isHorizontal, activeTicks); - } - - if (isHorizontal && scale.scaleType === 'time') { - (0, _d3Decorators.d3_decorator_fixHorizontalAxisTicksOverflow)(axis, activeTicks); - } - }; - var fixTickTextOverflow = function fixTickTextOverflow() { - if (isHorizontal && (scale.scaleType === 'time' || scale.scaleType === 'linear')) { - (0, _d3Decorators.d3_decorator_fixEdgeAxisTicksOverflow)(axis, activeTicks); - } - }; - var fixAxesTicks = function fixAxesTicks() { - fixAxesCollision(); - fixTickTextOverflow(); - }; - fixAxesCollision(); - // NOTE: As far as floating axes transition overrides current, - // transition `end` event cannot be used. So using `setTimeout`. - // transAxis.onTransitionEnd(fixAxesCollision); - var timeoutField = '_transitionEndTimeout_' + (isHorizontal ? 'h' : 'v'); - clearTimeout(_this3[timeoutField]); - if (animationSpeed > 0) { - _this3[timeoutField] = setTimeout(fixAxesTicks, animationSpeed * 1.5); - } else { - fixTickTextOverflow(); - } - }); - } - }, { - key: '_removeDimAxis', - value: function _removeDimAxis(container, scale) { - var axis = (0, _d3Decorators.d3_selectAllImmediate)(container, this._getAxisSelector(scale)).classed('tau-active', false); - (0, _d3Decorators.d3_transition)(axis, this.config.guide.animationSpeed, 'axisTransition').attr('opacity', 1e-6).remove(); - } - }, { - key: '_getAxisSelector', - value: function _getAxisSelector(scale) { - var isHorizontal = _utilsDraw.utilsDraw.getOrientation(scale.guide.scaleOrient) === 'h'; - return 'g.' + (isHorizontal ? 'x' : 'y') + '.axis'; - } - }, { - key: '_drawGrid', - value: function _drawGrid(container, node, width, height) { - var _this4 = this; - - var grid = selectOrAppend(container, 'g.grid').attr('transform', _utilsDraw.utilsDraw.translate(0, 0)).call(function (selection) { - - var grid = selection; - - var animationSpeed = _this4.config.guide.animationSpeed; - - var linesOptions = (node.guide.showGridLines || '').toLowerCase(); - if (linesOptions.length > 0) { - - var gridLines = selectOrAppend(grid, 'g.grid-lines'); - - if (linesOptions.indexOf('x') > -1) { - var xScale = node.x; - var xOrientKoeff = xScale.guide.scaleOrient === 'top' ? -1 : 1; - var xGridAxis = _d2.default.svg.axis().scale(xScale.scaleObj).orient(xScale.guide.scaleOrient).tickSize(xOrientKoeff * height); - - var formatter = _formatterRegistry.FormatterRegistry.get(xScale.guide.tickFormat); - if (formatter !== null) { - xGridAxis.ticks(calcTicks(width / xScale.guide.density)); - xGridAxis.tickFormat(formatter); - } - - var xGridLines = selectOrAppend(gridLines, 'g.grid-lines-x'); - var xGridLinesTrans = (0, _d3Decorators.d3_transition)(xGridLines, animationSpeed).call(xGridAxis); - - var isHorizontal = _utilsDraw.utilsDraw.getOrientation(xScale.guide.scaleOrient) === 'h'; - var prettifyTick = xScale.scaleType === 'ordinal' || xScale.scaleType === 'period'; - if (prettifyTick) { - (0, _d3Decorators.d3_decorator_prettify_categorical_axis_ticks)(xGridLinesTrans, xScale, isHorizontal, animationSpeed); - } - - if (xScale.scaleType === 'linear' && !xScale.guide.hideTicks) { - (0, _d3Decorators.d3_decorator_highlightZeroTick)(xGridLines, xScale.scaleObj); - } - - var extraGridLines = selectOrAppend(gridLines, 'g.tau-extraGridLines'); - (0, _d3Decorators.d3_decorator_fix_axis_start_line)(extraGridLines, isHorizontal, width, height, animationSpeed); - - if (xScale.guide.hideTicks) { - xGridLines.selectAll('.tick').filter(function (d) { - return d != 0; - }).remove(); - } - } - - if (linesOptions.indexOf('y') > -1) { - var yScale = node.y; - var yOrientKoeff = yScale.guide.scaleOrient === 'right' ? 1 : -1; - var yGridAxis = _d2.default.svg.axis().scale(yScale.scaleObj).orient(yScale.guide.scaleOrient).tickSize(yOrientKoeff * width); - - var _formatter = _formatterRegistry.FormatterRegistry.get(yScale.guide.tickFormat); - if (_formatter !== null) { - yGridAxis.ticks(calcTicks(height / yScale.guide.density)); - yGridAxis.tickFormat(_formatter); - } - - var yGridLines = selectOrAppend(gridLines, 'g.grid-lines-y'); - var yGridLinesTrans = (0, _d3Decorators.d3_transition)(yGridLines, animationSpeed).call(yGridAxis); - - var _isHorizontal = _utilsDraw.utilsDraw.getOrientation(yScale.guide.scaleOrient) === 'h'; - var _prettifyTick = yScale.scaleType === 'ordinal' || yScale.scaleType === 'period'; - if (_prettifyTick) { - (0, _d3Decorators.d3_decorator_prettify_categorical_axis_ticks)(yGridLinesTrans, yScale, _isHorizontal, animationSpeed); - } - - if (yScale.scaleType === 'linear' && !yScale.guide.hideTicks) { - (0, _d3Decorators.d3_decorator_highlightZeroTick)(yGridLines, yScale.scaleObj); - } - - var fixLineScales = ['time', 'ordinal', 'period']; - var fixBottomLine = fixLineScales.indexOf(yScale.scaleType) !== -1; - if (fixBottomLine) { - var _extraGridLines = selectOrAppend(gridLines, 'g.tau-extraGridLines'); - (0, _d3Decorators.d3_decorator_fix_axis_start_line)(_extraGridLines, _isHorizontal, width, height, animationSpeed); - } - - if (yScale.guide.hideTicks) { - yGridLines.selectAll('.tick').filter(function (d) { - return d != 0; - }).remove(); - } - } - - gridLines.selectAll('text').remove(); - } - }); - - return grid; - } - }]); - - return Cartesian; - }(_element.Element); - -/***/ }, -/* 41 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Parallel = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _element = __webpack_require__(5); - - var _utilsDraw = __webpack_require__(10); - - var _utils = __webpack_require__(3); - - var _const = __webpack_require__(22); - - var _formatterRegistry = __webpack_require__(32); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var Parallel = exports.Parallel = function (_Element) { - _inherits(Parallel, _Element); - - function Parallel(config) { - _classCallCheck(this, Parallel); - - var _this = _possibleConstructorReturn(this, (Parallel.__proto__ || Object.getPrototypeOf(Parallel)).call(this, config)); - - _this.config = config; - - _this.config.guide = _utils.utils.defaults(_this.config.guide || {}, { - padding: { l: 50, r: 50, t: 50, b: 50 }, - enableBrushing: false - }); - - _this.columnsBrushes = {}; - - _this.on('force-brush', function (sender, e) { - return _this._forceBrushing(e); - }); - - var options = _this.config.options; - var padding = _this.config.guide.padding; - _this.L = options.left + padding.l; - _this.T = options.top + padding.t; - _this.W = options.width - (padding.l + padding.r); - _this.H = options.height - (padding.t + padding.b); - return _this; - } - - _createClass(Parallel, [{ - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - - var cfg = this.config; - - var innerWidth = this.W; - var innerHeight = this.H; - - this.columnsScalesMap = cfg.columns.reduce(function (memo, xi) { - memo[xi] = fnCreateScale('pos', xi, [innerHeight, 0]); - return memo; - }, {}); - - var step = innerWidth / (cfg.columns.length - 1); - - var colsMap = cfg.columns.reduce(function (memo, p, i) { - memo[p] = i * step; - return memo; - }, {}); - - this.xBase = function (p) { - return colsMap[p]; - }; - - this.regScale('columns', this.columnsScalesMap); - return {}; - } - }, { - key: 'allocateRect', - value: function allocateRect() { - var _this2 = this; - - return { - slot: function slot(uid) { - return _this2.config.options.container.selectAll('.uid_' + uid); - }, - left: 0, - top: 0, - width: this.W, - height: this.H, - // TODO: Fix autoLayout.. redundant properties - containerWidth: this.W, - containerHeight: this.H - }; - } - }, { - key: 'drawFrames', - value: function drawFrames(frames) { - var _this3 = this; - - var cfg = Object.assign({}, this.config); - var options = cfg.options; - - var updateCellLayers = function updateCellLayers(cellId, cell, frame) { - - var layers = cell.selectAll('.layer_' + cellId).data(frame.units, function (unit) { - return unit.uid; - }); - layers.exit().remove(); - layers.enter().append('g').attr('class', function (unit) { - return 'layer_' + cellId + ' uid_' + unit.uid; - }); - }; - - var cellFrameIterator = function cellFrameIterator(cellFrame) { - updateCellLayers(options.frameId, _d2.default.select(this), cellFrame); - }; - - var grid = this._fnDrawGrid(options.container, cfg, options.frameId, Object.keys(this.columnsScalesMap).reduce(function (memo, k) { - return memo.concat([_this3.columnsScalesMap[k].getHash()]); - }, []).join('_')); - - var frms = grid.selectAll('.parent-frame-' + options.frameId).data(frames, function (f) { - return f.hash(); - }); - frms.exit().remove(); - frms.each(cellFrameIterator); - frms.enter().append('g').attr('class', function (d) { - return _const.CSS_PREFIX + 'cell cell parent-frame-' + options.frameId + ' frame-' + d.hash(); - }).each(cellFrameIterator); - - var cols = this._fnDrawColumns(grid, cfg); - - if (cfg.guide.enableBrushing) { - this._enableBrushing(cols); - } - } - }, { - key: '_fnDrawGrid', - value: function _fnDrawGrid(container, config, frameId, uniqueHash) { - - var grid = container.selectAll('.grid_' + frameId).data([uniqueHash], function (x) { - return x; - }); - grid.exit().remove(); - grid.enter().append('g').attr('class', 'grid grid_' + frameId).attr('transform', _utilsDraw.utilsDraw.translate(this.L, this.T)); - - return grid; - } - }, { - key: '_fnDrawColumns', - value: function _fnDrawColumns(grid, config) { - var colsGuide = config.guide.columns || {}; - var xBase = this.xBase; - var columnsScalesMap = this.columnsScalesMap; - var d3Axis = _d2.default.svg.axis().orient('left'); - - var cols = grid.selectAll('.column').data(config.columns, function (x) { - return x; - }); - cols.exit().remove(); - cols.enter().append('g').attr('class', 'column').attr('transform', function (d) { - return _utilsDraw.utilsDraw.translate(xBase(d), 0); - }).call(function () { - this.append('g').attr('class', 'y axis').each(function (d) { - var propName = columnsScalesMap[d].dim; - var axisScale = d3Axis.scale(columnsScalesMap[d]); - var columnGuide = colsGuide[propName] || {}; - var formatter = _formatterRegistry.FormatterRegistry.get(columnGuide.tickFormat, columnGuide.tickFormatNullAlias); - if (formatter !== null) { - axisScale.tickFormat(formatter); - } - - _d2.default.select(this).call(axisScale); - }).append('text').attr('class', 'label').attr('text-anchor', 'middle').attr('y', -9).text(function (d) { - return ((colsGuide[d] || {}).label || {}).text || columnsScalesMap[d].dim; - }); - }); - - return cols; - } - }, { - key: '_enableBrushing', - value: function _enableBrushing(cols) { - var _this4 = this; - - var brushWidth = 16; - - var columnsScalesMap = this.columnsScalesMap; - var columnsBrushes = this.columnsBrushes; - - var onBrushStartEventHandler = function onBrushStartEventHandler(e) { - return e; - }; - var onBrushEndEventHandler = function onBrushEndEventHandler(e) { - return e; - }; - var onBrushEventHandler = function onBrushEventHandler() { - var eventBrush = Object.keys(columnsBrushes).filter(function (k) { - return !columnsBrushes[k].empty(); - }).map(function (k) { - var ext = columnsBrushes[k].extent(); - var rng = []; - if (columnsScalesMap[k].discrete) { - rng = columnsScalesMap[k].domain().filter(function (val) { - var pos = columnsScalesMap[k](val); - return ext[0] <= pos && ext[1] >= pos; - }); - } else { - rng = [ext[0], ext[1]]; - } - - return { - dim: columnsScalesMap[k].dim, - func: columnsScalesMap[k].discrete ? 'inset' : 'between', - args: rng - }; - }); - - _this4.fire('brush', eventBrush); - }; - - cols.selectAll('.brush').remove(); - cols.append('g').attr('class', 'brush').each(function (d) { - columnsBrushes[d] = _d2.default.svg.brush().y(columnsScalesMap[d]).on('brushstart', onBrushStartEventHandler).on('brush', onBrushEventHandler).on('brushend', onBrushEndEventHandler); - - _d2.default.select(this).classed('brush-' + _utils.utils.generateHash(d), true).call(columnsBrushes[d]); - }).selectAll('rect').attr('x', brushWidth / 2 * -1).attr('width', brushWidth); - - return cols; - } - }, { - key: '_forceBrushing', - value: function _forceBrushing() { - var colsBrushSettings = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - - - var columnsBrushes = this.columnsBrushes; - var columnsScalesMap = this.columnsScalesMap; - - Object.keys(colsBrushSettings).filter(function (k) { - return columnsBrushes[k] && columnsScalesMap[k] && colsBrushSettings[k]; - }).forEach(function (k) { - var brushExt = colsBrushSettings[k]; - var ext = []; - if (columnsScalesMap[k].discrete) { - var positions = brushExt.map(columnsScalesMap[k]).filter(function (x) { - return x >= 0; - }); - var stepSize = columnsScalesMap[k].stepSize() / 2; - ext = [Math.min.apply(Math, _toConsumableArray(positions)) - stepSize, Math.max.apply(Math, _toConsumableArray(positions)) + stepSize]; - } else { - ext = [brushExt[0], brushExt[1]]; - } - var hashK = _utils.utils.generateHash(k); - columnsBrushes[k].extent(ext); - columnsBrushes[k](_d2.default.select('.brush-' + hashK)); - columnsBrushes[k].event(_d2.default.select('.brush-' + hashK)); - }); - } - }]); - - return Parallel; - }(_element.Element); - -/***/ }, -/* 42 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.GeoMap = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _utils = __webpack_require__(3); - - var _topojson = __webpack_require__(43); - - var _topojson2 = _interopRequireDefault(_topojson); - - var _d3Labeler = __webpack_require__(44); - - var _element = __webpack_require__(5); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - _d2.default.labeler = _d3Labeler.d3Labeler; - - var avgCharSize = 5.5; - var iterationsCount = 10; - var pointOpacity = 0.5; - - var hierarchy = ['land', 'continents', 'georegions', 'countries', 'regions', 'subunits', 'states', 'counties']; - - var GeoMap = exports.GeoMap = function (_Element) { - _inherits(GeoMap, _Element); - - function GeoMap(config) { - _classCallCheck(this, GeoMap); - - var _this = _possibleConstructorReturn(this, (GeoMap.__proto__ || Object.getPrototypeOf(GeoMap)).call(this, config)); - - _this.config = config; - _this.config.guide = _utils.utils.defaults(_this.config.guide || {}, { - defaultFill: 'rgba(128,128,128,0.25)', - padding: { l: 0, r: 0, t: 0, b: 0 }, - showNames: true - }); - _this.contourToFill = null; - - _this.on('highlight-area', function (sender, e) { - return _this._highlightArea(e); - }); - _this.on('highlight-point', function (sender, e) { - return _this._highlightPoint(e); - }); - _this.on('highlight', function (sender, e) { - return _this._highlightPoint(e); - }); - return _this; - } - - _createClass(GeoMap, [{ - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - - var node = this.config; - - var options = node.options; - var padding = node.guide.padding; - - var innerWidth = options.width - (padding.l + padding.r); - var innerHeight = options.height - (padding.t + padding.b); - - // y - latitude - this.latScale = fnCreateScale('pos', node.latitude, [0, innerHeight]); - // x - longitude - this.lonScale = fnCreateScale('pos', node.longitude, [innerWidth, 0]); - // size - this.sizeScale = fnCreateScale('size', node.size); - // color - this.colorScale = fnCreateScale('color', node.color); - - // code - this.codeScale = fnCreateScale('value', node.code); - // fill - this.fillScale = fnCreateScale('fill', node.fill); - - this.W = innerWidth; - this.H = innerHeight; - - this.regScale('latitude', this.latScale).regScale('longitude', this.lonScale).regScale('size', this.sizeScale).regScale('color', this.colorScale).regScale('code', this.codeScale).regScale('fill', this.fillScale); - - return {}; - } - }, { - key: 'drawFrames', - value: function drawFrames(frames) { - var _this2 = this; - - var guide = this.config.guide; - - if (typeof guide.sourcemap === 'string') { - - _d2.default.json(guide.sourcemap, function (e, topoJSONData) { - - if (e) { - throw e; - } - - _this2._drawMap(frames, topoJSONData); - }); - } else { - this._drawMap(frames, guide.sourcemap); - } - } - }, { - key: '_calcLabels', - value: function _calcLabels(topoJSONData, reverseContours, path) { - - var innerW = this.W; - var innerH = this.H; - - var labelsHashRef = {}; - - reverseContours.forEach(function (c) { - - var contourFeatures = _topojson2.default.feature(topoJSONData, topoJSONData.objects[c]).features || []; - - var labels = contourFeatures.map(function (d) { - - var info = d.properties || {}; - - var center = path.centroid(d); - var bounds = path.bounds(d); - - var sx = center[0]; - var sy = center[1]; - - var br = bounds[1][0]; - var bl = bounds[0][0]; - var size = br - bl; - var name = info.name || ''; - var abbr = info.abbr || name; - var isAbbr = size < name.length * avgCharSize; - var text = isAbbr ? abbr : name; - var isRef = size < 2.5 * avgCharSize; - var r = isRef ? innerW - sx - 3 * avgCharSize : 0; - - return { - id: c + '-' + d.id, - sx: sx, - sy: sy, - x: sx + r, - y: sy, - width: text.length * avgCharSize, - height: 10, - name: text, - r: r, - isRef: isRef - }; - }).filter(function (d) { - return !Number.isNaN(d.x) && !Number.isNaN(d.y); - }); - - var anchors = labels.map(function (d) { - return { x: d.sx, y: d.sy, r: d.r }; - }); - - _d2.default.labeler().label(labels).anchor(anchors).width(innerW).height(innerH).start(iterationsCount); - - labels.filter(function (item) { - return !item.isRef; - }).map(function (item) { - item.x = item.sx; - item.y = item.sy; - return item; - }).reduce(function (memo, item) { - memo[item.id] = item; - return memo; - }, labelsHashRef); - - var references = labels.filter(function (item) { - return item.isRef; - }); - if (references.length < 6) { - references.reduce(function (memo, item) { - memo[item.id] = item; - return memo; - }, labelsHashRef); - } - }); - - return labelsHashRef; - } - }, { - key: '_drawMap', - value: function _drawMap(frames, topoJSONData) { - var _this3 = this; - - var self = this; - - var guide = this.config.guide; - var options = this.config.options; - var node = this.config.options.container; - - var latScale = this.latScale; - var lonScale = this.lonScale; - var sizeScale = this.sizeScale; - var colorScale = this.colorScale; - - var codeScale = this.codeScale; - var fillScale = this.fillScale; - - var innerW = this.W; - var innerH = this.H; - - var contours = hierarchy.filter(function (h) { - return (topoJSONData.objects || {}).hasOwnProperty(h); - }); - - if (contours.length === 0) { - throw new Error('Invalid map: should contain some contours'); - } - - var contourToFill; - if (!fillScale.dim) { - - contourToFill = contours[contours.length - 1]; - } else if (codeScale.georole) { - - if (contours.indexOf(codeScale.georole) === -1) { - console.log('There is no contour for georole "' + codeScale.georole + '"'); // eslint-disable-line - console.log('Available contours are: ' + contours.join(' | ')); // eslint-disable-line - - throw new Error('Invalid [georole]'); - } - - contourToFill = codeScale.georole; - } else { - console.log('Specify [georole] for code scale'); // eslint-disable-line - throw new Error('[georole] is missing'); - } - - this.contourToFill = contourToFill; - - var center; - - if (latScale.dim && lonScale.dim) { - var lats = _d2.default.extent(latScale.domain()); - var lons = _d2.default.extent(lonScale.domain()); - center = [(lons[1] + lons[0]) / 2, (lats[1] + lats[0]) / 2]; - } - - var d3Projection = this._createProjection(topoJSONData, contours[0], center); - - var path = _d2.default.geo.path().projection(d3Projection); - - var xmap = node.selectAll('.map-container').data(['' + innerW + innerH + center + contours.join('-')], function (x) { - return x; - }); - xmap.exit().remove(); - xmap.enter().append('g').call(function () { - - var node = this; - - node.attr('class', 'map-container'); - - var labelsHash = {}; - var reverseContours = contours.reduceRight(function (m, t) { - return m.concat(t); - }, []); - - if (guide.showNames) { - labelsHash = self._calcLabels(topoJSONData, reverseContours, path); - } - - reverseContours.forEach(function (c, i) { - - var getInfo = function getInfo(d) { - return labelsHash[c + '-' + d.id]; - }; - - node.selectAll('.map-contour-' + c).data(_topojson2.default.feature(topoJSONData, topoJSONData.objects[c]).features || []).enter().append('g').call(function () { - - var cont = this; - - cont.attr('class', 'map-contour-' + c + ' map-contour-level map-contour-level-' + i).attr('fill', 'none'); - - cont.append('title').text(function (d) { - return (d.properties || {}).name; - }); - - cont.append('path').attr('d', path); - - cont.append('text').attr('class', 'place-label-' + c).attr('transform', function (d) { - var i = getInfo(d); - return i ? 'translate(' + [i.x, i.y] + ')' : ''; - }).text(function (d) { - var i = getInfo(d); - return i ? i.name : ''; - }); - - cont.append('line').attr('class', 'place-label-link-' + c).attr('stroke', 'gray').attr('stroke-width', 0.25).attr('x1', function (d) { - var i = getInfo(d); - return i && i.isRef ? i.sx : 0; - }).attr('y1', function (d) { - var i = getInfo(d); - return i && i.isRef ? i.sy : 0; - }).attr('x2', function (d) { - var i = getInfo(d); - return i && i.isRef ? i.x - i.name.length * 0.6 * avgCharSize : 0; - }).attr('y2', function (d) { - var i = getInfo(d); - return i && i.isRef ? i.y - 3.5 : 0; - }); - }); - }); - - if (topoJSONData.objects.hasOwnProperty('places')) { - - var placesFeature = _topojson2.default.feature(topoJSONData, topoJSONData.objects.places); - - var labels = placesFeature.features.map(function (d) { - var coords = d3Projection(d.geometry.coordinates); - return { - x: coords[0] + 3.5, - y: coords[1] + 3.5, - width: d.properties.name.length * avgCharSize, - height: 12, - name: d.properties.name - }; - }); - - var anchors = placesFeature.features.map(function (d) { - var coords = d3Projection(d.geometry.coordinates); - return { - x: coords[0], - y: coords[1], - r: 2.5 - }; - }); - - _d2.default.labeler().label(labels).anchor(anchors).width(innerW).height(innerH).start(100); - - node.selectAll('.place').data(anchors).enter().append('circle').attr('class', 'place').attr('transform', function (d) { - return 'translate(' + d.x + ',' + d.y + ')'; - }).attr('r', function (d) { - return d.r + 'px'; - }); - - node.selectAll('.place-label').data(labels).enter().append('text').attr('class', 'place-label').attr('transform', function (d) { - return 'translate(' + d.x + ',' + d.y + ')'; - }).text(function (d) { - return d.name; - }); - } - }); - - this.groupByCode = frames.reduce(function (groups, f) { - return f.part().reduce(function (memo, rec) { - var key = (rec[codeScale.dim] || '').toLowerCase(); - memo[key] = rec; - return memo; - }, groups); - }, {}); - - var toData = this._resolveFeature.bind(this); - - xmap.selectAll('.map-contour-' + contourToFill).data(_topojson2.default.feature(topoJSONData, topoJSONData.objects[contourToFill]).features).call(function () { - this.classed('map-contour', true).attr('fill', function (d) { - var row = toData(d); - return row === null ? guide.defaultFill : fillScale(row[fillScale.dim]); - }); - }).on('mouseover', function (d) { - return _this3.fire('area-mouseover', { data: toData(d), event: _d2.default.event }); - }).on('mouseout', function (d) { - return _this3.fire('area-mouseout', { data: toData(d), event: _d2.default.event }); - }).on('click', function (d) { - return _this3.fire('area-click', { data: toData(d), event: _d2.default.event }); - }); - - if (!latScale.dim || !lonScale.dim) { - return []; - } - - var update = function update() { - return this.attr({ - r: function r(_ref) { - var d = _ref.data; - return sizeScale(d[sizeScale.dim]); - }, - transform: function transform(_ref2) { - var d = _ref2.data; - return 'translate(' + d3Projection([d[lonScale.dim], d[latScale.dim]]) + ')'; - }, - class: function _class(_ref3) { - var d = _ref3.data; - return colorScale(d[colorScale.dim]); - }, - opacity: pointOpacity - }).on('mouseover', function (_ref4) { - var d = _ref4.data; - return self.fire('point-mouseover', { data: d, event: _d2.default.event }); - }).on('mouseout', function (_ref5) { - var d = _ref5.data; - return self.fire('point-mouseout', { data: d, event: _d2.default.event }); - }).on('click', function (_ref6) { - var d = _ref6.data; - return self.fire('point-click', { data: d, event: _d2.default.event }); - }); - }; - - var updateGroups = function updateGroups() { - - this.attr('class', function (f) { - return 'frame frame-' + f.hash; - }).call(function () { - var points = this.selectAll('circle').data(function (frame) { - return frame.data.map(function (item) { - return { data: item, uid: options.uid }; - }); - }); - points.exit().remove(); - points.call(update); - points.enter().append('circle').call(update); - }); - }; - - var mapper = function mapper(f) { - return { tags: f.key || {}, hash: f.hash(), data: f.part() }; - }; - - var frameGroups = xmap.selectAll('.frame').data(frames.map(mapper), function (f) { - return f.hash; - }); - frameGroups.exit().remove(); - frameGroups.call(updateGroups); - frameGroups.enter().append('g').call(updateGroups); - - return []; - } - }, { - key: '_resolveFeature', - value: function _resolveFeature(d) { - var groupByCode = this.groupByCode; - var prop = d.properties; - var codes = ['c1', 'c2', 'c3', 'abbr', 'name'].filter(function (c) { - return prop.hasOwnProperty(c) && prop[c] && groupByCode.hasOwnProperty(prop[c].toLowerCase()); - }); - - var value; - if (codes.length === 0) { - // doesn't match - value = null; - } else if (codes.length > 0) { - var k = prop[codes[0]].toLowerCase(); - value = groupByCode[k]; - } - - return value; - } - }, { - key: '_highlightArea', - value: function _highlightArea(filter) { - var _this4 = this; - - var node = this.config.options.container; - var contourToFill = this.contourToFill; - node.selectAll('.map-contour-' + contourToFill).classed('map-contour-highlighted', function (d) { - return filter(_this4._resolveFeature(d)); - }); - } - }, { - key: '_highlightPoint', - value: function _highlightPoint(filter) { - this.config.options.container.selectAll('circle').classed('map-point-highlighted', function (_ref7) { - var d = _ref7.data; - return filter(d); - }).attr('opacity', function (_ref8) { - var d = _ref8.data; - return filter(d) ? pointOpacity : 0.1; - }); - } - }, { - key: '_createProjection', - value: function _createProjection(topoJSONData, topContour, center) { - - // The map's scale out is based on the solution: - // http://stackoverflow.com/questions/14492284/center-a-map-in-d3-given-a-geojson-object - - var width = this.W; - var height = this.H; - var guide = this.config.guide; - - var scale = 100; - var offset = [width / 2, height / 2]; - - var mapCenter = center || topoJSONData.center; - var mapProjection = guide.projection || topoJSONData.projection || 'mercator'; - - var d3Projection = this._createD3Projection(mapProjection, mapCenter, scale, offset); - - var path = _d2.default.geo.path().projection(d3Projection); - - // using the path determine the bounds of the current map and use - // these to determine better values for the scale and translation - var bounds = path.bounds(_topojson2.default.feature(topoJSONData, topoJSONData.objects[topContour])); - - var hscale = scale * width / (bounds[1][0] - bounds[0][0]); - var vscale = scale * height / (bounds[1][1] - bounds[0][1]); - - scale = hscale < vscale ? hscale : vscale; - offset = [width - (bounds[0][0] + bounds[1][0]) / 2, height - (bounds[0][1] + bounds[1][1]) / 2]; - - // new projection - return this._createD3Projection(mapProjection, mapCenter, scale, offset); - } - }, { - key: '_createD3Projection', - value: function _createD3Projection(projection, center, scale, translate) { - - var d3ProjectionMethod = _d2.default.geo[projection]; - - if (!d3ProjectionMethod) { - /*eslint-disable */ - console.log('Unknown projection "' + projection + '"'); - console.log('See available projection types here: https://github.com/mbostock/d3/wiki/Geo-Projections'); - /*eslint-enable */ - throw new Error('Invalid map: unknown projection "' + projection + '"'); - } - - var d3Projection = d3ProjectionMethod(); - - var steps = [{ method: 'scale', args: scale }, { method: 'center', args: center }, { method: 'translate', args: translate }].filter(function (step) { - return step.args; - }); - - // because the Albers USA projection does not support rotation or centering - return steps.reduce(function (proj, step) { - if (proj[step.method]) { - proj = proj[step.method](step.args); - } - return proj; - }, d3Projection); - } - }]); - - return GeoMap; - }(_element.Element); - -/***/ }, -/* 43 */ -/***/ function(module, exports, __webpack_require__) { - - (function (global, factory) { - true ? factory(exports) : - typeof define === 'function' && define.amd ? define(['exports'], factory) : - (factory((global.topojson = {}))); - }(this, function (exports) { 'use strict'; - - function noop() {} - - function absolute(transform) { - if (!transform) return noop; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(point, i) { - if (!i) x0 = y0 = 0; - point[0] = (x0 += point[0]) * kx + dx; - point[1] = (y0 += point[1]) * ky + dy; - }; - } - - function relative(transform) { - if (!transform) return noop; - var x0, - y0, - kx = transform.scale[0], - ky = transform.scale[1], - dx = transform.translate[0], - dy = transform.translate[1]; - return function(point, i) { - if (!i) x0 = y0 = 0; - var x1 = (point[0] - dx) / kx | 0, - y1 = (point[1] - dy) / ky | 0; - point[0] = x1 - x0; - point[1] = y1 - y0; - x0 = x1; - y0 = y1; - }; - } - - function reverse(array, n) { - var t, j = array.length, i = j - n; - while (i < --j) t = array[i], array[i++] = array[j], array[j] = t; - } - - function bisect(a, x) { - var lo = 0, hi = a.length; - while (lo < hi) { - var mid = lo + hi >>> 1; - if (a[mid] < x) lo = mid + 1; - else hi = mid; - } - return lo; - } - - function feature(topology, o) { - return o.type === "GeometryCollection" ? { - type: "FeatureCollection", - features: o.geometries.map(function(o) { return feature$1(topology, o); }) - } : feature$1(topology, o); - } - - function feature$1(topology, o) { - var f = { - type: "Feature", - id: o.id, - properties: o.properties || {}, - geometry: object(topology, o) - }; - if (o.id == null) delete f.id; - return f; - } - - function object(topology, o) { - var absolute$$ = absolute(topology.transform), - arcs = topology.arcs; - - function arc(i, points) { - if (points.length) points.pop(); - for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length, p; k < n; ++k) { - points.push(p = a[k].slice()); - absolute$$(p, k); - } - if (i < 0) reverse(points, n); - } - - function point(p) { - p = p.slice(); - absolute$$(p, 0); - return p; - } - - function line(arcs) { - var points = []; - for (var i = 0, n = arcs.length; i < n; ++i) arc(arcs[i], points); - if (points.length < 2) points.push(points[0].slice()); - return points; - } - - function ring(arcs) { - var points = line(arcs); - while (points.length < 4) points.push(points[0].slice()); - return points; - } - - function polygon(arcs) { - return arcs.map(ring); - } - - function geometry(o) { - var t = o.type; - return t === "GeometryCollection" ? {type: t, geometries: o.geometries.map(geometry)} - : t in geometryType ? {type: t, coordinates: geometryType[t](o)} - : null; - } - - var geometryType = { - Point: function(o) { return point(o.coordinates); }, - MultiPoint: function(o) { return o.coordinates.map(point); }, - LineString: function(o) { return line(o.arcs); }, - MultiLineString: function(o) { return o.arcs.map(line); }, - Polygon: function(o) { return polygon(o.arcs); }, - MultiPolygon: function(o) { return o.arcs.map(polygon); } - }; - - return geometry(o); - } - - function stitchArcs(topology, arcs) { - var stitchedArcs = {}, - fragmentByStart = {}, - fragmentByEnd = {}, - fragments = [], - emptyIndex = -1; - - // Stitch empty arcs first, since they may be subsumed by other arcs. - arcs.forEach(function(i, j) { - var arc = topology.arcs[i < 0 ? ~i : i], t; - if (arc.length < 3 && !arc[1][0] && !arc[1][1]) { - t = arcs[++emptyIndex], arcs[emptyIndex] = i, arcs[j] = t; - } - }); - - arcs.forEach(function(i) { - var e = ends(i), - start = e[0], - end = e[1], - f, g; - - if (f = fragmentByEnd[start]) { - delete fragmentByEnd[f.end]; - f.push(i); - f.end = end; - if (g = fragmentByStart[end]) { - delete fragmentByStart[g.start]; - var fg = g === f ? f : f.concat(g); - fragmentByStart[fg.start = f.start] = fragmentByEnd[fg.end = g.end] = fg; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else if (f = fragmentByStart[end]) { - delete fragmentByStart[f.start]; - f.unshift(i); - f.start = start; - if (g = fragmentByEnd[start]) { - delete fragmentByEnd[g.end]; - var gf = g === f ? f : g.concat(f); - fragmentByStart[gf.start = g.start] = fragmentByEnd[gf.end = f.end] = gf; - } else { - fragmentByStart[f.start] = fragmentByEnd[f.end] = f; - } - } else { - f = [i]; - fragmentByStart[f.start = start] = fragmentByEnd[f.end = end] = f; - } - }); - - function ends(i) { - var arc = topology.arcs[i < 0 ? ~i : i], p0 = arc[0], p1; - if (topology.transform) p1 = [0, 0], arc.forEach(function(dp) { p1[0] += dp[0], p1[1] += dp[1]; }); - else p1 = arc[arc.length - 1]; - return i < 0 ? [p1, p0] : [p0, p1]; - } - - function flush(fragmentByEnd, fragmentByStart) { - for (var k in fragmentByEnd) { - var f = fragmentByEnd[k]; - delete fragmentByStart[f.start]; - delete f.start; - delete f.end; - f.forEach(function(i) { stitchedArcs[i < 0 ? ~i : i] = 1; }); - fragments.push(f); - } - } - - flush(fragmentByEnd, fragmentByStart); - flush(fragmentByStart, fragmentByEnd); - arcs.forEach(function(i) { if (!stitchedArcs[i < 0 ? ~i : i]) fragments.push([i]); }); - - return fragments; - } - - function mesh(topology) { - return object(topology, meshArcs.apply(this, arguments)); - } - - function meshArcs(topology, o, filter) { - var arcs = []; - - function arc(i) { - var j = i < 0 ? ~i : i; - (geomsByArc[j] || (geomsByArc[j] = [])).push({i: i, g: geom}); - } - - function line(arcs) { - arcs.forEach(arc); - } - - function polygon(arcs) { - arcs.forEach(line); - } - - function geometry(o) { - if (o.type === "GeometryCollection") o.geometries.forEach(geometry); - else if (o.type in geometryType) geom = o, geometryType[o.type](o.arcs); - } - - if (arguments.length > 1) { - var geomsByArc = [], - geom; - - var geometryType = { - LineString: line, - MultiLineString: polygon, - Polygon: polygon, - MultiPolygon: function(arcs) { arcs.forEach(polygon); } - }; - - geometry(o); - - geomsByArc.forEach(arguments.length < 3 - ? function(geoms) { arcs.push(geoms[0].i); } - : function(geoms) { if (filter(geoms[0].g, geoms[geoms.length - 1].g)) arcs.push(geoms[0].i); }); - } else { - for (var i = 0, n = topology.arcs.length; i < n; ++i) arcs.push(i); - } - - return {type: "MultiLineString", arcs: stitchArcs(topology, arcs)}; - } - - function triangle(triangle) { - var a = triangle[0], b = triangle[1], c = triangle[2]; - return Math.abs((a[0] - c[0]) * (b[1] - a[1]) - (a[0] - b[0]) * (c[1] - a[1])); - } - - function ring(ring) { - var i = -1, - n = ring.length, - a, - b = ring[n - 1], - area = 0; - - while (++i < n) { - a = b; - b = ring[i]; - area += a[0] * b[1] - a[1] * b[0]; - } - - return area / 2; - } - - function merge(topology) { - return object(topology, mergeArcs.apply(this, arguments)); - } - - function mergeArcs(topology, objects) { - var polygonsByArc = {}, - polygons = [], - components = []; - - objects.forEach(function(o) { - if (o.type === "Polygon") register(o.arcs); - else if (o.type === "MultiPolygon") o.arcs.forEach(register); - }); - - function register(polygon) { - polygon.forEach(function(ring$$) { - ring$$.forEach(function(arc) { - (polygonsByArc[arc = arc < 0 ? ~arc : arc] || (polygonsByArc[arc] = [])).push(polygon); - }); - }); - polygons.push(polygon); - } - - function exterior(ring$$) { - return ring(object(topology, {type: "Polygon", arcs: [ring$$]}).coordinates[0]) > 0; // TODO allow spherical? - } - - polygons.forEach(function(polygon) { - if (!polygon._) { - var component = [], - neighbors = [polygon]; - polygon._ = 1; - components.push(component); - while (polygon = neighbors.pop()) { - component.push(polygon); - polygon.forEach(function(ring$$) { - ring$$.forEach(function(arc) { - polygonsByArc[arc < 0 ? ~arc : arc].forEach(function(polygon) { - if (!polygon._) { - polygon._ = 1; - neighbors.push(polygon); - } - }); - }); - }); - } - } - }); - - polygons.forEach(function(polygon) { - delete polygon._; - }); - - return { - type: "MultiPolygon", - arcs: components.map(function(polygons) { - var arcs = [], n; - - // Extract the exterior (unique) arcs. - polygons.forEach(function(polygon) { - polygon.forEach(function(ring$$) { - ring$$.forEach(function(arc) { - if (polygonsByArc[arc < 0 ? ~arc : arc].length < 2) { - arcs.push(arc); - } - }); - }); - }); - - // Stitch the arcs into one or more rings. - arcs = stitchArcs(topology, arcs); - - // If more than one ring is returned, - // at most one of these rings can be the exterior; - // this exterior ring has the same winding order - // as any exterior ring in the original polygons. - if ((n = arcs.length) > 1) { - var sgn = exterior(polygons[0][0]); - for (var i = 0, t; i < n; ++i) { - if (sgn === exterior(arcs[i])) { - t = arcs[0], arcs[0] = arcs[i], arcs[i] = t; - break; - } - } - } - - return arcs; - }) - }; - } - - function neighbors(objects) { - var indexesByArc = {}, // arc index -> array of object indexes - neighbors = objects.map(function() { return []; }); - - function line(arcs, i) { - arcs.forEach(function(a) { - if (a < 0) a = ~a; - var o = indexesByArc[a]; - if (o) o.push(i); - else indexesByArc[a] = [i]; - }); - } - - function polygon(arcs, i) { - arcs.forEach(function(arc) { line(arc, i); }); - } - - function geometry(o, i) { - if (o.type === "GeometryCollection") o.geometries.forEach(function(o) { geometry(o, i); }); - else if (o.type in geometryType) geometryType[o.type](o.arcs, i); - } - - var geometryType = { - LineString: line, - MultiLineString: polygon, - Polygon: polygon, - MultiPolygon: function(arcs, i) { arcs.forEach(function(arc) { polygon(arc, i); }); } - }; - - objects.forEach(geometry); - - for (var i in indexesByArc) { - for (var indexes = indexesByArc[i], m = indexes.length, j = 0; j < m; ++j) { - for (var k = j + 1; k < m; ++k) { - var ij = indexes[j], ik = indexes[k], n; - if ((n = neighbors[ij])[i = bisect(n, ik)] !== ik) n.splice(i, 0, ik); - if ((n = neighbors[ik])[i = bisect(n, ij)] !== ij) n.splice(i, 0, ij); - } - } - } - - return neighbors; - } - - function compareArea(a, b) { - return a[1][2] - b[1][2]; - } - - function minAreaHeap() { - var heap = {}, - array = [], - size = 0; - - heap.push = function(object) { - up(array[object._ = size] = object, size++); - return size; - }; - - heap.pop = function() { - if (size <= 0) return; - var removed = array[0], object; - if (--size > 0) object = array[size], down(array[object._ = 0] = object, 0); - return removed; - }; - - heap.remove = function(removed) { - var i = removed._, object; - if (array[i] !== removed) return; // invalid request - if (i !== --size) object = array[size], (compareArea(object, removed) < 0 ? up : down)(array[object._ = i] = object, i); - return i; - }; - - function up(object, i) { - while (i > 0) { - var j = ((i + 1) >> 1) - 1, - parent = array[j]; - if (compareArea(object, parent) >= 0) break; - array[parent._ = i] = parent; - array[object._ = i = j] = object; - } - } - - function down(object, i) { - while (true) { - var r = (i + 1) << 1, - l = r - 1, - j = i, - child = array[j]; - if (l < size && compareArea(array[l], child) < 0) child = array[j = l]; - if (r < size && compareArea(array[r], child) < 0) child = array[j = r]; - if (j === i) break; - array[child._ = i] = child; - array[object._ = i = j] = object; - } - } - - return heap; - } - - function presimplify(topology, triangleArea) { - var absolute$$ = absolute(topology.transform), - relative$$ = relative(topology.transform), - heap = minAreaHeap(); - - if (!triangleArea) triangleArea = triangle; - - topology.arcs.forEach(function(arc) { - var triangles = [], - maxArea = 0, - triangle, - i, - n, - p; - - // To store each point’s effective area, we create a new array rather than - // extending the passed-in point to workaround a Chrome/V8 bug (getting - // stuck in smi mode). For midpoints, the initial effective area of - // Infinity will be computed in the next step. - for (i = 0, n = arc.length; i < n; ++i) { - p = arc[i]; - absolute$$(arc[i] = [p[0], p[1], Infinity], i); - } - - for (i = 1, n = arc.length - 1; i < n; ++i) { - triangle = arc.slice(i - 1, i + 2); - triangle[1][2] = triangleArea(triangle); - triangles.push(triangle); - heap.push(triangle); - } - - for (i = 0, n = triangles.length; i < n; ++i) { - triangle = triangles[i]; - triangle.previous = triangles[i - 1]; - triangle.next = triangles[i + 1]; - } - - while (triangle = heap.pop()) { - var previous = triangle.previous, - next = triangle.next; - - // If the area of the current point is less than that of the previous point - // to be eliminated, use the latter's area instead. This ensures that the - // current point cannot be eliminated without eliminating previously- - // eliminated points. - if (triangle[1][2] < maxArea) triangle[1][2] = maxArea; - else maxArea = triangle[1][2]; - - if (previous) { - previous.next = next; - previous[2] = triangle[2]; - update(previous); - } - - if (next) { - next.previous = previous; - next[0] = triangle[0]; - update(next); - } - } - - arc.forEach(relative$$); - }); - - function update(triangle) { - heap.remove(triangle); - triangle[1][2] = triangleArea(triangle); - heap.push(triangle); - } - - return topology; - } - - var version = "1.6.24"; - - exports.version = version; - exports.mesh = mesh; - exports.meshArcs = meshArcs; - exports.merge = merge; - exports.mergeArcs = mergeArcs; - exports.feature = feature; - exports.neighbors = neighbors; - exports.presimplify = presimplify; - - })); - -/***/ }, -/* 44 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var d3Labeler = function d3Labeler() { - var lab = [], - anc = [], - w = 1, - // box width - h = 1, - // box width - labeler = {}; - - var max_move = 5.0, - max_angle = 0.5, - acc = 0, - rej = 0; - - // weights - var w_len = 0.2, - // leader line length - w_inter = 1.0, - // leader line intersenpm testction - w_lab2 = 30.0, - // label-label overlap - w_lab_anc = 30.0, - // label-anchor overlap - w_orient = 3.0; // orientation bias - - // booleans for user defined functions - var user_energy = false; - - var user_defined_energy; - - var energy = function energy(index) { - // energy function, tailored for label placement - - var m = lab.length, - ener = 0, - dx = lab[index].x - anc[index].x, - dy = anc[index].y - lab[index].y, - dist = Math.sqrt(dx * dx + dy * dy), - overlap = true; - - // penalty for length of leader line - if (dist > 0) { - ener += dist * w_len; - } - - // label orientation bias - dx /= dist; - dy /= dist; - if (dx > 0 && dy > 0) { - ener += 0 * w_orient; - } else if (dx < 0 && dy > 0) { - ener += 1 * w_orient; - } else if (dx < 0 && dy < 0) { - ener += 2 * w_orient; - } else { - ener += 3 * w_orient; - } - - var x21 = lab[index].x, - y21 = lab[index].y - lab[index].height + 2.0, - x22 = lab[index].x + lab[index].width, - y22 = lab[index].y + 2.0; - var x11, x12, y11, y12, x_overlap, y_overlap, overlap_area; - - for (var i = 0; i < m; i++) { - if (i != index) { - - // penalty for intersection of leader lines - overlap = intersect(anc[index].x, lab[index].x, anc[i].x, lab[i].x, anc[index].y, lab[index].y, anc[i].y, lab[i].y); - if (overlap) { - ener += w_inter; - } - - // penalty for label-label overlap - x11 = lab[i].x; - y11 = lab[i].y - lab[i].height + 2.0; - x12 = lab[i].x + lab[i].width; - y12 = lab[i].y + 2.0; - x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21)); - y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21)); - overlap_area = x_overlap * y_overlap; - ener += overlap_area * w_lab2; - } - - // penalty for label-anchor overlap - x11 = anc[i].x - anc[i].r; - y11 = anc[i].y - anc[i].r; - x12 = anc[i].x + anc[i].r; - y12 = anc[i].y + anc[i].r; - x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21)); - y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21)); - overlap_area = x_overlap * y_overlap; - ener += overlap_area * w_lab_anc; - } - return ener; - }; - - var mcmove = function mcmove(currT) { - // Monte Carlo translation move - - // select a random label - var i = Math.floor(Math.random() * lab.length); - - // save old coordinates - var x_old = lab[i].x; - var y_old = lab[i].y; - - // old energy - var old_energy; - if (user_energy) { - old_energy = user_defined_energy(i, lab, anc); - } else { - old_energy = energy(i); - } - - // random translation - lab[i].x += (Math.random() - 0.5) * max_move; - lab[i].y += (Math.random() - 0.5) * max_move; - - // hard wall boundaries - if (lab[i].x > w) { - lab[i].x = x_old; - } - if (lab[i].x < 0) { - lab[i].x = x_old; - } - if (lab[i].y > h) { - lab[i].y = y_old; - } - if (lab[i].y < 0) { - lab[i].y = y_old; - } - - // new energy - var new_energy; - if (user_energy) { - new_energy = user_defined_energy(i, lab, anc); - } else { - new_energy = energy(i); - } - - // delta E - var delta_energy = new_energy - old_energy; - - if (Math.random() < Math.exp(-delta_energy / currT)) { - acc += 1; - } else { - // move back to old coordinates - lab[i].x = x_old; - lab[i].y = y_old; - rej += 1; - } - }; - - var mcrotate = function mcrotate(currT) { - // Monte Carlo rotation move - - // select a random label - var i = Math.floor(Math.random() * lab.length); - - // save old coordinates - var x_old = lab[i].x; - var y_old = lab[i].y; - - // old energy - var old_energy; - if (user_energy) { - old_energy = user_defined_energy(i, lab, anc); - } else { - old_energy = energy(i); - } - - // random angle - var angle = (Math.random() - 0.5) * max_angle; - - var s = Math.sin(angle); - var c = Math.cos(angle); - - // translate label (relative to anchor at origin): - lab[i].x -= anc[i].x; - lab[i].y -= anc[i].y; - - // rotate label - var x_new = lab[i].x * c - lab[i].y * s, - y_new = lab[i].x * s + lab[i].y * c; - - // translate label back - lab[i].x = x_new + anc[i].x; - lab[i].y = y_new + anc[i].y; - - // hard wall boundaries - if (lab[i].x > w) { - lab[i].x = x_old; - } - if (lab[i].x < 0) { - lab[i].x = x_old; - } - if (lab[i].y > h) { - lab[i].y = y_old; - } - if (lab[i].y < 0) { - lab[i].y = y_old; - } - - // new energy - var new_energy; - if (user_energy) { - new_energy = user_defined_energy(i, lab, anc); - } else { - new_energy = energy(i); - } - - // delta E - var delta_energy = new_energy - old_energy; - - if (Math.random() < Math.exp(-delta_energy / currT)) { - acc += 1; - } else { - // move back to old coordinates - lab[i].x = x_old; - lab[i].y = y_old; - rej += 1; - } - }; - - var intersect = function intersect(x1, x2, x3, x4, y1, y2, y3, y4) { - // returns true if two lines intersect, else false - // from http://paulbourke.net/geometry/lineline2d/ - - var mua, mub; - var denom, numera, numerb; - - denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); - numera = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3); - numerb = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3); - - /* Is the intersection along the the segments */ - mua = numera / denom; - mub = numerb / denom; - if (!(mua < 0 || mua > 1 || mub < 0 || mub > 1)) { - return true; - } - return false; - }; - - var cooling_schedule = function cooling_schedule(currT, initialT, nsweeps) { - // linear cooling - return currT - initialT / nsweeps; - }; - - labeler.start = function (nsweeps) { - // main simulated annealing function - var m = lab.length, - currT = 1.0, - initialT = 1.0; - - for (var i = 0; i < nsweeps; i++) { - for (var j = 0; j < m; j++) { - if (Math.random() < 0.5) { - mcmove(currT); - } else { - mcrotate(currT); - } - } - currT = cooling_schedule(currT, initialT, nsweeps); - } - }; - - labeler.width = function (x) { - // users insert graph width - if (!arguments.length) { - return w; - } - w = x; - return labeler; - }; - - labeler.height = function (x) { - // users insert graph height - if (!arguments.length) { - return h; - } - h = x; - return labeler; - }; - - labeler.label = function (x) { - // users insert label positions - if (!arguments.length) { - return lab; - } - lab = x; - return labeler; - }; - - labeler.anchor = function (x) { - // users insert anchor positions - if (!arguments.length) { - return anc; - } - anc = x; - return labeler; - }; - - labeler.alt_energy = function (x) { - // user defined energy - if (!arguments.length) { - return energy; - } - user_defined_energy = x; - user_energy = true; - return labeler; - }; - - labeler.alt_schedule = function () { - // user defined cooling_schedule - if (!arguments.length) { - return cooling_schedule; - } - return labeler; - }; - - return labeler; - }; - - exports.d3Labeler = d3Labeler; - -/***/ }, -/* 45 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Point = undefined; - - var _const = __webpack_require__(22); - - var _grammarRegistry = __webpack_require__(7); - - var _layerLabels = __webpack_require__(46); - - var _d3Decorators = __webpack_require__(9); - - var _utils = __webpack_require__(3); - - var _utilsDom = __webpack_require__(1); - - var _utilsDraw = __webpack_require__(10); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - var Point = { - init: function init(xConfig) { - - var config = Object.assign({}, xConfig); - - config.guide = _utils.utils.defaults(config.guide || {}, { - animationSpeed: 0, - avoidScalesOverflow: true, - enableColorToBarPosition: false, - maxHighlightDistance: 32 - }); - - config.guide.size = config.guide.size || {}; - - config.guide.label = _utils.utils.defaults(config.guide.label || {}, { - position: ['auto:avoid-label-label-overlap', 'auto:avoid-label-anchor-overlap', 'auto:adjust-on-label-overflow', 'auto:hide-on-label-label-overlap', 'auto:hide-on-label-anchor-overlap'] - }); - - var avoidScalesOverflow = config.guide.avoidScalesOverflow; - var enableColorPositioning = config.guide.enableColorToBarPosition; - - config.transformRules = [function (prevModel) { - var bestBaseScale = [prevModel.scaleX, prevModel.scaleY].sort(function (a, b) { - var discreteA = a.discrete ? 1 : 0; - var discreteB = b.discrete ? 1 : 0; - return discreteB * b.domain().length - discreteA * a.domain().length; - })[0]; - var isHorizontal = prevModel.scaleY === bestBaseScale; - return isHorizontal ? _grammarRegistry.GrammarRegistry.get('flip')(prevModel) : _grammarRegistry.GrammarRegistry.get('identity')(prevModel); - }, config.stack && _grammarRegistry.GrammarRegistry.get('stack'), enableColorPositioning && _grammarRegistry.GrammarRegistry.get('positioningByColor')].filter(function (x) { - return x; - }); - - config.adjustRules = [config.stack && _grammarRegistry.GrammarRegistry.get('adjustYScale'), function (prevModel, args) { - var isEmptySize = prevModel.scaleSize.isEmptyScale(); - var sizeCfg = _utils.utils.defaults(config.guide.size, { - defMinSize: 10, - defMaxSize: isEmptySize ? 10 : 40, - enableDistributeEvenly: !isEmptySize - }); - var params = Object.assign({}, args, { - defMin: sizeCfg.defMinSize, - defMax: sizeCfg.defMaxSize, - minLimit: sizeCfg.minSize, - maxLimit: sizeCfg.maxSize - }); - - var method = sizeCfg.enableDistributeEvenly ? _grammarRegistry.GrammarRegistry.get('adjustSigmaSizeScale') : _grammarRegistry.GrammarRegistry.get('adjustStaticSizeScale'); - - return method(prevModel, params); - }, avoidScalesOverflow && function (prevModel, args) { - var params = Object.assign({}, args, { - sizeDirection: 'xy' - }); - return _grammarRegistry.GrammarRegistry.get('avoidScalesOverflow')(prevModel, params); - }].filter(function (x) { - return x; - }); - - return config; - }, - addInteraction: function addInteraction() { - var _this = this; - - var node = this.node(); - var createFilter = function createFilter(data, falsy) { - return function (row) { - return row === data ? true : falsy; - }; - }; - node.on('highlight', function (sender, filter) { - return _this.highlight(filter); - }); - node.on('data-hover', function (sender, e) { - return _this.highlight(createFilter(e.data, null)); - }); - }, - draw: function draw() { - - var node = this.node(); - var config = node.config; - var options = config.options; - // TODO: hide it somewhere - options.container = options.slot(config.uid); - - var transition = function transition(sel) { - return (0, _d3Decorators.d3_transition)(sel, config.guide.animationSpeed); - }; - - var prefix = _const.CSS_PREFIX + 'dot dot i-role-element i-role-datum'; - var screenModel = node.screenModel; - var kRound = 10000; - - var circleAttrs = { - fill: function fill(d) { - return screenModel.color(d); - }, - class: function _class(d) { - return prefix + ' ' + screenModel.class(d); - } - }; - - var circleTransAttrs = { - r: function r(d) { - return Math.round(kRound * screenModel.size(d) / 2) / kRound; - }, - cx: function cx(d) { - return screenModel.x(d); - }, - cy: function cy(d) { - return screenModel.y(d); - } - }; - - var updateGroups = function updateGroups() { - - this.attr('class', 'frame').call(function () { - var dots = this.selectAll('circle').data(function (fiber) { - return fiber; - }, screenModel.id); - - transition(dots.enter().append('circle').attr(circleAttrs)).attr(circleTransAttrs); - - transition(dots.attr(circleAttrs)).attr(circleTransAttrs); - - transition(dots.exit()).attr({ r: 0 }).remove(); - - node.subscribe(dots); - }); - - transition(this).attr('opacity', 1); - }; - - var fibers = screenModel.toFibers(); - this._getGroupOrder = function () { - var map = fibers.reduce(function (map, f, i) { - map.set(f, i); - return map; - }, new Map()); - return function (g) { - return map.get(g); - }; - }(); - - var frameGroups = options.container.selectAll('.frame').data(fibers, function (f) { - return screenModel.group(f[0]); - }); - - frameGroups.enter().append('g').attr('opacity', 0).call(updateGroups); - - frameGroups.call(updateGroups); - - // TODO: Render bars into single container, exclude removed elements from calculation. - this._boundsInfo = this._getBoundsInfo(frameGroups.selectAll('.dot').reduce(function (m, g) { - return m.concat(g); - }, [])); - - transition(frameGroups.exit()).attr('opacity', 0).remove().selectAll('circle').attr('r', 0); - - node.subscribe(new _layerLabels.LayerLabels(screenModel.model, screenModel.flip, config.guide.label, options).draw(fibers)); - }, - _getBoundsInfo: function _getBoundsInfo(dots) { - if (dots.length === 0) { - return null; - } - - var screenModel = this.node().screenModel; - - var items = dots.map(function (node) { - var data = _d2.default.select(node).data()[0]; - var x = screenModel.x(data); - var y = screenModel.y(data); - var r = screenModel.size(data) / 2; - - return { node: node, data: data, x: x, y: y, r: r }; - }) - // TODO: Removed elements should not be passed to this function. - .filter(function (item) { - return !isNaN(item.x) && !isNaN(item.y); - }); - - var bounds = items.reduce(function (bounds, _ref) { - var x = _ref.x, - y = _ref.y; - - bounds.left = Math.min(x, bounds.left); - bounds.right = Math.max(x, bounds.right); - bounds.top = Math.min(y, bounds.top); - bounds.bottom = Math.max(y, bounds.bottom); - return bounds; - }, { - left: Number.MAX_VALUE, - right: Number.MIN_VALUE, - top: Number.MAX_VALUE, - bottom: Number.MIN_VALUE - }); - - // NOTE: There can be multiple items at the same point, but - // D3 quad tree seems to ignore them. - var coordinates = items.reduce(function (coordinates, item) { - var c = item.x + ',' + item.y; - if (!coordinates[c]) { - coordinates[c] = []; - } - coordinates[c].push(item); - return coordinates; - }, {}); - - var tree = _d2.default.geom.quadtree().x(function (d) { - return d[0].x; - }).y(function (d) { - return d[0].y; - })(Object.keys(coordinates).map(function (c) { - return coordinates[c]; - })); - - return { bounds: bounds, tree: tree }; - }, - getClosestElement: function getClosestElement(_cursorX, _cursorY) { - if (!this._boundsInfo) { - return null; - } - var _boundsInfo = this._boundsInfo, - bounds = _boundsInfo.bounds, - tree = _boundsInfo.tree; - - var container = this.node().config.options.container; - var translate = _utilsDraw.utilsDraw.getDeepTransformTranslate(container.node()); - var cursorX = _cursorX - translate.x; - var cursorY = _cursorY - translate.y; - var maxHighlightDistance = this.node().config.guide.maxHighlightDistance; - - if (cursorX < bounds.left - maxHighlightDistance || cursorX > bounds.right + maxHighlightDistance || cursorY < bounds.top - maxHighlightDistance || cursorY > bounds.bottom + maxHighlightDistance) { - return null; - } - - var items = (tree.find([cursorX, cursorY]) || []).map(function (item) { - var distance = Math.sqrt(Math.pow(cursorX - item.x, 2) + Math.pow(cursorY - item.y, 2)); - if (distance > maxHighlightDistance) { - return null; - } - var secondaryDistance = distance < item.r ? item.r - distance : distance; - return { - node: item.node, - data: item.data, - x: item.x, - y: item.y, - distance: distance, - secondaryDistance: secondaryDistance - }; - }).filter(function (d) { - return d; - }).sort(function (a, b) { - return a.secondaryDistance - b.secondaryDistance; - }); - - var largerDistIndex = items.findIndex(function (d) { - return d.distance !== items[0].distance || d.secondaryDistance !== items[0].secondaryDistance; - }); - var sameDistItems = largerDistIndex < 0 ? items : items.slice(0, largerDistIndex); - if (sameDistItems.length === 1) { - return sameDistItems[0]; - } - var mx = sameDistItems.reduce(function (sum, item) { - return sum + item.x; - }, 0) / sameDistItems.length; - var my = sameDistItems.reduce(function (sum, item) { - return sum + item.y; - }, 0) / sameDistItems.length; - var angle = Math.atan2(my - cursorY, mx - cursorX) + Math.PI; - var closest = sameDistItems[Math.round((sameDistItems.length - 1) * angle / 2 / Math.PI)]; - return closest; - }, - highlight: function highlight(filter) { - var _classed; - - var x = 'graphical-report__highlighted'; - var _ = 'graphical-report__dimmed'; - - var container = this.node().config.options.container; - var classed = (_classed = {}, _defineProperty(_classed, x, function (d) { - return filter(d) === true; - }), _defineProperty(_classed, _, function (d) { - return filter(d) === false; - }), _classed); - - container.selectAll('.dot').classed(classed); - - container.selectAll('.i-role-label').classed(classed); - - this._sortElements(filter); - }, - _sortElements: function _sortElements(filter) { - var _this2 = this; - - var container = this.node().config.options.container; - - // Sort frames - var filters = new Map(); - var groups = new Map(); - container.selectAll('.frame').each(function (d) { - filters.set(this, d.some(filter)); - groups.set(this, d); - }); - var compareFilterThenGroupId = _utils.utils.createMultiSorter(function (a, b) { - return filters.get(a) - filters.get(b); - }, function (a, b) { - return _this2._getGroupOrder(groups.get(a)) - _this2._getGroupOrder(groups.get(b)); - }); - _utilsDom.utilsDom.sortChildren(container.node(), function (a, b) { - if (a.tagName === 'g' && b.tagName === 'g') { - return compareFilterThenGroupId(a, b); - } - return a.tagName.localeCompare(b.tagName); // Note: raise over . - }); - - // Raise filtered dots over others - _utilsDraw.utilsDraw.raiseElements(container, '.dot', filter); - } - }; - - exports.Point = Point; - -/***/ }, -/* 46 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.LayerLabels = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utilsDraw = __webpack_require__(10); - - var _utilsDom = __webpack_require__(1); - - var _utils = __webpack_require__(3); - - var _layerLabelsModel = __webpack_require__(47); - - var _layerLabelsRules = __webpack_require__(48); - - var _layerLabelsAnnealingSimulator = __webpack_require__(49); - - var _layerLabelsPenalties = __webpack_require__(50); - - var _formatterRegistry = __webpack_require__(32); - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var intersect = function intersect(x1, x2, x3, x4, y1, y2, y3, y4) { - return _utilsDraw.utilsDraw.isIntersect(x1, y1, x2, y2, x3, y3, x4, y4); - }; - - var LayerLabels = exports.LayerLabels = function () { - function LayerLabels(model, isHorizontal, labelGuide, _ref) { - var width = _ref.width, - height = _ref.height, - container = _ref.container; - - _classCallCheck(this, LayerLabels); - - this.container = container; - this.model = model; - this.flip = isHorizontal; - this.w = width; - this.h = height; - this.guide = _utils.utils.defaults(labelGuide || {}, { - fontFamily: 'Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif', - fontWeight: 'normal', - fontSize: 10, - fontColor: '#000', - hideEqualLabels: false, - position: [], - tickFormat: null, - tickFormatNullAlias: '' - }); - } - - _createClass(LayerLabels, [{ - key: 'draw', - value: function draw(fibers) { - - var self = this; - - var model = this.model; - var guide = this.guide; - - var seed = _layerLabelsModel.LayerLabelsModel.seed(model, { - fontSize: guide.fontSize, - fontColor: guide.fontColor, - flip: self.flip, - formatter: _formatterRegistry.FormatterRegistry.get(guide.tickFormat, guide.tickFormatNullAlias), - labelRectSize: function labelRectSize(str) { - return _utilsDom.utilsDom.getLabelSize(str, guide); - } - }); - - var args = { maxWidth: self.w, maxHeight: self.h, data: fibers.reduce(function (memo, f) { - return memo.concat(f); - }, []) }; - - var fixedPosition = guide.position.filter(function (token) { - return token.indexOf('auto:') === -1; - }); - - var m = fixedPosition.map(_layerLabelsRules.LayerLabelsRules.getRule).reduce(function (prev, rule) { - return _layerLabelsModel.LayerLabelsModel.compose(prev, rule(prev, args)); - }, seed); - - var readBy3 = function readBy3(list, iterator) { - var l = list.length - 1; - var r = []; - for (var i = 0; i <= l; i++) { - var iPrev = i === 0 ? i : i - 1; - var iCurr = i; - var iNext = i === l ? i : i + 1; - r.push(iterator(list[iPrev], list[iCurr], list[iNext])); - } - return r; - }; - - var parallel = fibers.reduce(function (memo, f) { - var absFiber = f.map(function (row) { - return { - data: row, - x: m.x(row) + m.dx(row), - y: m.y(row) + m.dy(row), - w: m.w(row), - h: m.h(row, args), - hide: m.hide(row), - extr: null, - size: m.model.size(row), - angle: m.angle(row), - label: m.label(row), - color: m.color(row) - }; - }); - - memo.text = memo.text.concat(absFiber); - memo.edges = memo.edges.concat(readBy3(absFiber, function (prev, curr, next) { - - if (curr.y === Math.max(curr.y, prev.y, next.y)) { - curr.extr = 'min'; - } else if (curr.y === Math.min(curr.y, prev.y, next.y)) { - curr.extr = 'max'; - } else { - curr.extr = 'norm'; - } - - return { x0: prev.x, x1: curr.x, y0: prev.y, y1: curr.y }; - })); - - return memo; - }, { text: [], edges: [] }); - - parallel.text = parallel.text.filter(function (r) { - return r.label; - }).map(function (r, i) { - return Object.assign(r, { i: i }); - }); - - var tokens = this.guide.position.filter(function (token) { - return token.indexOf('auto:avoid') === 0; - }); - parallel = parallel.text.length > 0 && tokens.length > 0 ? this.autoPosition(parallel, tokens) : parallel; - - var flags = this.guide.position.reduce(function (memo, token) { - return Object.assign(memo, _defineProperty({}, token, true)); - }, {}); - - parallel.text = parallel.text = flags['auto:adjust-on-label-overflow'] ? this.adjustOnOverflow(parallel.text, args) : parallel.text; - - parallel.text = flags['auto:hide-on-label-edges-overlap'] ? this.hideOnLabelEdgesOverlap(parallel.text, parallel.edges) : parallel.text; - - parallel.text = flags['auto:hide-on-label-label-overlap'] ? this.hideOnLabelLabelOverlap(parallel.text) : parallel.text; - - parallel.text = flags['auto:hide-on-label-anchor-overlap'] ? this.hideOnLabelAnchorOverlap(parallel.text) : parallel.text; - - var labels = parallel.text; - - var get = function get(prop) { - return function (__, i) { - return labels[i][prop]; - }; - }; - - var xi = get('x'); - var yi = get('y'); - var angle = get('angle'); - var color = get('color'); - var label = get('label'); - var update = function update() { - this.style('fill', color).style('font-size', self.guide.fontSize + 'px').style('display', function (__, i) { - return labels[i].hide ? 'none' : null; - }).attr('class', 'i-role-label').attr('text-anchor', 'middle').attr('transform', function (d, i) { - return 'translate(' + xi(d, i) + ',' + yi(d, i) + ') rotate(' + angle(d, i) + ')'; - }).text(label); - }; - - if (guide.hideEqualLabels) { - labels.filter(function (d) { - return !d.hide; - }).filter(function (d, i, visibleLabels) { - return i < visibleLabels.length - 1 && d.label === visibleLabels[i + 1].label; - }).forEach(function (d) { - return d.hide = true; - }); - } - - var text = this.container.selectAll('.i-role-label').data(labels.map(function (r) { - return r.data; - })); - text.exit().remove(); - text.call(update); - text.enter().append('text').call(update); - - return text; - } - }, { - key: 'autoPosition', - value: function autoPosition(parallel, tokens) { - - var calcEllipticXY = function calcEllipticXY(r, angle) { - var xReserve = 4; - var yReserve = 2; - var a = xReserve + (r.size + r.w) / 2; - var b = yReserve + (r.size + r.h) / 2; - return { - x: a * Math.cos(angle), - y: b * Math.sin(angle) - }; - }; - - var edges = parallel.edges; - var labels = parallel.text.map(function (r) { - var maxAngles = { - max: -Math.PI / 2, - min: Math.PI / 2, - norm: Math.random() * Math.PI * 2 - }; - var xy = calcEllipticXY(r, maxAngles[r.extr]); - return { - i: r.i, - x0: r.x, - y0: r.y, - x: r.x + xy.x, - y: r.y + xy.y, - w: r.w, - h: r.h, - size: r.size, - hide: r.hide, - extr: r.extr - }; - }).filter(function (r) { - return !r.hide; - }); - - var sim = new _layerLabelsAnnealingSimulator.AnnealingSimulator({ - items: labels, - transactor: function transactor(row) { - var prevX = row.x; - var prevY = row.y; - return { - modify: function modify() { - var maxAngles = { - max: -Math.PI, - min: Math.PI, - norm: Math.PI * 2 - }; - var segm = 4; - var maxAngle = maxAngles[row.extr]; - var angle = maxAngle / segm + Math.random() * (maxAngle * (segm - 2)) / segm; - var xy = calcEllipticXY(row, angle); - - row.x = row.x0 + xy.x; - row.y = row.y0 + xy.y; - - return row; - }, - revert: function revert() { - row.x = prevX; - row.y = prevY; - return row; - } - }; - }, - penalties: tokens.map(function (token) { - return _layerLabelsPenalties.LayerLabelsPenalties.get(token); - }).filter(function (x) { - return x; - }).map(function (penalty) { - return penalty(labels, edges); - }) - }); - - var bestRevision = sim.start(5); - - parallel.text = bestRevision.reduce(function (memo, l) { - var r = memo[l.i]; - r.x = l.x; - r.y = l.y; - return memo; - }, parallel.text); - - return parallel; - } - }, { - key: 'hideOnLabelEdgesOverlap', - value: function hideOnLabelEdgesOverlap(data, edges) { - var _this = this; - - var penaltyLabelEdgesOverlap = function penaltyLabelEdgesOverlap(label, edges) { - var rect = _this.getLabelRect(label); - return edges.reduce(function (sum, edge) { - var overlapTop = intersect(rect.x0, rect.x1, edge.x0, edge.x1, rect.y0, rect.y1, edge.y0, edge.y1); - var overlapBtm = intersect(rect.x0, rect.x1, edge.x0, edge.x1, rect.y1, rect.y0, edge.y0, edge.y1); - return sum + (overlapTop + overlapBtm) * 2; - }, 0); - }; - - data.filter(function (r) { - return !r.hide; - }).forEach(function (r) { - if (penaltyLabelEdgesOverlap(r, edges) > 0) { - r.hide = true; - } - }); - - return data; - } - }, { - key: 'hideOnLabelLabelOverlap', - value: function hideOnLabelLabelOverlap(data) { - var _this2 = this; - - var extremumOrder = { min: 0, max: 1, norm: 2 }; - var collisionSolveStrategies = { - 'min/min': function minMin(p0, p1) { - return p1.y - p0.y; - }, // desc - 'max/max': function maxMax(p0, p1) { - return p0.y - p1.y; - }, // asc - 'min/max': function minMax() { - return -1; - }, // choose min - 'min/norm': function minNorm() { - return -1; - }, // choose min - 'max/norm': function maxNorm() { - return -1; - }, // choose max - 'norm/norm': function normNorm(p0, p1) { - return p0.y - p1.y; - } // asc - }; - - var cross = function cross(a, b) { - var ra = _this2.getLabelRect(a); - var rb = _this2.getLabelRect(b); - var k = !a.hide && !b.hide; - - var x_overlap = k * Math.max(0, Math.min(rb.x1, ra.x1) - Math.max(ra.x0, rb.x0)); - var y_overlap = k * Math.max(0, Math.min(rb.y1, ra.y1) - Math.max(ra.y0, rb.y0)); - - if (x_overlap * y_overlap > 0) { - var p = [a, b]; - p.sort(function (p0, p1) { - return extremumOrder[p0.extr] - extremumOrder[p1.extr]; - }); - var r = collisionSolveStrategies[p[0].extr + '/' + p[1].extr](p[0], p[1]) < 0 ? p[0] : p[1]; - r.hide = true; - } - }; - - data.filter(function (r) { - return !r.hide; - }).sort(function (p0, p1) { - return extremumOrder[p0.extr] - extremumOrder[p1.extr]; - }).forEach(function (a) { - data.forEach(function (b) { - if (a.i !== b.i) { - cross(a, b); - } - }); - }); - - return data; - } - }, { - key: 'getLabelRect', - value: function getLabelRect(a) { - var border = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - return { - x0: a.x - a.w / 2 - border, - x1: a.x + a.w / 2 + border, - y0: a.y - a.h / 2 - border, - y1: a.y + a.h / 2 + border - }; - } - }, { - key: 'getPointRect', - value: function getPointRect(a) { - var border = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; - - return { - x0: a.x - a.size / 2 - border, - x1: a.x + a.size / 2 + border, - y0: a.y - a.size / 2 - border, - y1: a.y + a.size / 2 + border - }; - } - }, { - key: 'hideOnLabelAnchorOverlap', - value: function hideOnLabelAnchorOverlap(data) { - var _this3 = this; - - var isIntersects = function isIntersects(label, point) { - var labelRect = _this3.getLabelRect(label, 2); - var pointRect = _this3.getPointRect(point, 2); - - var x_overlap = Math.max(0, Math.min(pointRect.x1, labelRect.x1) - Math.max(pointRect.x0, labelRect.x0)); - - var y_overlap = Math.max(0, Math.min(pointRect.y1, labelRect.y1) - Math.max(pointRect.y0, labelRect.y0)); - - return x_overlap * y_overlap > 0.001; - }; - - data.filter(function (row) { - return !row.hide; - }).forEach(function (label) { - var dataLength = data.length; - for (var i = 0; i < dataLength; i++) { - var point = data[i]; - if (label.i !== point.i && isIntersects(label, point)) { - label.hide = true; - break; - } - } - }); - - return data; - } - }, { - key: 'adjustOnOverflow', - value: function adjustOnOverflow(data, _ref2) { - var maxWidth = _ref2.maxWidth, - maxHeight = _ref2.maxHeight; - - return data.map(function (row) { - if (!row.hide) { - row.x = Math.min(Math.max(row.x, row.w / 2), maxWidth - row.w / 2); - row.y = Math.max(Math.min(row.y, maxHeight - row.h / 2), row.h / 2); - } - return row; - }); - } - }]); - - return LayerLabels; - }(); - -/***/ }, -/* 47 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var createFunc = function createFunc(x) { - return function () { - return x; - }; - }; - - var LayerLabelsModel = exports.LayerLabelsModel = function () { - function LayerLabelsModel(prev) { - _classCallCheck(this, LayerLabelsModel); - - this.model = prev.model; - this.x = prev.x || createFunc(0); - this.y = prev.y || createFunc(0); - this.dx = prev.dx || createFunc(0); - this.dy = prev.dy || createFunc(0); - this.w = prev.w || createFunc(0); - this.h = prev.h || createFunc(0); - this.hide = prev.hide || createFunc(false); - this.label = prev.label || createFunc(''); - this.color = prev.color || createFunc(''); - this.angle = prev.angle || createFunc(0); - } - - _createClass(LayerLabelsModel, null, [{ - key: 'seed', - value: function seed(model, _ref) { - var fontColor = _ref.fontColor, - flip = _ref.flip, - formatter = _ref.formatter, - labelRectSize = _ref.labelRectSize, - _ref$paddingKoeff = _ref.paddingKoeff, - paddingKoeff = _ref$paddingKoeff === undefined ? 0.5 : _ref$paddingKoeff; - - - var _x = flip ? model.yi : model.xi; - var _y = flip ? model.xi : model.yi; - - var label = function label(row) { - return formatter(model.label(row)); - }; - - return new LayerLabelsModel({ - model: model, - x: function x(row) { - return _x(row); - }, - y: function y(row) { - return _y(row); - }, - dy: function dy(row) { - return labelRectSize(label(row)).height * paddingKoeff; - }, - w: function w(row) { - return labelRectSize(label(row)).width; - }, - h: function h(row) { - return labelRectSize(label(row)).height; - }, - label: label, - color: function color() { - return fontColor; - }, - angle: function angle() { - return 0; - } - }); - } - }, { - key: 'compose', - value: function compose(prev) { - var updates = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - return Object.keys(updates).reduce(function (memo, propName) { - memo[propName] = updates[propName]; - return memo; - }, new LayerLabelsModel(prev)); - } - }]); - - return LayerLabelsModel; - }(); - -/***/ }, -/* 48 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.LayerLabelsRules = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _layerLabelsModel = __webpack_require__(47); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var rules = {}; - - var LayerLabelsRules = exports.LayerLabelsRules = function () { - function LayerLabelsRules() { - _classCallCheck(this, LayerLabelsRules); - } - - _createClass(LayerLabelsRules, null, [{ - key: 'regRule', - value: function regRule(alias, func) { - rules[alias] = func; - return this; - } - }, { - key: 'getRule', - value: function getRule(alias) { - return rules[alias]; - } - }]); - - return LayerLabelsRules; - }(); - - var findCutIndex = function findCutIndex(text, labelWidth, availableSpace) { - return availableSpace < labelWidth ? Math.max(1, Math.floor(availableSpace * text.length / labelWidth)) - 1 : text.length; - }; - - var cutString = function cutString(str, index) { - return index === 0 ? '' : str.slice(0, index).replace(/\.+$/g, '') + '\u2026'; - }; - - var isPositive = function isPositive(scale, row) { - return scale.discrete || !scale.discrete && row[scale.dim] >= 0; - }; - var isNegative = function isNegative(scale, row) { - return !scale.discrete && row[scale.dim] < 0; - }; - var getXPad = function getXPad(prev, row) { - return prev.w(row) / 2 + Math.floor(prev.model.size(row) / 5); - }; - var getYPad = function getYPad(prev, row) { - return prev.h(row) / 2 + Math.floor(prev.model.size(row) / 5); - }; - var alignByX = function alignByX(exp) { - return function (prev) { - return { - dx: function dx(row) { - - var ordinateScale = prev.model.scaleY; - - if (exp[2] === '+' && !isPositive(ordinateScale, row)) { - return prev.dx(row); - } - - if (exp[2] === '-' && !isNegative(ordinateScale, row)) { - return prev.dx(row); - } - - var k = exp[1]; - var u = exp[0] === exp[0].toUpperCase() ? 1 : 0; - - return prev.dx(row) + k * u * prev.model.size(row) / 2 + k * getXPad(prev, row); - } - }; - }; - }; - - var alignByY = function alignByY(exp) { - return function (prev) { - return { - dy: function dy(row) { - - var ordinateScale = prev.model.scaleY; - - if (exp[2] === '+' && !isPositive(ordinateScale, row)) { - return prev.dy(row); - } - - if (exp[2] === '-' && !isNegative(ordinateScale, row)) { - return prev.dy(row); - } - - var k = exp[1]; - var u = exp[0] === exp[0].toUpperCase() ? 1 : 0; - - return prev.dy(row) + k * u * prev.model.size(row) / 2 + k * getYPad(prev, row); - } - }; - }; - }; - - LayerLabelsRules.regRule('l', alignByX(['l', -1, null])).regRule('L', alignByX(['L', -1, null])).regRule('l+', alignByX(['l', -1, '+'])).regRule('l-', alignByX(['l', -1, '-'])).regRule('L+', alignByX(['L', -1, '+'])).regRule('L-', alignByX(['L', -1, '-'])).regRule('r', alignByX(['r', 1, null])).regRule('R', alignByX(['R', 1, null])).regRule('r+', alignByX(['r', 1, '+'])).regRule('r-', alignByX(['r', 1, '-'])).regRule('R+', alignByX(['R', 1, '+'])).regRule('R-', alignByX(['R', 1, '-'])).regRule('t', alignByY(['t', -1, null])).regRule('T', alignByY(['T', -1, null])).regRule('t+', alignByY(['t', -1, '+'])).regRule('t-', alignByY(['t', -1, '-'])).regRule('T+', alignByY(['T', -1, '+'])).regRule('T-', alignByY(['T', -1, '-'])).regRule('b', alignByY(['b', 1, null])).regRule('B', alignByY(['B', 1, null])).regRule('b+', alignByY(['b', 1, '+'])).regRule('b-', alignByY(['b', 1, '-'])).regRule('B+', alignByY(['B', 1, '+'])).regRule('B-', alignByY(['B', 1, '-'])).regRule('rotate-on-size-overflow', function (prev, _ref) { - var data = _ref.data; - - - var out = function out(row) { - return prev.model.size(row) < prev.w(row); - }; - var overflowCount = data.reduce(function (memo, row) { - return memo + (out(row) ? 1 : 0); - }, 0); - - var isRot = overflowCount / data.length > 0.5; - - var changes = {}; - if (isRot) { - var padKoeff = 0.5; - changes = { - angle: function angle() { - return -90; - }, - w: function w(row) { - return prev.h(row); - }, - h: function h(row) { - return prev.w(row); - }, - dx: function dx(row) { - return prev.h(row) * padKoeff - 2; - }, - dy: function dy() { - return 0; - } - }; - } - - return changes; - }).regRule('hide-by-label-height-vertical', function (prev) { - - return { - - hide: function hide(row) { - - var availableSpace = void 0; - var requiredSpace = void 0; - if (prev.angle(row) === 0) { - requiredSpace = prev.h(row); - availableSpace = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - } else { - requiredSpace = prev.w(row); - availableSpace = prev.model.size(row); - } - - if (requiredSpace > availableSpace) { - return true; - } - - return prev.hide(row); - } - }; - }).regRule('cut-label-vertical', function (prev) { - - return { - - h: function h(row) { - var reserved = prev.h(row); - if (Math.abs(prev.angle(row)) > 0) { - var text = prev.label(row); - var available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - var index = findCutIndex(text, reserved, available); - return index < text.length ? available : reserved; - } - - return reserved; - }, - - w: function w(row) { - var reserved = prev.w(row); - if (prev.angle(row) === 0) { - var text = prev.label(row); - var available = prev.model.size(row); - var index = findCutIndex(text, reserved, available); - return index < text.length ? available : reserved; - } - - return reserved; - }, - - label: function label(row) { - var reserved = void 0; - var available = void 0; - if (prev.angle(row) === 0) { - reserved = prev.w(row); - available = prev.model.size(row); - } else { - reserved = prev.h(row); - available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - } - - var text = prev.label(row); - var index = findCutIndex(text, reserved, available); - - return index < text.length ? cutString(text, index) : text; - }, - - dy: function dy(row) { - var prevDy = prev.dy(row); - - if (prev.angle(row) !== 0) { - var reserved = prev.h(row); - var available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - var text = prev.label(row); - var index = findCutIndex(text, reserved, available); - - return index < text.length ? available * prevDy / reserved : prevDy; - } - - return prevDy; - } - }; - }).regRule('cut-outer-label-vertical', function (prev) { - - return { - - h: function h(row, args) { - var reserved = prev.h(row); - if (Math.abs(prev.angle(row)) > 0) { - var text = prev.label(row); - var available = prev.model.y0(row) < prev.model.yi(row) ? args.maxHeight - prev.model.yi(row) : prev.model.yi(row); - var index = findCutIndex(text, reserved, available); - return index < text.length ? available : reserved; - } - - return reserved; - }, - - w: function w(row) { - var reserved = prev.w(row); - if (prev.angle(row) === 0) { - var text = prev.label(row); - var available = prev.model.size(row); - var index = findCutIndex(text, reserved, available); - return index < text.length ? available : reserved; - } - - return reserved; - }, - - label: function label(row, args) { - var reserved = void 0; - var available = void 0; - if (prev.angle(row) === 0) { - reserved = prev.w(row); - available = prev.model.size(row); - } else { - reserved = prev.h(row); - available = prev.model.y0(row) < prev.model.yi(row) ? args.maxHeight - prev.model.yi(row) : prev.model.yi(row); - } - - var text = prev.label(row); - var index = findCutIndex(text, reserved, available); - - return index < text.length ? cutString(text, index) : text; - }, - - dy: function dy(row, args) { - var prevDy = prev.dy(row); - - if (prev.angle(row) !== 0) { - var reserved = prev.h(row); - var available = prev.model.y0(row) < prev.model.yi(row) ? args.maxHeight - prev.model.yi(row) : prev.model.yi(row); - var text = prev.label(row); - var index = findCutIndex(text, reserved, available); - - return index < text.length ? available * prevDy / reserved : prevDy; - } - - return prevDy; - } - }; - }).regRule('from-beginning', function (prev) { - var y0 = function y0(row) { - return prev.model.y0(row); - }; - return prev.model.flip ? { x: y0 } : { y: y0 }; - }).regRule('to-end', function (prev) { - var yi = function yi(row) { - return prev.model.yi(row); - }; - return prev.model.flip ? { x: yi } : { y: yi }; - }).regRule('towards', function (prev) { - var getSign = function getSign(prev, row) { - return prev.model.yi(row) - prev.model.y0(row) >= 0 ? 1 : -1; - }; - var getPad = prev.model.flip ? getXPad : getYPad; - var dy = function dy(row) { - return getSign(prev, row) * getPad(prev, row); - }; - return prev.model.flip ? { dx: dy } : { dy: dy }; - }).regRule('inside-start-then-outside-end-horizontal', function (prev, args) { - - var innerStart = [LayerLabelsRules.getRule('from-beginning'), LayerLabelsRules.getRule('towards'), LayerLabelsRules.getRule('cut-label-horizontal')].reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var outerEnd = [LayerLabelsRules.getRule('to-end'), LayerLabelsRules.getRule('towards'), LayerLabelsRules.getRule('cut-outer-label-horizontal')].reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var betterInside = function betterInside(row) { - return innerStart.label(row).length >= outerEnd.label(row).length; - }; - - return Object.assign({}, innerStart, ['x', 'dx', 'hide', 'label'].reduce(function (obj, prop) { - obj[prop] = function (row) { - return (betterInside(row) ? innerStart : outerEnd)[prop](row); - }; - return obj; - }, {})); - }).regRule('inside-start-then-outside-end-vertical', function (prev, args) { - - var innerStart = [LayerLabelsRules.getRule('from-beginning'), LayerLabelsRules.getRule('towards'), LayerLabelsRules.getRule('cut-label-vertical')].reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var outerEnd = [LayerLabelsRules.getRule('to-end'), LayerLabelsRules.getRule('towards'), LayerLabelsRules.getRule('cut-outer-label-vertical')].reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var betterInside = function betterInside(row) { - return innerStart.label(row).length >= outerEnd.label(row).length; - }; - - return Object.assign({}, innerStart, ['y', 'dy', 'hide', 'label'].reduce(function (obj, prop) { - obj[prop] = function (row) { - return (betterInside(row) ? innerStart : outerEnd)[prop](row); - }; - return obj; - }, {})); - }).regRule('outside-then-inside-horizontal', function (prev, args) { - - var outer = ['r+', 'l-', 'cut-outer-label-horizontal'].map(LayerLabelsRules.getRule).reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var inner = ['r-', 'l+', 'hide-by-label-height-horizontal', 'cut-label-horizontal'].map(LayerLabelsRules.getRule).reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var betterInside = function betterInside(row) { - return inner.label(row).length > outer.label(row).length; - }; - - return Object.assign({}, outer, ['x', 'dx', 'hide', 'label'].reduce(function (obj, prop) { - obj[prop] = function (row) { - return (betterInside(row) ? inner : outer)[prop](row); - }; - return obj; - }, {})); - }).regRule('outside-then-inside-vertical', function (prev, args) { - - var outer = ['t+', 'b-', 'cut-outer-label-vertical'].map(LayerLabelsRules.getRule).reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var inner = ['t-', 'b+', 'hide-by-label-height-vertical', 'cut-label-vertical'].map(LayerLabelsRules.getRule).reduce(function (p, r) { - return _layerLabelsModel.LayerLabelsModel.compose(p, r(p, args)); - }, prev); - - var betterInside = function betterInside(row) { - return inner.label(row, args).length > outer.label(row, args).length; - }; - - return Object.assign({}, outer, ['y', 'dy', 'hide', 'label'].reduce(function (obj, prop) { - obj[prop] = function (row) { - return (betterInside(row) ? inner : outer)[prop](row, args); - }; - return obj; - }, {})); - }).regRule('hide-by-label-height-horizontal', function (prev) { - - return { - - hide: function hide(row) { - - if (prev.model.size(row) < prev.h(row)) { - return true; - } - - return prev.hide(row); - } - }; - }).regRule('cut-label-horizontal', function (prev) { - - return { - - dx: function dx(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - var index = findCutIndex(text, required, available); - var prevDx = prev.dx(row); - return index < text.length ? available * prevDx / required : prevDx; - }, - - w: function w(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - var index = findCutIndex(text, required, available); - return index < text.length ? available : required; - }, - - label: function label(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = Math.abs(prev.model.y0(row) - prev.model.yi(row)); - var index = findCutIndex(text, required, available); - return index < text.length ? cutString(text, index) : text; - } - }; - }).regRule('cut-outer-label-horizontal', function (prev, args) { - - return { - - dx: function dx(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = prev.model.y0(row) < prev.model.yi(row) ? args.maxWidth - prev.model.yi(row) : prev.model.yi(row); - var index = findCutIndex(text, required, available); - var prevDx = prev.dx(row); - return index < text.length ? available * prevDx / required : prevDx; - }, - - w: function w(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = prev.model.y0(row) < prev.model.yi(row) ? args.maxWidth - prev.model.yi(row) : prev.model.yi(row); - var index = findCutIndex(text, required, available); - return index < text.length ? available : required; - }, - - label: function label(row) { - var text = prev.label(row); - var required = prev.w(row); - var available = prev.model.y0(row) < prev.model.yi(row) ? args.maxWidth - prev.model.yi(row) : prev.model.yi(row); - var index = findCutIndex(text, required, available); - return index < text.length ? cutString(text, index) : text; - } - }; - }).regRule('keep-within-diameter-or-top', function (prev) { - return { - dy: function dy(row) { - - if (prev.model.size(row) / prev.w(row) < 1) { - return prev.dy(row) - prev.h(row) / 2 - prev.model.size(row) / 2; - } - - return prev.dy(row); - } - }; - }).regRule('keep-in-box', function (prev, _ref2) { - var maxWidth = _ref2.maxWidth, - maxHeight = _ref2.maxHeight; - - return { - dx: function dx(row) { - var dx = prev.dx(row); - var x = prev.x(row) + dx; - var w = prev.w(row); - var l = x - w / 2; - var r = x + w / 2; - - var dl = 0 - l; - if (dl > 0) { - return dx + dl; - } - - var dr = r - maxWidth; - if (dr > 0) { - return dx - dr; - } - - return dx; - }, - dy: function dy(row) { - var dy = prev.dy(row); - var y = prev.y(row) + dy; - var h = prev.h(row); - var t = y - h / 2; - var b = y + h / 2; - - var dt = 0 - t; - if (dt > 0) { - return 0; - } - - var db = b - maxHeight; - if (db > 0) { - return dy - db; - } - - return dy; - } - }; - }); - -/***/ }, -/* 49 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var AnnealingSimulator = exports.AnnealingSimulator = function () { - function AnnealingSimulator(config) { - _classCallCheck(this, AnnealingSimulator); - - this.minError = Number.MAX_VALUE; - this.items = config.items; - this.revision = this.items.map(function (row) { - return { i: row.i, x: row.x, y: row.y }; - }); - this.penalties = config.penalties; - this.transactor = config.transactor; - this.cooling_schedule = config.cooling_schedule || function (ti, t0, n) { - return ti - t0 / n; - }; - } - - _createClass(AnnealingSimulator, [{ - key: "energy", - value: function energy(index) { - return this.penalties.reduce(function (memo, p) { - return memo + p(index); - }, 0); - } - }, { - key: "move", - value: function move(temperature) { - - var i = Math.floor(Math.random() * this.items.length); - - var trans = this.transactor(this.items[i]); - var prevEnergy = this.energy(i); - this.items[i] = trans.modify(); - var nextEnergy = this.energy(i); - - var de = nextEnergy - prevEnergy; - var acceptanceProbability = de < 0 ? 1 : Math.exp(-de / temperature); - - if (Math.random() >= acceptanceProbability) { - this.items[i] = trans.revert(); - } else if (nextEnergy < this.minError) { - this.minError = nextEnergy; - this.revision = this.items.map(function (row) { - return { i: row.i, x: row.x, y: row.y }; - }); - } - } - }, { - key: "start", - value: function start(nIterations) { - // main simulated annealing function - var ti = 1.0; - var t0 = 1.0; - var itemsLength = this.items.length; - mining: { - for (var i = 0; i < nIterations; i++) { - for (var m = 0; m < itemsLength; m++) { - this.move(ti); - if (this.minError <= 10) { - break mining; - } - } - ti = this.cooling_schedule(ti, t0, nIterations); - } - } - - return this.revision; - } - }]); - - return AnnealingSimulator; - }(); - -/***/ }, -/* 50 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.LayerLabelsPenalties = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utilsDraw = __webpack_require__(10); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var intersect = function intersect(x1, x2, x3, x4, y1, y2, y3, y4) { - return _utilsDraw.utilsDraw.isIntersect(x1, y1, x2, y2, x3, y3, x4, y4); - }; - - var _penalties = {}; - - var LayerLabelsPenalties = exports.LayerLabelsPenalties = function () { - function LayerLabelsPenalties() { - _classCallCheck(this, LayerLabelsPenalties); - } - - _createClass(LayerLabelsPenalties, null, [{ - key: 'reg', - value: function reg(alias, funcPenalty) { - _penalties[alias] = funcPenalty; - return this; - } - }, { - key: 'get', - value: function get(alias) { - return _penalties[alias]; - } - }]); - - return LayerLabelsPenalties; - }(); - - LayerLabelsPenalties.reg('auto:avoid-label-label-overlap', function (labels, edges) { - var penaltyRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1.0; - - return function (index) { - var x21 = labels[index].x; - var y21 = labels[index].y - labels[index].h + 2.0; - var x22 = labels[index].x + labels[index].w; - var y22 = labels[index].y + 2.0; - - return labels.reduce(function (sum, labi, i) { - var k = i !== index; - var x11 = labi.x; - var y11 = labi.y - labi.h + 2.0; - var x12 = labi.x + labi.w; - var y12 = labi.y + 2.0; - var x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21)); - var y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21)); - var overlap_area = x_overlap * y_overlap; - return sum + k * (overlap_area * penaltyRate); - }, 0); - }; - }).reg('auto:avoid-label-anchor-overlap', function (labels, edges) { - var penaltyRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1.0; - - return function (index) { - var lab0 = labels[index]; - var x21 = lab0.x - lab0.w / 2; - var x22 = lab0.x + lab0.w / 2; - var y21 = lab0.y - lab0.h / 2 + 2.0; - var y22 = lab0.y + lab0.h / 2 + 2.0; - return labels.reduce(function (sum, anchor) { - var x11 = anchor.x0 - anchor.size / 2; - var x12 = anchor.x0 + anchor.size / 2; - var y11 = anchor.y0 - anchor.size / 2; - var y12 = anchor.y0 + anchor.size / 2; - var x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21)); - var y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21)); - var overlap_area = x_overlap * y_overlap; - return sum + overlap_area * penaltyRate; - }, 0); - }; - }).reg('auto:avoid-label-edges-overlap', function (labels, edges) { - var penaltyRate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1.0; - - return function (index) { - var label = labels[index]; - var x0 = label.x - label.w / 2; - var x1 = label.x + label.w / 2; - var y0 = label.y - label.h / 2; - var y1 = label.y + label.h / 2; - return edges.reduce(function (sum, edge) { - var overlapLeftTopRightBottom = intersect(x0, x1, edge.x0, edge.x1, y0, y1, edge.y0, edge.y1); - var overlapLeftBottomRightTop = intersect(x0, x1, edge.x0, edge.x1, y1, y0, edge.y0, edge.y1); - return sum + (overlapLeftTopRightBottom + overlapLeftBottomRightTop) * penaltyRate; - }, 0); - }; - }); - -/***/ }, -/* 51 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Area = undefined; - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _const = __webpack_require__(22); - - var _utils = __webpack_require__(3); - - var _elementPath = __webpack_require__(52); - - var _cssClassMap = __webpack_require__(53); - - var _grammarRegistry = __webpack_require__(7); - - var _d3Decorators = __webpack_require__(9); - - var _interpolatorsRegistry = __webpack_require__(13); - - var _areaPath = __webpack_require__(54); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - var Area = { - - draw: _elementPath.BasePath.draw, - getClosestElement: _elementPath.BasePath.getClosestElement, - highlight: _elementPath.BasePath.highlight, - highlightDataPoints: _elementPath.BasePath.highlightDataPoints, - addInteraction: _elementPath.BasePath.addInteraction, - _getBoundsInfo: _elementPath.BasePath._getBoundsInfo, - _sortElements: _elementPath.BasePath._sortElements, - - init: function init(xConfig) { - - var config = _elementPath.BasePath.init(xConfig); - var enableStack = config.stack; - - config.transformRules = [config.flip && _grammarRegistry.GrammarRegistry.get('flip'), !enableStack && _grammarRegistry.GrammarRegistry.get('groupOrderByAvg'), enableStack && _elementPath.BasePath.grammarRuleFillGaps, enableStack && _grammarRegistry.GrammarRegistry.get('stack')]; - - config.adjustRules = [function (prevModel, args) { - var isEmptySize = prevModel.scaleSize.isEmptyScale(); - var sizeCfg = _utils.utils.defaults(config.guide.size || {}, { - defMinSize: 2, - defMaxSize: isEmptySize ? 6 : 40 - }); - var params = Object.assign({}, args, { - defMin: sizeCfg.defMinSize, - defMax: sizeCfg.defMaxSize, - minLimit: sizeCfg.minSize, - maxLimit: sizeCfg.maxSize - }); - - return _grammarRegistry.GrammarRegistry.get('adjustStaticSizeScale')(prevModel, params); - }]; - - return config; - }, - buildModel: function buildModel(screenModel) { - - var baseModel = _elementPath.BasePath.baseModel(screenModel); - - var guide = this.node().config.guide; - var countCss = (0, _cssClassMap.getLineClassesByCount)(screenModel.model.scaleColor.domain().length); - var groupPref = _const.CSS_PREFIX + 'area area i-role-path ' + countCss + ' ' + guide.cssClass + ' '; - - baseModel.groupAttributes = { - class: function _class(fiber) { - return groupPref + ' ' + baseModel.class(fiber[0]) + ' frame'; - } - }; - - var toDirPoint = function toDirPoint(d) { - return { - id: screenModel.id(d), - x: baseModel.x(d), - y: baseModel.y(d) - }; - }; - - var toRevPoint = function toRevPoint(d) { - return { - id: screenModel.id(d), - x: baseModel.x0(d), - y: baseModel.y0(d) - }; - }; - - var pathAttributes = { - fill: function fill(fiber) { - return baseModel.color(fiber[0]); - }, - stroke: function stroke(fiber) { - var colorStr = baseModel.color(fiber[0]); - if (colorStr.length > 0) { - colorStr = _d2.default.rgb(colorStr).darker(1); - } - return colorStr; - } - }; - - baseModel.pathAttributesEnterInit = pathAttributes; - baseModel.pathAttributesUpdateDone = pathAttributes; - - var isPolygon = (0, _interpolatorsRegistry.getInterpolatorSplineType)(guide.interpolate) === 'polyline'; - baseModel.pathElement = isPolygon ? 'polygon' : 'path'; - - baseModel.pathTween = { - attr: isPolygon ? 'points' : 'd', - fn: (0, _d3Decorators.d3_createPathTween)(isPolygon ? 'points' : 'd', isPolygon ? _areaPath.getAreaPolygon : _areaPath.getSmoothAreaPath, [toDirPoint, toRevPoint], screenModel.id, guide.interpolate) - }; - - return baseModel; - } - }; - - exports.Area = Area; - -/***/ }, -/* 52 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.BasePath = undefined; - - var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - - var _layerLabels = __webpack_require__(46); - - var _const = __webpack_require__(22); - - var _d3Decorators = __webpack_require__(9); - - var _utils = __webpack_require__(3); - - var _utilsDom = __webpack_require__(1); - - var _utilsDraw = __webpack_require__(10); - - var _d2 = __webpack_require__(2); - - var _d3 = _interopRequireDefault(_d2); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - var synthetic = 'taucharts_synthetic_record'; - var isNonSyntheticRecord = function isNonSyntheticRecord(row) { - return row[synthetic] !== true; - }; - - var BasePath = { - - grammarRuleFillGaps: function grammarRuleFillGaps(model) { - var data = model.data(); - var groups = _utils.utils.groupBy(data, model.group); - var fibers = Object.keys(groups).sort(function (a, b) { - return model.order(a) - model.order(b); - }).reduce(function (memo, k) { - return memo.concat([groups[k]]); - }, []); - - var dx = model.scaleX.dim; - var dy = model.scaleY.dim; - var dc = model.scaleColor.dim; - var ds = model.scaleSplit.dim; - var calcSign = function calcSign(row) { - return row[dy] >= 0 ? 1 : -1; - }; - - var gen = function gen(x, sampleRow, sign) { - var _ref; - - var genId = [x, model.id(sampleRow), sign].join(' '); - return _ref = {}, _defineProperty(_ref, dx, x), _defineProperty(_ref, dy, sign * 1e-10), _defineProperty(_ref, ds, sampleRow[ds]), _defineProperty(_ref, dc, sampleRow[dc]), _defineProperty(_ref, synthetic, true), _defineProperty(_ref, synthetic + 'id', genId), _ref; - }; - - var merge = function merge(templateSorted, fiberSorted, sign) { - var groups = _utils.utils.groupBy(fiberSorted, function (row) { - return row[dx]; - }); - var sample = fiberSorted[0]; - return templateSorted.reduce(function (memo, k) { - return memo.concat(groups[k] || gen(k, sample, sign)); - }, []); - }; - - var asc = function asc(a, b) { - return a - b; - }; - var xs = _utils.utils.unique(fibers.reduce(function (memo, fib) { - return memo.concat(fib.map(function (row) { - return row[dx]; - })); - }, [])).sort(asc); - - var nextData = fibers.map(function (fib) { - return fib.sort(function (a, b) { - return model.xi(a) - model.xi(b); - }); - }).reduce(function (memo, fib) { - var bySign = _utils.utils.groupBy(fib, calcSign); - return Object.keys(bySign).reduce(function (memo, s) { - return memo.concat(merge(xs, bySign[s], s)); - }, memo); - }, []); - - return { - data: function data() { - return nextData; - }, - id: function id(row) { - return row[synthetic] ? row[synthetic + 'id'] : model.id(row); - } - }; - }, - - init: function init(xConfig) { - - var config = xConfig; - - config.guide = _utils.utils.defaults(config.guide || {}, { - animationSpeed: 0, - cssClass: '', - maxHighlightDistance: 32, - widthCssClass: '', - color: {}, - label: {} - }); - - config.guide.label = _utils.utils.defaults(config.guide.label, { - fontSize: 11, - hideEqualLabels: true, - position: ['auto:avoid-label-label-overlap', 'auto:avoid-label-anchor-overlap', 'auto:avoid-label-edges-overlap', 'auto:adjust-on-label-overflow', 'auto:hide-on-label-label-overlap', 'auto:hide-on-label-edges-overlap'] - }); - - config.guide.color = _utils.utils.defaults(config.guide.color || {}, { fill: null }); - - if (['never', 'hover', 'always'].indexOf(config.guide.showAnchors) < 0) { - config.guide.showAnchors = 'hover'; - } - - config.transformRules = []; - config.adjustRules = []; - - return config; - }, - baseModel: function baseModel(screenModel) { - - var datumClass = 'i-role-datum'; - var pointPref = _const.CSS_PREFIX + 'dot-line dot-line i-role-dot ' + datumClass + ' ' + _const.CSS_PREFIX + 'dot '; - var kRound = 10000; - var baseModel = { - gog: screenModel.model, - x: screenModel.x, - y: screenModel.y, - x0: screenModel.x0, - y0: screenModel.y0, - size: screenModel.size, - group: screenModel.group, - order: screenModel.order, - color: screenModel.color, - class: screenModel.class, - groupAttributes: {}, - pathAttributesUpdateInit: {}, - pathAttributesUpdateDone: {}, - pathAttributesEnterInit: {}, - pathAttributesEnterDone: {}, - pathElement: null, - dotAttributes: { - r: function r(d) { - return Math.round(kRound * baseModel.size(d) / 2) / kRound; - }, - cx: function cx(d) { - return baseModel.x(d); - }, - cy: function cy(d) { - return baseModel.y(d); - }, - fill: function fill(d) { - return baseModel.color(d); - }, - class: function _class(d) { - return pointPref + ' ' + baseModel.class(d); - } - }, - dotAttributesDefault: { - r: 0, - cy: function cy(d) { - return baseModel.y0(d); - } - } - }; - - return baseModel; - }, - addInteraction: function addInteraction() { - var _this = this; - - var node = this.node(); - var config = this.node().config; - var createFilter = function createFilter(data, falsy) { - return function (row) { - return row === data ? true : falsy; - }; - }; - node.on('highlight', function (sender, filter) { - return _this.highlight(filter); - }); - node.on('highlight-data-points', function (sender, filter) { - return _this.highlightDataPoints(filter); - }); - if (config.guide.showAnchors !== 'never') { - node.on('data-hover', function (sender, e) { - return _this.highlightDataPoints(createFilter(e.data, null)); - }); - } - }, - draw: function draw() { - var node = this.node(); - var config = node.config; - var guide = config.guide; - var options = config.options; - options.container = options.slot(config.uid); - - var screenModel = node.screenModel; - var model = this.buildModel(screenModel); - - var createUpdateFunc = _d3Decorators.d3_animationInterceptor; - - var updateGroupContainer = function updateGroupContainer() { - - this.attr(model.groupAttributes); - - var points = this.selectAll('circle').data(function (fiber) { - return fiber.length <= 1 ? fiber : []; - }, screenModel.id); - points.exit().call(createUpdateFunc(guide.animationSpeed, null, { r: 0 }, function (node) { - return _d3.default.select(node).remove(); - })); - points.call(createUpdateFunc(guide.animationSpeed, null, model.dotAttributes)); - points.enter().append('circle').call(createUpdateFunc(guide.animationSpeed, model.dotAttributesDefault, model.dotAttributes)); - - node.subscribe(points); - - var updatePath = function updatePath(selection) { - if (config.guide.animationSpeed > 0) { - // HACK: This call fixes stacked area tween (some paths are intersected on - // synthetic points). Maybe caused by async call of `toPoint`. - selection.attr(model.pathTween.attr, function (d) { - return model.pathTween.fn.call(this, d)(0); - }); - - (0, _d3Decorators.d3_transition)(selection, config.guide.animationSpeed, 'pathTransition').attrTween(model.pathTween.attr, model.pathTween.fn); - } else { - selection.attr(model.pathTween.attr, function (d) { - return model.pathTween.fn.call(this, d)(1); - }); - } - }; - - var series = this.selectAll(model.pathElement).data(function (fiber) { - return fiber.length > 1 ? [fiber] : []; - }, getDataSetId); - series.exit().remove(); - series.call(createUpdateFunc(guide.animationSpeed, model.pathAttributesUpdateInit, model.pathAttributesUpdateDone, model.afterPathUpdate)).call(updatePath); - series.enter().append(model.pathElement).call(createUpdateFunc(guide.animationSpeed, model.pathAttributesEnterInit, model.pathAttributesEnterDone, model.afterPathUpdate)).call(updatePath); - - node.subscribe(series); - - if (guide.showAnchors !== 'never') { - var anchorClass = 'i-data-anchor'; - var attr = { - r: guide.showAnchors === 'hover' ? 0 : function (d) { - return screenModel.size(d) / 2; - }, - cx: function cx(d) { - return model.x(d); - }, - cy: function cy(d) { - return model.y(d); - }, - opacity: guide.showAnchors === 'hover' ? 0 : 1, - fill: function fill(d) { - return screenModel.color(d); - }, - class: anchorClass - }; - - var dots = this.selectAll('.' + anchorClass).data(function (fiber) { - return fiber.filter(isNonSyntheticRecord); - }, screenModel.id); - dots.exit().remove(); - dots.call(createUpdateFunc(guide.animationSpeed, null, attr)); - dots.enter().append('circle').call(createUpdateFunc(guide.animationSpeed, { r: 0 }, attr)); - - node.subscribe(dots); - } - }; - - var fullFibers = screenModel.toFibers(); - var pureFibers = fullFibers.map(function (arr) { - return arr.filter(isNonSyntheticRecord); - }); - - var frameSelection = options.container.selectAll('.frame'); - - // NOTE: If any point from new dataset is equal to a point from old dataset, - // we assume that path remains the same. - // TODO: Id of data array should remain the same (then use `fib => self.screenModel.id(fib)`). - var getDataSetId = function () { - var current = frameSelection.empty() ? [] : frameSelection.data(); - var currentIds = new Map(); - frameSelection.each(function (d) { - currentIds.set(d, Number(this.getAttribute('data-id'))); - }); - var currentInnerIds = current.reduce(function (map, ds) { - map.set(ds, ds.map(screenModel.id)); - return map; - }, new Map()); - var newIds = new Map(); - var notFoundCounter = Math.max.apply(Math, [0].concat(_toConsumableArray(Array.from(currentIds.values())))); - return function (fib) { - if (newIds.has(fib)) { - return newIds.get(fib); - } - var fibIds = fib.map(function (f) { - return screenModel.id(f); - }); - var matching = (Array.from(currentInnerIds.entries()).find(function (_ref2) { - var _ref3 = _slicedToArray(_ref2, 2), - currIds = _ref3[1]; - - return fibIds.some(function (newId) { - return currIds.some(function (id) { - return id === newId; - }); - }); - }) || [null])[0]; - var result; - if (matching) { - result = currentIds.get(matching); - } else { - ++notFoundCounter; - result = notFoundCounter; - } - newIds.set(fib, result); - return result; - }; - }(); - this._getDataSetId = getDataSetId; - - var frameBinding = frameSelection.data(fullFibers, getDataSetId); - frameBinding.exit().remove(); - frameBinding.call(updateGroupContainer); - frameBinding.enter().append('g').attr('data-id', getDataSetId).call(updateGroupContainer); - - frameBinding.order(); - - // TODO: Exclude removed elements from calculation. - this._boundsInfo = this._getBoundsInfo(options.container.selectAll('.i-data-anchor')[0]); - - node.subscribe(new _layerLabels.LayerLabels(screenModel.model, config.flip, config.guide.label, options).draw(pureFibers)); - }, - _getBoundsInfo: function _getBoundsInfo(dots) { - if (dots.length === 0) { - return null; - } - - var screenModel = this.node().screenModel; - var flip = this.node().config.flip; - - - var items = dots.map(function (node) { - var data = _d3.default.select(node).data()[0]; - var x = screenModel.x(data); - var y = screenModel.y(data); - - return { node: node, data: data, x: x, y: y }; - }) - // TODO: Removed elements should not be passed to this function. - .filter(function (item) { - return !isNaN(item.x) && !isNaN(item.y); - }); - - var bounds = items.reduce(function (bounds, _ref4) { - var x = _ref4.x, - y = _ref4.y; - - bounds.left = Math.min(x, bounds.left); - bounds.right = Math.max(x, bounds.right); - bounds.top = Math.min(y, bounds.top); - bounds.bottom = Math.max(y, bounds.bottom); - return bounds; - }, { - left: Number.MAX_VALUE, - right: Number.MIN_VALUE, - top: Number.MAX_VALUE, - bottom: Number.MIN_VALUE - }); - - var ticks = _utils.utils.unique(items.map(flip ? function (item) { - return item.y; - } : function (item) { - return item.x; - })).sort(function (a, b) { - return a - b; - }); - var groups = ticks.reduce(function (obj, value) { - return obj[value] = [], obj; - }, {}); - items.forEach(function (item) { - var tick = ticks.find(flip ? function (value) { - return item.y === value; - } : function (value) { - return item.x === value; - }); - groups[tick].push(item); - }); - var split = function split(values) { - if (values.length === 1) { - return groups[values]; - } - var midIndex = Math.ceil(values.length / 2); - var middle = (values[midIndex - 1] + values[midIndex]) / 2; - return { - middle: middle, - lower: split(values.slice(0, midIndex)), - greater: split(values.slice(midIndex)) - }; - }; - var tree = split(ticks); - - return { bounds: bounds, tree: tree }; - }, - getClosestElement: function getClosestElement(cursorX, cursorY) { - if (!this._boundsInfo) { - return null; - } - var _boundsInfo = this._boundsInfo, - bounds = _boundsInfo.bounds, - tree = _boundsInfo.tree; - - var container = this.node().config.options.container; - var flip = this.node().config.flip; - - var translate = _utilsDraw.utilsDraw.getDeepTransformTranslate(container.node()); - var maxHighlightDistance = this.node().config.guide.maxHighlightDistance; - - if (cursorX < bounds.left + translate.x - maxHighlightDistance || cursorX > bounds.right + translate.x + maxHighlightDistance || cursorY < bounds.top + translate.y - maxHighlightDistance || cursorY > bounds.bottom + translate.y + maxHighlightDistance) { - return null; - } - - var cursor = flip ? cursorY - translate.y : cursorX - translate.x; - var items = function getClosestElements(el) { - if (Array.isArray(el)) { - return el; - } - return getClosestElements(cursor > el.middle ? el.greater : el.lower); - }(tree).map(function (el) { - var x = el.x + translate.x; - var y = el.y + translate.y; - var distance = Math.abs(flip ? cursorY - y : cursorX - x); - var secondaryDistance = Math.abs(flip ? cursorX - x : cursorY - y); - return { node: el.node, data: el.data, distance: distance, secondaryDistance: secondaryDistance, x: x, y: y }; - }).sort(function (a, b) { - return a.distance === b.distance ? a.secondaryDistance - b.secondaryDistance : a.distance - b.distance; - }); - - var largerDistIndex = items.findIndex(function (d) { - return d.distance !== items[0].distance || d.secondaryDistance !== items[0].secondaryDistance; - }); - var sameDistItems = largerDistIndex < 0 ? items : items.slice(0, largerDistIndex); - if (sameDistItems.length === 1) { - return sameDistItems[0]; - } - var mx = sameDistItems.reduce(function (sum, item) { - return sum + item.x; - }, 0) / sameDistItems.length; - var my = sameDistItems.reduce(function (sum, item) { - return sum + item.y; - }, 0) / sameDistItems.length; - var angle = Math.atan2(my - cursorY, mx - cursorX) + Math.PI; - var closest = sameDistItems[Math.round((sameDistItems.length - 1) * angle / 2 / Math.PI)]; - return closest; - }, - highlight: function highlight(filter) { - var _paths$classed, _classed; - - var container = this.node().config.options.container; - - var x = 'graphical-report__highlighted'; - var _ = 'graphical-report__dimmed'; - - var paths = container.selectAll('.i-role-path'); - var targetFibers = paths.data().filter(function (fiber) { - return fiber.filter(isNonSyntheticRecord).some(filter); - }); - var hasTarget = targetFibers.length > 0; - - paths.classed((_paths$classed = {}, _defineProperty(_paths$classed, x, function (fiber) { - return hasTarget && targetFibers.indexOf(fiber) >= 0; - }), _defineProperty(_paths$classed, _, function (fiber) { - return hasTarget && targetFibers.indexOf(fiber) < 0; - }), _paths$classed)); - - var classed = (_classed = {}, _defineProperty(_classed, x, function (d) { - return filter(d) === true; - }), _defineProperty(_classed, _, function (d) { - return filter(d) === false; - }), _classed); - - container.selectAll('.i-role-dot').classed(classed); - - container.selectAll('.i-role-label').classed(classed); - - this._sortElements(filter); - }, - highlightDataPoints: function highlightDataPoints(filter) { - var cssClass = 'i-data-anchor'; - var screenModel = this.node().screenModel; - var showOnHover = this.node().config.guide.showAnchors === 'hover'; - var rmin = 4; // Min highlight radius - var rx = 1.25; // Highlight multiplier - var unit = this.node(); - var container = unit.config.options.container; - var dots = container.selectAll('.' + cssClass).attr({ - r: showOnHover ? function (d) { - return filter(d) ? Math.max(rmin, screenModel.size(d) / 2) : 0; - } : function (d) { - // NOTE: Highlight point with larger radius. - var r = screenModel.size(d) / 2; - if (filter(d)) { - r = Math.max(rmin, Math.ceil(r * rx)); - } - return r; - }, - opacity: showOnHover ? function (d) { - return filter(d) ? 1 : 0; - } : 1, - fill: function fill(d) { - return screenModel.color(d); - }, - class: function _class(d) { - return _utilsDom.utilsDom.classes(cssClass, screenModel.class(d)); - } - }).classed(_const.CSS_PREFIX + 'highlighted', filter); - - // Display cursor line - var flip = unit.config.flip; - var highlighted = dots.filter(filter); - var cursorLine = container.select('.cursor-line'); - if (highlighted.empty()) { - cursorLine.remove(); - } else { - if (cursorLine.empty()) { - cursorLine = container.append('line'); - } - var model = unit.screenModel.model; - var x1 = model.xi(highlighted.data()[0]); - var x2 = model.xi(highlighted.data()[0]); - var domain = model.scaleY.domain(); - var y1 = model.scaleY(domain[0]); - var y2 = model.scaleY(domain[1]); - cursorLine.attr('class', 'cursor-line').attr('x1', flip ? y1 : x1).attr('y1', flip ? x1 : y1).attr('x2', flip ? y2 : x2).attr('y2', flip ? x2 : y2); - } - - this._sortElements(filter); - }, - _sortElements: function _sortElements(filter) { - - var container = this.node().config.options.container; - - var pathId = new Map(); - var pathFilter = new Map(); - var getDataSetId = this._getDataSetId; - container.selectAll('.i-role-path').each(function (d) { - pathId.set(this, getDataSetId(d)); - pathFilter.set(this, d.filter(isNonSyntheticRecord).some(filter)); - }); - - var compareFilterThenGroupId = _utils.utils.createMultiSorter(function (a, b) { - return pathFilter.get(a) - pathFilter.get(b); - }, function (a, b) { - return pathId.get(a) - pathId.get(b); - }); - var elementsOrder = { - line: 0, - g: 1, - text: 2 - }; - _utilsDom.utilsDom.sortChildren(container.node(), function (a, b) { - if (a.tagName === 'g' && b.tagName === 'g') { - return compareFilterThenGroupId(a, b); - } - return elementsOrder[a.tagName] - elementsOrder[b.tagName]; - }); - } - }; - - exports.BasePath = BasePath; - -/***/ }, -/* 53 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getLineClassesByCount = exports.getLineClassesByWidth = undefined; - - var _const = __webpack_require__(22); - - var arrayNumber = [1, 2, 3, 4, 5]; - var countLineClasses = arrayNumber.map(function (i) { - return _const.CSS_PREFIX + 'line-opacity-' + i; - }); - var widthLineClasses = arrayNumber.map(function (i) { - return _const.CSS_PREFIX + 'line-width-' + i; - }); - function getLineClassesByCount(count) { - return countLineClasses[count - 1] || countLineClasses[4]; - } - function getLineClassesByWidth(width) { - var index = 0; - if (width >= 160 && width < 320) { - index = 1; - } else if (width >= 320 && width < 480) { - index = 2; - } else if (width >= 480 && width < 640) { - index = 3; - } else if (width >= 640) { - index = 4; - } - return widthLineClasses[index]; - } - exports.getLineClassesByWidth = getLineClassesByWidth; - exports.getLineClassesByCount = getLineClassesByCount; - -/***/ }, -/* 54 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getAreaPolygon = getAreaPolygon; - exports.getSmoothAreaPath = getSmoothAreaPath; - function getAreaPolygon(dirPoints, revPoints) { - - if (dirPoints.length < 2) { - return ''; - } - - var path = String.prototype.concat.apply('', dirPoints.concat(revPoints.slice().reverse()).map(function (d, i) { - return '' + (i === 0 ? '' : ' ') + d.x + ',' + d.y; - })); - - return path; - } - - function getSmoothAreaPath(dirPoints, revPoints) { - - if (dirPoints.length < 2) { - return ''; - } - - var getPath = function getPath(points) { - var items = points.map(function (d, i) { - var command = (i - 1) % 3 === 0 ? 'C' : ''; - return '' + command + d.x + ',' + d.y + ' '; - }); - return String.prototype.concat.apply('', items); - }; - - var dirPath = getPath(dirPoints); - var revPath = getPath(revPoints.slice().reverse()); - var path = 'M' + dirPath + 'L' + revPath + 'Z'; - - return path; - } - -/***/ }, -/* 55 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Path = undefined; - - var _const = __webpack_require__(22); - - var _grammarRegistry = __webpack_require__(7); - - var _elementPath = __webpack_require__(52); - - var _utils = __webpack_require__(3); - - var _cssClassMap = __webpack_require__(53); - - var _d3Decorators = __webpack_require__(9); - - var Path = { - - draw: _elementPath.BasePath.draw, - getClosestElement: _elementPath.BasePath.getClosestElement, - highlight: _elementPath.BasePath.highlight, - highlightDataPoints: _elementPath.BasePath.highlightDataPoints, - addInteraction: _elementPath.BasePath.addInteraction, - _getBoundsInfo: _elementPath.BasePath._getBoundsInfo, - _sortElements: _elementPath.BasePath._sortElements, - - init: function init(xConfig) { - - var config = _elementPath.BasePath.init(xConfig); - - config.transformRules = [config.flip && _grammarRegistry.GrammarRegistry.get('flip')]; - - config.adjustRules = [function (prevModel, args) { - var isEmptySize = prevModel.scaleSize.isEmptyScale(); - var sizeCfg = _utils.utils.defaults(config.guide.size || {}, { - defMinSize: 2, - defMaxSize: isEmptySize ? 6 : 40 - }); - var params = Object.assign({}, args, { - defMin: sizeCfg.defMinSize, - defMax: sizeCfg.defMaxSize, - minLimit: sizeCfg.minSize, - maxLimit: sizeCfg.maxSize - }); - - return _grammarRegistry.GrammarRegistry.get('adjustStaticSizeScale')(prevModel, params); - }]; - - return config; - }, - buildModel: function buildModel(screenModel) { - - var baseModel = _elementPath.BasePath.baseModel(screenModel); - var guide = this.node().config.guide; - var countCss = (0, _cssClassMap.getLineClassesByCount)(screenModel.model.scaleColor.domain().length); - var groupPref = _const.CSS_PREFIX + 'area area i-role-path ' + countCss + ' ' + guide.cssClass + ' '; - - baseModel.groupAttributes = { - class: function _class(fiber) { - return groupPref + ' ' + baseModel.class(fiber[0]) + ' frame'; - } - }; - - var toPoint = function toPoint(d) { - return { - id: screenModel.id(d), - x: baseModel.x(d), - y: baseModel.y(d) - }; - }; - - var pathPoints = function pathPoints(x, y) { - return function (fiber) { - return fiber.map(function (d) { - return [x(d), y(d)].join(','); - }).join(' '); - }; - }; - - var pathAttributes = { - fill: function fill(fiber) { - return baseModel.color(fiber[0]); - }, - stroke: function stroke(fiber) { - return baseModel.color(fiber[0]); - } - }; - - baseModel.pathAttributesEnterInit = pathAttributes; - baseModel.pathAttributesUpdateDone = pathAttributes; - - baseModel.pathElement = 'polygon'; - - baseModel.pathTween = { - attr: 'points', - fn: (0, _d3Decorators.d3_createPathTween)('points', pathPoints(function (d) { - return d.x; - }, function (d) { - return d.y; - }), [toPoint], screenModel.id) - }; - - return baseModel; - } - }; - - exports.Path = Path; - -/***/ }, -/* 56 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Line = undefined; - - var _const = __webpack_require__(22); - - var _elementPath = __webpack_require__(52); - - var _grammarRegistry = __webpack_require__(7); - - var _cssClassMap = __webpack_require__(53); - - var _utils = __webpack_require__(3); - - var _d3Decorators = __webpack_require__(9); - - var _interpolatorsRegistry = __webpack_require__(13); - - var _brushLine = __webpack_require__(57); - - var _line = __webpack_require__(58); - - var Line = { - - draw: _elementPath.BasePath.draw, - getClosestElement: _elementPath.BasePath.getClosestElement, - highlight: _elementPath.BasePath.highlight, - highlightDataPoints: _elementPath.BasePath.highlightDataPoints, - addInteraction: _elementPath.BasePath.addInteraction, - _getBoundsInfo: _elementPath.BasePath._getBoundsInfo, - _sortElements: _elementPath.BasePath._sortElements, - - init: function init(xConfig) { - - var config = _elementPath.BasePath.init(xConfig); - var enableStack = config.stack; - - config.guide = _utils.utils.defaults(config.guide || {}, { - avoidScalesOverflow: true, - interpolate: 'linear' - }); - - config.transformRules = [config.flip && _grammarRegistry.GrammarRegistry.get('flip'), !enableStack && _grammarRegistry.GrammarRegistry.get('groupOrderByAvg'), enableStack && _elementPath.BasePath.grammarRuleFillGaps, enableStack && _grammarRegistry.GrammarRegistry.get('stack')]; - - var avoidScalesOverflow = config.guide.avoidScalesOverflow; - var isEmptySize = function isEmptySize(model) { - return model.scaleSize.isEmptyScale(); - }; - - config.adjustRules = [function (prevModel, args) { - var sizeCfg = _utils.utils.defaults(config.guide.size || {}, { - defMinSize: 2, - defMaxSize: isEmptySize(prevModel) ? 6 : 40 - }); - var params = Object.assign({}, args, { - defMin: sizeCfg.defMinSize, - defMax: sizeCfg.defMaxSize, - minLimit: sizeCfg.minSize, - maxLimit: sizeCfg.maxSize - }); - - return _grammarRegistry.GrammarRegistry.get('adjustStaticSizeScale')(prevModel, params); - }, avoidScalesOverflow && function (prevModel, args) { - if (isEmptySize(prevModel)) { - return function () { - return {}; - }; - } - var params = Object.assign({}, args, { - sizeDirection: 'xy' - }); - return _grammarRegistry.GrammarRegistry.get('avoidScalesOverflow')(prevModel, params); - }].filter(function (x) { - return x; - }); - return config; - }, - buildModel: function buildModel(screenModel) { - - var config = this.node().config; - var guide = config.guide; - var options = config.options; - var isEmptySize = !screenModel.model.scaleSize.dim; // TODO: empty method for size scale???; - var widthCss = isEmptySize ? guide.widthCssClass || (0, _cssClassMap.getLineClassesByWidth)(options.width) : ''; - var countCss = (0, _cssClassMap.getLineClassesByCount)(screenModel.model.scaleColor.domain().length); - var tag = isEmptySize ? 'line' : 'area'; - var groupPref = '' + _const.CSS_PREFIX + tag + ' ' + tag + ' i-role-path ' + widthCss + ' ' + countCss + ' ' + guide.cssClass + ' '; - - var pathAttributes = isEmptySize ? { - stroke: function stroke(fiber) { - return baseModel.color(fiber[0]); - }, - class: 'i-role-datum' - } : { - fill: function fill(fiber) { - return baseModel.color(fiber[0]); - } - }; - - var d3LineBuilder = (0, _interpolatorsRegistry.getInterpolatorSplineType)(guide.interpolate) === 'cubic' ? isEmptySize ? _line.getCurve : _brushLine.getBrushCurve : isEmptySize ? _line.getPolyline : _brushLine.getBrushLine; - - var baseModel = _elementPath.BasePath.baseModel(screenModel); - - var toPoint = isEmptySize ? function (d) { - return { - id: screenModel.id(d), - x: baseModel.x(d), - y: baseModel.y(d) - }; - } : function (d) { - return { - id: screenModel.id(d), - x: baseModel.x(d), - y: baseModel.y(d), - size: baseModel.size(d) - }; - }; - - baseModel.groupAttributes = { - class: function _class(fiber) { - return groupPref + ' ' + baseModel.class(fiber[0]) + ' frame'; - } - }; - - baseModel.pathElement = 'path'; - baseModel.pathAttributesEnterInit = pathAttributes; - baseModel.pathAttributesUpdateDone = pathAttributes; - baseModel.pathTween = { - attr: 'd', - fn: (0, _d3Decorators.d3_createPathTween)('d', d3LineBuilder, [toPoint], screenModel.id, guide.interpolate) - }; - - return baseModel; - } - }; - - exports.Line = Line; - -/***/ }, -/* 57 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getBrushLine = getBrushLine; - exports.getBrushCurve = getBrushCurve; - - var _bezier = __webpack_require__(12); - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - /** - * Returns line with variable width. - * @param points Linear points. - */ - function getBrushLine(points) { - if (points.length === 0) { - return ''; - } - if (points.length === 1) { - return getCirclePath(points[0]); - } - var segments = []; - for (var i = 1; i < points.length; i++) { - segments.push(getStraightSegmentPath(points[i - 1], points[i])); - } - return segments.join(' '); - } - - /** - * Returns curve with variable width. - * @param points Cubic spline points. - */ - function getBrushCurve(points) { - if (points.length === 0) { - return ''; - } - if (points.length === 1) { - return getCirclePath(points[0]); - } - var segments = []; - for (var i = 3; i < points.length; i += 3) { - segments.push(getCurveSegmentPath(points[i - 3], points[i - 2], points[i - 1], points[i])); - } - return segments.join(' '); - } - - function getCirclePath(pt) { - var r = pt.size / 2; - return ['M' + pt.x + ',' + (pt.y - r), 'A' + r + ',' + r + ' 0 0 1', pt.x + ',' + (pt.y + r), 'A' + r + ',' + r + ' 0 0 1', pt.x + ',' + (pt.y - r), 'Z'].join(' '); - } - - function getStraightSegmentPath(a, b) { - var tan = getCirclesTangents(a, b); - if (!tan) { - return getCirclePath(a.size > b.size ? a : b); - } - return ['M' + tan.left[0].x + ',' + tan.left[0].y, 'L' + tan.left[1].x + ',' + tan.left[1].y, 'A' + b.size / 2 + ',' + b.size / 2 + ' 0 ' + Number(a.size < b.size) + ' 1', tan.right[1].x + ',' + tan.right[1].y, 'L' + tan.right[0].x + ',' + tan.right[0].y, 'A' + a.size / 2 + ',' + a.size / 2 + ' 0 ' + Number(a.size > b.size) + ' 1', tan.left[0].x + ',' + tan.left[0].y, 'Z'].join(' '); - } - - function getCurveSegmentPath(a, ca, cb, b) { - var ctan = getCirclesCurveTangents(a, ca, cb, b); - if (!ctan) { - return getStraightSegmentPath(a, b); - } - var qa = rotation(angle(a, ctan.right[0]), angle(a, ctan.left[0])); - var qb = rotation(angle(b, ctan.right[1]), angle(b, ctan.left[1])); - return ['M' + ctan.left[0].x + ',' + ctan.left[0].y, 'C' + ctan.left[1].x + ',' + ctan.left[1].y, ctan.left[2].x + ',' + ctan.left[2].y, ctan.left[3].x + ',' + ctan.left[3].y, 'A' + b.size / 2 + ',' + b.size / 2 + ' 0 ' + Number(qa > Math.PI) + ' 1', ctan.right[3].x + ',' + ctan.right[3].y, 'C' + ctan.right[2].x + ',' + ctan.right[2].y, ctan.right[1].x + ',' + ctan.right[1].y, ctan.right[0].x + ',' + ctan.right[0].y, 'A' + a.size / 2 + ',' + a.size / 2 + ' 0 ' + Number(qb > Math.PI) + ' 1', ctan.left[0].x + ',' + ctan.left[0].y, 'Z'].join(' '); - } - - function angle(a, b) { - return Math.atan2(b.y - a.y, b.x - a.x); - } - - function rotation(a, b) { - if (b < a) { - b += 2 * Math.PI; - } - return b - a; - } - - function dist() { - var total = 0; - - for (var _len = arguments.length, p = Array(_len), _key = 0; _key < _len; _key++) { - p[_key] = arguments[_key]; - } - - for (var i = 1; i < p.length; i++) { - total += Math.sqrt((p[i].x - p[i - 1].x) * (p[i].x - p[i - 1].x) + (p[i].y - p[i - 1].y) * (p[i].y - p[i - 1].y)); - } - return total; - } - - function polar(start, d, a) { - return { - x: start.x + d * Math.cos(a), - y: start.y + d * Math.sin(a) - }; - } - - function splitCurveSegment(t, p0, c0, c1, p1) { - var seg = (0, _bezier.splitCubicSegment)(t, p0, c0, c1, p1); - var tl = 1 / (1 + dist(seg[3], seg[4], seg[5], seg[6], seg[3]) / dist(seg[0], seg[1], seg[2], seg[3], seg[0])); - seg[3].size = p0.size * (1 - tl) + p1.size * tl; - - return seg; - } - - function approximateQuadCurve(p0, p1, p2) { - var m = (0, _bezier.getBezierPoint)(dist(p0, p1) / dist(p0, p1, p2), p0, p2); - var c = (0, _bezier.getBezierPoint)(2, m, p1); - return [p0, c, p2]; - } - - function getCirclesTangents(a, b) { - var d = dist(a, b); - if (d === 0 || d + a.size / 2 <= b.size / 2 || d + b.size / 2 <= a.size / 2) { - return null; - } - - var ma = angle(a, b); - var ta = Math.asin((a.size - b.size) / d / 2); - var aleft = ma - Math.PI / 2 + ta; - var aright = ma + Math.PI / 2 - ta; - - return { - left: [polar(a, a.size / 2, aleft), polar(b, b.size / 2, aleft)], - right: [polar(a, a.size / 2, aright), polar(b, b.size / 2, aright)] - }; - } - - function getCirclesCurveTangents(a, ca, cb, b) { - var d = dist(a, b); - if (d === 0 || d + a.size / 2 <= b.size / 2 || d + b.size / 2 <= a.size / 2) { - return null; - } - - // Get approximate endings tangents - // TODO: Use formulas instead of approximate equations. - var kt = 1 / 12; - var getTangentsVectors = function getTangentsVectors(isEnd) { - var curve = isEnd ? [b, cb, ca, a] : [a, ca, cb, b]; - var seg1 = splitCurveSegment.apply(undefined, [2 * kt].concat(curve)); - var seg2 = splitCurveSegment.apply(undefined, [0.5].concat(_toConsumableArray(seg1.slice(0, 4)))); - - var m = seg2[3]; - var n = seg2[6]; - var mtan = getCirclesTangents(curve[0], m); - var ntan = getCirclesTangents(m, n); - - var lpoints = [mtan.left[0], (0, _bezier.getBezierPoint)(0.5, mtan.left[1], ntan.left[0]), ntan.left[1]]; - var rpoints = [mtan.right[0], (0, _bezier.getBezierPoint)(0.5, mtan.right[1], ntan.right[0]), ntan.right[1]]; - - var lq = approximateQuadCurve.apply(undefined, lpoints)[1]; - var rq = approximateQuadCurve.apply(undefined, rpoints)[1]; - var lc = (0, _bezier.getBezierPoint)(1 / 3 / kt, mtan.left[0], lq); - var rc = (0, _bezier.getBezierPoint)(1 / 3 / kt, mtan.right[0], rq); - - return { - left: isEnd ? [rc, rpoints[0]] : [lpoints[0], lc], - right: isEnd ? [lc, lpoints[0]] : [rpoints[0], rc] - }; - }; - - var tstart = getTangentsVectors(false); - var tend = getTangentsVectors(true); - - return { - left: [].concat(_toConsumableArray(tstart.left), _toConsumableArray(tend.left)), - right: [].concat(_toConsumableArray(tstart.right), _toConsumableArray(tend.right)) - }; - } - -/***/ }, -/* 58 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.getPolyline = getPolyline; - exports.getCurve = getCurve; - function getPolyline(p) { - if (p.length < 2) { - return ''; - } - var result = ''; - for (var i = 0; i < p.length; i++) { - result += '' + (i === 0 ? 'M' : ' L') + p[i].x + ',' + p[i].y; - } - return result; - } - - function getCurve(p) { - if (p.length < 4) { - return ''; - } - var result = 'M' + p[0].x + ',' + p[0].y; - for (var i = 3; i < p.length; i += 3) { - result += ' C' + p[i - 2].x + ',' + p[i - 2].y + ' ' + p[i - 1].x + ',' + p[i - 1].y + ' ' + p[i].x + ',' + p[i].y; - } - return result; - } - -/***/ }, -/* 59 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Interval = undefined; - - var _const = __webpack_require__(22); - - var _grammarRegistry = __webpack_require__(7); - - var _layerLabels = __webpack_require__(46); - - var _d3Decorators = __webpack_require__(9); - - var _utils = __webpack_require__(3); - - var _utilsDom = __webpack_require__(1); - - var _utilsDraw = __webpack_require__(10); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - var d3Data = function d3Data(node) { - return _d2.default.select(node).data()[0]; - }; - - var Interval = { - init: function init(xConfig) { - - var config = Object.assign({}, xConfig); - - config.guide = config.guide || {}; - config.guide = _utils.utils.defaults(config.guide, { - animationSpeed: 0, - avoidScalesOverflow: true, - maxHighlightDistance: 32, - prettify: true, - sortByBarHeight: true, - enableColorToBarPosition: config.guide.enableColorToBarPosition != null ? config.guide.enableColorToBarPosition : !config.stack - }); - - config.guide.size = _utils.utils.defaults(config.guide.size || {}, { - enableDistributeEvenly: true - }); - - config.guide.label = _utils.utils.defaults(config.guide.label || {}, { - position: config.flip ? config.stack ? ['r-', 'l+', 'hide-by-label-height-horizontal', 'cut-label-horizontal'] : ['outside-then-inside-horizontal', 'auto:hide-on-label-label-overlap'] : config.stack ? ['rotate-on-size-overflow', 't-', 'b+', 'hide-by-label-height-vertical', 'cut-label-vertical', 'auto:hide-on-label-label-overlap'] : ['rotate-on-size-overflow', 'outside-then-inside-vertical', 'auto:hide-on-label-label-overlap'] - }); - - var avoidScalesOverflow = config.guide.avoidScalesOverflow; - var enableColorPositioning = config.guide.enableColorToBarPosition; - var enableDistributeEvenly = config.guide.size.enableDistributeEvenly; - - config.transformRules = [config.flip && _grammarRegistry.GrammarRegistry.get('flip'), config.stack && _grammarRegistry.GrammarRegistry.get('stack'), enableColorPositioning && _grammarRegistry.GrammarRegistry.get('positioningByColor')].filter(function (x) { - return x; - }); - - config.adjustRules = [enableDistributeEvenly && function (prevModel, args) { - var sizeCfg = _utils.utils.defaults(config.guide.size || {}, { - defMinSize: config.guide.prettify ? 3 : 0, - defMaxSize: config.guide.prettify ? 40 : Number.MAX_VALUE - }); - var params = Object.assign({}, args, { - defMin: sizeCfg.defMinSize, - defMax: sizeCfg.defMaxSize, - minLimit: sizeCfg.minSize, - maxLimit: sizeCfg.maxSize - }); - - return _grammarRegistry.GrammarRegistry.get('size_distribute_evenly')(prevModel, params); - }, avoidScalesOverflow && enableDistributeEvenly && function (prevModel, args) { - var params = Object.assign({}, args, { - sizeDirection: 'x' - }); - return _grammarRegistry.GrammarRegistry.get('avoidScalesOverflow')(prevModel, params); - }, config.stack && _grammarRegistry.GrammarRegistry.get('adjustYScale')].filter(function (x) { - return x; - }); - - return config; - }, - addInteraction: function addInteraction() { - var _this = this; - - var node = this.node(); - var createFilter = function createFilter(data, falsy) { - return function (row) { - return row === data ? true : falsy; - }; - }; - node.on('highlight', function (sender, filter) { - return _this.highlight(filter); - }); - node.on('data-hover', function (sender, e) { - return _this.highlight(createFilter(e.data, null)); - }); - }, - draw: function draw() { - var _createUpdateFunc, _createUpdateFunc2; - - var node = this.node(); - var config = node.config; - var options = config.options; - // TODO: hide it somewhere - options.container = options.slot(config.uid); - - var prettify = config.guide.prettify; - var baseCssClass = 'i-role-element i-role-datum bar ' + _const.CSS_PREFIX + 'bar'; - var screenModel = node.screenModel; - var d3Attrs = this.buildModel(screenModel, { prettify: prettify, minBarH: 1, minBarW: 1, baseCssClass: baseCssClass }); - var createUpdateFunc = _d3Decorators.d3_animationInterceptor; - - var barX = config.flip ? 'y' : 'x'; - var barY = config.flip ? 'x' : 'y'; - var barH = config.flip ? 'width' : 'height'; - var barW = config.flip ? 'height' : 'width'; - - var fibers = screenModel.toFibers(); - var data = fibers.reduce(function (arr, f) { - return arr.concat(f); - }, []); - - var barClass = d3Attrs.class; - var updateAttrs = _utils.utils.omit(d3Attrs, 'class'); - var bars = options.container.selectAll('.bar').data(data, screenModel.id); - bars.exit().classed('tau-removing', true).call(createUpdateFunc(config.guide.animationSpeed, null, (_createUpdateFunc = {}, _defineProperty(_createUpdateFunc, barX, function () { - var d3This = _d2.default.select(this); - var x = d3This.attr(barX) - 0; - var w = d3This.attr(barW) - 0; - return x + w / 2; - }), _defineProperty(_createUpdateFunc, barY, function () { - return this.getAttribute('data-zero'); - }), _defineProperty(_createUpdateFunc, barW, 0), _defineProperty(_createUpdateFunc, barH, 0), _createUpdateFunc), - // ((node) => d3.select(node).remove()) - function (node) { - // NOTE: Sometimes nodes are removed after - // they re-appear by filter. - var el = _d2.default.select(node); - if (el.classed('tau-removing')) { - el.remove(); - } - })); - bars.call(createUpdateFunc(config.guide.animationSpeed, null, updateAttrs)).attr('class', barClass).attr('data-zero', screenModel[barY + '0']); - bars.enter().append('rect').call(createUpdateFunc(config.guide.animationSpeed, (_createUpdateFunc2 = {}, _defineProperty(_createUpdateFunc2, barY, screenModel[barY + '0']), _defineProperty(_createUpdateFunc2, barH, 0), _createUpdateFunc2), updateAttrs)).attr('class', barClass).attr('data-zero', screenModel[barY + '0']); - - node.subscribe(new _layerLabels.LayerLabels(screenModel.model, screenModel.model.flip, config.guide.label, options).draw(fibers)); - - var sortByWidthThenY = function sortByWidthThenY(a, b) { - var dataA = d3Data(a); - var dataB = d3Data(b); - var widthA = d3Attrs.width(dataA); - var widthB = d3Attrs.width(dataB); - if (widthA === widthB) { - var yA = d3Attrs.y(dataA); - var yB = d3Attrs.y(dataB); - if (yA === yB) { - return sortByOrder(a, b); - } - return yA - yB; - } - return widthB - widthA; - }; - var sortByHeightThenX = function sortByHeightThenX(a, b) { - var dataA = d3Data(a); - var dataB = d3Data(b); - var heightA = d3Attrs.height(dataA); - var heightB = d3Attrs.height(dataB); - if (heightA === heightB) { - var xA = d3Attrs.x(dataA); - var xB = d3Attrs.x(dataB); - if (xA === xB) { - return sortByOrder(a, b); - } - return xA - xB; - } - return heightB - heightA; - }; - var sortByOrder = function () { - var order = data.reduce(function (map, d, i) { - map.set(d, i + 1); - return map; - }, new Map()); - return function (a, b) { - var orderA = order.get(d3Data(a)) || -1; - var orderB = order.get(d3Data(b)) || -1; - return orderA - orderB; - }; - }(); - - this._barsSorter = config.guide.sortByBarHeight ? config.flip ? sortByWidthThenY : sortByHeightThenX : sortByOrder; - - var elementsOrder = { - rect: 0, - text: 1 - }; - this._typeSorter = function (a, b) { - return elementsOrder[a.tagName] - elementsOrder[b.tagName]; - }; - - this._sortElements(this._typeSorter, this._barsSorter); - - node.subscribe(bars); - - this._boundsInfo = this._getBoundsInfo(bars[0]); - }, - buildModel: function buildModel(screenModel, _ref) { - var prettify = _ref.prettify, - minBarH = _ref.minBarH, - minBarW = _ref.minBarW, - baseCssClass = _ref.baseCssClass; - - - var barSize = function barSize(d) { - var w = screenModel.size(d); - if (prettify) { - w = Math.max(minBarW, w); - } - return w; - }; - - var model; - var value = function value(d) { - return d[screenModel.model.scaleY.dim]; - }; - if (screenModel.flip) { - var barHeight = function barHeight(d) { - return Math.abs(screenModel.x(d) - screenModel.x0(d)); - }; - model = { - y: function y(d) { - return screenModel.y(d) - barSize(d) * 0.5; - }, - x: function x(d) { - var x = Math.min(screenModel.x0(d), screenModel.x(d)); - if (prettify) { - // decorate for better visual look & feel - var h = barHeight(d); - var dx = value(d); - var offset = 0; - - if (dx === 0) { - offset = 0; - } - if (dx > 0) { - offset = h; - } - if (dx < 0) { - offset = 0 - minBarH; - } - - var isTooSmall = h < minBarH; - return isTooSmall ? x + offset : x; - } else { - return x; - } - }, - height: function height(d) { - return barSize(d); - }, - width: function width(d) { - var h = barHeight(d); - if (prettify) { - // decorate for better visual look & feel - return value(d) === 0 ? h : Math.max(minBarH, h); - } - return h; - } - }; - } else { - var _barHeight = function _barHeight(d) { - return Math.abs(screenModel.y(d) - screenModel.y0(d)); - }; - model = { - x: function x(d) { - return screenModel.x(d) - barSize(d) * 0.5; - }, - y: function y(d) { - var y = Math.min(screenModel.y0(d), screenModel.y(d)); - if (prettify) { - // decorate for better visual look & feel - var h = _barHeight(d); - var isTooSmall = h < minBarH; - y = isTooSmall && value(d) > 0 ? y - minBarH : y; - } - return y; - }, - width: function width(d) { - return barSize(d); - }, - height: function height(d) { - var h = _barHeight(d); - if (prettify) { - // decorate for better visual look & feel - h = value(d) === 0 ? h : Math.max(minBarH, h); - } - return h; - } - }; - } - return Object.assign(model, { - class: function _class(d) { - return baseCssClass + ' ' + screenModel.class(d); - }, - fill: function fill(d) { - return screenModel.color(d); - } - }); - }, - _sortElements: function _sortElements() { - var container = this.node().config.options.container.node(); - _utilsDom.utilsDom.sortChildren(container, _utils.utils.createMultiSorter.apply(_utils.utils, arguments)); - }, - _getBoundsInfo: function _getBoundsInfo(bars) { - if (bars.length === 0) { - return null; - } - - var screenModel = this.node().screenModel; - var flip = this.node().config.flip; - - - var items = bars.map(function (node) { - var data = _d2.default.select(node).data()[0]; - var x = screenModel.x(data); - var x0 = screenModel.x0(data); - var y = screenModel.y(data); - var y0 = screenModel.y0(data); - var w = Math.abs(x - x0); - var h = Math.abs(y - y0); - var cx = (x + x0) / 2; - var cy = (y + y0) / 2; - var invert = y > y0; - - var box = { - top: cy - h / 2, - right: cx + w / 2, - bottom: cy + h / 2, - left: cx - w / 2 - }; - - return { node: node, data: data, cx: cx, cy: cy, box: box, invert: invert }; - }); - - var bounds = items.reduce(function (bounds, _ref2) { - var box = _ref2.box; - - bounds.left = Math.min(box.left, bounds.left); - bounds.right = Math.max(box.right, bounds.right); - bounds.top = Math.min(box.top, bounds.top); - bounds.bottom = Math.max(box.bottom, bounds.bottom); - return bounds; - }, { - left: Number.MAX_VALUE, - right: Number.MIN_VALUE, - top: Number.MAX_VALUE, - bottom: Number.MIN_VALUE - }); - - var ticks = _utils.utils.unique(items.map(flip ? function (item) { - return item.cy; - } : function (item) { - return item.cx; - })).sort(function (a, b) { - return a - b; - }); - var groups = ticks.reduce(function (obj, value) { - return obj[value] = [], obj; - }, {}); - items.forEach(function (item) { - var tick = ticks.find(flip ? function (value) { - return item.cy === value; - } : function (value) { - return item.cx === value; - }); - groups[tick].push(item); - }); - var split = function split(values) { - if (values.length === 1) { - return groups[values]; - } - var midIndex = Math.ceil(values.length / 2); - var middle = (values[midIndex - 1] + values[midIndex]) / 2; - return { - middle: middle, - lower: split(values.slice(0, midIndex)), - greater: split(values.slice(midIndex)) - }; - }; - var tree = split(ticks); - - return { bounds: bounds, tree: tree }; - }, - getClosestElement: function getClosestElement(_cursorX, _cursorY) { - if (!this._boundsInfo) { - return null; - } - var _boundsInfo = this._boundsInfo, - bounds = _boundsInfo.bounds, - tree = _boundsInfo.tree; - - var container = this.node().config.options.container; - var flip = this.node().config.flip; - - var translate = _utilsDraw.utilsDraw.getDeepTransformTranslate(container.node()); - var cursorX = _cursorX - translate.x; - var cursorY = _cursorY - translate.y; - var maxHighlightDistance = this.node().config.guide.maxHighlightDistance; - - if (cursorX < bounds.left - maxHighlightDistance || cursorX > bounds.right + maxHighlightDistance || cursorY < bounds.top - maxHighlightDistance || cursorY > bounds.bottom + maxHighlightDistance) { - return null; - } - - var measureCursor = flip ? cursorY : cursorX; - var valueCursor = flip ? cursorX : cursorY; - var isBetween = function isBetween(value, start, end) { - return value >= start && value <= end; - }; - var closestElements = function getClosestElements(el) { - if (Array.isArray(el)) { - return el; - } - return getClosestElements(measureCursor > el.middle ? el.greater : el.lower); - }(tree).map(function (el) { - var elStart = flip ? el.box.left : el.box.top; - var elEnd = flip ? el.box.right : el.box.bottom; - var cursorInside = isBetween(valueCursor, elStart, elEnd); - if (!cursorInside && Math.abs(valueCursor - elStart) > maxHighlightDistance && Math.abs(valueCursor - elEnd) > maxHighlightDistance) { - return null; - } - var distToValue = Math.abs(valueCursor - (el.invert !== flip ? elEnd : elStart)); - return Object.assign(el, { distToValue: distToValue, cursorInside: cursorInside }); - }).filter(function (el) { - return el; - }).sort(function (a, b) { - if (a.cursorInside !== b.cursorInside) { - return b.cursorInside - a.cursorInside; - } - return Math.abs(a.distToValue) - Math.abs(b.distToValue); - }).map(function (el) { - var x = el.cx; - var y = el.cy; - var distance = Math.abs(flip ? cursorY - y : cursorX - x); - var secondaryDistance = Math.abs(flip ? cursorX - x : cursorY - y); - return { node: el.node, data: el.data, distance: distance, secondaryDistance: secondaryDistance, x: x, y: y }; - }); - - return closestElements[0] || null; - }, - highlight: function highlight(filter) { - var _classed; - - var x = 'graphical-report__highlighted'; - var _ = 'graphical-report__dimmed'; - - var container = this.node().config.options.container; - var classed = (_classed = {}, _defineProperty(_classed, x, function (d) { - return filter(d) === true; - }), _defineProperty(_classed, _, function (d) { - return filter(d) === false; - }), _classed); - - container.selectAll('.bar').classed(classed); - - container.selectAll('.i-role-label').classed(classed); - - this._sortElements(function (a, b) { - return filter(d3Data(a)) - filter(d3Data(b)); - }, this._typeSorter, this._barsSorter); - } - }; - - exports.Interval = Interval; - -/***/ }, -/* 60 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ParallelLine = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _const = __webpack_require__(22); - - var _element = __webpack_require__(5); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var ParallelLine = exports.ParallelLine = function (_Element) { - _inherits(ParallelLine, _Element); - - function ParallelLine(config) { - _classCallCheck(this, ParallelLine); - - var _this = _possibleConstructorReturn(this, (ParallelLine.__proto__ || Object.getPrototypeOf(ParallelLine)).call(this, config)); - - _this.config = config; - _this.config.guide = _utils.utils.defaults(_this.config.guide || {}, { - // params here - }); - - _this.on('highlight', function (sender, e) { - return _this.highlight(e); - }); - return _this; - } - - _createClass(ParallelLine, [{ - key: 'defineGrammarModel', - value: function defineGrammarModel(fnCreateScale) { - - var config = this.config; - var options = config.options; - - this.color = fnCreateScale('color', config.color, {}); - this.scalesMap = config.columns.reduce(function (memo, xi) { - memo[xi] = fnCreateScale('pos', xi, [options.height, 0]); - return memo; - }, {}); - - var step = options.width / (config.columns.length - 1); - var colsMap = config.columns.reduce(function (memo, p, i) { - memo[p] = i * step; - return memo; - }, {}); - - this.xBase = function (p) { - return colsMap[p]; - }; - - this.regScale('columns', this.scalesMap).regScale('color', this.color); - - return {}; - } - }, { - key: 'drawFrames', - value: function drawFrames(frames) { - - var node = this.config; - var options = this.config.options; - - var scalesMap = this.scalesMap; - var xBase = this.xBase; - var color = this.color; - - var d3Line = _d2.default.svg.line(); - - var drawPath = function drawPath() { - this.attr({ - d: function d(row) { - return d3Line(node.columns.map(function (p) { - return [xBase(p), scalesMap[p](row[scalesMap[p].dim])]; - })); - } - }); - }; - - var markPath = function markPath() { - this.attr({ - stroke: function stroke(row) { - return color.toColor(color(row[color.dim])); - }, - class: function _class(row) { - return _const.CSS_PREFIX + '__line line ' + color.toClass(color(row[color.dim])) + ' foreground'; - } - }); - }; - - var updateFrame = function updateFrame() { - var backgroundPath = this.selectAll('.background').data(function (f) { - return f.part(); - }); - backgroundPath.exit().remove(); - backgroundPath.call(drawPath); - backgroundPath.enter().append('path').attr('class', 'background line').call(drawPath); - - var foregroundPath = this.selectAll('.foreground').data(function (f) { - return f.part(); - }); - foregroundPath.exit().remove(); - foregroundPath.call(function () { - drawPath.call(this); - markPath.call(this); - }); - foregroundPath.enter().append('path').call(function () { - drawPath.call(this); - markPath.call(this); - }); - }; - - var part = options.container.selectAll('.lines-frame').data(frames, function (f) { - return f.hash(); - }); - part.exit().remove(); - part.call(updateFrame); - part.enter().append('g').attr('class', 'lines-frame').call(updateFrame); - - this.subscribe(options.container.selectAll('.lines-frame .foreground')); - } - }, { - key: 'highlight', - value: function highlight(filter) { - this.config.options.container.selectAll('.lines-frame .foreground').style('visibility', function (d) { - return filter(d) ? '' : 'hidden'; - }); - } - }]); - - return ParallelLine; - }(_element.Element); - -/***/ }, -/* 61 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.IdentityScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var IdentityScale = exports.IdentityScale = function (_BaseScale) { - _inherits(IdentityScale, _BaseScale); - - function IdentityScale(xSource, scaleConfig) { - _classCallCheck(this, IdentityScale); - - var _this = _possibleConstructorReturn(this, (IdentityScale.__proto__ || Object.getPrototypeOf(IdentityScale)).call(this, xSource, scaleConfig)); - - _this._references = scaleConfig.references; - _this._refCounter = scaleConfig.refCounter; - _this.addField('scaleType', 'identity'); - return _this; - } - - _createClass(IdentityScale, [{ - key: 'create', - value: function create() { - var refs = this._references; - var next = this._refCounter; - return this.toBaseScale(function (x, row) { - if (x == null) { - var i = refs.get(row); - if (i == null) { - i = next(); - refs.set(row, i); - } - } else { - i = x; - } - return i; - }); - } - }]); - - return IdentityScale; - }(_base.BaseScale); - -/***/ }, -/* 62 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.BaseScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _utils = __webpack_require__(3); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var map_value = function map_value(dimType) { - return dimType === 'date' ? function (v) { - return new Date(v).getTime(); - } : function (v) { - return v; - }; - }; - - var generateHashFunction = function generateHashFunction(varSet, interval) { - return _utils.utils.generateHash([varSet, interval].map(JSON.stringify).join('')); - }; - - var BaseScale = exports.BaseScale = function () { - function BaseScale(dataFrame, scaleConfig) { - var _this = this; - - _classCallCheck(this, BaseScale); - - this._fields = {}; - - var data; - if (Array.isArray(scaleConfig.fitToFrameByDims) && scaleConfig.fitToFrameByDims.length) { - - var leaveDimsInWhereArgsOrEx = function leaveDimsInWhereArgsOrEx(f) { - var r = {}; - if (f.type === 'where' && f.args) { - r.type = f.type; - r.args = scaleConfig.fitToFrameByDims.reduce(function (memo, d) { - if (f.args.hasOwnProperty(d)) { - memo[d] = f.args[d]; - } - return memo; - }, {}); - } else { - r = f; - } - - return r; - }; - - data = dataFrame.part(leaveDimsInWhereArgsOrEx); - } else { - data = dataFrame.full(); - } - - var vars = this.getVarSet(data, scaleConfig); - - if (scaleConfig.order) { - vars = _utils.utils.union(_utils.utils.intersection(scaleConfig.order, vars), vars); - } - - this.vars = vars; - var originalSeries = vars.map(function (row) { - return row; - }); - this.scaleConfig = scaleConfig; - - // keep for backward compatibility with "autoScale" - this.scaleConfig.nice = this.scaleConfig.hasOwnProperty('nice') ? this.scaleConfig.nice : this.scaleConfig.autoScale; - - this.addField('dim', this.scaleConfig.dim).addField('scaleDim', this.scaleConfig.dim).addField('scaleType', this.scaleConfig.type).addField('source', this.scaleConfig.source).addField('domain', function () { - return _this.vars; - }).addField('isInteger', originalSeries.every(Number.isInteger)).addField('originalSeries', function () { - return originalSeries; - }).addField('isContains', function (x) { - return _this.isInDomain(x); - }).addField('isEmptyScale', function (x) { - return _this.isEmpty(x); - }).addField('fixup', function (fn) { - var cfg = _this.scaleConfig; - cfg.__fixup__ = cfg.__fixup__ || {}; - cfg.__fixup__ = Object.assign(cfg.__fixup__, fn(Object.assign({}, cfg, cfg.__fixup__))); - }).addField('commit', function () { - _this.scaleConfig = Object.assign(_this.scaleConfig, _this.scaleConfig.__fixup__); - delete _this.scaleConfig.__fixup__; - }); - } - - _createClass(BaseScale, [{ - key: 'isInDomain', - value: function isInDomain(val) { - return this.domain().indexOf(val) >= 0; - } - }, { - key: 'addField', - value: function addField(key, val) { - this._fields[key] = val; - this[key] = val; - return this; - } - }, { - key: 'getField', - value: function getField(key) { - return this._fields[key]; - } - }, { - key: 'isEmpty', - value: function isEmpty() { - return !Boolean(this._fields.dim); - } - }, { - key: 'toBaseScale', - value: function toBaseScale(func) { - var _this2 = this; - - var dynamicProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - - var scaleFn = Object.keys(this._fields).reduce(function (memo, k) { - memo[k] = _this2._fields[k]; - return memo; - }, func); - - scaleFn.getHash = function () { - return generateHashFunction(_this2.vars, dynamicProps); - }; - scaleFn.value = scaleFn; - - return scaleFn; - } - }, { - key: 'getVarSet', - value: function getVarSet(arr, scale) { - - var series = scale.hasOwnProperty('series') ? scale.series : arr.map(function (row) { - return row[scale.dim]; - }); - - return _utils.utils.unique(series, map_value(scale.dimType)); - } - }]); - - return BaseScale; - }(); - -/***/ }, -/* 63 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ColorScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - /* jshint ignore:start */ - - - /* jshint ignore:end */ - - var ColorScale = exports.ColorScale = function (_BaseScale) { - _inherits(ColorScale, _BaseScale); - - function ColorScale(xSource, scaleConfig) { - _classCallCheck(this, ColorScale); - - var _this = _possibleConstructorReturn(this, (ColorScale.__proto__ || Object.getPrototypeOf(ColorScale)).call(this, xSource, scaleConfig)); - - var discrete = scaleConfig.dimType !== 'measure'; - - var scaleBrewer = _this.scaleConfig.brewer || (discrete ? _utils.utils.range(20).map(function (i) { - return 'color20-' + (1 + i); - }) : ['#eee', '#000']); - - var props = _this.scaleConfig; - - if (!discrete) { - var vars = _d2.default.extent(_this.vars); - - var isNum = function isNum(num) { - return Number.isFinite(num) || _utils.utils.isDate(num); - }; - var min = isNum(props.min) ? props.min : vars[0]; - var max = isNum(props.max) ? props.max : vars[1]; - - var mins = [min, vars[0]].filter(isNum); - var maxs = [max, vars[1]].filter(isNum); - vars = [mins.sort(function (a, b) { - return a - b; - })[0], maxs.sort(function (a, b) { - return b - a; - })[0]]; - - if (props.nice) { - - if (vars[0] < 0 && vars[1] > 0) { - // symmetry - var maxPart = Math.max.apply(Math, _toConsumableArray(vars.map(Math.abs))); - vars = [-maxPart, maxPart]; - } - } - - _this.vars = vars; - } - - _this.addField('scaleType', 'color').addField('discrete', discrete).addField('brewer', scaleBrewer).addField('toColor', _utils.utils.extRGBColor).addField('toClass', _utils.utils.extCSSClass); - return _this; - } - - _createClass(ColorScale, [{ - key: 'create', - value: function create() { - - var discrete = this.discrete; - - var varSet = this.vars; - var brewer = this.getField('brewer'); - - var func = discrete ? this.createDiscreteScale(varSet, brewer) : this.createContinuesScale(varSet, brewer); - - return this.toBaseScale(func); - } - }, { - key: 'createDiscreteScale', - value: function createDiscreteScale(varSet, brewer) { - - var defaultColorClass = function defaultColorClass() { - return 'color-default'; - }; - - var buildArrayGetClass = function buildArrayGetClass(domain, brewer) { - var fullDomain = domain.map(function (x) { - return String(x).toString(); - }); - return _d2.default.scale.ordinal().range(brewer).domain(fullDomain); - }; - - var buildObjectGetClass = function buildObjectGetClass(brewer, defaultGetClass) { - var domain = Object.keys(brewer); - var range = domain.map(function (x) { - return brewer[x]; - }); - var calculateClass = _d2.default.scale.ordinal().range(range).domain(domain); - return function (d) { - return brewer.hasOwnProperty(d) ? calculateClass(d) : defaultGetClass(d); - }; - }; - - var wrapString = function wrapString(f) { - return function (d) { - return f(String(d).toString()); - }; - }; - - var func; - - if (Array.isArray(brewer)) { - - func = wrapString(buildArrayGetClass(varSet, brewer)); - } else if (typeof brewer === 'function') { - - func = function func(d) { - return brewer(d, wrapString(buildArrayGetClass(varSet, _utils.utils.range(20).map(function (i) { - return 'color20-' + (1 + i); - })))); - }; - } else if (_utils.utils.isObject(brewer)) { - - func = buildObjectGetClass(brewer, defaultColorClass); - } else { - - throw new Error('This brewer is not supported'); - } - - return func; - } - }, { - key: 'createContinuesScale', - value: function createContinuesScale(varSet, brewer) { - - var func; - - if (Array.isArray(brewer)) { - - func = _d2.default.scale.linear().domain(_utils.utils.splitEvenly(varSet.map(function (x) { - return x - 0; - }), brewer.length)).range(brewer); - } else { - - throw new Error('This brewer is not supported'); - } - - return func; - } - }]); - - return ColorScale; - }(_base.BaseScale); - -/***/ }, -/* 64 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.SizeScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var funcTypes = { - sqrt: function sqrt(x) { - return Math.sqrt(x); - }, - linear: function linear(x) { - return x; - } - }; - - var SizeScale = exports.SizeScale = function (_BaseScale) { - _inherits(SizeScale, _BaseScale); - - function SizeScale(xSource, scaleConfig) { - _classCallCheck(this, SizeScale); - - var _this = _possibleConstructorReturn(this, (SizeScale.__proto__ || Object.getPrototypeOf(SizeScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var vars = _d2.default.extent(_this.vars); - - var min = Number.isFinite(props.min) ? props.min : vars[0]; - var max = Number.isFinite(props.max) ? props.max : vars[1]; - - _this.vars = [Math.min.apply(Math, _toConsumableArray([min, vars[0]].filter(Number.isFinite))), Math.max.apply(Math, _toConsumableArray([max, vars[1]].filter(Number.isFinite)))]; - - _this.addField('scaleType', 'size'); - _this.addField('funcType', scaleConfig.func || 'sqrt'); - return _this; - } - - _createClass(SizeScale, [{ - key: 'isInDomain', - value: function isInDomain(x) { - var domain = this.domain().sort(); - var min = domain[0]; - var max = domain[domain.length - 1]; - return !Number.isNaN(min) && !Number.isNaN(max) && x <= max && x >= min; - } - }, { - key: 'create', - value: function create() { - - var props = this.scaleConfig; - var varSet = this.vars; - - var p = _utils.utils.defaults({}, props, { func: 'sqrt', minSize: 0, maxSize: 1 }); - - var funType = p.func; - var minSize = p.minSize; - var maxSize = p.maxSize; - - var f = funcTypes[funType]; - - var values = varSet.filter(function (x) { - return Number.isFinite(Number(x)); - }); - - var func; - if (values.length === 0) { - func = function func() { - return maxSize; - }; - } else { - var k = 1; - var xMin = 0; - - var min = Math.min.apply(Math, _toConsumableArray(values)); - var max = Math.max.apply(Math, _toConsumableArray(values)); - - var len = f(Math.max(Math.abs(min), Math.abs(max), max - min)); - - xMin = min < 0 ? min : 0; - k = len === 0 ? 1 : (maxSize - minSize) / len; - - func = function func(x) { - - var numX = x !== null ? parseFloat(x) : 0; - - if (!Number.isFinite(numX)) { - return maxSize; - } - - var posX = numX - xMin; // translate to positive x domain - - return minSize + f(posX) * k; - }; - } - - return this.toBaseScale(func); - } - }]); - - return SizeScale; - }(_base.BaseScale); - -/***/ }, -/* 65 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.OrdinalScale = undefined; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var OrdinalScale = exports.OrdinalScale = function (_BaseScale) { - _inherits(OrdinalScale, _BaseScale); - - function OrdinalScale(xSource, scaleConfig) { - _classCallCheck(this, OrdinalScale); - - var _this = _possibleConstructorReturn(this, (OrdinalScale.__proto__ || Object.getPrototypeOf(OrdinalScale)).call(this, xSource, scaleConfig)); - - _this.addField('scaleType', 'ordinal').addField('discrete', true); - return _this; - } - - _createClass(OrdinalScale, [{ - key: 'create', - value: function create(interval) { - - var props = this.scaleConfig; - var varSet = this.vars; - - var d3Domain = _d2.default.scale.ordinal().domain(varSet); - - var d3Scale = d3Domain.rangePoints(interval, 1); - - var size = Math.max.apply(Math, _toConsumableArray(interval)); - - var fnRatio = function fnRatio(key) { - var ratioType = _typeof(props.ratio); - if (ratioType === 'function') { - return props.ratio(key, size, varSet); - } else if (ratioType === 'object') { - return props.ratio[key]; - } else { - // uniform distribution - return 1 / varSet.length; - } - }; - - var scale = function scale(x) { - - var r; - - if (!props.ratio) { - r = d3Scale(x); - } else { - r = size - varSet.slice(varSet.indexOf(x) + 1).reduce(function (acc, v) { - return acc + size * fnRatio(v); - }, size * fnRatio(x) * 0.5); - } - - return r; - }; - - // have to copy properties since d3 produce Function with methods - Object.keys(d3Scale).forEach(function (p) { - return scale[p] = d3Scale[p]; - }); - - scale.stepSize = function (x) { - return fnRatio(x) * size; - }; - - return this.toBaseScale(scale, interval); - } - }]); - - return OrdinalScale; - }(_base.BaseScale); - -/***/ }, -/* 66 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.PeriodScale = undefined; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _unitDomainPeriodGenerator = __webpack_require__(18); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - /* jshint ignore:start */ - - - /* jshint ignore:end */ - - var PeriodScale = exports.PeriodScale = function (_BaseScale) { - _inherits(PeriodScale, _BaseScale); - - function PeriodScale(xSource, scaleConfig) { - _classCallCheck(this, PeriodScale); - - var _this = _possibleConstructorReturn(this, (PeriodScale.__proto__ || Object.getPrototypeOf(PeriodScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var vars = _this.vars; - - var domain = _d2.default.extent(vars); - var min = props.min === null || props.min === undefined ? domain[0] : new Date(props.min).getTime(); - var max = props.max === null || props.max === undefined ? domain[1] : new Date(props.max).getTime(); - - var range = [new Date(Math.min(min, domain[0])), new Date(Math.max(max, domain[1]))]; - - var periodGenerator = _unitDomainPeriodGenerator.UnitDomainPeriodGenerator.get(props.period, { utc: props.utcTime }); - if (props.fitToFrameByDims || periodGenerator === null) { - _this.vars = _utils.utils.unique(vars.map(function (x) { - return new Date(x); - }), function (x) { - return x.getTime(); - }).sort(function (date1, date2) { - return date2 - date1; - }); - } else { - _this.vars = _unitDomainPeriodGenerator.UnitDomainPeriodGenerator.generate(range[0], range[1], props.period, { utc: props.utcTime }); - } - - _this.addField('scaleType', 'period').addField('period', _this.scaleConfig.period).addField('discrete', true); - return _this; - } - - _createClass(PeriodScale, [{ - key: 'isInDomain', - value: function isInDomain(aTime) { - var gen = _unitDomainPeriodGenerator.UnitDomainPeriodGenerator.get(this.scaleConfig.period, { utc: this.scaleConfig.utcTime }); - var val = gen.cast(new Date(aTime)).getTime(); - return this.domain().map(function (x) { - return x.getTime(); - }).indexOf(val) >= 0; - } - }, { - key: 'create', - value: function create(interval) { - - var varSet = this.vars; - var varSetTicks = this.vars.map(function (t) { - return t.getTime(); - }); - var props = this.scaleConfig; - - var d3Domain = _d2.default.scale.ordinal().domain(varSet); - var d3Scale = d3Domain.rangePoints(interval, 1); - - var d3DomainTicks = _d2.default.scale.ordinal().domain(varSetTicks.map(String)); - var d3ScaleTicks = d3DomainTicks.rangePoints(interval, 1); - - var size = Math.max.apply(Math, _toConsumableArray(interval)); - - var fnRatio = function fnRatio(key) { - - var tick = new Date(key).getTime(); - - var ratioType = _typeof(props.ratio); - if (ratioType === 'function') { - return props.ratio(tick, size, varSetTicks); - } else if (ratioType === 'object') { - return props.ratio[tick]; - } else { - // uniform distribution - return 1 / varSet.length; - } - }; - - var scale = function scale(x) { - - var r; - var dx = new Date(x); - var tx = dx.getTime(); - - if (!props.ratio) { - r = d3ScaleTicks(String(tx)); - } else { - r = size - varSetTicks.slice(varSetTicks.indexOf(tx) + 1).reduce(function (acc, v) { - return acc + size * fnRatio(v); - }, size * fnRatio(x) * 0.5); - } - - return r; - }; - - // have to copy properties since d3 produce Function with methods - Object.keys(d3Scale).forEach(function (p) { - return scale[p] = d3Scale[p]; - }); - - scale.stepSize = function (x) { - return fnRatio(x) * size; - }; - - return this.toBaseScale(scale, interval); - } - }]); - - return PeriodScale; - }(_base.BaseScale); - -/***/ }, -/* 67 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.TimeScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - var _utils = __webpack_require__(3); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var TimeScale = exports.TimeScale = function (_BaseScale) { - _inherits(TimeScale, _BaseScale); - - function TimeScale(xSource, scaleConfig) { - _classCallCheck(this, TimeScale); - - var _this = _possibleConstructorReturn(this, (TimeScale.__proto__ || Object.getPrototypeOf(TimeScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var vars = _this.vars; - - var domain = _d2.default.extent(vars).map(function (v) { - return new Date(v); - }); - - var min = props.min === null || props.min === undefined ? domain[0] : new Date(props.min).getTime(); - var max = props.max === null || props.max === undefined ? domain[1] : new Date(props.max).getTime(); - - vars = [new Date(Math.min(min, domain[0])), new Date(Math.max(max, domain[1]))]; - - _this.niceIntervalFn = null; - if (props.nice) { - var niceInterval = props.niceInterval; - var d3TimeInterval = niceInterval && _d2.default.time[niceInterval] ? props.utcTime ? _d2.default.time[niceInterval].utc : _d2.default.time[niceInterval] : null; - if (d3TimeInterval) { - _this.niceIntervalFn = d3TimeInterval; - } else { - // TODO: show warning? - _this.niceIntervalFn = null; - } - - _this.vars = _utils.utils.niceTimeDomain(vars, _this.niceIntervalFn, { utc: props.utcTime }); - } else { - _this.vars = vars; - } - - _this.addField('scaleType', 'time'); - return _this; - } - - _createClass(TimeScale, [{ - key: 'isInDomain', - value: function isInDomain(aTime) { - var x = new Date(aTime); - var domain = this.domain(); - var min = domain[0]; - var max = domain[domain.length - 1]; - return !Number.isNaN(min) && !Number.isNaN(max) && x <= max && x >= min; - } - }, { - key: 'create', - value: function create(interval) { - - var varSet = this.vars; - var utcTime = this.scaleConfig.utcTime; - - var d3TimeScale = utcTime ? _d2.default.time.scale.utc : _d2.default.time.scale; - var d3Domain = d3TimeScale().domain(this.scaleConfig.nice ? _utils.utils.niceTimeDomain(varSet, this.niceIntervalFn, { utc: utcTime }) : varSet); - - var d3Scale = d3Domain.range(interval); - - var scale = function scale(x) { - var min = varSet[0]; - var max = varSet[1]; - - if (x > max) { - x = max; - } - if (x < min) { - x = min; - } - return d3Scale(new Date(x)); - }; - - // have to copy properties since d3 produce Function with methods - Object.keys(d3Scale).forEach(function (p) { - return scale[p] = d3Scale[p]; - }); - - scale.stepSize = function () { - return 0; - }; - - return this.toBaseScale(scale, interval); - } - }]); - - return TimeScale; - }(_base.BaseScale); - -/***/ }, -/* 68 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.LinearScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var LinearScale = exports.LinearScale = function (_BaseScale) { - _inherits(LinearScale, _BaseScale); - - function LinearScale(xSource, scaleConfig) { - _classCallCheck(this, LinearScale); - - var _this = _possibleConstructorReturn(this, (LinearScale.__proto__ || Object.getPrototypeOf(LinearScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var vars = _d2.default.extent(_this.vars); - - var min = Number.isFinite(props.min) ? props.min : vars[0]; - var max = Number.isFinite(props.max) ? props.max : vars[1]; - - vars = [Math.min.apply(Math, _toConsumableArray([min, vars[0]].filter(Number.isFinite))), Math.max.apply(Math, _toConsumableArray([max, vars[1]].filter(Number.isFinite)))]; - - _this.vars = props.nice ? _utils.utils.niceZeroBased(vars) : _d2.default.extent(vars); - if (_this.vars[0] === _this.vars[1]) { - var e = Math.pow(10, Math.floor(Math.log(_this.vars[0]) / Math.LN10)); - _this.vars[0] -= e; - _this.vars[1] += e || 10; - } - - _this.addField('scaleType', 'linear').addField('discrete', false); - return _this; - } - - _createClass(LinearScale, [{ - key: 'isInDomain', - value: function isInDomain(x) { - var domain = this.domain(); - var min = domain[0]; - var max = domain[domain.length - 1]; - return !Number.isNaN(min) && !Number.isNaN(max) && x <= max && x >= min; - } - }, { - key: 'create', - value: function create(interval) { - - var domain = this.vars; - - var scale = this.extendScale(_d2.default.scale.linear()); - scale.domain(domain).range(interval).clamp(true); - - return this.toBaseScale(scale, interval); - } - }, { - key: 'extendScale', - value: function extendScale(scale) { - var _this2 = this; - - // have to copy properties since d3 produce Function with methods - var d3ScaleCopy = scale.copy; - var d3ScaleTicks = scale.ticks; - Object.assign(scale, { - - stepSize: function stepSize() { - return 0; - }, - - copy: function copy() { - return _this2.extendScale(d3ScaleCopy.call(scale)); - }, - - ticks: this.getField('isInteger') ? function (n) { - return d3ScaleTicks.call(scale, n).filter(Number.isInteger); - } : scale.ticks - }); - - return scale; - } - }]); - - return LinearScale; - }(_base.BaseScale); - -/***/ }, -/* 69 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.LogarithmicScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _error = __webpack_require__(8); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var LogarithmicScale = exports.LogarithmicScale = function (_BaseScale) { - _inherits(LogarithmicScale, _BaseScale); - - function LogarithmicScale(xSource, scaleConfig) { - _classCallCheck(this, LogarithmicScale); - - var _this = _possibleConstructorReturn(this, (LogarithmicScale.__proto__ || Object.getPrototypeOf(LogarithmicScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var domain = _d2.default.extent(_this.vars); - - var min = Number.isFinite(props.min) ? props.min : domain[0]; - var max = Number.isFinite(props.max) ? props.max : domain[1]; - - domain = [Math.min.apply(Math, _toConsumableArray([min, domain[0]].filter(Number.isFinite))), Math.max.apply(Math, _toConsumableArray([max, domain[1]].filter(Number.isFinite)))]; - throwIfCrossesZero(domain); - - if (props.nice) { - domain = niceLog10(domain); - } - - _this.vars = domain; - - _this.addField('scaleType', 'logarithmic').addField('discrete', false); - return _this; - } - - _createClass(LogarithmicScale, [{ - key: 'isInDomain', - value: function isInDomain(x) { - var domain = this.domain(); - var min = domain[0]; - var max = domain[domain.length - 1]; - return !Number.isNaN(min) && !Number.isNaN(max) && x <= max && x >= min; - } - }, { - key: 'create', - value: function create(interval) { - - var domain = this.vars; - throwIfCrossesZero(domain); - - var d3Scale = extendLogScale(_d2.default.scale.log()).domain(domain).range(interval); - d3Scale.stepSize = function () { - return 0; - }; - - return this.toBaseScale(d3Scale, interval); - } - }]); - - return LogarithmicScale; - }(_base.BaseScale); - - function log10(x) { - return Math.log(x) / Math.LN10; - } - - function throwIfCrossesZero(domain) { - if (domain[0] * domain[1] <= 0) { - throw new _error.TauChartError('Logarithmic scale domain cannot cross zero.', _error.errorCodes.INVALID_LOG_DOMAIN); - } - } - - function extendLogScale(scale) { - var d3ScaleCopy = scale.copy; - - // NOTE: D3 log scale ticks count is not configurable - // and returns 10 ticks per each exponent. - // So here we make it return 10 ticks per each - // step of 1, 2 or more exponents, according to - // necessary ticks count. - scale.ticks = function (n) { - - var ticksPerExp = 10; - var ticks = []; - var extent = _d2.default.extent(scale.domain()); - var lowExp = Math.floor(log10(extent[0])); - var topExp = Math.ceil(log10(extent[1])); - - var step = Math.ceil((topExp - lowExp) * ticksPerExp / (Math.ceil(n / ticksPerExp) * ticksPerExp)); - - for (var e = lowExp; e <= topExp; e += step) { - for (var t = 1; t <= ticksPerExp; t++) { - var tick = Math.pow(t, step) * Math.pow(10, e); - tick = parseFloat(tick.toExponential(0)); - if (tick >= extent[0] && tick <= extent[1]) { - ticks.push(tick); - } - } - } - - return ticks; - }; - scale.copy = function () { - var copy = d3ScaleCopy.call(scale); - extendLogScale(copy); - return copy; - }; - - return scale; - } - - function niceLog10(domain) { - - var isPositive = domain[0] > 0; - var absDomain = domain.map(function (d) { - return Math.abs(d); - }); - var top = Math.max.apply(Math, _toConsumableArray(absDomain)); - var low = Math.min.apply(Math, _toConsumableArray(absDomain)); - - var lowExp = low.toExponential().split('e'); - var topExp = top.toExponential().split('e'); - var niceLow = parseFloat(Math.floor(lowExp[0]) + 'e' + lowExp[1]); - var niceTop = parseFloat(Math.ceil(topExp[0]) + 'e' + topExp[1]); - - return isPositive ? [niceLow, niceTop] : [-niceTop, -niceLow]; - } - -/***/ }, -/* 70 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ValueScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - - var ValueScale = exports.ValueScale = function (_BaseScale) { - _inherits(ValueScale, _BaseScale); - - function ValueScale(xSource, scaleConfig) { - _classCallCheck(this, ValueScale); - - var _this = _possibleConstructorReturn(this, (ValueScale.__proto__ || Object.getPrototypeOf(ValueScale)).call(this, xSource, scaleConfig)); - - _this.addField('scaleType', 'value').addField('georole', scaleConfig.georole); - return _this; - } - - _createClass(ValueScale, [{ - key: 'create', - value: function create() { - return this.toBaseScale(function (x) { - return x; - }); - } - }]); - - return ValueScale; - }(_base.BaseScale); - -/***/ }, -/* 71 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.FillScale = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _base = __webpack_require__(62); - - var _utils = __webpack_require__(3); - - var _d = __webpack_require__(2); - - var _d2 = _interopRequireDefault(_d); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - - function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - /* jshint ignore:start */ - - - /* jshint ignore:end */ - - var FillScale = exports.FillScale = function (_BaseScale) { - _inherits(FillScale, _BaseScale); - - function FillScale(xSource, scaleConfig) { - _classCallCheck(this, FillScale); - - var _this = _possibleConstructorReturn(this, (FillScale.__proto__ || Object.getPrototypeOf(FillScale)).call(this, xSource, scaleConfig)); - - var props = _this.scaleConfig; - var vars = _d2.default.extent(_this.vars); - - var min = Number.isFinite(props.min) ? props.min : vars[0]; - var max = Number.isFinite(props.max) ? props.max : vars[1]; - - vars = [Math.min(min, vars[0]), Math.max(max, vars[1])]; - - _this.vars = props.nice ? _utils.utils.niceZeroBased(vars) : _d2.default.extent(vars); - - var opacityStep = (1 - 0.2) / 9; - var defBrewer = _utils.utils.range(10).map(function (i) { - return 'rgba(90,180,90,' + (0.2 + i * opacityStep).toFixed(2) + ')'; - }); - - var brewer = props.brewer || defBrewer; - - _this.addField('scaleType', 'fill').addField('brewer', brewer); - return _this; - } - - _createClass(FillScale, [{ - key: 'isInDomain', - value: function isInDomain(x) { - var domain = this.domain(); - var min = domain[0]; - var max = domain[domain.length - 1]; - return !Number.isNaN(min) && !Number.isNaN(max) && x <= max && x >= min; - } - }, { - key: 'create', - value: function create() { - - var varSet = this.vars; - - var brewer = this.getField('brewer'); - - if (!Array.isArray(brewer)) { - throw new Error('This brewer is not supported'); - } - - var size = brewer.length; - var step = (varSet[1] - varSet[0]) / size; - var domain = _utils.utils.range(size - 1).map(function (i) { - return i + 1; - }).reduce(function (memo, i) { - return memo.concat([varSet[0] + i * step]); - }, []); - - var func = _d2.default.scale.threshold().domain(domain).range(brewer); - - return this.toBaseScale(func); - } - }]); - - return FillScale; - }(_base.BaseScale); - -/***/ }, -/* 72 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChartMap = undefined; - - var _utils = __webpack_require__(3); - - var ChartMap = function ChartMap(config) { - var guide = Object.assign({ sourcemap: config.settings.defaultSourceMap }, config.guide || {}); - - guide.size = _utils.utils.defaults(guide.size || {}, { min: 1, max: 10 }); - guide.code = _utils.utils.defaults(guide.code || {}, { georole: 'countries' }); - - var scales = {}; - - var scalesPool = function scalesPool(type, prop) { - var guide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var key; - var dim = prop; - var src; - if (!prop) { - key = type + ':default'; - src = '?'; - } else { - key = type + '_' + prop; - src = '/'; - } - - if (!scales.hasOwnProperty(key)) { - scales[key] = Object.assign({ type: type, source: src, dim: dim }, guide); - } - - return key; - }; - - return { - sources: { - '?': { - dims: {}, - data: [{}] - }, - '/': { - dims: Object.keys(config.dimensions).reduce(function (dims, k) { - dims[k] = { type: config.dimensions[k].type }; - return dims; - }, {}), - data: config.data - } - }, - - scales: scales, - - unit: { - type: 'COORDS.MAP', - - expression: { operator: 'none', source: '/' }, - - code: scalesPool('value', config.code, guide.code), - fill: scalesPool('fill', config.fill, guide.fill), - - size: scalesPool('size', config.size, guide.size), - color: scalesPool('color', config.color, guide.color), - latitude: scalesPool('linear', config.latitude, { nice: false }), - longitude: scalesPool('linear', config.longitude, { nice: false }), - - guide: guide - }, - - plugins: config.plugins || [] - }; - }; - - exports.ChartMap = ChartMap; - -/***/ }, -/* 73 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChartInterval = undefined; - - var _converterHelpers = __webpack_require__(74); - - var disableColorToBarPositionOnceColorAndAxesUseTheSameDim = function disableColorToBarPositionOnceColorAndAxesUseTheSameDim(normConfig) { - - var baseScale = normConfig.flip ? normConfig.y : normConfig.x; - var isMatch = baseScale.indexOf(normConfig.color) >= 0; - var barGuide = normConfig.guide[normConfig.guide.length - 1]; - if (isMatch && !barGuide.hasOwnProperty('enableColorToBarPosition')) { - barGuide.enableColorToBarPosition = false; - } - - return normConfig; - }; - - var ChartInterval = function ChartInterval(rawConfig) { - var config = (0, _converterHelpers.normalizeConfig)(rawConfig); - - config = disableColorToBarPositionOnceColorAndAxesUseTheSameDim(config); - - return (0, _converterHelpers.transformConfig)('ELEMENT.INTERVAL', config); - }; - - exports.ChartInterval = ChartInterval; - -/***/ }, -/* 74 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.transformConfig = exports.normalizeConfig = undefined; - - var _strategyNormalizeAxi; - - var _utils = __webpack_require__(3); - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - var convertAxis = function convertAxis(data) { - return !data ? null : data; - }; - - var normalizeSettings = function normalizeSettings(axis) { - var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - return !Array.isArray(axis) ? [axis] : axis.length === 0 ? [defaultValue] : axis; - }; - - var createElement = function createElement(type, config) { - return { - type: type, - x: config.x, - y: config.y, - identity: config.identity, - size: config.size, - color: config.color, - split: config.split, - label: config.label, - guide: { - color: config.colorGuide, - size: config.sizeGuide - }, - flip: config.flip, - stack: config.stack - }; - }; - - var status = { - SUCCESS: 'SUCCESS', - WARNING: 'WARNING', - FAIL: 'FAIL' - }; - - var strategyNormalizeAxis = (_strategyNormalizeAxi = {}, _defineProperty(_strategyNormalizeAxi, status.SUCCESS, function (axis) { - return axis; - }), _defineProperty(_strategyNormalizeAxi, status.FAIL, function (axis, data) { - throw new Error((data.messages || []).join('\n') || - // jscs:disable - 'This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart'); - }), _defineProperty(_strategyNormalizeAxi, status.WARNING, function (axis, config, guide) { - var axisName = config.axis; - var index = config.indexMeasureAxis[0]; - var measure = axis[index]; - var newAxis = axis.filter(function (x) { - return x !== measure; - }); - newAxis.push(measure); - - var measureGuide = guide[index][axisName] || {}; - var categoryGuide = guide[guide.length - 1][axisName] || {}; - - guide[guide.length - 1][axisName] = measureGuide; - guide[index][axisName] = categoryGuide; - - return newAxis; - }), _strategyNormalizeAxi); - - function validateAxis(dimensions, axis, axisName) { - return axis.reduce(function (result, item, index) { - var dimension = dimensions[item]; - if (!dimension) { - result.status = status.FAIL; - if (item) { - result.messages.push('"' + item + '" dimension is undefined for "' + axisName + '" axis'); - } else { - result.messages.push('"' + axisName + '" axis should be specified'); - } - } else if (result.status != status.FAIL) { - if (dimension.type === 'measure') { - result.countMeasureAxis++; - result.indexMeasureAxis.push(index); - } - if (dimension.type !== 'measure' && result.countMeasureAxis === 1) { - result.status = status.WARNING; - } else if (result.countMeasureAxis > 1) { - result.status = status.FAIL; - result.messages.push('There is more than one measure dimension for "' + axisName + '" axis'); - } - } - return result; - }, { status: status.SUCCESS, countMeasureAxis: 0, indexMeasureAxis: [], messages: [], axis: axisName }); - } - - function normalizeConfig(config) { - - var x = normalizeSettings(config.x); - var y = normalizeSettings(config.y); - - var maxDeep = Math.max(x.length, y.length); - - var guide = normalizeSettings(config.guide || {}, {}); - var gapsSize = maxDeep - guide.length; - - // feel the gaps if needed - for (var i = 0; i < gapsSize; i++) { - guide.push({}); - } - - // cut items - guide = guide.slice(0, maxDeep); - - var validatedX = validateAxis(config.dimensions, x, 'x'); - var validatedY = validateAxis(config.dimensions, y, 'y'); - x = strategyNormalizeAxis[validatedX.status](x, validatedX, guide); - y = strategyNormalizeAxis[validatedY.status](y, validatedY, guide); - - return Object.assign({}, config, { - x: x, - y: y, - guide: guide - }); - } - - function transformConfig(type, config) { - - var x = config.x; - var y = config.y; - var guide = config.guide; - var maxDepth = Math.max(x.length, y.length); - - var spec = { - type: 'COORDS.RECT', - unit: [] - }; - - var xs = [].concat(x); - var ys = [].concat(y); - var gs = [].concat(guide); - - for (var i = maxDepth; i > 0; i--) { - var currentX = xs.pop(); - var currentY = ys.pop(); - var currentGuide = gs.pop() || {}; - if (i === maxDepth) { - spec.x = currentX; - spec.y = currentY; - spec.unit.push(createElement(type, { - x: convertAxis(currentX), - y: convertAxis(currentY), - identity: config.identity, - split: config.split, - color: config.color, - label: config.label, - size: config.size, - flip: config.flip, - stack: config.stack, - colorGuide: currentGuide.color, - sizeGuide: currentGuide.size - })); - spec.guide = _utils.utils.defaults(currentGuide, { - x: { label: currentX }, - y: { label: currentY } - }); - } else { - spec = { - type: 'COORDS.RECT', - x: convertAxis(currentX), - y: convertAxis(currentY), - unit: [spec], - guide: _utils.utils.defaults(currentGuide, { - x: { label: currentX }, - y: { label: currentY } - }) - }; - } - } - - config.spec = { - dimensions: config.dimensions, - unit: spec - }; - return config; - } - - exports.normalizeConfig = normalizeConfig; - exports.transformConfig = transformConfig; - -/***/ }, -/* 75 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChartScatterplot = undefined; - - var _converterHelpers = __webpack_require__(74); - - var ChartScatterplot = function ChartScatterplot(rawConfig) { - var config = (0, _converterHelpers.normalizeConfig)(rawConfig); - return (0, _converterHelpers.transformConfig)('ELEMENT.POINT', config); - }; - - exports.ChartScatterplot = ChartScatterplot; - -/***/ }, -/* 76 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChartLine = undefined; - - var _dataProcessor = __webpack_require__(28); - - var _converterHelpers = __webpack_require__(74); - - var ChartLine = function ChartLine(rawConfig) { - var config = (0, _converterHelpers.normalizeConfig)(rawConfig); - - var data = config.data; - - var log = config.settings.log; - - var lineOrientationStrategies = { - - none: function none() { - return null; - }, - - horizontal: function horizontal(config) { - return config.x[config.x.length - 1]; - }, - - vertical: function vertical(config) { - return config.y[config.y.length - 1]; - }, - - auto: function auto(config) { - var xs = config.x; - var ys = config.y; - var primaryX = xs[xs.length - 1]; - var secondaryX = xs.slice(0, xs.length - 1); - var primaryY = ys[ys.length - 1]; - var secondaryY = ys.slice(0, ys.length - 1); - var colorProp = config.color; - - var rest = secondaryX.concat(secondaryY).concat([colorProp]).filter(function (x) { - return x !== null; - }); - - var variantIndex = -1; - var variations = [[[primaryX].concat(rest), primaryY], [[primaryY].concat(rest), primaryX]]; - var isMatchAny = variations.some(function (item, i) { - var domainFields = item[0]; - var rangeProperty = item[1]; - var r = _dataProcessor.DataProcessor.isYFunctionOfX(data, domainFields, [rangeProperty]); - if (r.result) { - variantIndex = i; - } else { - log(['Attempt to find a functional relation between', item[0] + ' and ' + item[1] + ' is failed.', 'There are several ' + r.error.keyY + ' values (e.g. ' + r.error.errY.join(',') + ')', 'for (' + r.error.keyX + ' = ' + r.error.valX + ').'].join(' ')); - } - return r.result; - }); - - var propSortBy; - if (isMatchAny) { - propSortBy = variations[variantIndex][0][0]; - } else { - log(['All attempts are failed.', 'Will orient line horizontally by default.', 'NOTE: the [scatterplot] chart is more convenient for that data.'].join(' ')); - propSortBy = primaryX; - } - - return propSortBy; - } - }; - - var orient = (config.lineOrientation || '').toLowerCase(); - var strategy = lineOrientationStrategies.hasOwnProperty(orient) ? lineOrientationStrategies[orient] : lineOrientationStrategies.auto; - - var propSortBy = strategy(config); - if (propSortBy !== null) { - config.data = _dataProcessor.DataProcessor.sortByDim(data, propSortBy, config.dimensions[propSortBy]); - } - - return (0, _converterHelpers.transformConfig)('ELEMENT.LINE', config); - }; - - exports.ChartLine = ChartLine; - -/***/ }, -/* 77 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.ChartArea = undefined; - - var _dataProcessor = __webpack_require__(28); - - var _converterHelpers = __webpack_require__(74); - - var ChartArea = function ChartArea(rawConfig) { - - var config = (0, _converterHelpers.normalizeConfig)(rawConfig); - - var data = config.data; - - var log = config.settings.log; - - var orientStrategies = { - - horizontal: function horizontal(config) { - return { - prop: config.x[config.x.length - 1], - flip: false - }; - }, - - vertical: function vertical(config) { - return { - prop: config.y[config.y.length - 1], - flip: true - }; - }, - - auto: function auto(config) { - var xs = config.x; - var ys = config.y; - var primaryX = xs[xs.length - 1]; - var secondaryX = xs.slice(0, xs.length - 1); - var primaryY = ys[ys.length - 1]; - var secondaryY = ys.slice(0, ys.length - 1); - var colorProp = config.color; - - var rest = secondaryX.concat(secondaryY).concat([colorProp]).filter(function (x) { - return x !== null; - }); - - var variantIndex = -1; - var variations = [[[primaryX].concat(rest), primaryY], [[primaryY].concat(rest), primaryX]]; - var isMatchAny = variations.some(function (item, i) { - var domainFields = item[0]; - var rangeProperty = item[1]; - var r = _dataProcessor.DataProcessor.isYFunctionOfX(data, domainFields, [rangeProperty]); - if (r.result) { - variantIndex = i; - } else { - log(['Attempt to find a functional relation between', item[0] + ' and ' + item[1] + ' is failed.', 'There are several ' + r.error.keyY + ' values (e.g. ' + r.error.errY.join(',') + ')', 'for (' + r.error.keyX + ' = ' + r.error.valX + ').'].join(' ')); - } - return r.result; - }); - - var propSortBy; - var flip = null; - if (isMatchAny) { - propSortBy = variations[variantIndex][0][0]; - flip = variantIndex !== 0; - } else { - log('All attempts are failed. Gonna transform AREA to general PATH.'); - propSortBy = null; - } - - return { - prop: propSortBy, - flip: flip - }; - } - }; - - var orient = typeof config.flip !== 'boolean' ? 'auto' : config.flip ? 'vertical' : 'horizontal'; - - var strategy = orientStrategies[orient]; - - var propSortBy = strategy(config); - var elementName = 'ELEMENT.AREA'; - if (propSortBy.prop !== null) { - config.data = _dataProcessor.DataProcessor.sortByDim(data, propSortBy.prop, config.dimensions[propSortBy.prop]); - config.flip = propSortBy.flip; - } - - return (0, _converterHelpers.transformConfig)(elementName, config); - }; - - exports.ChartArea = ChartArea; - -/***/ }, -/* 78 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - var ChartParallel = function ChartParallel(config) { - - var guide = Object.assign({ columns: {} }, config.guide || {}); - - var scales = {}; - - var scalesPool = function scalesPool(type, prop) { - var guide = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var key; - var dim = prop; - var src; - if (!prop) { - key = type + ':default'; - src = '?'; - } else { - key = type + '_' + prop; - src = '/'; - } - - if (!scales.hasOwnProperty(key)) { - scales[key] = Object.assign({ type: type, source: src, dim: dim }, guide); - } - - return key; - }; - - var cols = config.columns.map(function (c) { - return scalesPool(config.dimensions[c].scale, c, guide.columns[c]); - }); - - return { - sources: { - '?': { - dims: {}, - data: [{}] - }, - '/': { - dims: Object.keys(config.dimensions).reduce(function (dims, k) { - dims[k] = { type: config.dimensions[k].type }; - return dims; - }, {}), - data: config.data - } - }, - - scales: scales, - - unit: { - type: 'COORDS.PARALLEL', - expression: { operator: 'none', source: '/' }, - columns: cols, - guide: guide, - units: [{ - type: 'PARALLEL/ELEMENT.LINE', - color: scalesPool('color', config.color, guide.color), - columns: cols, - expression: { operator: 'none', source: '/' } - }] - }, - - plugins: config.plugins || [] - }; - }; - - exports.ChartParallel = ChartParallel; - -/***/ }, -/* 79 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.PluginsSDK = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _formatterRegistry = __webpack_require__(32); - - var _unit = __webpack_require__(80); - - var _spec = __webpack_require__(81); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var customTokens = {}; - - var PluginsSDK = function () { - function PluginsSDK() { - _classCallCheck(this, PluginsSDK); - } - - _createClass(PluginsSDK, null, [{ - key: 'unit', - value: function unit(unitRef) { - return new _unit.Unit(unitRef); - } - }, { - key: 'spec', - value: function spec(specRef) { - return new _spec.Spec(specRef); - } - }, { - key: 'cloneObject', - value: function cloneObject(obj) { - return JSON.parse(JSON.stringify(obj)); - } - }, { - key: 'depthFirstSearch', - value: function depthFirstSearch(node, predicate) { - - if (predicate(node)) { - return node; - } - - var frames = node.hasOwnProperty('frames') ? node.frames : [{ units: node.units }]; - for (var f = 0; f < frames.length; f++) { - var children = frames[f].units || []; - for (var i = 0; i < children.length; i++) { - var found = PluginsSDK.depthFirstSearch(children[i], predicate); - if (found) { - return found; - } - } - } - } - }, { - key: 'traverseSpec', - value: function traverseSpec(spec, iterator) { - - var traverse = function traverse(node, fnIterator, parentNode) { - fnIterator(node, parentNode); - (node.units || []).map(function (x) { - return traverse(x, fnIterator, node); - }); - }; - - traverse(spec.unit, iterator, null); - } - }, { - key: 'extractFieldsFormatInfo', - value: function extractFieldsFormatInfo(spec) { - - var specScales = spec.scales; - - var isEmptyScale = function isEmptyScale(key) { - return !specScales[key].dim; - }; - - var fillSlot = function fillSlot(memoRef, config, key) { - var GUIDE = config.guide || {}; - var scale = specScales[config[key]]; - var guide = GUIDE[key] || {}; - memoRef[scale.dim] = memoRef[scale.dim] || { label: [], format: [], nullAlias: [], tickLabel: [] }; - - var label = guide.label; - var guideLabel = guide.label || {}; - memoRef[scale.dim].label.push(typeof label === 'string' ? label : guideLabel._original_text || guideLabel.text); - - var format = guide.tickFormat || guide.tickPeriod; - memoRef[scale.dim].format.push(format); - - memoRef[scale.dim].nullAlias.push(guide.tickFormatNullAlias); - - // TODO: workaround for #complex-objects - memoRef[scale.dim].tickLabel.push(guide.tickLabel); - }; - - var configs = []; - PluginsSDK.traverseSpec(spec, function (node) { - configs.push(node); - }); - - var summary = configs.reduce(function (memo, config) { - - if (config.type === 'COORDS.RECT' && config.hasOwnProperty('x') && !isEmptyScale(config.x)) { - fillSlot(memo, config, 'x'); - } - - if (config.type === 'COORDS.RECT' && config.hasOwnProperty('y') && !isEmptyScale(config.y)) { - fillSlot(memo, config, 'y'); - } - - if (config.hasOwnProperty('color') && !isEmptyScale(config.color)) { - fillSlot(memo, config, 'color'); - } - - if (config.hasOwnProperty('size') && !isEmptyScale(config.size)) { - fillSlot(memo, config, 'size'); - } - - if (config.hasOwnProperty('label') && !isEmptyScale(config.label)) { - fillSlot(memo, config, 'label'); - } - - return memo; - }, {}); - - var choiceRule = function choiceRule(arr, defaultValue) { - return arr.filter(function (x) { - return x; - })[0] || defaultValue; - }; - - return Object.keys(summary).reduce(function (memo, k) { - memo[k].label = choiceRule(memo[k].label, k); - memo[k].format = choiceRule(memo[k].format, null); - memo[k].nullAlias = choiceRule(memo[k].nullAlias, 'No ' + memo[k].label); - memo[k].tickLabel = choiceRule(memo[k].tickLabel, null); - - // very special case for dates - var format = memo[k].format === 'x-time-auto' ? spec.settings.utcTime ? 'day-utc' : 'day' : memo[k].format; - var nonVal = memo[k].nullAlias; - var fnForm = format ? _formatterRegistry.FormatterRegistry.get(format, nonVal) : function (raw) { - return raw === null ? nonVal : raw; - }; - - memo[k].format = fnForm; - - // TODO: workaround for #complex-objects - if (memo[k].tickLabel) { - var kc = k.replace('.' + memo[k].tickLabel, ''); - memo[kc] = { - label: memo[k].label, - nullAlias: memo[k].nullAlias, - tickLabel: memo[k].tickLabel, - format: function format(obj) { - return fnForm(obj && obj[memo[kc].tickLabel]); - }, - isComplexField: true - }; - - memo[k].parentField = kc; - } - - return memo; - }, summary); - } - }, { - key: 'tokens', - value: function tokens() { - return { - reg: function reg(key, val) { - customTokens[key] = val; - return this; - }, - - get: function get(key) { - return customTokens[key] || key; - } - }; - } - }, { - key: 'getParentUnit', - value: function getParentUnit(spec, unit) { - - var parent = null; - - var traverse = function traverse(node, parentNode) { - - if (node.uid === unit.uid) { - parent = parentNode; - return true; - } - - if (node.frames) { - node.frames.some(function (frame) { - return (frame.units || []).some(function (x) { - return traverse(x, node); - }); - }); - } else { - (node.units || []).some(function (x) { - return traverse(x, node); - }); - } - - return false; - }; - - traverse(spec.unit, null); - - return parent; - } - }]); - - return PluginsSDK; - }(); - - exports.PluginsSDK = PluginsSDK; - -/***/ }, -/* 80 */ -/***/ function(module, exports) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var Unit = function () { - function Unit(unitRef) { - _classCallCheck(this, Unit); - - this.unitRef = unitRef; - } - - _createClass(Unit, [{ - key: 'value', - value: function value() { - return this.unitRef; - } - }, { - key: 'clone', - value: function clone() { - return JSON.parse(JSON.stringify(this.unitRef)); - } - }, { - key: 'traverse', - value: function traverse(iterator) { - - var fnTraverse = function fnTraverse(node, fnIterator, parentNode) { - fnIterator(node, parentNode); - (node.units || []).map(function (x) { - return fnTraverse(x, fnIterator, node); - }); - }; - - fnTraverse(this.unitRef, iterator, null); - return this; - } - }, { - key: 'reduce', - value: function reduce(iterator, memo) { - var r = memo; - this.traverse(function (unit, parent) { - return r = iterator(r, unit, parent); - }); - return r; - } - }, { - key: 'addFrame', - value: function addFrame(frameConfig) { - this.unitRef.frames = this.unitRef.frames || []; - - frameConfig.key.__layerid__ = ['L', new Date().getTime(), this.unitRef.frames.length].join(''); - frameConfig.source = frameConfig.hasOwnProperty('source') ? frameConfig.source : this.unitRef.expression.source; - - frameConfig.pipe = frameConfig.pipe || []; - - this.unitRef.frames.push(frameConfig); - return this; - } - }, { - key: 'addTransformation', - value: function addTransformation(name, params) { - this.unitRef.transformation = this.unitRef.transformation || []; - this.unitRef.transformation.push({ type: name, args: params }); - return this; - } - }, { - key: 'isCoordinates', - value: function isCoordinates() { - return (this.unitRef.type || '').toUpperCase().indexOf('COORDS.') === 0; - } - }, { - key: 'isElementOf', - value: function isElementOf(typeOfCoordinates) { - - if (this.isCoordinates()) { - return false; - } - - var xType = this.unitRef.type || ''; - var parts = xType.split('/'); - - if (parts.length === 1) { - parts.unshift('RECT'); // by default - } - - return parts[0].toUpperCase() === typeOfCoordinates.toUpperCase(); - } - }]); - - return Unit; - }(); - - exports.Unit = Unit; - -/***/ }, -/* 81 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.Spec = undefined; - - var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - - var _unit = __webpack_require__(80); - - function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - - var Spec = function () { - function Spec(specRef) { - _classCallCheck(this, Spec); - - this.specRef = specRef; - } - - _createClass(Spec, [{ - key: 'value', - value: function value() { - return this.specRef; - } - }, { - key: 'unit', - value: function unit(newUnit) { - if (newUnit) { - this.specRef.unit = newUnit; - } - return new _unit.Unit(this.specRef.unit); - } - }, { - key: 'addTransformation', - value: function addTransformation(name, func) { - this.specRef.transformations = this.specRef.transformations || {}; - this.specRef.transformations[name] = func; - return this; - } - }, { - key: 'getSettings', - value: function getSettings(name) { - return this.specRef.settings[name]; - } - }, { - key: 'setSettings', - value: function setSettings(name, value) { - this.specRef.settings = this.specRef.settings || {}; - this.specRef.settings[name] = value; - return this; - } - }, { - key: 'getScale', - value: function getScale(name) { - return this.specRef.scales[name]; - } - }, { - key: 'addScale', - value: function addScale(name, props) { - this.specRef.scales[name] = props; - return this; - } - }, { - key: 'regSource', - value: function regSource(sourceName, sourceObject) { - this.specRef.sources[sourceName] = sourceObject; - return this; - } - }, { - key: 'getSourceData', - value: function getSourceData(sourceName) { - var srcData = this.specRef.sources[sourceName] || { data: [] }; - return srcData.data; - } - }, { - key: 'getSourceDim', - value: function getSourceDim(sourceName, sourceDim) { - var srcDims = this.specRef.sources[sourceName] || { dims: {} }; - return srcDims.dims[sourceDim] || {}; - } - }]); - - return Spec; - }(); - - exports.Spec = Spec; - -/***/ }, -/* 82 */ -/***/ function(module, exports) { - - 'use strict'; - - if (!window.requestAnimationFrame) { - (function () { - var lastTime = 0; - window.requestAnimationFrame = function (fn) { - var currTime = Date.now(); - var delay = Math.max(0, 16 - currTime + lastTime); - lastTime = currTime + delay; - return setTimeout(function () { - fn.call(null, currTime + delay); - }, delay); - }; - window.cancelAnimationFrame = function (id) { - clearTimeout(id); - }; - })(); - } - - if (!Number.isFinite) { - Object.defineProperty(Number, 'isFinite', { - value: function value(_value) { - return typeof _value === 'number' && isFinite(_value); - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Number.isNaN) { - Object.defineProperty(Number, 'isNaN', { - value: function value(_value2) { - return typeof _value2 === 'number' && isNaN(_value2); - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Number.isInteger) { - Object.defineProperty(Number, 'isInteger', { - value: function value(_value3) { - return typeof _value3 === 'number' && isFinite(_value3) && Math.floor(_value3) === _value3; - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Number.MAX_SAFE_INTEGER) { - Object.defineProperty(Number, 'MAX_SAFE_INTEGER', { - value: 9007199254740991, - configurable: false, - enumerable: false, - writable: false - }); - } - - if (!Array.prototype.find) { - Object.defineProperty(Array.prototype, 'find', { - value: function value(predicate) { - if (this == null) { - throw new TypeError('Array.prototype.find called on null or undefined'); - } - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - var list = Object(this); - var length = list.length >>> 0; - var thisArg = arguments[1]; - var value; - - for (var i = 0; i < length; i++) { - value = list[i]; - if (predicate.call(thisArg, value, i, list)) { - return value; - } - } - return undefined; - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Array.prototype.findIndex) { - Object.defineProperty(Array.prototype, 'findIndex', { - value: function value(predicate) { - if (this == null) { - throw new TypeError('Array.prototype.findIndex called on null or undefined'); - } - if (typeof predicate !== 'function') { - throw new TypeError('predicate must be a function'); - } - var list = Object(this); - var length = list.length >>> 0; - var thisArg = arguments[1]; - var value; - - for (var i = 0; i < length; i++) { - value = list[i]; - if (predicate.call(thisArg, value, i, list)) { - return i; - } - } - return -1; - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Array.from) { - Object.defineProperty(Array, 'from', { - value: function () { - var toStr = Object.prototype.toString; - var isCallable = function isCallable(fn) { - return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; - }; - var toInteger = function toInteger(value) { - var number = Number(value); - if (isNaN(number)) { - return 0; - } - if (number === 0 || !isFinite(number)) { - return number; - } - return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number)); - }; - var maxSafeInteger = Math.pow(2, 53) - 1; - var toLength = function toLength(value) { - var len = toInteger(value); - return Math.min(Math.max(len, 0), maxSafeInteger); - }; - - return function from(arrayLike /*, mapFn, thisArg */) { - var C = this; - var items = Object(arrayLike); - if (arrayLike == null) { - throw new TypeError('Array.from requires an array-like object - not null or undefined'); - } - var mapFn = arguments.length > 1 ? arguments[1] : undefined; - var T; - if (typeof mapFn !== 'undefined') { - if (!isCallable(mapFn)) { - throw new TypeError('Array.from: when provided, the second argument must be a function'); - } - if (arguments.length > 2) { - T = arguments[2]; - } - } - var len = toLength(items.length); - var A = isCallable(C) ? Object(new C(len)) : new Array(len); - var k = 0; - var kValue; - while (k < len) { - kValue = items[k]; - if (mapFn) { - A[k] = typeof T === 'undefined' ? mapFn(kValue, k) : mapFn.call(T, kValue, k); - } else { - A[k] = kValue; - } - k += 1; - } - A.length = len; - return A; - }; - }(), - configurable: true, - enumerable: false, - writable: true - }); - - // Assume `Array.from` is only missing in IE11, same for Map methods. - var ieMapSet = Map.prototype.set; - Object.defineProperty(Map.prototype, 'set', { - value: function value() { - ieMapSet.apply(this, arguments); - return this; - }, - configurable: true, - enumerable: false, - writable: true - }); - Object.defineProperty(Map.prototype, 'values', { - value: function value() { - var obj = {}; - var i = 0; - this.forEach(function (v) { - return obj[String(i++)] = v; - }); - obj.length = i; - return obj; - }, - configurable: true, - enumerable: false, - writable: true - }); - Object.defineProperty(Map.prototype, 'entries', { - value: function value() { - var obj = {}; - var i = 0; - this.forEach(function (v, k) { - return obj[String(i++)] = [k, v]; - }); - obj.length = i; - return obj; - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Object.assign) { - Object.defineProperty(Object, 'assign', { - value: function value(target) { - if (target === undefined || target === null) { - throw new TypeError('Cannot convert undefined or null to object'); - } - - var output = Object(target); - for (var index = 1; index < arguments.length; index++) { - var source = arguments[index]; - if (source !== undefined && source !== null) { - for (var nextKey in source) { - if (source.hasOwnProperty(nextKey)) { - output[nextKey] = source[nextKey]; - } - } - } - } - return output; - }, - configurable: true, - enumerable: false, - writable: true - }); - } - - if (!Element.prototype.matches) { - Object.defineProperty(Element.prototype, 'matches', { - value: Element.prototype.msMatchesSelector, - configurable: true, - enumerable: true, - writable: true - }); - } - -/***/ } -/******/ ]) -}); -; \ No newline at end of file diff --git a/build/production/tauCharts.dark.min.css b/build/production/tauCharts.dark.min.css deleted file mode 100644 index 0f3468c0a..000000000 --- a/build/production/tauCharts.dark.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! taucharts - v1.2.2 - 2017-06-01 -* https://github.com/TargetProcess/tauCharts -* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(255,255,255,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#fff}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#fff}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(0,0,0,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(255,255,255,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #999;border-radius:2px;background:#777}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAPFBMVEX///////////////////////////////////////////////////////////////////////////////8gsV51AAAAE3RSTlMAHB0eHyAhIiNAv8Dc3d7f4eLjyWil2QAAAD1JREFUeAFjoApg5WZF4rEJCHNBxbmYGdgFhflZIFxuYV5OIWE+ZpguAWFhYV4mmDaQSh4mJHM4uBjJcAsAoZwBrNc0BKUAAAAASUVORK5CYII=);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#c3c3c3}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:#777}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#777;border:1px solid #999;border-radius:2px;color:#fff}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(0,0,0,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(255,255,255,.1);box-sizing:border-box;color:#606060;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:grey;color:#fff}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#755797;fill:#755797}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#746650;fill:#746650}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#A43B49;fill:#A43B49}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#AA7243;fill:#AA7243}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(255,255,255,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-level-0 path{stroke:rgba(255,255,255,.2)}.graphical-report__svg .map-contour-level-1 path{stroke:rgba(255,255,255,.15)}.graphical-report__svg .map-contour-level-2 path{stroke:rgba(255,255,255,.09)}.graphical-report__svg .map-contour-level-3 path{stroke:rgba(255,255,255,.06)}.graphical-report__svg .map-contour-level-4 path{stroke:rgba(255,255,255,.03)}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:rgba(255,191,0,.15)}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour:hover path{stroke:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#FFBF00}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(255,255,255,.2);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(255,255,255,.2);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(255,255,255,.34)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#404040;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#262626}.graphical-report__dot{opacity:.9;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#000;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#000;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#755797}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#755797}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#746650}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#746650}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#A43B49}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#A43B49}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#AA7243}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#AA7243}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(37,39,46,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#8e8e8e}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:"";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:"";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#000;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#000}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#fff;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#755797;border:1px solid #755797}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#746650;border:1px solid #746650}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#A43B49;border:1px solid #A43B49}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#AA7243;border:1px solid #AA7243}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(0,0,0,.9);box-shadow:0 1px 4px 0 rgba(255,255,255,.2),0 0 0 1px rgba(255,255,255,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(255,255,255,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#fff}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#ccc}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#fff;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#4f3b66}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#473e31}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#6c2730}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#734d2d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4} \ No newline at end of file diff --git a/build/production/tauCharts.default.min.css b/build/production/tauCharts.default.min.css deleted file mode 100644 index 104451380..000000000 --- a/build/production/tauCharts.default.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! taucharts - v1.2.2 - 2017-06-01 -* https://github.com/TargetProcess/tauCharts -* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:"";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:"";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4} \ No newline at end of file diff --git a/build/production/tauCharts.min.css b/build/production/tauCharts.min.css deleted file mode 100644 index 104451380..000000000 --- a/build/production/tauCharts.min.css +++ /dev/null @@ -1,3 +0,0 @@ -/*! taucharts - v1.2.2 - 2017-06-01 -* https://github.com/TargetProcess/tauCharts -* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */.graphical-report__checkbox__input:not(:disabled):focus+.graphical-report__checkbox__icon,.graphical-report__select:focus{box-shadow:0 0 0 1px rgba(0,0,0,.3),0 0 7px 0 #52a8ec;outline:0}.YlGn.q0-3{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q1-3{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-4{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-4{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-4{fill:#238443;background:#238443;stroke:#238443}.YlGn.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-5{fill:#c2e699;background:#c2e699;stroke:#c2e699}.YlGn.q2-5{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q4-5{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-6{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-6{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-6{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.YlGn.q5-6{fill:#006837;background:#006837;stroke:#006837}.YlGn.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGn.q1-7{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q2-7{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q3-7{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q5-7{fill:#238443;background:#238443;stroke:#238443}.YlGn.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-8{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-8{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-8{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-8{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-8{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.YlGn.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlGn.q1-9{fill:#f7fcb9;background:#f7fcb9;stroke:#f7fcb9}.YlGn.q2-9{fill:#d9f0a3;background:#d9f0a3;stroke:#d9f0a3}.YlGn.q3-9{fill:#addd8e;background:#addd8e;stroke:#addd8e}.YlGn.q4-9{fill:#78c679;background:#78c679;stroke:#78c679}.YlGn.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.YlGn.q6-9{fill:#238443;background:#238443;stroke:#238443}.YlGn.q7-9{fill:#006837;background:#006837;stroke:#006837}.YlGn.q8-9{fill:#004529;background:#004529;stroke:#004529}.YlGnBu.q0-3{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q1-3{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q2-3{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q0-4{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-4{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-4{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-4{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q0-5{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-5{fill:#a1dab4;background:#a1dab4;stroke:#a1dab4}.YlGnBu.q2-5{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q3-5{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q4-5{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-6{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-6{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-6{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-6{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-6{fill:#2c7fb8;background:#2c7fb8;stroke:#2c7fb8}.YlGnBu.q5-6{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q0-7{fill:#ffc;background:#ffc;stroke:#ffc}.YlGnBu.q1-7{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q2-7{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q3-7{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q4-7{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q5-7{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q6-7{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-8{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-8{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-8{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-8{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-8{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-8{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-8{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-8{fill:#0c2c84;background:#0c2c84;stroke:#0c2c84}.YlGnBu.q0-9{fill:#ffffd9;background:#ffffd9;stroke:#ffffd9}.YlGnBu.q1-9{fill:#edf8b1;background:#edf8b1;stroke:#edf8b1}.YlGnBu.q2-9{fill:#c7e9b4;background:#c7e9b4;stroke:#c7e9b4}.YlGnBu.q3-9{fill:#7fcdbb;background:#7fcdbb;stroke:#7fcdbb}.YlGnBu.q4-9{fill:#41b6c4;background:#41b6c4;stroke:#41b6c4}.YlGnBu.q5-9{fill:#1d91c0;background:#1d91c0;stroke:#1d91c0}.YlGnBu.q6-9{fill:#225ea8;background:#225ea8;stroke:#225ea8}.YlGnBu.q7-9{fill:#253494;background:#253494;stroke:#253494}.YlGnBu.q8-9{fill:#081d58;background:#081d58;stroke:#081d58}.GnBu.q0-3{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q1-3{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q2-3{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q0-4{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-4{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-4{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-4{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q0-5{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-5{fill:#bae4bc;background:#bae4bc;stroke:#bae4bc}.GnBu.q2-5{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q3-5{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q4-5{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-6{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-6{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-6{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-6{fill:#43a2ca;background:#43a2ca;stroke:#43a2ca}.GnBu.q5-6{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q0-7{fill:#f0f9e8;background:#f0f9e8;stroke:#f0f9e8}.GnBu.q1-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q2-7{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q3-7{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q4-7{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q5-7{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q6-7{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-8{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-8{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-8{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-8{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-8{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-8{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-8{fill:#08589e;background:#08589e;stroke:#08589e}.GnBu.q0-9{fill:#f7fcf0;background:#f7fcf0;stroke:#f7fcf0}.GnBu.q1-9{fill:#e0f3db;background:#e0f3db;stroke:#e0f3db}.GnBu.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.GnBu.q3-9{fill:#a8ddb5;background:#a8ddb5;stroke:#a8ddb5}.GnBu.q4-9{fill:#7bccc4;background:#7bccc4;stroke:#7bccc4}.GnBu.q5-9{fill:#4eb3d3;background:#4eb3d3;stroke:#4eb3d3}.GnBu.q6-9{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.GnBu.q7-9{fill:#0868ac;background:#0868ac;stroke:#0868ac}.GnBu.q8-9{fill:#084081;background:#084081;stroke:#084081}.BuGn.q0-3{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q1-3{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q2-3{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-4{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-4{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-5{fill:#b2e2e2;background:#b2e2e2;stroke:#b2e2e2}.BuGn.q2-5{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q3-5{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-6{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-6{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-6{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-6{fill:#2ca25f;background:#2ca25f;stroke:#2ca25f}.BuGn.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuGn.q1-7{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q2-7{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q3-7{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q4-7{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q6-7{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-8{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-8{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-8{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-8{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-8{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-8{fill:#005824;background:#005824;stroke:#005824}.BuGn.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuGn.q1-9{fill:#e5f5f9;background:#e5f5f9;stroke:#e5f5f9}.BuGn.q2-9{fill:#ccece6;background:#ccece6;stroke:#ccece6}.BuGn.q3-9{fill:#99d8c9;background:#99d8c9;stroke:#99d8c9}.BuGn.q4-9{fill:#66c2a4;background:#66c2a4;stroke:#66c2a4}.BuGn.q5-9{fill:#41ae76;background:#41ae76;stroke:#41ae76}.BuGn.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.BuGn.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.BuGn.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.PuBuGn.q0-3{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q2-3{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q0-4{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-4{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-4{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q0-5{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBuGn.q2-5{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q3-5{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q4-5{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-6{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-6{fill:#1c9099;background:#1c9099;stroke:#1c9099}.PuBuGn.q5-6{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q0-7{fill:#f6eff7;background:#f6eff7;stroke:#f6eff7}.PuBuGn.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q3-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q5-7{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q6-7{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-8{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-8{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-8{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-8{fill:#016450;background:#016450;stroke:#016450}.PuBuGn.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBuGn.q1-9{fill:#ece2f0;background:#ece2f0;stroke:#ece2f0}.PuBuGn.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBuGn.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBuGn.q4-9{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.PuBuGn.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBuGn.q6-9{fill:#02818a;background:#02818a;stroke:#02818a}.PuBuGn.q7-9{fill:#016c59;background:#016c59;stroke:#016c59}.PuBuGn.q8-9{fill:#014636;background:#014636;stroke:#014636}.PuBu.q0-3{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q1-3{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q2-3{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-4{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-4{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-4{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-5{fill:#bdc9e1;background:#bdc9e1;stroke:#bdc9e1}.PuBu.q2-5{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q3-5{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q4-5{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-6{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-6{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-6{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-6{fill:#2b8cbe;background:#2b8cbe;stroke:#2b8cbe}.PuBu.q5-6{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuBu.q1-7{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q2-7{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q3-7{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q4-7{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q5-7{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q6-7{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-8{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-8{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-8{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-8{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-8{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-8{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-8{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-8{fill:#034e7b;background:#034e7b;stroke:#034e7b}.PuBu.q0-9{fill:#fff7fb;background:#fff7fb;stroke:#fff7fb}.PuBu.q1-9{fill:#ece7f2;background:#ece7f2;stroke:#ece7f2}.PuBu.q2-9{fill:#d0d1e6;background:#d0d1e6;stroke:#d0d1e6}.PuBu.q3-9{fill:#a6bddb;background:#a6bddb;stroke:#a6bddb}.PuBu.q4-9{fill:#74a9cf;background:#74a9cf;stroke:#74a9cf}.PuBu.q5-9{fill:#3690c0;background:#3690c0;stroke:#3690c0}.PuBu.q6-9{fill:#0570b0;background:#0570b0;stroke:#0570b0}.PuBu.q7-9{fill:#045a8d;background:#045a8d;stroke:#045a8d}.PuBu.q8-9{fill:#023858;background:#023858;stroke:#023858}.BuPu.q0-3{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q1-3{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q2-3{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q0-4{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-4{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-4{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q0-5{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.BuPu.q2-5{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q3-5{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q4-5{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-6{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-6{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-6{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-6{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-6{fill:#8856a7;background:#8856a7;stroke:#8856a7}.BuPu.q5-6{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q0-7{fill:#edf8fb;background:#edf8fb;stroke:#edf8fb}.BuPu.q1-7{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q2-7{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q3-7{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q4-7{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q5-7{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q6-7{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-8{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-8{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-8{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-8{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-8{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-8{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-8{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-8{fill:#6e016b;background:#6e016b;stroke:#6e016b}.BuPu.q0-9{fill:#f7fcfd;background:#f7fcfd;stroke:#f7fcfd}.BuPu.q1-9{fill:#e0ecf4;background:#e0ecf4;stroke:#e0ecf4}.BuPu.q2-9{fill:#bfd3e6;background:#bfd3e6;stroke:#bfd3e6}.BuPu.q3-9{fill:#9ebcda;background:#9ebcda;stroke:#9ebcda}.BuPu.q4-9{fill:#8c96c6;background:#8c96c6;stroke:#8c96c6}.BuPu.q5-9{fill:#8c6bb1;background:#8c6bb1;stroke:#8c6bb1}.BuPu.q6-9{fill:#88419d;background:#88419d;stroke:#88419d}.BuPu.q7-9{fill:#810f7c;background:#810f7c;stroke:#810f7c}.BuPu.q8-9{fill:#4d004b;background:#4d004b;stroke:#4d004b}.RdPu.q0-3{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q1-3{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q2-3{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q0-4{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-4{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-4{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-4{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q0-5{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-5{fill:#fbb4b9;background:#fbb4b9;stroke:#fbb4b9}.RdPu.q2-5{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q3-5{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q4-5{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-6{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-6{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-6{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-6{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-6{fill:#c51b8a;background:#c51b8a;stroke:#c51b8a}.RdPu.q5-6{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-7{fill:#feebe2;background:#feebe2;stroke:#feebe2}.RdPu.q1-7{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q2-7{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q3-7{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q4-7{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q5-7{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q6-7{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-8{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-8{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-8{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-8{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-8{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-8{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-8{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-8{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q0-9{fill:#fff7f3;background:#fff7f3;stroke:#fff7f3}.RdPu.q1-9{fill:#fde0dd;background:#fde0dd;stroke:#fde0dd}.RdPu.q2-9{fill:#fcc5c0;background:#fcc5c0;stroke:#fcc5c0}.RdPu.q3-9{fill:#fa9fb5;background:#fa9fb5;stroke:#fa9fb5}.RdPu.q4-9{fill:#f768a1;background:#f768a1;stroke:#f768a1}.RdPu.q5-9{fill:#dd3497;background:#dd3497;stroke:#dd3497}.RdPu.q6-9{fill:#ae017e;background:#ae017e;stroke:#ae017e}.RdPu.q7-9{fill:#7a0177;background:#7a0177;stroke:#7a0177}.RdPu.q8-9{fill:#49006a;background:#49006a;stroke:#49006a}.PuRd.q0-3{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q1-3{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q2-3{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q0-4{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-4{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-4{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-4{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q0-5{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-5{fill:#d7b5d8;background:#d7b5d8;stroke:#d7b5d8}.PuRd.q2-5{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q3-5{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q4-5{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-6{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-6{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-6{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-6{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-6{fill:#dd1c77;background:#dd1c77;stroke:#dd1c77}.PuRd.q5-6{fill:#980043;background:#980043;stroke:#980043}.PuRd.q0-7{fill:#f1eef6;background:#f1eef6;stroke:#f1eef6}.PuRd.q1-7{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q2-7{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q3-7{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q4-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q5-7{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q6-7{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-8{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-8{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-8{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-8{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-8{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-8{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-8{fill:#91003f;background:#91003f;stroke:#91003f}.PuRd.q0-9{fill:#f7f4f9;background:#f7f4f9;stroke:#f7f4f9}.PuRd.q1-9{fill:#e7e1ef;background:#e7e1ef;stroke:#e7e1ef}.PuRd.q2-9{fill:#d4b9da;background:#d4b9da;stroke:#d4b9da}.PuRd.q3-9{fill:#c994c7;background:#c994c7;stroke:#c994c7}.PuRd.q4-9{fill:#df65b0;background:#df65b0;stroke:#df65b0}.PuRd.q5-9{fill:#e7298a;background:#e7298a;stroke:#e7298a}.PuRd.q6-9{fill:#ce1256;background:#ce1256;stroke:#ce1256}.PuRd.q7-9{fill:#980043;background:#980043;stroke:#980043}.PuRd.q8-9{fill:#67001f;background:#67001f;stroke:#67001f}.OrRd.q0-3{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q1-3{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q2-3{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q0-4{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-4{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-4{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-4{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q0-5{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-5{fill:#fdcc8a;background:#fdcc8a;stroke:#fdcc8a}.OrRd.q2-5{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q3-5{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q4-5{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-6{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-6{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-6{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-6{fill:#e34a33;background:#e34a33;stroke:#e34a33}.OrRd.q5-6{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q0-7{fill:#fef0d9;background:#fef0d9;stroke:#fef0d9}.OrRd.q1-7{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q2-7{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q3-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q4-7{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q5-7{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q6-7{fill:#900;background:#900;stroke:#900}.OrRd.q0-8{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-8{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-8{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-8{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-8{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-8{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-8{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-8{fill:#900;background:#900;stroke:#900}.OrRd.q0-9{fill:#fff7ec;background:#fff7ec;stroke:#fff7ec}.OrRd.q1-9{fill:#fee8c8;background:#fee8c8;stroke:#fee8c8}.OrRd.q2-9{fill:#fdd49e;background:#fdd49e;stroke:#fdd49e}.OrRd.q3-9{fill:#fdbb84;background:#fdbb84;stroke:#fdbb84}.OrRd.q4-9{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.OrRd.q5-9{fill:#ef6548;background:#ef6548;stroke:#ef6548}.OrRd.q6-9{fill:#d7301f;background:#d7301f;stroke:#d7301f}.OrRd.q7-9{fill:#b30000;background:#b30000;stroke:#b30000}.OrRd.q8-9{fill:#7f0000;background:#7f0000;stroke:#7f0000}.YlOrRd.q0-3{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q1-3{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q2-3{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q0-4{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-4{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-4{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q0-5{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-5{fill:#fecc5c;background:#fecc5c;stroke:#fecc5c}.YlOrRd.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q3-5{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q4-5{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-6{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-6{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-6{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-6{fill:#f03b20;background:#f03b20;stroke:#f03b20}.YlOrRd.q5-6{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q0-7{fill:#ffffb2;background:#ffffb2;stroke:#ffffb2}.YlOrRd.q1-7{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q2-7{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q4-7{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q6-7{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-8{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-8{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-8{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-8{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-8{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-8{fill:#b10026;background:#b10026;stroke:#b10026}.YlOrRd.q0-9{fill:#ffc;background:#ffc;stroke:#ffc}.YlOrRd.q1-9{fill:#ffeda0;background:#ffeda0;stroke:#ffeda0}.YlOrRd.q2-9{fill:#fed976;background:#fed976;stroke:#fed976}.YlOrRd.q3-9{fill:#feb24c;background:#feb24c;stroke:#feb24c}.YlOrRd.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.YlOrRd.q5-9{fill:#fc4e2a;background:#fc4e2a;stroke:#fc4e2a}.YlOrRd.q6-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.YlOrRd.q7-9{fill:#bd0026;background:#bd0026;stroke:#bd0026}.YlOrRd.q8-9{fill:#800026;background:#800026;stroke:#800026}.YlOrBr.q0-3{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q1-3{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q2-3{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q0-4{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-4{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-4{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-4{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q0-5{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-5{fill:#fed98e;background:#fed98e;stroke:#fed98e}.YlOrBr.q2-5{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q3-5{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q4-5{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-6{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-6{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-6{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-6{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-6{fill:#d95f0e;background:#d95f0e;stroke:#d95f0e}.YlOrBr.q5-6{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q0-7{fill:#ffffd4;background:#ffffd4;stroke:#ffffd4}.YlOrBr.q1-7{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q2-7{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q3-7{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q4-7{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q5-7{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-8{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-8{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-8{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-8{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-8{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-8{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-8{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.YlOrBr.q0-9{fill:#ffffe5;background:#ffffe5;stroke:#ffffe5}.YlOrBr.q1-9{fill:#fff7bc;background:#fff7bc;stroke:#fff7bc}.YlOrBr.q2-9{fill:#fee391;background:#fee391;stroke:#fee391}.YlOrBr.q3-9{fill:#fec44f;background:#fec44f;stroke:#fec44f}.YlOrBr.q4-9{fill:#fe9929;background:#fe9929;stroke:#fe9929}.YlOrBr.q5-9{fill:#ec7014;background:#ec7014;stroke:#ec7014}.YlOrBr.q6-9{fill:#cc4c02;background:#cc4c02;stroke:#cc4c02}.YlOrBr.q7-9{fill:#993404;background:#993404;stroke:#993404}.YlOrBr.q8-9{fill:#662506;background:#662506;stroke:#662506}.Purples.q0-3{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q1-3{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q2-3{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q0-4{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-4{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-4{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-4{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q0-5{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-5{fill:#cbc9e2;background:#cbc9e2;stroke:#cbc9e2}.Purples.q2-5{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q3-5{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q4-5{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-6{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-6{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-6{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-6{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-6{fill:#756bb1;background:#756bb1;stroke:#756bb1}.Purples.q5-6{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q0-7{fill:#f2f0f7;background:#f2f0f7;stroke:#f2f0f7}.Purples.q1-7{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q2-7{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q3-7{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q4-7{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q5-7{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q6-7{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-8{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-8{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-8{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-8{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-8{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-8{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-8{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-8{fill:#4a1486;background:#4a1486;stroke:#4a1486}.Purples.q0-9{fill:#fcfbfd;background:#fcfbfd;stroke:#fcfbfd}.Purples.q1-9{fill:#efedf5;background:#efedf5;stroke:#efedf5}.Purples.q2-9{fill:#dadaeb;background:#dadaeb;stroke:#dadaeb}.Purples.q3-9{fill:#bcbddc;background:#bcbddc;stroke:#bcbddc}.Purples.q4-9{fill:#9e9ac8;background:#9e9ac8;stroke:#9e9ac8}.Purples.q5-9{fill:#807dba;background:#807dba;stroke:#807dba}.Purples.q6-9{fill:#6a51a3;background:#6a51a3;stroke:#6a51a3}.Purples.q7-9{fill:#54278f;background:#54278f;stroke:#54278f}.Purples.q8-9{fill:#3f007d;background:#3f007d;stroke:#3f007d}.Blues.q0-3{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q1-3{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q2-3{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q0-4{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-4{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-4{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-4{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q0-5{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-5{fill:#bdd7e7;background:#bdd7e7;stroke:#bdd7e7}.Blues.q2-5{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q3-5{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q4-5{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-6{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-6{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-6{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-6{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-6{fill:#3182bd;background:#3182bd;stroke:#3182bd}.Blues.q5-6{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q0-7{fill:#eff3ff;background:#eff3ff;stroke:#eff3ff}.Blues.q1-7{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q2-7{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q3-7{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q4-7{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q5-7{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q6-7{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-8{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-8{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-8{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-8{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-8{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-8{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-8{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-8{fill:#084594;background:#084594;stroke:#084594}.Blues.q0-9{fill:#f7fbff;background:#f7fbff;stroke:#f7fbff}.Blues.q1-9{fill:#deebf7;background:#deebf7;stroke:#deebf7}.Blues.q2-9{fill:#c6dbef;background:#c6dbef;stroke:#c6dbef}.Blues.q3-9{fill:#9ecae1;background:#9ecae1;stroke:#9ecae1}.Blues.q4-9{fill:#6baed6;background:#6baed6;stroke:#6baed6}.Blues.q5-9{fill:#4292c6;background:#4292c6;stroke:#4292c6}.Blues.q6-9{fill:#2171b5;background:#2171b5;stroke:#2171b5}.Blues.q7-9{fill:#08519c;background:#08519c;stroke:#08519c}.Blues.q8-9{fill:#08306b;background:#08306b;stroke:#08306b}.Greens.q0-3{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q1-3{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q2-3{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q0-4{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-4{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-4{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-4{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q0-5{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-5{fill:#bae4b3;background:#bae4b3;stroke:#bae4b3}.Greens.q2-5{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q3-5{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q4-5{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-6{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-6{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-6{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-6{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-6{fill:#31a354;background:#31a354;stroke:#31a354}.Greens.q5-6{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q0-7{fill:#edf8e9;background:#edf8e9;stroke:#edf8e9}.Greens.q1-7{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q2-7{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q3-7{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q4-7{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q5-7{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q6-7{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-8{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-8{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-8{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-8{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-8{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-8{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-8{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-8{fill:#005a32;background:#005a32;stroke:#005a32}.Greens.q0-9{fill:#f7fcf5;background:#f7fcf5;stroke:#f7fcf5}.Greens.q1-9{fill:#e5f5e0;background:#e5f5e0;stroke:#e5f5e0}.Greens.q2-9{fill:#c7e9c0;background:#c7e9c0;stroke:#c7e9c0}.Greens.q3-9{fill:#a1d99b;background:#a1d99b;stroke:#a1d99b}.Greens.q4-9{fill:#74c476;background:#74c476;stroke:#74c476}.Greens.q5-9{fill:#41ab5d;background:#41ab5d;stroke:#41ab5d}.Greens.q6-9{fill:#238b45;background:#238b45;stroke:#238b45}.Greens.q7-9{fill:#006d2c;background:#006d2c;stroke:#006d2c}.Greens.q8-9{fill:#00441b;background:#00441b;stroke:#00441b}.Oranges.q0-3{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q1-3{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q2-3{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q0-4{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-4{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-4{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-4{fill:#d94701;background:#d94701;stroke:#d94701}.Oranges.q0-5{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-5{fill:#fdbe85;background:#fdbe85;stroke:#fdbe85}.Oranges.q2-5{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q3-5{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q4-5{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-6{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-6{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-6{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-6{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-6{fill:#e6550d;background:#e6550d;stroke:#e6550d}.Oranges.q5-6{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q0-7{fill:#feedde;background:#feedde;stroke:#feedde}.Oranges.q1-7{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q2-7{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q3-7{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q4-7{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q5-7{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q6-7{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-8{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-8{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-8{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-8{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-8{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-8{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-8{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-8{fill:#8c2d04;background:#8c2d04;stroke:#8c2d04}.Oranges.q0-9{fill:#fff5eb;background:#fff5eb;stroke:#fff5eb}.Oranges.q1-9{fill:#fee6ce;background:#fee6ce;stroke:#fee6ce}.Oranges.q2-9{fill:#fdd0a2;background:#fdd0a2;stroke:#fdd0a2}.Oranges.q3-9{fill:#fdae6b;background:#fdae6b;stroke:#fdae6b}.Oranges.q4-9{fill:#fd8d3c;background:#fd8d3c;stroke:#fd8d3c}.Oranges.q5-9{fill:#f16913;background:#f16913;stroke:#f16913}.Oranges.q6-9{fill:#d94801;background:#d94801;stroke:#d94801}.Oranges.q7-9{fill:#a63603;background:#a63603;stroke:#a63603}.Oranges.q8-9{fill:#7f2704;background:#7f2704;stroke:#7f2704}.Reds.q0-3{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q1-3{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q2-3{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q0-4{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-4{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-4{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-4{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q0-5{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-5{fill:#fcae91;background:#fcae91;stroke:#fcae91}.Reds.q2-5{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q3-5{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q4-5{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-6{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-6{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-6{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-6{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-6{fill:#de2d26;background:#de2d26;stroke:#de2d26}.Reds.q5-6{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q0-7{fill:#fee5d9;background:#fee5d9;stroke:#fee5d9}.Reds.q1-7{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q2-7{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q3-7{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q4-7{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q5-7{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q6-7{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-8{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-8{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-8{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-8{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-8{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-8{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-8{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-8{fill:#99000d;background:#99000d;stroke:#99000d}.Reds.q0-9{fill:#fff5f0;background:#fff5f0;stroke:#fff5f0}.Reds.q1-9{fill:#fee0d2;background:#fee0d2;stroke:#fee0d2}.Reds.q2-9{fill:#fcbba1;background:#fcbba1;stroke:#fcbba1}.Reds.q3-9{fill:#fc9272;background:#fc9272;stroke:#fc9272}.Reds.q4-9{fill:#fb6a4a;background:#fb6a4a;stroke:#fb6a4a}.Reds.q5-9{fill:#ef3b2c;background:#ef3b2c;stroke:#ef3b2c}.Reds.q6-9{fill:#cb181d;background:#cb181d;stroke:#cb181d}.Reds.q7-9{fill:#a50f15;background:#a50f15;stroke:#a50f15}.Reds.q8-9{fill:#67000d;background:#67000d;stroke:#67000d}.Greys.q0-3{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q1-3{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q2-3{fill:#636363;background:#636363;stroke:#636363}.Greys.q0-4{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-4{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-4{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-4{fill:#525252;background:#525252;stroke:#525252}.Greys.q0-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-5{fill:#ccc;background:#ccc;stroke:#ccc}.Greys.q2-5{fill:#969696;background:#969696;stroke:#969696}.Greys.q3-5{fill:#636363;background:#636363;stroke:#636363}.Greys.q4-5{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-6{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-6{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-6{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-6{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-6{fill:#636363;background:#636363;stroke:#636363}.Greys.q5-6{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.Greys.q1-7{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q2-7{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q3-7{fill:#969696;background:#969696;stroke:#969696}.Greys.q4-7{fill:#737373;background:#737373;stroke:#737373}.Greys.q5-7{fill:#525252;background:#525252;stroke:#525252}.Greys.q6-7{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-8{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-8{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-8{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-8{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-8{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-8{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-8{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-8{fill:#252525;background:#252525;stroke:#252525}.Greys.q0-9{fill:#fff;background:#fff;stroke:#fff}.Greys.q1-9{fill:#f0f0f0;background:#f0f0f0;stroke:#f0f0f0}.Greys.q2-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Greys.q3-9{fill:#bdbdbd;background:#bdbdbd;stroke:#bdbdbd}.Greys.q4-9{fill:#969696;background:#969696;stroke:#969696}.Greys.q5-9{fill:#737373;background:#737373;stroke:#737373}.Greys.q6-9{fill:#525252;background:#525252;stroke:#525252}.Greys.q7-9{fill:#252525;background:#252525;stroke:#252525}.Greys.q8-9{fill:#000;background:#000;stroke:#000}.PuOr.q0-3{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q2-3{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q0-4{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-4{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-4{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q3-4{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-5{fill:#e66101;background:#e66101;stroke:#e66101}.PuOr.q1-5{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q3-5{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q4-5{fill:#5e3c99;background:#5e3c99;stroke:#5e3c99}.PuOr.q0-6{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-6{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-6{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-6{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q4-6{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q5-6{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-7{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-7{fill:#f1a340;background:#f1a340;stroke:#f1a340}.PuOr.q2-7{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q4-7{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-7{fill:#998ec3;background:#998ec3;stroke:#998ec3}.PuOr.q6-7{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-8{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-8{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-8{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-8{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-8{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q5-8{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q6-8{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q7-8{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-9{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q1-9{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q2-9{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q3-9{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q5-9{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-9{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-9{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-9{fill:#542788;background:#542788;stroke:#542788}.PuOr.q0-10{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-10{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-10{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-10{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-10{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-10{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q6-10{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q7-10{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q8-10{fill:#542788;background:#542788;stroke:#542788}.PuOr.q9-10{fill:#2d004b;background:#2d004b;stroke:#2d004b}.PuOr.q0-11{fill:#7f3b08;background:#7f3b08;stroke:#7f3b08}.PuOr.q1-11{fill:#b35806;background:#b35806;stroke:#b35806}.PuOr.q2-11{fill:#e08214;background:#e08214;stroke:#e08214}.PuOr.q3-11{fill:#fdb863;background:#fdb863;stroke:#fdb863}.PuOr.q4-11{fill:#fee0b6;background:#fee0b6;stroke:#fee0b6}.PuOr.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PuOr.q6-11{fill:#d8daeb;background:#d8daeb;stroke:#d8daeb}.PuOr.q7-11{fill:#b2abd2;background:#b2abd2;stroke:#b2abd2}.PuOr.q8-11{fill:#8073ac;background:#8073ac;stroke:#8073ac}.PuOr.q9-11{fill:#542788;background:#542788;stroke:#542788}.PuOr.q10-11{fill:#2d004b;background:#2d004b;stroke:#2d004b}.BrBG.q0-3{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q1-3{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q2-3{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q0-4{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-4{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-4{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q3-4{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-5{fill:#a6611a;background:#a6611a;stroke:#a6611a}.BrBG.q1-5{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q2-5{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q3-5{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q4-5{fill:#018571;background:#018571;stroke:#018571}.BrBG.q0-6{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-6{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-6{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-6{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q4-6{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q5-6{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-7{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-7{fill:#d8b365;background:#d8b365;stroke:#d8b365}.BrBG.q2-7{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q3-7{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q4-7{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-7{fill:#5ab4ac;background:#5ab4ac;stroke:#5ab4ac}.BrBG.q6-7{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-8{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-8{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-8{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-8{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-8{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q5-8{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q6-8{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q7-8{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-9{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q1-9{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q2-9{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q3-9{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q4-9{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q5-9{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-9{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-9{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-9{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q0-10{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-10{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-10{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-10{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-10{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-10{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q6-10{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q7-10{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q8-10{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q9-10{fill:#003c30;background:#003c30;stroke:#003c30}.BrBG.q0-11{fill:#543005;background:#543005;stroke:#543005}.BrBG.q1-11{fill:#8c510a;background:#8c510a;stroke:#8c510a}.BrBG.q2-11{fill:#bf812d;background:#bf812d;stroke:#bf812d}.BrBG.q3-11{fill:#dfc27d;background:#dfc27d;stroke:#dfc27d}.BrBG.q4-11{fill:#f6e8c3;background:#f6e8c3;stroke:#f6e8c3}.BrBG.q5-11{fill:#f5f5f5;background:#f5f5f5;stroke:#f5f5f5}.BrBG.q6-11{fill:#c7eae5;background:#c7eae5;stroke:#c7eae5}.BrBG.q7-11{fill:#80cdc1;background:#80cdc1;stroke:#80cdc1}.BrBG.q8-11{fill:#35978f;background:#35978f;stroke:#35978f}.BrBG.q9-11{fill:#01665e;background:#01665e;stroke:#01665e}.BrBG.q10-11{fill:#003c30;background:#003c30;stroke:#003c30}.PRGn.q0-3{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q2-3{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q0-4{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-4{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-4{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q3-4{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-5{fill:#7b3294;background:#7b3294;stroke:#7b3294}.PRGn.q1-5{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q3-5{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q4-5{fill:#008837;background:#008837;stroke:#008837}.PRGn.q0-6{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-6{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-6{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-6{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q4-6{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q5-6{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-7{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-7{fill:#af8dc3;background:#af8dc3;stroke:#af8dc3}.PRGn.q2-7{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q4-7{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-7{fill:#7fbf7b;background:#7fbf7b;stroke:#7fbf7b}.PRGn.q6-7{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-8{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-8{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-8{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-8{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-8{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q5-8{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q6-8{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q7-8{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-9{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q1-9{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q2-9{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q3-9{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q5-9{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-9{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-9{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-9{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q0-10{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-10{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-10{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-10{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-10{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-10{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q6-10{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q7-10{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q8-10{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q9-10{fill:#00441b;background:#00441b;stroke:#00441b}.PRGn.q0-11{fill:#40004b;background:#40004b;stroke:#40004b}.PRGn.q1-11{fill:#762a83;background:#762a83;stroke:#762a83}.PRGn.q2-11{fill:#9970ab;background:#9970ab;stroke:#9970ab}.PRGn.q3-11{fill:#c2a5cf;background:#c2a5cf;stroke:#c2a5cf}.PRGn.q4-11{fill:#e7d4e8;background:#e7d4e8;stroke:#e7d4e8}.PRGn.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PRGn.q6-11{fill:#d9f0d3;background:#d9f0d3;stroke:#d9f0d3}.PRGn.q7-11{fill:#a6dba0;background:#a6dba0;stroke:#a6dba0}.PRGn.q8-11{fill:#5aae61;background:#5aae61;stroke:#5aae61}.PRGn.q9-11{fill:#1b7837;background:#1b7837;stroke:#1b7837}.PRGn.q10-11{fill:#00441b;background:#00441b;stroke:#00441b}.PiYG.q0-3{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q2-3{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q0-4{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-4{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-4{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q3-4{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-5{fill:#d01c8b;background:#d01c8b;stroke:#d01c8b}.PiYG.q1-5{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q3-5{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q4-5{fill:#4dac26;background:#4dac26;stroke:#4dac26}.PiYG.q0-6{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-6{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-6{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-6{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q4-6{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q5-6{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-7{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-7{fill:#e9a3c9;background:#e9a3c9;stroke:#e9a3c9}.PiYG.q2-7{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q4-7{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-7{fill:#a1d76a;background:#a1d76a;stroke:#a1d76a}.PiYG.q6-7{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-8{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-8{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-8{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-8{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-8{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q5-8{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q6-8{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q7-8{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-9{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q1-9{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q2-9{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q3-9{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q5-9{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-9{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-9{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-9{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q0-10{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-10{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-10{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-10{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-10{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-10{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q6-10{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q7-10{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q8-10{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q9-10{fill:#276419;background:#276419;stroke:#276419}.PiYG.q0-11{fill:#8e0152;background:#8e0152;stroke:#8e0152}.PiYG.q1-11{fill:#c51b7d;background:#c51b7d;stroke:#c51b7d}.PiYG.q2-11{fill:#de77ae;background:#de77ae;stroke:#de77ae}.PiYG.q3-11{fill:#f1b6da;background:#f1b6da;stroke:#f1b6da}.PiYG.q4-11{fill:#fde0ef;background:#fde0ef;stroke:#fde0ef}.PiYG.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.PiYG.q6-11{fill:#e6f5d0;background:#e6f5d0;stroke:#e6f5d0}.PiYG.q7-11{fill:#b8e186;background:#b8e186;stroke:#b8e186}.PiYG.q8-11{fill:#7fbc41;background:#7fbc41;stroke:#7fbc41}.PiYG.q9-11{fill:#4d9221;background:#4d9221;stroke:#4d9221}.PiYG.q10-11{fill:#276419;background:#276419;stroke:#276419}.RdBu.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q1-3{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q2-3{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-4{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q3-4{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdBu.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q2-5{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q3-5{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q4-5{fill:#0571b0;background:#0571b0;stroke:#0571b0}.RdBu.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-6{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q4-6{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q5-6{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdBu.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q3-7{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q4-7{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-7{fill:#67a9cf;background:#67a9cf;stroke:#67a9cf}.RdBu.q6-7{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-8{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q5-8{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q6-8{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q7-8{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q4-9{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q5-9{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-9{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-9{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-9{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-10{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q6-10{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q7-10{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q8-10{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q9-10{fill:#053061;background:#053061;stroke:#053061}.RdBu.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdBu.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdBu.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdBu.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdBu.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdBu.q5-11{fill:#f7f7f7;background:#f7f7f7;stroke:#f7f7f7}.RdBu.q6-11{fill:#d1e5f0;background:#d1e5f0;stroke:#d1e5f0}.RdBu.q7-11{fill:#92c5de;background:#92c5de;stroke:#92c5de}.RdBu.q8-11{fill:#4393c3;background:#4393c3;stroke:#4393c3}.RdBu.q9-11{fill:#2166ac;background:#2166ac;stroke:#2166ac}.RdBu.q10-11{fill:#053061;background:#053061;stroke:#053061}.RdGy.q0-3{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q1-3{fill:#fff;background:#fff;stroke:#fff}.RdGy.q2-3{fill:#999;background:#999;stroke:#999}.RdGy.q0-4{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-4{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-4{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q3-4{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-5{fill:#ca0020;background:#ca0020;stroke:#ca0020}.RdGy.q1-5{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q2-5{fill:#fff;background:#fff;stroke:#fff}.RdGy.q3-5{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q4-5{fill:#404040;background:#404040;stroke:#404040}.RdGy.q0-6{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-6{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-6{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-6{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q4-6{fill:#999;background:#999;stroke:#999}.RdGy.q5-6{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-7{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-7{fill:#ef8a62;background:#ef8a62;stroke:#ef8a62}.RdGy.q2-7{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q3-7{fill:#fff;background:#fff;stroke:#fff}.RdGy.q4-7{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-7{fill:#999;background:#999;stroke:#999}.RdGy.q6-7{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-8{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-8{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-8{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-8{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-8{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q5-8{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q6-8{fill:#878787;background:#878787;stroke:#878787}.RdGy.q7-8{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-9{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q1-9{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q2-9{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q3-9{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q4-9{fill:#fff;background:#fff;stroke:#fff}.RdGy.q5-9{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-9{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-9{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-9{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q0-10{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-10{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-10{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-10{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-10{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-10{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q6-10{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q7-10{fill:#878787;background:#878787;stroke:#878787}.RdGy.q8-10{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q9-10{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdGy.q0-11{fill:#67001f;background:#67001f;stroke:#67001f}.RdGy.q1-11{fill:#b2182b;background:#b2182b;stroke:#b2182b}.RdGy.q2-11{fill:#d6604d;background:#d6604d;stroke:#d6604d}.RdGy.q3-11{fill:#f4a582;background:#f4a582;stroke:#f4a582}.RdGy.q4-11{fill:#fddbc7;background:#fddbc7;stroke:#fddbc7}.RdGy.q5-11{fill:#fff;background:#fff;stroke:#fff}.RdGy.q6-11{fill:#e0e0e0;background:#e0e0e0;stroke:#e0e0e0}.RdGy.q7-11{fill:#bababa;background:#bababa;stroke:#bababa}.RdGy.q8-11{fill:#878787;background:#878787;stroke:#878787}.RdGy.q9-11{fill:#4d4d4d;background:#4d4d4d;stroke:#4d4d4d}.RdGy.q10-11{fill:#1a1a1a;background:#1a1a1a;stroke:#1a1a1a}.RdYlBu.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q2-3{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-4{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q3-4{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlBu.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q3-5{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q4-5{fill:#2c7bb6;background:#2c7bb6;stroke:#2c7bb6}.RdYlBu.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-6{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-6{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q4-6{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q5-6{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlBu.q2-7{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q4-7{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-7{fill:#91bfdb;background:#91bfdb;stroke:#91bfdb}.RdYlBu.q6-7{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-8{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-8{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q5-8{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q6-8{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q7-8{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q3-9{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q5-9{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-9{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-9{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-9{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-10{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-10{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q6-10{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q7-10{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q8-10{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q9-10{fill:#313695;background:#313695;stroke:#313695}.RdYlBu.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlBu.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlBu.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlBu.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlBu.q4-11{fill:#fee090;background:#fee090;stroke:#fee090}.RdYlBu.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlBu.q6-11{fill:#e0f3f8;background:#e0f3f8;stroke:#e0f3f8}.RdYlBu.q7-11{fill:#abd9e9;background:#abd9e9;stroke:#abd9e9}.RdYlBu.q8-11{fill:#74add1;background:#74add1;stroke:#74add1}.RdYlBu.q9-11{fill:#4575b4;background:#4575b4;stroke:#4575b4}.RdYlBu.q10-11{fill:#313695;background:#313695;stroke:#313695}.Spectral.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q2-3{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-4{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q3-4{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.Spectral.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q3-5{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q4-5{fill:#2b83ba;background:#2b83ba;stroke:#2b83ba}.Spectral.q0-6{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-6{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q4-6{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q5-6{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-7{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.Spectral.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q4-7{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-7{fill:#99d594;background:#99d594;stroke:#99d594}.Spectral.q6-7{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-8{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-8{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q5-8{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q6-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q7-8{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-9{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q5-9{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-9{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-9{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-9{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q0-10{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-10{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-10{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q6-10{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q7-10{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q8-10{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q9-10{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.Spectral.q0-11{fill:#9e0142;background:#9e0142;stroke:#9e0142}.Spectral.q1-11{fill:#d53e4f;background:#d53e4f;stroke:#d53e4f}.Spectral.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.Spectral.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.Spectral.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.Spectral.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.Spectral.q6-11{fill:#e6f598;background:#e6f598;stroke:#e6f598}.Spectral.q7-11{fill:#abdda4;background:#abdda4;stroke:#abdda4}.Spectral.q8-11{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Spectral.q9-11{fill:#3288bd;background:#3288bd;stroke:#3288bd}.Spectral.q10-11{fill:#5e4fa2;background:#5e4fa2;stroke:#5e4fa2}.RdYlGn.q0-3{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q1-3{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q2-3{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q0-4{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-4{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-4{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q3-4{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-5{fill:#d7191c;background:#d7191c;stroke:#d7191c}.RdYlGn.q1-5{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q2-5{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q3-5{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q4-5{fill:#1a9641;background:#1a9641;stroke:#1a9641}.RdYlGn.q0-6{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-6{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-6{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-6{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q4-6{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q5-6{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-7{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-7{fill:#fc8d59;background:#fc8d59;stroke:#fc8d59}.RdYlGn.q2-7{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q3-7{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q4-7{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-7{fill:#91cf60;background:#91cf60;stroke:#91cf60}.RdYlGn.q6-7{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-8{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-8{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-8{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-8{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-8{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q5-8{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q6-8{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q7-8{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-9{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q1-9{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q2-9{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q3-9{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q4-9{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q5-9{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-9{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-9{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-9{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q0-10{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-10{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-10{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-10{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-10{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-10{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q6-10{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q7-10{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q8-10{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q9-10{fill:#006837;background:#006837;stroke:#006837}.RdYlGn.q0-11{fill:#a50026;background:#a50026;stroke:#a50026}.RdYlGn.q1-11{fill:#d73027;background:#d73027;stroke:#d73027}.RdYlGn.q2-11{fill:#f46d43;background:#f46d43;stroke:#f46d43}.RdYlGn.q3-11{fill:#fdae61;background:#fdae61;stroke:#fdae61}.RdYlGn.q4-11{fill:#fee08b;background:#fee08b;stroke:#fee08b}.RdYlGn.q5-11{fill:#ffffbf;background:#ffffbf;stroke:#ffffbf}.RdYlGn.q6-11{fill:#d9ef8b;background:#d9ef8b;stroke:#d9ef8b}.RdYlGn.q7-11{fill:#a6d96a;background:#a6d96a;stroke:#a6d96a}.RdYlGn.q8-11{fill:#66bd63;background:#66bd63;stroke:#66bd63}.RdYlGn.q9-11{fill:#1a9850;background:#1a9850;stroke:#1a9850}.RdYlGn.q10-11{fill:#006837;background:#006837;stroke:#006837}.Accent.q0-3{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-3{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-3{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q0-4{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-4{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-4{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-4{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q0-5{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-5{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-5{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-5{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-5{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q0-6{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-6{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-6{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-6{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-6{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-6{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q0-7{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-7{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-7{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-7{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-7{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-7{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-7{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q0-8{fill:#7fc97f;background:#7fc97f;stroke:#7fc97f}.Accent.q1-8{fill:#beaed4;background:#beaed4;stroke:#beaed4}.Accent.q2-8{fill:#fdc086;background:#fdc086;stroke:#fdc086}.Accent.q3-8{fill:#ff9;background:#ff9;stroke:#ff9}.Accent.q4-8{fill:#386cb0;background:#386cb0;stroke:#386cb0}.Accent.q5-8{fill:#f0027f;background:#f0027f;stroke:#f0027f}.Accent.q6-8{fill:#bf5b17;background:#bf5b17;stroke:#bf5b17}.Accent.q7-8{fill:#666;background:#666;stroke:#666}.Dark2.q0-3{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-3{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-3{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q0-4{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-4{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-4{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-4{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q0-5{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-5{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-5{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-5{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-5{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q0-6{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-6{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-6{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-6{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-6{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-6{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q0-7{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-7{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-7{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-7{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-7{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-7{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-7{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q0-8{fill:#1b9e77;background:#1b9e77;stroke:#1b9e77}.Dark2.q1-8{fill:#d95f02;background:#d95f02;stroke:#d95f02}.Dark2.q2-8{fill:#7570b3;background:#7570b3;stroke:#7570b3}.Dark2.q3-8{fill:#e7298a;background:#e7298a;stroke:#e7298a}.Dark2.q4-8{fill:#66a61e;background:#66a61e;stroke:#66a61e}.Dark2.q5-8{fill:#e6ab02;background:#e6ab02;stroke:#e6ab02}.Dark2.q6-8{fill:#a6761d;background:#a6761d;stroke:#a6761d}.Dark2.q7-8{fill:#666;background:#666;stroke:#666}.Paired.q0-3{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-3{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-3{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q0-4{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-4{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-4{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-4{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q0-5{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-5{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-5{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-5{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-5{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q0-6{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-6{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-6{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-6{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-6{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-6{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q0-7{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-7{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-7{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-7{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-7{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-7{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-7{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q0-8{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-8{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-8{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-8{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-8{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-8{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-8{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q0-9{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-9{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-9{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-9{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-9{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-9{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-9{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-9{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q0-10{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-10{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-10{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-10{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-10{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-10{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-10{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-10{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-10{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-10{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q0-11{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-11{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-11{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-11{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-11{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-11{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-11{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-11{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-11{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-11{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-11{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q0-12{fill:#a6cee3;background:#a6cee3;stroke:#a6cee3}.Paired.q1-12{fill:#1f78b4;background:#1f78b4;stroke:#1f78b4}.Paired.q2-12{fill:#b2df8a;background:#b2df8a;stroke:#b2df8a}.Paired.q3-12{fill:#33a02c;background:#33a02c;stroke:#33a02c}.Paired.q4-12{fill:#fb9a99;background:#fb9a99;stroke:#fb9a99}.Paired.q5-12{fill:#e31a1c;background:#e31a1c;stroke:#e31a1c}.Paired.q6-12{fill:#fdbf6f;background:#fdbf6f;stroke:#fdbf6f}.Paired.q7-12{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Paired.q8-12{fill:#cab2d6;background:#cab2d6;stroke:#cab2d6}.Paired.q9-12{fill:#6a3d9a;background:#6a3d9a;stroke:#6a3d9a}.Paired.q10-12{fill:#ff9;background:#ff9;stroke:#ff9}.Paired.q11-12{fill:#b15928;background:#b15928;stroke:#b15928}.Pastel1.q0-3{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-3{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-3{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q0-4{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-4{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-4{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-4{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q0-5{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-5{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-5{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-5{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-5{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q0-6{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-6{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-6{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-6{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-6{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-6{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q0-7{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-7{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-7{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-7{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-7{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-7{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-7{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q0-8{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-8{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-8{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-8{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-8{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-8{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-8{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-8{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q0-9{fill:#fbb4ae;background:#fbb4ae;stroke:#fbb4ae}.Pastel1.q1-9{fill:#b3cde3;background:#b3cde3;stroke:#b3cde3}.Pastel1.q2-9{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Pastel1.q3-9{fill:#decbe4;background:#decbe4;stroke:#decbe4}.Pastel1.q4-9{fill:#fed9a6;background:#fed9a6;stroke:#fed9a6}.Pastel1.q5-9{fill:#ffc;background:#ffc;stroke:#ffc}.Pastel1.q6-9{fill:#e5d8bd;background:#e5d8bd;stroke:#e5d8bd}.Pastel1.q7-9{fill:#fddaec;background:#fddaec;stroke:#fddaec}.Pastel1.q8-9{fill:#f2f2f2;background:#f2f2f2;stroke:#f2f2f2}.Pastel2.q0-3{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-3{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-3{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q0-4{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-4{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-4{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-4{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q0-5{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-5{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-5{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-5{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-5{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q0-6{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-6{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-6{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-6{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-6{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-6{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q0-7{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-7{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-7{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-7{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-7{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-7{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-7{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q0-8{fill:#b3e2cd;background:#b3e2cd;stroke:#b3e2cd}.Pastel2.q1-8{fill:#fdcdac;background:#fdcdac;stroke:#fdcdac}.Pastel2.q2-8{fill:#cbd5e8;background:#cbd5e8;stroke:#cbd5e8}.Pastel2.q3-8{fill:#f4cae4;background:#f4cae4;stroke:#f4cae4}.Pastel2.q4-8{fill:#e6f5c9;background:#e6f5c9;stroke:#e6f5c9}.Pastel2.q5-8{fill:#fff2ae;background:#fff2ae;stroke:#fff2ae}.Pastel2.q6-8{fill:#f1e2cc;background:#f1e2cc;stroke:#f1e2cc}.Pastel2.q7-8{fill:#ccc;background:#ccc;stroke:#ccc}.Set1.q0-3{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-3{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-3{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q0-4{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-4{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-4{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-4{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q0-5{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-5{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-5{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-5{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-5{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q0-6{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-6{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-6{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-6{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-6{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-6{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q0-7{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-7{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-7{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-7{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-7{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-7{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-7{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q0-8{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-8{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-8{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-8{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-8{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-8{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-8{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-8{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q0-9{fill:#e41a1c;background:#e41a1c;stroke:#e41a1c}.Set1.q1-9{fill:#377eb8;background:#377eb8;stroke:#377eb8}.Set1.q2-9{fill:#4daf4a;background:#4daf4a;stroke:#4daf4a}.Set1.q3-9{fill:#984ea3;background:#984ea3;stroke:#984ea3}.Set1.q4-9{fill:#ff7f00;background:#ff7f00;stroke:#ff7f00}.Set1.q5-9{fill:#ff3;background:#ff3;stroke:#ff3}.Set1.q6-9{fill:#a65628;background:#a65628;stroke:#a65628}.Set1.q7-9{fill:#f781bf;background:#f781bf;stroke:#f781bf}.Set1.q8-9{fill:#999;background:#999;stroke:#999}.Set2.q0-3{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-3{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-3{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q0-4{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-4{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-4{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-4{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q0-5{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-5{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-5{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-5{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-5{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q0-6{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-6{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-6{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-6{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-6{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-6{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q0-7{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-7{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-7{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-7{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-7{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-7{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-7{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q0-8{fill:#66c2a5;background:#66c2a5;stroke:#66c2a5}.Set2.q1-8{fill:#fc8d62;background:#fc8d62;stroke:#fc8d62}.Set2.q2-8{fill:#8da0cb;background:#8da0cb;stroke:#8da0cb}.Set2.q3-8{fill:#e78ac3;background:#e78ac3;stroke:#e78ac3}.Set2.q4-8{fill:#a6d854;background:#a6d854;stroke:#a6d854}.Set2.q5-8{fill:#ffd92f;background:#ffd92f;stroke:#ffd92f}.Set2.q6-8{fill:#e5c494;background:#e5c494;stroke:#e5c494}.Set2.q7-8{fill:#b3b3b3;background:#b3b3b3;stroke:#b3b3b3}.Set3.q0-3{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-3{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-3{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q0-4{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-4{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-4{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-4{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q0-5{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-5{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-5{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-5{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-5{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q0-6{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-6{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-6{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-6{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-6{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-6{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q0-7{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-7{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-7{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-7{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-7{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-7{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-7{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q0-8{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-8{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-8{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-8{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-8{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-8{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-8{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-8{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q0-9{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-9{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-9{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-9{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-9{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-9{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-9{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-9{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-9{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q0-10{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-10{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-10{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-10{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-10{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-10{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-10{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-10{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-10{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-10{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q0-11{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-11{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-11{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-11{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-11{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-11{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-11{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-11{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-11{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-11{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-11{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q0-12{fill:#8dd3c7;background:#8dd3c7;stroke:#8dd3c7}.Set3.q1-12{fill:#ffffb3;background:#ffffb3;stroke:#ffffb3}.Set3.q2-12{fill:#bebada;background:#bebada;stroke:#bebada}.Set3.q3-12{fill:#fb8072;background:#fb8072;stroke:#fb8072}.Set3.q4-12{fill:#80b1d3;background:#80b1d3;stroke:#80b1d3}.Set3.q5-12{fill:#fdb462;background:#fdb462;stroke:#fdb462}.Set3.q6-12{fill:#b3de69;background:#b3de69;stroke:#b3de69}.Set3.q7-12{fill:#fccde5;background:#fccde5;stroke:#fccde5}.Set3.q8-12{fill:#d9d9d9;background:#d9d9d9;stroke:#d9d9d9}.Set3.q9-12{fill:#bc80bd;background:#bc80bd;stroke:#bc80bd}.Set3.q10-12{fill:#ccebc5;background:#ccebc5;stroke:#ccebc5}.Set3.q11-12{fill:#ffed6f;background:#ffed6f;stroke:#ffed6f}.graphical-report__layout{line-height:1;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;-ms-flex-direction:column;flex-direction:column;height:100%;width:100%;overflow:auto;background:0 0;color:#333}.graphical-report__layout text{font:400 13px Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;fill:#333}.graphical-report__chart{font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif;position:absolute;height:100%;width:100%;overflow:auto}.graphical-report__layout__header{-ms-flex:0 .1 auto;flex:0 .1 auto;position:relative}.graphical-report__layout__container{display:-webkit-flexbox;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;height:100%}.graphical-report__layout__footer,.graphical-report__layout__sidebar{-ms-flex:0 1 auto;flex:0 1 auto}.graphical-report__layout__content{-ms-flex:1 1 auto;flex:1 1 auto;overflow:hidden}.graphical-report__layout__sidebar-right{position:relative;overflow:hidden;-ms-flex:0 0 auto;flex:0 0 auto}.graphical-report__layout__sidebar-right__wrap{max-height:100%;box-sizing:border-box}.graphical-report__layout.graphical-report__layout_rendering-error{opacity:.75}.graphical-report__rendering-timeout-warning{-ms-flex-align:center;align-items:center;background:rgba(255,255,255,.5);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;position:absolute;top:0;width:100%}.graphical-report__rendering-timeout-warning svg{height:100%;max-width:32em;width:100%}.graphical-report__rendering-timeout-warning text{font-weight:300}.graphical-report__progress{box-sizing:border-box;height:.25em;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:opacity 1s .75s;width:100%}.graphical-report__progress_active{opacity:1}.graphical-report__progress__value{background:rgba(51,51,51,.25);height:100%;transition:width .75s}.graphical-report__checkbox{position:relative;display:block}.graphical-report__checkbox__input{position:absolute;z-index:-1;opacity:0}.graphical-report__checkbox__icon{position:relative;width:14px;height:14px;top:3px;display:inline-block;border:1px solid #c3c3c3;border-radius:2px;background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__icon:before{display:none;content:'';background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC);width:100%;height:100%;position:absolute;top:0;left:0}.graphical-report__checkbox__text{margin-left:5px}.graphical-report__checkbox__input~.graphical-report__checkbox__text{cursor:pointer}.graphical-report__checkbox__input:disabled~.graphical-report__checkbox__text,.graphical-report__select[disabled]{opacity:.3;cursor:default}.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled)~.graphical-report__checkbox__icon{border-color:#999}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon{background:linear-gradient(to bottom,#fff 0,#dbdbde 100%)}.graphical-report__checkbox__input:checked+.graphical-report__checkbox__icon:before{display:block}.graphical-report__select{font-size:13px;font-family:inherit;display:inline-block;height:24px;line-height:24px;vertical-align:middle;padding:2px;background-color:#fff;border:1px solid #c3c3c3;border-radius:2px;color:#333}.graphical-report__select[multiple]{height:auto}.graphical-report__select option[disabled]{opacity:.6}.graphical-report-btn{background-color:rgba(255,255,255,.9);border:1px solid currentColor;border-radius:4px;box-shadow:0 0 1px rgba(0,0,0,.1);box-sizing:border-box;color:#b3b3b3;cursor:pointer;font-size:13px;padding:0 6px;line-height:1.5em;height:calc(1.5em + 2px)}.graphical-report-btn:hover{border-color:#999;color:#333}.graphical-report__svg .color20-1{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__svg .color20-2{stroke:#DF2B59;fill:#DF2B59}.graphical-report__svg .color20-3{stroke:#66DA26;fill:#66DA26}.graphical-report__svg .color20-4{stroke:#4C3862;fill:#4C3862}.graphical-report__svg .color20-5{stroke:#E5B011;fill:#E5B011}.graphical-report__svg .color20-6{stroke:#3A3226;fill:#3A3226}.graphical-report__svg .color20-7{stroke:#CB461A;fill:#CB461A}.graphical-report__svg .color20-8{stroke:#C7CE23;fill:#C7CE23}.graphical-report__svg .color20-9{stroke:#7FCDC2;fill:#7FCDC2}.graphical-report__svg .color20-10{stroke:#CCA1C8;fill:#CCA1C8}.graphical-report__svg .color20-11{stroke:#C84CCE;fill:#C84CCE}.graphical-report__svg .color20-12{stroke:#54762E;fill:#54762E}.graphical-report__svg .color20-13{stroke:#746BC9;fill:#746BC9}.graphical-report__svg .color20-14{stroke:#953441;fill:#953441}.graphical-report__svg .color20-15{stroke:#5C7A76;fill:#5C7A76}.graphical-report__svg .color20-16{stroke:#C8BF87;fill:#C8BF87}.graphical-report__svg .color20-17{stroke:#BFC1C3;fill:#BFC1C3}.graphical-report__svg .color20-18{stroke:#8E5C31;fill:#8E5C31}.graphical-report__svg .color20-19{stroke:#71CE7B;fill:#71CE7B}.graphical-report__svg .color20-20{stroke:#BE478B;fill:#BE478B}.graphical-report__svg .color-default{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__line-width-1{stroke-width:1px}.graphical-report__line-width-2{stroke-width:1.5px}.graphical-report__line-width-3{stroke-width:2px}.graphical-report__line-width-4{stroke-width:2.5px}.graphical-report__line-width-5{stroke-width:3px}.graphical-report__line-opacity-1{stroke-opacity:1}.graphical-report__line-opacity-2{stroke-opacity:.95}.graphical-report__line-opacity-3{stroke-opacity:.9}.graphical-report__line-opacity-4{stroke-opacity:.85}.graphical-report__line-opacity-5{stroke-opacity:.8}.graphical-report a{color:#3962FF;border-bottom:1px solid rgba(57,98,255,.3);text-decoration:none}.graphical-report a:hover{color:#E17152;border-bottom:1px solid rgba(225,113,82,.3)}.graphical-report__d3-time-overflown .tick:nth-child(even){display:none}.graphical-report__svg{display:block;overflow:hidden}.graphical-report__svg .place{fill:#fff;stroke:#000;stroke-opacity:.7;stroke-width:.5}.graphical-report__svg .place-label{opacity:.7;font-size:11px;color:#000;line-height:13px;text-anchor:start}.graphical-report__svg .place-label-countries,.graphical-report__svg .place-label-states,.graphical-report__svg .place-label-subunits{text-anchor:middle;font-size:10px;fill:rgba(51,51,51,.5);line-height:10px;text-transform:capitalize}.graphical-report__svg .map-contour-level path{stroke-opacity:.5;stroke-linejoin:'round'}.graphical-report__svg .map-contour-highlighted path,.graphical-report__svg .map-contour-level-0 path,.graphical-report__svg .map-contour-level-1 path,.graphical-report__svg .map-contour-level-2 path,.graphical-report__svg .map-contour-level-3 path,.graphical-report__svg .map-contour-level-4 path,.graphical-report__svg .map-contour:hover path{stroke:#fff}.graphical-report__svg .map-contour-highlighted,.graphical-report__svg .map-contour:hover{fill:#FFBF00}.graphical-report__svg .map-contour-highlighted text,.graphical-report__svg .map-contour:hover text{fill:#000}.graphical-report__svg .axis line,.graphical-report__svg .axis path{stroke-width:1;fill:none;stroke:rgba(189,195,205,.4);shape-rendering:crispEdges}.graphical-report__svg .axis.facet-axis .tick line{opacity:0}.graphical-report__svg .axis.facet-axis .tick line.label-ref{opacity:1}.graphical-report__svg .axis.facet-axis .tick text{font-weight:600}.graphical-report__svg .axis.facet-axis path.domain{opacity:0}.graphical-report__svg .axis.facet-axis.compact .label,.graphical-report__svg .axis.facet-axis.compact .label .label-token,.graphical-report__svg .axis.facet-axis.compact .tick text{font-weight:400}.graphical-report__svg .tick text{font-size:11px}.graphical-report__svg .grid .grid-lines path{shape-rendering:crispEdges}.graphical-report__svg .grid .line path,.graphical-report__svg .grid path.domain,.graphical-report__svg .grid path.line{fill:none}.graphical-report__svg .grid .tick>line{fill:none;stroke:rgba(189,195,205,.4);stroke-width:1px;shape-rendering:crispEdges}.graphical-report__svg .grid .tick.zero-tick>line{stroke:rgba(126,129,134,.505)}.graphical-report__svg .grid .line path{shape-rendering:auto}.graphical-report__svg .grid .cursor-line{shape-rendering:crispEdges;stroke:#ccc;stroke-width:1px}.graphical-report__svg .label{font-size:12px;font-weight:600}.graphical-report__svg .label .label-token{font-size:12px;font-weight:600;text-transform:capitalize}.graphical-report__svg .label .label-token-1,.graphical-report__svg .label .label-token-2{font-weight:400}.graphical-report__svg .label .label-token-2{fill:gray}.graphical-report__svg .label .label-token-delimiter{font-weight:400;fill:gray}.graphical-report__svg .label.inline .label-token{font-weight:400;fill:gray;text-transform:none}.graphical-report__svg .brush .extent{fill-opacity:.3;stroke:#fff;shape-rendering:crispEdges}.graphical-report__svg .background{stroke:#f2f2f2}.graphical-report__dot{opacity:.7;stroke-width:0;transition:stroke-width .1s ease,opacity .2s ease}.graphical-report__line{fill:none;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__dot-line{opacity:1;transition:stroke-opacity .2s ease}.graphical-report__area,.graphical-report__bar{transition:opacity .2s ease}.graphical-report__bar{opacity:.7;shape-rendering:geometricPrecision;stroke-opacity:.5;stroke-width:1;stroke:#fff}.graphical-report__area path,.graphical-report__area polygon{opacity:.6;transition:stroke-opacity .2s ease,stroke-width .2s ease}.graphical-report__svg .graphical-report__bar{stroke:#fff}.graphical-report__dot.graphical-report__highlighted{stroke-width:1;opacity:1}.graphical-report__dot.graphical-report__dimmed{opacity:.2}.graphical-report__line.graphical-report__highlighted{stroke-opacity:1;stroke-width:3}.graphical-report__line.graphical-report__dimmed{stroke-opacity:.2}.graphical-report__area.graphical-report__highlighted,.graphical-report__bar.graphical-report__highlighted,.i-role-label.graphical-report__highlighted{stroke-opacity:1;opacity:1}.graphical-report__area.graphical-report__dimmed,.graphical-report__bar.graphical-report__dimmed,.i-role-label.graphical-report__dimmed{opacity:.2}.graphical-report__annotation-line{stroke-width:2px;stroke-dasharray:1,1;shape-rendering:crispEdges}.graphical-report__annotation-area.graphical-report__area polygon{opacity:.1}.graphical-report__layout .tau-crosshair__line{shape-rendering:crispEdges;stroke-dasharray:1px 1px;stroke-width:1px}.graphical-report__layout .tau-crosshair__label__text{fill:#fff;stroke:none}.graphical-report__layout .tau-crosshair__label__text,.graphical-report__layout .tau-crosshair__label__text-shadow{font-size:12px;font-weight:400}.graphical-report__layout .tau-crosshair__line-shadow{shape-rendering:crispEdges;stroke:#fff;stroke-width:1px}.graphical-report__layout .tau-crosshair__group.y .tau-crosshair__line-shadow{transform:translateX(-.5px)}.graphical-report__layout .tau-crosshair__group.x .tau-crosshair__line-shadow{transform:translateY(.5px)}.graphical-report__layout .tau-crosshair__label__text-shadow{stroke-linejoin:round;stroke-width:3px;visibility:hidden}.graphical-report__layout .tau-crosshair__label__box{fill-opacity:.85;rx:3px;ry:3px;stroke:none}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-1{stroke:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box{fill:#6FA1D9}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-2{stroke:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box{fill:#DF2B59}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-3{stroke:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box{fill:#66DA26}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-4{stroke:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box{fill:#4C3862}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-5{stroke:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box{fill:#E5B011}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-6{stroke:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box{fill:#3A3226}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-7{stroke:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box{fill:#CB461A}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-8{stroke:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box{fill:#C7CE23}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-9{stroke:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box{fill:#7FCDC2}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-10{stroke:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box{fill:#CCA1C8}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-11{stroke:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box{fill:#C84CCE}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-12{stroke:#54762E}.graphical-report__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box{fill:#54762E}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-13{stroke:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box{fill:#746BC9}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-14{stroke:#953441}.graphical-report__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box{fill:#953441}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-15{stroke:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box{fill:#5C7A76}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-16{stroke:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box{fill:#C8BF87}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-17{stroke:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box{fill:#BFC1C3}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-18{stroke:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box{fill:#8E5C31}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-19{stroke:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box{fill:#71CE7B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow,.graphical-report__layout .tau-crosshair__line.color20-20{stroke:#BE478B}.graphical-report__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box{fill:#BE478B}.graphical-report__print-block{display:none}.graphical-report__export{float:right;margin:0 20px 0 0;display:block;text-indent:20px;overflow:hidden;background-repeat:no-repeat;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=);width:20px;height:20px;color:transparent;opacity:.6;cursor:pointer;text-decoration:none;position:relative;z-index:2}.graphical-report__export:hover{opacity:1;text-decoration:none}.graphical-report__export__list{font-size:11px;margin:0;padding:0}.graphical-report__export__item{overflow:hidden;box-sizing:border-box}.graphical-report__export__item>a{display:block;padding:7px 15px;color:inherit;text-decoration:none;cursor:pointer}.graphical-report__export__item>a:focus,.graphical-report__export__item>a:hover{background:#EAF2FC;outline:0;box-shadow:none}.graphical-report__legend{padding:20px 0 10px 10px;position:relative;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__legend__wrap{margin-bottom:30px;position:relative}.graphical-report__legend__wrap:last-child{margin-bottom:0}.graphical-report__legend__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__legend__reset{margin-top:-4px;position:absolute;right:-25px;top:0;z-index:1}.graphical-report__legend__reset.disabled{display:none}.graphical-report__legend__reset+.graphical-report__legend__title{margin-right:1.7em}.graphical-report__legend__item{padding:10px 20px 8px 40px;position:relative;font-size:13px;line-height:1.2em;cursor:pointer}.graphical-report__legend__item:hover{background-color:rgba(189,195,205,.2)}.graphical-report__legend__item--size{cursor:default}.graphical-report__legend__item--size:hover{background:0 0}.graphical-report__legend__item .color-default{background:#6FA1D9;border-color:#6FA1D9}.graphical-report__legend__item.disabled,.graphical-report__legend__item:disabled{color:#ccc}.graphical-report__legend__item.disabled .graphical-report__legend__guide{background:0 0}.graphical-report__legend__guide{position:absolute;box-sizing:border-box;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;border-radius:50%}.graphical-report__legend__guide__wrap{position:absolute;top:calc((10px - 8px) + .6em);left:10px;width:16px;height:16px}.graphical-report__legend__guide--size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__guide--color__overlay{background-color:transparent;height:36px;left:-12px;position:absolute;top:-12px;width:36px}.graphical-report__legend__guide--color::before{content:"";display:none;height:2px;left:3px;pointer-events:none;position:absolute;top:6px;width:8px}.graphical-report__legend__guide--color::after{content:"";display:none;height:8px;left:6px;pointer-events:none;position:absolute;top:3px;width:2px}.graphical-report__legend__item .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item .graphical-report__legend__guide--color:hover::before{background-color:#fff;display:inline-block;transform:rotate(45deg)}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover{background:#fff}.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::after,.graphical-report__legend__item.disabled .graphical-report__legend__guide--color:hover::before{background-color:#333;transform:none}.graphical-report__legend__gradient-wrapper,.graphical-report__legend__size-wrapper{box-sizing:border-box;margin:10px;overflow:visible;width:100%}.graphical-report__legend__gradient,.graphical-report__legend__size{overflow:visible}.graphical-report__legend__size__item__circle.color-definite{stroke:#cacaca;fill:#cacaca}.graphical-report__legend__size__item__circle.color-default-size{stroke:#6FA1D9;fill:#6FA1D9}.graphical-report__legend__gradient__bar{rx:4px;ry:4px}.graphical-report__legend__item .color20-1{background:#6FA1D9;border:1px solid #6FA1D9}.graphical-report__legend__item.disabled .color20-1{background-color:transparent}.graphical-report__legend__item .color20-2{background:#DF2B59;border:1px solid #DF2B59}.graphical-report__legend__item.disabled .color20-2{background-color:transparent}.graphical-report__legend__item .color20-3{background:#66DA26;border:1px solid #66DA26}.graphical-report__legend__item.disabled .color20-3{background-color:transparent}.graphical-report__legend__item .color20-4{background:#4C3862;border:1px solid #4C3862}.graphical-report__legend__item.disabled .color20-4{background-color:transparent}.graphical-report__legend__item .color20-5{background:#E5B011;border:1px solid #E5B011}.graphical-report__legend__item.disabled .color20-5{background-color:transparent}.graphical-report__legend__item .color20-6{background:#3A3226;border:1px solid #3A3226}.graphical-report__legend__item.disabled .color20-6{background-color:transparent}.graphical-report__legend__item .color20-7{background:#CB461A;border:1px solid #CB461A}.graphical-report__legend__item.disabled .color20-7{background-color:transparent}.graphical-report__legend__item .color20-8{background:#C7CE23;border:1px solid #C7CE23}.graphical-report__legend__item.disabled .color20-8{background-color:transparent}.graphical-report__legend__item .color20-9{background:#7FCDC2;border:1px solid #7FCDC2}.graphical-report__legend__item.disabled .color20-9{background-color:transparent}.graphical-report__legend__item .color20-10{background:#CCA1C8;border:1px solid #CCA1C8}.graphical-report__legend__item.disabled .color20-10{background-color:transparent}.graphical-report__legend__item .color20-11{background:#C84CCE;border:1px solid #C84CCE}.graphical-report__legend__item.disabled .color20-11{background-color:transparent}.graphical-report__legend__item .color20-12{background:#54762E;border:1px solid #54762E}.graphical-report__legend__item.disabled .color20-12{background-color:transparent}.graphical-report__legend__item .color20-13{background:#746BC9;border:1px solid #746BC9}.graphical-report__legend__item.disabled .color20-13{background-color:transparent}.graphical-report__legend__item .color20-14{background:#953441;border:1px solid #953441}.graphical-report__legend__item.disabled .color20-14{background-color:transparent}.graphical-report__legend__item .color20-15{background:#5C7A76;border:1px solid #5C7A76}.graphical-report__legend__item.disabled .color20-15{background-color:transparent}.graphical-report__legend__item .color20-16{background:#C8BF87;border:1px solid #C8BF87}.graphical-report__legend__item.disabled .color20-16{background-color:transparent}.graphical-report__legend__item .color20-17{background:#BFC1C3;border:1px solid #BFC1C3}.graphical-report__legend__item.disabled .color20-17{background-color:transparent}.graphical-report__legend__item .color20-18{background:#8E5C31;border:1px solid #8E5C31}.graphical-report__legend__item.disabled .color20-18{background-color:transparent}.graphical-report__legend__item .color20-19{background:#71CE7B;border:1px solid #71CE7B}.graphical-report__legend__item.disabled .color20-19{background-color:transparent}.graphical-report__legend__item .color20-20{background:#BE478B;border:1px solid #BE478B}.graphical-report__legend__item.disabled .color20-20{background-color:transparent}.graphical-report__filter__wrap{padding:20px 0 10px 10px;margin-right:30px;width:160px;box-sizing:border-box}.graphical-report__filter__wrap__title{margin:0 0 10px 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__filter__wrap .resize.e text,.graphical-report__filter__wrap .resize.w text,.graphical-report__filter__wrap text.date-label{text-anchor:middle;font-size:12px}.graphical-report__filter__wrap rect{fill:rgba(0,0,0,.2)}.graphical-report__filter__wrap .brush .extent{shape-rendering:crispEdges;fill-opacity:.4;fill:#0074FF}.graphical-report__filter__wrap text.date-label .common{font-weight:600}.graphical-report__filter__wrap .resize line{stroke:#000;stroke-width:1px;shape-rendering:crispEdges}.graphical-report__tooltip{position:absolute;top:0;left:0;max-width:none;z-index:900;display:-ms-flexbox;display:flex;-ms-flex-align:stretch;align-items:stretch;font-size:11px;background:rgba(255,255,255,.9);box-shadow:0 1px 4px 0 rgba(0,0,0,.2),0 0 0 1px rgba(0,0,0,.005);overflow:hidden;font-family:Helvetica Neue,Segoe UI,Open Sans,Ubuntu,sans-serif}.graphical-report__tooltip.fade{opacity:0;transition:opacity .2s ease-out}.graphical-report__tooltip.fade.in{opacity:1;transition-duration:.5s}.graphical-report__tooltip.bottom-right,.graphical-report__tooltip.top-right{margin-left:8px}.graphical-report__tooltip.bottom-left,.graphical-report__tooltip.top-left{margin-left:-8px}.graphical-report__tooltip.top-left,.graphical-report__tooltip.top-right{margin-top:8px}.graphical-report__tooltip__content{max-width:500px;overflow:hidden;padding:15px 15px 10px;box-sizing:border-box}.graphical-report__tooltip.stuck .graphical-report__tooltip__exclude,.graphical-report__tooltip.stuck .graphical-report__tooltip__vertical{width:26px}.graphical-report__tooltip__exclude,.graphical-report__tooltip__vertical{box-shadow:inset 2px 0 2px -2px rgba(0,0,0,.2);-ms-flex:0 0 auto;flex:0 0 auto;color:rgba(101,113,127,.8);cursor:pointer;min-height:86px;overflow:hidden;position:relative;transition:width .5s;width:0}.graphical-report__tooltip__exclude__wrap,.graphical-report__tooltip__vertical__wrap{left:calc(100% - 26px);line-height:26px;padding:0 15px;transform:rotate(-90deg);transform-origin:0 0;height:100%;white-space:nowrap;position:absolute;top:100%;box-sizing:border-box}.graphical-report__tooltip__exclude:hover,.graphical-report__tooltip__vertical:hover{color:#65717F;background:linear-gradient(to right,rgba(235,238,241,.9) 0,rgba(235,238,241,0) 100%)}.graphical-report__tooltip__exclude .tau-icon-close-gray,.graphical-report__tooltip__vertical .tau-icon-close-gray{display:inline-block;width:12px;height:12px;position:relative;top:3px;margin-right:5px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzAgMzAiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGlkPSJTaGFwZV8zNV8iIGZpbGw9IiM4NDk2QTciIGQ9Ik0xMCwwLjcxNUw5LjI4NSwwTDUsNC4yODVMMC43MTUsMEwwLDAuNzE1TDQuMjg1LDVMMCw5LjI4NUwwLjcxNSwxMEw1LDUuNzE1TDkuMjg1LDEwTDEwLDkuMjg1TDUuNzE1LDVMMTAsMC43MTV6Ii8+PC9zdmc+)}.graphical-report__tooltip__list{display:table}.graphical-report__tooltip__list__item{display:table-row}.graphical-report__tooltip__list__elem{display:table-cell;padding-bottom:4px;line-height:1.3;color:#000}.graphical-report__tooltip__list__elem:not(:first-child){padding-left:15px}.graphical-report__tooltip__gray-text,.graphical-report__tooltip__list__elem:first-child{color:#8e8e8e}.graphical-report__tooltip-target{cursor:pointer}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted,.graphical-report__tooltip-target .graphical-report__dot.graphical-report__highlighted,.graphical-report__tooltip-target .i-data-anchor.graphical-report__highlighted{stroke:#333;stroke-width:1}.graphical-report__tooltip-target .graphical-report__bar.graphical-report__highlighted{shape-rendering:crispEdges}.graphical-report__svg .graphical-report__trendline.color20-1{stroke:#357ac7}.graphical-report__svg .graphical-report__trendline.color20-2{stroke:#a5193d}.graphical-report__svg .graphical-report__trendline.color20-3{stroke:#47991a}.graphical-report__svg .graphical-report__trendline.color20-4{stroke:#261c31}.graphical-report__svg .graphical-report__trendline.color20-5{stroke:#9e790c}.graphical-report__svg .graphical-report__trendline.color20-6{stroke:#0c0a08}.graphical-report__svg .graphical-report__trendline.color20-7{stroke:#872f11}.graphical-report__svg .graphical-report__trendline.color20-8{stroke:#888d18}.graphical-report__svg .graphical-report__trendline.color20-9{stroke:#48b8a8}.graphical-report__svg .graphical-report__trendline.color20-10{stroke:#b16fab}.graphical-report__svg .graphical-report__trendline.color20-11{stroke:#9c2ca1}.graphical-report__svg .graphical-report__trendline.color20-12{stroke:#2d3f19}.graphical-report__svg .graphical-report__trendline.color20-13{stroke:#483eaa}.graphical-report__svg .graphical-report__trendline.color20-14{stroke:#5c2028}.graphical-report__svg .graphical-report__trendline.color20-15{stroke:#3b4e4c}.graphical-report__svg .graphical-report__trendline.color20-16{stroke:#b0a353}.graphical-report__svg .graphical-report__trendline.color20-17{stroke:#989b9e}.graphical-report__svg .graphical-report__trendline.color20-18{stroke:#55371d}.graphical-report__svg .graphical-report__trendline.color20-19{stroke:#3eb44b}.graphical-report__svg .graphical-report__trendline.color20-20{stroke:#883063}.graphical-report__svg .graphical-report__trendline.color-default{stroke:#357ac7}.graphical-report__trendlinepanel{padding:20px 0 20px 20px;margin-right:20px;width:160px;box-sizing:border-box}.graphical-report__trendlinepanel__title{margin:0 0 10px;text-transform:capitalize;font-weight:600;font-size:13px}.graphical-report__trendlinepanel__control{width:100%}.graphical-report__trendlinepanel__error-message{font-size:11px;line-height:16px;margin-left:5px}.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__icon,.graphical-report__trendlinepanel.applicable-false .graphical-report__checkbox__input,.graphical-report__trendlinepanel.applicable-false .graphical-report__trendlinepanel__control,.graphical-report__trendlinepanel.applicable-false.hide-trendline-error{display:none}.graphical-report__trendline{stroke-dasharray:4,4} \ No newline at end of file diff --git a/build/production/tauCharts.min.js b/build/production/tauCharts.min.js deleted file mode 100644 index 1363424e2..000000000 --- a/build/production/tauCharts.min.js +++ /dev/null @@ -1,18 +0,0 @@ -/*! taucharts - v1.2.2 - 2017-06-01 -* https://github.com/TargetProcess/tauCharts -* Copyright (c) 2017 Taucraft Limited; Licensed Apache License 2.0 */ -!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("d3")):"function"==typeof define&&define.amd?define(["d3"],b):"object"==typeof exports?exports.tauCharts=b(require("d3")):a.tauCharts=b(a.d3)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b1;if(!b)return"[columns] property must contain at least 2 dimensions"}]));var _="1.2.2";b.GPL=i.GPL,b.Plot=j.Plot,b.Chart=k.Chart,b.__api__=Y,b.api=Z,b.version=_,b["default"]={GPL:i.GPL,Plot:j.Plot,Chart:k.Chart,__api__:Y,api:Z,version:_}},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDom=void 0;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},f=c(2),g=d(f),h=c(3),i=document.createElement("div"),j=new WeakMap,k={appendTo:function(a,b){var c;return a instanceof Node?c=a:(i.insertAdjacentHTML("afterbegin",a),c=i.childNodes[0]),b.appendChild(c),c},getScrollbarSize:function(a){if(j.has(a))return j.get(a);var b=a.style.overflow;a.style.overflow="scroll";var c={width:a.offsetWidth-a.clientWidth,height:a.offsetHeight-a.clientHeight};return a.style.overflow=b,j.set(a,c),c},setScrollPadding:function(a,b){b=b||"both";var c="horizontal"===b||"both"===b,d="vertical"===b||"both"===b,e=k.getScrollbarSize(a),f=d?e.width+"px":"0",g=c?e.height+"px":"0";a.style.overflow="hidden",a.style.padding="0 "+f+" "+g+" 0";var h=a.scrollWidth>a.clientWidth,i=a.scrollHeight>a.clientHeight,j=d&&!i?e.width+"px":"0",l=c&&!h?e.height+"px":"0";return a.style.padding="0 "+j+" "+l+" 0",a.style.overflow="",a.style.overflowX=h?"scroll":"hidden",a.style.overflowY=i?"scroll":"hidden",e},getStyle:function(a,b){return window.getComputedStyle(a,void 0).getPropertyValue(b)},getStyleAsNum:function(a,b){return parseInt(this.getStyle(a,b)||0,10)},getContainerSize:function(a){var b=this.getStyleAsNum(a,"padding-left"),c=this.getStyleAsNum(a,"padding-right"),d=this.getStyleAsNum(a,"padding-bottom"),e=this.getStyleAsNum(a,"padding-top"),f=this.getStyleAsNum(a,"border-top-width"),g=this.getStyleAsNum(a,"border-left-width"),h=this.getStyleAsNum(a,"border-right-width"),i=this.getStyleAsNum(a,"border-bottom-width"),j=f+g+h+i,k=a.getBoundingClientRect();return{width:k.width-b-c-2*j,height:k.height-d-e-2*j}},getAxisTickLabelSize:function(a){var b=document.createElement("div");b.style.position="absolute",b.style.visibility="hidden",b.style.width="100px",b.style.height="100px",b.style.border="1px solid green",b.style.top="0",document.body.appendChild(b),b.innerHTML='\n \n \n '+a+"\n \n \n ";var c=g["default"].select(b).selectAll(".x.axis .tick text")[0][0],d={width:0,height:0},e=c.getBoundingClientRect();d.width=e.right-e.left,d.height=e.bottom-e.top;var f=0!==a.length?d.width/a.length:0;return d.width=d.width+1.5*f,document.body.removeChild(b),d},getLabelSize:function(a,b){for(var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f="string"==typeof c?c:c+"px",g=0,h=0,i=a.length-1,j=0;j<=i;j++){var l=a.charAt(j),m=k.getCharSize(l,{fontSize:f,fontFamily:d,fontWeight:e});g+=m.width,h=Math.max(h,m.height)}return{width:g,height:parseInt(f)}},getCharSize:h.utils.memoize(function(a,b){var c=b.fontSize,d=b.fontFamily,e=b.fontWeight,f=document.createElement("div");f.style.position="absolute",f.style.visibility="hidden",f.style.border="0px",f.style.top="0",f.style.fontSize=c,f.style.fontFamily=d,f.style.fontWeight=e,document.body.appendChild(f),f.innerHTML=" "===a?" ":a;var g={width:0,height:0},h=f.getBoundingClientRect();return g.width=h.right-h.left,g.height=h.bottom-h.top,document.body.removeChild(f),g},function(a,b){return a+"_"+JSON.stringify(b)}),selectOrAppend:function(a,b){var c={".":function(a,b){return b.classed(a,!0)},"#":function(a,b){return b.attr("id",a)}},d=Object.keys(c).join("");if(b.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(d.indexOf(b[0])>=0)throw new Error("Selector must have tag at the beginning.");var e=a instanceof Element;e&&(a=g["default"].select(a));var f=function(a){return e?a.node():a},h=a.selectAll(b).filter(function(){return this.parentNode===a.node()}).filter(function(a,b){return 0===b});if(!h.empty())return f(h);for(var i,j,k=-1,l=null,m=1,n=b.length;m<=n;m++)(m==n||d.indexOf(b[m])>=0)&&(j=b.substring(k+1,m),k<0?i=a.append(j):c[l].call(null,j,i),l=b[m],k=m);return f(i)},selectImmediate:function(a,b){return k.selectAllImmediate(a,b)[0]||null},selectAllImmediate:function(a,b){for(var c=[],d=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e=a.firstElementChild;Boolean(e);e=e.nextElementSibling)d.call(e,b)&&c.push(e);return c},sortChildren:function(a,b){if(a.childElementCount>0){var c,d,e=Array.prototype.filter.call(a.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}),f=e.slice().sort(b),g=e.reduce(function(a,b,c){return a.set(b,c),a},new Map),i=f.reduce(function(a,b,e){var h=g.get(b),i=e-h;return i!==d&&(c&&a.push(c),d=i,c={from:h,to:e,elements:[]}),c.elements.push(b),e===f.length-1&&a.push(c),a},[]),j=i.slice().sort(function(a,b){return a.from-b.from}),k=j.reduce(function(a,b,c){return a.set(b,c),a},new Map),l=function(a){for(var b,c,d,e=i.map(function(a,b){return{elements:a.elements,from:k.get(a),to:b}}).sort(h.utils.createMultiSorter(function(a,b){return a.elements.length-b.elements.length},a?function(a,b){return b.to-a.to}:function(a,b){return a.to-b.to})),f=0;fc.to)for(b=f+1;b=c.to&&d.fromc.from&&d.from<=c.to&&d.from--}return e.filter(function(a){return a.from!==a.to})},m=l(!0),n=l(!1),o=m.length3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return B(a,b,c,d+1)}),c(a,d)},m=0,n={},o=function(){function a(a){return"object"==("undefined"==typeof a?"undefined":g(a))?JSON.parse(JSON.stringify(a)):a}function b(a){for(var b in a)this[b]=a[b]}function c(){this.copiedObjects=[];var a=this;this.recursiveDeepCopy=function(b){return a.deepCopy(b)},this.depth=0}function d(a,b){var d=new c;return b&&(d.maxDepth=b),d.deepCopy(a)}var e=[];return b.prototype={constructor:b,canCopy:function(a){return!1},create:function(a){},populate:function(a,b,c){}},c.prototype={constructor:c,maxDepth:256,cacheResult:function(a,b){this.copiedObjects.push([a,b])},getCachedResult:function(a){for(var b=this.copiedObjects,c=b.length,d=0;dthis.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return a.populate(this.recursiveDeepCopy,b,c),this.depth--,c}},d.DeepCopier=b,d.deepCopiers=e,d.register=function(a){a instanceof b||(a=new b(a)),e.unshift(a)},d.register({canCopy:function(){return!0},create:function(b){return b instanceof b.constructor?a(b.constructor.prototype):{}},populate:function(a,b,c){for(var d in b)b.hasOwnProperty(d)&&(c[d]=a(b[d]));return c}}),d.register({canCopy:function(a){return a instanceof Array},create:function(a){return new a.constructor},populate:function(a,b,c){for(var d=0;d":">",'"':""","'":"'","`":"`"},t={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},u=/\\|'|\r|\n|\u2028|\u2029/g,v="(?:"+Object.keys(s).join("|")+")",w=RegExp(v),x=RegExp(v,"g"),y={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},z={clone:function(a){return o(a)},isDate:function(a){return a instanceof Date&&!isNaN(Number(a))},isObject:function(a){return null!=a&&"object"===("undefined"==typeof a?"undefined":g(a))},isChartElement:function(a){return p.some(function(b){return a instanceof b})},niceZeroBased:function(a){var b=10,c=parseFloat(Math.min.apply(Math,e(a)).toFixed(15)),d=parseFloat(Math.max.apply(Math,e(a)).toFixed(15));if(c===d){var f=d>=0?-1:1,g=d||1;d-=f*g/b}c=Math.min(0,c),d=Math.max(0,d);for(var h=[c,d],i=h[1]-h[0],j=Math.pow(10,Math.floor(Math.log(i/b)/Math.LN10)),k=b/i*j,l=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],m=-1;k>l[++m][0];);j*=l[m][1],h[0]=Math.floor(h[0]/j)*j,h[1]=Math.ceil(h[1]/j)*j;var n=c-h[0],o=h[1]-d,p=j/2;if(c<0){var q=n>=p?-n:0;h[0]=h[0]-q}if(d>0){var r=o>=p?-o:0;h[1]=h[1]+r}return[parseFloat(h[0].toFixed(15)),parseFloat(h[1].toFixed(15))]},niceTimeDomain:function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{utc:!1},d=c.utc,e=j["default"].extent(a),g=f(e,2),h=g[0],i=g[1],k=i-h,l=d?j["default"].time.scale.utc:j["default"].time.scale;if(0===k){var m=864e5;return h=new Date(h.getTime()-m),i=new Date(i.getTime()+m),l().domain([h,i]).nice(b).domain()}var n=l().domain([h,i]).nice(b);if(b)return n.domain();var o=l().domain([h,i]).nice(b).domain(),p=f(o,2),q=p[0],r=p[1],s=n.ticks(),t=s.length-1;return(h-q)/(s[1]-q)<.5&&(h=q),(r-i)/(r-s[t-1])<.5&&(i=r),[h,i]},traverseJSON:k,generateHash:function(a){var b=btoa(encodeURIComponent(a)).replace(/=/g,"_");return n.hasOwnProperty(b)||(n[b]="H"+ ++m),n[b]},generateRatioFunction:function(a,b,c){var d=function(a){return z.isDate(a)?a.getTime():a},e=0,f=null,g=z.memoize(function(a,b){return z.unique(a.map(function(a){return b.reduce(function(b,c){return b.concat(d(a[c]))},[])}),function(a){return JSON.stringify(a)}).reduce(function(a,b){var c=b[0];return a[c]=a[c]||0,a[c]+=1,a},{})},function(a,b){var c=f===a?e:++e;return f=a,b.join("")+"-"+c});return function(d,e,f){var h=f.length,i=c.getSpec(),j=i.sources["/"].data,k=i.unit.units[0].guide||{};k.padding=k.padding||{l:0,r:0,t:0,b:0};var l=0;"x"===a?l=k.padding.l+k.padding.r:"y"===a&&(l=k.padding.t+k.padding.b);var m=function(a){var b=g(j,a);return Object.keys(b).reduce(function(a,c){return a+b[c]},0)},n=function(a,b){return g(j,a)[b]},o=m(b),p=(e-h*l)/o,q=n(b,d);return(q*p+l)/e}},traverseSpec:l,isSpecRectCoordsOnly:function(a){var b=!0;try{z.traverseSpec(a,function(a){if(0===a.type.indexOf("COORDS.")&&"COORDS.RECT"!==a.type)throw new Error("Not applicable")},function(a){return a})}catch(c){"Not applicable"===c.message&&(b=!1)}return b},throttleLastEvent:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if("requestAnimationFrame"===d){var e=!1;return function(){if(!e){requestAnimationFrame(function(){e=!1});for(var d=arguments.length,f=Array(d),g=0;g=d){for(var g=arguments.length,h=Array(g),i=0;i=2?z.range(b-2).map(function(a){return c+f*(a+1)}):[];return[c].concat(e(g),[d])},extRGBColor:function(a){return q(a)?a:""},extCSSClass:function(a){return q(a)?"":a},toRadian:function(a){return a/180*Math.PI},normalizeAngle:function(a){return Math.abs(a)>=360&&(a%=360),a<0&&(a=360+a),a},range:function(a,b){1===arguments.length&&(b=a,a=0);for(var c=[],d=a;d1?b-1:0),d=1;d1?b-1:0),d=1;d1?b-1:0),d=1;d1&&void 0!==arguments[1]?arguments[1]:function(a){return a},c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(a){return a},d=this,e={};[{event:"mouseover",limit:0},{event:"mouseout",limit:0},{event:"click",limit:0},{event:"mousemove",limit:"requestAnimationFrame"}].forEach(function(f){var g=f.event,h=f.limit,i=function(a){var e={data:b.call(this,a),event:c.call(this,l["default"].event,a)};d.fire(g,e),d.fireNameSpaceEvent(g,e)};a.on(g,j.utils.throttleLastEvent(e,g,i,h))})}},{key:"allocateRect",value:function(){return{left:0,top:0,width:0,height:0}}},{key:"defineGrammarModel",value:function(a){return{}}},{key:"getGrammarRules",value:function(){return[]}},{key:"getAdjustScalesRules",value:function(){return[]}},{key:"createScreenModel",value:function(a){}},{key:"getClosestElement",value:function(a,b){return null}},{key:"addInteraction",value:function(){}},{key:"draw",value:function(){this.config.options.container=this.config.options.slot(this.config.uid),this.drawFrames(this.config.frames)}},{key:"data",value:function(){return this.config.frames.reduce(function(a,b){return a.concat(b.part())},[])}},{key:"node",value:function(){return this}}]),b}(i.Emitter)},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a){var b=g[a];return b||(b=function(){for(var b,c,d=this,e=0,f=[];d=d.handler;){if(c=d.callbacks[a],"function"==typeof c){if(!b)for(b=[this],e=0;e=0?a.positive:a.negative,h=g[e]||0,i=h+f;return g[e]=i,{nextStack:i,prevStack:h}}},h=g({positive:{},negative:{}}),i=g({positive:{},negative:{}}),j=function(b){return e.utils.memoize(b,a.id)},k=Number.MAX_VALUE,l=Number.MIN_VALUE,m=function(a){return k=al?a:l,d.value(a)},n=j(function(a){return m(h(a).nextStack)}),o=j(function(a){return m(i(a).prevStack)}),p=function(b){return a.group(b)+"/"+(b[d.dim]>=0?1:-1)},q=e.utils.groupBy(b,p),r=Object.keys(q).sort(function(b,c){return a.order(b)-a.order(c)}).reduce(function(a,b){return a.concat(q[b])},[]);return r.forEach(function(a){n(a),o(a)}),d.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.maxk)&&(b.min=k),b}),{group:p,data:function(){return r},yi:n,y0:o}}).reg("size_distribute_evenly",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,j=g.map(function(b){return a.xi(b)}).sort(h),k=j[0],l=j.slice(1).map(function(a){var b=a-k;return k=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],m=Math.min(l,i),n="number"==typeof c?c:e,o={minSize:n,maxSize:"number"==typeof d?d:Math.max(n,Math.min(f,m))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>o.maxSize&&(b.maxSize=o.maxSize):(b.fixed=!0,b.minSize=o.minSize,b.maxSize=o.maxSize),b}),{}}).reg("adjustStaticSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g={minSize:"number"==typeof c?c:e,maxSize:"number"==typeof d?d:f};return a.scaleSize.fixup(function(a){var b={};return a.fixed||(b.fixed=!0,b.minSize=g.minSize,b.maxSize=g.maxSize),b}),{}}).reg("adjustSigmaSizeScale",function(a,b){var c=b.minLimit,d=b.maxLimit,e=b.defMin,f=b.defMax,g=a.data(),h=function(a,b){return a-b},i=g.map(function(b){return a.xi(b)}).sort(h),j=i[0],k=i.slice(1).map(function(a){var b=a-j;return j=a,b}).filter(function(a){return a>0}).sort(h).concat(Number.MAX_VALUE)[0],l=a.scaleX.discrete?a.scaleX.stepSize()/2:Number.MAX_VALUE,m=Math.min(k,l),n="number"==typeof c?c:e,o="number"==typeof d?d:f,p=function(a){var b=(n+o)/2,c=o,d=n,e=.5;return Math.round(b+(c-b)/(1+Math.exp(-(a-d)/e)))},q={minSize:n,maxSize:Math.max(n,Math.min(o,p(m)))};return a.scaleSize.fixup(function(a){var b={};return a.fixed?a.maxSize>q.maxSize&&(b.maxSize=q.maxSize):(b.fixed=!0,b.minSize=q.minSize,b.maxSize=q.maxSize),b}),{}}).reg("avoidScalesOverflow",function(a,b){var c=b.sizeDirection,d=function(a,b){return!a||a.discrete||"logarithmic"===a.scaleType||c.indexOf(b)<0},e=d(a.scaleX,"x"),f=d(a.scaleY,"y");if(e&&f)return{};var g,h;a.scaleSize.fixup(function(a){return g=a.minSize,h=a.maxSize,a});var i=a.data().reduce(function(b,c){var d,i,j=a.size(c),k=(j>=g?j:g+j*(h-g))/2;return e||(d=a.xi(c),b.left=Math.min(b.left,d-k),b.right=Math.max(b.right,d+k)),f||(i=a.yi(c),b.top=Math.min(b.top,i-k),b.bottom=Math.max(b.bottom,i+k)),b},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),j=function(b,c,d,e){var f=b.domain(),g=Math.abs(b.value(f[1])-b.value(f[0])),h=(f[1]-f[0])/g,i=Math.max(0,-c),j=Math.max(0,d-g),k=a.flip?j:i,l=a.flip?i:j,m=Number(f[0])-(e?l:k)*h,n=Number(f[1])+(e?k:l)*h;return b.fixup(function(a){var b={};return a.fixed?(b.min=a.min>m?b.min:a.min,b.max=a.max0?[a,b].join(" "):b,i=c(f.text(g));if(ii;if(k&&e){var l=Math.floor(i/j*h.length);a[a.length-1]=h.substr(0,l-4)+"...",r=!0}return k&&!e&&a.push(b),k||(a[a.length-1]=h),a},[""]).filter(function(a){return a.length>0});o=e?-1*(t.length-1)*Math.floor(.5*d):o,t.forEach(function(a,b){return g(j,a,m,n,o,p,b)}),q.remove()})},r=function(a,b,c,d){a.selectAll(".tick").each(function(a){if(b(a)){var e=k["default"].select(this),g=function(d){var e,g=b(a),h=c?g:0,i=c?0:g;d.attr("transform","translate("+h+","+i+")");var j=.5*b.stepSize(a),k=c?"x":"y",l=c?j:-j;d.select("line").attr((e={},f(e,k+"1",l),f(e,k+"2",l),e))};e.classed("tau-enter")||(e.call(g),e.classed("tau-enter",!0)),z(e,d).call(g)}})},s=function(a,b){var c=b.length&&b[0]instanceof Date;c&&(b=b.map(function(a){return Number(a)}));var d=a.selectAll(".tick").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];if(!(d.length<2)){var e=parseFloat(d[0].attributes.transform.value.replace("translate(","")),f=parseFloat(d[1].attributes.transform.value.replace("translate(","")),g=f-e,h=0,i=-1,j=a.selectAll(".tick text").filter(function(a){return b.indexOf(c?Number(a):a)>=0})[0];j.forEach(function(a,b){var c=a.textContent||"",d=c.length;d>h&&(h=d,i=b)});var k=!1;if(i>=0){var l=j[i].getBoundingClientRect();k=g-l.width<8}a.classed({"graphical-report__d3-time-overflown":k})}},t=function(a,b){b=b.map(function(a){return Number(a)});var c=a.selectAll(".tick text").filter(function(a){return b.indexOf(Number(a))>=0})[0];if(0!==c.length){for(var d=a.node();d&&"svg"!==d.tagName;)d=d.parentNode;var e=d.getBoundingClientRect();c.forEach(function(a){var b=k["default"].select(a);b.attr("dx",0)});var f=function(a,b){var c=k["default"].select(a),d=a.getBoundingClientRect(),f=b>0?"right":"left",g=b*(d[f]-e[f]);c.attr("dx",g>0?-b*g:0)};f(c[0],-1),f(c[c.length-1],1)}},u=function(a,b,c,d,e){var f=function(a){return a.attr("transform",i.utilsDraw.translate(0,b?d:0)),a},g=function(a){return b?a.attr("x2",c):a.attr("y2",d),a},j="tau-extra"+(b?"Y":"X")+"Tick",k=h.utilsDom.selectOrAppend(a,"g."+j),l=h.utilsDom.selectOrAppend(k,"line");k.node().hasAttribute("opacity")||k.attr("opacity",1e-6),z(k,e).call(f),z(l,e).call(g)},v=function(a,b,c,d,e){var f=c?1:-1,g=h.utilsDom.selectOrAppend(a,"text.label").attr("class",h.utilsDom.classes("label",b.cssClass)).attr("transform",i.utilsDraw.rotate(b.rotate)),j=z(g,e).attr("x",f*b.size*.5).attr("y",f*b.padding).style("text-anchor",b.textAnchor),k=" → ",l=function(a){for(var b=[],c=0;c=0){var n={left:[-d,0],right:[0,d]};j.attr("x",n[b.dock][Number(c)])}},w=function(a,b,c,d,e){var f=g.utils.normalizeAngle(c.rotate),h=a.selectAll(".tick text").attr("transform",i.utilsDraw.rotate(f)).style("text-anchor",c.textAnchor),j=Math.abs(f/90);if(j%2>0){var k=f<180?1:-1,l=d?.5:-2,m="top"===c.scaleOrient||"left"===c.scaleOrient?-1:1,n=l*("bottom"===c.scaleOrient||"top"===c.scaleOrient?m<0?0:.71:.32),r=a.selectAll(".tick text"),s={x:9*k,y:0,dx:d?null:n+"em",dy:n+"em"};r.transition(),r.attr(s),z(r,b,"axisTransition").attr(s)}var t=function(a){return Math.max(e.stepSize(a),c.tickFormatWordWrapLimit)};c.tickFormatWordWrap?h.call(q,t,c.tickFormatWordWrapLines,c.tickFontHeight,!d):h.call(p,t,o())},x=function(a,b,c){var d=c.length&&c[0]instanceof Date;d&&(c=c.map(function(a){return Number(a)}));var e=11,f=b?-10:20,g=b?0:1,i=b?1:-1,j=[];a.selectAll(".tick").filter(function(a){return c.indexOf(d?Number(a):a)>=0}).each(function(){var a=k["default"].select(this),b=a.attr("transform").replace("translate(","").replace(" ",",").split(",")[g],c=i*parseFloat(b),d=a.selectAll("text"),e=d.node().getBBox().width,f=e/2,h=c-f,l=c+f;j.push({c:c,s:h,e:l,l:0,textRef:d,tickRef:a})});var l=function(a,b){return a.map(function(a,c,d){return b(d[c-1]||{e:-(1/0),s:-(1/0),l:0},a,d[c+1]||{e:1/0,s:1/0,l:0})})},m=function(a,b){var c={"[T][1]":-1,"[T][-1]":0,"[T][0]":1,"[F][0]":-1},d="["+b.toString().toUpperCase().charAt(0)+"]["+a+"]";return c.hasOwnProperty(d)?c[d]:0},n=j.sort(function(a,b){return a.c-b.c});l(n,function(a,c,d){var g=a.e>c.s,i=d.s1&&(k=k.replace(/([\.]*$)/gi,"")+"...");var l=c.l*e,n=parseFloat(c.textRef.attr("y"))+l,o=b?0:l,p=b?l:0,q=function(a){var b=0;if(!a)return b;var c=a.indexOf("rotate(");if(c>=0){var d=a.indexOf(")",c+7),e=a.substring(c+7,d);b=parseFloat(e.trim())}return b}(c.textRef.attr("transform"));c.textRef.text(function(a,b){return 0===b?k:""}).attr("transform","translate("+o+","+p+") rotate("+q+")");var r={x1:0,x2:0,y1:n+(b?-1:5),y2:f};b||(r.transform="rotate(-90)"),h.utilsDom.selectOrAppend(c.tickRef,"line.label-ref").attr(r)}else c.tickRef.selectAll("line.label-ref").remove();return c})},y=function(a,b){var c=b.ticks(),d=b.domain(),e=c.length-1,f=c.length>1&&d[0]*d[1]<0&&-d[0]>(c[1]-c[0])/2&&d[1]>(c[e]-c[e-1])/2;a.selectAll(".tick").classed("zero-tick",function(a){return 0===a&&f})},z=function(a,b,c){return b>0&&(a=a.transition(c).duration(b),a.attr=A),a.onTransitionEnd=function(a){return D(this,a),this},a},A=function(a,b){var c=k["default"].transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");var d;1===arguments.length?d=a:arguments.length>1&&(d=f({},a,b));var e="__transitionAttrs__",g="__lastTransitions__",h=C();this.each(function(){var a=this,b={};for(var c in d)"function"==typeof d[c]?b[c]=d[c].apply(this,arguments):b[c]=d[c];this[e]=Object.assign(this[e]||{},b),this[e][g]||Object.defineProperty(this[e],g,{value:{}}),Object.keys(b).forEach(function(b){return a[e][g][b]=h})});var i=function(){var a=this;this[e]&&(Object.keys(d).filter(function(b){return a[e][g][b]===h}).forEach(function(b){return delete a[e][b]}),0===Object.keys(this[e]).length&&delete this[e])};return this.each("interrupt."+h,i),this.each("end."+h,i),c},B=0,C=function(){return++B},D=function(a,b){if(!k["default"].transition.prototype.isPrototypeOf(a)||a.empty())return void b.call(null,a);var c=a.size(),d=function(){c--,0===c&&b.call(null,a)};return a.each("interrupt.d3_on_transition_end",d),a.each("end.d3_on_transition_end",d),a},E=function(a,b,c,d){var e=d||function(a){return a},f=function(){e(this)};return function(){var d=this;return b&&(d=d.attr(g.utils.defaults(b,c))),d=z(d,a),d=d.attr(c),a>0?d.each("end.d3_animationInterceptor",f):d.each(f),d}},F=function(a,b){var c=a.node();return a.selectAll(b).filter(function(){return this.parentNode===c})},G=function(a,b,c,d){var f=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"linear",h="__pathPoints__";return function(a){var i=this;this[h]||(this[h]=c.map(function(){return[]}));var j=c.map(function(b,c){var e=g.utils.unique(a,d).map(b),j=(0,n.getLineInterpolator)(f)||(0,n.getLineInterpolator)("linear"),k=j(e),l=i[h][c],o=(0,m["default"])(l,k,(0,n.getInterpolatorSplineType)(f));return{pointsFrom:l,pointsTo:k,interpolate:o}});return function(a){if(0===a){var c=j.map(function(a){return a.pointsFrom});return b.apply(void 0,e(c))}if(1===a){var d=j.map(function(a){return a.pointsTo});return i[h]=d,b.apply(void 0,e(d))}var f=j.map(function(b){return b.interpolate(a)});return i[h]=f,b.apply(void 0,e(f))}}};b.d3_animationInterceptor=E,b.d3_createPathTween=G,b.d3_decorator_wrap_tick_label=w,b.d3_decorator_prettify_axis_label=v,b.d3_decorator_fix_axis_start_line=u,b.d3_decorator_fixHorizontalAxisTicksOverflow=s,b.d3_decorator_fixEdgeAxisTicksOverflow=t,b.d3_decorator_highlightZeroTick=y,b.d3_decorator_prettify_categorical_axis_ticks=r,b.d3_decorator_avoidLabelsCollisions=x,b.d3_transition=z,b.d3_selectAllImmediate=F,b.wrapText=q,b.cutText=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.utilsDraw=void 0;var e=c(2),f=d(e),g={translate:function(a,b){return"translate("+a+","+b+")"},rotate:function(a){return"rotate("+a+")"},getOrientation:function(a){return["bottom","top"].indexOf(a.toLowerCase())>=0?"h":"v"},isIntersect:function(a,b,c,d,e,f,g,h){var i,j,k,l;i=c-a,j=d-b,k=g-e,l=h-f;var m,n;return m=(-j*(a-e)+i*(b-f))/(-k*j+i*l),n=(k*(b-f)-l*(a-e))/(-k*j+i*l),m>=0&&m<=1&&n>=0&&n<=1},getDeepTransformTranslate:function(a){for(var b,c,d=function(a){var b={x:0,y:0},c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}return b},e={x:0,y:0},f=a;f&&"SVG"!==f.nodeName.toUpperCase();)c=f.getAttribute("transform"),c&&(b=d(c),e.x+=b.x,e.y+=b.y),f=f.parentNode;return e},raiseElements:function(a,b,c){var d=a.selectAll(b).filter(c);if(!d.empty()){var e=f["default"].select(d.node().parentNode).selectAll(b).filter(function(a){return!c(a)})[0],g=e[e.length-1];if(g){var h=Array.prototype.indexOf.call(g.parentNode.childNodes,g),i=g.nextSibling;d.each(function(){var a=Array.prototype.indexOf.call(this.parentNode.childNodes,this);a>h||this.parentNode.insertBefore(this,i)})}}}};b.utilsDraw=g},function(a,b,c){"use strict";function d(a,b){var c,d=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"polyline";return function(g){return 0===g?a:1===g?b:(c||(c=("cubic"===d?f:e)(a,b)),c(g))}}function e(a,b){a=a.filter(function(a){return!a.isInterpolated});var c=a.map(function(a){return a.id}),d=b.map(function(a){return a.id}),e=c.filter(function(a){return d.indexOf(a)>=0}),f=a.filter(function(a){return!a.positionIsBeingChanged}),j=b.filter(function(a){return!a.positionIsBeingChanged}),m=t(f,j),n=t(j,f),o=[];return e.forEach(function(f,j){var k=c.indexOf(f),l=d.indexOf(f);if(0===j&&(k>0||l>0)&&o.push(g({polylineFrom:a.slice(0,k+1),polylineTo:b.slice(0,l+1),toOppositeScale:0===l?m:n})),j>0){var p=c.indexOf(e[j-1]),q=d.indexOf(e[j-1]);(k-p>1||l-q>1)&&o.push(h({polylineFrom:a.slice(p,k+1),polylineTo:b.slice(q,l+1)}))}o.push(i({pointFrom:a[k],pointTo:b[l]})),j===e.length-1&&(a.length-k-1>0||b.length-l-1>0)&&o.push(g({polylineFrom:a.slice(k),polylineTo:b.slice(l),toOppositeScale:b.length-l===1?m:n}))}),0===o.length&&(b.length>0&&0===e.length||a.length>0&&0===e.length)&&o.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0)})),function(a){var b=[];return o.forEach(function(c){var d=c(a);l(b,d)}),b}}function f(a,b){for(var c=2;c=0;c--)e=a[c+1],d=a[c],d.isCubicControl||e.isCubicControl||(a.splice(c+1,0,(0,z.getBezierPoint)(1/3,e,d),(0,z.getBezierPoint)(2/3,e,d)),a[c+1].isCubicControl=!0,a[c+2].isCubicControl=!0);var f=a.filter(function(a,b){return b%3===0}),m=b.filter(function(a,b){return b%3===0}),n=f.map(function(a){return a.id}),o=m.map(function(a){return a.id}),p=n.reduce(function(b,c){return b[c]=a.findIndex(function(a){return a.id===c}),b},{}),q=o.reduce(function(a,c){return a[c]=b.findIndex(function(a){return a.id===c}),a},{}),r=n.filter(function(a){return o.indexOf(a)>=0}),s=f.filter(function(a){return!a.positionIsBeingChanged}),u=m.filter(function(a){return!a.positionIsBeingChanged}),v=t(s,u),w=t(u,s),x=[];return r.forEach(function(c,d){var e=p[c],f=q[c];if(0===d&&(e>0||f>0)&&x.push(g({polylineFrom:a.slice(0,e+1),polylineTo:b.slice(0,f+1),toOppositeScale:0===f?v:w,isCubic:!0})),d>0){var k=p[r[d-1]],l=q[r[d-1]];e-k>3||f-l>3?x.push(h({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1),isCubic:!0})):x.push(j({polylineFrom:a.slice(k,e+1),polylineTo:b.slice(l,f+1)}))}x.push(i({pointFrom:a[e],pointTo:b[f]})),d===r.length-1&&(a.length-e-1>0||b.length-f-1>0)&&x.push(g({polylineFrom:a.slice(e),polylineTo:b.slice(f),toOppositeScale:b.length-f===1?v:w,isCubic:!0}))}),0===x.length&&(b.length>0&&0===r.length||a.length>0&&0===r.length)&&x.push(k({polylineFrom:a.slice(0),polylineTo:b.slice(0),isCubic:!0})),function(a){var b=[];return x.forEach(function(c){var d=c(a);l(b,d)}),b}}function g(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=a.toOppositeScale,f=b.length>c.length?b:c,g=1===c.length,h=b[0].id!==c[0].id,i=Boolean(h^g);return function(a){var b=(d?q:p)({t:a,polyline:f,decreasing:g,rightToLeft:i});g===i?b.shift():b.pop();var c=b.map(e),h=o(c,b,g?1-a:a);return h.forEach(function(a){return a.positionIsBeingChanged=!0}),h}}function h(a){var b=a.polylineFrom,c=a.polylineTo,d=a.isCubic,e=b.length,f=c.length;if(f!==e){var g=f0&&(a.positionIsBeingChanged=!0)}),b}}function l(a,b){return Array.prototype.push.apply(a,b)}function m(a,b,c){return void 0===b?a:"number"==typeof b?a+c*(b-a):b}function n(a,b,c){if(a===b)return b;var d={},e=Object.keys(a);return e.forEach(function(e){return d[e]=m(a[e],b[e],c)}),void 0!==b.id&&(d.id=b.id),d}function o(a,b,c){var d=a.map(function(a,d){return n(a,b[d],c)});return d}function p(a){var b=a.t,c=a.polyline,d=a.decreasing,e=a.rightToLeft,f=Boolean(d)!==Boolean(e),g=function(a,b){var c=0;if(a>0){for(var d,e,f,g,h,i=[0],j=0,k=1;k0){for(var e,f,g,h,i,j,k,m,n,o=[0],p=0,q=1;q2){var e=w(y.utils.range(1,a-1).map(function(b){return b/(a-1)}),b.slice(k-3,k+1));y.utils.range(a-2).forEach(function(a){return e[3*(a+1)].id=c[j.length-1+3*a].id}),d&&e.forEach(function(a,b){b>0&&b0;f--)if(b=g[f][a],b!==d)return c=h[f][a],void(m[a]=n(d,b,e,c));m[a]=o(d,e)}),function(a){var b=Object.assign({},a);return l.forEach(function(c){b[c]=m[c](a[c])}),b}}function u(a,b,c,d){return Math.sqrt((c-a)*(c-a)+(d-b)*(d-b))}function v(a,b){var c=x(b,4),d=c[0],e=c[1],f=c[2],g=c[3],h=(0,z.splitCubicSegment)(a,d,e,f,g);return[h[1],h[2],h[4],h[5]].forEach(function(a){return a.isCubicControl=!0}),Object.keys(g).forEach(function(b){"x"!==b&&"y"!==b&&"id"!==b&&(h[3][b]=m(d[b],g[b],a))}),h}function w(a,b){for(var c,d,e=[b[0]],f=0;f1?b-1:0),f=1;f0&&(s[3*t-2]=(0,h.getBezierPoint)(1/3,a[t-1],a[t]),s[3*t-1]=(0,h.getBezierPoint)(2/3,a[t-1],a[t]));for(var u,v=s.slice(0),w=0;w<3;w++){for(t=6;tc.y==k>e.y&&(r=(e.y-d.y)/(k-d.y),q=g(q*r,q,1/(1+Math.abs(r))),o=(e.y-d.y)/q),d.y>c.y==i1&&void 0!==arguments[1]?arguments[1]:{};return Object.assign(new n(a),b)},p=function(a,b,c){return a.map(function(a){return"string"==typeof a?c.get(a):a}).filter(function(a){return a}).reduce(function(a,b){return o(a,b(a,{}))},b)};b.GPL=function(a){function b(a,c,d,g){e(this,b);var h=f(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));return j.utils.defaults(a.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),a.settings=a.settings||{},h.config=a,h.sources=a.sources,h.scales=a.scales,h.unitSet=d,h.grammarRules=g,h.scalesHub=c,h.transformations=Object.assign(a.transformations||{},{where:function(a,b){var c=Object.keys(b||{}).map(function(a){return function(c){return m(c[a])===b[a]}});return a.filter(function(a){return c.every(function(b){return b(a)})})}}),h}return g(b,a),h(b,[{key:"unfoldStructure",value:function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config}},{key:"getDrawScenarioQueue",value:function(a){var b=this,c=this.grammarRules,d=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return p(h.getAdjustScalesRules(),j,c),h.node().screenModel=h.createScreenModel(j),h}),e=function(){Object.keys(b.scales).forEach(function(a){return b.scalesHub.createScaleInfo(b.scales[a]).commit()})},f=this._flattenDrawScenario(a,function(a,d,e){var f=d.expression.inherit===!1?null:e,g=b._createFrameScalesFactoryMethod(f),h=b.unitSet.create(d.type,Object.assign({},d,{options:a.allocateRect(e.key)})),i=new n(h.defineGrammarModel(g)),j=p(h.getGrammarRules(),i,c);return h.node().screenModel=h.createScreenModel(j),h.parentUnit=a,h.addInteraction(),h});return d.concat(e).concat(f)}},{key:"_flattenDrawScenario",value:function(a,c){var d={},e=[],f=[a],g=function(a){return f.unshift(a)},h=function(){return f.shift()},i=function(){return f[0]},k=b.traverseSpec({unit:this.root},function(a,b,f){a.uid=function(){var c=j.utils.generateHash((b?b.uid+"/":"")+JSON.stringify(Object.keys(a).filter(function(b){return"string"==typeof a[b]}).reduce(function(b,c){return b[c]=a[c],b},{}))+("-"+JSON.stringify(f.pipe)));return c in d?c+="-"+ ++d[c]:d[c]=0,c}(),a.guide=j.utils.clone(a.guide);var h=c(i(),a,f);e.push(h),0===a.type.indexOf("COORDS.")&&g(h)},function(a){0===a.type.indexOf("COORDS.")&&h()},null,this._datify({source:this.root.expression.source,pipe:[]}));return k.push(function(){return e}),k}},{key:"_expandUnitsStructure",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],d=this;if(a.expression.operator===!1)a.frames=a.frames.map(function(a){return d._datify(a)});else{var e=this._parseExpression(a.expression,c,a.guide);a.transformation=a.transformation||[],a.frames=e.exec().map(function(b){var f=e.inherit?c:[],g=f.concat([{type:"where",args:b}]).concat(a.transformation);return d._datify({key:b,pipe:g,source:e.source,units:a.units?a.units.map(function(a){var b=j.utils.clone(a);return b.guide=a.guide,b}):[]})})}return a.frames.forEach(function(a){return a.units.forEach(function(c){return b._expandUnitsStructure(c,a.pipe)})}),a}},{key:"_createFrameScalesFactoryMethod",value:function(a){var b=this;return function(c,d,e){var f=d||c+":default";return b.scalesHub.createScaleInfo(b.scales[f],a).create(e)}}},{key:"_datify",value:function(a){return new l.DataFrame(a,this.sources[a.source].data,this.transformations)}},{key:"_parseExpression",value:function(a,b,c){var e=this,f=a.operator||"none",g=a.source,h=a.inherit!==!1,i=a.params,j={source:g,pipe:h?b:[]},l=function(){return e._datify(j).part()},m=k.FramesAlgebra[f];if(!m)throw new Error(f+" operator is not supported");return{source:g,inherit:h,func:m,args:i,exec:function(){return m.apply(void 0,[l].concat(d(i||[]),[c]))}}}}],[{key:"traverseSpec",value:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,e=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,f=[],g=function h(a,b,c,d,e){f.push(function(){b(a,d,e)}),a.frames&&a.frames.forEach(function(d){(d.units||[]).map(function(e){return h(e,b,c,a,d)})}),f.push(function(){return c(a,d,e)})};return g(a.unit,b,c,d,e),f}}]),b}(i.Emitter)},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b2&&void 0!==arguments[2]?arguments[2]:{utc:!1},f=e.utc;return(f?d:c)[a.toLowerCase()]=b,this},get:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{utc:!1},e=b.utc,f=a||"";return(e?d:c)[f.toLowerCase()]||null},generate:function(a,b,c){var d=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{utc:!1},f=d.utc,g=[],h=e.get(c,{utc:f});if(h){var i=h.cast(new Date(b)),j=h.cast(new Date(a));for(g.push(j);(j=h.next(new Date(j)))<=i;)g.push(j)}return g}};b.UnitDomainPeriodGenerator=e},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.DataFrame=void 0;var e=function(){function a(a,b){for(var c=0;c2&&void 0!==arguments[2]?arguments[2]:{};d(this,a),this.key=e,this.pipe=f||[],this.source=g,this.units=h,this._frame={key:e,source:g,pipe:this.pipe},this._data=c,this._pipeReducer=function(a,b){return i[b.type](a,b.args)}}return e(a,[{key:"hash",value:function(){var a=[this._frame.pipe,this._frame.key,this._frame.source].map(JSON.stringify).join("");return f.utils.generateHash(a)}},{key:"full",value:function(){return this._data}},{key:"part",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(a){return a};return this._frame.pipe.map(a).reduce(this._pipeReducer,this._data)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Plot=void 0;var h=function(){function a(a,b){for(var c=0;c0){var l=k.findIndex(function(a){return a.closest.distance!==k[0].closest.distance||a.closest.secondaryDistance!==k[0].closest.secondaryDistance}),m=l<0?k:k.slice(0,l);if(1===m.length)h=m[0].closest.data,i=m[0].closest.node;else{var n=m.reduce(function(a,b){return a+b.closest.x},0)/m.length,o=m.reduce(function(a,b){return a+b.closest.y},0)/m.length,p=Math.atan2(o-d,n-c)+Math.PI,q=m[Math.round((m.length-1)*p/2/Math.PI)].closest;h=q.data,i=q.node}}j.forEach(function(b){return b.unit.fire(g,{event:a,data:h,node:i})})}},{key:"_initPointerEvents",value:function(){var a=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var b=D["default"].select(this._svg),c=this._liveSpec.settings.syncPointerEvents?function(a){return function(){return a(D["default"].event)}}:function(b){return function(){var c=D["default"].event;a._pointerAnimationFrameId&&"mousemove"!==c.type&&a._cancelPointerAnimationFrame(),a._pointerAnimationFrameId||(a._pointerAnimationFrameId=requestAnimationFrame(function(){a._pointerAnimationFrameId=null,b(c)}))}},d=function(b){return a._handlePointerEvent(b)};b.on("mousemove",c(d)),b.on("click",c(d)),b.on("mouseleave",c(function(b){"none"!==window.getComputedStyle(a._svg).pointerEvents&&a.select(function(){return!0}).forEach(function(a){return a.fire("data-hover",{event:b,data:null,node:null})})}))}},{key:"_cancelPointerAnimationFrame",value:function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null}},{key:"_setupTaskRunner",value:function(a){var b=this;return this._resetTaskRunner(),this._taskRunner=new F["default"]({timeout:a.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:a.settings.asyncRendering?a.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){b._completeRendering(),b._renderingPhase=null},timeout:function(a,c){b._displayTimeoutWarning({timeout:a,proceed:function(){b.disablePointerEvents(),c.setTimeout(Number.MAX_SAFE_INTEGER),c.run()},cancel:function(){b._cancelRendering()}}),b.enablePointerEvents(),b.fire("renderingtimeout")},progress:function(a){var c={spec:0,draw:1},d=c[b._renderingPhase]/2+a/2;b._reportProgress(d)},error:a.settings.handleRenderingErrors?function(c){b._cancelRendering(),b._displayRenderingError(c),b.fire("renderingerror",c),a.settings.log(["An error occured during chart rendering.",'Set "handleRenderingErrors: false" in chart settings to debug.',"Error message: "+c.message].join(" "),"ERROR")}:null}}),this._taskRunner}},{key:"_resetTaskRunner",value:function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)}},{key:"renderTo",value:function(a,b){this._resetProgressLayout();var c=this._createLiveSpec(a,b);if(!c)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var d=this._createGPL(c),e=this._setupTaskRunner(c);this._scheduleDrawScenario(e,d),this._scheduleDrawing(e,d),e.run()}},{key:"_createLiveSpec",value:function(a,b){var c=this;this.disablePointerEvents(),this._target=a,this._defaultSize=Object.assign({},b);var d=D["default"].select(a).node();if(null===d)throw new Error("Target element not found");this._layout.layout.parentNode!==d&&d.appendChild(this._layout.layout);var e=this._layout.content,f=n.utilsDom.getScrollbarSize(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+f.width+"px "+f.height+"px 0",n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical");var g=Object.assign({},b)||{};if(!g.width||!g.height){var h=e.parentElement,i=h.scrollLeft,j=h.scrollTop;e.style.display="none",g=m.utils.defaults(g,n.utilsDom.getContainerSize(e.parentNode)),e.style.display="",e.parentElement.scrollLeft=i,e.parentElement.scrollTop=j,g.height||(g.height=n.utilsDom.getContainerSize(this._layout.layout).height)}return this.configGPL.settings.size=g,this._liveSpec=m.utils.clone(m.utils.omit(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(a,b){return new b(a).transform(c)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)}},{key:"_experimentalSetupAnimationSpeed",value:function(a){a.settings.initialAnimationSpeed=a.settings.initialAnimationSpeed||a.settings.animationSpeed;var b=a.settings.experimentalShouldAnimate(a)?a.settings.initialAnimationSpeed:0;a.settings.animationSpeed=b;var c=function d(a){a.guide=a.guide||{},a.guide.animationSpeed=b,a.units&&a.units.forEach(d)};c(a.unit)}},{key:"_createGPL",value:function(a){var b=new B.GPL(a,this.getScaleFactory(),q.unitsRegistry,p.GrammarRegistry),c=b.unfoldStructure();return this.onUnitsStructureExpanded(c),b}},{key:"_scheduleDrawScenario",value:function(a,b){var c=this,d=D["default"].select(this._layout.content),e=b.config.settings.size;a.addTask(function(){return c._renderingPhase="spec"}),b.getDrawScenarioQueue({allocateRect:function(){return{slot:function(a){return d.selectAll(".uid_"+a)},frameId:"root",left:0,top:0,width:e.width,containerWidth:e.width,height:e.height,containerHeight:e.height}}}).forEach(function(b){return a.addTask(b)})}},{key:"_scheduleDrawing",value:function(a,b){var c=this,d=b.config.settings.size;a.addTask(function(a){c._renderingPhase="draw",c._renderRoot({scenario:a,newSize:d}),c._cancelPointerAnimationFrame(),c._scheduleRenderScenario(a)})}},{key:"_resetProgressLayout",value:function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()}},{key:"_renderRoot",value:function(a){var b=this,c=a.scenario,d=a.newSize,e=D["default"].select(this._layout.content),f=c[0].config.uid,g=G(e,"svg").attr({width:Math.floor(d.width),height:Math.floor(d.height)});g.attr("class")||g.attr("class",A.CSS_PREFIX+"svg"),this._svg=g.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var h=g.selectAll("g.frame-root").data([f],function(a){return a});h.enter().append("g").classed(A.CSS_PREFIX+"cell cell frame-root uid_"+f,!0),h.call(function(a){a.classed("tau-active",!0),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),h.exit().call(function(a){a.classed("tau-active",!1),(0,o.d3_transition)(a,b.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})}},{key:"_scheduleRenderScenario",value:function(a){var b=this;a.forEach(function(a){b._taskRunner.addTask(function(){a.draw(),b.onUnitDraw(a.node()),b._renderedItems.push(a)})})}},{key:"_completeRendering",value:function(){n.utilsDom.setScrollPadding(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),n.utilsDom.setScrollPadding(this._layout.rightSidebarContainer,"vertical")}},{key:"_cancelRendering",value:function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()}},{key:"_createProgressBar",value:function(){var a=D["default"].select(this._layout.header),b=G(a,"div."+A.CSS_PREFIX+"progress");b.select("div."+A.CSS_PREFIX+"progress__value").remove();var c=b.append("div").classed(A.CSS_PREFIX+"progress__value",!0).style("width",0);this._reportProgress=function(a){requestAnimationFrame(function(){b.classed(A.CSS_PREFIX+"progress_active",a<1),c.style("width",100*a+"%")})}}},{key:"_displayRenderingError",value:function(){this._layout.layout.classList.add(A.CSS_PREFIX+"layout_rendering-error")}},{key:"_clearRenderingError",value:function(){this._layout.layout.classList.remove(A.CSS_PREFIX+"layout_rendering-error")}},{key:"getScaleFactory",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new s.ScalesFactory(r.scalesRegistry.instance(this._liveSpec.settings),a||this._liveSpec.sources,this._liveSpec.scales)}},{key:"getScaleInfo",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getScaleFactory().createScaleInfoByName(a,b)}},{key:"getSourceFiltersIterator",value:function(a){var b=this,c=m.utils.flatten(Object.keys(this._filtersStore.filters).map(function(a){return b._filtersStore.filters[a]})).filter(function(b){return!a(b)}).map(function(a){return a.predicate});return function(a){return c.reduce(function(b,c){return b&&c(a)},!0)}}},{key:"getDataSources",value:function(){var a=this,b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},c=function(a){return function(c){return b.excludeFilter&&b.excludeFilter.indexOf(c.tag)!==-1||c.src!==a}},d=this._chartDataModel(this._originData);return Object.keys(d).filter(function(a){return"?"!==a}).reduce(function(b,e){var f=d[e],g=a.getSourceFiltersIterator(c(e));return b[e]={dims:f.dims,data:f.data.filter(g)},b},{"?":d["?"]})}},{key:"isEmptySources",value:function(a){return!Object.keys(a).filter(function(a){return"?"!==a}).filter(function(b){return a[b].data.length>0}).length}},{key:"getChartModelData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",c=this.getDataSources(a);return c[b].data}},{key:"getDataDims",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].dims}},{key:"getData",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";return this._originData[a].data}},{key:"setData",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";this._originData[b].data=a,this.refresh()}},{key:"getSVG",value:function(){return this._svg}},{key:"addFilter",value:function(a){a.src=a.src||"/";var b=a.tag,c=this._filtersStore.filters[b]=this._filtersStore.filters[b]||[],d=this._filtersStore.tick++;return a.id=d,c.push(a),d}},{key:"removeFilter",value:function(a){var b=this;return Object.keys(this._filtersStore.filters).map(function(c){b._filtersStore.filters[c]=b._filtersStore.filters[c].filter(function(b){return b.id!==a})}),this}},{key:"refresh",value:function(){this._target&&this.renderTo(this._target,this._defaultSize)}},{key:"resize",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderTo(this._target,a)}},{key:"select",value:function(a){return this._nodes.filter(a)}},{key:"traverseSpec",value:function(a,b){var c=function d(a,b,c,e){b(a,c,e),a.frames?a.frames.forEach(function(c){(c.units||[]).map(function(e){return d(e,b,a,c)})}):(a.units||[]).map(function(c){return d(c,b,a,null)})};c(a.unit,b,null,null)}},{key:"getSpec",value:function(){return this._liveSpec}},{key:"getLayout",value:function(){return this._layout}},{key:"_displayTimeoutWarning",value:function(a){var b=this,c=a.proceed,d=a.cancel,e=a.timeout,f=200,g=100,h=3,i=1.5,j=f/2,k=Math.round(g/h/i),l=function(a){return Math.round(g/h/i*a)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",'\n
\n \n \n Rendering took more than '+Math.round(e)/1e3+'s\n Would you like to continue?\n \n \n Continue\n \n \n Cancel\n \n \n
\n '),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-continue-btn").addEventListener("click",function(){b._clearTimeoutWarning(),c.call(b)}),this._layout.content.querySelector("."+A.CSS_PREFIX+"rendering-timeout-cancel-btn").addEventListener("click",function(){b._clearTimeoutWarning(),d.call(b)})}},{key:"_clearTimeoutWarning",value:function(){var a=H(this._layout.content,"."+A.CSS_PREFIX+"rendering-timeout-warning");a&&(this._layout.content.removeChild(a),this._layout.content.style.height="")}}],[{key:"setupPeriodData",value:function(a){var c=b.__api__.tickPeriod,d=a.settings.log,e=Object.keys(a.scales).map(function(b){return a.scales[b]}),f=e.filter(function(a){return"period"===a.type}).reduce(function(b,e){var f=c.get(e.period,{utc:a.settings.utcTime});return f?b.push({source:e.source,dim:e.dim,period:f}):(d(['Unknown period "'+e.period+'".',"Docs: http://api.taucharts.com/plugins/customticks.html#how-to-add-custom-tick-period"],"WARN"),e.period=null),b},[]),g=function(a){return null===a||void 0===a},h=function(a,b){return a[b.source].data=a[b.source].data.map(function(a){var c=a[b.dim];return g(c)||(a[b.dim]=b.period.cast(c)),a}),a};return a.sources=f.reduce(h,a.sources),a}},{key:"setupMetaInfo",value:function(a,b){var c=a?a:t.DataProcessor.autoDetectDimTypes(b);return t.DataProcessor.autoAssignScales(c)}},{key:"setupSettings",value:function(a){var c=b.globalSettings,d=Object.keys(c).reduce(function(a,b){return a[b]="function"==typeof c[b]?c[b]:m.utils.clone(c[b]),a},{}),e=m.utils.defaults(a||{},d);return Array.isArray(e.specEngine)||(e.specEngine=[{width:Number.MAX_VALUE,name:e.specEngine}]),e}}]),b}(k.Emitter)},function(a,b,c){ -"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Tooltip=void 0;var d=c(22),e=c(23);e.Tooltip.defaults.baseClass=d.CSS_PREFIX+"tooltip",b.Tooltip=e.Tooltip},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.CSS_PREFIX="graphical-report__"},function(a,b,c){var d,e,f;!function(c,g){e=[],d=g,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f))}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b){"use strict";function c(a,b){for(var c in b)a[c]=b[c];return a}function d(a){return a&&null!=a.setInterval}function e(a){var b=k.pageYOffset||m.scrollTop,e=k.pageXOffset||m.scrollLeft,f={left:0,right:0,top:0,bottom:0,width:0,height:0};if(d(a))f.width=k.innerWidth||m.clientWidth,f.height=k.innerHeight||m.clientHeight;else{if(!m.contains(a)||null==a.getBoundingClientRect)return f;c(f,a.getBoundingClientRect()),f.width=f.right-f.left,f.height=f.bottom-f.top}return f.top=f.top+b-m.clientTop,f.left=f.left+e-m.clientLeft,f.right=f.left+f.width,f.bottom=f.top+f.height,f}function f(a){return 0|Math.round(String(a).replace(/[^\-0-9.]/g,""))}function g(a){var b=String(o(a,g.propName)),c=b.match(/([0-9.]+)([ms]{1,2})/);return c&&(b=Number(c[1]),"s"===c[2]&&(b*=1e3)),0|b}function h(a,b){return this instanceof h?(this.hidden=1,this.options=c(p(h.defaults),b),this._createElement(),void(a&&this.content(a))):new h(a,b)}Object.defineProperty(b,"__esModule",{value:!0});var i=function(a){return{add:function(b){a.classList.add(b)},remove:function(b){a.classList.remove(b)}}},j=function(a,b){return a.indexOf(b)},k=window,l=k.document,m=l.documentElement,n=["top","bottom"],o=k.getComputedStyle;g.propName=function(){for(var a=l.createElement("div"),b=["transitionDuration","webkitTransitionDuration"],c="1s",d=0;d=b.bottom&&(c[0]="top"),c[1]){case"left":a.right-this.width<=b.left&&(c[1]="right");break;case"right":a.left+this.width>=b.right&&(c[1]="left");break;default:a.left+a.width/2+this.width/2>=b.right?c[1]="left":a.right-a.width/2-this.width/2<=b.left&&(c[1]="right")}else switch(a.left-this.width-d<=b.left?c[0]="right":a.right+this.width+d>=b.right&&(c[0]="left"),c[1]){case"top":a.bottom-this.height<=b.top&&(c[1]="bottom");break;case"bottom":a.top+this.height>=b.bottom&&(c[1]="top");break;default:a.top+a.height/2+this.height/2>=b.bottom?c[1]="top":a.bottom-a.height/2-this.height/2<=b.top&&(c[1]="bottom")}return c.join("-")},h.prototype.position=function(a,b){this.attachedTo&&(a=this.attachedTo),null==a&&this._p?(a=this._p[0],b=this._p[1]):this._p=arguments;var c="number"==typeof a?{left:0|a,right:0|a,top:0|b,bottom:0|b,width:0,height:0}:e(a),d=this.spacing,f=this._pickPlace(c);f!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(f),this.curPlace=f);var g,h;switch(this.curPlace){case"top":g=c.top-this.height-d,h=c.left+c.width/2-this.width/2;break;case"top-left":g=c.top-this.height-d,h=c.right-this.width;break;case"top-right":g=c.top-this.height-d,h=c.left;break;case"bottom":g=c.bottom+d,h=c.left+c.width/2-this.width/2;break;case"bottom-left":g=c.bottom+d,h=c.right-this.width;break;case"bottom-right":g=c.bottom+d,h=c.left;break;case"left":g=c.top+c.height/2-this.height/2,h=c.left-this.width-d;break;case"left-top":g=c.bottom-this.height,h=c.left-this.width-d;break;case"left-bottom":g=c.top,h=c.left-this.width-d;break;case"right":g=c.top+c.height/2-this.height/2,h=c.right+d;break;case"right-top":g=c.bottom-this.height,h=c.right+d;break;case"right-bottom":g=c.top,h=c.right+d}return this.element.style.top=Math.round(g)+"px",this.element.style.left=Math.round(h)+"px",this},h.prototype.show=function(a,b){return a=this.attachedTo?this.attachedTo:a,clearTimeout(this.aIndex),null!=a&&this.position(a,b),this.hidden&&(this.hidden=0,l.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&void this.element.clientHeight,this.classes.add(this.options.inClass)),this},h.prototype.getElement=function(){return this.element},h.prototype.hide=function(){if(!this.hidden){var a=this,b=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(b=g(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){a.aIndex=0,l.body.removeChild(a.element),a.hidden=1},b),this}},h.prototype.toggle=function(a,b){return this[this.hidden?"show":"hide"](a,b)},h.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||l.body.removeChild(this.element),this.element=this.options=null},h.prototype._aware=function(){var a=j(h.winAware,this);a===-1&&h.winAware.push(this)},h.prototype._unaware=function(){var a=j(h.winAware,this);a!==-1&&h.winAware.splice(a,1)},h.reposition=function(){function a(){!c&&h.winAware.length&&(c=d(b))}function b(){c=0;for(var a,b=0,d=h.winAware.length;b2&&void 0!==arguments[2]?arguments[2]:function(a){return a};return e[a]=b,f[a]=c,this}},{key:"get",value:function(a){return e[a]}},{key:"instance",value:function(){var b=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{create:function(c,d,e){var g=a.get(c),h=f[c];return new g(d,h(e,b))}}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.ScalesFactory=void 0;var e=function(){function a(a,b){for(var c=0;c1&&void 0!==arguments[1]?arguments[1]:null,c=a.dim,d=a.source,e=(this.sources[d].dims[c]||{}).type,g=this.sources[d].data,h=b||new f.DataFrame({source:d},g);return a.dimType=e,this.registry.create(a.type,h,a)}},{key:"createScaleInfoByName",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.createScaleInfo(this.scales[a],b)}}]),a}()},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.DataProcessor=void 0;var d=c(3),e={isYFunctionOfX:function(a,b,c){var e=!0,f=null;try{a.reduce(function(a,e){var g=function(a,b){var c=e[b],f=d.utils.isObject(c)?JSON.stringify(c):c;return a.push(f),a},h=b.reduce(g,[]).join("/"),i=c.reduce(g,[]).join("/");if(a.hasOwnProperty(h)){var j=a[h];if(j!==i)throw f={type:"RelationIsNotAFunction",keyX:b.join("/"),keyY:c.join("/"),valX:h,errY:[j,i]},new Error("RelationIsNotAFunction")}else a[h]=i;return a},{})}catch(g){if("RelationIsNotAFunction"!==g.message)throw g;e=!1}return{result:e,error:f}},excludeNullValues:function(a,b){var c=Object.keys(a).reduce(function(b,c){var d=a[c];return d.hasOwnProperty("hasNull")&&!d.hasNull||"measure"!==d.type&&"period"!==d.scale||b.push(c),b},[]);return function(a){var d=!c.some(function(b){return!(b in a)||null===a[b]});return d||b(a),d}},autoAssignScales:function(a){var b="category",c={category:"ordinal",order:"ordinal",measure:"linear"},d={};return Object.keys(a).forEach(function(e){var f=a[e],g=(f.type||b).toLowerCase();d[e]=Object.assign({},f,{type:g,scale:f.scale||c[g],value:f.value})}),d},autoDetectDimTypes:function(a){var b={type:"category",scale:"ordinal"},c=function(a,b){var c=b;return d.utils.isDate(a)?(c.type="measure",c.scale="time"):d.utils.isObject(a)?(c.type="order",c.scale="ordinal"):Number.isFinite(a)&&(c.type="measure",c.scale="linear"),c},e=function(a,e){return Object.keys(e).forEach(function(f){var g=e.hasOwnProperty(f)?e[f]:null;if(a[f]=a[f]||{type:null,hasNull:!1},null===g)a[f].hasNull=!0;else{var h=c(g,d.utils.clone(b)),i=h.type,j=h.scale,k=null!==a[f].type&&a[f].type!==i;a[f].type=k?b.type:i,a[f].scale=k?b.scale:j}}),a};return a.reduce(e,{})},sortByDim:function(a,b,c){var d=a,e=["period","time"].indexOf(c.scale)>=0?function(a){return new Date(a)}:function(a){return a};if("measure"===c.type||"period"===c.scale)d=a.map(function(a){return a}).sort(function(a,c){return e(a[b])-e(c[b])});else if(c.order){var f=c.order.reduce(function(a,b,c){return a[b]=c,a},{}),g=c.order.length,h="(___"+b+"___)";d=a.map(function(a){var c=f[a[b]];return c=c>=0?c:g,a[h]=c,a}).sort(function(a,b){return a[h]-b[h]}).map(function(a){return delete a[h],a})}return d}};b.DataProcessor=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.getLayout=void 0;var d=c(22),e=function(a,b){var c="div",e=document.createElement(c);return e.classList.add(d.CSS_PREFIX+a),b&&b.appendChild(e),e},f=function(){var a=e("layout"),b=e("layout__header",a),c=e("layout__container",a),d=e("layout__sidebar",c),f=e("layout__content",c),g=e("layout__content__wrap",f),h=e("layout__sidebar-right",c),i=e("layout__sidebar-right__wrap",h),j=e("layout__footer",a);return{layout:a,header:b,content:g,contentContainer:f,leftSidebar:d,rightSidebar:i,rightSidebarContainer:h,footer:j}};b.getLayout=f},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecConverter=void 0;var e=function(){function a(a,b){for(var c=0;c=0&&(a[b]=new Date(a[b])),a},b)})}},{key:"ruleAssignSourceDims",value:function(a,b){var c=a.spec.dimensions;b.sources["/"].dims=Object.keys(c).reduce(function(a,b){return a[b]={type:c[b].type},a},{})}},{key:"ruleAssignStructure",value:function(a,b){var c=this,d=function g(a){var b=f.utils.clone(f.utils.omit(a,"unit"));return c.ruleCreateScales(a,b),b.expression=c.ruleInferExpression(a),a.unit&&(b.units=a.unit.map(g)),b},e=d(a.spec.unit);e.expression.inherit=!1,b.unit=e}},{key:"ruleCreateScales",value:function(a,b){var c=this,d=a.guide||{};["identity","color","size","label","x","y","split"].forEach(function(e){a.hasOwnProperty(e)&&(b[e]=c.scalesPool(e,a[e],d[e]||{}))})}},{key:"ruleInferDim",value:function(a,b){var c=a,d=this.spec.spec.dimensions;if(!d.hasOwnProperty(c))return c;b.hasOwnProperty("tickLabel")?c=a+"."+b.tickLabel:d[a].value&&(c=a+"."+d[a].value);var e=this.dist.sources["/"].dims;return e.hasOwnProperty(c)||(e[c]={type:e[a].type},delete e[a]),c}},{key:"scalesPool",value:function(a,b,c){var d=a+"_"+b;if(this.dist.scales.hasOwnProperty(d))return d;var e=this.spec.spec.dimensions,f={};return"color"===a&&null!==b&&(f={type:"color",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("brewer")&&(f.brewer=c.brewer),e[b]&&e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("nice")&&(f.nice=c.nice)),"size"===a&&null!==b&&(f={type:"size",source:"/",dim:this.ruleInferDim(b,c)},c.hasOwnProperty("func")&&(f.func=c.func),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("minSize")&&(f.minSize=c.minSize),c.hasOwnProperty("maxSize")&&(f.maxSize=c.maxSize)),"label"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"split"===a&&null!==b&&(f={type:"value",source:"/",dim:this.ruleInferDim(b,c)}),"identity"===a&&null!==b&&(f={type:"identity",source:"/",dim:this.ruleInferDim(b,c)}),!e.hasOwnProperty(b)||"x"!==a&&"y"!==a||(f={type:e[b].scale,source:"/",dim:this.ruleInferDim(b,c)},e[b].hasOwnProperty("order")&&(f.order=e[b].order),c.hasOwnProperty("min")&&(f.min=c.min),c.hasOwnProperty("max")&&(f.max=c.max),c.hasOwnProperty("autoScale")?f.autoScale=c.autoScale:f.autoScale=!0,c.hasOwnProperty("nice")?f.nice=c.nice:f.nice=f.autoScale,c.hasOwnProperty("niceInterval")?f.niceInterval=c.niceInterval:f.niceInterval=null,c.hasOwnProperty("tickPeriod")&&(f.period=c.tickPeriod,f.type="period"),f.fitToFrameByDims=c.fitToFrameByDims,f.ratio=c.ratio),this.dist.scales[d]=f,d}},{key:"getScaleConfig",value:function(a,b){var c=a+"_"+b;return this.dist.scales[c]}},{key:"ruleInferExpression",value:function(a){var b={operator:"none",params:[]},c=a.guide||{},d=c.x||{},e=c.y||{},f=this.getScaleConfig("x",a.x),g=this.getScaleConfig("y",a.y);return 0===a.type.indexOf("ELEMENT.")?a.color&&(b={operator:"groupBy",params:[this.ruleInferDim(a.color,c.color||{})]}):"COORDS.RECT"===a.type&&1===a.unit.length&&"COORDS.RECT"===a.unit[0].type&&(b=f.period||g.period?{operator:"cross_period",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e),f.period,g.period]}:{operator:"cross",params:[this.ruleInferDim(a.x,d),this.ruleInferDim(a.y,e)]}),Object.assign({inherit:!0,source:"/"},b)}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b,c,d){var e=a.hasOwnProperty(c)?a[c]:{};e=e||{},d.forEach(function(a){Object.assign(b.guide[c][a],e[a])})}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformAutoLayout=void 0;var g=function(){function a(a,b){for(var c=0;ca.computed?{value:c,computed:d}:a},{}).value;return c(b(f))},t=function(a,b){var c=a.dimType,d=a.scaleType,e="*",f=[c,d,e].join(":"),g=[c,d].join(":");return b[f]||b[g]||b[c]||null},u=function(a,b,c){return a.hasOwnProperty(b+":"+c)?a[b+":"+c]:a[""+b]},v=function(a,b){var c=["day","week","month"];return c.indexOf(a)>=0&&(a+="-short"+(b?"-utc":"")),a},w=function(a,b){var c=a.width,d=a.height,e=Math.abs(h.utils.toRadian(b));return{width:Math.max(Math.cos(e)*c,d),height:Math.max(Math.sin(e)*c,d)}},x=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",c=h.utils.normalizeAngle(a),d="x"===b?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]],e=d.findIndex(function(a){return c>=a[0]&&cb.xAxisTickLabelLimit&&(a.x.tickFormatWordWrap=!0,a.x.tickFormatWordWrapLines=b.xTickWordWrapLinesLimit,n=y(k,b.xAxisTickLabelLimit,b.xTickWordWrapLinesLimit)),m.width>b.yAxisTickLabelLimit&&(a.y.tickFormatWordWrap=!0,a.y.tickFormatWordWrapLines=b.yTickWordWrapLinesLimit,o=y(m,b.yAxisTickLabelLimit,b.yTickWordWrapLinesLimit));var p=h?0:1,q=j?0:1,r=a.x.label,t=a.y.label,v=r.text&&!r.hide?1:0,x=t.text&&!t.hide?1:0,z=w(n,a.x.rotate),A=w(o,a.y.rotate);e?(r.padding=(-b.xAxisPadding-b.xFontLabelHeight)/2+b.xFontLabelHeight,r.paddingNoTicks=r.padding,t.padding=(-b.yAxisPadding-b.yFontLabelHeight)/2,t.paddingNoTicks=t.padding,v=0,x=0):(r.padding=l([p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight)]),r.paddingNoTicks=v*(b.distToXAxisLabel+b.xFontLabelHeight),t.padding=l([q*(b.yTickWidth+A.width),x*b.distToYAxisLabel]),t.paddingNoTicks=x*b.distToYAxisLabel);var B=b.xFontLabelDescenderLineHeight;return a.padding=Object.assign(a.padding,{b:a.x.hide?0:l([a.x.padding,p*(b.xTickWidth+z.height),v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,q*(b.yTickWidth+A.width),x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.paddingNoTicks=Object.assign({},a.paddingNoTicks,{b:a.x.hide?0:l([a.x.padding,v*(b.distToXAxisLabel+b.xFontLabelHeight+B)]),l:a.y.hide?0:l([a.y.padding,x*(b.distToYAxisLabel+b.yFontLabelHeight)])}),a.x=Object.assign(a.x,{density:z.width+2*u(b,"xDensityPadding",c.dimType),tickFontHeight:k.height,$minimalDomain:f.length,$maxTickTextW:n.width,$maxTickTextH:n.height,tickFormatWordWrapLimit:b.xAxisTickLabelLimit}),a.y=Object.assign(a.y,{density:A.height+2*u(b,"yDensityPadding",d.dimType),tickFontHeight:m.height,$minimalDomain:g.length,$maxTickTextW:o.width,$maxTickTextH:o.height,tickFormatWordWrapLimit:b.yAxisTickLabelLimit}),a},A=function(a){var b=a.unit,c=a.meta,d=a.settings,e=a.allowXVertical,f=a.allowYVertical,g=a.inlineLabels,h=c.dimension(b.x),i=c.dimension(b.y),j=c.scaleMeta(b.x,b.guide.x),k=c.scaleMeta(b.y,b.guide.y),l=j.isEmpty,m=k.isEmpty;b.guide.x.tickFormat=v(b.guide.x.tickFormat||t(h,d.defaultFormats),d.utcTime),b.guide.y.tickFormat=v(b.guide.y.tickFormat||t(i,d.defaultFormats),d.utcTime);var n=!!e&&!("measure"===h.dimType),o=!!f&&!("measure"===i.dimType);if(b.guide.x.padding=l?0:d.xAxisPadding,b.guide.x.paddingNoTicks=b.guide.x.padding,b.guide.y.padding=m?0:d.yAxisPadding,b.guide.y.paddingNoTicks=b.guide.y.padding,b.guide.x.rotate=n?-90:0,b.guide.x.textAnchor=x(b.guide.x.rotate,"x"),b.guide.y.rotate=o?-90:0,b.guide.y.textAnchor=x(b.guide.y.rotate,"y"),b.guide=z(b.guide,d,j,k,g),g){var p=b.guide.x.label,q=b.guide.y.label;p.cssClass+=" inline",p.dock="right",p.textAnchor="end",q.cssClass+=" inline",q.dock="right",q.textAnchor="end"}return b},B={NONE:function(a,b,c){var d=h.utils.clone(a);return C(h.utils.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.guide.x.tickFormatWordWrapLimit=c.xAxisTickLabelLimit,b.guide.y.tickFormatWordWrapLimit=c.yAxisTickLabelLimit,b}),d},"BUILD-LABELS":function(a,b){var c=h.utils.clone(a),d=[],e=[],f=null,g=null;h.utils.traverseJSON(c.unit,"units",r,function(a,c){if(a.isLeaf)return c;!f&&c.x&&(f=c),!g&&c.y&&(g=c),c.guide=c.guide||{},c.guide.x=c.guide.x||{label:""},c.guide.y=c.guide.y||{label:""},c.guide.x.label=h.utils.isObject(c.guide.x.label)?c.guide.x.label:{text:c.guide.x.label},c.guide.y.label=h.utils.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||b.dimension(c.x).dimName),c.y&&(c.guide.y.label.text=c.guide.y.label.text||b.dimension(c.y).dimName);var i=c.guide.x.label.text;i&&(d.push(i),c.guide.x.tickFormatNullAlias=c.guide.x.hasOwnProperty("tickFormatNullAlias")?c.guide.x.tickFormatNullAlias:"No "+i,c.guide.x.label.text="",c.guide.x.label._original_text=i);var j=c.guide.y.label.text;return j&&(e.push(j),c.guide.y.tickFormatNullAlias=c.guide.y.hasOwnProperty("tickFormatNullAlias")?c.guide.y.tickFormatNullAlias:"No "+j,c.guide.y.label.text="",c.guide.y.label._original_text=j),c});var i=" → ";return f&&(f.guide.x.label.text=f.guide.x.label.hide?"":d.join(i)),g&&(g.guide.y.label.text=g.guide.y.label.hide?"":e.join(i)),c},"BUILD-GUIDE":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){if(a.isLeaf)return d;var e=!a.isLeaf&&!a.isLeafParent,f=b.scaleMeta(d.x,d.guide.x),g=b.scaleMeta(d.y,d.guide.y),i=!e&&Boolean(f.dimType)&&"measure"!==f.dimType;return d.guide.x.rotate=i?-90:0,d.guide.x.textAnchor=x(d.guide.x.rotate),d.guide.x.tickFormat=d.guide.x.tickFormat||t(f,c.defaultFormats),d.guide.y.tickFormat=d.guide.y.tickFormat||t(g,c.defaultFormats),d.guide.x.padding=e?0:c.xAxisPadding,d.guide.x.paddingNoTicks=d.guide.x.padding,d.guide.y.padding=e?0:c.yAxisPadding,d.guide.y.paddingNoTicks=d.guide.y.padding,d.guide=z(d.guide,h.utils.defaults({distToXAxisLabel:f.isEmpty?c.xTickWidth:c.distToXAxisLabel,distToYAxisLabel:g.isEmpty?c.yTickWidth:c.distToYAxisLabel},c),f,g),d.guide.x=Object.assign(d.guide.x,{cssClass:e?d.guide.x.cssClass+" facet-axis":d.guide.x.cssClass,avoidCollisions:!!e||d.guide.x.avoidCollisions}),d.guide.y=Object.assign(d.guide.y,{cssClass:e?d.guide.y.cssClass+" facet-axis":d.guide.y.cssClass,avoidCollisions:!e&&d.guide.y.avoidCollisions}),d.guide=Object.assign(d.guide,{showGridLines:d.guide.hasOwnProperty("showGridLines")?d.guide.showGridLines:a.isLeafParent?"xy":""}),d}),d},"BUILD-COMPACT":function(a,b,c){var d=h.utils.clone(a);return C(h.utils.clone(d.unit),d.unit,function(a,d){return a.isLeaf?d:(d.guide.hasOwnProperty("showGridLines")||(d.guide.showGridLines=a.isLeafParent?"xy":""),a.isLeafParent?A({unit:d,meta:b,settings:h.utils.defaults({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(d.guide.x.cssClass+=" facet-axis compact",d.guide.x.avoidCollisions=!0,d.guide.y.cssClass+=" facet-axis compact",d.guide.y.avoidCollisions=!0,A({unit:d,meta:b,settings:h.utils.defaults({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},c),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),d}};B.AUTO=function(a,b,c){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(a,d){return B[d](a,b,c)},a)},B.COMPACT=function(a,b,c){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(a,d){return B[d](a,b,c)},a)};var C=function E(a,b,c){var d=p(b);d=c(r(d),d),d=m(d,a);var e=h.utils.omit(d,"units");return(d.units||[]).forEach(function(a){return E(h.utils.clone(a),q(a,e),c)}),d},D={get:function(a,b,c,d){var e=B[a]||B.NONE,f={dimension:function(a){var b=c.scales[a],d=c.sources[b.source].dims[b.dim]||{};return{dimName:b.dim,dimType:d.type,scaleType:b.type}},scaleMeta:function(a){var b=d("pos",a),e=b.domain(),f=c.scales[a],g=c.sources[f.source].dims[f.dim]||{};return{dimName:f.dim,dimType:g.type,scaleType:f.type,values:e,isEmpty:null==g.type}}},g={unit:h.utils.clone(c.unit)},i=e(g,f,b);return c.unit=i.unit,c}};b.SpecTransformAutoLayout=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=h.utils.isSpecRectCoordsOnly(b.unit)}return g(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.size,d=b.settings.specEngine.find(function(a){return c.width<=a.width||c.height<=a.height});return D.get(d.name,b.settings,b,function(b,c){return a.getScaleInfo(c||b+":default")})}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.FormatterRegistry=void 0;var e=c(3),f=c(2),g=d(f),h=g["default"].format(".4s"),i=g["default"].format(".2r"),j=g["default"].format(".1e"),k=function(){var a=/\.0+([^\d].*)?$/,b=/(\.\d+?)0+([^\d].*)?$/;return function(c){return c.replace(a,"$1").replace(b,"$1$2")}}(),l={"x-num-auto":function(a){var b=Math.abs(a),c=k(b<1?0===b?"0":b<1e-6?j(a):i(a):h(a));return c},percent:function(a){var b=parseFloat((100*a).toFixed(2));return b.toString()+"%"},day:g["default"].time.format("%d-%b-%Y"),"day-utc":g["default"].time.format.utc("%d-%b-%Y"),"day-short":g["default"].time.format("%d-%b"),"day-short-utc":g["default"].time.format.utc("%d-%b"),week:g["default"].time.format("%d-%b-%Y"),"week-utc":g["default"].time.format.utc("%d-%b-%Y"),"week-short":g["default"].time.format("%d-%b"),"week-short-utc":g["default"].time.format.utc("%d-%b"),month:function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format(d)(a)},"month-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%B, %Y":"%B";return g["default"].time.format.utc(d)(a)},"month-short":function(a){var b=new Date(a),c=b.getMonth(),d=0===c?"%b '%y":"%b"; -return g["default"].time.format(d)(a)},"month-short-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=0===c?"%b '%y":"%b";return g["default"].time.format.utc(d)(a)},"month-year":g["default"].time.format("%B, %Y"),"month-year-utc":g["default"].time.format.utc("%B, %Y"),quarter:function(a){var b=new Date(a),c=b.getMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getFullYear()},"quarter-utc":function(a){var b=new Date(a),c=b.getUTCMonth(),d=(c-c%3)/3;return"Q"+(d+1)+" "+b.getUTCFullYear()},year:g["default"].time.format("%Y"),"year-utc":g["default"].time.format.utc("%Y"),"x-time-auto":null},m={get:function(a,b){var c=b||"",d=function(a){return(null===a||"undefined"==typeof a?c:a).toString()},f=l.hasOwnProperty(a),h=f?l[a]:d;return f&&(h=l[a]),!f&&a&&(h=function(b){var c=e.utils.isDate(b)?g["default"].time.format(a):g["default"].format(a);return c(b)}),f||a||(h=d),h},add:function(a,b){l[a]=b}};b.FormatterRegistry=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=0&&(d in e||(e[d]=[]),e[d].indexOf(a.key[d])<0&&e[d].push(a.key[d])),c.indexOf(d)>=0&&(d in f||(f[d]=[]),f[d].indexOf(a.key[d])<0&&f[d].push(a.key[d]))}),a.units&&a.units.forEach(i)}})};return g(a.unit),{xFacetCount:Object.keys(e).reduce(function(a,b){return a*e[b].length},1),yFacetCount:Object.keys(f).reduce(function(a,b){return a*f[b].length},1)}},m={"entire-view":function(a,b,c,d){var e=c.unit.guide,f=l(c),g=f.xFacetCount,m=f.yFacetCount,n=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0,o=e.paddingNoTicks?e.padding.b-e.paddingNoTicks.b:0,p=e.paddingNoTicks&&a.height-oa.height||g*c.settings.minFacetWidth+n>a.width,q=e.paddingNoTicks&&a.width-na.height||g*c.settings.minFacetWidth+n>a.width;p&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),q&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var r=a.width,s=b("x",c.unit,i);if(s<=a.width)d(c.unit,c.settings);else{var t=b("x",c.unit,j);if(t>a.width){var u=Math.max(a.width,b("x",c.unit,k));r=Math.min(t,u)}}var v=Math.max(a.height,b("y",c.unit,k));!p&&r>a.width&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x"),!q&&v>a.height&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var w=a.width,x=a.height;return{newW:w,newH:x}},minimal:function(a,b,c){var d=b("x",c.unit,k),e=b("y",c.unit,k);return{newW:d,newH:e}},normal:function(a,b,c,d){var e=c.unit.guide;e.paddingNoTicks&&(a.width-e.padding.l+e.paddingNoTicks.la.width){var m=Math.max(a.width,b("x",c.unit,k));f=Math.min(l,m)}}var n=Math.max(a.height,b("y",c.unit,k));return{newW:f,newH:n}},"fit-width":function(a,b,c,d){var e=c.unit.guide,f=e.paddingNoTicks?e.padding.l-e.paddingNoTicks.l:0;(e.paddingNoTicks&&a.width-fa.width)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"y");var g=b("x",c.unit,i);g<=a.width&&d(c.unit,c.settings);var j=a.width,m=b("y",c.unit,k);return{newW:j,newH:m}},"fit-height":function(a,b,c){var d=c.unit.guide,e=d.paddingNoTicks?d.padding.b-d.paddingNoTicks.b:0;(d.paddingNoTicks&&a.height-ea.height)&&h.SpecTransformOptimize.hideAxisTicks(c.unit,c.settings,"x");var f=b("x",c.unit,k),g=a.height;return{newW:f,newH:g}}};b.SpecTransformCalcSize=function(){function a(b){e(this,a),this.spec=b,this.isApplicable=g.utils.isSpecRectCoordsOnly(b.unit)}return f(a,[{key:"transform",value:function(a){var b=this.spec;if(!this.isApplicable)return b;var c=b.settings.fitModel;if(!c)return b;var e=b.scales,f=function(a,b){return a.reduce(function(a,c){var d=c.key||{},e=d[b];return a[e]=a[e]||[],a[e].push(c),a},{})},g=function(a,b){var c=0;return c=a.discrete?b*a.domain().length:4*b},i=function q(b,c,h){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,j="x"===b?c.x:c.y,k="x"===b?c.y:c.x,l=c.guide,m=h("x"===b?l.x:l.y),n="x"===b?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===c.units[0].type&&"y"===b===Boolean(c.units[0].flip)&&c.units[0].label&&!a.getScaleInfo(c.units[0].label,i).isEmpty()){var o=l.label&&l.label.fontSize?l.label.fontSize:10,p=c.frames.reduce(function(a,b){return b.full().length*o},0),r=g(a.getScaleInfo(j,i),m);return n+Math.max(p,r)}if("COORDS.RECT"!==c.units[0].type){var s=a.getScaleInfo(j,i);return n+g(s,m)}var t=f(c.frames,e[k].dim),u=Object.keys(t).map(function(a){return t[a].map(function(a){return q(b,a.units[0],h,a)}).reduce(function(a,b){return a+b},0)}),v=Math.max.apply(Math,d(u));return n+v},j=b.settings.size,k=j.width,l=j.height,n=m[c];if(n){var o=n(j,i,b,h.SpecTransformOptimize.optimizeXAxisLabel);k=o.newW,l=o.newH}var p=function(c,d,e){var f=b.settings.getScrollbarSize(a.getLayout().contentContainer),g=d.width>c.width&&d.width<=c.width*e?c.width:d.width,h=d.height>c.height&&d.height<=c.height*e?c.height:d.height,i=c.width-g,j=c.height-h,k=j>=0?0:f.width,l=i>=0?0:f.height;return{height:h-l,width:g-k}};return b.settings.size=p(j,{width:k,height:l},b.settings.avoidScrollAtRatio),b}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c0?c:0,b.guide.padding.b+=b.guide.padding.b>0?c:0)};d(a)}},{key:"hideAxisTicks",value:function(a,b,c){var d=function e(a){var b="x"===c?"b":"l",d=a.guide;if(!d[c].hide&&!d[c].hideTicks){d[c].hideTicks=!0;var f=d[c].label.text&&!d[c].label.hide;d.padding[b]=d.paddingNoTicks?d.paddingNoTicks[b]:0,d[c].padding=d[c].paddingNoTicks||0,d[c].label.padding=f?d[c].label.paddingNoTicks:0}(a.units||[]).filter(function(a){return"COORDS.RECT"===a.type}).forEach(function(a){return e(a)})};d(a)}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformApplyRatio=void 0;var e=function(){function a(a,b){for(var c=0;c3&&void 0!==arguments[3]?arguments[3]:0,e=b(a,d);e&&(a.units||[]).map(function(a){return s(a,b,c,d+1)}),c(a,d)},g=[],h=[],i=function(a,b){if(b>1||!c(a))throw new Error("Not applicable");g.push(a.x),h.push(a.y);var e=a.units||[],f=e.map(function(a){if(!c(a)&&!d(a))throw new Error("Not applicable");return a}).filter(c);return 1===f.length};e(a.unit,i,function(){return 0});var j=function(b){return a.scales[b]},k=function(a){return"/"===a.source&&!a.ratio&&!a.fitToFrameByDims},l=function(a){return"ordinal"===a.type||"period"===a.type&&!a.period},m=g.map(j).filter(k),n=h.map(j).filter(k),o=2;if([m.length,n.length].some(function(a){return a===o})){var p=function(a){return a.dim},q=function(a,b,c){return a.fitToFrameByDims=c.slice(0,b).map(p)},r=function(a,c){c.filter(l).length===o&&(c.forEach(q),c[0].ratio=f.utils.generateRatioFunction(a,c.map(p),b))};r("x",m),r("y",n)}}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.SpecTransformExtractAxes=void 0;var e=function(){function a(a,b){for(var c=0;c1||!b(a))throw new Error("Not applicable");a.guide=a.guide||{};var f=a.guide,j=f.padding||{l:0,r:0,t:0,b:0},k=f.paddingNoTicks||{l:0,b:0};e.l+=j.l,e.r+=j.r,e.t+=j.t,e.b+=j.b,g.l+=k.l,g.b+=k.b,h.push(Object.assign({},e)),i.push(Object.assign({},g));var l=a.units||[],m=l.map(function(a){if(!b(a)&&!c(a))throw new Error("Not applicable");return a}).filter(b);return 1===m.length},k=function(a){var b=h.pop(),c=i.pop(),f=a.guide||{};f.x=f.x||{},f.x.padding=f.x.padding||0,f.x.paddingNoTicks=f.x.paddingNoTicks||0,f.y=f.y||{},f.y.padding=f.y.padding||0,f.y.paddingNoTicks=f.y.paddingNoTicks||0,f.padding={l:d(a.y),r:d(1),t:d(1),b:d(a.x)},f.paddingNoTicks={l:0,b:0},f.autoLayout="extract-axes",f.x.padding+=e.b-b.b,f.y.padding+=e.l-b.l,f.x.paddingNoTicks+=g.b-c.b,f.y.paddingNoTicks+=g.l-c.l};f.utils.traverseSpec(a.unit,j,k),a.unit.guide.padding=e,a.unit.guide.paddingNoTicks=g}}]),a}()},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e=function(){function a(a,b){for(var c=0;c0&&void 0!==arguments[0]?arguments[0]:{},d=b.src,e=void 0===d?null:d,f=b.timeout,g=void 0===f?Number.MAX_SAFE_INTEGER:f,h=b.syncInterval,i=void 0===h?Number.MAX_SAFE_INTEGER:h,j=b.callbacks,k=void 0===j?{}:j;c(this,a),this.setTimeout(g),this.setSyncInterval(i),this.setCallbacks(k),this._running=!1,this._queue=[],this._result=e,this._syncDuration=0,this._asyncDuration=0,this._lastCall=null,this._requestedFrameId=null,this._tasksCount=0,this._finishedTasksCount=0}return e(a,[{key:"setTimeout",value:function(b){a.checkType(b,"number","timeout"),this._timeout=b}},{key:"setSyncInterval",value:function(b){a.checkType(b,"number","syncInterval"),this._syncInterval=b}},{key:"setCallbacks",value:function(b){a.checkType(b,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},b)}},{key:"addTask",value:function(a){return this._queue.push(a),this._tasksCount++,this}},{key:"run",value:function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,a.runnersInProgress++,this._loopTasks()}},{key:"isRunning",value:function(){return this._running}},{key:"_loopTasks",value:function(){for(var b,c,d,e,f=0,g=this._syncInterval/a.runnersInProgress;this._running&&!(d=this._asyncDuration>this._timeout)&&!(e=f>g)&&(b=this._queue.shift());){if(c=this._runTask(b),null===c)return;this._syncDuration+=c,this._asyncDuration+=c,f+=c}d&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!d&&e&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))}},{key:"_runTask",value:function(a){var b=performance.now();if(this._callbacks.error)try{this._result=a.call(null,this._result,this)}catch(c){return this.stop(),this._callbacks.error.call(null,c,this),null}else this._result=a.call(null,this._result,this);var d=performance.now(),e=d-b;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),e}},{key:"_requestFrame",value:function(){var a=this,b=performance.now();this._requestedFrameId=requestAnimationFrame(function(){a._requestedFrameId=null;var c=performance.now();a._asyncDuration+=c-b,a._loopTasks()})}},{key:"stop",value:function(){if(!this._running)throw new Error("Task Runner is already stopped");this._running=!1,a.runnersInProgress--,this._requestedFrameId&&(cancelAnimationFrame(this._requestedFrameId),this._requestedFrameId=null)}}],[{key:"checkType",value:function(a,b,c){if(("undefined"==typeof a?"undefined":d(a))!==b)throw new Error('Task Runner "'+c+'" property is not "'+b+'"')}}]),a}();b["default"]=f,f.runnersInProgress=0},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.Chart=void 0;var g=function(){function a(a,b){for(var c=0;c0)throw new Error(c[0]);var f=k.chartTypesRegistry.get(a.type);a=j.utils.defaults(a,{autoResize:!0}),a.settings=i.Plot.setupSettings(a.settings),a.dimensions=i.Plot.setupMetaInfo(a.dimensions,a.data);var g=e(this,(b.__proto__||Object.getPrototypeOf(b)).call(this,f(a)));return a.autoResize&&b.winAware.push(g),g}return f(b,a),g(b,[{key:"destroy",value:function(){var a=b.winAware.indexOf(this);a!==-1&&b.winAware.splice(a,1),h(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"destroy",this).call(this)}}]),b}(i.Plot);l.winAware=[],l.resizeOnWindowEvent=function(){function a(){!c&&l.winAware.length&&(c=window.requestAnimationFrame(b))}function b(){c=0;for(var a=0,b=l.winAware.length;a2&&void 0!==arguments[2]?arguments[2]:[];return e[a]=b,f[a]=c,this},getAllRegisteredTypes:function(){return e}};b.chartTypesRegistry=h},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b0,e.y.hide=Math.floor(d.options.left)>0}var j=c.config.options,k=c.config.guide.padding;return c.L=j.left+k.l,c.T=j.top+k.t,c.W=j.width-(k.l+k.r),c.H=j.height-(k.t+k.b),c}return h(b,a),i(b,[{key:"defineGrammarModel",value:function(a){var b=this.W,c=this.H;return this.xScale=a("pos",this.config.x,[0,b]),this.yScale=a("pos",this.config.y,[c,0]),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return b/2},yi:function(){return c/2},sizeX:function(){return b},sizeY:function(){return c}}}},{key:"getGrammarRules",value:function(){return[function(a){var b=a.scaleX,c=a.scaleY;return{xi:function(c){return c?b(c[b.dim]):a.xi(c)},yi:function(b){return b?c(b[c.dim]):a.yi(b)},sizeX:function(c){return c?b.stepSize(c[b.dim]):a.sizeX(c)},sizeY:function(b){return b?c.stepSize(b[c.dim]):a.sizeY(b)}}}]}},{key:"createScreenModel",value:function(a){return a}},{key:"allocateRect",value:function(a){var b=this,c=this.screenModel;return{slot:function(a){return b.config.options.container.selectAll(".uid_"+a)},left:c.xi(a)-c.sizeX(a)/2,top:c.yi(a)-c.sizeY(a)/2,width:c.sizeX(a),height:c.sizeY(a),containerWidth:this.W,containerHeight:this.H}}},{key:"drawFrames",value:function(a){var b=Object.assign({},this.config),c=b.options,d=this.W,e=this.H;if(b.x=this.xScale,b.y=this.yScale,b.x.scaleObj=this.xScale,b.y.scaleObj=this.yScale,b.x.guide=b.guide.x,b.y.guide=b.guide.y,b.x.guide.label.size=d,b.y.guide.label.size=e,(c.container.attr("transform")?(0,r.d3_transition)(c.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):c.container).attr("transform",n.utilsDraw.translate(this.L,this.T)),b.x.guide.hide)this._removeDimAxis(c.container,b.x);else{var f=b.x.guide.scaleOrient,g="top"===f?[0,0-b.guide.x.padding]:[0,e+b.guide.x.padding];this._drawDimAxis(c.container,b.x,g,d)}if(b.y.guide.hide)this._removeDimAxis(c.container,b.y);else{var h=b.y.guide.scaleOrient,i="right"===h?[d+b.guide.y.padding,0]:[0-b.guide.y.padding,0];this._drawDimAxis(c.container,b.y,i,e)}var j=a.reduce(function(a,b){return a.concat((b.units||[]).map(function(a){return a.uid}))},[]),k=this._drawGrid(c.container,b,d,e,c),l=(0,r.d3_selectAllImmediate)(k,".cell").data(j,function(a){return a});l.enter().append("g").attr("class",function(a){return p.CSS_PREFIX+"cell cell uid_"+a}),(0,r.d3_transition)(l.classed("tau-active",!0),this.config.guide.animationSpeed).attr("opacity",1),(0,r.d3_transition)(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()}},{key:"_drawDimAxis",value:function(a,b,c,d){var f=this,g=k["default"].svg.axis().scale(b.scaleObj).orient(b.guide.scaleOrient),h=q.FormatterRegistry.get(b.guide.tickFormat,b.guide.tickFormatNullAlias);null!==h&&(g.ticks(t(d/b.guide.density)),g.tickFormat(h));var i=this.config.guide.animationSpeed;s(a,this._getAxisSelector(b)).classed("tau-active",!0).classed(b.guide.cssClass,!0).call(function(a){var h=(0,r.d3_transition)(a,i,"axisTransition"),j=a.attr("transform"),k=n.utilsDraw.translate.apply(n.utilsDraw,e(c));k!==j&&(j?h:a).attr("transform",n.utilsDraw.translate.apply(n.utilsDraw,e(c))),h.call(g),h.attr("opacity",1);var l="h"===n.utilsDraw.getOrientation(b.guide.scaleOrient),m="ordinal"===b.scaleType||"period"===b.scaleType;if(m&&!b.guide.hideTicks&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(h,b,l,i),"linear"===b.scaleType&&(0,r.d3_decorator_highlightZeroTick)(a,b.scaleObj),(0,r.d3_decorator_wrap_tick_label)(a,i,b.guide,l,b),b.guide.label.hide||(0,r.d3_decorator_prettify_axis_label)(a,b.guide.label,l,d,i),b.guide.hideTicks)return a.selectAll(".tick").remove(),void a.selectAll(".domain").remove();var o=b.scaleObj.ticks?b.scaleObj.ticks():b.scaleObj.domain(),p=function(){m&&b.guide.avoidCollisions&&(0,r.d3_decorator_avoidLabelsCollisions)(a,l,o),l&&"time"===b.scaleType&&(0,r.d3_decorator_fixHorizontalAxisTicksOverflow)(a,o)},q=function(){!l||"time"!==b.scaleType&&"linear"!==b.scaleType||(0,r.d3_decorator_fixEdgeAxisTicksOverflow)(a,o)},s=function(){p(),q()};p();var t="_transitionEndTimeout_"+(l?"h":"v");clearTimeout(f[t]),i>0?f[t]=setTimeout(s,1.5*i):q()})}},{key:"_removeDimAxis",value:function(a,b){var c=(0,r.d3_selectAllImmediate)(a,this._getAxisSelector(b)).classed("tau-active",!1);(0,r.d3_transition)(c,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()}},{key:"_getAxisSelector",value:function(a){var b="h"===n.utilsDraw.getOrientation(a.guide.scaleOrient);return"g."+(b?"x":"y")+".axis"}},{key:"_drawGrid",value:function(a,b,c,d){var e=this,f=s(a,"g.grid").attr("transform",n.utilsDraw.translate(0,0)).call(function(a){var f=a,g=e.config.guide.animationSpeed,h=(b.guide.showGridLines||"").toLowerCase();if(h.length>0){var i=s(f,"g.grid-lines");if(h.indexOf("x")>-1){var j=b.x,l="top"===j.guide.scaleOrient?-1:1,m=k["default"].svg.axis().scale(j.scaleObj).orient(j.guide.scaleOrient).tickSize(l*d),o=q.FormatterRegistry.get(j.guide.tickFormat);null!==o&&(m.ticks(t(c/j.guide.density)),m.tickFormat(o));var p=s(i,"g.grid-lines-x"),u=(0,r.d3_transition)(p,g).call(m),v="h"===n.utilsDraw.getOrientation(j.guide.scaleOrient),w="ordinal"===j.scaleType||"period"===j.scaleType;w&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(u,j,v,g),"linear"!==j.scaleType||j.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(p,j.scaleObj);var x=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(x,v,c,d,g),j.guide.hideTicks&&p.selectAll(".tick").filter(function(a){return 0!=a}).remove()}if(h.indexOf("y")>-1){var y=b.y,z="right"===y.guide.scaleOrient?1:-1,A=k["default"].svg.axis().scale(y.scaleObj).orient(y.guide.scaleOrient).tickSize(z*c),B=q.FormatterRegistry.get(y.guide.tickFormat);null!==B&&(A.ticks(t(d/y.guide.density)),A.tickFormat(B));var C=s(i,"g.grid-lines-y"),D=(0,r.d3_transition)(C,g).call(A),E="h"===n.utilsDraw.getOrientation(y.guide.scaleOrient),F="ordinal"===y.scaleType||"period"===y.scaleType;F&&(0,r.d3_decorator_prettify_categorical_axis_ticks)(D,y,E,g),"linear"!==y.scaleType||y.guide.hideTicks||(0,r.d3_decorator_highlightZeroTick)(C,y.scaleObj);var G=["time","ordinal","period"],H=G.indexOf(y.scaleType)!==-1;if(H){var I=s(i,"g.tau-extraGridLines");(0,r.d3_decorator_fix_axis_start_line)(I,E,c,d,g)}y.guide.hideTicks&&C.selectAll(".tick").filter(function(a){return 0!=a}).remove()}i.selectAll("text").remove()}});return f}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=e}):[b[0],b[1]],{dim:d[a].dim,func:d[a].discrete?"inset":"between",args:c}});b.fire("brush",a)};return a.selectAll(".brush").remove(),a.append("g").attr("class","brush").each(function(a){e[a]=k["default"].svg.brush().y(d[a]).on("brushstart",f).on("brush",h).on("brushend",g),k["default"].select(this).classed("brush-"+n.utils.generateHash(a),!0).call(e[a])}).selectAll("rect").attr("x",c/2*-1).attr("width",c),a}},{key:"_forceBrushing",value:function(){var a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},b=this.columnsBrushes,c=this.columnsScalesMap;Object.keys(a).filter(function(d){return b[d]&&c[d]&&a[d]}).forEach(function(d){var f=a[d],g=[]; -if(c[d].discrete){var h=f.map(c[d]).filter(function(a){return a>=0}),i=c[d].stepSize()/2;g=[Math.min.apply(Math,e(h))-i,Math.max.apply(Math,e(h))+i]}else g=[f[0],f[1]];var j=n.utils.generateHash(d);b[d].extent(g),b[d](k["default"].select(".brush-"+j)),b[d].event(k["default"].select(".brush-"+j))})}}]),b}(l.Element)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.GeoMap=void 0;var h=function(){function a(a,b){for(var c=0;c0){var f=d[e[0]].toLowerCase();b=c[f]}return b}},{key:"_highlightArea",value:function(a){var b=this,c=this.config.options.container,d=this.contourToFill;c.selectAll(".map-contour-"+d).classed("map-contour-highlighted",function(c){return a(b._resolveFeature(c))})}},{key:"_highlightPoint",value:function(a){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(b){var c=b.data;return a(c)}).attr("opacity",function(b){var c=b.data;return a(c)?r:.1})}},{key:"_createProjection",value:function(a,b,c){var d=this.W,e=this.H,f=this.config.guide,g=100,h=[d/2,e/2],i=c||a.center,k=f.projection||a.projection||"mercator",l=this._createD3Projection(k,i,g,h),n=j["default"].geo.path().projection(l),o=n.bounds(m["default"].feature(a,a.objects[b])),p=g*d/(o[1][0]-o[0][0]),q=g*e/(o[1][1]-o[0][1]);return g=p>>1;a[e]1){var i,k=[],l={LineString:e,MultiLineString:f,Polygon:f,MultiPolygon:function(a){a.forEach(f)}};g(b),k.forEach(arguments.length<3?function(a){h.push(a[0].i)}:function(a){c(a[0].g,a[a.length-1].g)&&h.push(a[0].i)})}else for(var m=0,n=a.arcs.length;m0}var e={},f=[],g=[];return b.forEach(function(a){"Polygon"===a.type?c(a.arcs):"MultiPolygon"===a.type&&a.arcs.forEach(c)}),f.forEach(function(a){if(!a._){var b=[],c=[a];for(a._=1,g.push(b);a=c.pop();)b.push(a),a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].forEach(function(a){a._||(a._=1,c.push(a))})})})}}),f.forEach(function(a){delete a._}),{type:"MultiPolygon",arcs:g.map(function(b){var c,f=[];if(b.forEach(function(a){a.forEach(function(a){a.forEach(function(a){e[a<0?~a:a].length<2&&f.push(a)})})}),f=j(a,f),(c=f.length)>1)for(var g,h=d(b[0][0]),i=0;i0;){var c=(b+1>>1)-1,e=d[c];if(r(a,e)>=0)break;d[e._=b]=e,d[a._=b=c]=a}}function b(a,b){for(;;){var c=b+1<<1,f=c-1,g=b,h=d[g];if(f0&&(a=d[e],b(d[a._=0]=a,0)),c}},c.remove=function(c){var f,g=c._;if(d[g]===c)return g!==--e&&(f=d[e],(r(f,c)<0?a:b)(d[f._=g]=f,g)),g},c}function t(a,b){function e(a){h.remove(a),a[1][2]=b(a),h.push(a)}var f=c(a.transform),g=d(a.transform),h=s();return b||(b=m),a.arcs.forEach(function(a){var c,d,i,j,k=[],l=0;for(d=0,i=a.length;d0&&(e+=h*k),f/=h,g/=h,e+=f>0&&g>0?0*o:f<0&&g>0?1*o:f<0&&g<0?2*o:3*o;for(var j,p,q,r,s,u,v,w=b[a].x,x=b[a].y-b[a].height+2,y=b[a].x+b[a].width,z=b[a].y+2,A=0;Ad&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var n;n=p?a(k,b,c):q(k);var o=n-h;Math.random()d&&(b[k].x=l),b[k].x<0&&(b[k].x=l),b[k].y>e&&(b[k].y=m),b[k].y<0&&(b[k].y=m);var u;u=p?a(k,b,c):q(k);var v=u-g;Math.random()1||j<0||j>1)},u=function(a,b,c){return a-b/c};return f.start=function(a){for(var c=b.length,d=1,e=1,f=0;fd.right+j||id.bottom+j)return null;var k=(e.find([h,i])||[]).map(function(a){var b=Math.sqrt(Math.pow(h-a.x,2)+Math.pow(i-a.y,2));if(b>j)return null;var c=b0&&p.length>0?this.autoPosition(o,p):o;var q=this.guide.position.reduce(function(a,b){return Object.assign(a,d({},b,!0))},{});o.text=o.text=q["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(o.text,g):o.text,o.text=q["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(o.text,o.edges):o.text,o.text=q["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(o.text):o.text,o.text=q["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(o.text):o.text;var r=o.text,s=function(a){return function(b,c){return r[c][a]}},t=s("x"),u=s("y"),v=s("angle"),w=s("color"),x=s("label"),y=function(){this.style("fill",w).style("font-size",b.guide.fontSize+"px").style("display",function(a,b){return r[b].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(a,b){return"translate("+t(a,b)+","+u(a,b)+") rotate("+v(a,b)+")"}).text(x)};e.hideEqualLabels&&r.filter(function(a){return!a.hide}).filter(function(a,b,c){return b0&&(a.hide=!0)}),a}},{key:"hideOnLabelLabelOverlap",value:function(a){var b=this,c={min:0,max:1,norm:2},d={"min/min":function(a,b){return b.y-a.y},"max/max":function(a,b){return a.y-b.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(a,b){return a.y-b.y}},e=function(a,e){var f=b.getLabelRect(a),g=b.getLabelRect(e),h=!a.hide&&!e.hide,i=h*Math.max(0,Math.min(g.x1,f.x1)-Math.max(f.x0,g.x0)),j=h*Math.max(0,Math.min(g.y1,f.y1)-Math.max(f.y0,g.y0));if(i*j>0){var k=[a,e];k.sort(function(a,b){return c[a.extr]-c[b.extr]});var l=d[k[0].extr+"/"+k[1].extr](k[0],k[1])<0?k[0]:k[1];l.hide=!0}};return a.filter(function(a){return!a.hide}).sort(function(a,b){return c[a.extr]-c[b.extr]}).forEach(function(b){a.forEach(function(a){b.i!==a.i&&e(b,a)})}),a}},{key:"getLabelRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.w/2-b,x1:a.x+a.w/2+b,y0:a.y-a.h/2-b,y1:a.y+a.h/2+b}}},{key:"getPointRect",value:function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{x0:a.x-a.size/2-b,x1:a.x+a.size/2+b,y0:a.y-a.size/2-b,y1:a.y+a.size/2+b}}},{key:"hideOnLabelAnchorOverlap",value:function(a){var b=this,c=function(a,c){var d=b.getLabelRect(a,2),e=b.getPointRect(c,2),f=Math.max(0,Math.min(e.x1,d.x1)-Math.max(e.x0,d.x0)),g=Math.max(0,Math.min(e.y1,d.y1)-Math.max(e.y0,d.y0));return f*g>.001};return a.filter(function(a){return!a.hide}).forEach(function(b){for(var d=a.length,e=0;e1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(c).reduce(function(a,b){return a[b]=c[b],a},new a(b))}}]),a}()},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.LayerLabelsRules=void 0;var e=function(){function a(a,b){for(var c=0;c=0},l=function(a,b){return!a.discrete&&b[a.dim]<0},m=function(a,b){return a.w(b)/2+Math.floor(a.model.size(b)/5)},n=function(a,b){return a.h(b)/2+Math.floor(a.model.size(b)/5)},o=function(a){return function(b){return{dx:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dx(c);if("-"===a[2]&&!l(d,c))return b.dx(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dx(c)+e*f*b.model.size(c)/2+e*m(b,c)}}}},p=function(a){return function(b){return{dy:function(c){var d=b.model.scaleY;if("+"===a[2]&&!k(d,c))return b.dy(c);if("-"===a[2]&&!l(d,c))return b.dy(c);var e=a[1],f=a[0]===a[0].toUpperCase()?1:0;return b.dy(c)+e*f*b.model.size(c)/2+e*n(b,c)}}}};h.regRule("l",o(["l",-1,null])).regRule("L",o(["L",-1,null])).regRule("l+",o(["l",-1,"+"])).regRule("l-",o(["l",-1,"-"])).regRule("L+",o(["L",-1,"+"])).regRule("L-",o(["L",-1,"-"])).regRule("r",o(["r",1,null])).regRule("R",o(["R",1,null])).regRule("r+",o(["r",1,"+"])).regRule("r-",o(["r",1,"-"])).regRule("R+",o(["R",1,"+"])).regRule("R-",o(["R",1,"-"])).regRule("t",p(["t",-1,null])).regRule("T",p(["T",-1,null])).regRule("t+",p(["t",-1,"+"])).regRule("t-",p(["t",-1,"-"])).regRule("T+",p(["T",-1,"+"])).regRule("T-",p(["T",-1,"-"])).regRule("b",p(["b",1,null])).regRule("B",p(["B",1,null])).regRule("b+",p(["b",1,"+"])).regRule("b-",p(["b",1,"-"])).regRule("B+",p(["B",1,"+"])).regRule("B-",p(["B",1,"-"])).regRule("rotate-on-size-overflow",function(a,b){var c=b.data,d=function(b){return a.model.size(b).5,g={};if(f){var h=.5;g={angle:function(){return-90},w:function(b){return a.h(b)},h:function(b){return a.w(b)},dx:function(b){return a.h(b)*h-2},dy:function(){return 0}}}return g}).regRule("hide-by-label-height-vertical",function(a){return{hide:function(b){var c=void 0,d=void 0;return 0===a.angle(b)?(d=a.h(b),c=Math.abs(a.model.y0(b)-a.model.yi(b))):(d=a.w(b),c=a.model.size(b)),d>c||a.hide(b)}}}).regRule("cut-label-vertical",function(a){return{h:function(b){var c=a.h(b);if(Math.abs(a.angle(b))>0){var d=a.label(b),e=Math.abs(a.model.y0(b)-a.model.yi(b)),f=i(d,c,e);return f0){var e=a.label(b),f=a.model.y0(b)=0?1:-1},c=a.model.flip?m:n,d=function(d){return b(a,d)*c(a,d)};return a.model.flip?{dx:d}:{dy:d}}).regRule("inside-start-then-outside-end-horizontal",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-horizontal")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("inside-start-then-outside-end-vertical",function(a,b){var c=[h.getRule("from-beginning"),h.getRule("towards"),h.getRule("cut-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=[h.getRule("to-end"),h.getRule("towards"),h.getRule("cut-outer-label-vertical")].reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return c.label(a).length>=d.label(a).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?c:d)[b](a)},a},{}))}).regRule("outside-then-inside-horizontal",function(a,b){var c=["r+","l-","cut-outer-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a).length>c.label(a).length};return Object.assign({},c,["x","dx","hide","label"].reduce(function(a,b){return a[b]=function(a){return(e(a)?d:c)[b](a)},a},{}))}).regRule("outside-then-inside-vertical",function(a,b){var c=["t+","b-","cut-outer-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),d=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(h.getRule).reduce(function(a,c){return f.LayerLabelsModel.compose(a,c(a,b))},a),e=function(a){return d.label(a,b).length>c.label(a,b).length};return Object.assign({},c,["y","dy","hide","label"].reduce(function(a,f){return a[f]=function(a){return(e(a)?d:c)[f](a,b)},a},{}))}).regRule("hide-by-label-height-horizontal",function(a){return{hide:function(b){return a.model.size(b)0)return e+i;var j=h-c;return j>0?e-j:e},dy:function f(b){var f=a.dy(b),c=a.y(b)+f,e=a.h(b),g=c-e/2,h=c+e/2,i=0-g;if(i>0)return 0;var j=h-d;return j>0?f-j:f}}})},function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0});var d=function(){function a(a,b){for(var c=0;c=g?this.items[b]=c.revert():e2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b].x,e=a[b].y-a[b].h+2,f=a[b].x+a[b].w,g=a[b].y+2;return a.reduce(function(a,h,i){var j=i!==b,k=h.x,l=h.y-h.h+2,m=h.x+h.w,n=h.y+2,o=Math.max(0,Math.min(m,f)-Math.max(k,d)),p=Math.max(0,Math.min(n,g)-Math.max(l,e)),q=o*p;return a+j*(q*c)},0)}}).reg("auto:avoid-label-anchor-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(b){var d=a[b],e=d.x-d.w/2,f=d.x+d.w/2,g=d.y-d.h/2+2,h=d.y+d.h/2+2;return a.reduce(function(a,b){var d=b.x0-b.size/2,i=b.x0+b.size/2,j=b.y0-b.size/2,k=b.y0+b.size/2,l=Math.max(0,Math.min(i,f)-Math.max(d,e)),m=Math.max(0,Math.min(k,h)-Math.max(j,g)),n=l*m;return a+n*c},0)}}).reg("auto:avoid-label-edges-overlap",function(a,b){var c=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return function(d){var e=a[d],f=e.x-e.w/2,h=e.x+e.w/2,i=e.y-e.h/2,j=e.y+e.h/2;return b.reduce(function(a,b){var d=g(f,h,b.x0,b.x1,i,j,b.y0,b.y1),e=g(f,h,b.x0,b.x1,j,i,b.y0,b.y1);return a+(d+e)*c},0)}})},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.Area=void 0;var e=c(2),f=d(e),g=c(22),h=c(3),i=c(52),j=c(53),k=c(7),l=c(9),m=c(13),n=c(54),o={draw:i.BasePath.draw,getClosestElement:i.BasePath.getClosestElement,highlight:i.BasePath.highlight,highlightDataPoints:i.BasePath.highlightDataPoints,addInteraction:i.BasePath.addInteraction,_getBoundsInfo:i.BasePath._getBoundsInfo,_sortElements:i.BasePath._sortElements,init:function(a){var b=i.BasePath.init(a),c=b.stack;return b.transformRules=[b.flip&&k.GrammarRegistry.get("flip"),!c&&k.GrammarRegistry.get("groupOrderByAvg"),c&&i.BasePath.grammarRuleFillGaps,c&&k.GrammarRegistry.get("stack")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),e=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),f=Object.assign({},c,{defMin:e.defMinSize,defMax:e.defMaxSize,minLimit:e.minSize,maxLimit:e.maxSize});return k.GrammarRegistry.get("adjustStaticSizeScale")(a,f)}],b},buildModel:function(a){var b=i.BasePath.baseModel(a),c=this.node().config.guide,d=(0,j.getLineClassesByCount)(a.model.scaleColor.domain().length),e=g.CSS_PREFIX+"area area i-role-path "+d+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return e+" "+b["class"](a[0])+" frame"}};var h=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(c){return{id:a.id(c),x:b.x0(c),y:b.y0(c)}},o={fill:function(a){return b.color(a[0])},stroke:function(a){var c=b.color(a[0]);return c.length>0&&(c=f["default"].rgb(c).darker(1)),c}};b.pathAttributesEnterInit=o,b.pathAttributesUpdateDone=o;var p="polyline"===(0,m.getInterpolatorSplineType)(c.interpolate);return b.pathElement=p?"polygon":"path",b.pathTween={attr:p?"points":"d",fn:(0,l.d3_createPathTween)(p?"points":"d",p?n.getAreaPolygon:n.getSmoothAreaPath,[h,k],a.id,c.interpolate)},b}};b.Area=o},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=0?1:-1},l=function(b,c,d){var j,k=[b,a.id(c),d].join(" ");return j={},f(j,e,b),f(j,g,1e-10*d),f(j,i,c[i]),f(j,h,c[h]),f(j,p,!0),f(j,p+"id",k),j},m=function(a,b,c){var d=k.utils.groupBy(b,function(a){return a[e]}),f=b[0];return a.reduce(function(a,b){return a.concat(d[b]||l(b,f,c))},[])},n=function(a,b){return a-b},o=k.utils.unique(d.reduce(function(a,b){return a.concat(b.map(function(a){return a[e]}))},[])).sort(n),q=d.map(function(b){return b.sort(function(b,c){return a.xi(b)-a.xi(c)})}).reduce(function(a,b){var c=k.utils.groupBy(b,j);return Object.keys(c).reduce(function(a,b){return a.concat(m(o,c[b],b))},a)},[]);return{data:function(){return q},id:function(b){return b[p]?b[p+"id"]:a.id(b)}}},init:function(a){var b=a;return b.guide=k.utils.defaults(b.guide||{},{animationSpeed:0,cssClass:"",maxHighlightDistance:32,widthCssClass:"",color:{},label:{}}),b.guide.label=k.utils.defaults(b.guide.label,{fontSize:11,hideEqualLabels:!0,position:["auto:avoid-label-label-overlap","auto:avoid-label-anchor-overlap","auto:avoid-label-edges-overlap","auto:adjust-on-label-overflow","auto:hide-on-label-label-overlap","auto:hide-on-label-edges-overlap"]}),b.guide.color=k.utils.defaults(b.guide.color||{},{fill:null}),["never","hover","always"].indexOf(b.guide.showAnchors)<0&&(b.guide.showAnchors="hover"),b.transformRules=[],b.adjustRules=[],b},baseModel:function s(a){var b="i-role-datum",c=i.CSS_PREFIX+"dot-line dot-line i-role-dot "+b+" "+i.CSS_PREFIX+"dot ",d=1e4,s={gog:a.model,x:a.x,y:a.y,x0:a.x0,y0:a.y0,size:a.size,group:a.group,order:a.order,color:a.color,"class":a["class"],groupAttributes:{},pathAttributesUpdateInit:{},pathAttributesUpdateDone:{},pathAttributesEnterInit:{},pathAttributesEnterDone:{},pathElement:null,dotAttributes:{r:function(a){return Math.round(d*s.size(a)/2)/d},cx:function(a){return s.x(a)},cy:function(a){return s.y(a)},fill:function(a){return s.color(a)},"class":function(a){return c+" "+s["class"](a)}},dotAttributesDefault:{r:0,cy:function(a){return s.y0(a)}}};return s},addInteraction:function(){var a=this,b=this.node(),c=this.node().config,d=function(a,b){return function(c){return c===a||b}};b.on("highlight",function(b,c){return a.highlight(c)}),b.on("highlight-data-points",function(b,c){return a.highlightDataPoints(c)}),"never"!==c.guide.showAnchors&&b.on("data-hover",function(b,c){return a.highlightDataPoints(d(c.data,null))})},draw:function(){var a=this.node(),b=a.config,c=b.guide,d=b.options;d.container=d.slot(b.uid);var f=a.screenModel,i=this.buildModel(f),k=j.d3_animationInterceptor,l=function(){this.attr(i.groupAttributes);var d=this.selectAll("circle").data(function(a){return a.length<=1?a:[]},f.id);d.exit().call(k(c.animationSpeed,null,{r:0},function(a){return o["default"].select(a).remove()})),d.call(k(c.animationSpeed,null,i.dotAttributes)),d.enter().append("circle").call(k(c.animationSpeed,i.dotAttributesDefault,i.dotAttributes)),a.subscribe(d);var e=function(a){b.guide.animationSpeed>0?(a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(0)}),(0,j.d3_transition)(a,b.guide.animationSpeed,"pathTransition").attrTween(i.pathTween.attr,i.pathTween.fn)):a.attr(i.pathTween.attr,function(a){return i.pathTween.fn.call(this,a)(1)})},g=this.selectAll(i.pathElement).data(function(a){return a.length>1?[a]:[]},r);if(g.exit().remove(),g.call(k(c.animationSpeed,i.pathAttributesUpdateInit,i.pathAttributesUpdateDone,i.afterPathUpdate)).call(e),g.enter().append(i.pathElement).call(k(c.animationSpeed,i.pathAttributesEnterInit,i.pathAttributesEnterDone,i.afterPathUpdate)).call(e),a.subscribe(g),"never"!==c.showAnchors){var h="i-data-anchor",l={r:"hover"===c.showAnchors?0:function(a){return f.size(a)/2},cx:function(a){return i.x(a)},cy:function(a){return i.y(a)},opacity:"hover"===c.showAnchors?0:1,fill:function(a){return f.color(a)},"class":h},m=this.selectAll("."+h).data(function(a){return a.filter(q)},f.id);m.exit().remove(),m.call(k(c.animationSpeed,null,l)),m.enter().append("circle").call(k(c.animationSpeed,{r:0},l)),a.subscribe(m)}},m=f.toFibers(),n=m.map(function(a){return a.filter(q)}),p=d.container.selectAll(".frame"),r=function(){var a=p.empty()?[]:p.data(),b=new Map;p.each(function(a){b.set(a,Number(this.getAttribute("data-id")))});var c=a.reduce(function(a,b){return a.set(b,b.map(f.id)),a},new Map),d=new Map,h=Math.max.apply(Math,[0].concat(e(Array.from(b.values()))));return function(a){if(d.has(a))return d.get(a);var e,i=a.map(function(a){return f.id(a)}),j=(Array.from(c.entries()).find(function(a){var b=g(a,2),c=b[1];return i.some(function(a){return c.some(function(b){return b===a})})})||[null])[0];return j?e=b.get(j):(++h,e=h),d.set(a,e),e}}();this._getDataSetId=r;var s=p.data(m,r);s.exit().remove(),s.call(l),s.enter().append("g").attr("data-id",r).call(l),s.order(),this._boundsInfo=this._getBoundsInfo(d.container.selectAll(".i-data-anchor")[0]),a.subscribe(new h.LayerLabels(f.model,b.flip,b.guide.label,d).draw(n))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=o["default"].select(a).data()[0],d=b.x(c),e=b.y(c);return{node:a,data:c,x:d,y:e}}).filter(function(a){return!isNaN(a.x)&&!isNaN(a.y)}),e=d.reduce(function(a,b){var c=b.x,d=b.y;return a.left=Math.min(c,a.left),a.right=Math.max(c,a.right),a.top=Math.min(d,a.top),a.bottom=Math.max(d,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=k.utils.unique(d.map(c?function(a){return a.y}:function(a){return a.x})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.y===b}:function(b){return a.x===b});g[b].push(a)});var h=function j(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:j(a.slice(0,b)),greater:j(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=m.utilsDraw.getDeepTransformTranslate(f.node()),i=this.node().config.guide.maxHighlightDistance;if(ad.right+h.x+i||bd.bottom+h.y+i)return null;var j=g?b-h.y:a-h.x,k=function s(a){return Array.isArray(a)?a:s(j>a.middle?a.greater:a.lower)}(e).map(function(c){var d=c.x+h.x,e=c.y+h.y,f=Math.abs(g?b-e:a-d),i=Math.abs(g?a-d:b-e);return{node:c.node,data:c.data,distance:f,secondaryDistance:i,x:d,y:e}}).sort(function(a,b){return a.distance===b.distance?a.secondaryDistance-b.secondaryDistance:a.distance-b.distance}),l=k.findIndex(function(a){return a.distance!==k[0].distance||a.secondaryDistance!==k[0].secondaryDistance}),n=l<0?k:k.slice(0,l);if(1===n.length)return n[0];var o=n.reduce(function(a,b){return a+b.x},0)/n.length,p=n.reduce(function(a,b){return a+b.y},0)/n.length,q=Math.atan2(p-b,o-a)+Math.PI,r=n[Math.round((n.length-1)*q/2/Math.PI)];return r},highlight:function(a){var b,c,d=this.node().config.options.container,e="graphical-report__highlighted",g="graphical-report__dimmed",h=d.selectAll(".i-role-path"),i=h.data().filter(function(b){return b.filter(q).some(a)}),j=i.length>0;h.classed((b={},f(b,e,function(a){return j&&i.indexOf(a)>=0}),f(b,g,function(a){return j&&i.indexOf(a)<0}),b));var k=(c={},f(c,e,function(b){return a(b)===!0}),f(c,g,function(b){return a(b)===!1}),c);d.selectAll(".i-role-dot").classed(k),d.selectAll(".i-role-label").classed(k),this._sortElements(a)},highlightDataPoints:function(a){var b="i-data-anchor",c=this.node().screenModel,d="hover"===this.node().config.guide.showAnchors,e=4,f=1.25,g=this.node(),h=g.config.options.container,j=h.selectAll("."+b).attr({r:d?function(b){return a(b)?Math.max(e,c.size(b)/2):0}:function(b){var d=c.size(b)/2;return a(b)&&(d=Math.max(e,Math.ceil(d*f))),d},opacity:d?function(b){return a(b)?1:0}:1,fill:function(a){return c.color(a)},"class":function(a){return l.utilsDom.classes(b,c["class"](a))}}).classed(i.CSS_PREFIX+"highlighted",a),k=g.config.flip,m=j.filter(a),n=h.select(".cursor-line");if(m.empty())n.remove();else{n.empty()&&(n=h.append("line"));var o=g.screenModel.model,p=o.xi(m.data()[0]),q=o.xi(m.data()[0]),r=o.scaleY.domain(),s=o.scaleY(r[0]),t=o.scaleY(r[1]);n.attr("class","cursor-line").attr("x1",k?s:p).attr("y1",k?p:s).attr("x2",k?t:q).attr("y2",k?q:t)}this._sortElements(a)},_sortElements:function(a){var b=this.node().config.options.container,c=new Map,d=new Map,e=this._getDataSetId;b.selectAll(".i-role-path").each(function(b){c.set(this,e(b)),d.set(this,b.filter(q).some(a))});var f=k.utils.createMultiSorter(function(a,b){return d.get(a)-d.get(b)},function(a,b){return c.get(a)-c.get(b)}),g={line:0,g:1,text:2};l.utilsDom.sortChildren(b.node(),function(a,b){return"g"===a.tagName&&"g"===b.tagName?f(a,b):g[a.tagName]-g[b.tagName]})}};b.BasePath=r},function(a,b,c){"use strict";function d(a){return h[a-1]||h[4]}function e(a){var b=0;return a>=160&&a<320?b=1:a>=320&&a<480?b=2:a>=480&&a<640?b=3:a>=640&&(b=4),i[b]}Object.defineProperty(b,"__esModule",{value:!0}),b.getLineClassesByCount=b.getLineClassesByWidth=void 0;var f=c(22),g=[1,2,3,4,5],h=g.map(function(a){return f.CSS_PREFIX+"line-opacity-"+a}),i=g.map(function(a){return f.CSS_PREFIX+"line-width-"+a});b.getLineClassesByWidth=e,b.getLineClassesByCount=d},function(a,b){"use strict";function c(a,b){if(a.length<2)return"";var c=String.prototype.concat.apply("",a.concat(b.slice().reverse()).map(function(a,b){return""+(0===b?"":" ")+a.x+","+a.y}));return c}function d(a,b){if(a.length<2)return"";var c=function(a){var b=a.map(function(a,b){var c=(b-1)%3===0?"C":"";return""+c+a.x+","+a.y+" "});return String.prototype.concat.apply("",b)},d=c(a),e=c(b.slice().reverse()),f="M"+d+"L"+e+"Z";return f}Object.defineProperty(b,"__esModule",{value:!0}),b.getAreaPolygon=c,b.getSmoothAreaPath=d},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Path=void 0;var d=c(22),e=c(7),f=c(52),g=c(3),h=c(53),i=c(9),j={draw:f.BasePath.draw,getClosestElement:f.BasePath.getClosestElement,highlight:f.BasePath.highlight,highlightDataPoints:f.BasePath.highlightDataPoints,addInteraction:f.BasePath.addInteraction,_getBoundsInfo:f.BasePath._getBoundsInfo,_sortElements:f.BasePath._sortElements,init:function(a){var b=f.BasePath.init(a);return b.transformRules=[b.flip&&e.GrammarRegistry.get("flip")],b.adjustRules=[function(a,c){var d=a.scaleSize.isEmptyScale(),f=g.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:d?6:40}),h=Object.assign({},c,{defMin:f.defMinSize,defMax:f.defMaxSize,minLimit:f.minSize,maxLimit:f.maxSize});return e.GrammarRegistry.get("adjustStaticSizeScale")(a,h)}],b},buildModel:function(a){var b=f.BasePath.baseModel(a),c=this.node().config.guide,e=(0,h.getLineClassesByCount)(a.model.scaleColor.domain().length),g=d.CSS_PREFIX+"area area i-role-path "+e+" "+c.cssClass+" ";b.groupAttributes={"class":function(a){return g+" "+b["class"](a[0])+" frame"}};var j=function(c){return{id:a.id(c),x:b.x(c),y:b.y(c)}},k=function(a,b){return function(c){return c.map(function(c){return[a(c),b(c)].join(",")}).join(" ")}},l={fill:function(a){return b.color(a[0])},stroke:function(a){return b.color(a[0])}};return b.pathAttributesEnterInit=l,b.pathAttributesUpdateDone=l,b.pathElement="polygon",b.pathTween={attr:"points",fn:(0,i.d3_createPathTween)("points",k(function(a){return a.x},function(a){return a.y}),[j],a.id)},b}};b.Path=j},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.Line=void 0;var d=c(22),e=c(52),f=c(7),g=c(53),h=c(3),i=c(9),j=c(13),k=c(57),l=c(58),m={draw:e.BasePath.draw,getClosestElement:e.BasePath.getClosestElement,highlight:e.BasePath.highlight,highlightDataPoints:e.BasePath.highlightDataPoints,addInteraction:e.BasePath.addInteraction,_getBoundsInfo:e.BasePath._getBoundsInfo,_sortElements:e.BasePath._sortElements,init:function(a){var b=e.BasePath.init(a),c=b.stack;b.guide=h.utils.defaults(b.guide||{},{avoidScalesOverflow:!0,interpolate:"linear"}),b.transformRules=[b.flip&&f.GrammarRegistry.get("flip"),!c&&f.GrammarRegistry.get("groupOrderByAvg"),c&&e.BasePath.grammarRuleFillGaps,c&&f.GrammarRegistry.get("stack")];var d=b.guide.avoidScalesOverflow,g=function(a){return a.scaleSize.isEmptyScale()};return b.adjustRules=[function(a,c){var d=h.utils.defaults(b.guide.size||{},{defMinSize:2,defMaxSize:g(a)?6:40}),e=Object.assign({},c,{defMin:d.defMinSize,defMax:d.defMaxSize,minLimit:d.minSize,maxLimit:d.maxSize});return f.GrammarRegistry.get("adjustStaticSizeScale")(a,e)},d&&function(a,b){if(g(a))return function(){return{}};var c=Object.assign({},b,{sizeDirection:"xy"});return f.GrammarRegistry.get("avoidScalesOverflow")(a,c)}].filter(function(a){return a}),b},buildModel:function(a){var b=this.node().config,c=b.guide,f=b.options,h=!a.model.scaleSize.dim,m=h?c.widthCssClass||(0,g.getLineClassesByWidth)(f.width):"",n=(0,g.getLineClassesByCount)(a.model.scaleColor.domain().length),o=h?"line":"area",p=""+d.CSS_PREFIX+o+" "+o+" i-role-path "+m+" "+n+" "+c.cssClass+" ",q=h?{stroke:function(a){return s.color(a[0])},"class":"i-role-datum"}:{fill:function(a){return s.color(a[0])}},r="cubic"===(0,j.getInterpolatorSplineType)(c.interpolate)?h?l.getCurve:k.getBrushCurve:h?l.getPolyline:k.getBrushLine,s=e.BasePath.baseModel(a),t=h?function(b){return{id:a.id(b),x:s.x(b),y:s.y(b)}}:function(b){return{id:a.id(b),x:s.x(b),y:s.y(b),size:s.size(b)}};return s.groupAttributes={"class":function(a){return p+" "+s["class"](a[0])+" frame"}},s.pathElement="path",s.pathAttributesEnterInit=q,s.pathAttributesUpdateDone=q,s.pathTween={attr:"d",fn:(0,i.d3_createPathTween)("d",r,[t],a.id,c.interpolate)},s}};b.Line=m},function(a,b,c){"use strict";function d(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);bb.size)+" 1",c.left[0].x+","+c.left[0].y,"Z"].join(" "):g(a.size>b.size?a:b)}function i(a,b,c,d){var e=q(a,b,c,d);if(!e)return h(a,d);var f=k(j(a,e.right[0]),j(a,e.left[0])),g=k(j(d,e.right[1]),j(d,e.left[1]));return["M"+e.left[0].x+","+e.left[0].y,"C"+e.left[1].x+","+e.left[1].y,e.left[2].x+","+e.left[2].y,e.left[3].x+","+e.left[3].y,"A"+d.size/2+","+d.size/2+" 0 "+Number(f>Math.PI)+" 1",e.right[3].x+","+e.right[3].y,"C"+e.right[2].x+","+e.right[2].y,e.right[1].x+","+e.right[1].y,e.right[0].x+","+e.right[0].y,"A"+a.size/2+","+a.size/2+" 0 "+Number(g>Math.PI)+" 1",e.left[0].x+","+e.left[0].y,"Z"].join(" ")}function j(a,b){return Math.atan2(b.y-a.y,b.x-a.x)}function k(a,b){return b0&&(g=c),f<0&&(g=0-e);var h=c0?m-e:m}return m},width:function(a){return h(a)},height:function(a){var b=k(a);return d&&(b=0===i(a)?b:Math.max(e,b)),b}}}return Object.assign(c,{"class":function(b){return g+" "+a["class"](b)},fill:function(b){return a.color(b)}})},_sortElements:function(){var a=this.node().config.options.container.node();k.utilsDom.sortChildren(a,j.utils.createMultiSorter.apply(j.utils,arguments))},_getBoundsInfo:function(a){if(0===a.length)return null;var b=this.node().screenModel,c=this.node().config.flip,d=a.map(function(a){var c=n["default"].select(a).data()[0],d=b.x(c),e=b.x0(c),f=b.y(c),g=b.y0(c),h=Math.abs(d-e),i=Math.abs(f-g),j=(d+e)/2,k=(f+g)/2,l=f>g,m={top:k-i/2,right:j+h/2,bottom:k+i/2,left:j-h/2};return{node:a,data:c,cx:j,cy:k,box:m,invert:l}}),e=d.reduce(function(a,b){var c=b.box;return a.left=Math.min(c.left,a.left),a.right=Math.max(c.right,a.right),a.top=Math.min(c.top,a.top),a.bottom=Math.max(c.bottom,a.bottom),a},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),f=j.utils.unique(d.map(c?function(a){return a.cy}:function(a){return a.cx})).sort(function(a,b){return a-b}),g=f.reduce(function(a,b){return a[b]=[],a},{});d.forEach(function(a){var b=f.find(c?function(b){return a.cy===b}:function(b){return a.cx===b});g[b].push(a)});var h=function k(a){if(1===a.length)return g[a];var b=Math.ceil(a.length/2),c=(a[b-1]+a[b])/2;return{middle:c,lower:k(a.slice(0,b)),greater:k(a.slice(b))}},i=h(f);return{bounds:e,tree:i}},getClosestElement:function(a,b){if(!this._boundsInfo)return null;var c=this._boundsInfo,d=c.bounds,e=c.tree,f=this.node().config.options.container,g=this.node().config.flip,h=l.utilsDraw.getDeepTransformTranslate(f.node()),i=a-h.x,j=b-h.y,k=this.node().config.guide.maxHighlightDistance;if(id.right+k||jd.bottom+k)return null;var m=g?j:i,n=g?i:j,o=function(a,b,c){return a>=b&&a<=c},p=function q(a){return Array.isArray(a)?a:q(m>a.middle?a.greater:a.lower)}(e).map(function(a){var b=g?a.box.left:a.box.top,c=g?a.box.right:a.box.bottom,d=o(n,b,c);if(!d&&Math.abs(n-b)>k&&Math.abs(n-c)>k)return null;var e=Math.abs(n-(a.invert!==g?c:b));return Object.assign(a,{distToValue:e,cursorInside:d})}).filter(function(a){return a}).sort(function(a,b){return a.cursorInside!==b.cursorInside?b.cursorInside-a.cursorInside:Math.abs(a.distToValue)-Math.abs(b.distToValue)}).map(function(a){var b=a.cx,c=a.cy,d=Math.abs(g?j-c:i-b),e=Math.abs(g?i-b:j-c);return{node:a.node,data:a.data,distance:d,secondaryDistance:e,x:b,y:c}});return p[0]||null},highlight:function(a){var b,c="graphical-report__highlighted",d="graphical-report__dimmed",f=this.node().config.options.container,g=(b={},e(b,c,function(b){return a(b)===!0}),e(b,d,function(b){return a(b)===!1}),b);f.selectAll(".bar").classed(g),f.selectAll(".i-role-label").classed(g),this._sortElements(function(b,c){return a(o(b))-a(o(c))},this._typeSorter,this._barsSorter)}};b.Interval=p},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ParallelLine=void 0;var h=function(){function a(a,b){for(var c=0;c=0}},{key:"addField",value:function(a,b){return this._fields[a]=b,this[a]=b,this}},{key:"getField",value:function(a){return this._fields[a]}},{key:"isEmpty",value:function(){return!Boolean(this._fields.dim)}},{key:"toBaseScale",value:function(a){var b=this,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,d=Object.keys(this._fields).reduce(function(a,c){return a[c]=b._fields[c],a},a);return d.getHash=function(){return h(b.vars,c)},d.value=d,d}},{key:"getVarSet",value:function(a,b){var c=b.hasOwnProperty("series")?b.series:a.map(function(a){return a[b.dim]});return f.utils.unique(c,g(b.dimType))}}]),a}()},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b0){var s=Math.max.apply(Math,e(l.map(Math.abs)));l=[-s,s]}d.vars=l}return d.addField("scaleType","color").addField("discrete",h).addField("brewer",i).addField("toColor",k.utils.extRGBColor).addField("toClass",k.utils.extCSSClass),d}return h(b,a),i(b,[{key:"create",value:function(){var a=this.discrete,b=this.vars,c=this.getField("brewer"),d=a?this.createDiscreteScale(b,c):this.createContinuesScale(b,c);return this.toBaseScale(d)}},{key:"createDiscreteScale",value:function(a,b){var c,d=function(){return"color-default"},e=function(a,b){var c=a.map(function(a){return String(a).toString()});return m["default"].scale.ordinal().range(b).domain(c)},f=function(a,b){var c=Object.keys(a),d=c.map(function(b){return a[b]}),e=m["default"].scale.ordinal().range(d).domain(c);return function(c){return a.hasOwnProperty(c)?e(c):b(c)}},g=function(a){return function(b){return a(String(b).toString())}};if(Array.isArray(b))c=g(e(a,b));else if("function"==typeof b)c=function(c){return b(c,g(e(a,k.utils.range(20).map(function(a){return"color20-"+(1+a)}))))};else{if(!k.utils.isObject(b))throw new Error("This brewer is not supported");c=f(b,d)}return c}},{key:"createContinuesScale",value:function(a,b){var c;if(!Array.isArray(b))throw new Error("This brewer is not supported");return c=m["default"].scale.linear().domain(k.utils.splitEvenly(a.map(function(a){return a-0}),b.length)).range(b)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=c}},{key:"create",value:function(){var a,b=this.scaleConfig,c=this.vars,d=k.utils.defaults({},b,{func:"sqrt",minSize:0,maxSize:1}),f=d.func,g=d.minSize,h=d.maxSize,i=n[f],j=c.filter(function(a){return Number.isFinite(Number(a))});if(0===j.length)a=function(){return h};else{var l=1,m=0,o=Math.min.apply(Math,e(j)),p=Math.max.apply(Math,e(j)),q=i(Math.max(Math.abs(o),Math.abs(p),p-o));m=o<0?o:0,l=0===q?1:(h-g)/q,a=function(a){var b=null!==a?parseFloat(a):0;if(!Number.isFinite(b))return h;var c=b-m;return g+i(c)*l}}return this.toBaseScale(a)}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=0}},{key:"create",value:function(a){var b=this.vars,c=this.vars.map(function(a){return a.getTime()}),d=this.scaleConfig,f=o["default"].scale.ordinal().domain(b),g=f.rangePoints(a,1),h=o["default"].scale.ordinal().domain(c.map(String)),j=h.rangePoints(a,1),k=Math.max.apply(Math,e(a)),l=function(a){var e=new Date(a).getTime(),f=i(d.ratio);return"function"===f?d.ratio(e,k,c):"object"===f?d.ratio[e]:1/b.length},m=function(a){var b,e=new Date(a),f=e.getTime();return b=d.ratio?k-c.slice(c.indexOf(f)+1).reduce(function(a,b){return a+k*l(b)},k*l(a)*.5):j(String(f))};return Object.keys(g).forEach(function(a){return m[a]=g[a]}),m.stepSize=function(a){return l(a)*k},this.toBaseScale(m,a)}}]),b}(k.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function f(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function g(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.TimeScale=void 0;var h=function(){function a(a,b){for(var c=0;c=d}},{key:"create",value:function(a){var b=this.vars,c=this.scaleConfig.utcTime,d=c?k["default"].time.scale.utc:k["default"].time.scale,e=d().domain(this.scaleConfig.nice?l.utils.niceTimeDomain(b,this.niceIntervalFn,{utc:c}):b),f=e.range(a),g=function(a){var c=b[0],d=b[1];return a>d&&(a=d),a=c}},{key:"create",value:function(a){var b=this.vars,c=this.extendScale(m["default"].scale.linear());return c.domain(b).range(a).clamp(!0),this.toBaseScale(c,a)}},{key:"extendScale",value:function(a){var b=this,c=a.copy,d=a.ticks;return Object.assign(a,{stepSize:function(){return 0},copy:function(){return b.extendScale(c.call(a))},ticks:this.getField("isInteger")?function(b){return d.call(a,b).filter(Number.isInteger)}:a.ticks}),a}}]),b}(j.BaseScale)},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b=e[0]&&l<=e[1]&&d.push(l)}return d},a.copy=function(){var c=b.call(a);return k(c),c},a}function l(a){var b=a[0]>0,c=a.map(function(a){return Math.abs(a)}),d=Math.max.apply(Math,e(c)),f=Math.min.apply(Math,e(c)),g=f.toExponential().split("e"),h=d.toExponential().split("e"),i=parseFloat(Math.floor(g[0])+"e"+g[1]),j=parseFloat(Math.ceil(h[0])+"e"+h[1]);return b?[i,j]:[-j,-i]}Object.defineProperty(b,"__esModule",{value:!0}),b.LogarithmicScale=void 0;var m=function(){function a(a,b){for(var c=0;c=c}},{key:"create",value:function(a){var b=this.vars;j(b);var c=k(q["default"].scale.log()).domain(b).range(a);return c.stepSize=function(){return 0},this.toBaseScale(c,a)}}]),b}(n.BaseScale)},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function e(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function f(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}Object.defineProperty(b,"__esModule",{value:!0}),b.ValueScale=void 0;var g=function(){function a(a,b){for(var c=0;c=c}},{key:"create",value:function(){var a=this.vars,b=this.getField("brewer");if(!Array.isArray(b))throw new Error("This brewer is not supported");var c=b.length,d=(a[1]-a[0])/c,e=j.utils.range(c-1).map(function(a){return a+1}).reduce(function(b,c){return b.concat([a[0]+c*d])},[]),f=l["default"].scale.threshold().domain(e).range(b);return this.toBaseScale(f)}}]),b}(i.BaseScale)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartMap=void 0;var d=c(3),e=function(a){var b=Object.assign({sourcemap:a.settings.defaultSourceMap},a.guide||{});b.size=d.utils.defaults(b.size||{},{min:1,max:10}),b.code=d.utils.defaults(b.code||{},{georole:"countries"});var c={},e=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d};return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.MAP",expression:{operator:"none",source:"/"},code:e("value",a.code,b.code),fill:e("fill",a.fill,b.fill),size:e("size",a.size,b.size),color:e("color",a.color,b.color),latitude:e("linear",a.latitude,{nice:!1}),longitude:e("linear",a.longitude,{nice:!1}),guide:b},plugins:a.plugins||[]}};b.ChartMap=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartInterval=void 0;var d=c(74),e=function(a){var b=a.flip?a.y:a.x,c=b.indexOf(a.color)>=0,d=a.guide[a.guide.length-1];return c&&!d.hasOwnProperty("enableColorToBarPosition")&&(d.enableColorToBarPosition=!1),a},f=function(a){var b=(0,d.normalizeConfig)(a);return b=e(b),(0,d.transformConfig)("ELEMENT.INTERVAL",b)};b.ChartInterval=f},function(a,b,c){"use strict";function d(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}function e(a,b,c){return b.reduce(function(b,d,e){var f=a[d];return f?b.status!=m.FAIL&&("measure"===f.type&&(b.countMeasureAxis++,b.indexMeasureAxis.push(e)),"measure"!==f.type&&1===b.countMeasureAxis?b.status=m.WARNING:b.countMeasureAxis>1&&(b.status=m.FAIL,b.messages.push('There is more than one measure dimension for "'+c+'" axis'))):(b.status=m.FAIL,d?b.messages.push('"'+d+'" dimension is undefined for "'+c+'" axis'):b.messages.push('"'+c+'" axis should be specified')),b},{status:m.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:c})}function f(a){for(var b=k(a.x),c=k(a.y),d=Math.max(b.length,c.length),f=k(a.guide||{},{}),g=d-f.length,h=0;h0;n--){var o=h.pop(),p=k.pop(),q=m.pop()||{};n===f?(g.x=o,g.y=p,g.unit.push(l(a,{x:j(o),y:j(p),identity:b.identity,split:b.split,color:b.color,label:b.label,size:b.size,flip:b.flip,stack:b.stack,colorGuide:q.color,sizeGuide:q.size})),g.guide=i.utils.defaults(q,{x:{label:o},y:{label:p}})):g={type:"COORDS.RECT",x:j(o),y:j(p),unit:[g],guide:i.utils.defaults(q,{x:{label:o},y:{label:p}})}}return b.spec={dimensions:b.dimensions,unit:g},b}Object.defineProperty(b,"__esModule",{value:!0}),b.transformConfig=b.normalizeConfig=void 0;var h,i=c(3),j=function(a){return a?a:null},k=function(a){var b=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Array.isArray(a)?0===a.length?[b]:a:[a]},l=function(a,b){return{type:a,x:b.x,y:b.y,identity:b.identity,size:b.size,color:b.color,split:b.split,label:b.label,guide:{color:b.colorGuide,size:b.sizeGuide},flip:b.flip,stack:b.stack}},m={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},n=(h={},d(h,m.SUCCESS,function(a){return a}),d(h,m.FAIL,function(a,b){throw new Error((b.messages||[]).join("\n")||"This configuration is not supported, See http://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart")}),d(h,m.WARNING,function(a,b,c){var d=b.axis,e=b.indexMeasureAxis[0],f=a[e],g=a.filter(function(a){return a!==f});g.push(f);var h=c[e][d]||{},i=c[c.length-1][d]||{};return c[c.length-1][d]=h,c[e][d]=i,g}),h);b.normalizeConfig=f,b.transformConfig=g},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartScatterplot=void 0;var d=c(74),e=function(a){var b=(0,d.normalizeConfig)(a);return(0,d.transformConfig)("ELEMENT.POINT",b)};b.ChartScatterplot=e},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartLine=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={none:function(){return null},horizontal:function(a){return a.x[a.x.length-1]},vertical:function(a){return a.y[a.y.length-1]},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result});return p?b=o[n][0][0]:(f(["All attempts are failed.","Will orient line horizontally by default.","NOTE: the [scatterplot] chart is more convenient for that data."].join(" ")),b=h),b}},h=(b.lineOrientation||"").toLowerCase(),i=g.hasOwnProperty(h)?g[h]:g.auto,j=i(b);return null!==j&&(b.data=d.DataProcessor.sortByDim(c,j,b.dimensions[j])),(0,e.transformConfig)("ELEMENT.LINE",b)};b.ChartLine=f},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0}),b.ChartArea=void 0;var d=c(28),e=c(74),f=function(a){var b=(0,e.normalizeConfig)(a),c=b.data,f=b.settings.log,g={horizontal:function(a){return{prop:a.x[a.x.length-1],flip:!1}},vertical:function(a){return{prop:a.y[a.y.length-1],flip:!0}},auto:function(a){var b,e=a.x,g=a.y,h=e[e.length-1],i=e.slice(0,e.length-1),j=g[g.length-1],k=g.slice(0,g.length-1),l=a.color,m=i.concat(k).concat([l]).filter(function(a){return null!==a}),n=-1,o=[[[h].concat(m),j],[[j].concat(m),h]],p=o.some(function(a,b){var e=a[0],g=a[1],h=d.DataProcessor.isYFunctionOfX(c,e,[g]);return h.result?n=b:f(["Attempt to find a functional relation between",a[0]+" and "+a[1]+" is failed.","There are several "+h.error.keyY+" values (e.g. "+h.error.errY.join(",")+")","for ("+h.error.keyX+" = "+h.error.valX+")."].join(" ")),h.result}),q=null;return p?(b=o[n][0][0],q=0!==n):(f("All attempts are failed. Gonna transform AREA to general PATH."),b=null),{prop:b,flip:q}}},h="boolean"!=typeof b.flip?"auto":b.flip?"vertical":"horizontal",i=g[h],j=i(b),k="ELEMENT.AREA";return null!==j.prop&&(b.data=d.DataProcessor.sortByDim(c,j.prop,b.dimensions[j.prop]),b.flip=j.flip),(0,e.transformConfig)(k,b)};b.ChartArea=f},function(a,b){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var c=function(a){var b=Object.assign({columns:{}},a.guide||{}),c={},d=function(a,b){var d,e,f=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},g=b;return b?(d=a+"_"+b,e="/"):(d=a+":default",e="?"),c.hasOwnProperty(d)||(c[d]=Object.assign({type:a,source:e,dim:g},f)),d},e=a.columns.map(function(c){return d(a.dimensions[c].scale,c,b.columns[c])});return{sources:{"?":{dims:{},data:[{}]},"/":{dims:Object.keys(a.dimensions).reduce(function(b,c){return b[c]={type:a.dimensions[c].type},b},{}),data:a.data}},scales:c,unit:{type:"COORDS.PARALLEL",expression:{operator:"none",source:"/"},columns:e,guide:b,units:[{type:"PARALLEL/ELEMENT.LINE",color:d("color",a.color,b.color),columns:e,expression:{operator:"none",source:"/"}}]},plugins:a.plugins||[]}};b.ChartParallel=c},function(a,b,c){"use strict";function d(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(b,"__esModule",{value:!0}),b.PluginsSDK=void 0;var e=function(){function a(a,b){for(var c=0;c>>0,e=arguments[1],f=0;f>>0,d=arguments[1],f=0;f0?1:-1)*Math.floor(Math.abs(b)):b},d=Math.pow(2,53)-1,e=function(a){var b=c(a);return Math.min(Math.max(b,0),d)};return function(a){var c=this,d=Object(a);if(null==a)throw new TypeError("Array.from requires an array-like object - not null or undefined");var f,g=arguments.length>1?arguments[1]:void 0;if("undefined"!=typeof g){if(!b(g))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(f=arguments[2])}for(var h,i=e(d.length),j=b(c)?Object(new c(i)):new Array(i),k=0;kb?c:b;f=dg?e:g}),e.fixup(function(a){var b={};return(!a.hasOwnProperty("max")||a.maxf)&&(b.min=f),b}),{}},i={},j={},k=function(a){var f=a.data().slice(),g=a.scaleX,h=a.scaleY;if(0===f.length||!g.discrete)return{};var k=a.flip?b:d,l=h.dim;f.sort(c.createMultiSorter(function(a,b){return a[k]-b[k]},function(a,b){return a[l]-b[l]}));var m=g.dim,n=g.domain(),o=n.reduce(function(a,b){return a[b]=[],a},{}),p=new Map,q=function(a){var b=a[m],c=o[b],d=c.findIndex(function(b){return b[b.length-1][l]<=a[k]});d<0&&(d=c.length,c.push([])),c[d].push(a),p.set(a,d)},r=function(a){var b=a[m],c=o[b],d=d=c.length;c.push([]),c[d].push(a),p.set(a,d)};return f.forEach(e?q:r),Object.keys(o).forEach(function(a){i[a]=o[a]}),g.fixup(function(a){var b={},c=g.domain().reduce(function(a,b){return a+i[b].length},0);return g.domain().forEach(function(a){j[a]=c}),b.ratio=function(a){return i[a].length/j[a]},b}),{xi:function(b){var c=b[m],d=g.stepSize(c),e=a.xi(b)-d/2,f=d/i[c].length,h=p.get(b);return e+f*(h+.5)}}};return{onSpecReady:function(a,b){a.traverseSpec(b,function(a,b){"ELEMENT.INTERVAL"===a.type&&(a.transformModel=[a.flip?f:g,k],a.adjustScales=[h],a.guide.enableColorToBarPosition=!1,a.guide.label=a.guide.label||{},a.guide.label.position=a.guide.label.position||(a.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}var c=(a.api.d3,a.api.utils);return a.api.plugins.add("bar-as-span",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a,b){var c=a.length-1,d=b/100*c,e=Math.floor(d);if(0===e)return{pos:0,value:a[0]};if(e===c)return{pos:c,value:a[c]};var f=d-e;return f?{pos:d,value:a[e]+f*(a[e+1]-a[e])}:{pos:d,value:a[d]}}function c(a,c,d){for(var e=a.sort(function(a,b){return a-b}),f=b(e,25),g=b(e,50),h=b(e,75),i=h.value-f.value,j=f.value-1.5*i,k=h.value+1.5*i,l=e[0],m=e[e.length-1],n=0;n<=f.pos;n++){var o=e[n];if(o>j){l=o;break}}for(var p=e.length-1;p>=h.pos;p--){var q=e[p];if(qh||a[e]0});n=(l<0?Math.min:Math.max).apply(null,p.map(function(a){return b.screenModel.x(a)},0)),l=p.reduce(function(a,b){return a+b[h.dim]},0)}else{var q=b.data().filter(function(c){var d=c[h.dim];return c===a.data||(d===l||d-l===0)&&(b.screenModel.y(c)-b.screenModel.y(a.data))*c[i.dim]>0});o=(m<0?Math.max:Math.min).apply(null,q.map(function(a){return b.screenModel.y(a)},0)),m=q.reduce(function(a,b){return a+b[i.dim]},0)}var r=a.node.getBBox(),s=function(){return"ELEMENT.INTERVAL"===b.config.type||"ELEMENT.INTERVAL.STACKED"===b.config.type?{x:r.width*(b.config.flip?l>0?1:0:.5),y:r.height*(b.config.flip?.5:m>0?1:0)}:{x:r.width/2,y:r.height/2}}();this._setValues({label:this._getFormat(h.dim)(l),start:0,value:n,crossPadding:s.x,minMode:c&&c.guide.x.hide},{label:this._getFormat(i.dim)(m),start:b.config.options.height,value:o,crossPadding:s.y,minMode:c&&c.guide.y.hide},{cls:j.toColor(k)?"":k,color:j.toColor(k)?k:""})},_hideCrosshair:function(){var a=this._element.node();a.parentNode&&a.parentNode.removeChild(a)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){if(!b.data)return void this._hideCrosshair();if(a.data().indexOf(b.data)>=0){var c=g.getParentUnit(this._chart.getSpec(),a.config);this._showCrosshair(b,a,c)}}.bind(this))},this)},_getFormat:function(a){var b=this._formatters[a]||{format:function(a){return String(a)}};return b.format},onRender:function(){this._formatters=this._getFormatters(),this._subscribeToHover()},_getFormatters:function(){var b=g.extractFieldsFormatInfo(this._chart.getSpec());Object.keys(b).forEach(function(a){b[a].parentField&&delete b[a]});var c=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:e.isObject(a)&&(b=e.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(d){var f=c(h.formatters[d]);b[d]=Object.assign({label:d,nullAlias:"No "+d},b[d]||{},e.pick(f,"label","nullAlias")),f.hasOwnProperty("format")?b[d].format="function"==typeof f.format?f.format:a.api.tickFormat.get(f.format,b[d].nullAlias):b[d].format=b[d].hasOwnProperty("format")?b[d].format:a.api.tickFormat.get(null,b[d].nullAlias)}),b}};return i}var d=a.api.d3,e=a.api.utils,f=a.api.svgUtils,g=a.api.pluginsSDK;return a.api.plugins.add("crosshair",c),c}),function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b(require("taucharts")):"function"==typeof define&&define.amd?define(["taucharts"],b):"object"==typeof exports?exports.exportTo=b(require("taucharts")):a.exportTo=b(a.tauCharts)}(this,function(a){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){var d,e;!function(f){d=[c(1),c(2),c(5),c(6),c(10),c(11)],e=function(a,b,c,d,e){return window.Promise=window.Promise||d.Promise,f(a,b,c,window.Promise,e)}.apply(b,d),!(void 0!==e&&(a.exports=e))}(function(a,b,c,d,e){function f(a){return Math.log(a)/Math.LN10}function g(e){return{onRender:function(){this._info=k.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(a,b){var c=this._info;return a.map(function(a){var b=a,d=c[a]||{};return"string"==typeof a&&(b={field:a,title:d.label||a}),"function"!=typeof b.value&&(b.value=function(a){var b=a[this.field];return d.isComplexField?(b||{})[d.tickLabel]:b}),b}).filter(function(a){return!b.find(function(b){return a.field===b})})},_createDataUrl:function(c){var e=this._cssPaths.map(function(a){return fetch(a).then(function(a){return a.text()})});return d.all(e).then(function(a){return a.join(" ").replace(/&/g,"")}).then(function(e){var f=q(e),g=document.createElement("div");c.fire("beforeExportSVGNode");var h=c.getSVG().cloneNode(!0);c.fire("afterExportSVGNode"),g.appendChild(v(h)),i.select(h).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),h.insertBefore(f,h.firstChild),this._renderAdditionalInfo(h,c),this._addBackground(h,this._backgroundColor);var j=document.createElement("canvas");return j.height=h.getAttribute("height"),j.width=h.getAttribute("width"),new d(function(c){b(j,h.parentNode.innerHTML,{renderCallback:function(b){var d=(new XMLSerializer).serializeToString(b),e="=0}));e=g?'"'+f+'"':f}return a.concat(e)},[]).join(b))},[g.map(function(a){return a.title}).join(b)]).join("\r\n"),i=(this._fileName||"export")+".csv";u(i,"text/csv",h)},_renderFillLegend:function(a,b,c,d){var f=function(a,b){var c=a[0],d=a[1],e=(d-c)/(b-1),f=j.range(b-2).map(function(a){return c+e*(a+1)});return[c].concat(f).concat(d)},g=this._unit.getScale("color"),h=w(a.guide,"color",g.dim).toUpperCase(),i="text-transform:uppercase;font-weight:600;font-size:"+e.fontSize+"px",k=g.domain().sort(function(a,b){return a-b}),l=g.brewer.length,m=3,n=120,o=e.fontSize,p=20,q=f(k,l).reverse().map(function(a,b){var c=b/(l-1)*100;return''}),r=f(k,m).reverse().map(function(a,b,c){var d=b/(m-1),e=.5*(0===b?o:b===c.length-1?-o:0),f=(n-p)*d+e+o/2;return''+a+""}),s=[''," ",' ',q.join("")," "," ",' '+h+"",' ',' '," ",r.join("")," "," Sorry, your browser does not support inline SVG.",""].join(""),t=(new DOMParser).parseFromString(s,"application/xml").documentElement;return document.body.appendChild(t),b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")").node().appendChild(t),{h:n,w:0}},_renderColorLegend:function(a,b,c,d){var f=this._unit.getScale("color"),g=w(a.guide,"color",f.dim).toUpperCase(),h=this._getColorMap(c.getChartModelData({excludeFilter:["legend"]}),f,f.dim).values,i=function(){this.attr("transform",function(a,b){return"translate(5,"+20*(b+1)+")"}),this.append("circle").attr("r",6).attr("fill",function(a){return f.toColor(a.color)}).attr("class",function(a){return f.toClass(a.color)}),this.append("text").attr("x",12).attr("y",5).text(function(a){return j.escape(o(a.label)?"No "+g:a.label)}).style({"font-size":e.fontSize+"px"})},k=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+e.paddingTop+")");return k.append("text").text(g.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":e.fontSize+"px"}),k.selectAll("g").data(h).enter().append("g").call(i),{h:20*h.length,w:0}},_renderSizeLegend:function(a,b,c,d,g){var h,i=this._unit.getScale("size"),k=w(a.guide,"size",i.dim).toUpperCase(),l=c.getChartModelData().sort(function(a,b){return i(a[i.dim])-i(b[i.dim])}),m=l.length,o=l[0][i.dim],p=l[m-1][i.dim];if(p-o){var q=f(p-o),r=4-q<0?0:Math.round(4-q),s=Math.pow(10,r),t=(p-o)/5; -h=j.unique([o,o+t,o+2*t,o+3*t,p].map(function(a){return a===p||a===o?a:Math.round(a*s)/s}))}else h=[o];var u=h.map(function(b){var c=i(b),d=c/2;return{diameter:n(c+2),radius:d,value:b,className:a.color?"color-definite":""}}.bind(this)).reverse(),v=Math.max.apply(null,u.map(function(a){return a.diameter})),x=e.fontSize,y=0,z=function(){this.attr("transform",function(){y+=v;var a="translate(5,"+y+")";return y+=10,a}),this.append("circle").attr({r:function(a){return a.radius},"class":function(a){return a.className}}).style({opacity:.4}),this.append("g").attr("transform",function(){return"translate("+v+","+x/2+")"}).append("text").attr({x:0,y:0}).text(function(a){return a.value}).style({"font-size":x+"px"})},A=b.append("g").attr("class","legend").attr("transform","translate("+(d+10)+","+(e.paddingTop+g.h+20)+")");A.append("text").text(k.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),A.selectAll("g").data(u).enter().append("g").call(z)},_renderAdditionalInfo:function(a,b){var c=this._findUnit(b);if(c){var d={h:0,w:0};a=i.select(a);var e=parseInt(a.attr("width"),10);a.attr("height");a.attr("width",e+160);var f=b.getScaleInfo(c.color);if(f.dim&&!f.discrete){var g=this._renderFillLegend(c,a,b,e);d.h=g.h+20,d.w=g.w}if(f.dim&&f.discrete){var h=this._renderColorLegend(c,a,b,e);d.h=h.h+20,d.w=h.w}var j=b.getScaleInfo(c.size);j.dim&&!j.discrete&&this._renderSizeLegend(c,a,b,e,d)}},_addBackground:function(a,b){if(b&&"transparent"!==b){var c=document.createElementNS("http://www.w3.org/2000/svg","rect");c.setAttribute("fill",b),c.setAttribute("x",0),c.setAttribute("y",0),c.setAttribute("width",a.getAttribute("width")),c.setAttribute("height",a.getAttribute("height")),a.insertBefore(c,a.firstChild)}},onUnitDraw:function(b,c){a.api.isChartElement(c)&&"chart"===c.config.namespace&&(this._unit=c)},_getColorMap:function(a,b,c){return j.unique(a.map(function(a){var d=a[c];return{color:b(d),value:d,label:d}}),function(a){return a.value}).reduce(function(a,b){return a.brewer[b.value]=b.color,a.values.push(b),a},{brewer:{},values:[]})},_select:function(a,b){a=a||"";var c=this["_to"+a.charAt(0).toUpperCase()+a.slice(1)];c&&c.call(this,b)},_handleMenu:function(a,b,c){a.addEventListener("click",function(a){if("a"===a.target.tagName.toLowerCase()){var d=a.target.getAttribute("data-value");this._select(d,b),c.hide()}}.bind(this)),a.addEventListener("mouseover",function(a){"a"===a.target.tagName.toLowerCase()&&a.target.focus()}.bind(this)),a.addEventListener("keydown",function(a){if(a.keyCode===p.ESCAPE&&c.hide(),a.keyCode===p.DOWN&&(a.target.parentNode.nextSibling?a.target.parentNode.nextSibling.childNodes[0].focus():a.target.parentNode.parentNode.firstChild.childNodes[0].focus()),a.keyCode===p.UP&&(a.target.parentNode.previousSibling?a.target.parentNode.previousSibling.childNodes[0].focus():a.target.parentNode.parentNode.lastChild.childNodes[0].focus()),a.keyCode===p.ENTER){var d=a.target.getAttribute("data-value");this._select(d,b)}a.preventDefault()}.bind(this));var d=null,e=function(){d=setTimeout(function(){c.hide()},100)},f=function(){clearTimeout(d)},g=function(){c.toggle(),c.hidden||a.querySelectorAll("a")[0].focus()};a.addEventListener("blur",e,!0),a.addEventListener("focus",f,!0),this._container.addEventListener("click",g),this._onDestroy(function(){a.removeEventListener("blur",e,!0),a.removeEventListener("focus",f,!0),this._container.removeEventListener("click",g),clearTimeout(d)})},init:function(b){e=e||{},e=j.defaults(e,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=b,this._info={},this._cssPaths=e.cssPaths,this._fileName=e.fileName,this._backgroundColor=e.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=e.csvSeparator||",",this._exportFields=e.exportFields||[],this._appendFields=e.appendFields||[],this._excludeFields=e.excludeFields||[],this._cssPaths||(this._cssPaths=[],a.api.globalSettings.log('[export plugin]: the "cssPath" parameter should be specified for correct operation',"warn"));var c=e.visible?"":"display:none";this._container=b.insertToHeader('Export');var d=b.addBalloon({place:"bottom-left"});d.content(['"].join("")),d.attach(this._container);var f=d.getElement();f.setAttribute("tabindex","-1"),this._handleMenu(f,b,d),b.on("exportTo",function(a,b){this._select(b,a)}.bind(this)),this._onDestroy(function(){d.destroy()})},_onDestroy:function(a){this._destroyListeners.push(a)},destroy:function(){this._destroyListeners.forEach(function(a){a.call(this)},this)}}}var h,i=a.api.d3,j=a.api.utils,k=a.api.pluginsSDK,l=k.tokens(),m=function(a,b){return a.replace(new RegExp("^"+b+"+|"+b+"+$","g"),"")},n=function(a){return a=Math.round(a),a%2?a+1:a},o=function(a){return null===a||""===a||"undefined"==typeof a},p={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},q=function(a,b){b=b||"all";var c=document.createElement("style");return c.setAttribute("media",b),c.innerHTML=a,c},r=q(e,"print"),s=function(){r&&r.parentNode&&r.parentNode.removeChild(r),h&&h.parentNode&&h.parentNode.removeChild(h)},t=/PhantomJS/.test(navigator.userAgent);t||("onafterprint"in window?window.addEventListener("afterprint",s):window.matchMedia("screen").addListener(function(a){a.matches&&s()}));var u=function(a,b,c){var d="%ef%bb%bf",e="data:"+b+";charset=UTF-8,"+d+encodeURIComponent(c),f=document.createElement("a");f.setAttribute("href",e),f.setAttribute("download",a),f.setAttribute("target","_new"),document.body.appendChild(f),f.click(),document.body.removeChild(f),f=null},v=function(a){return[].slice.call(a.querySelectorAll("text.label")).forEach(function(a){a.innerHTML=[].slice.call(a.querySelectorAll("tspan")).reduce(function(a,b){var c=b.value||b.text||b.textContent||"";return c=c.charAt(0).toUpperCase()+c.substr(1),a+c},"")}),a},w=function(a,b,c){c=null==c?"":String(c);var d=(a||{})[b]||{},e=j.isObject(d.label)?d.label.text:d.label;return e||c};return a.api.plugins.add("exportTo",g),g})},function(b,c){b.exports=a},function(a,b,c){var d,e,f;!function(g,h){"use strict";e=[c(3),c(4)],d=h,f="function"==typeof d?d.apply(b,e):d,!(void 0!==f&&(a.exports=f)),g.canvg=h(g.RGBColor,g.stackBlur)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b=[0,0,0],c=function(c,d){var e=a.match(c);null!=e&&(b[d]+=e.length,a=a.replace(c," "))};return a=a.replace(/:not\(([^\)]*)\)/g," $1 "),a=a.replace(/{[^]*/gm," "),c(g,1),c(h,0),c(j,1),c(k,2),c(l,1),c(m,1),a=a.replace(/[\*\s\+>~]/g," "),a=a.replace(/[#\.]/g," "),c(n,2),b.join("")}function d(d){var f={opts:d};f.FRAMERATE=30,f.MAX_VIRTUAL_PIXELS=3e4,f.log=function(a){},1==f.opts.log&&"undefined"!=typeof console&&(f.log=function(a){console.log(a)}),f.init=function(a){var b=0;f.UniqueId=function(){return b++,"canvg"+b},f.Definitions={},f.Styles={},f.StylesSpecificity={},f.Animations=[],f.Images=[],f.ctx=a,f.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(a,b){this.viewPorts.push({width:a,height:b})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(a){return null!=a&&"number"==typeof a?a:"x"==a?this.width():"y"==a?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},f.init(),f.ImagesLoaded=function(){for(var a=0;a]*>/,"");var b=new ActiveXObject("Microsoft.XMLDOM");return b.async="false",b.loadXML(a),b},f.Property=function(a,b){this.name=a,this.value=b},f.Property.prototype.getValue=function(){return this.value},f.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},f.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var a=parseFloat(this.value);return(this.value+"").match(/%$/)&&(a/=100),a},f.Property.prototype.valueOrDefault=function(a){return this.hasValue()?this.value:a},f.Property.prototype.numValueOrDefault=function(a){return this.hasValue()?this.numValue():a},f.Property.prototype.addOpacity=function(b){var c=this.value;if(null!=b.value&&""!=b.value&&"string"==typeof this.value){var d=new a(this.value);d.ok&&(c="rgba("+d.r+", "+d.g+", "+d.b+", "+b.numValue()+")")}return new f.Property(this.name,c)},f.Property.prototype.getDefinition=function(){var a=this.value.match(/#([^\)'"]+)/);return a&&(a=a[1]),a||(a=this.value),f.Definitions[a]},f.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},f.Property.prototype.getFillStyleDefinition=function(a,b){var c=this.getDefinition();if(null!=c&&c.createGradient)return c.createGradient(f.ctx,a,b);if(null!=c&&c.createPattern){if(c.getHrefAttribute().hasValue()){var d=c.attribute("patternTransform");c=c.getHrefAttribute().getDefinition(),d.hasValue()&&(c.attribute("patternTransform",!0).value=d.value)}return c.createPattern(f.ctx,a)}return null},f.Property.prototype.getDPI=function(a){return 96},f.Property.prototype.getEM=function(a){var b=12,c=new f.Property("fontSize",f.Font.Parse(f.ctx.font).fontSize);return c.hasValue()&&(b=c.toPixels(a)),b},f.Property.prototype.getUnits=function(){var a=this.value+"";return a.replace(/[0-9\.\-]/g,"")},f.Property.prototype.toPixels=function(a,b){if(!this.hasValue())return 0;var c=this.value+"";if(c.match(/em$/))return this.numValue()*this.getEM(a);if(c.match(/ex$/))return this.numValue()*this.getEM(a)/2;if(c.match(/px$/))return this.numValue();if(c.match(/pt$/))return this.numValue()*this.getDPI(a)*(1/72);if(c.match(/pc$/))return 15*this.numValue();if(c.match(/cm$/))return this.numValue()*this.getDPI(a)/2.54;if(c.match(/mm$/))return this.numValue()*this.getDPI(a)/25.4;if(c.match(/in$/))return this.numValue()*this.getDPI(a);if(c.match(/%$/))return this.numValue()*f.ViewPort.ComputeSize(a);var d=this.numValue();return b&&d<1?d*f.ViewPort.ComputeSize(a):d},f.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/s$/)?1e3*this.numValue():a.match(/ms$/)?this.numValue():this.numValue()},f.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var a=this.value+"";return a.match(/deg$/)?this.numValue()*(Math.PI/180):a.match(/grad$/)?this.numValue()*(Math.PI/200):a.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var g={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return f.Property.prototype.toTextBaseline=function(){return this.hasValue()?g[this.value]:null},f.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(a,b,c,d,e,g){var h=null!=g?this.Parse(g):this.CreateFont("","","","","",f.ctx.font);return{fontFamily:e||h.fontFamily,fontSize:d||h.fontSize,fontStyle:a||h.fontStyle,fontWeight:c||h.fontWeight,fontVariant:b||h.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var a=this;this.Parse=function(b){for(var c={},d=f.trim(f.compressSpaces(b||"")).split(" "),e={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},g="",h=0;hthis.x2&&(this.x2=a)),null!=b&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=b,this.y2=b),bthis.y2&&(this.y2=b))},this.addX=function(a){this.addPoint(a,null)},this.addY=function(a){this.addPoint(null,a)},this.addBoundingBox=function(a){this.addPoint(a.x1,a.y1),this.addPoint(a.x2,a.y2)},this.addQuadraticCurve=function(a,b,c,d,e,f){var g=a+2/3*(c-a),h=b+2/3*(d-b),i=g+1/3*(e-a),j=h+1/3*(f-b);this.addBezierCurve(a,b,g,i,h,j,e,f)},this.addBezierCurve=function(a,b,c,d,e,f,g,h){var j=[a,b],k=[c,d],l=[e,f],m=[g,h];for(this.addPoint(j[0],j[1]),this.addPoint(m[0],m[1]),i=0;i<=1;i++){var n=function(a){return Math.pow(1-a,3)*j[i]+3*Math.pow(1-a,2)*a*k[i]+3*(1-a)*Math.pow(a,2)*l[i]+Math.pow(a,3)*m[i]},o=6*j[i]-12*k[i]+6*l[i],p=-3*j[i]+9*k[i]-9*l[i]+3*m[i],q=3*k[i]-3*j[i];if(0!=p){var r=Math.pow(o,2)-4*q*p;if(!(r<0)){var s=(-o+Math.sqrt(r))/(2*p);0=0;b--)this.transforms[b].unapply(a)},this.applyToPoint=function(a){for(var b=0;bh&&(this.styles[g]=c[g],this.stylesSpecificity[g]=d)}}},null!=a&&1==a.nodeType){for(var b=0;b=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new f.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a, -a},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new f.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;a1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new f.Point(s*l*q.y/m,s*-m*q.x/l),u=new f.Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new f.Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(b.addMarkerAngle(E,D-C*Math.PI/2),b.addMarkerAngle(k,D-C*Math.PI),c.addPoint(k.x,k.y),null!=a){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;a.translate(u.x,u.y),a.rotate(n),a.scale(F,G),a.arc(0,0,w,y,y+B,1-p),a.scale(1/F,1/G),a.rotate(-n),a.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=a&&a.closePath(),b.current=b.start}return c},this.getMarkers=function(){for(var a=this.PathParser.getMarkerPoints(),b=this.PathParser.getMarkerAngles(),c=[],d=0;d1&&(this.offset=1);var b=this.style("stop-color",!0);""===b.value&&(b.value="#000"),this.style("stop-opacity").hasValue()&&(b=b.addOpacity(this.style("stop-opacity"))),this.color=b.value},f.Element.stop.prototype=new f.Element.ElementBase,f.Element.AnimateBase=function(a){this.base=f.Element.ElementBase,this.base(a),f.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var a=this.attribute("attributeType").value,b=this.attribute("attributeName").value;return"CSS"==a?this.parent.style(b,!0):this.parent.attribute(b,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(a){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+a;var b=!1;if(this.beginc&&g.attribute("x").hasValue())break;e+=g.measureTextRecursive(a)}return-1*("end"==d?e:e/2)}return 0},this.renderChild=function(a,b,c){var d=b.children[c];d.attribute("x").hasValue()?(d.x=d.attribute("x").toPixels("x")+b.getAnchorDelta(a,b,c),d.attribute("dx").hasValue()&&(d.x+=d.attribute("dx").toPixels("x"))):(d.attribute("dx").hasValue()&&(b.x+=d.attribute("dx").toPixels("x")),d.x=b.x),b.x=d.x+d.measureText(a),d.attribute("y").hasValue()?(d.y=d.attribute("y").toPixels("y"),d.attribute("dy").hasValue()&&(d.y+=d.attribute("dy").toPixels("y"))):(d.attribute("dy").hasValue()&&(b.y+=d.attribute("dy").toPixels("y")),d.y=b.y),b.y=d.y,d.render(a);for(var c=0;c0&&" "!=b[c-1]&&c0&&" "!=b[c-1]&&(c==b.length-1||" "==b[c+1])&&(f="initial"),"undefined"!=typeof a.glyphs[d]&&(e=a.glyphs[d][f],null==e&&"glyph"==a.glyphs[d].type&&(e=a.glyphs[d]))}else e=a.glyphs[d];return null==e&&(e=a.missingGlyph),e},this.renderChildren=function(a){var b=this.parent.style("font-family").getDefinition();if(null==b)""!=a.fillStyle&&a.fillText(f.compressSpaces(this.getText()),this.x,this.y),""!=a.strokeStyle&&a.strokeText(f.compressSpaces(this.getText()),this.x,this.y);else{var c=this.parent.style("font-size").numValueOrDefault(f.Font.Parse(f.ctx.font).fontSize),d=this.parent.style("font-style").valueOrDefault(f.Font.Parse(f.ctx.font).fontStyle),e=this.getText();b.isRTL&&(e=e.split("").reverse().join(""));for(var g=f.ToNumberArray(this.parent.attribute("dx").value),h=0;h0?"":this.text}},f.Element.tspan.prototype=new f.Element.TextElementBase,f.Element.tref=function(a){this.base=f.Element.TextElementBase,this.base(a),this.getText=function(){var a=this.getHrefAttribute().getDefinition();if(null!=a)return a.children[0].getText()}},f.Element.tref.prototype=new f.Element.TextElementBase,f.Element.a=function(a){this.base=f.Element.TextElementBase,this.base(a),this.hasText=a.childNodes.length>0;for(var b=0;b0){var c=new f.Element.g;c.children=this.children,c.parent=this,c.render(a)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){f.ctx.canvas.style.cursor="pointer"}},f.Element.a.prototype=new f.Element.TextElementBase,f.Element.image=function(a){this.base=f.Element.RenderedElementBase,this.base(a);var b=this.getHrefAttribute().value;if(""!=b){var c=b.match(/\.svg$/);if(f.Images.push(this),this.loaded=!1,c)this.img=f.ajax(b),this.loaded=!0;else{this.img=document.createElement("img"),1==f.opts.useCORS&&(this.img.crossOrigin="Anonymous");var d=this;this.img.onload=function(){d.loaded=!0},this.img.onerror=function(){f.log('ERROR: image "'+b+'" not found'),d.loaded=!0},this.img.src=b}this.renderChildren=function(a){var b=this.attribute("x").toPixels("x"),d=this.attribute("y").toPixels("y"),e=this.attribute("width").toPixels("x"),g=this.attribute("height").toPixels("y");0!=e&&0!=g&&(a.save(),c?a.drawSvg(this.img,b,d,e,g):(a.translate(b,d),f.AspectRatio(a,this.attribute("preserveAspectRatio").value,e,this.img.width,g,this.img.height,0,0),a.drawImage(this.img,0,0)),a.restore())},this.getBoundingBox=function(){var a=this.attribute("x").toPixels("x"),b=this.attribute("y").toPixels("y"),c=this.attribute("width").toPixels("x"),d=this.attribute("height").toPixels("y");return new f.BoundingBox(a,b,a+c,b+d)}}},f.Element.image.prototype=new f.Element.RenderedElementBase,f.Element.g=function(a){this.base=f.Element.RenderedElementBase,this.base(a),this.getBoundingBox=function(){for(var a=new f.BoundingBox,b=0;b0)for(var t=r[s].indexOf("url"),u=r[s].indexOf(")",t),v=r[s].substr(t+5,u-t-6),w=f.parseXml(f.ajax(v)),x=w.getElementsByTagName("font"),y=0;y~\.\[:]+)/g,j=/(\.[^\s\+>~\.\[:]+)/g,k=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\w-]+\([^\)]*\))/gi,m=/(:[^\s\+>~\.\[:]+)/g,n=/([^\s\+>~\.\[:]+)/g;return"undefined"!=typeof CanvasRenderingContext2D&&(CanvasRenderingContext2D.prototype.drawSvg=function(a,b,c,d,e){f(this.canvas,a,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:b,offsetY:c,scaleWidth:d,scaleHeight:e})}),f})},function(a,b,c){var d;!function(e){function f(a){this.ok=!1,"#"==a.charAt(0)&&(a=a.substr(1,6)),a=a.replace(/ /g,""),a=a.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var c in b)a==c&&(a=b[c]);for(var d=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(a){return[parseInt(a[1]),parseInt(a[2]),parseInt(a[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)]}}],e=0;e255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var a=this.r.toString(16),b=this.g.toString(16),c=this.b.toString(16);return 1==a.length&&(a="0"+a),1==b.length&&(b="0"+b),1==c.length&&(c="0"+c),"#"+a+b+c},this.getHelpXML=function(){for(var a=new Array,c=0;c "+k.toRGB()+" -> "+k.toHex());j.appendChild(l),j.appendChild(m),i.appendChild(j)}catch(n){}return i}}d=function(){return f}.call(b,c,b,a),!(void 0!==d&&(a.exports=d)),e.RGBColor=f}("undefined"!=typeof window?window:this)},function(a,b,c){var d;!function(e){function f(a){for(var b=a.data,c=a.width*a.height*4,d=0;d>Z,N[u+1]=x*Y>>Z,N[u+2]=y*Y>>Z,N[u+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=v+((s=p+h+1)>Z,N[s+1]=x*Y>>Z,N[s+2]=y*Y>>Z,N[s+3]=z*Y>>Z,w-=A,x-=B,y-=C,z-=D,A-=W.r,B-=W.g,C-=W.b,D-=W.a,s=p+((s=q+R)>T,H[s+1]=v*S>>T,H[s+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=t+((q=n+f+1)>T,H[q+1]=v*S>>T,H[q+2]=w*S>>T,u-=x,v-=y,w-=z,x-=Q.r,y-=Q.g,z-=Q.b,q=n+((q=o+L)1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return j.prototype=a,new j},0),P=function(a,b){T[O]=a,T[O+1]=b,O+=2,2===O&&M()},Q="undefined"!=typeof window?window:{},R=Q.MutationObserver||Q.WebKitMutationObserver,S="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,T=new Array(1e3);M="undefined"!=typeof a&&"[object process]"==={}.toString.call(a)?k():R?l():S?m():n();var U=void 0,V=1,W=2,X=new D,Y=new D;H.prototype._validateInput=function(a){return N(a)},H.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},H.prototype._init=function(){this._result=new Array(this.length)};var Z=H;H.prototype._enumerate=function(){for(var a=this.length,b=this.promise,c=this._input,d=0;b._state===U&&d1)for(var c=1;c-1?b:a}function h(b,c){c=c||{},this.url=b,this._body=c.body,this.credentials=c.credentials||"omit",this.headers=new a(c.headers),this.method=g(c.method||"GET"),this.mode=c.mode||null,this.referrer=null}function i(a){var b=new FormData;return a.trim().split("&").forEach(function(a){if(a){var c=a.split("="),d=c.shift().replace(/\+/g," "),e=c.join("=").replace(/\+/g," ");b.append(decodeURIComponent(d),decodeURIComponent(e))}}),b}function j(b){var c=new a,d=b.getAllResponseHeaders().trim().split("\n");return d.forEach(function(a){var b=a.trim().split(":"),d=b.shift().trim(),e=b.join(":").trim();c.append(d,e)}),c}function k(a,b){b||(b={}),l?"string"==typeof a?this._bodyBlob=new Blob([a]):this._bodyBlob=a:this._bodyText=a,this.type="default",this.url=null,this.status=b.status,this.statusText=b.statusText,this.headers=b.headers,this.url=b.url||""}if(!self.fetch){a.prototype.append=function(a,b){a=a.toLowerCase();var c=this.map[a];c||(c=[],this.map[a]=c),c.push(b)},a.prototype["delete"]=function(a){delete this.map[a.toLowerCase()]},a.prototype.get=function(a){var b=this.map[a.toLowerCase()];return b?b[0]:null},a.prototype.getAll=function(a){return this.map[a.toLowerCase()]||[]},a.prototype.has=function(a){return this.map.hasOwnProperty(a.toLowerCase())},a.prototype.set=function(a,b){this.map[a.toLowerCase()]=[b]},a.prototype.forEach=function(a){var b=this;Object.getOwnPropertyNames(this.map).forEach(function(c){a(c,b.map[c])})};var l="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(a){return!1}}(),m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];h.prototype.fetch=function(){var a=this;return new Promise(function(b,c){function d(){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var e=new XMLHttpRequest;e.onload=function(){var a=1223===e.status?204:e.status;if(a<100||a>599)return void c(new TypeError("Network request failed"));var f={status:a,statusText:e.statusText,headers:j(e),url:d()},g="response"in e?e.response:e.responseText;b(new k(g,f))},e.onerror=function(){c(new TypeError("Network request failed"))},e.open(a.method,a.url),"responseType"in e&&l&&(e.responseType="blob"),a.headers.forEach(function(a,b){b.forEach(function(b){e.setRequestHeader(a,b)})}),e.send(void 0===a._body?null:a._body)})},f.call(h.prototype),f.call(k.prototype),self.Headers=a,self.Request=h,self.Response=k,self.fetch=function(a,b){return new h(a,b).fetch()},self.fetch.polyfill=!0}}()}])}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var q=j.defaults(b||{},{detectBackground:!0,bgcolor:"#fff"});return{init:function(a){this.instanceId=u(),this.chart=a,this.rootNode=a.getLayout().contentContainer,this.beforeExportHandler=a.on("beforeExportSVGNode",function(){this.removeFloatingLayout()},this),this.afterExportHandler=a.on("afterExportSVGNode",function(){this.createFloatingLayout()},this)},onBeforeRender:function(){this.removeFloatingLayout()},onRender:function(){if(q.detectBackground){var a=this.detectChartBackgroundColor();a&&(q.bgcolor=a)}n=q.bgcolor;var b=!0;this.chart.traverseSpec(this.chart.getSpec(),function(a){var c=a&&0===a.type.indexOf("COORDS.");if(c)if("COORDS.RECT"!==a.type)b=!1;else{var d=a.guide||{};"extract-axes"!==d.autoLayout&&(b=!1)}}),b&&this.createFloatingLayout()},destroy:function(){this.removeFloatingLayout(),this.chart.removeHandler(this.beforeExportHandler,this),this.chart.removeHandler(this.afterExportHandler,this)},createFloatingLayout:function(){function b(){return{scrollLeft:v.scrollLeft, -scrollTop:v.scrollTop,visibleWidth:v.clientWidth,visibleHeight:v.clientHeight,scrollbarWidth:E.width,scrollbarHeight:E.height,svgWidth:Number(x.attr("width")),svgHeight:Number(x.attr("height")),minXAxesY:D,maxYAxesX:C}}function j(a,b){b.forEach(function(b){b.axis[r]=b.axis.parentNode;var c=a.append("g");y?c.attr("transform",e(b.parentTransform.translate0.x,b.parentTransform.translate0.y)).transition().duration(y).attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)):c.attr("transform",e(b.parentTransform.translate.x,b.parentTransform.translate.y)),c.node().appendChild(b.axis),Array.prototype.forEach.call(b.axis.querySelectorAll(".label"),function(a){a[s]=a.getAttribute("transform")})})}function t(a,b,c,d,e){d=d||0,e=e||0,a.append("rect").attr("class","i-role-bg").attr("x",d-1).attr("y",e-1).attr("width",Math.max(0,b+2)).attr("height",Math.max(0,c+2)).attr("fill",q.bgcolor)}var u=this.instanceId,v=this.rootNode,w=this.chart.getSVG(),x=k.select(w),y=this.chart.configGPL.settings.animationSpeed,z=this.scrollManager=new i(v),A=function(){var a=function(a){var b=".frame-root.tau-active ",c="> ."+a+".axis.tau-active";return[b+c,b+".cell.tau-active "+c].join(", ")};return{x:Array.prototype.slice.call(w.querySelectorAll(a("x")),0),y:Array.prototype.slice.call(w.querySelectorAll(a("y")),0)}}(),B=function(){function a(a){var b=h(a.parentNode),c=g(a);return{axis:a,parentTransform:b,axisTransform:c}}return{x:A.x.map(a),y:A.y.map(a)}}(),C=d(B.y.map(function(a){return a.axisTransform.translate.x+a.parentTransform.translate.x}))+1,D=c(B.x.map(function(a){return a.axisTransform.translate.y+a.parentTransform.translate.y}))-1,E=a.api.globalSettings.getScrollbarSize(v),F=b(),G=function(){var a=x.append("defs").attr("class","floating-axes floating-axes__defs"),b={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(b).forEach(function(c){var d=b[c],e=a.append("linearGradient").attr("id","shadow-gradient-"+c+"-"+u).attr("x1",d.x1).attr("y1",d.y1).attr("x2",d.x2).attr("y2",d.y2);e.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",o),e.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",p)}),a}(),H=function(){var a=F.svgHeight-F.minXAxesY+1+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__x").call(t,F.svgWidth,a,0,F.minXAxesY);j(b,B.x);var c=b.selectAll(".label");return z.handleVisibilityFor(b,"y").handleVisibilityFor(c,"x").onScroll(function(a,d){var g=0,h=0,i=Math.min(F.visibleHeight+d-F.svgHeight-F.scrollbarHeight,h);b.attr("transform",e(g,i)),c.each(function(){var b=f(this[s]),c=-F.svgWidth/2+F.visibleWidth/2+a;this.setAttribute("transform","translate("+(b.x+c)+","+b.y+") rotate("+b.r+")")})}),b}(),I=function(){var a=x.append("g").attr("class","floating-axes floating-axes__y").call(t,F.maxYAxesX,F.svgHeight);j(a,B.y);var b=a.selectAll(".label");return z.handleVisibilityFor(a,"x").handleVisibilityFor(b,"y").onScroll(function(c,d){var g=0,h=Math.max(c,g),i=0;a.attr("transform",e(h,i)),b.each(function(){var a=f(this[s]),b=this.matches(".inline")?d:d-F.svgHeight/2+F.visibleHeight/2;this.setAttribute("transform","translate("+a.x+","+(a.y+b)+") rotate("+a.r+")")})}),a}(),J=function(){var a=F.svgHeight-F.minXAxesY+F.scrollbarHeight,b=x.append("g").attr("class","floating-axes floating-axes__corner").call(t,F.maxYAxesX,a);return z.handleVisibilityFor(b,"xy").onScroll(function(c,d){var f=(d+F.visibleHeight,0),g=Math.max(c,f),h=F.minXAxesY,i=Math.min(d+F.visibleHeight-a,h);b.attr("transform",e(g,i))}),b}(),K=function(){var a=F.maxYAxesX,b=F.svgHeight-F.minXAxesY+F.scrollbarHeight,c=x.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),d=function(a,b,d,e,f){return c.append("rect").attr("fill","url(#shadow-gradient-"+a+"-"+u+")").attr("x",b).attr("y",d).attr("width",Math.max(0,e)).attr("height",Math.max(0,f))},f=d("ns",0,0,a,l),g=d("ew",F.visibleWidth-l,F.visibleHeight-b,l,b),h=d("sn",0,F.visibleHeight-b-l,a,l),i=d("we",a,F.visibleHeight-b,l,b);z.handleVisibilityFor(f,"xy").handleVisibilityFor(g,"xy").handleVisibilityFor(h,"xy").handleVisibilityFor(i,"xy").onScroll(function(a,b){var d=a,j=b;c.attr("transform",e(d,j));var k=function(a,b){a.style("visibility",b?"":"hidden")};k(f,b>0&&F.svgHeight>F.visibleHeight),k(g,a+F.visibleWidthF.visibleWidth),k(h,b+F.visibleHeightF.visibleHeight),k(i,a>0&&F.svgWidth>F.visibleWidth)})}(),L=H.node(),M=I.node(),N=J.node();z.onScroll(function(a){w.insertBefore(L,0===a?N.nextElementSibling:M)}),z.fireScroll(),this.floatingLayout={defs:G,xAxes:H,yAxes:I,shadows:K},x.selectAll(".floating-axes").on("mouseenter",function(){var a=document.createEvent("MouseEvents");a.initMouseEvent("mouseleave",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),w.dispatchEvent(a)}).on("mousemove",function(){k.event.stopPropagation()}).on("click",function(){k.event.stopPropagation()})},removeFloatingLayout:function(){function a(a){a.selectAll(".axis").each(function(){this[r].appendChild(this),delete this[r],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(a){a.setAttribute("transform",a[s]),delete a[s]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(a),this.floatingLayout.yAxes.call(a),this.scrollManager.destroy(),this.floatingLayout=null);var b=k.select(this.chart.getSVG());b.selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var a,b=this.chart.getLayout().layout;do{if(a=window.getComputedStyle(b),"none"!==a.backgroundImage)return null;if("transparent"!==a.backgroundColor&&"rgba(0, 0, 0, 0)"!==a.backgroundColor)return a.backgroundColor}while(b=b.parentElement);return null}}}function c(a){return Math.min.apply(null,a)}function d(a){return Math.max.apply(null,a)}function e(a,b){return"translate("+a+","+b+")"}function f(a){var b={x:0,y:0,r:0};if(!a)return b;var c=a.indexOf("translate(");if(c>=0){var d=a.indexOf(")",c+10),e=a.substring(c+10,d),f=e.trim().replace(","," ").replace(/\s+/," ").split(" ");b.x=parseFloat(f[0]),f.length>1&&(b.y=parseFloat(f[1]))}var g=a.indexOf("rotate(");if(g>=0){var h=a.indexOf(")",g+7),i=a.substring(g+7,h);b.r=parseFloat(i.trim())}return b}function g(a){var b=a[q]&&a[q].transform,c=f(a.getAttribute("transform")),d=b?f(a[q].transform):c;return{translate0:c,translate:d}}function h(a){for(var b,c={translate0:{x:0,y:0},translate:{x:0,y:0}},d=a;d&&"SVG"!==d.nodeName.toUpperCase();)b=g(d),c.translate0.x+=b.translate0.x,c.translate0.y+=b.translate0.y,c.translate.x+=b.translate.x,c.translate.y+=b.translate.y,d=d.parentNode;return c}function i(a){function b(a,b,c){a.forEach(function(a){b.call(c,a)})}var c=128,d=256,e={x:[],y:[]},f={x:0,y:0},g={x:null,y:null},h=a,i=[];this.onScroll=function(a){return i.push(a),this},this.handleVisibilityFor=function(a,b){return b.indexOf("x")>=0&&e.x.push(a),b.indexOf("y")>=0&&e.y.push(a),this};var j=function(){var a=h.scrollLeft,j=h.scrollTop;i.forEach(function(b){b.call(null,a,j)});var k=function(h){var i="x"===h?a:j;i!==f[h]&&(clearTimeout(g[h]),b(e[h],function(a){a.transition("floatingAxes_scrollVisibility"),a.attr("opacity",1e-6)}),g[h]=setTimeout(function(){b(e[h],function(a){g[h]=null,a.transition("floatingAxes_scrollVisibility").duration(d).attr("opacity",1)})},c)),f[h]=i};k("x"),k("y")};h.addEventListener("scroll",j),this.fireScroll=function(){j.call(null,h.scrollLeft,h.scrollTop)},this.destroy=function(){h.removeEventListener("scroll",j)}}var j=a.api.utils,k=a.api.d3,l=16,m="#E5E7EB",n="#FFFFFF",o=1,p=0,q="__transitionAttrs__",r="__floatingAxesSrcParent__",s="__floatingAxesSrcTransform__",t=0,u=function(){return++t};return a.api.plugins.add("floating-axes",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=c.defaults(a||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});b.layers.forEach(function(a){a.guide=c.defaults(a.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var f=function(a){return function(b){return Object.assign(b,a)}},g={line:f({type:"ELEMENT.LINE"}),area:f({type:"ELEMENT.AREA"}),dots:f({type:"ELEMENT.POINT"}),scatterplot:f({type:"ELEMENT.POINT"}),bar:f({type:"ELEMENT.INTERVAL"}),"stacked-bar":f({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(a){this._chart=a;var e=d.spec(this._chart.getSpec()),f=this.checkIfApplicable(e);if(this._isApplicable=0===f.length,e.addTransformation("defined-only",function(a,b){var c=b.key;return a.filter(function(a){return null!==a[c]&&"undefined"!=typeof a[c]})}),!this._isApplicable){var g=e.getSettings("log");return void g("[layers plugin]: is not applicable. "+f.join(" / "))}this.isFacet=this.checkIsFacet(e),this.primaryY=this.findPrimaryLayer(e);var h=this.getLayersText(),i=this.getLayersGroup(),j=b.label;this.fieldColorScale=j,e.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(j,{type:"color",source:"/",dim:j,brewer:b.brewer}).addTransformation("slice-layer",function(a,b){var c=b.key,d=b.group;return d?a.filter(function(a){var b=a[d],c=a[b];return b&&null!==c&&"undefined"!=typeof c}):a.filter(function(a){return a[j]===h[c]&&null!==a[c]&&"undefined"!=typeof a[c]})});var k=[this.primaryY].concat(b.layers).reduce(function(a,b){return a.concat(b.y)},[]);a.setupChartSourceModel(function(a){var b={};b[j]={type:"category"};var d={"/":{dims:b,data:[]}};return d["/"].dims=Object.assign(b,a["/"].dims),d["/"].data=a["/"].data.reduce(function(a,b){return a.concat(k.map(function(a){var c={};c[j]=h[a];var d=i[a];return d&&(c[d]=b[a],c.subLayer=d),Object.assign(c,b)}))},[]),Object.assign(d,c.omit(a,"/"))}),b.showPanel&&(this._container=a.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(a){var c=a.target,d=c.classList;d.contains("i-role-show-layers")&&(b.showLayers=c.checked),d.contains("i-role-change-mode")&&(b.mode=c.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))},getLayersText:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var c=Array.isArray(b.y)?b.y:[b.y];return c.reduce(function(a,c){return a[c]=this.extractLabelForKey(b,c),a}.bind(this),a)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(b.layers).reduce(function(a,b){var d=null;return Array.isArray(b.y)&&(d=b.y.join(", ")),c.flatten([b.y]).reduce(function(a,b){return a[b]=d,a},a)}.bind(this),{})},checkIsFacet:function(a){return a.unit().reduce(function(a,b,c){return a?a:c&&"COORDS.RECT"===c.type&&"COORDS.RECT"===b.type?a=!0:a},!1)},checkIfApplicable:function(a){return a.unit().reduce(function(b,c,d){if(d&&"COORDS.RECT"!==d.type)return b.concat("Chart specification contains non-rectangular coordinates");if(d&&"COORDS.RECT"===d.type&&"COORDS.RECT"!==c.type){var e=a.getScale(c.y);if("measure"!==a.getSourceDim(e.source,e.dim).type)return b.concat("Y scale is not a measure")}return b},[])},isLeafElement:function(a,b){return b&&"COORDS.RECT"===b.type&&"COORDS.RECT"!==a.type},isFirstCoordNode:function(a,b){return!b&&a&&"COORDS.RECT"===a.type},isFinalCoordNode:function(a,b){return a&&"COORDS.RECT"===a.type&&a.units.every(function(a){return"COORDS.RECT"!==a.type})},buildLayersLayout:function(a){return a.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(a){var b=this,c=a.unit().reduce(function(c,d){return c.concat(b.isFinalCoordNode(d)?{y:a.getScale(d.y).dim,isPrimary:!0,guide:d.guide.y,scaleName:d.y}:[])},[]);return d.cloneObject(c[0])},createPrimaryUnitReducer:function(a,c,d,e){var f=this;return function(g,h,i){var j=function(a){return a.guide.hide!==!0};if(f.isFacet&&f.isFirstCoordNode(h,i)){h.guide.y.label=h.guide.y.label||{};var k=h.guide.y.label._original_text||h.guide.y.label.text;h.guide.y.label.text=[k,c.filter(j).map(f.extractLayerLabel.bind(f)).join(", ")].join(a.getSettings("facetLabelDelimiter")),"dock"===b.mode&&(h.guide.y.label.padding-=15,h.guide.y.padding+=15,h.guide.y.rotate=-90,h.guide.y.textAnchor="middle")}return f.isLeafElement(h,i)&&(i.units=i.units.filter(function(a){return a!==h})),f.isFinalCoordNode(h)&&(h.guide.y.label=h.guide.y.label||{},"dock"===b.mode&&(h.guide.padding.l=d,h.guide.padding.r=e,h.guide.y.hide=!0),"merge"===b.mode&&(h.guide.y.label.text=f.isFacet?"":c.filter(j).map(f.extractLayerLabel.bind(f)).join(", "))),g}},createSecondaryUnitReducer:function(a,c,e,f,h,i,j,k){var l=this,m=l.getScaleName(c.scaleName||c.y),n=c.guide.scaleOrient,o=Array.isArray(c.y),p=c.isPrimary;return function(q,r,s){if(l.isFacet&&l.isFirstCoordNode(r,s)&&(r.guide.y.label.text="",r.guide.x.hide=!0,r.guide.y.hide=!0),l.isLeafElement(r,s)){var t=c.type?g[c.type]:function(a){return a};t(r),r.y=m;var u=a.getScale(r.size).dim;if(p&&u);else{var v="size_null"+k;a.addScale(v,{type:"size",source:"?",mid:1}),r.size=v}var w=a.getScale(r.color).dim;p&&w||(r.color=l.fieldColorScale,r.expression.operator="groupBy",r.expression.params=o?["subLayer"]:[l.fieldColorScale]);var x=o?{group:"subLayer"}:{key:c.y};d.unit(r).addTransformation("slice-layer",x)}var y=l.isFinalCoordNode(r);if(y){if(r.y=m,r.guide.y=Object.assign(r.guide.y,c.guide||{}),r.guide.y.label=r.guide.y.label||{},r.guide.y.label.text=l.extractLayerLabel(c),r.guide.x.hide=!0,"dock"===b.mode){r.guide.showGridLines="",r.guide.padding.l=e,r.guide.padding.r=f,r.guide.y.label.textAnchor="end",r.guide.y.label.dock="right",r.guide.y.label.padding="right"===n?1:-10,r.guide.y.label.cssClass="label inline";var z="right"===n?j:i;r.guide.y.padding+=h*z}"merge"===b.mode&&(r.guide.showGridLines="",r.guide.y.hide=!0)}return q}},getScaleName:function(a){return Array.isArray(a)?a.join(", "):a},extractLabelForKey:function(a,b){var c=a.guide||{};c.label="string"==typeof c.label?{text:c.label}:c.label;var d=c.label||{},e=d.byKeys||{};return Array.isArray(a.y)?e[b]||b:d.text||d._original_text||a.y},extractLayerLabel:function(a){var b=this,c=Array.isArray(a.y)?a.y:[a.y];return c.map(function(c){return b.extractLabelForKey(a,c)}).join(", ")},onSpecReady:function(a,e){var f=this,g=d.spec(e);if(!b.showLayers||!f._isApplicable)return void g.unit().traverse(function(a,b){f.isLeafElement(a,b)&&d.unit(a).addTransformation("defined-only",{key:g.getScale(a.y).dim})});g=b.layers.reduce(function(a,b){var d=f.getScaleName(b.y);return a.addScale(d,Object.assign({type:"linear",source:"/",dim:d,autoScale:!0},c.pick(b.guide||{},"min","max","autoScale","nice","niceInterval")))},g);var h,i=[this.primaryY].concat(b.layers).sort(function(a,b){var c=a.guide.zIndex||0,d=b.guide.zIndex||0;return c-d}),j=g.unit(),k=b.axisWidth,l=function(a){return function(b){var c=b.guide.scaleOrient||"left";return b.guide.hide!==!0&&c===a}},m=l("left"),n=l("right"),o=i.filter(m).length*k,p=i.filter(n).length*k,q=f.buildLayersLayout(g).addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createPrimaryUnitReducer(g,i,o,p),h).value()]}),r=-1,s=-1;i.reduce(function(a,b,c){return r=m(b)?r+1:r,s=n(b)?s+1:s,a.addFrame({key:{x:1,y:1},units:[(h=d.unit(j.clone())).reduce(f.createSecondaryUnitReducer(g,b,o,p,k,r,s,c),h).value()]})},q)},onUnitsStructureExpanded:function(){var a=this;if(a._isApplicable&&"merge"===b.mode){var e=d.spec(a._chart.getSpec()),f=a.primaryY.scaleName,g=b.layers.map(function(b){return a.getScaleName(b.y)}).filter(function(a){return e.getScale(a)}).concat(f),h=g.reduce(function(b,c){var d=a._chart.getScaleInfo(c);return b[c]=d.domain().filter(function(a){return Number.isFinite(a)}),b},{}),i=d3.extent(c.flatten(Object.keys(h).map(function(a){return h[a]})));g.forEach(function(a){var b=e.getScale(a);b.min=i[0],b.max=i[1],b.nice=!1})}},containerTemplate:'
',template:c.template(['","
",'","
"].join("")),onRender:function(){this._isApplicable&&b.showPanel&&(this._container.innerHTML=this.template({title:b.title,mode:b.mode,showLayers:b.showLayers}))}}}var c=a.api.utils,d=a.api.pluginsSDK,e=d.tokens();return a.api.plugins.add("layers",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(a){var b=d.defaults(a||{},{}),c=function(a){return null===a||""===a||"undefined"==typeof a},k=function(a,b){return function(d){var e=d[a],f=JSON.stringify(c(e)?null:e);return b===f}},q=function(a,b,c,d){a.addEventListener(b,function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.matches(c)&&d(a,b),b=b.parentNode})};return{init:function(a){this.instanceId=l(),this._chart=a,this._currentFilters={},this._legendColorByScaleId={},this._legendOrderState={};var c=this._chart.getSpec(),d=function(a){return function(b,d){var e=c.scales[d];return e.type===a&&e.dim&&b.push(d),b}};this._color=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return a.getScaleInfo(b).discrete}),this._fill=Object.keys(c.scales).reduce(d("color"),[]).filter(function(b){return!a.getScaleInfo(b).discrete}),this._size=Object.keys(c.scales).reduce(d("size"),[]);var e=this._color.length>0,i=this._fill.length>0,j=this._size.length>0;if(this._assignStaticBrewersOrEx(),e||i||j){switch(b.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}e&&(q(this._container,"click",f,function(a,b){this._toggleLegendItem(b,"reset")}.bind(this)),q(this._container,"click",g,function(a,b){var c=a.ctrlKey||a.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(b,c)}.bind(this)),q(this._container,"mouseover",g,function(a,b){this._highlightToggle(b,!0)}.bind(this)),q(this._container,"mouseout",g,function(a,b){this._highlightToggle(b,!1)}.bind(this)))}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:'
',_template:d.template(['
',"<%=top%>",'
<%=name%>
',"<%=items%>","
"].join("")),_itemTemplate:d.template(["
\">",'
','
','
',"
","
","
",' <%=label%>',"
"].join("")),_resetTemplate:d.template(['
','
Reset
',"
"].join("")),_clearPanel:function(){this._container&&(this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var a=this;a._fill.forEach(function(b){var c=a._chart.select(function(a){return a.config.color===b})[0];if(c){var f=c.config.guide||{},g=c.getScale("color"),h=g.domain().sort(function(a,b){return a-b}),i=h.reduce(function(a,b){return a&&d.isDate(b)},!0),k=i?h.map(Number):h,l=u(k[0],k[k.length-1]),o=function(){var b=a._chart.getSpec(),c=e.extractFieldsFormatInfo(b)[g.dim].format;return c||(c=function(a){return new Date(a)}),function(a){return String(c(a))}}(),p=i?o:l,q=g.brewer.length,r=((f.color||{}).label||{}).text||g.dim,s=function(a){return a.length*j*.618},t=g.isInteger?(k[1]-k[0])%3===0?4:(k[1]-k[0])%2===0?3:2:3,v=n(k,t),w=(i?v.map(function(a){return new Date(a)}):v).map(p);w[0]===w[w.length-1]&&(w=[w[0]]),a._container.insertAdjacentHTML("beforeend",a._template({name:r,top:null,items:'
'}));var x=a._container.lastElementChild.querySelector(".graphical-report__legend__gradient-wrapper"),y=x.getBoundingClientRect().width,z=w.reduce(function(a,b){return a+s(b)},0),A=!1;z>y&&(w.length>1&&s(w[0])+s(w[w.length-1])>y?A=!0:w=[w[0],w[w.length-1]]);var B=20,C=A?function(){var a=120,b=j*-.382/2;return{width:y,height:a,barX:0,barY:0,barWidth:B,barHeight:a,textAnchor:"start",textX:d.range(t).map(function(){return 25}),textY:1===w.length?a/2+.618*j:w.map(function(c,d){var e=(w.length-1-d)/(w.length-1);return j*(1-e)+a*e+b})}}():function(){var a=s(w[0])/2,b=s(w[w.length-1])/2,c=8;return{width:y,height:B+c+j,barX:0,barY:0,barWidth:y,barHeight:B,textAnchor:"middle",textX:1===w.length?[y/2]:w.map(function(c,d){var e=d/(w.length-1);return a*(1-e)+(y-b)*e}),textY:d.range(t).map(function(){return B+c+j})}}(),D=n(k,q).map(function(a,b){var c=b/(q-1)*100;return''}),E="legend-gradient-"+a.instanceId,F=m("svg",{"class":"graphical-report__legend__gradient",width:C.width,height:C.height},m("defs",m("linearGradient",{id:E,x1:"0%",y1:A?"100%":"0%",x2:A?"0%":"100%",y2:"0%"},D.join(""))),m("rect",{"class":"graphical-report__legend__gradient__bar",x:C.barX,y:C.barY,width:C.barWidth,height:C.barHeight,fill:"url(#"+E+")"}),w.map(function(a,b){return m("text",{x:C.textX[b],y:C.textY[b],"text-anchor":C.textAnchor},a)}).join(""));x.insertAdjacentHTML("beforeend",F)}})},_drawSizeLegend:function(){var a=this;a._size.forEach(function(b){var c=a._chart.select(function(a){return a.config.size===b})[0];if(c){var e=c.config.guide||{},f=c.getScale("size"),g=f.domain().sort(function(a,b){return a-b});if(!Array.isArray(g)||!g.every(isFinite))return;var h=((e.size||{}).label||{}).text||f.dim,k=g[0],l=g[g.length-1],n=[k];if(l-k){var q=p(l-k),r=Math.round(4-q),s=Math.pow(10,r),t=d.unique(a._chart.getDataSources({excludeFilter:["legend"]})[f.source].data.map(function(a){return a[f.dim]}).filter(function(a){return a>=k&&a<=l})).sort(function(a,b){return a-b}),v=o(t,i,f.funcType);n=d.unique(v.map(function(a){return Math.round(a*s)/s}))}var w=u(n[0],n[n.length-1]),x=function(a){return a.length*j*.618};n.reverse();var y=n.map(f),z=Math.max.apply(null,y),A=n.map(w);a._container.insertAdjacentHTML("beforeend",a._template({name:h,top:null,items:'
'}));var B=a._container.lastElementChild.querySelector(".graphical-report__legend__size-wrapper"),C=B.getBoundingClientRect().width,D=Math.max.apply(null,A.map(x)),E=!1;(D>C/4||1===A.length)&&(E=!0);var F=E?function(){for(var a,b,c=j,e=y[0]/2,f=y[y.length-1]/2,g=8,h=[e],i=1;i0){a._updateResetButtonPosition();var b=null;a._scrollListener=function(){var c=a._container.querySelector(f);c.style.display="none",b&&clearTimeout(b),b=setTimeout(function(){a._updateResetButtonPosition(),c.style.display="",b=null},250)},a._getScrollContainer().addEventListener("scroll",a._scrollListener)}},_toggleLegendItem:function(a,b){var c=this._currentFilters,d=a?Array.prototype.filter.call(a.parentNode.childNodes,function(a){return a.matches(g)}):null,e=function(a){var b=a.getAttribute("data-dim"),c=a.getAttribute("data-value");return{sid:a.getAttribute("data-scale-id"),dim:b,val:c,key:b+c}},f=function(a){return a in c},h=function(a,b){var d=e(a);if(f(d.key)===b)if(b){var g=c[d.key];delete c[d.key],a.classList.remove("disabled"),this._chart.removeFilter(g)}else{a.classList.add("disabled");var h=k(d.dim,d.val);c[d.key]=this._chart.addFilter({tag:"legend",predicate:function(a){return!h(a)}})}}.bind(this),i=function(b){return b===a},j=!!a&&f(e(a).key),l=function(a,b){a.querySelector(".graphical-report__legend__guide").style.backgroundColor=b?"":"transparent"};if("reset"===b)d.forEach(function(a){h(a,!0),l(a,!0)});else if("leave-others"===b)d.forEach(function(a){i(a)&&h(a,j)}),l(a,j);else if("focus-single"===b){var m=!j&&d.every(function(a){return i(a)||f(e(a).key)});d.forEach(function(a){var b=i(a)||m;h(a,b)}),j&&l(a,!0)}this._chart.refresh()},_highlightToggle:function(a,b){if(!a.matches(".disabled")){var c=a.getAttribute("data-dim"),d=a.getAttribute("data-value"),e=b?k(c,d):function(a){return null};this._chart.select(function(a){return!0}).forEach(function(a){a.fire("highlight",e)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){var a=this._container.querySelector(f);a.style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(a,b){var c=b.length;return a.reduce(function(a,d,e){return a[d]=b[e%c],a},{})},_assignStaticBrewersOrEx:function(){var a=this;a._color.forEach(function(b){var c=a._chart.getSpec().scales[b],e=a._chart.getDataSources({excludeFilter:["legend"]}),f=a._chart.getScaleFactory(e).createScaleInfoByName(b).domain();if(!c.brewer||Array.isArray(c.brewer)){var g=c.brewer||d.range(20).map(function(a){return"color20-"+(1+a)});c.brewer=a._generateColorMap(f,g)}a._legendOrderState[b]=f.reduce(function(a,b,c){return a[b]=c,a},{})})}}}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f=".graphical-report__legend__reset",g=".graphical-report__legend__item-color",h=".graphical-report__legend__guide--color__overlay",i=4,j=13,k=0,l=function(){return++k},m=function(a,b){var c=2,d=b;"object"!=typeof d&&(c=1,d={});var e=Array.prototype.slice.call(arguments,c);return"<"+a+Object.keys(d).map(function(a){return" "+a+'="'+d[a]+'"'}).join("")+(e.length>0?">"+e.join("")+"":"/>")},n=function(a,b){var c=a[0],e=a[1],f=(e-c)/(b-1),g=d.range(b-2).map(function(a){return c+f*(a+1)});return[c].concat(g).concat(e)},o=function(a,b,c){if(a.length<3)return a.slice(0);if(b<3)return[a[0],a[a.length-1]];var e=a[0]<0?Math.abs(a[0]):0,f=function(a){return a},g=function(a){return Math.sqrt(a+e)},h=function(a){return Math.pow(a,2)-e},i="sqrt"===c?g:f,j="sqrt"===c?h:f;a=a.map(i);var k,l=[a[0]],m=a[a.length-1]-a[0],n=.5*m/(b-1),o=d.range(1,b-1).map(function(a){var c=m*a/(b-1);return{min:c-n,mid:c,max:c+n,diff:Number.MAX_VALUE,closest:null}}),p=0,q=function(){if(p!==o.length){var a=k;k=o[p++],k.min=Math.max(k.min,(a&&null!==a.closest?a.closest:l[0])+n)}};return q(),a.forEach(function(a){if(!(ak.max&&q();var b=Math.abs(a-k.mid);b0?Math.abs(b-a):c,f=q(e),g=Math.abs(d-f);return Math.abs(d)>3&&g<=3?t:function(a){var b=q(c-a),d=Math.min((f<0?Math.abs(f):0)+(bc}};return{init:function(b){this._chart=b,this._currentFilters={},this._data={},this._bounds={},this._filter={},this._container={},this._layout=this._chart.getLayout().layout;var c=this,d=this._chart.getSpec(),e=d.sources["/"],f=a&&a.fields||a;this._fields=Array.isArray(f)&&f.length>0?f:Object.keys(e.dims),this._applyImmediately=Boolean(a&&a.applyImmediately);var g=c._chart.getChartModelData();this._filtersContainer=c._chart.insertToRightSidebar(c._filtersContainer),this._filtersContainer.style.maxHeight="0px", -c._fields.filter(function(a){var b="measure"===e.dims[a].type;return b||d.settings.log("The ["+a+"] isn't measure so Quick Filter plugin skipped it"),b}).forEach(function(a){c._data[a]=g.map(function(b){return b[a]}),c._bounds[a]=d3.extent(c._data[a]),c._filter[a]=c._bounds[a],c._filtersContainer.insertAdjacentHTML("beforeend",c._filterWrapper({name:a})),c._container[a]=c._filtersContainer.lastChild,c._drawFilter(a)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:'
',_filterWrapper:c.template('
<%=name%>
'),_drawFilter:function(a){function d(a){var b=a.findIndex(function(a){var b=d3.time.format(a);return b(new Date(h[0]))!==b(new Date(h[1]))});return b=b<0?a.length:b,{comm:a.slice(0,b),diff:a.slice(b)}}function e(){var b=k._filter[a]=q.extent(),c=j?new Date(b[0]).getTime():b[0],d=j?new Date(b[1]).getTime():b[1],e=Math.round(parseFloat(c)*w)/w,f=Math.round(parseFloat(d)*w)/w,g=s.selectAll(".w text"),h=s.selectAll(".e text");if(j){var i=d3.time.format(y.comm.join("")),l=d3.time.format(y.diff.join(""));t.html(l(new Date(e))+" .. "+l(new Date(f))+' '+i(new Date(f))+"")}else g.text(e),h.text(f)}function f(){e(),k._applyFilter(a)}var g=this._data[a],h=this._bounds[a],i=this._filter[a],j=c.isDate(h[0])||c.isDate(h[1]),k=this,l={top:0,right:24,bottom:21,left:12},m=4,n=180-l.left-l.right,o=41-l.top-l.bottom-2*m,p=d3.scale.linear().domain(h).range([0,n]),q=d3.svg.brush().x(p).extent(i).on("brushstart",function(){k._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?f:e).on("brushend",function(){k._layout.style["overflow-y"]="",f()}),r=d3.select(this._container[a]).append("svg").attr("width",n+l.left+l.right).attr("height",o+l.top+l.bottom+4).append("g").attr("transform","translate("+l.left+","+l.top+")"),s=(r.append("g").selectAll("rect").data(g).enter().append("rect").attr("transform",function(a){return"translate("+p(a)+","+(l.top+m)+")"}).attr("height",o).attr("width",1),r.append("g").attr("class","brush").call(q));s.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",o+2*m),s.selectAll(".resize").append("text").attr("x",0).attr("y",2*(o+m)),s.selectAll("rect").attr("height",o+2*m);var t=r.append("text").attr("x",n/2).attr("y",2*(o+m)).attr("class","date-label"),u=b(k._filter[a][1]-k._filter[a][0]),v=Math.round(3-u),w=Math.pow(10,v),x=["’%y"," %b","%d","%H",":%M",":%S"];if(j){var y=d(x);y.comm.length<3?(y.diff.splice(-3),y.diff.reverse(),y.comm.reverse()):(y.comm.length<5&&y.diff.pop(),y.diff=y.comm.splice(3,y.comm.length-3).concat(y.diff),y.comm.reverse())}f()},_applyFilter:function(a){var b=this._currentFilters,c=this._filter[a][0],f=this._filter[a][1],g=e(a,c,f),h=b[a];delete b[a],this._chart.removeFilter(h),b[a]=this._chart.addFilter({tag:"quick-filter",predicate:function(a){return!g(a)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}var c=a.api.utils,d=0;return a.api.plugins.add("quick-filter",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var h=d.defaults(b||{},{align:"bottom-right",escapeHtml:!0,fields:null,formatters:{},dockToData:!1,aggregationGroupFields:[],onRevealAggregation:function(a,b){console.log("Setup [onRevealAggregation] callback and filter original data by the following criteria: ",JSON.stringify(a,null,2))},spacing:24}),i={init:function(a){this._chart=a,this._metaInfo={},this._skipInfo={},Object.assign(this,d.omit(h,"fields","getFields")),this._tooltip=this._chart.addBalloon({spacing:h.spacing,auto:!0,effectClass:"fade"});var b=h.aggregationGroupFields.length>0?this.templateRevealAggregation:"",c=d.template(this.template),e=this.getTooltipNode();this._tooltip.content(c({revealTemplate:b,excludeTemplate:this.templateExclude})),e.addEventListener("click",function(a){for(var b=a.target;b!==a.currentTarget&&null!==b;)b.classList.contains("i-role-exclude")&&(this._exclude(),this.setState({highlight:null,isStuck:!1})),b.classList.contains("i-role-reveal")&&(this._reveal(),this.setState({highlight:null,isStuck:!1})),b=b.parentNode}.bind(this),!1),this._scrollHandler=function(){this.setState({highlight:null,isStuck:!1})}.bind(this),window.addEventListener("scroll",this._scrollHandler,!0),this._outerClickHandler=function(a){var b=this.getTooltipNode().getBoundingClientRect();(a.clientXb.right||a.clientYb.bottom)&&this.setState({highlight:null,isStuck:!1})}.bind(this),this.setState(this.state),this.afterInit(e)},getTooltipNode:function(){return this._tooltip.getElement()},state:{highlight:null,isStuck:!1},setState:function(a){var b=this.state,c=this.state=Object.assign({},b,a);b.highlight=b.highlight||{data:null,cursor:null,unit:null},c.highlight=c.highlight||{data:null,cursor:null,unit:null},c.isStuck&&b.highlight.data&&(c.highlight=b.highlight),c.highlight.data!==b.highlight.data&&(c.highlight.data?(this.hideTooltip(),this.showTooltip(c.highlight.data,c.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){this._setTargetSvgClass(!0)}.bind(this))):c.isStuck||!b.highlight.data||c.highlight.data||(this._removeFocus(),this.hideTooltip(),this._setTargetSvgClass(!1))),!c.highlight.data||b.highlight.cursor&&c.highlight.cursor.x===b.highlight.cursor.x&&c.highlight.cursor.y===b.highlight.cursor.y||this._tooltip.position(c.highlight.cursor.x,c.highlight.cursor.y);var d=this.getTooltipNode();c.isStuck!==b.isStuck&&(c.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),d.classList.add("stuck"),this._setTargetEventsEnabled(!1),this._accentFocus(c.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),d.classList.remove("stuck"),requestAnimationFrame(function(){this._setTargetEventsEnabled(!0)}.bind(this))))},showTooltip:function(a,b){var c=this.getTooltipNode().querySelectorAll(".i-role-content")[0];if(c){var d=h.fields||"function"==typeof h.getFields&&h.getFields(this._chart)||Object.keys(a);c.innerHTML=this.render(a,d)}this._tooltip.position(b.x,b.y).place(h.align).show().updateSize()},hideTooltip:function(a){window.removeEventListener("click",this._outerClickHandler,!0),this._tooltip.hide()},destroy:function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},_subscribeToHover:function(){var a=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(b){return a.indexOf(b.config.type)>=0}).forEach(function(a){a.on("data-hover",function(a,b){var c=document.body.getBoundingClientRect();this.setState({highlight:b.data?{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a}:null})}.bind(this)),a.on("data-click",function(a,b){var c=document.body.getBoundingClientRect();this.setState(b.data?{highlight:{data:b.data,cursor:{x:b.event.clientX-c.left,y:b.event.clientY-c.top},unit:a},isStuck:!0}:{highlight:null,isStuck:null})}.bind(this))},this)},afterInit:function(a){},render:function(a,b){var c=this;return b.filter(function(a){var b=a.split("."),d=2===b.length&&c._skipInfo[b[0]];return!d}).map(function(b){var d=b,e=a[b];return c.renderItem(c._getLabel(d),c._getFormat(d)(e),d,e)}).join("")},renderItem:function(a,b,c,d){return this.itemTemplate({label:h.escapeHtml?g(a):a,value:h.escapeHtml?g(b):b})},_getFormat:function(a){var b=this._metaInfo[a]||{format:function(a){return String(a)}};return b.format},_getLabel:function(a){var b=this._metaInfo[a]||{label:a};return b.label},_accentFocus:function(a){var b=function(b){return b===a};this._chart.select(function(){return!0}).forEach(function(a){a.fire("highlight",b)})},_removeFocus:function(){var a=function(){return null};this._chart.select(function(){return!0}).forEach(function(b){b.fire("highlight",a),b.fire("highlight-data-points",a)})},_reveal:function(){var a=this.state.highlight.data,b=h.aggregationGroupFields||[],c=b.reduce(function(b,c){return a.hasOwnProperty(c)&&(b[c]=a[c]),b},{});h.onRevealAggregation(c,a)},_exclude:function(){this._chart.addFilter({tag:"exclude",predicate:function(a){return function(b){return JSON.stringify(b)!==JSON.stringify(a)}}(this.state.highlight.data)}),this._chart.refresh()},onRender:function(){var a=this._getFormatters();this._metaInfo=a.meta,this._skipInfo=a.skip,this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})},_setTargetSvgClass:function(a){c.select(this._chart.getSVG()).classed(f,a)},_setTargetEventsEnabled:function(a){a?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},templateRevealAggregation:['
','
'," Reveal","
","
"].join(""),templateExclude:['
','
',' '," Exclude","
","
"].join(""),template:['
',"<%= revealTemplate %>","<%= excludeTemplate %>"].join(""),itemTemplate:d.template(['
','
<%=label%>
','
<%=value%>
',"
"].join("")),_getFormatters:function(){var b=e.extractFieldsFormatInfo(this._chart.getSpec()),c={};Object.keys(b).forEach(function(a){b[a].isComplexField&&(c[a]=!0),b[a].parentField&&delete b[a]});var f=function(a){var b={};return"function"==typeof a||"string"==typeof a?b={format:a}:d.isObject(a)&&(b=d.pick(a,"label","format","nullAlias")),b};return Object.keys(h.formatters).forEach(function(c){var e=f(h.formatters[c]);b[c]=Object.assign({label:c,nullAlias:"No "+c},b[c]||{},d.pick(e,"label","nullAlias")),e.hasOwnProperty("format")?b[c].format="function"==typeof e.format?e.format:a.api.tickFormat.get(e.format,b[c].nullAlias):b[c].format=b[c].hasOwnProperty("format")?b[c].format:a.api.tickFormat.get(null,b[c].nullAlias)}),{meta:b,skip:c}}};return i}var c=a.api.d3,d=a.api.utils,e=a.api.pluginsSDK,f="graphical-report__tooltip-target",g=function(a){return String(a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")};return a.api.plugins.add("tooltip",b),b}),function(a){if("function"==typeof define&&define.amd)define(["taucharts"],function(b){return a(b)});else if("object"==typeof module&&module.exports){var b=require("taucharts");module.exports=a(b)}else a(this.tauCharts)}(function(a){function b(b){var f=d.defaults(b||{},{type:"linear",hideError:!1,showPanel:!0,showTrend:!0,models:["linear","exponential","logarithmic"]});return{init:function(a){if(this._chart=a,this._applicableElements=["ELEMENT.POINT","ELEMENT.LINE","ELEMENT.AREA","ELEMENT.INTERVAL"],this._isApplicable=this.checkIfApplicable(a),f.showPanel){this._container=a.insertToRightSidebar(this.containerTemplate);var b="applicable-true";this._isApplicable||(b="applicable-false",this._error=["Trend line can't be computed for categorical data.","Each axis should be either a measure or a date."].join(" ")),this._container.classList.add(b),f.hideError&&this._container.classList.add("hide-trendline-error"),this.uiChangeEventsDispatcher=function(a){var b=a.target,c=b.classList;c.contains("i-role-show-trend")&&(f.showTrend=b.checked),c.contains("i-role-change-model")&&(f.type=b.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1)}},checkIfApplicable:function(a){var b=this,c=a.getSpec(),d=!1;return a.traverseSpec(c,function(a,e){b.predicateIsApplicable(c,a,e)&&(d=!0)}),d},predicateIsApplicable:function(a,b,c){if(c&&"COORDS.RECT"!==c.type)return!1;if(c&&!c.units)return!1;if(this._applicableElements.indexOf(b.type)===-1||b.stack)return!1;var d=a.scales[b.x],e=a.scales[b.y];return!("ordinal"===d.type||"ordinal"===e.type)},onSpecReady:function(b,e){var g=this;if(f.showTrend){var h=a.api.tickPeriod,i=function(a){var b=h.get(a,{utc:e.settings.utcTime});return function(a){return b.cast(new Date(a))}};e.transformations=e.transformations||{},e.transformations.regression=function(a,b){var e=b.x.dim,f=b.y.dim,g=b.g.dim,h="period"===b.x.type&&b.x.period,j="period"===b.y.type&&b.y.period,k=h?i(b.x.period):function(a){return a},l=j?i(b.y.period):function(a){return a},m=a.map(function(a){var b=d.isDate(a[e])?a[e].getTime():a[e],c=d.isDate(a[f])?a[f].getTime():a[f],h=a[g];return[b,c,h]}),n=d.groupBy(m,function(a){return a[2]});return Object.keys(n).reduce(function(a,d){var i=n[d],m=c(b.type,i),o=m.points.filter(function(a){return null!==a[0]&&null!==a[1]}).sort(function(a,b){return a[0]-b[0]}).map(function(a){var b={};return b[e]=k(a[0]),b[f]=l(a[1]),g&&(b[g]=d),b});return o.length>1&&(h||j)&&(o=[o[0],o[o.length-1]]),a.concat(o.length>1?o:[])},[])},b.traverseSpec(e,function(a,b){if(g.predicateIsApplicable(e,a,b)){var c=e.scales[a.x],h=e.scales[a.y],i=e.scales[a.color]||{},j=JSON.parse(JSON.stringify(a));j.type="ELEMENT.LINE",j.size="size_null",j.namespace="trendline",j.transformation=j.transformation||[],j.transformation.push({type:"regression",args:{type:f.type,x:c,y:h,g:i}});var k={};j.guide=d.defaults(k,j.guide||{}),j.guide.interpolate="linear",j.guide.showAnchors="never",j.guide.cssClass="graphical-report__trendline",j.guide.widthCssClass="graphical-report__line-width-1",delete j.guide.label,delete j.label,b.units.push(j)}})}},containerTemplate:'
',template:d.template(['","
",'","
",'
<%= error %>
'].join("")),onRender:function(a){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:f.showTrend&&this._isApplicable?"checked":"",models:f.models.map(function(a){var b=f.type===a?"selected":"";return""})});var b=function(a){return function(){e.select(this).classed({active:a,"graphical-report__line-width-1":!a,"graphical-report__line-width-3":a})}},c=e.select(a.getSVG());c.selectAll(".graphical-report__trendline").on("mouseenter",b(!0)).on("mouseleave",b(!1))}}}}var c=function(){"use strict";var a=function(a,b){var c=0,d=0,e=0,f=0,g=0,h=a.length-1,i=new Array(b);for(c=0;cMath.abs(a[c][f])&&(f=d);for(e=c;e=c;e--)a[e][d]-=a[e][c]*a[c][d]/a[c][c]}for(d=h-1;d>=0;d--){for(g=0,e=d+1;e=0;i--)r+=i>1?Math.round(100*o[i])/100+"x^"+i+" + ":1==i?Math.round(100*o[i])/100+"x + ":Math.round(100*o[i])/100;return{equation:o,points:f,string:r}},lastvalue:function(a){for(var b=[],c=null,d=0;d0&&ga[g]-a[h]?f:g;for(var k=Math.abs(1/(a[j]-i)),l=0,m=0,n=0,o=0,p=0,q=f;q<=g;){var r,s=a[q],t=b[q];r=q=0:e.dim===t.dim});if(null===n.method)return a;var i=n.k,o={l:-.5,r:.5},s=n.method,c=n.scale;return a[s]=function(t){var a=(o[t.__pos__]||0)*i;if(c.discrete)return e[s](t)+c.stepSize(t[c.dim])*a;if(c.period){for(var n=r.a.api.tickPeriod.get(c.period,{utc:c.utcTime}),u=c.domain(),l=n.cast(u[0]);l=0?r[t].map(function(t){return new Date(t)}):r[t];i.series=s.unique(o.concat(c))}})})},_getFormat:function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},_useSavedDataRefs:function(t,e){var a=this._dataRefs;return this._usedDataRefsKeys.add(e),e in a?(a[e].forEach(function(e,a){return Object.assign(e,t[a])}),a[e]):(a[e]=t,t)},_startWatchingDataRefs:function(){var t=this._dataRefs;this._initialDataRefsKeys=new Set(Object.keys(t)),this._usedDataRefsKeys=new Set},_clearUnusedDataRefs:function(){var t=this._dataRefs,e=this._initialDataRefsKeys,a=this._usedDataRefsKeys;Array.from(e).filter(function(t){return!a.has(t)}).forEach(function(e){return delete t[e]}),this._initialDataRefsKeys=null,this._usedDataRefsKeys=null},_getDataRowsFromItems:function(t){var e=function(t,e){return t.reduce(function(t,a,n){return t[a]=e[n],t},{})};return t.reduce(function(t,a){return Array.isArray(a.dim)?Array.isArray(a.val)&&a.val.every(Array.isArray)&&a.val.forEach(function(n){t.push(e(a.dim,n))}):Array.isArray(a.val)?a.val.forEach(function(n){t.push(e([a.dim],[n]))}):t.push(e([a.dim],[a.val])),t},[])},_getAnnotatedDimValues:function(t){var e={};return this._getDataRowsFromItems(t).forEach(function(t){Object.keys(t).forEach(function(a){e[a]=e[a]||[],e[a].push(t[a])})}),e}}}r.a.api.plugins.add("annotations",d),e.default=d}})}); \ No newline at end of file diff --git a/dist/plugins/bar-as-span.js b/dist/plugins/bar-as-span.js new file mode 100644 index 000000000..27c3940ea --- /dev/null +++ b/dist/plugins/bar-as-span.js @@ -0,0 +1 @@ +!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("taucharts"));else if("function"==typeof define&&define.amd)define([],n);else{var t="object"==typeof exports?n(require("taucharts")):n(e.Taucharts);for(var r in t)("object"==typeof exports?exports:e)[r]=t[r]}}(window,function(e){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=34)}({0:function(n,t){n.exports=e},34:function(e,n,t){"use strict";t.r(n);var r=t(0),i=t.n(r),o=i.a.api.utils;function u(e){var n=e.x0,t=e.y0,r=null==e.collapse||e.collapse,i=function(e){return{y0:function(t){return e.scaleY.value(t[n])}}},u=function(e){return{y0:function(n){return e.scaleY.value(n[t])}}},a=function(e){var r=e.data();if(0===r.length)return{};var i=e.scaleY,o=Number.MAX_VALUE,u=Number.MIN_VALUE,a=e.flip?n:t,c=i.dim;return r.forEach(function(e){var n=e[a],t=e[c],r=nn?t:n;o=ru?i:u}),i.fixup(function(e){var n={};return(!e.hasOwnProperty("max")||e.maxo)&&(n.min=o),n}),{}},c={},f={},l=function(e){var i=e.data().slice(),u=e.scaleX,a=e.scaleY;if(0===i.length||!u.discrete)return{};var l=e.flip?n:t,s=a.dim;i.sort(o.createMultiSorter(function(e,n){return e[l]-n[l]},function(e,n){return e[s]-n[s]}));var p=u.dim,d=u.domain().reduce(function(e,n){return e[n]=[],e},{}),h=new Map;return i.forEach(r?function(e){var n=e[p],t=d[n],r=t.findIndex(function(n){return n[n.length-1][s]<=e[l]});r<0&&(r=t.length,t.push([])),t[r].push(e),h.set(e,r)}:function(e){var n=e[p],t=d[n],r=r=t.length;t.push([]),t[r].push(e),h.set(e,r)}),Object.keys(d).forEach(function(e){c[e]=d[e]}),u.fixup(function(e){var n={},t=u.domain().reduce(function(e,n){return e+c[n].length},0);return u.domain().forEach(function(e){f[e]=t}),n.ratio=function(e){return c[e].length/f[e]},n}),{xi:function(n){var t=n[p],r=u.stepSize(t);return e.xi(n)-r/2+r/c[t].length*(h.get(n)+.5)}}};return{onSpecReady:function(e,n){e.traverseSpec(n,function(e,n){"ELEMENT.INTERVAL"===e.type&&(e.transformModel=[e.flip?i:u,l],e.adjustScales=[a],e.guide.enableColorToBarPosition=!1,e.guide.label=e.guide.label||{},e.guide.label.position=e.guide.label.position||(e.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}i.a.api.plugins.add("bar-as-span",u),n.default=u}})}); \ No newline at end of file diff --git a/dist/plugins/box-whiskers.js b/dist/plugins/box-whiskers.js new file mode 100644 index 000000000..46934e6f1 --- /dev/null +++ b/dist/plugins/box-whiskers.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],t);else{var n="object"==typeof exports?t(require("taucharts"),require("d3-selection")):t(e.Taucharts,e.d3);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=33)}({0:function(t,n){t.exports=e},1:function(e,n){e.exports=t},33:function(e,t,n){"use strict";n.r(t);var r=n(0),i=n.n(r),a=n(1),o=i.a.api.utils,s="minimum",u="maximum",c={MIN:s,MAX:u,MEDIAN:"median",Q1:"Q1",Q3:"Q3"};function l(e,t){var n=e.length-1,r=t/100*n,i=Math.floor(r);if(0===i)return{pos:0,value:e[0]};if(i===n)return{pos:n,value:e[n]};var a=r-i;return a?{pos:r,value:e[i]+a*(e[i+1]-e[i])}:{pos:r,value:e[r]}}function f(e,t,n){for(var r=e.sort(function(e,t){return e-t}),i=l(r,25),a=l(r,50),o=l(r,75),s=o.value-i.value,u=i.value-1.5*s,c=o.value+1.5*s,f=r[0],d=r[r.length-1],p=0;p<=i.pos;p++){var m=r[p];if(m>u){f=m;break}}for(var h=r.length-1;h>=o.pos;h--){var y=r[h];if(yo||e[r]\n
'+e+'
\n
\n '+f(r.map(function(t){return h(t)}))+"\n
\n\n"},h=function(t){var e=t.key,r=t.label,n=t.checked;return'\n
\n '+_()+'\n '+r+"\n
\n"},_=function(){return['','',""].join("")},p=function(t,e,r,n){t.addEventListener(e,function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.matches(r)&&n(t,e),e=e.parentNode})},g=function(t,e){var r=function(t){return JSON.stringify(function(t){return null==t||""===t}(t)?null:t)},n=r(e);return function(e){var i=e[t],o=r(i);return n===o}},v=function(){function t(t){this.settings=o.defaults(t||{},{formatters:{},fields:null,skipColorDim:!0}),this._filters={},this.onRender=this._createRenderHandler()}return t.prototype.init=function(t){var e=this;this._chart=t;var r=function(e){var r=t.getSpec().scales;return Object.keys(r).map(function(t){return{name:t,config:r[t]}}).filter(e)},n=r(function(t){var e=t.config;t.name;return"ordinal"===e.type&&e.dim}),i=o.unique(n.map(function(t){return t.config.dim}));if(this.settings.fields&&(i=i.filter(function(t){return e.settings.fields.indexOf(t)>=0})),this.settings.skipColorDim){var a=r(function(t){var e=t.config;t.name;return"color"===e.type&&e.dim}).map(function(t){return t.config.dim});i=i.filter(function(t){return a.indexOf(t)<0})}n=n.filter(function(t){return i.indexOf(t.config.dim)>=0}),this._categoryScales=n,this._render()},t.prototype.destroy=function(){var t=this._filters,e=this._chart;Object.keys(t).forEach(function(r){return e.removeFilter(t[r])});var r;(r=this._node)&&r.parentElement&&r.parentElement.removeChild(r)},t.prototype._createRenderHandler=function(){return function(){if(this._lastClickedScrollInfo){var t=this._lastClickedScrollInfo.key,e=this._node.querySelector('[data-key="'+t+'"]');if(e){var r=this._lastClickedScrollInfo.top,n=e.getBoundingClientRect().top,i=this._getScrollContainer(),o=i.getBoundingClientRect().top;i.scrollTop=i.scrollTop-r-o+n}this._lastClickedScrollInfo=null}}},t.prototype._getContent=function(t){return function(t){var e=t.categories;return'\n
\n '+f(e.map(function(t){return d(t)}))+"\n
\n"}({categories:t})},t.prototype._getCategoriesInfo=function(){var t=this;return this._categoryScales.map(function(e){var r=e.name;return t._chart.getScaleInfo(r)}).map(function(e){var r=e.dim,n=t._getFieldLabel(r),i=t._getFieldFormat(r),a=t._chart.getDataSources({excludeFilter:["category-filter"]}),c=o.unique(a[e.source].data.map(function(t){return t[r]})).map(function(e){var n=i(e),o=t._getFilterKey(r,e);return{label:n,checked:!t._filters[o],key:o,value:e}});return{dim:r,label:n,values:c}})},t.prototype._render=function(){this._clear(),this._formatters=a.getFieldFormatters(this._chart.getSpec(),this.settings.formatters);var t,e,r=this._getCategoriesInfo(),n=this._getContent(r),i=(t=n,(e=document.createElement("div")).innerHTML=t,e.firstElementChild);this._node=i,this._chart.insertToRightSidebar(i),this._subscribeToEvents(),this._filterKeys=r.reduce(function(t,e){var r=e.dim;return e.values.forEach(function(e){var n=e.key,i=e.value;t[n]={dim:r,value:i}}),t},{})},t.prototype._subscribeToEvents=function(){var t=this,e=this._node;p(e,"click","."+u,function(e,r){var n=r.getAttribute("data-key"),i=e.target.matches("."+l);t._toggleCategory(n,i?"toggle":"focus")}),p(e,"mouseover","."+u,function(e,r){var n=r.getAttribute("data-key");t._toggleHighlight(n,!0)}),p(e,"mouseout","."+u,function(e,r){var n=r.getAttribute("data-key");t._toggleHighlight(n,!1)})},t.prototype._isFilteredOut=function(t){return t in this._filters},t.prototype._toggleCategory=function(t,e){var r=this,n=Array.from(this._node.querySelectorAll("."+u)).reduce(function(t,e){return t[e.getAttribute("data-key")]=e,t},{}),i=Object.keys(this._filterKeys).map(function(t){var e=r._filterKeys[t],i=e.dim,o=e.value;return{node:n[t],key:t,dim:i,value:o,isChecked:!r._isFilteredOut(t)}}),o=i.reduce(function(t,e){return t[e.key]=e,t},{})[t],a=i.filter(function(t){return t.dim===o.dim}),c=function(t,e){e?t.classList.add(s):t.classList.remove(s)};switch(e){case"toggle":o.isChecked?(this._addFilter(t),c(o.node,!1)):(this._removeFilter(t),c(o.node,!0));break;case"focus":o.isChecked&&a.every(function(t){return t===o||!t.isChecked})?a.forEach(function(t){t.isChecked||(c(t.node,!0),r._removeFilter(t.key))}):(a.forEach(function(t){t!==o&&t.isChecked&&(c(t.node,!1),r._addFilter(t.key))}),o.isChecked||(c(o.node,!0),this._removeFilter(o.key)))}this._lastClickedScrollInfo={key:t,top:o.node.getBoundingClientRect().top-this._getScrollContainer().getBoundingClientRect().top},this._chart.refresh()},t.prototype._toggleHighlight=function(t,e){if(!this._isFilteredOut(t)){var r=this._filterKeys[t],n=r.dim,i=r.value,o=e?g(n,i):function(t){return null};this._chart.select(function(t){return!0}).forEach(function(t){return t.fire("highlight",o)})}},t.prototype._clear=function(){var t=this._node;t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype._getScrollContainer=function(){return this._node.parentElement.parentElement},t.prototype._getFilterKey=function(t,e){return t+"__"+e},t.prototype._addFilter=function(t){var e=this._filterKeys[t],r=e.dim,n=e.value,i=g(r,n);this._filters[t]=this._chart.addFilter({tag:"category-filter",predicate:function(t){return!i(t)}})},t.prototype._removeFilter=function(t){var e=this._filters[t];delete this._filters[t],this._chart.removeFilter(e)},t.prototype._getFieldLabel=function(t){return this._formatters[t]?this._formatters[t].label:t},t.prototype._getFieldFormat=function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},t}();function y(t){return new v(t)}i.a.api.plugins.add("category-filter",y)}})}); \ No newline at end of file diff --git a/dist/plugins/crosshair.css b/dist/plugins/crosshair.css new file mode 100644 index 000000000..f2608b093 --- /dev/null +++ b/dist/plugins/crosshair.css @@ -0,0 +1,224 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__layout .tau-crosshair__line { + shape-rendering: crispEdges; + stroke-dasharray: 1px 1px; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__label__text { + fill: #fff; + stroke: none; +} +.tau-chart__layout .tau-crosshair__label__text, +.tau-chart__layout .tau-crosshair__label__text-shadow { + font-size: 12px; + font-weight: normal; +} +.tau-chart__layout .tau-crosshair__line-shadow { + shape-rendering: crispEdges; + stroke: #cccccc; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { + transform: translateX(-0.5px); +} +.tau-chart__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { + transform: translateY(0.5px); +} +.tau-chart__layout .tau-crosshair__label__text-shadow { + stroke-linejoin: round; + stroke-width: 3px; + visibility: hidden; +} +.tau-chart__layout .tau-crosshair__label__box { + fill-opacity: 0.85; + rx: 3px; + ry: 3px; + stroke: none; +} +.tau-chart__layout .tau-crosshair__line.color20-1 { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { + fill: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__line.color20-2 { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { + fill: #DF2B59; +} +.tau-chart__layout .tau-crosshair__line.color20-3 { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { + fill: #66DA26; +} +.tau-chart__layout .tau-crosshair__line.color20-4 { + stroke: #4C3862; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { + stroke: #4C3862; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { + fill: #4C3862; +} +.tau-chart__layout .tau-crosshair__line.color20-5 { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { + fill: #E5B011; +} +.tau-chart__layout .tau-crosshair__line.color20-6 { + stroke: #3A3226; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { + stroke: #3A3226; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { + fill: #3A3226; +} +.tau-chart__layout .tau-crosshair__line.color20-7 { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { + fill: #CB461A; +} +.tau-chart__layout .tau-crosshair__line.color20-8 { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { + fill: #C7CE23; +} +.tau-chart__layout .tau-crosshair__line.color20-9 { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { + fill: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__line.color20-10 { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { + fill: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__line.color20-11 { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { + fill: #C84CCE; +} +.tau-chart__layout .tau-crosshair__line.color20-12 { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { + fill: #54762E; +} +.tau-chart__layout .tau-crosshair__line.color20-13 { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { + fill: #746BC9; +} +.tau-chart__layout .tau-crosshair__line.color20-14 { + stroke: #953441; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { + stroke: #953441; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { + fill: #953441; +} +.tau-chart__layout .tau-crosshair__line.color20-15 { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { + fill: #5C7A76; +} +.tau-chart__layout .tau-crosshair__line.color20-16 { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { + fill: #C8BF87; +} +.tau-chart__layout .tau-crosshair__line.color20-17 { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { + fill: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__line.color20-18 { + stroke: #8E5C31; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { + stroke: #8E5C31; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { + fill: #8E5C31; +} +.tau-chart__layout .tau-crosshair__line.color20-19 { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { + fill: #71CE7B; +} +.tau-chart__layout .tau-crosshair__line.color20-20 { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { + fill: #BE478B; +} diff --git a/dist/plugins/crosshair.dark.css b/dist/plugins/crosshair.dark.css new file mode 100644 index 000000000..4836c3bab --- /dev/null +++ b/dist/plugins/crosshair.dark.css @@ -0,0 +1,224 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__layout .tau-crosshair__line { + shape-rendering: crispEdges; + stroke-dasharray: 1px 1px; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__label__text { + fill: #000; + stroke: none; +} +.tau-chart__layout .tau-crosshair__label__text, +.tau-chart__layout .tau-crosshair__label__text-shadow { + font-size: 12px; + font-weight: normal; +} +.tau-chart__layout .tau-crosshair__line-shadow { + shape-rendering: crispEdges; + stroke: #404040; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { + transform: translateX(-0.5px); +} +.tau-chart__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { + transform: translateY(0.5px); +} +.tau-chart__layout .tau-crosshair__label__text-shadow { + stroke-linejoin: round; + stroke-width: 3px; + visibility: hidden; +} +.tau-chart__layout .tau-crosshair__label__box { + fill-opacity: 0.85; + rx: 3px; + ry: 3px; + stroke: none; +} +.tau-chart__layout .tau-crosshair__line.color20-1 { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { + fill: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__line.color20-2 { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { + fill: #DF2B59; +} +.tau-chart__layout .tau-crosshair__line.color20-3 { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { + fill: #66DA26; +} +.tau-chart__layout .tau-crosshair__line.color20-4 { + stroke: #755797; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { + stroke: #755797; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { + fill: #755797; +} +.tau-chart__layout .tau-crosshair__line.color20-5 { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { + fill: #E5B011; +} +.tau-chart__layout .tau-crosshair__line.color20-6 { + stroke: #746650; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { + stroke: #746650; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { + fill: #746650; +} +.tau-chart__layout .tau-crosshair__line.color20-7 { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { + fill: #CB461A; +} +.tau-chart__layout .tau-crosshair__line.color20-8 { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { + fill: #C7CE23; +} +.tau-chart__layout .tau-crosshair__line.color20-9 { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { + fill: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__line.color20-10 { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { + fill: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__line.color20-11 { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { + fill: #C84CCE; +} +.tau-chart__layout .tau-crosshair__line.color20-12 { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { + fill: #54762E; +} +.tau-chart__layout .tau-crosshair__line.color20-13 { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { + fill: #746BC9; +} +.tau-chart__layout .tau-crosshair__line.color20-14 { + stroke: #A43B49; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { + stroke: #A43B49; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { + fill: #A43B49; +} +.tau-chart__layout .tau-crosshair__line.color20-15 { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { + fill: #5C7A76; +} +.tau-chart__layout .tau-crosshair__line.color20-16 { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { + fill: #C8BF87; +} +.tau-chart__layout .tau-crosshair__line.color20-17 { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { + fill: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__line.color20-18 { + stroke: #AA7243; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { + stroke: #AA7243; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { + fill: #AA7243; +} +.tau-chart__layout .tau-crosshair__line.color20-19 { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { + fill: #71CE7B; +} +.tau-chart__layout .tau-crosshair__line.color20-20 { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { + fill: #BE478B; +} diff --git a/dist/plugins/crosshair.js b/dist/plugins/crosshair.js new file mode 100644 index 000000000..ef5a97672 --- /dev/null +++ b/dist/plugins/crosshair.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],e);else{var a="object"==typeof exports?e(require("taucharts"),require("d3-selection")):e(t.Taucharts,t.d3);for(var r in a)("object"==typeof exports?exports:t)[r]=a[r]}}(window,function(t,e){return function(t){var e={};function a(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=t,a.c=e,a.d=function(t,e,r){a.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},a.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=31)}({0:function(e,a){e.exports=t},1:function(t,a){t.exports=e},31:function(t,e,a){"use strict";a.r(e);var r=a(0),i=a.n(r),n=a(1),o="http://www.w3.org/2000/svg",s=i.a.api.utils,l=i.a.api.svgUtils,d=i.a.api.pluginsSDK;function c(t){t=t||{};var e=document.createElementNS(o,"g"),a=n.select(e).attr("class","tau-crosshair__label");a.append("rect").attr("class","tau-crosshair__label__box"),a.append("text").attr("class","tau-crosshair__label__text-shadow"),a.append("text").attr("class","tau-crosshair__label__text");var r={options:function(e){return t=Object.assign(t,e),r},show:function(i){return t.container.appendChild(e),function(e){var r=e.x,i=e.y,n=e.text,o=e.color,s=e.colorCls;a.attr("class","tau-crosshair__label "+s);var l=t.halign,d=t.valign,c=t.hpad,u=t.vpad,h={left:"end",middle:"middle",right:"start"}[l],f={left:-c,middle:0,right:c}[l],x=a.select(".tau-crosshair__label__text").attr("fill",o),g=a.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",h).attr("x",r+f).attr("y",0).text(n),_=x.node().getBBox(),p={top:-u-_.height/2,middle:0,bottom:u+_.height/2}[d]-_.height/2-_.y;g.attr("y",i+p);var m=_.width+2*c,b=_.height+2*u,v={left:-m,middle:-m/2,right:0}[l],y={top:-b,middle:-b/2,bottom:0}[d];a.select(".tau-crosshair__label__box").attr("fill",o).attr("rx",t.boxCornerRadius).attr("ry",t.boxCornerRadius).attr("x",r+v).attr("y",i+y).attr("width",m).attr("height",b)}(i),function(){a.attr("transform","");var r=t.chart.getLayout().contentContainer.getBoundingClientRect(),i=t.chart.getSVG().getBoundingClientRect(),n=e.getBoundingClientRect(),o=Math.max(0,Math.max(r.left,i.left)-n.left)||Math.min(0,Math.min(r.right,i.right)-n.right),s=Math.max(0,Math.max(r.top,i.top)-n.top)||Math.min(0,Math.min(r.bottom,i.bottom)-n.bottom);a.attr("transform","translate("+o+","+s+")")}(),r},hide:function(){return e.parentNode&&e.parentNode.removeChild(e),r}};return r}function u(t){var e=s.defaults(t||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22});return{init:function(t){this._chart=t,this._formatters={},this._createNode()},_createNode:function(){var t=n.select(document.createElementNS(o,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var a=function(a){var r=t.append("g").attr("class","tau-crosshair__group "+a);r.append("line").attr("class","tau-crosshair__line-shadow"),r.append("line").attr("class","tau-crosshair__line"),this._labels[a]=c({container:r.node(),chart:this._chart,halign:"x"===a?"middle":"left",valign:"x"===a?"bottom":"middle",boxCornerRadius:e.labelBoxCornerRadius,hpad:e.labelBoxHPadding,vpad:e.labelBoxVPadding})}.bind(this);e.xAxis&&a("x"),e.yAxis&&a("y"),this._element=t},_setValues:function(t,a,r){var i=function(t){var a=this._element.select(".tau-crosshair__group."+t.dir);a.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+r.cls).attr("stroke",r.color),a.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",t.startPt.x).attr("x2",t.valuePt.x).attr("y1",t.startPt.y).attr("y2",t.valuePt.y),("x"===t.dir&&e.xAxis||"y"===t.dir&&e.yAxis)&&this._labels[t.dir].options({halign:t.labelHAlign,valign:t.labelVAlign}).show({x:t.startPt.x,y:t.startPt.y,text:t.label,color:r.color,colorCls:r.cls})}.bind(this);i({dir:"x",startPt:{x:t.value,y:a.start+(t.minMode?0:e.axisVPadding)},valuePt:{x:t.value,y:a.value+a.crossPadding},label:t.label,labelHAlign:"middle",labelVAlign:"bottom"}),i({dir:"y",startPt:{x:t.start-(a.minMode?0:e.axisHPadding),y:a.value},valuePt:{x:t.value-t.crossPadding,y:a.value},label:a.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(t,e,a){var r=this._chart.getSVG(),i=e.config.options.container.node(),n=l.getDeepTransformTranslate(i);this._element.attr("transform",l.translate(n.x,n.y)),r.appendChild(this._element.node());var o=e.getScale("x"),s=e.getScale("y"),d=e.getScale("color"),c=d(t.data[d.dim]),u=t.data[o.dim],h=t.data[s.dim],f=e.screenModel.x(t.data),x=e.screenModel.y(t.data);if(e.config.stack)if(e.config.flip){var g=e.data().filter(function(a){var r=a[s.dim];return a===t.data||(r===h||r-h==0)&&(e.screenModel.x(t.data)-e.screenModel.x(a))*a[o.dim]>0});f=(u<0?Math.min:Math.max).apply(null,g.map(function(t){return e.screenModel.x(t)},0)),u=g.reduce(function(t,e){return t+e[o.dim]},0)}else{var _=e.data().filter(function(a){var r=a[o.dim];return a===t.data||(r===u||r-u==0)&&(e.screenModel.y(a)-e.screenModel.y(t.data))*a[s.dim]>0});x=(h<0?Math.max:Math.min).apply(null,_.map(function(t){return e.screenModel.y(t)},0)),h=_.reduce(function(t,e){return t+e[s.dim]},0)}var p=t.node.getBBox(),m=["ELEMENT.AREA","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED"].indexOf(e.config.type)>=0?{x:p.width*(e.config.flip?u>0?1:0:.5),y:p.height*(e.config.flip?.5:h>0?1:0)}:{x:p.width/2,y:p.height/2};this._setValues({label:this._getFormat(o.dim)(u),start:0,value:f,crossPadding:m.x,minMode:a&&a.guide.x.hide},{label:this._getFormat(s.dim)(h),start:e.config.options.height,value:x,crossPadding:m.y,minMode:a&&a.guide.y.hide},{cls:d.toColor(c)?"":c,color:d.toColor(c)?c:""})},_hideCrosshair:function(){var t=this._element.node();t.parentNode&&t.parentNode.removeChild(t)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var t=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(e){return t.indexOf(e.config.type)>=0}).forEach(function(t){t.on("data-hover",function(t,e){if(e.data){if(t===e.unit){var a=d.getParentUnit(this._chart.getSpec(),t.config);this._showCrosshair(e,t,a)}}else this._hideCrosshair()}.bind(this))},this)},_getFormat:function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},onRender:function(){this._formatters=d.getFieldFormatters(this._chart.getSpec(),e.formatters),this._subscribeToHover()}}}i.a.api.plugins.add("crosshair",u),e.default=u}})}); \ No newline at end of file diff --git a/dist/plugins/diff-tooltip.css b/dist/plugins/diff-tooltip.css new file mode 100644 index 000000000..207e1e3d0 --- /dev/null +++ b/dist/plugins/diff-tooltip.css @@ -0,0 +1,222 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.diff-tooltip__table { + border-top: 1px solid rgba(51, 51, 51, 0.2); + margin-top: 5px; + padding-top: 5px; + width: calc(100% + 15px); +} +.diff-tooltip__header { + align-items: stretch; + display: flex; + font-weight: 600; + justify-content: space-between; + padding: 2px 0px; + position: relative; +} +.diff-tooltip__header__text { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-start; + max-width: 120px; +} +.diff-tooltip__header__value { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-end; + margin-right: 15px; + max-width: 120px; + padding-left: 10px; + text-align: right; +} +.diff-tooltip__header__updown { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + font-size: 75%; + height: 100%; + justify-content: flex-start; + padding-left: 2px; + position: absolute; + right: 0; + visibility: hidden; +} +.diff-tooltip__body { + max-height: 250px; + overflow: hidden; + padding: 1px; + position: relative; +} +.diff-tooltip__body__content { + padding-bottom: 1px; +} +.diff-tooltip__body_overflow-top::before, +.diff-tooltip__body_overflow-bottom::after { + align-items: center; + color: rgba(51, 51, 51, 0.7); + content: "..."; + display: flex; + flex-direction: column; + height: 26px; + left: 0; + position: absolute; + width: 100%; + z-index: 2; +} +.diff-tooltip__body_overflow-top::before { + background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0)); + justify-content: flex-start; + top: 0; +} +.diff-tooltip__body_overflow-bottom::after { + background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0)); + justify-content: flex-end; + bottom: 0; +} +.diff-tooltip__item { + display: flex; + justify-content: space-between; + margin-right: 15px; + min-width: 100px; + position: relative; +} +.diff-tooltip__item_highlighted { + background-color: rgba(241, 233, 255, 0.5); + box-shadow: 0 0 0 1px #877aa1; + z-index: 1; +} +.diff-tooltip__item__bg { + align-items: center; + display: inline-flex; + height: 100%; + justify-content: center; + min-width: 3px; + opacity: 0.6; + position: absolute; + z-index: 0; +} +.diff-tooltip__item__text { + flex: 1 1 auto; + overflow: hidden; + padding: 2px 4px; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + z-index: 1; +} +.diff-tooltip__item__value { + flex: none; + display: table-cell; + padding: 2px 4px 2px 30px; + z-index: 1; +} +.diff-tooltip__item__updown { + align-items: center; + display: inline-flex; + flex: 4; + justify-content: flex-start; + left: 100%; + height: 100%; + padding: 0 4px 0 4px; + position: absolute; +} +.diff-tooltip__item__updown_positive { + color: #4ca383; +} +.diff-tooltip__item__updown_negative { + color: #df6772; +} +.diff-tooltip__field__updown_positive { + color: #4ca383; +} +.diff-tooltip__field__updown_negative { + color: #df6772; +} +.interval-highlight__range { + shape-rendering: crispEdges; +} +.interval-highlight__range-start { + shape-rendering: crispEdges; + stroke: #b8aecb; + stroke-dasharray: 2 1; +} +.interval-highlight__range-end { + shape-rendering: crispEdges; + stroke: #b8aecb; +} +.interval-highlight__gradient-start { + stop-color: #c4b3e6; + stop-opacity: 0.02; +} +.interval-highlight__gradient-end { + stop-color: #c4b3e6; + stop-opacity: 0.2; +} +.diff-tooltip__item__bg.color20-1 { + background-color: #6FA1D9; +} +.diff-tooltip__item__bg.color20-2 { + background-color: #DF2B59; +} +.diff-tooltip__item__bg.color20-3 { + background-color: #66DA26; +} +.diff-tooltip__item__bg.color20-4 { + background-color: #4C3862; +} +.diff-tooltip__item__bg.color20-5 { + background-color: #E5B011; +} +.diff-tooltip__item__bg.color20-6 { + background-color: #3A3226; +} +.diff-tooltip__item__bg.color20-7 { + background-color: #CB461A; +} +.diff-tooltip__item__bg.color20-8 { + background-color: #C7CE23; +} +.diff-tooltip__item__bg.color20-9 { + background-color: #7FCDC2; +} +.diff-tooltip__item__bg.color20-10 { + background-color: #CCA1C8; +} +.diff-tooltip__item__bg.color20-11 { + background-color: #C84CCE; +} +.diff-tooltip__item__bg.color20-12 { + background-color: #54762E; +} +.diff-tooltip__item__bg.color20-13 { + background-color: #746BC9; +} +.diff-tooltip__item__bg.color20-14 { + background-color: #953441; +} +.diff-tooltip__item__bg.color20-15 { + background-color: #5C7A76; +} +.diff-tooltip__item__bg.color20-16 { + background-color: #C8BF87; +} +.diff-tooltip__item__bg.color20-17 { + background-color: #BFC1C3; +} +.diff-tooltip__item__bg.color20-18 { + background-color: #8E5C31; +} +.diff-tooltip__item__bg.color20-19 { + background-color: #71CE7B; +} +.diff-tooltip__item__bg.color20-20 { + background-color: #BE478B; +} diff --git a/dist/plugins/diff-tooltip.dark.css b/dist/plugins/diff-tooltip.dark.css new file mode 100644 index 000000000..796ba8642 --- /dev/null +++ b/dist/plugins/diff-tooltip.dark.css @@ -0,0 +1,222 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.diff-tooltip__table { + border-top: 1px solid rgba(255, 255, 255, 0.2); + margin-top: 5px; + padding-top: 5px; + width: calc(100% + 15px); +} +.diff-tooltip__header { + align-items: stretch; + display: flex; + font-weight: 600; + justify-content: space-between; + padding: 2px 0px; + position: relative; +} +.diff-tooltip__header__text { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-start; + max-width: 120px; +} +.diff-tooltip__header__value { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-end; + margin-right: 15px; + max-width: 120px; + padding-left: 10px; + text-align: right; +} +.diff-tooltip__header__updown { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + font-size: 75%; + height: 100%; + justify-content: flex-start; + padding-left: 2px; + position: absolute; + right: 0; + visibility: hidden; +} +.diff-tooltip__body { + max-height: 250px; + overflow: hidden; + padding: 1px; + position: relative; +} +.diff-tooltip__body__content { + padding-bottom: 1px; +} +.diff-tooltip__body_overflow-top::before, +.diff-tooltip__body_overflow-bottom::after { + align-items: center; + color: rgba(255, 255, 255, 0.7); + content: "..."; + display: flex; + flex-direction: column; + height: 26px; + left: 0; + position: absolute; + width: 100%; + z-index: 2; +} +.diff-tooltip__body_overflow-top::before { + background: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0)); + justify-content: flex-start; + top: 0; +} +.diff-tooltip__body_overflow-bottom::after { + background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); + justify-content: flex-end; + bottom: 0; +} +.diff-tooltip__item { + display: flex; + justify-content: space-between; + margin-right: 15px; + min-width: 100px; + position: relative; +} +.diff-tooltip__item_highlighted { + background-color: rgba(241, 233, 255, 0.5); + box-shadow: 0 0 0 1px #877aa1; + z-index: 1; +} +.diff-tooltip__item__bg { + align-items: center; + display: inline-flex; + height: 100%; + justify-content: center; + min-width: 3px; + opacity: 0.6; + position: absolute; + z-index: 0; +} +.diff-tooltip__item__text { + flex: 1 1 auto; + overflow: hidden; + padding: 2px 4px; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + z-index: 1; +} +.diff-tooltip__item__value { + flex: none; + display: table-cell; + padding: 2px 4px 2px 30px; + z-index: 1; +} +.diff-tooltip__item__updown { + align-items: center; + display: inline-flex; + flex: 4; + justify-content: flex-start; + left: 100%; + height: 100%; + padding: 0 4px 0 4px; + position: absolute; +} +.diff-tooltip__item__updown_positive { + color: #4ca383; +} +.diff-tooltip__item__updown_negative { + color: #df6772; +} +.diff-tooltip__field__updown_positive { + color: #4ca383; +} +.diff-tooltip__field__updown_negative { + color: #df6772; +} +.interval-highlight__range { + shape-rendering: crispEdges; +} +.interval-highlight__range-start { + shape-rendering: crispEdges; + stroke: #b8aecb; + stroke-dasharray: 2 1; +} +.interval-highlight__range-end { + shape-rendering: crispEdges; + stroke: #b8aecb; +} +.interval-highlight__gradient-start { + stop-color: #c4b3e6; + stop-opacity: 0.02; +} +.interval-highlight__gradient-end { + stop-color: #c4b3e6; + stop-opacity: 0.2; +} +.diff-tooltip__item__bg.color20-1 { + background-color: #6FA1D9; +} +.diff-tooltip__item__bg.color20-2 { + background-color: #DF2B59; +} +.diff-tooltip__item__bg.color20-3 { + background-color: #66DA26; +} +.diff-tooltip__item__bg.color20-4 { + background-color: #755797; +} +.diff-tooltip__item__bg.color20-5 { + background-color: #E5B011; +} +.diff-tooltip__item__bg.color20-6 { + background-color: #746650; +} +.diff-tooltip__item__bg.color20-7 { + background-color: #CB461A; +} +.diff-tooltip__item__bg.color20-8 { + background-color: #C7CE23; +} +.diff-tooltip__item__bg.color20-9 { + background-color: #7FCDC2; +} +.diff-tooltip__item__bg.color20-10 { + background-color: #CCA1C8; +} +.diff-tooltip__item__bg.color20-11 { + background-color: #C84CCE; +} +.diff-tooltip__item__bg.color20-12 { + background-color: #54762E; +} +.diff-tooltip__item__bg.color20-13 { + background-color: #746BC9; +} +.diff-tooltip__item__bg.color20-14 { + background-color: #A43B49; +} +.diff-tooltip__item__bg.color20-15 { + background-color: #5C7A76; +} +.diff-tooltip__item__bg.color20-16 { + background-color: #C8BF87; +} +.diff-tooltip__item__bg.color20-17 { + background-color: #BFC1C3; +} +.diff-tooltip__item__bg.color20-18 { + background-color: #AA7243; +} +.diff-tooltip__item__bg.color20-19 { + background-color: #71CE7B; +} +.diff-tooltip__item__bg.color20-20 { + background-color: #BE478B; +} diff --git a/dist/plugins/diff-tooltip.js b/dist/plugins/diff-tooltip.js new file mode 100644 index 000000000..261e24f9d --- /dev/null +++ b/dist/plugins/diff-tooltip.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],e);else{var i="object"==typeof exports?e(require("taucharts"),require("d3-selection")):e(t.Taucharts,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=13)}([function(e,i){e.exports=t},function(t,i){t.exports=e},function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return r});var n="tau-chart__tooltip";function r(t,e){return{render:function(t){return this.args=t,t=Object.assign({},t,{fields:this.filterFields(t.fields)}),this.rootTemplate(t)},rootTemplate:function(t){return['
',this.buttonsTemplate(),"
",'
',this.contentTemplate(t),"
"].join("\n")},contentTemplate:function(t){return this.fieldsTemplate(t)},filterFields:function(e){return e.filter(function(e){var i=e.split(".");return!(2===i.length&&t.skipInfo[i[0]])})},getLabel:function(e){return t.getFieldLabel(e)},getFormatter:function(e){return t.getFieldFormat(e)},fieldsTemplate:function(t){var e=this,i=t.data;return t.fields.map(function(t){return e.itemTemplate({data:i,field:t})}).join("\n")},itemTemplate:function(t){var e=t.data,i=t.field,r=this.getLabel(i),o=this.getFormatter(i)(e[i]);return['
','
'+r+"
",'
'+o+"
","
"].join("\n")},buttonsTemplate:function(){return[this.buttonTemplate({cls:"i-role-exclude",text:"Exclude",icon:function(){return''}})].join("\n")},buttonTemplate:function(t){var e=t.icon,i=t.text,r=t.cls;return['
','
'," "+(e?e()+" ":"")+i,"
","
"].join("\n")},didMount:function(){var e=t.getDomNode().querySelector(".i-role-exclude");e&&e.addEventListener("click",function(){t.excludeHighlightedElement(),t.setState({highlight:null,isStuck:!1})})}}}},,function(t,e,i){"use strict";var n=i(0),r=i.n(n),o=i(1),a=i(2),s=r.a.api.utils,l=r.a.api.domUtils,c=r.a.api.pluginsSDK,u="tau-chart__tooltip",h=function(){function t(t){this.settings=s.defaults(t||{},{align:"bottom-right",clickable:!0,clsClickable:u+"__clickable",clsStuck:"stuck",clsTarget:u+"-target",escapeHtml:!0,fields:null,formatters:{},getTemplate:null,spacing:24,winBound:12}),this.onRender=this._getRenderHandler()}return t.prototype.init=function(t){this._chart=t,this._tooltip=this._chart.addBalloon({spacing:this.settings.spacing,winBound:this.settings.winBound,auto:!0,effectClass:"fade"}),this._initDomEvents(),this.state={highlight:null,isStuck:!1},this.setState(this.state),this._template=this._getTemplate()},t.prototype._getTemplate=function(){var t=Object(a.b)(this,this.settings);return"function"==typeof this.settings.getTemplate?this.settings.getTemplate(t,this,this.settings):t},t.prototype._renderTemplate=function(t,e){return this._template.render({data:t,fields:e})},t.prototype._initDomEvents=function(){var t=this;this._scrollHandler=function(){t.setState({highlight:null,isStuck:!1})},window.addEventListener("scroll",this._scrollHandler,!0),this.settings.clickable&&(this._outerClickHandler=function(e){var i=Array.from(document.querySelectorAll("."+t.settings.clsClickable)).concat(t.getDomNode()).map(function(t){return t.getBoundingClientRect()}),n=Math.min.apply(Math,i.map(function(t){return t.top})),r=Math.min.apply(Math,i.map(function(t){return t.left})),o=Math.max.apply(Math,i.map(function(t){return t.right})),a=Math.max.apply(Math,i.map(function(t){return t.bottom}));(e.clientXo||e.clientYa)&&t.setState({highlight:null,isStuck:!1})})},t.prototype.getDomNode=function(){return this._tooltip.getElement()},t.prototype.setState=function(t){var e=this,i=this.settings,n=this.state,r=this.state=Object.assign({},n,t);n.highlight=n.highlight||{data:null,cursor:null,unit:null},r.highlight=r.highlight||{data:null,cursor:null,unit:null},r.isStuck&&n.highlight.data&&(r.highlight=n.highlight),r.highlight.data!==n.highlight.data&&(r.highlight.data?(this._hideTooltip(),this._showTooltip(r.highlight.data,r.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){e._setTargetSvgClass(!0)})):r.isStuck||!n.highlight.data||r.highlight.data||(this._removeFocus(),this._hideTooltip(),this._setTargetSvgClass(!1))),!r.highlight.data||n.highlight.cursor&&r.highlight.cursor.x===n.highlight.cursor.x&&r.highlight.cursor.y===n.highlight.cursor.y||(this._tooltip.position(r.highlight.cursor.x,r.highlight.cursor.y),this._tooltip.updateSize());var o=this.getDomNode();this.settings.clickable&&r.isStuck!==n.isStuck&&(r.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),o.classList.add(i.clsStuck),this._setTargetEventsEnabled(!1),this._accentFocus(r.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),o.classList.remove(i.clsStuck),requestAnimationFrame(function(){e._setTargetEventsEnabled(!0);var t=e._chart.getSVG();t&&l.dispatchMouseEvent(t,"mouseleave")})))},t.prototype._showTooltip=function(t,e){var i=this.settings,n=i.fields||"function"==typeof i.getFields&&i.getFields(this._chart)||Object.keys(t),r=this._renderTemplate(t,n);this._tooltip.content(r).position(e.x,e.y).place(i.align).show().updateSize(),this._template.didMount&&this._template.didMount()},t.prototype._hideTooltip=function(){window.removeEventListener("click",this._outerClickHandler,!0),this._template.willUnmount&&this._template.willUnmount(),this._tooltip.hide()},t.prototype.destroy=function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},t.prototype._subscribeToHover=function(){var t=this,e=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(t){return e.indexOf(t.config.type)>=0}).forEach(function(e){e.on("data-hover",function(e,i){var n=document.body.getBoundingClientRect();t.setState({highlight:i.data?{data:i.data,cursor:{x:i.event.clientX-n.left,y:i.event.clientY-n.top},unit:i.unit}:null})}),t.settings.clickable&&e.on("data-click",function(e,i){var n=document.body.getBoundingClientRect();t.setState(i.data?{highlight:{data:i.data,cursor:{x:i.event.clientX-n.left,y:i.event.clientY-n.top},unit:i.unit},isStuck:!0}:{highlight:null,isStuck:null})})})},t.prototype.getFieldFormat=function(t){var e=this._formatters[t]?this._formatters[t].format:function(t){return String(t)};return this.settings.escapeHtml?function(t){return s.escapeHtml(e(t))}:e},t.prototype.getFieldLabel=function(t){var e=this._formatters[t]?this._formatters[t].label:t;return this.settings.escapeHtml?s.escapeHtml(e):e},t.prototype._accentFocus=function(t){var e=function(e){return e===t};this._chart.select(function(){return!0}).forEach(function(t){t.fire("highlight",e)})},t.prototype._removeFocus=function(){var t=function(){return null};this._chart.select(function(){return!0}).forEach(function(e){e.fire("highlight",t),e.fire("highlight-data-points",t)})},t.prototype.excludeHighlightedElement=function(){var t=this.state.highlight.data;this._chart.addFilter({tag:"exclude",predicate:function(e){return e!==t}}),this._chart.refresh()},t.prototype._getRenderHandler=function(){return function(){this._formatters=c.getFieldFormatters(this._chart.getSpec(),this.settings.formatters),this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})}},t.prototype._setTargetSvgClass=function(t){o.select(this._chart.getSVG()).classed(this.settings.clsTarget,t)},t.prototype._setTargetEventsEnabled=function(t){t?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},t}();e.a=h},,,,,,,,,function(t,e,i){"use strict";i.r(e);var n=i(0),r=i.n(n),o=i(4),a=i(2),s="diff-tooltip",l=s+"__item",c=s+"__header";var u,h=i(1),d=r.a.api.utils,p={draw:function(){var t=this.node().config;this._container=t.options.slot(t.uid)},addInteraction:function(){var t=this;this.node().on("interval-highlight",function(e,i){t._drawRange(i)})},_drawRange:function(t){var e,i=this.node(),n=i.config,r=i.screenModel.flip,o=this._container,a="interval-highlight",s=a+"__gradient",l=t?t[0]:null,c=t?t[1]:null,u=r?n.options.width:n.options.height;d.take((e=o.selectAll("."+a).data(t?[1]:[]),e.exit().remove(),{g:e,gEnter:e.enter().append("g").attr("class",a).attr("pointer-events","none")})).then(function(e){var i,d,p,g,f,_,m,v,y,b,T;!function(){for(var e=a+"__defs",i=a+"__gradient-start",l=a+"__gradient-end",c=o.node();"svg"!==(c=c.parentNode).tagName;);var u=e+"__"+n.uid,d=h.select(c).selectAll("#"+u).data(t?[1]:[]);d.exit().remove();var p=d.enter().append("defs").attr("class",e).attr("id",u).append("linearGradient").attr("id",s).attr("x1","0%").attr("y1",r?"100%":"0%").attr("x2",r?"0%":"100%").attr("y2","0%");p.append("stop").attr("class",i).attr("offset","0%"),p.append("stop").attr("class",l).attr("offset","100%")}(),d=(i=e).g,p=i.gEnter,g=a+"__range",f=d.select("."+g),_=p.append("rect").attr("class",g).attr("fill","url(#"+s+")"),v=(m=r?{x:0,y:c,width:u,height:l-c}:{x:l,y:0,width:c-l,height:u}).x,y=m.y,b=m.width,T=m.height,_.merge(f).attr("x",v).attr("y",y).attr("width",Math.abs(b)).attr("height",Math.abs(T)),function(t){var e=t.g,i=t.gEnter,n=a+"__range-start",o=e.select("."+n),s=i.append("line").attr("class",n),c=r?{x1:0,y1:l,x2:u,y2:l}:{x1:l,y1:0,x2:l,y2:u},h=c.x1,d=c.y1,p=c.x2,g=c.y2;s.merge(o).attr("x1",h).attr("y1",d).attr("x2",p).attr("y2",g)}(e),function(t){var e=t.g,i=t.gEnter,n=a+"__range-end",o=e.select("."+n),s=i.append("line").attr("class",n),l=r?{x1:0,y1:c,x2:u,y2:c}:{x1:c,y1:0,x2:c,y2:u},h=l.x1,d=l.y1,p=l.x2,g=l.y2;s.merge(o).attr("x1",h).attr("y1",d).attr("x2",p).attr("y2",g)}(e)})}},g=(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,e){function i(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),f=r.a.api.utils,_=function(t){function e(e){var i=t.call(this,e)||this;return i.onSpecReady=i._getSpecReadyHandler(),i}return g(e,t),e.prototype.init=function(e){t.prototype.init.call(this,e),this._unitsGroupedData=new Map},e.prototype._getTemplate=function(){var t,e,i,n=(t=this,e=this.settings,i=Object(a.b)(t,e),Object.assign({},i,{hasColor:function(){return null!=this.args.colorField},contentTemplate:function(t){return[this.fieldsTemplate(t),this.tableTemplate(t)].join("\n")},filterFields:function(e){var n=t.state.highlight.unit.screenModel.model,r=n.scaleColor,o=n.scaleX,a=n.scaleY,s=e.filter(function(t){return t!==r.dim&&t!==o.dim&&t!==a.dim}),l=function(){return s.push(o.dim)};return this.shouldShowColorTable()?l():(l(),r.dim&&s.push(r.dim),s.push(a.dim)),i.filterFields.call(this,s)},itemTemplate:function(t){var e=t.data,i=t.field,n=this.getLabel(i),r=this.getFormatter(i)(e[i]),o=this.args.prev,s=(this.args.valueField,this.shouldShowDiff(i)),c=['',""+r,s?" "+this.fieldUpdownTemplate(this.getDiff({data:e,prev:o,field:i})):"",""].join("");return['
','
'+n+"
"," "+c,"
"].join("\n")},shouldShowDiff:function(t){return t===this.args.valueField},getDiff:function(t){var e=t.data,i=t.prev,n=t.field,r=this.getFormatter(n),o=(e?e[n]:0)-(i?i[n]:0);return{diff:r(o),sign:Math.sign(o)}},fieldUpdownTemplate:function(t){var e=t.diff,i=t.sign,n=s+"__field__updown";return['0?"positive":"negative")+'">',(i>0?"▲":i<0?"▼":"")+(0===i?"":e),""].join("")},shouldShowColorTable:function(){var t=this.args.groups;return this.hasColor()&&t.length>1},tableTemplate:function(t){return this.shouldShowColorTable()?['
',this.tableHeaderTemplate(t),this.tableBodyTemplate(t),"
"].join("\n"):""},tableHeaderTemplate:function(t){var e=t.colorField,i=t.valueField,n=this.getLabel(e),r=this.getLabel(i);return['
',' '+n+"",' '+r+"",' ▼▲',"
"].join("\n")},tableBodyTemplate:function(t){var e=this,i=t.data,n=t.groups,r=t.valueField,o=t.colorField,a=i,l=n.map(function(t){var e=t.data;return e?e[r]:0}),c=Math.min.apply(Math,l),u=Math.max.apply(Math,l);return['
','
',n.map(function(t){var i=t.data,n=t.prev;return e.tableRowTemplate({data:i,prev:n,highlighted:a,valueField:r,colorField:o,min:c,max:u})}).join("\n"),"
","
"].join("\n")},tableRowTemplate:function(t){var e=t.data,i=t.prev,n=t.highlighted,r=t.valueField,o=t.colorField,a=t.min,s=t.max,c=e?e[r]:0,u=this.getFormatter(o)((e||i)[o]),h=this.getFormatter(r)(c),d=e===n,p=this.getDiff({data:e,prev:i,field:r}),g=p.diff,f=p.sign,_=this.getColor(e||i),m=_.color,v=_.colorCls;return['
'," "+this.valueBarTemplate({min:a,max:s,v:c,color:m,colorCls:v}),' '+u+"",' '+h+""," "+this.updownTemplate({diff:g,sign:f}),"
"].join("\n")},valueBarTemplate:function(t){var e=t.min,i=t.max,n=t.v,r=t.color,o=t.colorCls;e=Math.min(e,0);var a=(i=Math.max(0,i))-e;return[""].join("\n")},getColor:function(e){var i=t.state.highlight.unit.screenModel;return{color:i.color(e),colorCls:i.class(e)}},updownTemplate:function(t){var e=t.diff,i=t.sign,n=l+"__updown";return['0?"positive":"negative")+'">',(i>0?"▲":i<0?"▼":"")+(0===i?"":e),""].join("")},didMount:function(){i.didMount.call(this),this._scrollToHighlighted(),this._reserveSpaceForUpdown()},_scrollToHighlighted:function(){var e=t.getDomNode(),i=e.querySelector("."+s+"__body"),n=e.querySelector("."+s+"__body__content"),r=e.querySelector("."+l+"_highlighted");if(i&&n&&r){var o=i.getBoundingClientRect(),a=n.getBoundingClientRect(),c=r.getBoundingClientRect(),u=0;if(c.bottom>o.bottom){var h=c.bottom-o.bottom+c.height,d=a.bottom-o.bottom;u=-Math.min(h,d),n.style.transform="translateY("+u+"px)"}a.top+uo.bottom&&i.classList.add(s+"__body_overflow-bottom")}},_reserveSpaceForUpdown:function(){var e=t.getDomNode(),i=e.querySelector("."+s+"__body"),n=e.querySelector("."+c);if(i&&n){var r="."+l+"__updown:not(:empty)",o=Array.from(e.querySelectorAll(r)).map(function(t){return t.scrollWidth}),a=Math.max.apply(Math,o),u=Math.max(0,Math.ceil(a-15));i.style.paddingRight=u+"px",n.style.paddingRight=u+"px"}}}));return"function"==typeof this.settings.getTemplate?this.settings.getTemplate(n,this,this.settings):n},e.prototype._renderTemplate=function(t,e){var i,n=this.state.highlight.unit,r=n.screenModel,o=r.model,a=o.scaleColor,s=(o.scaleX,o.scaleY),l=this._unitsGroupedData.get(n),c=this._getHighlightRange(t,n),u=c[0],h=c[1],d=function(t){var e=r.model.color(t);return isFinite(u)&&l[u][e]?l[u][e][0]:null},p=d(t),g=n.config.stack,f=!(!n.config.flip&&n.config.guide.obsoleteVerticalStackOrder&&n.config.stack),_=(i=a.domain().slice().reduce(function(t,e,i){return t[e]=i,t},{}),f?function(t,e){return i[t[a.dim]]-i[e[a.dim]]}:function(t,e){return i[e[a.dim]]-i[t[a.dim]]}),m=f?function(t,e){return s(t[s.dim])-s(e[s.dim])}:function(t,e){return s(e[s.dim])-s(t[s.dim])},v=function(t){return Object.keys(l[t]).reduce(function(e,i){return e.concat(l[t][i])},[]).sort(g?_:m)},y=v(h).map(function(t){r.model.color(t);return{data:t,prev:d(t)}});if(isFinite(u)){var b=v(u),T=y.reduce(function(t,e){return t[r.model.color(e.data)]=!0,t},{});b.forEach(function(t){var e=r.model.color(t);T[e]||y.push({data:null,prev:t})}),g&&y.sort(function(t,e){return _(t.data||t.prev,e.data||e.prev)})}return this._template.render({data:t,prev:p,fields:e,groups:y,valueField:s.dim,colorField:a.dim})},e.prototype._getRenderHandler=function(){var e=t.prototype._getRenderHandler.call(this);return function(){var t=this;e.call(this);var i=this._chart,n=i.select(function(t){return"chart"===t.config.namespace&&0===t.config.type.indexOf("ELEMENT.")&&"ELEMENT.INTERVAL_HIGHLIGHT"!==t.config.type}),r=i.select(function(t){return"ELEMENT.INTERVAL_HIGHLIGHT"===t.config.type}).reduce(function(t,e,i){return t[i]=e,t},{});n.forEach(function(e,i){var n=e.data();t._unitsGroupedData.set(e,t._getGroupedData(n,e)),e.on("data-hover",function(n,o){var a=r[i],s=o.unit&&o.unit===e?t._getHighlightRange(o.data,o.unit):null;a.fire("interval-highlight",s)})})}},e.prototype._getSpecReadyHandler=function(){return function(t,e){t.traverseSpec(e,function(t,e){if(0===t.type.indexOf("ELEMENT.")){var i=JSON.parse(JSON.stringify(t));i.type="ELEMENT.INTERVAL_HIGHLIGHT",i.namespace="highlight";var n=e.units.indexOf(t);e.units.splice(n,0,i)}})}},e.prototype._getGroupedData=function(t,e){var i=e.screenModel.model.scaleX,n=f.groupBy(t,function(t){return i(t[i.dim]).toString()}),o=e.config.guide.x.tickPeriod||e.config.guide.x.timeInterval;if(o){var a=i.domain(),s=e.config.guide.utcTime;r.a.api.tickPeriod.generate(a[0],a[1],o,{utc:s}).filter(function(t){return t>=a[0]&&t<=a[1]}).forEach(function(t){var e=i(t);n[e]||(n[e]=[])})}return Object.keys(n).reduce(function(t,i){return t[i]=f.groupBy(n[i],function(t){return e.screenModel.model.color(t)}),t},{})},e.prototype._getHighlightRange=function(t,e){var i=e.screenModel.flip,n=e.screenModel.model.scaleX,r=n(t[n.dim]),o=this._unitsGroupedData.get(e),a=Object.keys(o).map(Number).sort(i?function(t,e){return e-t}:function(t,e){return t-e}),s=a.indexOf(r);return 0===s?[r,r]:[a[s-1],r]},e}(o.a);function m(t){return new _(t)}r.a.api.unitsRegistry.reg("ELEMENT.INTERVAL_HIGHLIGHT",p,"ELEMENT.GENERIC.CARTESIAN"),r.a.api.plugins.add("diff-tooltip",m);e.default=m}])}); \ No newline at end of file diff --git a/build/development/plugins/tauCharts.export.css b/dist/plugins/export-to.css similarity index 76% rename from build/development/plugins/tauCharts.export.css rename to dist/plugins/export-to.css index 986f50287..b31b62902 100644 --- a/build/development/plugins/tauCharts.export.css +++ b/dist/plugins/export-to.css @@ -1,13 +1,15 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__print-block { +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__print-block { display: none; } -.graphical-report__export { +.tau-chart__export { float: right; margin: 0 20px 0 0; display: block; @@ -24,28 +26,28 @@ position: relative; z-index: 2; } -.graphical-report__export:hover { +.tau-chart__export:hover { opacity: 1; text-decoration: none; } -.graphical-report__export__list { +.tau-chart__export__list { font-size: 11px; margin: 0; padding: 0; } -.graphical-report__export__item { +.tau-chart__export__item { overflow: hidden; box-sizing: border-box; } -.graphical-report__export__item > a { +.tau-chart__export__item > a { display: block; padding: 7px 15px; color: inherit; text-decoration: none; cursor: pointer; } -.graphical-report__export__item > a:hover, -.graphical-report__export__item > a:focus { +.tau-chart__export__item > a:hover, +.tau-chart__export__item > a:focus { background: #EAF2FC; outline: none; box-shadow: none; diff --git a/build/development/plugins/tauCharts.export.dark.css b/dist/plugins/export-to.dark.css similarity index 76% rename from build/development/plugins/tauCharts.export.dark.css rename to dist/plugins/export-to.dark.css index 986f50287..b31b62902 100644 --- a/build/development/plugins/tauCharts.export.dark.css +++ b/dist/plugins/export-to.dark.css @@ -1,13 +1,15 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__print-block { +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__print-block { display: none; } -.graphical-report__export { +.tau-chart__export { float: right; margin: 0 20px 0 0; display: block; @@ -24,28 +26,28 @@ position: relative; z-index: 2; } -.graphical-report__export:hover { +.tau-chart__export:hover { opacity: 1; text-decoration: none; } -.graphical-report__export__list { +.tau-chart__export__list { font-size: 11px; margin: 0; padding: 0; } -.graphical-report__export__item { +.tau-chart__export__item { overflow: hidden; box-sizing: border-box; } -.graphical-report__export__item > a { +.tau-chart__export__item > a { display: block; padding: 7px 15px; color: inherit; text-decoration: none; cursor: pointer; } -.graphical-report__export__item > a:hover, -.graphical-report__export__item > a:focus { +.tau-chart__export__item > a:hover, +.tau-chart__export__item > a:focus { background: #EAF2FC; outline: none; box-shadow: none; diff --git a/dist/plugins/export-to.js b/dist/plugins/export-to.js new file mode 100644 index 000000000..8a3bed930 --- /dev/null +++ b/dist/plugins/export-to.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],e);else{var i="object"==typeof exports?e(require("taucharts"),require("d3-selection")):e(t.Taucharts,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=30)}([function(e,i){e.exports=t},function(t,i){t.exports=e},,,,,,,,function(t,e,i){(t.exports=i(25)(!1)).push([t.i,"body > * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.tau-chart__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block !important;\n width: 100%;\n /*height: 100%;*/\n}\n",""])},function(t,e,i){var n,r=r||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},i=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),n="download"in i,r=/constructor/i.test(t.HTMLElement)||t.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),s=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},o=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},l=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},h=function(h,u,c){c||(h=l(h));var f,d=this,p="application/octet-stream"===h.type,m=function(){!function(t,e,i){for(var n=(e=[].concat(e)).length;n--;){var r=t["on"+e[n]];if("function"==typeof r)try{r.call(t,i||t)}catch(t){s(t)}}}(d,"writestart progress write writeend".split(" "))};if(d.readyState=d.INIT,n)return f=e().createObjectURL(h),void setTimeout(function(){var t,e;i.href=f,i.download=u,t=i,e=new MouseEvent("click"),t.dispatchEvent(e),m(),o(f),d.readyState=d.DONE});!function(){if((a||p&&r)&&t.FileReader){var i=new FileReader;return i.onloadend=function(){var e=a?i.result:i.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,d.readyState=d.DONE,m()},i.readAsDataURL(h),void(d.readyState=d.INIT)}f||(f=e().createObjectURL(h)),p?t.location.href=f:t.open(f,"_blank")||(t.location.href=f);d.readyState=d.DONE,m(),o(f)}()},u=h.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,i){return e=e||t.name||"download",i||(t=l(t)),navigator.msSaveOrOpenBlob(t,e)}:(u.abort=function(){},u.readyState=u.INIT=0,u.WRITING=1,u.DONE=2,u.error=u.onwritestart=u.onprogress=u.onwrite=u.onabort=u.onerror=u.onwriteend=null,function(t,e,i){return new h(t,e||t.name||"download",i)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports?t.exports.saveAs=r:null!==i(27)&&null!==i(26)&&(void 0===(n=function(){return r}.call(e,i,e,t))||(t.exports=n))},function(t,e,n){var r,a,s;!function(i,o){"use strict";a=[n(29),n(28)],void 0===(s="function"==typeof(r=o)?r.apply(e,a):r)||(t.exports=s),i.canvg=o(i.RGBColor,i.stackBlur)}("undefined"!=typeof window?window:this,function(t,e){var n,r=function(t,e,i){if(null!=t||null!=e||null!=i){"string"==typeof t&&(t=document.getElementById(t)),null!=t.svg&&t.svg.stop();var n=d(i||{});1==t.childNodes.length&&"OBJECT"==t.childNodes[0].nodeName||(t.svg=n);var a=t.getContext("2d");void 0!==e.documentElement?n.loadXmlDoc(a,e):"<"==e.substr(0,1)?n.loadXml(a,e):n.load(a,e)}else for(var s=document.querySelectorAll("svg"),o=0;o~\.\[:]+)/g,o=/(\.[^\s\+>~\.\[:]+)/g,l=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,h=/(:[\w-]+\([^\)]*\))/gi,u=/(:[^\s\+>~\.\[:]+)/g,c=/([^\s\+>~\.\[:]+)/g;function f(t){var e=[0,0,0],i=function(i,n){var r=t.match(i);null!=r&&(e[n]+=r.length,t=t.replace(i," "))};return t=(t=t.replace(/:not\(([^\)]*)\)/g," $1 ")).replace(/{[^]*/gm," "),i(a,1),i(s,0),i(o,1),i(l,2),i(h,1),i(u,1),t=(t=t.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),i(c,2),e.join("")}function d(r){var a={opts:r,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,log:function(t){}};1==a.opts.log&&"undefined"!=typeof console&&(a.log=function(t){console.log(t)}),a.init=function(t){var e=0;a.UniqueId=function(){return"canvg"+ ++e},a.Definitions={},a.Styles={},a.StylesSpecificity={},a.Animations=[],a.Images=[],a.ctx=t,a.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},a.init(),a.ImagesLoaded=function(){for(var t=0;t]*>/,""),(e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t),e)},a.Property=function(t,e){this.name=t,this.value=e},a.Property.prototype.getValue=function(){return this.value},a.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},a.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},a.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},a.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},a.Property.prototype.addOpacity=function(e){var i=this.value;if(null!=e.value&&""!=e.value&&"string"==typeof this.value){var n=new t(this.value);n.ok&&(i="rgba("+n.r+", "+n.g+", "+n.b+", "+e.numValue()+")")}return new a.Property(this.name,i)},a.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),a.Definitions[t]},a.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},a.Property.prototype.getFillStyleDefinition=function(t,e){var i=this.getDefinition();if(null!=i&&i.createGradient)return i.createGradient(a.ctx,t,e);if(null!=i&&i.createPattern){if(i.getHrefAttribute().hasValue()){var n=i.attribute("patternTransform");i=i.getHrefAttribute().getDefinition(),n.hasValue()&&(i.attribute("patternTransform",!0).value=n.value)}return i.createPattern(a.ctx,t)}return null},a.Property.prototype.getDPI=function(t){return 96},a.Property.prototype.getEM=function(t){var e=12,i=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);return i.hasValue()&&(e=i.toPixels(t)),e},a.Property.prototype.getUnits=function(){return(this.value+"").replace(/[0-9\.\-]/g,"")},a.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var i=this.value+"";if(i.match(/em$/))return this.numValue()*this.getEM(t);if(i.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(i.match(/px$/))return this.numValue();if(i.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(i.match(/pc$/))return 15*this.numValue();if(i.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(i.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(i.match(/in$/))return this.numValue()*this.getDPI(t);if(i.match(/%$/))return this.numValue()*a.ViewPort.ComputeSize(t);var n=this.numValue();return e&&n<1?n*a.ViewPort.ComputeSize(t):n},a.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},a.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var s={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return a.Property.prototype.toTextBaseline=function(){return this.hasValue()?s[this.value]:null},a.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,e,i,n,r,s){var o=null!=s?this.Parse(s):this.CreateFont("","","","","",a.ctx.font);return{fontFamily:r||o.fontFamily,fontSize:n||o.fontSize,fontStyle:t||o.fontStyle,fontWeight:i||o.fontWeight,fontVariant:e||o.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var t=this;this.Parse=function(e){for(var i={},n=a.trim(a.compressSpaces(e||"")).split(" "),r={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},s="",o=0;othis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,i,n,r,a){var s=t+2/3*(i-t),o=e+2/3*(n-e),l=s+1/3*(r-t),h=o+1/3*(a-e);this.addBezierCurve(t,e,s,l,o,h,r,a)},this.addBezierCurve=function(t,e,n,r,a,s,o,l){var h=[t,e],u=[n,r],c=[a,s],f=[o,l];for(this.addPoint(h[0],h[1]),this.addPoint(f[0],f[1]),i=0;i<=1;i++){var d=function(t){return Math.pow(1-t,3)*h[i]+3*Math.pow(1-t,2)*t*u[i]+3*(1-t)*Math.pow(t,2)*c[i]+Math.pow(t,3)*f[i]},p=6*h[i]-12*u[i]+6*c[i],m=-3*h[i]+9*u[i]-9*c[i]+3*f[i],g=3*u[i]-3*h[i];if(0!=m){var y=Math.pow(p,2)-4*g*m;if(!(y<0)){var v=(-p+Math.sqrt(y))/(2*m);0=0;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;eo&&(this.styles[s]=i[s],this.stylesSpecificity[s]=r)}}},null!=t&&1==t.nodeType){for(var e=0;e=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new a.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t,t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t,t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new a.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,i){null!=i&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(i)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t1&&(c*=Math.sqrt(y),f*=Math.sqrt(y));var v=(p==m?-1:1)*Math.sqrt((Math.pow(c,2)*Math.pow(f,2)-Math.pow(c,2)*Math.pow(g.y,2)-Math.pow(f,2)*Math.pow(g.x,2))/(Math.pow(c,2)*Math.pow(g.y,2)+Math.pow(f,2)*Math.pow(g.x,2)));isNaN(v)&&(v=0);var b=new a.Point(v*c*g.y/f,v*-f*g.x/c),x=new a.Point((o.x+u.x)/2+Math.cos(d)*b.x-Math.sin(d)*b.y,(o.y+u.y)/2+Math.sin(d)*b.x+Math.cos(d)*b.y),w=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},E=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(w(t)*w(e))},P=function(t,e){return(t[0]*e[1]=1&&(T=0);var k=1-m?1:-1,M=C+k*(T/2),V=new a.Point(x.x+c*Math.cos(M),x.y+f*Math.sin(M));if(e.addMarkerAngle(V,M-k*Math.PI/2),e.addMarkerAngle(u,M-k*Math.PI),i.addPoint(u.x,u.y),null!=t){E=c>f?c:f;var A=c>f?1:c/f,D=c>f?f/c:1;t.translate(x.x,x.y),t.rotate(d),t.scale(A,D),t.arc(0,0,E,C,C+T,1-m),t.scale(1/A,1/D),t.rotate(-d),t.translate(-x.x,-x.y)}}break;case"Z":case"z":null!=t&&t.closePath(),e.current=e.start}return i},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),i=[],n=0;n1&&(this.offset=1);var e=this.style("stop-color",!0);""===e.value&&(e.value="#000"),this.style("stop-opacity").hasValue()&&(e=e.addOpacity(this.style("stop-opacity"))),this.color=e.value},a.Element.stop.prototype=new a.Element.ElementBase,a.Element.AnimateBase=function(t){this.base=a.Element.ElementBase,this.base(t),a.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+t;var e=!1;if(this.begini&&s.attribute("x").hasValue())break;r+=s.measureTextRecursive(t)}return-1*("end"==n?r:r/2)}return 0},this.renderChild=function(t,e,i){var n=e.children[i];n.attribute("x").hasValue()?(n.x=n.attribute("x").toPixels("x")+e.getAnchorDelta(t,e,i),n.attribute("dx").hasValue()&&(n.x+=n.attribute("dx").toPixels("x"))):(n.attribute("dx").hasValue()&&(e.x+=n.attribute("dx").toPixels("x")),n.x=e.x),e.x=n.x+n.measureText(t),n.attribute("y").hasValue()?(n.y=n.attribute("y").toPixels("y"),n.attribute("dy").hasValue()&&(n.y+=n.attribute("dy").toPixels("y"))):(n.attribute("dy").hasValue()&&(e.y+=n.attribute("dy").toPixels("y")),n.y=e.y),e.y=n.y,n.render(t);for(i=0;i0&&" "!=e[i-1]&&i0&&" "!=e[i-1]&&(i==e.length-1||" "==e[i+1])&&(a="initial"),void 0!==t.glyphs[n]&&null==(r=t.glyphs[n][a])&&"glyph"==t.glyphs[n].type&&(r=t.glyphs[n])}else r=t.glyphs[n];return null==r&&(r=t.missingGlyph),r},this.renderChildren=function(t){var e=this.parent.style("font-family").getDefinition();if(null==e)""!=t.fillStyle&&t.fillText(a.compressSpaces(this.getText()),this.x,this.y),""!=t.strokeStyle&&t.strokeText(a.compressSpaces(this.getText()),this.x,this.y);else{var i=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),n=this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle),r=this.getText();e.isRTL&&(r=r.split("").reverse().join(""));for(var s=a.ToNumberArray(this.parent.attribute("dx").value),o=0;o0?"":this.text}},a.Element.tspan.prototype=new a.Element.TextElementBase,a.Element.tref=function(t){this.base=a.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},a.Element.tref.prototype=new a.Element.TextElementBase,a.Element.a=function(t){this.base=a.Element.TextElementBase,this.base(t),this.hasText=t.childNodes.length>0;for(var e=0;e0){var i=new a.Element.g;i.children=this.children,i.parent=this,i.render(t)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){a.ctx.canvas.style.cursor="pointer"}},a.Element.a.prototype=new a.Element.TextElementBase,a.Element.image=function(t){this.base=a.Element.RenderedElementBase,this.base(t);var e=this.getHrefAttribute().value;if(""!=e){var i=e.match(/\.svg$/);if(a.Images.push(this),this.loaded=!1,i)this.img=a.ajax(e),this.loaded=!0;else{this.img=document.createElement("img"),1==a.opts.useCORS&&(this.img.crossOrigin="Anonymous");var n=this;this.img.onload=function(){n.loaded=!0},this.img.onerror=function(){a.log('ERROR: image "'+e+'" not found'),n.loaded=!0},this.img.src=e}this.renderChildren=function(t){var e=this.attribute("x").toPixels("x"),n=this.attribute("y").toPixels("y"),r=this.attribute("width").toPixels("x"),s=this.attribute("height").toPixels("y");0!=r&&0!=s&&(t.save(),i?t.drawSvg(this.img,e,n,r,s):(t.translate(e,n),a.AspectRatio(t,this.attribute("preserveAspectRatio").value,r,this.img.width,s,this.img.height,0,0),t.drawImage(this.img,0,0)),t.restore())},this.getBoundingBox=function(){var t=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),n=this.attribute("height").toPixels("y");return new a.BoundingBox(t,e,t+i,e+n)}}},a.Element.image.prototype=new a.Element.RenderedElementBase,a.Element.g=function(t){this.base=a.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(){for(var t=new a.BoundingBox,e=0;e0)for(var b=y[v].indexOf("url"),x=y[v].indexOf(")",b),w=y[v].substr(b+5,x-b-6),E=a.parseXml(a.ajax(w)).getElementsByTagName("font"),P=0;P>H,_[g+1]=b*W>>H,_[g+2]=x*W>>H,_[g+3]=w*W>>H,v-=E,b-=P,x-=C,w-=B,E-=G.r,P-=G.g,C-=G.b,B-=G.a,p=y+((p=c+o+1)>H,_[p+1]=b*W>>H,_[p+2]=x*W>>H,_[p+3]=w*W>>H,v-=E,b-=P,x-=C,w-=B,E-=G.r,P-=G.g,C-=G.b,B-=G.a,p=c+((p=f+L)>j,A[g+1]=b*X>>j,A[g+2]=x*X>>j,v-=w,b-=E,x-=P,w-=F.r,E-=F.g,P-=F.b,p=y+((p=c+o+1)>j,A[p+1]=b*X>>j,A[p+2]=x*X>>j,v-=w,b-=E,x-=P,w-=F.r,E-=F.g,P-=F.b,p=c+((p=f+_)255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i},this.getHelpXML=function(){for(var t=new Array,i=0;i "+u.toRGB()+" -> "+u.toHex());h.appendChild(c),h.appendChild(f),l.appendChild(h)}catch(t){}return l}}void 0===(n=function(){return a}.call(e,i,e,t))||(t.exports=n),r.RGBColor=a}("undefined"!=typeof window?window:this)},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i.n(n),a=i(11),s=i.n(a),o=i(10),l=i(9),h=i.n(l),u=i(1),c="Taucharts Export Plug-in:",f=r.a.api.utils,d=r.a.api.pluginsSDK,p=d.tokens(),m=function(t,e){return t.replace(new RegExp("^"+e+"+|"+e+"+$","g"),"")},g=function(t){return(t=Math.round(t))%2?t+1:t},y=function(t){return null===t||""===t||void 0===t};var v,b={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},x=function(t,e){e=e||"all";var i=document.createElement("style");return i.setAttribute("media",e),i.innerHTML=t,i},w=x(h.a,"print"),E=function(){w&&w.parentNode&&w.parentNode.removeChild(w),v&&v.parentNode&&v.parentNode.removeChild(v)};/PhantomJS/.test(navigator.userAgent)||("onafterprint"in window?window.addEventListener("afterprint",E):window.matchMedia("screen").addListener(function(t){t.matches&&E()}));var P=function(t,e,i){var n="data:"+e+";charset=UTF-8,%ef%bb%bf"+encodeURIComponent(i),r=document.createElement("a");r.setAttribute("href",n),r.setAttribute("download",t),r.setAttribute("target","_new"),document.body.appendChild(r),r.click(),document.body.removeChild(r),r=null},C=function(t){return[].slice.call(t.querySelectorAll("text.label")).forEach(function(t){t.innerHTML=[].slice.call(t.querySelectorAll("tspan")).reduce(function(t,e){var i=e.value||e.text||e.textContent||"";return t+(i=i.charAt(0).toUpperCase()+i.substr(1))},"")}),t},B=function(t,e,i){i=null==i?"":String(i);var n=(t||{})[e]||{};return(f.isObject(n.label)?n.label.text:n.label)||i};function S(t){return{onRender:function(){this._info=d.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(t,e){var i=this._info;return t.map(function(t){var e=t,n=i[t]||{};return"string"==typeof t&&(e={field:t,title:n.label||t}),"function"!=typeof e.value&&(e.value=function(t){var e=t[this.field];return n.isComplexField?(e||{})[n.tickLabel]:e}),e}).filter(function(t){return!e.find(function(e){return t.field===e})})},_handleError:function(t){r.a.api.globalSettings.log([c,t],"error")},_createDataUrl:function(t,e){var i=this;(function(){for(var t=[],e=0;e=200&&i.status<300){var t=i.responseText;r[e]=t,a.splice(a.indexOf(i),1),0===a.length&&n(null,r)}else a.forEach(function(t){return t.abort()}),n(new Error(i.status+": "+i.statusText),null)},i.onerror=function(t){a.forEach(function(t){return t.abort()}),n(t.error,null)},i.open("GET",t,!0),i.send(null)})}).apply(void 0,this._cssPaths.concat([function(n,a){if(n)e(n,null);else try{var o=a.join(" ").replace(/&/g,""),l=x(o),h=document.createElement("div");t.fire("beforeExportSVGNode");var c=t.getSVG().cloneNode(!0);t.fire("afterExportSVGNode"),h.appendChild(C(c)),u.select(c).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),c.insertBefore(l,c.firstChild),i._renderAdditionalInfo(c,t),i._addBackground(c,i._backgroundColor);var f=document.createElement("canvas");f.height=c.getAttribute("height"),f.width=c.getAttribute("width"),s()(f,c.parentNode.innerHTML,{renderCallback:function(t){var i=(new XMLSerializer).serializeToString(t);"=0}))?'"'+a+'"':a}return t.concat(r)},[]).join(e))},[s.map(function(t){return t.title}).join(e)]).join("\r\n"),l=(this._fileName||"export")+".csv";P(l,"text/csv",o)},_renderFillLegend:function(e,i,n,r){var a=function(t,e){var i=t[0],n=t[1],r=(n-i)/(e-1),a=f.range(e-2).map(function(t){return i+r*(t+1)});return[i].concat(a).concat(n)},s=this._unit.getScale("color"),o=B(e.guide,"color",s.dim).toUpperCase(),l="text-transform:uppercase;font-weight:600;font-size:"+t.fontSize+"px",h=s.domain().sort(function(t,e){return t-e}),u=s.brewer.length,c=t.fontSize,d=a(h,u).reverse().map(function(t,e){return''}),p=a(h,3).reverse().map(function(t,e,i){return''+t+""}),m=[''," ",' ',d.join("")," "," ",' '+o+"",' ',' '," ",p.join("")," "," Sorry, your browser does not support inline SVG.",""].join(""),g=(new DOMParser).parseFromString(m,"application/xml").documentElement;return document.body.appendChild(g),i.append("g").attr("class","legend").attr("transform","translate("+(r+10)+","+t.paddingTop+")").node().appendChild(g),{h:120,w:0}},_renderColorLegend:function(e,i,n,r){var a=this._unit.getScale("color"),s=B(e.guide,"color",a.dim).toUpperCase(),o=this._getColorMap(n.getChartModelData({excludeFilter:["legend"]}),a,a.dim).values,l=i.append("g").attr("class","legend").attr("transform","translate("+(r+10)+","+t.paddingTop+")");return l.append("text").text(s.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":t.fontSize+"px"}),l.selectAll("g").data(o).enter().append("g").call(function(e){e.attr("transform",function(t,e){return"translate(5,"+20*(e+1)+")"}),e.append("circle").attr("r",6).attr("fill",function(t){return a.toColor(t.color)}).attr("class",function(t){return a.toClass(t.color)}),e.append("text").attr("x",12).attr("y",5).text(function(t){return f.escape(y(t.label)?"No "+s:t.label)}).style({"font-size":t.fontSize+"px"})}),{h:20*o.length,w:0}},_renderSizeLegend:function(e,i,n,r,a){var s,o,l=this._unit.getScale("size"),h=B(e.guide,"size",l.dim).toUpperCase(),u=n.getChartModelData().sort(function(t,e){return l(t[l.dim])-l(e[l.dim])}),c=u.length,d=u[0][l.dim],p=u[c-1][l.dim];if(p-d){var m=(o=p-d,Math.log(o)/Math.LN10),y=4-m<0?0:Math.round(4-m),v=Math.pow(10,y),b=(p-d)/5;s=f.unique([d,d+b,d+2*b,d+3*b,p].map(function(t){return t===p||t===d?t:Math.round(t*v)/v}))}else s=[d];var x=s.map(function(t){var i=l(t),n=i/2;return{diameter:g(i+2),radius:n,value:t,className:e.color?"color-definite":""}}.bind(this)).reverse(),w=Math.max.apply(null,x.map(function(t){return t.diameter})),E=t.fontSize,P=0,C=i.append("g").attr("class","legend").attr("transform","translate("+(r+10)+","+(t.paddingTop+a.h+20)+")");C.append("text").text(h.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":E+"px"}),C.selectAll("g").data(x).enter().append("g").call(function(t){t.attr("transform",function(){var t="translate(5,"+(P+=w)+")";return P+=10,t}),t.append("circle").attr("r",function(t){return t.radius}).attr("class",function(t){return t.className}).style({opacity:.4}),t.append("g").attr("transform",function(){return"translate("+w+","+E/2+")"}).append("text").attr("x",0).attr("y",0).text(function(t){return t.value}).style({"font-size":E+"px"})})},_renderAdditionalInfo:function(t,e){var i=this._findUnit(e);if(i){var n={h:0,w:0};t=u.select(t);var r=parseInt(t.attr("width"),10);t.attr("height");t.attr("width",r+160);var a=e.getScaleInfo(i.color);if(a.dim&&!a.discrete){var s=this._renderFillLegend(i,t,e,r);n.h=s.h+20,n.w=s.w}if(a.dim&&a.discrete){var o=this._renderColorLegend(i,t,e,r);n.h=o.h+20,n.w=o.w}var l=e.getScaleInfo(i.size);l.dim&&!l.discrete&&this._renderSizeLegend(i,t,e,r,n)}},_addBackground:function(t,e){if(e&&"transparent"!==e){var i=document.createElementNS("http://www.w3.org/2000/svg","rect");i.setAttribute("fill",e),i.setAttribute("x",0),i.setAttribute("y",0),i.setAttribute("width",t.getAttribute("width")),i.setAttribute("height",t.getAttribute("height")),t.insertBefore(i,t.firstChild)}},onUnitDraw:function(t,e){r.a.api.isChartElement(e)&&"chart"===e.config.namespace&&(this._unit=e)},_getColorMap:function(t,e,i){return f.unique(t.map(function(t){var n=t[i];return{color:e(n),value:n,label:n}}),function(t){return t.value}).reduce(function(t,e){return t.brewer[e.value]=e.color,t.values.push(e),t},{brewer:{},values:[]})},_select:function(t,e){var i=this["_to"+(t=t||"").charAt(0).toUpperCase()+t.slice(1)];i&&i.call(this,e)},_handleMenu:function(t,e,i){t.addEventListener("click",function(t){if("a"===t.target.tagName.toLowerCase()){var n=t.target.getAttribute("data-value");this._select(n,e),i.hide()}}.bind(this)),t.addEventListener("mouseover",function(t){"a"===t.target.tagName.toLowerCase()&&t.target.focus()}.bind(this)),t.addEventListener("keydown",function(t){if(t.keyCode===b.ESCAPE&&i.hide(),t.keyCode===b.DOWN&&(t.target.parentNode.nextSibling?t.target.parentNode.nextSibling.childNodes[0].focus():t.target.parentNode.parentNode.firstChild.childNodes[0].focus()),t.keyCode===b.UP&&(t.target.parentNode.previousSibling?t.target.parentNode.previousSibling.childNodes[0].focus():t.target.parentNode.parentNode.lastChild.childNodes[0].focus()),t.keyCode===b.ENTER){var n=t.target.getAttribute("data-value");this._select(n,e)}t.preventDefault()}.bind(this));var n=null,r=function(){n=setTimeout(function(){i.hide()},100)},a=function(){clearTimeout(n)},s=function(){i.toggle(),i.hidden||t.querySelectorAll("a")[0].focus()};t.addEventListener("blur",r,!0),t.addEventListener("focus",a,!0),this._container.addEventListener("click",s),this._onDestroy(function(){t.removeEventListener("blur",r,!0),t.removeEventListener("focus",a,!0),this._container.removeEventListener("click",s),clearTimeout(n)})},init:function(e){t=t||{},t=f.defaults(t,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=e,this._info={},this._cssPaths=t.cssPaths,this._fileName=t.fileName,this._backgroundColor=t.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=t.csvSeparator||",",this._exportFields=t.exportFields||[],this._appendFields=t.appendFields||[],this._excludeFields=t.excludeFields||[],this._cssPaths||(this._cssPaths=[],r.a.api.globalSettings.log('[export plugin]: the "cssPath" parameter should be specified for correct operation',"warn"));var i=t.visible?"":"display:none";this._container=e.insertToHeader('Export');var n=e.addBalloon({place:"bottom-left"});n.content(['"].join("")),n.attach(this._container);var a=n.getElement();a.setAttribute("tabindex","-1"),this._handleMenu(a,e,n);var s=e.on("export-to",function(t,e){var i=e.type,n=e.fileName;this._fileName=n||this._fileName,this._select(i,t)}.bind(this)),o=e.on("exportTo",function(t,e){r.a.api.globalSettings.log([c,"`exportTo` event is deprecated, use `export-to` instead."],"warn"),this._select(e,t)}.bind(this));this._onDestroy(function(){n.destroy(),e.removeHandler(s),e.removeHandler(o)})},_onDestroy:function(t){this._destroyListeners.push(t)},destroy:function(){this._destroyListeners.forEach(function(t){t.call(this)},this);var t;(t=this._container)&&t.parentElement&&t.parentElement.removeChild(t)}}}r.a.api.plugins.add("export-to",S),e.default=S}])}); \ No newline at end of file diff --git a/dist/plugins/floating-axes.js b/dist/plugins/floating-axes.js new file mode 100644 index 000000000..bfd8d562b --- /dev/null +++ b/dist/plugins/floating-axes.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],e);else{var r="object"==typeof exports?e(require("taucharts"),require("d3-selection")):e(t.Taucharts,t.d3);for(var a in r)("object"==typeof exports?exports:t)[a]=r[a]}}(window,function(t,e){return function(t){var e={};function r(a){if(e[a])return e[a].exports;var n=e[a]={i:a,l:!1,exports:{}};return t[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,a){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:a})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=24)}({0:function(e,r){e.exports=t},1:function(t,r){t.exports=e},24:function(t,e,r){"use strict";r.r(e);var a=r(0),n=r.n(a),i=r(1),o=(Object.assign||function(t){for(var e,r=1,a=arguments.length;r=0&&e.x.push(t),r.indexOf("y")>=0&&e.y.push(t),this};var o=function(){var t=n.scrollLeft,o=n.scrollTop;i.forEach(function(e){e.call(null,t,o)});var l=function(n){var i="x"===n?t:o;i!==r[n]&&(clearTimeout(a[n]),s(e[n],function(t){t.transition("floatingAxes_scrollVisibility"),t.attr("opacity",1e-6)}),a[n]=setTimeout(function(){s(e[n],function(t){a[n]=null,t.transition("floatingAxes_scrollVisibility").duration(256).attr("opacity",1)})},128)),r[n]=i};l("x"),l("y")};function s(t,e,r){t.forEach(function(t){e.call(r,t)})}n.addEventListener("scroll",o),this.fireScroll=function(){o.call(null,n.scrollLeft,n.scrollTop)},this.destroy=function(){n.removeEventListener("scroll",o)}}(l),H=(t=function(t){var e="> ."+t+".axis.tau-active";return[".frame-root.tau-active "+e,".frame-root.tau-active .cell.tau-active "+e].join(", ")},{x:Array.from(x.querySelectorAll(t("x"))),y:Array.from(x.querySelectorAll(t("y")))}),S=function(){function t(t){return{axis:t,parentTransform:function(t){var e,r={translate0:{x:0,y:0},translate:{x:0,y:0}},a=t;for(;a&&"SVG"!==a.nodeName.toUpperCase();)e=_(a),r.translate0.x+=e.translate0.x,r.translate0.y+=e.translate0.y,r.translate.x+=e.translate.x,r.translate.y+=e.translate.y,a=a.parentNode;return r}(t.parentNode),axisTransform:_(t)}}return{x:H.x.map(t),y:H.y.map(t)}}(),F=(r=S.y.map(function(t){return t.axisTransform.translate.x+t.parentTransform.translate.x}),Math.max.apply(null,r)+1),w=function(t){return Math.min.apply(null,t)}(S.x.map(function(t){return t.axisTransform.translate.y+t.parentTransform.translate.y}))-1,L=n.a.api.globalSettings.getScrollbarSize(l);var E={scrollLeft:l.scrollLeft,scrollTop:l.scrollTop,visibleWidth:l.clientWidth,visibleHeight:l.clientHeight,scrollbarWidth:L.width,scrollbarHeight:L.height,svgWidth:Number(y.attr("width")),svgHeight:Number(y.attr("height")),minXAxesY:w,maxYAxesX:F},T=function(){var t=y.append("defs").attr("class","floating-axes floating-axes__defs"),e={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(e).forEach(function(r){var n=e[r],i=t.append("linearGradient").attr("id","shadow-gradient-"+r+"-"+a).attr("x1",n.x1).attr("y1",n.y1).attr("x2",n.x2).attr("y2",n.y2);i.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",f).attr("stop-opacity",h),i.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",d)}),t}();function O(t,e){e.forEach(function(e){e.axis[p]=e.axis.parentNode;var r=t.append("g");v?r.attr("transform",b(e.parentTransform.translate0.x,e.parentTransform.translate0.y)).transition().duration(v).attr("transform",b(e.parentTransform.translate.x,e.parentTransform.translate.y)):r.attr("transform",b(e.parentTransform.translate.x,e.parentTransform.translate.y)),r.node().appendChild(e.axis),Array.prototype.forEach.call(e.axis.querySelectorAll(".label"),function(t){t[g]=t.getAttribute("transform")})})}var V,C,M=function(){var t=E.svgHeight-E.minXAxesY+1+E.scrollbarHeight,e=y.append("g").attr("class","floating-axes floating-axes__x").call(k,E.svgWidth,t,0,E.minXAxesY);O(e,S.x);var r=e.selectAll(".label");return m.handleVisibilityFor(e,"y").handleVisibilityFor(r,"x").onScroll(function(t,a){var n=Math.min(E.visibleHeight+a-E.svgHeight-E.scrollbarHeight,0);e.attr("transform",b(0,n)),r.each(function(){var e=A(this[g]),r=-E.svgWidth+E.visibleWidth+t-10;this.setAttribute("transform","translate("+(e.x+r)+","+e.y+") rotate("+e.r+")")})}),e}(),W=function(){var t=y.append("g").attr("class","floating-axes floating-axes__y").call(k,E.maxYAxesX,E.svgHeight);O(t,S.y);var e=t.selectAll(".label");return m.handleVisibilityFor(t,"x").handleVisibilityFor(e,"y").onScroll(function(r,a){var n=Math.max(r,0);t.attr("transform",b(n,0)),e.each(function(){var t=A(this[g]),e=a+10;this.setAttribute("transform","translate("+t.x+","+(t.y+e)+") rotate("+t.r+")")})}),t}(),j=(V=E.svgHeight-E.minXAxesY+E.scrollbarHeight,C=y.append("g").attr("class","floating-axes floating-axes__corner").call(k,E.maxYAxesX,V),m.handleVisibilityFor(C,"xy").onScroll(function(t,e){var r=Math.max(t,0),a=E.minXAxesY,n=Math.min(e+E.visibleHeight-V,a);C.attr("transform",b(r,n))}),C);function k(t,r,a,n,i){n=n||0,i=i||0,t.append("rect").attr("class","i-role-bg").attr("x",n-1).attr("y",i-1).attr("width",Math.max(0,r+2)).attr("height",Math.max(0,a+2)).attr("fill",e.bgcolor)}var N=function(){var t=E.maxYAxesX,e=E.svgHeight-E.minXAxesY+E.scrollbarHeight,r=y.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),n=function(t,e,n,i,o){return r.append("rect").attr("fill","url(#shadow-gradient-"+t+"-"+a+")").attr("x",e).attr("y",n).attr("width",Math.max(0,i)).attr("height",Math.max(0,o))},i=n("ns",0,0,t,c),o=n("ew",E.visibleWidth-c,E.visibleHeight-e,c,e),s=n("sn",0,E.visibleHeight-e-c,t,c),l=n("we",t,E.visibleHeight-e,c,e);m.handleVisibilityFor(i,"xy").handleVisibilityFor(o,"xy").handleVisibilityFor(s,"xy").handleVisibilityFor(l,"xy").onScroll(function(t,e){var a=t,n=e;r.attr("transform",b(a,n));var c=function(t,e){t.style("visibility",e?"":"hidden")};c(i,e>0&&E.svgHeight>E.visibleHeight),c(o,t+E.visibleWidthE.visibleWidth),c(s,e+E.visibleHeightE.visibleHeight),c(l,t>0&&E.svgWidth>E.visibleWidth)})}(),X=M.node(),Y=W.node(),q=j.node();m.onScroll(function(t){x.insertBefore(X,0===t?q.nextElementSibling:Y)}),m.fireScroll(),this.floatingLayout={defs:T,xAxes:M,yAxes:W,shadows:N},y.selectAll(".floating-axes").on("mouseenter",function(){s.dispatchMouseEvent(x,"mouseleave")}).on("mousemove",function(){i.event.stopPropagation()}).on("click",function(){i.event.stopPropagation()})},removeFloatingLayout:function(){function t(t){t.selectAll(".axis").each(function(){this[p].appendChild(this),delete this[p],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(t){t.setAttribute("transform",t[g]),delete t[g]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(t),this.floatingLayout.yAxes.call(t),this.scrollManager.destroy(),this.floatingLayout=null),o.select(this.chart.getSVG()).selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var t,e=this.chart.getLayout().layout;do{if("none"!==(t=window.getComputedStyle(e)).backgroundImage)return null;if("transparent"!==t.backgroundColor&&"rgba(0, 0, 0, 0)"!==t.backgroundColor)return t.backgroundColor}while(e=e.parentElement);return null}}}function b(t,e){return"translate("+t+","+e+")"}function A(t){var e={x:0,y:0,r:0};if(!t)return e;var r=t.indexOf("translate(");if(r>=0){var a=t.indexOf(")",r+10),n=t.substring(r+10,a).trim().replace(","," ").replace(/\s+/," ").split(" ");e.x=parseFloat(n[0]),n.length>1&&(e.y=parseFloat(n[1]))}var i=t.indexOf("rotate(");if(i>=0){var o=t.indexOf(")",i+7),s=t.substring(i+7,o);e.r=parseFloat(s.trim())}return e}function _(t){var e=t[x]&&t[x].transform,r=A(t.getAttribute("transform"));return{translate0:r,translate:e?A(t[x].transform):r}}n.a.api.plugins.add("floating-axes",m),e.default=m}})}); \ No newline at end of file diff --git a/dist/plugins/geomap-legend.js b/dist/plugins/geomap-legend.js new file mode 100644 index 000000000..e9bbe3e5e --- /dev/null +++ b/dist/plugins/geomap-legend.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"));else if("function"==typeof define&&define.amd)define([],t);else{var a="object"==typeof exports?t(require("taucharts")):t(e.Taucharts);for(var r in a)("object"==typeof exports?exports:e)[r]=a[r]}}(window,function(e){return function(e){var t={};function a(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=e,a.c=t,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},a.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=23)}({0:function(t,a){t.exports=e},23:function(e,t,a){"use strict";a.r(t);var r=a(0),i=a.n(r),n=i.a.api.utils;function l(e){n.defaults(e||{},{});var t=function(e,t,a,r){e.addEventListener(t,function(e){for(var t=e.target;t!==e.currentTarget&&null!==t;)t.classList.contains(a)&&r(e,t),t=t.parentNode})};return{init:function(e){this._chart=e,this._currentFilters={},this._legendColorByScaleId={};var a=this._chart.getSpec(),r=function(e){return function(t,r){var i=a.scales[r];return i.type===e&&i.dim&&t.push(r),t}};this._color=Object.keys(a.scales).reduce(r("color"),[]),this._fill=Object.keys(a.scales).reduce(r("fill"),[]);var i=this._color.length>0,n=this._fill.length>0;(i||n)&&(this._container=this._chart.insertToRightSidebar(this._containerTemplate),i&&(t(this._container,"click","tau-chart__legend__item-color",function(e,t){this._toggleLegendItem(t)}.bind(this)),t(this._container,"mouseover","tau-chart__legend__item-color",function(e,t){this._highlightToggle(t,!0)}.bind(this)),t(this._container,"mouseout","tau-chart__legend__item-color",function(e,t){this._highlightToggle(t,!1)}.bind(this))))},onSpecReady:function(){this._assignStaticBrewersOrEx()},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend()},_containerTemplate:'
',_template:n.template('
<%=name%>
<%=items%>
'),_itemTemplate:n.template(["
\">",'
','
',"
","<%=label%>","
"].join("")),_itemFillTemplate:n.template(['
\' class="tau-chart__legend__item tau-chart__legend__item-color" style="padding: 6px 0px 10px 40px;margin-left:10px;">','
',' ',' <%=label%>',"
","
"].join("")),_clearPanel:function(){this._container&&(this._container.innerHTML="")},_drawColorLegend:function(){var e=this;e._color.forEach(function(t){var a=e._chart.select(function(e){return e.config.color===t})[0];if(a){var r=a.getScale("color"),i=e._chart.getDataSources({excludeFilter:["legend"]}),l=n.unique(i[r.source].data.map(function(e){return e[r.dim]})).map(function(a){var i=n.escape(a),l=r.dim+i;return{scaleId:t,dim:r.dim,color:r(a),disabled:e._currentFilters.hasOwnProperty(l),label:a,value:i}});e._legendColorByScaleId[t]=l,e._container.insertAdjacentHTML("beforeend",e._template({items:l.map(function(t){return e._itemTemplate({scaleId:t.scaleId,dim:t.dim,color:t.color,classDisabled:t.disabled?"disabled":"",label:t.label,value:t.value})}).join(""),name:(((a.guide||{}).color||{}).label||{}).text||r.dim}))}})},_drawFillLegend:function(){var e=this;e._fill.forEach(function(t){var a=e._chart.select(function(e){return"COORDS.MAP"===e.config.type&&e.config.fill===t});if(a.length>0){var r=a[0].getScale("fill"),i=r.brewer,l=r.domain(),c=(l[1]-l[0])/i.length,o=n.range(i.length).map(function(t){var a=l[0]+t*c,o="";return 0===t&&(o=l[0]),t===i.length-1&&(o=l[1]),e._itemFillTemplate({color:r(a),label:o,value:n.escape(a)})});e._container.insertAdjacentHTML("beforeend",e._template({items:o.join(""),name:(((a[0].guide||{}).fill||{}).label||{}).text||r.dim}))}})},_toggleLegendItem:function(e){var t=e.getAttribute("data-scale-id"),a=e.getAttribute("data-dim"),r=e.getAttribute("data-value"),i=a+r,n=this._legendColorByScaleId[t].filter(function(e){return!e.disabled});if(1!==n.length||t!==n[0].scaleId||r!==n[0].value){var l=this._currentFilters;if(l.hasOwnProperty(i)){var c=l[i];delete l[i],e.classList.remove("disabled"),this._chart.removeFilter(c)}else e.classList.add("disabled"),l[i]=this._chart.addFilter({tag:"legend",predicate:function(e){return e[a]!=r}});this._chart.refresh()}},_highlightToggle:function(e,t){var a=e.getAttribute("data-scale-id"),r=e.getAttribute("data-dim"),i=e.getAttribute("data-value");this._chart.select(function(e){return e.config.color===a}).forEach(function(e){e.fire("highlight",function(e){return!t||e[r]==i})})},_generateColorMap:function(e){var t=n.range(20).map(function(e){return"color20-"+(1+e)});return e.reduce(function(e,a,r){return e[a]=t[r%20],e},{})},_assignStaticBrewersOrEx:function(){var e=this;e._color.forEach(function(t){var a=e._chart.getSpec().scales[t],r=e._chart.getDataSources({excludeFilter:["legend"]}),i=e._chart.getScaleFactory(r).createScaleInfoByName(t).domain();a.brewer||(a.brewer="measure"!==a.dimType?e._generateColorMap(i):["#e5f5e0","#a1d99b","#31a354"])})}}}i.a.api.plugins.add("geomap-legend",l),t.default=l}})}); \ No newline at end of file diff --git a/dist/plugins/geomap-tooltip.js b/dist/plugins/geomap-tooltip.js new file mode 100644 index 000000000..5f83e8d01 --- /dev/null +++ b/dist/plugins/geomap-tooltip.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"));else if("function"==typeof define&&define.amd)define([],e);else{var i="object"==typeof exports?e(require("taucharts")):e(t.Taucharts);for(var o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(window,function(t){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var n=e[o]={i:o,l:!1,exports:{}};return t[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:o})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=22)}({0:function(e,i){e.exports=t},22:function(t,e,i){"use strict";i.r(e);var o=i(0),n=i.n(o),r=n.a.api.utils;function a(t){r.defaults(t||{},{});var e=function(){return!1};return{init:function(t){this._currNode=null,this._currData=null,this._chart=t,this._tooltip=t.addBalloon({spacing:3,auto:!0,effectClass:"fade"}),this._tooltip.content(this.template),this._tooltip.getElement().addEventListener("click",function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.classList.contains("i-role-exclude")&&(i._exclude(),i._tooltip.hide(),i._blurSelection()),e=e.parentNode},!1);var e,i=this;this._showTooltip=function(t){clearTimeout(e),i._currData=t.data;var o="No data";null!==t.data&&(o=Object.keys(t.data).map(function(e){return i.itemTemplate({label:e,value:t.data[e]})}).join(""));var n=i._tooltip.getElement().querySelectorAll(".i-role-content");n[0]&&(n[0].innerHTML=o);var r=i._tooltip.getElement().querySelectorAll(".i-role-exclude");if(r[0]){var a=t.data&&i._chart.getChartModelData().length>1;r[0].style.visibility=a?"visible":"hidden"}i._tooltip.show(t.event.pageX,t.event.pageY).updateSize()},this._hideTooltip=function(t){e=setTimeout(function(){i._tooltip.hide()},t?0:1e3)},this._tooltip.getElement().addEventListener("mouseover",function(t){clearTimeout(e)},!1),this._tooltip.getElement().addEventListener("mouseleave",function(t){i._hideTooltip(!0),i._blurSelection()},!1)},onRender:function(){var t=this;this._chart.select(function(t){return"COORDS.MAP"===t.config.type}).forEach(function(e){t._subscribeToPoints(e),t._subscribeToArea(e)})},template:['
','
','
','',"Exclude","
","
","
",'
'].join(""),itemTemplate:r.template(['
','
<%=label%>
','
<%=value%>
',"
"].join("")),_exclude:function(){var t;this._chart.addFilter({tag:"exclude",predicate:(t=this._currData,function(e){return JSON.stringify(e)!==JSON.stringify(t)})}),this._chart.refresh()},_blurSelection:function(){this._chart.select(function(t){return"COORDS.MAP"===t.config.type}).forEach(function(t){t.fire("highlight-area",e)}),this._currNode=null,this._currData=null},_subscribeToPoints:function(t){var e=this;t.on("point-mouseover",function(t,i){e._showTooltip(i)}),t.on("point-mouseout",function(t,i){e._hideTooltip()})},_subscribeToArea:function(t){var e=this;!t.getScale("code").dim||t.on("area-click",function(i,o){var n,r;e._currNode=i,o.data?e._currData===o.data?(e._hideTooltip(!0),e._blurSelection()):(t.fire("highlight-area",(n=o.data,r=JSON.stringify(n),function(t){return JSON.stringify(t)===r})),e._showTooltip(o)):(e._showTooltip(o),e._hideTooltip(!1),e._blurSelection())})}}}n.a.api.plugins.add("geomap-tooltip",a),e.default=a}})}); \ No newline at end of file diff --git a/dist/plugins/layers.js b/dist/plugins/layers.js new file mode 100644 index 000000000..65c11406c --- /dev/null +++ b/dist/plugins/layers.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"),require("d3-array"));else if("function"==typeof define&&define.amd)define([,"d3-array"],t);else{var r="object"==typeof exports?t(require("taucharts"),require("d3-array")):t(e.Taucharts,e.d3);for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(window,function(e,t){return function(e){var t={};function r(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=21)}({0:function(t,r){t.exports=e},21:function(e,t,r){"use strict";r.r(t);var i=r(0),a=r.n(i),n=r(3),c=a.a.api.utils,o=a.a.api.pluginsSDK,u=o.tokens();function s(e){var t=c.defaults(e||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});t.layers.forEach(function(e){e.guide=c.defaults(e.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var r=function(e){return function(t){return Object.assign(t,e)}},i={line:r({type:"ELEMENT.LINE"}),area:r({type:"ELEMENT.AREA"}),dots:r({type:"ELEMENT.POINT"}),scatterplot:r({type:"ELEMENT.POINT"}),bar:r({type:"ELEMENT.INTERVAL"}),"stacked-bar":r({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(e){this._chart=e;var r=o.spec(this._chart.getSpec()),i=this.checkIfApplicable(r);if(this._isApplicable=0===i.length,r.addTransformation("defined-only",function(e,t){var r=t.key;return e.filter(function(e){return null!==e[r]&&void 0!==e[r]})}),this._isApplicable){this.isFacet=this.checkIsFacet(r),this.primaryY=this.findPrimaryLayer(r);var a=this.getLayersText(),n=this.getLayersGroup(),u=t.label;this.fieldColorScale=u,r.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(u,{type:"color",source:"/",dim:u,brewer:t.brewer}).addTransformation("slice-layer",function(e,t){var r=t.key,i=t.group;return i?e.filter(function(e){var t=e[i],r=e[t];return t&&null!==r&&void 0!==r}):e.filter(function(e){return e[u]===a[r]&&null!==e[r]&&void 0!==e[r]})});var s=[this.primaryY].concat(t.layers).reduce(function(e,t){return e.concat(t.y)},[]);e.setupChartSourceModel(function(e){var t={};t[u]={type:"category"};var r={"/":{dims:t,data:[]}};return r["/"].dims=Object.assign(t,e["/"].dims),r["/"].data=e["/"].data.reduce(function(e,t){return e.concat(s.map(function(e){var r={};r[u]=a[e];var i=n[e];return i&&(r[i]=t[e],r.subLayer=i),Object.assign(r,t)}))},[]),Object.assign(r,c.omit(e,"/"))}),t.showPanel&&(this._container=e.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(e){var r=e.target,i=r.classList;i.contains("i-role-show-layers")&&(t.showLayers=r.checked),i.contains("i-role-change-mode")&&(t.mode=r.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))}else{r.getSettings("log")("[layers plugin]: is not applicable. "+i.join(" / "))}},getLayersText:function(){return[this.primaryY].concat(t.layers).reduce(function(e,t){return(Array.isArray(t.y)?t.y:[t.y]).reduce(function(e,r){return e[r]=this.extractLabelForKey(t,r),e}.bind(this),e)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(t.layers).reduce(function(e,t){var r=null;return Array.isArray(t.y)&&(r=t.y.join(", ")),c.flatten([t.y]).reduce(function(e,t){return e[t]=r,e},e)}.bind(this),{})},checkIsFacet:function(e){return e.unit().reduce(function(e,t,r){return e||(r&&"COORDS.RECT"===r.type&&"COORDS.RECT"===t.type?e=!0:e)},!1)},checkIfApplicable:function(e){return e.unit().reduce(function(t,r,i){if(i&&"COORDS.RECT"!==i.type)return t.concat("Chart specification contains non-rectangular coordinates");if(i&&"COORDS.RECT"===i.type&&"COORDS.RECT"!==r.type){var a=e.getScale(r.y);if("measure"!==e.getSourceDim(a.source,a.dim).type)return t.concat("Y scale is not a measure")}return t},[])},isLeafElement:function(e,t){return t&&"COORDS.RECT"===t.type&&"COORDS.RECT"!==e.type},isFirstCoordNode:function(e,t){return!t&&e&&"COORDS.RECT"===e.type},isFinalCoordNode:function(e,t){return e&&"COORDS.RECT"===e.type&&e.units.every(function(e){return"COORDS.RECT"!==e.type})},buildLayersLayout:function(e){return e.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(e){var t=this,r=e.unit().reduce(function(r,i){return r.concat(t.isFinalCoordNode(i)?{y:e.getScale(i.y).dim,isPrimary:!0,guide:i.guide.y,scaleName:i.y}:[])},[]);return o.cloneObject(r[0])},createPrimaryUnitReducer:function(e,r,i,a){var n=this;return function(c,o,u){var s=function(e){return!0!==e.guide.hide};if(n.isFacet&&n.isFirstCoordNode(o,u)){o.guide.y.label=o.guide.y.label||{};var l=o.guide.y.label._original_text||o.guide.y.label.text;o.guide.y.label.text=[l,r.filter(s).map(n.extractLayerLabel.bind(n)).join(", ")].join(e.getSettings("facetLabelDelimiter")),"dock"===t.mode&&(o.guide.y.label.padding-=15,o.guide.y.padding+=15,o.guide.y.rotate=-90,o.guide.y.textAnchor="middle")}return n.isLeafElement(o,u)&&(u.units=u.units.filter(function(e){return e!==o})),n.isFinalCoordNode(o)&&(o.guide.y.label=o.guide.y.label||{},"dock"===t.mode&&(o.guide.padding.l=i,o.guide.padding.r=a,o.guide.y.hide=!0),"merge"===t.mode&&(o.guide.y.label.text=n.isFacet?"":r.filter(s).map(n.extractLayerLabel.bind(n)).join(", "))),c}},createSecondaryUnitReducer:function(e,r,a,n,c,u,s,l){var d=this,y=d.getScaleName(r.scaleName||r.y),f=r.guide.scaleOrient,p=Array.isArray(r.y),g=r.isPrimary;return function(h,m,b){if(d.isFacet&&d.isFirstCoordNode(m,b)&&(m.guide.y.label.text="",m.guide.x.hide=!0,m.guide.y.hide=!0),d.isLeafElement(m,b)){(r.type?i[r.type]:function(e){return e})(m),m.y=y;var x=e.getScale(m.size).dim;if(g&&x);else{var v="size_null"+l;e.addScale(v,{type:"size",source:"?",mid:1}),m.size=v}var L=e.getScale(m.color).dim;g&&L||(m.color=d.fieldColorScale,m.expression.operator="groupBy",m.expression.params=p?["subLayer"]:[d.fieldColorScale]);var S=p?{group:"subLayer"}:{key:r.y};o.unit(m).addTransformation("slice-layer",S)}if(d.isFinalCoordNode(m)){if(m.y=y,m.guide.y=Object.assign(m.guide.y,r.guide||{}),m.guide.y.label=m.guide.y.label||{},m.guide.y.label.text=d.extractLayerLabel(r),m.guide.x.hide=!0,"dock"===t.mode){m.guide.showGridLines="",m.guide.padding.l=a,m.guide.padding.r=n,m.guide.y.label.textAnchor="end",m.guide.y.label.dock="right",m.guide.y.label.padding="right"===f?1:-10,m.guide.y.label.cssClass="label inline";var _="right"===f?s:u;m.guide.y.padding+=c*_}"merge"===t.mode&&(m.guide.showGridLines="",m.guide.y.hide=!0)}return h}},getScaleName:function(e){return Array.isArray(e)?e.join(", "):e},extractLabelForKey:function(e,t){var r=e.guide||{};r.label="string"==typeof r.label?{text:r.label}:r.label;var i=r.label||{},a=i.byKeys||{};return Array.isArray(e.y)?a[t]||t:i.text||i._original_text||e.y},extractLayerLabel:function(e){var t=this;return(Array.isArray(e.y)?e.y:[e.y]).map(function(r){return t.extractLabelForKey(e,r)}).join(", ")},onSpecReady:function(e,r){var i=this,a=o.spec(r);if(t.showLayers&&i._isApplicable){a=t.layers.reduce(function(e,t){var r=i.getScaleName(t.y);return e.addScale(r,Object.assign({type:"linear",source:"/",dim:r,autoScale:!0},c.pick(t.guide||{},"min","max","autoScale","nice","niceInterval")))},a);var n,u=[this.primaryY].concat(t.layers).sort(function(e,t){return(e.guide.zIndex||0)-(t.guide.zIndex||0)}),s=a.unit(),l=t.axisWidth,d=function(e){return function(t){var r=t.guide.scaleOrient||"left";return!0!==t.guide.hide&&r===e}},y=d("left"),f=d("right"),p=u.filter(y).length*l,g=u.filter(f).length*l,h=i.buildLayersLayout(a).addFrame({key:{x:1,y:1},units:[(n=o.unit(s.clone())).reduce(i.createPrimaryUnitReducer(a,u,p,g),n).value()]}),m=-1,b=-1;u.reduce(function(e,t,r){return m=y(t)?m+1:m,b=f(t)?b+1:b,e.addFrame({key:{x:1,y:1},units:[(n=o.unit(s.clone())).reduce(i.createSecondaryUnitReducer(a,t,p,g,l,m,b,r),n).value()]})},h)}else a.unit().traverse(function(e,t){i.isLeafElement(e,t)&&o.unit(e).addTransformation("defined-only",{key:a.getScale(e.y).dim})})},onUnitsStructureExpanded:function(){var e=this;if(e._isApplicable&&"merge"===t.mode){var r=o.spec(e._chart.getSpec()),i=e.primaryY.scaleName,a=t.layers.map(function(t){return e.getScaleName(t.y)}).filter(function(e){return r.getScale(e)}).concat(i),u=a.reduce(function(t,r){var i=e._chart.getScaleInfo(r);return t[r]=i.domain().filter(function(e){return Number.isFinite(e)}),t},{}),s=n.extent(c.flatten(Object.keys(u).map(function(e){return u[e]})));a.forEach(function(e){var t=r.getScale(e);t.min=s[0],t.max=s[1],t.nice=!1})}},containerTemplate:'
',template:c.template(['","
",'","
"].join("")),onRender:function(){this._isApplicable&&t.showPanel&&(this._container.innerHTML=this.template({title:t.title,mode:t.mode,showLayers:t.showLayers}))}}}a.a.api.plugins.add("layers",s),t.default=s},3:function(e,r){e.exports=t}})}); \ No newline at end of file diff --git a/dist/plugins/legend.css b/dist/plugins/legend.css new file mode 100644 index 000000000..f0b21a65c --- /dev/null +++ b/dist/plugins/legend.css @@ -0,0 +1,295 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__legend { + padding: 20px 0 10px 10px; + position: relative; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__legend__wrap { + margin-bottom: 30px; + position: relative; +} +.tau-chart__legend__wrap:last-child { + margin-bottom: 0; +} +.tau-chart__legend__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__legend__reset { + margin-top: -4px; + position: absolute; + right: -25px; + top: 0; + z-index: 1; +} +.tau-chart__legend__reset.disabled { + display: none; +} +.tau-chart__legend__reset + .tau-chart__legend__title { + margin-right: 1.7em; +} +.tau-chart__legend__item { + padding: 10px 20px 8px 40px; + position: relative; + font-size: 13px; + line-height: 1.2em; + cursor: pointer; +} +.tau-chart__legend__item:hover { + background-color: rgba(189, 195, 205, 0.2); +} +.tau-chart__legend__item--size { + cursor: default; +} +.tau-chart__legend__item--size:hover { + background: none; +} +.tau-chart__legend__item .color-default { + background: #6FA1D9; + border-color: #6FA1D9; +} +.tau-chart__legend__item:disabled, +.tau-chart__legend__item.disabled { + color: #ccc; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide { + background: transparent; +} +.tau-chart__legend__guide { + position: absolute; + box-sizing: border-box; + width: 100%; + height: 100%; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid transparent; + border-radius: 50%; +} +.tau-chart__legend__guide__wrap { + position: absolute; + top: calc((10px - 8px) + 0.6em); + left: 10px; + width: 16px; + height: 16px; +} +.tau-chart__legend__guide--size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__guide--color__overlay { + background-color: transparent; + height: 36px; + left: -12px; + position: absolute; + top: -12px; + width: 36px; +} +.tau-chart__legend__guide--color::before { + content: ""; + display: none; + height: 2px; + left: 3px; + pointer-events: none; + position: absolute; + top: 6px; + width: 8px; +} +.tau-chart__legend__guide--color::after { + content: ""; + display: none; + height: 8px; + left: 6px; + pointer-events: none; + position: absolute; + top: 3px; + width: 2px; +} +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::after { + background-color: #fff; + display: inline-block; + transform: rotate(45deg); +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover { + background: #fff; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::after { + background-color: #333; + transform: none; +} +.tau-chart__legend__size-wrapper, +.tau-chart__legend__gradient-wrapper { + box-sizing: border-box; + margin: 10px; + overflow: visible; + width: 100%; +} +.tau-chart__legend__size, +.tau-chart__legend__gradient { + overflow: visible; +} +.tau-chart__legend__size__item__circle.color-definite { + stroke: #cacaca; + fill: #cacaca; +} +.tau-chart__legend__size__item__circle.color-default-size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__gradient__bar { + rx: 4px; + ry: 4px; +} +.tau-chart__legend__item .color20-1 { + background: #6FA1D9; + border: 1px solid #6FA1D9; +} +.tau-chart__legend__item.disabled .color20-1 { + background-color: transparent; +} +.tau-chart__legend__item .color20-2 { + background: #DF2B59; + border: 1px solid #DF2B59; +} +.tau-chart__legend__item.disabled .color20-2 { + background-color: transparent; +} +.tau-chart__legend__item .color20-3 { + background: #66DA26; + border: 1px solid #66DA26; +} +.tau-chart__legend__item.disabled .color20-3 { + background-color: transparent; +} +.tau-chart__legend__item .color20-4 { + background: #4C3862; + border: 1px solid #4C3862; +} +.tau-chart__legend__item.disabled .color20-4 { + background-color: transparent; +} +.tau-chart__legend__item .color20-5 { + background: #E5B011; + border: 1px solid #E5B011; +} +.tau-chart__legend__item.disabled .color20-5 { + background-color: transparent; +} +.tau-chart__legend__item .color20-6 { + background: #3A3226; + border: 1px solid #3A3226; +} +.tau-chart__legend__item.disabled .color20-6 { + background-color: transparent; +} +.tau-chart__legend__item .color20-7 { + background: #CB461A; + border: 1px solid #CB461A; +} +.tau-chart__legend__item.disabled .color20-7 { + background-color: transparent; +} +.tau-chart__legend__item .color20-8 { + background: #C7CE23; + border: 1px solid #C7CE23; +} +.tau-chart__legend__item.disabled .color20-8 { + background-color: transparent; +} +.tau-chart__legend__item .color20-9 { + background: #7FCDC2; + border: 1px solid #7FCDC2; +} +.tau-chart__legend__item.disabled .color20-9 { + background-color: transparent; +} +.tau-chart__legend__item .color20-10 { + background: #CCA1C8; + border: 1px solid #CCA1C8; +} +.tau-chart__legend__item.disabled .color20-10 { + background-color: transparent; +} +.tau-chart__legend__item .color20-11 { + background: #C84CCE; + border: 1px solid #C84CCE; +} +.tau-chart__legend__item.disabled .color20-11 { + background-color: transparent; +} +.tau-chart__legend__item .color20-12 { + background: #54762E; + border: 1px solid #54762E; +} +.tau-chart__legend__item.disabled .color20-12 { + background-color: transparent; +} +.tau-chart__legend__item .color20-13 { + background: #746BC9; + border: 1px solid #746BC9; +} +.tau-chart__legend__item.disabled .color20-13 { + background-color: transparent; +} +.tau-chart__legend__item .color20-14 { + background: #953441; + border: 1px solid #953441; +} +.tau-chart__legend__item.disabled .color20-14 { + background-color: transparent; +} +.tau-chart__legend__item .color20-15 { + background: #5C7A76; + border: 1px solid #5C7A76; +} +.tau-chart__legend__item.disabled .color20-15 { + background-color: transparent; +} +.tau-chart__legend__item .color20-16 { + background: #C8BF87; + border: 1px solid #C8BF87; +} +.tau-chart__legend__item.disabled .color20-16 { + background-color: transparent; +} +.tau-chart__legend__item .color20-17 { + background: #BFC1C3; + border: 1px solid #BFC1C3; +} +.tau-chart__legend__item.disabled .color20-17 { + background-color: transparent; +} +.tau-chart__legend__item .color20-18 { + background: #8E5C31; + border: 1px solid #8E5C31; +} +.tau-chart__legend__item.disabled .color20-18 { + background-color: transparent; +} +.tau-chart__legend__item .color20-19 { + background: #71CE7B; + border: 1px solid #71CE7B; +} +.tau-chart__legend__item.disabled .color20-19 { + background-color: transparent; +} +.tau-chart__legend__item .color20-20 { + background: #BE478B; + border: 1px solid #BE478B; +} +.tau-chart__legend__item.disabled .color20-20 { + background-color: transparent; +} diff --git a/dist/plugins/legend.dark.css b/dist/plugins/legend.dark.css new file mode 100644 index 000000000..221a4c7eb --- /dev/null +++ b/dist/plugins/legend.dark.css @@ -0,0 +1,295 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__legend { + padding: 20px 0 10px 10px; + position: relative; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__legend__wrap { + margin-bottom: 30px; + position: relative; +} +.tau-chart__legend__wrap:last-child { + margin-bottom: 0; +} +.tau-chart__legend__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__legend__reset { + margin-top: -4px; + position: absolute; + right: -25px; + top: 0; + z-index: 1; +} +.tau-chart__legend__reset.disabled { + display: none; +} +.tau-chart__legend__reset + .tau-chart__legend__title { + margin-right: 1.7em; +} +.tau-chart__legend__item { + padding: 10px 20px 8px 40px; + position: relative; + font-size: 13px; + line-height: 1.2em; + cursor: pointer; +} +.tau-chart__legend__item:hover { + background-color: rgba(37, 39, 46, 0.2); +} +.tau-chart__legend__item--size { + cursor: default; +} +.tau-chart__legend__item--size:hover { + background: none; +} +.tau-chart__legend__item .color-default { + background: #6FA1D9; + border-color: #6FA1D9; +} +.tau-chart__legend__item:disabled, +.tau-chart__legend__item.disabled { + color: #8e8e8e; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide { + background: transparent; +} +.tau-chart__legend__guide { + position: absolute; + box-sizing: border-box; + width: 100%; + height: 100%; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid transparent; + border-radius: 50%; +} +.tau-chart__legend__guide__wrap { + position: absolute; + top: calc((10px - 8px) + 0.6em); + left: 10px; + width: 16px; + height: 16px; +} +.tau-chart__legend__guide--size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__guide--color__overlay { + background-color: transparent; + height: 36px; + left: -12px; + position: absolute; + top: -12px; + width: 36px; +} +.tau-chart__legend__guide--color::before { + content: ""; + display: none; + height: 2px; + left: 3px; + pointer-events: none; + position: absolute; + top: 6px; + width: 8px; +} +.tau-chart__legend__guide--color::after { + content: ""; + display: none; + height: 8px; + left: 6px; + pointer-events: none; + position: absolute; + top: 3px; + width: 2px; +} +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::after { + background-color: #000; + display: inline-block; + transform: rotate(45deg); +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover { + background: #000; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::after { + background-color: #fff; + transform: none; +} +.tau-chart__legend__size-wrapper, +.tau-chart__legend__gradient-wrapper { + box-sizing: border-box; + margin: 10px; + overflow: visible; + width: 100%; +} +.tau-chart__legend__size, +.tau-chart__legend__gradient { + overflow: visible; +} +.tau-chart__legend__size__item__circle.color-definite { + stroke: #cacaca; + fill: #cacaca; +} +.tau-chart__legend__size__item__circle.color-default-size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__gradient__bar { + rx: 4px; + ry: 4px; +} +.tau-chart__legend__item .color20-1 { + background: #6FA1D9; + border: 1px solid #6FA1D9; +} +.tau-chart__legend__item.disabled .color20-1 { + background-color: transparent; +} +.tau-chart__legend__item .color20-2 { + background: #DF2B59; + border: 1px solid #DF2B59; +} +.tau-chart__legend__item.disabled .color20-2 { + background-color: transparent; +} +.tau-chart__legend__item .color20-3 { + background: #66DA26; + border: 1px solid #66DA26; +} +.tau-chart__legend__item.disabled .color20-3 { + background-color: transparent; +} +.tau-chart__legend__item .color20-4 { + background: #755797; + border: 1px solid #755797; +} +.tau-chart__legend__item.disabled .color20-4 { + background-color: transparent; +} +.tau-chart__legend__item .color20-5 { + background: #E5B011; + border: 1px solid #E5B011; +} +.tau-chart__legend__item.disabled .color20-5 { + background-color: transparent; +} +.tau-chart__legend__item .color20-6 { + background: #746650; + border: 1px solid #746650; +} +.tau-chart__legend__item.disabled .color20-6 { + background-color: transparent; +} +.tau-chart__legend__item .color20-7 { + background: #CB461A; + border: 1px solid #CB461A; +} +.tau-chart__legend__item.disabled .color20-7 { + background-color: transparent; +} +.tau-chart__legend__item .color20-8 { + background: #C7CE23; + border: 1px solid #C7CE23; +} +.tau-chart__legend__item.disabled .color20-8 { + background-color: transparent; +} +.tau-chart__legend__item .color20-9 { + background: #7FCDC2; + border: 1px solid #7FCDC2; +} +.tau-chart__legend__item.disabled .color20-9 { + background-color: transparent; +} +.tau-chart__legend__item .color20-10 { + background: #CCA1C8; + border: 1px solid #CCA1C8; +} +.tau-chart__legend__item.disabled .color20-10 { + background-color: transparent; +} +.tau-chart__legend__item .color20-11 { + background: #C84CCE; + border: 1px solid #C84CCE; +} +.tau-chart__legend__item.disabled .color20-11 { + background-color: transparent; +} +.tau-chart__legend__item .color20-12 { + background: #54762E; + border: 1px solid #54762E; +} +.tau-chart__legend__item.disabled .color20-12 { + background-color: transparent; +} +.tau-chart__legend__item .color20-13 { + background: #746BC9; + border: 1px solid #746BC9; +} +.tau-chart__legend__item.disabled .color20-13 { + background-color: transparent; +} +.tau-chart__legend__item .color20-14 { + background: #A43B49; + border: 1px solid #A43B49; +} +.tau-chart__legend__item.disabled .color20-14 { + background-color: transparent; +} +.tau-chart__legend__item .color20-15 { + background: #5C7A76; + border: 1px solid #5C7A76; +} +.tau-chart__legend__item.disabled .color20-15 { + background-color: transparent; +} +.tau-chart__legend__item .color20-16 { + background: #C8BF87; + border: 1px solid #C8BF87; +} +.tau-chart__legend__item.disabled .color20-16 { + background-color: transparent; +} +.tau-chart__legend__item .color20-17 { + background: #BFC1C3; + border: 1px solid #BFC1C3; +} +.tau-chart__legend__item.disabled .color20-17 { + background-color: transparent; +} +.tau-chart__legend__item .color20-18 { + background: #AA7243; + border: 1px solid #AA7243; +} +.tau-chart__legend__item.disabled .color20-18 { + background-color: transparent; +} +.tau-chart__legend__item .color20-19 { + background: #71CE7B; + border: 1px solid #71CE7B; +} +.tau-chart__legend__item.disabled .color20-19 { + background-color: transparent; +} +.tau-chart__legend__item .color20-20 { + background: #BE478B; + border: 1px solid #BE478B; +} +.tau-chart__legend__item.disabled .color20-20 { + background-color: transparent; +} diff --git a/dist/plugins/legend.js b/dist/plugins/legend.js new file mode 100644 index 000000000..d689ca8ef --- /dev/null +++ b/dist/plugins/legend.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"),require("d3-format"));else if("function"==typeof define&&define.amd)define([,"d3-format"],t);else{var r="object"==typeof exports?t(require("taucharts"),require("d3-format")):t(e.Taucharts,e.d3);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,function(e,t){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=20)}({0:function(t,r){t.exports=e},20:function(e,t,r){"use strict";r.r(t);var n,a,i=r(0),o=r.n(i),c=r(8),l=o.a.api.utils,s=o.a.api.pluginsSDK,u=".tau-chart__legend__reset",d=".tau-chart__legend__item-color",h=".tau-chart__legend__guide--color__overlay",_=4,f=13,g=0,m=function(){return++g},p=o.a.api.utils.xml,v=function(e,t){var r=e[0],n=e[1],a=(n-r)/(t-1),i=l.range(t-2).map(function(e){return r+a*(e+1)});return[r].concat(i).concat(n)},b=function(e,t,r){if(e.length<3)return e.slice(0);if(t<3)return[e[0],e[e.length-1]];var n,a=e[0]<0?Math.abs(e[0]):0,i=function(e){return e},o="sqrt"===r?function(e){return Math.sqrt(e+a)}:i,c="sqrt"===r?function(e){return Math.pow(e,2)-a}:i,s=[(e=e.map(o))[0]],u=e[e.length-1]-e[0],d=.5*u/(t-1),h=l.range(1,t-1).map(function(e){var r=u*e/(t-1);return{min:r-d,mid:r,max:r+d,diff:Number.MAX_VALUE,closest:null}}),_=0,f=function(){if(_!==h.length){var e=n;(n=h[_++]).min=Math.max(n.min,(e&&null!==e.closest?e.closest:s[0])+d)}};return f(),e.forEach(function(e){if(!(en.max&&f();var t=Math.abs(e-n.mid);t0?Math.abs(t-e):r,i=x(a),o=Math.abs(n-i);return Math.abs(n)>3&&o<=3?M:function(e){var t=x(r-e),n=Math.min((i<0?Math.abs(i):0)+(t0,o=this._fill.length>0,c=this._size.length>0;if(this._assignStaticBrewersOrEx(),a||o||c){switch(t.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}a&&(i(this._container,"click",u,function(e,t){this._toggleLegendItem(t,"reset")}.bind(this)),i(this._container,"click",d,function(e,t){var r=e.ctrlKey||e.target.matches(h)?"leave-others":"focus-single";this._toggleLegendItem(t,r)}.bind(this)),i(this._container,"mouseover",d,function(e,t){this._highlightToggle(t,!0)}.bind(this)),i(this._container,"mouseout",d,function(e,t){this._highlightToggle(t,!1)}.bind(this)))}},destroy:function(){var e=this._currentFilters,t=this._chart;Object.keys(e).forEach(function(r){return t.removeFilter(e[r])}),this._container&&this._container.parentElement&&(this._clearPanel(),this._container.parentElement.removeChild(this._container))},onSpecReady:function(e,r){this._formatters=s.getFieldFormatters(r,t.formatters)},_getFormat:function(e){return this._formatters[e]?this._formatters[e].format:function(e){return String(e)}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:'
',_template:l.template(['
',"<%=top%>",'
<%=name%>
',"<%=items%>","
"].join("")),_itemTemplate:l.template(["
\">",'
','
','
',"
","
","
",' <%=label%>',"
"].join("")),_resetTemplate:l.template(['
','
Reset
',"
"].join("")),_clearPanel:function(){this._container&&(clearTimeout(this._scrollTimeout),this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var e=this;e._fill.forEach(function(t){var r,a,i,o=e._chart.select(function(e){return e.config.color===t})[0];if(o){var c=o.config.guide||{},u=o.getScale("color"),d=u.domain().sort(function(e,t){return e-t}),h=n(d),_=h?d.map(Number):d,g=T(_[0],_[_.length-1]),m=function(){var t=e._chart.getSpec(),r=s.extractFieldsFormatInfo(t)[u.dim].format;return r||(r=function(e){return new Date(e)}),function(e){return String(r(e))}}(),b=h?m:g,y=u.brewer.length,x=((c.color||{}).label||{}).text||u.dim,w=function(e){return e.length*f*.618},S=u.isInteger?(_[1]-_[0])%3==0?4:(_[1]-_[0])%2==0?3:2:3,M=v(_,S),L=(h?M.map(function(e){return new Date(e)}):M).map(b);L[0]===L[L.length-1]&&(L=[L[0]]),e._container.insertAdjacentHTML("beforeend",e._template({name:x,top:null,items:'
'}));var C=e._container.lastElementChild.querySelector(".tau-chart__legend__gradient-wrapper"),A=C.getBoundingClientRect().width,F=!1;L.reduce(function(e,t){return e+w(t)},0)>A&&(L.length>1&&w(L[0])+w(L[L.length-1])>A?F=!0:L=[L[0],L[L.length-1]]);var E=F?(i=-.382*f/2,{width:A,height:120,barX:0,barY:0,barWidth:20,barHeight:120,textAnchor:"start",textX:l.range(S).map(function(){return 25}),textY:1===L.length?60+.618*f:L.map(function(e,t){var r=(L.length-1-t)/(L.length-1);return f*(1-r)+120*r+i})}):(r=w(L[0])/2,a=w(L[L.length-1])/2,{width:A,height:28+f,barX:0,barY:0,barWidth:A,barHeight:20,textAnchor:"middle",textX:1===L.length?[A/2]:L.map(function(e,t){var n=t/(L.length-1);return r*(1-n)+(A-a)*n}),textY:l.range(S).map(function(){return 28+f})}),j=v(_,y).map(function(e,t){return p("stop",{offset:t/(y-1)*100+"%",style:"stop-color:"+u(e)+';stop-opacity:1"'})}),k="legend-gradient-"+e.instanceId,I=p.apply(void 0,["svg",{class:"tau-chart__legend__gradient",width:E.width,height:E.height},p("defs",p.apply(void 0,["linearGradient",{id:k,x1:"0%",y1:F?"100%":"0%",x2:F?"0%":"100%",y2:"0%"}].concat(j))),p("rect",{class:"tau-chart__legend__gradient__bar",x:E.barX,y:E.barY,width:E.barWidth,height:E.barHeight,fill:"url(#"+k+")"})].concat(L.map(function(e,t){return p("text",{x:E.textX[t],y:E.textY[t],"text-anchor":E.textAnchor},e)})));C.insertAdjacentHTML("beforeend",I)}})},_drawSizeLegend:function(){var e=this;e._size.forEach(function(t){var r=e._chart.select(function(e){return e.config.size===t})[0];if(r){var n=r.config.guide||{},a=r.getScale("size"),i=a.domain().sort(function(e,t){return e-t});if(!Array.isArray(i)||!i.every(isFinite))return;var o=((n.size||{}).label||{}).text||a.dim,c=i[0],s=i[i.length-1],u=[c];if(s-c){var d=y(s-c),h=Math.round(4-d),g=Math.pow(10,h),m=l.unique(e._chart.getDataSources({excludeFilter:["legend"]})[a.source].data.map(function(e){return e[a.dim]}).filter(function(e){return e>=c&&e<=s})).sort(function(e,t){return e-t}),v=b(m,_,a.funcType);u=l.unique(v.map(function(e){return Math.round(e*g)/g}))}var x=T(u[0],u[u.length-1]),w=function(e){return e.length*f*.618};u.reverse();var S=u.map(a),M=Math.max.apply(null,S),L=u.map(x);e._container.insertAdjacentHTML("beforeend",e._template({name:o,top:null,items:'
'}));var C=e._container.lastElementChild.querySelector(".tau-chart__legend__size-wrapper"),A=C.getBoundingClientRect().width,F=!1;(Math.max.apply(null,L.map(w))>A/4||1===L.length)&&(F=!0);var E=F?function(){for(var e,t,r=f,n=S[0]/2,a=S[S.length-1]/2,i=[n],o=1;o0&&(e._updateResetButtonPosition(),e._scrollTimeout=null,e._scrollListener=function(){var t=e._container.querySelector(u);t.style.display="none",e._scrollTimeout&&clearTimeout(e._scrollTimeout),e._scrollTimeout=setTimeout(function(){e._updateResetButtonPosition(),t.style.display="",e._scrollTimeout=null},250)},e._getScrollContainer().addEventListener("scroll",e._scrollListener))},_toggleLegendItem:function(e,t){var r=this._currentFilters,n=e?Array.prototype.filter.call(e.parentNode.childNodes,function(e){return e.matches(d)}):null,i=function(e){var t=e.getAttribute("data-dim"),r=e.getAttribute("data-value");return{sid:e.getAttribute("data-scale-id"),dim:t,val:r,key:t+r}},o=function(e){return e in r},c=function(e,t){var n=i(e);if(o(n.key)===t)if(t){var c=r[n.key];delete r[n.key],e.classList.remove("disabled"),this._chart.removeFilter(c)}else{e.classList.add("disabled");var l=a(n.dim,n.val);r[n.key]=this._chart.addFilter({tag:"legend",predicate:function(e){return!l(e)}})}}.bind(this),l=function(t){return t===e},s=!!e&&o(i(e).key),u=function(e,t){e.querySelector(".tau-chart__legend__guide").style.backgroundColor=t?"":"transparent"};if("reset"===t)n.forEach(function(e){c(e,!0),u(e,!0)});else if("leave-others"===t)n.forEach(function(e){l(e)&&c(e,s)}),u(e,s);else if("focus-single"===t){var h=!s&&n.every(function(e){return l(e)||o(i(e).key)});n.forEach(function(e){var t=l(e)||h;c(e,t)}),s&&u(e,!0)}this._chart.refresh()},_highlightToggle:function(e,t){if(!e.matches(".disabled")){var r=e.getAttribute("data-dim"),n=e.getAttribute("data-value"),i=t?a(r,n):function(e){return null};this._chart.select(function(e){return!0}).forEach(function(e){e.fire("highlight",i)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){this._container.querySelector(u).style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(e,t){var r=t.length;return e.reduce(function(e,n,a){return e[n]=t[a%r],e},{})},_assignStaticBrewersOrEx:function(){var e=this;e._color.forEach(function(t){var r=e._chart.getSpec().scales[t],n=e._chart.getDataSources({excludeFilter:["legend"]}),a=e._chart.getScaleFactory(n).createScaleInfoByName(t).domain();if(!r.brewer||Array.isArray(r.brewer)){var i=r.brewer||l.range(20).map(function(e){return"color20-"+(1+e)});r.brewer=e._generateColorMap(a,i)}e._legendOrderState[t]=a.reduce(function(e,t,r){return e[t]=r,e},{})})}}}o.a.api.plugins.add("legend",L),t.default=L},8:function(e,r){e.exports=t}})}); \ No newline at end of file diff --git a/dist/plugins/parallel-brushing.js b/dist/plugins/parallel-brushing.js new file mode 100644 index 000000000..1a5d9aea3 --- /dev/null +++ b/dist/plugins/parallel-brushing.js @@ -0,0 +1 @@ +!function(e,r){if("object"==typeof exports&&"object"==typeof module)module.exports=r(require("taucharts"));else if("function"==typeof define&&define.amd)define([],r);else{var t="object"==typeof exports?r(require("taucharts")):r(e.Taucharts);for(var n in t)("object"==typeof exports?exports:e)[n]=t[n]}}(window,function(e){return function(e){var r={};function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=19)}({0:function(r,t){r.exports=e},19:function(e,r,t){"use strict";t.r(r);var n=t(0),i=t.n(n),u=i.a.api.utils;function o(e){var r=u.defaults(e||{},{verbose:!1,forceBrush:{}}),t={init:function(e){r.verbose&&(this.panel=e.insertToRightSidebar(this.template())),e.traverseSpec(e.getSpec(),function(e){e&&"COORDS.PARALLEL"===e.type&&(e.guide=e.guide||{},e.guide.enableBrushing=!0)}),t.forceBrush=r.forceBrush||{}},onRender:function(e){var n=e.getSpec().scales,i=Object.keys(n).reduce(function(e,r){var i=n[r].dim;return t.forceBrush[i]&&(e[r]=t.forceBrush[i]),e},{}),u=e.select(function(e){return"PARALLEL/ELEMENT.LINE"===e.config.type});u.forEach(function(e,n){e.parentUnit.on("brush",function(i,u){t.forceBrush={};var o=u.map(function(e){var r=e.dim,n=e.func,i=e.args;t.forceBrush[r]=i;var u=function(){return!0};return"between"===n&&(u=function(e){return e[r]>=i[0]&&i[1]>=e[r]}),"inset"===n&&(u=function(e){return i.indexOf(e[r])>=0}),u}),c=0;if(e.fire("highlight",function(e){var r=o.every(function(r){return r(e)});return c+=r?1:0,r}),r.verbose){var a=t.panel.getElementsByClassName("i-"+n);if(0===a.length){var f=document.createElement("div");f.className="i-"+n,t.panel.appendChild(f),a[0]=f}a[0].innerHTML=u.reduce(function(e,r){return e+"
"+r.dim+": ["+r.args.join(",")+"]
"},"
Matched: "+c+"
")}})}),u.forEach(function(e){e.parentUnit.fire("force-brush",i)})},template:u.template('
')};return t}i.a.api.plugins.add("parallel-brushing",o),r.default=o}})}); \ No newline at end of file diff --git a/dist/plugins/parallel-tooltip.js b/dist/plugins/parallel-tooltip.js new file mode 100644 index 000000000..36ebca681 --- /dev/null +++ b/dist/plugins/parallel-tooltip.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"));else if("function"==typeof define&&define.amd)define([],e);else{var o="object"==typeof exports?e(require("taucharts")):e(t.Taucharts);for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(window,function(t){return function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=18)}({0:function(e,o){e.exports=t},18:function(t,e,o){"use strict";o.r(e);var i=o(0),n=o.n(i),r=n.a.api.utils;function a(t){r.defaults(t||{},{});return{init:function(t){this._cursor=null,this._chart=t,this._tooltip=t.addBalloon({spacing:3,auto:!0,effectClass:"fade"}),this._tooltip.content(this.template),this._tooltip.getElement().addEventListener("click",function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.classList.contains("i-role-exclude")&&o._exclude(),e=e.parentNode;o._tooltip.hide()},!1);var e,o=this;this.showTooltip=function(t){clearTimeout(e),o._cursor=t.data;var i=o._tooltip.getElement().querySelectorAll(".i-role-content");i[0]&&(i[0].innerHTML=Object.keys(t.data).map(function(e){return o.itemTemplate({label:e,value:t.data[e]})}).join("")),o._tooltip.show(t.event.pageX,t.event.pageY).updateSize()},this.hideTooltip=function(t){e=setTimeout(function(){o._tooltip.hide()},1e3)},this._tooltip.getElement().addEventListener("mouseover",function(t){clearTimeout(e)},!1),this._tooltip.getElement().addEventListener("mouseleave",function(t){o._tooltip.hide()},!1)},_exclude:function(){var t;this._chart.addFilter({tag:"exclude",predicate:(t=this._cursor,function(e){return JSON.stringify(e)!==JSON.stringify(t)})}),this._chart.refresh()},onRender:function(t){var e=this;t.select(function(t){return"PARALLEL/ELEMENT.LINE"===t.config.type}).forEach(function(t){t.on("mouseout",function(t,o){e.hideTooltip(o)}),t.on("mouseover",function(t,o){e.showTooltip(o)})})},template:['
','
','
','',"Exclude","
","
","
",'
'].join(""),itemTemplate:r.template(['
','
<%=label%>
','
<%=value%>
',"
"].join(""))}}n.a.api.plugins.add("parallel-tooltip",a),e.default=a}})}); \ No newline at end of file diff --git a/dist/plugins/quick-filter.css b/dist/plugins/quick-filter.css new file mode 100644 index 000000000..0007ebe7d --- /dev/null +++ b/dist/plugins/quick-filter.css @@ -0,0 +1,52 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__filter__wrap { + padding: 20px 0 10px 10px; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__filter__wrap__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__filter__wrap rect { + fill: rgba(0, 0, 0, 0.2); +} +.tau-chart__filter__wrap .brush .overlay, +.tau-chart__filter__wrap .brush .handle { + opacity: 0; +} +.tau-chart__filter__wrap .brush .selection { + shape-rendering: crispEdges; + fill-opacity: 0.4; + fill: #0074FF; +} +.tau-chart__filter__wrap text.date-label { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap text.date-label .common { + font-weight: 600; +} +.tau-chart__filter__wrap .resize line { + stroke: #000; + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__filter__wrap .resize.e text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap .resize.w text { + text-anchor: middle; + font-size: 12px; +} diff --git a/dist/plugins/quick-filter.dark.css b/dist/plugins/quick-filter.dark.css new file mode 100644 index 000000000..0007ebe7d --- /dev/null +++ b/dist/plugins/quick-filter.dark.css @@ -0,0 +1,52 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__filter__wrap { + padding: 20px 0 10px 10px; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__filter__wrap__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__filter__wrap rect { + fill: rgba(0, 0, 0, 0.2); +} +.tau-chart__filter__wrap .brush .overlay, +.tau-chart__filter__wrap .brush .handle { + opacity: 0; +} +.tau-chart__filter__wrap .brush .selection { + shape-rendering: crispEdges; + fill-opacity: 0.4; + fill: #0074FF; +} +.tau-chart__filter__wrap text.date-label { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap text.date-label .common { + font-weight: 600; +} +.tau-chart__filter__wrap .resize line { + stroke: #000; + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__filter__wrap .resize.e text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap .resize.w text { + text-anchor: middle; + font-size: 12px; +} diff --git a/dist/plugins/quick-filter.js b/dist/plugins/quick-filter.js new file mode 100644 index 000000000..e532e98c0 --- /dev/null +++ b/dist/plugins/quick-filter.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"),require("d3-array"),require("d3-time-format"),require("d3-scale"),require("d3-brush"));else if("function"==typeof define&&define.amd)define([,"d3-selection","d3-array","d3-time-format","d3-scale","d3-brush"],e);else{var r="object"==typeof exports?e(require("taucharts"),require("d3-selection"),require("d3-array"),require("d3-time-format"),require("d3-scale"),require("d3-brush")):e(t.Taucharts,t.d3,t.d3,t.d3,t.d3,t.d3);for(var i in r)("object"==typeof exports?exports:t)[i]=r[i]}}(window,function(t,e,r,i,n,a){return function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=17)}([function(e,r){e.exports=t},function(t,r){t.exports=e},,function(t,e){t.exports=r},,function(t,e){t.exports=i},function(t,e){t.exports=n},function(t,e){t.exports=a},,,,,,,,,,function(t,e,r){"use strict";r.r(e);var i=r(0),n=r.n(i),a=r(3),s=r(7),o=r(6),l=r(1),c=r(5),u=(Object.assign||function(t){for(var e,r=1,i=arguments.length;r0?a:Object.keys(n.dims),this._applyImmediately=Boolean(t&&t.applyImmediately);var s=r._chart.getChartModelData();this._filtersContainer=r._chart.insertToRightSidebar(r._filtersContainer),this._filtersContainer.style.maxHeight="0px",r._fields.filter(function(t){var e="measure"===n.dims[t].type;return e||i.settings.log("The ["+t+"] isn't measure so Quick Filter plugin skipped it"),e}).forEach(function(t){r._data[t]=s.map(function(e){return e[t]}),r._bounds[t]=u.extent(r._data[t]),r._filter[t]=r._bounds[t],r._filtersContainer.insertAdjacentHTML("beforeend",r._filterWrapper({name:t})),r._container[t]=r._filtersContainer.lastChild,r._drawFilter(t)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:'
',_filterWrapper:f.template('
<%=name%>
'),_drawFilter:function(t){var e=this._data[t],r=this._bounds[t],i=this._filter[t],n=f.isDate(r[0])||f.isDate(r[1]),a=this,s=0,o=24,c=21,d=12,h=180-d-o,p=41-s-c-8,_=u.scaleLinear().domain(r).range([0,h]),m=u.brushX().extent([[0,0],[h,20]]).on("start",function(){a._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?j:F).on("end",function(){a._layout.style["overflow-y"]="",j()}),v=u.select(this._container[t]).append("svg").attr("width",h+d+o).attr("height",p+s+c+4).append("g").attr("transform","translate("+d+","+s+")"),y=(v.append("g").selectAll("rect").data(e).enter().append("rect").attr("transform",function(t){return"translate("+_(t)+","+(s+4)+")"}).attr("height",p).attr("width",1),v.append("g").attr("class","brush").call(m));y.append("g").attr("class","resize e").attr("cursor","ew-resize").attr("pointer-events","none"),y.append("g").attr("class","resize w").attr("cursor","ew-resize").attr("pointer-events","none"),y.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",p+8),y.selectAll(".resize").append("text").attr("x",0).attr("y",2*(p+4)),y.selectAll("rect").attr("height",p+8);var g=v.append("text").attr("x",h/2).attr("y",2*(p+4)).attr("class","date-label"),x=function(t){return Math.log(t)/Math.LN10}(a._filter[t][1]-a._filter[t][0]),b=Math.round(3-x),w=Math.pow(10,b);if(n){var q=function(t){var e=t.findIndex(function(t){var e=u.timeFormat(t);return e(new Date(r[0]))!==e(new Date(r[1]))});return e=e<0?t.length:e,{comm:t.slice(0,e),diff:t.slice(e)}}(["’%y"," %b","%d","%H",":%M",":%S"]);q.comm.length<3?(q.diff.splice(-3),q.diff.reverse(),q.comm.reverse()):(q.comm.length<5&&q.diff.pop(),q.diff=q.comm.splice(3,q.comm.length-3).concat(q.diff),q.comm.reverse())}function F(){var e=l.event;if(e&&Array.isArray(e.selection)){var r=e.selection.map(_.invert);i=r,a._filter[t]=r}else i=a._filter[t];var s=n?new Date(i[0]).getTime():i[0],o=n?new Date(i[1]).getTime():i[1],c=Math.round(parseFloat(s)*w)/w,f=Math.round(parseFloat(o)*w)/w;y.select(".handle--w"),y.select(".handle--e");y.select(".resize.w").attr("transform","translate("+_(i[0])+",0)"),y.select(".resize.e").attr("transform","translate("+_(i[1])+",0)");var d=y.selectAll(".w text"),h=y.selectAll(".e text");if(n){var p=u.timeFormat(q.comm.join("")),m=u.timeFormat(q.diff.join(""));g.html(m(new Date(c))+" .. "+m(new Date(f))+' '+p(new Date(f))+"")}else d.text(c),h.text(f)}function j(){F(),a._applyFilter(t)}j(),m.move(y,i.map(_))},destroy:function(){var t=this._currentFilters,e=this._chart;Object.keys(t).forEach(function(r){return e.removeFilter(t[r])});var r;(r=this._filtersContainer)&&r.parentElement&&r.parentElement.removeChild(r)},_applyFilter:function(t){var e=this._currentFilters,r=function(t,e,r){return function(i){var n=i[t];return nr}}(t,this._filter[t][0],this._filter[t][1]),i=e[t];delete e[t],this._chart.removeFilter(i),e[t]=this._chart.addFilter({tag:"quick-filter",predicate:function(t){return!r(t)}}),d<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),d))}}}n.a.api.plugins.add("quick-filter",h),e.default=h}])}); \ No newline at end of file diff --git a/dist/plugins/settings.js b/dist/plugins/settings.js new file mode 100644 index 000000000..2d5e4b7ec --- /dev/null +++ b/dist/plugins/settings.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"));else if("function"==typeof define&&define.amd)define([],t);else{var n="object"==typeof exports?t(require("taucharts")):t(e.Taucharts);for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}({0:function(t,n){t.exports=e},16:function(e,t,n){"use strict";n.r(t);var o=n(0),r=n.n(o),i=r.a.api.utils;function s(e){var t=i.defaults(e||{},{show:!0,modes:["normal","entire-view","fit-width","fit-height","minimal"]});return{init:function(e){t.show&&(t.selectedMode=e.getSpec().settings.fitModel,e.insertToHeader(this.template({modes:t.modes.map(function(e){return""})})).addEventListener("change",function(n){var o=n.target;o.classList.contains("i-role-fit-model")&&(t.selectedMode=o.value,e.getSpec().settings.fitModel=t.selectedMode,e.refresh())},!1))},template:i.template(['
',"
"," View Mode: ",' ","
","
"].join(""))}}r.a.api.plugins.add("settings",s),t.default=s}})}); \ No newline at end of file diff --git a/dist/plugins/tooltip.css b/dist/plugins/tooltip.css new file mode 100644 index 000000000..d0b93951b --- /dev/null +++ b/dist/plugins/tooltip.css @@ -0,0 +1,161 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__tooltip { + background: rgba(255, 255, 255, 0.9); + position: absolute; + top: 0; + left: 0; + max-width: none; + z-index: 900; + align-items: stretch; + display: flex; + flex-direction: column; + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); + font-size: 11px; + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; + /* Fade */ +} +.tau-chart__tooltip.fade { + opacity: 0; + transition: opacity 200ms ease-out; +} +.tau-chart__tooltip.fade.in { + opacity: 1; + transition-duration: 500ms; +} +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.bottom-right { + margin-left: 8px; +} +.tau-chart__tooltip.top-left, +.tau-chart__tooltip.bottom-left { + margin-left: -8px; +} +.tau-chart__tooltip.top, +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.top-left { + margin-top: 8px; +} +.tau-chart__tooltip__content { + box-sizing: border-box; + max-width: 500px; + min-width: 100px; + overflow: hidden; + padding: 15px 15px 10px 15px; +} +.tau-chart__tooltip__buttons { + background: #EBEEF1; + bottom: 100%; + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); + display: flex; + flex-direction: row; + flex-wrap: wrap; + max-width: 500px; + min-width: 86px; + position: absolute; + width: 100%; + z-index: -1; +} +.tau-chart__tooltip__buttons::after { + background: linear-gradient(to bottom, #fff 50%, rgba(255, 255, 255, 0)); + content: ""; + display: block; + height: 8px; + left: 0; + pointer-events: none; + position: absolute; + top: 100%; + width: 100%; +} +.tau-chart__tooltip__button { + color: #65717F; + cursor: pointer; + display: inline-flex; + flex: 1 0 auto; + height: 0; + overflow: hidden; + transition: height 500ms; +} +.tau-chart__tooltip__button__wrap { + line-height: 26px; + padding: 0 15px; +} +.tau-chart__tooltip__button:hover { + background: #f5f7f8; + color: #333; +} +.tau-chart__tooltip__button .tau-icon-close-gray { + background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggZmlsbD0iIzg0OTZBNyIgZD0iTTEwLDAuNzE1TDkuMjg1LDBMNSw0LjI4NUwwLjcxNSwwTDAsMC43MTVMNC4yODUsNUwwLDkuMjg1TDAuNzE1LDEwTDUsNS43MTVMOS4yODUsMTBMMTAsOS4yODVMNS43MTUsNUwxMCwwLjcxNXoiLz48L3N2Zz4=); + display: inline-block; + width: 12px; + height: 12px; + position: relative; + top: 3px; + margin-right: 5px; +} +.tau-chart__tooltip.stuck .tau-chart__tooltip__button { + height: 26px; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons { + bottom: initial; + top: 100%; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons::after { + background: linear-gradient(to top, #fff 50%, rgba(255, 255, 255, 0)); + bottom: 100%; + top: initial; +} +.tau-chart__tooltip.top-right .tau-chart__tooltip__button__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__button__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip__list { + display: table; +} +.tau-chart__tooltip__list__item { + display: table-row; +} +.tau-chart__tooltip__list__elem { + display: table-cell; + padding-bottom: 4px; + line-height: 1.3; + color: #000; +} +.tau-chart__tooltip__list__elem:not(:first-child) { + padding-left: 15px; +} +.tau-chart__tooltip__list__elem:first-child { + color: #8e8e8e; +} +.tau-chart__tooltip__gray-text { + color: #8e8e8e; +} +.tau-chart__tooltip-target { + cursor: pointer; +} +.tau-chart__tooltip-target .tau-chart__dot.tau-chart__highlighted, +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted, +.tau-chart__tooltip-target .i-data-anchor.tau-chart__highlighted { + stroke: #333; + stroke-width: 1; +} +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted { + shape-rendering: crispEdges; +} diff --git a/dist/plugins/tooltip.dark.css b/dist/plugins/tooltip.dark.css new file mode 100644 index 000000000..89c24e57b --- /dev/null +++ b/dist/plugins/tooltip.dark.css @@ -0,0 +1,161 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__tooltip { + background: rgba(0, 0, 0, 0.9); + position: absolute; + top: 0; + left: 0; + max-width: none; + z-index: 900; + align-items: stretch; + display: flex; + flex-direction: column; + box-shadow: 0 1px 4px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.005); + font-size: 11px; + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; + /* Fade */ +} +.tau-chart__tooltip.fade { + opacity: 0; + transition: opacity 200ms ease-out; +} +.tau-chart__tooltip.fade.in { + opacity: 1; + transition-duration: 500ms; +} +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.bottom-right { + margin-left: 8px; +} +.tau-chart__tooltip.top-left, +.tau-chart__tooltip.bottom-left { + margin-left: -8px; +} +.tau-chart__tooltip.top, +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.top-left { + margin-top: 8px; +} +.tau-chart__tooltip__content { + box-sizing: border-box; + max-width: 500px; + min-width: 100px; + overflow: hidden; + padding: 15px 15px 10px 15px; +} +.tau-chart__tooltip__buttons { + background: #EBEEF1; + bottom: 100%; + box-shadow: 0 1px 4px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.005); + display: flex; + flex-direction: row; + flex-wrap: wrap; + max-width: 500px; + min-width: 86px; + position: absolute; + width: 100%; + z-index: -1; +} +.tau-chart__tooltip__buttons::after { + background: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, 0)); + content: ""; + display: block; + height: 8px; + left: 0; + pointer-events: none; + position: absolute; + top: 100%; + width: 100%; +} +.tau-chart__tooltip__button { + color: #65717F; + cursor: pointer; + display: inline-flex; + flex: 1 0 auto; + height: 0; + overflow: hidden; + transition: height 500ms; +} +.tau-chart__tooltip__button__wrap { + line-height: 26px; + padding: 0 15px; +} +.tau-chart__tooltip__button:hover { + background: #767779; + color: #fff; +} +.tau-chart__tooltip__button .tau-icon-close-gray { + background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggZmlsbD0iIzg0OTZBNyIgZD0iTTEwLDAuNzE1TDkuMjg1LDBMNSw0LjI4NUwwLjcxNSwwTDAsMC43MTVMNC4yODUsNUwwLDkuMjg1TDAuNzE1LDEwTDUsNS43MTVMOS4yODUsMTBMMTAsOS4yODVMNS43MTUsNUwxMCwwLjcxNXoiLz48L3N2Zz4=); + display: inline-block; + width: 12px; + height: 12px; + position: relative; + top: 3px; + margin-right: 5px; +} +.tau-chart__tooltip.stuck .tau-chart__tooltip__button { + height: 26px; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons { + bottom: initial; + top: 100%; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons::after { + background: linear-gradient(to top, #000 50%, rgba(0, 0, 0, 0)); + bottom: 100%; + top: initial; +} +.tau-chart__tooltip.top-right .tau-chart__tooltip__button__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__button__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip__list { + display: table; +} +.tau-chart__tooltip__list__item { + display: table-row; +} +.tau-chart__tooltip__list__elem { + display: table-cell; + padding-bottom: 4px; + line-height: 1.3; + color: #fff; +} +.tau-chart__tooltip__list__elem:not(:first-child) { + padding-left: 15px; +} +.tau-chart__tooltip__list__elem:first-child { + color: #ccc; +} +.tau-chart__tooltip__gray-text { + color: #ccc; +} +.tau-chart__tooltip-target { + cursor: pointer; +} +.tau-chart__tooltip-target .tau-chart__dot.tau-chart__highlighted, +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted, +.tau-chart__tooltip-target .i-data-anchor.tau-chart__highlighted { + stroke: #fff; + stroke-width: 1; +} +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted { + shape-rendering: crispEdges; +} diff --git a/dist/plugins/tooltip.js b/dist/plugins/tooltip.js new file mode 100644 index 000000000..62405c824 --- /dev/null +++ b/dist/plugins/tooltip.js @@ -0,0 +1 @@ +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],e);else{var i="object"==typeof exports?e(require("taucharts"),require("d3-selection")):e(t.Taucharts,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t,e){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=15)}({0:function(e,i){e.exports=t},1:function(t,i){t.exports=e},15:function(t,e,i){"use strict";i.r(e);var n=i(0),s=i.n(n),o=i(4);function r(t){return new o.a(t)}s.a.api.plugins.add("tooltip",r),e.default=r},2:function(t,e,i){"use strict";i.d(e,"a",function(){return n}),i.d(e,"b",function(){return s});var n="tau-chart__tooltip";function s(t,e){return{render:function(t){return this.args=t,t=Object.assign({},t,{fields:this.filterFields(t.fields)}),this.rootTemplate(t)},rootTemplate:function(t){return['
',this.buttonsTemplate(),"
",'
',this.contentTemplate(t),"
"].join("\n")},contentTemplate:function(t){return this.fieldsTemplate(t)},filterFields:function(e){return e.filter(function(e){var i=e.split(".");return!(2===i.length&&t.skipInfo[i[0]])})},getLabel:function(e){return t.getFieldLabel(e)},getFormatter:function(e){return t.getFieldFormat(e)},fieldsTemplate:function(t){var e=this,i=t.data;return t.fields.map(function(t){return e.itemTemplate({data:i,field:t})}).join("\n")},itemTemplate:function(t){var e=t.data,i=t.field,s=this.getLabel(i),o=this.getFormatter(i)(e[i]);return['
','
'+s+"
",'
'+o+"
","
"].join("\n")},buttonsTemplate:function(){return[this.buttonTemplate({cls:"i-role-exclude",text:"Exclude",icon:function(){return''}})].join("\n")},buttonTemplate:function(t){var e=t.icon,i=t.text,s=t.cls;return['
','
'," "+(e?e()+" ":"")+i,"
","
"].join("\n")},didMount:function(){var e=t.getDomNode().querySelector(".i-role-exclude");e&&e.addEventListener("click",function(){t.excludeHighlightedElement(),t.setState({highlight:null,isStuck:!1})})}}}},4:function(t,e,i){"use strict";var n=i(0),s=i.n(n),o=i(1),r=i(2),l=s.a.api.utils,a=s.a.api.domUtils,c=s.a.api.pluginsSDK,u="tau-chart__tooltip",h=function(){function t(t){this.settings=l.defaults(t||{},{align:"bottom-right",clickable:!0,clsClickable:u+"__clickable",clsStuck:"stuck",clsTarget:u+"-target",escapeHtml:!0,fields:null,formatters:{},getTemplate:null,spacing:24,winBound:12}),this.onRender=this._getRenderHandler()}return t.prototype.init=function(t){this._chart=t,this._tooltip=this._chart.addBalloon({spacing:this.settings.spacing,winBound:this.settings.winBound,auto:!0,effectClass:"fade"}),this._initDomEvents(),this.state={highlight:null,isStuck:!1},this.setState(this.state),this._template=this._getTemplate()},t.prototype._getTemplate=function(){var t=Object(r.b)(this,this.settings);return"function"==typeof this.settings.getTemplate?this.settings.getTemplate(t,this,this.settings):t},t.prototype._renderTemplate=function(t,e){return this._template.render({data:t,fields:e})},t.prototype._initDomEvents=function(){var t=this;this._scrollHandler=function(){t.setState({highlight:null,isStuck:!1})},window.addEventListener("scroll",this._scrollHandler,!0),this.settings.clickable&&(this._outerClickHandler=function(e){var i=Array.from(document.querySelectorAll("."+t.settings.clsClickable)).concat(t.getDomNode()).map(function(t){return t.getBoundingClientRect()}),n=Math.min.apply(Math,i.map(function(t){return t.top})),s=Math.min.apply(Math,i.map(function(t){return t.left})),o=Math.max.apply(Math,i.map(function(t){return t.right})),r=Math.max.apply(Math,i.map(function(t){return t.bottom}));(e.clientXo||e.clientYr)&&t.setState({highlight:null,isStuck:!1})})},t.prototype.getDomNode=function(){return this._tooltip.getElement()},t.prototype.setState=function(t){var e=this,i=this.settings,n=this.state,s=this.state=Object.assign({},n,t);n.highlight=n.highlight||{data:null,cursor:null,unit:null},s.highlight=s.highlight||{data:null,cursor:null,unit:null},s.isStuck&&n.highlight.data&&(s.highlight=n.highlight),s.highlight.data!==n.highlight.data&&(s.highlight.data?(this._hideTooltip(),this._showTooltip(s.highlight.data,s.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){e._setTargetSvgClass(!0)})):s.isStuck||!n.highlight.data||s.highlight.data||(this._removeFocus(),this._hideTooltip(),this._setTargetSvgClass(!1))),!s.highlight.data||n.highlight.cursor&&s.highlight.cursor.x===n.highlight.cursor.x&&s.highlight.cursor.y===n.highlight.cursor.y||(this._tooltip.position(s.highlight.cursor.x,s.highlight.cursor.y),this._tooltip.updateSize());var o=this.getDomNode();this.settings.clickable&&s.isStuck!==n.isStuck&&(s.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),o.classList.add(i.clsStuck),this._setTargetEventsEnabled(!1),this._accentFocus(s.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),o.classList.remove(i.clsStuck),requestAnimationFrame(function(){e._setTargetEventsEnabled(!0);var t=e._chart.getSVG();t&&a.dispatchMouseEvent(t,"mouseleave")})))},t.prototype._showTooltip=function(t,e){var i=this.settings,n=i.fields||"function"==typeof i.getFields&&i.getFields(this._chart)||Object.keys(t),s=this._renderTemplate(t,n);this._tooltip.content(s).position(e.x,e.y).place(i.align).show().updateSize(),this._template.didMount&&this._template.didMount()},t.prototype._hideTooltip=function(){window.removeEventListener("click",this._outerClickHandler,!0),this._template.willUnmount&&this._template.willUnmount(),this._tooltip.hide()},t.prototype.destroy=function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},t.prototype._subscribeToHover=function(){var t=this,e=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(t){return e.indexOf(t.config.type)>=0}).forEach(function(e){e.on("data-hover",function(e,i){var n=document.body.getBoundingClientRect();t.setState({highlight:i.data?{data:i.data,cursor:{x:i.event.clientX-n.left,y:i.event.clientY-n.top},unit:i.unit}:null})}),t.settings.clickable&&e.on("data-click",function(e,i){var n=document.body.getBoundingClientRect();t.setState(i.data?{highlight:{data:i.data,cursor:{x:i.event.clientX-n.left,y:i.event.clientY-n.top},unit:i.unit},isStuck:!0}:{highlight:null,isStuck:null})})})},t.prototype.getFieldFormat=function(t){var e=this._formatters[t]?this._formatters[t].format:function(t){return String(t)};return this.settings.escapeHtml?function(t){return l.escapeHtml(e(t))}:e},t.prototype.getFieldLabel=function(t){var e=this._formatters[t]?this._formatters[t].label:t;return this.settings.escapeHtml?l.escapeHtml(e):e},t.prototype._accentFocus=function(t){var e=function(e){return e===t};this._chart.select(function(){return!0}).forEach(function(t){t.fire("highlight",e)})},t.prototype._removeFocus=function(){var t=function(){return null};this._chart.select(function(){return!0}).forEach(function(e){e.fire("highlight",t),e.fire("highlight-data-points",t)})},t.prototype.excludeHighlightedElement=function(){var t=this.state.highlight.data;this._chart.addFilter({tag:"exclude",predicate:function(e){return e!==t}}),this._chart.refresh()},t.prototype._getRenderHandler=function(){return function(){this._formatters=c.getFieldFormatters(this._chart.getSpec(),this.settings.formatters),this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})}},t.prototype._setTargetSvgClass=function(t){o.select(this._chart.getSVG()).classed(this.settings.clsTarget,t)},t.prototype._setTargetEventsEnabled=function(t){t?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},t}();e.a=h}})}); \ No newline at end of file diff --git a/dist/plugins/trendline.css b/dist/plugins/trendline.css new file mode 100644 index 000000000..12e074aaa --- /dev/null +++ b/dist/plugins/trendline.css @@ -0,0 +1,103 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__svg .tau-chart__trendline.color20-1 { + stroke: #357ac7; +} +.tau-chart__svg .tau-chart__trendline.color20-2 { + stroke: #a5193d; +} +.tau-chart__svg .tau-chart__trendline.color20-3 { + stroke: #47991a; +} +.tau-chart__svg .tau-chart__trendline.color20-4 { + stroke: #261c31; +} +.tau-chart__svg .tau-chart__trendline.color20-5 { + stroke: #9e790c; +} +.tau-chart__svg .tau-chart__trendline.color20-6 { + stroke: #0c0a08; +} +.tau-chart__svg .tau-chart__trendline.color20-7 { + stroke: #872f11; +} +.tau-chart__svg .tau-chart__trendline.color20-8 { + stroke: #888d18; +} +.tau-chart__svg .tau-chart__trendline.color20-9 { + stroke: #48b8a8; +} +.tau-chart__svg .tau-chart__trendline.color20-10 { + stroke: #b16fab; +} +.tau-chart__svg .tau-chart__trendline.color20-11 { + stroke: #9c2ca1; +} +.tau-chart__svg .tau-chart__trendline.color20-12 { + stroke: #2d3f19; +} +.tau-chart__svg .tau-chart__trendline.color20-13 { + stroke: #483eaa; +} +.tau-chart__svg .tau-chart__trendline.color20-14 { + stroke: #5c2028; +} +.tau-chart__svg .tau-chart__trendline.color20-15 { + stroke: #3b4e4c; +} +.tau-chart__svg .tau-chart__trendline.color20-16 { + stroke: #b0a353; +} +.tau-chart__svg .tau-chart__trendline.color20-17 { + stroke: #989b9e; +} +.tau-chart__svg .tau-chart__trendline.color20-18 { + stroke: #55371d; +} +.tau-chart__svg .tau-chart__trendline.color20-19 { + stroke: #3eb44b; +} +.tau-chart__svg .tau-chart__trendline.color20-20 { + stroke: #883063; +} +.tau-chart__svg .tau-chart__trendline.color-default { + stroke: #357ac7; +} +.tau-chart { + /* TrendLine */ +} +.tau-chart__trendlinepanel { + padding: 20px 0 20px 20px; + margin-right: 20px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__trendlinepanel__title { + margin: 0 0 10px 0; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__trendlinepanel__control { + width: 100%; +} +.tau-chart__trendlinepanel__error-message { + font-size: 11px; + line-height: 16px; + margin-left: 5px; +} +.tau-chart__trendlinepanel.applicable-false.hide-trendline-error, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__input, +.tau-chart__trendlinepanel.applicable-false .tau-chart__trendlinepanel__control, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__icon { + display: none; +} +.tau-chart__trendline { + stroke-dasharray: 4, 4; +} diff --git a/dist/plugins/trendline.dark.css b/dist/plugins/trendline.dark.css new file mode 100644 index 000000000..54e6fefac --- /dev/null +++ b/dist/plugins/trendline.dark.css @@ -0,0 +1,103 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__svg .tau-chart__trendline.color20-1 { + stroke: #357ac7; +} +.tau-chart__svg .tau-chart__trendline.color20-2 { + stroke: #a5193d; +} +.tau-chart__svg .tau-chart__trendline.color20-3 { + stroke: #47991a; +} +.tau-chart__svg .tau-chart__trendline.color20-4 { + stroke: #4f3b66; +} +.tau-chart__svg .tau-chart__trendline.color20-5 { + stroke: #9e790c; +} +.tau-chart__svg .tau-chart__trendline.color20-6 { + stroke: #473e31; +} +.tau-chart__svg .tau-chart__trendline.color20-7 { + stroke: #872f11; +} +.tau-chart__svg .tau-chart__trendline.color20-8 { + stroke: #888d18; +} +.tau-chart__svg .tau-chart__trendline.color20-9 { + stroke: #48b8a8; +} +.tau-chart__svg .tau-chart__trendline.color20-10 { + stroke: #b16fab; +} +.tau-chart__svg .tau-chart__trendline.color20-11 { + stroke: #9c2ca1; +} +.tau-chart__svg .tau-chart__trendline.color20-12 { + stroke: #2d3f19; +} +.tau-chart__svg .tau-chart__trendline.color20-13 { + stroke: #483eaa; +} +.tau-chart__svg .tau-chart__trendline.color20-14 { + stroke: #6c2730; +} +.tau-chart__svg .tau-chart__trendline.color20-15 { + stroke: #3b4e4c; +} +.tau-chart__svg .tau-chart__trendline.color20-16 { + stroke: #b0a353; +} +.tau-chart__svg .tau-chart__trendline.color20-17 { + stroke: #989b9e; +} +.tau-chart__svg .tau-chart__trendline.color20-18 { + stroke: #734d2d; +} +.tau-chart__svg .tau-chart__trendline.color20-19 { + stroke: #3eb44b; +} +.tau-chart__svg .tau-chart__trendline.color20-20 { + stroke: #883063; +} +.tau-chart__svg .tau-chart__trendline.color-default { + stroke: #357ac7; +} +.tau-chart { + /* TrendLine */ +} +.tau-chart__trendlinepanel { + padding: 20px 0 20px 20px; + margin-right: 20px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__trendlinepanel__title { + margin: 0 0 10px 0; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__trendlinepanel__control { + width: 100%; +} +.tau-chart__trendlinepanel__error-message { + font-size: 11px; + line-height: 16px; + margin-left: 5px; +} +.tau-chart__trendlinepanel.applicable-false.hide-trendline-error, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__input, +.tau-chart__trendlinepanel.applicable-false .tau-chart__trendlinepanel__control, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__icon { + display: none; +} +.tau-chart__trendline { + stroke-dasharray: 4, 4; +} diff --git a/dist/plugins/trendline.js b/dist/plugins/trendline.js new file mode 100644 index 000000000..07f1c2246 --- /dev/null +++ b/dist/plugins/trendline.js @@ -0,0 +1 @@ +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("taucharts"),require("d3-selection"));else if("function"==typeof define&&define.amd)define([,"d3-selection"],t);else{var n="object"==typeof exports?t(require("taucharts"),require("d3-selection")):t(e.Taucharts,e.d3);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(window,function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=14)}({0:function(t,n){t.exports=e},1:function(e,n){e.exports=t},14:function(e,t,n){"use strict";n.r(t);var r,a=n(0),i=n.n(a),o=n(1),s=(r={linear:function(e){for(var t=[0,0,0,0,0],n=0,r=[];nMath.abs(e[n][i])&&(i=r);for(a=n;a=n;a--)e[a][r]-=e[a][n]*e[n][r]/e[n][n]}for(r=s-1;r>=0;r--){for(o=0,a=r+1;a=0;s--)v+=s>1?Math.round(100*f[s])/100+"x^"+s+" + ":1==s?Math.round(100*f[s])/100+"x + ":Math.round(100*f[s])/100;return{equation:f,points:a,string:v}},lastvalue:function(e){for(var t=[],n=null,r=0;r0&&oe[o]-e[s]?i:o;for(var c=Math.abs(1/(e[l]-u)),h=0,p=0,f=0,d=0,g=0,v=i;v<=o;){var _=e[v],m=t[v],M=r((v1&&(i||u)&&(p=[p[0],p[p.length-1]]),e.concat(p.length>1?p:[])},[])},e.traverseSpec(n,function(e,a){if(r.predicateIsApplicable(n,e,a)){var i=n.scales[e.x],o=n.scales[e.y],s=n.scales[e.color]||{},u=JSON.parse(JSON.stringify(e));u.type="ELEMENT.LINE",u.size="size_null",u.namespace="trendline",u.transformation=u.transformation||[],u.transformation.push({type:"regression",args:{type:t.type,x:i,y:o,g:s}});u.guide=l.defaults({},u.guide||{}),u.guide.interpolate="linear",u.guide.showAnchors="never",u.guide.cssClass="tau-chart__trendline",u.guide.widthCssClass="tau-chart__line-width-1",u.guide.x=u.guide.x||{},u.guide.x.fillGaps=!1,delete u.guide.label,delete u.label,a.units.push(u)}})}},containerTemplate:'
',template:l.template(['","
",'","
",'
<%= error %>
'].join("")),onRender:function(e){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:t.showTrend&&this._isApplicable?"checked":"",models:t.models.map(function(e){return""})});var n=function(e){return function(){o.select(this).classed({active:e,"tau-chart__line-width-1":!e,"tau-chart__line-width-3":e})}};o.select(e.getSVG()).selectAll(".tau-chart__trendline").on("mouseenter",n(!0)).on("mouseleave",n(!1))}}}}i.a.api.plugins.add("trendline",u),t.default=u}})}); \ No newline at end of file diff --git a/build/development/css/tauCharts.css b/dist/taucharts.css similarity index 58% rename from build/development/css/tauCharts.css rename to dist/taucharts.css index b79932b0c..cb26d323d 100644 --- a/build/development/css/tauCharts.css +++ b/dist/taucharts.css @@ -1,30 +1,35 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout { +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__layout { line-height: 1; font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; } -.graphical-report__layout text { +.tau-chart__layout text { font: normal 13px Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; } -.graphical-report__chart { +.tau-chart__chart { font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; position: absolute; height: 100%; width: 100%; overflow: auto; } -.graphical-report__layout { +.tau-chart__layout { + display: -webkit-box; display: -webkit-flexbox; display: -ms-flexbox; display: flex; -ms-flex-align: stretch; + -webkit-align-items: stretch; align-items: stretch; -ms-flex-direction: column; + -webkit-box-orient: vertical; flex-direction: column; height: 100%; width: 100%; @@ -32,70 +37,74 @@ background: transparent; color: #333; } -.graphical-report__layout__header { +.tau-chart__layout__header { -ms-flex: 0 0.1 auto; + -webkit-box-flex: 0 0.1 auto; flex: 0 0.1 auto; position: relative; } -.graphical-report__layout__container { +.tau-chart__layout__container { + display: -webkit-box; display: -webkit-flexbox; display: -ms-flexbox; display: flex; -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; flex: 1 1 auto; height: 100%; } -.graphical-report__layout__footer { +.tau-chart__layout__footer { -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; flex: 0 1 auto; } -.graphical-report__layout__sidebar { +.tau-chart__layout__sidebar { -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; flex: 0 1 auto; } -.graphical-report__layout__content { +.tau-chart__layout__content { -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; flex: 1 1 auto; overflow: hidden; } -.graphical-report__layout__sidebar-right { +.tau-chart__layout__sidebar-right { position: relative; overflow: hidden; -ms-flex: 0 0 auto; + -webkit-box-flex: 0 0 auto; flex: 0 0 auto; } -.graphical-report__layout__sidebar-right__wrap { +.tau-chart__layout__sidebar-right__wrap { max-height: 100%; box-sizing: border-box; } -.graphical-report__layout text { +.tau-chart__layout text { fill: #333; } -.graphical-report__layout.graphical-report__layout_rendering-error { +.tau-chart__layout.tau-chart__layout_rendering-error { opacity: 0.75; } -.graphical-report__rendering-timeout-warning { - -ms-flex-align: center; - align-items: center; +.tau-chart__rendering-timeout-warning { + align-items: center; background: rgba(255, 255, 255, 0.5); - display: -ms-flexbox; display: flex; - -ms-flex-direction: column; - flex-direction: column; + flex-direction: column; height: 100%; position: absolute; top: 0; width: 100%; } -.graphical-report__rendering-timeout-warning svg { +.tau-chart__rendering-timeout-warning svg { height: 100%; max-width: 32em; width: 100%; } -.graphical-report__rendering-timeout-warning text { +.tau-chart__rendering-timeout-warning text { font-weight: 300; } -.graphical-report__progress { +.tau-chart__progress { box-sizing: border-box; height: 0.25em; opacity: 0; @@ -106,27 +115,27 @@ transition: opacity 1s 0.75s; width: 100%; } -.graphical-report__progress_active { +.tau-chart__progress_active { opacity: 1; } -.graphical-report__progress__value { +.tau-chart__progress__value { background: rgba(51, 51, 51, 0.25); height: 100%; transition: width 0.75s; } -.graphical-report { +.tau-chart { /* region Select --------------------------------------------------*/ } -.graphical-report__checkbox { +.tau-chart__checkbox { position: relative; display: block; } -.graphical-report__checkbox__input { +.tau-chart__checkbox__input { position: absolute; z-index: -1; opacity: 0; } -.graphical-report__checkbox__icon { +.tau-chart__checkbox__icon { position: relative; width: 14px; height: 14px; @@ -136,7 +145,7 @@ border-radius: 2px; background: linear-gradient(to bottom, #fff 0%, #dbdbde 100%); } -.graphical-report__checkbox__icon:before { +.tau-chart__checkbox__icon:before { display: none; content: ''; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MEQ4M0RDOTE4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MEQ4M0RDOTI4NDQ2MTFFNEE5RTdBRERDQzRBQzNEMTQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDowRDgzREM4Rjg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDowRDgzREM5MDg0NDYxMUU0QTlFN0FERENDNEFDM0QxNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pn2UjdoAAAEGSURBVHjaYvz//z8DGIAYSUlJdwECiBEukpiY/BDEAQggBrgIVBkLjAEDAAHEiMyBywBNOwDmJCYm/cdQBhBAqHrQAUgSojV5P8QtSY+A+D7cPTDdMAUwTQABhNdYJgZ8AF1nRkaGAgjDvQzi/AOCP3+YWX7+/HmXiYlRAcXY37//AEPs511OTg65uXPnPkQxNi0tTTklJUWGaNcCBBj+EMIDmBjIBCwo1jMyYigAul/x79//B4CulwOqODBv3hxHDKcmJycfAHLtgfrvMTExJf/7938xUF4GaOB9FhZmh1mzZj2CqUdNEkAdSUmZSsAgBNrAIAsUAQYlu+O0adMeo0cS/QMHAGJZps83N5ZDAAAAAElFTkSuQmCC'); @@ -146,30 +155,30 @@ top: 0; left: 0; } -.graphical-report__checkbox__text { +.tau-chart__checkbox__text { margin-left: 5px; } -.graphical-report__checkbox__input ~ .graphical-report__checkbox__text { +.tau-chart__checkbox__input ~ .tau-chart__checkbox__text { cursor: pointer; } -.graphical-report__checkbox__input:disabled ~ .graphical-report__checkbox__text { +.tau-chart__checkbox__input:disabled ~ .tau-chart__checkbox__text { cursor: default; opacity: 0.3; } -.graphical-report__checkbox__input:not(:disabled):focus + .graphical-report__checkbox__icon { +.tau-chart__checkbox__input:not(:disabled):focus + .tau-chart__checkbox__icon { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 7px 0 #52a8ec; outline: none; } -.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled) ~ .graphical-report__checkbox__icon { +.tau-chart__checkbox:hover .tau-chart__checkbox__input:not(:disabled) ~ .tau-chart__checkbox__icon { border-color: #999; } -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon { +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon { background: linear-gradient(to bottom, #fff 0%, #dbdbde 100%); } -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon:before { +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon:before { display: block; } -.graphical-report__select { +.tau-chart__select { font-size: 13px; font-family: inherit; display: inline-block; @@ -182,21 +191,21 @@ border-radius: 2px; color: #333; } -.graphical-report__select:focus { +.tau-chart__select:focus { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 7px 0 #52a8ec; outline: none; } -.graphical-report__select[disabled] { +.tau-chart__select[disabled] { opacity: 0.3; cursor: default; } -.graphical-report__select[multiple] { +.tau-chart__select[multiple] { height: auto; } -.graphical-report__select option[disabled] { +.tau-chart__select option[disabled] { opacity: 0.6; } -.graphical-report-btn { +.tau-chart__button { background-color: rgba(255, 255, 255, 0.9); border: 1px solid currentColor; border-radius: 4px; @@ -209,132 +218,132 @@ line-height: 1.5em; height: calc(1.5em + 2px); } -.graphical-report-btn:hover { +.tau-chart__button:hover { border-color: #999999; color: #333; } /* region Generate .color@{n}-@{i} function */ -.graphical-report__svg .color20-1 { +.tau-chart__svg .color20-1 { stroke: #6FA1D9; fill: #6FA1D9; } -.graphical-report__svg .color20-2 { +.tau-chart__svg .color20-2 { stroke: #DF2B59; fill: #DF2B59; } -.graphical-report__svg .color20-3 { +.tau-chart__svg .color20-3 { stroke: #66DA26; fill: #66DA26; } -.graphical-report__svg .color20-4 { +.tau-chart__svg .color20-4 { stroke: #4C3862; fill: #4C3862; } -.graphical-report__svg .color20-5 { +.tau-chart__svg .color20-5 { stroke: #E5B011; fill: #E5B011; } -.graphical-report__svg .color20-6 { +.tau-chart__svg .color20-6 { stroke: #3A3226; fill: #3A3226; } -.graphical-report__svg .color20-7 { +.tau-chart__svg .color20-7 { stroke: #CB461A; fill: #CB461A; } -.graphical-report__svg .color20-8 { +.tau-chart__svg .color20-8 { stroke: #C7CE23; fill: #C7CE23; } -.graphical-report__svg .color20-9 { +.tau-chart__svg .color20-9 { stroke: #7FCDC2; fill: #7FCDC2; } -.graphical-report__svg .color20-10 { +.tau-chart__svg .color20-10 { stroke: #CCA1C8; fill: #CCA1C8; } -.graphical-report__svg .color20-11 { +.tau-chart__svg .color20-11 { stroke: #C84CCE; fill: #C84CCE; } -.graphical-report__svg .color20-12 { +.tau-chart__svg .color20-12 { stroke: #54762E; fill: #54762E; } -.graphical-report__svg .color20-13 { +.tau-chart__svg .color20-13 { stroke: #746BC9; fill: #746BC9; } -.graphical-report__svg .color20-14 { +.tau-chart__svg .color20-14 { stroke: #953441; fill: #953441; } -.graphical-report__svg .color20-15 { +.tau-chart__svg .color20-15 { stroke: #5C7A76; fill: #5C7A76; } -.graphical-report__svg .color20-16 { +.tau-chart__svg .color20-16 { stroke: #C8BF87; fill: #C8BF87; } -.graphical-report__svg .color20-17 { +.tau-chart__svg .color20-17 { stroke: #BFC1C3; fill: #BFC1C3; } -.graphical-report__svg .color20-18 { +.tau-chart__svg .color20-18 { stroke: #8E5C31; fill: #8E5C31; } -.graphical-report__svg .color20-19 { +.tau-chart__svg .color20-19 { stroke: #71CE7B; fill: #71CE7B; } -.graphical-report__svg .color20-20 { +.tau-chart__svg .color20-20 { stroke: #BE478B; fill: #BE478B; } -.graphical-report__svg .color-default { +.tau-chart__svg .color-default { stroke: #6FA1D9; fill: #6FA1D9; } /* endregion */ /* region Generate .line-params-@{n} function */ /* Generate .line-size-@{n} */ -.graphical-report__line-width-1 { +.tau-chart__line-width-1 { stroke-width: 1px; } -.graphical-report__line-width-2 { +.tau-chart__line-width-2 { stroke-width: 1.5px; } -.graphical-report__line-width-3 { +.tau-chart__line-width-3 { stroke-width: 2px; } -.graphical-report__line-width-4 { +.tau-chart__line-width-4 { stroke-width: 2.5px; } -.graphical-report__line-width-5 { +.tau-chart__line-width-5 { stroke-width: 3px; } /* Generate .line-opacity-@{n} */ -.graphical-report__line-opacity-1 { +.tau-chart__line-opacity-1 { stroke-opacity: 1; } -.graphical-report__line-opacity-2 { +.tau-chart__line-opacity-2 { stroke-opacity: 0.95; } -.graphical-report__line-opacity-3 { +.tau-chart__line-opacity-3 { stroke-opacity: 0.9; } -.graphical-report__line-opacity-4 { +.tau-chart__line-opacity-4 { stroke-opacity: 0.85; } -.graphical-report__line-opacity-5 { +.tau-chart__line-opacity-5 { stroke-opacity: 0.8; } /* endregion */ /* endregion */ -.graphical-report { +.tau-chart { /* Links */ /* Axises and Grid */ /* Scatterplot */ @@ -345,178 +354,180 @@ /* PLUGINS */ /* Highlighter */ } -.graphical-report a { +.tau-chart a { color: #3962FF; border-bottom: 1px solid rgba(57, 98, 255, 0.3); text-decoration: none; } -.graphical-report a:hover { +.tau-chart a:hover { color: #E17152; border-bottom: 1px solid rgba(225, 113, 82, 0.3); } -.graphical-report__d3-time-overflown .tick:nth-child(even) { +.tau-chart__time-axis-overflow .tick:nth-child(even) { display: none; } -.graphical-report__svg { +.tau-chart__svg { display: block; overflow: hidden; } -.graphical-report__svg .place { +.tau-chart__svg .place { fill: #fff; stroke: #000; stroke-opacity: 0.7; stroke-width: 0.5; } -.graphical-report__svg .place-label { +.tau-chart__svg .place-label { opacity: 0.7; font-size: 11px; color: #000000; line-height: 13px; text-anchor: start; } -.graphical-report__svg .place-label-countries, -.graphical-report__svg .place-label-subunits, -.graphical-report__svg .place-label-states { +.tau-chart__svg .place-label-countries, +.tau-chart__svg .place-label-subunits, +.tau-chart__svg .place-label-states { text-anchor: middle; font-size: 10px; fill: rgba(51, 51, 51, 0.5); line-height: 10px; text-transform: capitalize; } -.graphical-report__svg .map-contour-level path { +.tau-chart__svg .map-contour-level path { stroke-opacity: 0.5; stroke-linejoin: 'round'; } -.graphical-report__svg .map-contour-level-0 path { +.tau-chart__svg .map-contour-level-0 path { stroke: #fff; } -.graphical-report__svg .map-contour-level-1 path { +.tau-chart__svg .map-contour-level-1 path { stroke: #fff; } -.graphical-report__svg .map-contour-level-2 path { +.tau-chart__svg .map-contour-level-2 path { stroke: #fff; } -.graphical-report__svg .map-contour-level-3 path { +.tau-chart__svg .map-contour-level-3 path { stroke: #fff; } -.graphical-report__svg .map-contour-level-4 path { +.tau-chart__svg .map-contour-level-4 path { stroke: #fff; } -.graphical-report__svg .map-contour-highlighted, -.graphical-report__svg .map-contour:hover { +.tau-chart__svg .map-contour-highlighted, +.tau-chart__svg .map-contour:hover { fill: #FFBF00; } -.graphical-report__svg .map-contour-highlighted path, -.graphical-report__svg .map-contour:hover path { +.tau-chart__svg .map-contour-highlighted path, +.tau-chart__svg .map-contour:hover path { stroke: #fff; } -.graphical-report__svg .map-contour-highlighted text, -.graphical-report__svg .map-contour:hover text { +.tau-chart__svg .map-contour-highlighted text, +.tau-chart__svg .map-contour:hover text { fill: #000; } -.graphical-report__svg .axis line, -.graphical-report__svg .axis path { +.tau-chart__svg .axis line, +.tau-chart__svg .axis path { stroke-width: 1; fill: none; stroke: rgba(189, 195, 205, 0.4); shape-rendering: crispEdges; } -.graphical-report__svg .axis.facet-axis .tick line { +.tau-chart__svg .axis.facet-axis .tick line { opacity: 0; } -.graphical-report__svg .axis.facet-axis .tick line.label-ref { +.tau-chart__svg .axis.facet-axis .tick line.label-ref { opacity: 1; } -.graphical-report__svg .axis.facet-axis .tick text { +.tau-chart__svg .axis.facet-axis .tick text { + font-size: 12px; font-weight: 600; } -.graphical-report__svg .axis.facet-axis path.domain { +.tau-chart__svg .axis.facet-axis path.domain { opacity: 0; } -.graphical-report__svg .axis.facet-axis.compact .tick text { +.tau-chart__svg .axis.facet-axis.compact .tick text { font-weight: normal; } -.graphical-report__svg .axis.facet-axis.compact .label { +.tau-chart__svg .axis.facet-axis.compact .label { font-weight: normal; } -.graphical-report__svg .axis.facet-axis.compact .label .label-token { +.tau-chart__svg .axis.facet-axis.compact .label .label-token { font-weight: normal; } -.graphical-report__svg .tick text { +.tau-chart__svg .tick text { font-size: 11px; } -.graphical-report__svg .grid .grid-lines path { +.tau-chart__svg .grid .grid-lines path { shape-rendering: crispEdges; } -.graphical-report__svg .grid .line path, -.graphical-report__svg .grid path.line, -.graphical-report__svg .grid path.domain { +.tau-chart__svg .grid .line path, +.tau-chart__svg .grid path.line, +.tau-chart__svg .grid path.domain { fill: none; } -.graphical-report__svg .grid .tick > line { +.tau-chart__svg .grid .tick > line, +.tau-chart__svg .grid .extra-tick-line { fill: none; stroke: rgba(189, 195, 205, 0.4); stroke-width: 1px; shape-rendering: crispEdges; } -.graphical-report__svg .grid .tick.zero-tick > line { +.tau-chart__svg .grid .tick.zero-tick > line { stroke: rgba(126, 129, 134, 0.505); } -.graphical-report__svg .grid .line path { +.tau-chart__svg .grid .line path { shape-rendering: auto; } -.graphical-report__svg .grid .cursor-line { +.tau-chart__svg .grid .cursor-line { shape-rendering: crispEdges; - stroke: #cccccc; + stroke: #adadad; stroke-width: 1px; } -.graphical-report__svg .label { +.tau-chart__svg .label { font-size: 12px; font-weight: 600; } -.graphical-report__svg .label .label-token { +.tau-chart__svg .label .label-token { font-size: 12px; font-weight: 600; text-transform: capitalize; } -.graphical-report__svg .label .label-token-1, -.graphical-report__svg .label .label-token-2 { +.tau-chart__svg .label .label-token-1, +.tau-chart__svg .label .label-token-2 { font-weight: normal; } -.graphical-report__svg .label .label-token-2 { +.tau-chart__svg .label .label-token-2 { fill: gray; } -.graphical-report__svg .label .label-token-delimiter { +.tau-chart__svg .label .label-token-delimiter { font-weight: normal; fill: gray; } -.graphical-report__svg .label.inline .label-token { +.tau-chart__svg .label.inline .label-token { font-weight: normal; fill: gray; text-transform: none; } -.graphical-report__svg .brush .extent { +.tau-chart__svg .brush .selection { fill-opacity: .3; stroke: #fff; shape-rendering: crispEdges; } -.graphical-report__svg .background { +.tau-chart__svg .background { stroke: #f2f2f2; } -.graphical-report__dot { +.tau-chart__dot { opacity: 0.7; stroke-width: 0; transition: stroke-width 0.1s ease, opacity 0.2s ease; } -.graphical-report__line { +.tau-chart__line { fill: none; transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; } -.graphical-report__dot-line { +.tau-chart__dot-line { opacity: 1; transition: stroke-opacity 0.2s ease; } -.graphical-report__bar { +.tau-chart__bar { opacity: 0.7; shape-rendering: geometricPrecision; stroke-opacity: 0.5; @@ -524,39 +535,39 @@ stroke: #fff; transition: opacity 0.2s ease; } -.graphical-report__area { +.tau-chart__area { transition: opacity 0.2s ease; } -.graphical-report__area path, -.graphical-report__area polygon { +.tau-chart__area path:not(.i-data-anchor), +.tau-chart__area polygon { opacity: 0.6; transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; } -.graphical-report__svg .graphical-report__bar { +.tau-chart__svg .tau-chart__bar { stroke: #fff; } -.graphical-report__dot.graphical-report__highlighted { +.tau-chart__dot.tau-chart__highlighted { stroke-width: 1; opacity: 1; } -.graphical-report__dot.graphical-report__dimmed { +.tau-chart__dot.tau-chart__dimmed { opacity: 0.2; } -.graphical-report__line.graphical-report__highlighted { +.tau-chart__line.tau-chart__highlighted { stroke-opacity: 1; stroke-width: 3; } -.graphical-report__line.graphical-report__dimmed { +.tau-chart__line.tau-chart__dimmed { stroke-opacity: 0.2; } -.i-role-label.graphical-report__highlighted, -.graphical-report__area.graphical-report__highlighted, -.graphical-report__bar.graphical-report__highlighted { +.i-role-label.tau-chart__highlighted, +.tau-chart__area.tau-chart__highlighted, +.tau-chart__bar.tau-chart__highlighted { stroke-opacity: 1; opacity: 1; } -.i-role-label.graphical-report__dimmed, -.graphical-report__area.graphical-report__dimmed, -.graphical-report__bar.graphical-report__dimmed { +.i-role-label.tau-chart__dimmed, +.tau-chart__area.tau-chart__dimmed, +.tau-chart__bar.tau-chart__dimmed { opacity: 0.2; } diff --git a/build/development/css/tauCharts.dark.css b/dist/taucharts.dark.css similarity index 54% rename from build/development/css/tauCharts.dark.css rename to dist/taucharts.dark.css index cb3e1d7a0..6bda85993 100644 --- a/build/development/css/tauCharts.dark.css +++ b/dist/taucharts.dark.css @@ -1,30 +1,35 @@ -/* region place variables*/ -/* endregion */ -/* region map variables*/ -/* endregion */ -/* region variables for plugins */ -/* endregion */ -.graphical-report__layout { +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__layout { line-height: 1; font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; } -.graphical-report__layout text { +.tau-chart__layout text { font: normal 13px Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; } -.graphical-report__chart { +.tau-chart__chart { font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; position: absolute; height: 100%; width: 100%; overflow: auto; } -.graphical-report__layout { +.tau-chart__layout { + display: -webkit-box; display: -webkit-flexbox; display: -ms-flexbox; display: flex; -ms-flex-align: stretch; + -webkit-align-items: stretch; align-items: stretch; -ms-flex-direction: column; + -webkit-box-orient: vertical; flex-direction: column; height: 100%; width: 100%; @@ -32,70 +37,74 @@ background: transparent; color: #fff; } -.graphical-report__layout__header { +.tau-chart__layout__header { -ms-flex: 0 0.1 auto; + -webkit-box-flex: 0 0.1 auto; flex: 0 0.1 auto; position: relative; } -.graphical-report__layout__container { +.tau-chart__layout__container { + display: -webkit-box; display: -webkit-flexbox; display: -ms-flexbox; display: flex; -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; flex: 1 1 auto; height: 100%; } -.graphical-report__layout__footer { +.tau-chart__layout__footer { -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; flex: 0 1 auto; } -.graphical-report__layout__sidebar { +.tau-chart__layout__sidebar { -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; flex: 0 1 auto; } -.graphical-report__layout__content { +.tau-chart__layout__content { -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; flex: 1 1 auto; overflow: hidden; } -.graphical-report__layout__sidebar-right { +.tau-chart__layout__sidebar-right { position: relative; overflow: hidden; -ms-flex: 0 0 auto; + -webkit-box-flex: 0 0 auto; flex: 0 0 auto; } -.graphical-report__layout__sidebar-right__wrap { +.tau-chart__layout__sidebar-right__wrap { max-height: 100%; box-sizing: border-box; } -.graphical-report__layout text { +.tau-chart__layout text { fill: #fff; } -.graphical-report__layout.graphical-report__layout_rendering-error { +.tau-chart__layout.tau-chart__layout_rendering-error { opacity: 0.75; } -.graphical-report__rendering-timeout-warning { - -ms-flex-align: center; - align-items: center; +.tau-chart__rendering-timeout-warning { + align-items: center; background: rgba(0, 0, 0, 0.5); - display: -ms-flexbox; display: flex; - -ms-flex-direction: column; - flex-direction: column; + flex-direction: column; height: 100%; position: absolute; top: 0; width: 100%; } -.graphical-report__rendering-timeout-warning svg { +.tau-chart__rendering-timeout-warning svg { height: 100%; max-width: 32em; width: 100%; } -.graphical-report__rendering-timeout-warning text { +.tau-chart__rendering-timeout-warning text { font-weight: 300; } -.graphical-report__progress { +.tau-chart__progress { box-sizing: border-box; height: 0.25em; opacity: 0; @@ -106,27 +115,27 @@ transition: opacity 1s 0.75s; width: 100%; } -.graphical-report__progress_active { +.tau-chart__progress_active { opacity: 1; } -.graphical-report__progress__value { +.tau-chart__progress__value { background: rgba(255, 255, 255, 0.25); height: 100%; transition: width 0.75s; } -.graphical-report { +.tau-chart { /* region Select --------------------------------------------------*/ } -.graphical-report__checkbox { +.tau-chart__checkbox { position: relative; display: block; } -.graphical-report__checkbox__input { +.tau-chart__checkbox__input { position: absolute; z-index: -1; opacity: 0; } -.graphical-report__checkbox__icon { +.tau-chart__checkbox__icon { position: relative; width: 14px; height: 14px; @@ -136,7 +145,7 @@ border-radius: 2px; background: #777; } -.graphical-report__checkbox__icon:before { +.tau-chart__checkbox__icon:before { display: none; content: ''; background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAPFBMVEX///////////////////////////////////////////////////////////////////////////////8gsV51AAAAE3RSTlMAHB0eHyAhIiNAv8Dc3d7f4eLjyWil2QAAAD1JREFUeAFjoApg5WZF4rEJCHNBxbmYGdgFhflZIFxuYV5OIWE+ZpguAWFhYV4mmDaQSh4mJHM4uBjJcAsAoZwBrNc0BKUAAAAASUVORK5CYII=); @@ -146,30 +155,30 @@ top: 0; left: 0; } -.graphical-report__checkbox__text { +.tau-chart__checkbox__text { margin-left: 5px; } -.graphical-report__checkbox__input ~ .graphical-report__checkbox__text { +.tau-chart__checkbox__input ~ .tau-chart__checkbox__text { cursor: pointer; } -.graphical-report__checkbox__input:disabled ~ .graphical-report__checkbox__text { +.tau-chart__checkbox__input:disabled ~ .tau-chart__checkbox__text { cursor: default; opacity: 0.3; } -.graphical-report__checkbox__input:not(:disabled):focus + .graphical-report__checkbox__icon { +.tau-chart__checkbox__input:not(:disabled):focus + .tau-chart__checkbox__icon { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 7px 0 #52a8ec; outline: none; } -.graphical-report__checkbox:hover .graphical-report__checkbox__input:not(:disabled) ~ .graphical-report__checkbox__icon { +.tau-chart__checkbox:hover .tau-chart__checkbox__input:not(:disabled) ~ .tau-chart__checkbox__icon { border-color: #c3c3c3; } -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon { +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon { background: #777; } -.graphical-report__checkbox__input:checked + .graphical-report__checkbox__icon:before { +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon:before { display: block; } -.graphical-report__select { +.tau-chart__select { font-size: 13px; font-family: inherit; display: inline-block; @@ -182,21 +191,21 @@ border-radius: 2px; color: #fff; } -.graphical-report__select:focus { +.tau-chart__select:focus { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 7px 0 #52a8ec; outline: none; } -.graphical-report__select[disabled] { +.tau-chart__select[disabled] { opacity: 0.3; cursor: default; } -.graphical-report__select[multiple] { +.tau-chart__select[multiple] { height: auto; } -.graphical-report__select option[disabled] { +.tau-chart__select option[disabled] { opacity: 0.6; } -.graphical-report-btn { +.tau-chart__button { background-color: rgba(0, 0, 0, 0.9); border: 1px solid currentColor; border-radius: 4px; @@ -209,132 +218,132 @@ line-height: 1.5em; height: calc(1.5em + 2px); } -.graphical-report-btn:hover { +.tau-chart__button:hover { border-color: #808080; color: #fff; } /* region Generate .color@{n}-@{i} function */ -.graphical-report__svg .color20-1 { +.tau-chart__svg .color20-1 { stroke: #6FA1D9; fill: #6FA1D9; } -.graphical-report__svg .color20-2 { +.tau-chart__svg .color20-2 { stroke: #DF2B59; fill: #DF2B59; } -.graphical-report__svg .color20-3 { +.tau-chart__svg .color20-3 { stroke: #66DA26; fill: #66DA26; } -.graphical-report__svg .color20-4 { +.tau-chart__svg .color20-4 { stroke: #755797; fill: #755797; } -.graphical-report__svg .color20-5 { +.tau-chart__svg .color20-5 { stroke: #E5B011; fill: #E5B011; } -.graphical-report__svg .color20-6 { +.tau-chart__svg .color20-6 { stroke: #746650; fill: #746650; } -.graphical-report__svg .color20-7 { +.tau-chart__svg .color20-7 { stroke: #CB461A; fill: #CB461A; } -.graphical-report__svg .color20-8 { +.tau-chart__svg .color20-8 { stroke: #C7CE23; fill: #C7CE23; } -.graphical-report__svg .color20-9 { +.tau-chart__svg .color20-9 { stroke: #7FCDC2; fill: #7FCDC2; } -.graphical-report__svg .color20-10 { +.tau-chart__svg .color20-10 { stroke: #CCA1C8; fill: #CCA1C8; } -.graphical-report__svg .color20-11 { +.tau-chart__svg .color20-11 { stroke: #C84CCE; fill: #C84CCE; } -.graphical-report__svg .color20-12 { +.tau-chart__svg .color20-12 { stroke: #54762E; fill: #54762E; } -.graphical-report__svg .color20-13 { +.tau-chart__svg .color20-13 { stroke: #746BC9; fill: #746BC9; } -.graphical-report__svg .color20-14 { +.tau-chart__svg .color20-14 { stroke: #A43B49; fill: #A43B49; } -.graphical-report__svg .color20-15 { +.tau-chart__svg .color20-15 { stroke: #5C7A76; fill: #5C7A76; } -.graphical-report__svg .color20-16 { +.tau-chart__svg .color20-16 { stroke: #C8BF87; fill: #C8BF87; } -.graphical-report__svg .color20-17 { +.tau-chart__svg .color20-17 { stroke: #BFC1C3; fill: #BFC1C3; } -.graphical-report__svg .color20-18 { +.tau-chart__svg .color20-18 { stroke: #AA7243; fill: #AA7243; } -.graphical-report__svg .color20-19 { +.tau-chart__svg .color20-19 { stroke: #71CE7B; fill: #71CE7B; } -.graphical-report__svg .color20-20 { +.tau-chart__svg .color20-20 { stroke: #BE478B; fill: #BE478B; } -.graphical-report__svg .color-default { +.tau-chart__svg .color-default { stroke: #6FA1D9; fill: #6FA1D9; } /* endregion */ /* region Generate .line-params-@{n} function */ /* Generate .line-size-@{n} */ -.graphical-report__line-width-1 { +.tau-chart__line-width-1 { stroke-width: 1px; } -.graphical-report__line-width-2 { +.tau-chart__line-width-2 { stroke-width: 1.5px; } -.graphical-report__line-width-3 { +.tau-chart__line-width-3 { stroke-width: 2px; } -.graphical-report__line-width-4 { +.tau-chart__line-width-4 { stroke-width: 2.5px; } -.graphical-report__line-width-5 { +.tau-chart__line-width-5 { stroke-width: 3px; } /* Generate .line-opacity-@{n} */ -.graphical-report__line-opacity-1 { +.tau-chart__line-opacity-1 { stroke-opacity: 1; } -.graphical-report__line-opacity-2 { +.tau-chart__line-opacity-2 { stroke-opacity: 0.95; } -.graphical-report__line-opacity-3 { +.tau-chart__line-opacity-3 { stroke-opacity: 0.9; } -.graphical-report__line-opacity-4 { +.tau-chart__line-opacity-4 { stroke-opacity: 0.85; } -.graphical-report__line-opacity-5 { +.tau-chart__line-opacity-5 { stroke-opacity: 0.8; } /* endregion */ /* endregion */ -.graphical-report { +.tau-chart { /* Links */ /* Axises and Grid */ /* Scatterplot */ @@ -345,178 +354,180 @@ /* PLUGINS */ /* Highlighter */ } -.graphical-report a { +.tau-chart a { color: #3962FF; border-bottom: 1px solid rgba(57, 98, 255, 0.3); text-decoration: none; } -.graphical-report a:hover { +.tau-chart a:hover { color: #E17152; border-bottom: 1px solid rgba(225, 113, 82, 0.3); } -.graphical-report__d3-time-overflown .tick:nth-child(even) { +.tau-chart__time-axis-overflow .tick:nth-child(even) { display: none; } -.graphical-report__svg { +.tau-chart__svg { display: block; overflow: hidden; } -.graphical-report__svg .place { +.tau-chart__svg .place { fill: #fff; stroke: #000; stroke-opacity: 0.7; stroke-width: 0.5; } -.graphical-report__svg .place-label { +.tau-chart__svg .place-label { opacity: 0.7; font-size: 11px; color: #000000; line-height: 13px; text-anchor: start; } -.graphical-report__svg .place-label-countries, -.graphical-report__svg .place-label-subunits, -.graphical-report__svg .place-label-states { +.tau-chart__svg .place-label-countries, +.tau-chart__svg .place-label-subunits, +.tau-chart__svg .place-label-states { text-anchor: middle; font-size: 10px; fill: rgba(255, 255, 255, 0.5); line-height: 10px; text-transform: capitalize; } -.graphical-report__svg .map-contour-level path { +.tau-chart__svg .map-contour-level path { stroke-opacity: 0.5; stroke-linejoin: 'round'; } -.graphical-report__svg .map-contour-level-0 path { +.tau-chart__svg .map-contour-level-0 path { stroke: rgba(255, 255, 255, 0.2); } -.graphical-report__svg .map-contour-level-1 path { +.tau-chart__svg .map-contour-level-1 path { stroke: rgba(255, 255, 255, 0.15); } -.graphical-report__svg .map-contour-level-2 path { +.tau-chart__svg .map-contour-level-2 path { stroke: rgba(255, 255, 255, 0.09); } -.graphical-report__svg .map-contour-level-3 path { +.tau-chart__svg .map-contour-level-3 path { stroke: rgba(255, 255, 255, 0.06); } -.graphical-report__svg .map-contour-level-4 path { +.tau-chart__svg .map-contour-level-4 path { stroke: rgba(255, 255, 255, 0.03); } -.graphical-report__svg .map-contour-highlighted, -.graphical-report__svg .map-contour:hover { +.tau-chart__svg .map-contour-highlighted, +.tau-chart__svg .map-contour:hover { fill: rgba(255, 191, 0, 0.15); } -.graphical-report__svg .map-contour-highlighted path, -.graphical-report__svg .map-contour:hover path { +.tau-chart__svg .map-contour-highlighted path, +.tau-chart__svg .map-contour:hover path { stroke: #FFBF00; } -.graphical-report__svg .map-contour-highlighted text, -.graphical-report__svg .map-contour:hover text { +.tau-chart__svg .map-contour-highlighted text, +.tau-chart__svg .map-contour:hover text { fill: #FFBF00; } -.graphical-report__svg .axis line, -.graphical-report__svg .axis path { +.tau-chart__svg .axis line, +.tau-chart__svg .axis path { stroke-width: 1; fill: none; stroke: rgba(255, 255, 255, 0.2); shape-rendering: crispEdges; } -.graphical-report__svg .axis.facet-axis .tick line { +.tau-chart__svg .axis.facet-axis .tick line { opacity: 0; } -.graphical-report__svg .axis.facet-axis .tick line.label-ref { +.tau-chart__svg .axis.facet-axis .tick line.label-ref { opacity: 1; } -.graphical-report__svg .axis.facet-axis .tick text { +.tau-chart__svg .axis.facet-axis .tick text { + font-size: 12px; font-weight: 600; } -.graphical-report__svg .axis.facet-axis path.domain { +.tau-chart__svg .axis.facet-axis path.domain { opacity: 0; } -.graphical-report__svg .axis.facet-axis.compact .tick text { +.tau-chart__svg .axis.facet-axis.compact .tick text { font-weight: normal; } -.graphical-report__svg .axis.facet-axis.compact .label { +.tau-chart__svg .axis.facet-axis.compact .label { font-weight: normal; } -.graphical-report__svg .axis.facet-axis.compact .label .label-token { +.tau-chart__svg .axis.facet-axis.compact .label .label-token { font-weight: normal; } -.graphical-report__svg .tick text { +.tau-chart__svg .tick text { font-size: 11px; } -.graphical-report__svg .grid .grid-lines path { +.tau-chart__svg .grid .grid-lines path { shape-rendering: crispEdges; } -.graphical-report__svg .grid .line path, -.graphical-report__svg .grid path.line, -.graphical-report__svg .grid path.domain { +.tau-chart__svg .grid .line path, +.tau-chart__svg .grid path.line, +.tau-chart__svg .grid path.domain { fill: none; } -.graphical-report__svg .grid .tick > line { +.tau-chart__svg .grid .tick > line, +.tau-chart__svg .grid .extra-tick-line { fill: none; stroke: rgba(255, 255, 255, 0.2); stroke-width: 1px; shape-rendering: crispEdges; } -.graphical-report__svg .grid .tick.zero-tick > line { +.tau-chart__svg .grid .tick.zero-tick > line { stroke: rgba(255, 255, 255, 0.34); } -.graphical-report__svg .grid .line path { +.tau-chart__svg .grid .line path { shape-rendering: auto; } -.graphical-report__svg .grid .cursor-line { +.tau-chart__svg .grid .cursor-line { shape-rendering: crispEdges; - stroke: #404040; + stroke: #666666; stroke-width: 1px; } -.graphical-report__svg .label { +.tau-chart__svg .label { font-size: 12px; font-weight: 600; } -.graphical-report__svg .label .label-token { +.tau-chart__svg .label .label-token { font-size: 12px; font-weight: 600; text-transform: capitalize; } -.graphical-report__svg .label .label-token-1, -.graphical-report__svg .label .label-token-2 { +.tau-chart__svg .label .label-token-1, +.tau-chart__svg .label .label-token-2 { font-weight: normal; } -.graphical-report__svg .label .label-token-2 { +.tau-chart__svg .label .label-token-2 { fill: gray; } -.graphical-report__svg .label .label-token-delimiter { +.tau-chart__svg .label .label-token-delimiter { font-weight: normal; fill: gray; } -.graphical-report__svg .label.inline .label-token { +.tau-chart__svg .label.inline .label-token { font-weight: normal; fill: gray; text-transform: none; } -.graphical-report__svg .brush .extent { +.tau-chart__svg .brush .selection { fill-opacity: .3; stroke: #fff; shape-rendering: crispEdges; } -.graphical-report__svg .background { +.tau-chart__svg .background { stroke: #262626; } -.graphical-report__dot { +.tau-chart__dot { opacity: 0.9; stroke-width: 0; transition: stroke-width 0.1s ease, opacity 0.2s ease; } -.graphical-report__line { +.tau-chart__line { fill: none; transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; } -.graphical-report__dot-line { +.tau-chart__dot-line { opacity: 1; transition: stroke-opacity 0.2s ease; } -.graphical-report__bar { +.tau-chart__bar { opacity: 0.7; shape-rendering: geometricPrecision; stroke-opacity: 0.5; @@ -524,39 +535,39 @@ stroke: #fff; transition: opacity 0.2s ease; } -.graphical-report__area { +.tau-chart__area { transition: opacity 0.2s ease; } -.graphical-report__area path, -.graphical-report__area polygon { +.tau-chart__area path:not(.i-data-anchor), +.tau-chart__area polygon { opacity: 0.6; transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; } -.graphical-report__svg .graphical-report__bar { +.tau-chart__svg .tau-chart__bar { stroke: #fff; } -.graphical-report__dot.graphical-report__highlighted { +.tau-chart__dot.tau-chart__highlighted { stroke-width: 1; opacity: 1; } -.graphical-report__dot.graphical-report__dimmed { +.tau-chart__dot.tau-chart__dimmed { opacity: 0.2; } -.graphical-report__line.graphical-report__highlighted { +.tau-chart__line.tau-chart__highlighted { stroke-opacity: 1; stroke-width: 3; } -.graphical-report__line.graphical-report__dimmed { +.tau-chart__line.tau-chart__dimmed { stroke-opacity: 0.2; } -.i-role-label.graphical-report__highlighted, -.graphical-report__area.graphical-report__highlighted, -.graphical-report__bar.graphical-report__highlighted { +.i-role-label.tau-chart__highlighted, +.tau-chart__area.tau-chart__highlighted, +.tau-chart__bar.tau-chart__highlighted { stroke-opacity: 1; opacity: 1; } -.i-role-label.graphical-report__dimmed, -.graphical-report__area.graphical-report__dimmed, -.graphical-report__bar.graphical-report__dimmed { +.i-role-label.tau-chart__dimmed, +.tau-chart__area.tau-chart__dimmed, +.tau-chart__bar.tau-chart__dimmed { opacity: 0.2; } diff --git a/dist/taucharts.dark.min.css b/dist/taucharts.dark.min.css new file mode 100644 index 000000000..ca21044c4 --- /dev/null +++ b/dist/taucharts.dark.min.css @@ -0,0 +1,1717 @@ +/*! + * /* + * taucharts@2.3.2 (2018-08-14) + * Copyright 2018 Targetprocess, Inc. + * Licensed under Apache License 2.0 + * * / + * + */ +.tau-chart__layout { + line-height: 1; + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; +} +.tau-chart__layout text { + font: normal 13px Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; +} +.tau-chart__chart { + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; + position: absolute; + height: 100%; + width: 100%; + overflow: auto; +} +.tau-chart__layout { + display: -webkit-box; + display: -webkit-flexbox; + display: -ms-flexbox; + display: flex; + -ms-flex-align: stretch; + -webkit-align-items: stretch; + align-items: stretch; + -ms-flex-direction: column; + -webkit-box-orient: vertical; + flex-direction: column; + height: 100%; + width: 100%; + overflow: auto; + background: transparent; + color: #fff; +} +.tau-chart__layout__header { + -ms-flex: 0 0.1 auto; + -webkit-box-flex: 0 0.1 auto; + flex: 0 0.1 auto; + position: relative; +} +.tau-chart__layout__container { + display: -webkit-box; + display: -webkit-flexbox; + display: -ms-flexbox; + display: flex; + -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; + flex: 1 1 auto; + height: 100%; +} +.tau-chart__layout__footer { + -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; + flex: 0 1 auto; +} +.tau-chart__layout__sidebar { + -ms-flex: 0 1 auto; + -webkit-box-flex: 0 1 auto; + flex: 0 1 auto; +} +.tau-chart__layout__content { + -ms-flex: 1 1 auto; + -webkit-box-flex: 1 1 auto; + flex: 1 1 auto; + overflow: hidden; +} +.tau-chart__layout__sidebar-right { + position: relative; + overflow: hidden; + -ms-flex: 0 0 auto; + -webkit-box-flex: 0 0 auto; + flex: 0 0 auto; +} +.tau-chart__layout__sidebar-right__wrap { + max-height: 100%; + box-sizing: border-box; +} +.tau-chart__layout text { + fill: #fff; +} +.tau-chart__layout.tau-chart__layout_rendering-error { + opacity: 0.75; +} +.tau-chart__rendering-timeout-warning { + align-items: center; + background: rgba(0, 0, 0, 0.5); + display: flex; + flex-direction: column; + height: 100%; + position: absolute; + top: 0; + width: 100%; +} +.tau-chart__rendering-timeout-warning svg { + height: 100%; + max-width: 32em; + width: 100%; +} +.tau-chart__rendering-timeout-warning text { + font-weight: 300; +} +.tau-chart__progress { + box-sizing: border-box; + height: 0.25em; + opacity: 0; + overflow: hidden; + pointer-events: none; + position: absolute; + top: 0; + transition: opacity 1s 0.75s; + width: 100%; +} +.tau-chart__progress_active { + opacity: 1; +} +.tau-chart__progress__value { + background: rgba(255, 255, 255, 0.25); + height: 100%; + transition: width 0.75s; +} +.tau-chart { + /* region Select --------------------------------------------------*/ +} +.tau-chart__checkbox { + position: relative; + display: block; +} +.tau-chart__checkbox__input { + position: absolute; + z-index: -1; + opacity: 0; +} +.tau-chart__checkbox__icon { + position: relative; + width: 14px; + height: 14px; + top: 3px; + display: inline-block; + border: 1px solid #999; + border-radius: 2px; + background: #777; +} +.tau-chart__checkbox__icon:before { + display: none; + content: ''; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAAPFBMVEX///////////////////////////////////////////////////////////////////////////////8gsV51AAAAE3RSTlMAHB0eHyAhIiNAv8Dc3d7f4eLjyWil2QAAAD1JREFUeAFjoApg5WZF4rEJCHNBxbmYGdgFhflZIFxuYV5OIWE+ZpguAWFhYV4mmDaQSh4mJHM4uBjJcAsAoZwBrNc0BKUAAAAASUVORK5CYII=); + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; +} +.tau-chart__checkbox__text { + margin-left: 5px; +} +.tau-chart__checkbox__input ~ .tau-chart__checkbox__text { + cursor: pointer; +} +.tau-chart__checkbox__input:disabled ~ .tau-chart__checkbox__text { + cursor: default; + opacity: 0.3; +} +.tau-chart__checkbox__input:not(:disabled):focus + .tau-chart__checkbox__icon { + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 7px 0 #52a8ec; + outline: none; +} +.tau-chart__checkbox:hover .tau-chart__checkbox__input:not(:disabled) ~ .tau-chart__checkbox__icon { + border-color: #c3c3c3; +} +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon { + background: #777; +} +.tau-chart__checkbox__input:checked + .tau-chart__checkbox__icon:before { + display: block; +} +.tau-chart__select { + font-size: 13px; + font-family: inherit; + display: inline-block; + height: 24px; + line-height: 24px; + vertical-align: middle; + padding: 2px; + background-color: #777; + border: 1px solid #999; + border-radius: 2px; + color: #fff; +} +.tau-chart__select:focus { + box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 7px 0 #52a8ec; + outline: none; +} +.tau-chart__select[disabled] { + opacity: 0.3; + cursor: default; +} +.tau-chart__select[multiple] { + height: auto; +} +.tau-chart__select option[disabled] { + opacity: 0.6; +} +.tau-chart__button { + background-color: rgba(0, 0, 0, 0.9); + border: 1px solid currentColor; + border-radius: 4px; + box-shadow: 0 0 1px rgba(255, 255, 255, 0.1); + box-sizing: border-box; + color: #606060; + cursor: pointer; + font-size: 13px; + padding: 0 6px; + line-height: 1.5em; + height: calc(1.5em + 2px); +} +.tau-chart__button:hover { + border-color: #808080; + color: #fff; +} +/* region Generate .color@{n}-@{i} function */ +.tau-chart__svg .color20-1 { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__svg .color20-2 { + stroke: #DF2B59; + fill: #DF2B59; +} +.tau-chart__svg .color20-3 { + stroke: #66DA26; + fill: #66DA26; +} +.tau-chart__svg .color20-4 { + stroke: #755797; + fill: #755797; +} +.tau-chart__svg .color20-5 { + stroke: #E5B011; + fill: #E5B011; +} +.tau-chart__svg .color20-6 { + stroke: #746650; + fill: #746650; +} +.tau-chart__svg .color20-7 { + stroke: #CB461A; + fill: #CB461A; +} +.tau-chart__svg .color20-8 { + stroke: #C7CE23; + fill: #C7CE23; +} +.tau-chart__svg .color20-9 { + stroke: #7FCDC2; + fill: #7FCDC2; +} +.tau-chart__svg .color20-10 { + stroke: #CCA1C8; + fill: #CCA1C8; +} +.tau-chart__svg .color20-11 { + stroke: #C84CCE; + fill: #C84CCE; +} +.tau-chart__svg .color20-12 { + stroke: #54762E; + fill: #54762E; +} +.tau-chart__svg .color20-13 { + stroke: #746BC9; + fill: #746BC9; +} +.tau-chart__svg .color20-14 { + stroke: #A43B49; + fill: #A43B49; +} +.tau-chart__svg .color20-15 { + stroke: #5C7A76; + fill: #5C7A76; +} +.tau-chart__svg .color20-16 { + stroke: #C8BF87; + fill: #C8BF87; +} +.tau-chart__svg .color20-17 { + stroke: #BFC1C3; + fill: #BFC1C3; +} +.tau-chart__svg .color20-18 { + stroke: #AA7243; + fill: #AA7243; +} +.tau-chart__svg .color20-19 { + stroke: #71CE7B; + fill: #71CE7B; +} +.tau-chart__svg .color20-20 { + stroke: #BE478B; + fill: #BE478B; +} +.tau-chart__svg .color-default { + stroke: #6FA1D9; + fill: #6FA1D9; +} +/* endregion */ +/* region Generate .line-params-@{n} function */ +/* Generate .line-size-@{n} */ +.tau-chart__line-width-1 { + stroke-width: 1px; +} +.tau-chart__line-width-2 { + stroke-width: 1.5px; +} +.tau-chart__line-width-3 { + stroke-width: 2px; +} +.tau-chart__line-width-4 { + stroke-width: 2.5px; +} +.tau-chart__line-width-5 { + stroke-width: 3px; +} +/* Generate .line-opacity-@{n} */ +.tau-chart__line-opacity-1 { + stroke-opacity: 1; +} +.tau-chart__line-opacity-2 { + stroke-opacity: 0.95; +} +.tau-chart__line-opacity-3 { + stroke-opacity: 0.9; +} +.tau-chart__line-opacity-4 { + stroke-opacity: 0.85; +} +.tau-chart__line-opacity-5 { + stroke-opacity: 0.8; +} +/* endregion */ +/* endregion */ +.tau-chart { + /* Links */ + /* Axises and Grid */ + /* Scatterplot */ + /* Linechart */ + /* Bar */ + /* TODO: fix to avoid conflict on "stroke" with color brewer */ + /* TODO: remove this when CSS for color brewer is fixed */ + /* PLUGINS */ + /* Highlighter */ +} +.tau-chart a { + color: #3962FF; + border-bottom: 1px solid rgba(57, 98, 255, 0.3); + text-decoration: none; +} +.tau-chart a:hover { + color: #E17152; + border-bottom: 1px solid rgba(225, 113, 82, 0.3); +} +.tau-chart__time-axis-overflow .tick:nth-child(even) { + display: none; +} +.tau-chart__svg { + display: block; + overflow: hidden; +} +.tau-chart__svg .place { + fill: #fff; + stroke: #000; + stroke-opacity: 0.7; + stroke-width: 0.5; +} +.tau-chart__svg .place-label { + opacity: 0.7; + font-size: 11px; + color: #000000; + line-height: 13px; + text-anchor: start; +} +.tau-chart__svg .place-label-countries, +.tau-chart__svg .place-label-subunits, +.tau-chart__svg .place-label-states { + text-anchor: middle; + font-size: 10px; + fill: rgba(255, 255, 255, 0.5); + line-height: 10px; + text-transform: capitalize; +} +.tau-chart__svg .map-contour-level path { + stroke-opacity: 0.5; + stroke-linejoin: 'round'; +} +.tau-chart__svg .map-contour-level-0 path { + stroke: rgba(255, 255, 255, 0.2); +} +.tau-chart__svg .map-contour-level-1 path { + stroke: rgba(255, 255, 255, 0.15); +} +.tau-chart__svg .map-contour-level-2 path { + stroke: rgba(255, 255, 255, 0.09); +} +.tau-chart__svg .map-contour-level-3 path { + stroke: rgba(255, 255, 255, 0.06); +} +.tau-chart__svg .map-contour-level-4 path { + stroke: rgba(255, 255, 255, 0.03); +} +.tau-chart__svg .map-contour-highlighted, +.tau-chart__svg .map-contour:hover { + fill: rgba(255, 191, 0, 0.15); +} +.tau-chart__svg .map-contour-highlighted path, +.tau-chart__svg .map-contour:hover path { + stroke: #FFBF00; +} +.tau-chart__svg .map-contour-highlighted text, +.tau-chart__svg .map-contour:hover text { + fill: #FFBF00; +} +.tau-chart__svg .axis line, +.tau-chart__svg .axis path { + stroke-width: 1; + fill: none; + stroke: rgba(255, 255, 255, 0.2); + shape-rendering: crispEdges; +} +.tau-chart__svg .axis.facet-axis .tick line { + opacity: 0; +} +.tau-chart__svg .axis.facet-axis .tick line.label-ref { + opacity: 1; +} +.tau-chart__svg .axis.facet-axis .tick text { + font-size: 12px; + font-weight: 600; +} +.tau-chart__svg .axis.facet-axis path.domain { + opacity: 0; +} +.tau-chart__svg .axis.facet-axis.compact .tick text { + font-weight: normal; +} +.tau-chart__svg .axis.facet-axis.compact .label { + font-weight: normal; +} +.tau-chart__svg .axis.facet-axis.compact .label .label-token { + font-weight: normal; +} +.tau-chart__svg .tick text { + font-size: 11px; +} +.tau-chart__svg .grid .grid-lines path { + shape-rendering: crispEdges; +} +.tau-chart__svg .grid .line path, +.tau-chart__svg .grid path.line, +.tau-chart__svg .grid path.domain { + fill: none; +} +.tau-chart__svg .grid .tick > line, +.tau-chart__svg .grid .extra-tick-line { + fill: none; + stroke: rgba(255, 255, 255, 0.2); + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__svg .grid .tick.zero-tick > line { + stroke: rgba(255, 255, 255, 0.34); +} +.tau-chart__svg .grid .line path { + shape-rendering: auto; +} +.tau-chart__svg .grid .cursor-line { + shape-rendering: crispEdges; + stroke: #666666; + stroke-width: 1px; +} +.tau-chart__svg .label { + font-size: 12px; + font-weight: 600; +} +.tau-chart__svg .label .label-token { + font-size: 12px; + font-weight: 600; + text-transform: capitalize; +} +.tau-chart__svg .label .label-token-1, +.tau-chart__svg .label .label-token-2 { + font-weight: normal; +} +.tau-chart__svg .label .label-token-2 { + fill: gray; +} +.tau-chart__svg .label .label-token-delimiter { + font-weight: normal; + fill: gray; +} +.tau-chart__svg .label.inline .label-token { + font-weight: normal; + fill: gray; + text-transform: none; +} +.tau-chart__svg .brush .selection { + fill-opacity: .3; + stroke: #fff; + shape-rendering: crispEdges; +} +.tau-chart__svg .background { + stroke: #262626; +} +.tau-chart__dot { + opacity: 0.9; + stroke-width: 0; + transition: stroke-width 0.1s ease, opacity 0.2s ease; +} +.tau-chart__line { + fill: none; + transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; +} +.tau-chart__dot-line { + opacity: 1; + transition: stroke-opacity 0.2s ease; +} +.tau-chart__bar { + opacity: 0.7; + shape-rendering: geometricPrecision; + stroke-opacity: 0.5; + stroke-width: 1; + stroke: #fff; + transition: opacity 0.2s ease; +} +.tau-chart__area { + transition: opacity 0.2s ease; +} +.tau-chart__area path:not(.i-data-anchor), +.tau-chart__area polygon { + opacity: 0.6; + transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; +} +.tau-chart__svg .tau-chart__bar { + stroke: #fff; +} +.tau-chart__dot.tau-chart__highlighted { + stroke-width: 1; + opacity: 1; +} +.tau-chart__dot.tau-chart__dimmed { + opacity: 0.2; +} +.tau-chart__line.tau-chart__highlighted { + stroke-opacity: 1; + stroke-width: 3; +} +.tau-chart__line.tau-chart__dimmed { + stroke-opacity: 0.2; +} +.i-role-label.tau-chart__highlighted, +.tau-chart__area.tau-chart__highlighted, +.tau-chart__bar.tau-chart__highlighted { + stroke-opacity: 1; + opacity: 1; +} +.i-role-label.tau-chart__dimmed, +.tau-chart__area.tau-chart__dimmed, +.tau-chart__bar.tau-chart__dimmed { + opacity: 0.2; +} +.tau-chart__annotation-line { + stroke-width: 2px; + stroke-dasharray: 1,1; + shape-rendering: crispEdges; +} +.tau-chart__annotation-area.tau-chart__area polygon { + opacity: 0.1; +} +.tau-chart__category-filter { + box-sizing: border-box; + margin-right: 30px; + padding: 20px 0 10px 10px; + width: 160px; +} +.tau-chart__category-filter__category__label { + font-weight: 600; + font-size: 13px; + margin: 0 0 10px 10px; + text-transform: capitalize; +} +.tau-chart__category-filter__category__values { + margin-bottom: 10px; +} +.tau-chart__category-filter__value { + align-items: center; + color: #8e8e8e; + cursor: pointer; + display: flex; + flex-direction: row; + font-size: 13px; + width: 100%; +} +.tau-chart__category-filter__value:hover { + background-color: rgba(37, 39, 46, 0.2); +} +.tau-chart__category-filter__value_checked { + color: #fff; +} +.tau-chart__category-filter__value__toggle { + flex: none; + padding: 10px 10px 8px 10px; +} +.tau-chart__category-filter__value__toggle__icon { + background-color: transparent; + border: 1px solid #8694a3; + box-sizing: border-box; + border-radius: 50%; + display: inline-block; + height: 16px; + pointer-events: none; + position: relative; + width: 16px; +} +.tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value__toggle__icon::after { + background-color: #fff; + content: ""; + display: block; + opacity: 0; + position: absolute; +} +.tau-chart__category-filter__value__toggle__icon::before { + height: 2px; + left: 3px; + top: 6px; + width: 8px; +} +.tau-chart__category-filter__value__toggle__icon::after { + height: 8px; + left: 6px; + top: 3px; + width: 2px; +} +.tau-chart__category-filter__value__toggle:hover .tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value__toggle:hover .tau-chart__category-filter__value__toggle__icon::after { + opacity: 1; +} +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon { + background-color: #8694a3; + border-color: transparent; +} +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon::after { + background-color: #000; + transform: rotate(45deg); +} +.tau-chart__category-filter__value__label { + padding-left: 4px; +} +.tau-chart__layout .tau-crosshair__line { + shape-rendering: crispEdges; + stroke-dasharray: 1px 1px; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__label__text { + fill: #000; + stroke: none; +} +.tau-chart__layout .tau-crosshair__label__text, +.tau-chart__layout .tau-crosshair__label__text-shadow { + font-size: 12px; + font-weight: normal; +} +.tau-chart__layout .tau-crosshair__line-shadow { + shape-rendering: crispEdges; + stroke: #404040; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { + transform: translateX(-0.5px); +} +.tau-chart__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { + transform: translateY(0.5px); +} +.tau-chart__layout .tau-crosshair__label__text-shadow { + stroke-linejoin: round; + stroke-width: 3px; + visibility: hidden; +} +.tau-chart__layout .tau-crosshair__label__box { + fill-opacity: 0.85; + rx: 3px; + ry: 3px; + stroke: none; +} +.tau-chart__layout .tau-crosshair__line.color20-1 { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { + fill: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__line.color20-2 { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { + fill: #DF2B59; +} +.tau-chart__layout .tau-crosshair__line.color20-3 { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { + fill: #66DA26; +} +.tau-chart__layout .tau-crosshair__line.color20-4 { + stroke: #755797; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { + stroke: #755797; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { + fill: #755797; +} +.tau-chart__layout .tau-crosshair__line.color20-5 { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { + fill: #E5B011; +} +.tau-chart__layout .tau-crosshair__line.color20-6 { + stroke: #746650; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { + stroke: #746650; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { + fill: #746650; +} +.tau-chart__layout .tau-crosshair__line.color20-7 { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { + fill: #CB461A; +} +.tau-chart__layout .tau-crosshair__line.color20-8 { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { + fill: #C7CE23; +} +.tau-chart__layout .tau-crosshair__line.color20-9 { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { + fill: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__line.color20-10 { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { + fill: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__line.color20-11 { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { + fill: #C84CCE; +} +.tau-chart__layout .tau-crosshair__line.color20-12 { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { + fill: #54762E; +} +.tau-chart__layout .tau-crosshair__line.color20-13 { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { + fill: #746BC9; +} +.tau-chart__layout .tau-crosshair__line.color20-14 { + stroke: #A43B49; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { + stroke: #A43B49; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { + fill: #A43B49; +} +.tau-chart__layout .tau-crosshair__line.color20-15 { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { + fill: #5C7A76; +} +.tau-chart__layout .tau-crosshair__line.color20-16 { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { + fill: #C8BF87; +} +.tau-chart__layout .tau-crosshair__line.color20-17 { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { + fill: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__line.color20-18 { + stroke: #AA7243; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { + stroke: #AA7243; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { + fill: #AA7243; +} +.tau-chart__layout .tau-crosshair__line.color20-19 { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { + fill: #71CE7B; +} +.tau-chart__layout .tau-crosshair__line.color20-20 { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { + fill: #BE478B; +} +.diff-tooltip__table { + border-top: 1px solid rgba(255, 255, 255, 0.2); + margin-top: 5px; + padding-top: 5px; + width: calc(100% + 15px); +} +.diff-tooltip__header { + align-items: stretch; + display: flex; + font-weight: 600; + justify-content: space-between; + padding: 2px 0px; + position: relative; +} +.diff-tooltip__header__text { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-start; + max-width: 120px; +} +.diff-tooltip__header__value { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-end; + margin-right: 15px; + max-width: 120px; + padding-left: 10px; + text-align: right; +} +.diff-tooltip__header__updown { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + font-size: 75%; + height: 100%; + justify-content: flex-start; + padding-left: 2px; + position: absolute; + right: 0; + visibility: hidden; +} +.diff-tooltip__body { + max-height: 250px; + overflow: hidden; + padding: 1px; + position: relative; +} +.diff-tooltip__body__content { + padding-bottom: 1px; +} +.diff-tooltip__body_overflow-top::before, +.diff-tooltip__body_overflow-bottom::after { + align-items: center; + color: rgba(255, 255, 255, 0.7); + content: "..."; + display: flex; + flex-direction: column; + height: 26px; + left: 0; + position: absolute; + width: 100%; + z-index: 2; +} +.diff-tooltip__body_overflow-top::before { + background: linear-gradient(to bottom, #000, rgba(0, 0, 0, 0)); + justify-content: flex-start; + top: 0; +} +.diff-tooltip__body_overflow-bottom::after { + background: linear-gradient(to top, #000, rgba(0, 0, 0, 0)); + justify-content: flex-end; + bottom: 0; +} +.diff-tooltip__item { + display: flex; + justify-content: space-between; + margin-right: 15px; + min-width: 100px; + position: relative; +} +.diff-tooltip__item_highlighted { + background-color: rgba(241, 233, 255, 0.5); + box-shadow: 0 0 0 1px #877aa1; + z-index: 1; +} +.diff-tooltip__item__bg { + align-items: center; + display: inline-flex; + height: 100%; + justify-content: center; + min-width: 3px; + opacity: 0.6; + position: absolute; + z-index: 0; +} +.diff-tooltip__item__text { + flex: 1 1 auto; + overflow: hidden; + padding: 2px 4px; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + z-index: 1; +} +.diff-tooltip__item__value { + flex: none; + display: table-cell; + padding: 2px 4px 2px 30px; + z-index: 1; +} +.diff-tooltip__item__updown { + align-items: center; + display: inline-flex; + flex: 4; + justify-content: flex-start; + left: 100%; + height: 100%; + padding: 0 4px 0 4px; + position: absolute; +} +.diff-tooltip__item__updown_positive { + color: #4ca383; +} +.diff-tooltip__item__updown_negative { + color: #df6772; +} +.diff-tooltip__field__updown_positive { + color: #4ca383; +} +.diff-tooltip__field__updown_negative { + color: #df6772; +} +.interval-highlight__range { + shape-rendering: crispEdges; +} +.interval-highlight__range-start { + shape-rendering: crispEdges; + stroke: #b8aecb; + stroke-dasharray: 2 1; +} +.interval-highlight__range-end { + shape-rendering: crispEdges; + stroke: #b8aecb; +} +.interval-highlight__gradient-start { + stop-color: #c4b3e6; + stop-opacity: 0.02; +} +.interval-highlight__gradient-end { + stop-color: #c4b3e6; + stop-opacity: 0.2; +} +.diff-tooltip__item__bg.color20-1 { + background-color: #6FA1D9; +} +.diff-tooltip__item__bg.color20-2 { + background-color: #DF2B59; +} +.diff-tooltip__item__bg.color20-3 { + background-color: #66DA26; +} +.diff-tooltip__item__bg.color20-4 { + background-color: #755797; +} +.diff-tooltip__item__bg.color20-5 { + background-color: #E5B011; +} +.diff-tooltip__item__bg.color20-6 { + background-color: #746650; +} +.diff-tooltip__item__bg.color20-7 { + background-color: #CB461A; +} +.diff-tooltip__item__bg.color20-8 { + background-color: #C7CE23; +} +.diff-tooltip__item__bg.color20-9 { + background-color: #7FCDC2; +} +.diff-tooltip__item__bg.color20-10 { + background-color: #CCA1C8; +} +.diff-tooltip__item__bg.color20-11 { + background-color: #C84CCE; +} +.diff-tooltip__item__bg.color20-12 { + background-color: #54762E; +} +.diff-tooltip__item__bg.color20-13 { + background-color: #746BC9; +} +.diff-tooltip__item__bg.color20-14 { + background-color: #A43B49; +} +.diff-tooltip__item__bg.color20-15 { + background-color: #5C7A76; +} +.diff-tooltip__item__bg.color20-16 { + background-color: #C8BF87; +} +.diff-tooltip__item__bg.color20-17 { + background-color: #BFC1C3; +} +.diff-tooltip__item__bg.color20-18 { + background-color: #AA7243; +} +.diff-tooltip__item__bg.color20-19 { + background-color: #71CE7B; +} +.diff-tooltip__item__bg.color20-20 { + background-color: #BE478B; +} +.tau-chart__print-block { + display: none; +} +.tau-chart__export { + float: right; + margin: 0 20px 0 0; + display: block; + text-indent: 20px; + overflow: hidden; + background-repeat: no-repeat; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=); + width: 20px; + height: 20px; + color: transparent; + opacity: 0.6; + cursor: pointer; + text-decoration: none; + position: relative; + z-index: 2; +} +.tau-chart__export:hover { + opacity: 1; + text-decoration: none; +} +.tau-chart__export__list { + font-size: 11px; + margin: 0; + padding: 0; +} +.tau-chart__export__item { + overflow: hidden; + box-sizing: border-box; +} +.tau-chart__export__item > a { + display: block; + padding: 7px 15px; + color: inherit; + text-decoration: none; + cursor: pointer; +} +.tau-chart__export__item > a:hover, +.tau-chart__export__item > a:focus { + background: #EAF2FC; + outline: none; + box-shadow: none; +} +.tau-chart__legend { + padding: 20px 0 10px 10px; + position: relative; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__legend__wrap { + margin-bottom: 30px; + position: relative; +} +.tau-chart__legend__wrap:last-child { + margin-bottom: 0; +} +.tau-chart__legend__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__legend__reset { + margin-top: -4px; + position: absolute; + right: -25px; + top: 0; + z-index: 1; +} +.tau-chart__legend__reset.disabled { + display: none; +} +.tau-chart__legend__reset + .tau-chart__legend__title { + margin-right: 1.7em; +} +.tau-chart__legend__item { + padding: 10px 20px 8px 40px; + position: relative; + font-size: 13px; + line-height: 1.2em; + cursor: pointer; +} +.tau-chart__legend__item:hover { + background-color: rgba(37, 39, 46, 0.2); +} +.tau-chart__legend__item--size { + cursor: default; +} +.tau-chart__legend__item--size:hover { + background: none; +} +.tau-chart__legend__item .color-default { + background: #6FA1D9; + border-color: #6FA1D9; +} +.tau-chart__legend__item:disabled, +.tau-chart__legend__item.disabled { + color: #8e8e8e; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide { + background: transparent; +} +.tau-chart__legend__guide { + position: absolute; + box-sizing: border-box; + width: 100%; + height: 100%; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid transparent; + border-radius: 50%; +} +.tau-chart__legend__guide__wrap { + position: absolute; + top: calc((10px - 8px) + 0.6em); + left: 10px; + width: 16px; + height: 16px; +} +.tau-chart__legend__guide--size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__guide--color__overlay { + background-color: transparent; + height: 36px; + left: -12px; + position: absolute; + top: -12px; + width: 36px; +} +.tau-chart__legend__guide--color::before { + content: ""; + display: none; + height: 2px; + left: 3px; + pointer-events: none; + position: absolute; + top: 6px; + width: 8px; +} +.tau-chart__legend__guide--color::after { + content: ""; + display: none; + height: 8px; + left: 6px; + pointer-events: none; + position: absolute; + top: 3px; + width: 2px; +} +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::after { + background-color: #000; + display: inline-block; + transform: rotate(45deg); +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover { + background: #000; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::after { + background-color: #fff; + transform: none; +} +.tau-chart__legend__size-wrapper, +.tau-chart__legend__gradient-wrapper { + box-sizing: border-box; + margin: 10px; + overflow: visible; + width: 100%; +} +.tau-chart__legend__size, +.tau-chart__legend__gradient { + overflow: visible; +} +.tau-chart__legend__size__item__circle.color-definite { + stroke: #cacaca; + fill: #cacaca; +} +.tau-chart__legend__size__item__circle.color-default-size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__gradient__bar { + rx: 4px; + ry: 4px; +} +.tau-chart__legend__item .color20-1 { + background: #6FA1D9; + border: 1px solid #6FA1D9; +} +.tau-chart__legend__item.disabled .color20-1 { + background-color: transparent; +} +.tau-chart__legend__item .color20-2 { + background: #DF2B59; + border: 1px solid #DF2B59; +} +.tau-chart__legend__item.disabled .color20-2 { + background-color: transparent; +} +.tau-chart__legend__item .color20-3 { + background: #66DA26; + border: 1px solid #66DA26; +} +.tau-chart__legend__item.disabled .color20-3 { + background-color: transparent; +} +.tau-chart__legend__item .color20-4 { + background: #755797; + border: 1px solid #755797; +} +.tau-chart__legend__item.disabled .color20-4 { + background-color: transparent; +} +.tau-chart__legend__item .color20-5 { + background: #E5B011; + border: 1px solid #E5B011; +} +.tau-chart__legend__item.disabled .color20-5 { + background-color: transparent; +} +.tau-chart__legend__item .color20-6 { + background: #746650; + border: 1px solid #746650; +} +.tau-chart__legend__item.disabled .color20-6 { + background-color: transparent; +} +.tau-chart__legend__item .color20-7 { + background: #CB461A; + border: 1px solid #CB461A; +} +.tau-chart__legend__item.disabled .color20-7 { + background-color: transparent; +} +.tau-chart__legend__item .color20-8 { + background: #C7CE23; + border: 1px solid #C7CE23; +} +.tau-chart__legend__item.disabled .color20-8 { + background-color: transparent; +} +.tau-chart__legend__item .color20-9 { + background: #7FCDC2; + border: 1px solid #7FCDC2; +} +.tau-chart__legend__item.disabled .color20-9 { + background-color: transparent; +} +.tau-chart__legend__item .color20-10 { + background: #CCA1C8; + border: 1px solid #CCA1C8; +} +.tau-chart__legend__item.disabled .color20-10 { + background-color: transparent; +} +.tau-chart__legend__item .color20-11 { + background: #C84CCE; + border: 1px solid #C84CCE; +} +.tau-chart__legend__item.disabled .color20-11 { + background-color: transparent; +} +.tau-chart__legend__item .color20-12 { + background: #54762E; + border: 1px solid #54762E; +} +.tau-chart__legend__item.disabled .color20-12 { + background-color: transparent; +} +.tau-chart__legend__item .color20-13 { + background: #746BC9; + border: 1px solid #746BC9; +} +.tau-chart__legend__item.disabled .color20-13 { + background-color: transparent; +} +.tau-chart__legend__item .color20-14 { + background: #A43B49; + border: 1px solid #A43B49; +} +.tau-chart__legend__item.disabled .color20-14 { + background-color: transparent; +} +.tau-chart__legend__item .color20-15 { + background: #5C7A76; + border: 1px solid #5C7A76; +} +.tau-chart__legend__item.disabled .color20-15 { + background-color: transparent; +} +.tau-chart__legend__item .color20-16 { + background: #C8BF87; + border: 1px solid #C8BF87; +} +.tau-chart__legend__item.disabled .color20-16 { + background-color: transparent; +} +.tau-chart__legend__item .color20-17 { + background: #BFC1C3; + border: 1px solid #BFC1C3; +} +.tau-chart__legend__item.disabled .color20-17 { + background-color: transparent; +} +.tau-chart__legend__item .color20-18 { + background: #AA7243; + border: 1px solid #AA7243; +} +.tau-chart__legend__item.disabled .color20-18 { + background-color: transparent; +} +.tau-chart__legend__item .color20-19 { + background: #71CE7B; + border: 1px solid #71CE7B; +} +.tau-chart__legend__item.disabled .color20-19 { + background-color: transparent; +} +.tau-chart__legend__item .color20-20 { + background: #BE478B; + border: 1px solid #BE478B; +} +.tau-chart__legend__item.disabled .color20-20 { + background-color: transparent; +} +.tau-chart__filter__wrap { + padding: 20px 0 10px 10px; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__filter__wrap__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__filter__wrap rect { + fill: rgba(0, 0, 0, 0.2); +} +.tau-chart__filter__wrap .brush .overlay, +.tau-chart__filter__wrap .brush .handle { + opacity: 0; +} +.tau-chart__filter__wrap .brush .selection { + shape-rendering: crispEdges; + fill-opacity: 0.4; + fill: #0074FF; +} +.tau-chart__filter__wrap text.date-label { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap text.date-label .common { + font-weight: 600; +} +.tau-chart__filter__wrap .resize line { + stroke: #000; + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__filter__wrap .resize.e text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap .resize.w text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__tooltip { + background: rgba(0, 0, 0, 0.9); + position: absolute; + top: 0; + left: 0; + max-width: none; + z-index: 900; + align-items: stretch; + display: flex; + flex-direction: column; + box-shadow: 0 1px 4px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.005); + font-size: 11px; + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; + /* Fade */ +} +.tau-chart__tooltip.fade { + opacity: 0; + transition: opacity 200ms ease-out; +} +.tau-chart__tooltip.fade.in { + opacity: 1; + transition-duration: 500ms; +} +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.bottom-right { + margin-left: 8px; +} +.tau-chart__tooltip.top-left, +.tau-chart__tooltip.bottom-left { + margin-left: -8px; +} +.tau-chart__tooltip.top, +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.top-left { + margin-top: 8px; +} +.tau-chart__tooltip__content { + box-sizing: border-box; + max-width: 500px; + min-width: 100px; + overflow: hidden; + padding: 15px 15px 10px 15px; +} +.tau-chart__tooltip__buttons { + background: #EBEEF1; + bottom: 100%; + box-shadow: 0 1px 4px 0 rgba(255, 255, 255, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.005); + display: flex; + flex-direction: row; + flex-wrap: wrap; + max-width: 500px; + min-width: 86px; + position: absolute; + width: 100%; + z-index: -1; +} +.tau-chart__tooltip__buttons::after { + background: linear-gradient(to bottom, #000 50%, rgba(0, 0, 0, 0)); + content: ""; + display: block; + height: 8px; + left: 0; + pointer-events: none; + position: absolute; + top: 100%; + width: 100%; +} +.tau-chart__tooltip__button { + color: #65717F; + cursor: pointer; + display: inline-flex; + flex: 1 0 auto; + height: 0; + overflow: hidden; + transition: height 500ms; +} +.tau-chart__tooltip__button__wrap { + line-height: 26px; + padding: 0 15px; +} +.tau-chart__tooltip__button:hover { + background: #767779; + color: #fff; +} +.tau-chart__tooltip__button .tau-icon-close-gray { + background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggZmlsbD0iIzg0OTZBNyIgZD0iTTEwLDAuNzE1TDkuMjg1LDBMNSw0LjI4NUwwLjcxNSwwTDAsMC43MTVMNC4yODUsNUwwLDkuMjg1TDAuNzE1LDEwTDUsNS43MTVMOS4yODUsMTBMMTAsOS4yODVMNS43MTUsNUwxMCwwLjcxNXoiLz48L3N2Zz4=); + display: inline-block; + width: 12px; + height: 12px; + position: relative; + top: 3px; + margin-right: 5px; +} +.tau-chart__tooltip.stuck .tau-chart__tooltip__button { + height: 26px; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons { + bottom: initial; + top: 100%; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons::after { + background: linear-gradient(to top, #000 50%, rgba(0, 0, 0, 0)); + bottom: 100%; + top: initial; +} +.tau-chart__tooltip.top-right .tau-chart__tooltip__button__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__button__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip__list { + display: table; +} +.tau-chart__tooltip__list__item { + display: table-row; +} +.tau-chart__tooltip__list__elem { + display: table-cell; + padding-bottom: 4px; + line-height: 1.3; + color: #fff; +} +.tau-chart__tooltip__list__elem:not(:first-child) { + padding-left: 15px; +} +.tau-chart__tooltip__list__elem:first-child { + color: #ccc; +} +.tau-chart__tooltip__gray-text { + color: #ccc; +} +.tau-chart__tooltip-target { + cursor: pointer; +} +.tau-chart__tooltip-target .tau-chart__dot.tau-chart__highlighted, +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted, +.tau-chart__tooltip-target .i-data-anchor.tau-chart__highlighted { + stroke: #fff; + stroke-width: 1; +} +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted { + shape-rendering: crispEdges; +} +.tau-chart__svg .tau-chart__trendline.color20-1 { + stroke: #357ac7; +} +.tau-chart__svg .tau-chart__trendline.color20-2 { + stroke: #a5193d; +} +.tau-chart__svg .tau-chart__trendline.color20-3 { + stroke: #47991a; +} +.tau-chart__svg .tau-chart__trendline.color20-4 { + stroke: #4f3b66; +} +.tau-chart__svg .tau-chart__trendline.color20-5 { + stroke: #9e790c; +} +.tau-chart__svg .tau-chart__trendline.color20-6 { + stroke: #473e31; +} +.tau-chart__svg .tau-chart__trendline.color20-7 { + stroke: #872f11; +} +.tau-chart__svg .tau-chart__trendline.color20-8 { + stroke: #888d18; +} +.tau-chart__svg .tau-chart__trendline.color20-9 { + stroke: #48b8a8; +} +.tau-chart__svg .tau-chart__trendline.color20-10 { + stroke: #b16fab; +} +.tau-chart__svg .tau-chart__trendline.color20-11 { + stroke: #9c2ca1; +} +.tau-chart__svg .tau-chart__trendline.color20-12 { + stroke: #2d3f19; +} +.tau-chart__svg .tau-chart__trendline.color20-13 { + stroke: #483eaa; +} +.tau-chart__svg .tau-chart__trendline.color20-14 { + stroke: #6c2730; +} +.tau-chart__svg .tau-chart__trendline.color20-15 { + stroke: #3b4e4c; +} +.tau-chart__svg .tau-chart__trendline.color20-16 { + stroke: #b0a353; +} +.tau-chart__svg .tau-chart__trendline.color20-17 { + stroke: #989b9e; +} +.tau-chart__svg .tau-chart__trendline.color20-18 { + stroke: #734d2d; +} +.tau-chart__svg .tau-chart__trendline.color20-19 { + stroke: #3eb44b; +} +.tau-chart__svg .tau-chart__trendline.color20-20 { + stroke: #883063; +} +.tau-chart__svg .tau-chart__trendline.color-default { + stroke: #357ac7; +} +.tau-chart { + /* TrendLine */ +} +.tau-chart__trendlinepanel { + padding: 20px 0 20px 20px; + margin-right: 20px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__trendlinepanel__title { + margin: 0 0 10px 0; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__trendlinepanel__control { + width: 100%; +} +.tau-chart__trendlinepanel__error-message { + font-size: 11px; + line-height: 16px; + margin-left: 5px; +} +.tau-chart__trendlinepanel.applicable-false.hide-trendline-error, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__input, +.tau-chart__trendlinepanel.applicable-false .tau-chart__trendlinepanel__control, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__icon { + display: none; +} +.tau-chart__trendline { + stroke-dasharray: 4, 4; +} diff --git a/dist/taucharts.js b/dist/taucharts.js new file mode 100644 index 000000000..8da6b3ac4 --- /dev/null +++ b/dist/taucharts.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-array"),require("d3-scale"),require("topojson-client"),require("d3-transition"),require("d3-color"),require("d3-brush"),require("d3-time-format"),require("d3-format"),require("d3-time"),require("d3-shape"),require("d3-quadtree"),require("d3-request"),require("d3-geo"),require("d3-axis")):"function"==typeof define&&define.amd?define(["d3-selection","d3-array","d3-scale","topojson-client","d3-transition","d3-color","d3-brush","d3-time-format","d3-format","d3-time","d3-shape","d3-quadtree","d3-request","d3-geo","d3-axis"],e):"object"==typeof exports?exports.Taucharts=e(require("d3-selection"),require("d3-array"),require("d3-scale"),require("topojson-client"),require("d3-transition"),require("d3-color"),require("d3-brush"),require("d3-time-format"),require("d3-format"),require("d3-time"),require("d3-shape"),require("d3-quadtree"),require("d3-request"),require("d3-geo"),require("d3-axis")):t.Taucharts=e(t.d3,t.d3,t.d3,t.topojson,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(window,function(t,e,n,r,i,o,a,u,s,c,l,f,d,h,p){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=28)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var r={};n.d(r,"traverseJSON",function(){return ft}),n.d(r,"traverseSpec",function(){return dt}),n.d(r,"clone",function(){return St}),n.d(r,"isDate",function(){return Mt}),n.d(r,"isObject",function(){return Ot}),n.d(r,"niceZeroBased",function(){return At}),n.d(r,"niceTimeDomain",function(){return kt}),n.d(r,"generateHash",function(){return Ct}),n.d(r,"generateRatioFunction",function(){return Nt}),n.d(r,"isSpecRectCoordsOnly",function(){return Lt}),n.d(r,"throttleLastEvent",function(){return jt}),n.d(r,"splitEvenly",function(){return Pt}),n.d(r,"extRGBColor",function(){return zt}),n.d(r,"extCSSClass",function(){return Ft}),n.d(r,"toRadian",function(){return Rt}),n.d(r,"normalizeAngle",function(){return Dt}),n.d(r,"range",function(){return It}),n.d(r,"hasXOverflow",function(){return Bt}),n.d(r,"hasYOverflow",function(){return Wt}),n.d(r,"flatten",function(){return Ut}),n.d(r,"unique",function(){return Ht}),n.d(r,"groupBy",function(){return qt}),n.d(r,"union",function(){return Gt}),n.d(r,"intersection",function(){return Xt}),n.d(r,"defaults",function(){return Yt}),n.d(r,"omit",function(){return Vt}),n.d(r,"memoize",function(){return $t}),n.d(r,"createMultiSorter",function(){return Jt}),n.d(r,"pick",function(){return Kt}),n.d(r,"escape",function(){return Zt}),n.d(r,"template",function(){return Qt}),n.d(r,"escapeHtml",function(){return te}),n.d(r,"xml",function(){return ie}),n.d(r,"take",function(){return oe}),n.d(r,"isChartElement",function(){return ue}),n.d(r,"isFacetUnit",function(){return se});var i={};n.d(i,"appendTo",function(){return fe}),n.d(i,"getScrollbarSize",function(){return de}),n.d(i,"setScrollPadding",function(){return he}),n.d(i,"getStyle",function(){return pe}),n.d(i,"getStyleAsNum",function(){return ge}),n.d(i,"getContainerSize",function(){return me}),n.d(i,"getAxisTickLabelSize",function(){return ye}),n.d(i,"getLabelSize",function(){return ve}),n.d(i,"getCharSize",function(){return be}),n.d(i,"selectOrAppend",function(){return xe}),n.d(i,"selectImmediate",function(){return we}),n.d(i,"selectAllImmediate",function(){return _e}),n.d(i,"sortChildren",function(){return Se}),n.d(i,"classes",function(){return Me}),n.d(i,"dispatchMouseEvent",function(){return Oe});var o={};n.d(o,"translate",function(){return Ae}),n.d(o,"rotate",function(){return ke}),n.d(o,"getOrientation",function(){return Te}),n.d(o,"parseTransformTranslate",function(){return Ee}),n.d(o,"isIntersect",function(){return Ce}),n.d(o,"getDeepTransformTranslate",function(){return Ne}),n.d(o,"raiseElements",function(){return Le});var a=n(0),u=n(2),s=n(3),c={},l={};function f(t){var e=l[t];return e||(e=function(){for(var e,n,r=this,i=0,o=[];r=r.handler;){if("function"==typeof(n=r.callbacks[t])){if(!e)for(e=[this],i=0;i=0?t.positive:t.negative,u=a[i]||0,s=u+o;return a[i]=s,{nextStack:s,prevStack:u}}},o=i({positive:{},negative:{}}),a=i({positive:{},negative:{}}),u=function(e){return $t(e,t.id)},s=Number.MAX_VALUE,c=Number.MIN_VALUE,l=function(t){return s=tc?t:c,r.value(t)},f=u(function(t){return l(o(t).nextStack)}),d=u(function(t){return l(a(t).prevStack)}),h=function(e){return t.group(e)+"/"+(e[r.dim]>=0?1:-1)},p=qt(e,h),g=Object.keys(p).sort(t.flip||!t.flip&&t.obsoleteVerticalStackOrder?function(e,n){return t.order(e)-t.order(n)}:function(e,n){return t.order(n)-t.order(e)}).reduce(function(t,e){return t.concat(p[e])},[]);return g.forEach(function(t){f(t),d(t)}),r.fixup(function(t){var e={};return(!t.hasOwnProperty("max")||t.maxs)&&(e.min=s),e}),{group:h,data:function(){return g},yi:f,y0:d}}).reg("size_distribute_evenly",function(t,e){var n=e.minLimit,r=e.maxLimit,i=e.defMin,o=e.defMax,a=t.data(),u=function(t,e){return t-e},s=t.scaleX.discrete?t.scaleX.stepSize()/2:Number.MAX_VALUE,c=a.map(function(e){return t.xi(e)}).sort(u),l=c[0],f=c.slice(1).map(function(t){var e=t-l;return l=t,e}).filter(function(t){return t>0}).sort(u).concat(Number.MAX_VALUE)[0],d=Math.min(f,s),h="number"==typeof n?n:i,p={minSize:h,maxSize:"number"==typeof r?r:Math.max(h,Math.min(o,d))};return t.scaleSize.fixup(function(t){var e={};return t.fixed?t.maxSize>p.maxSize&&(e.maxSize=p.maxSize):(e.fixed=!0,e.minSize=p.minSize,e.maxSize=p.maxSize),e}),{}}).reg("adjustStaticSizeScale",function(t,e){var n=e.minLimit,r=e.maxLimit,i=e.defMin,o=e.defMax,a={minSize:"number"==typeof n?n:i,maxSize:"number"==typeof r?r:o};return t.scaleSize.fixup(function(t){var e={};return t.fixed||(e.fixed=!0,e.minSize=a.minSize,e.maxSize=a.maxSize),e}),{}}).reg("adjustSigmaSizeScale",function(t,e){var n,r,i,o,a=e.minLimit,u=e.maxLimit,s=e.defMin,c=e.defMax,l=function(t,e){return t-e},f=t.data().map(function(e){return t.xi(e)}).sort(l),d=f[0],h=f.slice(1).map(function(t){var e=t-d;return d=t,e}).filter(function(t){return t>0}).sort(l).concat(Number.MAX_VALUE)[0],p=t.scaleX.discrete?t.scaleX.stepSize()/2:Number.MAX_VALUE,g=Math.min(h,p),m="number"==typeof a?a:s,y="number"==typeof u?u:c,v={minSize:m,maxSize:Math.max(m,Math.min(y,(n=g,r=(m+y)/2,i=y,o=m,Math.round(r+(i-r)/(1+Math.exp(-(n-o)/.5))))))};return t.scaleSize.fixup(function(t){var e={};return t.fixed?t.maxSize>v.maxSize&&(e.maxSize=v.maxSize):(e.fixed=!0,e.minSize=v.minSize,e.maxSize=v.maxSize),e}),{}}).reg("avoidScalesOverflow",function(t,e){var n,r,i=e.sizeDirection,o=function(t,e){return!t||t.discrete||"logarithmic"===t.scaleType||i.indexOf(e)<0},a=o(t.scaleX,"x"),u=o(t.scaleY,"y");if(a&&u)return{};t.scaleSize.fixup(function(t){return n=t.minSize,r=t.maxSize,t});var s=t.data().reduce(function(e,i){var o,s,c=t.size(i),l=(c>=n?c:n+c*(r-n))/2;return a||(o=t.xi(i),e.left=Math.min(e.left,o-l),e.right=Math.max(e.right,o+l)),u||(s=t.yi(i),e.top=Math.min(e.top,s-l),e.bottom=Math.max(e.bottom,s+l)),e},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),c=function(e,n,r,i){var o=e.domain(),a=Math.abs(e.value(o[1])-e.value(o[0])),u=(o[1]-o[0])/a;if(0===a)return 1;var s=Math.max(0,-n),c=Math.max(0,r-a),l=t.flip?c:s,f=t.flip?s:c,d=Number(o[0])-(i?f:l)*u,h=Number(o[1])+(i?l:f)*u;return e.fixup(function(t){var e={};if(t.fixedBorders){var i=t.fixedBorders.slice(),o=i[0],a=i[1];(o>n||a=0?1:-1},d=function(e,n,r){var i=qt(n,function(t){return t[u]}),o=n[0];return e.reduce(function(e,n){return e.concat(i[n]||function(e,n,r){var i,o=[e,t.id(n),r].join(" ");return(i={})[u]=e,i[s]=1e-10*r,i[l]=n[l],i[c]=n[c],i.taucharts_synthetic_record=!0,i.taucharts_synthetic_recordid=o,i}(n,o,r))},[])},h=function(t,e){return t-e},p=function(){return Ht(a.reduce(function(t,e){return t.concat(e.map(function(t){return t[u]}))},[])).sort(h)},g=r?function(){var e=p(),n=Math.max.apply(Math,e.map(function(t){return Number(t)})),o=t.scaleX.domain(),a=v.generate(o[0],o[1],r,{utc:i}).filter(function(t){return t>=o[0]&&t<=o[1]}),u=0,s=[],c=v.get(r,{utc:i});return a.forEach(function(t){var r=Number(t);if(!(r>=n)){for(var i=u;i=0;n--)i=t[n+1],(r=t[n]).isCubicControl||i.isCubicControl||(t.splice(n+1,0,A(1/3,i,r),A(2/3,i,r)),t[n+1].isCubicControl=!0,t[n+2].isCubicControl=!0);var o=t.filter(function(t,e){return e%3==0}),a=e.filter(function(t,e){return e%3==0}),u=o.map(function(t){return t.id}),s=a.map(function(t){return t.id}),c=u.reduce(function(e,n){return e[n]=t.findIndex(function(t){return t.id===n}),e},{}),l=s.reduce(function(t,n){return t[n]=e.findIndex(function(t){return t.id===n}),t},{}),f=u.filter(function(t){return s.indexOf(t)>=0}),d=o.filter(function(t){return!t.positionIsBeingChanged}),h=a.filter(function(t){return!t.positionIsBeingChanged}),p=I(d,h),g=I(h,d),m=[];f.forEach(function(n,r){var i,o,a,u=c[n],s=l[n];if(0===r&&(u>0||s>0)&&m.push(E({polylineFrom:t.slice(0,u+1),polylineTo:e.slice(0,s+1),toOppositeScale:0===s?p:g,isCubic:!0})),r>0){var d=c[f[r-1]],h=l[f[r-1]];u-d>3||s-h>3?m.push(C({polylineFrom:t.slice(d,u+1),polylineTo:e.slice(h,s+1),isCubic:!0})):m.push((i={polylineFrom:t.slice(d,u+1),polylineTo:e.slice(h,s+1)},o=i.polylineFrom,a=i.polylineTo,function(t){return F(o.slice(1,3),a.slice(1,3),t)}))}m.push(N({pointFrom:t[u],pointTo:e[s]})),r===f.length-1&&(t.length-u-1>0||e.length-s-1>0)&&m.push(E({polylineFrom:t.slice(u),polylineTo:e.slice(s),toOppositeScale:e.length-s==1?p:g,isCubic:!0}))}),0===m.length&&(e.length>0&&0===f.length||t.length>0&&0===f.length)&&m.push(L({polylineFrom:t.slice(0),polylineTo:e.slice(0),isCubic:!0}));return function(t){var e=[];return m.forEach(function(n){var r=n(t);j(e,r)}),e}}:function(t,e){var n=(t=t.filter(function(t){return!t.isInterpolated})).map(function(t){return t.id}),r=e.map(function(t){return t.id}),i=n.filter(function(t){return r.indexOf(t)>=0}),o=t.filter(function(t){return!t.positionIsBeingChanged}),a=e.filter(function(t){return!t.positionIsBeingChanged}),u=I(o,a),s=I(a,o),c=[];i.forEach(function(o,a){var l=n.indexOf(o),f=r.indexOf(o);if(0===a&&(l>0||f>0)&&c.push(E({isCubic:!1,polylineFrom:t.slice(0,l+1),polylineTo:e.slice(0,f+1),toOppositeScale:0===f?u:s})),a>0){var d=n.indexOf(i[a-1]),h=r.indexOf(i[a-1]);(l-d>1||f-h>1)&&c.push(C({isCubic:!1,polylineFrom:t.slice(d,l+1),polylineTo:e.slice(h,f+1)}))}c.push(N({pointFrom:t[l],pointTo:e[f]})),a===i.length-1&&(t.length-l-1>0||e.length-f-1>0)&&c.push(E({isCubic:!1,polylineFrom:t.slice(l),polylineTo:e.slice(f),toOppositeScale:e.length-f==1?u:s}))}),0===c.length&&(e.length>0&&0===i.length||t.length>0&&0===i.length)&&c.push(L({isCubic:!1,polylineFrom:t.slice(0),polylineTo:e.slice(0)}));return function(t){var e=[];return c.forEach(function(n){var r=n(t);j(e,r)}),e}})(t,e)),r(i))}}function E(t){var e=t.polylineFrom,n=t.polylineTo,r=t.isCubic,i=t.toOppositeScale,o=e.length>n.length?e:n,a=1===n.length,u=e[0].id!==n[0].id,s=Boolean(u!==a);return function(t){var e=(r?D:R)({t:t,polyline:o,decreasing:a,rightToLeft:s});a===s?e.shift():e.pop();var n=F(e.map(i),e,a?1-t:t);return n.forEach(function(t){return t.positionIsBeingChanged=!0}),n}}function C(t){var e=t.polylineFrom,n=t.polylineTo,r=t.isCubic,i=e.length,o=n.length;if(o!==i){var a=o2){var i=function(t,e){for(var n,r,i=[e[0]],o=0;o0&&e0&&(t.positionIsBeingChanged=!0)}),e}}function j(t,e){return Array.prototype.push.apply(t,e)}function P(t,e,n){return void 0===e?t:"number"==typeof e?t+n*(e-t):e}function z(t,e,n){if(t===e)return e;var r={};return Object.keys(t).forEach(function(i){return r[i]=P(t[i],e[i],n)}),void 0!==e.id&&(r.id=e.id),r}function F(t,e,n){return t.map(function(t,r){return z(t,e[r],n)})}function R(t){var e=t.t,n=t.polyline,r=t.decreasing,i=t.rightToLeft,o=Boolean(r)!==Boolean(i),a=function(t,e){var n=0;if(t>0){for(var r,i,o,a,u=[0],s=0,c=1;c0){for(var i,o,a,u,s,c,l,f,d=[0],h=0,p=1;p0;o--)if((e=a[o][t])!==r)return n=u[o][t],void(d[t]=h(r,e,i,n));d[t]=function(t,e){return function(n){return n-t+e}}(r,i)}),function(t){var e=Object.assign({},t);return f.forEach(function(n){e[n]=d[n](t[n])}),e}}function B(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}function W(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],a=k(t,n,r,i,o);return[a[1],a[2],a[4],a[5]].forEach(function(t){return t.isCubicControl=!0}),Object.keys(o).forEach(function(e){"x"!==e&&"y"!==e&&"id"!==e&&(a[3][e]=P(n[e],o[e],t))}),a}function U(t,e){if(t.length<2)return t.slice(0);if(2===t.length)return[t[0],{x:H(t[0].x,t[1].x,1/3),y:H(t[0].y,t[1].y,1/3)},{x:H(t[0].x,t[1].x,2/3),y:H(t[0].y,t[1].y,2/3)},t[1]];for(var n,r,i,o,a,u,s,c,l,f,d,h,p,g,m=new Array(3*(t.length-1)+1),y=m.length-1,v=0;v0&&(m[3*v-2]=A(1/3,t[v-1],t[v]),m[3*v-1]=A(2/3,t[v-1],t[v]));for(var b=m.slice(0),x=0;x<3;x++){for(m[1]={x:H(m[0].x,m[3].x,1/3),y:H(m[0].y,H(m[3].y,m[2].y,1.5),2/3)},m[y-1]={x:H(m[y].x,m[y-3].x,1/3),y:H(m[y].y,H(m[y-3].y,m[y-2].y,1.5),2/3)},e&&((m[1].y-m[0].y)*(m[3].y-m[2].y)<0&&(m[1]={x:m[1].x,y:m[0].y}),(m[y-1].y-m[y].y)*(m[y-3].y-m[y-2].y)<0&&(m[y-1]={x:m[y-1].x,y:m[y].y})),v=6;vn.y==s>i.y&&(p=H(p*(g=(i.y-r.y)/(s-r.y)),p,1/(1+Math.abs(g))),d=(i.y-r.y)/p),r.y>n.y==a0?[t,e].join(" "):e,s=n(i.text(u));if(su;if(l&&i){var f=Math.floor(u/c*s.length);t[t.length-1]=s.substr(0,f-4)+"...",p=!0}return l&&!i&&t.push(e),l||(t[t.length-1]=s),t},[""]).filter(function(t){return t.length>0});f=i?-1*(m.length-1)*Math.floor(.5*r):f,m.forEach(function(t,e){return a(s,t,1.1,l,f,d,e)}),h.remove()})};var Z=function(t,e,n){return e>0&&!document.hidden&&((t=t.transition(n).duration(e)).attr=Q),t.onTransitionEnd=function(t){return nt(this,t),this},t},Q=function(t,e){var n,r=this,i=V.transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");1===arguments.length?n=t:arguments.length>1&&((s={})[t]=e,n=s);var o="__transitionAttrs__",a="__lastTransitions__",u=et();this.each(function(){var t=this,e={};for(var r in n)"function"==typeof n[r]?e[r]=n[r].apply(this,arguments):e[r]=n[r];this[o]=Object.assign(this[o]||{},e),this[o][a]||Object.defineProperty(this[o],a,{value:{}}),Object.keys(e).forEach(function(e){return t[o][a][e]=u})});var s,c=function(){var t=this;this[o]&&(Object.keys(n).filter(function(e){return t[o][a][e]===u}).forEach(function(e){return delete t[o][e]}),0===Object.keys(this[o]).length&&delete this[o])};return this.on("interrupt."+u,function(){return r.each(c)}),this.on("end."+u,function(){return r.each(c)}),i},tt=0,et=function(){return++tt},nt=function(t,e){if(V.transition.prototype.isPrototypeOf(t)&&!t.empty()){var n=function(){return e.call(null,t)};return t.on("interrupt.d3_on_transition_end",n),t.on("end.d3_on_transition_end",n),t}e.call(null,t)},rt=function(t,e,n,r){var i=r||function(t){return t},o=function(){i(this)};return function(r){var i=r;return e&&(i=i.call(at(Yt(e,n)))),i=(i=Z(i,t)).call(at(n)),t>0?i.on("end.d3_animationInterceptor",function(){return i.each(o)}):i.each(o),i}},it=function(t,e){var n=t.node();return t.selectAll(e).filter(function(){return this.parentNode===n})},ot=function(t,e,n,r,i){void 0===i&&(i="linear");var o="__pathPoints__";return function(t){var a=this;this[o]||(this[o]=n.map(function(){return[]}));var u=n.map(function(e,n){var u=Ht(t,r).map(e),s=(X(i)||X("linear"))(u),c=a[o][n];return{pointsFrom:c,pointsTo:s,interpolate:T(c,s,Y(i))}});return function(t){if(0===t){var n=u.map(function(t){return t.pointsFrom});return e.apply(void 0,n)}if(1===t){var r=u.map(function(t){return t.pointsTo});return a[o]=r,e.apply(void 0,r)}var i=u.map(function(e){return e.interpolate(t)});return a[o]=i,e.apply(void 0,i)}}},at=function(t){return function(e){return Object.keys(t).forEach(function(n){return e.attr(n,t[n])}),e}},ut=function(t){return function(e){return Object.keys(t).forEach(function(n){return e.classed(n,t[n])}),e}},st=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ct=function(t){function e(e){var n=t.call(this,e)||this;n.config=e,n.config.guide=Yt(n.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),n.config.guide.size=n.config.guide.size||{};var r=n.config.stack,i=n.config.guide.enableColorToBarPosition,o=[e.flip&&S.get("flip"),r&&S.get("stack"),i&&S.get("positioningByColor")];return n.decorators=(n.config.transformRules||o).concat(e.transformModel||[]),n.adjusters=(n.config.adjustRules||[]).concat(e.adjustScales||[]),n}return st(e,t),e.prototype.defineGrammarModel=function(t){var e=this,n=this.config;this.regScale("x",t("pos",n.x,[0,n.options.width])).regScale("y",t("pos",n.y,[n.options.height,0])).regScale("y",t("pos",n.y,function(t){return["ordinal","period"].indexOf(t.type)>=0?[0,n.options.height]:[n.options.height,0]})).regScale("size",t("size",n.size,{})).regScale("color",t("color",n.color,{})).regScale("split",t("split",n.split,{})).regScale("label",t("label",n.label,{})).regScale("identity",t("identity",n.identity,{}));var r=this.getScale("x"),i=this.getScale("y"),o=this.getScale("size"),a=this.getScale("label"),u=this.getScale("color"),s=this.getScale("split"),c=this.getScale("identity"),l=i.domain(),f=i.discrete?l[0]:Math.max(0,Math.min.apply(Math,l)),d=i.value(f)+.5*i.stepSize(f),h=u.domain(),p={data:function(){return e.data()},flip:!1,scaleX:r,scaleY:i,scaleSize:o,scaleLabel:a,scaleColor:u,scaleSplit:s,scaleIdentity:c,color:function(t){return u.value(t[u.dim])},label:function(t){return a.value(t[a.dim])},group:function(t){return t[u.dim]+"(@taucharts@)"+t[s.dim]},order:function(t){var e=t.split("(@taucharts@)")[0],n=h.indexOf(e);return n<0?Number.MAX_VALUE:n},size:function(t){return o.value(t[o.dim])},id:function(t){return c.value(t[c.dim],t)},xi:function(t){return r.value(t[r.dim])},yi:function(t){return i.value(t[i.dim])},y0:function(){return d}};return p.data().forEach(function(t){return p.id(t)}),p},e.prototype.getGrammarRules=function(){return this.decorators.filter(function(t){return t})},e.prototype.getAdjustScalesRules=function(){return(this.adjusters||[]).filter(function(t){return t})},e.prototype.createScreenModel=function(t){var e=t.flip,n=function(t,e,n){return t?e:n};return{flip:e,id:t.id,x:n(e,t.yi,t.xi),y:n(e,t.xi,t.yi),x0:n(e,t.y0,t.xi),y0:n(e,t.xi,t.y0),size:t.size,group:t.group,order:t.order,label:t.label,color:function(e){return t.scaleColor.toColor(t.color(e))},class:function(e){return t.scaleColor.toClass(t.color(e))},model:t,toFibers:function(){var e=qt(t.data(),t.group);return Object.keys(e).sort(function(e,n){return t.order(e)-t.order(n)}).reduce(function(t,n){return t.concat([e[n]])},[])}}},e.prototype.drawFrames=function(){var t=this,e=this.config.options,n=function(e){return n=t.screenModel.size(e)/2,r=4,i=Math.pow(10,r),Math.round(i*n)/i;var n,r,i},r=rt,i=function(e,n,i){var o=t.config.guide.animationSpeed,u=e.selectAll("."+n).data(function(t){return[t]},t.screenModel.id);u.exit().call(r(o,null,{width:0},function(t){return a.select(t).remove()})),u.call(r(o,null,i)),u.enter().append("rect").style("stroke-width",0).call(r(o,{width:0},i))},o=this.config.flip,u=o?"y":"x",s=o?"x":"y",c=o?"x0":"y0",l=o?"height":"width",f=o?"width":"height",d=function(e){var r,o,a;i(e,"lvl-top",((r={})[l]=function(t){return n(t)},r[f]=1,r[u]=function(e){return t.screenModel[u](e)-n(e)/2},r[s]=function(e){return t.screenModel[s](e)},r.fill=function(e){return t.screenModel.color(e)},r.class=function(e){return"lvl-top "+t.screenModel.class(e)},r)),i(e,"lvl-btm",((o={})[l]=function(t){return n(t)},o[f]=1,o[u]=function(e){return t.screenModel[u](e)-n(e)/2},o[s]=function(e){return t.screenModel[c](e)},o.fill=function(e){return t.screenModel.color(e)},o.class=function(e){return"lvl-btm "+t.screenModel.class(e)},o)),i(e,"lvl-link",((a={})[l]=.5,a[f]=function(e){return Math.abs(t.screenModel[s](e)-t.screenModel[c](e))},a[u]=function(e){return t.screenModel[u](e)-.25},a[s]=function(e){return Math.min(t.screenModel[s](e),t.screenModel[c](e))},a.fill=function(e){return t.screenModel.color(e)},a.class=function(e){return"lvl-link "+t.screenModel.class(e)},a))},h=function(e){e.attr("class","frame-id-"+t.config.uid).call(function(e){var n=e.selectAll(".generic").data(function(t){return t},t.screenModel.id);n.exit().remove(),n.call(d),n.enter().append("g").attr("class","generic").call(d)})},p=qt(this.data(),t.screenModel.group),g=Object.keys(p).sort(function(e,n){return t.screenModel.order(e)-t.screenModel.order(n)}).reduce(function(t,e){return t.concat([p[e]])},[]),m=e.container.selectAll(".frame-id-"+t.config.uid).data(g);m.exit().remove(),m.call(h),m.enter().append("g").call(h)},e}(g),lt=(Object.assign||function(t){for(var e,n=1,r=arguments.length;nthis.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return t.populate(this.recursiveDeepCopy,e,n),this.depth--,n}},r.DeepCopier=e,r.deepCopiers=t,r.register=function(n){n instanceof e||(n=new e(n)),t.unshift(n)},r.register({canCopy:function(){return!0},create:function(t){return t instanceof t.constructor?"object"==typeof(e=t.constructor.prototype)?JSON.parse(JSON.stringify(e)):e:{};var e},populate:function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}}),r.register({canCopy:function(t){return t instanceof Array},create:function(t){return new t.constructor},populate:function(t,e,n){for(var r=0;r":">",'"':""","'":"'","`":"`"},yt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},vt=/\\|'|\r|\n|\u2028|\u2029/g,bt="(?:"+Object.keys(mt).join("|")+")",xt=RegExp(bt),wt=RegExp(bt,"g"),_t={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};function St(t){return ht(t)}function Mt(t){return t instanceof Date&&!isNaN(Number(t))}function Ot(t){return null!=t&&"object"==typeof t}function At(t){var e=parseFloat(Math.min.apply(Math,t).toFixed(15)),n=parseFloat(Math.max.apply(Math,t).toFixed(15));e===n&&(n-=(n>=0?-1:1)*(n||1)/10);for(var r=[e=Math.min(0,e),n=Math.max(0,n)],i=r[1]-r[0],o=Math.pow(10,Math.floor(Math.log(i/10)/Math.LN10)),a=10/i*o,u=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],s=-1;a>u[++s][0];);o*=u[s][1],r[0]=Math.floor(r[0]/o)*o,r[1]=Math.ceil(r[1]/o)*o;var c=e-r[0],l=r[1]-n,f=o/2;if(e<0){var d=c>=f?-c:0;r[0]=r[0]-d}if(n>0){var h=l>=f?-l:0;r[1]=r[1]+h}return[parseFloat(r[0].toFixed(15)),parseFloat(r[1].toFixed(15))]}function kt(t,e,n){var r=(void 0===n?{utc:!1}:n).utc,i=lt.extent(t),o=i[0],a=i[1],u=+a-+o,s=r?lt.scaleUtc:lt.scaleTime;if(0===u){return o=new Date(o.getTime()-864e5),a=new Date(a.getTime()+864e5),s().domain([o,a]).nice(e).domain()}var c=s().domain([o,a]).nice(e);if(e)return c.domain();var l=s().domain([o,a]).nice(e).domain(),f=l[0],d=l[1],h=c.ticks(),p=h.length-1;return(+o-+f)/(+h[1]-+f)<.5&&(o=f),(+d-+a)/(+d-+h[p-1])<.5&&(a=d),[o,a]}var Tt=0,Et={};function Ct(t){var e=btoa(encodeURIComponent(t)).replace(/=/g,"_");return Et.hasOwnProperty(e)||(Et[e]="H"+ ++Tt),Et[e]}function Nt(t,e,n){var r=0,i=null,o=$t(function(t,e){return Ht(t.map(function(t){return e.reduce(function(e,n){return e.concat(Mt(r=t[n])?r.getTime():r);var r},[])}),function(t){return JSON.stringify(t)}).reduce(function(t,e){var n=e[0];return t[n]=t[n]||0,t[n]+=1,t},{})},function(t,e){var n=i===t?r:++r;return i=t,e.join("")+"-"+n});return function(r,i,a){var u=a.length,s=n.getSpec(),c=s.sources["/"].data,l=s.unit.units[0].guide||{};l.padding=l.padding||{l:0,r:0,t:0,b:0};var f=0;"x"===t?f=l.padding.l+l.padding.r:"y"===t&&(f=l.padding.t+l.padding.b);var d,h=(i-u*f)/(d=o(c,e),Object.keys(d).reduce(function(t,e){return t+d[e]},0));return(function(t,e){return o(c,t)[e]}(e,r)*h+f)/i}}function Lt(t){var e=!0;try{dt(t,function(t){if(0===t.type.indexOf("COORDS.")&&"COORDS.RECT"!==t.type)throw new Error("Not applicable")},function(t){return t})}catch(t){"Not applicable"===t.message&&(e=!1)}return e}function jt(t,e,n,r){if(void 0===r&&(r=0),"requestAnimationFrame"===r){var i=!1;return function(){for(var r=[],o=0;o=r&&n.apply(this,i),t.e=a.e,t.ts=a.ts}}function Pt(t,e){var n=t[0],r=t[1],i=(r-n)/(e-1),o=e>=2?It(e-2).map(function(t){return n+i*(t+1)}):[];return[n].concat(o,[r])}function zt(t){return pt(t)?t:""}function Ft(t){return pt(t)?"":t}function Rt(t){return t/180*Math.PI}function Dt(t){return Math.abs(t)>=360&&(t%=360),t<0&&(t=360+t),t}function It(t,e){1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r100}function Wt(t,e,n,r){return t+e*(-90===n?-1:1)-r>20}function Ut(t){return Array.isArray(t)?[].concat.apply([],t.map(function(t){return Ut(t)})):t}function Ht(t,e){for(var n={},r=[],i=t.length,o=e||function(t){return String(t)},a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")}var ee=" ",ne=32,re=["img","input","br","embed","link","meta","area","base","basefont","bgsound","col","command","frame","hr","image","isindex","keygen","menuitem","nextid","param","source","track","wbr","circle","ellipse","line","path","polygon","rect"].reduce(function(t,e){return t[e]=!0,t},{});function ie(t){var e=2,n=arguments[1];("object"!=typeof arguments[1]||Array.isArray(arguments[1]))&&(e=1,n={});var r=Ut(Array.prototype.slice.call(arguments,e)),i=1===r.length&&"<"!==r[0].trim()[0],o=re[t];if(o&&r.length>0)throw new Error('Tag "'+t+'" is void but content is assigned to it');var a="<"+t,u=Object.keys(n).map(function(t){return" "+t+'="'+n[t]+'"'}).join("");u.length>ne&&(u=Object.keys(n).map(function(t){return"\n"+ee+t+'="'+n[t]+'"'}).join(""));var s=i?r[0]:"\n"+r.map(function(t){return String(t).split("\n").map(function(t){return""+ee+t}).join("\n")}).join("\n")+"\n";return""+a+u+(o?"/>":">"+s+"")}function oe(t){var e=t,n={then:function(t){return e=t(e),n},result:function(){return e}};return n}var ae=[ct];function ue(t){return ae.some(function(e){return t instanceof e})}function se(t){return(t.units||[]).some(function(t){return t.hasOwnProperty("units")})}var ce=document.createElement("div"),le=new WeakMap;function fe(t,e){var n;return t instanceof Node?n=t:(ce.insertAdjacentHTML("afterbegin",t),n=ce.childNodes[0]),e.appendChild(n),n}function de(t){if(le.has(t))return le.get(t);var e=t.style.overflow;t.style.overflow="scroll";var n={width:t.offsetWidth-t.clientWidth,height:t.offsetHeight-t.clientHeight};return t.style.overflow=e,le.set(t,n),n}function he(t,e){var n="horizontal"===(e=e||"both")||"both"===e,r="vertical"===e||"both"===e,i=de(t),o=r?i.width+"px":"0",a=n?i.height+"px":"0";t.style.overflow="hidden",t.style.padding="0 "+o+" "+a+" 0";var u=t.scrollWidth>t.clientWidth,s=t.scrollHeight>t.clientHeight,c=r&&!s?i.width+"px":"0",l=n&&!u?i.height+"px":"0";return t.style.padding="0 "+c+" "+l+" 0",t.style.overflow="",t.style.overflowX=u?"scroll":"hidden",t.style.overflowY=s?"scroll":"hidden",i}function pe(t,e){return window.getComputedStyle(t).getPropertyValue(e)}function ge(t,e){return parseInt(pe(t,e)||"0",10)}function me(t){var e=ge(t,"padding-left"),n=ge(t,"padding-right"),r=ge(t,"padding-bottom"),i=ge(t,"padding-top"),o=ge(t,"border-top-width")+ge(t,"border-left-width")+ge(t,"border-right-width")+ge(t,"border-bottom-width"),a=t.getBoundingClientRect();return{width:a.width-e-n-2*o,height:a.height-r-i-2*o}}function ye(t){var e=document.createElement("div");e.style.position="absolute",e.style.visibility="hidden",e.style.width="100px",e.style.height="100px",e.style.border="1px solid green",e.style.top="0",document.body.appendChild(e),e.innerHTML='\n \n \n '+t+"\n \n \n ";var n={width:0,height:0},r=e.querySelector(".x.axis .tick text").getBoundingClientRect();n.width=r.right-r.left,n.height=r.bottom-r.top;var i=0!==t.length?n.width/t.length:0;return n.width=n.width+1.5*i,document.body.removeChild(e),n}function ve(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o="string"==typeof n?n:n+"px",a=t.map(function(t){for(var e=0,n=0;e<=t.length-1;e++){n+=be(t.charAt(e),{fontSize:o,fontFamily:r,fontWeight:i}).width}return n}).sort(function(t,e){return e-t})[0],u=t.length,s=parseInt(o);return{width:a,height:s*u+.39*s*u}}var be=$t(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,o=document.createElement("div");o.style.position="absolute",o.style.visibility="hidden",o.style.border="0px",o.style.top="0",o.style.fontSize=n,o.style.fontFamily=r,o.style.fontWeight=i,document.body.appendChild(o),o.innerHTML=" "===t?" ":t;var a={width:0,height:0},u=o.getBoundingClientRect();return a.width=u.right-u.left,a.height=u.bottom-u.top,document.body.removeChild(o),a},function(t,e){return t+"_"+JSON.stringify(e)});function xe(t,e){var n={".":function(t,e){return e.classed(t,!0)},"#":function(t,e){return e.attr("id",t)}},r=Object.keys(n).join("");if(e.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(r.indexOf(e[0])>=0)throw new Error("Selector must have tag at the beginning.");var i,o=t instanceof Element,u=o?a.select(t):t,s=function(t){return o?t.node():t},c=u.selectAll(e).filter(function(){return this.parentNode===u.node()}).filter(function(t,e){return 0===e});if(!c.empty())return s(c);for(var l,f=-1,d=null,h=1,p=e.length;h<=p;h++)(h==p||r.indexOf(e[h])>=0)&&(l=e.substring(f+1,h),f<0?i=u.append(l):n[d].call(null,l,i),d=e[h],f=h);return s(i)}function we(t,e){return _e(t,e)[0]||null}function _e(t,e){for(var n=[],r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=t.firstElementChild;Boolean(i);i=i.nextElementSibling)r.call(i,e)&&n.push(i);return n}function Se(t,e){if(t.childElementCount>0){var n,r,i=Array.prototype.filter.call(t.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}),o=i.slice().sort(e),a=i.reduce(function(t,e,n){return t.set(e,n),t},new Map),u=o.reduce(function(t,e,i){var u=a.get(e),s=i-u;return s!==r&&(n&&t.push(n),r=s,n={from:u,to:i,elements:[]}),n.elements.push(e),i===o.length-1&&t.push(n),t},[]),s=u.slice().sort(function(t,e){return t.from-e.from}),c=s.reduce(function(t,e,n){return t.set(e,n),t},new Map),l=function(t){for(var e,n,r,i=u.map(function(t,e){return{elements:t.elements,from:c.get(t),to:e}}).sort(Jt(function(t,e){return t.elements.length-e.elements.length},t?function(t,e){return e.to-t.to}:function(t,e){return t.to-e.to})),o=0;on.to)for(e=o+1;e=n.to&&r.fromn.from&&r.from<=n.to&&r.from--}return i.filter(function(t){return t.from!==t.to})},f=l(!0),d=l(!1),h=f.length=0?"h":"v"}function Ee(t){var e={x:0,y:0},n=t.indexOf("translate(");if(n>=0){var r=t.indexOf(")",n+10),i=t.substring(n+10,r).trim().replace(","," ").replace(/\s+/," ").split(" ");e.x=parseFloat(i[0]),i.length>1&&(e.y=parseFloat(i[1]))}return e}function Ce(t,e,n,r,i,o,a,u){var s,c,l,f,d,h;return h=((l=a-i)*(e-o)-(f=u-o)*(t-i))/(-l*(c=r-e)+(s=n-t)*f),(d=(-c*(t-i)+s*(e-o))/(-l*c+s*f))>=0&&d<=1&&h>=0&&h<=1}function Ne(t){for(var e,n,r={x:0,y:0},i=t;i&&"SVG"!==i.nodeName.toUpperCase();)(n=i.getAttribute("transform"))&&(e=Ee(n),r.x+=e.x,r.y+=e.y),i=i.parentNode;return r}function Le(t,e,n){var r=t.selectAll(e).filter(n);if(!r.empty()){var i=a.select(r.node().parentNode).selectAll(e).filter(function(t){return!n(t)}).nodes(),o=i[i.length-1];if(o){var u=Array.prototype.indexOf.call(o.parentNode.childNodes,o),s=o.nextSibling;r.each(function(){Array.prototype.indexOf.call(this.parentNode.childNodes,this)>u||this.parentNode.insertBefore(this,s)})}}}var je=function(t){return Mt(t)?t.getTime():t},Pe={cross:function(t,e,n){var r=t(),i=Ht(r.map(function(t){return t[e]}),je),o=Ht(r.map(function(t){return t[n]}),je),a=0===i.length?[null]:i;return(0===o.length?[null]:o).reduce(function(t,r){return t.concat(a.map(function(t){var i={};return e&&(i[e]=je(t)),n&&(i[n]=je(r)),i}))},[])},cross_period:function(t,e,n,r,i,o){var a=t(),u=!!o&&o.utcTime,s=Ht(a.map(function(t){return t[e]}),je),c=Ht(a.map(function(t){return t[n]}),je),l=0===s.length?[null]:s,f=0===c.length?[null]:c;return r&&(l=v.generate(Math.min.apply(Math,s),Math.max.apply(Math,s),r,{utc:u})),i&&(f=v.generate(Math.min.apply(Math,c),Math.max.apply(Math,c),i,{utc:u})),f.reduce(function(t,r){return t.concat(l.map(function(t){var i={};return e&&(i[e]=je(t)),n&&(i[n]=je(r)),i}))},[])},groupBy:function(t,e){return Ht(t().map(function(t){return t[e]}),je).map(function(t){return(n={})[e]=je(t),n;var n})},none:function(){return[null]}},ze=function(){function t(t,e,n){var r=t.key,i=t.pipe,o=t.source,a=t.units;void 0===n&&(n={}),this.key=r,this.pipe=i||[],this.source=o,this.units=a,this._frame={key:r,source:o,pipe:this.pipe},this._data=e,this._pipeReducer=function(t,e){return n[e.type](t,e.args)}}return t.prototype.hash=function(){return Ct([this._frame.pipe,this._frame.key,this._frame.source].map(function(t){return JSON.stringify(t)}).join(""))},t.prototype.full=function(){return this._data},t.prototype.part=function(t){return void 0===t&&(t=function(t){return t}),this._frame.pipe.map(t).reduce(this._pipeReducer,this._data)},t}(),Fe=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Re=function(t){return Mt(t)?t.getTime():t},De=function(t){var e=this;Object.keys(t).forEach(function(n){return e[n]=t[n]})},Ie=function(t,e,n){return t.map(function(t){return"string"==typeof t?n.get(t):t}).filter(function(t){return t}).reduce(function(t,e){return n=t,void 0===(r=e(t,{}))&&(r={}),Object.assign(new De(n),r);var n,r},e)},Be=function(t){function e(e,n,r,i){var o=t.call(this)||this;return Yt(e.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),e.settings=e.settings||{},o.config=e,o.sources=e.sources,o.scales=e.scales,o.unitSet=r,o.grammarRules=i,o.scalesHub=n,o.transformations=Object.assign(e.transformations||{},{where:function(t,e){var n=Object.keys(e||{}).map(function(t){return function(n){return Re(n[t])===e[t]}});return t.filter(function(t){return n.every(function(e){return e(t)})})}}),o}return Fe(e,t),e.traverseSpec=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null);var o=[],a=function(t,e,n,r,i){o.push(function(){e(t,r,i)}),t.frames&&t.frames.forEach(function(r){(r.units||[]).map(function(i){return a(i,e,n,t,r)})}),o.push(function(){return n(t,r,i)})};return a(t.unit,e,n,r,i),o},e.prototype.unfoldStructure=function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config},e.prototype.getDrawScenarioQueue=function(t){var e=this,n=this.grammarRules,r=this._flattenDrawScenario(t,function(t,r,i){var o=!1===r.expression.inherit?null:i,a=e._createFrameScalesFactoryMethod(o),u=e.unitSet.create(r.type,Object.assign({},r,{options:t.allocateRect(i.key)})),s=new De(u.defineGrammarModel(a)),c=Ie(u.getGrammarRules(),s,n);return Ie(u.getAdjustScalesRules(),c,n),u.node().screenModel=u.createScreenModel(c),u}),i=this._flattenDrawScenario(t,function(t,r,i){var o=!1===r.expression.inherit?null:i,a=e._createFrameScalesFactoryMethod(o),u=e.unitSet.create(r.type,Object.assign({},r,{options:t.allocateRect(i.key)})),s=new De(u.defineGrammarModel(a)),c=Ie(u.getGrammarRules(),s,n);return u.node().screenModel=u.createScreenModel(c),u.parentUnit=t,u.addInteraction(),u});return r.concat(function(){Object.keys(e.scales).forEach(function(t){return e.scalesHub.createScaleInfo(e.scales[t]).commit()})}).concat(i)},e.prototype._flattenDrawScenario=function(t,n){var r={},i=[],o=[t],a=e.traverseSpec({unit:this.root},function(t,e,a){var u;t.uid=(u=Ct((e?e.uid+"/":"")+JSON.stringify(Object.keys(t).filter(function(e){return"string"==typeof t[e]}).reduce(function(e,n){return e[n]=t[n],e},{}))+"-"+JSON.stringify(a.pipe)),r.hasOwnProperty(u)?u+="-"+ ++r[u]:r[u]=0,u),t.guide=St(t.guide);var s,c=n(o[0],t,a);i.push(c),0===t.type.indexOf("COORDS.")&&(s=c,o.unshift(s))},function(t){0===t.type.indexOf("COORDS.")&&o.shift()},null,this._datify({source:this.root.expression.source,pipe:[]}));return a.push(function(){return i}),a},e.prototype._expandUnitsStructure=function(t,e){var n=this;void 0===e&&(e=[]);var r=this;if(!1===t.expression.operator)t.frames=t.frames.map(function(t){return r._datify(t)});else{var i=this._parseExpression(t.expression,e,t.guide);t.transformation=t.transformation||[],t.frames=i.exec().map(function(n){var o=(i.inherit?e:[]).concat([{type:"where",args:n}]).concat(t.transformation);return r._datify({key:n,pipe:o,source:i.source,units:t.units?t.units.map(function(t){var e=St(t);return e.guide=t.guide,e}):[]})})}return t.frames.forEach(function(t){return t.units.forEach(function(e){return n._expandUnitsStructure(e,t.pipe)})}),t},e.prototype._createFrameScalesFactoryMethod=function(t){var e=this;return function(n,r,i){var o=r||n+":default";return e.scalesHub.createScaleInfo(e.scales[o],t).create("function"==typeof i?i(e.scales[o]):i)}},e.prototype._datify=function(t){return new ze(t,this.sources[t.source].data,this.transformations)},e.prototype._parseExpression=function(t,e,n){var r=this,i=t.operator||"none",o=t.source,a=!1!==t.inherit,u=t.params,s={source:o,pipe:a?e:[]},c=Pe[i];if(!c)throw new Error(i+" operator is not supported");return{source:o,inherit:a,func:c,args:u,exec:function(){return c.apply(void 0,[function(){return r._datify(s).part()}].concat(u||[],[n]))}}},e}(h),We="tau-chart__",Ue=n(10),He=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Ue.Tooltip.defaults.baseClass=We+"tooltip";var qe=["top","bottom"];var Ge,Xe,Ye=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return He(e,t),e.prototype._pickPlace=function(t){if(!this.options.auto)return this.options.place;var e,n,r,i,o,a,u,s,c=0|this.options.winBound,l=(e=c,r=window,i=document.documentElement,o=(r.pageYOffset||i.scrollTop)-i.clientTop,a=(r.pageXOffset||i.scrollLeft)-i.clientTop,u=r.innerWidth||i.clientWidth,s=r.innerHeight||i.clientHeight,{top:(n={top:o,right:a+u,bottom:o+s,left:a,width:u,height:s}).top+e,right:n.right-e,bottom:n.bottom-e,left:n.left+e,width:n.width-2*e,height:n.height-2*e}),f=this.options.place.split("-"),d=this.spacing;if(-1!==qe.indexOf(f[0]))switch(t.top-this.height-d<=l.top?f[0]="bottom":t.bottom+this.height+d>=l.bottom&&(f[0]="top"),f[1]){case"left":t.right-this.width<=l.left&&(f[1]="right");break;case"right":t.left+this.width>=l.right&&(f[1]="left");break;default:t.left+t.width/2+this.width/2>=l.right?f[1]="left":t.right-t.width/2-this.width/2<=l.left&&(f[1]="right")}else switch(t.left-this.width-d<=l.left?f[0]="right":t.right+this.width+d>=l.right&&(f[0]="left"),f[1]){case"top":t.bottom-this.height<=l.top&&(f[1]="bottom");break;case"bottom":t.top+this.height>=l.bottom&&(f[1]="top");break;default:t.top+t.height/2+this.height/2>=l.bottom?f[1]="top":t.bottom-t.height/2-this.height/2<=l.top&&(f[1]="bottom")}return f.join("-")},e}(Ue.Tooltip),Ve=function(){function t(t,e){this.chart=e,this.handlers=new Map,this.plugins=t.map(this.initPlugin,this)}return t.prototype.initPlugin=function(t){var e=this;t.init&&t.init(this.chart);var n=[];this.handlers.set(t,n);var r=function(r,i){n.push(e.chart.on(r,i,t))};return t.destroy&&r("destroy",t.destroy.bind(t)),Object.keys(t).forEach(function(e){if(0===e.indexOf("on")){var n=e.substr(2).toLowerCase();r(n,t[e].bind(t))}}),t},t.prototype.destroyPlugin=function(t){var e=this;t.destroy&&t.destroy(),this.handlers.get(t).forEach(function(n){e.chart.removeHandler(n,t)})},t.prototype.destroy=function(){var t=this;this.plugins.forEach(function(e){return t.destroyPlugin(e)})},t}(),$e={},Je={},Ke={reg:function(t,e,n){return n?(Je[t]=n,$e[t]=function(t,e){this.___tauchartsseed___=new e(this.init(t))},$e[t].prototype=Object.assign({init:function(t){return t},defineGrammarModel:function(t){return this.node().defineGrammarModel(t)},getGrammarRules:function(t){return this.node().getGrammarRules(t)},getAdjustScalesRules:function(t){return this.node().getAdjustScalesRules(t)},createScreenModel:function(t){return this.node().createScreenModel(t)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},e)):$e[t]=e,this},get:function(t){if(!$e.hasOwnProperty(t))throw new x("Unknown unit type: "+t,w.UNKNOWN_UNIT_TYPE);return $e[t]},create:function(t,e){var n,r=this.get(t);Je[t]?n=new r(e,this.get(Je[t])):n=new r(e);return n}},Ze={},Qe={},tn={reg:function(t,e,n){return void 0===n&&(n=function(t){return t}),Ze[t]=e,Qe[t]=n,tn},get:function(t){return Ze[t]},instance:function(t){return void 0===t&&(t={}),{create:function(e,n,r){return new(tn.get(e))(n,(0,Qe[e])(r,t))}}}},en=function(){function t(t,e,n){this.registry=t,this.sources=e,this.scales=n}return t.prototype.createScaleInfo=function(t,e){void 0===e&&(e=null);var n=t.dim,r=t.source,i=(this.sources[r].dims[n]||{}).type,o=this.sources[r].data,a=e||new ze({source:r},o);return t.dimType=i,this.registry.create(t.type,a,t)},t.prototype.createScaleInfoByName=function(t,e){return void 0===e&&(e=null),this.createScaleInfo(this.scales[t],e)},t}(),nn=function(t,e,n){var r=!0,i=null;try{t.reduce(function(t,r){var o=function(t,e){var n=r[e],i=Ot(n)?JSON.stringify(n):n;return t.push(i),t},a=e.reduce(o,[]).join("/"),u=n.reduce(o,[]).join("/");if(t.hasOwnProperty(a)){var s=t[a];if(s!==u)throw i={type:"RelationIsNotAFunction",keyX:e.join("/"),keyY:n.join("/"),valX:a,errY:[s,u]},new Error("RelationIsNotAFunction")}else t[a]=u;return t},{})}catch(t){if("RelationIsNotAFunction"!==t.message)throw t;r=!1}return{result:r,error:i}},rn=function(t,e){var n=Object.keys(t).reduce(function(e,n){var r=t[n];return r.hasOwnProperty("hasNull")&&!r.hasNull||"measure"!==r.type&&"period"!==r.scale||e.push(n),e},[]);return function(t){var r=!n.some(function(e){return!t.hasOwnProperty(e)||null===t[e]});return r||e(t),r}},on=function(t){var e={category:"ordinal",order:"ordinal",measure:"linear"},n={};return Object.keys(t).forEach(function(r){var i=t[r],o=(i.type||"category").toLowerCase();n[r]=Object.assign({},i,{type:o,scale:i.scale||e[o],value:i.value})}),n},an=function(t){var e={type:"category",scale:"ordinal"};return t.reduce(function(t,n){return Object.keys(n).forEach(function(r){var i=n.hasOwnProperty(r)?n[r]:null;if(t[r]=t[r]||{type:null,hasNull:!1},null===i)t[r].hasNull=!0;else{var o=function(t,e){var n=e;return Mt(t)?(n.type="measure",n.scale="time"):Ot(t)?(n.type="order",n.scale="ordinal"):Number.isFinite(t)&&(n.type="measure",n.scale="linear"),n}(i,St(e)),a=o.type,u=o.scale,s=null!==t[r].type&&t[r].type!==a;t[r].type=s?e.type:a,t[r].scale=s?e.scale:u}}),t},{})},un=function(t,e,n){var r=t,i=["period","time"].indexOf(n.scale)>=0?function(t){return new Date(t)}:function(t){return t},o=t.reduce(function(t,e,n){return t.set(e,n),t},new Map);if("measure"===n.type||"period"===n.scale)r=t.slice().sort(Jt(function(t,n){return i(t[e])-i(n[e])},function(t,e){return o.get(t)-o.get(e)}));else if(n.order){var a=n.order.reduce(function(t,e,n){return t[e]=n,t},{}),u=n.order.length,s="(___"+e+"___)";r=t.map(function(t){var n=a[t[e]];return n=n>=0?n:u,t[s]=n,t}).sort(Jt(function(t,e){return t[s]-e[s]},function(t,e){return o.get(t)-o.get(e)})).map(function(t){return delete t[s],t})}return r},sn=function(t,e){var n=document.createElement("div");return n.classList.add(We+t),e&&e.appendChild(n),n},cn=function(){var t=sn("layout"),e=sn("layout__header",t),n=sn("layout__container",t),r=sn("layout__sidebar",n),i=sn("layout__content",n),o=sn("layout__content__wrap",i),a=sn("layout__sidebar-right",n);return{layout:t,header:e,content:o,contentContainer:i,leftSidebar:r,rightSidebar:sn("layout__sidebar-right__wrap",a),rightSidebarContainer:a,footer:sn("layout__footer",t)}},ln=function(){function t(t){this.spec=t,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:t.settings}}return t.prototype.convert=function(){var t=this.spec,e=this.dist;return this.ruleAssignSourceDims(t,e),this.ruleAssignStructure(t,e),this.ruleAssignSourceData(t,e),this.ruleApplyDefaults(e),e},t.prototype.ruleApplyDefaults=function(t){var e=t.settings||{},n=function(t,e,r){e(t,r),(t.units||[]).map(function(r){return n(r,e,t)})};n(t.unit,function(t,n){if(t.namespace="chart",t.guide=Yt(t.guide||{},{animationSpeed:e.animationSpeed||0,utcTime:e.utcTime||!1}),n&&!t.hasOwnProperty("units")){t=Yt(t,{x:n.x,y:n.y});var r=St(n.guide)||{};t.guide.x=Yt(t.guide.x||{},r.x),t.guide.y=Yt(t.guide.y||{},r.y),t.expression.inherit=n.expression.inherit}return!n||t.guide&&t.guide.hasOwnProperty("obsoleteVerticalStackOrder")||(t.guide=Object.assign(t.guide||{},{obsoleteVerticalStackOrder:(n.guide||{}).obsoleteVerticalStackOrder})),t},null)},t.prototype.ruleAssignSourceData=function(t,e){var n=t.spec.dimensions||{},r=e.sources["/"].dims,i=function(t,e){var n=t[e];return Ot(n)&&!Mt(n)&&Object.keys(n).forEach(function(r){return t[e+"."+r]=n[r]}),t};e.sources["/"].data=t.data.map(function(t){var e=Object.keys(t).reduce(i,t);return Object.keys(r).reduce(function(t,e){return t.hasOwnProperty(e)||(t[e]=null),null!==t[e]&&n[e]&&["period","time"].indexOf(n[e].scale)>=0&&(t[e]=new Date(t[e])),t},e)})},t.prototype.ruleAssignSourceDims=function(t,e){var n=t.spec.dimensions;e.sources["/"].dims=Object.keys(n).reduce(function(t,e){return t[e]={type:n[e].type},t},{})},t.prototype.ruleAssignStructure=function(t,e){var n=this,r=function(t){var i=St(Vt(t,"unit"));return n.ruleCreateScales(t,i,e.settings),i.expression=n.ruleInferExpression(t),t.unit&&(i.units=t.unit.map(r)),i},i=r(t.spec.unit);i.expression.inherit=!1,e.unit=i},t.prototype.ruleCreateScales=function(t,e,n){var r=this,i=t.guide||{};["identity","color","size","label","x","y","split"].forEach(function(o){t.hasOwnProperty(o)&&(e[o]=r.scalesPool(o,t[o],i[o]||{},n))})},t.prototype.ruleInferDim=function(t,e){var n=t,r=this.spec.spec.dimensions;if(!r.hasOwnProperty(n))return n;e.hasOwnProperty("tickLabel")?n=t+"."+e.tickLabel:r[t].value&&(n=t+"."+r[t].value);var i=this.dist.sources["/"].dims;return i.hasOwnProperty(n)||(i[n]={type:i[t].type},delete i[t]),n},t.prototype.scalesPool=function(t,e,n,r){var i=t+"_"+e;if(this.dist.scales.hasOwnProperty(i))return i;var o=this.spec.spec.dimensions,a={};if("color"===t&&null!==e&&(a={type:"color",source:"/",dim:this.ruleInferDim(e,n)},n.hasOwnProperty("brewer")&&(a.brewer=n.brewer),o[e]&&o[e].hasOwnProperty("order")&&(a.order=o[e].order),n.hasOwnProperty("min")&&(a.min=n.min),n.hasOwnProperty("max")&&(a.max=n.max),n.hasOwnProperty("nice")&&(a.nice=n.nice)),"size"===t&&null!==e&&(a={type:"size",source:"/",dim:this.ruleInferDim(e,n)},n.hasOwnProperty("func")&&(a.func=n.func),n.hasOwnProperty("min")&&(a.min=n.min),n.hasOwnProperty("max")&&(a.max=n.max),n.hasOwnProperty("minSize")&&(a.minSize=n.minSize),n.hasOwnProperty("maxSize")&&(a.maxSize=n.maxSize)),"label"===t&&null!==e&&(a={type:"value",source:"/",dim:this.ruleInferDim(e,n)}),"split"===t&&null!==e&&(a={type:"value",source:"/",dim:this.ruleInferDim(e,n)}),"identity"===t&&null!==e&&(a={type:"identity",source:"/",dim:this.ruleInferDim(e,n)}),o.hasOwnProperty(e)&&("x"===t||"y"===t)){if(a={type:o[e].scale,source:"/",dim:this.ruleInferDim(e,n)},o[e].hasOwnProperty("order")&&(a.order=o[e].order),n.hasOwnProperty("min")&&(a.min=n.min),n.hasOwnProperty("max")&&(a.max=n.max),n.hasOwnProperty("autoScale")?a.autoScale=n.autoScale:a.autoScale=!0,n.hasOwnProperty("nice")?a.nice=n.nice:a.nice=a.autoScale,n.hasOwnProperty("niceInterval")?a.niceInterval=n.niceInterval:a.niceInterval=null,n.hasOwnProperty("tickPeriod")&&(a.period=n.tickPeriod,a.type="period"),n.hasOwnProperty("tickPeriod")&&n.hasOwnProperty("timeInterval"))throw new Error('Use "tickPeriod" for period scale, "timeInterval" for time scale, but not both');if(n.hasOwnProperty("timeInterval")){a.period=n.timeInterval,a.type="time";var u=v.get(a.period,{utc:r.utcTime});n.hasOwnProperty("min")&&(a.min=u.cast(new Date(n.min))),n.hasOwnProperty("max")&&(a.max=u.cast(new Date(n.max)))}a.fitToFrameByDims=n.fitToFrameByDims,a.ratio=n.ratio}return this.dist.scales[i]=a,i},t.prototype.getScaleConfig=function(t,e){var n=t+"_"+e;return this.dist.scales[n]},t.prototype.ruleInferExpression=function(t){var e={operator:"none",params:[]},n=t.guide||{},r=n.x||{},i=n.y||{},o=this.getScaleConfig("x",t.x),a=this.getScaleConfig("y",t.y);return 0===t.type.indexOf("ELEMENT.")?t.color&&(e={operator:"groupBy",params:[this.ruleInferDim(t.color,n.color||{})]}):"COORDS.RECT"===t.type&&1===t.unit.length&&"COORDS.RECT"===t.unit[0].type&&(e=o.period||a.period?{operator:"cross_period",params:[this.ruleInferDim(t.x,r),this.ruleInferDim(t.y,i),o.period,a.period]}:{operator:"cross",params:[this.ruleInferDim(t.x,r),this.ruleInferDim(t.y,i)]}),Object.assign({inherit:!0,source:"/"},e)},t}(),fn=n(9),dn=n(8),hn=(Object.assign||function(t){for(var e,n=1,r=arguments.length;nt.computed?{value:n,computed:r}:t},{}).value;return n(e(o))},An=function(t,e){var n=t.dimType,r=t.scaleType,i=[n,r,"*"].join(":"),o=[n,r].join(":");return e[i]||e[o]||e[n]||null},kn=function(t,e,n){return t.hasOwnProperty(e+":"+n)?t[e+":"+n]:t[""+e]},Tn=function(t,e){return["day","week","month"].indexOf(t)>=0&&(t+="-short"+(e?"-utc":"")),t},En=function(t,e){var n=t.width,r=t.height,i=Math.abs(Rt(e));return{width:Math.max(Math.cos(i)*n,r),height:Math.max(Math.sin(i)*n,r)}},Cn=function(t,e){void 0===e&&(e="x");var n=Dt(t),r="x"===e?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]];return r[r.findIndex(function(t){return n>=t[0]&&ne.xAxisTickLabelLimit&&(t.x.tickFormatWordWrap=!0,t.x.tickFormatWordWrapLines=e.xTickWordWrapLinesLimit,d=Nn(l,e.xAxisTickLabelLimit,e.xTickWordWrapLinesLimit)),f.width>e.yAxisTickLabelLimit&&(t.y.tickFormatWordWrap=!0,t.y.tickFormatWordWrapLines=e.yTickWordWrapLinesLimit,h=Nn(f,e.yAxisTickLabelLimit,e.yTickWordWrapLinesLimit)),o&&(t.y.tickFormatWordWrap=!1,t.y.tickFormatWordWrapLines=1,(h=Nn(f,2*e.yAxisTickLabelLimit,1)).width=20);var p=s?0:1,g=c?0:1,m=t.x.label,y=t.y.label,v=m.text&&!m.hide?1:0,b=y.text&&!y.hide?1:0,x=En(d,t.x.rotate),w=En(h,t.y.rotate);i?(m.padding=(-e.xAxisPadding-e.xFontLabelHeight)/2+e.xFontLabelHeight,m.paddingNoTicks=m.padding,y.padding=(-e.yAxisPadding-e.yFontLabelHeight)/2,y.paddingNoTicks=y.padding,v=0,b=0):(m.padding=xn([p*(e.xTickWidth+x.height),v*(e.distToXAxisLabel+e.xFontLabelHeight)]),m.paddingNoTicks=v*(e.distToXAxisLabel+e.xFontLabelHeight),y.padding=xn([g*(e.yTickWidth+w.width),b*e.distToYAxisLabel]),y.paddingNoTicks=b*e.distToYAxisLabel),o&&(y.padding=0,y.paddingNoTicks=0);var _=e.xFontLabelDescenderLineHeight;return t.padding=Object.assign(t.padding,{b:t.x.hide?0:xn([t.x.padding,p*(e.xTickWidth+x.height),v*(e.distToXAxisLabel+e.xFontLabelHeight+_)]),l:t.y.hide?0:xn([t.y.padding,o?0:g*(e.yTickWidth+w.width),b*(e.distToYAxisLabel+e.yFontLabelHeight)])}),t.paddingNoTicks=Object.assign({},t.paddingNoTicks,{b:t.x.hide?0:xn([t.x.padding,v*(e.distToXAxisLabel+e.xFontLabelHeight+_)]),l:t.y.hide?0:xn([t.y.padding,b*(e.distToYAxisLabel+e.yFontLabelHeight)])}),t.x=Object.assign(t.x,{density:x.width+2*kn(e,"xDensityPadding",n.dimType),tickFontHeight:l.height,$minimalDomain:a.length,$maxTickTextW:d.width,$maxTickTextH:d.height,tickFormatWordWrapLimit:e.xAxisTickLabelLimit}),t.y=Object.assign(t.y,{density:w.height+2*kn(e,"yDensityPadding",r.dimType),tickFontHeight:f.height,$minimalDomain:u.length,$maxTickTextW:h.width,$maxTickTextH:h.height,tickFormatWordWrapLimit:e.yAxisTickLabelLimit}),t}var jn=function(t){var e=t.unit,n=t.meta,r=t.settings,i=t.allowXVertical,o=t.allowYVertical,a=t.inlineLabels,u=n.dimension(e.x),s=n.dimension(e.y),c=n.scaleMeta(e.x,e.guide.x),l=n.scaleMeta(e.y,e.guide.y),f=c.isEmpty,d=l.isEmpty;e.guide.x.tickFormat=Tn(e.guide.x.tickFormat||An(u,r.defaultFormats),r.utcTime),e.guide.y.tickFormat=Tn(e.guide.y.tickFormat||An(s,r.defaultFormats),r.utcTime);var h=!!i&&!("measure"===u.dimType),p=!!o&&!("measure"===s.dimType);if(e.guide.x.padding=f?0:r.xAxisPadding,e.guide.x.paddingNoTicks=e.guide.x.padding,e.guide.y.padding=d?0:r.yAxisPadding,e.guide.y.paddingNoTicks=e.guide.y.padding,e.guide.x.rotate=h?-90:0,e.guide.x.textAnchor=Cn(e.guide.x.rotate,"x"),e.guide.y.rotate=p?-90:0,e.guide.y.textAnchor=Cn(e.guide.y.rotate,"y"),e.guide=Ln(e.guide,r,c,l,a,se(e)),a){var g=e.guide.x.label,m=e.guide.y.label;g.cssClass+=" inline",g.dock="right",g.textAnchor="end",m.cssClass+=" inline",m.dock="right",m.textAnchor="end"}return e},Pn={NONE:function(t,e,n){var r=St(t);return zn(St(r.unit),r.unit,function(t,e){return e.guide.x.tickFontHeight=n.getAxisTickLabelSize("X").height,e.guide.y.tickFontHeight=n.getAxisTickLabelSize("Y").height,e.guide.x.tickFormatWordWrapLimit=n.xAxisTickLabelLimit,e.guide.y.tickFormatWordWrapLimit=n.yAxisTickLabelLimit,e}),r},"BUILD-LABELS":function(t,e){var n=St(t),r=[],i=[],o=null,a=null;ft(n.unit,"units",Mn,function(t,n){if(t.isLeaf)return n;!o&&n.x&&(o=n),!a&&n.y&&(a=n),n.guide=n.guide||{},n.guide.x=n.guide.x||{label:{text:""}},n.guide.y=n.guide.y||{label:{text:""}},n.guide.x.label=Ot(n.guide.x.label)?n.guide.x.label:{text:n.guide.x.label&&n.guide.x.label.text?n.guide.x.label.text:""},n.guide.y.label=Ot(n.guide.y.label)?n.guide.y.label:{text:n.guide.y.label&&n.guide.y.label.text?n.guide.y.label.text:""},n.x&&(n.guide.x.label.text=n.guide.x.label.text||e.dimension(n.x).dimName),n.y&&(n.guide.y.label.text=n.guide.y.label.text||e.dimension(n.y).dimName);var u=n.guide.x.label.text;u&&(r.push(u),n.guide.x.tickFormatNullAlias=n.guide.x.hasOwnProperty("tickFormatNullAlias")?n.guide.x.tickFormatNullAlias:"No "+u,n.guide.x.label.text="",n.guide.x.label._original_text=u);var s=n.guide.y.label.text;return s&&(i.push(s),n.guide.y.tickFormatNullAlias=n.guide.y.hasOwnProperty("tickFormatNullAlias")?n.guide.y.tickFormatNullAlias:"No "+s,n.guide.y.label.text="",n.guide.y.label._original_text=s),n});return o&&(o.guide.x.label.text=o.guide.x.label.hide?"":r.join(" → ")),a&&(a.guide.y.label.text=a.guide.y.label.hide?"":i.join(" → ")),n},"BUILD-GUIDE":function(t,e,n){var r=St(t);return zn(St(r.unit),r.unit,function(t,r){if(t.isLeaf)return r;var i=!t.isLeaf&&!t.isLeafParent,o=e.scaleMeta(r.x,r.guide.x),a=e.scaleMeta(r.y,r.guide.y),u=!i&&Boolean(o.dimType)&&"measure"!==o.dimType;return r.guide.x.rotate=u?-90:0,r.guide.x.textAnchor=Cn(r.guide.x.rotate),r.guide.x.tickFormat=r.guide.x.tickFormat||An(o,n.defaultFormats),r.guide.y.tickFormat=r.guide.y.tickFormat||An(a,n.defaultFormats),r.guide.x.padding=i?0:n.xAxisPadding,r.guide.x.paddingNoTicks=r.guide.x.padding,r.guide.y.padding=i?0:n.yAxisPadding,r.guide.y.paddingNoTicks=r.guide.y.padding,r.guide=Ln(r.guide,Yt({distToXAxisLabel:o.isEmpty?n.xTickWidth:n.distToXAxisLabel,distToYAxisLabel:a.isEmpty?n.yTickWidth:n.distToYAxisLabel},n),o,a,null,se(r)),r.guide.x=Object.assign(r.guide.x,{cssClass:i?r.guide.x.cssClass+" facet-axis":r.guide.x.cssClass,avoidCollisions:!!i||r.guide.x.avoidCollisions}),r.guide.y=Object.assign(r.guide.y,{cssClass:i?r.guide.y.cssClass+" facet-axis":r.guide.y.cssClass,avoidCollisions:!i&&r.guide.y.avoidCollisions}),r.guide=Object.assign(r.guide,{showGridLines:r.guide.hasOwnProperty("showGridLines")?r.guide.showGridLines:t.isLeafParent?"xy":""}),r}),r},"BUILD-COMPACT":function(t,e,n){var r=St(t);return zn(St(r.unit),r.unit,function(t,r){return t.isLeaf?r:(r.guide.hasOwnProperty("showGridLines")||(r.guide.showGridLines=t.isLeafParent?"xy":""),t.isLeafParent?jn({unit:r,meta:e,settings:Yt({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},n),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(r.guide.x.cssClass+=" facet-axis compact",r.guide.x.avoidCollisions=!0,r.guide.y.cssClass+=" facet-axis compact",r.guide.y.avoidCollisions=!0,jn({unit:r,meta:e,settings:Yt({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},n),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),r},AUTO:function(t,e,n){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(t,r){return Pn[r](t,e,n)},t)},COMPACT:function(t,e,n){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(t,r){return Pn[r](t,e,n)},t)}},zn=function(t,e,n){var r,i=((r=e).options=r.options||{},r.guide=r.guide||{},r.guide.padding=Yt(r.guide.padding||{},{l:0,b:0,r:0,t:0}),r.guide.x=_n(r.guide,"x"),r.guide.x=Sn(r.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),r.guide.y=_n(r.guide,"y",{rotate:-90}),r.guide.y=Sn(r.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),r.guide.size=_n(r.guide,"size"),r.guide.color=_n(r.guide,"color"),r);i=n(Mn(i),i);var o=Vt(i=wn(i,t),"units");return(i.units||[]).forEach(function(t){return zn(St(t),(r=o,(e=t).guide=e.guide||{},e.guide.padding=e.guide.padding||{l:0,t:0,r:0,b:0},e.hasOwnProperty("units")||((e=Yt(e,r)).guide=Yt(e.guide,St(r.guide)),e.guide.x=Yt(e.guide.x,St(r.guide.x)),e.guide.y=Yt(e.guide.y,St(r.guide.y))),e),n);var e,r}),i},Fn=function(t,e,n,r){var i={dimension:function(t){var e=n.scales[t],r=n.sources[e.source].dims[e.dim]||{};return{dimName:e.dim,dimType:r.type,scaleType:e.type}},scaleMeta:function(t){var e=r("pos",t).domain(),i=n.scales[t],o=n.sources[i.source].dims[i.dim]||{};return{dimName:i.dim,dimType:o.type,scaleType:i.type,values:e,isEmpty:null==o.type}}},o=(Pn[t]||Pn.NONE)({unit:St(n.unit)},i,e);return n.unit=o.unit,n},Rn=function(){function t(t){this.spec=t,this.isApplicable=Lt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;var n=e.settings.size,r=e.settings.specEngine.find(function(t){return n.width<=t.width||n.height<=t.height});return Fn(r.name,e.settings,e,function(e,n){return t.getScaleInfo(n||e+":default")})},t}(),Dn=function(){function t(){}return t.optimizeXAxisLabel=function(t,e){var n=e.xAxisTickLabelLimit,r=function(t){if(!t.guide.x.hide&&!t.guide.x.hideTicks&&0!==t.guide.x.rotate){t.guide.x.rotate=0,t.guide.x.textAnchor="middle";var e=0-Math.min(n,t.guide.x.$maxTickTextW)+t.guide.x.$maxTickTextH;i(t,e)}(t.units||[]).filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return r(t)})},i=function(e,n){t!==e&&"extract-axes"===e.guide.autoLayout?(t.guide.x.padding+=n,t.guide.padding.b+=n):(e.guide.x.label.padding+=e.guide.x.label.padding>0?n:0,e.guide.padding.b+=e.guide.padding.b>0?n:0)};r(t)},t.hideAxisTicks=function(t,e,n){var r=function(t){var e="x"===n?"b":"l",i=t.guide;if(!i[n].hide&&!i[n].hideTicks){se(t)&&"y"===n||(i[n].hideTicks=!0);var o=i[n].label.text&&!i[n].label.hide;i.padding[e]=i.paddingNoTicks?i.paddingNoTicks[e]:0,i[n].padding=i[n].paddingNoTicks||0,i[n].label.padding=o?i[n].label.paddingNoTicks:0}(t.units||[]).filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return r(t)})};r(t)},t.facetsLabelsAtTop=function(t,e){var n=function(t){var e=t.units||[];if(se(t)){var r=t.guide;r.y.facetAxis=!0,r.y.rotate=0,r.y.textAnchor="start",e.forEach(function(t){t.guide.padding.t=20})}e.filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return n(t)})};n(t)},t}(),In=function(t){return t.$maxTickTextW},Bn=function(t){return 0==t.rotate?t.$maxTickTextW:t.$maxTickTextH},Wn=function(t){return t.density},Un=function(t){var e=[],n=[],r=function(t){if("COORDS.RECT"===t.type&&t.units&&t.units[0]&&"COORDS.RECT"===t.units[0].type){var i=t.x.replace(/^x_/,""),o=t.y.replace(/^y_/,"");"null"!==i&&e.push(i),"null"!==o&&n.push(o),t.units.forEach(r)}};r(t.unit);var i={},o={},a=function(t){"COORDS.RECT"===t.type&&t.frames.forEach(function(t){t.key&&(Object.keys(t.key).forEach(function(r){e.indexOf(r)>=0&&(i.hasOwnProperty(r)||(i[r]=[]),i[r].indexOf(t.key[r])<0&&i[r].push(t.key[r])),n.indexOf(r)>=0&&(o.hasOwnProperty(r)||(o[r]=[]),o[r].indexOf(t.key[r])<0&&o[r].push(t.key[r]))}),t.units&&t.units.forEach(a))})};return a(t.unit),{xFacetCount:Object.keys(i).reduce(function(t,e){return t*i[e].length},1),yFacetCount:Object.keys(o).reduce(function(t,e){return t*o[e].length},1)}},Hn={"entire-view":function(t,e,n,r){var i=n.unit.guide,o=Un(n),a=o.xFacetCount,u=o.yFacetCount;u>0&&Dn.facetsLabelsAtTop(n.unit,n.settings);var s=i.paddingNoTicks?i.padding.l-i.paddingNoTicks.l:0,c=i.paddingNoTicks?i.padding.b-i.paddingNoTicks.b:0,l=i.paddingNoTicks&&t.height-ct.height||a*n.settings.minFacetWidth+s>t.width,f=i.paddingNoTicks&&t.width-st.height||a*n.settings.minFacetWidth+s>t.width;l&&Dn.hideAxisTicks(n.unit,n.settings,"x"),f&&Dn.hideAxisTicks(n.unit,n.settings,"y");var d=t.width;if(e("x",n.unit,In)<=t.width)r(n.unit,n.settings);else{var h=e("x",n.unit,Bn);if(h>t.width){var p=Math.max(t.width,e("x",n.unit,Wn));d=Math.min(h,p)}}var g=Math.max(t.height,e("y",n.unit,Wn));return!l&&d>t.width&&Dn.hideAxisTicks(n.unit,n.settings,"x"),!f&&g>t.height&&Dn.hideAxisTicks(n.unit,n.settings,"y"),{newW:t.width,newH:t.height}},minimal:function(t,e,n){return{newW:e("x",n.unit,Wn),newH:e("y",n.unit,Wn)}},normal:function(t,e,n,r){Un(n).yFacetCount>0&&Dn.facetsLabelsAtTop(n.unit,n.settings);var i=n.unit.guide;i.paddingNoTicks&&(t.width-i.padding.l+i.paddingNoTicks.lt.width){var u=Math.max(t.width,e("x",n.unit,Wn));o=Math.min(a,u)}}return{newW:o,newH:Math.max(t.height,e("y",n.unit,Wn))}},"fit-width":function(t,e,n,r){var i=n.unit.guide,o=i.paddingNoTicks?i.padding.l-i.paddingNoTicks.l:0;return(i.paddingNoTicks&&t.width-ot.width)&&Dn.hideAxisTicks(n.unit,n.settings,"y"),e("x",n.unit,In)<=t.width&&r(n.unit,n.settings),{newW:t.width,newH:e("y",n.unit,Wn)}},"fit-height":function(t,e,n){var r=n.unit.guide,i=r.paddingNoTicks?r.padding.b-r.paddingNoTicks.b:0;return(r.paddingNoTicks&&t.height-it.height)&&Dn.hideAxisTicks(n.unit,n.settings,"x"),{newW:e("x",n.unit,Wn),newH:t.height}}},qn=function(){function t(t){this.spec=t,this.isApplicable=Lt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;var n=e.settings.fitModel;if(!n)return e;var r=e.scales,i=function(t,e){return t.discrete?e*t.domain().length:4*e},o=function(e,n,a,u){void 0===u&&(u=null);var s="x"===e?n.x:n.y,c="x"===e?n.y:n.x,l=n.guide,f=a("x"===e?l.x:l.y),d=n.units[0],h="x"===e?l.padding.l+l.padding.r:l.padding.b+l.padding.t;if("ELEMENT.INTERVAL"===d.type&&"y"===e===Boolean(d.flip)&&d.label&&!t.getScaleInfo(d.label,u).isEmpty()){var p,g=2*(l.label&&l.label.fontSize?l.label.fontSize:10),m=t.getScaleInfo(s,u);if(m.discrete&&(null==d.guide.enableColorToBarPosition?!d.stack:d.guide.enableColorToBarPosition)){var y=d.color;if(y){var v=t.getScaleInfo(y,u);if(v.discrete){v.domain();p=v}}}var b=n.frames.reduce(function(t,e){return t+function(t){var e=t.part(),n=Ht(e.map(function(t){return t[m.dim]})).length,r=1;if(p){var i=e.reduce(function(t,e){var n=e[m.dim],r=e[p.dim];return t[n]=t[n]||{},t[n][r]||(t[n][r]=!0),t},{}),o=Object.keys(i).map(function(t){return Object.keys(i[t]).length});r=Math.max.apply(Math,o)}return n*r*g}(e)},0),x=i(m,f);return h+Math.max(b,x)}if("COORDS.RECT"!==d.type){var w=t.getScaleInfo(s,u);return h+i(w,f)}var _,S,M=(_=n.frames,S=r[c].dim,_.reduce(function(t,e){var n=(e.key||{})[S];return t[n]=t[n]||[],t[n].push(e),t},{})),O=Object.keys(M).map(function(t){return M[t].map(function(t){return o(e,t.units[0],a,t)}).reduce(function(t,e){return t+e},0)});return h+Math.max.apply(Math,O)},a=e.settings.size,u=a.width,s=a.height,c=Hn[n];if(c){var l=c(a,o,e,Dn.optimizeXAxisLabel);u=l.newW,s=l.newH}return e.settings.size=function(n,r,i){var o=e.settings.getScrollbarSize(t.getLayout().contentContainer),a=r.width>n.width&&r.width<=n.width*i?n.width:r.width,u=r.height>n.height&&r.height<=n.height*i?n.height:r.height,s=n.width-a,c=n.height-u>=0?0:o.width;return{height:u-(s>=0?0:o.height),width:a-c}}(a,{width:u,height:s},e.settings.avoidScrollAtRatio),e},t}(),Gn=function(){function t(t){this.spec=t,this.isApplicable=t.settings.autoRatio&&Lt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;try{this.ruleApplyRatio(e,t)}catch(t){if("Not applicable"!==t.message)throw t}return e},t.prototype.ruleApplyRatio=function(t,e){var n=function(t){return"COORDS.RECT"===t.type||"RECT"===t.type},r=function(t,e,n,i){void 0===i&&(i=0),e(t,i)&&(t.units||[]).map(function(t){return r(t,e,n,i+1)}),n(t,i)},i=[],o=[];r(t.unit,function(t,e){if(e>1||!n(t))throw new Error("Not applicable");return i.push(t.x),o.push(t.y),1===(t.units||[]).map(function(t){if(!n(t)&&0!==t.type.indexOf("ELEMENT."))throw new Error("Not applicable");return t}).filter(n).length},function(){return 0});var a=function(e){return t.scales[e]},u=function(t){return"/"===t.source&&!t.ratio&&!t.fitToFrameByDims},s=function(t){return"ordinal"===t.type||"period"===t.type&&!t.period},c=i.map(a).filter(u),l=o.map(a).filter(u);if([c.length,l.length].some(function(t){return 2===t})){var f=function(t){return t.dim},d=function(t,e,n){t.fitToFrameByDims=n.slice(0,e).map(f)},h=function(t,n){2===n.filter(s).length&&(n.forEach(d),n[0].ratio=Nt(t,n.map(f),e))};h("x",c),h("y",l)}},t}(),Xn=function(){function t(t){this.spec=t,this.isApplicable="EXTRACT"===t.settings.layoutEngine&&Lt(t.unit)}return t.prototype.transform=function(){var t=this.spec;if(!this.isApplicable)return t;try{this.ruleExtractAxes(t)}catch(t){if("Not applicable"!==t.message)throw t;console.log("[TauCharts]: can't extract axes for the given chart specification")}return t},t.prototype.ruleExtractAxes=function(t){var e=function(t){return"COORDS.RECT"===t.type||"RECT"===t.type},n=function(t){return t?10:0},r={l:0,r:10,t:10,b:0},i={l:0,b:0},o=[],a=[];dt(t.unit,function(t,n){if(n>1||!e(t))throw new Error("Not applicable");t.guide=t.guide||{};var u=t.guide,s=u.padding||{l:0,r:0,t:0,b:0},c=u.paddingNoTicks||{l:0,b:0};return r.l+=s.l,r.r+=s.r,r.t+=s.t,r.b+=s.b,i.l+=c.l,i.b+=c.b,o.push(Object.assign({},r)),a.push(Object.assign({},i)),1===(t.units||[]).map(function(t){if(!e(t)&&0!==t.type.indexOf("ELEMENT."))throw new Error("Not applicable");return t}).filter(e).length},function(t){var e=o.pop(),u=a.pop(),s=t.guide||{};s.x=s.x||{},s.x.padding=s.x.padding||0,s.x.paddingNoTicks=s.x.paddingNoTicks||0,s.y=s.y||{},s.y.padding=s.y.padding||0,s.y.paddingNoTicks=s.y.paddingNoTicks||0,s.padding={l:n(t.y),r:n(1),t:n(1),b:n(t.x)},s.paddingNoTicks={l:0,b:0},s.autoLayout="extract-axes",s.x.padding+=r.b-e.b,s.y.padding+=r.l-e.l,s.x.paddingNoTicks+=i.b-u.b,s.y.paddingNoTicks+=i.l-u.l}),t.unit.guide.padding=r,t.unit.guide.paddingNoTicks=i},t}(),Yn=function(){function t(t){var e=void 0===t?{}:t,n=e.src,r=void 0===n?null:n,i=e.timeout,o=void 0===i?Number.MAX_SAFE_INTEGER:i,a=e.syncInterval,u=void 0===a?Number.MAX_SAFE_INTEGER:a,s=e.callbacks,c=void 0===s?{}:s,l=this;this.setTimeoutDuration(o),this.setSyncInterval(u),this.setCallbacks(c),this._running=!1,this._queue=[],this._result=r,this._syncDuration=0,this._asyncDuration=0,this._requestedFrameId=null,this._visibilityChangeHandler=function(){if(l._running&&l._requestedFrameId){var t=l._getCancelFrameFunction(),e=l._getRequestFrameFunction();t(l._requestedFrameId),l._requestedFrameId=e(l._requestedFrameCallback)}},this._tasksCount=0,this._finishedTasksCount=0}return t.prototype.setTimeoutDuration=function(e){t.checkType(e,"number","timeout"),this._timeout=e},t.prototype.setSyncInterval=function(e){t.checkType(e,"number","syncInterval"),this._syncInterval=e},t.prototype.setCallbacks=function(e){t.checkType(e,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},e)},t.prototype.addTask=function(t){return this._queue.push(t),this._tasksCount++,this},t.prototype.run=function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,t.runnersInProgress++,document.addEventListener("visibilitychange",this._visibilityChangeHandler),this._loopTasks()},t.prototype.isRunning=function(){return this._running},t.prototype._loopTasks=function(){for(var e,n,r,i,o=0,a=this._syncInterval/t.runnersInProgress;this._running&&!(r=this._asyncDuration>this._timeout)&&!(i=o>a)&&(e=this._queue.shift());){if(null===(n=this._runTask(e)))return;this._syncDuration+=n,this._asyncDuration+=n,o+=n}r&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!r&&i&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))},t.prototype._runTask=function(t){var e=performance.now();if(this._callbacks.error)try{this._result=t.call(null,this._result,this)}catch(t){return this.stop(),this._callbacks.error.call(null,t,this),null}else this._result=t.call(null,this._result,this);var n=performance.now()-e;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),n},t.prototype._requestFrame=function(){var t=this,e=performance.now(),n=function(){t._requestedFrameId=null;var n=performance.now();t._asyncDuration+=n-e,t._loopTasks()},r=this._getRequestFrameFunction();this._requestedFrameCallback=n,this._requestedFrameId=r(n)},t.prototype._getRequestFrameFunction=function(){var t=this;return document.hidden?function(e){return t._requestedFrameType="idle",window.requestIdleCallback(e,{timeout:17})}:function(e){return t._requestedFrameType="animation",requestAnimationFrame(e)}},t.prototype._getCancelFrameFunction=function(){switch(this._requestedFrameType){case"animation":return function(t){return cancelAnimationFrame(t)};case"idle":return function(t){return window.cancelIdleCallback(t)}}},t.prototype.stop=function(){if(!this._running)throw new Error("Task Runner is already stopped");(this._running=!1,t.runnersInProgress--,document.removeEventListener("visibilitychange",this._visibilityChangeHandler),this._requestedFrameId)&&(this._getCancelFrameFunction()(this._requestedFrameId),this._requestedFrameId=null)},t.checkType=function(t,e,n){if(typeof t!==e)throw new Error('Task Runner "'+n+'" property is not "'+e+'"')},t.runnersInProgress=0,t}(),Vn=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$n=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var l=c.findIndex(function(t){return t.closest.distance!==c[0].closest.distance||t.closest.secondaryDistance!==c[0].closest.secondaryDistance}),f=l<0?c:c.slice(0,l);if(1===f.length)o=f[0].closest.data,a=f[0].closest.node,u=f[0].unit;else{var d=f.reduce(function(t,e){return t+e.closest.x},0)/f.length,h=f.reduce(function(t,e){return t+e.closest.y},0)/f.length,p=Math.atan2(h-r,d-n)+Math.PI,g=Math.round((f.length-1)*p/2/Math.PI),m=f[g].closest;o=m.data,a=m.node,u=f[g].unit}}s.forEach(function(e){return e.unit.fire(i,{event:t,data:o,node:a,unit:u})})},e.prototype._initPointerEvents=function(){var t=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var e=$n.select(this._svg),n=this._liveSpec.settings.syncPointerEvents?function(t){return function(){return t(a.event)}}:function(e){return function(){var n=a.event;t._pointerAnimationFrameId&&"mousemove"!==n.type&&t._cancelPointerAnimationFrame(),t._pointerAnimationFrameId||(t._pointerAnimationFrameId=requestAnimationFrame(function(){t._pointerAnimationFrameId=null,e(n)}))}},r=function(e){return t._handlePointerEvent(e)};e.on("mousemove",n(r)),e.on("click",n(r)),e.on("mouseleave",n(function(e){"none"!==window.getComputedStyle(t._svg).pointerEvents&&t.select(function(){return!0}).forEach(function(t){return t.fire("data-hover",{event:e,data:null,node:null,unit:null})})}))},e.prototype._cancelPointerAnimationFrame=function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null},e.prototype._setupTaskRunner=function(t){var e=this;return this._resetTaskRunner(),this._taskRunner=new Yn({timeout:t.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:t.settings.asyncRendering?t.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){e._completeRendering(),e._renderingPhase=null},timeout:function(t,n){e._displayTimeoutWarning({timeout:t,proceed:function(){e.disablePointerEvents(),n.setTimeoutDuration(Number.MAX_SAFE_INTEGER),n.run()},cancel:function(){e._cancelRendering()}}),e.enablePointerEvents(),e.fire("renderingtimeout",t)},progress:function(t){var n={spec:0,draw:1}[e._renderingPhase]/2+t/2;e._reportProgress(n)},error:t.settings.handleRenderingErrors?function(n){e._cancelRendering(),e._displayRenderingError(n),e.fire("renderingerror",n),t.settings.log(["An error occured during chart rendering.",'Set "handleRenderingErrors: false" in chart settings to debug.',"Error message: "+n.message].join(" "),"ERROR")}:null}}),this._taskRunner},e.prototype._resetTaskRunner=function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)},e.prototype.renderTo=function(t,e){this._resetProgressLayout(),this.disablePointerEvents(),this._insertLayout(t,e);var n=this._createLiveSpec();if(!n)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var r=this._createGPL(n),i=this._setupTaskRunner(n);this._scheduleDrawScenario(i,r),this._scheduleDrawing(i,r),i.run()},e.prototype._insertLayout=function(t,e){this._target=t,this._defaultSize=Object.assign({},e);var n=$n.select(t).node();if(null===n)throw new Error("Target element not found");this._layout.layout.parentNode!==n&&n.appendChild(this._layout.layout);var r=this._layout.content,i=de(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+i.width+"px "+i.height+"px 0",he(this._layout.rightSidebarContainer,"vertical");var o=Object.assign({},e)||{};if(!o.width||!o.height){var a=r.parentElement,u=a.scrollLeft,s=a.scrollTop;r.style.display="none",o=Yt(o,me(r.parentNode)),r.style.display="",r.parentElement.scrollLeft=u,r.parentElement.scrollTop=s,o.height||(o.height=me(this._layout.layout).height)}this.configGPL.settings.size=o},e.prototype._createLiveSpec=function(){var t=this;return this._liveSpec=St(Vt(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(e,n){return new n(e).transform(t)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)},e.prototype._experimentalSetupAnimationSpeed=function(t){t.settings.initialAnimationSpeed=t.settings.initialAnimationSpeed||t.settings.animationSpeed;var e=t.settings.experimentalShouldAnimate(t)?t.settings.initialAnimationSpeed:0;t.settings.animationSpeed=e;var n=function(t){t.guide=t.guide||{},t.guide.animationSpeed=e,t.units&&t.units.forEach(n)};n(t.unit)},e.prototype._createGPL=function(t){var e=new Be(t,this.getScaleFactory(),Ke,S),n=e.unfoldStructure();return this.onUnitsStructureExpanded(n),e},e.prototype._scheduleDrawScenario=function(t,e){var n=this,r=$n.select(this._layout.content),i=e.config.settings.size;t.addTask(function(){return n._renderingPhase="spec"}),e.getDrawScenarioQueue({allocateRect:function(){return{slot:function(t){return r.selectAll(".uid_"+t)},frameId:"root",left:0,top:0,width:i.width,containerWidth:i.width,height:i.height,containerHeight:i.height}}}).forEach(function(e){return t.addTask(e)})},e.prototype._scheduleDrawing=function(t,e){var n=this,r=e.config.settings.size;t.addTask(function(t){n._renderingPhase="draw",n._renderRoot({scenario:t,newSize:r}),n._cancelPointerAnimationFrame(),n._scheduleRenderScenario(t)})},e.prototype._resetProgressLayout=function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()},e.prototype._renderRoot=function(t){var e=this,n=t.scenario,r=t.newSize,i=$n.select(this._layout.content),o=n[0].config.uid,a=Jn(i,"svg").attr("width",Math.floor(r.width)).attr("height",Math.floor(r.height));a.attr("class")||a.attr("class",We+"svg"),this._svg=a.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var u=a.selectAll("g.frame-root").data([o],function(t){return t});u.enter().append("g").classed(We+"cell cell frame-root uid_"+o,!0).merge(u).call(function(t){t.classed("tau-active",!0),Z(t,e.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),u.exit().call(function(t){t.classed("tau-active",!1),Z(t,e.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})},e.prototype._scheduleRenderScenario=function(t){var e=this;t.forEach(function(t){e._taskRunner.addTask(function(){t.draw(),e.onUnitDraw(t.node()),e._renderedItems.push(t)})})},e.prototype._completeRendering=function(){he(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),he(this._layout.rightSidebarContainer,"vertical")},e.prototype._cancelRendering=function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()},e.prototype._createProgressBar=function(){var t=$n.select(this._layout.header),e=Jn(t,"div."+We+"progress");e.select("div."+We+"progress__value").remove();var n=e.append("div").classed(We+"progress__value",!0).style("width",0);this._reportProgress=function(t){requestAnimationFrame(function(){e.classed(We+"progress_active",t<1),n.style("width",100*t+"%")})}},e.prototype._displayRenderingError=function(t){this._layout.layout.classList.add(We+"layout_rendering-error")},e.prototype._clearRenderingError=function(){this._layout.layout.classList.remove(We+"layout_rendering-error")},e.prototype.getScaleFactory=function(t){return void 0===t&&(t=null),new en(tn.instance(this._liveSpec.settings),t||this._liveSpec.sources,this._liveSpec.scales)},e.prototype.getScaleInfo=function(t,e){return void 0===e&&(e=null),this.getScaleFactory().createScaleInfoByName(t,e)},e.prototype.getSourceFiltersIterator=function(t){var e=this,n=Ut(Object.keys(this._filtersStore.filters).map(function(t){return e._filtersStore.filters[t]})).filter(function(e){return!t(e)}).map(function(t){return t.predicate});return function(t){return n.reduce(function(e,n){return e&&n(t)},!0)}},e.prototype.getDataSources=function(t){var e=this;void 0===t&&(t={});var n=this._chartDataModel(this._originData);return Object.keys(n).filter(function(t){return"?"!==t}).reduce(function(r,i){var o=n[i],a=e.getSourceFiltersIterator(function(e){return function(n){return t.excludeFilter&&-1!==t.excludeFilter.indexOf(n.tag)||n.src!==e}}(i));return r[i]={dims:o.dims,data:o.data.filter(a)},r},{"?":n["?"]})},e.prototype.isEmptySources=function(t){return!Object.keys(t).filter(function(t){return"?"!==t}).filter(function(e){return t[e].data.length>0}).length},e.prototype.getChartModelData=function(t,e){return void 0===t&&(t={}),void 0===e&&(e="/"),this.getDataSources(t)[e].data},e.prototype.getDataDims=function(t){return void 0===t&&(t="/"),this._originData[t].dims},e.prototype.getData=function(t){return void 0===t&&(t="/"),this._originData[t].data},e.prototype.setData=function(t,e){void 0===e&&(e="/"),this._originData[e].data=t,this.refresh()},e.prototype.getSVG=function(){return this._svg},e.prototype.addFilter=function(t){t.src=t.src||"/";var e=t.tag,n=this._filtersStore.filters[e]=this._filtersStore.filters[e]||[],r=this._filtersStore.tick++;return t.id=r,n.push(t),r},e.prototype.removeFilter=function(t){var e=this;return Object.keys(this._filtersStore.filters).map(function(n){e._filtersStore.filters[n]=e._filtersStore.filters[n].filter(function(e){return e.id!==t})}),this},e.prototype.refresh=function(){this._target&&this.renderTo(this._target,this._defaultSize)},e.prototype.resize=function(t){void 0===t&&(t={}),this.renderTo(this._target,t)},e.prototype.select=function(t){return this._nodes.filter(t)},e.prototype.traverseSpec=function(t,e){var n=function(t,e,r,i){e(t,r,i),t.frames?t.frames.forEach(function(r){(r.units||[]).map(function(i){return n(i,e,t,r)})}):(t.units||[]).map(function(r){return n(r,e,t,null)})};n(t.unit,e,null,null)},e.prototype.getSpec=function(){return this._liveSpec},e.prototype.getLayout=function(){return this._layout},e.prototype._displayTimeoutWarning=function(t){var e=this,n=t.proceed,r=t.cancel,i=t.timeout,o=Math.round(100/3/1.5),a=function(t){return Math.round(100/3/1.5*t)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",'\n
\n \n \n Rendering took more than '+Math.round(i)/1e3+'s\n Would you like to continue?\n \n \n Continue\n \n \n Cancel\n \n \n
\n '),this._layout.content.querySelector("."+We+"rendering-timeout-continue-btn").addEventListener("click",function(){e._clearTimeoutWarning(),n.call(e)}),this._layout.content.querySelector("."+We+"rendering-timeout-cancel-btn").addEventListener("click",function(){e._clearTimeoutWarning(),r.call(e)})},e.prototype._clearTimeoutWarning=function(){var t=Kn(this._layout.content,"."+We+"rendering-timeout-warning");t&&(this._layout.content.removeChild(t),this._layout.content.style.height="")},e}(h),Qn={},tr={},er=function(t){var e="Chart type "+t+" is not supported.";throw console.log(e),console.log("Use one of "+Object.keys(Qn).join(", ")+"."),new x(e,w.NOT_SUPPORTED_TYPE_CHART)},nr={validate:function(t,e){return tr.hasOwnProperty(t)||er(t),tr[t].reduce(function(t,n){return t.concat(n(e)||[])},[])},get:function(t){var e=Qn[t];return"function"!=typeof e&&er(t),e},add:function(t,e,n){return void 0===n&&(n=[]),Qn[t]=e,tr[t]=n,nr},getAllRegisteredTypes:function(){return Qn}},rr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ir=function(t){function e(n){var r=t.call(this,n)||this;return n.autoResize&&e.winAware.push(r),r}return rr(e,t),e.prototype.applyConfig=function(e){var n=nr.validate(e.type,e);if(n.length>0)throw new Error(n[0]);var r=nr.get(e.type);(e=Yt(e,{autoResize:!0})).settings=Zn.setupSettings(e.settings),e.dimensions=Zn.setupMetaInfo(e.dimensions,e.data),t.prototype.applyConfig.call(this,r(e))},e.prototype.destroy=function(){var n=e.winAware.indexOf(this);-1!==n&&e.winAware.splice(n,1),t.prototype.destroy.call(this)},e}(Zn);function or(t){return t}ir.winAware=[],ir.resizeOnWindowEvent=function(){var t;function e(){t=0;for(var e=0,n=ir.winAware.length;ex&&x>2&&b.length>2;)b=n.ticks(--x)}else b=n.domain();r.hideTicks&&(b=l?b.filter(function(t){return 0==t}):[]);var w=null==u?n.tickFormat?n.tickFormat(a):or:u,_=Math.max(s,0)+c,S=n.range(),M=S[0]+.5,O=S[S.length-1]+.5,A=(n.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return t(n)+e}}:or)(n);if(r.facetAxis){var k=A;A=function(t){return k(t)-n.stepSize(t)/2}}var T,E=o.selection?o:null,C=E?E.selection():o,N=function(t){for(var e=t.node();e&&"svg"!==e.tagName;)e=e.parentNode;return e}(C).getBoundingClientRect();function L(t){var n=Dt(r.rotate);if(t.attr("transform",ke(n)),Math.abs(n/90)%2>0){var i=n<180?1:-1,o=h?.5:-2,a=e===cr.top||e===cr.left?-1:1,u=o*(e===cr.top||e===cr.bottom?a<0?0:.71:.32);t.attr("x",9*i).attr("y",0).attr("dx",h?null:u+"em").attr("dy",u+"em")}}function j(t,e){void 0===e&&(e=0);var i=function(t){return Math.max(n.stepSize(t),r.tickFormatWordWrapLimit,e)};r.tickFormatWordWrap?K(t,i,r.tickFormatWordWrapLines,r.tickFontHeight,!h):J(t,i)}function P(t){!function(t,e){var n=e?-10:20,r=e?0:1,i=e?1:-1,o=[];t.each(function(){var t=V.select(this),e=t.attr("transform").replace("translate(","").replace(" ",",").split(",")[r],n=i*parseFloat(e),a=t.select("text"),u=a.node().getBBox().width/2,s=n-u,c=n+u;o.push({c:n,s:s,e:c,l:0,textRef:a,tickRef:t})});var a,u=o.sort(function(t,e){return t.c-e.c});a=function(t,r,i){var o,a,u,s=t.e>r.s,c=i.s1&&(f=f.replace(/([\.]*$)/gi,"")+"...");var d=11*r.l,h=e?parseFloat(r.textRef.attr("y"))+d:0,p=e?0:d,g=e?d:0,m=function(t){var e=0;if(!t)return e;var n=t.indexOf("rotate(");if(n>=0){var r=t.indexOf(")",n+7),i=t.substring(n+7,r);e=parseFloat(i.trim())}return e}(r.textRef.attr("transform"));r.textRef.text(function(t,e){return 0===e?f:""}).attr("transform","translate("+p+","+g+") rotate("+m+")");var y={x1:0,x2:0,y1:h+(e?-1:5),y2:n};e||(y.transform="rotate(-90)"),xe(r.tickRef,"line.label-ref").call(at(y))}else r.tickRef.selectAll("line.label-ref").remove();return r},u.map(function(t,e,n){return a(n[e-1]||{e:-1/0,s:-1/0,l:0},t,n[e+1]||{e:1/0,s:1/0,l:0})})}(t,h)}C.attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===cr.right?"start":e===cr.left?"end":"middle"),l||(T=r.hideTicks||r.hide?[]:[null],oe(C.selectAll(".domain").data(T)).then(function(t){return E&&t.exit().transition(E).attr("opacity",0).remove(),t.merge(t.enter().insert("path",".tick").attr("class","domain").attr("opacity",1).attr("stroke","#000"))}).then(function(t){return E?t.transition(E):t}).then(function(t){t.attr("d",e===cr.left||e==cr.right?"M"+p*s+","+M+"H0.5V"+O+"H"+p*s:"M"+M+","+p*s+"V0.5H"+O+"V"+p*s)}));var z=oe(C.selectAll(".tick").data(b,function(t){return String(n(t))}).order()).then(function(t){var e=t.exit(),n=t.enter().append("g").attr("class","tick");return{tickExit:e,tickEnter:n,tick:t.merge(n)}}).then(function(t){if(f){var e=n.ticks(),r=n.domain(),i=b.length-1,o=e.length>1&&r[0]*r[1]<0&&-r[0]>(e[1]-e[0])/2&&r[1]>(e[i]-e[i-1])/2;t.tick.classed("zero-tick",function(t){return 0==t&&o})}return t}).result();!function(t){oe(t).then(function(t){var e=t.tickEnter,n=t.tickExit,r=t.tick;return E?(e.attr("opacity",ar).attr("transform",function(t){var e=A(t);return y(e)}),{tick:r.transition(E),tickExit:n.transition(E).attr("opacity",ar).attr("transform",function(t){var e=A(t);return isFinite(e)?y(e):this.getAttribute("transform")})}):{tick:r,tickExit:n}}).then(function(t){var e=t.tick;t.tickExit.remove(),e.attr("opacity",1).attr("transform",function(t){return y(A(t))})})}(z),r.facetAxis||function(t){var e=p*s,r=d?function(t){return v*n.stepSize(t)/2}:null;oe(t).then(function(t){var n=t.tick,i=t.tickEnter,o=n.select("line"),a=i.append("line").attr("stroke","#000").attr(m+"2",e);return d&&a.attr(g+"1",r).attr(g+"2",r),o.merge(a)}).then(function(t){return E?t.transition(E):t}).then(function(t){t.attr(m+"2",e),d&&t.attr(g+"1",r).attr(g+"2",r)})}(z),d&&l&&d&&b&&b.length&&oe(C.selectAll(".extra-tick-line").data([null])).then(function(t){return t.merge(t.enter().insert("line",".tick").attr("class","extra-tick-line").attr("stroke","#000"))}).then(function(t){return E?t.transition(E):t}).then(function(t){t.attr(g+"1",M).attr(g+"2",M).attr(m+"1",0).attr(m+"2",p*s)}),l||(function(i){var o=r.textAnchor,a=p*_,u=e===cr.top?"0em":e===cr.bottom?"0.71em":"0.32em";function s(e){if(r.facetAxis)return e.attr("dx",18-t.position[0]).attr("dy",16)}oe(i).then(function(t){var e=t.tick,n=t.tickEnter,r=e.select("text"),i=n.append("text").attr("fill","#000").attr(m,a).attr("dy",u);return L(i),s(i),r.merge(i)}).then(function(t){if(t.text(w).attr("text-anchor",o),!1===h&&!0===r.facetAxis){var e=Ee(C.node().parentNode.getAttribute("transform"));j(t,N.width-Math.abs(e.x))}else j(t);return h&&"time"===n.scaleType&&function(t){if(!(b.length<2)){var e=0,n=-1,r=t.nodes();r.forEach(function(t,r){var i=t.textContent||"",o=i.length;o>e&&(e=o,n=r)});var i=A(b[1])-A(b[0]),o=!1;if(n>=0){var a=r[n].getBoundingClientRect();o=i-a.width<8}C.classed(We+"time-axis-overflow",o)}}(t),!h||"time"!==n.scaleType&&"linear"!==n.scaleType||function(t){if(0!==b.length){var e=b[0],n=b[b.length-1],r=C.append("line").attr("x1",A(e)).attr("x2",A(e)).attr("y1",0).attr("y2",1),i=C.append("line").attr("x1",A(n)).attr("x2",A(n)).attr("y1",0).attr("y2",1),o={left:r.node().getBoundingClientRect().left-N.left,right:N.right-i.node().getBoundingClientRect().right};r.remove(),i.remove();var a=function(t,e,n){var r=t.getBoundingClientRect(),i=e>0?"right":"left",a=(A(n),o[i]),u=Math.ceil(r.width/2-a+1);t.setAttribute("dx",String(u>0?-e*u:0))},u=t.filter(function(t){return t===e}).node(),s=t.filter(function(t){return t===n}).node();t.attr("dx",null),a(u,-1,e),a(s,1,n)}}(t),t}).then(function(t){return E?t.transition(E):t}).then(function(t){t.attr(m,a),L(t),s(t),d&&r.avoidCollisions&&!r.facetAxis&&(E?E.on("end.fixTickTextCollision",function(){return P(i.tick)}):P(i.tick))})}(z),i.hide||function(){var t=i,e=xe(C,"text.label").attr("class",Me("label",t.cssClass)).attr("transform",ke(t.rotate)).attr("text-anchor",t.textAnchor);oe(e).then(function(t){return E?t.transition(E):t}).then(function(e){var n=v*t.padding,r=Math.abs(O-M),i=h?r:0;e.attr("x",i).attr("y",n).attr("text-anchor","end")});for(var n=t.text.split(" → "),r=n.length-1;r>0;r--)n.splice(r,0," → ");e.selectAll("tspan").data(n).enter().append("tspan").attr("class",function(t,e){return e%2?"label-token-delimiter label-token-delimiter-"+e:"label-token label-token-"+e}).text(function(t){return t}).exit().remove()}())}}function fr(t){return lr({scale:t.scale,scaleGuide:t.scaleGuide,ticksCount:t.ticksCount,tickSize:t.tickSize,gridOnly:!0,position:t.position})}var dr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hr=xe,pr=function(t){var e=t<=20?1:.75;return Math.max(2,Math.round(t*e))},gr=function(t){function e(e){var n=t.call(this,e)||this;n.config=e,n.config.guide=Yt(n.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),n.config.guide.x=n.config.guide.x||{},n.config.guide.x=Yt(n.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof n.config.guide.x.label&&(n.config.guide.x.label={text:n.config.guide.x.label}),n.config.guide.x.label=Yt(n.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),n.config.guide.y=n.config.guide.y||{},n.config.guide.y=Yt(n.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof n.config.guide.y.label&&(n.config.guide.y.label={text:n.config.guide.y.label}),n.config.guide.y.label=Yt(n.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var r=n.config,i=r.guide;if("extract-axes"===i.autoLayout){var o=r.options.containerHeight-(r.options.top+r.options.height);i.x.hide=i.x.hide||Math.floor(o)>0,i.y.hide=i.y.hide||Math.floor(r.options.left)>0}var a=n.config.options,u=n.config.guide.padding;return n.L=a.left+u.l,n.T=a.top+u.t,n.W=a.width-(u.l+u.r),n.H=a.height-(u.t+u.b),n}return dr(e,t),e.prototype.defineGrammarModel=function(t){var e=this.W,n=this.H;return this.xScale=t("pos",this.config.x,[0,e]),this.yScale=t("pos",this.config.y,function(t){return["ordinal","period"].indexOf(t.type)>=0?[0,n]:[n,0]}),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return e/2},yi:function(){return n/2},sizeX:function(){return e},sizeY:function(){return n}}},e.prototype.getGrammarRules=function(){return[function(t){var e=t.scaleX,n=t.scaleY;return{xi:function(n){return n?e(n[e.dim]):t.xi(n)},yi:function(e){return e?n(e[n.dim]):t.yi(e)},sizeX:function(n){return n?e.stepSize(n[e.dim]):t.sizeX(n)},sizeY:function(e){return e?n.stepSize(e[n.dim]):t.sizeY(e)}}}]},e.prototype.createScreenModel=function(t){return t},e.prototype.allocateRect=function(t){var e=this,n=this.screenModel;return{slot:function(t){return e.config.options.container.selectAll(".uid_"+t)},left:n.xi(t)-n.sizeX(t)/2,top:n.yi(t)-n.sizeY(t)/2,width:n.sizeX(t),height:n.sizeY(t),containerWidth:this.W,containerHeight:this.H}},e.prototype.drawFrames=function(t){var e=Object.assign({},this.config),n=e.options,r=this.W,i=this.H;if(e.x=this.xScale,e.y=this.yScale,e.x.scaleObj=this.xScale,e.y.scaleObj=this.yScale,e.x.guide=e.guide.x,e.y.guide=e.guide.y,e.x.guide.label.size=r,e.y.guide.label.size=i,(n.container.attr("transform")?Z(n.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):n.container).attr("transform",Ae(this.L,this.T)),e.x.guide.hide)this._removeDimAxis(n.container,e.x);else{var o="top"===e.x.guide.scaleOrient?[0,0-e.guide.x.padding]:[0,i+e.guide.x.padding];this._drawDimAxis(n.container,e.x,o,r)}if(e.y.guide.hide)this._removeDimAxis(n.container,e.y);else{var a="right"===e.y.guide.scaleOrient?[r+e.guide.y.padding,0]:[0-e.guide.y.padding,0];this._drawDimAxis(n.container,e.y,a,i)}var u=t.reduce(function(t,e){return t.concat((e.units||[]).map(function(t){return t.uid}))},[]),s=this._drawGrid(n.container,e,r,i,n),c=it(s,".cell").data(u,function(t){return t});c.enter().append("g").attr("class",function(t){return We+"cell cell uid_"+t}).merge(c).classed("tau-active",!0),Z(c,this.config.guide.animationSpeed).attr("opacity",1),Z(c.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()},e.prototype._drawDimAxis=function(t,e,n,r){var i=bn.get(e.guide.tickFormat,e.guide.tickFormatNullAlias),a=lr({scale:e.scaleObj,scaleGuide:e.guide,ticksCount:i?pr(r/e.guide.density):null,tickFormat:i||null,position:n}),u=this.config.guide.animationSpeed;hr(t,this._getAxisSelector(e)).classed("tau-active",!0).classed(e.guide.cssClass,!0).call(function(t){var e=Z(t,u,"axisTransition"),r=t.attr("transform");Ae.apply(o,n)!==r&&(r?e:t).attr("transform",Ae.apply(o,n)),e.call(a),e.attr("opacity",1)})},e.prototype._removeDimAxis=function(t,e){var n=it(t,this._getAxisSelector(e)).classed("tau-active",!1);Z(n,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()},e.prototype._getAxisSelector=function(t){return"g."+("h"===Te(t.guide.scaleOrient)?"x":"y")+".axis"},e.prototype._drawGrid=function(t,e,n,r){var i=this;return hr(t,"g.grid").attr("transform",Ae(0,0)).call(function(t){var o=t,a=i.config.guide.animationSpeed,u=(e.guide.showGridLines||"").toLowerCase();if(u.length>0){var s=hr(o,"g.grid-lines");if(u.indexOf("x")>-1){var c=e.x,l=bn.get(c.guide.tickFormat),f=fr({scale:c.scaleObj,scaleGuide:c.guide,tickSize:r,ticksCount:l?pr(n/c.guide.density):null}),d=hr(s,"g.grid-lines-x");Z(d,a).call(f)}if(u.indexOf("y")>-1){var h=e.y,p=(l=bn.get(h.guide.tickFormat),fr({scale:h.scaleObj,scaleGuide:h.guide,tickSize:-n,ticksCount:l?pr(r/h.guide.density):null})),g=hr(s,"g.grid-lines-y");Z(g,a).call(p)}}})},e}(g),mr=n(16),yr=n(7),vr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),br=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n})}else{var o=n[t].map(r[t].invert);e=[o[0],o[1]]}return{dim:r[t].dim,func:r[t].discrete?"inset":"between",args:e}});e.fire("brush",u)}};return t.selectAll(".brush").remove(),t.append("g").attr("class","brush").each(function(t){var e=r[t].range();i[t]=br.brushY().extent([[0,e[0]],[16,e[1]]]).on("start",u).on("brush",c).on("end",s),br.select(this).classed("brush-"+Ct(t),!0).call(i[t]),o=!1,i[t].move(br.select(this),e),o=!0}).selectAll("rect").attr("transform","translate(-8,0)").attr("width",16),t},e.prototype._forceBrushing=function(t){void 0===t&&(t={});var e=this.columnsBrushes,n=this.columnsScalesMap;this.columnsSelections;Object.keys(t).filter(function(r){return e[r]&&n[r]&&t[r]}).forEach(function(r){var i=t[r],o=[];if(n[r].discrete){var a=i.map(n[r]).filter(function(t){return t>=0}),u=n[r].stepSize()/2;o=[Math.min.apply(Math,a)-u,Math.max.apply(Math,a)+u]}else o=[i[0],i[1]];var s=Ct(r);e[r](br.select(".brush-"+s)),e[r].move(br.select(".brush-"+s),o.map(n[r]))})},e}(g),wr=n(15),_r=n(14),Sr=n(4),Mr=function(){var t,e=[],n=[],r=1,i=1,o={},a=!1,u=function(t){var r=e.length,i=0,o=e[t].x-n[t].x,a=n[t].y-e[t].y,u=Math.sqrt(o*o+a*a);u>0&&(i+=.2*u),a/=u,i+=(o/=u)>0&&a>0?0:o<0&&a>0?3:o<0&&a<0?6:9;for(var s,c,f,d,h=e[t].x,p=e[t].y-e[t].height+2,g=e[t].x+e[t].width,m=e[t].y+2,y=0;yr&&(e[c].x=l),e[c].x<0&&(e[c].x=l),e[c].y>i&&(e[c].y=f),e[c].y<0&&(e[c].y=f);var d=(a?t(c,e,n):u(c))-s;Math.random()r&&(e[c].x=l),e[c].x<0&&(e[c].x=l),e[c].y>i&&(e[c].y=f),e[c].y<0&&(e[c].y=f);var y=(a?t(c,e,n):u(c))-s;Math.random()1||c<0||c>1)},f=function(t,e,n){return t-e/n};return o.start=function(t){for(var n=e.length,r=1,i=0;i0){var o=r[i[0]].toLowerCase();e=n[o]}return e},e.prototype._highlightArea=function(t){var e=this,n=this.config.options.container,r=this.contourToFill;n.selectAll(".map-contour-"+r).classed("map-contour-highlighted",function(n){return t(e._resolveFeature(n))})},e.prototype._highlightPoint=function(t){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(e){var n=e.data;return t(n)}).attr("opacity",function(e){var n=e.data;return t(n)?.5:.1})},e.prototype._createProjection=function(t,e,n){var r=this.W,i=this.H,o=this.config.guide,a=100,u=[r/2,i/2],s=n||t.center,c=o.projection||t.projection||"mercator",l=this._createD3Projection(c,s,a,u),f=Ar.geoPath().projection(l).bounds(Sr.feature(t,t.objects[e])),d=a*r/(f[1][0]-f[0][0]),h=a*i/(f[1][1]-f[0][1]);return a=d=0},Fr=function(t,e){return!t.discrete&&e[t.dim]<0},Rr=function(t,e){return t.w(e)/2+Math.floor(t.model.size(e)/Pr(t,e))},Dr=function(t,e){return t.h(e)/2+Math.floor(t.model.size(e)/Pr(t,e))},Ir=function(t){return function(e){return{dx:function(n){var r=e.model.scaleY;if("+"===t[2]&&!zr(r,n))return e.dx(n);if("-"===t[2]&&!Fr(r,n))return e.dx(n);var i=t[1],o=t[0]===t[0].toUpperCase()?1:0;return e.dx(n)+i*o*e.model.size(n)/2+i*Rr(e,n)}}}},Br=function(t){return function(e){return{dy:function(n){var r=e.model.scaleY;if("+"===t[2]&&!zr(r,n))return e.dy(n);if("-"===t[2]&&!Fr(r,n))return e.dy(n);var i=t[1],o=t[0]===t[0].toUpperCase()?1:0;return e.dy(n)+i*o*e.model.size(n)/2+i*Dr(e,n)}}}};Lr.regRule("l",Ir(["l",-1,null])).regRule("L",Ir(["L",-1,null])).regRule("l+",Ir(["l",-1,"+"])).regRule("l-",Ir(["l",-1,"-"])).regRule("L+",Ir(["L",-1,"+"])).regRule("L-",Ir(["L",-1,"-"])).regRule("r",Ir(["r",1,null])).regRule("R",Ir(["R",1,null])).regRule("r+",Ir(["r",1,"+"])).regRule("r-",Ir(["r",1,"-"])).regRule("R+",Ir(["R",1,"+"])).regRule("R-",Ir(["R",1,"-"])).regRule("t",Br(["t",-1,null])).regRule("T",Br(["T",-1,null])).regRule("t+",Br(["t",-1,"+"])).regRule("t-",Br(["t",-1,"-"])).regRule("T+",Br(["T",-1,"+"])).regRule("T-",Br(["T",-1,"-"])).regRule("b",Br(["b",1,null])).regRule("B",Br(["B",1,null])).regRule("b+",Br(["b",1,"+"])).regRule("b-",Br(["b",1,"-"])).regRule("B+",Br(["B",1,"+"])).regRule("B-",Br(["B",1,"-"])).regRule("rotate-on-size-overflow",function(t,e){var n=e.data,r=e.lineBreakAvailable,i={};if(n.reduce(function(e,n){return e+(function(e){return t.model.size(e).5){var o=r?-.5:.5;i={angle:function(){return-90},w:function(e){return t.h(e)},h:function(e){return t.w(e)},dx:function(e){return t.h(e)*o-2},dy:function(){return 0}}}return i}).regRule("hide-by-label-height-vertical",function(t){return{hide:function(e){var n,r;return 0===t.angle(e)?(r=t.h(e),n=Math.abs(t.model.y0(e)-t.model.yi(e))):(r=t.w(e),n=t.model.size(e)),r>n||t.hide(e)}}}).regRule("cut-label-vertical",function(t){return{h:function(e){var n=t.h(e);if(Math.abs(t.angle(e))>0){var r=Math.abs(t.model.y0(e)-t.model.yi(e));return r0){var i=t.model.y0(e)=0?1:-1}(t,n)*e(t,n)};return t.model.flip?{dx:n}:{dy:n}}).regRule("inside-start-then-outside-end-horizontal",function(t,e){var n=[Lr.getRule("from-beginning"),Lr.getRule("towards"),Lr.getRule("cut-label-horizontal")].reduce(function(t,n){return Cr.compose(t,n(t,e))},t),r=[Lr.getRule("to-end"),Lr.getRule("towards"),Lr.getRule("cut-outer-label-horizontal")].reduce(function(t,n){return Cr.compose(t,n(t,e))},t);return Object.assign({},n,["x","dx","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return n.label(t).length>=r.label(t).length}(t)?n:r)[e](t)},t},{}))}).regRule("inside-start-then-outside-end-vertical",function(t,e){var n=[Lr.getRule("from-beginning"),Lr.getRule("towards"),Lr.getRule("cut-label-vertical")].reduce(function(t,n){return Cr.compose(t,n(t,e))},t),r=[Lr.getRule("to-end"),Lr.getRule("towards"),Lr.getRule("cut-outer-label-vertical")].reduce(function(t,n){return Cr.compose(t,n(t,e))},t);return Object.assign({},n,["y","dy","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return n.label(t).length>=r.label(t).length}(t)?n:r)[e](t)},t},{}))}).regRule("outside-then-inside-horizontal",function(t,e){var n=["r+","l-","cut-outer-label-horizontal"].map(Lr.getRule).reduce(function(t,n){return Cr.compose(t,n(t,e))},t),r=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(Lr.getRule).reduce(function(t,n){return Cr.compose(t,n(t,e))},t);return Object.assign({},n,["x","dx","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return r.label(t).length>n.label(t).length}(t)?r:n)[e](t)},t},{}))}).regRule("outside-then-inside-vertical",function(t,e){var n=["t+","b-","cut-outer-label-vertical"].map(Lr.getRule).reduce(function(t,n){return Cr.compose(t,n(t,e))},t),r=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(Lr.getRule).reduce(function(t,n){return Cr.compose(t,n(t,e))},t);return Object.assign({},n,["y","dy","hide","label"].reduce(function(t,i){return t[i]=function(t){return(function(t){var r=n.y(t,e)+n.dy(t,e);return r<=0||r>=e.maxHeight}(t)?r:n)[i](t,e)},t},{}))}).regRule("hide-by-label-height-horizontal",function(t){return{hide:function(e){return t.model.size(e)0)return r+u;var s=a-n;return s>0?r-s:r},dy:function(e){var n=t.dy(e),i=t.y(e)+n,o=t.h(e),a=i+o/2;if(0-(i-o/2)>0)return 0;var u=a-r;return u>0?n-u:n}}}).regRule("multiline-label-left-align",function(t){return{dy:function(e){var n=t.dy(e);return-90===t.angle(e)?n+t.h(e)/2:n}}}).regRule("multiline-label-vertical-center-align",function(t){return{dy:function(e){return t.dy(e)-t.h(e)/2}}}).regRule("multiline-hide-on-container-overflow",function(t,e){var n=e.maxWidth,r=e.maxHeight;return{hide:function(e){var i=t.angle(e),o=t.x(e)+t.dx(e),a=t.y(e)+t.dy(e);return!(!Bt(o,t.w(e),i,n)&&!Wt(a,t.h(e),i,r))||t.hide(e)}}});var Wr=function(){function t(t){this.minError=Number.MAX_VALUE,this.items=t.items,this.revision=this.items.map(function(t){return{i:t.i,x:t.x,y:t.y}}),this.penalties=t.penalties,this.transactor=t.transactor,this.cooling_schedule=t.cooling_schedule||function(t,e,n){return t-e/n}}return t.prototype.energy=function(t){return this.penalties.reduce(function(e,n){return e+n(t)},0)},t.prototype.move=function(t){var e=Math.floor(Math.random()*this.items.length),n=this.transactor(this.items[e]),r=this.energy(e);this.items[e]=n.modify();var i=this.energy(e),o=i-r,a=o<0?1:Math.exp(-o/t);Math.random()>=a?this.items[e]=n.revert():i0&&d.length>0?this.autoPosition(l,d):l;var h=f.reduce(function(t,e){return Object.assign(t,((n={})[e]=!0,n));var n},{});l.text=l.text=h["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(l.text,s):l.text,l.text=l.text=h["auto:adjust-on-multiline-label-overflow"]?this.adjustOnMultilineOverflow(l.text,s):l.text,l.text=h["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(l.text,l.edges):l.text,l.text=h["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(l.text):l.text,l.text=h["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(l.text):l.text;var p=l.text,g=function(t){return function(e,n){return p[n][t]}},m=g("x"),y=g("y"),v=g("angle"),b=g("color"),x=g("label"),w=function(t){if(t.style("fill",b).style("font-size",e.guide.fontSize+"px").style("display",function(t,e){return p[e].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(t,e){return"translate("+m(t,e)+","+y(t,e)+") rotate("+v(t,e)+")"}),i){t.each(function(t,e){var n=a.select(this),r=v(t,e);n.text(null),x(t,e).split(o).forEach(function(t,e){n.append("tspan").attr("text-anchor",0!==r?"start":"middle").attr("x",0).attr("y",0).attr("dy",1.2*(e+1)+"em").text(t)})})}else t.text(x)};r.hideEqualLabels&&p.filter(function(t){return!t.hide}).filter(function(t,e,n){return e0&&(t.hide=!0)}),t},t.prototype.hideOnLabelLabelOverlap=function(t){var e=this,n={min:0,max:1,norm:2},r={"min/min":function(t,e){return e.y-t.y},"max/max":function(t,e){return t.y-e.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(t,e){return t.y-e.y}};return t.filter(function(t){return!t.hide}).sort(function(t,e){return n[t.extr]-n[e.extr]}).forEach(function(i){t.forEach(function(t){i.i!==t.i&&function(t,i){var o=e.getLabelRect(t),a=e.getLabelRect(i),u=Number(!t.hide&&!i.hide);if(u*Math.max(0,Math.min(a.x1,o.x1)-Math.max(o.x0,a.x0))*(u*Math.max(0,Math.min(a.y1,o.y1)-Math.max(o.y0,a.y0)))>0){var s=[t,i];s.sort(function(t,e){return n[t.extr]-n[e.extr]}),(r[s[0].extr+"/"+s[1].extr](s[0],s[1])<0?s[0]:s[1]).hide=!0}}(i,t)})}),t},t.prototype.getLabelRect=function(t,e){return void 0===e&&(e=0),{x0:t.x-t.w/2-e,x1:t.x+t.w/2+e,y0:t.y-t.h/2-e,y1:t.y+t.h/2+e}},t.prototype.getPointRect=function(t,e){return void 0===e&&(e=0),{x0:t.x-t.size/2-e,x1:t.x+t.size/2+e,y0:t.y-t.size/2-e,y1:t.y+t.size/2+e}},t.prototype.hideOnLabelAnchorOverlap=function(t){var e=this,n=function(t,n){var r=e.getLabelRect(t,2),i=e.getPointRect(n,2);return Math.max(0,Math.min(i.x1,r.x1)-Math.max(i.x0,r.x0))*Math.max(0,Math.min(i.y1,r.y1)-Math.max(i.y0,r.y0))>.001};return t.filter(function(t){return!t.hide}).forEach(function(e){for(var r=t.length,i=0;ir.right+s||ur.bottom+s)return null;var c=(i.find(a,u)||[]).map(function(t){var e=Math.sqrt(Math.pow(a-t.x,2)+Math.pow(u-t.y,2));if(e>s)return null;var n=ee.size)+" 1",n.left[0].x+","+n.left[0].y,"Z"].join(" "):ni(t.size>e.size?t:e)}function ii(t,e,n,r){var i=function(t,e,n,r){var i=ui(t,r);if(0===i||i+t.size/2<=r.size/2||i+r.size/2<=t.size/2)return null;var o=function(i){var o=i?[r,n,e,t]:[t,e,n,r],a=ci.apply(void 0,[1/12*2].concat(o)),u=ci.apply(void 0,[.5].concat(a.slice(0,4))),s=u[3],c=u[6],l=fi(o[0],s),f=fi(s,c),d=[l.left[0],A(.5,l.left[1],f.left[0]),f.left[1]],h=[l.right[0],A(.5,l.right[1],f.right[0]),f.right[1]],p=li.apply(void 0,d)[1],g=li.apply(void 0,h)[1],m=A(4,l.left[0],p),y=A(4,l.right[0],g);return{left:i?[y,h[0]]:[d[0],m],right:i?[m,d[0]]:[h[0],y]}},a=o(!1),u=o(!0);return{left:a.left.concat(u.left),right:a.right.concat(u.right)}}(t,e,n,r);if(!i)return ri(t,r);var o=ai(oi(t,i.right[0]),oi(t,i.left[0])),a=ai(oi(r,i.right[1]),oi(r,i.left[1]));return["M"+i.left[0].x+","+i.left[0].y,"C"+i.left[1].x+","+i.left[1].y,i.left[2].x+","+i.left[2].y,i.left[3].x+","+i.left[3].y,"A"+r.size/2+","+r.size/2+" 0 "+Number(o>Math.PI)+" 1",i.right[3].x+","+i.right[3].y,"C"+i.right[2].x+","+i.right[2].y,i.right[1].x+","+i.right[1].y,i.right[0].x+","+i.right[0].y,"A"+t.size/2+","+t.size/2+" 0 "+Number(a>Math.PI)+" 1",i.left[0].x+","+i.left[0].y,"Z"].join(" ")}function oi(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}function ai(t,e){return e1?[t]:[]},d);f.exit().remove(),f.call(u(n.animationSpeed,o.pathAttributesUpdateInit,o.pathAttributesUpdateDone,o.afterPathUpdate));f.enter().append(o.pathElement).call(u(n.animationSpeed,o.pathAttributesEnterInit,o.pathAttributesEnterDone,o.afterPathUpdate)).merge(f).call(function(t){e.guide.animationSpeed>0&&!document.hidden?(t.attr(o.pathTween.attr,function(t){return o.pathTween.fn.call(this,t)(0)}),Z(t,e.guide.animationSpeed,"pathTransition").attrTween(o.pathTween.attr,o.pathTween.fn)):t.attr(o.pathTween.attr,function(t){return o.pathTween.fn.call(this,t)(1)})});if(t.subscribe(l),"never"!==n.showAnchors){var h=function(t,e,n){var r=e.anchorShape,i=t.config.guide,o=t.screenModel,a=di({},hi[r].getInitialAttrs(t,e),{opacity:"hover"===i.showAnchors?0:1,fill:function(t){return o.color(t)},class:"i-data-anchor"}),u=n.selectAll(".i-data-anchor").data(function(t){return t.filter(Zr)},o.id);return u.exit().remove(),u.call(rt(i.animationSpeed,null,a)),u.enter().append(hi[e.anchorShape].element).call(rt(i.animationSpeed,{r:0},a)).merge(u)}(t,o,r);t.subscribe(h)}},c=i.toFibers(),l=c.map(function(t){return t.filter(Zr)}),f=r.container.selectAll(".frame"),d=function(){var t=f.empty()?[]:f.data(),e=new Map;f.each(function(t){e.set(t,Number(this.getAttribute("data-id")))});var n=t.reduce(function(t,e){return t.set(e,e.map(i.id)),t},new Map),r=new Map,o=Math.max.apply(Math,[0].concat(Array.from(e.values())));return function(t){if(r.has(t))return r.get(t);var a,u=t.map(function(t){return i.id(t)}),s=(Array.from(n.entries()).find(function(t){var e=t[1];return u.some(function(t){return e.some(function(e){return e===t})})})||[null])[0];return a=s?e.get(s):++o,r.set(t,a),a}}();this._getDataSetId=d;var h=f.data(c,d);h.exit().remove(),h.call(s),h.enter().append("g").attr("data-id",d).call(s),h.order(),this._boundsInfo=this._getBoundsInfo(r.container.selectAll(".i-data-anchor").nodes()),t.subscribe(new Xr(i.model,e.flip,e.guide.label,r).draw(l))},_getBoundsInfo:function(t){if(0===t.length)return null;var e=this.node().screenModel,n=this.node().config.flip,r=t.map(function(t){var n=a.select(t).data()[0];return{node:t,data:n,x:e.x(n),y:e.y(n)}}).filter(function(t){return!isNaN(t.x)&&!isNaN(t.y)}),i=r.reduce(function(t,e){var n=e.x,r=e.y;return t.left=Math.min(n,t.left),t.right=Math.max(n,t.right),t.top=Math.min(r,t.top),t.bottom=Math.max(r,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),o=Ht(r.map(n?function(t){return t.y}:function(t){return t.x})).sort(function(t,e){return t-e}),u=o.reduce(function(t,e){return t[e]=[],t},{});r.forEach(function(t){var e=o.find(n?function(e){return t.y===e}:function(e){return t.x===e});u[e].push(t)});var s=function(t){if(1===t.length)return u[t[0]];var e=Math.ceil(t.length/2);return{middle:(t[e-1]+t[e])/2,lower:s(t.slice(0,e)),greater:s(t.slice(e))}};return{bounds:i,tree:s(o)}},getClosestElement:function(t,e){if(!this._boundsInfo)return null;var n=this._boundsInfo,r=n.bounds,i=n.tree,o=this.node().config.options.container,a=this.node().config.flip,u=Ne(o.node()),s=this.node().config.guide.maxHighlightDistance;if(tr.right+u.x+s||er.bottom+u.y+s)return null;var c=a?e-u.y:t-u.x,l=function t(e){return Array.isArray(e)?e:t(c>e.middle?e.greater:e.lower)}(i).map(function(n){var r=n.x+u.x,i=n.y+u.y,o=Math.abs(a?e-i:t-r),s=Math.abs(a?t-r:e-i);return{node:n.node,data:n.data,distance:o,secondaryDistance:s,x:r,y:i}});return pi(t,e,l)},highlight:function(t){var e=this.node().config.options.container,n="tau-chart__highlighted",r="tau-chart__dimmed",i=e.selectAll(".i-role-path"),o=i.data().filter(function(e){return e.filter(Zr).some(t)}),a=o.length>0;i.call(ut(((u={})[n]=function(t){return a&&o.indexOf(t)>=0},u[r]=function(t){return a&&o.indexOf(t)<0},u)));var u,s,c=((s={})[n]=function(e){return!0===t(e)},s[r]=function(e){return!1===t(e)},s);e.selectAll(".i-role-dot").call(ut(c)),e.selectAll(".i-role-label").call(ut(c)),this._sortElements(t)},highlightDataPoints:function(t){var e=this.node(),n=function(t,e,n){var r=e.anchorShape,i=t.screenModel,o="hover"===t.config.guide.showAnchors;return t.config.options.container.selectAll(".i-data-anchor").call(at(hi[r].getHighlightAttrs(t,e,n))).attr("opacity",o?function(t){return n(t)?1:0}:function(){return 1}).attr("fill",function(t){return i.color(t)}).attr("class",function(t){return Me("i-data-anchor",i.class(t))}).classed(We+"highlighted",n)}(e,this.domElementModel,t),r=e.config.options.container,i=e.config.flip,o=n.filter(t),a=r.select(".cursor-line");if(o.empty())a.remove();else{a.empty()&&(a=r.append("line"));var u=e.screenModel.model,s=u.xi(o.data()[0]),c=u.xi(o.data()[0]),l=u.scaleY.domain(),f=u.scaleY(l[0]),d=u.scaleY(l[1]);a.attr("class","cursor-line").attr("x1",i?f:s).attr("y1",i?s:f).attr("x2",i?d:c).attr("y2",i?c:d)}this._sortElements(t)},_sortElements:function(t){var e=this.node().config.options.container,n=new Map,r=new Map,i=this._getDataSetId;e.selectAll(".i-role-path").each(function(e){n.set(this,i(e)),r.set(this,e.filter(Zr).some(t))});var o=Jt(function(t,e){return r.get(t)-r.get(e)},function(t,e){return n.get(t)-n.get(e)}),a={line:0,g:1,text:2};Se(e.node(),function(t,e){return"g"===t.tagName&&"g"===e.tagName?o(t,e):a[t.tagName]-a[e.tagName]})}},yi=[1,2,3,4,5],vi=yi.map(function(t){return We+"line-opacity-"+t}),bi=yi.map(function(t){return We+"line-width-"+t});function xi(t){return vi[t-1]||vi[4]}function wi(t,e){return t.length<2?"":String.prototype.concat.apply("",t.concat(e.slice().reverse()).map(function(t,e){return(0===e?"":" ")+t.x+","+t.y}))}function _i(t,e){if(t.length<2)return"";var n=function(t){var e=t.map(function(t,e){return""+((e-1)%3==0?"C":"")+t.x+","+t.y+" "});return String.prototype.concat.apply("",e)};return"M"+n(t)+"L"+n(e.slice().reverse())+"Z"}var Si=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&(n=Si.rgb(n).darker(1)),n}};e.pathAttributesEnterInit=o,e.pathAttributesUpdateDone=o;var a="polyline"===Y(n.interpolate);return e.pathElement=a?"polygon":"path",e.anchorShape="vertical-stick",e.pathTween={attr:a?"points":"d",fn:ot(0,a?wi:_i,[function(n){return{id:t.id(n),x:e.x(n),y:e.y(n)}},function(n){return{id:t.id(n),x:e.x0(n),y:e.y0(n)}}],t.id,n.interpolate)},e},_getBoundsInfo:function(t){if(0===t.length)return null;var e,n,r=this.node().screenModel,i=this.node().config.flip,o=t.map(function(t){var e=Si.select(t).data()[0];return{node:t,data:e,x:r.x(e),y:r.y(e),y0:r.y0(e),group:r.group(e)}}),a=o.reduce(function(t,e){var n=e.x,r=e.y,i=e.y0;return t.left=Math.min(n,t.left),t.right=Math.max(n,t.right),t.top=Math.min(r,i,t.top),t.bottom=Math.max(r,i,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),u=Ht(o.map(i?function(t){return t.y}:function(t){return t.x})).sort(function(t,e){return t-e}),s=u.reduce(function(t,e){return t[e]=[],t},{});if(o.forEach(function(t){var e=u.find(i?function(e){return t.y===e}:function(e){return t.x===e});s[e].push(t)}),e=Object.keys(o.reduce(function(t,e){return t[e.group]=!0,t},{})),n=e.reduce(function(t,e,n){return t[e]=n,t},{}),u.forEach(function(t){var r=s[t];if(r.sort(function(t,e){return n[t.group]-n[e.group]}),r.lengthr.right+u.x+s||er.bottom+u.y+s)return null;var c=a?e-u.y:t-u.x,l=function t(e){if(e.isLeaf)return e;var n=e.left.end;return t(c1&&(f=1);var d,h=(d=l.items.start.reduce(function(t,e){return t[e.group]={start:e,end:null,y:null,y0:null},t},{}),l.items.end.forEach(function(t){void 0!==d[t.group]?d[t.group].end=t:delete d[t.group]}),Object.keys(d).forEach(function(t){var e=d[t];e.end?(e.y=e.start.y+f*(e.end.y-e.start.y),e.y0=e.start.y0+f*(e.end.y0-e.start.y0)):delete d[t]}),Object.keys(d).map(function(t){return d[t]}).map(function(t){return{y:t.y,y0:t.y0,el:f<.5?t.start:t.end}}).filter(function(t){return null!=t.el.data})),p=e-u.y,g=h.filter(function(t){return p>=t.y&&p<=t.y0}),m=(g.length>0?g:h).map(function(t){return t.el}).map(function(n){var r=n.x+u.x,i=n.y+u.y,o=Math.abs(a?e-i:t-r),s=Math.abs(a?t-r:e-i);return{node:n.node,data:n.data,distance:o,secondaryDistance:s,x:r,y:i}});return pi(t,e,m)}},Oi={draw:mi.draw,getClosestElement:mi.getClosestElement,highlight:mi.highlight,highlightDataPoints:mi.highlightDataPoints,addInteraction:mi.addInteraction,_getBoundsInfo:mi._getBoundsInfo,_sortElements:mi._sortElements,init:function(t){var e=mi.init(t);return e.transformRules=[e.flip&&S.get("flip")],e.adjustRules=[function(t,n){var r=t.scaleSize.isEmptyScale(),i=Yt(e.guide.size||{},{defMinSize:2,defMaxSize:r?6:40}),o=Object.assign({},n,{defMin:i.defMinSize,defMax:i.defMaxSize,minLimit:i.minSize,maxLimit:i.maxSize});return S.get("adjustStaticSizeScale")(t,o)}],e},buildModel:function(t){var e=mi.baseModel(t),n=this.node().config.guide,r=xi(t.model.scaleColor.domain().length),i=We+"area area i-role-path "+r+" "+n.cssClass+" ";e.groupAttributes={class:function(t){return i+" "+e.class(t[0])+" frame"}};var o,a,u={fill:function(t){return e.color(t[0])},stroke:function(t){return e.color(t[0])}};return e.pathAttributesEnterInit=u,e.pathAttributesUpdateDone=u,e.pathElement="polygon",e.anchorShape="circle",e.pathTween={attr:"points",fn:ot(0,(o=function(t){return t.x},a=function(t){return t.y},function(t){return t.map(function(t){return[o(t),a(t)].join(",")}).join(" ")}),[function(n){return{id:t.id(n),x:e.x(n),y:e.y(n)}}],t.id)},e}};function Ai(t){if(t.length<2)return"";for(var e="",n=0;n=160&&e<320?n=1:e>=320&&e<480?n=2:e>=480&&e<640?n=3:e>=640&&(n=4),bi[n]):"",s=xi(t.model.scaleColor.domain().length),c=a?"line":"area",l=""+We+c+" "+c+" i-role-path "+u+" "+s+" "+i.cssClass+" ",f=a?{stroke:function(t){return h.color(t[0])},class:"i-role-datum"}:{fill:function(t){return h.color(t[0])}},d="cubic"===Y(i.interpolate)?a?ki:ei:a?Ai:ti,h=mi.baseModel(t),p=a?function(e){return{id:t.id(e),x:h.x(e),y:h.y(e)}}:function(e){return{id:t.id(e),x:h.x(e),y:h.y(e),size:h.size(e)}};return h.groupAttributes={class:function(t){return l+" "+h.class(t[0])+" frame"}},h.pathElement="path",h.anchorShape="circle",h.pathAttributesEnterInit=f,h.pathAttributesUpdateDone=f,h.pathTween={attr:"d",fn:ot(0,d,[p],t.id,i.interpolate)},h}},Ei=function(t){return a.select(t).data()[0]},Ci={init:function(t){var e=Object.assign({},t);e.guide=e.guide||{},e.guide=Yt(e.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=e.guide.enableColorToBarPosition?e.guide.enableColorToBarPosition:!e.stack}),e.guide.size=Yt(e.guide.size||{},{enableDistributeEvenly:!0}),e.guide.label=Yt(e.guide.label||{},{position:e.flip?e.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:e.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var n=e.guide.avoidScalesOverflow,r=e.guide.enableColorToBarPosition,i=e.guide.size.enableDistributeEvenly;return e.transformRules=[e.flip&&S.get("flip"),e.guide.obsoleteVerticalStackOrder&&S.get("obsoleteVerticalStackOrder"),e.stack&&S.get("stack"),r&&S.get("positioningByColor")].filter(function(t){return t}),e.adjustRules=[i&&function(t,n){var r=Yt(e.guide.size||{},{defMinSize:e.guide.prettify?3:0,defMaxSize:e.guide.prettify?40:Number.MAX_VALUE}),i=Object.assign({},n,{defMin:r.defMinSize,defMax:r.defMaxSize,minLimit:r.minSize,maxLimit:r.maxSize});return S.get("size_distribute_evenly")(t,i)},n&&i&&function(t,e){var n=Object.assign({},e,{sizeDirection:"x"});return S.get("avoidScalesOverflow")(t,n)},e.stack&&S.get("adjustYScale")].filter(function(t){return t}),e},addInteraction:function(){var t=this,e=this.node();e.on("highlight",function(e,n){return t.highlight(n)}),e.on("data-hover",function(e,n){return t.highlight((r=n.data,i=null,function(t){return t===r||i}));var r,i})},draw:function(){var t=this.node(),e=t.config,n=e.options;n.container=n.slot(e.uid);var r=e.guide.prettify,i="i-role-element i-role-datum bar "+We+"bar",o=t.screenModel,u=this.buildModel(o,{prettify:r,minBarH:1,minBarW:1,baseCssClass:i}),s=rt,c=e.flip?"y":"x",l=e.flip?"x":"y",f=e.flip?"width":"height",d=e.flip?"height":"width",h=o.toFibers(),p=h.reduce(function(t,e){return t.concat(e)},[]),g=u.class,m=Vt(u,"class"),y=n.container.selectAll(".bar").data(p,o.id);y.exit().classed("tau-removing",!0).call(s(e.guide.animationSpeed,null,((w={})[c]=function(){var t=a.select(this);return t.attr(c)-0+(t.attr(d)-0)/2},w[l]=function(){return this.getAttribute("data-zero")},w[d]=0,w[f]=0,w),function(t){var e=a.select(t);e.classed("tau-removing")&&e.remove()})),y.call(s(e.guide.animationSpeed,null,m));var v=y.enter().append("rect").call(s(e.guide.animationSpeed,(_={},_[l]=o[l+"0"],_[f]=0,_),m)).merge(y).attr("class",g).attr("data-zero",o[l+"0"]);t.subscribe(new Xr(o.model,o.model.flip,e.guide.label,n).draw(h));var b,x=(b=p.reduce(function(t,e,n){return t.set(e,n+1),t},new Map),function(t,e){return(b.get(Ei(t))||-1)-(b.get(Ei(e))||-1)});this._barsSorter=e.guide.sortByBarHeight?e.flip?function(t,e){var n=Ei(t),r=Ei(e),i=u.width(n),o=u.width(r);if(i===o){var a=u.y(n),s=u.y(r);return a===s?x(t,e):a-s}return o-i}:function(t,e){var n=Ei(t),r=Ei(e),i=u.height(n),o=u.height(r);if(i===o){var a=u.x(n),s=u.x(r);return a===s?x(t,e):a-s}return o-i}:x;var w,_,S={rect:0,text:1};this._typeSorter=function(t,e){return S[t.tagName]-S[e.tagName]},this._sortElements(this._typeSorter,this._barsSorter),t.subscribe(v),this._boundsInfo=this._getBoundsInfo(v.nodes())},buildModel:function(t,e){var n,r=e.prettify,i=e.minBarH,o=e.minBarW,a=e.baseCssClass,u=function(e){var n=t.size(e);return r&&(n=Math.max(o,n)),n},s=function(e){return e[t.model.scaleY.dim]};if(t.flip){var c=function(e){return Math.abs(t.x(e)-t.x0(e))};n={y:function(e){return t.y(e)-.5*u(e)},x:function(e){var n=Math.min(t.x0(e),t.x(e));if(r){var o=c(e),a=s(e),u=0;return 0===a&&(u=0),a>0&&(u=o),a<0&&(u=0-i),o0?n-i:n);return n},width:function(t){return u(t)},height:function(t){var e=l(t);return r&&(e=0===s(t)?e:Math.max(i,e)),e}}}return Object.assign(n,{class:function(e){return a+" "+t.class(e)},fill:function(e){return t.color(e)}})},_sortElements:function(){for(var t=[],e=0;eu}}),i=r.reduce(function(t,e){var n=e.box;return t.left=Math.min(n.left,t.left),t.right=Math.max(n.right,t.right),t.top=Math.min(n.top,t.top),t.bottom=Math.max(n.bottom,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),o=Ht(r.map(n?function(t){return t.cy}:function(t){return t.cx})).sort(function(t,e){return t-e}),u=o.reduce(function(t,e){return t[e]=[],t},{});r.forEach(function(t){var e=o.find(n?function(e){return t.cy===e}:function(e){return t.cx===e});u[e].push(t)});var s=function(t){if(1===t.length)return u[t];var e=Math.ceil(t.length/2);return{middle:(t[e-1]+t[e])/2,lower:s(t.slice(0,e)),greater:s(t.slice(e))}};return{bounds:i,tree:s(o)}},getClosestElement:function(t,e){if(!this._boundsInfo)return null;var n=this._boundsInfo,r=n.bounds,i=n.tree,o=this.node().config.options.container,a=this.node().config.flip,u=Ne(o.node()),s=t-u.x,c=e-u.y,l=this.node().config.guide.maxHighlightDistance;if(sr.right+l||cr.bottom+l)return null;var f=a?c:s,d=a?s:c;return function t(e){return Array.isArray(e)?e:t(f>e.middle?e.greater:e.lower)}(i).map(function(t){var e,n=a?t.box.left:t.box.top,r=a?t.box.right:t.box.bottom,i=(e=d)>=n&&e<=r;if(!i&&Math.abs(d-n)>l&&Math.abs(d-r)>l)return null;var o=Math.abs(d-(t.invert!==a?r:n));return Object.assign(t,{distToValue:o,cursorInside:i})}).filter(function(t){return t}).sort(function(t,e){return t.cursorInside!==e.cursorInside?e.cursorInside-t.cursorInside:Math.abs(t.distToValue)-Math.abs(e.distToValue)}).map(function(t){var e=t.cx,n=t.cy,r=Math.abs(a?c-n:s-e),i=Math.abs(a?s-e:c-n);return{node:t.node,data:t.data,distance:r,secondaryDistance:i,x:e,y:n}})[0]||null},highlight:function(t){var e,n=this.node().config.options.container,r=((e={})["tau-chart__highlighted"]=function(e){return!0===t(e)},e["tau-chart__dimmed"]=function(e){return!1===t(e)},e);n.selectAll(".bar").call(ut(r)),n.selectAll(".i-role-label").call(ut(r)),this._sortElements(function(e,n){return t(Ei(e))-t(Ei(n))},this._typeSorter,this._barsSorter)}},Ni=n(12),Li=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ji=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n.config.guide=Yt(n.config.guide||{},{}),n.on("highlight",function(t,e){return n.highlight(e)}),n}return Li(e,t),e.prototype.defineGrammarModel=function(t){var e=this.config,n=e.options;this.color=t("color",e.color,{}),this.scalesMap=e.columns.reduce(function(e,r){return e[r]=t("pos",r,[0,n.height]),e},{});var r=n.width/(e.columns.length-1),i=e.columns.reduce(function(t,e,n){return t[e]=n*r,t},{});return this.xBase=function(t){return i[t]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}},e.prototype.drawFrames=function(t){var e=this.config,n=this.config.options,r=this.scalesMap,i=this.xBase,o=this.color,a=Ni.line(),u=function(t){t.attr("d",function(t){return a(e.columns.map(function(e){return[i(e),r[e](t[r[e].dim])]}))})},s=function(t){t.attr("stroke",function(t){return o.toColor(o(t[o.dim]))}),t.attr("class",function(t){return We+"__line line "+o.toClass(o(t[o.dim]))+" foreground"})},c=function(t){var e=t.selectAll(".background").data(function(t){return t.part()});e.exit().remove(),e.call(u),e.enter().append("path").attr("class","background line").call(u);var n=t.selectAll(".foreground").data(function(t){return t.part()});n.exit().remove(),n.call(function(t){u(t),s(t)}),n.enter().append("path").call(function(t){u(t),s(t)})},l=n.container.selectAll(".lines-frame").data(t,function(t){return t.hash()});l.exit().remove(),l.call(c),l.enter().append("g").attr("class","lines-frame").call(c),this.subscribe(n.container.selectAll(".lines-frame .foreground"))},e.prototype.highlight=function(t){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(e){return t(e)?"":"hidden"})},e}(g),Pi=function(){function t(t,e){var n,r=this;if(this._fields={},Array.isArray(e.fitToFrameByDims)&&e.fitToFrameByDims.length){n=t.part(function(t){var n={};return"where"===t.type&&t.args?(n.type=t.type,n.args=e.fitToFrameByDims.reduce(function(e,n){return t.args.hasOwnProperty(n)&&(e[n]=t.args[n]),e},{})):n=t,n})}else n=t.full();var i=this.getVarSet(n,e);e.order&&(i=Gt(Xt(e.order,i),i)),this.vars=i;var o=i.map(function(t){return t});this.scaleConfig=e,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return r.vars}).addField("isInteger",o.every(Number.isInteger)).addField("originalSeries",function(){return o}).addField("isContains",function(t){return r.isInDomain(t)}).addField("isEmptyScale",function(){return r.isEmpty()}).addField("fixup",function(t){var e=r.scaleConfig;e.__fixup__=e.__fixup__||{},e.__fixup__=Object.assign(e.__fixup__,t(Object.assign({},e,e.__fixup__)))}).addField("commit",function(){r.scaleConfig=Object.assign(r.scaleConfig,r.scaleConfig.__fixup__),delete r.scaleConfig.__fixup__})}return t.prototype.isInDomain=function(t){return this.domain().indexOf(t)>=0},t.prototype.addField=function(t,e){return this._fields[t]=e,this[t]=e,this},t.prototype.getField=function(t){return this._fields[t]},t.prototype.isEmpty=function(){return!Boolean(this._fields.dim)},t.prototype.toBaseScale=function(t,e){var n=this;void 0===e&&(e=null);var r=Object.keys(this._fields).reduce(function(t,e){return t[e]=n._fields[e],t},t);return r.getHash=function(){return Ct([n.vars,e].map(function(t){return JSON.stringify}).join(""))},r.value=r,r},t.prototype.getVarSet=function(t,e){return Ht(e.hasOwnProperty("series")?e.series:t.map(function(t){return t[e.dim]}),"date"===e.dimType?function(t){return new Date(t).getTime()}:function(t){return t})},t}(),zi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._references=n.references,r._refCounter=n.refCounter,r.addField("scaleType","identity"),r}return zi(e,t),e.prototype.create=function(){var t=this._references,e=this._refCounter;return this.toBaseScale(function(n,r){if(null==n){var i=t.get(r);null==i&&(i=e(),t.set(r,i))}else i=n;return i})},e}(Pi),Ri=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Di=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var h=Math.max.apply(Math,u.map(Math.abs));u=[-h,h]}r.vars=u}return r.addField("scaleType","color").addField("discrete",i).addField("brewer",o).addField("toColor",zt).addField("toClass",Ft),r}return Ri(e,t),e.prototype.create=function(){var t=this.discrete,e=this.vars,n=this.getField("brewer"),r=t?this.createDiscreteScale(e,n):this.createContinuesScale(e,n);return this.toBaseScale(r)},e.prototype.createDiscreteScale=function(t,e){var n,r=function(t,e){var n=t.map(function(t){return String(t).toString()});return Di.scaleOrdinal().range(e).domain(n)},i=function(t){return function(e){return t(String(e).toString())}};if(Array.isArray(e))n=i(r(t,e));else if("function"==typeof e)n=function(n){return e(n,i(r(t,It(20).map(function(t){return"color20-"+(1+t)}))))};else{if(!Ot(e))throw new Error("This brewer is not supported");n=function(t,e){var n=Object.keys(t),r=n.map(function(e){return t[e]}),i=Di.scaleOrdinal().range(r).domain(n);return function(n){return t.hasOwnProperty(n)?i(String(n)):e(n)}}(e,function(){return"color-default"})}return n},e.prototype.createContinuesScale=function(t,e){if(!Array.isArray(e))throw new Error("This brewer is not supported");return Di.scaleLinear().domain(Pt(t.map(function(t){return t-0}),e.length)).range(e)},e}(Pi),Bi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wi={sqrt:function(t){return Math.sqrt(t)},linear:function(t){return t}},Ui=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=r.scaleConfig,o=u.extent(r.vars),a=Number.isFinite(i.min)?i.min:o[0],s=Number.isFinite(i.max)?i.max:o[1];return r.vars=[Math.min.apply(Math,[a,o[0]].filter(Number.isFinite)),Math.max.apply(Math,[s,o[1]].filter(Number.isFinite))],r.addField("scaleType","size"),r.addField("funcType",n.func||"sqrt"),r}return Bi(e,t),e.prototype.isInDomain=function(t){var e=this.domain().sort(),n=e[0],r=e[e.length-1];return!Number.isNaN(n)&&!Number.isNaN(r)&&t<=r&&t>=n},e.prototype.create=function(){var t,e=this.scaleConfig,n=this.vars,r=Yt({},e,{func:"sqrt",minSize:0,maxSize:1}),i=r.func,o=r.minSize,a=r.maxSize,u=Wi[i],s=n.filter(function(t){return Number.isFinite(Number(t))});if(0===s.length)t=function(){return a};else{var c,l,f=Math.min.apply(Math,s),d=Math.max.apply(Math,s),h=u(Math.max(Math.abs(f),Math.abs(d),d-f));l=f<0?f:0,c=0===h?1:(a-o)/h,t=function(t){var e=null!==t?parseFloat(t):0;return Number.isFinite(e)?o+u(e-l)*c:a}}return this.toBaseScale(t)},e}(Pi),Hi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),qi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.addField("scaleType","ordinal").addField("discrete",!0),r}return Hi(e,t),e.prototype.create=function(t){var e=this.scaleConfig,n=this.vars,r=s.scalePoint().domain(n).range(t).padding(.5),i=Math.max.apply(Math,t),o=function(t){return"function"==typeof e.ratio?e.ratio(t,i,n):"object"==typeof e.ratio?e.ratio[t]:1/n.length},a=function(t){return e.ratio?i-n.slice(n.indexOf(t)+1).reduce(function(t,e){return t+i*o(e)},i*o(t)*.5):r(t)};return Object.keys(r).forEach(function(t){return a[t]=r[t]}),a.stepSize=function(t){return o(t)*i},this.toBaseScale(a,t)},e}(Pi),Gi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xi=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0},e.prototype.create=function(t){var e=this.periodGenerator,n=this.vars,r=this.vars.map(function(t){return t.getTime()}),i=this.scaleConfig,o=Xi.scalePoint().domain(n).range(t).padding(.5),a=Xi.scalePoint().domain(r.map(String)).range(t).padding(.5),u=Math.max.apply(Math,t),s=function(t){var e=new Date(t).getTime();return"function"==typeof i.ratio?i.ratio(e,u,r):"object"==typeof i.ratio?i.ratio[e]:1/n.length},c=function(t){var n=new Date(t),o=(e?e.cast(n):n).getTime();return i.ratio?u-r.slice(r.indexOf(o)+1).reduce(function(t,e){return t+u*s(e)},u*s(t)*.5):a(String(o))};return Object.keys(o).forEach(function(t){return c[t]=o[t]}),c.stepSize=function(t){return s(t)*u},this.toBaseScale(c,t)},e}(Pi),Vi=n(11),$i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ji=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=r},e.prototype.create=function(t){var e=this,n=this.vars,r=this.scaleConfig.utcTime,i=this.periodGenerator,o=(r?Ji.scaleUtc:Ji.scaleTime)().domain(n).range(t),a=function(t){var e=n[0],r=n[1];return t>r&&(t=r),t=i&&t<=o});return function(t,e,n){void 0===n&&(n=10);var r,i,o=Number(t[0]),a=Number(t[1]),u=Math.abs(a-o)/n,s=Ji.bisector(function(t){return t.duration}).right(eo,u);if(s===eo.length)r=e?Ji.utcYear:Ji.timeYear,i=Ji.tickStep(o/to.year.duration,a/to.year.duration,n);else if(s){var c=u/eo[s-1].duration,l=eo[s].duration/u,f=eo[cl&&(e=l),o(e)}}return Object.keys(o).forEach(function(t){return a[t]=o[t]}),a.stepSize=function(){return 0},this.toBaseScale(a,t)},e}(Pi);function Zi(t){return Ji["time"+t[0].toUpperCase()+t.slice(1)]}var Qi,to={second:{duration:1e3,interval:Ji.timeSecond,utc:Ji.utcSecond},minute:{duration:6e4,interval:Ji.timeMinute,utc:Ji.utcMinute},hour:{duration:36e5,interval:Ji.timeHour,utc:Ji.utcHour},day:{duration:864e5,interval:Ji.timeDay,utc:Ji.utcDay},week:{duration:6048e5,interval:Ji.timeWeek,utc:Ji.utcWeek},month:{duration:2592e6,interval:Ji.timeMonth,utc:Ji.utcMonth},year:{duration:31536e6,interval:Ji.timeYear,utc:Ji.utcYear}},eo=[(Qi=function(t,e){return{time:t,step:e,duration:e*t.duration}})(to.second,1),Qi(to.second,5),Qi(to.second,15),Qi(to.second,30),Qi(to.minute,1),Qi(to.minute,5),Qi(to.minute,15),Qi(to.minute,30),Qi(to.hour,1),Qi(to.hour,3),Qi(to.hour,6),Qi(to.hour,12),Qi(to.day,1),Qi(to.day,2),Qi(to.week,1),Qi(to.month,1),Qi(to.month,3),Qi(to.year,1)];var no=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ro=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n},e.prototype.create=function(t){var e=this.vars,n=this.extendScale(ro.scaleLinear());return n.domain(e).range(t).clamp(!0),this.toBaseScale(n,t)},e.prototype.extendScale=function(t){var e=this,n=t.copy,r=t.ticks;return Object.assign(t,{stepSize:function(){return 0},copy:function(){return e.extendScale(n.call(t))},ticks:this.getField("isInteger")?function(e){return r.call(t,e).filter(Number.isInteger)}:t.ticks}),t},e}(Pi),oo=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ao=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0,n=t.map(function(t){return Math.abs(t)}),r=Math.max.apply(Math,n),i=Math.min.apply(Math,n).toExponential().split("e"),o=r.toExponential().split("e"),a=parseFloat(Math.floor(Number(i[0]))+"e"+i[1]),u=parseFloat(Math.ceil(Number(o[0]))+"e"+o[1]);return e?[a,u]:[-u,-a]}(o)),r.vars=o,r.addField("scaleType","logarithmic").addField("discrete",!1),r}return oo(e,t),e.prototype.isInDomain=function(t){var e=this.domain(),n=e[0],r=e[e.length-1];return!Number.isNaN(n)&&!Number.isNaN(r)&&t<=r&&t>=n},e.prototype.create=function(t){var e=this.vars;co(e);var n=function t(e){var n=e.copy;e.ticks=function(t){for(var n=[],r=ao.extent(e.domain()),i=Math.floor(so(r[0])),o=Math.ceil(so(r[1])),a=Math.ceil(10*(o-i)/(10*Math.ceil(t/10))),u=i;u<=o;u+=a)for(var s=1;s<=10;s++){var c=Math.pow(s,a)*Math.pow(10,u);(c=parseFloat(c.toExponential(0)))>=r[0]&&c<=r[1]&&n.push(c)}return n};e.copy=function(){var r=n.call(e);return t(r),r};return e}(ao.scaleLog()).domain(e).range(t);return n.stepSize=function(){return 0},this.toBaseScale(n,t)},e}(Pi);function so(t){return Math.log(t)/Math.LN10}function co(t){if(t[0]*t[1]<=0)throw new x("Logarithmic scale domain cannot cross zero.",w.INVALID_LOG_DOMAIN)}var lo,fo=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ho=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.addField("scaleType","value").addField("georole",n.georole),r}return fo(e,t),e.prototype.create=function(){return this.toBaseScale(function(t){return t})},e}(Pi),po=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n},e.prototype.create=function(){var t=this.vars,e=this.getField("brewer");if(!Array.isArray(e))throw new Error("This brewer is not supported");var n=e.length,r=(t[1]-t[0])/n,i=It(n-1).map(function(t){return t+1}).reduce(function(e,n){return e.concat([t[0]+n*r])},[]),o=go.scaleThreshold().domain(i).range(e);return this.toBaseScale(o)},e}(Pi),yo=function(t){return t||null},vo=function(t,e){return void 0===e&&(e=null),Array.isArray(t)?0===t.length?[e]:t:[t]},bo=function(t,e){return{type:t,x:e.x,y:e.y,identity:e.identity,size:e.size,color:e.color,split:e.split,label:e.label,guide:{color:e.colorGuide,obsoleteVerticalStackOrder:e.obsoleteVerticalStackOrder,size:e.sizeGuide},flip:e.flip,stack:e.stack}},xo={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},wo=((lo={})[xo.SUCCESS]=function(t){return t},lo[xo.FAIL]=function(t,e){throw new Error((e.messages||[]).join("\n")||["This configuration is not supported,","See https://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart"].join(" "))},lo[xo.WARNING]=function(t,e,n){var r=e.axis,i=e.indexMeasureAxis[0],o=t[i],a=t.filter(function(t){return t!==o});a.push(o);var u=n[i][r]||{},s=n[n.length-1][r]||{};return n[n.length-1][r]=u,n[i][r]=s,a},lo);function _o(t,e,n){return e.reduce(function(e,r,i){var o=t[r];return o?e.status!=xo.FAIL&&("measure"===o.type&&(e.countMeasureAxis++,e.indexMeasureAxis.push(i)),"measure"!==o.type&&1===e.countMeasureAxis?e.status=xo.WARNING:e.countMeasureAxis>1&&(e.status=xo.FAIL,e.messages.push('There is more than one measure dimension for "'+n+'" axis'))):(e.status=xo.FAIL,r?e.messages.push('"'+r+'" dimension is undefined for "'+n+'" axis'):e.messages.push('"'+n+'" axis should be specified')),e},{status:xo.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:n})}function So(t){for(var e=vo(t.x),n=vo(t.y),r=Math.max(e.length,n.length),i=vo(t.guide||{},{}),o=r-i.length,a=0;a0;l--){var f=u.pop(),d=s.pop(),h=c.pop()||{};l===o?(a.x=f,a.y=d,a.unit.push(bo(t,{x:yo(f),y:yo(d),identity:e.identity,split:e.split,color:e.color,label:e.label,size:e.size,flip:e.flip,stack:e.stack,colorGuide:h.color,obsoleteVerticalStackOrder:h.obsoleteVerticalStackOrder,sizeGuide:h.size})),a.guide=Yt(h,{x:{label:f},y:{label:d}})):a={type:"COORDS.RECT",x:yo(f),y:yo(d),unit:[a],guide:Yt(h,{x:{label:f},y:{label:d}})}}return e.spec={dimensions:e.dimensions,unit:a},e}var Oo=function(t){var e,n,r,i=So(t);return n=((e=i).flip?e.y:e.x).indexOf(e.color)>=0,r=e.guide[e.guide.length-1],n&&!r.hasOwnProperty("enableColorToBarPosition")&&(r.enableColorToBarPosition=!1),Mo("ELEMENT.INTERVAL",i=e)},Ao=function(t){var e=So(t),n=e.data,r=e.settings.log,i=(0,{horizontal:function(t){return{prop:t.x[t.x.length-1],flip:!1}},vertical:function(t){return{prop:t.y[t.y.length-1],flip:!0}},auto:function(t){var e,i=t.x,o=t.y,a=i[i.length-1],u=i.slice(0,i.length-1),s=o[o.length-1],c=o.slice(0,o.length-1),l=t.color,f=u.concat(c).concat([l]).filter(function(t){return null!==t}),d=-1,h=[[[a].concat(f),s],[[s].concat(f),a]],p=null;return h.some(function(t,e){var i=t[0],o=t[1],a=nn(n,i,[o]);return a.result?d=e:r(["Attempt to find a functional relation between",t[0]+" and "+t[1]+" is failed.","There are several "+a.error.keyY+" values (e.g. "+a.error.errY.join(",")+")","for ("+a.error.keyX+" = "+a.error.valX+")."].join(" ")),a.result})?(e=h[d][0][0],p=0!==d):(r("All attempts are failed. Gonna transform AREA to general PATH."),e=null),{prop:e,flip:p}}}["boolean"!=typeof e.flip?"auto":e.flip?"vertical":"horizontal"])(e);return null!==i.prop&&(e.data=un(n,i.prop,e.dimensions[i.prop]),e.flip=i.flip),Mo("ELEMENT.AREA",e)},ko=function(){function t(t){this.unitRef=t}return t.prototype.value=function(){return this.unitRef},t.prototype.clone=function(){return JSON.parse(JSON.stringify(this.unitRef))},t.prototype.traverse=function(t){var e=function(t,n,r){n(t,r),(t.units||[]).map(function(r){return e(r,n,t)})};return e(this.unitRef,t,null),this},t.prototype.reduce=function(t,e){var n=e;return this.traverse(function(e,r){return n=t(n,e,r)}),n},t.prototype.addFrame=function(t){return this.unitRef.frames=this.unitRef.frames||[],t.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),t.source=t.hasOwnProperty("source")?t.source:this.unitRef.expression.source,t.pipe=t.pipe||[],this.unitRef.frames.push(t),this},t.prototype.addTransformation=function(t,e){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:t,args:e}),this},t.prototype.isCoordinates=function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")},t.prototype.isElementOf=function(t){if(this.isCoordinates())return!1;var e=(this.unitRef.type||"").split("/");return 1===e.length&&e.unshift("RECT"),e[0].toUpperCase()===t.toUpperCase()},t}(),To=function(){function t(t){this.specRef=t}return t.prototype.value=function(){return this.specRef},t.prototype.unit=function(t){return t&&(this.specRef.unit=t),new ko(this.specRef.unit)},t.prototype.addTransformation=function(t,e){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[t]=e,this},t.prototype.getSettings=function(t){return this.specRef.settings[t]},t.prototype.setSettings=function(t,e){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[t]=e,this},t.prototype.getScale=function(t){return this.specRef.scales[t]},t.prototype.addScale=function(t,e){return this.specRef.scales[t]=e,this},t.prototype.regSource=function(t,e){return this.specRef.sources[t]=e,this},t.prototype.getSourceData=function(t){return(this.specRef.sources[t]||{data:[]}).data},t.prototype.getSourceDim=function(t,e){return(this.specRef.sources[t]||{dims:{}}).dims[e]||{}},t}(),Eo={},Co=function(){function t(){}return t.unit=function(t){return new ko(t)},t.spec=function(t){return new To(t)},t.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},t.depthFirstSearch=function(e,n){if(n(e))return e;for(var r=e.hasOwnProperty("frames")?e.frames:[{units:e.units}],i=0;i1))return"[columns] property must contain at least 2 dimensions"}]));var zo="2.3.2";e.default={GPL:Be,Plot:Zn,Chart:ir,api:jo,version:"2.3.2"}},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=i},function(t,e){t.exports=o},function(t,e){t.exports=a},function(t,e){t.exports=u},function(t,e){t.exports=s},function(t,e,n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){return t.indexOf(e)},r=window,i=r.document,o=i.documentElement,a=["top","bottom"];function u(t,e){for(var n in e)t[n]=e[n];return t}function s(t){var e,n=r.pageYOffset||o.scrollTop,i=r.pageXOffset||o.scrollLeft,a={left:0,right:0,top:0,bottom:0,width:0,height:0};if((e=t)&&null!=e.setInterval)a.width=r.innerWidth||o.clientWidth,a.height=r.innerHeight||o.clientHeight;else{if(!o.contains(t)||null==t.getBoundingClientRect)return a;u(a,t.getBoundingClientRect()),a.width=a.right-a.left,a.height=a.bottom-a.top}return a.top=a.top+n-o.clientTop,a.left=a.left+i-o.clientLeft,a.right=a.left+a.width,a.bottom=a.top+a.height,a}var c=function(t,e){return r.getComputedStyle(t)[e]};function l(t){var e=String(c(t,l.propName)),n=e.match(/([0-9.]+)([ms]{1,2})/);return n&&(e=Number(n[1]),"s"===n[2]&&(e*=1e3)),0|e}l.propName=function(){for(var t=i.createElement("div"),e=["transitionDuration","webkitTransitionDuration"],n=0;n=e.bottom&&(i[0]="top"),i[1]){case"left":t.right-this.width<=e.left&&(i[1]="right");break;case"right":t.left+this.width>=e.right&&(i[1]="left");break;default:t.left+t.width/2+this.width/2>=e.right?i[1]="left":t.right-t.width/2-this.width/2<=e.left&&(i[1]="right")}else switch(t.left-this.width-o<=e.left?i[0]="right":t.right+this.width+o>=e.right&&(i[0]="left"),i[1]){case"top":t.bottom-this.height<=e.top&&(i[1]="bottom");break;case"bottom":t.top+this.height>=e.bottom&&(i[1]="top");break;default:t.top+t.height/2+this.height/2>=e.bottom?i[1]="top":t.bottom-t.height/2-this.height/2<=e.top&&(i[1]="bottom")}return i.join("-")},d.prototype.position=function(t,e){this.attachedTo&&(t=this.attachedTo),null==t&&this._p?(t=this._p[0],e=this._p[1]):this._p=arguments;var n,r,i="number"==typeof t?{left:0|t,right:0|t,top:0|e,bottom:0|e,width:0,height:0}:s(t),o=this.spacing,a=this._pickPlace(i);switch(a!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(a),this.curPlace=a),this.curPlace){case"top":n=i.top-this.height-o,r=i.left+i.width/2-this.width/2;break;case"top-left":n=i.top-this.height-o,r=i.right-this.width;break;case"top-right":n=i.top-this.height-o,r=i.left;break;case"bottom":n=i.bottom+o,r=i.left+i.width/2-this.width/2;break;case"bottom-left":n=i.bottom+o,r=i.right-this.width;break;case"bottom-right":n=i.bottom+o,r=i.left;break;case"left":n=i.top+i.height/2-this.height/2,r=i.left-this.width-o;break;case"left-top":n=i.bottom-this.height,r=i.left-this.width-o;break;case"left-bottom":n=i.top,r=i.left-this.width-o;break;case"right":n=i.top+i.height/2-this.height/2,r=i.right+o;break;case"right-top":n=i.bottom-this.height,r=i.right+o;break;case"right-bottom":n=i.top,r=i.right+o}return this.element.style.top=Math.round(n)+"px",this.element.style.left=Math.round(r)+"px",this},d.prototype.show=function(t,e){return t=this.attachedTo?this.attachedTo:t,clearTimeout(this.aIndex),null!=t&&this.position(t,e),this.hidden&&(this.hidden=0,i.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&this.element.clientHeight,this.classes.add(this.options.inClass)),this},d.prototype.getElement=function(){return this.element},d.prototype.hide=function(){if(!this.hidden){var t=this,e=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(e=l(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){t.aIndex=0,i.body.removeChild(t.element),t.hidden=1},e),this}},d.prototype.toggle=function(t,e){return this[this.hidden?"show":"hide"](t,e)},d.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||i.body.removeChild(this.element),this.element=this.options=null},d.prototype._aware=function(){-1===n(d.winAware,this)&&d.winAware.push(this)},d.prototype._unaware=function(){var t=n(d.winAware,this);-1!==t&&d.winAware.splice(t,1)},d.reposition=function(){var t,e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,17)};function n(){t=0;for(var e=0,n=d.winAware.length;e0)-(t<0)||Number(t)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],o=0;o>>0,i=arguments[1],o=0;o0?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),a)},function(t){var e=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=arguments.length>1?arguments[1]:void 0;if(void 0!==r){if(!o(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(n=arguments[2])}for(var i,a=u(e.length),s=o(this)?Object(new this(a)):new Array(a),c=0;c line, +.tau-chart__svg .grid .extra-tick-line { + fill: none; + stroke: rgba(189, 195, 205, 0.4); + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__svg .grid .tick.zero-tick > line { + stroke: rgba(126, 129, 134, 0.505); +} +.tau-chart__svg .grid .line path { + shape-rendering: auto; +} +.tau-chart__svg .grid .cursor-line { + shape-rendering: crispEdges; + stroke: #adadad; + stroke-width: 1px; +} +.tau-chart__svg .label { + font-size: 12px; + font-weight: 600; +} +.tau-chart__svg .label .label-token { + font-size: 12px; + font-weight: 600; + text-transform: capitalize; +} +.tau-chart__svg .label .label-token-1, +.tau-chart__svg .label .label-token-2 { + font-weight: normal; +} +.tau-chart__svg .label .label-token-2 { + fill: gray; +} +.tau-chart__svg .label .label-token-delimiter { + font-weight: normal; + fill: gray; +} +.tau-chart__svg .label.inline .label-token { + font-weight: normal; + fill: gray; + text-transform: none; +} +.tau-chart__svg .brush .selection { + fill-opacity: .3; + stroke: #fff; + shape-rendering: crispEdges; +} +.tau-chart__svg .background { + stroke: #f2f2f2; +} +.tau-chart__dot { + opacity: 0.7; + stroke-width: 0; + transition: stroke-width 0.1s ease, opacity 0.2s ease; +} +.tau-chart__line { + fill: none; + transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; +} +.tau-chart__dot-line { + opacity: 1; + transition: stroke-opacity 0.2s ease; +} +.tau-chart__bar { + opacity: 0.7; + shape-rendering: geometricPrecision; + stroke-opacity: 0.5; + stroke-width: 1; + stroke: #fff; + transition: opacity 0.2s ease; +} +.tau-chart__area { + transition: opacity 0.2s ease; +} +.tau-chart__area path:not(.i-data-anchor), +.tau-chart__area polygon { + opacity: 0.6; + transition: stroke-opacity 0.2s ease, stroke-width 0.2s ease; +} +.tau-chart__svg .tau-chart__bar { + stroke: #fff; +} +.tau-chart__dot.tau-chart__highlighted { + stroke-width: 1; + opacity: 1; +} +.tau-chart__dot.tau-chart__dimmed { + opacity: 0.2; +} +.tau-chart__line.tau-chart__highlighted { + stroke-opacity: 1; + stroke-width: 3; +} +.tau-chart__line.tau-chart__dimmed { + stroke-opacity: 0.2; +} +.i-role-label.tau-chart__highlighted, +.tau-chart__area.tau-chart__highlighted, +.tau-chart__bar.tau-chart__highlighted { + stroke-opacity: 1; + opacity: 1; +} +.i-role-label.tau-chart__dimmed, +.tau-chart__area.tau-chart__dimmed, +.tau-chart__bar.tau-chart__dimmed { + opacity: 0.2; +} +.tau-chart__annotation-line { + stroke-width: 2px; + stroke-dasharray: 1,1; + shape-rendering: crispEdges; +} +.tau-chart__annotation-area.tau-chart__area polygon { + opacity: 0.1; +} +.tau-chart__category-filter { + box-sizing: border-box; + margin-right: 30px; + padding: 20px 0 10px 10px; + width: 160px; +} +.tau-chart__category-filter__category__label { + font-weight: 600; + font-size: 13px; + margin: 0 0 10px 10px; + text-transform: capitalize; +} +.tau-chart__category-filter__category__values { + margin-bottom: 10px; +} +.tau-chart__category-filter__value { + align-items: center; + color: #ccc; + cursor: pointer; + display: flex; + flex-direction: row; + font-size: 13px; + width: 100%; +} +.tau-chart__category-filter__value:hover { + background-color: rgba(189, 195, 205, 0.2); +} +.tau-chart__category-filter__value_checked { + color: #333; +} +.tau-chart__category-filter__value__toggle { + flex: none; + padding: 10px 10px 8px 10px; +} +.tau-chart__category-filter__value__toggle__icon { + background-color: transparent; + border: 1px solid #8694a3; + box-sizing: border-box; + border-radius: 50%; + display: inline-block; + height: 16px; + pointer-events: none; + position: relative; + width: 16px; +} +.tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value__toggle__icon::after { + background-color: #333; + content: ""; + display: block; + opacity: 0; + position: absolute; +} +.tau-chart__category-filter__value__toggle__icon::before { + height: 2px; + left: 3px; + top: 6px; + width: 8px; +} +.tau-chart__category-filter__value__toggle__icon::after { + height: 8px; + left: 6px; + top: 3px; + width: 2px; +} +.tau-chart__category-filter__value__toggle:hover .tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value__toggle:hover .tau-chart__category-filter__value__toggle__icon::after { + opacity: 1; +} +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon { + background-color: #8694a3; + border-color: transparent; +} +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon::before, +.tau-chart__category-filter__value_checked .tau-chart__category-filter__value__toggle__icon::after { + background-color: #fff; + transform: rotate(45deg); +} +.tau-chart__category-filter__value__label { + padding-left: 4px; +} +.tau-chart__layout .tau-crosshair__line { + shape-rendering: crispEdges; + stroke-dasharray: 1px 1px; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__label__text { + fill: #fff; + stroke: none; +} +.tau-chart__layout .tau-crosshair__label__text, +.tau-chart__layout .tau-crosshair__label__text-shadow { + font-size: 12px; + font-weight: normal; +} +.tau-chart__layout .tau-crosshair__line-shadow { + shape-rendering: crispEdges; + stroke: #cccccc; + stroke-width: 1px; +} +.tau-chart__layout .tau-crosshair__group.y .tau-crosshair__line-shadow { + transform: translateX(-0.5px); +} +.tau-chart__layout .tau-crosshair__group.x .tau-crosshair__line-shadow { + transform: translateY(0.5px); +} +.tau-chart__layout .tau-crosshair__label__text-shadow { + stroke-linejoin: round; + stroke-width: 3px; + visibility: hidden; +} +.tau-chart__layout .tau-crosshair__label__box { + fill-opacity: 0.85; + rx: 3px; + ry: 3px; + stroke: none; +} +.tau-chart__layout .tau-crosshair__line.color20-1 { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__text-shadow { + stroke: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__label.color20-1 .tau-crosshair__label__box { + fill: #6FA1D9; +} +.tau-chart__layout .tau-crosshair__line.color20-2 { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__text-shadow { + stroke: #DF2B59; +} +.tau-chart__layout .tau-crosshair__label.color20-2 .tau-crosshair__label__box { + fill: #DF2B59; +} +.tau-chart__layout .tau-crosshair__line.color20-3 { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__text-shadow { + stroke: #66DA26; +} +.tau-chart__layout .tau-crosshair__label.color20-3 .tau-crosshair__label__box { + fill: #66DA26; +} +.tau-chart__layout .tau-crosshair__line.color20-4 { + stroke: #4C3862; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__text-shadow { + stroke: #4C3862; +} +.tau-chart__layout .tau-crosshair__label.color20-4 .tau-crosshair__label__box { + fill: #4C3862; +} +.tau-chart__layout .tau-crosshair__line.color20-5 { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__text-shadow { + stroke: #E5B011; +} +.tau-chart__layout .tau-crosshair__label.color20-5 .tau-crosshair__label__box { + fill: #E5B011; +} +.tau-chart__layout .tau-crosshair__line.color20-6 { + stroke: #3A3226; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__text-shadow { + stroke: #3A3226; +} +.tau-chart__layout .tau-crosshair__label.color20-6 .tau-crosshair__label__box { + fill: #3A3226; +} +.tau-chart__layout .tau-crosshair__line.color20-7 { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__text-shadow { + stroke: #CB461A; +} +.tau-chart__layout .tau-crosshair__label.color20-7 .tau-crosshair__label__box { + fill: #CB461A; +} +.tau-chart__layout .tau-crosshair__line.color20-8 { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__text-shadow { + stroke: #C7CE23; +} +.tau-chart__layout .tau-crosshair__label.color20-8 .tau-crosshair__label__box { + fill: #C7CE23; +} +.tau-chart__layout .tau-crosshair__line.color20-9 { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__text-shadow { + stroke: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__label.color20-9 .tau-crosshair__label__box { + fill: #7FCDC2; +} +.tau-chart__layout .tau-crosshair__line.color20-10 { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__text-shadow { + stroke: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__label.color20-10 .tau-crosshair__label__box { + fill: #CCA1C8; +} +.tau-chart__layout .tau-crosshair__line.color20-11 { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__text-shadow { + stroke: #C84CCE; +} +.tau-chart__layout .tau-crosshair__label.color20-11 .tau-crosshair__label__box { + fill: #C84CCE; +} +.tau-chart__layout .tau-crosshair__line.color20-12 { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__text-shadow { + stroke: #54762E; +} +.tau-chart__layout .tau-crosshair__label.color20-12 .tau-crosshair__label__box { + fill: #54762E; +} +.tau-chart__layout .tau-crosshair__line.color20-13 { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__text-shadow { + stroke: #746BC9; +} +.tau-chart__layout .tau-crosshair__label.color20-13 .tau-crosshair__label__box { + fill: #746BC9; +} +.tau-chart__layout .tau-crosshair__line.color20-14 { + stroke: #953441; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__text-shadow { + stroke: #953441; +} +.tau-chart__layout .tau-crosshair__label.color20-14 .tau-crosshair__label__box { + fill: #953441; +} +.tau-chart__layout .tau-crosshair__line.color20-15 { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__text-shadow { + stroke: #5C7A76; +} +.tau-chart__layout .tau-crosshair__label.color20-15 .tau-crosshair__label__box { + fill: #5C7A76; +} +.tau-chart__layout .tau-crosshair__line.color20-16 { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__text-shadow { + stroke: #C8BF87; +} +.tau-chart__layout .tau-crosshair__label.color20-16 .tau-crosshair__label__box { + fill: #C8BF87; +} +.tau-chart__layout .tau-crosshair__line.color20-17 { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__text-shadow { + stroke: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__label.color20-17 .tau-crosshair__label__box { + fill: #BFC1C3; +} +.tau-chart__layout .tau-crosshair__line.color20-18 { + stroke: #8E5C31; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__text-shadow { + stroke: #8E5C31; +} +.tau-chart__layout .tau-crosshair__label.color20-18 .tau-crosshair__label__box { + fill: #8E5C31; +} +.tau-chart__layout .tau-crosshair__line.color20-19 { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__text-shadow { + stroke: #71CE7B; +} +.tau-chart__layout .tau-crosshair__label.color20-19 .tau-crosshair__label__box { + fill: #71CE7B; +} +.tau-chart__layout .tau-crosshair__line.color20-20 { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__text-shadow { + stroke: #BE478B; +} +.tau-chart__layout .tau-crosshair__label.color20-20 .tau-crosshair__label__box { + fill: #BE478B; +} +.diff-tooltip__table { + border-top: 1px solid rgba(51, 51, 51, 0.2); + margin-top: 5px; + padding-top: 5px; + width: calc(100% + 15px); +} +.diff-tooltip__header { + align-items: stretch; + display: flex; + font-weight: 600; + justify-content: space-between; + padding: 2px 0px; + position: relative; +} +.diff-tooltip__header__text { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-start; + max-width: 120px; +} +.diff-tooltip__header__value { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + justify-content: flex-end; + margin-right: 15px; + max-width: 120px; + padding-left: 10px; + text-align: right; +} +.diff-tooltip__header__updown { + align-items: center; + display: inline-flex; + flex: 1 1 auto; + font-size: 75%; + height: 100%; + justify-content: flex-start; + padding-left: 2px; + position: absolute; + right: 0; + visibility: hidden; +} +.diff-tooltip__body { + max-height: 250px; + overflow: hidden; + padding: 1px; + position: relative; +} +.diff-tooltip__body__content { + padding-bottom: 1px; +} +.diff-tooltip__body_overflow-top::before, +.diff-tooltip__body_overflow-bottom::after { + align-items: center; + color: rgba(51, 51, 51, 0.7); + content: "..."; + display: flex; + flex-direction: column; + height: 26px; + left: 0; + position: absolute; + width: 100%; + z-index: 2; +} +.diff-tooltip__body_overflow-top::before { + background: linear-gradient(to bottom, #fff, rgba(255, 255, 255, 0)); + justify-content: flex-start; + top: 0; +} +.diff-tooltip__body_overflow-bottom::after { + background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0)); + justify-content: flex-end; + bottom: 0; +} +.diff-tooltip__item { + display: flex; + justify-content: space-between; + margin-right: 15px; + min-width: 100px; + position: relative; +} +.diff-tooltip__item_highlighted { + background-color: rgba(241, 233, 255, 0.5); + box-shadow: 0 0 0 1px #877aa1; + z-index: 1; +} +.diff-tooltip__item__bg { + align-items: center; + display: inline-flex; + height: 100%; + justify-content: center; + min-width: 3px; + opacity: 0.6; + position: absolute; + z-index: 0; +} +.diff-tooltip__item__text { + flex: 1 1 auto; + overflow: hidden; + padding: 2px 4px; + text-overflow: ellipsis; + white-space: nowrap; + width: 100%; + z-index: 1; +} +.diff-tooltip__item__value { + flex: none; + display: table-cell; + padding: 2px 4px 2px 30px; + z-index: 1; +} +.diff-tooltip__item__updown { + align-items: center; + display: inline-flex; + flex: 4; + justify-content: flex-start; + left: 100%; + height: 100%; + padding: 0 4px 0 4px; + position: absolute; +} +.diff-tooltip__item__updown_positive { + color: #4ca383; +} +.diff-tooltip__item__updown_negative { + color: #df6772; +} +.diff-tooltip__field__updown_positive { + color: #4ca383; +} +.diff-tooltip__field__updown_negative { + color: #df6772; +} +.interval-highlight__range { + shape-rendering: crispEdges; +} +.interval-highlight__range-start { + shape-rendering: crispEdges; + stroke: #b8aecb; + stroke-dasharray: 2 1; +} +.interval-highlight__range-end { + shape-rendering: crispEdges; + stroke: #b8aecb; +} +.interval-highlight__gradient-start { + stop-color: #c4b3e6; + stop-opacity: 0.02; +} +.interval-highlight__gradient-end { + stop-color: #c4b3e6; + stop-opacity: 0.2; +} +.diff-tooltip__item__bg.color20-1 { + background-color: #6FA1D9; +} +.diff-tooltip__item__bg.color20-2 { + background-color: #DF2B59; +} +.diff-tooltip__item__bg.color20-3 { + background-color: #66DA26; +} +.diff-tooltip__item__bg.color20-4 { + background-color: #4C3862; +} +.diff-tooltip__item__bg.color20-5 { + background-color: #E5B011; +} +.diff-tooltip__item__bg.color20-6 { + background-color: #3A3226; +} +.diff-tooltip__item__bg.color20-7 { + background-color: #CB461A; +} +.diff-tooltip__item__bg.color20-8 { + background-color: #C7CE23; +} +.diff-tooltip__item__bg.color20-9 { + background-color: #7FCDC2; +} +.diff-tooltip__item__bg.color20-10 { + background-color: #CCA1C8; +} +.diff-tooltip__item__bg.color20-11 { + background-color: #C84CCE; +} +.diff-tooltip__item__bg.color20-12 { + background-color: #54762E; +} +.diff-tooltip__item__bg.color20-13 { + background-color: #746BC9; +} +.diff-tooltip__item__bg.color20-14 { + background-color: #953441; +} +.diff-tooltip__item__bg.color20-15 { + background-color: #5C7A76; +} +.diff-tooltip__item__bg.color20-16 { + background-color: #C8BF87; +} +.diff-tooltip__item__bg.color20-17 { + background-color: #BFC1C3; +} +.diff-tooltip__item__bg.color20-18 { + background-color: #8E5C31; +} +.diff-tooltip__item__bg.color20-19 { + background-color: #71CE7B; +} +.diff-tooltip__item__bg.color20-20 { + background-color: #BE478B; +} +.tau-chart__print-block { + display: none; +} +.tau-chart__export { + float: right; + margin: 0 20px 0 0; + display: block; + text-indent: 20px; + overflow: hidden; + background-repeat: no-repeat; + background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxOCAxOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZXhwb3J0PC90aXRsZT48ZGVzYz5DcmVhdGVkIHdpdGggU2tldGNoLjwvZGVzYz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxnIGZpbGw9IiMwMDAiPjxwYXRoIGQ9Ik0xNyAxLjY3bC04LjMyOCA4LjM2Nkw4IDkuNSAxNi4zNTMgMUgxMlYwaDZ2NmgtMVYxLjY3eiIgb3BhY2l0eT0iLjgiLz48cGF0aCBkPSJNMCA1LjAxQzAgMy4zNDYgMS4zMzcgMiAzLjAxIDJIMTZ2MTIuOTljMCAxLjY2My0xLjMzNyAzLjAxLTMuMDEgMy4wMUgzLjAxQzEuMzQ2IDE4IDAgMTYuNjYzIDAgMTQuOTlWNS4wMXpNMTUgMTVDMTUgMTYuMTA1IDE0LjEwMyAxNyAxMi45OTQgMTdIMy4wMDZDMS44OTggMTcgMSAxNi4xMDMgMSAxNC45OTRWNS4wMDZDMSAzLjg5OCAxLjg4NyAzIDIuOTk4IDNIOVYyaDd2N2gtMXY2LjAwMnoiIG9wYWNpdHk9Ii40Ii8+PC9nPjwvZz48L3N2Zz4=); + width: 20px; + height: 20px; + color: transparent; + opacity: 0.6; + cursor: pointer; + text-decoration: none; + position: relative; + z-index: 2; +} +.tau-chart__export:hover { + opacity: 1; + text-decoration: none; +} +.tau-chart__export__list { + font-size: 11px; + margin: 0; + padding: 0; +} +.tau-chart__export__item { + overflow: hidden; + box-sizing: border-box; +} +.tau-chart__export__item > a { + display: block; + padding: 7px 15px; + color: inherit; + text-decoration: none; + cursor: pointer; +} +.tau-chart__export__item > a:hover, +.tau-chart__export__item > a:focus { + background: #EAF2FC; + outline: none; + box-shadow: none; +} +.tau-chart__legend { + padding: 20px 0 10px 10px; + position: relative; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__legend__wrap { + margin-bottom: 30px; + position: relative; +} +.tau-chart__legend__wrap:last-child { + margin-bottom: 0; +} +.tau-chart__legend__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__legend__reset { + margin-top: -4px; + position: absolute; + right: -25px; + top: 0; + z-index: 1; +} +.tau-chart__legend__reset.disabled { + display: none; +} +.tau-chart__legend__reset + .tau-chart__legend__title { + margin-right: 1.7em; +} +.tau-chart__legend__item { + padding: 10px 20px 8px 40px; + position: relative; + font-size: 13px; + line-height: 1.2em; + cursor: pointer; +} +.tau-chart__legend__item:hover { + background-color: rgba(189, 195, 205, 0.2); +} +.tau-chart__legend__item--size { + cursor: default; +} +.tau-chart__legend__item--size:hover { + background: none; +} +.tau-chart__legend__item .color-default { + background: #6FA1D9; + border-color: #6FA1D9; +} +.tau-chart__legend__item:disabled, +.tau-chart__legend__item.disabled { + color: #ccc; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide { + background: transparent; +} +.tau-chart__legend__guide { + position: absolute; + box-sizing: border-box; + width: 100%; + height: 100%; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + border: 1px solid transparent; + border-radius: 50%; +} +.tau-chart__legend__guide__wrap { + position: absolute; + top: calc((10px - 8px) + 0.6em); + left: 10px; + width: 16px; + height: 16px; +} +.tau-chart__legend__guide--size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__guide--color__overlay { + background-color: transparent; + height: 36px; + left: -12px; + position: absolute; + top: -12px; + width: 36px; +} +.tau-chart__legend__guide--color::before { + content: ""; + display: none; + height: 2px; + left: 3px; + pointer-events: none; + position: absolute; + top: 6px; + width: 8px; +} +.tau-chart__legend__guide--color::after { + content: ""; + display: none; + height: 8px; + left: 6px; + pointer-events: none; + position: absolute; + top: 3px; + width: 2px; +} +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item .tau-chart__legend__guide--color:hover::after { + background-color: #fff; + display: inline-block; + transform: rotate(45deg); +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover { + background: #fff; +} +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::before, +.tau-chart__legend__item.disabled .tau-chart__legend__guide--color:hover::after { + background-color: #333; + transform: none; +} +.tau-chart__legend__size-wrapper, +.tau-chart__legend__gradient-wrapper { + box-sizing: border-box; + margin: 10px; + overflow: visible; + width: 100%; +} +.tau-chart__legend__size, +.tau-chart__legend__gradient { + overflow: visible; +} +.tau-chart__legend__size__item__circle.color-definite { + stroke: #cacaca; + fill: #cacaca; +} +.tau-chart__legend__size__item__circle.color-default-size { + stroke: #6FA1D9; + fill: #6FA1D9; +} +.tau-chart__legend__gradient__bar { + rx: 4px; + ry: 4px; +} +.tau-chart__legend__item .color20-1 { + background: #6FA1D9; + border: 1px solid #6FA1D9; +} +.tau-chart__legend__item.disabled .color20-1 { + background-color: transparent; +} +.tau-chart__legend__item .color20-2 { + background: #DF2B59; + border: 1px solid #DF2B59; +} +.tau-chart__legend__item.disabled .color20-2 { + background-color: transparent; +} +.tau-chart__legend__item .color20-3 { + background: #66DA26; + border: 1px solid #66DA26; +} +.tau-chart__legend__item.disabled .color20-3 { + background-color: transparent; +} +.tau-chart__legend__item .color20-4 { + background: #4C3862; + border: 1px solid #4C3862; +} +.tau-chart__legend__item.disabled .color20-4 { + background-color: transparent; +} +.tau-chart__legend__item .color20-5 { + background: #E5B011; + border: 1px solid #E5B011; +} +.tau-chart__legend__item.disabled .color20-5 { + background-color: transparent; +} +.tau-chart__legend__item .color20-6 { + background: #3A3226; + border: 1px solid #3A3226; +} +.tau-chart__legend__item.disabled .color20-6 { + background-color: transparent; +} +.tau-chart__legend__item .color20-7 { + background: #CB461A; + border: 1px solid #CB461A; +} +.tau-chart__legend__item.disabled .color20-7 { + background-color: transparent; +} +.tau-chart__legend__item .color20-8 { + background: #C7CE23; + border: 1px solid #C7CE23; +} +.tau-chart__legend__item.disabled .color20-8 { + background-color: transparent; +} +.tau-chart__legend__item .color20-9 { + background: #7FCDC2; + border: 1px solid #7FCDC2; +} +.tau-chart__legend__item.disabled .color20-9 { + background-color: transparent; +} +.tau-chart__legend__item .color20-10 { + background: #CCA1C8; + border: 1px solid #CCA1C8; +} +.tau-chart__legend__item.disabled .color20-10 { + background-color: transparent; +} +.tau-chart__legend__item .color20-11 { + background: #C84CCE; + border: 1px solid #C84CCE; +} +.tau-chart__legend__item.disabled .color20-11 { + background-color: transparent; +} +.tau-chart__legend__item .color20-12 { + background: #54762E; + border: 1px solid #54762E; +} +.tau-chart__legend__item.disabled .color20-12 { + background-color: transparent; +} +.tau-chart__legend__item .color20-13 { + background: #746BC9; + border: 1px solid #746BC9; +} +.tau-chart__legend__item.disabled .color20-13 { + background-color: transparent; +} +.tau-chart__legend__item .color20-14 { + background: #953441; + border: 1px solid #953441; +} +.tau-chart__legend__item.disabled .color20-14 { + background-color: transparent; +} +.tau-chart__legend__item .color20-15 { + background: #5C7A76; + border: 1px solid #5C7A76; +} +.tau-chart__legend__item.disabled .color20-15 { + background-color: transparent; +} +.tau-chart__legend__item .color20-16 { + background: #C8BF87; + border: 1px solid #C8BF87; +} +.tau-chart__legend__item.disabled .color20-16 { + background-color: transparent; +} +.tau-chart__legend__item .color20-17 { + background: #BFC1C3; + border: 1px solid #BFC1C3; +} +.tau-chart__legend__item.disabled .color20-17 { + background-color: transparent; +} +.tau-chart__legend__item .color20-18 { + background: #8E5C31; + border: 1px solid #8E5C31; +} +.tau-chart__legend__item.disabled .color20-18 { + background-color: transparent; +} +.tau-chart__legend__item .color20-19 { + background: #71CE7B; + border: 1px solid #71CE7B; +} +.tau-chart__legend__item.disabled .color20-19 { + background-color: transparent; +} +.tau-chart__legend__item .color20-20 { + background: #BE478B; + border: 1px solid #BE478B; +} +.tau-chart__legend__item.disabled .color20-20 { + background-color: transparent; +} +.tau-chart__filter__wrap { + padding: 20px 0 10px 10px; + margin-right: 30px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__filter__wrap__title { + margin: 0 0 10px 10px; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__filter__wrap rect { + fill: rgba(0, 0, 0, 0.2); +} +.tau-chart__filter__wrap .brush .overlay, +.tau-chart__filter__wrap .brush .handle { + opacity: 0; +} +.tau-chart__filter__wrap .brush .selection { + shape-rendering: crispEdges; + fill-opacity: 0.4; + fill: #0074FF; +} +.tau-chart__filter__wrap text.date-label { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap text.date-label .common { + font-weight: 600; +} +.tau-chart__filter__wrap .resize line { + stroke: #000; + stroke-width: 1px; + shape-rendering: crispEdges; +} +.tau-chart__filter__wrap .resize.e text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__filter__wrap .resize.w text { + text-anchor: middle; + font-size: 12px; +} +.tau-chart__tooltip { + background: rgba(255, 255, 255, 0.9); + position: absolute; + top: 0; + left: 0; + max-width: none; + z-index: 900; + align-items: stretch; + display: flex; + flex-direction: column; + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); + font-size: 11px; + font-family: Helvetica Neue, Segoe UI, Open Sans, Ubuntu, sans-serif; + /* Fade */ +} +.tau-chart__tooltip.fade { + opacity: 0; + transition: opacity 200ms ease-out; +} +.tau-chart__tooltip.fade.in { + opacity: 1; + transition-duration: 500ms; +} +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.bottom-right { + margin-left: 8px; +} +.tau-chart__tooltip.top-left, +.tau-chart__tooltip.bottom-left { + margin-left: -8px; +} +.tau-chart__tooltip.top, +.tau-chart__tooltip.top-right, +.tau-chart__tooltip.top-left { + margin-top: 8px; +} +.tau-chart__tooltip__content { + box-sizing: border-box; + max-width: 500px; + min-width: 100px; + overflow: hidden; + padding: 15px 15px 10px 15px; +} +.tau-chart__tooltip__buttons { + background: #EBEEF1; + bottom: 100%; + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.005); + display: flex; + flex-direction: row; + flex-wrap: wrap; + max-width: 500px; + min-width: 86px; + position: absolute; + width: 100%; + z-index: -1; +} +.tau-chart__tooltip__buttons::after { + background: linear-gradient(to bottom, #fff 50%, rgba(255, 255, 255, 0)); + content: ""; + display: block; + height: 8px; + left: 0; + pointer-events: none; + position: absolute; + top: 100%; + width: 100%; +} +.tau-chart__tooltip__button { + color: #65717F; + cursor: pointer; + display: inline-flex; + flex: 1 0 auto; + height: 0; + overflow: hidden; + transition: height 500ms; +} +.tau-chart__tooltip__button__wrap { + line-height: 26px; + padding: 0 15px; +} +.tau-chart__tooltip__button:hover { + background: #f5f7f8; + color: #333; +} +.tau-chart__tooltip__button .tau-icon-close-gray { + background-image: url(data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIzMHB4IiBoZWlnaHQ9IjMwcHgiIHZpZXdCb3g9IjAgMCAzMCAzMCI+PHBhdGggZmlsbD0iIzg0OTZBNyIgZD0iTTEwLDAuNzE1TDkuMjg1LDBMNSw0LjI4NUwwLjcxNSwwTDAsMC43MTVMNC4yODUsNUwwLDkuMjg1TDAuNzE1LDEwTDUsNS43MTVMOS4yODUsMTBMMTAsOS4yODVMNS43MTUsNUwxMCwwLjcxNXoiLz48L3N2Zz4=); + display: inline-block; + width: 12px; + height: 12px; + position: relative; + top: 3px; + margin-right: 5px; +} +.tau-chart__tooltip.stuck .tau-chart__tooltip__button { + height: 26px; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons { + bottom: initial; + top: 100%; +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip.top .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-right .tau-chart__tooltip__buttons::after, +.tau-chart__tooltip.top-left .tau-chart__tooltip__buttons::after { + background: linear-gradient(to top, #fff 50%, rgba(255, 255, 255, 0)); + bottom: 100%; + top: initial; +} +.tau-chart__tooltip.top-right .tau-chart__tooltip__button__wrap, +.tau-chart__tooltip.top-left .tau-chart__tooltip__button__wrap { + position: relative; + top: calc(100% - 26px); +} +.tau-chart__tooltip__list { + display: table; +} +.tau-chart__tooltip__list__item { + display: table-row; +} +.tau-chart__tooltip__list__elem { + display: table-cell; + padding-bottom: 4px; + line-height: 1.3; + color: #000; +} +.tau-chart__tooltip__list__elem:not(:first-child) { + padding-left: 15px; +} +.tau-chart__tooltip__list__elem:first-child { + color: #8e8e8e; +} +.tau-chart__tooltip__gray-text { + color: #8e8e8e; +} +.tau-chart__tooltip-target { + cursor: pointer; +} +.tau-chart__tooltip-target .tau-chart__dot.tau-chart__highlighted, +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted, +.tau-chart__tooltip-target .i-data-anchor.tau-chart__highlighted { + stroke: #333; + stroke-width: 1; +} +.tau-chart__tooltip-target .tau-chart__bar.tau-chart__highlighted { + shape-rendering: crispEdges; +} +.tau-chart__svg .tau-chart__trendline.color20-1 { + stroke: #357ac7; +} +.tau-chart__svg .tau-chart__trendline.color20-2 { + stroke: #a5193d; +} +.tau-chart__svg .tau-chart__trendline.color20-3 { + stroke: #47991a; +} +.tau-chart__svg .tau-chart__trendline.color20-4 { + stroke: #261c31; +} +.tau-chart__svg .tau-chart__trendline.color20-5 { + stroke: #9e790c; +} +.tau-chart__svg .tau-chart__trendline.color20-6 { + stroke: #0c0a08; +} +.tau-chart__svg .tau-chart__trendline.color20-7 { + stroke: #872f11; +} +.tau-chart__svg .tau-chart__trendline.color20-8 { + stroke: #888d18; +} +.tau-chart__svg .tau-chart__trendline.color20-9 { + stroke: #48b8a8; +} +.tau-chart__svg .tau-chart__trendline.color20-10 { + stroke: #b16fab; +} +.tau-chart__svg .tau-chart__trendline.color20-11 { + stroke: #9c2ca1; +} +.tau-chart__svg .tau-chart__trendline.color20-12 { + stroke: #2d3f19; +} +.tau-chart__svg .tau-chart__trendline.color20-13 { + stroke: #483eaa; +} +.tau-chart__svg .tau-chart__trendline.color20-14 { + stroke: #5c2028; +} +.tau-chart__svg .tau-chart__trendline.color20-15 { + stroke: #3b4e4c; +} +.tau-chart__svg .tau-chart__trendline.color20-16 { + stroke: #b0a353; +} +.tau-chart__svg .tau-chart__trendline.color20-17 { + stroke: #989b9e; +} +.tau-chart__svg .tau-chart__trendline.color20-18 { + stroke: #55371d; +} +.tau-chart__svg .tau-chart__trendline.color20-19 { + stroke: #3eb44b; +} +.tau-chart__svg .tau-chart__trendline.color20-20 { + stroke: #883063; +} +.tau-chart__svg .tau-chart__trendline.color-default { + stroke: #357ac7; +} +.tau-chart { + /* TrendLine */ +} +.tau-chart__trendlinepanel { + padding: 20px 0 20px 20px; + margin-right: 20px; + width: 160px; + box-sizing: border-box; +} +.tau-chart__trendlinepanel__title { + margin: 0 0 10px 0; + text-transform: capitalize; + font-weight: 600; + font-size: 13px; +} +.tau-chart__trendlinepanel__control { + width: 100%; +} +.tau-chart__trendlinepanel__error-message { + font-size: 11px; + line-height: 16px; + margin-left: 5px; +} +.tau-chart__trendlinepanel.applicable-false.hide-trendline-error, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__input, +.tau-chart__trendlinepanel.applicable-false .tau-chart__trendlinepanel__control, +.tau-chart__trendlinepanel.applicable-false .tau-chart__checkbox__icon { + display: none; +} +.tau-chart__trendline { + stroke-dasharray: 4, 4; +} diff --git a/dist/taucharts.min.js b/dist/taucharts.min.js new file mode 100644 index 000000000..d6a92674e --- /dev/null +++ b/dist/taucharts.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection"),require("d3-array"),require("d3-scale"),require("topojson-client"),require("d3-transition"),require("d3-color"),require("d3-brush"),require("d3-time-format"),require("d3-format"),require("d3-time"),require("d3-shape"),require("d3-quadtree"),require("d3-request"),require("d3-geo"),require("d3-axis")):"function"==typeof define&&define.amd?define(["d3-selection","d3-array","d3-scale","topojson-client","d3-transition","d3-color","d3-brush","d3-time-format","d3-format","d3-time","d3-shape","d3-quadtree","d3-request","d3-geo","d3-axis"],e):"object"==typeof exports?exports.Taucharts=e(require("d3-selection"),require("d3-array"),require("d3-scale"),require("topojson-client"),require("d3-transition"),require("d3-color"),require("d3-brush"),require("d3-time-format"),require("d3-format"),require("d3-time"),require("d3-shape"),require("d3-quadtree"),require("d3-request"),require("d3-geo"),require("d3-axis")):t.Taucharts=e(t.d3,t.d3,t.d3,t.topojson,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(window,function(t,e,n,r,a,o,s,u,l,c,h,d,f,p,g){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=27)}([function(e,n){e.exports=t},function(t,e,n){"use strict";n.r(e);var r={};n.d(r,"traverseJSON",function(){return ht}),n.d(r,"traverseSpec",function(){return dt}),n.d(r,"clone",function(){return Et}),n.d(r,"isDate",function(){return St}),n.d(r,"isObject",function(){return Tt}),n.d(r,"niceZeroBased",function(){return Mt}),n.d(r,"niceTimeDomain",function(){return Ct}),n.d(r,"generateHash",function(){return Ot}),n.d(r,"generateRatioFunction",function(){return Pt}),n.d(r,"isSpecRectCoordsOnly",function(){return Nt}),n.d(r,"throttleLastEvent",function(){return Lt}),n.d(r,"splitEvenly",function(){return Rt}),n.d(r,"extRGBColor",function(){return Dt}),n.d(r,"extCSSClass",function(){return Ft}),n.d(r,"toRadian",function(){return It}),n.d(r,"normalizeAngle",function(){return jt}),n.d(r,"range",function(){return zt}),n.d(r,"hasXOverflow",function(){return Bt}),n.d(r,"hasYOverflow",function(){return Vt}),n.d(r,"flatten",function(){return Ht}),n.d(r,"unique",function(){return Ut}),n.d(r,"groupBy",function(){return Wt}),n.d(r,"union",function(){return Xt}),n.d(r,"intersection",function(){return Gt}),n.d(r,"defaults",function(){return qt}),n.d(r,"omit",function(){return Yt}),n.d(r,"memoize",function(){return $t}),n.d(r,"createMultiSorter",function(){return Kt}),n.d(r,"pick",function(){return Jt}),n.d(r,"escape",function(){return Qt}),n.d(r,"template",function(){return Zt}),n.d(r,"escapeHtml",function(){return te}),n.d(r,"xml",function(){return ie}),n.d(r,"take",function(){return ae}),n.d(r,"isChartElement",function(){return se}),n.d(r,"isFacetUnit",function(){return ue});var i={};n.d(i,"appendTo",function(){return he}),n.d(i,"getScrollbarSize",function(){return de}),n.d(i,"setScrollPadding",function(){return fe}),n.d(i,"getStyle",function(){return pe}),n.d(i,"getStyleAsNum",function(){return ge}),n.d(i,"getContainerSize",function(){return me}),n.d(i,"getAxisTickLabelSize",function(){return ye}),n.d(i,"getLabelSize",function(){return ve}),n.d(i,"getCharSize",function(){return be}),n.d(i,"selectOrAppend",function(){return xe}),n.d(i,"selectImmediate",function(){return _e}),n.d(i,"selectAllImmediate",function(){return we}),n.d(i,"sortChildren",function(){return Ee}),n.d(i,"classes",function(){return Se}),n.d(i,"dispatchMouseEvent",function(){return Te});var a={};n.d(a,"translate",function(){return Me}),n.d(a,"rotate",function(){return Ce}),n.d(a,"getOrientation",function(){return ke}),n.d(a,"parseTransformTranslate",function(){return Ae}),n.d(a,"isIntersect",function(){return Oe}),n.d(a,"getDeepTransformTranslate",function(){return Pe}),n.d(a,"raiseElements",function(){return Ne});var o=n(0),s=n(2),u=n(3),l={},c={};function h(t){var e=c[t];return e||(e=function(){for(var e,n,r=this,i=0,a=[];r=r.handler;){if("function"==typeof(n=r.callbacks[t])){if(!e)for(e=[this],i=0;i=0?t.positive:t.negative,s=o[i]||0,u=s+a;return o[i]=u,{nextStack:u,prevStack:s}}},a=i({positive:{},negative:{}}),o=i({positive:{},negative:{}}),s=function(e){return $t(e,t.id)},u=Number.MAX_VALUE,l=Number.MIN_VALUE,c=function(t){return u=tl?t:l,r.value(t)},h=s(function(t){return c(a(t).nextStack)}),d=s(function(t){return c(o(t).prevStack)}),f=function(e){return t.group(e)+"/"+(e[r.dim]>=0?1:-1)},p=Wt(e,f),g=Object.keys(p).sort(t.flip||!t.flip&&t.obsoleteVerticalStackOrder?function(e,n){return t.order(e)-t.order(n)}:function(e,n){return t.order(n)-t.order(e)}).reduce(function(t,e){return t.concat(p[e])},[]);return g.forEach(function(t){h(t),d(t)}),r.fixup(function(t){var e={};return(!t.hasOwnProperty("max")||t.maxu)&&(e.min=u),e}),{group:f,data:function(){return g},yi:h,y0:d}}).reg("size_distribute_evenly",function(t,e){var n=e.minLimit,r=e.maxLimit,i=e.defMin,a=e.defMax,o=t.data(),s=function(t,e){return t-e},u=t.scaleX.discrete?t.scaleX.stepSize()/2:Number.MAX_VALUE,l=o.map(function(e){return t.xi(e)}).sort(s),c=l[0],h=l.slice(1).map(function(t){var e=t-c;return c=t,e}).filter(function(t){return t>0}).sort(s).concat(Number.MAX_VALUE)[0],d=Math.min(h,u),f="number"==typeof n?n:i,p={minSize:f,maxSize:"number"==typeof r?r:Math.max(f,Math.min(a,d))};return t.scaleSize.fixup(function(t){var e={};return t.fixed?t.maxSize>p.maxSize&&(e.maxSize=p.maxSize):(e.fixed=!0,e.minSize=p.minSize,e.maxSize=p.maxSize),e}),{}}).reg("adjustStaticSizeScale",function(t,e){var n=e.minLimit,r=e.maxLimit,i=e.defMin,a=e.defMax,o={minSize:"number"==typeof n?n:i,maxSize:"number"==typeof r?r:a};return t.scaleSize.fixup(function(t){var e={};return t.fixed||(e.fixed=!0,e.minSize=o.minSize,e.maxSize=o.maxSize),e}),{}}).reg("adjustSigmaSizeScale",function(t,e){var n,r,i,a,o=e.minLimit,s=e.maxLimit,u=e.defMin,l=e.defMax,c=function(t,e){return t-e},h=t.data().map(function(e){return t.xi(e)}).sort(c),d=h[0],f=h.slice(1).map(function(t){var e=t-d;return d=t,e}).filter(function(t){return t>0}).sort(c).concat(Number.MAX_VALUE)[0],p=t.scaleX.discrete?t.scaleX.stepSize()/2:Number.MAX_VALUE,g=Math.min(f,p),m="number"==typeof o?o:u,y="number"==typeof s?s:l,v={minSize:m,maxSize:Math.max(m,Math.min(y,(n=g,r=(m+y)/2,i=y,a=m,Math.round(r+(i-r)/(1+Math.exp(-(n-a)/.5))))))};return t.scaleSize.fixup(function(t){var e={};return t.fixed?t.maxSize>v.maxSize&&(e.maxSize=v.maxSize):(e.fixed=!0,e.minSize=v.minSize,e.maxSize=v.maxSize),e}),{}}).reg("avoidScalesOverflow",function(t,e){var n,r,i=e.sizeDirection,a=function(t,e){return!t||t.discrete||"logarithmic"===t.scaleType||i.indexOf(e)<0},o=a(t.scaleX,"x"),s=a(t.scaleY,"y");if(o&&s)return{};t.scaleSize.fixup(function(t){return n=t.minSize,r=t.maxSize,t});var u=t.data().reduce(function(e,i){var a,u,l=t.size(i),c=(l>=n?l:n+l*(r-n))/2;return o||(a=t.xi(i),e.left=Math.min(e.left,a-c),e.right=Math.max(e.right,a+c)),s||(u=t.yi(i),e.top=Math.min(e.top,u-c),e.bottom=Math.max(e.bottom,u+c)),e},{top:Number.MAX_VALUE,right:-Number.MAX_VALUE,bottom:-Number.MAX_VALUE,left:Number.MAX_VALUE}),l=function(e,n,r,i){var a=e.domain(),o=Math.abs(e.value(a[1])-e.value(a[0])),s=(a[1]-a[0])/o;if(0===o)return 1;var u=Math.max(0,-n),l=Math.max(0,r-o),c=t.flip?l:u,h=t.flip?u:l,d=Number(a[0])-(i?h:c)*s,f=Number(a[1])+(i?c:h)*s;return e.fixup(function(t){var e={};if(t.fixedBorders){var i=t.fixedBorders.slice(),a=i[0],o=i[1];(a>n||o=0?1:-1},d=function(e,n,r){var i=Wt(n,function(t){return t[s]}),a=n[0];return e.reduce(function(e,n){return e.concat(i[n]||function(e,n,r){var i,a=[e,t.id(n),r].join(" ");return(i={})[s]=e,i[u]=1e-10*r,i[c]=n[c],i[l]=n[l],i.taucharts_synthetic_record=!0,i.taucharts_synthetic_recordid=a,i}(n,a,r))},[])},f=function(t,e){return t-e},p=function(){return Ut(o.reduce(function(t,e){return t.concat(e.map(function(t){return t[s]}))},[])).sort(f)},g=r?function(){var e=p(),n=Math.max.apply(Math,e.map(function(t){return Number(t)})),a=t.scaleX.domain(),o=v.generate(a[0],a[1],r,{utc:i}).filter(function(t){return t>=a[0]&&t<=a[1]}),s=0,u=[],l=v.get(r,{utc:i});return o.forEach(function(t){var r=Number(t);if(!(r>=n)){for(var i=s;i=0;n--)i=t[n+1],(r=t[n]).isCubicControl||i.isCubicControl||(t.splice(n+1,0,M(1/3,i,r),M(2/3,i,r)),t[n+1].isCubicControl=!0,t[n+2].isCubicControl=!0);var a=t.filter(function(t,e){return e%3==0}),o=e.filter(function(t,e){return e%3==0}),s=a.map(function(t){return t.id}),u=o.map(function(t){return t.id}),l=s.reduce(function(e,n){return e[n]=t.findIndex(function(t){return t.id===n}),e},{}),c=u.reduce(function(t,n){return t[n]=e.findIndex(function(t){return t.id===n}),t},{}),h=s.filter(function(t){return u.indexOf(t)>=0}),d=a.filter(function(t){return!t.positionIsBeingChanged}),f=o.filter(function(t){return!t.positionIsBeingChanged}),p=z(d,f),g=z(f,d),m=[];h.forEach(function(n,r){var i,a,o,s=l[n],u=c[n];if(0===r&&(s>0||u>0)&&m.push(A({polylineFrom:t.slice(0,s+1),polylineTo:e.slice(0,u+1),toOppositeScale:0===u?p:g,isCubic:!0})),r>0){var d=l[h[r-1]],f=c[h[r-1]];s-d>3||u-f>3?m.push(O({polylineFrom:t.slice(d,s+1),polylineTo:e.slice(f,u+1),isCubic:!0})):m.push((i={polylineFrom:t.slice(d,s+1),polylineTo:e.slice(f,u+1)},a=i.polylineFrom,o=i.polylineTo,function(t){return F(a.slice(1,3),o.slice(1,3),t)}))}m.push(P({pointFrom:t[s],pointTo:e[u]})),r===h.length-1&&(t.length-s-1>0||e.length-u-1>0)&&m.push(A({polylineFrom:t.slice(s),polylineTo:e.slice(u),toOppositeScale:e.length-u==1?p:g,isCubic:!0}))}),0===m.length&&(e.length>0&&0===h.length||t.length>0&&0===h.length)&&m.push(N({polylineFrom:t.slice(0),polylineTo:e.slice(0),isCubic:!0}));return function(t){var e=[];return m.forEach(function(n){var r=n(t);L(e,r)}),e}}:function(t,e){var n=(t=t.filter(function(t){return!t.isInterpolated})).map(function(t){return t.id}),r=e.map(function(t){return t.id}),i=n.filter(function(t){return r.indexOf(t)>=0}),a=t.filter(function(t){return!t.positionIsBeingChanged}),o=e.filter(function(t){return!t.positionIsBeingChanged}),s=z(a,o),u=z(o,a),l=[];i.forEach(function(a,o){var c=n.indexOf(a),h=r.indexOf(a);if(0===o&&(c>0||h>0)&&l.push(A({isCubic:!1,polylineFrom:t.slice(0,c+1),polylineTo:e.slice(0,h+1),toOppositeScale:0===h?s:u})),o>0){var d=n.indexOf(i[o-1]),f=r.indexOf(i[o-1]);(c-d>1||h-f>1)&&l.push(O({isCubic:!1,polylineFrom:t.slice(d,c+1),polylineTo:e.slice(f,h+1)}))}l.push(P({pointFrom:t[c],pointTo:e[h]})),o===i.length-1&&(t.length-c-1>0||e.length-h-1>0)&&l.push(A({isCubic:!1,polylineFrom:t.slice(c),polylineTo:e.slice(h),toOppositeScale:e.length-h==1?s:u}))}),0===l.length&&(e.length>0&&0===i.length||t.length>0&&0===i.length)&&l.push(N({isCubic:!1,polylineFrom:t.slice(0),polylineTo:e.slice(0)}));return function(t){var e=[];return l.forEach(function(n){var r=n(t);L(e,r)}),e}})(t,e)),r(i))}}function A(t){var e=t.polylineFrom,n=t.polylineTo,r=t.isCubic,i=t.toOppositeScale,a=e.length>n.length?e:n,o=1===n.length,s=e[0].id!==n[0].id,u=Boolean(s!==o);return function(t){var e=(r?j:I)({t:t,polyline:a,decreasing:o,rightToLeft:u});o===u?e.shift():e.pop();var n=F(e.map(i),e,o?1-t:t);return n.forEach(function(t){return t.positionIsBeingChanged=!0}),n}}function O(t){var e=t.polylineFrom,n=t.polylineTo,r=t.isCubic,i=e.length,a=n.length;if(a!==i){var o=a2){var i=function(t,e){for(var n,r,i=[e[0]],a=0;a0&&e0&&(t.positionIsBeingChanged=!0)}),e}}function L(t,e){return Array.prototype.push.apply(t,e)}function R(t,e,n){return void 0===e?t:"number"==typeof e?t+n*(e-t):e}function D(t,e,n){if(t===e)return e;var r={};return Object.keys(t).forEach(function(i){return r[i]=R(t[i],e[i],n)}),void 0!==e.id&&(r.id=e.id),r}function F(t,e,n){return t.map(function(t,r){return D(t,e[r],n)})}function I(t){var e=t.t,n=t.polyline,r=t.decreasing,i=t.rightToLeft,a=Boolean(r)!==Boolean(i),o=function(t,e){var n=0;if(t>0){for(var r,i,a,o,s=[0],u=0,l=1;l0){for(var i,a,o,s,u,l,c,h,d=[0],f=0,p=1;p0;a--)if((e=o[a][t])!==r)return n=s[a][t],void(d[t]=f(r,e,i,n));d[t]=function(t,e){return function(n){return n-t+e}}(r,i)}),function(t){var e=Object.assign({},t);return h.forEach(function(n){e[n]=d[n](t[n])}),e}}function B(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}function V(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=C(t,n,r,i,a);return[o[1],o[2],o[4],o[5]].forEach(function(t){return t.isCubicControl=!0}),Object.keys(a).forEach(function(e){"x"!==e&&"y"!==e&&"id"!==e&&(o[3][e]=R(n[e],a[e],t))}),o}function H(t,e){if(t.length<2)return t.slice(0);if(2===t.length)return[t[0],{x:U(t[0].x,t[1].x,1/3),y:U(t[0].y,t[1].y,1/3)},{x:U(t[0].x,t[1].x,2/3),y:U(t[0].y,t[1].y,2/3)},t[1]];for(var n,r,i,a,o,s,u,l,c,h,d,f,p,g,m=new Array(3*(t.length-1)+1),y=m.length-1,v=0;v0&&(m[3*v-2]=M(1/3,t[v-1],t[v]),m[3*v-1]=M(2/3,t[v-1],t[v]));for(var b=m.slice(0),x=0;x<3;x++){for(m[1]={x:U(m[0].x,m[3].x,1/3),y:U(m[0].y,U(m[3].y,m[2].y,1.5),2/3)},m[y-1]={x:U(m[y].x,m[y-3].x,1/3),y:U(m[y].y,U(m[y-3].y,m[y-2].y,1.5),2/3)},e&&((m[1].y-m[0].y)*(m[3].y-m[2].y)<0&&(m[1]={x:m[1].x,y:m[0].y}),(m[y-1].y-m[y].y)*(m[y-3].y-m[y-2].y)<0&&(m[y-1]={x:m[y-1].x,y:m[y].y})),v=6;vn.y==u>i.y&&(p=U(p*(g=(i.y-r.y)/(u-r.y)),p,1/(1+Math.abs(g))),d=(i.y-r.y)/p),r.y>n.y==o0?[t,e].join(" "):e,u=n(i.text(s));if(us;if(c&&i){var h=Math.floor(s/l*u.length);t[t.length-1]=u.substr(0,h-4)+"...",p=!0}return c&&!i&&t.push(e),c||(t[t.length-1]=u),t},[""]).filter(function(t){return t.length>0});h=i?-1*(m.length-1)*Math.floor(.5*r):h,m.forEach(function(t,e){return o(u,t,1.1,c,h,d,e)}),f.remove()})};var Q=function(t,e,n){return e>0&&!document.hidden&&((t=t.transition(n).duration(e)).attr=Z),t.onTransitionEnd=function(t){return nt(this,t),this},t},Z=function(t,e){var n,r=this,i=Y.transition.prototype.attr.apply(this,arguments);if(0===arguments.length)throw new Error("Unexpected `transition().attr()` arguments.");1===arguments.length?n=t:arguments.length>1&&((u={})[t]=e,n=u);var a="__transitionAttrs__",o="__lastTransitions__",s=et();this.each(function(){var t=this,e={};for(var r in n)"function"==typeof n[r]?e[r]=n[r].apply(this,arguments):e[r]=n[r];this[a]=Object.assign(this[a]||{},e),this[a][o]||Object.defineProperty(this[a],o,{value:{}}),Object.keys(e).forEach(function(e){return t[a][o][e]=s})});var u,l=function(){var t=this;this[a]&&(Object.keys(n).filter(function(e){return t[a][o][e]===s}).forEach(function(e){return delete t[a][e]}),0===Object.keys(this[a]).length&&delete this[a])};return this.on("interrupt."+s,function(){return r.each(l)}),this.on("end."+s,function(){return r.each(l)}),i},tt=0,et=function(){return++tt},nt=function(t,e){if(Y.transition.prototype.isPrototypeOf(t)&&!t.empty()){var n=function(){return e.call(null,t)};return t.on("interrupt.d3_on_transition_end",n),t.on("end.d3_on_transition_end",n),t}e.call(null,t)},rt=function(t,e,n,r){var i=r||function(t){return t},a=function(){i(this)};return function(r){var i=r;return e&&(i=i.call(ot(qt(e,n)))),i=(i=Q(i,t)).call(ot(n)),t>0?i.on("end.d3_animationInterceptor",function(){return i.each(a)}):i.each(a),i}},it=function(t,e){var n=t.node();return t.selectAll(e).filter(function(){return this.parentNode===n})},at=function(t,e,n,r,i){void 0===i&&(i="linear");var a="__pathPoints__";return function(t){var o=this;this[a]||(this[a]=n.map(function(){return[]}));var s=n.map(function(e,n){var s=Ut(t,r).map(e),u=(G(i)||G("linear"))(s),l=o[a][n];return{pointsFrom:l,pointsTo:u,interpolate:k(l,u,q(i))}});return function(t){if(0===t){var n=s.map(function(t){return t.pointsFrom});return e.apply(void 0,n)}if(1===t){var r=s.map(function(t){return t.pointsTo});return o[a]=r,e.apply(void 0,r)}var i=s.map(function(e){return e.interpolate(t)});return o[a]=i,e.apply(void 0,i)}}},ot=function(t){return function(e){return Object.keys(t).forEach(function(n){return e.attr(n,t[n])}),e}},st=function(t){return function(e){return Object.keys(t).forEach(function(n){return e.classed(n,t[n])}),e}},ut=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(t){function e(e){var n=t.call(this,e)||this;n.config=e,n.config.guide=qt(n.config.guide||{},{animationSpeed:0,enableColorToBarPosition:!1}),n.config.guide.size=n.config.guide.size||{};var r=n.config.stack,i=n.config.guide.enableColorToBarPosition,a=[e.flip&&E.get("flip"),r&&E.get("stack"),i&&E.get("positioningByColor")];return n.decorators=(n.config.transformRules||a).concat(e.transformModel||[]),n.adjusters=(n.config.adjustRules||[]).concat(e.adjustScales||[]),n}return ut(e,t),e.prototype.defineGrammarModel=function(t){var e=this,n=this.config;this.regScale("x",t("pos",n.x,[0,n.options.width])).regScale("y",t("pos",n.y,[n.options.height,0])).regScale("y",t("pos",n.y,function(t){return["ordinal","period"].indexOf(t.type)>=0?[0,n.options.height]:[n.options.height,0]})).regScale("size",t("size",n.size,{})).regScale("color",t("color",n.color,{})).regScale("split",t("split",n.split,{})).regScale("label",t("label",n.label,{})).regScale("identity",t("identity",n.identity,{}));var r=this.getScale("x"),i=this.getScale("y"),a=this.getScale("size"),o=this.getScale("label"),s=this.getScale("color"),u=this.getScale("split"),l=this.getScale("identity"),c=i.domain(),h=i.discrete?c[0]:Math.max(0,Math.min.apply(Math,c)),d=i.value(h)+.5*i.stepSize(h),f=s.domain(),p={data:function(){return e.data()},flip:!1,scaleX:r,scaleY:i,scaleSize:a,scaleLabel:o,scaleColor:s,scaleSplit:u,scaleIdentity:l,color:function(t){return s.value(t[s.dim])},label:function(t){return o.value(t[o.dim])},group:function(t){return t[s.dim]+"(@taucharts@)"+t[u.dim]},order:function(t){var e=t.split("(@taucharts@)")[0],n=f.indexOf(e);return n<0?Number.MAX_VALUE:n},size:function(t){return a.value(t[a.dim])},id:function(t){return l.value(t[l.dim],t)},xi:function(t){return r.value(t[r.dim])},yi:function(t){return i.value(t[i.dim])},y0:function(){return d}};return p.data().forEach(function(t){return p.id(t)}),p},e.prototype.getGrammarRules=function(){return this.decorators.filter(function(t){return t})},e.prototype.getAdjustScalesRules=function(){return(this.adjusters||[]).filter(function(t){return t})},e.prototype.createScreenModel=function(t){var e=t.flip,n=function(t,e,n){return t?e:n};return{flip:e,id:t.id,x:n(e,t.yi,t.xi),y:n(e,t.xi,t.yi),x0:n(e,t.y0,t.xi),y0:n(e,t.xi,t.y0),size:t.size,group:t.group,order:t.order,label:t.label,color:function(e){return t.scaleColor.toColor(t.color(e))},class:function(e){return t.scaleColor.toClass(t.color(e))},model:t,toFibers:function(){var e=Wt(t.data(),t.group);return Object.keys(e).sort(function(e,n){return t.order(e)-t.order(n)}).reduce(function(t,n){return t.concat([e[n]])},[])}}},e.prototype.drawFrames=function(){var t=this,e=this.config.options,n=function(e){return n=t.screenModel.size(e)/2,r=4,i=Math.pow(10,r),Math.round(i*n)/i;var n,r,i},r=rt,i=function(e,n,i){var a=t.config.guide.animationSpeed,s=e.selectAll("."+n).data(function(t){return[t]},t.screenModel.id);s.exit().call(r(a,null,{width:0},function(t){return o.select(t).remove()})),s.call(r(a,null,i)),s.enter().append("rect").style("stroke-width",0).call(r(a,{width:0},i))},a=this.config.flip,s=a?"y":"x",u=a?"x":"y",l=a?"x0":"y0",c=a?"height":"width",h=a?"width":"height",d=function(e){var r,a,o;i(e,"lvl-top",((r={})[c]=function(t){return n(t)},r[h]=1,r[s]=function(e){return t.screenModel[s](e)-n(e)/2},r[u]=function(e){return t.screenModel[u](e)},r.fill=function(e){return t.screenModel.color(e)},r.class=function(e){return"lvl-top "+t.screenModel.class(e)},r)),i(e,"lvl-btm",((a={})[c]=function(t){return n(t)},a[h]=1,a[s]=function(e){return t.screenModel[s](e)-n(e)/2},a[u]=function(e){return t.screenModel[l](e)},a.fill=function(e){return t.screenModel.color(e)},a.class=function(e){return"lvl-btm "+t.screenModel.class(e)},a)),i(e,"lvl-link",((o={})[c]=.5,o[h]=function(e){return Math.abs(t.screenModel[u](e)-t.screenModel[l](e))},o[s]=function(e){return t.screenModel[s](e)-.25},o[u]=function(e){return Math.min(t.screenModel[u](e),t.screenModel[l](e))},o.fill=function(e){return t.screenModel.color(e)},o.class=function(e){return"lvl-link "+t.screenModel.class(e)},o))},f=function(e){e.attr("class","frame-id-"+t.config.uid).call(function(e){var n=e.selectAll(".generic").data(function(t){return t},t.screenModel.id);n.exit().remove(),n.call(d),n.enter().append("g").attr("class","generic").call(d)})},p=Wt(this.data(),t.screenModel.group),g=Object.keys(p).sort(function(e,n){return t.screenModel.order(e)-t.screenModel.order(n)}).reduce(function(t,e){return t.concat([p[e]])},[]),m=e.container.selectAll(".frame-id-"+t.config.uid).data(g);m.exit().remove(),m.call(f),m.enter().append("g").call(f)},e}(g),ct=(Object.assign||function(t){for(var e,n=1,r=arguments.length;nthis.maxDepth)throw new Error("Exceeded max recursion depth in deep copy.");return t.populate(this.recursiveDeepCopy,e,n),this.depth--,n}},r.DeepCopier=e,r.deepCopiers=t,r.register=function(n){n instanceof e||(n=new e(n)),t.unshift(n)},r.register({canCopy:function(){return!0},create:function(t){return t instanceof t.constructor?"object"==typeof(e=t.constructor.prototype)?JSON.parse(JSON.stringify(e)):e:{};var e},populate:function(t,e,n){for(var r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}}),r.register({canCopy:function(t){return t instanceof Array},create:function(t){return new t.constructor},populate:function(t,e,n){for(var r=0;r":">",'"':""","'":"'","`":"`"},yt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},vt=/\\|'|\r|\n|\u2028|\u2029/g,bt="(?:"+Object.keys(mt).join("|")+")",xt=RegExp(bt),_t=RegExp(bt,"g"),wt={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};function Et(t){return ft(t)}function St(t){return t instanceof Date&&!isNaN(Number(t))}function Tt(t){return null!=t&&"object"==typeof t}function Mt(t){var e=parseFloat(Math.min.apply(Math,t).toFixed(15)),n=parseFloat(Math.max.apply(Math,t).toFixed(15));e===n&&(n-=(n>=0?-1:1)*(n||1)/10);for(var r=[e=Math.min(0,e),n=Math.max(0,n)],i=r[1]-r[0],a=Math.pow(10,Math.floor(Math.log(i/10)/Math.LN10)),o=10/i*a,s=[[.15,10],[.35,5],[.75,2],[1,1],[2,1]],u=-1;o>s[++u][0];);a*=s[u][1],r[0]=Math.floor(r[0]/a)*a,r[1]=Math.ceil(r[1]/a)*a;var l=e-r[0],c=r[1]-n,h=a/2;if(e<0){var d=l>=h?-l:0;r[0]=r[0]-d}if(n>0){var f=c>=h?-c:0;r[1]=r[1]+f}return[parseFloat(r[0].toFixed(15)),parseFloat(r[1].toFixed(15))]}function Ct(t,e,n){var r=(void 0===n?{utc:!1}:n).utc,i=ct.extent(t),a=i[0],o=i[1],s=+o-+a,u=r?ct.scaleUtc:ct.scaleTime;if(0===s){return a=new Date(a.getTime()-864e5),o=new Date(o.getTime()+864e5),u().domain([a,o]).nice(e).domain()}var l=u().domain([a,o]).nice(e);if(e)return l.domain();var c=u().domain([a,o]).nice(e).domain(),h=c[0],d=c[1],f=l.ticks(),p=f.length-1;return(+a-+h)/(+f[1]-+h)<.5&&(a=h),(+d-+o)/(+d-+f[p-1])<.5&&(o=d),[a,o]}var kt=0,At={};function Ot(t){var e=btoa(encodeURIComponent(t)).replace(/=/g,"_");return At.hasOwnProperty(e)||(At[e]="H"+ ++kt),At[e]}function Pt(t,e,n){var r=0,i=null,a=$t(function(t,e){return Ut(t.map(function(t){return e.reduce(function(e,n){return e.concat(St(r=t[n])?r.getTime():r);var r},[])}),function(t){return JSON.stringify(t)}).reduce(function(t,e){var n=e[0];return t[n]=t[n]||0,t[n]+=1,t},{})},function(t,e){var n=i===t?r:++r;return i=t,e.join("")+"-"+n});return function(r,i,o){var s=o.length,u=n.getSpec(),l=u.sources["/"].data,c=u.unit.units[0].guide||{};c.padding=c.padding||{l:0,r:0,t:0,b:0};var h=0;"x"===t?h=c.padding.l+c.padding.r:"y"===t&&(h=c.padding.t+c.padding.b);var d,f=(i-s*h)/(d=a(l,e),Object.keys(d).reduce(function(t,e){return t+d[e]},0));return(function(t,e){return a(l,t)[e]}(e,r)*f+h)/i}}function Nt(t){var e=!0;try{dt(t,function(t){if(0===t.type.indexOf("COORDS.")&&"COORDS.RECT"!==t.type)throw new Error("Not applicable")},function(t){return t})}catch(t){"Not applicable"===t.message&&(e=!1)}return e}function Lt(t,e,n,r){if(void 0===r&&(r=0),"requestAnimationFrame"===r){var i=!1;return function(){for(var r=[],a=0;a=r&&n.apply(this,i),t.e=o.e,t.ts=o.ts}}function Rt(t,e){var n=t[0],r=t[1],i=(r-n)/(e-1),a=e>=2?zt(e-2).map(function(t){return n+i*(t+1)}):[];return[n].concat(a,[r])}function Dt(t){return pt(t)?t:""}function Ft(t){return pt(t)?"":t}function It(t){return t/180*Math.PI}function jt(t){return Math.abs(t)>=360&&(t%=360),t<0&&(t=360+t),t}function zt(t,e){1===arguments.length&&(e=t,t=0);for(var n=[],r=t;r100}function Vt(t,e,n,r){return t+e*(-90===n?-1:1)-r>20}function Ht(t){return Array.isArray(t)?[].concat.apply([],t.map(function(t){return Ht(t)})):t}function Ut(t,e){for(var n={},r=[],i=t.length,a=e||function(t){return String(t)},o=0;o/g,">").replace(/"/g,""").replace(/'/g,"'")}var ee=" ",ne=32,re=["img","input","br","embed","link","meta","area","base","basefont","bgsound","col","command","frame","hr","image","isindex","keygen","menuitem","nextid","param","source","track","wbr","circle","ellipse","line","path","polygon","rect"].reduce(function(t,e){return t[e]=!0,t},{});function ie(t){var e=2,n=arguments[1];("object"!=typeof arguments[1]||Array.isArray(arguments[1]))&&(e=1,n={});var r=Ht(Array.prototype.slice.call(arguments,e)),i=1===r.length&&"<"!==r[0].trim()[0],a=re[t];if(a&&r.length>0)throw new Error('Tag "'+t+'" is void but content is assigned to it');var o="<"+t,s=Object.keys(n).map(function(t){return" "+t+'="'+n[t]+'"'}).join("");s.length>ne&&(s=Object.keys(n).map(function(t){return"\n"+ee+t+'="'+n[t]+'"'}).join(""));var u=i?r[0]:"\n"+r.map(function(t){return String(t).split("\n").map(function(t){return""+ee+t}).join("\n")}).join("\n")+"\n";return""+o+s+(a?"/>":">"+u+"")}function ae(t){var e=t,n={then:function(t){return e=t(e),n},result:function(){return e}};return n}var oe=[lt];function se(t){return oe.some(function(e){return t instanceof e})}function ue(t){return(t.units||[]).some(function(t){return t.hasOwnProperty("units")})}var le=document.createElement("div"),ce=new WeakMap;function he(t,e){var n;return t instanceof Node?n=t:(le.insertAdjacentHTML("afterbegin",t),n=le.childNodes[0]),e.appendChild(n),n}function de(t){if(ce.has(t))return ce.get(t);var e=t.style.overflow;t.style.overflow="scroll";var n={width:t.offsetWidth-t.clientWidth,height:t.offsetHeight-t.clientHeight};return t.style.overflow=e,ce.set(t,n),n}function fe(t,e){var n="horizontal"===(e=e||"both")||"both"===e,r="vertical"===e||"both"===e,i=de(t),a=r?i.width+"px":"0",o=n?i.height+"px":"0";t.style.overflow="hidden",t.style.padding="0 "+a+" "+o+" 0";var s=t.scrollWidth>t.clientWidth,u=t.scrollHeight>t.clientHeight,l=r&&!u?i.width+"px":"0",c=n&&!s?i.height+"px":"0";return t.style.padding="0 "+l+" "+c+" 0",t.style.overflow="",t.style.overflowX=s?"scroll":"hidden",t.style.overflowY=u?"scroll":"hidden",i}function pe(t,e){return window.getComputedStyle(t).getPropertyValue(e)}function ge(t,e){return parseInt(pe(t,e)||"0",10)}function me(t){var e=ge(t,"padding-left"),n=ge(t,"padding-right"),r=ge(t,"padding-bottom"),i=ge(t,"padding-top"),a=ge(t,"border-top-width")+ge(t,"border-left-width")+ge(t,"border-right-width")+ge(t,"border-bottom-width"),o=t.getBoundingClientRect();return{width:o.width-e-n-2*a,height:o.height-r-i-2*a}}function ye(t){var e=document.createElement("div");e.style.position="absolute",e.style.visibility="hidden",e.style.width="100px",e.style.height="100px",e.style.border="1px solid green",e.style.top="0",document.body.appendChild(e),e.innerHTML='\n \n \n '+t+"\n \n \n ";var n={width:0,height:0},r=e.querySelector(".x.axis .tick text").getBoundingClientRect();n.width=r.right-r.left,n.height=r.bottom-r.top;var i=0!==t.length?n.width/t.length:0;return n.width=n.width+1.5*i,document.body.removeChild(e),n}function ve(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a="string"==typeof n?n:n+"px",o=t.map(function(t){for(var e=0,n=0;e<=t.length-1;e++){n+=be(t.charAt(e),{fontSize:a,fontFamily:r,fontWeight:i}).width}return n}).sort(function(t,e){return e-t})[0],s=t.length,u=parseInt(a);return{width:o,height:u*s+.39*u*s}}var be=$t(function(t,e){var n=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=document.createElement("div");a.style.position="absolute",a.style.visibility="hidden",a.style.border="0px",a.style.top="0",a.style.fontSize=n,a.style.fontFamily=r,a.style.fontWeight=i,document.body.appendChild(a),a.innerHTML=" "===t?" ":t;var o={width:0,height:0},s=a.getBoundingClientRect();return o.width=s.right-s.left,o.height=s.bottom-s.top,document.body.removeChild(a),o},function(t,e){return t+"_"+JSON.stringify(e)});function xe(t,e){var n={".":function(t,e){return e.classed(t,!0)},"#":function(t,e){return e.attr("id",t)}},r=Object.keys(n).join("");if(e.indexOf(" ")>=0)throw new Error("Selector should not contain whitespaces.");if(r.indexOf(e[0])>=0)throw new Error("Selector must have tag at the beginning.");var i,a=t instanceof Element,s=a?o.select(t):t,u=function(t){return a?t.node():t},l=s.selectAll(e).filter(function(){return this.parentNode===s.node()}).filter(function(t,e){return 0===e});if(!l.empty())return u(l);for(var c,h=-1,d=null,f=1,p=e.length;f<=p;f++)(f==p||r.indexOf(e[f])>=0)&&(c=e.substring(h+1,f),h<0?i=s.append(c):n[d].call(null,c,i),d=e[f],h=f);return u(i)}function _e(t,e){return we(t,e)[0]||null}function we(t,e){for(var n=[],r=Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=t.firstElementChild;Boolean(i);i=i.nextElementSibling)r.call(i,e)&&n.push(i);return n}function Ee(t,e){if(t.childElementCount>0){var n,r,i=Array.prototype.filter.call(t.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}),a=i.slice().sort(e),o=i.reduce(function(t,e,n){return t.set(e,n),t},new Map),s=a.reduce(function(t,e,i){var s=o.get(e),u=i-s;return u!==r&&(n&&t.push(n),r=u,n={from:s,to:i,elements:[]}),n.elements.push(e),i===a.length-1&&t.push(n),t},[]),u=s.slice().sort(function(t,e){return t.from-e.from}),l=u.reduce(function(t,e,n){return t.set(e,n),t},new Map),c=function(t){for(var e,n,r,i=s.map(function(t,e){return{elements:t.elements,from:l.get(t),to:e}}).sort(Kt(function(t,e){return t.elements.length-e.elements.length},t?function(t,e){return e.to-t.to}:function(t,e){return t.to-e.to})),a=0;an.to)for(e=a+1;e=n.to&&r.fromn.from&&r.from<=n.to&&r.from--}return i.filter(function(t){return t.from!==t.to})},h=c(!0),d=c(!1),f=h.length=0?"h":"v"}function Ae(t){var e={x:0,y:0},n=t.indexOf("translate(");if(n>=0){var r=t.indexOf(")",n+10),i=t.substring(n+10,r).trim().replace(","," ").replace(/\s+/," ").split(" ");e.x=parseFloat(i[0]),i.length>1&&(e.y=parseFloat(i[1]))}return e}function Oe(t,e,n,r,i,a,o,s){var u,l,c,h,d,f;return f=((c=o-i)*(e-a)-(h=s-a)*(t-i))/(-c*(l=r-e)+(u=n-t)*h),(d=(-l*(t-i)+u*(e-a))/(-c*l+u*h))>=0&&d<=1&&f>=0&&f<=1}function Pe(t){for(var e,n,r={x:0,y:0},i=t;i&&"SVG"!==i.nodeName.toUpperCase();)(n=i.getAttribute("transform"))&&(e=Ae(n),r.x+=e.x,r.y+=e.y),i=i.parentNode;return r}function Ne(t,e,n){var r=t.selectAll(e).filter(n);if(!r.empty()){var i=o.select(r.node().parentNode).selectAll(e).filter(function(t){return!n(t)}).nodes(),a=i[i.length-1];if(a){var s=Array.prototype.indexOf.call(a.parentNode.childNodes,a),u=a.nextSibling;r.each(function(){Array.prototype.indexOf.call(this.parentNode.childNodes,this)>s||this.parentNode.insertBefore(this,u)})}}}var Le=function(t){return St(t)?t.getTime():t},Re={cross:function(t,e,n){var r=t(),i=Ut(r.map(function(t){return t[e]}),Le),a=Ut(r.map(function(t){return t[n]}),Le),o=0===i.length?[null]:i;return(0===a.length?[null]:a).reduce(function(t,r){return t.concat(o.map(function(t){var i={};return e&&(i[e]=Le(t)),n&&(i[n]=Le(r)),i}))},[])},cross_period:function(t,e,n,r,i,a){var o=t(),s=!!a&&a.utcTime,u=Ut(o.map(function(t){return t[e]}),Le),l=Ut(o.map(function(t){return t[n]}),Le),c=0===u.length?[null]:u,h=0===l.length?[null]:l;return r&&(c=v.generate(Math.min.apply(Math,u),Math.max.apply(Math,u),r,{utc:s})),i&&(h=v.generate(Math.min.apply(Math,l),Math.max.apply(Math,l),i,{utc:s})),h.reduce(function(t,r){return t.concat(c.map(function(t){var i={};return e&&(i[e]=Le(t)),n&&(i[n]=Le(r)),i}))},[])},groupBy:function(t,e){return Ut(t().map(function(t){return t[e]}),Le).map(function(t){return(n={})[e]=Le(t),n;var n})},none:function(){return[null]}},De=function(){function t(t,e,n){var r=t.key,i=t.pipe,a=t.source,o=t.units;void 0===n&&(n={}),this.key=r,this.pipe=i||[],this.source=a,this.units=o,this._frame={key:r,source:a,pipe:this.pipe},this._data=e,this._pipeReducer=function(t,e){return n[e.type](t,e.args)}}return t.prototype.hash=function(){return Ot([this._frame.pipe,this._frame.key,this._frame.source].map(function(t){return JSON.stringify(t)}).join(""))},t.prototype.full=function(){return this._data},t.prototype.part=function(t){return void 0===t&&(t=function(t){return t}),this._frame.pipe.map(t).reduce(this._pipeReducer,this._data)},t}(),Fe=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ie=function(t){return St(t)?t.getTime():t},je=function(t){var e=this;Object.keys(t).forEach(function(n){return e[n]=t[n]})},ze=function(t,e,n){return t.map(function(t){return"string"==typeof t?n.get(t):t}).filter(function(t){return t}).reduce(function(t,e){return n=t,void 0===(r=e(t,{}))&&(r={}),Object.assign(new je(n),r);var n,r},e)},Be=function(t){function e(e,n,r,i){var a=t.call(this)||this;return qt(e.scales,{size_null:{type:"size",source:"?"},split_null:{type:"value",source:"?"},label_null:{type:"value",source:"?"},color_null:{type:"color",source:"?"},identity_null:{type:"identity",source:"?"},"size:default":{type:"size",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"},"label:default":{type:"value",source:"?"},"identity:default":{type:"identity",source:"?"}}),e.settings=e.settings||{},a.config=e,a.sources=e.sources,a.scales=e.scales,a.unitSet=r,a.grammarRules=i,a.scalesHub=n,a.transformations=Object.assign(e.transformations||{},{where:function(t,e){var n=Object.keys(e||{}).map(function(t){return function(n){return Ie(n[t])===e[t]}});return t.filter(function(t){return n.every(function(e){return e(t)})})}}),a}return Fe(e,t),e.traverseSpec=function(t,e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null);var a=[],o=function(t,e,n,r,i){a.push(function(){e(t,r,i)}),t.frames&&t.frames.forEach(function(r){(r.units||[]).map(function(i){return o(i,e,n,t,r)})}),a.push(function(){return n(t,r,i)})};return o(t.unit,e,n,r,i),a},e.prototype.unfoldStructure=function(){return this.root=this._expandUnitsStructure(this.config.unit),this.config},e.prototype.getDrawScenarioQueue=function(t){var e=this,n=this.grammarRules,r=this._flattenDrawScenario(t,function(t,r,i){var a=!1===r.expression.inherit?null:i,o=e._createFrameScalesFactoryMethod(a),s=e.unitSet.create(r.type,Object.assign({},r,{options:t.allocateRect(i.key)})),u=new je(s.defineGrammarModel(o)),l=ze(s.getGrammarRules(),u,n);return ze(s.getAdjustScalesRules(),l,n),s.node().screenModel=s.createScreenModel(l),s}),i=this._flattenDrawScenario(t,function(t,r,i){var a=!1===r.expression.inherit?null:i,o=e._createFrameScalesFactoryMethod(a),s=e.unitSet.create(r.type,Object.assign({},r,{options:t.allocateRect(i.key)})),u=new je(s.defineGrammarModel(o)),l=ze(s.getGrammarRules(),u,n);return s.node().screenModel=s.createScreenModel(l),s.parentUnit=t,s.addInteraction(),s});return r.concat(function(){Object.keys(e.scales).forEach(function(t){return e.scalesHub.createScaleInfo(e.scales[t]).commit()})}).concat(i)},e.prototype._flattenDrawScenario=function(t,n){var r={},i=[],a=[t],o=e.traverseSpec({unit:this.root},function(t,e,o){var s;t.uid=(s=Ot((e?e.uid+"/":"")+JSON.stringify(Object.keys(t).filter(function(e){return"string"==typeof t[e]}).reduce(function(e,n){return e[n]=t[n],e},{}))+"-"+JSON.stringify(o.pipe)),r.hasOwnProperty(s)?s+="-"+ ++r[s]:r[s]=0,s),t.guide=Et(t.guide);var u,l=n(a[0],t,o);i.push(l),0===t.type.indexOf("COORDS.")&&(u=l,a.unshift(u))},function(t){0===t.type.indexOf("COORDS.")&&a.shift()},null,this._datify({source:this.root.expression.source,pipe:[]}));return o.push(function(){return i}),o},e.prototype._expandUnitsStructure=function(t,e){var n=this;void 0===e&&(e=[]);var r=this;if(!1===t.expression.operator)t.frames=t.frames.map(function(t){return r._datify(t)});else{var i=this._parseExpression(t.expression,e,t.guide);t.transformation=t.transformation||[],t.frames=i.exec().map(function(n){var a=(i.inherit?e:[]).concat([{type:"where",args:n}]).concat(t.transformation);return r._datify({key:n,pipe:a,source:i.source,units:t.units?t.units.map(function(t){var e=Et(t);return e.guide=t.guide,e}):[]})})}return t.frames.forEach(function(t){return t.units.forEach(function(e){return n._expandUnitsStructure(e,t.pipe)})}),t},e.prototype._createFrameScalesFactoryMethod=function(t){var e=this;return function(n,r,i){var a=r||n+":default";return e.scalesHub.createScaleInfo(e.scales[a],t).create("function"==typeof i?i(e.scales[a]):i)}},e.prototype._datify=function(t){return new De(t,this.sources[t.source].data,this.transformations)},e.prototype._parseExpression=function(t,e,n){var r=this,i=t.operator||"none",a=t.source,o=!1!==t.inherit,s=t.params,u={source:a,pipe:o?e:[]},l=Re[i];if(!l)throw new Error(i+" operator is not supported");return{source:a,inherit:o,func:l,args:s,exec:function(){return l.apply(void 0,[function(){return r._datify(u).part()}].concat(s||[],[n]))}}},e}(f),Ve="tau-chart__",He=n(10),Ue=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();He.Tooltip.defaults.baseClass=Ve+"tooltip";var We=["top","bottom"];var Xe,Ge,qe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ue(e,t),e.prototype._pickPlace=function(t){if(!this.options.auto)return this.options.place;var e,n,r,i,a,o,s,u,l=0|this.options.winBound,c=(e=l,r=window,i=document.documentElement,a=(r.pageYOffset||i.scrollTop)-i.clientTop,o=(r.pageXOffset||i.scrollLeft)-i.clientTop,s=r.innerWidth||i.clientWidth,u=r.innerHeight||i.clientHeight,{top:(n={top:a,right:o+s,bottom:a+u,left:o,width:s,height:u}).top+e,right:n.right-e,bottom:n.bottom-e,left:n.left+e,width:n.width-2*e,height:n.height-2*e}),h=this.options.place.split("-"),d=this.spacing;if(-1!==We.indexOf(h[0]))switch(t.top-this.height-d<=c.top?h[0]="bottom":t.bottom+this.height+d>=c.bottom&&(h[0]="top"),h[1]){case"left":t.right-this.width<=c.left&&(h[1]="right");break;case"right":t.left+this.width>=c.right&&(h[1]="left");break;default:t.left+t.width/2+this.width/2>=c.right?h[1]="left":t.right-t.width/2-this.width/2<=c.left&&(h[1]="right")}else switch(t.left-this.width-d<=c.left?h[0]="right":t.right+this.width+d>=c.right&&(h[0]="left"),h[1]){case"top":t.bottom-this.height<=c.top&&(h[1]="bottom");break;case"bottom":t.top+this.height>=c.bottom&&(h[1]="top");break;default:t.top+t.height/2+this.height/2>=c.bottom?h[1]="top":t.bottom-t.height/2-this.height/2<=c.top&&(h[1]="bottom")}return h.join("-")},e}(He.Tooltip),Ye=function(){function t(t,e){this.chart=e,this.handlers=new Map,this.plugins=t.map(this.initPlugin,this)}return t.prototype.initPlugin=function(t){var e=this;t.init&&t.init(this.chart);var n=[];this.handlers.set(t,n);var r=function(r,i){n.push(e.chart.on(r,i,t))};return t.destroy&&r("destroy",t.destroy.bind(t)),Object.keys(t).forEach(function(e){if(0===e.indexOf("on")){var n=e.substr(2).toLowerCase();r(n,t[e].bind(t))}}),t},t.prototype.destroyPlugin=function(t){var e=this;t.destroy&&t.destroy(),this.handlers.get(t).forEach(function(n){e.chart.removeHandler(n,t)})},t.prototype.destroy=function(){var t=this;this.plugins.forEach(function(e){return t.destroyPlugin(e)})},t}(),$e={},Ke={},Je={reg:function(t,e,n){return n?(Ke[t]=n,$e[t]=function(t,e){this.___tauchartsseed___=new e(this.init(t))},$e[t].prototype=Object.assign({init:function(t){return t},defineGrammarModel:function(t){return this.node().defineGrammarModel(t)},getGrammarRules:function(t){return this.node().getGrammarRules(t)},getAdjustScalesRules:function(t){return this.node().getAdjustScalesRules(t)},createScreenModel:function(t){return this.node().createScreenModel(t)},addInteraction:function(){this.node().addInteraction()},node:function(){return this.___tauchartsseed___},draw:function(){this.node().draw()}},e)):$e[t]=e,this},get:function(t){if(!$e.hasOwnProperty(t))throw new x("Unknown unit type: "+t,_.UNKNOWN_UNIT_TYPE);return $e[t]},create:function(t,e){var n,r=this.get(t);Ke[t]?n=new r(e,this.get(Ke[t])):n=new r(e);return n}},Qe={},Ze={},tn={reg:function(t,e,n){return void 0===n&&(n=function(t){return t}),Qe[t]=e,Ze[t]=n,tn},get:function(t){return Qe[t]},instance:function(t){return void 0===t&&(t={}),{create:function(e,n,r){return new(tn.get(e))(n,(0,Ze[e])(r,t))}}}},en=function(){function t(t,e,n){this.registry=t,this.sources=e,this.scales=n}return t.prototype.createScaleInfo=function(t,e){void 0===e&&(e=null);var n=t.dim,r=t.source,i=(this.sources[r].dims[n]||{}).type,a=this.sources[r].data,o=e||new De({source:r},a);return t.dimType=i,this.registry.create(t.type,o,t)},t.prototype.createScaleInfoByName=function(t,e){return void 0===e&&(e=null),this.createScaleInfo(this.scales[t],e)},t}(),nn=function(t,e,n){var r=!0,i=null;try{t.reduce(function(t,r){var a=function(t,e){var n=r[e],i=Tt(n)?JSON.stringify(n):n;return t.push(i),t},o=e.reduce(a,[]).join("/"),s=n.reduce(a,[]).join("/");if(t.hasOwnProperty(o)){var u=t[o];if(u!==s)throw i={type:"RelationIsNotAFunction",keyX:e.join("/"),keyY:n.join("/"),valX:o,errY:[u,s]},new Error("RelationIsNotAFunction")}else t[o]=s;return t},{})}catch(t){if("RelationIsNotAFunction"!==t.message)throw t;r=!1}return{result:r,error:i}},rn=function(t,e){var n=Object.keys(t).reduce(function(e,n){var r=t[n];return r.hasOwnProperty("hasNull")&&!r.hasNull||"measure"!==r.type&&"period"!==r.scale||e.push(n),e},[]);return function(t){var r=!n.some(function(e){return!t.hasOwnProperty(e)||null===t[e]});return r||e(t),r}},an=function(t){var e={category:"ordinal",order:"ordinal",measure:"linear"},n={};return Object.keys(t).forEach(function(r){var i=t[r],a=(i.type||"category").toLowerCase();n[r]=Object.assign({},i,{type:a,scale:i.scale||e[a],value:i.value})}),n},on=function(t){var e={type:"category",scale:"ordinal"};return t.reduce(function(t,n){return Object.keys(n).forEach(function(r){var i=n.hasOwnProperty(r)?n[r]:null;if(t[r]=t[r]||{type:null,hasNull:!1},null===i)t[r].hasNull=!0;else{var a=function(t,e){var n=e;return St(t)?(n.type="measure",n.scale="time"):Tt(t)?(n.type="order",n.scale="ordinal"):Number.isFinite(t)&&(n.type="measure",n.scale="linear"),n}(i,Et(e)),o=a.type,s=a.scale,u=null!==t[r].type&&t[r].type!==o;t[r].type=u?e.type:o,t[r].scale=u?e.scale:s}}),t},{})},sn=function(t,e,n){var r=t,i=["period","time"].indexOf(n.scale)>=0?function(t){return new Date(t)}:function(t){return t},a=t.reduce(function(t,e,n){return t.set(e,n),t},new Map);if("measure"===n.type||"period"===n.scale)r=t.slice().sort(Kt(function(t,n){return i(t[e])-i(n[e])},function(t,e){return a.get(t)-a.get(e)}));else if(n.order){var o=n.order.reduce(function(t,e,n){return t[e]=n,t},{}),s=n.order.length,u="(___"+e+"___)";r=t.map(function(t){var n=o[t[e]];return n=n>=0?n:s,t[u]=n,t}).sort(Kt(function(t,e){return t[u]-e[u]},function(t,e){return a.get(t)-a.get(e)})).map(function(t){return delete t[u],t})}return r},un=function(t,e){var n=document.createElement("div");return n.classList.add(Ve+t),e&&e.appendChild(n),n},ln=function(){var t=un("layout"),e=un("layout__header",t),n=un("layout__container",t),r=un("layout__sidebar",n),i=un("layout__content",n),a=un("layout__content__wrap",i),o=un("layout__sidebar-right",n);return{layout:t,header:e,content:a,contentContainer:i,leftSidebar:r,rightSidebar:un("layout__sidebar-right__wrap",o),rightSidebarContainer:o,footer:un("layout__footer",t)}},cn=function(){function t(t){this.spec=t,this.dist={sources:{"?":{dims:{},data:[{}]},"/":{dims:{},data:[]}},scales:{x_null:{type:"ordinal",source:"?"},y_null:{type:"ordinal",source:"?"},size_null:{type:"size",source:"?"},color_null:{type:"color",source:"?"},split_null:{type:"value",source:"?"},"pos:default":{type:"ordinal",source:"?"},"size:default":{type:"size",source:"?"},"label:default":{type:"value",source:"?"},"color:default":{type:"color",source:"?"},"split:default":{type:"value",source:"?"}},settings:t.settings}}return t.prototype.convert=function(){var t=this.spec,e=this.dist;return this.ruleAssignSourceDims(t,e),this.ruleAssignStructure(t,e),this.ruleAssignSourceData(t,e),this.ruleApplyDefaults(e),e},t.prototype.ruleApplyDefaults=function(t){var e=t.settings||{},n=function(t,e,r){e(t,r),(t.units||[]).map(function(r){return n(r,e,t)})};n(t.unit,function(t,n){if(t.namespace="chart",t.guide=qt(t.guide||{},{animationSpeed:e.animationSpeed||0,utcTime:e.utcTime||!1}),n&&!t.hasOwnProperty("units")){t=qt(t,{x:n.x,y:n.y});var r=Et(n.guide)||{};t.guide.x=qt(t.guide.x||{},r.x),t.guide.y=qt(t.guide.y||{},r.y),t.expression.inherit=n.expression.inherit}return!n||t.guide&&t.guide.hasOwnProperty("obsoleteVerticalStackOrder")||(t.guide=Object.assign(t.guide||{},{obsoleteVerticalStackOrder:(n.guide||{}).obsoleteVerticalStackOrder})),t},null)},t.prototype.ruleAssignSourceData=function(t,e){var n=t.spec.dimensions||{},r=e.sources["/"].dims,i=function(t,e){var n=t[e];return Tt(n)&&!St(n)&&Object.keys(n).forEach(function(r){return t[e+"."+r]=n[r]}),t};e.sources["/"].data=t.data.map(function(t){var e=Object.keys(t).reduce(i,t);return Object.keys(r).reduce(function(t,e){return t.hasOwnProperty(e)||(t[e]=null),null!==t[e]&&n[e]&&["period","time"].indexOf(n[e].scale)>=0&&(t[e]=new Date(t[e])),t},e)})},t.prototype.ruleAssignSourceDims=function(t,e){var n=t.spec.dimensions;e.sources["/"].dims=Object.keys(n).reduce(function(t,e){return t[e]={type:n[e].type},t},{})},t.prototype.ruleAssignStructure=function(t,e){var n=this,r=function(t){var i=Et(Yt(t,"unit"));return n.ruleCreateScales(t,i,e.settings),i.expression=n.ruleInferExpression(t),t.unit&&(i.units=t.unit.map(r)),i},i=r(t.spec.unit);i.expression.inherit=!1,e.unit=i},t.prototype.ruleCreateScales=function(t,e,n){var r=this,i=t.guide||{};["identity","color","size","label","x","y","split"].forEach(function(a){t.hasOwnProperty(a)&&(e[a]=r.scalesPool(a,t[a],i[a]||{},n))})},t.prototype.ruleInferDim=function(t,e){var n=t,r=this.spec.spec.dimensions;if(!r.hasOwnProperty(n))return n;e.hasOwnProperty("tickLabel")?n=t+"."+e.tickLabel:r[t].value&&(n=t+"."+r[t].value);var i=this.dist.sources["/"].dims;return i.hasOwnProperty(n)||(i[n]={type:i[t].type},delete i[t]),n},t.prototype.scalesPool=function(t,e,n,r){var i=t+"_"+e;if(this.dist.scales.hasOwnProperty(i))return i;var a=this.spec.spec.dimensions,o={};if("color"===t&&null!==e&&(o={type:"color",source:"/",dim:this.ruleInferDim(e,n)},n.hasOwnProperty("brewer")&&(o.brewer=n.brewer),a[e]&&a[e].hasOwnProperty("order")&&(o.order=a[e].order),n.hasOwnProperty("min")&&(o.min=n.min),n.hasOwnProperty("max")&&(o.max=n.max),n.hasOwnProperty("nice")&&(o.nice=n.nice)),"size"===t&&null!==e&&(o={type:"size",source:"/",dim:this.ruleInferDim(e,n)},n.hasOwnProperty("func")&&(o.func=n.func),n.hasOwnProperty("min")&&(o.min=n.min),n.hasOwnProperty("max")&&(o.max=n.max),n.hasOwnProperty("minSize")&&(o.minSize=n.minSize),n.hasOwnProperty("maxSize")&&(o.maxSize=n.maxSize)),"label"===t&&null!==e&&(o={type:"value",source:"/",dim:this.ruleInferDim(e,n)}),"split"===t&&null!==e&&(o={type:"value",source:"/",dim:this.ruleInferDim(e,n)}),"identity"===t&&null!==e&&(o={type:"identity",source:"/",dim:this.ruleInferDim(e,n)}),a.hasOwnProperty(e)&&("x"===t||"y"===t)){if(o={type:a[e].scale,source:"/",dim:this.ruleInferDim(e,n)},a[e].hasOwnProperty("order")&&(o.order=a[e].order),n.hasOwnProperty("min")&&(o.min=n.min),n.hasOwnProperty("max")&&(o.max=n.max),n.hasOwnProperty("autoScale")?o.autoScale=n.autoScale:o.autoScale=!0,n.hasOwnProperty("nice")?o.nice=n.nice:o.nice=o.autoScale,n.hasOwnProperty("niceInterval")?o.niceInterval=n.niceInterval:o.niceInterval=null,n.hasOwnProperty("tickPeriod")&&(o.period=n.tickPeriod,o.type="period"),n.hasOwnProperty("tickPeriod")&&n.hasOwnProperty("timeInterval"))throw new Error('Use "tickPeriod" for period scale, "timeInterval" for time scale, but not both');if(n.hasOwnProperty("timeInterval")){o.period=n.timeInterval,o.type="time";var s=v.get(o.period,{utc:r.utcTime});n.hasOwnProperty("min")&&(o.min=s.cast(new Date(n.min))),n.hasOwnProperty("max")&&(o.max=s.cast(new Date(n.max)))}o.fitToFrameByDims=n.fitToFrameByDims,o.ratio=n.ratio}return this.dist.scales[i]=o,i},t.prototype.getScaleConfig=function(t,e){var n=t+"_"+e;return this.dist.scales[n]},t.prototype.ruleInferExpression=function(t){var e={operator:"none",params:[]},n=t.guide||{},r=n.x||{},i=n.y||{},a=this.getScaleConfig("x",t.x),o=this.getScaleConfig("y",t.y);return 0===t.type.indexOf("ELEMENT.")?t.color&&(e={operator:"groupBy",params:[this.ruleInferDim(t.color,n.color||{})]}):"COORDS.RECT"===t.type&&1===t.unit.length&&"COORDS.RECT"===t.unit[0].type&&(e=a.period||o.period?{operator:"cross_period",params:[this.ruleInferDim(t.x,r),this.ruleInferDim(t.y,i),a.period,o.period]}:{operator:"cross",params:[this.ruleInferDim(t.x,r),this.ruleInferDim(t.y,i)]}),Object.assign({inherit:!0,source:"/"},e)},t}(),hn=n(9),dn=n(8),fn=(Object.assign||function(t){for(var e,n=1,r=arguments.length;nt.computed?{value:n,computed:r}:t},{}).value;return n(e(a))},Mn=function(t,e){var n=t.dimType,r=t.scaleType,i=[n,r,"*"].join(":"),a=[n,r].join(":");return e[i]||e[a]||e[n]||null},Cn=function(t,e,n){return t.hasOwnProperty(e+":"+n)?t[e+":"+n]:t[""+e]},kn=function(t,e){return["day","week","month"].indexOf(t)>=0&&(t+="-short"+(e?"-utc":"")),t},An=function(t,e){var n=t.width,r=t.height,i=Math.abs(It(e));return{width:Math.max(Math.cos(i)*n,r),height:Math.max(Math.sin(i)*n,r)}},On=function(t,e){void 0===e&&(e="x");var n=jt(t),r="x"===e?[[0,45,"middle"],[45,135,"start"],[135,225,"middle"],[225,315,"end"],[315,360,"middle"]]:[[0,90,"end"],[90,135,"middle"],[135,225,"start"],[225,315,"middle"],[315,360,"end"]];return r[r.findIndex(function(t){return n>=t[0]&&ne.xAxisTickLabelLimit&&(t.x.tickFormatWordWrap=!0,t.x.tickFormatWordWrapLines=e.xTickWordWrapLinesLimit,d=Pn(c,e.xAxisTickLabelLimit,e.xTickWordWrapLinesLimit)),h.width>e.yAxisTickLabelLimit&&(t.y.tickFormatWordWrap=!0,t.y.tickFormatWordWrapLines=e.yTickWordWrapLinesLimit,f=Pn(h,e.yAxisTickLabelLimit,e.yTickWordWrapLinesLimit)),a&&(t.y.tickFormatWordWrap=!1,t.y.tickFormatWordWrapLines=1,(f=Pn(h,2*e.yAxisTickLabelLimit,1)).width=20);var p=u?0:1,g=l?0:1,m=t.x.label,y=t.y.label,v=m.text&&!m.hide?1:0,b=y.text&&!y.hide?1:0,x=An(d,t.x.rotate),_=An(f,t.y.rotate);i?(m.padding=(-e.xAxisPadding-e.xFontLabelHeight)/2+e.xFontLabelHeight,m.paddingNoTicks=m.padding,y.padding=(-e.yAxisPadding-e.yFontLabelHeight)/2,y.paddingNoTicks=y.padding,v=0,b=0):(m.padding=xn([p*(e.xTickWidth+x.height),v*(e.distToXAxisLabel+e.xFontLabelHeight)]),m.paddingNoTicks=v*(e.distToXAxisLabel+e.xFontLabelHeight),y.padding=xn([g*(e.yTickWidth+_.width),b*e.distToYAxisLabel]),y.paddingNoTicks=b*e.distToYAxisLabel),a&&(y.padding=0,y.paddingNoTicks=0);var w=e.xFontLabelDescenderLineHeight;return t.padding=Object.assign(t.padding,{b:t.x.hide?0:xn([t.x.padding,p*(e.xTickWidth+x.height),v*(e.distToXAxisLabel+e.xFontLabelHeight+w)]),l:t.y.hide?0:xn([t.y.padding,a?0:g*(e.yTickWidth+_.width),b*(e.distToYAxisLabel+e.yFontLabelHeight)])}),t.paddingNoTicks=Object.assign({},t.paddingNoTicks,{b:t.x.hide?0:xn([t.x.padding,v*(e.distToXAxisLabel+e.xFontLabelHeight+w)]),l:t.y.hide?0:xn([t.y.padding,b*(e.distToYAxisLabel+e.yFontLabelHeight)])}),t.x=Object.assign(t.x,{density:x.width+2*Cn(e,"xDensityPadding",n.dimType),tickFontHeight:c.height,$minimalDomain:o.length,$maxTickTextW:d.width,$maxTickTextH:d.height,tickFormatWordWrapLimit:e.xAxisTickLabelLimit}),t.y=Object.assign(t.y,{density:_.height+2*Cn(e,"yDensityPadding",r.dimType),tickFontHeight:h.height,$minimalDomain:s.length,$maxTickTextW:f.width,$maxTickTextH:f.height,tickFormatWordWrapLimit:e.yAxisTickLabelLimit}),t}var Ln=function(t){var e=t.unit,n=t.meta,r=t.settings,i=t.allowXVertical,a=t.allowYVertical,o=t.inlineLabels,s=n.dimension(e.x),u=n.dimension(e.y),l=n.scaleMeta(e.x,e.guide.x),c=n.scaleMeta(e.y,e.guide.y),h=l.isEmpty,d=c.isEmpty;e.guide.x.tickFormat=kn(e.guide.x.tickFormat||Mn(s,r.defaultFormats),r.utcTime),e.guide.y.tickFormat=kn(e.guide.y.tickFormat||Mn(u,r.defaultFormats),r.utcTime);var f=!!i&&!("measure"===s.dimType),p=!!a&&!("measure"===u.dimType);if(e.guide.x.padding=h?0:r.xAxisPadding,e.guide.x.paddingNoTicks=e.guide.x.padding,e.guide.y.padding=d?0:r.yAxisPadding,e.guide.y.paddingNoTicks=e.guide.y.padding,e.guide.x.rotate=f?-90:0,e.guide.x.textAnchor=On(e.guide.x.rotate,"x"),e.guide.y.rotate=p?-90:0,e.guide.y.textAnchor=On(e.guide.y.rotate,"y"),e.guide=Nn(e.guide,r,l,c,o,ue(e)),o){var g=e.guide.x.label,m=e.guide.y.label;g.cssClass+=" inline",g.dock="right",g.textAnchor="end",m.cssClass+=" inline",m.dock="right",m.textAnchor="end"}return e},Rn={NONE:function(t,e,n){var r=Et(t);return Dn(Et(r.unit),r.unit,function(t,e){return e.guide.x.tickFontHeight=n.getAxisTickLabelSize("X").height,e.guide.y.tickFontHeight=n.getAxisTickLabelSize("Y").height,e.guide.x.tickFormatWordWrapLimit=n.xAxisTickLabelLimit,e.guide.y.tickFormatWordWrapLimit=n.yAxisTickLabelLimit,e}),r},"BUILD-LABELS":function(t,e){var n=Et(t),r=[],i=[],a=null,o=null;ht(n.unit,"units",Sn,function(t,n){if(t.isLeaf)return n;!a&&n.x&&(a=n),!o&&n.y&&(o=n),n.guide=n.guide||{},n.guide.x=n.guide.x||{label:{text:""}},n.guide.y=n.guide.y||{label:{text:""}},n.guide.x.label=Tt(n.guide.x.label)?n.guide.x.label:{text:n.guide.x.label&&n.guide.x.label.text?n.guide.x.label.text:""},n.guide.y.label=Tt(n.guide.y.label)?n.guide.y.label:{text:n.guide.y.label&&n.guide.y.label.text?n.guide.y.label.text:""},n.x&&(n.guide.x.label.text=n.guide.x.label.text||e.dimension(n.x).dimName),n.y&&(n.guide.y.label.text=n.guide.y.label.text||e.dimension(n.y).dimName);var s=n.guide.x.label.text;s&&(r.push(s),n.guide.x.tickFormatNullAlias=n.guide.x.hasOwnProperty("tickFormatNullAlias")?n.guide.x.tickFormatNullAlias:"No "+s,n.guide.x.label.text="",n.guide.x.label._original_text=s);var u=n.guide.y.label.text;return u&&(i.push(u),n.guide.y.tickFormatNullAlias=n.guide.y.hasOwnProperty("tickFormatNullAlias")?n.guide.y.tickFormatNullAlias:"No "+u,n.guide.y.label.text="",n.guide.y.label._original_text=u),n});return a&&(a.guide.x.label.text=a.guide.x.label.hide?"":r.join(" → ")),o&&(o.guide.y.label.text=o.guide.y.label.hide?"":i.join(" → ")),n},"BUILD-GUIDE":function(t,e,n){var r=Et(t);return Dn(Et(r.unit),r.unit,function(t,r){if(t.isLeaf)return r;var i=!t.isLeaf&&!t.isLeafParent,a=e.scaleMeta(r.x,r.guide.x),o=e.scaleMeta(r.y,r.guide.y),s=!i&&Boolean(a.dimType)&&"measure"!==a.dimType;return r.guide.x.rotate=s?-90:0,r.guide.x.textAnchor=On(r.guide.x.rotate),r.guide.x.tickFormat=r.guide.x.tickFormat||Mn(a,n.defaultFormats),r.guide.y.tickFormat=r.guide.y.tickFormat||Mn(o,n.defaultFormats),r.guide.x.padding=i?0:n.xAxisPadding,r.guide.x.paddingNoTicks=r.guide.x.padding,r.guide.y.padding=i?0:n.yAxisPadding,r.guide.y.paddingNoTicks=r.guide.y.padding,r.guide=Nn(r.guide,qt({distToXAxisLabel:a.isEmpty?n.xTickWidth:n.distToXAxisLabel,distToYAxisLabel:o.isEmpty?n.yTickWidth:n.distToYAxisLabel},n),a,o,null,ue(r)),r.guide.x=Object.assign(r.guide.x,{cssClass:i?r.guide.x.cssClass+" facet-axis":r.guide.x.cssClass,avoidCollisions:!!i||r.guide.x.avoidCollisions}),r.guide.y=Object.assign(r.guide.y,{cssClass:i?r.guide.y.cssClass+" facet-axis":r.guide.y.cssClass,avoidCollisions:!i&&r.guide.y.avoidCollisions}),r.guide=Object.assign(r.guide,{showGridLines:r.guide.hasOwnProperty("showGridLines")?r.guide.showGridLines:t.isLeafParent?"xy":""}),r}),r},"BUILD-COMPACT":function(t,e,n){var r=Et(t);return Dn(Et(r.unit),r.unit,function(t,r){return t.isLeaf?r:(r.guide.hasOwnProperty("showGridLines")||(r.guide.showGridLines=t.isLeafParent?"xy":""),t.isLeafParent?Ln({unit:r,meta:e,settings:qt({xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},n),allowXVertical:!0,allowYVertical:!1,inlineLabels:!0}):(r.guide.x.cssClass+=" facet-axis compact",r.guide.x.avoidCollisions=!0,r.guide.y.cssClass+=" facet-axis compact",r.guide.y.avoidCollisions=!0,Ln({unit:r,meta:e,settings:qt({xAxisPadding:0,yAxisPadding:0,distToXAxisLabel:0,distToYAxisLabel:0,xTickWordWrapLinesLimit:1,yTickWordWrapLinesLimit:1},n),allowXVertical:!1,allowYVertical:!0,inlineLabels:!1})))}),r},AUTO:function(t,e,n){return["BUILD-LABELS","BUILD-GUIDE"].reduce(function(t,r){return Rn[r](t,e,n)},t)},COMPACT:function(t,e,n){return["BUILD-LABELS","BUILD-COMPACT"].reduce(function(t,r){return Rn[r](t,e,n)},t)}},Dn=function(t,e,n){var r,i=((r=e).options=r.options||{},r.guide=r.guide||{},r.guide.padding=qt(r.guide.padding||{},{l:0,b:0,r:0,t:0}),r.guide.x=wn(r.guide,"x"),r.guide.x=En(r.guide,"x",{cssClass:"x axis",scaleOrient:"bottom",textAnchor:"middle"}),r.guide.y=wn(r.guide,"y",{rotate:-90}),r.guide.y=En(r.guide,"y",{cssClass:"y axis",scaleOrient:"left",textAnchor:"end"}),r.guide.size=wn(r.guide,"size"),r.guide.color=wn(r.guide,"color"),r);i=n(Sn(i),i);var a=Yt(i=_n(i,t),"units");return(i.units||[]).forEach(function(t){return Dn(Et(t),(r=a,(e=t).guide=e.guide||{},e.guide.padding=e.guide.padding||{l:0,t:0,r:0,b:0},e.hasOwnProperty("units")||((e=qt(e,r)).guide=qt(e.guide,Et(r.guide)),e.guide.x=qt(e.guide.x,Et(r.guide.x)),e.guide.y=qt(e.guide.y,Et(r.guide.y))),e),n);var e,r}),i},Fn=function(t,e,n,r){var i={dimension:function(t){var e=n.scales[t],r=n.sources[e.source].dims[e.dim]||{};return{dimName:e.dim,dimType:r.type,scaleType:e.type}},scaleMeta:function(t){var e=r("pos",t).domain(),i=n.scales[t],a=n.sources[i.source].dims[i.dim]||{};return{dimName:i.dim,dimType:a.type,scaleType:i.type,values:e,isEmpty:null==a.type}}},a=(Rn[t]||Rn.NONE)({unit:Et(n.unit)},i,e);return n.unit=a.unit,n},In=function(){function t(t){this.spec=t,this.isApplicable=Nt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;var n=e.settings.size,r=e.settings.specEngine.find(function(t){return n.width<=t.width||n.height<=t.height});return Fn(r.name,e.settings,e,function(e,n){return t.getScaleInfo(n||e+":default")})},t}(),jn=function(){function t(){}return t.optimizeXAxisLabel=function(t,e){var n=e.xAxisTickLabelLimit,r=function(t){if(!t.guide.x.hide&&!t.guide.x.hideTicks&&0!==t.guide.x.rotate){t.guide.x.rotate=0,t.guide.x.textAnchor="middle";var e=0-Math.min(n,t.guide.x.$maxTickTextW)+t.guide.x.$maxTickTextH;i(t,e)}(t.units||[]).filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return r(t)})},i=function(e,n){t!==e&&"extract-axes"===e.guide.autoLayout?(t.guide.x.padding+=n,t.guide.padding.b+=n):(e.guide.x.label.padding+=e.guide.x.label.padding>0?n:0,e.guide.padding.b+=e.guide.padding.b>0?n:0)};r(t)},t.hideAxisTicks=function(t,e,n){var r=function(t){var e="x"===n?"b":"l",i=t.guide;if(!i[n].hide&&!i[n].hideTicks){ue(t)&&"y"===n||(i[n].hideTicks=!0);var a=i[n].label.text&&!i[n].label.hide;i.padding[e]=i.paddingNoTicks?i.paddingNoTicks[e]:0,i[n].padding=i[n].paddingNoTicks||0,i[n].label.padding=a?i[n].label.paddingNoTicks:0}(t.units||[]).filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return r(t)})};r(t)},t.facetsLabelsAtTop=function(t,e){var n=function(t){var e=t.units||[];if(ue(t)){var r=t.guide;r.y.facetAxis=!0,r.y.rotate=0,r.y.textAnchor="start",e.forEach(function(t){t.guide.padding.t=20})}e.filter(function(t){return"COORDS.RECT"===t.type}).forEach(function(t){return n(t)})};n(t)},t}(),zn=function(t){return t.$maxTickTextW},Bn=function(t){return 0==t.rotate?t.$maxTickTextW:t.$maxTickTextH},Vn=function(t){return t.density},Hn=function(t){var e=[],n=[],r=function(t){if("COORDS.RECT"===t.type&&t.units&&t.units[0]&&"COORDS.RECT"===t.units[0].type){var i=t.x.replace(/^x_/,""),a=t.y.replace(/^y_/,"");"null"!==i&&e.push(i),"null"!==a&&n.push(a),t.units.forEach(r)}};r(t.unit);var i={},a={},o=function(t){"COORDS.RECT"===t.type&&t.frames.forEach(function(t){t.key&&(Object.keys(t.key).forEach(function(r){e.indexOf(r)>=0&&(i.hasOwnProperty(r)||(i[r]=[]),i[r].indexOf(t.key[r])<0&&i[r].push(t.key[r])),n.indexOf(r)>=0&&(a.hasOwnProperty(r)||(a[r]=[]),a[r].indexOf(t.key[r])<0&&a[r].push(t.key[r]))}),t.units&&t.units.forEach(o))})};return o(t.unit),{xFacetCount:Object.keys(i).reduce(function(t,e){return t*i[e].length},1),yFacetCount:Object.keys(a).reduce(function(t,e){return t*a[e].length},1)}},Un={"entire-view":function(t,e,n,r){var i=n.unit.guide,a=Hn(n),o=a.xFacetCount,s=a.yFacetCount;s>0&&jn.facetsLabelsAtTop(n.unit,n.settings);var u=i.paddingNoTicks?i.padding.l-i.paddingNoTicks.l:0,l=i.paddingNoTicks?i.padding.b-i.paddingNoTicks.b:0,c=i.paddingNoTicks&&t.height-lt.height||o*n.settings.minFacetWidth+u>t.width,h=i.paddingNoTicks&&t.width-ut.height||o*n.settings.minFacetWidth+u>t.width;c&&jn.hideAxisTicks(n.unit,n.settings,"x"),h&&jn.hideAxisTicks(n.unit,n.settings,"y");var d=t.width;if(e("x",n.unit,zn)<=t.width)r(n.unit,n.settings);else{var f=e("x",n.unit,Bn);if(f>t.width){var p=Math.max(t.width,e("x",n.unit,Vn));d=Math.min(f,p)}}var g=Math.max(t.height,e("y",n.unit,Vn));return!c&&d>t.width&&jn.hideAxisTicks(n.unit,n.settings,"x"),!h&&g>t.height&&jn.hideAxisTicks(n.unit,n.settings,"y"),{newW:t.width,newH:t.height}},minimal:function(t,e,n){return{newW:e("x",n.unit,Vn),newH:e("y",n.unit,Vn)}},normal:function(t,e,n,r){Hn(n).yFacetCount>0&&jn.facetsLabelsAtTop(n.unit,n.settings);var i=n.unit.guide;i.paddingNoTicks&&(t.width-i.padding.l+i.paddingNoTicks.lt.width){var s=Math.max(t.width,e("x",n.unit,Vn));a=Math.min(o,s)}}return{newW:a,newH:Math.max(t.height,e("y",n.unit,Vn))}},"fit-width":function(t,e,n,r){var i=n.unit.guide,a=i.paddingNoTicks?i.padding.l-i.paddingNoTicks.l:0;return(i.paddingNoTicks&&t.width-at.width)&&jn.hideAxisTicks(n.unit,n.settings,"y"),e("x",n.unit,zn)<=t.width&&r(n.unit,n.settings),{newW:t.width,newH:e("y",n.unit,Vn)}},"fit-height":function(t,e,n){var r=n.unit.guide,i=r.paddingNoTicks?r.padding.b-r.paddingNoTicks.b:0;return(r.paddingNoTicks&&t.height-it.height)&&jn.hideAxisTicks(n.unit,n.settings,"x"),{newW:e("x",n.unit,Vn),newH:t.height}}},Wn=function(){function t(t){this.spec=t,this.isApplicable=Nt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;var n=e.settings.fitModel;if(!n)return e;var r=e.scales,i=function(t,e){return t.discrete?e*t.domain().length:4*e},a=function(e,n,o,s){void 0===s&&(s=null);var u="x"===e?n.x:n.y,l="x"===e?n.y:n.x,c=n.guide,h=o("x"===e?c.x:c.y),d=n.units[0],f="x"===e?c.padding.l+c.padding.r:c.padding.b+c.padding.t;if("ELEMENT.INTERVAL"===d.type&&"y"===e===Boolean(d.flip)&&d.label&&!t.getScaleInfo(d.label,s).isEmpty()){var p,g=2*(c.label&&c.label.fontSize?c.label.fontSize:10),m=t.getScaleInfo(u,s);if(m.discrete&&(null==d.guide.enableColorToBarPosition?!d.stack:d.guide.enableColorToBarPosition)){var y=d.color;if(y){var v=t.getScaleInfo(y,s);if(v.discrete){v.domain();p=v}}}var b=n.frames.reduce(function(t,e){return t+function(t){var e=t.part(),n=Ut(e.map(function(t){return t[m.dim]})).length,r=1;if(p){var i=e.reduce(function(t,e){var n=e[m.dim],r=e[p.dim];return t[n]=t[n]||{},t[n][r]||(t[n][r]=!0),t},{}),a=Object.keys(i).map(function(t){return Object.keys(i[t]).length});r=Math.max.apply(Math,a)}return n*r*g}(e)},0),x=i(m,h);return f+Math.max(b,x)}if("COORDS.RECT"!==d.type){var _=t.getScaleInfo(u,s);return f+i(_,h)}var w,E,S=(w=n.frames,E=r[l].dim,w.reduce(function(t,e){var n=(e.key||{})[E];return t[n]=t[n]||[],t[n].push(e),t},{})),T=Object.keys(S).map(function(t){return S[t].map(function(t){return a(e,t.units[0],o,t)}).reduce(function(t,e){return t+e},0)});return f+Math.max.apply(Math,T)},o=e.settings.size,s=o.width,u=o.height,l=Un[n];if(l){var c=l(o,a,e,jn.optimizeXAxisLabel);s=c.newW,u=c.newH}return e.settings.size=function(n,r,i){var a=e.settings.getScrollbarSize(t.getLayout().contentContainer),o=r.width>n.width&&r.width<=n.width*i?n.width:r.width,s=r.height>n.height&&r.height<=n.height*i?n.height:r.height,u=n.width-o,l=n.height-s>=0?0:a.width;return{height:s-(u>=0?0:a.height),width:o-l}}(o,{width:s,height:u},e.settings.avoidScrollAtRatio),e},t}(),Xn=function(){function t(t){this.spec=t,this.isApplicable=t.settings.autoRatio&&Nt(t.unit)}return t.prototype.transform=function(t){var e=this.spec;if(!this.isApplicable)return e;try{this.ruleApplyRatio(e,t)}catch(t){if("Not applicable"!==t.message)throw t}return e},t.prototype.ruleApplyRatio=function(t,e){var n=function(t){return"COORDS.RECT"===t.type||"RECT"===t.type},r=function(t,e,n,i){void 0===i&&(i=0),e(t,i)&&(t.units||[]).map(function(t){return r(t,e,n,i+1)}),n(t,i)},i=[],a=[];r(t.unit,function(t,e){if(e>1||!n(t))throw new Error("Not applicable");return i.push(t.x),a.push(t.y),1===(t.units||[]).map(function(t){if(!n(t)&&0!==t.type.indexOf("ELEMENT."))throw new Error("Not applicable");return t}).filter(n).length},function(){return 0});var o=function(e){return t.scales[e]},s=function(t){return"/"===t.source&&!t.ratio&&!t.fitToFrameByDims},u=function(t){return"ordinal"===t.type||"period"===t.type&&!t.period},l=i.map(o).filter(s),c=a.map(o).filter(s);if([l.length,c.length].some(function(t){return 2===t})){var h=function(t){return t.dim},d=function(t,e,n){t.fitToFrameByDims=n.slice(0,e).map(h)},f=function(t,n){2===n.filter(u).length&&(n.forEach(d),n[0].ratio=Pt(t,n.map(h),e))};f("x",l),f("y",c)}},t}(),Gn=function(){function t(t){this.spec=t,this.isApplicable="EXTRACT"===t.settings.layoutEngine&&Nt(t.unit)}return t.prototype.transform=function(){var t=this.spec;if(!this.isApplicable)return t;try{this.ruleExtractAxes(t)}catch(t){if("Not applicable"!==t.message)throw t;console.log("[TauCharts]: can't extract axes for the given chart specification")}return t},t.prototype.ruleExtractAxes=function(t){var e=function(t){return"COORDS.RECT"===t.type||"RECT"===t.type},n=function(t){return t?10:0},r={l:0,r:10,t:10,b:0},i={l:0,b:0},a=[],o=[];dt(t.unit,function(t,n){if(n>1||!e(t))throw new Error("Not applicable");t.guide=t.guide||{};var s=t.guide,u=s.padding||{l:0,r:0,t:0,b:0},l=s.paddingNoTicks||{l:0,b:0};return r.l+=u.l,r.r+=u.r,r.t+=u.t,r.b+=u.b,i.l+=l.l,i.b+=l.b,a.push(Object.assign({},r)),o.push(Object.assign({},i)),1===(t.units||[]).map(function(t){if(!e(t)&&0!==t.type.indexOf("ELEMENT."))throw new Error("Not applicable");return t}).filter(e).length},function(t){var e=a.pop(),s=o.pop(),u=t.guide||{};u.x=u.x||{},u.x.padding=u.x.padding||0,u.x.paddingNoTicks=u.x.paddingNoTicks||0,u.y=u.y||{},u.y.padding=u.y.padding||0,u.y.paddingNoTicks=u.y.paddingNoTicks||0,u.padding={l:n(t.y),r:n(1),t:n(1),b:n(t.x)},u.paddingNoTicks={l:0,b:0},u.autoLayout="extract-axes",u.x.padding+=r.b-e.b,u.y.padding+=r.l-e.l,u.x.paddingNoTicks+=i.b-s.b,u.y.paddingNoTicks+=i.l-s.l}),t.unit.guide.padding=r,t.unit.guide.paddingNoTicks=i},t}(),qn=function(){function t(t){var e=void 0===t?{}:t,n=e.src,r=void 0===n?null:n,i=e.timeout,a=void 0===i?Number.MAX_SAFE_INTEGER:i,o=e.syncInterval,s=void 0===o?Number.MAX_SAFE_INTEGER:o,u=e.callbacks,l=void 0===u?{}:u,c=this;this.setTimeoutDuration(a),this.setSyncInterval(s),this.setCallbacks(l),this._running=!1,this._queue=[],this._result=r,this._syncDuration=0,this._asyncDuration=0,this._requestedFrameId=null,this._visibilityChangeHandler=function(){if(c._running&&c._requestedFrameId){var t=c._getCancelFrameFunction(),e=c._getRequestFrameFunction();t(c._requestedFrameId),c._requestedFrameId=e(c._requestedFrameCallback)}},this._tasksCount=0,this._finishedTasksCount=0}return t.prototype.setTimeoutDuration=function(e){t.checkType(e,"number","timeout"),this._timeout=e},t.prototype.setSyncInterval=function(e){t.checkType(e,"number","syncInterval"),this._syncInterval=e},t.prototype.setCallbacks=function(e){t.checkType(e,"object","callbacks"),this._callbacks=Object.assign(this._callbacks||{},e)},t.prototype.addTask=function(t){return this._queue.push(t),this._tasksCount++,this},t.prototype.run=function(){if(this._running)throw new Error("Task Runner is already running");this._running=!0,t.runnersInProgress++,document.addEventListener("visibilitychange",this._visibilityChangeHandler),this._loopTasks()},t.prototype.isRunning=function(){return this._running},t.prototype._loopTasks=function(){for(var e,n,r,i,a=0,o=this._syncInterval/t.runnersInProgress;this._running&&!(r=this._asyncDuration>this._timeout)&&!(i=a>o)&&(e=this._queue.shift());){if(null===(n=this._runTask(e)))return;this._syncDuration+=n,this._asyncDuration+=n,a+=n}r&&this._queue.length>0&&(this.stop(),this._callbacks.timeout&&this._callbacks.timeout.call(null,this._asyncDuration,this)),!r&&i&&this._queue.length>0&&this._requestFrame(),0===this._queue.length&&(this.stop(),this._callbacks.done&&this._callbacks.done.call(null,this._result,this))},t.prototype._runTask=function(t){var e=performance.now();if(this._callbacks.error)try{this._result=t.call(null,this._result,this)}catch(t){return this.stop(),this._callbacks.error.call(null,t,this),null}else this._result=t.call(null,this._result,this);var n=performance.now()-e;return this._finishedTasksCount++,this._callbacks.progress&&this._callbacks.progress.call(null,this._finishedTasksCount/this._tasksCount,this),n},t.prototype._requestFrame=function(){var t=this,e=performance.now(),n=function(){t._requestedFrameId=null;var n=performance.now();t._asyncDuration+=n-e,t._loopTasks()},r=this._getRequestFrameFunction();this._requestedFrameCallback=n,this._requestedFrameId=r(n)},t.prototype._getRequestFrameFunction=function(){var t=this;return document.hidden?function(e){return t._requestedFrameType="idle",window.requestIdleCallback(e,{timeout:17})}:function(e){return t._requestedFrameType="animation",requestAnimationFrame(e)}},t.prototype._getCancelFrameFunction=function(){switch(this._requestedFrameType){case"animation":return function(t){return cancelAnimationFrame(t)};case"idle":return function(t){return window.cancelIdleCallback(t)}}},t.prototype.stop=function(){if(!this._running)throw new Error("Task Runner is already stopped");(this._running=!1,t.runnersInProgress--,document.removeEventListener("visibilitychange",this._visibilityChangeHandler),this._requestedFrameId)&&(this._getCancelFrameFunction()(this._requestedFrameId),this._requestedFrameId=null)},t.checkType=function(t,e,n){if(typeof t!==e)throw new Error('Task Runner "'+n+'" property is not "'+e+'"')},t.runnersInProgress=0,t}(),Yn=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),$n=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var c=l.findIndex(function(t){return t.closest.distance!==l[0].closest.distance||t.closest.secondaryDistance!==l[0].closest.secondaryDistance}),h=c<0?l:l.slice(0,c);if(1===h.length)a=h[0].closest.data,o=h[0].closest.node,s=h[0].unit;else{var d=h.reduce(function(t,e){return t+e.closest.x},0)/h.length,f=h.reduce(function(t,e){return t+e.closest.y},0)/h.length,p=Math.atan2(f-r,d-n)+Math.PI,g=Math.round((h.length-1)*p/2/Math.PI),m=h[g].closest;a=m.data,o=m.node,s=h[g].unit}}u.forEach(function(e){return e.unit.fire(i,{event:t,data:a,node:o,unit:s})})},e.prototype._initPointerEvents=function(){var t=this;this._liveSpec.settings.syncPointerEvents||(this._pointerAnimationFrameId=null);var e=$n.select(this._svg),n=this._liveSpec.settings.syncPointerEvents?function(t){return function(){return t(o.event)}}:function(e){return function(){var n=o.event;t._pointerAnimationFrameId&&"mousemove"!==n.type&&t._cancelPointerAnimationFrame(),t._pointerAnimationFrameId||(t._pointerAnimationFrameId=requestAnimationFrame(function(){t._pointerAnimationFrameId=null,e(n)}))}},r=function(e){return t._handlePointerEvent(e)};e.on("mousemove",n(r)),e.on("click",n(r)),e.on("mouseleave",n(function(e){"none"!==window.getComputedStyle(t._svg).pointerEvents&&t.select(function(){return!0}).forEach(function(t){return t.fire("data-hover",{event:e,data:null,node:null,unit:null})})}))},e.prototype._cancelPointerAnimationFrame=function(){cancelAnimationFrame(this._pointerAnimationFrameId),this._pointerAnimationFrameId=null},e.prototype._setupTaskRunner=function(t){var e=this;return this._resetTaskRunner(),this._taskRunner=new qn({timeout:t.settings.renderingTimeout||Number.MAX_SAFE_INTEGER,syncInterval:t.settings.asyncRendering?t.settings.syncRenderingInterval:Number.MAX_SAFE_INTEGER,callbacks:{done:function(){e._completeRendering(),e._renderingPhase=null},timeout:function(t,n){e._displayTimeoutWarning({timeout:t,proceed:function(){e.disablePointerEvents(),n.setTimeoutDuration(Number.MAX_SAFE_INTEGER),n.run()},cancel:function(){e._cancelRendering()}}),e.enablePointerEvents(),e.fire("renderingtimeout",t)},progress:function(t){var n={spec:0,draw:1}[e._renderingPhase]/2+t/2;e._reportProgress(n)},error:t.settings.handleRenderingErrors?function(n){e._cancelRendering(),e._displayRenderingError(n),e.fire("renderingerror",n),t.settings.log(["An error occured during chart rendering.",'Set "handleRenderingErrors: false" in chart settings to debug.',"Error message: "+n.message].join(" "),"ERROR")}:null}}),this._taskRunner},e.prototype._resetTaskRunner=function(){this._taskRunner&&this._taskRunner.isRunning()&&(this._taskRunner.stop(),this._taskRunner=null)},e.prototype.renderTo=function(t,e){this._resetProgressLayout(),this.disablePointerEvents(),this._insertLayout(t,e);var n=this._createLiveSpec();if(!n)return this._svg=null,this._layout.content.innerHTML=this._emptyContainer,void this.enablePointerEvents();var r=this._createGPL(n),i=this._setupTaskRunner(n);this._scheduleDrawScenario(i,r),this._scheduleDrawing(i,r),i.run()},e.prototype._insertLayout=function(t,e){this._target=t,this._defaultSize=Object.assign({},e);var n=$n.select(t).node();if(null===n)throw new Error("Target element not found");this._layout.layout.parentNode!==n&&n.appendChild(this._layout.layout);var r=this._layout.content,i=de(this._layout.contentContainer);this._layout.contentContainer.style.padding="0 "+i.width+"px "+i.height+"px 0",fe(this._layout.rightSidebarContainer,"vertical");var a=Object.assign({},e)||{};if(!a.width||!a.height){var o=r.parentElement,s=o.scrollLeft,u=o.scrollTop;r.style.display="none",a=qt(a,me(r.parentNode)),r.style.display="",r.parentElement.scrollLeft=s,r.parentElement.scrollTop=u,a.height||(a.height=me(this._layout.layout).height)}this.configGPL.settings.size=a},e.prototype._createLiveSpec=function(){var t=this;return this._liveSpec=Et(Yt(this.configGPL,"plugins")),this._liveSpec.sources=this.getDataSources(),this._liveSpec.settings=this.configGPL.settings,this._experimentalSetupAnimationSpeed(this._liveSpec),this.isEmptySources(this._liveSpec.sources)?null:(this._liveSpec=this.transformers.reduce(function(e,n){return new n(e).transform(t)},this._liveSpec),this.destroyNodes(),this.fire("specready",this._liveSpec),this._liveSpec)},e.prototype._experimentalSetupAnimationSpeed=function(t){t.settings.initialAnimationSpeed=t.settings.initialAnimationSpeed||t.settings.animationSpeed;var e=t.settings.experimentalShouldAnimate(t)?t.settings.initialAnimationSpeed:0;t.settings.animationSpeed=e;var n=function(t){t.guide=t.guide||{},t.guide.animationSpeed=e,t.units&&t.units.forEach(n)};n(t.unit)},e.prototype._createGPL=function(t){var e=new Be(t,this.getScaleFactory(),Je,E),n=e.unfoldStructure();return this.onUnitsStructureExpanded(n),e},e.prototype._scheduleDrawScenario=function(t,e){var n=this,r=$n.select(this._layout.content),i=e.config.settings.size;t.addTask(function(){return n._renderingPhase="spec"}),e.getDrawScenarioQueue({allocateRect:function(){return{slot:function(t){return r.selectAll(".uid_"+t)},frameId:"root",left:0,top:0,width:i.width,containerWidth:i.width,height:i.height,containerHeight:i.height}}}).forEach(function(e){return t.addTask(e)})},e.prototype._scheduleDrawing=function(t,e){var n=this,r=e.config.settings.size;t.addTask(function(t){n._renderingPhase="draw",n._renderRoot({scenario:t,newSize:r}),n._cancelPointerAnimationFrame(),n._scheduleRenderScenario(t)})},e.prototype._resetProgressLayout=function(){this._createProgressBar(),this._clearRenderingError(),this._clearTimeoutWarning()},e.prototype._renderRoot=function(t){var e=this,n=t.scenario,r=t.newSize,i=$n.select(this._layout.content),a=n[0].config.uid,o=Kn(i,"svg").attr("width",Math.floor(r.width)).attr("height",Math.floor(r.height));o.attr("class")||o.attr("class",Ve+"svg"),this._svg=o.node(),this._initPointerEvents(),this.fire("beforerender",this._svg);var s=o.selectAll("g.frame-root").data([a],function(t){return t});s.enter().append("g").classed(Ve+"cell cell frame-root uid_"+a,!0).merge(s).call(function(t){t.classed("tau-active",!0),Q(t,e.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1)}),s.exit().call(function(t){t.classed("tau-active",!1),Q(t,e.configGPL.settings.animationSpeed,"frameRootToggle").attr("opacity",1e-6).remove()})},e.prototype._scheduleRenderScenario=function(t){var e=this;t.forEach(function(t){e._taskRunner.addTask(function(){t.draw(),e.onUnitDraw(t.node()),e._renderedItems.push(t)})})},e.prototype._completeRendering=function(){fe(this._layout.contentContainer),this._layout.rightSidebar.style.maxHeight=this._liveSpec.settings.size.height+"px",this.enablePointerEvents(),this._svg&&this.fire("render",this._svg),fe(this._layout.rightSidebarContainer,"vertical")},e.prototype._cancelRendering=function(){this.enablePointerEvents(),this._resetTaskRunner(),this._cancelPointerAnimationFrame()},e.prototype._createProgressBar=function(){var t=$n.select(this._layout.header),e=Kn(t,"div."+Ve+"progress");e.select("div."+Ve+"progress__value").remove();var n=e.append("div").classed(Ve+"progress__value",!0).style("width",0);this._reportProgress=function(t){requestAnimationFrame(function(){e.classed(Ve+"progress_active",t<1),n.style("width",100*t+"%")})}},e.prototype._displayRenderingError=function(t){this._layout.layout.classList.add(Ve+"layout_rendering-error")},e.prototype._clearRenderingError=function(){this._layout.layout.classList.remove(Ve+"layout_rendering-error")},e.prototype.getScaleFactory=function(t){return void 0===t&&(t=null),new en(tn.instance(this._liveSpec.settings),t||this._liveSpec.sources,this._liveSpec.scales)},e.prototype.getScaleInfo=function(t,e){return void 0===e&&(e=null),this.getScaleFactory().createScaleInfoByName(t,e)},e.prototype.getSourceFiltersIterator=function(t){var e=this,n=Ht(Object.keys(this._filtersStore.filters).map(function(t){return e._filtersStore.filters[t]})).filter(function(e){return!t(e)}).map(function(t){return t.predicate});return function(t){return n.reduce(function(e,n){return e&&n(t)},!0)}},e.prototype.getDataSources=function(t){var e=this;void 0===t&&(t={});var n=this._chartDataModel(this._originData);return Object.keys(n).filter(function(t){return"?"!==t}).reduce(function(r,i){var a=n[i],o=e.getSourceFiltersIterator(function(e){return function(n){return t.excludeFilter&&-1!==t.excludeFilter.indexOf(n.tag)||n.src!==e}}(i));return r[i]={dims:a.dims,data:a.data.filter(o)},r},{"?":n["?"]})},e.prototype.isEmptySources=function(t){return!Object.keys(t).filter(function(t){return"?"!==t}).filter(function(e){return t[e].data.length>0}).length},e.prototype.getChartModelData=function(t,e){return void 0===t&&(t={}),void 0===e&&(e="/"),this.getDataSources(t)[e].data},e.prototype.getDataDims=function(t){return void 0===t&&(t="/"),this._originData[t].dims},e.prototype.getData=function(t){return void 0===t&&(t="/"),this._originData[t].data},e.prototype.setData=function(t,e){void 0===e&&(e="/"),this._originData[e].data=t,this.refresh()},e.prototype.getSVG=function(){return this._svg},e.prototype.addFilter=function(t){t.src=t.src||"/";var e=t.tag,n=this._filtersStore.filters[e]=this._filtersStore.filters[e]||[],r=this._filtersStore.tick++;return t.id=r,n.push(t),r},e.prototype.removeFilter=function(t){var e=this;return Object.keys(this._filtersStore.filters).map(function(n){e._filtersStore.filters[n]=e._filtersStore.filters[n].filter(function(e){return e.id!==t})}),this},e.prototype.refresh=function(){this._target&&this.renderTo(this._target,this._defaultSize)},e.prototype.resize=function(t){void 0===t&&(t={}),this.renderTo(this._target,t)},e.prototype.select=function(t){return this._nodes.filter(t)},e.prototype.traverseSpec=function(t,e){var n=function(t,e,r,i){e(t,r,i),t.frames?t.frames.forEach(function(r){(r.units||[]).map(function(i){return n(i,e,t,r)})}):(t.units||[]).map(function(r){return n(r,e,t,null)})};n(t.unit,e,null,null)},e.prototype.getSpec=function(){return this._liveSpec},e.prototype.getLayout=function(){return this._layout},e.prototype._displayTimeoutWarning=function(t){var e=this,n=t.proceed,r=t.cancel,i=t.timeout,a=Math.round(100/3/1.5),o=function(t){return Math.round(100/3/1.5*t)};this._layout.content.style.height="100%",this._layout.content.insertAdjacentHTML("beforeend",'\n
\n \n \n Rendering took more than '+Math.round(i)/1e3+'s\n Would you like to continue?\n \n \n Continue\n \n \n Cancel\n \n \n
\n '),this._layout.content.querySelector("."+Ve+"rendering-timeout-continue-btn").addEventListener("click",function(){e._clearTimeoutWarning(),n.call(e)}),this._layout.content.querySelector("."+Ve+"rendering-timeout-cancel-btn").addEventListener("click",function(){e._clearTimeoutWarning(),r.call(e)})},e.prototype._clearTimeoutWarning=function(){var t=Jn(this._layout.content,"."+Ve+"rendering-timeout-warning");t&&(this._layout.content.removeChild(t),this._layout.content.style.height="")},e}(f),Zn={},tr={},er=function(t){var e="Chart type "+t+" is not supported.";throw console.log(e),console.log("Use one of "+Object.keys(Zn).join(", ")+"."),new x(e,_.NOT_SUPPORTED_TYPE_CHART)},nr={validate:function(t,e){return tr.hasOwnProperty(t)||er(t),tr[t].reduce(function(t,n){return t.concat(n(e)||[])},[])},get:function(t){var e=Zn[t];return"function"!=typeof e&&er(t),e},add:function(t,e,n){return void 0===n&&(n=[]),Zn[t]=e,tr[t]=n,nr},getAllRegisteredTypes:function(){return Zn}},rr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ir=function(t){function e(n){var r=t.call(this,n)||this;return n.autoResize&&e.winAware.push(r),r}return rr(e,t),e.prototype.applyConfig=function(e){var n=nr.validate(e.type,e);if(n.length>0)throw new Error(n[0]);var r=nr.get(e.type);(e=qt(e,{autoResize:!0})).settings=Qn.setupSettings(e.settings),e.dimensions=Qn.setupMetaInfo(e.dimensions,e.data),t.prototype.applyConfig.call(this,r(e))},e.prototype.destroy=function(){var n=e.winAware.indexOf(this);-1!==n&&e.winAware.splice(n,1),t.prototype.destroy.call(this)},e}(Qn);function ar(t){return t}ir.winAware=[],ir.resizeOnWindowEvent=function(){var t;function e(){t=0;for(var e=0,n=ir.winAware.length;ex&&x>2&&b.length>2;)b=n.ticks(--x)}else b=n.domain();r.hideTicks&&(b=c?b.filter(function(t){return 0==t}):[]);var _=null==s?n.tickFormat?n.tickFormat(o):ar:s,w=Math.max(u,0)+l,E=n.range(),S=E[0]+.5,T=E[E.length-1]+.5,M=(n.bandwidth?function(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return t(n)+e}}:ar)(n);if(r.facetAxis){var C=M;M=function(t){return C(t)-n.stepSize(t)/2}}var k,A=a.selection?a:null,O=A?A.selection():a,P=function(t){for(var e=t.node();e&&"svg"!==e.tagName;)e=e.parentNode;return e}(O).getBoundingClientRect();function N(t){var n=jt(r.rotate);if(t.attr("transform",Ce(n)),Math.abs(n/90)%2>0){var i=n<180?1:-1,a=f?.5:-2,o=e===lr.top||e===lr.left?-1:1,s=a*(e===lr.top||e===lr.bottom?o<0?0:.71:.32);t.attr("x",9*i).attr("y",0).attr("dx",f?null:s+"em").attr("dy",s+"em")}}function L(t,e){void 0===e&&(e=0);var i=function(t){return Math.max(n.stepSize(t),r.tickFormatWordWrapLimit,e)};r.tickFormatWordWrap?J(t,i,r.tickFormatWordWrapLines,r.tickFontHeight,!f):K(t,i)}function R(t){!function(t,e){var n=e?-10:20,r=e?0:1,i=e?1:-1,a=[];t.each(function(){var t=Y.select(this),e=t.attr("transform").replace("translate(","").replace(" ",",").split(",")[r],n=i*parseFloat(e),o=t.select("text"),s=o.node().getBBox().width/2,u=n-s,l=n+s;a.push({c:n,s:u,e:l,l:0,textRef:o,tickRef:t})});var o,s=a.sort(function(t,e){return t.c-e.c});o=function(t,r,i){var a,o,s,u=t.e>r.s,l=i.s1&&(h=h.replace(/([\.]*$)/gi,"")+"...");var d=11*r.l,f=e?parseFloat(r.textRef.attr("y"))+d:0,p=e?0:d,g=e?d:0,m=function(t){var e=0;if(!t)return e;var n=t.indexOf("rotate(");if(n>=0){var r=t.indexOf(")",n+7),i=t.substring(n+7,r);e=parseFloat(i.trim())}return e}(r.textRef.attr("transform"));r.textRef.text(function(t,e){return 0===e?h:""}).attr("transform","translate("+p+","+g+") rotate("+m+")");var y={x1:0,x2:0,y1:f+(e?-1:5),y2:n};e||(y.transform="rotate(-90)"),xe(r.tickRef,"line.label-ref").call(ot(y))}else r.tickRef.selectAll("line.label-ref").remove();return r},s.map(function(t,e,n){return o(n[e-1]||{e:-1/0,s:-1/0,l:0},t,n[e+1]||{e:1/0,s:1/0,l:0})})}(t,f)}O.attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===lr.right?"start":e===lr.left?"end":"middle"),c||(k=r.hideTicks||r.hide?[]:[null],ae(O.selectAll(".domain").data(k)).then(function(t){return A&&t.exit().transition(A).attr("opacity",0).remove(),t.merge(t.enter().insert("path",".tick").attr("class","domain").attr("opacity",1).attr("stroke","#000"))}).then(function(t){return A?t.transition(A):t}).then(function(t){t.attr("d",e===lr.left||e==lr.right?"M"+p*u+","+S+"H0.5V"+T+"H"+p*u:"M"+S+","+p*u+"V0.5H"+T+"V"+p*u)}));var D=ae(O.selectAll(".tick").data(b,function(t){return String(n(t))}).order()).then(function(t){var e=t.exit(),n=t.enter().append("g").attr("class","tick");return{tickExit:e,tickEnter:n,tick:t.merge(n)}}).then(function(t){if(h){var e=n.ticks(),r=n.domain(),i=b.length-1,a=e.length>1&&r[0]*r[1]<0&&-r[0]>(e[1]-e[0])/2&&r[1]>(e[i]-e[i-1])/2;t.tick.classed("zero-tick",function(t){return 0==t&&a})}return t}).result();!function(t){ae(t).then(function(t){var e=t.tickEnter,n=t.tickExit,r=t.tick;return A?(e.attr("opacity",or).attr("transform",function(t){var e=M(t);return y(e)}),{tick:r.transition(A),tickExit:n.transition(A).attr("opacity",or).attr("transform",function(t){var e=M(t);return isFinite(e)?y(e):this.getAttribute("transform")})}):{tick:r,tickExit:n}}).then(function(t){var e=t.tick;t.tickExit.remove(),e.attr("opacity",1).attr("transform",function(t){return y(M(t))})})}(D),r.facetAxis||function(t){var e=p*u,r=d?function(t){return v*n.stepSize(t)/2}:null;ae(t).then(function(t){var n=t.tick,i=t.tickEnter,a=n.select("line"),o=i.append("line").attr("stroke","#000").attr(m+"2",e);return d&&o.attr(g+"1",r).attr(g+"2",r),a.merge(o)}).then(function(t){return A?t.transition(A):t}).then(function(t){t.attr(m+"2",e),d&&t.attr(g+"1",r).attr(g+"2",r)})}(D),d&&c&&d&&b&&b.length&&ae(O.selectAll(".extra-tick-line").data([null])).then(function(t){return t.merge(t.enter().insert("line",".tick").attr("class","extra-tick-line").attr("stroke","#000"))}).then(function(t){return A?t.transition(A):t}).then(function(t){t.attr(g+"1",S).attr(g+"2",S).attr(m+"1",0).attr(m+"2",p*u)}),c||(function(i){var a=r.textAnchor,o=p*w,s=e===lr.top?"0em":e===lr.bottom?"0.71em":"0.32em";function u(e){if(r.facetAxis)return e.attr("dx",18-t.position[0]).attr("dy",16)}ae(i).then(function(t){var e=t.tick,n=t.tickEnter,r=e.select("text"),i=n.append("text").attr("fill","#000").attr(m,o).attr("dy",s);return N(i),u(i),r.merge(i)}).then(function(t){if(t.text(_).attr("text-anchor",a),!1===f&&!0===r.facetAxis){var e=Ae(O.node().parentNode.getAttribute("transform"));L(t,P.width-Math.abs(e.x))}else L(t);return f&&"time"===n.scaleType&&function(t){if(!(b.length<2)){var e=0,n=-1,r=t.nodes();r.forEach(function(t,r){var i=t.textContent||"",a=i.length;a>e&&(e=a,n=r)});var i=M(b[1])-M(b[0]),a=!1;if(n>=0){var o=r[n].getBoundingClientRect();a=i-o.width<8}O.classed(Ve+"time-axis-overflow",a)}}(t),!f||"time"!==n.scaleType&&"linear"!==n.scaleType||function(t){if(0!==b.length){var e=b[0],n=b[b.length-1],r=O.append("line").attr("x1",M(e)).attr("x2",M(e)).attr("y1",0).attr("y2",1),i=O.append("line").attr("x1",M(n)).attr("x2",M(n)).attr("y1",0).attr("y2",1),a={left:r.node().getBoundingClientRect().left-P.left,right:P.right-i.node().getBoundingClientRect().right};r.remove(),i.remove();var o=function(t,e,n){var r=t.getBoundingClientRect(),i=e>0?"right":"left",o=(M(n),a[i]),s=Math.ceil(r.width/2-o+1);t.setAttribute("dx",String(s>0?-e*s:0))},s=t.filter(function(t){return t===e}).node(),u=t.filter(function(t){return t===n}).node();t.attr("dx",null),o(s,-1,e),o(u,1,n)}}(t),t}).then(function(t){return A?t.transition(A):t}).then(function(t){t.attr(m,o),N(t),u(t),d&&r.avoidCollisions&&!r.facetAxis&&(A?A.on("end.fixTickTextCollision",function(){return R(i.tick)}):R(i.tick))})}(D),i.hide||function(){var t=i,e=xe(O,"text.label").attr("class",Se("label",t.cssClass)).attr("transform",Ce(t.rotate)).attr("text-anchor",t.textAnchor);ae(e).then(function(t){return A?t.transition(A):t}).then(function(e){var n=v*t.padding,r=Math.abs(T-S),i=f?r:0;e.attr("x",i).attr("y",n).attr("text-anchor","end")});for(var n=t.text.split(" → "),r=n.length-1;r>0;r--)n.splice(r,0," → ");e.selectAll("tspan").data(n).enter().append("tspan").attr("class",function(t,e){return e%2?"label-token-delimiter label-token-delimiter-"+e:"label-token label-token-"+e}).text(function(t){return t}).exit().remove()}())}}function hr(t){return cr({scale:t.scale,scaleGuide:t.scaleGuide,ticksCount:t.ticksCount,tickSize:t.tickSize,gridOnly:!0,position:t.position})}var dr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fr=xe,pr=function(t){var e=t<=20?1:.75;return Math.max(2,Math.round(t*e))},gr=function(t){function e(e){var n=t.call(this,e)||this;n.config=e,n.config.guide=qt(n.config.guide||{},{showGridLines:"xy",padding:{l:50,r:0,t:0,b:50}}),n.config.guide.x=n.config.guide.x||{},n.config.guide.x=qt(n.config.guide.x,{cssClass:"x axis",textAnchor:"middle",padding:10,hide:!1,scaleOrient:"bottom",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof n.config.guide.x.label&&(n.config.guide.x.label={text:n.config.guide.x.label}),n.config.guide.x.label=qt(n.config.guide.x.label,{text:"X",rotate:0,padding:40,textAnchor:"middle"}),n.config.guide.y=n.config.guide.y||{},n.config.guide.y=qt(n.config.guide.y,{cssClass:"y axis",textAnchor:"start",padding:10,hide:!1,scaleOrient:"left",rotate:0,density:20,label:{},tickFormatWordWrapLimit:100}),"string"==typeof n.config.guide.y.label&&(n.config.guide.y.label={text:n.config.guide.y.label}),n.config.guide.y.label=qt(n.config.guide.y.label,{text:"Y",rotate:-90,padding:20,textAnchor:"middle"});var r=n.config,i=r.guide;if("extract-axes"===i.autoLayout){var a=r.options.containerHeight-(r.options.top+r.options.height);i.x.hide=i.x.hide||Math.floor(a)>0,i.y.hide=i.y.hide||Math.floor(r.options.left)>0}var o=n.config.options,s=n.config.guide.padding;return n.L=o.left+s.l,n.T=o.top+s.t,n.W=o.width-(s.l+s.r),n.H=o.height-(s.t+s.b),n}return dr(e,t),e.prototype.defineGrammarModel=function(t){var e=this.W,n=this.H;return this.xScale=t("pos",this.config.x,[0,e]),this.yScale=t("pos",this.config.y,function(t){return["ordinal","period"].indexOf(t.type)>=0?[0,n]:[n,0]}),this.regScale("x",this.xScale).regScale("y",this.yScale),{scaleX:this.xScale,scaleY:this.yScale,xi:function(){return e/2},yi:function(){return n/2},sizeX:function(){return e},sizeY:function(){return n}}},e.prototype.getGrammarRules=function(){return[function(t){var e=t.scaleX,n=t.scaleY;return{xi:function(n){return n?e(n[e.dim]):t.xi(n)},yi:function(e){return e?n(e[n.dim]):t.yi(e)},sizeX:function(n){return n?e.stepSize(n[e.dim]):t.sizeX(n)},sizeY:function(e){return e?n.stepSize(e[n.dim]):t.sizeY(e)}}}]},e.prototype.createScreenModel=function(t){return t},e.prototype.allocateRect=function(t){var e=this,n=this.screenModel;return{slot:function(t){return e.config.options.container.selectAll(".uid_"+t)},left:n.xi(t)-n.sizeX(t)/2,top:n.yi(t)-n.sizeY(t)/2,width:n.sizeX(t),height:n.sizeY(t),containerWidth:this.W,containerHeight:this.H}},e.prototype.drawFrames=function(t){var e=Object.assign({},this.config),n=e.options,r=this.W,i=this.H;if(e.x=this.xScale,e.y=this.yScale,e.x.scaleObj=this.xScale,e.y.scaleObj=this.yScale,e.x.guide=e.guide.x,e.y.guide=e.guide.y,e.x.guide.label.size=r,e.y.guide.label.size=i,(n.container.attr("transform")?Q(n.container,this.config.guide.animationSpeed,"cartesianContainerTransform"):n.container).attr("transform",Me(this.L,this.T)),e.x.guide.hide)this._removeDimAxis(n.container,e.x);else{var a="top"===e.x.guide.scaleOrient?[0,0-e.guide.x.padding]:[0,i+e.guide.x.padding];this._drawDimAxis(n.container,e.x,a,r)}if(e.y.guide.hide)this._removeDimAxis(n.container,e.y);else{var o="right"===e.y.guide.scaleOrient?[r+e.guide.y.padding,0]:[0-e.guide.y.padding,0];this._drawDimAxis(n.container,e.y,o,i)}var s=t.reduce(function(t,e){return t.concat((e.units||[]).map(function(t){return t.uid}))},[]),u=this._drawGrid(n.container,e,r,i,n),l=it(u,".cell").data(s,function(t){return t});l.enter().append("g").attr("class",function(t){return Ve+"cell cell uid_"+t}).merge(l).classed("tau-active",!0),Q(l,this.config.guide.animationSpeed).attr("opacity",1),Q(l.exit().classed("tau-active",!1),this.config.guide.animationSpeed).attr("opacity",1e-6).remove()},e.prototype._drawDimAxis=function(t,e,n,r){var i=bn.get(e.guide.tickFormat,e.guide.tickFormatNullAlias),o=cr({scale:e.scaleObj,scaleGuide:e.guide,ticksCount:i?pr(r/e.guide.density):null,tickFormat:i||null,position:n}),s=this.config.guide.animationSpeed;fr(t,this._getAxisSelector(e)).classed("tau-active",!0).classed(e.guide.cssClass,!0).call(function(t){var e=Q(t,s,"axisTransition"),r=t.attr("transform");Me.apply(a,n)!==r&&(r?e:t).attr("transform",Me.apply(a,n)),e.call(o),e.attr("opacity",1)})},e.prototype._removeDimAxis=function(t,e){var n=it(t,this._getAxisSelector(e)).classed("tau-active",!1);Q(n,this.config.guide.animationSpeed,"axisTransition").attr("opacity",1e-6).remove()},e.prototype._getAxisSelector=function(t){return"g."+("h"===ke(t.guide.scaleOrient)?"x":"y")+".axis"},e.prototype._drawGrid=function(t,e,n,r){var i=this;return fr(t,"g.grid").attr("transform",Me(0,0)).call(function(t){var a=t,o=i.config.guide.animationSpeed,s=(e.guide.showGridLines||"").toLowerCase();if(s.length>0){var u=fr(a,"g.grid-lines");if(s.indexOf("x")>-1){var l=e.x,c=bn.get(l.guide.tickFormat),h=hr({scale:l.scaleObj,scaleGuide:l.guide,tickSize:r,ticksCount:c?pr(n/l.guide.density):null}),d=fr(u,"g.grid-lines-x");Q(d,o).call(h)}if(s.indexOf("y")>-1){var f=e.y,p=(c=bn.get(f.guide.tickFormat),hr({scale:f.scaleObj,scaleGuide:f.guide,tickSize:-n,ticksCount:c?pr(r/f.guide.density):null})),g=fr(u,"g.grid-lines-y");Q(g,o).call(p)}}})},e}(g),mr=n(16),yr=n(7),vr=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),br=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n})}else{var a=n[t].map(r[t].invert);e=[a[0],a[1]]}return{dim:r[t].dim,func:r[t].discrete?"inset":"between",args:e}});e.fire("brush",s)}};return t.selectAll(".brush").remove(),t.append("g").attr("class","brush").each(function(t){var e=r[t].range();i[t]=br.brushY().extent([[0,e[0]],[16,e[1]]]).on("start",s).on("brush",l).on("end",u),br.select(this).classed("brush-"+Ot(t),!0).call(i[t]),a=!1,i[t].move(br.select(this),e),a=!0}).selectAll("rect").attr("transform","translate(-8,0)").attr("width",16),t},e.prototype._forceBrushing=function(t){void 0===t&&(t={});var e=this.columnsBrushes,n=this.columnsScalesMap;this.columnsSelections;Object.keys(t).filter(function(r){return e[r]&&n[r]&&t[r]}).forEach(function(r){var i=t[r],a=[];if(n[r].discrete){var o=i.map(n[r]).filter(function(t){return t>=0}),s=n[r].stepSize()/2;a=[Math.min.apply(Math,o)-s,Math.max.apply(Math,o)+s]}else a=[i[0],i[1]];var u=Ot(r);e[r](br.select(".brush-"+u)),e[r].move(br.select(".brush-"+u),a.map(n[r]))})},e}(g),_r=n(15),wr=n(14),Er=n(4),Sr=function(){var t,e=[],n=[],r=1,i=1,a={},o=!1,s=function(t){var r=e.length,i=0,a=e[t].x-n[t].x,o=n[t].y-e[t].y,s=Math.sqrt(a*a+o*o);s>0&&(i+=.2*s),o/=s,i+=(a/=s)>0&&o>0?0:a<0&&o>0?3:a<0&&o<0?6:9;for(var u,l,h,d,f=e[t].x,p=e[t].y-e[t].height+2,g=e[t].x+e[t].width,m=e[t].y+2,y=0;yr&&(e[l].x=c),e[l].x<0&&(e[l].x=c),e[l].y>i&&(e[l].y=h),e[l].y<0&&(e[l].y=h);var d=(o?t(l,e,n):s(l))-u;Math.random()r&&(e[l].x=c),e[l].x<0&&(e[l].x=c),e[l].y>i&&(e[l].y=h),e[l].y<0&&(e[l].y=h);var y=(o?t(l,e,n):s(l))-u;Math.random()1||l<0||l>1)},h=function(t,e,n){return t-e/n};return a.start=function(t){for(var n=e.length,r=1,i=0;i0){var a=r[i[0]].toLowerCase();e=n[a]}return e},e.prototype._highlightArea=function(t){var e=this,n=this.config.options.container,r=this.contourToFill;n.selectAll(".map-contour-"+r).classed("map-contour-highlighted",function(n){return t(e._resolveFeature(n))})},e.prototype._highlightPoint=function(t){this.config.options.container.selectAll("circle").classed("map-point-highlighted",function(e){var n=e.data;return t(n)}).attr("opacity",function(e){var n=e.data;return t(n)?.5:.1})},e.prototype._createProjection=function(t,e,n){var r=this.W,i=this.H,a=this.config.guide,o=100,s=[r/2,i/2],u=n||t.center,l=a.projection||t.projection||"mercator",c=this._createD3Projection(l,u,o,s),h=Mr.geoPath().projection(c).bounds(Er.feature(t,t.objects[e])),d=o*r/(h[1][0]-h[0][0]),f=o*i/(h[1][1]-h[0][1]);return o=d=0},Fr=function(t,e){return!t.discrete&&e[t.dim]<0},Ir=function(t,e){return t.w(e)/2+Math.floor(t.model.size(e)/Rr(t,e))},jr=function(t,e){return t.h(e)/2+Math.floor(t.model.size(e)/Rr(t,e))},zr=function(t){return function(e){return{dx:function(n){var r=e.model.scaleY;if("+"===t[2]&&!Dr(r,n))return e.dx(n);if("-"===t[2]&&!Fr(r,n))return e.dx(n);var i=t[1],a=t[0]===t[0].toUpperCase()?1:0;return e.dx(n)+i*a*e.model.size(n)/2+i*Ir(e,n)}}}},Br=function(t){return function(e){return{dy:function(n){var r=e.model.scaleY;if("+"===t[2]&&!Dr(r,n))return e.dy(n);if("-"===t[2]&&!Fr(r,n))return e.dy(n);var i=t[1],a=t[0]===t[0].toUpperCase()?1:0;return e.dy(n)+i*a*e.model.size(n)/2+i*jr(e,n)}}}};Nr.regRule("l",zr(["l",-1,null])).regRule("L",zr(["L",-1,null])).regRule("l+",zr(["l",-1,"+"])).regRule("l-",zr(["l",-1,"-"])).regRule("L+",zr(["L",-1,"+"])).regRule("L-",zr(["L",-1,"-"])).regRule("r",zr(["r",1,null])).regRule("R",zr(["R",1,null])).regRule("r+",zr(["r",1,"+"])).regRule("r-",zr(["r",1,"-"])).regRule("R+",zr(["R",1,"+"])).regRule("R-",zr(["R",1,"-"])).regRule("t",Br(["t",-1,null])).regRule("T",Br(["T",-1,null])).regRule("t+",Br(["t",-1,"+"])).regRule("t-",Br(["t",-1,"-"])).regRule("T+",Br(["T",-1,"+"])).regRule("T-",Br(["T",-1,"-"])).regRule("b",Br(["b",1,null])).regRule("B",Br(["B",1,null])).regRule("b+",Br(["b",1,"+"])).regRule("b-",Br(["b",1,"-"])).regRule("B+",Br(["B",1,"+"])).regRule("B-",Br(["B",1,"-"])).regRule("rotate-on-size-overflow",function(t,e){var n=e.data,r=e.lineBreakAvailable,i={};if(n.reduce(function(e,n){return e+(function(e){return t.model.size(e).5){var a=r?-.5:.5;i={angle:function(){return-90},w:function(e){return t.h(e)},h:function(e){return t.w(e)},dx:function(e){return t.h(e)*a-2},dy:function(){return 0}}}return i}).regRule("hide-by-label-height-vertical",function(t){return{hide:function(e){var n,r;return 0===t.angle(e)?(r=t.h(e),n=Math.abs(t.model.y0(e)-t.model.yi(e))):(r=t.w(e),n=t.model.size(e)),r>n||t.hide(e)}}}).regRule("cut-label-vertical",function(t){return{h:function(e){var n=t.h(e);if(Math.abs(t.angle(e))>0){var r=Math.abs(t.model.y0(e)-t.model.yi(e));return r0){var i=t.model.y0(e)=0?1:-1}(t,n)*e(t,n)};return t.model.flip?{dx:n}:{dy:n}}).regRule("inside-start-then-outside-end-horizontal",function(t,e){var n=[Nr.getRule("from-beginning"),Nr.getRule("towards"),Nr.getRule("cut-label-horizontal")].reduce(function(t,n){return Or.compose(t,n(t,e))},t),r=[Nr.getRule("to-end"),Nr.getRule("towards"),Nr.getRule("cut-outer-label-horizontal")].reduce(function(t,n){return Or.compose(t,n(t,e))},t);return Object.assign({},n,["x","dx","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return n.label(t).length>=r.label(t).length}(t)?n:r)[e](t)},t},{}))}).regRule("inside-start-then-outside-end-vertical",function(t,e){var n=[Nr.getRule("from-beginning"),Nr.getRule("towards"),Nr.getRule("cut-label-vertical")].reduce(function(t,n){return Or.compose(t,n(t,e))},t),r=[Nr.getRule("to-end"),Nr.getRule("towards"),Nr.getRule("cut-outer-label-vertical")].reduce(function(t,n){return Or.compose(t,n(t,e))},t);return Object.assign({},n,["y","dy","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return n.label(t).length>=r.label(t).length}(t)?n:r)[e](t)},t},{}))}).regRule("outside-then-inside-horizontal",function(t,e){var n=["r+","l-","cut-outer-label-horizontal"].map(Nr.getRule).reduce(function(t,n){return Or.compose(t,n(t,e))},t),r=["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"].map(Nr.getRule).reduce(function(t,n){return Or.compose(t,n(t,e))},t);return Object.assign({},n,["x","dx","hide","label"].reduce(function(t,e){return t[e]=function(t){return(function(t){return r.label(t).length>n.label(t).length}(t)?r:n)[e](t)},t},{}))}).regRule("outside-then-inside-vertical",function(t,e){var n=["t+","b-","cut-outer-label-vertical"].map(Nr.getRule).reduce(function(t,n){return Or.compose(t,n(t,e))},t),r=["t-","b+","hide-by-label-height-vertical","cut-label-vertical"].map(Nr.getRule).reduce(function(t,n){return Or.compose(t,n(t,e))},t);return Object.assign({},n,["y","dy","hide","label"].reduce(function(t,i){return t[i]=function(t){return(function(t){var r=n.y(t,e)+n.dy(t,e);return r<=0||r>=e.maxHeight}(t)?r:n)[i](t,e)},t},{}))}).regRule("hide-by-label-height-horizontal",function(t){return{hide:function(e){return t.model.size(e)0)return r+s;var u=o-n;return u>0?r-u:r},dy:function(e){var n=t.dy(e),i=t.y(e)+n,a=t.h(e),o=i+a/2;if(0-(i-a/2)>0)return 0;var s=o-r;return s>0?n-s:n}}}).regRule("multiline-label-left-align",function(t){return{dy:function(e){var n=t.dy(e);return-90===t.angle(e)?n+t.h(e)/2:n}}}).regRule("multiline-label-vertical-center-align",function(t){return{dy:function(e){return t.dy(e)-t.h(e)/2}}}).regRule("multiline-hide-on-container-overflow",function(t,e){var n=e.maxWidth,r=e.maxHeight;return{hide:function(e){var i=t.angle(e),a=t.x(e)+t.dx(e),o=t.y(e)+t.dy(e);return!(!Bt(a,t.w(e),i,n)&&!Vt(o,t.h(e),i,r))||t.hide(e)}}});var Vr=function(){function t(t){this.minError=Number.MAX_VALUE,this.items=t.items,this.revision=this.items.map(function(t){return{i:t.i,x:t.x,y:t.y}}),this.penalties=t.penalties,this.transactor=t.transactor,this.cooling_schedule=t.cooling_schedule||function(t,e,n){return t-e/n}}return t.prototype.energy=function(t){return this.penalties.reduce(function(e,n){return e+n(t)},0)},t.prototype.move=function(t){var e=Math.floor(Math.random()*this.items.length),n=this.transactor(this.items[e]),r=this.energy(e);this.items[e]=n.modify();var i=this.energy(e),a=i-r,o=a<0?1:Math.exp(-a/t);Math.random()>=o?this.items[e]=n.revert():i0&&d.length>0?this.autoPosition(c,d):c;var f=h.reduce(function(t,e){return Object.assign(t,((n={})[e]=!0,n));var n},{});c.text=c.text=f["auto:adjust-on-label-overflow"]?this.adjustOnOverflow(c.text,u):c.text,c.text=c.text=f["auto:adjust-on-multiline-label-overflow"]?this.adjustOnMultilineOverflow(c.text,u):c.text,c.text=f["auto:hide-on-label-edges-overlap"]?this.hideOnLabelEdgesOverlap(c.text,c.edges):c.text,c.text=f["auto:hide-on-label-label-overlap"]?this.hideOnLabelLabelOverlap(c.text):c.text,c.text=f["auto:hide-on-label-anchor-overlap"]?this.hideOnLabelAnchorOverlap(c.text):c.text;var p=c.text,g=function(t){return function(e,n){return p[n][t]}},m=g("x"),y=g("y"),v=g("angle"),b=g("color"),x=g("label"),_=function(t){if(t.style("fill",b).style("font-size",e.guide.fontSize+"px").style("display",function(t,e){return p[e].hide?"none":null}).attr("class","i-role-label").attr("text-anchor","middle").attr("transform",function(t,e){return"translate("+m(t,e)+","+y(t,e)+") rotate("+v(t,e)+")"}),i){t.each(function(t,e){var n=o.select(this),r=v(t,e);n.text(null),x(t,e).split(a).forEach(function(t,e){n.append("tspan").attr("text-anchor",0!==r?"start":"middle").attr("x",0).attr("y",0).attr("dy",1.2*(e+1)+"em").text(t)})})}else t.text(x)};r.hideEqualLabels&&p.filter(function(t){return!t.hide}).filter(function(t,e,n){return e0&&(t.hide=!0)}),t},t.prototype.hideOnLabelLabelOverlap=function(t){var e=this,n={min:0,max:1,norm:2},r={"min/min":function(t,e){return e.y-t.y},"max/max":function(t,e){return t.y-e.y},"min/max":function(){return-1},"min/norm":function(){return-1},"max/norm":function(){return-1},"norm/norm":function(t,e){return t.y-e.y}};return t.filter(function(t){return!t.hide}).sort(function(t,e){return n[t.extr]-n[e.extr]}).forEach(function(i){t.forEach(function(t){i.i!==t.i&&function(t,i){var a=e.getLabelRect(t),o=e.getLabelRect(i),s=Number(!t.hide&&!i.hide);if(s*Math.max(0,Math.min(o.x1,a.x1)-Math.max(a.x0,o.x0))*(s*Math.max(0,Math.min(o.y1,a.y1)-Math.max(a.y0,o.y0)))>0){var u=[t,i];u.sort(function(t,e){return n[t.extr]-n[e.extr]}),(r[u[0].extr+"/"+u[1].extr](u[0],u[1])<0?u[0]:u[1]).hide=!0}}(i,t)})}),t},t.prototype.getLabelRect=function(t,e){return void 0===e&&(e=0),{x0:t.x-t.w/2-e,x1:t.x+t.w/2+e,y0:t.y-t.h/2-e,y1:t.y+t.h/2+e}},t.prototype.getPointRect=function(t,e){return void 0===e&&(e=0),{x0:t.x-t.size/2-e,x1:t.x+t.size/2+e,y0:t.y-t.size/2-e,y1:t.y+t.size/2+e}},t.prototype.hideOnLabelAnchorOverlap=function(t){var e=this,n=function(t,n){var r=e.getLabelRect(t,2),i=e.getPointRect(n,2);return Math.max(0,Math.min(i.x1,r.x1)-Math.max(i.x0,r.x0))*Math.max(0,Math.min(i.y1,r.y1)-Math.max(i.y0,r.y0))>.001};return t.filter(function(t){return!t.hide}).forEach(function(e){for(var r=t.length,i=0;ir.right+u||sr.bottom+u)return null;var l=(i.find(o,s)||[]).map(function(t){var e=Math.sqrt(Math.pow(o-t.x,2)+Math.pow(s-t.y,2));if(e>u)return null;var n=ee.size)+" 1",n.left[0].x+","+n.left[0].y,"Z"].join(" "):ni(t.size>e.size?t:e)}function ii(t,e,n,r){var i=function(t,e,n,r){var i=si(t,r);if(0===i||i+t.size/2<=r.size/2||i+r.size/2<=t.size/2)return null;var a=function(i){var a=i?[r,n,e,t]:[t,e,n,r],o=li.apply(void 0,[1/12*2].concat(a)),s=li.apply(void 0,[.5].concat(o.slice(0,4))),u=s[3],l=s[6],c=hi(a[0],u),h=hi(u,l),d=[c.left[0],M(.5,c.left[1],h.left[0]),h.left[1]],f=[c.right[0],M(.5,c.right[1],h.right[0]),h.right[1]],p=ci.apply(void 0,d)[1],g=ci.apply(void 0,f)[1],m=M(4,c.left[0],p),y=M(4,c.right[0],g);return{left:i?[y,f[0]]:[d[0],m],right:i?[m,d[0]]:[f[0],y]}},o=a(!1),s=a(!0);return{left:o.left.concat(s.left),right:o.right.concat(s.right)}}(t,e,n,r);if(!i)return ri(t,r);var a=oi(ai(t,i.right[0]),ai(t,i.left[0])),o=oi(ai(r,i.right[1]),ai(r,i.left[1]));return["M"+i.left[0].x+","+i.left[0].y,"C"+i.left[1].x+","+i.left[1].y,i.left[2].x+","+i.left[2].y,i.left[3].x+","+i.left[3].y,"A"+r.size/2+","+r.size/2+" 0 "+Number(a>Math.PI)+" 1",i.right[3].x+","+i.right[3].y,"C"+i.right[2].x+","+i.right[2].y,i.right[1].x+","+i.right[1].y,i.right[0].x+","+i.right[0].y,"A"+t.size/2+","+t.size/2+" 0 "+Number(o>Math.PI)+" 1",i.left[0].x+","+i.left[0].y,"Z"].join(" ")}function ai(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}function oi(t,e){return e1?[t]:[]},d);h.exit().remove(),h.call(s(n.animationSpeed,a.pathAttributesUpdateInit,a.pathAttributesUpdateDone,a.afterPathUpdate));h.enter().append(a.pathElement).call(s(n.animationSpeed,a.pathAttributesEnterInit,a.pathAttributesEnterDone,a.afterPathUpdate)).merge(h).call(function(t){e.guide.animationSpeed>0&&!document.hidden?(t.attr(a.pathTween.attr,function(t){return a.pathTween.fn.call(this,t)(0)}),Q(t,e.guide.animationSpeed,"pathTransition").attrTween(a.pathTween.attr,a.pathTween.fn)):t.attr(a.pathTween.attr,function(t){return a.pathTween.fn.call(this,t)(1)})});if(t.subscribe(c),"never"!==n.showAnchors){var f=function(t,e,n){var r=e.anchorShape,i=t.config.guide,a=t.screenModel,o=di({},fi[r].getInitialAttrs(t,e),{opacity:"hover"===i.showAnchors?0:1,fill:function(t){return a.color(t)},class:"i-data-anchor"}),s=n.selectAll(".i-data-anchor").data(function(t){return t.filter(Qr)},a.id);return s.exit().remove(),s.call(rt(i.animationSpeed,null,o)),s.enter().append(fi[e.anchorShape].element).call(rt(i.animationSpeed,{r:0},o)).merge(s)}(t,a,r);t.subscribe(f)}},l=i.toFibers(),c=l.map(function(t){return t.filter(Qr)}),h=r.container.selectAll(".frame"),d=function(){var t=h.empty()?[]:h.data(),e=new Map;h.each(function(t){e.set(t,Number(this.getAttribute("data-id")))});var n=t.reduce(function(t,e){return t.set(e,e.map(i.id)),t},new Map),r=new Map,a=Math.max.apply(Math,[0].concat(Array.from(e.values())));return function(t){if(r.has(t))return r.get(t);var o,s=t.map(function(t){return i.id(t)}),u=(Array.from(n.entries()).find(function(t){var e=t[1];return s.some(function(t){return e.some(function(e){return e===t})})})||[null])[0];return o=u?e.get(u):++a,r.set(t,o),o}}();this._getDataSetId=d;var f=h.data(l,d);f.exit().remove(),f.call(u),f.enter().append("g").attr("data-id",d).call(u),f.order(),this._boundsInfo=this._getBoundsInfo(r.container.selectAll(".i-data-anchor").nodes()),t.subscribe(new Gr(i.model,e.flip,e.guide.label,r).draw(c))},_getBoundsInfo:function(t){if(0===t.length)return null;var e=this.node().screenModel,n=this.node().config.flip,r=t.map(function(t){var n=o.select(t).data()[0];return{node:t,data:n,x:e.x(n),y:e.y(n)}}).filter(function(t){return!isNaN(t.x)&&!isNaN(t.y)}),i=r.reduce(function(t,e){var n=e.x,r=e.y;return t.left=Math.min(n,t.left),t.right=Math.max(n,t.right),t.top=Math.min(r,t.top),t.bottom=Math.max(r,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),a=Ut(r.map(n?function(t){return t.y}:function(t){return t.x})).sort(function(t,e){return t-e}),s=a.reduce(function(t,e){return t[e]=[],t},{});r.forEach(function(t){var e=a.find(n?function(e){return t.y===e}:function(e){return t.x===e});s[e].push(t)});var u=function(t){if(1===t.length)return s[t[0]];var e=Math.ceil(t.length/2);return{middle:(t[e-1]+t[e])/2,lower:u(t.slice(0,e)),greater:u(t.slice(e))}};return{bounds:i,tree:u(a)}},getClosestElement:function(t,e){if(!this._boundsInfo)return null;var n=this._boundsInfo,r=n.bounds,i=n.tree,a=this.node().config.options.container,o=this.node().config.flip,s=Pe(a.node()),u=this.node().config.guide.maxHighlightDistance;if(tr.right+s.x+u||er.bottom+s.y+u)return null;var l=o?e-s.y:t-s.x,c=function t(e){return Array.isArray(e)?e:t(l>e.middle?e.greater:e.lower)}(i).map(function(n){var r=n.x+s.x,i=n.y+s.y,a=Math.abs(o?e-i:t-r),u=Math.abs(o?t-r:e-i);return{node:n.node,data:n.data,distance:a,secondaryDistance:u,x:r,y:i}});return pi(t,e,c)},highlight:function(t){var e=this.node().config.options.container,n="tau-chart__highlighted",r="tau-chart__dimmed",i=e.selectAll(".i-role-path"),a=i.data().filter(function(e){return e.filter(Qr).some(t)}),o=a.length>0;i.call(st(((s={})[n]=function(t){return o&&a.indexOf(t)>=0},s[r]=function(t){return o&&a.indexOf(t)<0},s)));var s,u,l=((u={})[n]=function(e){return!0===t(e)},u[r]=function(e){return!1===t(e)},u);e.selectAll(".i-role-dot").call(st(l)),e.selectAll(".i-role-label").call(st(l)),this._sortElements(t)},highlightDataPoints:function(t){var e=this.node(),n=function(t,e,n){var r=e.anchorShape,i=t.screenModel,a="hover"===t.config.guide.showAnchors;return t.config.options.container.selectAll(".i-data-anchor").call(ot(fi[r].getHighlightAttrs(t,e,n))).attr("opacity",a?function(t){return n(t)?1:0}:function(){return 1}).attr("fill",function(t){return i.color(t)}).attr("class",function(t){return Se("i-data-anchor",i.class(t))}).classed(Ve+"highlighted",n)}(e,this.domElementModel,t),r=e.config.options.container,i=e.config.flip,a=n.filter(t),o=r.select(".cursor-line");if(a.empty())o.remove();else{o.empty()&&(o=r.append("line"));var s=e.screenModel.model,u=s.xi(a.data()[0]),l=s.xi(a.data()[0]),c=s.scaleY.domain(),h=s.scaleY(c[0]),d=s.scaleY(c[1]);o.attr("class","cursor-line").attr("x1",i?h:u).attr("y1",i?u:h).attr("x2",i?d:l).attr("y2",i?l:d)}this._sortElements(t)},_sortElements:function(t){var e=this.node().config.options.container,n=new Map,r=new Map,i=this._getDataSetId;e.selectAll(".i-role-path").each(function(e){n.set(this,i(e)),r.set(this,e.filter(Qr).some(t))});var a=Kt(function(t,e){return r.get(t)-r.get(e)},function(t,e){return n.get(t)-n.get(e)}),o={line:0,g:1,text:2};Ee(e.node(),function(t,e){return"g"===t.tagName&&"g"===e.tagName?a(t,e):o[t.tagName]-o[e.tagName]})}},yi=[1,2,3,4,5],vi=yi.map(function(t){return Ve+"line-opacity-"+t}),bi=yi.map(function(t){return Ve+"line-width-"+t});function xi(t){return vi[t-1]||vi[4]}function _i(t,e){return t.length<2?"":String.prototype.concat.apply("",t.concat(e.slice().reverse()).map(function(t,e){return(0===e?"":" ")+t.x+","+t.y}))}function wi(t,e){if(t.length<2)return"";var n=function(t){var e=t.map(function(t,e){return""+((e-1)%3==0?"C":"")+t.x+","+t.y+" "});return String.prototype.concat.apply("",e)};return"M"+n(t)+"L"+n(e.slice().reverse())+"Z"}var Ei=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&(n=Ei.rgb(n).darker(1)),n}};e.pathAttributesEnterInit=a,e.pathAttributesUpdateDone=a;var o="polyline"===q(n.interpolate);return e.pathElement=o?"polygon":"path",e.anchorShape="vertical-stick",e.pathTween={attr:o?"points":"d",fn:at(0,o?_i:wi,[function(n){return{id:t.id(n),x:e.x(n),y:e.y(n)}},function(n){return{id:t.id(n),x:e.x0(n),y:e.y0(n)}}],t.id,n.interpolate)},e},_getBoundsInfo:function(t){if(0===t.length)return null;var e,n,r=this.node().screenModel,i=this.node().config.flip,a=t.map(function(t){var e=Ei.select(t).data()[0];return{node:t,data:e,x:r.x(e),y:r.y(e),y0:r.y0(e),group:r.group(e)}}),o=a.reduce(function(t,e){var n=e.x,r=e.y,i=e.y0;return t.left=Math.min(n,t.left),t.right=Math.max(n,t.right),t.top=Math.min(r,i,t.top),t.bottom=Math.max(r,i,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),s=Ut(a.map(i?function(t){return t.y}:function(t){return t.x})).sort(function(t,e){return t-e}),u=s.reduce(function(t,e){return t[e]=[],t},{});if(a.forEach(function(t){var e=s.find(i?function(e){return t.y===e}:function(e){return t.x===e});u[e].push(t)}),e=Object.keys(a.reduce(function(t,e){return t[e.group]=!0,t},{})),n=e.reduce(function(t,e,n){return t[e]=n,t},{}),s.forEach(function(t){var r=u[t];if(r.sort(function(t,e){return n[t.group]-n[e.group]}),r.lengthr.right+s.x+u||er.bottom+s.y+u)return null;var l=o?e-s.y:t-s.x,c=function t(e){if(e.isLeaf)return e;var n=e.left.end;return t(l1&&(h=1);var d,f=(d=c.items.start.reduce(function(t,e){return t[e.group]={start:e,end:null,y:null,y0:null},t},{}),c.items.end.forEach(function(t){void 0!==d[t.group]?d[t.group].end=t:delete d[t.group]}),Object.keys(d).forEach(function(t){var e=d[t];e.end?(e.y=e.start.y+h*(e.end.y-e.start.y),e.y0=e.start.y0+h*(e.end.y0-e.start.y0)):delete d[t]}),Object.keys(d).map(function(t){return d[t]}).map(function(t){return{y:t.y,y0:t.y0,el:h<.5?t.start:t.end}}).filter(function(t){return null!=t.el.data})),p=e-s.y,g=f.filter(function(t){return p>=t.y&&p<=t.y0}),m=(g.length>0?g:f).map(function(t){return t.el}).map(function(n){var r=n.x+s.x,i=n.y+s.y,a=Math.abs(o?e-i:t-r),u=Math.abs(o?t-r:e-i);return{node:n.node,data:n.data,distance:a,secondaryDistance:u,x:r,y:i}});return pi(t,e,m)}},Ti={draw:mi.draw,getClosestElement:mi.getClosestElement,highlight:mi.highlight,highlightDataPoints:mi.highlightDataPoints,addInteraction:mi.addInteraction,_getBoundsInfo:mi._getBoundsInfo,_sortElements:mi._sortElements,init:function(t){var e=mi.init(t);return e.transformRules=[e.flip&&E.get("flip")],e.adjustRules=[function(t,n){var r=t.scaleSize.isEmptyScale(),i=qt(e.guide.size||{},{defMinSize:2,defMaxSize:r?6:40}),a=Object.assign({},n,{defMin:i.defMinSize,defMax:i.defMaxSize,minLimit:i.minSize,maxLimit:i.maxSize});return E.get("adjustStaticSizeScale")(t,a)}],e},buildModel:function(t){var e=mi.baseModel(t),n=this.node().config.guide,r=xi(t.model.scaleColor.domain().length),i=Ve+"area area i-role-path "+r+" "+n.cssClass+" ";e.groupAttributes={class:function(t){return i+" "+e.class(t[0])+" frame"}};var a,o,s={fill:function(t){return e.color(t[0])},stroke:function(t){return e.color(t[0])}};return e.pathAttributesEnterInit=s,e.pathAttributesUpdateDone=s,e.pathElement="polygon",e.anchorShape="circle",e.pathTween={attr:"points",fn:at(0,(a=function(t){return t.x},o=function(t){return t.y},function(t){return t.map(function(t){return[a(t),o(t)].join(",")}).join(" ")}),[function(n){return{id:t.id(n),x:e.x(n),y:e.y(n)}}],t.id)},e}};function Mi(t){if(t.length<2)return"";for(var e="",n=0;n=160&&e<320?n=1:e>=320&&e<480?n=2:e>=480&&e<640?n=3:e>=640&&(n=4),bi[n]):"",u=xi(t.model.scaleColor.domain().length),l=o?"line":"area",c=""+Ve+l+" "+l+" i-role-path "+s+" "+u+" "+i.cssClass+" ",h=o?{stroke:function(t){return f.color(t[0])},class:"i-role-datum"}:{fill:function(t){return f.color(t[0])}},d="cubic"===q(i.interpolate)?o?Ci:ei:o?Mi:ti,f=mi.baseModel(t),p=o?function(e){return{id:t.id(e),x:f.x(e),y:f.y(e)}}:function(e){return{id:t.id(e),x:f.x(e),y:f.y(e),size:f.size(e)}};return f.groupAttributes={class:function(t){return c+" "+f.class(t[0])+" frame"}},f.pathElement="path",f.anchorShape="circle",f.pathAttributesEnterInit=h,f.pathAttributesUpdateDone=h,f.pathTween={attr:"d",fn:at(0,d,[p],t.id,i.interpolate)},f}},Ai=function(t){return o.select(t).data()[0]},Oi={init:function(t){var e=Object.assign({},t);e.guide=e.guide||{},e.guide=qt(e.guide,{animationSpeed:0,avoidScalesOverflow:!0,maxHighlightDistance:32,prettify:!0,sortByBarHeight:!0,enableColorToBarPosition:null!=e.guide.enableColorToBarPosition?e.guide.enableColorToBarPosition:!e.stack}),e.guide.size=qt(e.guide.size||{},{enableDistributeEvenly:!0}),e.guide.label=qt(e.guide.label||{},{position:e.flip?e.stack?["r-","l+","hide-by-label-height-horizontal","cut-label-horizontal"]:["outside-then-inside-horizontal","auto:hide-on-label-label-overlap"]:e.stack?["rotate-on-size-overflow","t-","b+","hide-by-label-height-vertical","cut-label-vertical","auto:hide-on-label-label-overlap"]:["rotate-on-size-overflow","outside-then-inside-vertical","auto:hide-on-label-label-overlap"]});var n=e.guide.avoidScalesOverflow,r=e.guide.enableColorToBarPosition,i=e.guide.size.enableDistributeEvenly;return e.transformRules=[e.flip&&E.get("flip"),e.guide.obsoleteVerticalStackOrder&&E.get("obsoleteVerticalStackOrder"),e.stack&&E.get("stack"),r&&E.get("positioningByColor")].filter(function(t){return t}),e.adjustRules=[i&&function(t,n){var r=qt(e.guide.size||{},{defMinSize:e.guide.prettify?3:0,defMaxSize:e.guide.prettify?40:Number.MAX_VALUE}),i=Object.assign({},n,{defMin:r.defMinSize,defMax:r.defMaxSize,minLimit:r.minSize,maxLimit:r.maxSize});return E.get("size_distribute_evenly")(t,i)},n&&i&&function(t,e){var n=Object.assign({},e,{sizeDirection:"x"});return E.get("avoidScalesOverflow")(t,n)},e.stack&&E.get("adjustYScale")].filter(function(t){return t}),e},addInteraction:function(){var t=this,e=this.node();e.on("highlight",function(e,n){return t.highlight(n)}),e.on("data-hover",function(e,n){return t.highlight((r=n.data,i=null,function(t){return t===r||i}));var r,i})},draw:function(){var t=this.node(),e=t.config,n=e.options;n.container=n.slot(e.uid);var r=e.guide.prettify,i="i-role-element i-role-datum bar "+Ve+"bar",a=t.screenModel,s=this.buildModel(a,{prettify:r,minBarH:1,minBarW:1,baseCssClass:i}),u=rt,l=e.flip?"y":"x",c=e.flip?"x":"y",h=e.flip?"width":"height",d=e.flip?"height":"width",f=a.toFibers(),p=f.reduce(function(t,e){return t.concat(e)},[]),g=s.class,m=Yt(s,"class"),y=n.container.selectAll(".bar").data(p,a.id);y.exit().classed("tau-removing",!0).call(u(e.guide.animationSpeed,null,((_={})[l]=function(){var t=o.select(this);return t.attr(l)-0+(t.attr(d)-0)/2},_[c]=function(){return this.getAttribute("data-zero")},_[d]=0,_[h]=0,_),function(t){var e=o.select(t);e.classed("tau-removing")&&e.remove()})),y.call(u(e.guide.animationSpeed,null,m));var v=y.enter().append("rect").call(u(e.guide.animationSpeed,(w={},w[c]=a[c+"0"],w[h]=0,w),m)).merge(y).attr("class",g).attr("data-zero",a[c+"0"]);t.subscribe(new Gr(a.model,a.model.flip,e.guide.label,n).draw(f));var b,x=(b=p.reduce(function(t,e,n){return t.set(e,n+1),t},new Map),function(t,e){return(b.get(Ai(t))||-1)-(b.get(Ai(e))||-1)});this._barsSorter=e.guide.sortByBarHeight?e.flip?function(t,e){var n=Ai(t),r=Ai(e),i=s.width(n),a=s.width(r);if(i===a){var o=s.y(n),u=s.y(r);return o===u?x(t,e):o-u}return a-i}:function(t,e){var n=Ai(t),r=Ai(e),i=s.height(n),a=s.height(r);if(i===a){var o=s.x(n),u=s.x(r);return o===u?x(t,e):o-u}return a-i}:x;var _,w,E={rect:0,text:1};this._typeSorter=function(t,e){return E[t.tagName]-E[e.tagName]},this._sortElements(this._typeSorter,this._barsSorter),t.subscribe(v),this._boundsInfo=this._getBoundsInfo(v.nodes())},buildModel:function(t,e){var n,r=e.prettify,i=e.minBarH,a=e.minBarW,o=e.baseCssClass,s=function(e){var n=t.size(e);return r&&(n=Math.max(a,n)),n},u=function(e){return e[t.model.scaleY.dim]};if(t.flip){var l=function(e){return Math.abs(t.x(e)-t.x0(e))};n={y:function(e){return t.y(e)-.5*s(e)},x:function(e){var n=Math.min(t.x0(e),t.x(e));if(r){var a=l(e),o=u(e),s=0;return 0===o&&(s=0),o>0&&(s=a),o<0&&(s=0-i),a0?n-i:n);return n},width:function(t){return s(t)},height:function(t){var e=c(t);return r&&(e=0===u(t)?e:Math.max(i,e)),e}}}return Object.assign(n,{class:function(e){return o+" "+t.class(e)},fill:function(e){return t.color(e)}})},_sortElements:function(){for(var t=[],e=0;es}}),i=r.reduce(function(t,e){var n=e.box;return t.left=Math.min(n.left,t.left),t.right=Math.max(n.right,t.right),t.top=Math.min(n.top,t.top),t.bottom=Math.max(n.bottom,t.bottom),t},{left:Number.MAX_VALUE,right:Number.MIN_VALUE,top:Number.MAX_VALUE,bottom:Number.MIN_VALUE}),a=Ut(r.map(n?function(t){return t.cy}:function(t){return t.cx})).sort(function(t,e){return t-e}),s=a.reduce(function(t,e){return t[e]=[],t},{});r.forEach(function(t){var e=a.find(n?function(e){return t.cy===e}:function(e){return t.cx===e});s[e].push(t)});var u=function(t){if(1===t.length)return s[t];var e=Math.ceil(t.length/2);return{middle:(t[e-1]+t[e])/2,lower:u(t.slice(0,e)),greater:u(t.slice(e))}};return{bounds:i,tree:u(a)}},getClosestElement:function(t,e){if(!this._boundsInfo)return null;var n=this._boundsInfo,r=n.bounds,i=n.tree,a=this.node().config.options.container,o=this.node().config.flip,s=Pe(a.node()),u=t-s.x,l=e-s.y,c=this.node().config.guide.maxHighlightDistance;if(ur.right+c||lr.bottom+c)return null;var h=o?l:u,d=o?u:l;return function t(e){return Array.isArray(e)?e:t(h>e.middle?e.greater:e.lower)}(i).map(function(t){var e,n=o?t.box.left:t.box.top,r=o?t.box.right:t.box.bottom,i=(e=d)>=n&&e<=r;if(!i&&Math.abs(d-n)>c&&Math.abs(d-r)>c)return null;var a=Math.abs(d-(t.invert!==o?r:n));return Object.assign(t,{distToValue:a,cursorInside:i})}).filter(function(t){return t}).sort(function(t,e){return t.cursorInside!==e.cursorInside?e.cursorInside-t.cursorInside:Math.abs(t.distToValue)-Math.abs(e.distToValue)}).map(function(t){var e=t.cx,n=t.cy,r=Math.abs(o?l-n:u-e),i=Math.abs(o?u-e:l-n);return{node:t.node,data:t.data,distance:r,secondaryDistance:i,x:e,y:n}})[0]||null},highlight:function(t){var e,n=this.node().config.options.container,r=((e={})["tau-chart__highlighted"]=function(e){return!0===t(e)},e["tau-chart__dimmed"]=function(e){return!1===t(e)},e);n.selectAll(".bar").call(st(r)),n.selectAll(".i-role-label").call(st(r)),this._sortElements(function(e,n){return t(Ai(e))-t(Ai(n))},this._typeSorter,this._barsSorter)}},Pi=n(12),Ni=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Li=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e,n.config.guide=qt(n.config.guide||{},{}),n.on("highlight",function(t,e){return n.highlight(e)}),n}return Ni(e,t),e.prototype.defineGrammarModel=function(t){var e=this.config,n=e.options;this.color=t("color",e.color,{}),this.scalesMap=e.columns.reduce(function(e,r){return e[r]=t("pos",r,[0,n.height]),e},{});var r=n.width/(e.columns.length-1),i=e.columns.reduce(function(t,e,n){return t[e]=n*r,t},{});return this.xBase=function(t){return i[t]},this.regScale("columns",this.scalesMap).regScale("color",this.color),{}},e.prototype.drawFrames=function(t){var e=this.config,n=this.config.options,r=this.scalesMap,i=this.xBase,a=this.color,o=Pi.line(),s=function(t){t.attr("d",function(t){return o(e.columns.map(function(e){return[i(e),r[e](t[r[e].dim])]}))})},u=function(t){t.attr("stroke",function(t){return a.toColor(a(t[a.dim]))}),t.attr("class",function(t){return Ve+"__line line "+a.toClass(a(t[a.dim]))+" foreground"})},l=function(t){var e=t.selectAll(".background").data(function(t){return t.part()});e.exit().remove(),e.call(s),e.enter().append("path").attr("class","background line").call(s);var n=t.selectAll(".foreground").data(function(t){return t.part()});n.exit().remove(),n.call(function(t){s(t),u(t)}),n.enter().append("path").call(function(t){s(t),u(t)})},c=n.container.selectAll(".lines-frame").data(t,function(t){return t.hash()});c.exit().remove(),c.call(l),c.enter().append("g").attr("class","lines-frame").call(l),this.subscribe(n.container.selectAll(".lines-frame .foreground"))},e.prototype.highlight=function(t){this.config.options.container.selectAll(".lines-frame .foreground").style("visibility",function(e){return t(e)?"":"hidden"})},e}(g),Ri=function(){function t(t,e){var n,r=this;if(this._fields={},Array.isArray(e.fitToFrameByDims)&&e.fitToFrameByDims.length){n=t.part(function(t){var n={};return"where"===t.type&&t.args?(n.type=t.type,n.args=e.fitToFrameByDims.reduce(function(e,n){return t.args.hasOwnProperty(n)&&(e[n]=t.args[n]),e},{})):n=t,n})}else n=t.full();var i=this.getVarSet(n,e);e.order&&(i=Xt(Gt(e.order,i),i)),this.vars=i;var a=i.map(function(t){return t});this.scaleConfig=e,this.scaleConfig.nice=this.scaleConfig.hasOwnProperty("nice")?this.scaleConfig.nice:this.scaleConfig.autoScale,this.addField("dim",this.scaleConfig.dim).addField("scaleDim",this.scaleConfig.dim).addField("scaleType",this.scaleConfig.type).addField("source",this.scaleConfig.source).addField("domain",function(){return r.vars}).addField("isInteger",a.every(Number.isInteger)).addField("originalSeries",function(){return a}).addField("isContains",function(t){return r.isInDomain(t)}).addField("isEmptyScale",function(){return r.isEmpty()}).addField("fixup",function(t){var e=r.scaleConfig;e.__fixup__=e.__fixup__||{},e.__fixup__=Object.assign(e.__fixup__,t(Object.assign({},e,e.__fixup__)))}).addField("commit",function(){r.scaleConfig=Object.assign(r.scaleConfig,r.scaleConfig.__fixup__),delete r.scaleConfig.__fixup__})}return t.prototype.isInDomain=function(t){return this.domain().indexOf(t)>=0},t.prototype.addField=function(t,e){return this._fields[t]=e,this[t]=e,this},t.prototype.getField=function(t){return this._fields[t]},t.prototype.isEmpty=function(){return!Boolean(this._fields.dim)},t.prototype.toBaseScale=function(t,e){var n=this;void 0===e&&(e=null);var r=Object.keys(this._fields).reduce(function(t,e){return t[e]=n._fields[e],t},t);return r.getHash=function(){return Ot([n.vars,e].map(function(t){return JSON.stringify}).join(""))},r.value=r,r},t.prototype.getVarSet=function(t,e){return Ut(e.hasOwnProperty("series")?e.series:t.map(function(t){return t[e.dim]}),"date"===e.dimType?function(t){return new Date(t).getTime()}:function(t){return t})},t}(),Di=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Fi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._references=n.references,r._refCounter=n.refCounter,r.addField("scaleType","identity"),r}return Di(e,t),e.prototype.create=function(){var t=this._references,e=this._refCounter;return this.toBaseScale(function(n,r){if(null==n){var i=t.get(r);null==i&&(i=e(),t.set(r,i))}else i=n;return i})},e}(Ri),Ii=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ji=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0){var f=Math.max.apply(Math,s.map(Math.abs));s=[-f,f]}r.vars=s}return r.addField("scaleType","color").addField("discrete",i).addField("brewer",a).addField("toColor",Dt).addField("toClass",Ft),r}return Ii(e,t),e.prototype.create=function(){var t=this.discrete,e=this.vars,n=this.getField("brewer"),r=t?this.createDiscreteScale(e,n):this.createContinuesScale(e,n);return this.toBaseScale(r)},e.prototype.createDiscreteScale=function(t,e){var n,r=function(t,e){var n=t.map(function(t){return String(t).toString()});return ji.scaleOrdinal().range(e).domain(n)},i=function(t){return function(e){return t(String(e).toString())}};if(Array.isArray(e))n=i(r(t,e));else if("function"==typeof e)n=function(n){return e(n,i(r(t,zt(20).map(function(t){return"color20-"+(1+t)}))))};else{if(!Tt(e))throw new Error("This brewer is not supported");n=function(t,e){var n=Object.keys(t),r=n.map(function(e){return t[e]}),i=ji.scaleOrdinal().range(r).domain(n);return function(n){return t.hasOwnProperty(n)?i(String(n)):e(n)}}(e,function(){return"color-default"})}return n},e.prototype.createContinuesScale=function(t,e){if(!Array.isArray(e))throw new Error("This brewer is not supported");return ji.scaleLinear().domain(Rt(t.map(function(t){return t-0}),e.length)).range(e)},e}(Ri),Bi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Vi={sqrt:function(t){return Math.sqrt(t)},linear:function(t){return t}},Hi=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=r.scaleConfig,a=s.extent(r.vars),o=Number.isFinite(i.min)?i.min:a[0],u=Number.isFinite(i.max)?i.max:a[1];return r.vars=[Math.min.apply(Math,[o,a[0]].filter(Number.isFinite)),Math.max.apply(Math,[u,a[1]].filter(Number.isFinite))],r.addField("scaleType","size"),r.addField("funcType",n.func||"sqrt"),r}return Bi(e,t),e.prototype.isInDomain=function(t){var e=this.domain().sort(),n=e[0],r=e[e.length-1];return!Number.isNaN(n)&&!Number.isNaN(r)&&t<=r&&t>=n},e.prototype.create=function(){var t,e=this.scaleConfig,n=this.vars,r=qt({},e,{func:"sqrt",minSize:0,maxSize:1}),i=r.func,a=r.minSize,o=r.maxSize,s=Vi[i],u=n.filter(function(t){return Number.isFinite(Number(t))});if(0===u.length)t=function(){return o};else{var l,c,h=Math.min.apply(Math,u),d=Math.max.apply(Math,u),f=s(Math.max(Math.abs(h),Math.abs(d),d-h));c=h<0?h:0,l=0===f?1:(o-a)/f,t=function(t){var e=null!==t?parseFloat(t):0;return Number.isFinite(e)?a+s(e-c)*l:o}}return this.toBaseScale(t)},e}(Ri),Ui=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Wi=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.addField("scaleType","ordinal").addField("discrete",!0),r}return Ui(e,t),e.prototype.create=function(t){var e=this.scaleConfig,n=this.vars,r=u.scalePoint().domain(n).range(t).padding(.5),i=Math.max.apply(Math,t),a=function(t){return"function"==typeof e.ratio?e.ratio(t,i,n):"object"==typeof e.ratio?e.ratio[t]:1/n.length},o=function(t){return e.ratio?i-n.slice(n.indexOf(t)+1).reduce(function(t,e){return t+i*a(e)},i*a(t)*.5):r(t)};return Object.keys(r).forEach(function(t){return o[t]=r[t]}),o.stepSize=function(t){return a(t)*i},this.toBaseScale(o,t)},e}(Ri),Xi=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Gi=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0},e.prototype.create=function(t){var e=this.periodGenerator,n=this.vars,r=this.vars.map(function(t){return t.getTime()}),i=this.scaleConfig,a=Gi.scalePoint().domain(n).range(t).padding(.5),o=Gi.scalePoint().domain(r.map(String)).range(t).padding(.5),s=Math.max.apply(Math,t),u=function(t){var e=new Date(t).getTime();return"function"==typeof i.ratio?i.ratio(e,s,r):"object"==typeof i.ratio?i.ratio[e]:1/n.length},l=function(t){var n=new Date(t),a=(e?e.cast(n):n).getTime();return i.ratio?s-r.slice(r.indexOf(a)+1).reduce(function(t,e){return t+s*u(e)},s*u(t)*.5):o(String(a))};return Object.keys(a).forEach(function(t){return l[t]=a[t]}),l.stepSize=function(t){return u(t)*s},this.toBaseScale(l,t)},e}(Ri),Yi=n(11),$i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ki=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=r},e.prototype.create=function(t){var e=this,n=this.vars,r=this.scaleConfig.utcTime,i=this.periodGenerator,a=(r?Ki.scaleUtc:Ki.scaleTime)().domain(n).range(t),o=function(t){var e=n[0],r=n[1];return t>r&&(t=r),t=i&&t<=a});return function(t,e,n){void 0===n&&(n=10);var r,i,a=Number(t[0]),o=Number(t[1]),s=Math.abs(o-a)/n,u=Ki.bisector(function(t){return t.duration}).right(ea,s);if(u===ea.length)r=e?Ki.utcYear:Ki.timeYear,i=Ki.tickStep(a/ta.year.duration,o/ta.year.duration,n);else if(u){var l=s/ea[u-1].duration,c=ea[u].duration/s,h=ea[lc&&(e=c),a(e)}}return Object.keys(a).forEach(function(t){return o[t]=a[t]}),o.stepSize=function(){return 0},this.toBaseScale(o,t)},e}(Ri);function Qi(t){return Ki["time"+t[0].toUpperCase()+t.slice(1)]}var Zi,ta={second:{duration:1e3,interval:Ki.timeSecond,utc:Ki.utcSecond},minute:{duration:6e4,interval:Ki.timeMinute,utc:Ki.utcMinute},hour:{duration:36e5,interval:Ki.timeHour,utc:Ki.utcHour},day:{duration:864e5,interval:Ki.timeDay,utc:Ki.utcDay},week:{duration:6048e5,interval:Ki.timeWeek,utc:Ki.utcWeek},month:{duration:2592e6,interval:Ki.timeMonth,utc:Ki.utcMonth},year:{duration:31536e6,interval:Ki.timeYear,utc:Ki.utcYear}},ea=[(Zi=function(t,e){return{time:t,step:e,duration:e*t.duration}})(ta.second,1),Zi(ta.second,5),Zi(ta.second,15),Zi(ta.second,30),Zi(ta.minute,1),Zi(ta.minute,5),Zi(ta.minute,15),Zi(ta.minute,30),Zi(ta.hour,1),Zi(ta.hour,3),Zi(ta.hour,6),Zi(ta.hour,12),Zi(ta.day,1),Zi(ta.day,2),Zi(ta.week,1),Zi(ta.month,1),Zi(ta.month,3),Zi(ta.year,1)];var na=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ra=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n},e.prototype.create=function(t){var e=this.vars,n=this.extendScale(ra.scaleLinear());return n.domain(e).range(t).clamp(!0),this.toBaseScale(n,t)},e.prototype.extendScale=function(t){var e=this,n=t.copy,r=t.ticks;return Object.assign(t,{stepSize:function(){return 0},copy:function(){return e.extendScale(n.call(t))},ticks:this.getField("isInteger")?function(e){return r.call(t,e).filter(Number.isInteger)}:t.ticks}),t},e}(Ri),aa=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oa=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0,n=t.map(function(t){return Math.abs(t)}),r=Math.max.apply(Math,n),i=Math.min.apply(Math,n).toExponential().split("e"),a=r.toExponential().split("e"),o=parseFloat(Math.floor(Number(i[0]))+"e"+i[1]),s=parseFloat(Math.ceil(Number(a[0]))+"e"+a[1]);return e?[o,s]:[-s,-o]}(a)),r.vars=a,r.addField("scaleType","logarithmic").addField("discrete",!1),r}return aa(e,t),e.prototype.isInDomain=function(t){var e=this.domain(),n=e[0],r=e[e.length-1];return!Number.isNaN(n)&&!Number.isNaN(r)&&t<=r&&t>=n},e.prototype.create=function(t){var e=this.vars;la(e);var n=function t(e){var n=e.copy;e.ticks=function(t){for(var n=[],r=oa.extent(e.domain()),i=Math.floor(ua(r[0])),a=Math.ceil(ua(r[1])),o=Math.ceil(10*(a-i)/(10*Math.ceil(t/10))),s=i;s<=a;s+=o)for(var u=1;u<=10;u++){var l=Math.pow(u,o)*Math.pow(10,s);(l=parseFloat(l.toExponential(0)))>=r[0]&&l<=r[1]&&n.push(l)}return n};e.copy=function(){var r=n.call(e);return t(r),r};return e}(oa.scaleLog()).domain(e).range(t);return n.stepSize=function(){return 0},this.toBaseScale(n,t)},e}(Ri);function ua(t){return Math.log(t)/Math.LN10}function la(t){if(t[0]*t[1]<=0)throw new x("Logarithmic scale domain cannot cross zero.",_.INVALID_LOG_DOMAIN)}var ca,ha=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),da=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.addField("scaleType","value").addField("georole",n.georole),r}return ha(e,t),e.prototype.create=function(){return this.toBaseScale(function(t){return t})},e}(Ri),fa=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),pa=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=n},e.prototype.create=function(){var t=this.vars,e=this.getField("brewer");if(!Array.isArray(e))throw new Error("This brewer is not supported");var n=e.length,r=(t[1]-t[0])/n,i=zt(n-1).map(function(t){return t+1}).reduce(function(e,n){return e.concat([t[0]+n*r])},[]),a=pa.scaleThreshold().domain(i).range(e);return this.toBaseScale(a)},e}(Ri),ma=function(t){return t||null},ya=function(t,e){return void 0===e&&(e=null),Array.isArray(t)?0===t.length?[e]:t:[t]},va=function(t,e){return{type:t,x:e.x,y:e.y,identity:e.identity,size:e.size,color:e.color,split:e.split,label:e.label,guide:{color:e.colorGuide,obsoleteVerticalStackOrder:e.obsoleteVerticalStackOrder,size:e.sizeGuide},flip:e.flip,stack:e.stack}},ba={SUCCESS:"SUCCESS",WARNING:"WARNING",FAIL:"FAIL"},xa=((ca={})[ba.SUCCESS]=function(t){return t},ca[ba.FAIL]=function(t,e){throw new Error((e.messages||[]).join("\n")||["This configuration is not supported,","See https://api.taucharts.com/basic/facet.html#easy-approach-for-creating-facet-chart"].join(" "))},ca[ba.WARNING]=function(t,e,n){var r=e.axis,i=e.indexMeasureAxis[0],a=t[i],o=t.filter(function(t){return t!==a});o.push(a);var s=n[i][r]||{},u=n[n.length-1][r]||{};return n[n.length-1][r]=s,n[i][r]=u,o},ca);function _a(t,e,n){return e.reduce(function(e,r,i){var a=t[r];return a?e.status!=ba.FAIL&&("measure"===a.type&&(e.countMeasureAxis++,e.indexMeasureAxis.push(i)),"measure"!==a.type&&1===e.countMeasureAxis?e.status=ba.WARNING:e.countMeasureAxis>1&&(e.status=ba.FAIL,e.messages.push('There is more than one measure dimension for "'+n+'" axis'))):(e.status=ba.FAIL,r?e.messages.push('"'+r+'" dimension is undefined for "'+n+'" axis'):e.messages.push('"'+n+'" axis should be specified')),e},{status:ba.SUCCESS,countMeasureAxis:0,indexMeasureAxis:[],messages:[],axis:n})}function wa(t){for(var e=ya(t.x),n=ya(t.y),r=Math.max(e.length,n.length),i=ya(t.guide||{},{}),a=r-i.length,o=0;o0;c--){var h=s.pop(),d=u.pop(),f=l.pop()||{};c===a?(o.x=h,o.y=d,o.unit.push(va(t,{x:ma(h),y:ma(d),identity:e.identity,split:e.split,color:e.color,label:e.label,size:e.size,flip:e.flip,stack:e.stack,colorGuide:f.color,obsoleteVerticalStackOrder:f.obsoleteVerticalStackOrder,sizeGuide:f.size})),o.guide=qt(f,{x:{label:h},y:{label:d}})):o={type:"COORDS.RECT",x:ma(h),y:ma(d),unit:[o],guide:qt(f,{x:{label:h},y:{label:d}})}}return e.spec={dimensions:e.dimensions,unit:o},e}var Sa=function(t){var e,n,r,i=wa(t);return n=((e=i).flip?e.y:e.x).indexOf(e.color)>=0,r=e.guide[e.guide.length-1],n&&!r.hasOwnProperty("enableColorToBarPosition")&&(r.enableColorToBarPosition=!1),Ea("ELEMENT.INTERVAL",i=e)},Ta=function(t){var e=wa(t),n=e.data,r=e.settings.log,i=(0,{horizontal:function(t){return{prop:t.x[t.x.length-1],flip:!1}},vertical:function(t){return{prop:t.y[t.y.length-1],flip:!0}},auto:function(t){var e,i=t.x,a=t.y,o=i[i.length-1],s=i.slice(0,i.length-1),u=a[a.length-1],l=a.slice(0,a.length-1),c=t.color,h=s.concat(l).concat([c]).filter(function(t){return null!==t}),d=-1,f=[[[o].concat(h),u],[[u].concat(h),o]],p=null;return f.some(function(t,e){var i=t[0],a=t[1],o=nn(n,i,[a]);return o.result?d=e:r(["Attempt to find a functional relation between",t[0]+" and "+t[1]+" is failed.","There are several "+o.error.keyY+" values (e.g. "+o.error.errY.join(",")+")","for ("+o.error.keyX+" = "+o.error.valX+")."].join(" ")),o.result})?(e=f[d][0][0],p=0!==d):(r("All attempts are failed. Gonna transform AREA to general PATH."),e=null),{prop:e,flip:p}}}["boolean"!=typeof e.flip?"auto":e.flip?"vertical":"horizontal"])(e);return null!==i.prop&&(e.data=sn(n,i.prop,e.dimensions[i.prop]),e.flip=i.flip),Ea("ELEMENT.AREA",e)},Ma=function(){function t(t){this.unitRef=t}return t.prototype.value=function(){return this.unitRef},t.prototype.clone=function(){return JSON.parse(JSON.stringify(this.unitRef))},t.prototype.traverse=function(t){var e=function(t,n,r){n(t,r),(t.units||[]).map(function(r){return e(r,n,t)})};return e(this.unitRef,t,null),this},t.prototype.reduce=function(t,e){var n=e;return this.traverse(function(e,r){return n=t(n,e,r)}),n},t.prototype.addFrame=function(t){return this.unitRef.frames=this.unitRef.frames||[],t.key.__layerid__=["L",(new Date).getTime(),this.unitRef.frames.length].join(""),t.source=t.hasOwnProperty("source")?t.source:this.unitRef.expression.source,t.pipe=t.pipe||[],this.unitRef.frames.push(t),this},t.prototype.addTransformation=function(t,e){return this.unitRef.transformation=this.unitRef.transformation||[],this.unitRef.transformation.push({type:t,args:e}),this},t.prototype.isCoordinates=function(){return 0===(this.unitRef.type||"").toUpperCase().indexOf("COORDS.")},t.prototype.isElementOf=function(t){if(this.isCoordinates())return!1;var e=(this.unitRef.type||"").split("/");return 1===e.length&&e.unshift("RECT"),e[0].toUpperCase()===t.toUpperCase()},t}(),Ca=function(){function t(t){this.specRef=t}return t.prototype.value=function(){return this.specRef},t.prototype.unit=function(t){return t&&(this.specRef.unit=t),new Ma(this.specRef.unit)},t.prototype.addTransformation=function(t,e){return this.specRef.transformations=this.specRef.transformations||{},this.specRef.transformations[t]=e,this},t.prototype.getSettings=function(t){return this.specRef.settings[t]},t.prototype.setSettings=function(t,e){return this.specRef.settings=this.specRef.settings||{},this.specRef.settings[t]=e,this},t.prototype.getScale=function(t){return this.specRef.scales[t]},t.prototype.addScale=function(t,e){return this.specRef.scales[t]=e,this},t.prototype.regSource=function(t,e){return this.specRef.sources[t]=e,this},t.prototype.getSourceData=function(t){return(this.specRef.sources[t]||{data:[]}).data},t.prototype.getSourceDim=function(t,e){return(this.specRef.sources[t]||{dims:{}}).dims[e]||{}},t}(),ka={},Aa=function(){function t(){}return t.unit=function(t){return new Ma(t)},t.spec=function(t){return new Ca(t)},t.cloneObject=function(t){return JSON.parse(JSON.stringify(t))},t.depthFirstSearch=function(e,n){if(n(e))return e;for(var r=e.hasOwnProperty("frames")?e.frames:[{units:e.units}],i=0;i1))return"[columns] property must contain at least 2 dimensions"}]));var Ra="2.3.2";e.default={GPL:Be,Plot:Qn,Chart:ir,api:Na,version:"2.3.2"}},function(t,n){t.exports=e},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=a},function(t,e){t.exports=o},function(t,e){t.exports=s},function(t,e){t.exports=u},function(t,e){t.exports=l},function(t,e,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){return t.indexOf(e)},r=window,i=r.document,a=i.documentElement,o=["top","bottom"];function s(t,e){for(var n in e)t[n]=e[n];return t}function u(t){var e,n=r.pageYOffset||a.scrollTop,i=r.pageXOffset||a.scrollLeft,o={left:0,right:0,top:0,bottom:0,width:0,height:0};if((e=t)&&null!=e.setInterval)o.width=r.innerWidth||a.clientWidth,o.height=r.innerHeight||a.clientHeight;else{if(!a.contains(t)||null==t.getBoundingClientRect)return o;s(o,t.getBoundingClientRect()),o.width=o.right-o.left,o.height=o.bottom-o.top}return o.top=o.top+n-a.clientTop,o.left=o.left+i-a.clientLeft,o.right=o.left+o.width,o.bottom=o.top+o.height,o}var l=function(t,e){return r.getComputedStyle(t)[e]};function c(t){var e=String(l(t,c.propName)),n=e.match(/([0-9.]+)([ms]{1,2})/);return n&&(e=Number(n[1]),"s"===n[2]&&(e*=1e3)),0|e}c.propName=function(){for(var t=i.createElement("div"),e=["transitionDuration","webkitTransitionDuration"],n=0;n=e.bottom&&(i[0]="top"),i[1]){case"left":t.right-this.width<=e.left&&(i[1]="right");break;case"right":t.left+this.width>=e.right&&(i[1]="left");break;default:t.left+t.width/2+this.width/2>=e.right?i[1]="left":t.right-t.width/2-this.width/2<=e.left&&(i[1]="right")}else switch(t.left-this.width-a<=e.left?i[0]="right":t.right+this.width+a>=e.right&&(i[0]="left"),i[1]){case"top":t.bottom-this.height<=e.top&&(i[1]="bottom");break;case"bottom":t.top+this.height>=e.bottom&&(i[1]="top");break;default:t.top+t.height/2+this.height/2>=e.bottom?i[1]="top":t.bottom-t.height/2-this.height/2<=e.top&&(i[1]="bottom")}return i.join("-")},d.prototype.position=function(t,e){this.attachedTo&&(t=this.attachedTo),null==t&&this._p?(t=this._p[0],e=this._p[1]):this._p=arguments;var n,r,i="number"==typeof t?{left:0|t,right:0|t,top:0|e,bottom:0|e,width:0,height:0}:u(t),a=this.spacing,o=this._pickPlace(i);switch(o!==this.curPlace&&(this.curPlace&&this.classes.remove(this.curPlace),this.classes.add(o),this.curPlace=o),this.curPlace){case"top":n=i.top-this.height-a,r=i.left+i.width/2-this.width/2;break;case"top-left":n=i.top-this.height-a,r=i.right-this.width;break;case"top-right":n=i.top-this.height-a,r=i.left;break;case"bottom":n=i.bottom+a,r=i.left+i.width/2-this.width/2;break;case"bottom-left":n=i.bottom+a,r=i.right-this.width;break;case"bottom-right":n=i.bottom+a,r=i.left;break;case"left":n=i.top+i.height/2-this.height/2,r=i.left-this.width-a;break;case"left-top":n=i.bottom-this.height,r=i.left-this.width-a;break;case"left-bottom":n=i.top,r=i.left-this.width-a;break;case"right":n=i.top+i.height/2-this.height/2,r=i.right+a;break;case"right-top":n=i.bottom-this.height,r=i.right+a;break;case"right-bottom":n=i.top,r=i.right+a}return this.element.style.top=Math.round(n)+"px",this.element.style.left=Math.round(r)+"px",this},d.prototype.show=function(t,e){return t=this.attachedTo?this.attachedTo:t,clearTimeout(this.aIndex),null!=t&&this.position(t,e),this.hidden&&(this.hidden=0,i.body.appendChild(this.element)),this.attachedTo&&this._aware(),this.options.inClass&&(this.options.effectClass&&this.element.clientHeight,this.classes.add(this.options.inClass)),this},d.prototype.getElement=function(){return this.element},d.prototype.hide=function(){if(!this.hidden){var t=this,e=0;return this.options.inClass&&(this.classes.remove(this.options.inClass),this.options.effectClass&&(e=c(this.element))),this.attachedTo&&this._unaware(),clearTimeout(this.aIndex),this.aIndex=setTimeout(function(){t.aIndex=0,i.body.removeChild(t.element),t.hidden=1},e),this}},d.prototype.toggle=function(t,e){return this[this.hidden?"show":"hide"](t,e)},d.prototype.destroy=function(){clearTimeout(this.aIndex),this._unaware(),this.hidden||i.body.removeChild(this.element),this.element=this.options=null},d.prototype._aware=function(){-1===n(d.winAware,this)&&d.winAware.push(this)},d.prototype._unaware=function(){var t=n(d.winAware,this);-1!==t&&d.winAware.splice(t,1)},d.reposition=function(){var t,e=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,17)};function n(){t=0;for(var e=0,n=d.winAware.length;e0)-(t<0)||Number(t)}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),r=n.length>>>0,i=arguments[1],a=0;a>>0,i=arguments[1],a=0;a0?1:-1)*Math.floor(Math.abs(e)):e}(t);return Math.min(Math.max(e,0),o)},function(t){var e=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=arguments.length>1?arguments[1]:void 0;if(void 0!==r){if(!a(r))throw new TypeError("Array.from: when provided, the second argument must be a function");arguments.length>2&&(n=arguments[2])}for(var i,o=s(e.length),u=a(this)?Object(new this(o)):new Array(o),l=0;l * {\n visibility: hidden;\n}\nbody {\n overflow: hidden;\n}\nbody * {\n visibility: hidden !important;\n}\n\n.tau-chart__print-block {\n position: absolute;\n top: 0;\n left: 0;\n visibility: visible !important;\n display: block !important;\n width: 100%;\n /*height: 100%;*/\n}\n",""])},function(t,e,n){var r,i=i||function(t){"use strict";if(!(void 0===t||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var e=function(){return t.URL||t.webkitURL||t},n=t.document.createElementNS("http://www.w3.org/1999/xhtml","a"),r="download"in n,i=/constructor/i.test(t.HTMLElement)||t.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent),o=function(e){(t.setImmediate||t.setTimeout)(function(){throw e},0)},s=function(t){setTimeout(function(){"string"==typeof t?e().revokeObjectURL(t):t.remove()},4e4)},u=function(t){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t},l=function(l,c,h){h||(l=u(l));var d,f=this,p="application/octet-stream"===l.type,g=function(){!function(t,e,n){for(var r=(e=[].concat(e)).length;r--;){var i=t["on"+e[r]];if("function"==typeof i)try{i.call(t,n||t)}catch(t){o(t)}}}(f,"writestart progress write writeend".split(" "))};if(f.readyState=f.INIT,r)return d=e().createObjectURL(l),void setTimeout(function(){var t,e;n.href=d,n.download=c,t=n,e=new MouseEvent("click"),t.dispatchEvent(e),g(),s(d),f.readyState=f.DONE});!function(){if((a||p&&i)&&t.FileReader){var n=new FileReader;return n.onloadend=function(){var e=a?n.result:n.result.replace(/^data:[^;]*;/,"data:attachment/file;");t.open(e,"_blank")||(t.location.href=e),e=void 0,f.readyState=f.DONE,g()},n.readAsDataURL(l),void(f.readyState=f.INIT)}d||(d=e().createObjectURL(l)),p?t.location.href=d:t.open(d,"_blank")||(t.location.href=d);f.readyState=f.DONE,g(),s(d)}()},c=l.prototype;return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(t,e,n){return e=e||t.name||"download",n||(t=u(t)),navigator.msSaveOrOpenBlob(t,e)}:(c.abort=function(){},c.readyState=c.INIT=0,c.WRITING=1,c.DONE=2,c.error=c.onwritestart=c.onprogress=c.onwrite=c.onabort=c.onerror=c.onwriteend=null,function(t,e,n){return new l(t,e||t.name||"download",n)})}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content);void 0!==t&&t.exports?t.exports.saveAs=i:null!==n(24)&&null!==n(23)&&(void 0===(r=function(){return i}.call(e,n,e,t))||(t.exports=r))},function(t,e,n){var r,a,o;!function(i,s){"use strict";a=[n(26),n(25)],void 0===(o="function"==typeof(r=s)?r.apply(e,a):r)||(t.exports=o),i.canvg=s(i.RGBColor,i.stackBlur)}("undefined"!=typeof window?window:this,function(t,e){var n,r=function(t,e,n){if(null!=t||null!=e||null!=n){"string"==typeof t&&(t=document.getElementById(t)),null!=t.svg&&t.svg.stop();var i=f(n||{});1==t.childNodes.length&&"OBJECT"==t.childNodes[0].nodeName||(t.svg=i);var a=t.getContext("2d");void 0!==e.documentElement?i.loadXmlDoc(a,e):"<"==e.substr(0,1)?i.loadXml(a,e):i.load(a,e)}else for(var o=document.querySelectorAll("svg"),s=0;s~\.\[:]+)/g,s=/(\.[^\s\+>~\.\[:]+)/g,u=/(::[^\s\+>~\.\[:]+|:first-line|:first-letter|:before|:after)/gi,l=/(:[\w-]+\([^\)]*\))/gi,c=/(:[^\s\+>~\.\[:]+)/g,h=/([^\s\+>~\.\[:]+)/g;function d(t){var e=[0,0,0],n=function(n,r){var i=t.match(n);null!=i&&(e[r]+=i.length,t=t.replace(n," "))};return t=(t=t.replace(/:not\(([^\)]*)\)/g," $1 ")).replace(/{[^]*/gm," "),n(a,1),n(o,0),n(s,1),n(u,2),n(l,1),n(c,1),t=(t=t.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," "),n(h,2),e.join("")}function f(r){var a={opts:r,FRAMERATE:30,MAX_VIRTUAL_PIXELS:3e4,log:function(t){}};1==a.opts.log&&"undefined"!=typeof console&&(a.log=function(t){console.log(t)}),a.init=function(t){var e=0;a.UniqueId=function(){return"canvg"+ ++e},a.Definitions={},a.Styles={},a.StylesSpecificity={},a.Animations=[],a.Images=[],a.ctx=t,a.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(t,e){this.viewPorts.push({width:t,height:e})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(t){return null!=t&&"number"==typeof t?t:"x"==t?this.width():"y"==t?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},a.init(),a.ImagesLoaded=function(){for(var t=0;t]*>/,""),(e=new ActiveXObject("Microsoft.XMLDOM")).async="false",e.loadXML(t),e)},a.Property=function(t,e){this.name=t,this.value=e},a.Property.prototype.getValue=function(){return this.value},a.Property.prototype.hasValue=function(){return null!=this.value&&""!==this.value},a.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var t=parseFloat(this.value);return(this.value+"").match(/%$/)&&(t/=100),t},a.Property.prototype.valueOrDefault=function(t){return this.hasValue()?this.value:t},a.Property.prototype.numValueOrDefault=function(t){return this.hasValue()?this.numValue():t},a.Property.prototype.addOpacity=function(e){var n=this.value;if(null!=e.value&&""!=e.value&&"string"==typeof this.value){var r=new t(this.value);r.ok&&(n="rgba("+r.r+", "+r.g+", "+r.b+", "+e.numValue()+")")}return new a.Property(this.name,n)},a.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),a.Definitions[t]},a.Property.prototype.isUrlDefinition=function(){return 0==this.value.indexOf("url(")},a.Property.prototype.getFillStyleDefinition=function(t,e){var n=this.getDefinition();if(null!=n&&n.createGradient)return n.createGradient(a.ctx,t,e);if(null!=n&&n.createPattern){if(n.getHrefAttribute().hasValue()){var r=n.attribute("patternTransform");n=n.getHrefAttribute().getDefinition(),r.hasValue()&&(n.attribute("patternTransform",!0).value=r.value)}return n.createPattern(a.ctx,t)}return null},a.Property.prototype.getDPI=function(t){return 96},a.Property.prototype.getEM=function(t){var e=12,n=new a.Property("fontSize",a.Font.Parse(a.ctx.font).fontSize);return n.hasValue()&&(e=n.toPixels(t)),e},a.Property.prototype.getUnits=function(){return(this.value+"").replace(/[0-9\.\-]/g,"")},a.Property.prototype.toPixels=function(t,e){if(!this.hasValue())return 0;var n=this.value+"";if(n.match(/em$/))return this.numValue()*this.getEM(t);if(n.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(n.match(/px$/))return this.numValue();if(n.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(n.match(/pc$/))return 15*this.numValue();if(n.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(n.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(n.match(/in$/))return this.numValue()*this.getDPI(t);if(n.match(/%$/))return this.numValue()*a.ViewPort.ComputeSize(t);var r=this.numValue();return e&&r<1?r*a.ViewPort.ComputeSize(t):r},a.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/s$/)?1e3*this.numValue():(t.match(/ms$/),this.numValue())},a.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var t=this.value+"";return t.match(/deg$/)?this.numValue()*(Math.PI/180):t.match(/grad$/)?this.numValue()*(Math.PI/200):t.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)};var o={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};return a.Property.prototype.toTextBaseline=function(){return this.hasValue()?o[this.value]:null},a.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,e,n,r,i,o){var s=null!=o?this.Parse(o):this.CreateFont("","","","","",a.ctx.font);return{fontFamily:i||s.fontFamily,fontSize:r||s.fontSize,fontStyle:t||s.fontStyle,fontWeight:n||s.fontWeight,fontVariant:e||s.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var t=this;this.Parse=function(e){for(var n={},r=a.trim(a.compressSpaces(e||"")).split(" "),i={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},o="",s=0;sthis.x2&&(this.x2=t)),null!=e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))},this.addX=function(t){this.addPoint(t,null)},this.addY=function(t){this.addPoint(null,t)},this.addBoundingBox=function(t){this.addPoint(t.x1,t.y1),this.addPoint(t.x2,t.y2)},this.addQuadraticCurve=function(t,e,n,r,i,a){var o=t+2/3*(n-t),s=e+2/3*(r-e),u=o+1/3*(i-t),l=s+1/3*(a-e);this.addBezierCurve(t,e,o,u,s,l,i,a)},this.addBezierCurve=function(t,e,n,r,a,o,s,u){var l=[t,e],c=[n,r],h=[a,o],d=[s,u];for(this.addPoint(l[0],l[1]),this.addPoint(d[0],d[1]),i=0;i<=1;i++){var f=function(t){return Math.pow(1-t,3)*l[i]+3*Math.pow(1-t,2)*t*c[i]+3*(1-t)*Math.pow(t,2)*h[i]+Math.pow(t,3)*d[i]},p=6*l[i]-12*c[i]+6*h[i],g=-3*l[i]+9*c[i]-9*h[i]+3*d[i],m=3*c[i]-3*l[i];if(0!=g){var y=Math.pow(p,2)-4*m*g;if(!(y<0)){var v=(-p+Math.sqrt(y))/(2*g);0=0;e--)this.transforms[e].unapply(t)},this.applyToPoint=function(t){for(var e=0;es&&(this.styles[o]=r[o],this.stylesSpecificity[o]=i)}}},null!=t&&1==t.nodeType){for(var e=0;e=this.tokens.length-1},this.isCommandOrEnd=function(){return!!this.isEnd()||null!=this.tokens[this.i+1].match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new a.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var t=this.getPoint();return this.control=t,t},this.getAsCurrentPoint=function(){var t=this.getPoint();return this.current=t,t},this.getReflectedControlPoint=function(){return"c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase()?this.current:new a.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y)},this.makeAbsolute=function(t){return this.isRelativeCommand()&&(t.x+=this.current.x,t.y+=this.current.y),t},this.addMarker=function(t,e,n){null!=n&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(n)),this.addMarkerAngle(t,null==e?null:e.angleTo(t))},this.addMarkerAngle=function(t,e){this.points.push(t),this.angles.push(e)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var t=0;t1&&(h*=Math.sqrt(y),d*=Math.sqrt(y));var v=(p==g?-1:1)*Math.sqrt((Math.pow(h,2)*Math.pow(d,2)-Math.pow(h,2)*Math.pow(m.y,2)-Math.pow(d,2)*Math.pow(m.x,2))/(Math.pow(h,2)*Math.pow(m.y,2)+Math.pow(d,2)*Math.pow(m.x,2)));isNaN(v)&&(v=0);var b=new a.Point(v*h*m.y/d,v*-d*m.x/h),x=new a.Point((s.x+c.x)/2+Math.cos(f)*b.x-Math.sin(f)*b.y,(s.y+c.y)/2+Math.sin(f)*b.x+Math.cos(f)*b.y),_=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))},w=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(_(t)*_(e))},E=function(t,e){return(t[0]*e[1]=1&&(C=0);var k=1-g?1:-1,A=S+k*(C/2),O=new a.Point(x.x+h*Math.cos(A),x.y+d*Math.sin(A));if(e.addMarkerAngle(O,A-k*Math.PI/2),e.addMarkerAngle(c,A-k*Math.PI),n.addPoint(c.x,c.y),null!=t){w=h>d?h:d;var P=h>d?1:h/d,N=h>d?d/h:1;t.translate(x.x,x.y),t.rotate(f),t.scale(P,N),t.arc(0,0,w,S,S+C,1-g),t.scale(1/P,1/N),t.rotate(-f),t.translate(-x.x,-x.y)}}break;case"Z":case"z":null!=t&&t.closePath(),e.current=e.start}return n},this.getMarkers=function(){for(var t=this.PathParser.getMarkerPoints(),e=this.PathParser.getMarkerAngles(),n=[],r=0;r1&&(this.offset=1);var e=this.style("stop-color",!0);""===e.value&&(e.value="#000"),this.style("stop-opacity").hasValue()&&(e=e.addOpacity(this.style("stop-opacity"))),this.color=e.value},a.Element.stop.prototype=new a.Element.ElementBase,a.Element.AnimateBase=function(t){this.base=a.Element.ElementBase,this.base(t),a.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var t=this.attribute("attributeType").value,e=this.attribute("attributeName").value;return"CSS"==t?this.parent.style(e,!0):this.parent.attribute(e,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(t){if(null==this.initialValue&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits()),this.duration>this.maxDuration){if("indefinite"==this.attribute("repeatCount").value||"indefinite"==this.attribute("repeatDur").value)this.duration=0;else if("freeze"!=this.attribute("fill").valueOrDefault("remove")||this.frozen){if("remove"==this.attribute("fill").valueOrDefault("remove")&&!this.removed)return this.removed=!0,this.getProperty().value=this.parent.animationFrozen?this.parent.animationFrozenValue:this.initialValue,!0}else this.frozen=!0,this.parent.animationFrozen=!0,this.parent.animationFrozenValue=this.getProperty().value;return!1}this.duration=this.duration+t;var e=!1;if(this.beginn&&o.attribute("x").hasValue())break;i+=o.measureTextRecursive(t)}return-1*("end"==r?i:i/2)}return 0},this.renderChild=function(t,e,n){var r=e.children[n];r.attribute("x").hasValue()?(r.x=r.attribute("x").toPixels("x")+e.getAnchorDelta(t,e,n),r.attribute("dx").hasValue()&&(r.x+=r.attribute("dx").toPixels("x"))):(r.attribute("dx").hasValue()&&(e.x+=r.attribute("dx").toPixels("x")),r.x=e.x),e.x=r.x+r.measureText(t),r.attribute("y").hasValue()?(r.y=r.attribute("y").toPixels("y"),r.attribute("dy").hasValue()&&(r.y+=r.attribute("dy").toPixels("y"))):(r.attribute("dy").hasValue()&&(e.y+=r.attribute("dy").toPixels("y")),r.y=e.y),e.y=r.y,r.render(t);for(n=0;n0&&" "!=e[n-1]&&n0&&" "!=e[n-1]&&(n==e.length-1||" "==e[n+1])&&(a="initial"),void 0!==t.glyphs[r]&&null==(i=t.glyphs[r][a])&&"glyph"==t.glyphs[r].type&&(i=t.glyphs[r])}else i=t.glyphs[r];return null==i&&(i=t.missingGlyph),i},this.renderChildren=function(t){var e=this.parent.style("font-family").getDefinition();if(null==e)""!=t.fillStyle&&t.fillText(a.compressSpaces(this.getText()),this.x,this.y),""!=t.strokeStyle&&t.strokeText(a.compressSpaces(this.getText()),this.x,this.y);else{var n=this.parent.style("font-size").numValueOrDefault(a.Font.Parse(a.ctx.font).fontSize),r=this.parent.style("font-style").valueOrDefault(a.Font.Parse(a.ctx.font).fontStyle),i=this.getText();e.isRTL&&(i=i.split("").reverse().join(""));for(var o=a.ToNumberArray(this.parent.attribute("dx").value),s=0;s0?"":this.text}},a.Element.tspan.prototype=new a.Element.TextElementBase,a.Element.tref=function(t){this.base=a.Element.TextElementBase,this.base(t),this.getText=function(){var t=this.getHrefAttribute().getDefinition();if(null!=t)return t.children[0].getText()}},a.Element.tref.prototype=new a.Element.TextElementBase,a.Element.a=function(t){this.base=a.Element.TextElementBase,this.base(t),this.hasText=t.childNodes.length>0;for(var e=0;e0){var n=new a.Element.g;n.children=this.children,n.parent=this,n.render(t)}},this.onclick=function(){window.open(this.getHrefAttribute().value)},this.onmousemove=function(){a.ctx.canvas.style.cursor="pointer"}},a.Element.a.prototype=new a.Element.TextElementBase,a.Element.image=function(t){this.base=a.Element.RenderedElementBase,this.base(t);var e=this.getHrefAttribute().value;if(""!=e){var n=e.match(/\.svg$/);if(a.Images.push(this),this.loaded=!1,n)this.img=a.ajax(e),this.loaded=!0;else{this.img=document.createElement("img"),1==a.opts.useCORS&&(this.img.crossOrigin="Anonymous");var r=this;this.img.onload=function(){r.loaded=!0},this.img.onerror=function(){a.log('ERROR: image "'+e+'" not found'),r.loaded=!0},this.img.src=e}this.renderChildren=function(t){var e=this.attribute("x").toPixels("x"),r=this.attribute("y").toPixels("y"),i=this.attribute("width").toPixels("x"),o=this.attribute("height").toPixels("y");0!=i&&0!=o&&(t.save(),n?t.drawSvg(this.img,e,r,i,o):(t.translate(e,r),a.AspectRatio(t,this.attribute("preserveAspectRatio").value,i,this.img.width,o,this.img.height,0,0),t.drawImage(this.img,0,0)),t.restore())},this.getBoundingBox=function(){var t=this.attribute("x").toPixels("x"),e=this.attribute("y").toPixels("y"),n=this.attribute("width").toPixels("x"),r=this.attribute("height").toPixels("y");return new a.BoundingBox(t,e,t+n,e+r)}}},a.Element.image.prototype=new a.Element.RenderedElementBase,a.Element.g=function(t){this.base=a.Element.RenderedElementBase,this.base(t),this.getBoundingBox=function(){for(var t=new a.BoundingBox,e=0;e0)for(var b=y[v].indexOf("url"),x=y[v].indexOf(")",b),_=y[v].substr(b+5,x-b-6),w=a.parseXml(a.ajax(_)).getElementsByTagName("font"),E=0;E=0:e.dim===t.dim});if(null===i.method)return n;var a=i.k,o={l:-.5,r:.5},s=i.method,u=i.scale;return n[s]=function(t){var n=(o[t.__pos__]||0)*a;if(u.discrete)return e[s](t)+u.stepSize(t[u.dim])*n;if(u.period){for(var i=r.default.api.tickPeriod.get(u.period,{utc:u.utcTime}),l=u.domain(),c=i.cast(l[0]);c=0?i[t].map(function(t){return new Date(t)}):i[t];a.series=o.unique(s.concat(u))}})})},_getFormat:function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},_useSavedDataRefs:function(t,e){var n=this._dataRefs;return this._usedDataRefsKeys.add(e),e in n?(n[e].forEach(function(e,n){return Object.assign(e,t[n])}),n[e]):(n[e]=t,t)},_startWatchingDataRefs:function(){var t=this._dataRefs;this._initialDataRefsKeys=new Set(Object.keys(t)),this._usedDataRefsKeys=new Set},_clearUnusedDataRefs:function(){var t=this._dataRefs,e=this._initialDataRefsKeys,n=this._usedDataRefsKeys;Array.from(e).filter(function(t){return!n.has(t)}).forEach(function(e){return delete t[e]}),this._initialDataRefsKeys=null,this._usedDataRefsKeys=null},_getDataRowsFromItems:function(t){var e=function(t,e){return t.reduce(function(t,n,r){return t[n]=e[r],t},{})};return t.reduce(function(t,n){return Array.isArray(n.dim)?Array.isArray(n.val)&&n.val.every(Array.isArray)&&n.val.forEach(function(r){t.push(e(n.dim,r))}):Array.isArray(n.val)?n.val.forEach(function(r){t.push(e([n.dim],[r]))}):t.push(e([n.dim],[n.val])),t},[])},_getAnnotatedDimValues:function(t){var e={};return this._getDataRowsFromItems(t).forEach(function(t){Object.keys(t).forEach(function(n){e[n]=e[n]||[],e[n].push(t[n])})}),e}}}r.default.api.plugins.add("annotations",c);var h=r.default.api.utils;function d(t){var e=t.x0,n=t.y0,r=null==t.collapse||t.collapse,i=function(t){return{y0:function(n){return t.scaleY.value(n[e])}}},a=function(t){return{y0:function(e){return t.scaleY.value(e[n])}}},o=function(t){var r=t.data();if(0===r.length)return{};var i=t.scaleY,a=Number.MAX_VALUE,o=Number.MIN_VALUE,s=t.flip?e:n,u=i.dim;return r.forEach(function(t){var e=t[s],n=t[u],r=ee?n:e;a=ro?i:o}),i.fixup(function(t){var e={};return(!t.hasOwnProperty("max")||t.maxa)&&(e.min=a),e}),{}},s={},u={},l=function(t){var i=t.data().slice(),a=t.scaleX,o=t.scaleY;if(0===i.length||!a.discrete)return{};var l=t.flip?e:n,c=o.dim;i.sort(h.createMultiSorter(function(t,e){return t[l]-e[l]},function(t,e){return t[c]-e[c]}));var d=a.dim,f=a.domain().reduce(function(t,e){return t[e]=[],t},{}),p=new Map;return i.forEach(r?function(t){var e=t[d],n=f[e],r=n.findIndex(function(e){return e[e.length-1][c]<=t[l]});r<0&&(r=n.length,n.push([])),n[r].push(t),p.set(t,r)}:function(t){var e=t[d],n=f[e],r=r=n.length;n.push([]),n[r].push(t),p.set(t,r)}),Object.keys(f).forEach(function(t){s[t]=f[t]}),a.fixup(function(t){var e={},n=a.domain().reduce(function(t,e){return t+s[e].length},0);return a.domain().forEach(function(t){u[t]=n}),e.ratio=function(t){return s[t].length/u[t]},e}),{xi:function(e){var n=e[d],r=a.stepSize(n);return t.xi(e)-r/2+r/s[n].length*(p.get(e)+.5)}}};return{onSpecReady:function(t,e){t.traverseSpec(e,function(t,e){"ELEMENT.INTERVAL"===t.type&&(t.transformModel=[t.flip?i:a,l],t.adjustScales=[o],t.guide.enableColorToBarPosition=!1,t.guide.label=t.guide.label||{},t.guide.label.position=t.guide.label.position||(t.flip?["inside-start-then-outside-end-horizontal","hide-by-label-height-horizontal"]:["inside-start-then-outside-end-vertical"]))})}}}r.default.api.plugins.add("bar-as-span",d);var f=n(0),p=r.default.api.utils,g={MIN:"minimum",MAX:"maximum",MEDIAN:"median",Q1:"Q1",Q3:"Q3"};function m(t,e){var n=t.length-1,r=e/100*n,i=Math.floor(r);if(0===i)return{pos:0,value:t[0]};if(i===n)return{pos:n,value:t[n]};var a=r-i;return a?{pos:r,value:t[i]+a*(t[i+1]-t[i])}:{pos:r,value:t[r]}}function y(t,e,n){for(var r=t.sort(function(t,e){return t-e}),i=m(r,25),a=m(r,50),o=m(r,75),s=o.value-i.value,u=i.value-1.5*s,l=o.value+1.5*s,c=r[0],h=r[r.length-1],d=0;d<=i.pos;d++){var f=r[d];if(f>u){c=f;break}}for(var p=r.length-1;p>=o.pos;p--){var g=r[p];if(go||t[r]\n
'+e+'
\n
\n '+w(n.map(function(t){return S(t)}))+"\n
\n\n"},S=function(t){var e=t.key,n=t.label,r=t.checked;return'\n
\n '+T()+'\n '+n+"\n
\n"},T=function(){return['','',""].join("")},M=function(t,e,n,r){t.addEventListener(e,function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.matches(n)&&r(t,e),e=e.parentNode})},C=function(t,e){var n=function(t){return JSON.stringify(function(t){return null==t||""===t}(t)?null:t)},r=n(e);return function(e){var i=e[t],a=n(i);return r===a}},k=function(){function t(t){this.settings=b.defaults(t||{},{formatters:{},fields:null,skipColorDim:!0}),this._filters={},this.onRender=this._createRenderHandler()}return t.prototype.init=function(t){var e=this;this._chart=t;var n=function(e){var n=t.getSpec().scales;return Object.keys(n).map(function(t){return{name:t,config:n[t]}}).filter(e)},r=n(function(t){var e=t.config;t.name;return"ordinal"===e.type&&e.dim}),i=b.unique(r.map(function(t){return t.config.dim}));if(this.settings.fields&&(i=i.filter(function(t){return e.settings.fields.indexOf(t)>=0})),this.settings.skipColorDim){var a=n(function(t){var e=t.config;t.name;return"color"===e.type&&e.dim}).map(function(t){return t.config.dim});i=i.filter(function(t){return a.indexOf(t)<0})}r=r.filter(function(t){return i.indexOf(t.config.dim)>=0}),this._categoryScales=r,this._render()},t.prototype.destroy=function(){var t=this._filters,e=this._chart;Object.keys(t).forEach(function(n){return e.removeFilter(t[n])});var n;(n=this._node)&&n.parentElement&&n.parentElement.removeChild(n)},t.prototype._createRenderHandler=function(){return function(){if(this._lastClickedScrollInfo){var t=this._lastClickedScrollInfo.key,e=this._node.querySelector('[data-key="'+t+'"]');if(e){var n=this._lastClickedScrollInfo.top,r=e.getBoundingClientRect().top,i=this._getScrollContainer(),a=i.getBoundingClientRect().top;i.scrollTop=i.scrollTop-n-a+r}this._lastClickedScrollInfo=null}}},t.prototype._getContent=function(t){return function(t){var e=t.categories;return'\n
\n '+w(e.map(function(t){return E(t)}))+"\n
\n"}({categories:t})},t.prototype._getCategoriesInfo=function(){var t=this;return this._categoryScales.map(function(e){var n=e.name;return t._chart.getScaleInfo(n)}).map(function(e){var n=e.dim,r=t._getFieldLabel(n),i=t._getFieldFormat(n),a=t._chart.getDataSources({excludeFilter:["category-filter"]}),o=b.unique(a[e.source].data.map(function(t){return t[n]})).map(function(e){var r=i(e),a=t._getFilterKey(n,e);return{label:r,checked:!t._filters[a],key:a,value:e}});return{dim:n,label:r,values:o}})},t.prototype._render=function(){this._clear(),this._formatters=x.getFieldFormatters(this._chart.getSpec(),this.settings.formatters);var t,e,n=this._getCategoriesInfo(),r=this._getContent(n),i=(t=r,(e=document.createElement("div")).innerHTML=t,e.firstElementChild);this._node=i,this._chart.insertToRightSidebar(i),this._subscribeToEvents(),this._filterKeys=n.reduce(function(t,e){var n=e.dim;return e.values.forEach(function(e){var r=e.key,i=e.value;t[r]={dim:n,value:i}}),t},{})},t.prototype._subscribeToEvents=function(){var t=this,e=this._node;M(e,"click","."+_,function(e,n){var r=n.getAttribute("data-key"),i=e.target.matches(".tau-chart__category-filter__value__toggle");t._toggleCategory(r,i?"toggle":"focus")}),M(e,"mouseover","."+_,function(e,n){var r=n.getAttribute("data-key");t._toggleHighlight(r,!0)}),M(e,"mouseout","."+_,function(e,n){var r=n.getAttribute("data-key");t._toggleHighlight(r,!1)})},t.prototype._isFilteredOut=function(t){return t in this._filters},t.prototype._toggleCategory=function(t,e){var n=this,r=Array.from(this._node.querySelectorAll("."+_)).reduce(function(t,e){return t[e.getAttribute("data-key")]=e,t},{}),i=Object.keys(this._filterKeys).map(function(t){var e=n._filterKeys[t],i=e.dim,a=e.value;return{node:r[t],key:t,dim:i,value:a,isChecked:!n._isFilteredOut(t)}}),a=i.reduce(function(t,e){return t[e.key]=e,t},{})[t],o=i.filter(function(t){return t.dim===a.dim}),s=function(t,e){e?t.classList.add("tau-chart__category-filter__value_checked"):t.classList.remove("tau-chart__category-filter__value_checked")};switch(e){case"toggle":a.isChecked?(this._addFilter(t),s(a.node,!1)):(this._removeFilter(t),s(a.node,!0));break;case"focus":a.isChecked&&o.every(function(t){return t===a||!t.isChecked})?o.forEach(function(t){t.isChecked||(s(t.node,!0),n._removeFilter(t.key))}):(o.forEach(function(t){t!==a&&t.isChecked&&(s(t.node,!1),n._addFilter(t.key))}),a.isChecked||(s(a.node,!0),this._removeFilter(a.key)))}this._lastClickedScrollInfo={key:t,top:a.node.getBoundingClientRect().top-this._getScrollContainer().getBoundingClientRect().top},this._chart.refresh()},t.prototype._toggleHighlight=function(t,e){if(!this._isFilteredOut(t)){var n=this._filterKeys[t],r=n.dim,i=n.value,a=e?C(r,i):function(t){return null};this._chart.select(function(t){return!0}).forEach(function(t){return t.fire("highlight",a)})}},t.prototype._clear=function(){var t=this._node;t&&t.parentElement&&t.parentElement.removeChild(t)},t.prototype._getScrollContainer=function(){return this._node.parentElement.parentElement},t.prototype._getFilterKey=function(t,e){return t+"__"+e},t.prototype._addFilter=function(t){var e=this._filterKeys[t],n=e.dim,r=e.value,i=C(n,r);this._filters[t]=this._chart.addFilter({tag:"category-filter",predicate:function(t){return!i(t)}})},t.prototype._removeFilter=function(t){var e=this._filters[t];delete this._filters[t],this._chart.removeFilter(e)},t.prototype._getFieldLabel=function(t){return this._formatters[t]?this._formatters[t].label:t},t.prototype._getFieldFormat=function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},t}();r.default.api.plugins.add("category-filter",function(t){return new k(t)});var A="http://www.w3.org/2000/svg",O=r.default.api.utils,P=r.default.api.svgUtils,N=r.default.api.pluginsSDK;function L(t){t=t||{};var e=document.createElementNS(A,"g"),n=f.select(e).attr("class","tau-crosshair__label");n.append("rect").attr("class","tau-crosshair__label__box"),n.append("text").attr("class","tau-crosshair__label__text-shadow"),n.append("text").attr("class","tau-crosshair__label__text");var r={options:function(e){return t=Object.assign(t,e),r},show:function(i){return t.container.appendChild(e),function(e){var r=e.x,i=e.y,a=e.text,o=e.color,s=e.colorCls;n.attr("class","tau-crosshair__label "+s);var u=t.halign,l=t.valign,c=t.hpad,h=t.vpad,d={left:"end",middle:"middle",right:"start"}[u],f={left:-c,middle:0,right:c}[u],p=n.select(".tau-crosshair__label__text").attr("fill",o),g=n.selectAll(".tau-crosshair__label__text, .tau-crosshair__label__text-shadow").attr("text-anchor",d).attr("x",r+f).attr("y",0).text(a),m=p.node().getBBox(),y={top:-h-m.height/2,middle:0,bottom:h+m.height/2}[l]-m.height/2-m.y;g.attr("y",i+y);var v=m.width+2*c,b=m.height+2*h,x={left:-v,middle:-v/2,right:0}[u],_={top:-b,middle:-b/2,bottom:0}[l];n.select(".tau-crosshair__label__box").attr("fill",o).attr("rx",t.boxCornerRadius).attr("ry",t.boxCornerRadius).attr("x",r+x).attr("y",i+_).attr("width",v).attr("height",b)}(i),function(){n.attr("transform","");var r=t.chart.getLayout().contentContainer.getBoundingClientRect(),i=t.chart.getSVG().getBoundingClientRect(),a=e.getBoundingClientRect(),o=Math.max(0,Math.max(r.left,i.left)-a.left)||Math.min(0,Math.min(r.right,i.right)-a.right),s=Math.max(0,Math.max(r.top,i.top)-a.top)||Math.min(0,Math.min(r.bottom,i.bottom)-a.bottom);n.attr("transform","translate("+o+","+s+")")}(),r},hide:function(){return e.parentNode&&e.parentNode.removeChild(e),r}};return r}function R(t){var e=O.defaults(t||{},{xAxis:!0,yAxis:!0,formatters:{},labelBoxHPadding:5,labelBoxVPadding:3,labelBoxCornerRadius:3,axisHPadding:22,axisVPadding:22});return{init:function(t){this._chart=t,this._formatters={},this._createNode()},_createNode:function(){var t=f.select(document.createElementNS(A,"g")).attr("class","tau-crosshair");this._labels={x:null,y:null};var n=function(n){var r=t.append("g").attr("class","tau-crosshair__group "+n);r.append("line").attr("class","tau-crosshair__line-shadow"),r.append("line").attr("class","tau-crosshair__line"),this._labels[n]=L({container:r.node(),chart:this._chart,halign:"x"===n?"middle":"left",valign:"x"===n?"bottom":"middle",boxCornerRadius:e.labelBoxCornerRadius,hpad:e.labelBoxHPadding,vpad:e.labelBoxVPadding})}.bind(this);e.xAxis&&n("x"),e.yAxis&&n("y"),this._element=t},_setValues:function(t,n,r){var i=function(t){var n=this._element.select(".tau-crosshair__group."+t.dir);n.select(".tau-crosshair__line").attr("class","tau-crosshair__line "+r.cls).attr("stroke",r.color),n.selectAll(".tau-crosshair__line, .tau-crosshair__line-shadow").attr("x1",t.startPt.x).attr("x2",t.valuePt.x).attr("y1",t.startPt.y).attr("y2",t.valuePt.y),("x"===t.dir&&e.xAxis||"y"===t.dir&&e.yAxis)&&this._labels[t.dir].options({halign:t.labelHAlign,valign:t.labelVAlign}).show({x:t.startPt.x,y:t.startPt.y,text:t.label,color:r.color,colorCls:r.cls})}.bind(this);i({dir:"x",startPt:{x:t.value,y:n.start+(t.minMode?0:e.axisVPadding)},valuePt:{x:t.value,y:n.value+n.crossPadding},label:t.label,labelHAlign:"middle",labelVAlign:"bottom"}),i({dir:"y",startPt:{x:t.start-(n.minMode?0:e.axisHPadding),y:n.value},valuePt:{x:t.value-t.crossPadding,y:n.value},label:n.label,labelHAlign:"left",labelVAlign:"middle"})},_showCrosshair:function(t,e,n){var r=this._chart.getSVG(),i=e.config.options.container.node(),a=P.getDeepTransformTranslate(i);this._element.attr("transform",P.translate(a.x,a.y)),r.appendChild(this._element.node());var o=e.getScale("x"),s=e.getScale("y"),u=e.getScale("color"),l=u(t.data[u.dim]),c=t.data[o.dim],h=t.data[s.dim],d=e.screenModel.x(t.data),f=e.screenModel.y(t.data);if(e.config.stack)if(e.config.flip){var p=e.data().filter(function(n){var r=n[s.dim];return n===t.data||(r===h||r-h==0)&&(e.screenModel.x(t.data)-e.screenModel.x(n))*n[o.dim]>0});d=(c<0?Math.min:Math.max).apply(null,p.map(function(t){return e.screenModel.x(t)},0)),c=p.reduce(function(t,e){return t+e[o.dim]},0)}else{var g=e.data().filter(function(n){var r=n[o.dim];return n===t.data||(r===c||r-c==0)&&(e.screenModel.y(n)-e.screenModel.y(t.data))*n[s.dim]>0});f=(h<0?Math.max:Math.min).apply(null,g.map(function(t){return e.screenModel.y(t)},0)),h=g.reduce(function(t,e){return t+e[s.dim]},0)}var m=t.node.getBBox(),y=["ELEMENT.AREA","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED"].indexOf(e.config.type)>=0?{x:m.width*(e.config.flip?c>0?1:0:.5),y:m.height*(e.config.flip?.5:h>0?1:0)}:{x:m.width/2,y:m.height/2};this._setValues({label:this._getFormat(o.dim)(c),start:0,value:d,crossPadding:y.x,minMode:n&&n.guide.x.hide},{label:this._getFormat(s.dim)(h),start:e.config.options.height,value:f,crossPadding:y.y,minMode:n&&n.guide.y.hide},{cls:u.toColor(l)?"":l,color:u.toColor(l)?l:""})},_hideCrosshair:function(){var t=this._element.node();t.parentNode&&t.parentNode.removeChild(t)},destroy:function(){this._hideCrosshair()},_subscribeToHover:function(){var t=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(e){return t.indexOf(e.config.type)>=0}).forEach(function(t){t.on("data-hover",function(t,e){if(e.data){if(t===e.unit){var n=N.getParentUnit(this._chart.getSpec(),t.config);this._showCrosshair(e,t,n)}}else this._hideCrosshair()}.bind(this))},this)},_getFormat:function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},onRender:function(){this._formatters=N.getFieldFormatters(this._chart.getSpec(),e.formatters),this._subscribeToHover()}}}r.default.api.plugins.add("crosshair",R);var D="tau-chart__tooltip";function F(t,e){return{render:function(t){return this.args=t,t=Object.assign({},t,{fields:this.filterFields(t.fields)}),this.rootTemplate(t)},rootTemplate:function(t){return['
',this.buttonsTemplate(),"
",'
',this.contentTemplate(t),"
"].join("\n")},contentTemplate:function(t){return this.fieldsTemplate(t)},filterFields:function(e){return e.filter(function(e){var n=e.split(".");return!(2===n.length&&t.skipInfo[n[0]])})},getLabel:function(e){return t.getFieldLabel(e)},getFormatter:function(e){return t.getFieldFormat(e)},fieldsTemplate:function(t){var e=this,n=t.data;return t.fields.map(function(t){return e.itemTemplate({data:n,field:t})}).join("\n")},itemTemplate:function(t){var e=t.data,n=t.field,r=this.getLabel(n),i=this.getFormatter(n)(e[n]);return['
','
'+r+"
",'
'+i+"
","
"].join("\n")},buttonsTemplate:function(){return[this.buttonTemplate({cls:"i-role-exclude",text:"Exclude",icon:function(){return''}})].join("\n")},buttonTemplate:function(t){var e=t.icon,n=t.text,r=t.cls;return['
','
'," "+(e?e()+" ":"")+n,"
","
"].join("\n")},didMount:function(){var e=t.getDomNode().querySelector(".i-role-exclude");e&&e.addEventListener("click",function(){t.excludeHighlightedElement(),t.setState({highlight:null,isStuck:!1})})}}}var I=r.default.api.utils,j=r.default.api.domUtils,z=r.default.api.pluginsSDK,B="tau-chart__tooltip",V=function(){function t(t){this.settings=I.defaults(t||{},{align:"bottom-right",clickable:!0,clsClickable:B+"__clickable",clsStuck:"stuck",clsTarget:B+"-target",escapeHtml:!0,fields:null,formatters:{},getTemplate:null,spacing:24,winBound:12}),this.onRender=this._getRenderHandler()}return t.prototype.init=function(t){this._chart=t,this._tooltip=this._chart.addBalloon({spacing:this.settings.spacing,winBound:this.settings.winBound,auto:!0,effectClass:"fade"}),this._initDomEvents(),this.state={highlight:null,isStuck:!1},this.setState(this.state),this._template=this._getTemplate()},t.prototype._getTemplate=function(){var t=F(this,this.settings);return"function"==typeof this.settings.getTemplate?this.settings.getTemplate(t,this,this.settings):t},t.prototype._renderTemplate=function(t,e){return this._template.render({data:t,fields:e})},t.prototype._initDomEvents=function(){var t=this;this._scrollHandler=function(){t.setState({highlight:null,isStuck:!1})},window.addEventListener("scroll",this._scrollHandler,!0),this.settings.clickable&&(this._outerClickHandler=function(e){var n=Array.from(document.querySelectorAll("."+t.settings.clsClickable)).concat(t.getDomNode()).map(function(t){return t.getBoundingClientRect()}),r=Math.min.apply(Math,n.map(function(t){return t.top})),i=Math.min.apply(Math,n.map(function(t){return t.left})),a=Math.max.apply(Math,n.map(function(t){return t.right})),o=Math.max.apply(Math,n.map(function(t){return t.bottom}));(e.clientXa||e.clientYo)&&t.setState({highlight:null,isStuck:!1})})},t.prototype.getDomNode=function(){return this._tooltip.getElement()},t.prototype.setState=function(t){var e=this,n=this.settings,r=this.state,i=this.state=Object.assign({},r,t);r.highlight=r.highlight||{data:null,cursor:null,unit:null},i.highlight=i.highlight||{data:null,cursor:null,unit:null},i.isStuck&&r.highlight.data&&(i.highlight=r.highlight),i.highlight.data!==r.highlight.data&&(i.highlight.data?(this._hideTooltip(),this._showTooltip(i.highlight.data,i.highlight.cursor),this._setTargetSvgClass(!0),requestAnimationFrame(function(){e._setTargetSvgClass(!0)})):i.isStuck||!r.highlight.data||i.highlight.data||(this._removeFocus(),this._hideTooltip(),this._setTargetSvgClass(!1))),!i.highlight.data||r.highlight.cursor&&i.highlight.cursor.x===r.highlight.cursor.x&&i.highlight.cursor.y===r.highlight.cursor.y||(this._tooltip.position(i.highlight.cursor.x,i.highlight.cursor.y),this._tooltip.updateSize());var a=this.getDomNode();this.settings.clickable&&i.isStuck!==r.isStuck&&(i.isStuck?(window.addEventListener("click",this._outerClickHandler,!0),a.classList.add(n.clsStuck),this._setTargetEventsEnabled(!1),this._accentFocus(i.highlight.data),this._tooltip.updateSize()):(window.removeEventListener("click",this._outerClickHandler,!0),a.classList.remove(n.clsStuck),requestAnimationFrame(function(){e._setTargetEventsEnabled(!0);var t=e._chart.getSVG();t&&j.dispatchMouseEvent(t,"mouseleave")})))},t.prototype._showTooltip=function(t,e){var n=this.settings,r=n.fields||"function"==typeof n.getFields&&n.getFields(this._chart)||Object.keys(t),i=this._renderTemplate(t,r);this._tooltip.content(i).position(e.x,e.y).place(n.align).show().updateSize(),this._template.didMount&&this._template.didMount()},t.prototype._hideTooltip=function(){window.removeEventListener("click",this._outerClickHandler,!0),this._template.willUnmount&&this._template.willUnmount(),this._tooltip.hide()},t.prototype.destroy=function(){window.removeEventListener("scroll",this._scrollHandler,!0),this._setTargetSvgClass(!1),this.setState({highlight:null,isStuck:!1}),this._tooltip.destroy()},t.prototype._subscribeToHover=function(){var t=this,e=["ELEMENT.LINE","ELEMENT.AREA","ELEMENT.PATH","ELEMENT.INTERVAL","ELEMENT.INTERVAL.STACKED","ELEMENT.POINT"];this._chart.select(function(t){return e.indexOf(t.config.type)>=0}).forEach(function(e){e.on("data-hover",function(e,n){var r=document.body.getBoundingClientRect();t.setState({highlight:n.data?{data:n.data,cursor:{x:n.event.clientX-r.left,y:n.event.clientY-r.top},unit:n.unit}:null})}),t.settings.clickable&&e.on("data-click",function(e,n){var r=document.body.getBoundingClientRect();t.setState(n.data?{highlight:{data:n.data,cursor:{x:n.event.clientX-r.left,y:n.event.clientY-r.top},unit:n.unit},isStuck:!0}:{highlight:null,isStuck:null})})})},t.prototype.getFieldFormat=function(t){var e=this._formatters[t]?this._formatters[t].format:function(t){return String(t)};return this.settings.escapeHtml?function(t){return I.escapeHtml(e(t))}:e},t.prototype.getFieldLabel=function(t){var e=this._formatters[t]?this._formatters[t].label:t;return this.settings.escapeHtml?I.escapeHtml(e):e},t.prototype._accentFocus=function(t){var e=function(e){return e===t};this._chart.select(function(){return!0}).forEach(function(t){t.fire("highlight",e)})},t.prototype._removeFocus=function(){var t=function(){return null};this._chart.select(function(){return!0}).forEach(function(e){e.fire("highlight",t),e.fire("highlight-data-points",t)})},t.prototype.excludeHighlightedElement=function(){var t=this.state.highlight.data;this._chart.addFilter({tag:"exclude",predicate:function(e){return e!==t}}),this._chart.refresh()},t.prototype._getRenderHandler=function(){return function(){this._formatters=z.getFieldFormatters(this._chart.getSpec(),this.settings.formatters),this._subscribeToHover(),this.setState({highlight:null,isStuck:!1})}},t.prototype._setTargetSvgClass=function(t){f.select(this._chart.getSVG()).classed(this.settings.clsTarget,t)},t.prototype._setTargetEventsEnabled=function(t){t?this._chart.enablePointerEvents():this._chart.disablePointerEvents()},t}(),H="diff-tooltip",U=H+"__item",W=H+"__header";var X,G=r.default.api.utils,q={draw:function(){var t=this.node().config;this._container=t.options.slot(t.uid)},addInteraction:function(){var t=this;this.node().on("interval-highlight",function(e,n){t._drawRange(n)})},_drawRange:function(t){var e,n=this.node(),r=n.config,i=n.screenModel.flip,a=this._container,o="interval-highlight",s=o+"__gradient",u=t?t[0]:null,l=t?t[1]:null,c=i?r.options.width:r.options.height;G.take((e=a.selectAll("."+o).data(t?[1]:[]),e.exit().remove(),{g:e,gEnter:e.enter().append("g").attr("class",o).attr("pointer-events","none")})).then(function(e){var n,h,d,p,g,m,y,v,b,x,_;!function(){for(var e=o+"__defs",n=o+"__gradient-start",u=o+"__gradient-end",l=a.node();"svg"!==(l=l.parentNode).tagName;);var c=e+"__"+r.uid,h=f.select(l).selectAll("#"+c).data(t?[1]:[]);h.exit().remove();var d=h.enter().append("defs").attr("class",e).attr("id",c).append("linearGradient").attr("id",s).attr("x1","0%").attr("y1",i?"100%":"0%").attr("x2",i?"0%":"100%").attr("y2","0%");d.append("stop").attr("class",n).attr("offset","0%"),d.append("stop").attr("class",u).attr("offset","100%")}(),h=(n=e).g,d=n.gEnter,p=o+"__range",g=h.select("."+p),m=d.append("rect").attr("class",p).attr("fill","url(#"+s+")"),v=(y=i?{x:0,y:l,width:c,height:u-l}:{x:u,y:0,width:l-u,height:c}).x,b=y.y,x=y.width,_=y.height,m.merge(g).attr("x",v).attr("y",b).attr("width",Math.abs(x)).attr("height",Math.abs(_)),function(t){var e=t.g,n=t.gEnter,r=o+"__range-start",a=e.select("."+r),s=n.append("line").attr("class",r),l=i?{x1:0,y1:u,x2:c,y2:u}:{x1:u,y1:0,x2:u,y2:c},h=l.x1,d=l.y1,f=l.x2,p=l.y2;s.merge(a).attr("x1",h).attr("y1",d).attr("x2",f).attr("y2",p)}(e),function(t){var e=t.g,n=t.gEnter,r=o+"__range-end",a=e.select("."+r),s=n.append("line").attr("class",r),u=i?{x1:0,y1:l,x2:c,y2:l}:{x1:l,y1:0,x2:l,y2:c},h=u.x1,d=u.y1,f=u.x2,p=u.y2;s.merge(a).attr("x1",h).attr("y1",d).attr("x2",f).attr("y2",p)}(e)})}},Y=(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),$=r.default.api.utils,K=function(t){function e(e){var n=t.call(this,e)||this;return n.onSpecReady=n._getSpecReadyHandler(),n}return Y(e,t),e.prototype.init=function(e){t.prototype.init.call(this,e),this._unitsGroupedData=new Map},e.prototype._getTemplate=function(){var t,e,n=(t=this,this.settings,e=F(t),Object.assign({},e,{hasColor:function(){return null!=this.args.colorField},contentTemplate:function(t){return[this.fieldsTemplate(t),this.tableTemplate(t)].join("\n")},filterFields:function(n){var r=t.state.highlight.unit.screenModel.model,i=r.scaleColor,a=r.scaleX,o=r.scaleY,s=n.filter(function(t){return t!==i.dim&&t!==a.dim&&t!==o.dim}),u=function(){return s.push(a.dim)};return this.shouldShowColorTable()?u():(u(),i.dim&&s.push(i.dim),s.push(o.dim)),e.filterFields.call(this,s)},itemTemplate:function(t){var e=t.data,n=t.field,r=this.getLabel(n),i=this.getFormatter(n)(e[n]),a=this.args.prev,o=(this.args.valueField,this.shouldShowDiff(n)),s=['',""+i,o?" "+this.fieldUpdownTemplate(this.getDiff({data:e,prev:a,field:n})):"",""].join("");return['
','
'+r+"
"," "+s,"
"].join("\n")},shouldShowDiff:function(t){return t===this.args.valueField},getDiff:function(t){var e=t.data,n=t.prev,r=t.field,i=this.getFormatter(r),a=(e?e[r]:0)-(n?n[r]:0);return{diff:i(a),sign:Math.sign(a)}},fieldUpdownTemplate:function(t){var e=t.diff,n=t.sign,r=H+"__field__updown";return['0?"positive":"negative")+'">',(n>0?"▲":n<0?"▼":"")+(0===n?"":e),""].join("")},shouldShowColorTable:function(){var t=this.args.groups;return this.hasColor()&&t.length>1},tableTemplate:function(t){return this.shouldShowColorTable()?['
',this.tableHeaderTemplate(t),this.tableBodyTemplate(t),"
"].join("\n"):""},tableHeaderTemplate:function(t){var e=t.colorField,n=t.valueField,r=this.getLabel(e),i=this.getLabel(n);return['
',' '+r+"",' '+i+"",' ▼▲',"
"].join("\n")},tableBodyTemplate:function(t){var e=this,n=t.data,r=t.groups,i=t.valueField,a=t.colorField,o=n,s=r.map(function(t){var e=t.data;return e?e[i]:0}),u=Math.min.apply(Math,s),l=Math.max.apply(Math,s);return['
','
',r.map(function(t){var n=t.data,r=t.prev;return e.tableRowTemplate({data:n,prev:r,highlighted:o,valueField:i,colorField:a,min:u,max:l})}).join("\n"),"
","
"].join("\n")},tableRowTemplate:function(t){var e=t.data,n=t.prev,r=t.highlighted,i=t.valueField,a=t.colorField,o=t.min,s=t.max,u=e?e[i]:0,l=this.getFormatter(a)((e||n)[a]),c=this.getFormatter(i)(u),h=e===r,d=this.getDiff({data:e,prev:n,field:i}),f=d.diff,p=d.sign,g=this.getColor(e||n),m=g.color,y=g.colorCls;return['
'," "+this.valueBarTemplate({min:o,max:s,v:u,color:m,colorCls:y}),' '+l+"",' '+c+""," "+this.updownTemplate({diff:f,sign:p}),"
"].join("\n")},valueBarTemplate:function(t){var e=t.min,n=t.max,r=t.v,i=t.color,a=t.colorCls;e=Math.min(e,0);var o=(n=Math.max(0,n))-e;return[""].join("\n")},getColor:function(e){var n=t.state.highlight.unit.screenModel;return{color:n.color(e),colorCls:n.class(e)}},updownTemplate:function(t){var e=t.diff,n=t.sign,r=U+"__updown";return['0?"positive":"negative")+'">',(n>0?"▲":n<0?"▼":"")+(0===n?"":e),""].join("")},didMount:function(){e.didMount.call(this),this._scrollToHighlighted(),this._reserveSpaceForUpdown()},_scrollToHighlighted:function(){var e=t.getDomNode(),n=e.querySelector("."+H+"__body"),r=e.querySelector("."+H+"__body__content"),i=e.querySelector("."+U+"_highlighted");if(n&&r&&i){var a=n.getBoundingClientRect(),o=r.getBoundingClientRect(),s=i.getBoundingClientRect(),u=0;if(s.bottom>a.bottom){var l=s.bottom-a.bottom+s.height,c=o.bottom-a.bottom;u=-Math.min(l,c),r.style.transform="translateY("+u+"px)"}o.top+ua.bottom&&n.classList.add(H+"__body_overflow-bottom")}},_reserveSpaceForUpdown:function(){var e=t.getDomNode(),n=e.querySelector("."+H+"__body"),r=e.querySelector("."+W);if(n&&r){var i="."+U+"__updown:not(:empty)",a=Array.from(e.querySelectorAll(i)).map(function(t){return t.scrollWidth}),o=Math.max.apply(Math,a),s=Math.max(0,Math.ceil(o-15));n.style.paddingRight=s+"px",r.style.paddingRight=s+"px"}}}));return"function"==typeof this.settings.getTemplate?this.settings.getTemplate(n,this,this.settings):n},e.prototype._renderTemplate=function(t,e){var n,r=this.state.highlight.unit,i=r.screenModel,a=i.model,o=a.scaleColor,s=(a.scaleX,a.scaleY),u=this._unitsGroupedData.get(r),l=this._getHighlightRange(t,r),c=l[0],h=l[1],d=function(t){var e=i.model.color(t);return isFinite(c)&&u[c][e]?u[c][e][0]:null},f=d(t),p=r.config.stack,g=!(!r.config.flip&&r.config.guide.obsoleteVerticalStackOrder&&r.config.stack),m=(n=o.domain().slice().reduce(function(t,e,n){return t[e]=n,t},{}),g?function(t,e){return n[t[o.dim]]-n[e[o.dim]]}:function(t,e){return n[e[o.dim]]-n[t[o.dim]]}),y=g?function(t,e){return s(t[s.dim])-s(e[s.dim])}:function(t,e){return s(e[s.dim])-s(t[s.dim])},v=function(t){return Object.keys(u[t]).reduce(function(e,n){return e.concat(u[t][n])},[]).sort(p?m:y)},b=v(h).map(function(t){i.model.color(t);return{data:t,prev:d(t)}});if(isFinite(c)){var x=v(c),_=b.reduce(function(t,e){return t[i.model.color(e.data)]=!0,t},{});x.forEach(function(t){var e=i.model.color(t);_[e]||b.push({data:null,prev:t})}),p&&b.sort(function(t,e){return m(t.data||t.prev,e.data||e.prev)})}return this._template.render({data:t,prev:f,fields:e,groups:b,valueField:s.dim,colorField:o.dim})},e.prototype._getRenderHandler=function(){var e=t.prototype._getRenderHandler.call(this);return function(){var t=this;e.call(this);var n=this._chart,r=n.select(function(t){return"chart"===t.config.namespace&&0===t.config.type.indexOf("ELEMENT.")&&"ELEMENT.INTERVAL_HIGHLIGHT"!==t.config.type}),i=n.select(function(t){return"ELEMENT.INTERVAL_HIGHLIGHT"===t.config.type}).reduce(function(t,e,n){return t[n]=e,t},{});r.forEach(function(e,n){var r=e.data();t._unitsGroupedData.set(e,t._getGroupedData(r,e)),e.on("data-hover",function(r,a){var o=i[n],s=a.unit&&a.unit===e?t._getHighlightRange(a.data,a.unit):null;o.fire("interval-highlight",s)})})}},e.prototype._getSpecReadyHandler=function(){return function(t,e){t.traverseSpec(e,function(t,e){if(0===t.type.indexOf("ELEMENT.")){var n=JSON.parse(JSON.stringify(t));n.type="ELEMENT.INTERVAL_HIGHLIGHT",n.namespace="highlight";var r=e.units.indexOf(t);e.units.splice(r,0,n)}})}},e.prototype._getGroupedData=function(t,e){var n=e.screenModel.model.scaleX,i=$.groupBy(t,function(t){return n(t[n.dim]).toString()}),a=e.config.guide.x.tickPeriod||e.config.guide.x.timeInterval;if(a){var o=n.domain(),s=e.config.guide.utcTime;r.default.api.tickPeriod.generate(o[0],o[1],a,{utc:s}).filter(function(t){return t>=o[0]&&t<=o[1]}).forEach(function(t){var e=n(t);i[e]||(i[e]=[])})}return Object.keys(i).reduce(function(t,n){return t[n]=$.groupBy(i[n],function(t){return e.screenModel.model.color(t)}),t},{})},e.prototype._getHighlightRange=function(t,e){var n=e.screenModel.flip,r=e.screenModel.model.scaleX,i=r(t[r.dim]),a=this._unitsGroupedData.get(e),o=Object.keys(a).map(Number).sort(n?function(t,e){return e-t}:function(t,e){return t-e}),s=o.indexOf(i);return 0===s?[i,i]:[o[s-1],i]},e}(V);function J(t){return new K(t)}r.default.api.unitsRegistry.reg("ELEMENT.INTERVAL_HIGHLIGHT",q,"ELEMENT.GENERIC.CARTESIAN"),r.default.api.plugins.add("diff-tooltip",J);var Q=n(20),Z=n.n(Q),tt=n(19),et=n(18),nt=n.n(et),rt="Taucharts Export Plug-in:",it=r.default.api.utils,at=r.default.api.pluginsSDK,ot=at.tokens(),st=function(t,e){return t.replace(new RegExp("^"+e+"+|"+e+"+$","g"),"")},ut=function(t){return(t=Math.round(t))%2?t+1:t},lt=function(t){return null===t||""===t||void 0===t};var ct,ht={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},dt=function(t,e){e=e||"all";var n=document.createElement("style");return n.setAttribute("media",e),n.innerHTML=t,n},ft=dt(nt.a,"print"),pt=function(){ft&&ft.parentNode&&ft.parentNode.removeChild(ft),ct&&ct.parentNode&&ct.parentNode.removeChild(ct)};/PhantomJS/.test(navigator.userAgent)||("onafterprint"in window?window.addEventListener("afterprint",pt):window.matchMedia("screen").addListener(function(t){t.matches&&pt()}));var gt=function(t,e,n){var r="data:"+e+";charset=UTF-8,%ef%bb%bf"+encodeURIComponent(n),i=document.createElement("a");i.setAttribute("href",r),i.setAttribute("download",t),i.setAttribute("target","_new"),document.body.appendChild(i),i.click(),document.body.removeChild(i),i=null},mt=function(t){return[].slice.call(t.querySelectorAll("text.label")).forEach(function(t){t.innerHTML=[].slice.call(t.querySelectorAll("tspan")).reduce(function(t,e){var n=e.value||e.text||e.textContent||"";return t+(n=n.charAt(0).toUpperCase()+n.substr(1))},"")}),t},yt=function(t,e,n){n=null==n?"":String(n);var r=(t||{})[e]||{};return(it.isObject(r.label)?r.label.text:r.label)||n};function vt(t){return{onRender:function(){this._info=at.extractFieldsFormatInfo(this._chart.getSpec())},_normalizeExportFields:function(t,e){var n=this._info;return t.map(function(t){var e=t,r=n[t]||{};return"string"==typeof t&&(e={field:t,title:r.label||t}),"function"!=typeof e.value&&(e.value=function(t){var e=t[this.field];return r.isComplexField?(e||{})[r.tickLabel]:e}),e}).filter(function(t){return!e.find(function(e){return t.field===e})})},_handleError:function(t){r.default.api.globalSettings.log([rt,t],"error")},_createDataUrl:function(t,e){var n=this;(function(){for(var t=[],e=0;e=200&&n.status<300){var t=n.responseText;i[e]=t,a.splice(a.indexOf(n),1),0===a.length&&r(null,i)}else a.forEach(function(t){return t.abort()}),r(new Error(n.status+": "+n.statusText),null)},n.onerror=function(t){a.forEach(function(t){return t.abort()}),r(t.error,null)},n.open("GET",t,!0),n.send(null)})}).apply(void 0,this._cssPaths.concat([function(i,a){if(i)e(i,null);else try{var o=a.join(" ").replace(/&/g,""),s=dt(o),u=document.createElement("div");t.fire("beforeExportSVGNode");var l=t.getSVG().cloneNode(!0);t.fire("afterExportSVGNode"),u.appendChild(mt(l)),f.select(l).attr("version",1.1).attr("xmlns","http://www.w3.org/2000/svg"),l.insertBefore(s,l.firstChild),n._renderAdditionalInfo(l,t),n._addBackground(l,n._backgroundColor);var c=document.createElement("canvas");c.height=l.getAttribute("height"),c.width=l.getAttribute("width"),Z()(c,l.parentNode.innerHTML,{renderCallback:function(t){var n=(new XMLSerializer).serializeToString(t);"=0}))?'"'+a+'"':a}return t.concat(i)},[]).join(e))},[o.map(function(t){return t.title}).join(e)]).join("\r\n"),u=(this._fileName||"export")+".csv";gt(u,"text/csv",s)},_renderFillLegend:function(e,n,r,i){var a=function(t,e){var n=t[0],r=t[1],i=(r-n)/(e-1),a=it.range(e-2).map(function(t){return n+i*(t+1)});return[n].concat(a).concat(r)},o=this._unit.getScale("color"),s=yt(e.guide,"color",o.dim).toUpperCase(),u="text-transform:uppercase;font-weight:600;font-size:"+t.fontSize+"px",l=o.domain().sort(function(t,e){return t-e}),c=o.brewer.length,h=t.fontSize,d=a(l,c).reverse().map(function(t,e){return''}),f=a(l,3).reverse().map(function(t,e,n){return''+t+""}),p=[''," ",' ',d.join("")," "," ",' '+s+"",' ',' '," ",f.join("")," "," Sorry, your browser does not support inline SVG.",""].join(""),g=(new DOMParser).parseFromString(p,"application/xml").documentElement;return document.body.appendChild(g),n.append("g").attr("class","legend").attr("transform","translate("+(i+10)+","+t.paddingTop+")").node().appendChild(g),{h:120,w:0}},_renderColorLegend:function(e,n,r,i){var a=this._unit.getScale("color"),o=yt(e.guide,"color",a.dim).toUpperCase(),s=this._getColorMap(r.getChartModelData({excludeFilter:["legend"]}),a,a.dim).values,u=n.append("g").attr("class","legend").attr("transform","translate("+(i+10)+","+t.paddingTop+")");return u.append("text").text(o.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":t.fontSize+"px"}),u.selectAll("g").data(s).enter().append("g").call(function(e){e.attr("transform",function(t,e){return"translate(5,"+20*(e+1)+")"}),e.append("circle").attr("r",6).attr("fill",function(t){return a.toColor(t.color)}).attr("class",function(t){return a.toClass(t.color)}),e.append("text").attr("x",12).attr("y",5).text(function(t){return it.escape(lt(t.label)?"No "+o:t.label)}).style({"font-size":t.fontSize+"px"})}),{h:20*s.length,w:0}},_renderSizeLegend:function(e,n,r,i,a){var o,s,u=this._unit.getScale("size"),l=yt(e.guide,"size",u.dim).toUpperCase(),c=r.getChartModelData().sort(function(t,e){return u(t[u.dim])-u(e[u.dim])}),h=c.length,d=c[0][u.dim],f=c[h-1][u.dim];if(f-d){var p=(s=f-d,Math.log(s)/Math.LN10),g=4-p<0?0:Math.round(4-p),m=Math.pow(10,g),y=(f-d)/5;o=it.unique([d,d+y,d+2*y,d+3*y,f].map(function(t){return t===f||t===d?t:Math.round(t*m)/m}))}else o=[d];var v=o.map(function(t){var n=u(t),r=n/2;return{diameter:ut(n+2),radius:r,value:t,className:e.color?"color-definite":""}}.bind(this)).reverse(),b=Math.max.apply(null,v.map(function(t){return t.diameter})),x=t.fontSize,_=0,w=n.append("g").attr("class","legend").attr("transform","translate("+(i+10)+","+(t.paddingTop+a.h+20)+")");w.append("text").text(l.toUpperCase()).style({"text-transform":"uppercase","font-weight":"600","font-size":x+"px"}),w.selectAll("g").data(v).enter().append("g").call(function(t){t.attr("transform",function(){var t="translate(5,"+(_+=b)+")";return _+=10,t}),t.append("circle").attr("r",function(t){return t.radius}).attr("class",function(t){return t.className}).style({opacity:.4}),t.append("g").attr("transform",function(){return"translate("+b+","+x/2+")"}).append("text").attr("x",0).attr("y",0).text(function(t){return t.value}).style({"font-size":x+"px"})})},_renderAdditionalInfo:function(t,e){var n=this._findUnit(e);if(n){var r={h:0,w:0};t=f.select(t);var i=parseInt(t.attr("width"),10);t.attr("height");t.attr("width",i+160);var a=e.getScaleInfo(n.color);if(a.dim&&!a.discrete){var o=this._renderFillLegend(n,t,e,i);r.h=o.h+20,r.w=o.w}if(a.dim&&a.discrete){var s=this._renderColorLegend(n,t,e,i);r.h=s.h+20,r.w=s.w}var u=e.getScaleInfo(n.size);u.dim&&!u.discrete&&this._renderSizeLegend(n,t,e,i,r)}},_addBackground:function(t,e){if(e&&"transparent"!==e){var n=document.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("fill",e),n.setAttribute("x",0),n.setAttribute("y",0),n.setAttribute("width",t.getAttribute("width")),n.setAttribute("height",t.getAttribute("height")),t.insertBefore(n,t.firstChild)}},onUnitDraw:function(t,e){r.default.api.isChartElement(e)&&"chart"===e.config.namespace&&(this._unit=e)},_getColorMap:function(t,e,n){return it.unique(t.map(function(t){var r=t[n];return{color:e(r),value:r,label:r}}),function(t){return t.value}).reduce(function(t,e){return t.brewer[e.value]=e.color,t.values.push(e),t},{brewer:{},values:[]})},_select:function(t,e){var n=this["_to"+(t=t||"").charAt(0).toUpperCase()+t.slice(1)];n&&n.call(this,e)},_handleMenu:function(t,e,n){t.addEventListener("click",function(t){if("a"===t.target.tagName.toLowerCase()){var r=t.target.getAttribute("data-value");this._select(r,e),n.hide()}}.bind(this)),t.addEventListener("mouseover",function(t){"a"===t.target.tagName.toLowerCase()&&t.target.focus()}.bind(this)),t.addEventListener("keydown",function(t){if(t.keyCode===ht.ESCAPE&&n.hide(),t.keyCode===ht.DOWN&&(t.target.parentNode.nextSibling?t.target.parentNode.nextSibling.childNodes[0].focus():t.target.parentNode.parentNode.firstChild.childNodes[0].focus()),t.keyCode===ht.UP&&(t.target.parentNode.previousSibling?t.target.parentNode.previousSibling.childNodes[0].focus():t.target.parentNode.parentNode.lastChild.childNodes[0].focus()),t.keyCode===ht.ENTER){var r=t.target.getAttribute("data-value");this._select(r,e)}t.preventDefault()}.bind(this));var r=null,i=function(){r=setTimeout(function(){n.hide()},100)},a=function(){clearTimeout(r)},o=function(){n.toggle(),n.hidden||t.querySelectorAll("a")[0].focus()};t.addEventListener("blur",i,!0),t.addEventListener("focus",a,!0),this._container.addEventListener("click",o),this._onDestroy(function(){t.removeEventListener("blur",i,!0),t.removeEventListener("focus",a,!0),this._container.removeEventListener("click",o),clearTimeout(r)})},init:function(e){t=t||{},t=it.defaults(t,{backgroundColor:"white",visible:!0,fontSize:13,paddingTop:30}),this._chart=e,this._info={},this._cssPaths=t.cssPaths,this._fileName=t.fileName,this._backgroundColor=t.backgroundColor||"white",this._destroyListeners=[],this._csvSeparator=t.csvSeparator||",",this._exportFields=t.exportFields||[],this._appendFields=t.appendFields||[],this._excludeFields=t.excludeFields||[],this._cssPaths||(this._cssPaths=[],r.default.api.globalSettings.log('[export plugin]: the "cssPath" parameter should be specified for correct operation',"warn"));var n=t.visible?"":"display:none";this._container=e.insertToHeader('Export');var i=e.addBalloon({place:"bottom-left"});i.content(['"].join("")),i.attach(this._container);var a=i.getElement();a.setAttribute("tabindex","-1"),this._handleMenu(a,e,i);var o=e.on("export-to",function(t,e){var n=e.type,r=e.fileName;this._fileName=r||this._fileName,this._select(n,t)}.bind(this)),s=e.on("exportTo",function(t,e){r.default.api.globalSettings.log([rt,"`exportTo` event is deprecated, use `export-to` instead."],"warn"),this._select(e,t)}.bind(this));this._onDestroy(function(){i.destroy(),e.removeHandler(o),e.removeHandler(s)})},_onDestroy:function(t){this._destroyListeners.push(t)},destroy:function(){this._destroyListeners.forEach(function(t){t.call(this)},this);var t;(t=this._container)&&t.parentElement&&t.parentElement.removeChild(t)}}}r.default.api.plugins.add("export-to",vt);var bt=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0&&e.x.push(t),n.indexOf("y")>=0&&e.y.push(t),this};var o=function(){var t=i.scrollLeft,o=i.scrollTop;a.forEach(function(e){e.call(null,t,o)});var u=function(i){var a="x"===i?t:o;a!==n[i]&&(clearTimeout(r[i]),s(e[i],function(t){t.transition("floatingAxes_scrollVisibility"),t.attr("opacity",1e-6)}),r[i]=setTimeout(function(){s(e[i],function(t){r[i]=null,t.transition("floatingAxes_scrollVisibility").duration(256).attr("opacity",1)})},128)),n[i]=a};u("x"),u("y")};function s(t,e,n){t.forEach(function(t){e.call(n,t)})}i.addEventListener("scroll",o),this.fireScroll=function(){o.call(null,i.scrollLeft,i.scrollTop)},this.destroy=function(){i.removeEventListener("scroll",o)}}(a),c=(t=function(t){var e="> ."+t+".axis.tau-active";return[".frame-root.tau-active "+e,".frame-root.tau-active .cell.tau-active "+e].join(", ")},{x:Array.from(o.querySelectorAll(t("x"))),y:Array.from(o.querySelectorAll(t("y")))}),h=function(){function t(t){return{axis:t,parentTransform:function(t){var e,n={translate0:{x:0,y:0},translate:{x:0,y:0}},r=t;for(;r&&"SVG"!==r.nodeName.toUpperCase();)e=Dt(r),n.translate0.x+=e.translate0.x,n.translate0.y+=e.translate0.y,n.translate.x+=e.translate.x,n.translate.y+=e.translate.y,r=r.parentNode;return n}(t.parentNode),axisTransform:Dt(t)}}return{x:c.x.map(t),y:c.y.map(t)}}(),d=(n=h.y.map(function(t){return t.axisTransform.translate.x+t.parentTransform.translate.x}),Math.max.apply(null,n)+1),p=function(t){return Math.min.apply(null,t)}(h.x.map(function(t){return t.axisTransform.translate.y+t.parentTransform.translate.y}))-1,g=r.default.api.globalSettings.getScrollbarSize(a);var m={scrollLeft:a.scrollLeft,scrollTop:a.scrollTop,visibleWidth:a.clientWidth,visibleHeight:a.clientHeight,scrollbarWidth:g.width,scrollbarHeight:g.height,svgWidth:Number(s.attr("width")),svgHeight:Number(s.attr("height")),minXAxesY:p,maxYAxesX:d},y=function(){var t=s.append("defs").attr("class","floating-axes floating-axes__defs"),e={ns:{x1:0,y1:0,x2:0,y2:1},ew:{x1:1,y1:0,x2:0,y2:0},sn:{x1:0,y1:1,x2:0,y2:0},we:{x1:0,y1:0,x2:1,y2:0}};return Object.keys(e).forEach(function(n){var r=e[n],a=t.append("linearGradient").attr("id","shadow-gradient-"+n+"-"+i).attr("x1",r.x1).attr("y1",r.y1).attr("x2",r.x2).attr("y2",r.y2);a.append("stop").attr("class","floating-axes__shadow-start").attr("offset","0%").attr("stop-color",Et).attr("stop-opacity",Tt),a.append("stop").attr("class","floating-axes__shadow-end").attr("offset","100%").attr("stop-color",St).attr("stop-opacity",Mt)}),t}();function v(t,e){e.forEach(function(e){e.axis[kt]=e.axis.parentNode;var n=t.append("g");u?n.attr("transform",Lt(e.parentTransform.translate0.x,e.parentTransform.translate0.y)).transition().duration(u).attr("transform",Lt(e.parentTransform.translate.x,e.parentTransform.translate.y)):n.attr("transform",Lt(e.parentTransform.translate.x,e.parentTransform.translate.y)),n.node().appendChild(e.axis),Array.prototype.forEach.call(e.axis.querySelectorAll(".label"),function(t){t[At]=t.getAttribute("transform")})})}var b,x,_=function(){var t=m.svgHeight-m.minXAxesY+1+m.scrollbarHeight,e=s.append("g").attr("class","floating-axes floating-axes__x").call(S,m.svgWidth,t,0,m.minXAxesY);v(e,h.x);var n=e.selectAll(".label");return l.handleVisibilityFor(e,"y").handleVisibilityFor(n,"x").onScroll(function(t,r){var i=Math.min(m.visibleHeight+r-m.svgHeight-m.scrollbarHeight,0);e.attr("transform",Lt(0,i)),n.each(function(){var e=Rt(this[At]),n=-m.svgWidth+m.visibleWidth+t-10;this.setAttribute("transform","translate("+(e.x+n)+","+e.y+") rotate("+e.r+")")})}),e}(),w=function(){var t=s.append("g").attr("class","floating-axes floating-axes__y").call(S,m.maxYAxesX,m.svgHeight);v(t,h.y);var e=t.selectAll(".label");return l.handleVisibilityFor(t,"x").handleVisibilityFor(e,"y").onScroll(function(n,r){var i=Math.max(n,0);t.attr("transform",Lt(i,0)),e.each(function(){var t=Rt(this[At]),e=r+10;this.setAttribute("transform","translate("+t.x+","+(t.y+e)+") rotate("+t.r+")")})}),t}(),E=(b=m.svgHeight-m.minXAxesY+m.scrollbarHeight,x=s.append("g").attr("class","floating-axes floating-axes__corner").call(S,m.maxYAxesX,b),l.handleVisibilityFor(x,"xy").onScroll(function(t,e){var n=Math.max(t,0),r=m.minXAxesY,i=Math.min(e+m.visibleHeight-b,r);x.attr("transform",Lt(n,i))}),x);function S(t,n,r,i,a){i=i||0,a=a||0,t.append("rect").attr("class","i-role-bg").attr("x",i-1).attr("y",a-1).attr("width",Math.max(0,n+2)).attr("height",Math.max(0,r+2)).attr("fill",e.bgcolor)}var T=function(){var t=m.maxYAxesX,e=m.svgHeight-m.minXAxesY+m.scrollbarHeight,n=s.append("g").attr("class","floating-axes floating-axes__shadows").attr("pointer-events","none"),r=function(t,e,r,a,o){return n.append("rect").attr("fill","url(#shadow-gradient-"+t+"-"+i+")").attr("x",e).attr("y",r).attr("width",Math.max(0,a)).attr("height",Math.max(0,o))},a=r("ns",0,0,t,wt),o=r("ew",m.visibleWidth-wt,m.visibleHeight-e,wt,e),u=r("sn",0,m.visibleHeight-e-wt,t,wt),c=r("we",t,m.visibleHeight-e,wt,e);l.handleVisibilityFor(a,"xy").handleVisibilityFor(o,"xy").handleVisibilityFor(u,"xy").handleVisibilityFor(c,"xy").onScroll(function(t,e){var r=t,i=e;n.attr("transform",Lt(r,i));var s=function(t,e){t.style("visibility",e?"":"hidden")};s(a,e>0&&m.svgHeight>m.visibleHeight),s(o,t+m.visibleWidthm.visibleWidth),s(u,e+m.visibleHeightm.visibleHeight),s(c,t>0&&m.svgWidth>m.visibleWidth)})}(),M=_.node(),C=w.node(),k=E.node();l.onScroll(function(t){o.insertBefore(M,0===t?k.nextElementSibling:C)}),l.fireScroll(),this.floatingLayout={defs:y,xAxes:_,yAxes:w,shadows:T},s.selectAll(".floating-axes").on("mouseenter",function(){xt.dispatchMouseEvent(o,"mouseleave")}).on("mousemove",function(){f.event.stopPropagation()}).on("click",function(){f.event.stopPropagation()})},removeFloatingLayout:function(){function t(t){t.selectAll(".axis").each(function(){this[kt].appendChild(this),delete this[kt],Array.prototype.forEach.call(this.querySelectorAll(".label"),function(t){t.setAttribute("transform",t[At]),delete t[At]})})}this.floatingLayout&&(this.floatingLayout.xAxes.call(t),this.floatingLayout.yAxes.call(t),this.scrollManager.destroy(),this.floatingLayout=null),bt.select(this.chart.getSVG()).selectAll(".floating-axes").remove()},detectChartBackgroundColor:function(){var t,e=this.chart.getLayout().layout;do{if("none"!==(t=window.getComputedStyle(e)).backgroundImage)return null;if("transparent"!==t.backgroundColor&&"rgba(0, 0, 0, 0)"!==t.backgroundColor)return t.backgroundColor}while(e=e.parentElement);return null}}}function Lt(t,e){return"translate("+t+","+e+")"}function Rt(t){var e={x:0,y:0,r:0};if(!t)return e;var n=t.indexOf("translate(");if(n>=0){var r=t.indexOf(")",n+10),i=t.substring(n+10,r).trim().replace(","," ").replace(/\s+/," ").split(" ");e.x=parseFloat(i[0]),i.length>1&&(e.y=parseFloat(i[1]))}var a=t.indexOf("rotate(");if(a>=0){var o=t.indexOf(")",a+7),s=t.substring(a+7,o);e.r=parseFloat(s.trim())}return e}function Dt(t){var e=t[Ct]&&t[Ct].transform,n=Rt(t.getAttribute("transform"));return{translate0:n,translate:e?Rt(t[Ct].transform):n}}r.default.api.plugins.add("floating-axes",Nt);var Ft=r.default.api.utils;function It(t){Ft.defaults(t||{},{});var e=function(t,e,n,r){t.addEventListener(e,function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.classList.contains(n)&&r(t,e),e=e.parentNode})};return{init:function(t){this._chart=t,this._currentFilters={},this._legendColorByScaleId={};var n=this._chart.getSpec(),r=function(t){return function(e,r){var i=n.scales[r];return i.type===t&&i.dim&&e.push(r),e}};this._color=Object.keys(n.scales).reduce(r("color"),[]),this._fill=Object.keys(n.scales).reduce(r("fill"),[]);var i=this._color.length>0,a=this._fill.length>0;(i||a)&&(this._container=this._chart.insertToRightSidebar(this._containerTemplate),i&&(e(this._container,"click","tau-chart__legend__item-color",function(t,e){this._toggleLegendItem(e)}.bind(this)),e(this._container,"mouseover","tau-chart__legend__item-color",function(t,e){this._highlightToggle(e,!0)}.bind(this)),e(this._container,"mouseout","tau-chart__legend__item-color",function(t,e){this._highlightToggle(e,!1)}.bind(this))))},onSpecReady:function(){this._assignStaticBrewersOrEx()},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend()},_containerTemplate:'
',_template:Ft.template('
<%=name%>
<%=items%>
'),_itemTemplate:Ft.template(["
\">",'
','
',"
","<%=label%>","
"].join("")),_itemFillTemplate:Ft.template(['
\' class="tau-chart__legend__item tau-chart__legend__item-color" style="padding: 6px 0px 10px 40px;margin-left:10px;">','
',' ',' <%=label%>',"
","
"].join("")),_clearPanel:function(){this._container&&(this._container.innerHTML="")},_drawColorLegend:function(){var t=this;t._color.forEach(function(e){var n=t._chart.select(function(t){return t.config.color===e})[0];if(n){var r=n.getScale("color"),i=t._chart.getDataSources({excludeFilter:["legend"]}),a=Ft.unique(i[r.source].data.map(function(t){return t[r.dim]})).map(function(n){var i=Ft.escape(n),a=r.dim+i;return{scaleId:e,dim:r.dim,color:r(n),disabled:t._currentFilters.hasOwnProperty(a),label:n,value:i}});t._legendColorByScaleId[e]=a,t._container.insertAdjacentHTML("beforeend",t._template({items:a.map(function(e){return t._itemTemplate({scaleId:e.scaleId,dim:e.dim,color:e.color,classDisabled:e.disabled?"disabled":"",label:e.label,value:e.value})}).join(""),name:(((n.guide||{}).color||{}).label||{}).text||r.dim}))}})},_drawFillLegend:function(){var t=this;t._fill.forEach(function(e){var n=t._chart.select(function(t){return"COORDS.MAP"===t.config.type&&t.config.fill===e});if(n.length>0){var r=n[0].getScale("fill"),i=r.brewer,a=r.domain(),o=(a[1]-a[0])/i.length,s=Ft.range(i.length).map(function(e){var n=a[0]+e*o,s="";return 0===e&&(s=a[0]),e===i.length-1&&(s=a[1]),t._itemFillTemplate({color:r(n),label:s,value:Ft.escape(n)})});t._container.insertAdjacentHTML("beforeend",t._template({items:s.join(""),name:(((n[0].guide||{}).fill||{}).label||{}).text||r.dim}))}})},_toggleLegendItem:function(t){var e=t.getAttribute("data-scale-id"),n=t.getAttribute("data-dim"),r=t.getAttribute("data-value"),i=n+r,a=this._legendColorByScaleId[e].filter(function(t){return!t.disabled});if(1!==a.length||e!==a[0].scaleId||r!==a[0].value){var o=this._currentFilters;if(o.hasOwnProperty(i)){var s=o[i];delete o[i],t.classList.remove("disabled"),this._chart.removeFilter(s)}else t.classList.add("disabled"),o[i]=this._chart.addFilter({tag:"legend",predicate:function(t){return t[n]!=r}});this._chart.refresh()}},_highlightToggle:function(t,e){var n=t.getAttribute("data-scale-id"),r=t.getAttribute("data-dim"),i=t.getAttribute("data-value");this._chart.select(function(t){return t.config.color===n}).forEach(function(t){t.fire("highlight",function(t){return!e||t[r]==i})})},_generateColorMap:function(t){var e=Ft.range(20).map(function(t){return"color20-"+(1+t)});return t.reduce(function(t,n,r){return t[n]=e[r%20],t},{})},_assignStaticBrewersOrEx:function(){var t=this;t._color.forEach(function(e){var n=t._chart.getSpec().scales[e],r=t._chart.getDataSources({excludeFilter:["legend"]}),i=t._chart.getScaleFactory(r).createScaleInfoByName(e).domain();n.brewer||(n.brewer="measure"!==n.dimType?t._generateColorMap(i):["#e5f5e0","#a1d99b","#31a354"])})}}}r.default.api.plugins.add("geomap-legend",It);var jt=r.default.api.utils;function zt(t){jt.defaults(t||{},{});var e=function(){return!1};return{init:function(t){this._currNode=null,this._currData=null,this._chart=t,this._tooltip=t.addBalloon({spacing:3,auto:!0,effectClass:"fade"}),this._tooltip.content(this.template),this._tooltip.getElement().addEventListener("click",function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.classList.contains("i-role-exclude")&&(n._exclude(),n._tooltip.hide(),n._blurSelection()),e=e.parentNode},!1);var e,n=this;this._showTooltip=function(t){clearTimeout(e),n._currData=t.data;var r="No data";null!==t.data&&(r=Object.keys(t.data).map(function(e){return n.itemTemplate({label:e,value:t.data[e]})}).join(""));var i=n._tooltip.getElement().querySelectorAll(".i-role-content");i[0]&&(i[0].innerHTML=r);var a=n._tooltip.getElement().querySelectorAll(".i-role-exclude");if(a[0]){var o=t.data&&n._chart.getChartModelData().length>1;a[0].style.visibility=o?"visible":"hidden"}n._tooltip.show(t.event.pageX,t.event.pageY).updateSize()},this._hideTooltip=function(t){e=setTimeout(function(){n._tooltip.hide()},t?0:1e3)},this._tooltip.getElement().addEventListener("mouseover",function(t){clearTimeout(e)},!1),this._tooltip.getElement().addEventListener("mouseleave",function(t){n._hideTooltip(!0),n._blurSelection()},!1)},onRender:function(){var t=this;this._chart.select(function(t){return"COORDS.MAP"===t.config.type}).forEach(function(e){t._subscribeToPoints(e),t._subscribeToArea(e)})},template:['
','
','
','',"Exclude","
","
","
",'
'].join(""),itemTemplate:jt.template(['
','
<%=label%>
','
<%=value%>
',"
"].join("")),_exclude:function(){var t;this._chart.addFilter({tag:"exclude",predicate:(t=this._currData,function(e){return JSON.stringify(e)!==JSON.stringify(t)})}),this._chart.refresh()},_blurSelection:function(){this._chart.select(function(t){return"COORDS.MAP"===t.config.type}).forEach(function(t){t.fire("highlight-area",e)}),this._currNode=null,this._currData=null},_subscribeToPoints:function(t){var e=this;t.on("point-mouseover",function(t,n){e._showTooltip(n)}),t.on("point-mouseout",function(t,n){e._hideTooltip()})},_subscribeToArea:function(t){var e=this;!t.getScale("code").dim||t.on("area-click",function(n,r){var i,a;e._currNode=n,r.data?e._currData===r.data?(e._hideTooltip(!0),e._blurSelection()):(t.fire("highlight-area",(i=r.data,a=JSON.stringify(i),function(t){return JSON.stringify(t)===a})),e._showTooltip(r)):(e._showTooltip(r),e._hideTooltip(!1),e._blurSelection())})}}}r.default.api.plugins.add("geomap-tooltip",zt);var Bt=n(2),Vt=r.default.api.utils,Ht=r.default.api.pluginsSDK,Ut=Ht.tokens();function Wt(t){var e=Vt.defaults(t||{},{title:"Layers",label:"Layer Type",showPanel:!0,showLayers:!0,mode:"merge",axisWidth:45,layers:[]});e.layers.forEach(function(t){t.guide=Vt.defaults(t.guide||{},{scaleOrient:"left",textAnchor:"end",hide:!1})});var n=function(t){return function(e){return Object.assign(e,t)}},r={line:n({type:"ELEMENT.LINE"}),area:n({type:"ELEMENT.AREA"}),dots:n({type:"ELEMENT.POINT"}),scatterplot:n({type:"ELEMENT.POINT"}),bar:n({type:"ELEMENT.INTERVAL"}),"stacked-bar":n({type:"ELEMENT.INTERVAL",stack:!0})};return{init:function(t){this._chart=t;var n=Ht.spec(this._chart.getSpec()),r=this.checkIfApplicable(n);if(this._isApplicable=0===r.length,n.addTransformation("defined-only",function(t,e){var n=e.key;return t.filter(function(t){return null!==t[n]&&void 0!==t[n]})}),this._isApplicable){this.isFacet=this.checkIsFacet(n),this.primaryY=this.findPrimaryLayer(n);var i=this.getLayersText(),a=this.getLayersGroup(),o=e.label;this.fieldColorScale=o,n.setSettings("excludeNull",!1).setSettings("fitModel",null).addScale(o,{type:"color",source:"/",dim:o,brewer:e.brewer}).addTransformation("slice-layer",function(t,e){var n=e.key,r=e.group;return r?t.filter(function(t){var e=t[r],n=t[e];return e&&null!==n&&void 0!==n}):t.filter(function(t){return t[o]===i[n]&&null!==t[n]&&void 0!==t[n]})});var s=[this.primaryY].concat(e.layers).reduce(function(t,e){return t.concat(e.y)},[]);t.setupChartSourceModel(function(t){var e={};e[o]={type:"category"};var n={"/":{dims:e,data:[]}};return n["/"].dims=Object.assign(e,t["/"].dims),n["/"].data=t["/"].data.reduce(function(t,e){return t.concat(s.map(function(t){var n={};n[o]=i[t];var r=a[t];return r&&(n[r]=e[t],n.subLayer=r),Object.assign(n,e)}))},[]),Object.assign(n,Vt.omit(t,"/"))}),e.showPanel&&(this._container=t.insertToRightSidebar(this.containerTemplate),this._container.classList.add("applicable-true"),this.uiChangeEventsDispatcher=function(t){var n=t.target,r=n.classList;r.contains("i-role-show-layers")&&(e.showLayers=n.checked),r.contains("i-role-change-mode")&&(e.mode=n.value),this._chart.refresh()}.bind(this),this._container.addEventListener("change",this.uiChangeEventsDispatcher,!1))}else{n.getSettings("log")("[layers plugin]: is not applicable. "+r.join(" / "))}},getLayersText:function(){return[this.primaryY].concat(e.layers).reduce(function(t,e){return(Array.isArray(e.y)?e.y:[e.y]).reduce(function(t,n){return t[n]=this.extractLabelForKey(e,n),t}.bind(this),t)}.bind(this),{})},getLayersGroup:function(){return[this.primaryY].concat(e.layers).reduce(function(t,e){var n=null;return Array.isArray(e.y)&&(n=e.y.join(", ")),Vt.flatten([e.y]).reduce(function(t,e){return t[e]=n,t},t)}.bind(this),{})},checkIsFacet:function(t){return t.unit().reduce(function(t,e,n){return t||(n&&"COORDS.RECT"===n.type&&"COORDS.RECT"===e.type?t=!0:t)},!1)},checkIfApplicable:function(t){return t.unit().reduce(function(e,n,r){if(r&&"COORDS.RECT"!==r.type)return e.concat("Chart specification contains non-rectangular coordinates");if(r&&"COORDS.RECT"===r.type&&"COORDS.RECT"!==n.type){var i=t.getScale(n.y);if("measure"!==t.getSourceDim(i.source,i.dim).type)return e.concat("Y scale is not a measure")}return e},[])},isLeafElement:function(t,e){return e&&"COORDS.RECT"===e.type&&"COORDS.RECT"!==t.type},isFirstCoordNode:function(t,e){return!e&&t&&"COORDS.RECT"===t.type},isFinalCoordNode:function(t,e){return t&&"COORDS.RECT"===t.type&&t.units.every(function(t){return"COORDS.RECT"!==t.type})},buildLayersLayout:function(t){return t.regSource("$",{dims:{x:{type:"category"},y:{type:"category"}},data:[{x:1,y:1}]}).addScale("xLayoutScale",{type:"ordinal",source:"$",dim:"x"}).addScale("yLayoutScale",{type:"ordinal",source:"$",dim:"y"}).unit({type:"COORDS.RECT",x:"xLayoutScale",y:"yLayoutScale",expression:{source:"$",inherit:!1,operator:!1},guide:{showGridLines:"",x:{cssClass:"facet-axis"},y:{cssClass:"facet-axis"}}})},findPrimaryLayer:function(t){var e=this,n=t.unit().reduce(function(n,r){return n.concat(e.isFinalCoordNode(r)?{y:t.getScale(r.y).dim,isPrimary:!0,guide:r.guide.y,scaleName:r.y}:[])},[]);return Ht.cloneObject(n[0])},createPrimaryUnitReducer:function(t,n,r,i){var a=this;return function(o,s,u){var l=function(t){return!0!==t.guide.hide};if(a.isFacet&&a.isFirstCoordNode(s,u)){s.guide.y.label=s.guide.y.label||{};var c=s.guide.y.label._original_text||s.guide.y.label.text;s.guide.y.label.text=[c,n.filter(l).map(a.extractLayerLabel.bind(a)).join(", ")].join(t.getSettings("facetLabelDelimiter")),"dock"===e.mode&&(s.guide.y.label.padding-=15,s.guide.y.padding+=15,s.guide.y.rotate=-90,s.guide.y.textAnchor="middle")}return a.isLeafElement(s,u)&&(u.units=u.units.filter(function(t){return t!==s})),a.isFinalCoordNode(s)&&(s.guide.y.label=s.guide.y.label||{},"dock"===e.mode&&(s.guide.padding.l=r,s.guide.padding.r=i,s.guide.y.hide=!0),"merge"===e.mode&&(s.guide.y.label.text=a.isFacet?"":n.filter(l).map(a.extractLayerLabel.bind(a)).join(", "))),o}},createSecondaryUnitReducer:function(t,n,i,a,o,s,u,l){var c=this,h=c.getScaleName(n.scaleName||n.y),d=n.guide.scaleOrient,f=Array.isArray(n.y),p=n.isPrimary;return function(g,m,y){if(c.isFacet&&c.isFirstCoordNode(m,y)&&(m.guide.y.label.text="",m.guide.x.hide=!0,m.guide.y.hide=!0),c.isLeafElement(m,y)){(n.type?r[n.type]:function(t){return t})(m),m.y=h;var v=t.getScale(m.size).dim;if(p&&v);else{var b="size_null"+l;t.addScale(b,{type:"size",source:"?",mid:1}),m.size=b}var x=t.getScale(m.color).dim;p&&x||(m.color=c.fieldColorScale,m.expression.operator="groupBy",m.expression.params=f?["subLayer"]:[c.fieldColorScale]);var _=f?{group:"subLayer"}:{key:n.y};Ht.unit(m).addTransformation("slice-layer",_)}if(c.isFinalCoordNode(m)){if(m.y=h,m.guide.y=Object.assign(m.guide.y,n.guide||{}),m.guide.y.label=m.guide.y.label||{},m.guide.y.label.text=c.extractLayerLabel(n),m.guide.x.hide=!0,"dock"===e.mode){m.guide.showGridLines="",m.guide.padding.l=i,m.guide.padding.r=a,m.guide.y.label.textAnchor="end",m.guide.y.label.dock="right",m.guide.y.label.padding="right"===d?1:-10,m.guide.y.label.cssClass="label inline";var w="right"===d?u:s;m.guide.y.padding+=o*w}"merge"===e.mode&&(m.guide.showGridLines="",m.guide.y.hide=!0)}return g}},getScaleName:function(t){return Array.isArray(t)?t.join(", "):t},extractLabelForKey:function(t,e){var n=t.guide||{};n.label="string"==typeof n.label?{text:n.label}:n.label;var r=n.label||{},i=r.byKeys||{};return Array.isArray(t.y)?i[e]||e:r.text||r._original_text||t.y},extractLayerLabel:function(t){var e=this;return(Array.isArray(t.y)?t.y:[t.y]).map(function(n){return e.extractLabelForKey(t,n)}).join(", ")},onSpecReady:function(t,n){var r=this,i=Ht.spec(n);if(e.showLayers&&r._isApplicable){i=e.layers.reduce(function(t,e){var n=r.getScaleName(e.y);return t.addScale(n,Object.assign({type:"linear",source:"/",dim:n,autoScale:!0},Vt.pick(e.guide||{},"min","max","autoScale","nice","niceInterval")))},i);var a,o=[this.primaryY].concat(e.layers).sort(function(t,e){return(t.guide.zIndex||0)-(e.guide.zIndex||0)}),s=i.unit(),u=e.axisWidth,l=function(t){return function(e){var n=e.guide.scaleOrient||"left";return!0!==e.guide.hide&&n===t}},c=l("left"),h=l("right"),d=o.filter(c).length*u,f=o.filter(h).length*u,p=r.buildLayersLayout(i).addFrame({key:{x:1,y:1},units:[(a=Ht.unit(s.clone())).reduce(r.createPrimaryUnitReducer(i,o,d,f),a).value()]}),g=-1,m=-1;o.reduce(function(t,e,n){return g=c(e)?g+1:g,m=h(e)?m+1:m,t.addFrame({key:{x:1,y:1},units:[(a=Ht.unit(s.clone())).reduce(r.createSecondaryUnitReducer(i,e,d,f,u,g,m,n),a).value()]})},p)}else i.unit().traverse(function(t,e){r.isLeafElement(t,e)&&Ht.unit(t).addTransformation("defined-only",{key:i.getScale(t.y).dim})})},onUnitsStructureExpanded:function(){var t=this;if(t._isApplicable&&"merge"===e.mode){var n=Ht.spec(t._chart.getSpec()),r=t.primaryY.scaleName,i=e.layers.map(function(e){return t.getScaleName(e.y)}).filter(function(t){return n.getScale(t)}).concat(r),a=i.reduce(function(e,n){var r=t._chart.getScaleInfo(n);return e[n]=r.domain().filter(function(t){return Number.isFinite(t)}),e},{}),o=Bt.extent(Vt.flatten(Object.keys(a).map(function(t){return a[t]})));i.forEach(function(t){var e=n.getScale(t);e.min=o[0],e.max=o[1],e.nice=!1})}},containerTemplate:'
',template:Vt.template(['","
",'","
"].join("")),onRender:function(){this._isApplicable&&e.showPanel&&(this._container.innerHTML=this.template({title:e.title,mode:e.mode,showLayers:e.showLayers}))}}}r.default.api.plugins.add("layers",Wt);var Xt,Gt,qt=n(9),Yt=r.default.api.utils,$t=r.default.api.pluginsSDK,Kt=".tau-chart__legend__reset",Jt=".tau-chart__legend__item-color",Qt=".tau-chart__legend__guide--color__overlay",Zt=4,te=13,ee=0,ne=function(){return++ee},re=r.default.api.utils.xml,ie=function(t,e){var n=t[0],r=t[1],i=(r-n)/(e-1),a=Yt.range(e-2).map(function(t){return n+i*(t+1)});return[n].concat(a).concat(r)},ae=function(t,e,n){if(t.length<3)return t.slice(0);if(e<3)return[t[0],t[t.length-1]];var r,i=t[0]<0?Math.abs(t[0]):0,a=function(t){return t},o="sqrt"===n?function(t){return Math.sqrt(t+i)}:a,s="sqrt"===n?function(t){return Math.pow(t,2)-i}:a,u=[(t=t.map(o))[0]],l=t[t.length-1]-t[0],c=.5*l/(e-1),h=Yt.range(1,e-1).map(function(t){var n=l*t/(e-1);return{min:n-c,mid:n,max:n+c,diff:Number.MAX_VALUE,closest:null}}),d=0,f=function(){if(d!==h.length){var t=r;(r=h[d++]).min=Math.max(r.min,(t&&null!==t.closest?t.closest:u[0])+c)}};return f(),t.forEach(function(t){if(!(tr.max&&f();var e=Math.abs(t-r.mid);e0?Math.abs(e-t):n,a=se(i),o=Math.abs(r-a);return Math.abs(r)>3&&o<=3?ce:function(t){var e=se(n-t),r=Math.min((a<0?Math.abs(a):0)+(e0,o=this._fill.length>0,s=this._size.length>0;if(this._assignStaticBrewersOrEx(),i||o||s){switch(e.position){case"left":this._container=this._chart.insertToLeftSidebar(this._containerTemplate);break;case"right":this._container=this._chart.insertToRightSidebar(this._containerTemplate);break;case"top":this._container=this._chart.insertToHeader(this._containerTemplate);break;case"bottom":this._container=this._chart.insertToFooter(this._containerTemplate);break;default:this._container=this._chart.insertToRightSidebar(this._containerTemplate)}i&&(a(this._container,"click",Kt,function(t,e){this._toggleLegendItem(e,"reset")}.bind(this)),a(this._container,"click",Jt,function(t,e){var n=t.ctrlKey||t.target.matches(Qt)?"leave-others":"focus-single";this._toggleLegendItem(e,n)}.bind(this)),a(this._container,"mouseover",Jt,function(t,e){this._highlightToggle(e,!0)}.bind(this)),a(this._container,"mouseout",Jt,function(t,e){this._highlightToggle(e,!1)}.bind(this)))}},destroy:function(){var t=this._currentFilters,e=this._chart;Object.keys(t).forEach(function(n){return e.removeFilter(t[n])}),this._container&&this._container.parentElement&&(this._clearPanel(),this._container.parentElement.removeChild(this._container))},onSpecReady:function(t,n){this._formatters=$t.getFieldFormatters(n,e.formatters)},_getFormat:function(t){return this._formatters[t]?this._formatters[t].format:function(t){return String(t)}},onRender:function(){this._clearPanel(),this._drawColorLegend(),this._drawFillLegend(),this._drawSizeLegend()},_containerTemplate:'
',_template:Yt.template(['
',"<%=top%>",'
<%=name%>
',"<%=items%>","
"].join("")),_itemTemplate:Yt.template(["
\">",'
','
','
',"
","
","
",' <%=label%>',"
"].join("")),_resetTemplate:Yt.template(['
','
Reset
',"
"].join("")),_clearPanel:function(){this._container&&(clearTimeout(this._scrollTimeout),this._getScrollContainer().removeEventListener("scroll",this._scrollListener),this._container.innerHTML="")},_drawFillLegend:function(){var t=this;t._fill.forEach(function(e){var n,i,a,o=t._chart.select(function(t){return t.config.color===e})[0];if(o){var s=o.config.guide||{},u=o.getScale("color"),l=u.domain().sort(function(t,e){return t-e}),c=r(l),h=c?l.map(Number):l,d=he(h[0],h[h.length-1]),f=function(){var e=t._chart.getSpec(),n=$t.extractFieldsFormatInfo(e)[u.dim].format;return n||(n=function(t){return new Date(t)}),function(t){return String(n(t))}}(),p=c?f:d,g=u.brewer.length,m=((s.color||{}).label||{}).text||u.dim,y=function(t){return t.length*te*.618},v=u.isInteger?(h[1]-h[0])%3==0?4:(h[1]-h[0])%2==0?3:2:3,b=ie(h,v),x=(c?b.map(function(t){return new Date(t)}):b).map(p);x[0]===x[x.length-1]&&(x=[x[0]]),t._container.insertAdjacentHTML("beforeend",t._template({name:m,top:null,items:'
'}));var _=t._container.lastElementChild.querySelector(".tau-chart__legend__gradient-wrapper"),w=_.getBoundingClientRect().width,E=!1;x.reduce(function(t,e){return t+y(e)},0)>w&&(x.length>1&&y(x[0])+y(x[x.length-1])>w?E=!0:x=[x[0],x[x.length-1]]);var S=E?(a=-.382*te/2,{width:w,height:120,barX:0,barY:0,barWidth:20,barHeight:120,textAnchor:"start",textX:Yt.range(v).map(function(){return 25}),textY:1===x.length?60+.618*te:x.map(function(t,e){var n=(x.length-1-e)/(x.length-1);return te*(1-n)+120*n+a})}):(n=y(x[0])/2,i=y(x[x.length-1])/2,{width:w,height:28+te,barX:0,barY:0,barWidth:w,barHeight:20,textAnchor:"middle",textX:1===x.length?[w/2]:x.map(function(t,e){var r=e/(x.length-1);return n*(1-r)+(w-i)*r}),textY:Yt.range(v).map(function(){return 28+te})}),T=ie(h,g).map(function(t,e){return re("stop",{offset:e/(g-1)*100+"%",style:"stop-color:"+u(t)+';stop-opacity:1"'})}),M="legend-gradient-"+t.instanceId,C=re.apply(void 0,["svg",{class:"tau-chart__legend__gradient",width:S.width,height:S.height},re("defs",re.apply(void 0,["linearGradient",{id:M,x1:"0%",y1:E?"100%":"0%",x2:E?"0%":"100%",y2:"0%"}].concat(T))),re("rect",{class:"tau-chart__legend__gradient__bar",x:S.barX,y:S.barY,width:S.barWidth,height:S.barHeight,fill:"url(#"+M+")"})].concat(x.map(function(t,e){return re("text",{x:S.textX[e],y:S.textY[e],"text-anchor":S.textAnchor},t)})));_.insertAdjacentHTML("beforeend",C)}})},_drawSizeLegend:function(){var t=this;t._size.forEach(function(e){var n=t._chart.select(function(t){return t.config.size===e})[0];if(n){var r=n.config.guide||{},i=n.getScale("size"),a=i.domain().sort(function(t,e){return t-e});if(!Array.isArray(a)||!a.every(isFinite))return;var o=((r.size||{}).label||{}).text||i.dim,s=a[0],u=a[a.length-1],l=[s];if(u-s){var c=oe(u-s),h=Math.round(4-c),d=Math.pow(10,h),f=Yt.unique(t._chart.getDataSources({excludeFilter:["legend"]})[i.source].data.map(function(t){return t[i.dim]}).filter(function(t){return t>=s&&t<=u})).sort(function(t,e){return t-e}),p=ae(f,Zt,i.funcType);l=Yt.unique(p.map(function(t){return Math.round(t*d)/d}))}var g=he(l[0],l[l.length-1]),m=function(t){return t.length*te*.618};l.reverse();var y=l.map(i),v=Math.max.apply(null,y),b=l.map(g);t._container.insertAdjacentHTML("beforeend",t._template({name:o,top:null,items:'
'}));var x=t._container.lastElementChild.querySelector(".tau-chart__legend__size-wrapper"),_=x.getBoundingClientRect().width,w=!1;(Math.max.apply(null,b.map(m))>_/4||1===b.length)&&(w=!0);var E=w?function(){for(var t,e,n=te,r=y[0]/2,i=y[y.length-1]/2,a=[r],o=1;o0&&(t._updateResetButtonPosition(),t._scrollTimeout=null,t._scrollListener=function(){var e=t._container.querySelector(Kt);e.style.display="none",t._scrollTimeout&&clearTimeout(t._scrollTimeout),t._scrollTimeout=setTimeout(function(){t._updateResetButtonPosition(),e.style.display="",t._scrollTimeout=null},250)},t._getScrollContainer().addEventListener("scroll",t._scrollListener))},_toggleLegendItem:function(t,e){var n=this._currentFilters,r=t?Array.prototype.filter.call(t.parentNode.childNodes,function(t){return t.matches(Jt)}):null,a=function(t){var e=t.getAttribute("data-dim"),n=t.getAttribute("data-value");return{sid:t.getAttribute("data-scale-id"),dim:e,val:n,key:e+n}},o=function(t){return t in n},s=function(t,e){var r=a(t);if(o(r.key)===e)if(e){var s=n[r.key];delete n[r.key],t.classList.remove("disabled"),this._chart.removeFilter(s)}else{t.classList.add("disabled");var u=i(r.dim,r.val);n[r.key]=this._chart.addFilter({tag:"legend",predicate:function(t){return!u(t)}})}}.bind(this),u=function(e){return e===t},l=!!t&&o(a(t).key),c=function(t,e){t.querySelector(".tau-chart__legend__guide").style.backgroundColor=e?"":"transparent"};if("reset"===e)r.forEach(function(t){s(t,!0),c(t,!0)});else if("leave-others"===e)r.forEach(function(t){u(t)&&s(t,l)}),c(t,l);else if("focus-single"===e){var h=!l&&r.every(function(t){return u(t)||o(a(t).key)});r.forEach(function(t){var e=u(t)||h;s(t,e)}),l&&c(t,!0)}this._chart.refresh()},_highlightToggle:function(t,e){if(!t.matches(".disabled")){var n=t.getAttribute("data-dim"),r=t.getAttribute("data-value"),a=e?i(n,r):function(t){return null};this._chart.select(function(t){return!0}).forEach(function(t){t.fire("highlight",a)})}},_getScrollContainer:function(){return this._container.parentNode.parentNode},_updateResetButtonPosition:function(){this._container.querySelector(Kt).style.top=this._getScrollContainer().scrollTop+"px"},_generateColorMap:function(t,e){var n=e.length;return t.reduce(function(t,r,i){return t[r]=e[i%n],t},{})},_assignStaticBrewersOrEx:function(){var t=this;t._color.forEach(function(e){var n=t._chart.getSpec().scales[e],r=t._chart.getDataSources({excludeFilter:["legend"]}),i=t._chart.getScaleFactory(r).createScaleInfoByName(e).domain();if(!n.brewer||Array.isArray(n.brewer)){var a=n.brewer||Yt.range(20).map(function(t){return"color20-"+(1+t)});n.brewer=t._generateColorMap(i,a)}t._legendOrderState[e]=i.reduce(function(t,e,n){return t[e]=n,t},{})})}}}r.default.api.plugins.add("legend",de);var fe=r.default.api.utils;function pe(t){var e=fe.defaults(t||{},{verbose:!1,forceBrush:{}}),n={init:function(t){e.verbose&&(this.panel=t.insertToRightSidebar(this.template())),t.traverseSpec(t.getSpec(),function(t){t&&"COORDS.PARALLEL"===t.type&&(t.guide=t.guide||{},t.guide.enableBrushing=!0)}),n.forceBrush=e.forceBrush||{}},onRender:function(t){var r=t.getSpec().scales,i=Object.keys(r).reduce(function(t,e){var i=r[e].dim;return n.forceBrush[i]&&(t[e]=n.forceBrush[i]),t},{}),a=t.select(function(t){return"PARALLEL/ELEMENT.LINE"===t.config.type});a.forEach(function(t,r){t.parentUnit.on("brush",function(i,a){n.forceBrush={};var o=a.map(function(t){var e=t.dim,r=t.func,i=t.args;n.forceBrush[e]=i;var a=function(){return!0};return"between"===r&&(a=function(t){return t[e]>=i[0]&&i[1]>=t[e]}),"inset"===r&&(a=function(t){return i.indexOf(t[e])>=0}),a}),s=0;if(t.fire("highlight",function(t){var e=o.every(function(e){return e(t)});return s+=e?1:0,e}),e.verbose){var u=n.panel.getElementsByClassName("i-"+r);if(0===u.length){var l=document.createElement("div");l.className="i-"+r,n.panel.appendChild(l),u[0]=l}u[0].innerHTML=a.reduce(function(t,e){return t+"
"+e.dim+": ["+e.args.join(",")+"]
"},"
Matched: "+s+"
")}})}),a.forEach(function(t){t.parentUnit.fire("force-brush",i)})},template:fe.template('
')};return n}r.default.api.plugins.add("parallel-brushing",pe);var ge=r.default.api.utils;function me(t){ge.defaults(t||{},{});return{init:function(t){this._cursor=null,this._chart=t,this._tooltip=t.addBalloon({spacing:3,auto:!0,effectClass:"fade"}),this._tooltip.content(this.template),this._tooltip.getElement().addEventListener("click",function(t){for(var e=t.target;e!==t.currentTarget&&null!==e;)e.classList.contains("i-role-exclude")&&n._exclude(),e=e.parentNode;n._tooltip.hide()},!1);var e,n=this;this.showTooltip=function(t){clearTimeout(e),n._cursor=t.data;var r=n._tooltip.getElement().querySelectorAll(".i-role-content");r[0]&&(r[0].innerHTML=Object.keys(t.data).map(function(e){return n.itemTemplate({label:e,value:t.data[e]})}).join("")),n._tooltip.show(t.event.pageX,t.event.pageY).updateSize()},this.hideTooltip=function(t){e=setTimeout(function(){n._tooltip.hide()},1e3)},this._tooltip.getElement().addEventListener("mouseover",function(t){clearTimeout(e)},!1),this._tooltip.getElement().addEventListener("mouseleave",function(t){n._tooltip.hide()},!1)},_exclude:function(){var t;this._chart.addFilter({tag:"exclude",predicate:(t=this._cursor,function(e){return JSON.stringify(e)!==JSON.stringify(t)})}),this._chart.refresh()},onRender:function(t){var e=this;t.select(function(t){return"PARALLEL/ELEMENT.LINE"===t.config.type}).forEach(function(t){t.on("mouseout",function(t,n){e.hideTooltip(n)}),t.on("mouseover",function(t,n){e.showTooltip(n)})})},template:['
','
','
','',"Exclude","
","
","
",'
'].join(""),itemTemplate:ge.template(['
','
<%=label%>
','
<%=value%>
',"
"].join(""))}}r.default.api.plugins.add("parallel-tooltip",me);var ye=n(7),ve=n(3),be=n(8),xe=(Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?a:Object.keys(i.dims),this._applyImmediately=Boolean(t&&t.applyImmediately);var o=n._chart.getChartModelData();this._filtersContainer=n._chart.insertToRightSidebar(n._filtersContainer),this._filtersContainer.style.maxHeight="0px",n._fields.filter(function(t){var e="measure"===i.dims[t].type;return e||r.settings.log("The ["+t+"] isn't measure so Quick Filter plugin skipped it"),e}).forEach(function(t){n._data[t]=o.map(function(e){return e[t]}),n._bounds[t]=xe.extent(n._data[t]),n._filter[t]=n._bounds[t],n._filtersContainer.insertAdjacentHTML("beforeend",n._filterWrapper({name:t})),n._container[t]=n._filtersContainer.lastChild,n._drawFilter(t)})},onRender:function(){this._filtersContainer.style.maxHeight="none"},_filtersContainer:'
',_filterWrapper:_e.template('
<%=name%>
'),_drawFilter:function(t){var e=this._data[t],n=this._bounds[t],r=this._filter[t],i=_e.isDate(n[0])||_e.isDate(n[1]),a=this,o=0,s=24,u=21,l=12,c=180-l-s,h=41-o-u-8,d=xe.scaleLinear().domain(n).range([0,c]),p=xe.brushX().extent([[0,0],[c,20]]).on("start",function(){a._layout.style["overflow-y"]="hidden"}).on("brush",this._applyImmediately?E:w).on("end",function(){a._layout.style["overflow-y"]="",E()}),g=xe.select(this._container[t]).append("svg").attr("width",c+l+s).attr("height",h+o+u+4).append("g").attr("transform","translate("+l+","+o+")"),m=(g.append("g").selectAll("rect").data(e).enter().append("rect").attr("transform",function(t){return"translate("+d(t)+","+(o+4)+")"}).attr("height",h).attr("width",1),g.append("g").attr("class","brush").call(p));m.append("g").attr("class","resize e").attr("cursor","ew-resize").attr("pointer-events","none"),m.append("g").attr("class","resize w").attr("cursor","ew-resize").attr("pointer-events","none"),m.selectAll(".resize").append("line").attr("transform","translate(0, 0)").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",h+8),m.selectAll(".resize").append("text").attr("x",0).attr("y",2*(h+4)),m.selectAll("rect").attr("height",h+8);var y=g.append("text").attr("x",c/2).attr("y",2*(h+4)).attr("class","date-label"),v=function(t){return Math.log(t)/Math.LN10}(a._filter[t][1]-a._filter[t][0]),b=Math.round(3-v),x=Math.pow(10,b);if(i){var _=function(t){var e=t.findIndex(function(t){var e=xe.timeFormat(t);return e(new Date(n[0]))!==e(new Date(n[1]))});return e=e<0?t.length:e,{comm:t.slice(0,e),diff:t.slice(e)}}(["’%y"," %b","%d","%H",":%M",":%S"]);_.comm.length<3?(_.diff.splice(-3),_.diff.reverse(),_.comm.reverse()):(_.comm.length<5&&_.diff.pop(),_.diff=_.comm.splice(3,_.comm.length-3).concat(_.diff),_.comm.reverse())}function w(){var e=f.event;if(e&&Array.isArray(e.selection)){var n=e.selection.map(d.invert);r=n,a._filter[t]=n}else r=a._filter[t];var o=i?new Date(r[0]).getTime():r[0],s=i?new Date(r[1]).getTime():r[1],u=Math.round(parseFloat(o)*x)/x,l=Math.round(parseFloat(s)*x)/x;m.select(".handle--w"),m.select(".handle--e");m.select(".resize.w").attr("transform","translate("+d(r[0])+",0)"),m.select(".resize.e").attr("transform","translate("+d(r[1])+",0)");var c=m.selectAll(".w text"),h=m.selectAll(".e text");if(i){var p=xe.timeFormat(_.comm.join("")),g=xe.timeFormat(_.diff.join(""));y.html(g(new Date(u))+" .. "+g(new Date(l))+' '+p(new Date(l))+"")}else c.text(u),h.text(l)}function E(){w(),a._applyFilter(t)}E(),p.move(m,r.map(d))},destroy:function(){var t=this._currentFilters,e=this._chart;Object.keys(t).forEach(function(n){return e.removeFilter(t[n])});var n;(n=this._filtersContainer)&&n.parentElement&&n.parentElement.removeChild(n)},_applyFilter:function(t){var e=this._currentFilters,n=function(t,e,n){return function(r){var i=r[t];return in}}(t,this._filter[t][0],this._filter[t][1]),r=e[t];delete e[t],this._chart.removeFilter(r),e[t]=this._chart.addFilter({tag:"quick-filter",predicate:function(t){return!n(t)}}),we<0?this._chart.refresh():(this._refreshRequestId&&clearTimeout(this._refreshRequestId),this._refreshRequestId=setTimeout(function(){this._refreshRequestId=null,this._chart.refresh()}.bind(this),we))}}}r.default.api.plugins.add("quick-filter",Ee);var Se=r.default.api.utils;function Te(t){var e=Se.defaults(t||{},{show:!0,modes:["normal","entire-view","fit-width","fit-height","minimal"]});return{init:function(t){e.show&&(e.selectedMode=t.getSpec().settings.fitModel,t.insertToHeader(this.template({modes:e.modes.map(function(t){return""})})).addEventListener("change",function(n){var r=n.target;r.classList.contains("i-role-fit-model")&&(e.selectedMode=r.value,t.getSpec().settings.fitModel=e.selectedMode,t.refresh())},!1))},template:Se.template(['
',"
"," View Mode: ",' ","
","
"].join(""))}}r.default.api.plugins.add("settings",Te);function Me(t){return new V(t)}r.default.api.plugins.add("tooltip",Me);var Ce,ke=(Ce={linear:function(t){for(var e=[0,0,0,0,0],n=0,r=[];nMath.abs(t[n][a])&&(a=r);for(i=n;i=n;i--)t[i][r]-=t[i][n]*t[n][r]/t[n][n]}for(r=s-1;r>=0;r--){for(o=0,i=r+1;i=0;s--)m+=s>1?Math.round(100*f[s])/100+"x^"+s+" + ":1==s?Math.round(100*f[s])/100+"x + ":Math.round(100*f[s])/100;return{equation:f,points:i,string:m}},lastvalue:function(t){for(var e=[],n=null,r=0;r0&&ot[o]-t[s]?a:o;for(var c=Math.abs(1/(t[u]-l)),h=0,d=0,f=0,p=0,g=0,m=a;m<=o;){var y=t[m],v=e[m],b=r((m1&&(a||s)&&(d=[d[0],d[d.length-1]]),t.concat(d.length>1?d:[])},[])},t.traverseSpec(n,function(t,r){if(i.predicateIsApplicable(n,t,r)){var a=n.scales[t.x],o=n.scales[t.y],s=n.scales[t.color]||{},u=JSON.parse(JSON.stringify(t));u.type="ELEMENT.LINE",u.size="size_null",u.namespace="trendline",u.transformation=u.transformation||[],u.transformation.push({type:"regression",args:{type:e.type,x:a,y:o,g:s}});u.guide=Ae.defaults({},u.guide||{}),u.guide.interpolate="linear",u.guide.showAnchors="never",u.guide.cssClass="tau-chart__trendline",u.guide.widthCssClass="tau-chart__line-width-1",u.guide.x=u.guide.x||{},u.guide.x.fillGaps=!1,delete u.guide.label,delete u.label,r.units.push(u)}})}},containerTemplate:'
',template:Ae.template(['","
",'","
",'
<%= error %>
'].join("")),onRender:function(t){if(this._container){this._container.innerHTML=this.template({title:"Trend line",error:this._error,showTrend:e.showTrend&&this._isApplicable?"checked":"",models:e.models.map(function(t){return""})});var n=function(t){return function(){f.select(this).classed({active:t,"tau-chart__line-width-1":!t,"tau-chart__line-width-3":t})}};f.select(t.getSVG()).selectAll(".tau-chart__trendline").on("mouseenter",n(!0)).on("mouseleave",n(!1))}}}}r.default.api.plugins.add("trendline",Oe);n.d(e,"GPL",function(){return Pe}),n.d(e,"Plot",function(){return Ne}),n.d(e,"Chart",function(){return Le}),n.d(e,"api",function(){return Re}),n.d(e,"version",function(){return De});var Pe=r.default.GPL,Ne=r.default.Plot,Le=r.default.Chart,Re=r.default.api,De=r.default.version},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(a).concat([i]).join("\n")}var o;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i>q,D[m+1]=b*G>>q,D[m+2]=x*G>>q,D[m+3]=_*G>>q,v-=w,b-=E,x-=S,_-=T,w-=W.r,E-=W.g,S-=W.b,T-=W.a,p=y+((p=h+s+1)>q,D[p+1]=b*G>>q,D[p+2]=x*G>>q,D[p+3]=_*G>>q,v-=w,b-=E,x-=S,_-=T,w-=W.r,E-=W.g,S-=W.b,T-=W.a,p=h+((p=d+z)>U,P[m+1]=b*H>>U,P[m+2]=x*H>>U,v-=_,b-=w,x-=E,_-=B.r,w-=B.g,E-=B.b,p=y+((p=h+s+1)>U,P[p+1]=b*H>>U,P[p+2]=x*H>>U,v-=_,b-=w,x-=E,_-=B.r,w-=B.g,E-=B.b,p=h+((p=d+D)255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n},this.getHelpXML=function(){for(var t=new Array,n=0;n "+c.toRGB()+" -> "+c.toHex());l.appendChild(h),l.appendChild(d),u.appendChild(l)}catch(t){}return u}}void 0===(r=function(){return a}.call(e,n,e,t))||(t.exports=r),i.RGBColor=a}("undefined"!=typeof window?window:this)},function(t,e,n){t.exports=n(21)}])}); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-000.js b/examples/dev-quick-test/ex-000.js index 70ef73501..cad3f3d0b 100644 --- a/examples/dev-quick-test/ex-000.js +++ b/examples/dev-quick-test/ex-000.js @@ -34,11 +34,10 @@ dev.spec({ row['ABS(count)'] = Math.abs(row.count); row['z'] = Math.random() * 10; return row; - }) - .reverse(), + }), plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'count', @@ -91,8 +90,8 @@ dev.spec({ }, []), plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'x', @@ -147,8 +146,8 @@ dev.spec({ }), plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'x', @@ -220,10 +219,10 @@ dev.spec({ }), plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('trendline')({showPanel: false}), - tauCharts.api.plugins.get('exportTo')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('trendline')({showPanel: false}), + Taucharts.api.plugins.get('export-to')() ] }); @@ -302,14 +301,14 @@ dev.spec({ }, plugins: [ - tauCharts.api.plugins.get('parallel-brushing')({ + Taucharts.api.plugins.get('parallel-brushing')({ forceBrush: { hp: [150, 200] } }), - tauCharts.api.plugins.get('parallel-tooltip')(), - tauCharts.api.plugins.get('geomap-legend')(), - tauCharts.api.plugins.get('exportTo')() + Taucharts.api.plugins.get('parallel-tooltip')(), + Taucharts.api.plugins.get('geomap-legend')(), + Taucharts.api.plugins.get('export-to')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-001.js b/examples/dev-quick-test/ex-001.js index ad5613fb2..424c0e8f6 100644 --- a/examples/dev-quick-test/ex-001.js +++ b/examples/dev-quick-test/ex-001.js @@ -42,10 +42,10 @@ dev.spec({ }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() // , - // tauCharts.api.plugins.get('settings')() + // Taucharts.api.plugins.get('settings')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-002.js b/examples/dev-quick-test/ex-002.js index d639bfdfa..ba4a551c6 100644 --- a/examples/dev-quick-test/ex-002.js +++ b/examples/dev-quick-test/ex-002.js @@ -35,8 +35,8 @@ dev.spec({ }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('settings')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('settings')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-003.js b/examples/dev-quick-test/ex-003.js index 874da589e..ec552cf58 100644 --- a/examples/dev-quick-test/ex-003.js +++ b/examples/dev-quick-test/ex-003.js @@ -10,8 +10,8 @@ dev.spec({ "effort": {"type": "measure"} }, plugins: [ - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('tooltip')({fields: ['team', 'count', 'month']}) + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('tooltip')({fields: ['team', 'count', 'month']}) ], data: [ { diff --git a/examples/dev-quick-test/ex-004.js b/examples/dev-quick-test/ex-004.js index b174f089d..400860d57 100644 --- a/examples/dev-quick-test/ex-004.js +++ b/examples/dev-quick-test/ex-004.js @@ -28,6 +28,6 @@ dev.spec({ }), plugins: [ - tauCharts.api.plugins.get('settings')() + Taucharts.api.plugins.get('settings')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-005.js b/examples/dev-quick-test/ex-005.js index 73bfefe84..89303b8fe 100644 --- a/examples/dev-quick-test/ex-005.js +++ b/examples/dev-quick-test/ex-005.js @@ -41,7 +41,7 @@ dev.spec({ }, plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-007.js b/examples/dev-quick-test/ex-007.js index 578bc60a9..fe79e3348 100644 --- a/examples/dev-quick-test/ex-007.js +++ b/examples/dev-quick-test/ex-007.js @@ -101,8 +101,8 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['complex','date','simple','colorValue','sizeValue']}), - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('tooltip')({fields:['complex','date','simple','colorValue','sizeValue']}), + Taucharts.api.plugins.get('legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-008.js b/examples/dev-quick-test/ex-008.js index 208d74229..90e201bc6 100644 --- a/examples/dev-quick-test/ex-008.js +++ b/examples/dev-quick-test/ex-008.js @@ -13,8 +13,8 @@ dev.spec({ sourcemap: './../src/addons/world-countries.json' }, plugins: [ - tauCharts.api.plugins.get('geomap-tooltip')(), - tauCharts.api.plugins.get('geomap-legend')() + Taucharts.api.plugins.get('geomap-tooltip')(), + Taucharts.api.plugins.get('geomap-legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-009.js b/examples/dev-quick-test/ex-009.js index 14014057c..89d5b4b6c 100644 --- a/examples/dev-quick-test/ex-009.js +++ b/examples/dev-quick-test/ex-009.js @@ -12,8 +12,8 @@ dev.spec({ sourcemap: './../src/addons/uk-subunits-places.json' }, plugins: [ - tauCharts.api.plugins.get('geomap-tooltip')(), - tauCharts.api.plugins.get('geomap-legend')() + Taucharts.api.plugins.get('geomap-tooltip')(), + Taucharts.api.plugins.get('geomap-legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-011.js b/examples/dev-quick-test/ex-011.js index 474b70c20..25640ed18 100644 --- a/examples/dev-quick-test/ex-011.js +++ b/examples/dev-quick-test/ex-011.js @@ -22,8 +22,8 @@ dev.spec({ {state: 'co', population: 1250} ], plugins: [ - tauCharts.api.plugins.get('geomap-tooltip')(), - tauCharts.api.plugins.get('geomap-legend')() + Taucharts.api.plugins.get('geomap-tooltip')(), + Taucharts.api.plugins.get('geomap-legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-013.js b/examples/dev-quick-test/ex-013.js index 6801d054a..1a15f0b10 100644 --- a/examples/dev-quick-test/ex-013.js +++ b/examples/dev-quick-test/ex-013.js @@ -12,14 +12,14 @@ dev.spec({ ], color: 'year', plugins: [ - tauCharts.api.plugins.get('parallel-brushing')({ + Taucharts.api.plugins.get('parallel-brushing')({ forceBrush: { year: [80, 81] } }), - tauCharts.api.plugins.get('parallel-tooltip')() + Taucharts.api.plugins.get('parallel-tooltip')() , - tauCharts.api.plugins.get('geomap-legend')() + Taucharts.api.plugins.get('geomap-legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-016.js b/examples/dev-quick-test/ex-016.js index d6fec7aaf..16d27bf18 100644 --- a/examples/dev-quick-test/ex-016.js +++ b/examples/dev-quick-test/ex-016.js @@ -51,8 +51,8 @@ dev.spec({ ], plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('settings')() + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('settings')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-018.js b/examples/dev-quick-test/ex-018.js index 60b41057f..e48adcd75 100644 --- a/examples/dev-quick-test/ex-018.js +++ b/examples/dev-quick-test/ex-018.js @@ -42,8 +42,8 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('tooltip')({fields:['count']}) + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('tooltip')({fields:['count']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-019.js b/examples/dev-quick-test/ex-019.js index e583cdf49..c9486234c 100644 --- a/examples/dev-quick-test/ex-019.js +++ b/examples/dev-quick-test/ex-019.js @@ -51,7 +51,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-020.js b/examples/dev-quick-test/ex-020.js index a5af9af48..47ec5f202 100644 --- a/examples/dev-quick-test/ex-020.js +++ b/examples/dev-quick-test/ex-020.js @@ -51,7 +51,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-021.js b/examples/dev-quick-test/ex-021.js index a5af9af48..47ec5f202 100644 --- a/examples/dev-quick-test/ex-021.js +++ b/examples/dev-quick-test/ex-021.js @@ -51,7 +51,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-022.js b/examples/dev-quick-test/ex-022.js index 4a4a5c204..d6f538907 100644 --- a/examples/dev-quick-test/ex-022.js +++ b/examples/dev-quick-test/ex-022.js @@ -37,7 +37,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-023.js b/examples/dev-quick-test/ex-023.js index c8b07f62b..5f68394c8 100644 --- a/examples/dev-quick-test/ex-023.js +++ b/examples/dev-quick-test/ex-023.js @@ -41,9 +41,9 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}), - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}), + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-024.js b/examples/dev-quick-test/ex-024.js index ff2e6eef0..0a9d17926 100644 --- a/examples/dev-quick-test/ex-024.js +++ b/examples/dev-quick-test/ex-024.js @@ -39,7 +39,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort', 'priorityName', 'severity']}) + Taucharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort', 'priorityName', 'severity']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-025.js b/examples/dev-quick-test/ex-025.js index 95db6e398..cc8cdef20 100644 --- a/examples/dev-quick-test/ex-025.js +++ b/examples/dev-quick-test/ex-025.js @@ -39,7 +39,7 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort', 'priorityName', 'severity']}) + Taucharts.api.plugins.get('tooltip')({fields:['team', 'project', 'cycleTime', 'effort', 'priorityName', 'severity']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-026.js b/examples/dev-quick-test/ex-026.js index 34be39add..86b724881 100644 --- a/examples/dev-quick-test/ex-026.js +++ b/examples/dev-quick-test/ex-026.js @@ -42,8 +42,8 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-027.js b/examples/dev-quick-test/ex-027.js index 568279166..472ea4555 100644 --- a/examples/dev-quick-test/ex-027.js +++ b/examples/dev-quick-test/ex-027.js @@ -42,8 +42,8 @@ dev.spec({ } }, plugins: [ - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}) + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('tooltip')({fields: ['team', 'project', 'cycleTime', 'effort']}) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-030.js b/examples/dev-quick-test/ex-030.js index c520c14da..082f6956c 100644 --- a/examples/dev-quick-test/ex-030.js +++ b/examples/dev-quick-test/ex-030.js @@ -593,8 +593,8 @@ dev.spec({ plugins: [ - tauCharts.api.plugins.get('quick-filter')(), - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('quick-filter')(), + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-031.js b/examples/dev-quick-test/ex-031.js index 9b9510de2..3a80fa3bd 100644 --- a/examples/dev-quick-test/ex-031.js +++ b/examples/dev-quick-test/ex-031.js @@ -6089,7 +6089,7 @@ dev.spec({ } ], plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('quick-filter')(['CycleTime', 'EndDate']) + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('quick-filter')(['CycleTime', 'EndDate']) ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-040.js b/examples/dev-quick-test/ex-040.js index 32d7e0731..3f86e351c 100644 --- a/examples/dev-quick-test/ex-040.js +++ b/examples/dev-quick-test/ex-040.js @@ -58,7 +58,7 @@ dev.spec({ excludeNull: false }, plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ // mode: 'dock', showPanel: true, layers: [ @@ -82,7 +82,7 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'sin', @@ -93,15 +93,15 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('quick-filter')() + Taucharts.api.plugins.get('quick-filter')() , - tauCharts.api.plugins.get('trendline')() + Taucharts.api.plugins.get('trendline')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-041.js b/examples/dev-quick-test/ex-041.js index 374c3f40c..46bf49524 100644 --- a/examples/dev-quick-test/ex-041.js +++ b/examples/dev-quick-test/ex-041.js @@ -11,7 +11,7 @@ dev.spec({ x: ['x'], y: ['total'], plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ showPanel: true, layers: [ { @@ -26,10 +26,10 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('trendline')() + Taucharts.api.plugins.get('trendline')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-043.js b/examples/dev-quick-test/ex-043.js index 2fc6468fa..87403ad0d 100644 --- a/examples/dev-quick-test/ex-043.js +++ b/examples/dev-quick-test/ex-043.js @@ -49,7 +49,7 @@ dev.spec({ x: ['x'], y: ['followers'], plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ showPanel: true, layers: [ { @@ -64,9 +64,9 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-044.js b/examples/dev-quick-test/ex-044.js index 70b498932..2d28de7f1 100644 --- a/examples/dev-quick-test/ex-044.js +++ b/examples/dev-quick-test/ex-044.js @@ -51,7 +51,7 @@ dev.spec({ y: ['followers'], color: 'z', plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ mode: 'dock', showPanel: true, layers: [ @@ -75,8 +75,8 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-045.js b/examples/dev-quick-test/ex-045.js index 30ff1b5f9..4a9ed702f 100644 --- a/examples/dev-quick-test/ex-045.js +++ b/examples/dev-quick-test/ex-045.js @@ -17,7 +17,7 @@ dev.spec({ x: ['x'], y: ['z', 'followers'], plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ mode: 'dock', showPanel: true, layers: [ @@ -41,8 +41,8 @@ dev.spec({ ] }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-046.js b/examples/dev-quick-test/ex-046.js index 15b66f8db..aaed4329c 100644 --- a/examples/dev-quick-test/ex-046.js +++ b/examples/dev-quick-test/ex-046.js @@ -75,7 +75,7 @@ dev.spec({ y: ['followers'], plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ mode: 'dock', showPanel: true, brewer: { @@ -83,7 +83,7 @@ dev.spec({ "reposts": 'color20-7', "comments": 'color20-9', "Followers": 'color20-2', - "followersNoneData": 'color20-3 graphical-report__trendline' + "followersNoneData": 'color20-3 tau-chart__trendline' }, layers: [ { @@ -113,8 +113,8 @@ dev.spec({ }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-047.js b/examples/dev-quick-test/ex-047.js index d1ff9e6ae..0e7677314 100644 --- a/examples/dev-quick-test/ex-047.js +++ b/examples/dev-quick-test/ex-047.js @@ -76,7 +76,7 @@ dev.spec({ color: 'fc', plugins: [ - tauCharts.api.plugins.get('layers')({ + Taucharts.api.plugins.get('layers')({ mode: 'dock', showPanel: true, brewer: { @@ -99,9 +99,9 @@ dev.spec({ }) , - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() , - tauCharts.api.plugins.get('tooltip')({ + Taucharts.api.plugins.get('tooltip')({ formatters: { //'x': '(%Y-%d-%b)', 'x': 'month', diff --git a/examples/dev-quick-test/ex-048.js b/examples/dev-quick-test/ex-048.js index 741e15a3b..b52fed1da 100644 --- a/examples/dev-quick-test/ex-048.js +++ b/examples/dev-quick-test/ex-048.js @@ -52,16 +52,16 @@ dev.spec({ }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')({ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')({ aggregationGroupFields: ['x1', 'y1', 'size'] }), - tauCharts.api.plugins.get('trendline')({showPanel: false}), - tauCharts.api.plugins.get('exportTo')({ + Taucharts.api.plugins.get('trendline')({showPanel: false}), + Taucharts.api.plugins.get('export-to')({ cssPaths: [ - '../build/development/css/tauCharts.default.css', - '../build/development/plugins/tauCharts.trendline.css' + '../build/development/css/Taucharts.default.css', + '../build/development/plugins/Taucharts.trendline.css' ], appendFields: [ @@ -74,7 +74,7 @@ dev.spec({ } ] }), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'y1', @@ -102,7 +102,7 @@ dev.spec({ , { dim: 'x1', - val: tauCharts.api.tickPeriod.get('month').cast(1420092000000), + val: Taucharts.api.tickPeriod.get('month').cast(1420092000000), text: 'Build 33', position: 'front', color: 'green' @@ -114,8 +114,8 @@ dev.spec({ //val: '1425189600000', //val: ["\/Date(1430456400000-0500)\/", "\/Date(1433134800000-0500)\/"], val: [ - tauCharts.api.tickPeriod.get('month').cast(new Date('2016-05-01')), - tauCharts.api.tickPeriod.get('month').cast(new Date('2016-07-01')) + Taucharts.api.tickPeriod.get('month').cast(new Date('2016-05-01')), + Taucharts.api.tickPeriod.get('month').cast(new Date('2016-07-01')) ], text: 'Build 33', position: 'front', @@ -126,8 +126,8 @@ dev.spec({ dim: 'x1', val: ["\/Date(1430456400000-0500)\/", "\/Date(1433134800000-0500)\/"], //val: [ - // tauCharts.api.tickPeriod.get('month').cast(new Date('2016-05-01')), - // tauCharts.api.tickPeriod.get('month').cast(new Date('2016-07-01')) + // Taucharts.api.tickPeriod.get('month').cast(new Date('2016-05-01')), + // Taucharts.api.tickPeriod.get('month').cast(new Date('2016-07-01')) //], text: 'Build 55', position: 'front', @@ -320,7 +320,7 @@ dev.spec({ "id": "89367", "type": "Feature", "orderingValue": null, - "data": {"id": 89367, "name": "Charting Engine (taucharts) MVF", "type": "Feature"}, + "data": {"id": 89367, "name": "Charting Engine (Taucharts) MVF", "type": "Feature"}, "coords": { "x1": "\/Date(1422770400000-0600)\/", "y1": 63.0000, diff --git a/examples/dev-quick-test/ex-050.js b/examples/dev-quick-test/ex-050.js index de1da67f8..db4697e7f 100644 --- a/examples/dev-quick-test/ex-050.js +++ b/examples/dev-quick-test/ex-050.js @@ -20,6 +20,6 @@ dev.spec({ }; }), plugins: [ - tauCharts.api.plugins.get('legend')() + Taucharts.api.plugins.get('legend')() ] }); \ No newline at end of file diff --git a/examples/dev-quick-test/ex-051.js b/examples/dev-quick-test/ex-051.js index 61e737fc5..dfa905465 100644 --- a/examples/dev-quick-test/ex-051.js +++ b/examples/dev-quick-test/ex-051.js @@ -145,8 +145,8 @@ dev.spec({ layoutEngine: 'NONE' }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'lon', @@ -156,7 +156,7 @@ dev.spec({ } ] }), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('tooltip')() ] }); @@ -275,9 +275,9 @@ dev.spec({ layoutEngine: 'NONE' }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'temperature', diff --git a/examples/dev-quick-test/ex-055.js b/examples/dev-quick-test/ex-055.js deleted file mode 100644 index bd145975d..000000000 --- a/examples/dev-quick-test/ex-055.js +++ /dev/null @@ -1,2011 +0,0 @@ -(function (factory) { - if (typeof define === 'function' && define.amd) { - define(['taucharts'], function (tauPlugins) { - return factory(tauPlugins); - }); - } else if (typeof module === 'object' && module.exports) { - var tauPlugins = require('taucharts'); - module.exports = factory(tauPlugins); - } else { - factory(this.tauCharts); - } -})(function (tauCharts) { - - var _ = tauCharts.api._; - var d3 = tauCharts.api.d3; - var createUpdateFunc = tauCharts.api.d3_animationInterceptor; - - var drawRect = function (container, id, props) { - - var localSpeed = props.hasOwnProperty('speed') ? props.speed : 0; - - var rect = container - .selectAll('.' + id) - .data([1]); - rect.exit() - .remove(); - rect.call(createUpdateFunc(localSpeed, null, props)); - rect.enter() - .append('rect') - .attr({class: id}) - .style('stroke-width', 0) - .call(createUpdateFunc(localSpeed, {width: 0}, props)); - - return rect; - }; - - tauCharts.api.unitsRegistry.reg( - 'ELEMENT.CFD', - { - addInteraction: function () { - var node = this.node(); - this.cover = null; - this.freeze = false; - this.activeRange = []; - node.on('range-freeze', function (_, e) { this.freeze = e; }.bind(this)); - node.on('range-blur', function () { - this.activeRange = []; - drawRect(this.cover, 'cursor', {width: 0}) - }.bind(this)); - }, - - prepareData: function (screenModel) { - var groups = utils.groupBy(this.node().data(), screenModel.group); - return Object - .keys(groups) - .sort(function (a, b) { - return screenModel.order(a) - screenModel.order(b); - }) - .reduce(function (memo, k, i) { - return memo.concat([groups[k]]); - }, []) - .reduce(function (memo, fiber) { - fiber.forEach(function (row) { - screenModel.y(row); - screenModel.y0(row); - }); - return memo.concat(fiber); - }, []); - }, - - createXIndex: function (data, screenModel) { - return utils.unique(data.map(function (x) { - return x[screenModel.model.scaleX.dim]; - }), String) - .sort(function(x1, x2) { - return x1 - x2; - }) - .map(function (date, i) { - return { - ind: i, - val: date, - pos: screenModel.model.scaleX.value(date) - }; - }); - }, - - draw: function () { - - var self = this; - var node = this.node(); - var screenModel = node.screenModel; - var cfg = node.config; - var container = cfg.options.slot(cfg.uid); - - var data = this.prepareData(screenModel); - var xIndex = this.createXIndex(data, screenModel); - - var findRangeValue = function (x) { - var nextItem = xIndex.find(function (r) { - return r.pos >= x; - }); - var prevIndex = nextItem.ind > 0 ? (nextItem.ind - 1) : nextItem.ind; - var prevItem = xIndex[prevIndex]; - return [prevItem.val, nextItem.val]; - }; - - var filterValuesStack = function (x) { - return data.filter(function (row) { - return String(row[screenModel.model.scaleX.dim]) === String(x); - }); - }; - - var drawCover = function () { - - var that = this; - - drawRect(that, 'cursor', { - class: 'cursor', - x: 0, - y: 0, - height: cfg.options.height, - width: 0, - fill: '#c4b3e6', - opacity: 0.25, - speed: 0 - }); - - var rect = drawRect(that, 'cover-rect', { - class: 'cover-rect', - x: 0, - y: 0, - width: cfg.options.width, - height: cfg.options.height, - opacity: 0, - cursor: 'pointer', - speed: 0 - }); - - rect.on('mouseleave', function () { - setTimeout(function () { - if (!self.freeze) { - node.fire('range-blur'); - } - }, 100); - }); - - rect.on('mousemove', function () { - var e = d3.event; - var c = {x: e.offsetX, y: e.offsetY}; - - var range = findRangeValue(c.x); - - if (JSON.stringify(self.activeRange) === JSON.stringify(range)) { - - node.fire('range-active', { - data: range, - event: e - }); - - return; - } - - self.activeRange = range; - - var prevX = screenModel.model.scaleX(range[0]); - var nextX = screenModel.model.scaleX(range[1]); - - drawRect(that, 'cursor', { - x: prevX, - width: nextX - prevX, - speed: 0 - }); - - node.fire('range-changed', { - data: range, - event: e - }); - }); - - rect.on('click', function () { - var e = d3.event; - var c = {x: e.offsetX, y: e.offsetY}; - - var range = findRangeValue(c.x); - var prevValue = range[0]; - var nextValue = range[1]; - var nextValues = filterValuesStack(nextValue); - var prevValues = filterValuesStack(prevValue); - - var prevStack = prevValues.reduce( - function (memo, item) { - memo[item.entityState] = item.count; - return memo; - }, - {date: prevValue}); - - var nextStack = nextValues.reduce( - function (memo, item) { - memo[item.entityState] = item.count; - return memo; - }, - {date: nextValue}); - - node.fire('range-focus', { - data: nextStack, - prev: prevStack, - event: e - }); - }); - }; - - var cover = container - .selectAll('.cover') - .data([1]); - this.cover = cover; - cover - .exit() - .remove(); - cover - .call(drawCover); - cover - .enter() - .append('g') - .attr('class', 'cover') - .call(drawCover); - } - }, - 'ELEMENT.GENERIC.CARTESIAN'); - - function cfd() { - - return { - - init: function (chart) { - var self = this; - this._chart = chart; - this._tooltip = this._chart.addBalloon( - { - spacing: 3, - place: 'bottom-right', - auto: true, - effectClass: 'fade' - }); - - this._tooltip - .getElement() - .addEventListener('mouseover', function () { self._freeze(true); }, false); - - this._tooltip - .getElement() - .addEventListener('mouseleave', function () { self._freeze(false); }, false); - }, - - destroy: function () { - this._tooltip.destroy(); - }, - - onSpecReady: function (chart, specRef) { - - chart.traverseSpec( - specRef, - function (unit, parentUnit) { - - if (unit.type !== 'ELEMENT.AREA') { - return; - } - - var over = JSON.parse(JSON.stringify(unit)); - over.type = 'ELEMENT.CFD'; - over.namespace = 'cfd'; - - parentUnit.units.push(over); - }); - }, - - formatRange: function (dateRange) { - - var d0 = d3.time.format('%d')(dateRange[0]); - var d1 = d3.time.format('%d')(dateRange[1]); - - var m0 = d3.time.format('%b')(dateRange[0]); - var m1 = d3.time.format('%b')(dateRange[1]); - - var y1 = d3.time.format('%Y')(dateRange[1]); - var diff = Math.round((dateRange[1] - dateRange[0]) / 1000 / 60 / 60 / 24); - - var str = []; - str.push(d0); - str.push((m1 === m0) ? '' : (' ' + m0)); - str.push(' - '); - str.push(d1 + ' ' + m1 + ' ' + y1); - str.push(' (' + diff + ' days)'); - - return str.join(''); - }, - - getContent: function(dateRange, states) { - var str = []; - var max = Math.max.apply(null, states.map(function (state) { - return state['value']; - })); - str.push('
'); - str.push(''); - str.push(this.formatRange(dateRange)); - str.push(''); - str.push(''); - str = str.concat(states.map(function (s) { - return [ - '', - '', - '', - '', - '' - ].join(''); - })); - str.push('
' + s.name + '', - '
', - (s.value), - '
', - '
', - '
', - (s.diff > 0 ? '↑' : (s.diff < 0 ? '↓' : '')), - (s.diff === 0 ? '' : (' ' + Math.abs(s.diff))), - '
', - '
'); - str.push('
'); - return str.join(''); - }, - - onRender: function (chart) { - var self = this; - - self._tooltip.hide(); - - var cfd = chart.select(function (node) { - return node.config.type === 'ELEMENT.CFD'; - })[0]; - self.cfd = cfd; - - cfd.on('range-changed', function () { self._tooltip.hide(); }); - cfd.on('range-blur', function () { self._tooltip.hide(); }); - cfd.on('range-focus', function (sender, e) { - var categories = sender.screenModel.model.scaleColor.domain(); - var states = categories - .map(function (cat) { - var curr = e.data[cat] || 0; - var prev = e.prev[cat] || 0; - return { - name: cat, - color: sender.screenModel.model.scaleColor.value(cat), - value: curr, - diff: curr - prev - }; - }) - .reverse(); - - self._tooltip - .content(self.getContent([e.prev.date, e.data.date], states)) - .show(e.event.pageX + 16, e.event.pageY + 16); - }); - - cfd.on('range-active', function () { clearTimeout(self._hideTooltipTimeout); }); - }, - - _freeze: function (flag) { - var cfd = this.cfd; - cfd.fire('range-freeze', flag); - if (!flag) { - this._hideTooltipTimeout = setTimeout(function () { - cfd.fire('range-blur'); - }, 100); - } - } - }; - } - - tauCharts.api.plugins.add('cfd', cfd); - - return cfd; -}); - -var cfdData = [ - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 172, - "entityStateGroup": "Sp?cification", - "entityStateOrder": 1, - "numericPriority": 0.75, - "entityStateName": "Sp?cification", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Sp?cification(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 0, - "count": 2, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 11, - "count": 4, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 26, - "count": 2, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-11-25T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 1, - "effort": 0 - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 8, - "count": 3, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 11, - "count": 2, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2015-12-02T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 3, - "effort": 24 - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 8, - "count": 3, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2015-12-09T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 4, - "effort": 32 - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 8, - "count": 3, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 12, - "count": 3, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 163, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.875, - "entityStateName": "D?ploiement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "D?ploiement(UserStory)" - }, - { - "endDate": "2015-12-16T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 5, - "effort": 35 - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 8, - "count": 1, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2015-12-23T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 9, - "effort": 49 - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 8, - "count": 1, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2015-12-30T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 9, - "effort": 49 - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 8, - "count": 1, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2016-01-06T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 9, - "effort": 49 - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 8, - "count": 1, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2016-01-13T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 9, - "effort": 49 - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 13, - "count": 3, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2016-01-20T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 11, - "effort": 52 - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 8, - "count": 2, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2016-01-27T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 12, - "effort": 57 - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 26, - "count": 5, - "entityStateID": 153, - "entityStateGroup": "A cadrer", - "entityStateOrder": 0, - "numericPriority": 0, - "entityStateName": "A cadrer", - "entityTypeName": "UserStory", - "entityStateType": "Initial", - "entityState": "A cadrer(UserStory)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 304, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.4375, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(Bug)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 8, - "count": 3, - "entityStateID": 173, - "entityStateGroup": "Pr?t ? d?velopper", - "entityStateOrder": 2, - "numericPriority": 0.875, - "entityStateName": "Pr?t ? d?velopper", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Pr?t ? d?velopper(UserStory)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 218, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 0.875, - "entityStateName": "En d?veloppement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(Bug)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 3, - "count": 1, - "entityStateID": 154, - "entityStateGroup": "En d?veloppement", - "entityStateOrder": 3, - "numericPriority": 1, - "entityStateName": "En d?veloppement", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "En d?veloppement(UserStory)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 219, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.25, - "entityStateName": "Revue technique", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Revue technique(Bug)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 5, - "count": 1, - "entityStateID": 161, - "entityStateGroup": "Revue technique", - "entityStateOrder": 4, - "numericPriority": 1.5, - "entityStateName": "Revue technique", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Revue technique(UserStory)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 167, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.5, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(Bug)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 10, - "count": 2, - "entityStateID": 162, - "entityStateGroup": "Validation fonctionnelle", - "entityStateOrder": 5, - "numericPriority": 1.75, - "entityStateName": "Validation fonctionnelle", - "entityTypeName": "UserStory", - "entityStateType": "InProgress", - "entityState": "Validation fonctionnelle(UserStory)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "effort": 0, - "count": 1, - "entityStateID": 220, - "entityStateGroup": "D?ploiement", - "entityStateOrder": 6, - "numericPriority": 1.75, - "entityStateName": "D?ploiement", - "entityTypeName": "Bug", - "entityStateType": "InProgress", - "entityState": "D?ploiement(Bug)" - }, - { - "endDate": "2016-02-01T00:00:00.000Z", - "entityState": "Final", - "entityStateOrder": 7, - "count": 12, - "effort": 57 - } -]; - -var orderByState = cfdData.reduce(function (memo, row) { - memo[row.entityState] = row.entityStateOrder; - return memo; -}, {}); - -var orderIndex = [ - "Final", - "D?ploiement(Bug)", - "D?ploiement(UserStory)", - "Validation fonctionnelle(Bug)", - "Validation fonctionnelle(UserStory)", - "Revue technique(Bug)", - "Revue technique(UserStory)", - "En d?veloppement(Bug)", - "En d?veloppement(UserStory)", - "Pr?t ? d?velopper(Bug)", - "Pr?t ? d?velopper(UserStory)", - "Sp?cification(UserStory)", - "A cadrer(UserStory)" -].reverse(); - -var orderRange = d3.extent(Object.keys(orderByState).map(function (key) { - return orderByState[key]; -})); - -dev.spec({ - z: 777, - "dimensions": { - "endDate": { - "type": "measure", - "scale": "time" - }, - "count": { - "type": "measure", - "scale": "linear" - }, - "effort": { - "type": "measure", - "scale": "linear" - }, - "entityState": { - "type": "category", - "scale": "ordinal", - "order": [ - "Final", - "D?ploiement(Bug)", - "D?ploiement(UserStory)", - "Validation fonctionnelle(Bug)", - "Validation fonctionnelle(UserStory)", - "Revue technique(Bug)", - "Revue technique(UserStory)", - "En d?veloppement(Bug)", - "En d?veloppement(UserStory)", - "Pr?t ? d?velopper(Bug)", - "Pr?t ? d?velopper(UserStory)", - "Sp?cification(UserStory)", - "A cadrer(UserStory)" - ] - } - }, - "type": "stacked-area", - "x": "endDate", - "guide": { - showGridLines: 'y', - "x": { - "nice": false - }, - color: { - brewer: function (state) { - // var stateOrder = orderByState[state]; - var stateOrder = orderIndex.indexOf(state); - var color = d3.scale.linear() - .domain(splitEvenly([0, orderIndex.length], 8)) - .range([ - d3.hsl(260, 0.5, 0.8), - d3.hsl(300, 0.5, 0.8), - d3.hsl(340, 0.5, 0.8), - d3.hsl(20, 0.5, 0.8), - d3.hsl(60, 0.5, 0.8), - d3.hsl(100, 0.5, 0.8), - d3.hsl(140, 0.5, 0.8), - d3.hsl(180, 0.5, 0.8) - ]); - - return color(stateOrder); - } - } - }, - "y": "count", - "color": "entityState", - plugins: [ - tauCharts.api.plugins.get('cfd')() - ], - "data": cfdData -}); - - - -function splitEvenly(domain, parts) { - var min = domain[0]; - var max = domain[1]; - var segment = (max - min) / (parts - 1); - var chunks = utils.range(parts - 2).map(function (n) { - return min + segment * (n + 1); - }); - return [min].concat(chunks).concat(max); -}; \ No newline at end of file diff --git a/examples/dev-temp-gpl-test.html b/examples/dev-temp-gpl-test.html index f992cbf6a..0f21e4ba9 100644 --- a/examples/dev-temp-gpl-test.html +++ b/examples/dev-temp-gpl-test.html @@ -2,27 +2,27 @@ - + - + - - - - - - - - - + + + + + + + + + - - - - - - + + + + @@ -645,7 +645,7 @@ transformation: [{type: 'regression', args: {type: 'linear', x: 'xdate', y: 'count'}}], guide: { interpolate: 'basis', - cssClass: 'graphical-report__trendline' + cssClass: 'tau-chart__trendline' } }, { @@ -674,7 +674,7 @@ } }; - var gpl = new tauCharts.Plot(facetSpec); + var gpl = new Taucharts.Plot(facetSpec); gpl.renderTo('#trendline'); @@ -1007,7 +1007,7 @@ }], guide: { interpolate: 'basis', - cssClass: 'graphical-report__trendline' + cssClass: 'tau-chart__trendline' } }, { @@ -1053,14 +1053,14 @@ } }; - var dashGpl = new tauCharts.Plot(dashSpec); + var dashGpl = new Taucharts.Plot(dashSpec); dashGpl.renderTo('#dashboard'); + + + + +
+ + + \ No newline at end of file diff --git a/examples/index.html b/examples/index.html index 453ea6eb3..c9c5542eb 100644 --- a/examples/index.html +++ b/examples/index.html @@ -5,90 +5,69 @@ - - diff --git a/examples/dev.js b/examples/index.js similarity index 69% rename from examples/dev.js rename to examples/index.js index da0530f85..ca9d933c0 100644 --- a/examples/dev.js +++ b/examples/index.js @@ -2,32 +2,53 @@ 'use strict'; - var utils = tauCharts.api.utils; + var utils = Taucharts.api.utils; //---------------------------------------------- // NOTE: Place paths to specs and datasets here. // var PATHS = { 'specs/': [ - fileRange('ex-', range(0, 3), 5, range(9, 15)), + 'cumulative-flow', + 'scatterplot', + 'stacked-bar', + 'many-lines', + 'colored-bar', + 'horizontal-scroll', + + 'annotation-types', 'area-interpolation', 'bar-labels', - 'big-data', + 'bar-size', 'category-labels-overflow', - 'horizontal-scroll', + 'continuous-bar_facet', + 'date-legend', + 'facets_no-layout-engine', 'legend-flip', 'linear-bars', 'logarithmic-scale', + 'map', + 'multiline-label', + 'negative-diff', + 'ordinal-facets', + 'scatterplot_facet_trendline', + 'scatterplot_legend-at-bottom', 'smooth-line', + 'time-interval', + 'time-interval-missing-data', 'timeline', + 'update-config', 'utc', - 'whiskers' + 'vertical-ordinal-facets', + 'whiskers', + + 'slow-rendering' ], 'dev-quick-test/': fileRange( 'ex-', range(0, 31), range(40, 48), - range(50, 55) + range(50, 54) ), 'datasets/': [ 'cars', @@ -70,8 +91,10 @@ var PLUGINS = [ 'annotations', 'box-whiskers', + 'category-filter', 'crosshair', - 'exportTo', + 'diff-tooltip', + 'export-to', 'floating-axes', 'layers', 'legend', @@ -84,19 +107,30 @@ var LAZY_RENDERING = true; var pluginConfigs = { - 'exportTo': { + 'diff-tooltip': function (spec) { + var fields = []; + var addField = function (scale) { + if (spec[scale]) { + fields = fields.concat(spec[scale]); + } + }; + ['x', 'y', 'color', 'size', 'id', 'split'].forEach(addField); + return { + fields: fields + }; + }, + 'export-to': { cssPaths: [ - '../css/tauCharts.default.css', - '../css/export.default.css', - '../css/legend.default.css', - '../css/trendline.default.css', - '../css/annotations.default.css', - '../css/quick-filter.default.css' + '../dist/taucharts.css', + '../dist/plugins/export-to.css', + '../dist/plugins/legend.css', + '../dist/plugins/trendline.css', + '../dist/plugins/annotations.css', + '../dist/plugins/quick-filter.css' ] } }; - function DevApp(paths) { this._specs = []; this._datasets = {}; @@ -119,7 +153,7 @@ var l = window.location; Object.defineProperty(spec, 'filePath', { value: (document.currentScript ? - document.currentScript.src.replace(l.protocol + '//' + l.host + '/', '') : + document.currentScript.src.replace(l.protocol + '//' + l.host + '/', '').replace(/^examples\//, '') : 'Unknown path ' + this._unknownPathCounter++ ) }); @@ -167,6 +201,7 @@ s.onload = s.onerror = function () { loaded++; if (loaded === pathsToLoad.length) { + this._sortSpecsByPaths(pathsToLoad); this._renderCharts(); } }.bind(this); @@ -197,7 +232,7 @@ settings.width ? (' width: ' + settings.width + ';') : null, settings.height ? (' height: ' + settings.height + ';') : null, '}' - ].filter(function (d) { return Boolean(d); }).join('\n'); + ].filter(function (d) {return Boolean(d);}).join('\n'); // // Filter specs @@ -211,7 +246,9 @@ if (settings.path) { var regex = new RegExp(settings.path.replace('\\', '\\\\'), 'i'); specs = specs.filter(function (s) { - return s.filePath.match(regex); + return ( + s.filePath.match(regex) || + (s.description && s.description.match(regex))); }); } this._reportFilterResult(specs.length, this._specs.length); @@ -230,7 +267,7 @@ '' ], { name: s.filePath || i, - description: ('type: ' + s.type) + description: s.description || ('type: ' + s.type) }); container.appendChild(block); var target = block.querySelector('.sample__chart'); @@ -251,7 +288,10 @@ s.plugins.splice(0); settings.plugins.forEach(function (p) { var config = pluginConfigs[p]; - s.plugins.push(tauCharts.api.plugins.get(p)(config)); + if (typeof config === 'function') { + config = config(s); + } + s.plugins.push(Taucharts.api.plugins.get(p)(config)); }); } @@ -271,14 +311,34 @@ while (this._notRenderedSpecs.length) { s = this._notRenderedSpecs.shift(); chart = (s.spec.type ? - new tauCharts.Chart(s.spec) : - new tauCharts.Plot(s.spec)); + new Taucharts.Chart(s.spec) : + new Taucharts.Plot(s.spec)); chart.renderTo(s.target); this._charts.push(chart); } }; }; + DevApp.prototype._sortSpecsByPaths = function (paths) { + var indices = paths.reduce(function (map, p, i) { + map[p] = i; + return map; + }, {}); + var specsIndices = this._specs.reduce(function (pathMap, s) { + pathMap[s.filePath] = (pathMap[s.filePath] || new Map()); + var m = pathMap[s.filePath]; + var index = m.size; + m.set(s, index); + return pathMap; + }, {}); + this._specs.sort(function (a, b) { + if (a.filePath === b.filePath) { + return (specsIndices[a.filePath].get(a) - specsIndices[a.filePath].get(b)); + } + return (indices[a.filePath] - indices[b.filePath]); + }); + }; + DevApp.prototype._renderVisibleCharts = function () { var s, chart, rect; var top = document.documentElement.clientTop; @@ -292,8 +352,8 @@ (rect.top <= top && rect.bottom >= bottom) ) { chart = (s.spec.type ? - new tauCharts.Chart(s.spec) : - new tauCharts.Plot(s.spec)); + new Taucharts.Chart(s.spec) : + new Taucharts.Plot(s.spec)); chart.renderTo(s.target); this._charts.push(chart); this._notRenderedSpecs.splice(i, 1); @@ -422,7 +482,7 @@ DevApp.prototype._reportFilterResult = function (filtered, total) { document.getElementById('filterText').textContent = ( - 'Showing ' + filtered + ' of ' + total + ' charts' + 'Showing ' + filtered + ' of ' + total + ' charts (Taucharts@' + Taucharts.version + ')' ); }; @@ -636,7 +696,7 @@ /** * Returns random number or one of arguments. - * @param n Max number or list of arguments. + * @param {number} n Max number or list of arguments. */ function random(n) { if (arguments.length === 1 && typeof n === 'number') { @@ -655,24 +715,24 @@ /** * Returns random word. - * @param n Word length. + * @param {number} n Word length. */ var randomWord = (function () { var sample = [ - 'TauCharts is a javascript graph library.', + 'Taucharts is a javascript graph library.', 'It is based on D3 framework.', 'So, why do you need it?', - 'There are number of similar libraries, but TauCharts has some unique features.', + 'There are number of similar libraries, but Taucharts has some unique features.', 'Many charting libraries look really ugly.', 'They were created by programmers, and not all programmers have deep knowledge of design and information visualization.', - 'TauCharts is designed with passion by professional designers and information visualization experts.', + 'Taucharts is designed with passion by professional designers and information visualization experts.', 'We put significant effort into the design of our charts and think a lot about clarity, ink-to-data ratio, integrity, and usability.', - 'TauCharts has a nice framework and great extensibility options.', + 'Taucharts has a nice framework and great extensibility options.', 'Its plugins infrastructure is flexible and allows you to easily write your own plugins.', 'Most charting libraries only provide a set of charts you can create.', 'That is okay, but in many cases you need more sophisticated visualizations.', - 'TauCharts is based on Grammar of Graphics and can draw some really complex and interactive visualizations.' + 'Taucharts is based on Grammar of Graphics and can draw some really complex and interactive visualizations.' ].join(' '); var lettersUsage = {}; @@ -727,7 +787,192 @@ }; })(); + /** + * Generates dataset with random values. + * @param {object} defs Dimensions types specs. + * @param {number} repeats Specifies count of rows for each category. + */ + function randomData(defs, repeats) { + if (isNaN(repeats)) { + repeats = 1; + } + + var data = []; + + var categories = {}; + Object.keys(defs) + .forEach(function (key) { + var def = defs[key]; + var type = def.type; + var cfg = def.values(); + if (['string', 'date', 'enum'].indexOf(type) >= 0) { + categories[key] = []; + switch (type) { + case 'string': + utils.range(cfg.count).forEach(function () { + categories[key].push(randomWord(cfg.length)); + }); + break; + case 'date': + utils.range(cfg.count).forEach(function (i) { + var d = new Date(cfg.start); + switch (cfg.period) { + case 'day': + d.setDate(d.getDate() + i); + break; + case 'month': + d.setMonth(d.getMonth() + i); + break; + case 'year': + d.setFullYear(d.getFullYear() + i); + break; + } + categories[key].push(d); + }); + break; + case 'enum': + Array.prototype.push.apply(categories[key], cfg); + break; + } + } + }); + + var catKeys = Object.keys(categories); + var valKeys = Object.keys(defs).filter(function (key) { + return catKeys.indexOf(key) < 0; + }); + + var catIndices = {}; + catKeys.forEach(function (key) { + catIndices[key] = 0 + }); + var totalItems = catKeys.reduce(function (total, key) { + return total * categories[key].length; + }, 1); + + var row; + while (repeats--) { + for (var i = 0; i < totalItems; i++) { + row = {}; + catKeys.forEach(function (key) { + row[key] = categories[key][catIndices[key]]; + }); + valKeys.forEach(function (key) { + var def = defs[key]; + var cfg = def.values(); + if (def.type === 'number') { + var num = cfg.min + random(cfg.max - cfg.min); + // This makes numeric sequence more beautiful + var beautiful = Math.round(num * (totalItems - i) / totalItems); + row[key] = beautiful; + } + }); + for (var j = catKeys.length - 1; j >= 0; j--) { + var cat = catKeys[j]; + var next = catKeys[j - 1]; + if (j === catKeys.length - 1) { + catIndices[cat]++; + } + if (catIndices[cat] === categories[cat].length) { + catIndices[cat] = 0; + catIndices[next]++; + } + } + data.push(row); + } + } + + return data; + } + + function randomNumberDeclaration() { + var min = 0; + var max = 100; + return { + type: 'number', + min: function (value) { + min = value; + return this; + }, + max: function (value) { + max = value; + return this; + }, + values: function () { + return { + min: min, + max: max + }; + } + }; + } + + function randomStringDeclaration() { + var count = 3; + var length = 12; + return { + type: 'string', + count: function (value) { + count = value; + return this; + }, + length: function (value) { + length = value; + return this; + }, + values: function () { + return { + count: count, + length: length + }; + } + }; + } + + function randomDateDeclaration(start) { + start = new Date(start || '2015-07-01'); + var count = 12; + var period = 'day'; + return { + type: 'date', + start: function (value) { + start = value; + return this; + }, + count: function (value) { + count = value; + return this; + }, + period: function (value) { + period = value; + return this; + }, + values: function () { + return { + start: start, + count: count, + period: period + }; + } + }; + } + + function randomEnumDeclaration(items) { + items = !items ? ['A', 'B', 'C'] : Array.isArray(items) ? items : Array.from(arguments); + return { + type: 'enum', + values: function () { + return items.slice(); + } + }; + } + DevApp.prototype.random = random; DevApp.prototype.randomWord = randomWord; + DevApp.prototype.randomData = randomData; + DevApp.prototype.random.number = randomNumberDeclaration; + DevApp.prototype.random.string = randomStringDeclaration; + DevApp.prototype.random.date = randomDateDeclaration; + DevApp.prototype.random.enum = randomEnumDeclaration; })(); diff --git a/examples/specs/annotation-types.js b/examples/specs/annotation-types.js new file mode 100644 index 000000000..abaadb6c3 --- /dev/null +++ b/examples/specs/annotation-types.js @@ -0,0 +1,93 @@ +dev.spec({ + type: 'bar', + x: 'date', + y: ['team', 'effort'], + color: 'team', + guide: [{}, { + x: { + timeInterval: 'day' + } + }], + settings: { + utcTime: true + }, + plugins: [ + Taucharts.api.plugins.get('diff-tooltip')(), + Taucharts.api.plugins.get('crosshair')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('quick-filter')(), + Taucharts.api.plugins.get('annotations')({ + items: [ + { + dim: 'effort', + val: 30, + text: 'Minimal', + color: 'orange', + position: 'front' + }, + { + dim: 'effort', + val: 100, + text: { + start: '{{value}}', + end: 'Overflow' + }, + color: 'red', + position: 'front' + }, + { + dim: 'effort', + val: [50, 70], + text: 'Good', + color: 'green' + }, + { + dim: 'date', + val: [new Date('2015-07-03'), new Date('2015-07-04')], + text: 'Weekends ({{value}})', + color: 'blue' + }, + { + dim: 'date', + val: new Date('2015-07-02'), + text: 'Deadline', + color: 'darkred', + position: 'front' + }, + { + dim: ['date', 'effort'], + val: [ + [new Date('2015-07-01'), 50], + [new Date('2015-07-05'), 0], + ], + text: { + start: '{{x}} / {{y}}', + end: 'Ideal Line ({{x}})' + }, + color: 'black', + position: 'front' + }, + { + dim: ['date', 'effort'], + val: [new Date('2015-07-04'), 40], + text: 'Point', + color: 'black', + position: 'front' + }, + ] + }) + ], + data: [ + {date: new Date('2015-07-01'), effort: 40, team: 'Winners'}, + {date: new Date('2015-07-02'), effort: 50, team: 'Winners'}, + {date: new Date('2015-07-03'), effort: 200, team: 'Winners'}, + {date: new Date('2015-07-04'), effort: 20, team: 'Winners'}, + {date: new Date('2015-07-05'), effort: 30, team: 'Winners'}, + {date: new Date('2015-07-01'), effort: 20, team: 'Losers'}, + {date: new Date('2015-07-02'), effort: 10, team: 'Losers'}, + {date: new Date('2015-07-03'), effort: 10, team: 'Losers'}, + {date: new Date('2015-07-04'), effort: 10, team: 'Losers'}, + {date: new Date('2015-07-05'), effort: 40, team: 'Losers'}, + {date: new Date('2015-07-06'), effort: 40, team: 'Losers'} + ] +}); diff --git a/examples/specs/area-interpolation.js b/examples/specs/area-interpolation.js index 782f5c798..b6cb8c8bc 100644 --- a/examples/specs/area-interpolation.js +++ b/examples/specs/area-interpolation.js @@ -1,4 +1,7 @@ dev.spec({ + + description: 'Smooth stacked area', + type: 'stacked-area', x: 'date', y: 'effort', @@ -6,6 +9,9 @@ dev.spec({ guide: { interpolate: 'smooth' }, + plugins: [ + Taucharts.api.plugins.get('tooltip')() + ], data: [ {team: 'Alpha', date: '2015-07-15', effort: 400, phase: 'dev'}, {team: 'Alpha', date: '2015-07-16', effort: 200, phase: 'dev'}, diff --git a/examples/specs/bar-labels.js b/examples/specs/bar-labels.js index 3e69e9c72..05b4d8758 100644 --- a/examples/specs/bar-labels.js +++ b/examples/specs/bar-labels.js @@ -8,7 +8,7 @@ } var barData = utils.flatten(utils.range(3).map(function (i) { - var team = ['Team A', 'Team B', 'Team C', 'Team D', 'Team E'][i]; + var team = ['Team A', 'Team B', 'Team C', 'Team D', 'Team E', 'Team F', 'Team G', 'Team H'][i]; return utils.range(5).map(function (i) { var status = ['No Epic', 'Ideation', 'Planning', 'Development', 'Sourcing'][i]; return utils.range(2).map(function (i) { @@ -39,6 +39,44 @@ }; })()); + dev.spec({ + type: 'horizontal-bar', + x: 'count', + y: 'type', + color: 'type2', + label: 'count2', + guide: { + label: { + fontSize: 12 + } + }, + data: [ + {type: 'Bug', type2: 'Bug', count: 8913, count2: 8913}, + {type: 'Request', type2: 'Request', count: 726, count2: 726}, + {type: 'UserStory', type2: 'UserStory', count: 8013, count2: 8013}, + {type: 'Feature', type2: 'Feature', count: 848, count2: 848}, + {type: 'Task', type2: 'Task', count: 3615, count2: 3615}, + {type: 'Epic', type2: 'Epic', count: 63, count2: 63}, + {type: 'TestPlanRun', type2: 'TestPlanRun', count: 86, count2: 86}, + ] + }); + + dev.spec((function () { + return { + type: 'horizontal-stacked-bar', + x: 'hours', + y: 'team', + color: 'status', + label: 'hours', + guide: [{}, { + label: { + fontSize: 12 + } + }], + data: barData + }; + })()); + (function () { var counter = 0; @@ -143,7 +181,7 @@ }; } - tauCharts.api.plugins.add('diff', diff); + Taucharts.api.plugins.add('diff', diff); })(); @@ -162,9 +200,9 @@ label: 'hours', data: barData, plugins: [ - tauCharts.api.plugins.get('diff')() + Taucharts.api.plugins.get('diff')() ] }; })()); -})(); \ No newline at end of file +})(); diff --git a/examples/specs/ex-011.js b/examples/specs/bar-size.js similarity index 77% rename from examples/specs/ex-011.js rename to examples/specs/bar-size.js index cc6e3f6d1..72e1dc9fb 100644 --- a/examples/specs/ex-011.js +++ b/examples/specs/bar-size.js @@ -1,7 +1,7 @@ dev.spec({ - _name: 'Funnel', - _desc: 'Look, it is a stacked bar chart with size assigned', + title: 'Funnel', + description: 'Look, it is a stacked bar chart with size assigned', type: 'stacked-bar', y: ['count'], @@ -10,8 +10,8 @@ dev.spec({ size: 'ABS(count)', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: [ @@ -36,7 +36,6 @@ dev.spec({ count: -7 } ] - .reverse() .map(function (row) { row['ABS(count)'] = Math.abs(row.count); return row; diff --git a/examples/specs/category-labels-overflow.js b/examples/specs/category-labels-overflow.js index bdfac1204..5feef62b2 100644 --- a/examples/specs/category-labels-overflow.js +++ b/examples/specs/category-labels-overflow.js @@ -1,4 +1,7 @@ dev.spec({ + + description: 'Labels should be placed inside or outside of bars', + "flip": false, // "stack": true, "type": "horizontal-bar", diff --git a/examples/specs/ex-005.js b/examples/specs/colored-bar.js similarity index 86% rename from examples/specs/ex-005.js rename to examples/specs/colored-bar.js index 7c00b3bf2..6a27c6319 100644 --- a/examples/specs/ex-005.js +++ b/examples/specs/colored-bar.js @@ -1,7 +1,7 @@ dev.spec({ - _name: 'Compare USA and Canada in amount of olympic medals per athlete age', - _desc: 'Looks like colored bar chart is mush better', + title: 'Compare USA and Canada in amount of olympic medals per athlete age', + description: 'Looks like colored bar chart is mush better', type: 'bar', y: ['Sport', 'SUM(Total Medals)'], @@ -9,8 +9,8 @@ dev.spec({ color: 'Country', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: dev.dataset('olympics', function (data) { diff --git a/examples/specs/ex-002.js b/examples/specs/continuous-bar_facet.js similarity index 71% rename from examples/specs/ex-002.js rename to examples/specs/continuous-bar_facet.js index 1a1144f4f..98a82d5b7 100644 --- a/examples/specs/ex-002.js +++ b/examples/specs/continuous-bar_facet.js @@ -1,7 +1,7 @@ dev.spec({ - _name: 'Sin / Cos plot', - _desc: 'Streaming with trend lines', + title: 'Sin / Cos plot', + description: 'Streaming with trend lines', type: 'bar', x: ['x'], @@ -11,8 +11,8 @@ dev.spec({ guide: [ {}, { - x: { nice: false }, - y: { nice: false, min: -1.5, max: 1.5 }, + x: {nice: false}, + y: {nice: false, min: -1.5, max: 1.5}, interpolate: 'basis' } ], @@ -34,6 +34,6 @@ dev.spec({ }, []), plugins: [ - tauCharts.api.plugins.get('trendline')({showPanel: false}) + Taucharts.api.plugins.get('trendline')({showPanel: false}) ] }); diff --git a/examples/specs/cumulative-flow.js b/examples/specs/cumulative-flow.js new file mode 100644 index 000000000..f65ada44b --- /dev/null +++ b/examples/specs/cumulative-flow.js @@ -0,0 +1,1689 @@ +dev.spec({ + + title: 'Cumulative flow diagram', + description: 'stacked area with tooltip showing diff vs previous period', + + type: 'stacked-area', + 'x': 'endDate', + 'y': 'count', + 'color': 'entityState', + dimensions: { + 'endDate': { + type: 'measure', + scale: 'time' + }, + 'count': { + type: 'measure', + scale: 'linear' + }, + 'effort': { + type: 'measure', + scale: 'linear' + }, + 'entityState': { + type: 'category', + scale: 'ordinal', + order: getOrderedStates() + } + }, + data: getCFDData(), + plugins: [ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('diff-tooltip')({ + fields: [ + 'entityStateName', + 'entityStateID' + ] + }) + ], + guide: { + showGridLines: 'y', + 'x': { + timeInterval: 'week', + nice: false + }, + 'color': { + brewer: function (state) { + var states = getOrderedStates(); + var stateOrder = states.indexOf(state); + var color = d3.scaleLinear() + .domain(splitEvenly([0, states.length], 8)) + .range([ + d3.hsl(260, 0.5, 0.8), + d3.hsl(300, 0.5, 0.8), + d3.hsl(340, 0.5, 0.8), + d3.hsl(20, 0.5, 0.8), + d3.hsl(60, 0.5, 0.8), + d3.hsl(100, 0.5, 0.8), + d3.hsl(140, 0.5, 0.8), + d3.hsl(180, 0.5, 0.8) + ]); + + return color(stateOrder); + } + } + }, + settings: { + utcTime: true + } +}); + +dev.spec({ + description: 'Diff by periods horizontally', + type: 'horizontal-stacked-bar', + 'y': 'endDate', + 'x': 'count', + 'color': 'entityState', + dimensions: { + 'endDate': { + type: 'measure', + scale: 'time' + }, + 'count': { + type: 'measure', + scale: 'linear' + }, + 'effort': { + type: 'measure', + scale: 'linear' + }, + 'entityState': { + type: 'category', + scale: 'ordinal', + order: getOrderedStates() + } + }, + data: getCFDData(), + plugins: [ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('diff-tooltip')({ + fields: [ + 'entityStateName', + 'entityStateID' + ] + }) + ], + guide: { + showGridLines: 'x', + 'y': { + timeInterval: 'week', + nice: false + }, + 'color': { + brewer: function (state) { + var states = getOrderedStates(); + var stateOrder = states.indexOf(state); + var color = d3.scaleLinear() + .domain(splitEvenly([0, states.length], 8)) + .range([ + d3.hsl(260, 0.5, 0.8), + d3.hsl(300, 0.5, 0.8), + d3.hsl(340, 0.5, 0.8), + d3.hsl(20, 0.5, 0.8), + d3.hsl(60, 0.5, 0.8), + d3.hsl(100, 0.5, 0.8), + d3.hsl(140, 0.5, 0.8), + d3.hsl(180, 0.5, 0.8) + ]); + + return color(stateOrder); + } + } + }, + settings: { + utcTime: true + } +}); + +function getOrderedStates() { + return [ + 'Create(UserStory)', + 'Specification(UserStory)', + 'Prepare(UserStory)', + 'Prepare(Bug)', + 'Development(UserStory)', + 'Development(Bug)', + 'Code review(UserStory)', + 'Code review(Bug)', + 'Validation(UserStory)', + 'Validation(Bug)', + 'Deployment(UserStory)', + 'Deployment(Bug)', + 'Final' + ]; +} + +function splitEvenly(domain, parts) { + var min = domain[0]; + var max = domain[1]; + var segment = (max - min) / (parts - 1); + var chunks = utils.range(parts - 2).map(function (n) { + return min + segment * (n + 1); + }); + return [min].concat(chunks).concat(max); +} + +function getCFDData() { + return [ + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 172, + 'entityStateGroup': 'Sp?cification', + 'entityStateOrder': 1, + 'numericPriority': 0.75, + 'entityStateName': 'Sp?cification', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Specification(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 0, + 'count': 2, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 11, + 'count': 4, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 26, + 'count': 2, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-11-25T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 1, + 'effort': 0 + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 8, + 'count': 3, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 11, + 'count': 2, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2015-12-02T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 3, + 'effort': 24 + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 8, + 'count': 3, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2015-12-09T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 4, + 'effort': 32 + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 8, + 'count': 3, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 12, + 'count': 3, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 163, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.875, + 'entityStateName': 'Deployment', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(UserStory)' + }, + { + 'endDate': '2015-12-16T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 5, + 'effort': 35 + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 8, + 'count': 1, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2015-12-23T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 9, + 'effort': 49 + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 8, + 'count': 1, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2015-12-30T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 9, + 'effort': 49 + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 8, + 'count': 1, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2016-01-06T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 9, + 'effort': 49 + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 8, + 'count': 1, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2016-01-13T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 9, + 'effort': 49 + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 13, + 'count': 3, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2016-01-20T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 11, + 'effort': 52 + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 8, + 'count': 2, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2016-01-27T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 12, + 'effort': 57 + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 26, + 'count': 5, + 'entityStateID': 153, + 'entityStateGroup': 'A cadrer', + 'entityStateOrder': 0, + 'numericPriority': 0, + 'entityStateName': 'A cadrer', + 'entityTypeName': 'UserStory', + 'entityStateType': 'Initial', + 'entityState': 'Create(UserStory)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 304, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.4375, + 'entityStateName': 'Prepare', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(Bug)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 8, + 'count': 3, + 'entityStateID': 173, + 'entityStateGroup': 'Prepare', + 'entityStateOrder': 2, + 'numericPriority': 0.875, + 'entityStateName': 'Prepare', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Prepare(UserStory)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 218, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 0.875, + 'entityStateName': 'Development', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Development(Bug)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 3, + 'count': 1, + 'entityStateID': 154, + 'entityStateGroup': 'Development', + 'entityStateOrder': 3, + 'numericPriority': 1, + 'entityStateName': 'Development', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Development(UserStory)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 219, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.25, + 'entityStateName': 'Code review', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(Bug)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 5, + 'count': 1, + 'entityStateID': 161, + 'entityStateGroup': 'Code review', + 'entityStateOrder': 4, + 'numericPriority': 1.5, + 'entityStateName': 'Code review', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Code review(UserStory)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 167, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.5, + 'entityStateName': 'Validation', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(Bug)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 10, + 'count': 2, + 'entityStateID': 162, + 'entityStateGroup': 'Validation', + 'entityStateOrder': 5, + 'numericPriority': 1.75, + 'entityStateName': 'Validation', + 'entityTypeName': 'UserStory', + 'entityStateType': 'InProgress', + 'entityState': 'Validation(UserStory)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'effort': 0, + 'count': 1, + 'entityStateID': 220, + 'entityStateGroup': 'Deployment', + 'entityStateOrder': 6, + 'numericPriority': 1.75, + 'entityStateName': 'Deployment', + 'entityTypeName': 'Bug', + 'entityStateType': 'InProgress', + 'entityState': 'Deployment(Bug)' + }, + { + 'endDate': '2016-02-01T00:00:00.000Z', + 'entityState': 'Final', + 'entityStateOrder': 7, + 'count': 12, + 'effort': 57 + } + ]; +}; diff --git a/examples/specs/date-legend.js b/examples/specs/date-legend.js new file mode 100644 index 000000000..f41958e20 --- /dev/null +++ b/examples/specs/date-legend.js @@ -0,0 +1,37 @@ +dev.spec({ + type: 'stacked-area', + x: 'Team', + y: 'Value', + color: 'Date', + guide: { + color: { + tickPeriod: 'month' + } + }, + dimensions: { + 'Value': { + scale: 'linear', + type: 'measure' + }, + 'Date': { + scale: 'period', + type: 'order' + }, + 'Team': { + scale: 'ordinal', + type: 'category' + }, + }, + settings: { + utcTime: true + }, + plugins: [ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')() + ], + data: dev.randomData({ + 'Value': dev.random.number().max(100), + 'Date': dev.random.date('2017-01-01').period('month').count(4), + 'Team': dev.random.enum('Taucharts', 'Vizydrop') + }) +}); diff --git a/examples/specs/ex-000.js b/examples/specs/ex-000.js deleted file mode 100644 index c14fda8a6..000000000 --- a/examples/specs/ex-000.js +++ /dev/null @@ -1,21 +0,0 @@ -dev.spec({ - - _name: 'Scatterplot of exoplanets period / eccentricity correlation', - _desc: 'There are some exoplanets similar to Earth by eccentricity and period', - - type: 'scatterplot', - x: ['eccentricity'], - y: ['period'], - color: 'name', - size: 'mass', - - plugins: [ - tauCharts.api.plugins.get('legend')({ - position: 'bottom' - }), - tauCharts.api.plugins.get('tooltip')() - ], - - data: dev.dataset('exoplanets') - -}); diff --git a/examples/specs/ex-009.js b/examples/specs/facets_no-layout-engine.js similarity index 77% rename from examples/specs/ex-009.js rename to examples/specs/facets_no-layout-engine.js index 85898999e..7240ef998 100644 --- a/examples/specs/ex-009.js +++ b/examples/specs/facets_no-layout-engine.js @@ -1,7 +1,7 @@ dev.spec({ - _name: 'Histogram: amount of olympic medals per athlete age', - _desc: 'Looks like there are no chances to get medals in Rhythmic Gymnastics after 25...', + title: 'Histogram: amount of olympic medals per athlete age', + description: 'Looks like there are no chances to get medals in Rhythmic Gymnastics after 25...', type: 'bar', y: ['Sport', 'SUM(Total Medals)'], @@ -9,8 +9,8 @@ dev.spec({ // color: 'Sport', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], settings: { diff --git a/examples/specs/horizontal-scroll.js b/examples/specs/horizontal-scroll.js index 2e654812d..64f593272 100644 --- a/examples/specs/horizontal-scroll.js +++ b/examples/specs/horizontal-scroll.js @@ -64,7 +64,8 @@ dev.spec({ data: dev.dataset('medals'), plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('floating-axes')(), + Taucharts.api.plugins.get('tooltip')() ] }); diff --git a/examples/specs/legend-flip.js b/examples/specs/legend-flip.js index d75418453..10ad1bb0d 100644 --- a/examples/specs/legend-flip.js +++ b/examples/specs/legend-flip.js @@ -8,8 +8,8 @@ dev.spec({ interpolate: 'smooth' }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: [ {date: '2017-02-11', bugsCount: 500}, @@ -30,8 +30,8 @@ dev.spec({ interpolate: 'smooth' }, plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: [ {date: '2017-02-11', income: 4000000050}, diff --git a/examples/specs/linear-bars.js b/examples/specs/linear-bars.js index 80dcceaeb..b828ed32c 100644 --- a/examples/specs/linear-bars.js +++ b/examples/specs/linear-bars.js @@ -8,6 +8,10 @@ dev.spec({ price: {type: 'measure', scale: 'linear'}, company: {type: 'category', scale: 'ordinal'} }, + plugins: [ + Taucharts.api.plugins.get('diff-tooltip'), + Taucharts.api.plugins.get('legend') + ], data: [ { company: 'MSFT', diff --git a/examples/specs/ex-012.js b/examples/specs/many-lines.js similarity index 86% rename from examples/specs/ex-012.js rename to examples/specs/many-lines.js index bb1c9b9e1..f0cd87581 100644 --- a/examples/specs/ex-012.js +++ b/examples/specs/many-lines.js @@ -9,8 +9,9 @@ dev.spec({ color: 'Sport', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('crosshair')(), + Taucharts.api.plugins.get('tooltip')() ], data: dev.dataset('olympics', function (data) { diff --git a/examples/specs/ex-015.js b/examples/specs/map.js similarity index 100% rename from examples/specs/ex-015.js rename to examples/specs/map.js diff --git a/examples/specs/multiline-label.js b/examples/specs/multiline-label.js new file mode 100644 index 000000000..66dd24424 --- /dev/null +++ b/examples/specs/multiline-label.js @@ -0,0 +1,25 @@ +(function () { + const data = [ + {name: 'Alex', age: 20, parents: 'Mother: Ann\nFather: Alex'}, + {name: 'Andrew', age: 19, parents: 'Mother: Liza\nFather: Eugene'}, + {name: 'Steve', age: 34, parents: 'Mother: Adele\nFather: Nick'}, + {name: 'Bob', age: 15, parents: 'Mother: Ann\nFather: Andrew'} + ]; + + dev.spec((function () { + return { + type: 'scatterplot', + x: 'name', + y: 'age', + label: 'parents', + guide: [{ + label: { + fontSize: 10, + lineBreak: true, + lineBreakSeparator: '\n' + } + }], + data: data + }; + })()); +})(); diff --git a/examples/specs/negative-diff.js b/examples/specs/negative-diff.js new file mode 100644 index 000000000..6bb2f597a --- /dev/null +++ b/examples/specs/negative-diff.js @@ -0,0 +1,23 @@ +dev.spec({ + type: 'stacked-area', + x: 'Date', + y: 'Value', + color: 'Team', + guide: { + x: { + timeInterval: 'month' + } + }, + settings: { + utcTime: true + }, + plugins: [ + Taucharts.api.plugins.get('diff-tooltip')(), + Taucharts.api.plugins.get('legend')() + ], + data: dev.randomData({ + 'Value': dev.random.number().min(-100).max(100), + 'Date': dev.random.date('2017-01-01').period('month').count(10), + 'Team': dev.random.enum('Taucharts', 'Vizydrop') + }) +}); diff --git a/examples/specs/ex-014.js b/examples/specs/ordinal-facets.js similarity index 93% rename from examples/specs/ex-014.js rename to examples/specs/ordinal-facets.js index 2ff346fa1..c8d42f0df 100644 --- a/examples/specs/ex-014.js +++ b/examples/specs/ordinal-facets.js @@ -8,8 +8,8 @@ dev.spec({ x: ['FullYear', 'Total Medals'], plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], settings: { diff --git a/examples/specs/ex-001.js b/examples/specs/scatterplot.js similarity index 57% rename from examples/specs/ex-001.js rename to examples/specs/scatterplot.js index 51fdf9a06..b715a0d33 100644 --- a/examples/specs/ex-001.js +++ b/examples/specs/scatterplot.js @@ -1,7 +1,7 @@ dev.spec({ - _name: 'Scatterplot of period / mass correlation', - _desc: 'There are no data on exoplanets similar to Earth by mass', + title: 'Scatterplot of period / mass correlation', + description: 'There are no data on exoplanets similar to Earth by mass', type: 'scatterplot', x: ['mass'], @@ -10,8 +10,8 @@ dev.spec({ size: 'eccentricity', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: dev.dataset('exoplanets', function (data) { diff --git a/examples/specs/ex-003.js b/examples/specs/scatterplot_facet_trendline.js similarity index 90% rename from examples/specs/ex-003.js rename to examples/specs/scatterplot_facet_trendline.js index 28a5ebc8f..f65a4ffef 100644 --- a/examples/specs/ex-003.js +++ b/examples/specs/scatterplot_facet_trendline.js @@ -9,9 +9,9 @@ dev.spec({ color: 'Country', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('trendline')(), - tauCharts.api.plugins.get('tooltip')({ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('trendline')(), + Taucharts.api.plugins.get('tooltip')({ // fields: ['Athlete', 'Age', 'Total Medals', 'Sport'] }) ], diff --git a/examples/specs/scatterplot_legend-at-bottom.js b/examples/specs/scatterplot_legend-at-bottom.js new file mode 100644 index 000000000..81eb43e92 --- /dev/null +++ b/examples/specs/scatterplot_legend-at-bottom.js @@ -0,0 +1,20 @@ +dev.spec({ + + description: 'Scatterplot of exoplanets period / eccentricity correlation (There are some exoplanets similar to Earth by eccentricity and period)', + + type: 'scatterplot', + x: ['eccentricity'], + y: ['period'], + color: 'name', + size: 'mass', + + plugins: [ + Taucharts.api.plugins.get('legend')({ + position: 'bottom' + }), + Taucharts.api.plugins.get('tooltip')() + ], + + data: dev.dataset('exoplanets') + +}); diff --git a/examples/specs/big-data.js b/examples/specs/slow-rendering.js similarity index 100% rename from examples/specs/big-data.js rename to examples/specs/slow-rendering.js diff --git a/examples/specs/smooth-line.js b/examples/specs/smooth-line.js index 929ced32e..28f7753a7 100644 --- a/examples/specs/smooth-line.js +++ b/examples/specs/smooth-line.js @@ -33,8 +33,8 @@ dev.spec({ [90, 70, 80, 'B'] ], plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('quick-filter')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('quick-filter')(), + Taucharts.api.plugins.get('tooltip')() ] }); \ No newline at end of file diff --git a/examples/specs/ex-010.js b/examples/specs/stacked-bar.js similarity index 92% rename from examples/specs/ex-010.js rename to examples/specs/stacked-bar.js index 43eb923e2..02a1d9107 100644 --- a/examples/specs/ex-010.js +++ b/examples/specs/stacked-bar.js @@ -9,8 +9,8 @@ dev.spec({ color: 'Country', plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: dev.dataset('olympics', function (data) { diff --git a/examples/specs/time-interval-missing-data.js b/examples/specs/time-interval-missing-data.js new file mode 100644 index 000000000..d8b1402f9 --- /dev/null +++ b/examples/specs/time-interval-missing-data.js @@ -0,0 +1,44 @@ +dev.spec({ + + description: 'Generate zero data points for missing time interval', + + type: 'line', + x: 'date', + y: 'points', + color: 'team', + size: 'points', + guide: { + x: { + min: new Date('2015-01-01'), + max: new Date('2015-09-01'), + timeInterval: 'month' + } + }, + plugins: [ + Taucharts.api.plugins.get('diff-tooltip')() + ], + settings: { + utcTime: true + }, + data: [ + + {team: 'Manchester', date: new Date('2015-02-01'), points: 50}, + {team: 'Chelsea', date: new Date('2015-02-01'), points: 40}, + + {team: 'Manchester', date: new Date('2015-03-01'), points: 60}, + {team: 'Chelsea', date: new Date('2015-03-01'), points: 50}, + {team: 'Aston Villa', date: new Date('2015-03-01'), points: -20}, + + {team: 'Manchester', date: new Date('2015-04-01'), points: 60}, + {team: 'Aston Villa', date: new Date('2015-04-01'), points: 10}, + + {team: 'Manchester', date: new Date('2015-05-01'), points: 50}, + {team: 'Chelsea', date: new Date('2015-05-01'), points: -40}, + {team: 'Aston Villa', date: new Date('2015-05-01'), points: 10}, + + {team: 'Manchester', date: new Date('2015-06-01'), points: 30}, + + {team: 'Manchester', date: new Date('2015-08-01'), points: 50}, + {team: 'Chelsea', date: new Date('2015-08-01'), points: 30}, + ] +}); diff --git a/examples/specs/time-interval.js b/examples/specs/time-interval.js new file mode 100644 index 000000000..29f104305 --- /dev/null +++ b/examples/specs/time-interval.js @@ -0,0 +1,71 @@ +function utcDate(year, month, day, hours, minutes) { + return new Date(Date.UTC.apply(null, arguments)); +} + +var timeIntervalSpecTemplate = { + type: 'bar', + x: 'x', + y: 'y', + plugins: [ + Taucharts.api.plugins.get('annotations')({ + items: [ + { + dim: 'x', + val: utcDate(2017, 1, 12, 0, 0), + text: 'one', + color: 'orange' + } + ] + }) + ] +}; + +function getTimeIntervalSpec(ext) { + return Object.assign({}, timeIntervalSpecTemplate, ext); +} + +const timeIntervalData = [ + {x: utcDate(2017, 1, 11, 12, 0), y: 10}, + {x: utcDate(2017, 1, 11, 21, 0), y: 20}, + {x: utcDate(2017, 1, 12, 0, 0), y: 10}, + {x: utcDate(2017, 1, 12, 3, 0), y: 20}, + {x: utcDate(2017, 1, 13, 6, 0), y: 30} +]; + +dev.spec(getTimeIntervalSpec({ + guide: { + x: { + timeInterval: 'day' + } + }, + settings: { + utcTime: true + }, + data: timeIntervalData +})); + +dev.spec(getTimeIntervalSpec({ + guide: { + x: { + timeInterval: 'day' + } + }, + settings: { + utcTime: true + }, + data: timeIntervalData.concat( + {x: utcDate(2018, 1, 13, 6, 0), y: 30} + ) +})); + +dev.spec(getTimeIntervalSpec({ + guide: { + x: { + timeInterval: 'month' + } + }, + settings: { + utcTime: true + }, + data: timeIntervalData +})); diff --git a/examples/specs/timeline.js b/examples/specs/timeline.js index f5736bfe9..d2d62d6d7 100644 --- a/examples/specs/timeline.js +++ b/examples/specs/timeline.js @@ -35,9 +35,9 @@ dev.spec({ color: 'team', label: 'team', plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('bar-as-span')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('bar-as-span')({ x0: 'start' }) ], @@ -72,9 +72,9 @@ dev.spec({ color: 'team', label: 'team', plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('bar-as-span')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('bar-as-span')({ x0: 'start', collapse: false }) @@ -110,9 +110,9 @@ dev.spec({ color: 'team', label: 'team', plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('bar-as-span')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('bar-as-span')({ y0: 'start' }) ], diff --git a/examples/specs/update-config.js b/examples/specs/update-config.js new file mode 100644 index 000000000..8345ac0c0 --- /dev/null +++ b/examples/specs/update-config.js @@ -0,0 +1,296 @@ +(function () { + + dev.spec(getSpec()); + + function updateSpecPlugin() { + return { + init: function (chart) { + const node = document.createElement('div'); + const root = d3.select(node); + root.append('span').append('strong') + .text('JSON:'); + root.append('textarea') + .property('value', '{}'); + root.append('button') + .text('Set data') + .on('click', function () { + const spec = getSpec(); + const text = root.select('textarea').property('value'); + const obj = JSON.parse(text || '{}'); + if (obj.plugins && !Array.isArray(obj.plugins)) { + obj.plugins = Object.keys(obj.plugins).reduce(function (plugins, name) { + plugins.push(Taucharts.api.plugins.get(name)(obj.plugins[name])); + return plugins; + }, []); + obj.plugins.push(updateSpecPlugin()); + } + const chartSpec = Object.assign(spec, obj); + chart.updateConfig(Object.assign(spec, obj)); + }); + chart.insertToHeader(node); + this.node = node; + }, + destroy: function () { + this.node.parentElement.removeChild(this.node); + } + }; + } + + function getSpec() { + return { + type: 'line', + dimensions: { + 'Owner': { + type: 'category', + scale: 'ordinal' + }, + 'End Date': { + type: 'measure', + scale: 'time' + }, + 'Project': { + type: 'category', + scale: 'ordinal' + }, + 'Cycle Time': { + type: 'measure', + scale: 'linear' + } + }, + identity: 'id', + color: 'Owner', + x: [ + 'Owner', + 'End Date' + ], + y: [ + 'Project', + 'Cycle Time' + ], + data: getData(), + settings: { + utcTime: true, + }, + plugins: [ + Taucharts.api.plugins.get('diff-tooltip')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('crosshair')(), + Taucharts.api.plugins.get('floating-axes')(), + Taucharts.api.plugins.get('export-to')(), + updateSpecPlugin() + ] + } + } + + function getData() { + return [ + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-31T04:27:22.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0464467593 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-22T10:48:08.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0467939815 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-05-03T06:35:53.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0745601852 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-04-12T02:32:19.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.9009606481 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-05-03T03:31:03.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0486458333 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-06-05T06:28:52.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 32.9475231481 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-06-05T06:25:09.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 24.794525463 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-09-01T09:23:59.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0158217593 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-06-05T05:15:29.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 23.8833449074 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-21T04:17:51.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0374652778 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-22T08:37:12.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.211412037 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-09-01T08:18:27.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.1387615741 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-29T08:08:37.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0490046296 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-21T04:28:01.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0066087963 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-08-30T03:51:36.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.7755439815 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-06-05T05:17:23.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-06-05T05:01:47.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 13.0088425926 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-06T09:49:14.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0332291667 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-04-13T03:47:54.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0324421296 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-04-12T07:54:09.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-14T06:56:43.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.1186458333 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-07-10T08:33:59.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0653240741 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-05T10:15:20.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 5.0857638889 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-04-13T04:53:56.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-10T06:53:00.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.1262037037 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-14T07:55:34.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.040775463 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-09-13T01:54:19.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 8.7460763889 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-28T09:27:21.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0433217593 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-12T11:32:21.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0831018519 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-04-13T04:01:47.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.008125 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-06-20T10:32:28.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0290509259 + }, + { + 'Owner': 'Anastasiya Karabitskaya', + 'End Date': '2017-06-01T06:33:52.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 9.9237847222 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-07-12T11:32:20.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.1345717593 + }, + { + 'Owner': 'Alexander Shutov', + 'End Date': '2017-04-13T04:27:43.000Z', + 'Project': 'Taucharts', + 'Cycle Time': 0.0104398148 + } + ].map(function (d, i) { + d.id = 'entity-' + i; + return d; + }); + } +})(); diff --git a/examples/specs/utc.js b/examples/specs/utc.js index 74723d67f..df1688539 100644 --- a/examples/specs/utc.js +++ b/examples/specs/utc.js @@ -46,7 +46,7 @@ dev.spec({ {x: utcDate(2017, 1, 12, 3, 0), y: 20} ], plugins: [ - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'x', diff --git a/examples/specs/ex-013.js b/examples/specs/vertical-ordinal-facets.js similarity index 90% rename from examples/specs/ex-013.js rename to examples/specs/vertical-ordinal-facets.js index 854032c19..67d3f081d 100644 --- a/examples/specs/ex-013.js +++ b/examples/specs/vertical-ordinal-facets.js @@ -8,8 +8,8 @@ dev.spec({ x: ['Total Medals'], plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')() + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')() ], data: dev.dataset('olympics', function (data) { diff --git a/examples/specs/whiskers.js b/examples/specs/whiskers.js index 6ab7363a5..40a79aa22 100644 --- a/examples/specs/whiskers.js +++ b/examples/specs/whiskers.js @@ -32,9 +32,9 @@ dev.spec({ }), plugins: [ - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('box-whiskers')({ + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('box-whiskers')({ flip: true, //mode: 'show-scatter', //mode: 'hide-scatter', diff --git a/license.md b/license.md deleted file mode 100644 index 62be93a6c..000000000 --- a/license.md +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2015 Taucraft Limited - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. \ No newline at end of file diff --git a/package.json b/package.json index b87dbb5ee..511befed8 100644 --- a/package.json +++ b/package.json @@ -1,95 +1,96 @@ { "name": "taucharts", - "version": "1.2.2", - "homepage": "https://github.com/TargetProcess/tauCharts", - "description": "D3 based data-focused charting library", + "version": "2.3.2", + "homepage": "https://github.com/TargetProcess/taucharts", + "description": "Data-focused charting library based on D3", "author": { - "name": "Taucraft Limited" + "name": "Targetprocess, Inc." }, "keywords": [ "d3", - "charts" + "svg", + "charts", + "graphics", + "barchart", + "linechart", + "scatterplot", + "visualization" ], - "main": "build/development/tauCharts.js", + "main": "dist/taucharts.js", "license": "Apache-2.0", "licenses": [ { "type": "Apache License 2.0", - "url": "https://github.com/TargetProcess/tauCharts/blob/master/license.md" + "url": "https://github.com/TargetProcess/taucharts/blob/master/LICENSE" } ], "dependencies": { - "d3": "^3.5.17", - "topojson": "1.6.24" + "d3-array": "^1.2.1", + "d3-axis": "^1.0.8", + "d3-brush": "^1.0.4", + "d3-color": "^1.0.3", + "d3-format": "^1.2.0", + "d3-geo": "^1.9.0", + "d3-quadtree": "^1.0.3", + "d3-request": "^1.0.6", + "d3-scale": "^1.0.6", + "d3-selection": "^1.1.0", + "d3-shape": "^1.2.0", + "d3-time": "^1.0.7", + "d3-time-format": "^2.1.0", + "d3-transition": "^1.1.0", + "topojson-client": "^3.0.0" }, "repository": { "type": "git", - "url": "https://github.com/TargetProcess/tauCharts.git" - }, - "devDependencies": { - "almond": "0.3.1", - "autoprefixer": "^6.2.3", - "babel": "^6.3.13", - "babel-core": "^6.3.15", - "babel-loader": "^6.2.0", - "babel-preset-es2015": "^6.3.13", - "bower": "^1.4.1", - "chai": "3.4.1", - "css-loader": "^0.23.0", - "es5-shim": "^4.1.6", - "eslint": "^1.10.3", - "exports-loader": "^0.6.2", - "fs-extra": "^0.26.2", - "grunt": "~0.4.5", - "grunt-cli": "0.1.13", - "grunt-contrib-clean": "^0.7.0", - "grunt-contrib-concat": "^0.5.1", - "grunt-contrib-copy": "0.8.2", - "grunt-contrib-cssmin": "0.14.0", - "grunt-contrib-less": "^1.0.1", - "grunt-contrib-rename": "0.0.3", - "grunt-contrib-uglify": "^0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-gh-pages": "^1.0.0", - "grunt-jscs": "^2.4.0", - "grunt-karma": "0.12.1", - "grunt-postcss": "0.7.1", - "grunt-shell": "", - "grunt-webpack": "^1.0.8", - "imports-loader": "^0.6.4", - "isparta-loader": "^2.0.0", - "jquery": "^2.1.4", - "js-schema": "^1.0.1", - "json-loader": "^0.5.2", - "karma": "~0.13.15", - "karma-chrome-launcher": "~0.2.2", - "karma-cli": "0.1.1", - "karma-coverage": "^0.5.3", - "karma-coveralls": "^1.1.0", - "karma-mocha": "0.2.1", - "karma-sourcemap-loader": "^0.3.5", - "karma-spec-reporter": "0.0.23", - "karma-webpack": "1.7.0", - "mocha": "^2.3.4", - "raw-loader": "^0.5.1", - "tau-tooltip": "1.1.2", - "webpack": "1.12.9", - "webpack-dev-server": "1.14.0", - "webpack-umd-external": "^1.0.2" + "url": "https://github.com/TargetProcess/taucharts.git" }, "scripts": { - "devserver": "grunt webpack-dev-server:start", - "less2css": "grunt less", - "eslint": "eslint src/**", - "watch-less": "grunt watch:less", - "build": "bower install && grunt build", - "webpackbuild": "grunt webpack:build", - "test": "npm run eslint && npm run travis && karma start config/karma.conf.js", - "travis": "grunt travis", - "release": "grunt publish && grunt gh-pages", - "devtest": "grunt karma:dev", - "buildExporTo": "grunt webpack:buildExportTo", - "prepublish": "grunt clean:npmpublish && npm run build" + "start": "webpack-dev-server", + "build": "npm run lint && npm run build:production && node tasks/cleanBuildFolder.js", + "build:production": "webpack --mode=production", + "build:dev": "webpack", + "test": "npm run build && karma start", + "lint": "tslint src/**/*.ts src/**/*.js plugins/**/*.ts plugins/**/*.js task/**/*.js config/**/*.js --exclude src/addons/**/*.*", + "devtest": "npm run build:dev && karma start --taucharts-debug", + "prepublishOnly": "npm run build", + "publishToReleaseBranch": "node tasks/publishToReleaseBranch.js" + }, + "devDependencies": { + "@types/d3": "4.11.0", + "canvg": "1.0.0", + "chai": "4.1.2", + "css-loader": "0.28.10", + "d3": "4.13.0", + "extract-text-webpack-plugin": "4.0.0-beta.0", + "file-saver": "1.3.3", + "fs-extra": "7.0.0", + "gh-pages": "1.2.0", + "istanbul-instrumenter-loader": "3.0.0", + "jquery": "3.3.1", + "js-schema": "1.0.1", + "karma": "2.0.0", + "karma-chrome-launcher": "2.2.0", + "karma-coverage": "1.1.1", + "karma-coveralls": "1.1.2", + "karma-mocha": "1.3.0", + "karma-remap-coverage": "0.1.5", + "karma-sourcemap-loader": "0.3.7", + "karma-spec-reporter": "0.0.32", + "karma-webpack": "2.0.13", + "less": "3.0.1", + "less-loader": "4.1.0", + "mocha": "5.0.4", + "style-loader": "0.20.3", + "tau-tooltip": "1.1.3", + "ts-loader": "4.0.1", + "tslint": "5.9.1", + "tslint-eslint-rules": "5.1.0", + "typescript": "2.7.2", + "webpack": "4.1.1", + "webpack-bundle-analyzer": "2.11.1", + "webpack-cli": "2.0.11", + "webpack-dev-server": "3.1.1" }, "types": "./types/index.d.ts" } diff --git a/types/index.d.ts b/types/index.d.ts index fa941f3b7..8c3f1617f 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -127,7 +127,7 @@ interface Emitter { interface PlotSize { width?: number; - height?: number + height?: number; } interface PlotLayout { @@ -155,6 +155,7 @@ declare class Plot implements Emitter { addFilter(filter: any): number; removeFilter(id: number): this; refresh(): void; + updateConfig(config: ChartSpec): void; resize(size?: PlotSize): void; getLayout(): PlotLayout; } @@ -191,7 +192,9 @@ declare var api: { }; tickPeriod: { get(name: string, settings?: { utc?: boolean }): { cast: (d: Date) => Date; next: (d: Date) => Date; }; - add(name: string, period: { cast: (d: Date) => Date; next: (d: Date) => Date; }, settings?: { utc?: boolean }): void; + add(name: string, + period: { cast: (d: Date) => Date; next: (d: Date) => Date; }, + settings?: { utc?: boolean }): void; }; globalSettings: ChartSettings; @@ -203,11 +206,13 @@ declare var api: { get(name: 'annotations'): (settings: { items: { - dim: string; - val: any | [any, any]; + dim: string | [string, string]; + val: any | [any, any] | [any, any][]; text: string; color?: string; + position?: 'front' | 'back'; }[]; + formatters?: any; }) => PluginObject; get(name: 'bar-as-span'): (settings: { @@ -220,6 +225,12 @@ declare var api: { mode: 'show-scatter' | 'hide-scatter' | 'outliers-only'; }) => PluginObject; + get(name: 'category-filter'): (settings?: { + fields?: string[]; + formatters?: any + skipColorDim?: boolean; + }) => PluginObject; + get(name: 'crosshair'): (settings?: { xAxis?: boolean; yAxis?: boolean; @@ -233,7 +244,7 @@ declare var api: { axisVPadding?: number; }) => PluginObject; - get(name: 'exportTo'): (settings?: { + get(name: 'export-to'): (settings?: { fontSize?: number; paddingTop?: number; backgroundColor?: string; @@ -271,9 +282,10 @@ declare var api: { get(name: 'tooltip'): (settings?: { fields?: string[]; + escapeHtml?: boolean; formatters?: { [field: string]: (((x: any) => string) | { label: string; format: (x: any) => string; }) - } + }; }) => PluginObject; get(name: 'trendline'): (settings?: { @@ -289,13 +301,15 @@ declare var api: { declare var version: string; -export default { - Plot, - Chart, - api, - version, +declare var _default: { + Plot: typeof Plot, + Chart: typeof Chart, + api: typeof api, + version: typeof version }; +export default _default; + export { Plot, Chart, diff --git a/types/taucharts-tests.ts b/types/taucharts-tests.ts index 12374d6b6..58b294da1 100644 --- a/types/taucharts-tests.ts +++ b/types/taucharts-tests.ts @@ -1,8 +1,8 @@ -import tauCharts from 'taucharts'; +import Taucharts from 'taucharts'; // Create simple chart { - let chart = new tauCharts.Chart({ + let chart = new Taucharts.Chart({ type: 'bar', @@ -21,7 +21,7 @@ import tauCharts from 'taucharts'; // Create chart with facets, plugins, custom colors and custom settings { - let chart = new tauCharts.Chart({ + let chart = new Taucharts.Chart({ type: 'bar', @@ -53,10 +53,10 @@ import tauCharts from 'taucharts'; ], plugins: [ - tauCharts.api.plugins.get('tooltip')(), - tauCharts.api.plugins.get('legend')(), - tauCharts.api.plugins.get('quick-filter')(), - tauCharts.api.plugins.get('annotations')({ + Taucharts.api.plugins.get('tooltip')(), + Taucharts.api.plugins.get('legend')(), + Taucharts.api.plugins.get('quick-filter')(), + Taucharts.api.plugins.get('annotations')({ items: [ { dim: 'effort', @@ -78,7 +78,7 @@ import tauCharts from 'taucharts'; // Setup custom period and format { - tauCharts.api.tickPeriod.add('half-year', { + Taucharts.api.tickPeriod.add('half-year', { cast(d) { var date = new Date(d); date.setUTCHours(0, 0, 0, 0); @@ -94,7 +94,7 @@ import tauCharts from 'taucharts'; } }, { utc: true }); - tauCharts.api.tickFormat.add('half-year-utc', (x) => { + Taucharts.api.tickFormat.add('half-year-utc', (x) => { var date = new Date(x); var m = date.getUTCMonth(); var h = (m - (m % 6)) / 6 + 1; @@ -102,7 +102,7 @@ import tauCharts from 'taucharts'; return h + ending[h] + ' half of ' + date.getUTCFullYear(); }); - let periodChart = new tauCharts.Chart({ + let periodChart = new Taucharts.Chart({ type: 'stacked-bar', x: 'date',