diff --git a/.gitignore b/.gitignore index 073fe6c8f..ccca5b3ee 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,4 @@ node_modules .DS_Store *.log /.idea -/dist -/doc /coverage \ No newline at end of file diff --git a/dist/billboard.css b/dist/billboard.css new file mode 100644 index 000000000..48aedc514 --- /dev/null +++ b/dist/billboard.css @@ -0,0 +1,210 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +/*-- Chart --*/ +.bb svg { + font: 10px sans-serif; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } + +.bb path, .bb line { + fill: none; + stroke: #000; } + +.bb text, .bb .bb-button { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; } + +.bb-legend-item-tile, +.bb-xgrid-focus, +.bb-ygrid, +.bb-event-rect, +.bb-bars path { + shape-rendering: crispEdges; } + +.bb-chart-arc path { + stroke: #fff; } + +.bb-chart-arc text { + fill: #fff; + font-size: 13px; } + +/*-- Axis --*/ +/*-- Grid --*/ +.bb-grid line { + stroke: #aaa; } + +.bb-grid text { + fill: #aaa; } + +.bb-xgrid, .bb-ygrid { + stroke-dasharray: 3 3; } + +/*-- Text on Chart --*/ +.bb-text.bb-empty { + fill: #808080; + font-size: 2em; } + +/*-- Line --*/ +.bb-line { + stroke-width: 1px; } + +/*-- Point --*/ +.bb-circle._expanded_ { + stroke-width: 1px; + stroke: white; } + +.bb-selected-circle { + fill: white; + stroke-width: 2px; } + +/*-- Bar --*/ +.bb-bar { + stroke-width: 0; } + .bb-bar._expanded_ { + fill-opacity: 0.75; } + +/*-- Focus --*/ +.bb-target.bb-focused { + opacity: 1; } + +.bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step { + stroke-width: 2px; } + +.bb-target.bb-defocused { + opacity: 0.3 !important; } + +/*-- Region --*/ +.bb-region { + fill: steelblue; + fill-opacity: .1; } + +/*-- Zoom region --*/ +.bb-zoom-brush { + fill-opacity: .1; } + +/*-- Brush --*/ +.bb-brush .extent { + fill-opacity: .1; } + +/*-- Select - Drag --*/ +/*-- Legend --*/ +.bb-legend-item { + font-size: 12px; } + +.bb-legend-item-hidden { + opacity: 0.15; } + +.bb-legend-background { + opacity: 0.75; + fill: white; + stroke: lightgray; + stroke-width: 1; } + +/*-- Title --*/ +.bb-title { + font: 14px sans-serif; } + +/*-- Tooltip --*/ +.bb-tooltip-container { + z-index: 10; } + +.bb-tooltip { + border-collapse: collapse; + border-spacing: 0; + background-color: #fff; + empty-cells: show; + opacity: 0.9; + -webkit-box-shadow: 7px 7px 12px -9px #777777; + -moz-box-shadow: 7px 7px 12px -9px #777777; + box-shadow: 7px 7px 12px -9px #777777; } + .bb-tooltip tr { + border: 1px solid #CCC; } + .bb-tooltip th { + background-color: #aaa; + font-size: 14px; + padding: 2px 5px; + text-align: left; + color: #FFF; } + .bb-tooltip td { + font-size: 13px; + padding: 3px 6px; + background-color: #fff; + border-left: 1px dotted #999; } + .bb-tooltip td > span, .bb-tooltip td > svg { + display: inline-block; + width: 10px; + height: 10px; + margin-right: 6px; } + .bb-tooltip td.value { + text-align: right; } + +/*-- Area --*/ +.bb-area { + stroke-width: 0; + opacity: 0.2; } + +/*-- Arc --*/ +.bb-chart-arcs-title { + dominant-baseline: middle; + font-size: 1.3em; } + +.bb-chart-arcs .bb-chart-arcs-background { + fill: #e0e0e0; + stroke: none; } + +.bb-chart-arcs .bb-chart-arcs-gauge-unit { + fill: #000; + font-size: 16px; } + +.bb-chart-arcs .bb-chart-arcs-gauge-max { + fill: #777; } + +.bb-chart-arcs .bb-chart-arcs-gauge-min { + fill: #777; } + +.bb-chart-arc .bb-gauge-value { + fill: #000; } + +/*-- Radar --*/ +.bb-chart-radars .bb-levels polygon { + fill: none; + stroke: #848282; + stroke-width: .5px; } + +.bb-chart-radars .bb-levels text { + fill: #848282; } + +.bb-chart-radars .bb-axis line { + stroke: #848282; + stroke-width: .5px; } + +.bb-chart-radars .bb-axis text { + font-size: 1.15em; + cursor: default; } + +.bb-chart-radars .bb-shapes polygon { + fill-opacity: .2; + stroke-width: 1px; } + +/*-- Button --*/ +.bb-button { + position: absolute; + top: 10px; + right: 10px; } + .bb-button .bb-zoom-reset { + font-size: 11px; + border: solid 1px #ccc; + background-color: #fff; + padding: 5px; + border-radius: 5px; + cursor: pointer; } + + +/*# sourceMappingURL=billboard.css.map*/ \ No newline at end of file diff --git a/dist/billboard.css.map b/dist/billboard.css.map new file mode 100644 index 000000000..301bacfab --- /dev/null +++ b/dist/billboard.css.map @@ -0,0 +1 @@ +{"version":3,"file":"billboard.css","sources":["webpack:///./src/scss/billboard.scss"],"sourcesContent":["/*-- Chart --*/\n.bb svg {\n font: 10px sans-serif;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }\n\n.bb path, .bb line {\n fill: none;\n stroke: #000; }\n\n.bb text, .bb .bb-button {\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none; }\n\n.bb-legend-item-tile,\n.bb-xgrid-focus,\n.bb-ygrid,\n.bb-event-rect,\n.bb-bars path {\n shape-rendering: crispEdges; }\n\n.bb-chart-arc path {\n stroke: #fff; }\n\n.bb-chart-arc text {\n fill: #fff;\n font-size: 13px; }\n\n/*-- Axis --*/\n/*-- Grid --*/\n.bb-grid line {\n stroke: #aaa; }\n\n.bb-grid text {\n fill: #aaa; }\n\n.bb-xgrid, .bb-ygrid {\n stroke-dasharray: 3 3; }\n\n/*-- Text on Chart --*/\n.bb-text.bb-empty {\n fill: #808080;\n font-size: 2em; }\n\n/*-- Line --*/\n.bb-line {\n stroke-width: 1px; }\n\n/*-- Point --*/\n.bb-circle._expanded_ {\n stroke-width: 1px;\n stroke: white; }\n\n.bb-selected-circle {\n fill: white;\n stroke-width: 2px; }\n\n/*-- Bar --*/\n.bb-bar {\n stroke-width: 0; }\n .bb-bar._expanded_ {\n fill-opacity: 0.75; }\n\n/*-- Focus --*/\n.bb-target.bb-focused {\n opacity: 1; }\n\n.bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step {\n stroke-width: 2px; }\n\n.bb-target.bb-defocused {\n opacity: 0.3 !important; }\n\n/*-- Region --*/\n.bb-region {\n fill: steelblue;\n fill-opacity: .1; }\n\n/*-- Zoom region --*/\n.bb-zoom-brush {\n fill-opacity: .1; }\n\n/*-- Brush --*/\n.bb-brush .extent {\n fill-opacity: .1; }\n\n/*-- Select - Drag --*/\n/*-- Legend --*/\n.bb-legend-item {\n font-size: 12px; }\n\n.bb-legend-item-hidden {\n opacity: 0.15; }\n\n.bb-legend-background {\n opacity: 0.75;\n fill: white;\n stroke: lightgray;\n stroke-width: 1; }\n\n/*-- Title --*/\n.bb-title {\n font: 14px sans-serif; }\n\n/*-- Tooltip --*/\n.bb-tooltip-container {\n z-index: 10; }\n\n.bb-tooltip {\n border-collapse: collapse;\n border-spacing: 0;\n background-color: #fff;\n empty-cells: show;\n opacity: 0.9;\n -webkit-box-shadow: 7px 7px 12px -9px #777777;\n -moz-box-shadow: 7px 7px 12px -9px #777777;\n box-shadow: 7px 7px 12px -9px #777777; }\n .bb-tooltip tr {\n border: 1px solid #CCC; }\n .bb-tooltip th {\n background-color: #aaa;\n font-size: 14px;\n padding: 2px 5px;\n text-align: left;\n color: #FFF; }\n .bb-tooltip td {\n font-size: 13px;\n padding: 3px 6px;\n background-color: #fff;\n border-left: 1px dotted #999; }\n .bb-tooltip td > span, .bb-tooltip td > svg {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin-right: 6px; }\n .bb-tooltip td.value {\n text-align: right; }\n\n/*-- Area --*/\n.bb-area {\n stroke-width: 0;\n opacity: 0.2; }\n\n/*-- Arc --*/\n.bb-chart-arcs-title {\n dominant-baseline: middle;\n font-size: 1.3em; }\n\n.bb-chart-arcs .bb-chart-arcs-background {\n fill: #e0e0e0;\n stroke: none; }\n\n.bb-chart-arcs .bb-chart-arcs-gauge-unit {\n fill: #000;\n font-size: 16px; }\n\n.bb-chart-arcs .bb-chart-arcs-gauge-max {\n fill: #777; }\n\n.bb-chart-arcs .bb-chart-arcs-gauge-min {\n fill: #777; }\n\n.bb-chart-arc .bb-gauge-value {\n fill: #000; }\n\n/*-- Radar --*/\n.bb-chart-radars .bb-levels polygon {\n fill: none;\n stroke: #848282;\n stroke-width: .5px; }\n\n.bb-chart-radars .bb-levels text {\n fill: #848282; }\n\n.bb-chart-radars .bb-axis line {\n stroke: #848282;\n stroke-width: .5px; }\n\n.bb-chart-radars .bb-axis text {\n font-size: 1.15em;\n cursor: default; }\n\n.bb-chart-radars .bb-shapes polygon {\n fill-opacity: .2;\n stroke-width: 1px; }\n\n/*-- Button --*/\n.bb-button {\n position: absolute;\n top: 10px;\n right: 10px; }\n .bb-button .bb-zoom-reset {\n font-size: 11px;\n border: solid 1px #ccc;\n background-color: #fff;\n padding: 5px;\n border-radius: 5px;\n cursor: pointer; }\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;","sourceRoot":""} \ No newline at end of file diff --git a/dist/billboard.js b/dist/billboard.js new file mode 100644 index 000000000..97625c952 --- /dev/null +++ b/dist/billboard.js @@ -0,0 +1,13211 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("d3-time-format"), require("d3-selection"), require("d3-array"), require("d3-transition"), require("d3-scale"), require("d3-brush"), require("d3-collection"), require("d3-dsv"), require("d3-drag"), require("d3-shape"), require("d3-interpolate"), require("d3-color"), require("d3-zoom"), require("d3-ease")); + else if(typeof define === 'function' && define.amd) + define(["d3-time-format", "d3-selection", "d3-array", "d3-transition", "d3-scale", "d3-brush", "d3-collection", "d3-dsv", "d3-drag", "d3-shape", "d3-interpolate", "d3-color", "d3-zoom", "d3-ease"], factory); + else { + var a = typeof exports === 'object' ? factory(require("d3-time-format"), require("d3-selection"), require("d3-array"), require("d3-transition"), require("d3-scale"), require("d3-brush"), require("d3-collection"), require("d3-dsv"), require("d3-drag"), require("d3-shape"), require("d3-interpolate"), require("d3-color"), require("d3-zoom"), require("d3-ease")) : factory(root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"]); + for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; + } +})(window, function(__WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__22__, __WEBPACK_EXTERNAL_MODULE__24__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__33__, __WEBPACK_EXTERNAL_MODULE__49__, __WEBPACK_EXTERNAL_MODULE__52__, __WEBPACK_EXTERNAL_MODULE__62__) { +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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.bb = undefined; + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _Axis = __webpack_require__(8), + _Axis2 = _interopRequireDefault(_Axis); + +__webpack_require__(15); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @namespace bb + * @version 1.6.0 + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var bb = { + /** + * Version information + * @property {String} version version + * @example + * bb.version; // "1.0.0" + * @memberOf bb + */ + version: "1.6.0", + + /** + * Generate chart + * @param {Options} options chart options + * @memberOf bb + * @return {Chart} + * @see {@link Options} for different generation options + * @see {@link Chart} for different methods API + * @example + * + *
+ * @example + * // generate chart with options + * var chart = bb.generate({ + * "bindto": "#LineChart" + * "data": { + * "columns": [ + * ["data1", 30, 200, 100, 400, 150, 250], + * ["data2", 50, 20, 10, 40, 15, 25] + * ] + * } + * }); + * + * // call some API + * // ex) get the data of 'data1' + * chart.data("data1"); + */ + generate: function generate(config) { + var inst = new _Chart2.default(config); + + return inst.internal.charts = this.instance, this.instance.push(inst), inst; + }, + + + /** + * An array containing instance created + * @property {Array} instance instance array + * @example + * // generate charts + * var chart1 = bb.generate(...); + * var chart2 = bb.generate(...); + * + * bb.instance; // [ chart1, chart2, ... ] + * @memberOf bb + */ + instance: [], + + /** + * Internal chart object + * @private + */ + chart: { + fn: _Chart2.default.prototype, + internal: { + fn: _ChartInternal2.default.prototype, + axis: { + fn: _Axis2.default.prototype + } + } + } +}; + +__webpack_require__(17), __webpack_require__(19), __webpack_require__(20), __webpack_require__(21), __webpack_require__(23), __webpack_require__(25), __webpack_require__(26), __webpack_require__(27), __webpack_require__(29), __webpack_require__(30), __webpack_require__(32), __webpack_require__(34), __webpack_require__(35), __webpack_require__(36), __webpack_require__(37), __webpack_require__(38), __webpack_require__(39), __webpack_require__(40), __webpack_require__(41), __webpack_require__(42), __webpack_require__(43), __webpack_require__(44), __webpack_require__(45), __webpack_require__(46), __webpack_require__(47), __webpack_require__(48), __webpack_require__(50), __webpack_require__(51), __webpack_require__(53), __webpack_require__(54), __webpack_require__(55), __webpack_require__(56), __webpack_require__(57), __webpack_require__(58), __webpack_require__(59), __webpack_require__(60), __webpack_require__(61), __webpack_require__(63), __webpack_require__(64), __webpack_require__(65), __webpack_require__(66), __webpack_require__(67), __webpack_require__(68), __webpack_require__(69), __webpack_require__(70), __webpack_require__(71), __webpack_require__(72), __webpack_require__(73), __webpack_require__(74), __webpack_require__(76), __webpack_require__(9), __webpack_require__(77), __webpack_require__(78); +exports.bb = bb; +exports.default = bb; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Main chart class. + * - Note: Instantiated via `bb.generate()`. + * @class Chart + * @example + * var chart = bb.generate({ + * data: { + * columns: [ + * ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"], + * ["count1", 11, 8, 7, 6, 5 ], + * ["count2", 9, 3, 6, 2, 8 ] + * ]} + * } + * @see {@link bb.generate} for the initialization. +*/ +var Chart = function Chart(config) { + (0, _classCallCheck3.default)(this, Chart); + + var $$ = new _ChartInternal2.default(this); + + this.internal = $$, $$.loadConfig(config), $$.beforeInit(config), $$.init(), this.$ = $$.getChartElements(), $$.afterInit(config), function bindThis(fn, target, argThis) { + Object.keys(fn).forEach(function (key) { + target[key] = fn[key].bind(argThis), Object.keys(fn[key]).length && bindThis(fn[key], target[key], argThis); + }); + }(Chart.prototype, this, this); +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @license MIT + * @ignore + */ + + +exports.default = Chart; +module.exports = exports["default"]; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _d3TimeFormat = __webpack_require__(4), + _d3Selection = __webpack_require__(5), + _d3Array = __webpack_require__(6), + _d3Transition = __webpack_require__(7), + _Axis = __webpack_require__(8), + _Axis2 = _interopRequireDefault(_Axis), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Internal chart class. + * - Note: Instantiated internally, not exposed for public. + * @class ChartInternal + * @ignore + * @private +*/ +var ChartInternal = function () { + function ChartInternal(api) { + (0, _classCallCheck3.default)(this, ChartInternal); + + var $$ = this; + + $$.api = api, $$.config = $$.getOptions(), $$.data = {}, $$.cache = {}, $$.axes = {}; + } + + return ChartInternal.prototype.beforeInit = function beforeInit() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.onbeforeinit, $$); + }, ChartInternal.prototype.afterInit = function afterInit() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.onafterinit, $$); + }, ChartInternal.prototype.init = function init() { + var $$ = this, + config = $$.config, + convertedData = void 0; + + + if ($$.initParams(), config.data_url) $$.convertUrlToData(config.data_url, config.data_mimeType, config.data_headers, config.data_keys, $$.initWithData);else if (config.data_json) convertedData = $$.convertJsonToData(config.data_json, config.data_keys);else if (config.data_rows) convertedData = $$.convertRowsToData(config.data_rows);else if (config.data_columns) convertedData = $$.convertColumnsToData(config.data_columns);else throw Error("url or json or rows or columns is required."); + + convertedData && $$.initWithData(convertedData); + }, ChartInternal.prototype.initParams = function initParams() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated; + $$.datetimeId = "bb-" + +new Date(), $$.clipId = $$.datetimeId + "-clip", $$.clipIdForXAxis = $$.clipId + "-xaxis", $$.clipIdForYAxis = $$.clipId + "-yaxis", $$.clipIdForGrid = $$.clipId + "-grid", $$.clipIdForSubchart = $$.clipId + "-subchart", $$.clipPath = $$.getClipPath($$.clipId), $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis), $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid), $$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart), $$.dragStart = null, $$.dragging = !1, $$.flowing = !1, $$.cancelClick = !1, $$.mouseover = !1, $$.transiting = !1, $$.color = $$.generateColor(), $$.levelColor = $$.generateLevelColor(), $$.point = $$.generatePoint(), $$.extraLineClasses = $$.generateExtraLineClass(), $$.dataTimeFormat = config.data_xLocaltime ? _d3TimeFormat.timeParse : _d3TimeFormat.utcParse, $$.axisTimeFormat = config.axis_x_localtime ? _d3TimeFormat.timeFormat : _d3TimeFormat.utcFormat, $$.defaultAxisTimeFormat = function (d) { + var specifier = d.getMilliseconds() && ".%L" || d.getSeconds() && ".:%S" || d.getMinutes() && "%I:%M" || d.getHours() && "%I %p" || d.getDay() && d.getDate() !== 1 && "%-m/%-d" || d.getDate() !== 1 && "%b %d" || d.getMonth() && "%-m/%-d" || "%Y/%-m/%-d"; + + return $$.axisTimeFormat(specifier)(d); + }, $$.hiddenTargetIds = [], $$.hiddenLegendIds = [], $$.focusedTargetIds = [], $$.defocusedTargetIds = [], $$.xOrient = isRotated ? "left" : "bottom", $$.yOrient = isRotated ? config.axis_y_inner ? "top" : "bottom" : config.axis_y_inner ? "right" : "left", $$.y2Orient = isRotated ? config.axis_y2_inner ? "bottom" : "top" : config.axis_y2_inner ? "left" : "right", $$.subXOrient = isRotated ? "left" : "bottom", $$.isLegendRight = config.legend_position === "right", $$.isLegendInset = config.legend_position === "inset", $$.isLegendTop = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "top-right", $$.isLegendLeft = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "bottom-left", $$.legendStep = 0, $$.legendItemWidth = 0, $$.legendItemHeight = 0, $$.currentMaxTickWidths = { + x: 0, y: 0, y2: 0 + }, $$.rotated_padding_left = 30, $$.rotated_padding_right = isRotated && !config.axis_x_show ? 0 : 30, $$.rotated_padding_top = 5, $$.withoutFadeIn = {}, $$.inputType = $$.convertInputType(), $$.axes.subx = (0, _d3Selection.selectAll)([]); + }, ChartInternal.prototype.initWithData = function initWithData(data) { + var $$ = this, + config = $$.config; + $$.axis = new _Axis2.default($$), config.subchart_show && $$.initBrush(), config.zoom_enabled && ($$.initZoom(), $$.initZoomBehaviour()); + + + var bindto = { + element: config.bindto, + classname: "bb" + }; + + if ((0, _util.isObject)(config.bindto) && (bindto.element = config.bindto.element || "#chart", bindto.classname = config.bindto.classname || bindto.classname), $$.selectChart = (0, _util.isFunction)(bindto.element.node) ? config.bindto.element : (0, _d3Selection.select)(bindto.element ? bindto.element : []), $$.selectChart.html("").classed(bindto.classname, !0), $$.data.xs = {}, $$.data.targets = $$.convertDataToTargets(data), config.data_filter && ($$.data.targets = $$.data.targets.filter(config.data_filter)), config.data_hide && $$.addHiddenTargetIds(config.data_hide === !0 ? $$.mapToIds($$.data.targets) : config.data_hide), config.legend_hide && $$.addHiddenLegendIds(config.legend_hide === !0 ? $$.mapToIds($$.data.targets) : config.legend_hide), $$.hasType("gauge") && (config.legend_show = !1), $$.updateSizes(), $$.updateScales(), $$.x.domain((0, _d3Array.extent)($$.getXDomain($$.data.targets))), $$.y.domain($$.getYDomain($$.data.targets, "y")), $$.y2.domain($$.getYDomain($$.data.targets, "y2")), $$.subX.domain($$.x.domain()), $$.subY.domain($$.y.domain()), $$.subY2.domain($$.y2.domain()), $$.orgXDomain = $$.x.domain(), $$.svg = $$.selectChart.append("svg").style("overflow", "hidden").style("display", "block"), config.interaction_enabled && $$.inputType) { + var isTouch = $$.inputType === "touch"; + + $$.svg.on(isTouch ? "touchstart" : "mouseenter", function () { + return (0, _util.callFn)(config.onover, $$); + }).on(isTouch ? "touchend" : "mouseleave", function () { + return (0, _util.callFn)(config.onout, $$); + }); + } + + config.svg_classname && $$.svg.attr("class", config.svg_classname), $$.defs = $$.svg.append("defs"), $$.clipChart = $$.appendClip($$.defs, $$.clipId), $$.clipXAxis = $$.appendClip($$.defs, $$.clipIdForXAxis), $$.clipYAxis = $$.appendClip($$.defs, $$.clipIdForYAxis), $$.clipGrid = $$.appendClip($$.defs, $$.clipIdForGrid), $$.clipSubchart = $$.appendClip($$.defs, $$.clipIdForSubchart), (0, _util.isFunction)(config.color_tiles) && $$.patterns && $$.patterns.forEach(function (p) { + return $$.defs.append(function () { + return p.node; + }); + }), $$.updateSvgSize(); + + + // Define regions + var main = $$.svg.append("g").attr("transform", $$.getTranslate("main")); + + // data.onmin/max callback + if ($$.main = main, config.subchart_show && $$.initSubchart && $$.initSubchart(), $$.initTooltip && $$.initTooltip(), $$.initLegend && $$.initLegend(), $$.initTitle && $$.initTitle(), main.append("text").attr("class", _classes2.default.text + " " + _classes2.default.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers. + .attr("dominant-baseline", "middle"), $$.initRegion(), $$.initGrid(), config.clipPath || $$.axis.init(), main.append("g").attr("class", _classes2.default.chart).attr("clip-path", $$.clipPath), config.grid_lines_front && $$.initGridLines(), config.grid_front && $$.initXYFocusGrid(), $$.initEventRect(), $$.initChartElements(), main.insert("rect", config.zoom_privileged ? null : "g." + _classes2.default.regions).attr("class", _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height).style("opacity", "0").on("dblclick.zoom", null), config.axis_x_extent && $$.brush.scale($$.getDefaultExtent()), config.clipPath && $$.axis.init(), $$.updateTargets($$.data.targets), $$.updateDimension(), config.oninit.call($$), $$.redraw({ + withTransition: !1, + withTransform: !0, + withUpdateXDomain: !0, + withUpdateOrgXDomain: !0, + withTransitionForAxis: !1, + initializing: !0 + }), config.data_onmin || config.data_onmax) { + var minMax = $$.getMinMaxData(); + + (0, _util.callFn)(config.data_onmin, $$, minMax.min), (0, _util.callFn)(config.data_onmax, $$, minMax.max); + } + + // Bind resize event + $$.bindResize(), $$.api.element = $$.selectChart.node(); + }, ChartInternal.prototype.initChartElements = function initChartElements() { + var _this = this; + + ["Pie", "Bar", "Line", "Arc", "Gauge", "Bubble", "Radar", "Text"].forEach(function (v) { + var method = "init" + v; + + _this[method] && _this[method](); + }); + }, ChartInternal.prototype.getChartElements = function getChartElements() { + var $$ = this; + + return { + chart: $$.selectChart, + svg: $$.svg, + defs: $$.defs, + main: $$.main, + tooltip: $$.tooltip, + legend: $$.legend, + title: $$.title, + grid: $$.grid, + arc: $$.arcs, + bar: { + bars: $$.mainBar + }, + line: { + lines: $$.mainLine, + areas: $$.mainArea, + circles: $$.mainCircle + }, + text: { + texts: $$.texts + } + }; + }, ChartInternal.prototype.smoothLines = function smoothLines(el, type) { + type === "grid" && el.each(function () { + var g = (0, _d3Selection.select)(this), + _map = ["x1", "x2", "y1", "y2"].map(function (v) { + return Math.ceil(g.attr(v)); + }), + x1 = _map[0], + x2 = _map[1], + y1 = _map[2], + y2 = _map[3];g.attr({ x1: x1, x2: x2, y1: y1, y2: y2 }); + }); + }, ChartInternal.prototype.updateSizes = function updateSizes() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + hasArc = $$.hasArcType(), + legendHeight = $$.legend ? $$.getLegendHeight() : 0, + legendWidth = $$.legend ? $$.getLegendWidth() : 0, + legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight, + xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight("x"), + subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + xAxisHeight : 0; + $$.currentWidth = $$.getCurrentWidth(), $$.currentHeight = $$.getCurrentHeight(), $$.margin = isRotated ? { + top: $$.getHorizontalAxisHeight("y2") + $$.getCurrentPaddingTop(), + right: hasArc ? 0 : $$.getCurrentPaddingRight(), + bottom: $$.getHorizontalAxisHeight("y") + legendHeightForBottom + $$.getCurrentPaddingBottom(), + left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft()) + } : { + top: 4 + $$.getCurrentPaddingTop(), // for top tick text + right: hasArc ? 0 : $$.getCurrentPaddingRight(), + bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(), + left: hasArc ? 0 : $$.getCurrentPaddingLeft() + }, $$.margin2 = isRotated ? { + top: $$.margin.top, + right: NaN, + bottom: 20 + legendHeightForBottom, + left: $$.rotated_padding_left + } : { + top: $$.currentHeight - subchartHeight - legendHeightForBottom, + right: NaN, + bottom: xAxisHeight + legendHeightForBottom, + left: $$.margin.left + }, $$.margin3 = { + top: 0, + right: NaN, + bottom: 0, + left: 0 + }, $$.updateSizeForLegend && $$.updateSizeForLegend(legendHeight, legendWidth), $$.width = $$.currentWidth - $$.margin.left - $$.margin.right, $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom, $$.width < 0 && ($$.width = 0), $$.height < 0 && ($$.height = 0), $$.width2 = isRotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width, $$.height2 = isRotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom, $$.width2 < 0 && ($$.width2 = 0), $$.height2 < 0 && ($$.height2 = 0), $$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0), $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10), $$.hasType("gauge") && !config.gauge_fullCircle && ($$.arcHeight += $$.height - $$.getGaugeLabelHeight()), $$.updateRadius && $$.updateRadius(), $$.isLegendRight && hasArc && ($$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1); + }, ChartInternal.prototype.updateTargets = function updateTargets(targets) { + var $$ = this; + + // Text + $$.updateTargetsForText(targets), $$.updateTargetsForBar(targets), $$.updateTargetsForLine(targets), $$.hasArcType(targets) && ($$.hasType("radar") ? $$.updateTargetsForRadar(targets) : $$.updateTargetsForArc(targets)), $$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets), $$.showTargets(); + }, ChartInternal.prototype.showTargets = function showTargets() { + var $$ = this; + + $$.svg.selectAll("." + _classes2.default.target).filter(function (d) { + return $$.isTargetToShow(d.id); + }).transition().duration($$.config.transition_duration).style("opacity", "1"); + }, ChartInternal.prototype.getWithOption = function getWithOption(options) { + var withOptions = { + Y: !0, + Subchart: !0, + Transition: !0, + EventRect: !0, + Dimension: !0, + TrimXDomain: !0, + Transform: !1, + UpdateXDomain: !1, + UpdateOrgXDomain: !1, + Legend: !1, + UpdateXAxis: "UpdateXDomain", + TransitionForExit: "Transition", + TransitionForAxis: "Transition" + }; + + return Object.keys(withOptions).forEach(function (key) { + var defVal = withOptions[key]; + + (0, _util.isString)(defVal) && (defVal = withOptions[defVal]), withOptions[key] = (0, _util.getOption)(options, "with" + key, defVal); + }), withOptions; + }, ChartInternal.prototype.redraw = function redraw() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + transitionsValue = arguments[1], + $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated, + hasRadar = $$.hasType("radar"), + areaIndices = $$.getShapeIndices($$.isAreaType), + barIndices = $$.getShapeIndices($$.isBarType), + lineIndices = $$.getShapeIndices($$.isLineType), + hideAxis = $$.hasArcType(), + targetsToShow = $$.filterTargetsToShow($$.data.targets), + xv = $$.xv.bind($$), + tickValues = void 0, + intervalForCulling = void 0, + xDomainForZoom = void 0, + wth = $$.getWithOption(options), + duration = wth.Transition ? config.transition_duration : 0, + durationForExit = wth.TransitionForExit ? duration : 0, + durationForAxis = wth.TransitionForAxis ? duration : 0, + transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis); + + + // show/hide if manual culling needed + if (options.initializing && config.tooltip_init_show || $$.inputType !== "touch" || $$.hideTooltip(), wth.Legend && config.legend_show && !config.legend_contents_bindto ? $$.updateLegend($$.mapToIds($$.data.targets), options, transitions) : wth.Dimension && $$.updateDimension(!0), $$.isCategorized() && targetsToShow.length === 0 && $$.x.domain([0, $$.axes.x.selectAll(".tick").size()]), targetsToShow.length ? ($$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain), !config.axis_x_tick_values && (tickValues = $$.axis.updateXAxisTickValues(targetsToShow))) : ($$.xAxis.tickValues([]), $$.subXAxis.tickValues([])), config.zoom_rescale && !options.flow && (xDomainForZoom = $$.x.orgDomain()), ["y", "y2"].forEach(function (key) { + var axis = $$[key], + tickValues = config["axis_" + key + "_tick_values"], + tickCount = config["axis_" + key + "_tick_count"]; + + + if (axis.domain($$.getYDomain(targetsToShow, key, xDomainForZoom)), !tickValues && tickCount) { + var domain = axis.domain(); + + $$[key + "Axis"].tickValues($$.axis.generateTickValues(domain, domain.every(function (v) { + return v === 0; + }) ? 1 : tickCount, $$.isTimeSeriesY())); + } + }), $$.axis.redraw(transitions, hideAxis), $$.axis.updateLabels(wth.Transition), (wth.UpdateXDomain || wth.UpdateXAxis) && targetsToShow.length) if (config.axis_x_tick_culling && tickValues) { + for (var _i = 1; _i < tickValues.length; _i++) if (tickValues.length / _i < config.axis_x_tick_culling_max) { + intervalForCulling = _i; + + break; + } + + $$.svg.selectAll("." + _classes2.default.axisX + " .tick text").each(function (e) { + var index = tickValues.indexOf(e); + + index >= 0 && (0, _d3Selection.select)(this).style("display", index % intervalForCulling ? "none" : "block"); + }); + } else $$.svg.selectAll("." + _classes2.default.axisX + " .tick text").style("display", "block"); + + // setup drawer - MEMO: these must be called after axis updated + var drawArea = $$.generateDrawArea ? $$.generateDrawArea(areaIndices, !1) : undefined, + drawBar = $$.generateDrawBar ? $$.generateDrawBar(barIndices) : undefined, + drawLine = $$.generateDrawLine ? $$.generateDrawLine(lineIndices, !1) : undefined, + xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !0), + yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !1); + wth.Y && ($$.subY.domain($$.getYDomain(targetsToShow, "y")), $$.subY2.domain($$.getYDomain(targetsToShow, "y2"))), $$.updateXgridFocus(), main.select("text." + _classes2.default.text + "." + _classes2.default.empty).attr("x", $$.width / 2).attr("y", $$.height / 2).text(config.data_empty_label_text).transition().style("opacity", targetsToShow.length ? 0 : 1), $$.updateGrid(duration), $$.updateRegion(duration), $$.updateBar(durationForExit), $$.updateLine(durationForExit), $$.updateArea(durationForExit), $$.updateCircle(), $$.hasDataLabel() && $$.updateText(durationForExit), $$.redrawTitle && $$.redrawTitle(), $$.redrawArc && $$.redrawArc(duration, durationForExit, wth.Transform), hasRadar && $$.redrawRadar(duration, durationForExit), config.subchart_show && $$.redrawSubchart && $$.redrawSubchart(wth.Subchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices), main.selectAll("." + _classes2.default.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(), config.interaction_enabled && !options.flow && wth.EventRect && ($$.redrawEventRect(), $$.bindZoomEvent()), $$.updateCircleY(); + + + // generate circle x/y functions depending on updated params + var cx = (hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX).bind($$), + cy = (hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY).bind($$), + flow = options.flow && $$.generateFlow({ + targets: targetsToShow, + flow: options.flow, + duration: options.flow.duration, + drawBar: drawBar, + drawLine: drawLine, + drawArea: drawArea, + cx: cx, + cy: cy, + xv: xv, + xForText: xForText, + yForText: yForText + }), + isTransition = (duration || flow) && $$.isTabVisible(), + redrawList = [$$.redrawBar(drawBar, isTransition), $$.redrawLine(drawLine, isTransition), $$.redrawArea(drawArea, isTransition), $$.redrawCircle(cx, cy, isTransition, flow), $$.redrawText(xForText, yForText, options.flow, isTransition), $$.redrawRegion(isTransition), $$.redrawGrid(isTransition)], + afterRedraw = flow || config.onrendered ? function () { + flow && flow(), (0, _util.callFn)(config.onrendered, $$); + } : null; + + // generate flow + + + // redraw list + + + // callback function after redraw ends + + if (afterRedraw) + // Only use transition when current tab is visible. + if (isTransition) { + // Wait for end of transitions for callback + var waitForDraw = $$.generateWait(); + + // transition should be derived from one transition + (0, _d3Transition.transition)().duration(duration).each(function () { + redrawList.reduce(function (acc, t1) { + return acc.concat(t1); + }, []).forEach(function (t) { + return waitForDraw.add(t); + }); + }).call(waitForDraw, afterRedraw); + } else afterRedraw(); + + // update fadein condition + $$.mapToIds($$.data.targets).forEach(function (id) { + $$.withoutFadeIn[id] = !0; + }); + }, ChartInternal.prototype.updateAndRedraw = function updateAndRedraw() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + $$ = this, + config = $$.config, + transitions = void 0; + options.withTransition = (0, _util.getOption)(options, "withTransition", !0), options.withTransform = (0, _util.getOption)(options, "withTransform", !1), options.withLegend = (0, _util.getOption)(options, "withLegend", !1), options.withUpdateXDomain = !0, options.withUpdateOrgXDomain = !0, options.withTransitionForExit = !1, options.withTransitionForTransform = (0, _util.getOption)(options, "withTransitionForTransform", options.withTransition), $$.updateSizes(), options.withLegend && config.legend_show || (transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0), $$.updateScales(), $$.updateSvgSize(), $$.transformAll(options.withTransitionForTransform, transitions)), $$.redraw(options, transitions); + }, ChartInternal.prototype.redrawWithoutRescale = function redrawWithoutRescale() { + this.redraw({ + withY: !1, + withSubchart: !1, + withEventRect: !1, + withTransitionForAxis: !1 + }); + }, ChartInternal.prototype.isTimeSeries = function isTimeSeries() { + return this.config.axis_x_type === "timeseries"; + }, ChartInternal.prototype.isCategorized = function isCategorized() { + return this.config.axis_x_type.indexOf("category") >= 0 || this.hasType("radar"); + }, ChartInternal.prototype.isCustomX = function isCustomX() { + var $$ = this, + config = $$.config; + + + return !$$.isTimeSeries() && (config.data_x || (0, _util.notEmpty)(config.data_xs)); + }, ChartInternal.prototype.isTimeSeriesY = function isTimeSeriesY() { + return this.config.axis_y_type === "timeseries"; + }, ChartInternal.prototype.getTranslate = function getTranslate(target) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + x = void 0, + y = void 0; + + + if (target === "main") x = (0, _util.asHalfPixel)($$.margin.left), y = (0, _util.asHalfPixel)($$.margin.top);else if (target === "context") x = (0, _util.asHalfPixel)($$.margin2.left), y = (0, _util.asHalfPixel)($$.margin2.top);else if (target === "legend") x = $$.margin3.left, y = $$.margin3.top;else if (target === "x") x = 0, y = isRotated ? 0 : $$.height;else if (target === "y") x = 0, y = isRotated ? $$.height : 0;else if (target === "y2") x = isRotated ? 0 : $$.width, y = isRotated ? 1 : 0;else if (target === "subx") x = 0, y = isRotated ? 0 : $$.height2;else if (target === "arc") x = $$.arcWidth / 2, y = $$.arcHeight / 2;else if (target === "radar") { + var diff = ($$.arcWidth - $$.arcHeight) / 2; + + x = Math.max(diff, 0) + 4, y = diff < 0 ? Math.abs(diff) : (0, _util.asHalfPixel)($$.margin.top); + } + + return "translate(" + x + ", " + y + ")"; + }, ChartInternal.prototype.initialOpacity = function initialOpacity(d) { + return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? "1" : "0"; + }, ChartInternal.prototype.initialOpacityForCircle = function initialOpacityForCircle(d) { + return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : "0"; + }, ChartInternal.prototype.opacityForCircle = function opacityForCircle(d) { + var opacity = this.config.point_show ? "1" : "0"; + + return (0, _util.isValue)(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity : "0"; + }, ChartInternal.prototype.opacityForText = function opacityForText() { + return this.hasDataLabel() ? "1" : "0"; + }, ChartInternal.prototype.xx = function xx(d) { + var fn = this.config.zoom_enabled && this.zoomScale ? this.zoomScale : this.x; + + return d ? fn(d.x) : null; + }, ChartInternal.prototype.xv = function xv(d) { + var $$ = this, + value = $$.getBaseValue(d); + + + return $$.isTimeSeries() ? value = $$.parseDate(value) : $$.isCategorized() && (0, _util.isString)(value) && (value = $$.config.axis_x_categories.indexOf(value)), Math.ceil($$.x(value)); + }, ChartInternal.prototype.yv = function yv(d) { + var $$ = this, + yScale = d.axis && d.axis === "y2" ? $$.y2 : $$.y; + + + return Math.ceil(yScale($$.getBaseValue(d))); + }, ChartInternal.prototype.subxx = function subxx(d) { + return d ? this.subX(d.x) : null; + }, ChartInternal.prototype.transformMain = function transformMain(withTransition, transitions) { + var $$ = this, + xAxis = void 0, + yAxis = void 0, + y2Axis = void 0; + transitions && transitions.axisX ? xAxis = transitions.axisX : (xAxis = $$.main.select("." + _classes2.default.axisX), withTransition && (xAxis = xAxis.transition())), transitions && transitions.axisY ? yAxis = transitions.axisY : (yAxis = $$.main.select("." + _classes2.default.axisY), withTransition && (yAxis = yAxis.transition())), transitions && transitions.axisY2 ? y2Axis = transitions.axisY2 : (y2Axis = $$.main.select("." + _classes2.default.axisY2), withTransition && (y2Axis = y2Axis.transition())), (withTransition ? $$.main.transition() : $$.main).attr("transform", $$.getTranslate("main")), xAxis.attr("transform", $$.getTranslate("x")), yAxis.attr("transform", $$.getTranslate("y")), y2Axis.attr("transform", $$.getTranslate("y2")), $$.main.select("." + _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc")); + }, ChartInternal.prototype.transformAll = function transformAll(withTransition, transitions) { + var $$ = this; + + $$.transformMain(withTransition, transitions), $$.config.subchart_show && $$.transformContext(withTransition, transitions), $$.legend && $$.transformLegend(withTransition); + }, ChartInternal.prototype.updateSvgSize = function updateSvgSize() { + var $$ = this, + brush = $$.svg.select("." + _classes2.default.brush + " .overlay"), + brushHeight = brush.size() ? brush.attr("height") : 0; + $$.svg.attr("width", $$.currentWidth).attr("height", $$.currentHeight), $$.svg.selectAll(["#" + $$.clipId, "#" + $$.clipIdForGrid]).select("rect").attr("width", $$.width).attr("height", $$.height), $$.svg.select("#" + $$.clipIdForXAxis).select("rect").attr("x", $$.getXAxisClipX.bind($$)).attr("y", $$.getXAxisClipY.bind($$)).attr("width", $$.getXAxisClipWidth.bind($$)).attr("height", $$.getXAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForYAxis).select("rect").attr("x", $$.getYAxisClipX.bind($$)).attr("y", $$.getYAxisClipY.bind($$)).attr("width", $$.getYAxisClipWidth.bind($$)).attr("height", $$.getYAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForSubchart).select("rect").attr("width", $$.width).attr("height", brushHeight), $$.svg.select("." + _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height), $$.brush && $$.brush.scale($$.subX, brushHeight); + }, ChartInternal.prototype.updateDimension = function updateDimension(withoutAxis) { + var $$ = this; + + withoutAxis || ($$.config.axis_rotated ? ($$.axes.x.call($$.xAxis), $$.axes.subx.call($$.subXAxis)) : ($$.axes.y.call($$.yAxis), $$.axes.y2.call($$.y2Axis))), $$.updateSizes(), $$.updateScales(withoutAxis), $$.updateSvgSize(), $$.transformAll(!1); + }, ChartInternal.prototype.bindResize = function bindResize() { + var $$ = this, + config = $$.config; + $$.resizeFunction = $$.generateResize(), $$.resizeFunction.add(function () { + return config.onresize.call($$); + }), config.resize_auto && $$.resizeFunction.add(function () { + (0, _util.isDefined)($$.resizeTimeout) && window.clearTimeout($$.resizeTimeout), $$.resizeTimeout = window.setTimeout(function () { + delete $$.resizeTimeout, $$.api.flush(); + }, 100); + }), $$.resizeFunction.add(function () { + return config.onresized.call($$); + }); + + + // attach resize event + // get the possible previous attached + var resizeEvents = (0, _d3Selection.select)(window).on("resize.bb"); + + resizeEvents && $$.resizeFunction.add(resizeEvents), (0, _d3Selection.select)(window).on("resize.bb", $$.resizeFunction); + }, ChartInternal.prototype.generateResize = function generateResize() { + + function callResizeFunctions() { + resizeFunctions.forEach(function (f) { + return f(); + }); + } + + var resizeFunctions = []; + + return callResizeFunctions.add = function (f) { + resizeFunctions.push(f); + }, callResizeFunctions.remove = function (f) { + for (var i = 0, len = resizeFunctions.length; i < len; i++) if (resizeFunctions[i] === f) { + resizeFunctions.splice(i, 1); + + break; + } + }, callResizeFunctions; + }, ChartInternal.prototype.endall = function endall(transition, callback) { + var n = 0; + + transition.each(function () { + return ++n; + }).on("end", function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + + --n || callback.apply.apply(callback, [this].concat(args)); + }); + }, ChartInternal.prototype.generateWait = function generateWait() { + var transitionsToWait = [], + f = function (transition, callback) { + + function loop() { + var done = 0; + + transitionsToWait.forEach(function (t) { + if (t.empty()) return void done++; + + try { + t.transition(); + } catch (e) { + done++; + } + }), timer && clearTimeout(timer), done === transitionsToWait.length ? callback && callback() : timer = setTimeout(loop, 50); + } + + var timer = void 0;loop(); + }; + + return f.add = function (transition) { + (0, _util.isArray)(transition) ? transitionsToWait = transitionsToWait.concat(transition) : transitionsToWait.push(transition); + }, f; + }, ChartInternal.prototype.parseDate = function parseDate(date) { + var $$ = this, + parsedDate = void 0; + + + return date instanceof Date ? parsedDate = date : (0, _util.isString)(date) ? parsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date) : (0, _util.isNumber)(date) && !isNaN(date) && (parsedDate = new Date(+date)), (!parsedDate || isNaN(+parsedDate)) && console && console.error && console.error("Failed to parse x '" + date + "' to Date object"), parsedDate; + }, ChartInternal.prototype.isTabVisible = function isTabVisible() { + return !document[["hidden", "mozHidden", "msHidden", "webkitHidden"].filter(function (v) { + return v in document; + })[0]]; + }, ChartInternal.prototype.convertInputType = function convertInputType() { + var $$ = this, + config = $$.config, + isMobile = $$.isMobile(), + hasMouse = config.interaction_inputType_mouse && !isMobile && "onmouseover" in window, + hasTouch = !1; + + + return config.interaction_inputType_touch && (hasTouch = "ontouchmove" in window || window.DocumentTouch && document instanceof window.DocumentTouch), hasMouse && "mouse" || hasTouch && "touch" || null; + }, ChartInternal; +}(); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @ignore + */ + + +exports.default = ChartInternal; +module.exports = exports["default"]; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__4__; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__5__; + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__6__; + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__7__; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _bb = __webpack_require__(9), + _bb2 = _interopRequireDefault(_bb), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isHorizontal = function ($$, forHorizontal) { + var isRotated = $$.config.axis_rotated; + + return forHorizontal ? isRotated : !isRotated; +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +var Axis = function () { + function Axis(owner) { + (0, _classCallCheck3.default)(this, Axis), this.owner = owner; + } + + return Axis.prototype.init = function init() { + var _this = this, + $$ = this.owner, + config = $$.config, + isRotated = config.axis_rotated, + main = $$.main; + + ["x", "y", "y2"].forEach(function (v) { + var axisStr = "axis" + (0, _util.capitalize)(v), + classAxis = _classes2.default.axis + " " + _classes2.default[axisStr], + classLabel = _classes2.default[axisStr + "Label"]; + $$.axes[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () { + var res = null; + + return v === "x" ? res = $$.clipPathForXAxis : v === "y" && config.axis_y_inner && (res = $$.clipPathForYAxis), res; + }).attr("transform", $$.getTranslate(v)).style("visibility", config["axis_" + v + "_show"] ? "visible" : "hidden"), $$.axes[v].append("text").attr("class", classLabel).attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated]).style("text-anchor", _this.textAnchorForXAxisLabel.bind(_this)); + }); + }, Axis.prototype.getXAxis = function getXAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) { + var $$ = this.owner, + config = $$.config, + isCategory = $$.isCategorized(), + axisParams = { + isCategory: isCategory, + withOuterTick: withOuterTick, + withoutTransition: withoutTransition, + config: config, + axisName: axisName, + tickMultiline: config.axis_x_tick_multiline, + tickWidth: config.axis_x_tick_width, + tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate, + tickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(), + orgXScale: $$.x + }, + axis = (0, _bb2.default)(axisParams).scale($$.zoomScale || scale).orient(orient), + newTickValues = tickValues; + + + return $$.isTimeSeries() && tickValues && !(0, _util.isFunction)(tickValues) && (newTickValues = tickValues.map(function (v) { + return $$.parseDate(v); + })), axis.tickFormat(tickFormat).tickValues(newTickValues), isCategory && (axis.tickCentered(config.axis_x_tick_centered), (0, _util.isEmpty)(config.axis_x_tick_culling) && (config.axis_x_tick_culling = !1)), axis; + }, Axis.prototype.getYAxis = function getYAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) { + var $$ = this.owner, + config = $$.config, + axisParams = { + withOuterTick: withOuterTick, + withoutTransition: withoutTransition, + config: config, + axisName: axisName, + tickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate + }, + axis = (0, _bb2.default)(axisParams).scale(scale).orient(orient).tickFormat(tickFormat); + + + return $$.isTimeSeriesY() ? + // https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time + axis.ticks(config.axis_y_tick_time_value) : axis.tickValues(tickValues), axis; + }, Axis.prototype.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) { + var $$ = this.owner, + config = $$.config, + xTickCount = config.axis_x_tick_count, + tickValues = void 0; + + + return (config.axis_x_tick_fit || xTickCount) && (tickValues = this.generateTickValues($$.mapTargetsToUniqueXs(targets), xTickCount, $$.isTimeSeries())), axis ? axis.tickValues(tickValues) : ($$.xAxis.tickValues(tickValues), $$.subXAxis.tickValues(tickValues)), tickValues; + }, Axis.prototype.getId = function getId(id) { + var config = this.owner.config; + + return id in config.data_axes ? config.data_axes[id] : "y"; + }, Axis.prototype.getXAxisTickFormat = function getXAxisTickFormat() { + var $$ = this.owner, + config = $$.config, + tickFormat = config.axis_x_tick_format, + isTimeSeries = $$.isTimeSeries(), + isCategorized = $$.isCategorized(), + format = void 0; + + + return tickFormat ? (0, _util.isFunction)(tickFormat) ? format = tickFormat : isTimeSeries && (format = function (date) { + return date ? $$.axisTimeFormat(tickFormat)(date) : ""; + }) : format = isTimeSeries ? $$.defaultAxisTimeFormat : isCategorized ? $$.categoryName : function (v) { + return v < 0 ? v.toFixed(0) : v; + }, (0, _util.isFunction)(format) ? function (v) { + return format.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]); + } : format; + }, Axis.prototype.getTickValues = function getTickValues(type) { + var $$ = this.owner, + tickValues = $$.config["axis_" + type + "_tick_values"], + axis = $$[type + "Axis"]; + + + return tickValues || (axis ? axis.tickValues() : undefined); + }, Axis.prototype.getXAxisTickValues = function getXAxisTickValues() { + return this.getTickValues("x"); + }, Axis.prototype.getYAxisTickValues = function getYAxisTickValues() { + return this.getTickValues("y"); + }, Axis.prototype.getY2AxisTickValues = function getY2AxisTickValues() { + return this.getTickValues("y2"); + }, Axis.prototype.getLabelOptionByAxisId = function getLabelOptionByAxisId(axisId) { + return this.owner.config["axis_" + axisId + "_label"]; + }, Axis.prototype.getLabelText = function getLabelText(axisId) { + var option = this.getLabelOptionByAxisId(axisId); + + return (0, _util.isString)(option) ? option : option ? option.text : null; + }, Axis.prototype.setLabelText = function setLabelText(axisId, text) { + var $$ = this.owner, + config = $$.config, + option = this.getLabelOptionByAxisId(axisId); + (0, _util.isString)(option) ? config["axis_" + axisId + "_label"] = text : option && (option.text = text); + }, Axis.prototype.getLabelPosition = function getLabelPosition(axisId, defaultPosition) { + var isRotated = this.owner.config.axis_rotated, + option = this.getLabelOptionByAxisId(axisId), + position = (0, _util.isObjectType)(option) && option.position ? option.position : defaultPosition[+!isRotated], + has = function (v) { + return !!~position.indexOf(v); + }; + + return { + isInner: has("inner"), + isOuter: has("outer"), + isLeft: has("left"), + isCenter: has("center"), + isRight: has("right"), + isTop: has("top"), + isMiddle: has("middle"), + isBottom: has("bottom") + }; + }, Axis.prototype.getXAxisLabelPosition = function getXAxisLabelPosition() { + return this.getLabelPosition("x", ["inner-top", "inner-right"]); + }, Axis.prototype.getYAxisLabelPosition = function getYAxisLabelPosition() { + return this.getLabelPosition("y", ["inner-right", "inner-top"]); + }, Axis.prototype.getY2AxisLabelPosition = function getY2AxisLabelPosition() { + return this.getLabelPosition("y2", ["inner-right", "inner-top"]); + }, Axis.prototype.getLabelPositionById = function getLabelPositionById(id) { + return this["get" + id.toUpperCase() + "AxisLabelPosition"](); + }, Axis.prototype.textForXAxisLabel = function textForXAxisLabel() { + return this.getLabelText("x"); + }, Axis.prototype.textForYAxisLabel = function textForYAxisLabel() { + return this.getLabelText("y"); + }, Axis.prototype.textForY2AxisLabel = function textForY2AxisLabel() { + return this.getLabelText("y2"); + }, Axis.prototype.xForAxisLabel = function xForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + x = position.isMiddle ? -$$.height / 2 : 0; + + + return isHorizontal($$, forHorizontal) ? x = position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width : position.isBottom && (x = -$$.height), x; + }, Axis.prototype.dxForAxisLabel = function dxForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + dx = position.isBottom ? "0.5em" : "0"; + + + return isHorizontal($$, forHorizontal) ? dx = position.isLeft ? "0.5em" : position.isRight ? "-0.5em" : "0" : position.isTop && (dx = "-0.5em"), dx; + }, Axis.prototype.textAnchorForAxisLabel = function textAnchorForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + anchor = position.isMiddle ? "middle" : "end"; + + + return isHorizontal($$, forHorizontal) ? anchor = position.isLeft ? "start" : position.isCenter ? "middle" : "end" : position.isBottom && (anchor = "start"), anchor; + }, Axis.prototype.xForXAxisLabel = function xForXAxisLabel() { + return this.xForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.xForYAxisLabel = function xForYAxisLabel() { + return this.xForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.xForY2AxisLabel = function xForY2AxisLabel() { + return this.xForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.dxForXAxisLabel = function dxForXAxisLabel() { + return this.dxForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.dxForYAxisLabel = function dxForYAxisLabel() { + return this.dxForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.dxForY2AxisLabel = function dxForY2AxisLabel() { + return this.dxForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.dyForXAxisLabel = function dyForXAxisLabel() { + var $$ = this.owner, + config = $$.config, + isInner = this.getXAxisLabelPosition().isInner, + xHeight = config.axis_x_height; + return config.axis_rotated ? isInner ? "1.2em" : -25 - this.getMaxTickWidth("x") : isInner ? "-0.5em" : xHeight ? xHeight - 10 : "3em"; + }, Axis.prototype.dyForYAxisLabel = function dyForYAxisLabel() { + var $$ = this.owner, + isInner = this.getYAxisLabelPosition().isInner; + return $$.config.axis_rotated ? isInner ? "-0.5em" : "3em" : isInner ? "1.2em" : -10 - ($$.config.axis_y_inner ? 0 : this.getMaxTickWidth("y") + 10); + }, Axis.prototype.dyForY2AxisLabel = function dyForY2AxisLabel() { + var $$ = this.owner, + isInner = this.getY2AxisLabelPosition().isInner; + return $$.config.axis_rotated ? isInner ? "1.2em" : "-2.2em" : isInner ? "-0.5em" : 15 + ($$.config.axis_y2_inner ? 0 : this.getMaxTickWidth("y2") + 15); + }, Axis.prototype.textAnchorForXAxisLabel = function textAnchorForXAxisLabel() { + return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.textAnchorForYAxisLabel = function textAnchorForYAxisLabel() { + return this.textAnchorForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.textAnchorForY2AxisLabel = function textAnchorForY2AxisLabel() { + return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) { + var $$ = this.owner, + config = $$.config, + currentTickMax = $$.currentMaxTickWidths, + maxWidth = 0; + + + if (withoutRecompute && currentTickMax[id]) return currentTickMax[id]; + + if ($$.svg) { + var isYAxis = /^y2?$/.test(id), + targetsToShow = $$.filterTargetsToShow($$.data.targets), + getFrom = isYAxis ? "getY" : "getX", + scale = $$[id].copy().domain($$[getFrom + "Domain"](targetsToShow, id)), + axis = this[getFrom + "Axis"](id, scale, $$[id + "Orient"], isYAxis ? config["axis_" + id + "_tick_format"] : $$.xAxisTickFormat, null, !1, !0, !0); + isYAxis || this.updateXAxisTickValues(targetsToShow, axis); + + + var dummy = $$.selectChart.append("svg").style("visibility", "hidden"); + + dummy.call(axis).selectAll("text").each(function () { + maxWidth = Math.max(maxWidth, this.getBoundingClientRect().width); + }), dummy.remove(); + } + + return maxWidth > 0 && (currentTickMax[id] = maxWidth), currentTickMax[id]; + }, Axis.prototype.updateLabels = function updateLabels(withTransition) { + var _this2 = this, + $$ = this.owner, + labels = { + X: $$.main.select("." + _classes2.default.axisX + " ." + _classes2.default.axisXLabel), + Y: $$.main.select("." + _classes2.default.axisY + " ." + _classes2.default.axisYLabel), + Y2: $$.main.select("." + _classes2.default.axisY2 + " ." + _classes2.default.axisY2Label) + }; + + Object.keys(labels).forEach(function (v) { + var node = labels[v], + axisLabel = v + "AxisLabel"; + (withTransition ? node.transition() : node).attr("x", _this2["xFor" + axisLabel].bind(_this2)).attr("dx", _this2["dxFor" + axisLabel].bind(_this2)).attr("dy", _this2["dyFor" + axisLabel].bind(_this2)).text(_this2["textFor" + axisLabel].bind(_this2)); + }); + }, Axis.prototype.getPadding = function getPadding(padding, key, defaultValue, domainLength) { + var p = (0, _util.isNumber)(padding) ? padding : padding[key]; + + // assume padding is pixels if unit is not specified + return (0, _util.isValue)(p) ? padding.unit === "ratio" ? padding[key] * domainLength : this.convertPixelsToAxisPadding(p, domainLength) : defaultValue; + }, Axis.prototype.convertPixelsToAxisPadding = function convertPixelsToAxisPadding(pixels, domainLength) { + var $$ = this.owner, + length = $$.config.axis_rotated ? $$.width : $$.height; + + + return domainLength * (pixels / length); + }, Axis.prototype.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) { + var tickValues = values, + start = void 0, + end = void 0, + count = void 0, + interval = void 0, + i = void 0, + tickValue = void 0; + + + if (tickCount) { + var targetCount = (0, _util.isFunction)(tickCount) ? tickCount() : tickCount; + + // compute ticks according to tickCount + if (targetCount === 1) tickValues = [values[0]];else if (targetCount === 2) tickValues = [values[0], values[values.length - 1]];else if (targetCount > 2) { + + for (count = targetCount - 2, start = values[0], end = values[values.length - 1], interval = (end - start) / (count + 1), tickValues = [start], i = 0; i < count; i++) tickValue = +start + interval * (i + 1), tickValues.push(forTimeSeries ? new Date(tickValue) : tickValue); + + tickValues.push(end); + } + } + + return forTimeSeries || (tickValues = tickValues.sort(function (a, b) { + return a - b; + })), tickValues; + }, Axis.prototype.generateTransitions = function generateTransitions(duration) { + var $$ = this.owner, + axes = $$.axes, + _map = ["x", "y", "y2", "subx"].map(function (v) { + return duration ? axes[v].transition().duration(duration) : axes[v]; + }), + axisX = _map[0], + axisY = _map[1], + axisY2 = _map[2], + axisSubX = _map[3]; + + return { axisX: axisX, axisY: axisY, axisY2: axisY2, axisSubX: axisSubX }; + }, Axis.prototype.redraw = function redraw(transitions, isHidden) { + var $$ = this.owner, + opacity = isHidden ? "0" : "1"; + ["x", "y", "y2", "subx"].forEach(function (v) { + $$.axes[v].style("opacity", opacity); + }), transitions.axisX.call($$.xAxis), transitions.axisY.call($$.yAxis), transitions.axisY2.call($$.y2Axis), transitions.axisSubX.call($$.subXAxis); + }, Axis; +}(); + +exports.default = Axis; +module.exports = exports["default"]; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +exports.default = function () { + + function axisX(selection, x) { + selection.attr("transform", function (d) { + return "translate(" + Math.ceil(x(d) + tickOffset) + ", 0)"; + }); + } + + function axisY(selection, y) { + selection.attr("transform", function (d) { + return "translate(0," + Math.ceil(y(d)) + ")"; + }); + } + + function scaleExtent(domain) { + var start = domain[0], + stop = domain[domain.length - 1]; + + + return start < stop ? [start, stop] : [stop, start]; + } + + function generateTicks(scale) { + var ticks = []; + + if (scale.ticks) return scale.ticks.apply(scale, tickArguments ? (0, _util.toArray)(tickArguments) : []).map(function (v) { + return ( + // round the tick value if is number + (0, _util.isString)(v) && (0, _util.isNumber)(v) && !isNaN(v) && Math.round(v * 10) / 10 || v + ); + }); + + for (var domain = scale.domain(), i = Math.ceil(domain[0]); i < domain[1]; i++) ticks.push(i); + + return ticks.length > 0 && ticks[0] > 0 && ticks.unshift(ticks[0] - (ticks[1] - ticks[0])), ticks; + } + + function copyScale() { + var newScale = scale.copy(); + + return newScale.domain().length || newScale.domain(scale.domain()), newScale; + } + + function textFormatted(v) { + // to round float numbers from 'binary floating point' + // https://en.wikipedia.org/wiki/Double-precision_floating-point_format + // https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand + var value = /\d+\.\d+0{5,}\d$/.test(v) ? +(v + "").replace(/0+\d$/, "") : v, + formatted = tickFormat ? tickFormat(value) : value; + + + return (0, _util.isDefined)(formatted) ? formatted : ""; + } + + function transitionise(selection) { + return params.withoutTransition ? selection.interrupt() : selection.transition(transition); + } + + function axis(g) { + g.each(function () { + + // this should be called only when category axis + function splitTickText(d, maxWidthValue) { + + function split(splitted, text) { + spaceIndex = undefined; + + + for (var i = 1; i < text.length; i++) + + // if text width gets over tick width, split by space index or current index + if (text.charAt(i) === " " && (spaceIndex = i), subtext = text.substr(0, i + 1), textWidth = sizeFor1Char.w * subtext.length, maxWidth < textWidth) return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i)); + + return splitted.concat(text); + } + + var tickText = textFormatted(d), + splitted = (0, _util.isString)(tickText) && tickText.indexOf("\n") > -1 ? tickText.split("\n") : []; + + + if (splitted.length) return splitted; + + var maxWidth = maxWidthValue, + subtext = void 0, + spaceIndex = void 0, + textWidth = void 0; + return (0, _util.isArray)(tickText) ? tickText : ((!maxWidth || maxWidth <= 0) && (maxWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12 : 110), split(splitted, tickText + "")); + } + + var g = (0, _d3Selection.select)(this); + + axis.g = g; + var scale0 = this.__chart__ || scale, + scale1 = copyScale(); + this.__chart__ = scale1; + + + // count of tick data in array + var ticks = tickValues || generateTicks(scale1), + tick = g.selectAll(".tick").data(ticks, scale1), + tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", "1"), + tickExit = tick.exit().remove(); + + // update selection + + + // enter selection + + + // MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks. + + tick = tickEnter.merge(tick); + var tickUpdate = transitionise(tick).style("opacity", "1"), + tickX = void 0, + tickY = void 0, + range = scale.rangeExtent ? scale.rangeExtent() : scaleExtent((params.orgXScale || scale).range()), + path = g.selectAll(".domain").data([0]), + pathUpdate = path.enter().append("path").attr("class", "domain").merge(transitionise(path)); + + // update selection - data join + + + // enter + update selection + + tickEnter.append("line"), tickEnter.append("text"); + var lineEnter = tickEnter.select("line"), + lineUpdate = tickUpdate.select("line"), + textEnter = tickEnter.select("text"), + textUpdate = tickUpdate.select("text"); + params.isCategory ? (tickOffset = Math.ceil((scale1(1) - scale1(0)) / 2), tickX = tickCentered ? 0 : tickOffset, tickY = tickCentered ? tickOffset : 0) : (tickX = 0, tickOffset = tickX); + var sizeFor1Char = getSizeFor1Char.size || getSizeFor1Char(g.select(".tick")), + counts = [], + tickLength = Math.max(6, 0) + 3, + isLeftRight = /^(left|right)$/.test(orient), + isTopBottom = /^(top|bottom)$/.test(orient), + tspan = tick.select("text").selectAll("tspan").data(function (d, index) { + var split = params.tickMultiline ? splitTickText(d, params.tickWidth) : (0, _util.isArray)(textFormatted(d)) ? textFormatted(d).concat() : [textFormatted(d)]; + + return counts[index] = split.length, split.map(function (splitted) { + return { index: index, splitted: splitted }; + }); + }); + tspan.exit().remove(), tspan = tspan.enter().append("tspan").merge(tspan).text(function (d) { + return d.splitted; + }); + + + // line/text enter and path update + var tickTransform = isTopBottom ? axisX : axisY, + sign = /^(top|left)$/.test(orient) ? -1 : 1, + axisPx = tickTransform === axisX ? "y" : "x"; + lineEnter.attr(axisPx + "2", 6 * sign), textEnter.attr("" + axisPx, 9 * sign), pathUpdate.attr("d", function () { + var outerTickSized = outerTickSize * sign; + + return isTopBottom ? "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized : "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized; + }); + + // tick text helpers + var rotate = params.tickTextRotate, + tickSize = function tickSize(d) { + var tickPosition = scale(d) + (tickCentered ? 0 : tickOffset); + + return range[0] < tickPosition && tickPosition < range[1] ? 6 : 0; + }, + tickTextPos = params.axisName && /^(x|y|y2)$/.test(params.axisName) ? params.config["axis_" + params.axisName + "_tick_text_position"] : { x: 0, y: 0 }; + + // get the axis' tick position configuration + + + if (tspan.attr("x", isTopBottom ? 0 : 9 * sign).attr("dx", function () { + var dx = 0; + + return orient === "bottom" && rotate && (dx = 8 * Math.sin(Math.PI * (rotate / 180))), dx + (tickTextPos.x || 0); + }()).attr("dy", function (d, i) { + var dy = 0; + + + return orient !== "top" && (i === 0 ? dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? ".71em" : 0 : dy = sizeFor1Char.h), (0, _util.isNumber)(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || ".71em"; + }), orient === "bottom" ? (lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", tickSize), textUpdate.attr("x", 0).attr("y", function yForText(r) { + return r ? 11.5 - 2.5 * (r / 15) * (r > 0 ? 1 : -1) : 9; + }(rotate)).style("text-anchor", function textAnchorForText(r) { + return r ? r > 0 ? "start" : "end" : "middle"; + }(rotate)).attr("transform", function textTransform(r) { + return r ? "rotate(" + r + ")" : null; + }(rotate))) : orient === "top" ? (lineUpdate.attr("x2", 0).attr("y2", -6), textUpdate.attr("x", 0).attr("y", -9).style("text-anchor", "middle")) : orient === "left" ? (lineUpdate.attr("x2", -6).attr("y1", tickY).attr("y2", tickY), textUpdate.attr("x", -9).attr("y", tickOffset).style("text-anchor", "end")) : orient === "right" ? (lineUpdate.attr("x2", 6).attr("y2", 0), textUpdate.attr("x", 9).attr("y", 0).style("text-anchor", "start")) : void 0, (params.tickTitle && textUpdate.append && textUpdate.append("title").each(function (index) { + (0, _d3Selection.select)(this).text(params.tickTitle[index]); + }), scale1.bandwidth)) { + var x = scale1, + dx = x.bandwidth() / 2; + scale0 = function scale0(d) { + return x(d) + dx; + }, scale1 = scale0; + } else scale0.bandwidth ? scale0 = scale1 : tickExit.call(tickTransform, scale1); + + tickEnter.call(tickTransform, scale0), tickUpdate.call(tickTransform, scale1); + }); + } + + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + scale = (0, _d3Scale.scaleLinear)(), + orient = "bottom", + outerTickSize = params.withOuterTick ? 6 : 0, + tickValues = null, + tickFormat = void 0, + tickArguments = void 0, + tickOffset = 0, + tickCulling = !0, + tickCentered = void 0, + transition = void 0; + + + return axis.scale = function (x) { + return arguments.length ? (scale = x, axis) : scale; + }, axis.orient = function (x) { + return arguments.length ? (orient = x in { + top: 1, + right: 1, + bottom: 1, + left: 1 + } ? x + "" : "bottom", axis) : orient; + }, axis.tickFormat = function (format) { + return arguments.length ? (tickFormat = format, axis) : tickFormat; + }, axis.tickCentered = function (isCentered) { + return arguments.length ? (tickCentered = isCentered, axis) : tickCentered; + }, axis.tickOffset = function () { + return tickOffset; + }, axis.tickInterval = function (size) { + var interval = void 0; + + if (params.isCategory) interval = tickOffset * 2;else { + var length = axis.g.select("path.domain").node().getTotalLength() - outerTickSize * 2; + + interval = length / (size || axis.g.selectAll("line").size()); + } + + return interval === Infinity ? 0 : interval; + }, axis.ticks = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + + return args.length ? (tickArguments = (0, _util.toArray)(args), axis) : tickArguments; + }, axis.tickCulling = function (culling) { + return arguments.length ? (tickCulling = culling, axis) : tickCulling; + }, axis.tickValues = function (x) { + if ((0, _util.isFunction)(x)) tickValues = function tickValues() { + return x(scale.domain()); + };else { + if (!arguments.length) return tickValues; + + tickValues = x; + } + + return axis; + }, axis.setTransition = function (t) { + + return transition = t, axis; + }, axis; +}; + +var _d3Scale = __webpack_require__(10), + _d3Selection = __webpack_require__(5), + _util = __webpack_require__(11), + getSizeFor1Char = function getSizeFor1Char(node) { + // default size for one character + var size = { + w: 5.5, + h: 11.5 + }; + + return node.empty() || node.select("text").text("0").call(function (el) { + try { + var box = el.node().getBBox(), + h = box.height, + w = box.width; + h && w && (size.h = h, size.w = w), el.text(""); + } catch (e) {} + }), getSizeFor1Char.size = size; +}; + +// Features: +// 1. category axis +// 2. ceil values of translate/x/y to int for half pixel anti-aliasing +// 3. multiline tick text + +/** + * Compute a character dimension + * @param {d3.selection} node + * @return {{w: number, h: number}} + * @private + */ + + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @ignore + */ +module.exports = exports["default"]; + +/***/ }), +/* 10 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__10__; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.toArray = exports.sanitise = exports.merge = exports.notEmpty = exports.isValue = exports.isUndefined = exports.isString = exports.isObjectType = exports.isObject = exports.isNumber = exports.isFunction = exports.isEmpty = exports.isDefined = exports.isBoolean = exports.isArray = exports.hasValue = exports.getRectSegList = exports.getPathBox = exports.getOption = exports.getCssRules = exports.getBrushSelection = exports.extend = exports.emulateEvent = exports.diffDomain = exports.ceil10 = exports.capitalize = exports.callFn = exports.brushEmpty = exports.asHalfPixel = undefined; + +var _typeof2 = __webpack_require__(12), + _typeof3 = _interopRequireDefault(_typeof2), + _d3Selection = __webpack_require__(5), + _d3Brush = __webpack_require__(13), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isValue = function (v) { + return v || v === 0; +}, + isFunction = function (v) { + return typeof v === "function"; +}, + isString = function (v) { + return typeof v === "string"; +}, + isNumber = function (v) { + return typeof v === "number"; +}, + isUndefined = function (v) { + return typeof v === "undefined"; +}, + isDefined = function (v) { + return typeof v !== "undefined"; +}, + isBoolean = function (v) { + return typeof v === "boolean"; +}, + ceil10 = function (v) { + return Math.ceil(v / 10) * 10; +}, + asHalfPixel = function (n) { + return Math.ceil(n) + .5; +}, + diffDomain = function (d) { + return d[1] - d[0]; +}, + isObjectType = function (v) { + return (typeof v === "undefined" ? "undefined" : (0, _typeof3.default)(v)) === "object"; +}, + isEmpty = function (o) { + return isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && Object.keys(o).length === 0; +}, + notEmpty = function (o) { + return !isEmpty(o); +}, + isArray = function (arr) { + return arr && arr.constructor === Array; +}, + isObject = function (obj) { + return obj && !obj.nodeType && isObjectType(obj) && !isArray(obj); +}, + getOption = function (options, key, defaultValue) { + return isDefined(options[key]) ? options[key] : defaultValue; +}, + hasValue = function (dict, value) { + var found = !1; + + return Object.keys(dict).forEach(function (key) { + return dict[key] === value && (found = !0); + }), found; +}, + callFn = function (fn) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key]; + + var isFn = isFunction(fn); + + return isFn && fn.call.apply(fn, args), isFn; +}, + sanitise = function (str) { + return isString(str) ? str.replace(//g, ">") : str; +}, + getRectSegList = function (path) { + /* + * seg1 ---------- seg2 + * | | + * | | + * | | + * seg0 ---------- seg3 + * */ + var bbox = path.getBBox(), + _ref = [bbox.x, bbox.y, bbox.width, bbox.height], + x = _ref[0], + y = _ref[1], + width = _ref[2], + height = _ref[3]; + + return [{ x: x, y: y + height }, // seg0 + { x: x, y: y }, // seg1 + { x: x + width, y: y }, // seg2 + { x: x + width, y: y + height // seg3 + }]; +}, + getPathBox = function (path) { + var box = path.getBoundingClientRect(), + _ref2 = [box.width, box.height], + width = _ref2[0], + height = _ref2[1], + items = getRectSegList(path), + x = items[0].x, + y = Math.min(items[0].y, items[1].y); + + return { + x: x, y: y, width: width, height: height + }; +}, + getBrushSelection = function (ctx) { + var selection = null, + event = _d3Selection.event, + main = ctx.context || ctx.main; + + // check from event + + return event && event.constructor.name === "BrushEvent" ? selection = event.selection : main && (selection = main.select("." + _classes2.default.brush).node()) && (selection = (0, _d3Brush.brushSelection)(selection)), selection; +}, + brushEmpty = function (ctx) { + var selection = getBrushSelection(ctx); + + return !selection || selection[0] === selection[1]; +}, + extend = function () { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + source = arguments[1]; + + for (var p in source) target[p] = source[p]; + + return target; +}, + capitalize = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}, + merge = function (target) { + for (var _len2 = arguments.length, objectN = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) objectN[_key2 - 1] = arguments[_key2]; + + if (!objectN.length || objectN.length === 1 && !objectN[0]) return target; + + var source = objectN.shift(); + + return isObject(target) && isObject(source) && Object.keys(source).forEach(function (key) { + var value = source[key]; + + isObject(value) ? (!target[key] && (target[key] = {}), target[key] = merge(target[key], value)) : target[key] = isArray(value) ? value.concat() : value; + }), extend.apply(undefined, [target].concat(objectN)); +}, + toArray = function (v) { + return [].slice.call(v); +}, + getCssRules = function (styleSheets) { + var rules = []; + + return styleSheets.forEach(function (sheet) { + try { + sheet.cssRules && sheet.cssRules.length && (rules = rules.concat(toArray(sheet.cssRules))); + } catch (e) { + console.error("Error while reading rules from " + sheet.href + ": " + e.toString()); + } + }), rules; +}, + emulateEvent = { + mouse: function () { + var getParams = function () { + return { + bubbles: !1, cancelable: !1, screenX: 0, screenY: 0, clientX: 0, clientY: 0 + }; + }; + + try { + + return new MouseEvent("t"), function (el, eventType) { + var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(); + el.dispatchEvent(new MouseEvent(eventType, params)); + }; + } catch (e) { + // Polyfills DOM4 MouseEvent + return function (el, eventType) { + var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(), + mouseEvent = document.createEvent("MouseEvent"); + mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, // the event's mouse click count + params.screenX, params.screenY, params.clientX, params.clientY, !1, !1, !1, !1, 0, null), el.dispatchEvent(mouseEvent); + }; + } + }(), + touch: function touch(el, eventType, params) { + var touchObj = new Touch(Object.assign({ + identifier: Date.now(), + target: el, + radiusX: 2.5, + radiusY: 2.5, + rotationAngle: 10, + force: .5 + }, params)); + + el.dispatchEvent(new TouchEvent(eventType, { + cancelable: !0, + bubbles: !0, + shiftKey: !0, + touches: [touchObj], + targetTouches: [], + changedTouches: [touchObj] + })); + } +}; + +/** + * Check if is array + * @param {Array} arr + * @returns {Boolean} + * @private + */ + + +/** + * Check if is object + * @param {Object} obj + * @returns {Boolean} + * @private + */ + + +/** + * Call function with arguments + * @param {Function} fn Function to be called + * @param {*} args Arguments + * @return {Boolean} true: fn is function, false: fn is not function + * @private + */ + + +/** + * Replace tag sign to html entity + * @param {String} str + * @return {String} + * @private + */ + + +// substitution of SVGPathSeg API polyfill + + +// return brush selection array + + +/** + * Return first letter capitalized + * @param {String} str + * @return {String} capitalized string + * @private + */ + + +/** + * Merge object returning new object + * @param {Object} target + * @param {Object} objectN + * @returns {Object} merged target object + * @private + * @example + * var target = { a: 1 }; + * utils.extend(target, { b: 2, c: 3 }); + * target; // { a: 1, b: 2, c: 3 }; + */ + + +/** + * Convert to array + * @param {Object} v + * @returns {Array} + * @private + */ + + +/** + * Get css rules for specified stylesheets + * @param {Array} styleSheets The stylesheets to get the rules from + * @returns {Array} + * @private + */ + + +// emulate event +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +exports.asHalfPixel = asHalfPixel; +exports.brushEmpty = brushEmpty; +exports.callFn = callFn; +exports.capitalize = capitalize; +exports.ceil10 = ceil10; +exports.diffDomain = diffDomain; +exports.emulateEvent = emulateEvent; +exports.extend = extend; +exports.getBrushSelection = getBrushSelection; +exports.getCssRules = getCssRules; +exports.getOption = getOption; +exports.getPathBox = getPathBox; +exports.getRectSegList = getRectSegList; +exports.hasValue = hasValue; +exports.isArray = isArray; +exports.isBoolean = isBoolean; +exports.isDefined = isDefined; +exports.isEmpty = isEmpty; +exports.isFunction = isFunction; +exports.isNumber = isNumber; +exports.isObject = isObject; +exports.isObjectType = isObjectType; +exports.isString = isString; +exports.isUndefined = isUndefined; +exports.isValue = isValue; +exports.notEmpty = notEmpty; +exports.merge = merge; +exports.sanitise = sanitise; +exports.toArray = toArray; + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } + +exports.default = function (obj) { + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 13 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__13__; + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +/** + * CSS class names definition + * @private + */ +exports.default = { + arc: "bb-arc", + arcs: "bb-arcs", + area: "bb-area", + areas: "bb-areas", + axis: "bb-axis", + axisX: "bb-axis-x", + axisXLabel: "bb-axis-x-label", + axisY: "bb-axis-y", + axisY2: "bb-axis-y2", + axisY2Label: "bb-axis-y2-label", + axisYLabel: "bb-axis-y-label", + bar: "bb-bar", + bars: "bb-bars", + brush: "bb-brush", + button: "bb-button", + buttonZoomReset: "bb-zoom-reset", + chart: "bb-chart", + chartArc: "bb-chart-arc", + chartArcs: "bb-chart-arcs", + chartArcsBackground: "bb-chart-arcs-background", + chartArcsGaugeMax: "bb-chart-arcs-gauge-max", + chartArcsGaugeMin: "bb-chart-arcs-gauge-min", + chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit", + chartArcsTitle: "bb-chart-arcs-title", + chartBar: "bb-chart-bar", + chartBars: "bb-chart-bars", + chartLine: "bb-chart-line", + chartLines: "bb-chart-lines", + chartRadar: "bb-chart-radar", + chartRadars: "bb-chart-radars", + chartText: "bb-chart-text", + chartTexts: "bb-chart-texts", + circle: "bb-circle", + circles: "bb-circles", + colorPattern: "bb-color-pattern", + defocused: "bb-defocused", + dragarea: "bb-dragarea", + empty: "bb-empty", + eventRect: "bb-event-rect", + eventRects: "bb-event-rects", + eventRectsMultiple: "bb-event-rects-multiple", + eventRectsSingle: "bb-event-rects-single", + focused: "bb-focused", + gaugeValue: "bb-gauge-value", + grid: "bb-grid", + gridLines: "bb-grid-lines", + legendBackground: "bb-legend-background", + legendItem: "bb-legend-item", + legendItemEvent: "bb-legend-item-event", + legendItemFocused: "bb-legend-item-focused", + legendItemHidden: "bb-legend-item-hidden", + legendItemPoint: "bb-legend-item-point", + legendItemTile: "bb-legend-item-tile", + level: "bb-level", + levels: "bb-levels", + line: "bb-line", + lines: "bb-lines", + region: "bb-region", + regions: "bb-regions", + selectedCircle: "bb-selected-circle", + selectedCircles: "bb-selected-circles", + shape: "bb-shape", + shapes: "bb-shapes", + target: "bb-target", + text: "bb-text", + texts: "bb-texts", + title: "bb-title", + tooltip: "bb-tooltip", + tooltipContainer: "bb-tooltip-container", + tooltipName: "bb-tooltip-name", + xgrid: "bb-xgrid", + xgridFocus: "bb-xgrid-focus", + xgridLine: "bb-xgrid-line", + xgridLines: "bb-xgrid-lines", + xgrids: "bb-xgrids", + ygrid: "bb-ygrid", + ygridLine: "bb-ygrid-line", + ygridLines: "bb-ygrid-lines", + ygrids: "bb-ygrids", + zoomBrush: "bb-zoom-brush", + zoomRect: "bb-zoom-rect", + EXPANDED: "_expanded_", + SELECTED: "_selected_", + INCLUDED: "_included_" +}; +module.exports = exports["default"]; + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +// extracted by mini-css-extract-plugin + +/***/ }), +/* 16 */, +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Options = __webpack_require__(18), + _Options2 = _interopRequireDefault(_Options), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getOptions: function getOptions() { + var config = new _Options2.default(); + + return (0, _util.merge)(config.value, this.additionalConfig); + }, + + + additionalConfig: {}, + + /** + * Load configuration option + * @param {Object} config User's generation config value + * @private + */ + loadConfig: function loadConfig(config) { + var thisConfig = this.config, + target = void 0, + keys = void 0, + read = void 0, + find = function () { + var key = keys.shift(); + + return key && target && (0, _util.isObjectType)(target) && key in target ? (target = target[key], find()) : key ? undefined : target; + }; + + Object.keys(thisConfig).forEach(function (key) { + target = config, keys = key.split("_"), read = find(), (0, _util.isDefined)(read) && (thisConfig[key] = read); + }); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +/** + * Class to set options on generating chart. + * - It's instantiated internally, not exposed for public. + * @class Options + * @see {@link bb.generate} to use these options on generating the chart + */ +var Options = function Options() { + (0, _classCallCheck3.default)(this, Options), this.value = { + /** + * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also. + * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).

+ * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.
+ * @name bindto + * @memberOf Options + * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn. + * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn. + * @property {String} [bindto.classname=bb] Specify the class name of bind element.
+ * **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly. + * @default #chart + * @example + * bindto: "#myContainer" + * + * // or HTMLElement + * bindto: document.getElementById("myContainer") + * + * // or D3 selection object + * bindto: d3.select("#myContainer") + * + * // or to change default classname + * bindto: { + * element: "#chart", + * classname: "bill-board" // ex)
+ * } + */ + bindto: "#chart", + + /** + * Set 'clip-path' attribute for chart element + * - **NOTE:** + * > When is false, chart node element is positioned after the axis node in DOM tree hierarchy. + * > Is to make chart element positioned over axis element. + * @name clipPath + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * // don't set 'clip-path' attribute + * clipPath: false + */ + clipPath: !0, + + /** + * Set svg element's class name + * @name svg + * @memberOf Options + * @type {Object} + * @property {String} [svg.classname] class name for svg element + * @example + * svg: { + * classname: "test_class" + * } + */ + svg_classname: undefined, + + /** + * The desired size of the chart element. + * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to. + * @name size + * @memberOf Options + * @type {Object} + * @property {Number} [size.width] width of the chart element + * @property {Number} [size.height] height of the chart element + * @example + * size: { + * width: 640, + * height: 480 + * } + */ + size_width: undefined, + size_height: undefined, + + /** + * The padding of the chart element. + * @name padding + * @memberOf Options + * @type {Object} + * @property {Number} [padding.top] padding on the top of chart + * @property {Number} [padding.right] padding on the right of chart + * @property {Number} [padding.bottom] padding on the bottom of chart + * @property {Number} [padding.left] padding on the left of chart + * @example + * padding: { + * top: 20, + * right: 20, + * bottom: 20, + * left: 20 + * } + */ + padding_left: undefined, + padding_right: undefined, + padding_top: undefined, + padding_bottom: undefined, + + /** + * Set chart resize options + * @name resize + * @memberOf Options + * @type {Object} + * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes. + * @example + * resize: { + * auto: false + * } + */ + resize_auto: !0, + + /** + * Set zoom options + * @name zoom + * @memberOf Options + * @type {Object} + * @property {Boolean} [zoom.enabled=false] Enable zooming. + * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type. + * - **Available types:** + * - wheel + * - drag + * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.
+ * If true set, y domain will be updated according to the zoomed region. + * @property {Array} [zoom.extent=[1, 10]] Change zoom extent. + * @property {Number} [zoom.x.min] Set x Axis minimum zoom range + * @property {Number} [zoom.x.max] Set x Axis maximum zoom range + * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.
+ * Specified function receives the zoom event. + * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.
+ * Specified function receives the zoomed domain. + * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.
+ * Specified function receives the zoomed domain. + * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom + * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button. + * @example + * zoom: { + * enabled: { + * type: "drag" + * }, + * rescale: true, + * extent: [1, 100] // enable more zooming + * x: { + * min: -1, // set min range + * max: 10 // set max range + * }, + * onzoomstart: function(event) { ... }, + * onzoom: function(domain) { ... }, + * onzoomend: function(domain) { ... }, + * + * // show reset button when is zoomed-in + * resetButton: true, + * + * // customized text value for reset zoom button + * resetButton: { + * text: "Unzoom" + * } + * } + */ + zoom_enabled: undefined, + zoom_extent: undefined, + zoom_privileged: !1, + zoom_rescale: !1, + zoom_onzoom: undefined, + zoom_onzoomstart: undefined, + zoom_onzoomend: undefined, + zoom_resetButton: !0, + zoom_x_min: undefined, + zoom_x_max: undefined, + + /** + * Interaction options + * @name interaction + * @memberOf Options + * @type {Object} + * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.
+ * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled. + * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area) + * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction + * @property {Boolean} [interaction.inputType.touch=true] enable or disable touch interaction + * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling. + * @example + * interaction: { + * enabled: false, + * inputType: { + * mouse: true, + * touch: false + * + * // or declare preventDefault explicitly. + * // In this case touch inputType is enabled by default + * touch: { + * preventDefault: true + * + * // or threshold pixel value (pixel moved from touchstart to touchmove) + * preventDefault: 5 + * } + * } + * } + */ + interaction_enabled: !0, + interaction_brighten: !0, + interaction_inputType_mouse: !0, + interaction_inputType_touch: {}, + + /** + * Set a callback to execute when mouse/touch enters the chart. + * @name onover + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onover: function() { + * ... + * } + */ + onover: function onover() {}, + + /** + * Set a callback to execute when mouse/touch leaves the chart. + * @name onout + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onout: function() { + * ... + * } + */ + onout: function onout() {}, + + /** + * Set a callback to execute when user resizes the screen. + * @name onresize + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onresize: function() { + * ... + * } + */ + onresize: function onresize() {}, + + /** + * SSet a callback to execute when screen resize finished. + * @name onresized + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onresized: function() { + * ... + * } + */ + onresized: function onresized() {}, + + /** + * Set a callback to execute before the chart is initialized + * @name onbeforeinit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onbeforeinit: function() { + * ... + * } + */ + onbeforeinit: undefined, + + /** + * Set a callback to execute when the chart is initialized. + * @name oninit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * oninit: function() { + * ... + * } + */ + oninit: function oninit() {}, + + /** + * Set a callback to execute after the chart is initialized + * @name onafterinit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onafterinit: function() { + * ... + * } + */ + onafterinit: undefined, + + /** + * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed. + * @name onrendered + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onrendered: function() { + * ... + * } + */ + onrendered: undefined, + + /** + * Set duration of transition (in milliseconds) for chart animation.

+ * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data. + * @name transition + * @memberOf Options + * @type {Object} + * @property {Number} [transition.duration=350] duration in milliseconds + * @example + * transition: { + * duration: 500 + * } + */ + transition_duration: 350, + + /** + * Specify the key of x values in the data.

+ * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names. + * @name data․x + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * x: "date" + * } + */ + data_x: undefined, + + /** + * Specify the keys of the x values for each data.

+ * This option can be used if we want to show the data that has different x values. + * @name data․xs + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * xs: { + * data1: "x1", + * data2: "x2" + * } + * } + */ + data_xs: {}, + + /** + * Set a format to parse string specifed as x. + * @name data․xFormat + * @memberOf Options + * @type {String} + * @default %Y-%m-%d + * @example + * data: { + * xFormat: "%Y-%m-%d %H:%M:%S" + * } + * @see [D3's time specifier](https://npm.runkit.com/d3-time-format) + */ + data_xFormat: "%Y-%m-%d", + + /** + * Set localtime format to parse x axis. + * @name data․xLocaltime + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * xLocaltime: false + * } + */ + data_xLocaltime: !0, + + /** + * Sort on x axis. + * @name data․xSort + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * xSort: false + * } + */ + data_xSort: !0, + data_idConverter: function data_idConverter(id) { + return id; + }, + + /** + * Set custom data name. + * @name data․names + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * names: { + * data1: "Data Name 1", + * data2: "Data Name 2" + * } + * } + */ + data_names: {}, + + /** + * Set custom data class.

+ * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class). + * @name data․classes + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * classes: { + * data1: "additional-data1-class", + * data2: "additional-data2-class" + * } + * } + */ + data_classes: {}, + + /** + * Set groups for the data for stacking. + * @name data․groups + * @memberOf Options + * @type {Array} + * @default [] + * @example + * data: { + * groups: [ + * ["data1", "data2"], + * ["data3"] + * ] + * } + */ + data_groups: [], + + /** + * Set y axis the data related to. y and y2 can be used. + * @name data․axes + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * axes: { + * data1: "y", + * data2: "y2" + * } + * } + */ + data_axes: {}, + + /** + * Set chart type at once.

+ * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.

+ * **Available Values:** + * - area + * - area-line-range + * - area-spline + * - area-spline-range + * - area-step + * - bar + * - bubble + * - donut + * - gauge + * - line + * - pie + * - radar + * - scatter + * - spline + * - step + * @name data․type + * @memberOf Options + * @type {String} + * @default line + * @example + * data: { + * type: "bar" + * } + */ + data_type: undefined, + + /** + * Set chart type for each data.
+ * This setting overwrites data.type setting. + * - **NOTE:** `radar` type can't be combined with other types. + * @name data․types + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * types: { + * data1: "bar", + * data2: "spline" + * } + * } + */ + data_types: {}, + + /** + * Set labels options + * @name data․labels + * @memberOf Options + * @type {Object} + * @property {Boolean} [data.labels=false] Show or hide labels on each data points + * @property {Function} [data.labels.format={}] Set formatter function for data labels.
+ * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:
+ * - `v` is the value of the data point where the label is shown. + * - `id` is the id of the data where the label is shown. + * - `i` is the index of the data point where the label is shown. + * - `j` is the sub index of the data point where the label is shown.

+ * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$')) + * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original. + * @property {NUmber} [data.labels.position.y=0] y coordinate position, relative the original. + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * labels: true, + * + * // or set specific options + * labels: { + * format: function(v, id, i, j) { ... }, + * + * // it's possible to set for each data + * format: { + * data1: function(v, id, i, j) { ... }, + * ... + * }, + * position: { + * x: -10, + * y: 10 + * } + * } + * } + */ + data_labels: {}, + data_labels_position: {}, + + /** + * This option changes the order of stacking data and pieces of pie/donut. + * - If `null` specified, it will be the order the data loaded. + * - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)

+ * + * **Available Values:** + * - `desc`: In descending order + * - `asc`: In ascending order + * - `null`: It keeps the data load order + * - `function(data1, data2) { ... }`: Array.sort compareFunction + * @name data․order + * @memberOf Options + * @type {String|Function|null} + * @default desc + * @example + * data: { + * // in descending order (default) + * order: "desc" + * + * // in ascending order + * order: "asc" + * + * // keeps data input order + * order: null + * + * // specifying sort function + * order: function(a, b) { + * // param data passed format + * { + * id: "data1", id_org: "data1", values: [ + * {x: 5, value: 250, id: "data1", index: 5, name: "data1"}, + * ... + * ] + * } + * } + * } + */ + data_order: "desc", + + /** + * Define regions for each data.
+ * The values must be an array for each data and it should include an object that has `start`, `end` and `style`. + * - The object type should be as: + * - start {Number}: Start data point number. If not set, the start will be the first data point. + * - [end] {Number}: End data point number. If not set, the end will be the last data point. + * - [style.dasharray="2 2"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area. + * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions. + * @name data․regions + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * regions: { + * data1: [{ + * start: 1, + * end: 2, + * style: { + * dasharray: "5 2" + * } + * }, { + * start: 3 + * }], + * ... + * } + * } + */ + data_regions: {}, + + /** + * Set color converter function.

+ * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00'). + * @name data․color + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * data: { + * color: function(color, d) { ... } + * } + */ + data_color: undefined, + + /** + * Set color for each data. + * @name data․colors + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * colors: { + * data1: "#ff0000", + * ... + * } + * } + */ + data_colors: {}, + + /** + * Hide each data when the chart appears.

+ * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden. + * @name data․hide + * @memberOf Options + * @type {Boolean|Array} + * @default false + * @example + * data: { + * // all of data will be hidden + * hide: true + * + * // specified data will be hidden + * hide: ["data1", ...] + * } + */ + data_hide: !1, + data_filter: undefined, + + /** + * Set data selection enabled.

+ * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected). + * @name data․selection․enabled + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * enabled: true + * } + * } + */ + data_selection_enabled: !1, + + /** + * Set grouped selection enabled.

+ * If this option set true, multiple data points that have same x value will be selected by one selection. + * @name data․selection․grouped + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * grouped: true + * } + * } + */ + data_selection_grouped: !1, + + /** + * Set a callback for each data point to determine if it's selectable or not.

+ * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean. + * @name data․selection․isselectable + * @memberOf Options + * @type {Function} + * @default function() { return true; } + * @example + * data: { + * selection: { + * isselectable: function(d) { ... } + * } + * } + */ + data_selection_isselectable: function data_selection_isselectable() { + return !0; + }, + + /** + * Set multiple data points selection enabled.

+ * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected. + * @name data․selection․multiple + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * selection: { + * multiple: false + * } + * } + */ + data_selection_multiple: !0, + + /** + * Enable to select data points by dragging. + * If this option set true, data points can be selected by dragging. + * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event. + * @name data․selection․draggable + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * draggable: true + * } + * } + */ + data_selection_draggable: !1, + + /** + * Set a callback for click event on each data point.

+ * This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object. + * @name data․onclick + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onclick: function(d, element) { ... } + * } + */ + data_onclick: function data_onclick() {}, + + /** + * Set a callback for mouse/touch over event on each data point.

+ * This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object. + * @name data․onover + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onover: function(d) { ... } + * } + */ + data_onover: function data_onover() {}, + + /** + * Set a callback for mouse/touch out event on each data point.

+ * This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object. + * @name data․onout + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onout: function(d) { ... } + * } + */ + data_onout: function data_onout() {}, + + /** + * Set a callback for on data selection. + * @name data․onselected + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onselected: function(d, element) { + * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"} + * // element - + * ... + * } + * } + */ + data_onselected: function data_onselected() {}, + + /** + * Set a callback for on data un-selection. + * @name data․onunselected + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onunselected: function(d, element) { + * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"} + * // element - + * ... + * } + * } + */ + data_onunselected: function data_onunselected() {}, + + /** + * Set a callback for minimum data + * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison + * @name data․onmin + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onmin: function(data) { + * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ] + * ... + * } + */ + data_onmin: undefined, + + /** + * Set a callback for maximum data + * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison + * @name data․onmax + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onmax: function(data) { + * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ] + * ... + * } + */ + data_onmax: undefined, + + /** + * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests. + * @name data․url + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * url: "/data/test.csv" + * } + */ + data_url: undefined, + data_headers: undefined, + + /** + * Parse a JSON object for data. See also data.keys. + * @name data․json + * @memberOf Options + * @type {Object} + * @default undefined + * @see data․keys + * @example + * data: { + * json: [ + * {name: "www.site1.com", upload: 200, download: 200, total: 400}, + * {name: "www.site2.com", upload: 100, download: 300, total: 400}, + * {name: "www.site3.com", upload: 300, download: 200, total: 500}, + * {name: "www.site4.com", upload: 400, download: 100, total: 500} + * ], + * keys: { + * // x: "name", // it's possible to specify 'x' when category axis + * value: ["upload", "download"] + * } + * } + */ + data_json: undefined, + + /** + * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order. + * @name data․rows + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * data: { + * rows: [ + * ["A", "B", "C"], + * [90, 120, 300], + * [40, 160, 240], + * [50, 200, 290], + * [120, 160, 230], + * [80, 130, 300], + * [90, 220, 320] + * ] + * } + * + * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain: + * // - an array of [high, mid, low] data following the order + * // - or an object with 'high', 'mid' and 'low' key value + * data: { + * rows: [ + * ["data1", "data2"], + * [ + * // or {high:150, mid: 140, low: 110}, 120 + * [150, 140, 110], 120 + * ], + * [[155, 130, 115], 55], + * [[160, 135, 120], 60] + * ], + * types: { + * data1: "area-line-range", + * data2: "line" + * } + * } + */ + data_rows: undefined, + + /** + * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values. + * @name data․columns + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * data: { + * columns: [ + * ["data1", 30, 20, 50, 40, 60, 50], + * ["data2", 200, 130, 90, 240, 130, 220], + * ["data3", 300, 200, 160, 400, 250, 250] + * ] + * } + * + * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain: + * // - an array of [high, mid, low] data following the order + * // - or an object with 'high', 'mid' and 'low' key value + * data: { + * columns: [ + * ["data1", + * [150, 140, 110], // or {high:150, mid: 140, low: 110} + * [150, 140, 110], + * [150, 140, 110] + * ] + * ], + * type: "area-line-range" + * } + */ + data_columns: undefined, + + /** + * Used if loading JSON via data.url. + * @name data․mimeType + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * mimeType: "json" + * } + */ + data_mimeType: undefined, + + /** + * Choose which JSON object keys correspond to desired data. + * @name data․keys + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * json: [ + * {name: "www.site1.com", upload: 200, download: 200, total: 400}, + * {name: "www.site2.com", upload: 100, download: 300, total: 400}, + * {name: "www.site3.com", upload: 300, download: 200, total: 500}, + * {name: "www.site4.com", upload: 400, download: 100, total: 500} + * ], + * keys: { + * // x: "name", // it's possible to specify 'x' when category axis + * value: ["upload", "download"] + * } + * } + */ + data_keys: undefined, + + /** + * Set text displayed when empty data. + * @name data․empty․label․text + * @memberOf Options + * @type {String} + * @default "" + * @example + * data: { + * empty: { + * label: { + * text: "No Data" + * } + * } + * } + */ + data_empty_label_text: "", + + /** + * Set subchart options + * @name subchart + * @memberOf Options + * @type {Object} + * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart. + * @property {Boolean} [subchart.size.height] Change the height of the subchart. + * @property {Boolean} [subchart.onbrush] Set callback for brush event.
+ * Specified function receives the current zoomed x domain. + * @example + * subchart: { + * show: true, + * size: { + * height: 20 + * }, + * onbrush: function(domain) { ... } + * } + */ + subchart_show: !1, + subchart_size_height: 60, + subchart_axis_x_show: !0, + subchart_onbrush: function subchart_onbrush() {}, + + /** + * Set color of the data values + * @name color + * @memberOf Options + * @type {Object} + * @property {Array} [color.pattern] custom color pattern + * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement). + * - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.
+ * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:
+ * - `bb-colorize-pattern-red` + * - `bb-colorize-pattern-fff` + * @property {Object} [color.threshold] color threshold + * @property {String} [color.threshold.unit] unit + * @property {Array} [color.threshold.value] value + * @property {Array} [color.threshold.max=100] max value + * @example + * color: { + * pattern: ["#1f77b4", "#aec7e8", ...], + * + * // Set colors' patterns + * // it should return an array of SVGPatternElement + * tiles: function() { + * var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); + * var g = document.createElementNS("http://www.w3.org/2000/svg", "g"); + * var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle"); + * + * pattern.setAttribute("patternUnits", "userSpaceOnUse"); + * pattern.setAttribute("width", "32"); + * pattern.setAttribute("height", "32"); + * + * g.style.fill = "#000"; + * g.style.opacity = "0.2"; + * + * circle1.setAttribute("cx", "3"); + * circle1.setAttribute("cy", "3"); + * circle1.setAttribute("r", "3"); + * + * g.appendChild(circle1); + * pattern.appendChild(g); + * + * return [pattern]; + * } + * } + */ + color_pattern: [], + color_tiles: undefined, + color_threshold: {}, + + /** + * Legend options + * @name legend + * @memberOf Options + * @type {Object} + * @property {Boolean} [legend.show=true] Show or hide legend. + * @property {Boolean} [legend.hide=false] Hide legend + * If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden. + * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items. + * @property {String|Function} [legend.contents.template=undefined] Set item's template.
+ * - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string: + * - {=COLOR}: data color value + * - {=TITLE}: data title value + * - If set `function` value, will pass following arguments to the given function: + * - title {String}: data's id value + * - color {String}: color string + * - data {Array}: data array + * @property {String} [legend.position=bottom] Change the position of legend.
+ * Available values are: `bottom`, `right` and `inset` are supported. + * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.
+ * This option accepts object that has the keys `anchor`, `x`, `y` and `step`. + * - **anchor** decides the position of the legend: + * - top-left + * - top-right + * - bottom-left + * - bottom-right + * - **x** and **y**: + * - set the position of the legend based on the anchor. + * - **step**: + * - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns). + * @property {Boolean} [legend.equally=false] Set to all items have same width size. + * @property {Boolean} [legend.padding=0] Set padding value + * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item. + * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item. + * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item. + * @property {Number} [legend.item.tile.width=10] Set width of item tile element + * @property {Number} [legend.item.tile.height=10] Set height of item tile element + * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend. + * @example + * legend: { + * show: true, + * hide: true, + * //or hide: "data1" + * //or hide: ["data1", "data2"] + * contents: { + * bindto: "#legend", //
    + * + * // will be as:
  • data1
  • + * template: "
  • {=TITLE}
  • " + * + * // or using function + * template: function(id, color, data) { + * // if you want omit some legend, return falsy value + * if (title !== "data1") { + * return "

  • + * **Available Values:** + * - timeseries + * - category + * - indexed + * @name axis․x․type + * @memberOf Options + * @type {String} + * @default indexed + * @example + * axis: { + * x: { + * type: "timeseries" + * } + * } + */ + axis_x_type: "indexed", + + /** + * Set how to treat the timezone of x values.
    + * If true, treat x value as localtime. If false, convert to UTC internally. + * @name axis․x․localtime + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * localtime: false + * } + * } + */ + axis_x_localtime: !0, + + /** + * Set category names on category axis. + * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required. + * @name axis․x․categories + * @memberOf Options + * @type {Array} + * @default [] + * @example + * axis: { + * x: { + * categories: ["Category 1", "Category 2", ...] + * } + * } + */ + axis_x_categories: [], + + /** + * Centerise ticks on category axis. + * @name axis․x․tick․centered + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * x: { + * tick: { + * centered: true + * } + * } + * } + */ + axis_x_tick_centered: !1, + + /** + * A function to format tick value. Format string is also available for timeseries data. + * @name axis․x․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * x: { + * tick: { + * // for timeseries, a 'datetime' object is given as parameter + * format: function(x) { + * return x.getFullYear(); + * } + * + * // for category, index(Number) and categoryName(String) are given as parameter + * format: function(index, categoryName) { + * return categoryName.substr(0, 10); + * } + * } + * } + * } + */ + axis_x_tick_format: undefined, + + /** + * Setting for culling ticks.

    + * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.

    + * We can change the number of ticks to be shown by axis.x.tick.culling.max. + * @name axis․x․tick․culling + * @memberOf Options + * @type {Boolean} + * @default + * - true for indexed axis and timeseries axis + * - false for category axis + * @example + * axis: { + * x: { + * tick: { + * culling: false + * } + * } + * } + */ + axis_x_tick_culling: {}, + + /** + * The number of tick texts will be adjusted to less than this value. + * @name axis․x․tick․culling․max + * @memberOf Options + * @type {Number} + * @default 10 + * @example + * axis: { + * x: { + * tick: { + * culling: { + * max: 5 + * } + * } + * } + * } + */ + axis_x_tick_culling_max: 10, + + /** + * The number of x axis ticks to show.

    + * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value). + * @name axis․x․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_x_tick_count: undefined, + + /** + * Set the x Axis tick text's position relatively its original position + * @name axis․x․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * x: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_x_tick_text_position: { x: 0, y: 0 }, + + /** + * Fit x axis ticks.

    + * If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points. + * @name axis․x․tick․fit + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * fit: false + * } + * } + * } + */ + axis_x_tick_fit: !0, + + /** + * Set the x values of ticks manually.

    + * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option. + * @name axis․x․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * x: { + * tick: { + * values: [1, 2, 4, 8, 16, 32, ...] + * } + * } + * } + */ + axis_x_tick_values: null, + + /** + * Rotate x axis tick text.
    + * If you set negative value, it will rotate to opposite direction. + * @name axis․x․tick․rotate + * @memberOf Options + * @type {Number} + * @default 0 + * @example + * axis: { + * x: { + * tick: { + * rotate: 60 + * } + * } + * } + */ + axis_x_tick_rotate: 0, + + /** + * Show x axis outer tick. + * @name axis․x․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_x_tick_outer: !0, + + /** + * Set tick text to be multiline + * - **NOTE:** + * > When x tick text contains `\n`, it's used as line break and 'axis.x.tick.width' option is ignored. + * @name axis․x․tick․multiline + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * multiline: false + * } + * } + * } + * @example + * // example of line break with '\n' + * // In this case, 'axis.x.tick.width' is ignored + * data: { + * x: "x", + * columns: [ + * ["x", "long\ntext", "Another\nLong\nText"], + * ... + * ], + * } + */ + axis_x_tick_multiline: !0, + + /** + * Set tick width + * - **NOTE:** + * > When x tick text contains `\n`, this option is ignored. + * @name axis․x․tick․width + * @memberOf Options + * @type {Number} + * @default null + * @example + * axis: { + * x: { + * tick: { + * width: 50 + * } + * } + * } + */ + axis_x_tick_width: null, + + /** + * Set to display system tooltip for tick text + * - **NOTE:** Only available for category axis type (`axis.x.type='category'`) + * @name axis․x․tick․tooltip + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * x: { + * tick: { + * tooltip: true + * } + * } + * } + */ + axis_x_tick_tooltip: !1, + + /** + * Set max value of x axis range. + * @name axis․x․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * max: 100 + * } + * } + */ + axis_x_max: undefined, + + /** + * Set min value of x axis range. + * @name axis․x․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * min: -100 + * } + * } + */ + axis_x_min: undefined, + + /** + * Set padding for x axis.

    + * If this option is set, the range of x axis will increase/decrease according to the values. + * If no padding is needed in the rage of x axis, 0 should be set. + * - **NOTE:** + * The padding values aren't based on pixels. It differs according axis types
    + * - **category:** The unit of tick value + * ex. the given value `1`, is same as the width of 1 tick width + * - **timeseries:** Numeric time value + * ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width + * @name axis․x․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * x: { + * padding: { + * // when axis type is 'category' + * left: 1, // set left padding width of equivalent value of a tick's width + * right: 0.5 // set right padding width as half of equivalent value of tick's width + * + * // when axis type is 'timeseries' + * left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width + * right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width + * } + * } + * } + */ + axis_x_padding: {}, + + /** + * Set height of x axis.

    + * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel. + * @name axis․x․height + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * height: 20 + * } + * } + */ + axis_x_height: undefined, + + /** + * Set default extent for subchart and zoom. This can be an array or function that returns an array. + * @name axis․x․extent + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * x: { + * // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner + * // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521 + * extent: [ + * [0, 0], [200, 60] + * ] + * } + * } + */ + axis_x_extent: undefined, + + /** + * Set label on x axis.

    + * You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default. + * - **If it's horizontal axis:** + * - inner-right [default] + * - inner-center + * - inner-left + * - outer-right + * - outer-center + * - outer-left + * - **If it's vertical axis:** + * - inner-top [default] + * - inner-middle + * - inner-bottom + * - outer-top + * - outer-middle + * - outer-bottom + * @name axis․x․label + * @memberOf Options + * @type {String|Object} + * @default undefined + * @example + * axis: { + * x: { + * label: "Your X Axis" + * } + * } + * + * axis: { + * x: { + * label: { + * text: "Your X Axis", + * position: "outer-center" + * } + * } + * } + */ + axis_x_label: {}, + + /** + * Set clip-path attribute for y axis element + * @name axis․y․clipPath + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * // don't set 'clip-path' attribute + * clipPath: false + */ + axis_y_clipPath: !0, + + /** + * Show or hide y axis. + * @name axis․y․show + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y: { + * show: false + * } + * } + */ + axis_y_show: !0, + + /** + * Set type of y axis.

    + * **Available Values:** + * - timeseries + * - category + * - indexed + * @name axis․y․type + * @memberOf Options + * @type {String} + * @default undefined + * @example + * axis: { + * y: { + * type: "timeseries" + * } + * } + */ + axis_y_type: undefined, + + /** + * Set max value of y axis. + * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0). + * @name axis․y․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * max: 1000 + * } + * } + */ + axis_y_max: undefined, + + /** + * Set min value of y axis. + * - **NOTE:** + * Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0). + * @name axis․y․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * min: 1000 + * } + * } + */ + axis_y_min: undefined, + + /** + * Change the direction of y axis.

    + * If true set, the direction will be from the top to the bottom. + * @name axis․y․inverted + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y: { + * inverted: true + * } + * } + */ + axis_y_inverted: !1, + + /** + * Set center value of y axis. + * @name axis․y․center + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * center: 0 + * } + * } + */ + axis_y_center: undefined, + + /** + * Show y axis inside of the chart. + * @name axis․y․inner + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y: { + * inner: true + * } + * } + */ + axis_y_inner: !1, + + /** + * Set label on y axis.

    + * You can set y axis label and change its position by this option. This option works in the same way as axis.x.label. + * @name axis․y․label + * @memberOf Options + * @type {String|Object} + * @default {} + * @example + * axis: { + * y: { + * label: "Your Y Axis" + * } + * } + * + * axis: { + * y: { + * label: { + * text: "Your Y Axis", + * position: "outer-middle" + * } + * } + * } + */ + axis_y_label: {}, + + /** + * Set formatter for y axis tick text.

    + * This option accepts d3.format object as well as a function you define. + * @name axis․y․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * y: { + * tick: { + * format: function(x) { + * return x.getFullYear(); + * } + * } + * } + * } + */ + axis_y_tick_format: undefined, + + /** + * Show y axis outer tick. + * @name axis․y․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_y_tick_outer: !0, + + /** + * Set y axis tick values manually. + * @name axis․y․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * y: { + * tick: { + * values: [100, 1000, 10000] + * } + * } + * } + */ + axis_y_tick_values: null, + axis_y_tick_rotate: 0, + + /** + * Set the number of y axis ticks.

    + * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful. + * @name axis․y․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_y_tick_count: undefined, + + /** + * Set the y Axis tick text's position relatively its original position + * @name axis․y․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * y: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_y_tick_text_position: { x: 0, y: 0 }, + + /** + * Set the number of y axis ticks.

    + * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful. + * @name axis․y․tick․time + * @memberOf Options + * @private + * @type {Object} + * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals) + * @example + * axis: { + * y: { + * tick: { + * time: { + * // ticks at 15-minute intervals + * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks + * value: d3.timeMinute.every(15) + * } + * } + * } + * } + */ + // @TODO: not fully implemented yet + axis_y_tick_time_value: undefined, + + /** + * Set padding for y axis.

    + * You can set padding for y axis to create more space on the edge of the axis. + * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels. + * + * - **NOTE:** For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom. + * @name axis․y․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * y: { + * padding: { + * top: 0, + * bottom: 0 + * } + * } + * } + */ + axis_y_padding: {}, + + /** + * Set default range of y axis.

    + * This option set the default value for y axis when there is no data on init. + * @name axis․y․default + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * y: { + * default: [0, 1000] + * } + * } + */ + axis_y_default: undefined, + + /** + * Show or hide y2 axis. + * @name axis․y2․show + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * show: true + * } + * } + */ + axis_y2_show: !1, + + /** + * Set max value of y2 axis. + * @name axis․y2․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * max: 1000 + * } + * } + */ + axis_y2_max: undefined, + + /** + * Set min value of y2 axis. + * @name axis․y2․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * min: -1000 + * } + * } + */ + axis_y2_min: undefined, + + /** + * Change the direction of y2 axis.

    + * If true set, the direction will be from the top to the bottom. + * @name axis․y2․inverted + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * inverted: true + * } + * } + */ + axis_y2_inverted: !1, + + /** + * Set center value of y2 axis. + * @name axis․y2․center + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * center: 0 + * } + * } + */ + axis_y2_center: undefined, + + /** + * Show y2 axis inside of the chart. + * @name axis․y2․inner + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * inner: true + * } + * } + */ + axis_y2_inner: !1, + + /** + * Set label on y2 axis.

    + * You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label. + * @name axis․y2․label + * @memberOf Options + * @type {String|Object} + * @default {} + * @example + * axis: { + * y2: { + * label: "Your Y2 Axis" + * } + * } + * + * axis: { + * y2: { + * label: { + * text: "Your Y2 Axis", + * position: "outer-middle" + * } + * } + * } + */ + axis_y2_label: {}, + + /** + * Set formatter for y2 axis tick text.

    + * This option works in the same way as axis.y.format. + * @name axis․y2․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * y2: { + * tick: { + * format: d3.format("$,") + * //or format: function(d) { return "$" + d; } + * } + * } + * } + */ + axis_y2_tick_format: undefined, + + /** + * Show or hide y2 axis outer tick. + * @name axis․y2․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y2: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_y2_tick_outer: !0, + + /** + * Set y2 axis tick values manually. + * @name axis․y2․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * y2: { + * tick: { + * values: [100, 1000, 10000] + * } + * } + * } + */ + axis_y2_tick_values: null, + + /** + * Set the number of y2 axis ticks. + * - **NOTE:** This works in the same way as axis.y.tick.count. + * @name axis․y2․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_y2_tick_count: undefined, + + /** + * Set the y2 Axis tick text's position relatively its original position + * @name axis․y2․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * y2: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_y2_tick_text_position: { x: 0, y: 0 }, + + /** + * Set the number of y2 axis ticks. + * - **NOTE:** This works in the same way as axis.y.tick.count. + * @name axis․y2․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * y2: { + * padding: { + * top: 100, + * bottom: 100 + * } + * } + * } + */ + axis_y2_padding: {}, + + /** + * Set default range of y2 axis.

    + * This option set the default value for y2 axis when there is no data on init. + * @name axis․y2․default + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * y2: { + * default: [0, 1000] + * } + * } + */ + axis_y2_default: undefined, + + /** + * Set related options + * @name grid + * @memberOf Options + * @type {Object} + * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements. + * @property {Boolean} [x.show=false] Show grids along x axis. + * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.
    + * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available. + * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer. + * @property {Boolean} [y.show=false] Show grids along x axis. + * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.
    + * This option accepts array including object that has value, text, position and class. + * @property {Boolean} [y.ticks=10] Number of y grids to be shown. + * @property {Boolean} [focus.show=true] Show grids when focus. + * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements. + * @default undefined + * @example + * grid: { + * x: { + * show: true, + * lines: [ + * {value: 2, text: "Label on 2"}, + * {value: 5, text: "Label on 5", class: "label-5"} + * {value: 6, text: "Label on 6", position: "start"} + * ] + * }, + * y: { + * show: true, + * lines: [ + * {value: 100, text: "Label on 100"}, + * {value: 200, text: "Label on 200", class: "label-200"} + * {value: 300, text: "Label on 300", position: 'middle'} + * ], + * ticks: 5 + * }, + * front: true, + * focus: { + * show: false + * }, + * lines: { + * front: false + * } + * } + */ + grid_x_show: !1, + grid_x_type: "tick", + grid_x_lines: [], + grid_y_show: !1, + grid_y_lines: [], + grid_y_ticks: 10, + grid_focus_show: !0, + grid_front: !1, + grid_lines_front: !0, + + /** + * Set point options + * @name point + * @memberOf Options + * @type {Object} + * @property {Boolean} [point.show=true] Whether to show each point in line. + * @property {Number|Function} [point.r=2.5] The radius size of each point.
    + * - **NOTE:** Disabled for 'bubble' type + * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus. + * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.
    + * - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15` + * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected. + * @property {String} [point.type="circle"] The type of point to be drawn
    + * - **NOTE:** + * - If chart has 'bubble' type, only circle can be used. + * - For IE, non circle point expansions are not supported due to lack of transform support. + * - **Available Values:** + * - circle + * - rectangle + * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line
    + * - **NOTE:** + * - This is an `experimental` feature and can have some unexpected behaviors. + * - If chart has 'bubble' type, only circle can be used. + * - For IE, non circle point expansions are not supported due to lack of transform support. + * - **Available Values:** + * - circle + * - rectangle + * - svg shape tag interpreted as string
    + * (ex. ``) + * @example + * point: { + * show: false, + * r: 5, + * + * // or customize the radius + * r: function(d) { + * ... + * return r; + * }, + * + * focus: { + * expand: { + * enabled: true, + * r: 1 + * } + * }, + * select: { + * r: 3 + * }, + * + * // valid values are "circle" or "rectangle" + * type: "rectangle", + * + * // or indicate as pattern + * pattern: [ + * "circle", + * "rectangle", + * "" + * ], + * } + */ + point_show: !0, + point_r: 2.5, + point_sensitivity: 10, + point_focus_expand_enabled: !0, + point_focus_expand_r: undefined, + point_pattern: [], + point_select_r: undefined, + point_type: "circle", + + /** + * Set line options + * @name line + * @memberOf Options + * @type {Object} + * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.
    + * If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty. + * @property {Array} [line.classes=undefined] If set, used to set a css class on each line. + * @property {Boolean} [line.step.type=step] Change step type for step chart.
    + * **Available values:** + * - step + * - step-before + * - step-after + * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for. + * @example + * line: { + * connectNull: true, + * classes: [ + * "line-class1", + * "line-class2" + * ], + * step: { + * type: "step-after" + * }, + * + * // hide all data points ('point.show=false' also has similar effect) + * point: false, + * + * // show data points for only indicated datas + * point: [ + * "data1", "data3" + * ] + * } + */ + line_connectNull: !1, + line_step_type: "step", + line_classes: undefined, + line_point: !0, + + /** + * Set bar options + * @name bar + * @memberOf Options + * @type {Object} + * @property {Boolean} [bar.padding=0] The padding pixel value between each bar. + * @property {Number} [bar.radius] Set the radius of bar edge in pixel.
    - **NOTE:** Only for non-stacking bars. + * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width. + * @property {Number} [bar.width] Change the width of bar chart. + * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio. + * @property {Number} [bar.width.max] The maximum width value for ratio. + * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart. + * @example + * bar: { + * padding: 1, + * + * // the 'radius' option can be used only for non-stacking bars + * radius: 10, + * // or + * radius: { + * ratio: 0.5 + * } + * + * width: 10, + * // or + * width: { + * ratio: 0.2, + * max: 20 + * }, + * + * zerobased: false + * } + */ + bar_padding: 0, + bar_radius: undefined, + bar_radius_ratio: undefined, + bar_width: undefined, + bar_width_ratio: .6, + bar_width_max: undefined, + bar_zerobased: !0, + + /** + * Set bubble options + * @name bubble + * @memberOf Options + * @type {Object} + * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value + * @example + * bubble: { + * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50. + * // And the lesser will have radius relatively from tha max value. + * maxR: 50, + * + * // or set radius callback + * maxR: function(d) { + * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5} + * ... + * return Math.sqrt(d.value * 2); + * } + * } + */ + bubble_maxR: 35, + + /** + * Set area options + * @name area + * @memberOf Options + * @type {Object} + * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart. + * @property {Boolean} [area.above=false] + * @example + * area: { + * zerobased: false, + * above: true + * } + */ + area_zerobased: !0, + area_above: !1, + + /** + * Set pie options + * @name pie + * @memberOf Options + * @type {Object} + * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece. + * @property {Function} [pie.label.format] Set formatter for the label on each pie piece. + * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels. + * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position. + * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces. + * @property {Number} [pie.innerRadius=0] Sets the inner radius of pie arc. + * @property {Number} [pie.padAngle=0] Set padding between data. + * @property {Number} [pie.padding=0] Sets the gap between pie arcs. + * @example + * pie: { + * label: { + * show: false, + * format: function(value, ratio, id) { + * return d3.format("$")(value); + * }, + * threshold: 0.1, + * + * // set ratio callback. Should return ratio value + * ratio: function(d, radius, h) { + * ... + * return ratio; + * }, + * // or set ratio number + * ratio: 0.5 + * }, + * expand: false, + * innerRadius: 0, + * padAngle: 0.1, + * padding: 0 + * } + */ + pie_label_show: !0, + pie_label_format: undefined, + pie_label_threshold: .05, + pie_label_ratio: undefined, + pie_expand: {}, + pie_expand_duration: 50, + pie_innerRadius: 0, + pie_padAngle: 0, + pie_padding: 0, + + /** + * Set gauge options + * @name gauge + * @memberOf Options + * @type {Object} + * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location. + * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge. + * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\n` character. + * @property {Function} [gauge.label.extents] Set customized min/max label text. + * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge. + * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds. + * @property {Number} [gauge.min=0] Set min value of the gauge. + * @property {Number} [gauge.max=100] Set max value of the gauge. + * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2] + * @property {String} [gauge.units] Set units of the gauge. + * @property {Number} [gauge.width] Set width of gauge chart. + * @example + * gauge: { + * fullCircle: false, + * label: { + * show: false, + * format: function(value, ratio) { + * return value; + * + * // to multiline, return with '\n' character + * // return value +"%\nLine1\n2Line2"; + * }, + * extents: function(value, isMax) { + * return (isMax ? "Max:" : "Min:") + value; + * } + * }, + * expand: false, + * + * // or set duration + * expand: { + * duration: 20 + * }, + * min: -100, + * max: 200, + * units: "%", + * width: 10 + * } + */ + gauge_fullCircle: !1, + gauge_label_show: !0, + gauge_label_format: undefined, + gauge_min: 0, + gauge_max: 100, + gauge_startingAngle: -1 * Math.PI / 2, + gauge_label_extents: undefined, + gauge_units: undefined, + gauge_width: undefined, + gauge_expand: {}, + gauge_expand_duration: 50, + + /** + * Set donut options + * @name donut + * @memberOf Options + * @type {Object} + * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece. + * @property {Function} [donut.label.format] Set formatter for the label on each donut piece. + * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels. + * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position. + * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces. + * @property {Number} [donut.width] Set width of donut chart. + * @property {String} [donut.title=""] Set title of donut chart. Use `\n` character to enter line break. + * @property {Number} [donut.padAngle=0] Set padding between data. + * @example + * donut: { + * label: { + * show: false, + * format: function(value, ratio, id) { + * return d3.format("$")(value); + * }, + * threshold: 0.1, + * + * // set ratio callback. Should return ratio value + * ratio: function(d, radius, h) { + * ... + * return ratio; + * }, + * // or set ratio number + * ratio: 0.5 + * }, + * expand: false, + * width: 10, + * padAngle: 0.2, + * title: "Donut Title" + * + * // title with line break + * title: "Title1\nTitle2" + * } + */ + donut_label_show: !0, + donut_label_format: undefined, + donut_label_threshold: .05, + donut_label_ratio: undefined, + donut_width: undefined, + donut_title: "", + donut_expand: {}, + donut_expand_duration: 50, + donut_padAngle: 0, + + /** + * Set spline options + * @name spline + * @memberOf Options + * @type {Object} + * @property {String} [spline.interpolation.type=cardinal] + * @example + * spline: { + * interpolation: { + * type: "cardinal" + * } + * } + */ + spline_interpolation_type: "cardinal", + + /** + * Set radar options + * @name radar + * @memberOf Options + * @type {Object} + * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data. + * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line. + * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text. + * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn. + * @property {Number} [radar.level.depth=3] Set the level depth. + * @property {Boolean} [radar.level.show=true] Show or hide level. + * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value. + * @property {Boolean} [radar.level.text.show=true] Show or hide level text. + * @property {Number} [radar.size.ratio=0.87] Set size ratio. + * @example + * radar: { + * axis: { + * max: 50, + * line: { + * show: false + * }, + * text: { + * show: false + * } + * }, + * direction: { + * clockwise: true + * }, + * level: { + * show: false, + * text: { + * format: function(x) { + * return x + "%"; + * }, + * show: true + * } + * }, + * size: { + * ratio: 0.7 + * } + * } + */ + radar_axis_max: undefined, + radar_axis_line_show: !0, + radar_axis_text_show: !0, + radar_level_depth: 3, + radar_level_show: !0, + radar_level_text_format: function radar_level_text_format(x) { + return x % 1 === 0 ? x : x.toFixed(2); + }, + radar_level_text_show: !0, + radar_size_ratio: .87, + radar_direction_clockwise: !1, + + /** + * Show rectangles inside the chart.

    + * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional. + * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class. + * @name regions + * @memberOf Options + * @type {Array} + * @default [] + * @example + * regions: [ + * { + * axis: "x", + * start: 1, + * end: 4, + * class: "region-1-4" + * } + * ] + */ + regions: [], + + /** + * Tooltip options + * @name tooltip + * @memberOf Options + * @type {Object} + * @property {Boolean} [tooltip.show=true] Show or hide tooltip.
    + * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points. + * - **NOTE:** The overlapped data points will be displayed as grouped even if set false. + * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown. + * @property {String} [tooltip.linked.name=""] Groping name for linked tooltip.
    If specified, linked tooltip will be groped interacting to be worked only with the same name. + * @property {Function} [tooltip.format.title] Set format for the title of tooltip.
    + * Specified function receives x of the data point to show. + * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.
    + * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.
    + * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + * If undefined returned, the row of that value will be skipped. + * @property {Function} [tooltip.position] Set custom position for the tooltip.
    + * This option can be used to modify the tooltip position by returning object that has top and left. + * @property {Function} [tooltip.contents] Set custom HTML for the tooltip.
    + * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points. + * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization. + * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization. + * @property {Object} [tooltip.init.position={top: "0px",left: "50px"}] Set the position of tooltip at the initialization. + * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown. + * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden. + * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown + * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden. + * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.

    + * **Available Values:** + * - `desc`: In descending data value order + * - `asc`: In ascending data value order + * - `null`: It keeps the data display order
    + * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.
    + * If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "") + * - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters) + * @example + * tooltip: { + * show: true, + * grouped: false, + * format: { + * title: function(x) { return "Data " + x; }, + * name: function(name, ratio, id, index) { return name; }, + * value: function(value, ratio, id, index) { return ratio; } + * }, + * position: function(data, width, height, element) { + * return {top: 0, left: 0} + * }, + * contents: function(d, defaultTitleFormat, defaultValueFormat, color) { + * return ... // formatted html as you want + * }, + * + * // sort tooltip data value display in ascending order + * order: "asc", + * + * // specifying sort function + * order: function(a, b) { + * // param data passed format + * {x: 5, value: 250, id: "data1", index: 5, name: "data1"} + * ... + * }, + * + * // show at the initialization + * init: { + * show: true, + * x: 2, + * position: { + * top: "150px", + * left: "250px" + * } + * }, + * + * // fires prior tooltip is shown + * onshow: function() { ...}, + * // fires prior tooltip is hidden + * onhide: function() { ... }, + * // fires after tooltip is shown + * onshown: function() { ... }, + * // fires after tooltip is hidden + * onhidden: function() { ... }, + * + * // Link any tooltips when multiple charts are on the screen where same x coordinates are available + * // Useful for timeseries correlation + * linked: true, + * + * // Specify name to interact those with the same name only. + * linked: { + * name: "some-group" + * } + * } + */ + tooltip_show: !0, + tooltip_grouped: !0, + tooltip_format_title: undefined, + tooltip_format_name: undefined, + tooltip_format_value: undefined, + tooltip_position: undefined, + tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) { + return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : ""; + }, + tooltip_init_show: !1, + tooltip_init_x: 0, + tooltip_init_position: { + top: "0px", + left: "50px" + }, + tooltip_linked: !1, + tooltip_linked_name: "", + tooltip_onshow: function tooltip_onshow() {}, + tooltip_onhide: function tooltip_onhide() {}, + tooltip_onshown: function tooltip_onshown() {}, + tooltip_onhidden: function tooltip_onhidden() {}, + tooltip_order: null, + + /** + * Set title options + * @name title + * @memberOf Options + * @type {Object} + * @property {String} [title.text] + * @property {Number} [title.padding.top=0] + * @property {Number} [title.padding.right=0] + * @property {Number} [title.padding.bottom=0] + * @property {Number} [title.padding.left=0] + * @property {String} [title.position=top-center] + * @example + * title: { + * text: "Title Text", + * padding: { + * top: 10, + * right: 10, + * bottom: 10, + * left: 10 + * }, + * position: "top-center" + * } + */ + title_text: undefined, + title_padding: { + top: 0, + right: 0, + bottom: 0, + left: 0 + }, + title_position: "top-center" + }; +}; + +exports.default = Options; +module.exports = exports["default"]; + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Scale = __webpack_require__(10), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getScale: function getScale(min, max, forTimeseries) { + return (forTimeseries ? (0, _d3Scale.scaleTime)() : (0, _d3Scale.scaleLinear)()).range([min, max]); + }, + + + /** + * Get x Axis scale function + * @param {Number} min + * @param {Number} max + * @param {Number} domain + * @param {Function} offset The offset getter to be sum + * @return {Function} scale + * @private + */ + getX: function getX(min, max, domain, offset) { + var $$ = this, + scale = $$.zoomScale || $$.getScale(min, max, $$.isTimeSeries()); + + + return $$.getCustomizedScale(domain ? scale.domain(domain) : scale, offset); + }, + getY: function getY(min, max, domain) { + var scale = this.getScale(min, max, this.isTimeSeriesY()); + + return domain && scale.domain(domain), scale; + }, + + + /** + * Get customized scale + * @param {d3.scaleLinear|d3.scaleTime} scaleValue + * @param {Function} offsetValue Offset getter to be sum + * @return {} scale + * @private + */ + getCustomizedScale: function getCustomizedScale(scaleValue, offsetValue) { + var $$ = this, + offset = offsetValue || function () { + return $$.xAxis.tickOffset(); + }, + scale = function (d, raw) { + var v = scaleValue(d) + offset(); + + return raw ? v : Math.ceil(v); + }; + + // copy original scale methods + for (var key in scaleValue) scale[key] = scaleValue[key]; + + return scale.orgDomain = function () { + return scaleValue.domain(); + }, scale.orgScale = function () { + return scaleValue; + }, $$.isCategorized() && (scale.domain = function (domainValue) { + var domain = domainValue; + + return arguments.length ? (scaleValue.domain(domain), scale) : (domain = this.orgDomain(), [domain[0], domain[1] + 1]); + }), scale; + }, + getYScale: function getYScale(id) { + return this.axis.getId(id) === "y2" ? this.y2 : this.y; + }, + getSubYScale: function getSubYScale(id) { + return this.axis.getId(id) === "y2" ? this.subY2 : this.subY; + }, + + + /** + * Update scale + * @private + * @param {Boolean} withoutTransitionAtInit - param is given at the init rendering + */ + updateScales: function updateScales(withoutTransitionAtInit) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isInit = !$$.x; + + + // update edges + $$.xMin = isRotated ? 1 : 0, $$.xMax = isRotated ? $$.height : $$.width, $$.yMin = isRotated ? 0 : $$.height, $$.yMax = isRotated ? $$.width : 1, $$.subXMin = $$.xMin, $$.subXMax = $$.xMax, $$.subYMin = isRotated ? 0 : $$.height2, $$.subYMax = isRotated ? $$.width2 : 1, $$.x = $$.getX($$.xMin, $$.xMax, isInit ? undefined : $$.x.orgDomain(), function () { + return $$.xAxis.tickOffset(); + }), $$.y = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y_default : $$.y.domain()), $$.y2 = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y2_default : $$.y2.domain()), $$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, function (d) { + return d % 1 ? 0 : $$.subXAxis.tickOffset(); + }), $$.subY = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y_default : $$.subY.domain()), $$.subY2 = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y2_default : $$.subY2.domain()), $$.xAxisTickFormat = $$.axis.getXAxisTickFormat(), $$.xAxisTickValues = $$.axis.getXAxisTickValues(), $$.yAxisTickValues = $$.axis.getYAxisTickValues(), $$.y2AxisTickValues = $$.axis.getY2AxisTickValues(), $$.xAxis = $$.axis.getXAxis("x", $$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer, withoutTransitionAtInit), $$.subXAxis = $$.axis.getXAxis("subx", $$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer), $$.yAxis = $$.axis.getYAxis("y", $$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer), $$.y2Axis = $$.axis.getYAxis("y2", $$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer), $$.updateArc && $$.updateArc(); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(6), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// selection +(0, _util.extend)(_ChartInternal2.default.prototype, { + getYDomainMinMax: function getYDomainMinMax(targets, type) { + var $$ = this, + config = $$.config, + isMin = type === "min", + dataGroups = config.data_groups, + ids = $$.mapToIds(targets), + ys = $$.getValuesAsIdKeyed(targets), + f = isMin ? _d3Array.min : _d3Array.max; + + + return dataGroups.length > 0 && function () { + + for (var hasValue = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets), baseId = void 0, idsInGroup = void 0, j = 0; idsInGroup = dataGroups[j]; j++) if (idsInGroup = idsInGroup.filter(function (v) { + return ids.indexOf(v) >= 0; + }), idsInGroup.length !== 0) { + + // Consider values + if (baseId = idsInGroup[0], hasValue && ys[baseId]) { + var setter = isMin ? function (v, i) { + ys[baseId][i] = v < 0 ? v : 0; + } : function (v, i) { + ys[baseId][i] = v > 0 ? v : 0; + }; + + ys[baseId].forEach(setter); + } + + // Compute min + for (var id, _ret2, _loop = function (k, id) { + return ys[id] ? void ys[id].forEach(function (v, i) { + var val = +v, + meetCondition = isMin ? val > 0 : val < 0; + $$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasValue && meetCondition) && (ys[baseId][i] += val); + }) : "continue"; + }, k = 1; id = idsInGroup[k]; k++) _ret2 = _loop(k, id), _ret2 === "continue"; + } + }(), f(Object.keys(ys).map(function (key) { + return f(ys[key]); + })); + }, + getYDomainMin: function getYDomainMin(targets) { + return this.getYDomainMinMax(targets, "min"); + }, + getYDomainMax: function getYDomainMax(targets) { + return this.getYDomainMinMax(targets, "max"); + }, + getYDomain: function getYDomain(targets, axisId, xDomain) { + var $$ = this, + config = $$.config, + targetsByAxisId = targets.filter(function (t) { + return $$.axis.getId(t.id) === axisId; + }), + yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId, + yMin = axisId === "y2" ? config.axis_y2_min : config.axis_y_min, + yMax = axisId === "y2" ? config.axis_y2_max : config.axis_y_max, + yDomainMin = $$.getYDomainMin(yTargets), + yDomainMax = $$.getYDomainMax(yTargets), + center = axisId === "y2" ? config.axis_y2_center : config.axis_y_center, + isZeroBased = $$.hasType("bar", yTargets) && config.bar_zerobased || $$.hasType("area", yTargets) && config.area_zerobased, + isInverted = axisId === "y2" ? config.axis_y2_inverted : config.axis_y_inverted, + showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated, + showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated, + lengths = void 0; + + // MEMO: avoid inverting domain unexpectedly + + if (yDomainMin = (0, _util.isValue)(yMin) ? yMin : (0, _util.isValue)(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin, yDomainMax = (0, _util.isValue)(yMax) ? yMax : (0, _util.isValue)(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax, yTargets.length === 0) // use current domain if target of axisId is none + return axisId === "y2" ? $$.y2.domain() : $$.y.domain(); + + isNaN(yDomainMin) && (yDomainMin = 0), isNaN(yDomainMax) && (yDomainMax = yDomainMin), yDomainMin === yDomainMax && (yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0); + var isAllPositive = yDomainMin >= 0 && yDomainMax >= 0, + isAllNegative = yDomainMin <= 0 && yDomainMax <= 0; + ((0, _util.isValue)(yMin) && isAllPositive || (0, _util.isValue)(yMax) && isAllNegative) && (isZeroBased = !1), isZeroBased && (isAllPositive && (yDomainMin = 0), isAllNegative && (yDomainMax = 0)); + var domainLength = Math.abs(yDomainMax - yDomainMin), + paddingTop = domainLength * .1, + paddingBottom = domainLength * .1; + + + if ((0, _util.isDefined)(center)) { + var yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax)); + + yDomainMax = center + yDomainAbs, yDomainMin = center - yDomainAbs; + } + + // add padding for data label + if (showHorizontalDataLabel) { + lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "width"); + var diff = (0, _util.diffDomain)($$.y.range()), + ratio = [lengths[0] / diff, lengths[1] / diff]; + paddingTop += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1])), paddingBottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1])); + } else showVerticalDataLabel && (lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "height"), paddingTop += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength), paddingBottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength)); + + axisId === "y" && (0, _util.notEmpty)(config.axis_y_padding) && (paddingTop = $$.axis.getPadding(config.axis_y_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y_padding, "bottom", paddingBottom, domainLength)), axisId === "y2" && (0, _util.notEmpty)(config.axis_y2_padding) && (paddingTop = $$.axis.getPadding(config.axis_y2_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y2_padding, "bottom", paddingBottom, domainLength)), isZeroBased && (isAllPositive && (paddingBottom = yDomainMin), isAllNegative && (paddingTop = -yDomainMax)); + + + var domain = [yDomainMin - paddingBottom, yDomainMax + paddingTop]; + + return isInverted ? domain.reverse() : domain; + }, + getXDomainMinMax: function getXDomainMinMax(targets, type) { + var $$ = this, + value = $$.config["axis_x_" + type], + f = type === "min" ? _d3Array.min : _d3Array.max; + + + return (0, _util.isDefined)(value) ? $$.isTimeSeries() ? $$.parseDate(value) : value : f(targets, function (t) { + return f(t.values, function (v) { + return v.x; + }); + }); + }, + getXDomainMin: function getXDomainMin(targets) { + return this.getXDomainMinMax(targets, "min"); + }, + getXDomainMax: function getXDomainMax(targets) { + return this.getXDomainMinMax(targets, "max"); + }, + getXDomainPadding: function getXDomainPadding(domain) { + var $$ = this, + config = $$.config, + diff = domain[1] - domain[0], + xPadding = config.axis_x_padding, + maxDataCount = void 0, + padding = void 0; + $$.isCategorized() ? padding = 0 : $$.hasType("bar") ? (maxDataCount = $$.getMaxDataCount(), padding = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5) : padding = diff * .01; + var left = padding, + right = padding; + + + return (0, _util.isObject)(xPadding) && (0, _util.notEmpty)(xPadding) ? (left = (0, _util.isValue)(xPadding.left) ? xPadding.left : padding, right = (0, _util.isValue)(xPadding.right) ? xPadding.right : padding) : (0, _util.isNumber)(config.axis_x_padding) && (left = xPadding, right = xPadding), { left: left, right: right }; + }, + getXDomain: function getXDomain(targets) { + var $$ = this, + xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)], + firstX = xDomain[0], + lastX = xDomain[1], + padding = $$.getXDomainPadding(xDomain), + min = 0, + max = 0; + // show center of x domain if min and max are the same + + return firstX - lastX !== 0 || $$.isCategorized() || ($$.isTimeSeries() ? (firstX = new Date(firstX.getTime() * .5), lastX = new Date(lastX.getTime() * 1.5)) : (firstX = firstX === 0 ? 1 : firstX * .5, lastX = lastX === 0 ? -1 : lastX * 1.5)), (firstX || firstX === 0) && (min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left), (lastX || lastX === 0) && (max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right), [min, max]; + }, + updateXDomain: function updateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) { + var $$ = this, + config = $$.config, + zoomEnabled = config.zoom_enabled; + + + if (withUpdateOrgXDomain && ($$.x.domain(domain || (0, _d3Array.extent)($$.getXDomain(targets))), $$.orgXDomain = $$.x.domain(), zoomEnabled && $$.zoom.updateScaleExtent(), $$.subX.domain($$.x.domain()), $$.brush && $$.brush.scale($$.subX)), withUpdateXDomain) { + var domainValue = domain || !$$.brush || (0, _util.brushEmpty)($$) ? $$.orgXDomain : (0, _util.getBrushSelection)($$).map($$.subX.invert); + + $$.x.domain(domainValue), zoomEnabled && $$.zoom.updateScaleExtent(); + } + + // Trim domain when too big by zoom mousemove event + + + return withTrim && $$.x.domain($$.trimXDomain($$.x.orgDomain())), $$.x.domain(); + }, + trimXDomain: function trimXDomain(domain) { + var zoomDomain = this.getZoomDomain(), + min = zoomDomain[0], + max = zoomDomain[1]; + + + return domain[0] <= min && (domain[1] = +domain[1] + (min - domain[0]), domain[0] = min), max <= domain[1] && (domain[0] = +domain[0] - (domain[1] - max), domain[1] = max), domain; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(6), + _d3Collection = __webpack_require__(22), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + isX: function isX(key) { + var $$ = this, + config = $$.config, + dataKey = config.data_x && key === config.data_x, + existValue = (0, _util.notEmpty)(config.data_xs) && (0, _util.hasValue)(config.data_xs, key); + + + return dataKey || existValue; + }, + isNotX: function isNotX(key) { + return !this.isX(key); + }, + getXKey: function getXKey(id) { + var $$ = this, + config = $$.config; + + + return config.data_x ? config.data_x : (0, _util.notEmpty)(config.data_xs) ? config.data_xs[id] : null; + }, + getXValuesOfXKey: function getXValuesOfXKey(key, targets) { + var $$ = this, + ids = targets && (0, _util.notEmpty)(targets) ? $$.mapToIds(targets) : [], + xValues = void 0; + + + return ids.forEach(function (id) { + $$.getXKey(id) === key && (xValues = $$.data.xs[id]); + }), xValues; + }, + getIndexByX: function getIndexByX(x) { + var $$ = this, + data = $$.filterByX($$.data.targets, x); + + + return data.length ? data[0].index : null; + }, + getXValue: function getXValue(id, i) { + var $$ = this; + + return id in $$.data.xs && $$.data.xs[id] && (0, _util.isValue)($$.data.xs[id][i]) ? $$.data.xs[id][i] : i; + }, + getOtherTargetXs: function getOtherTargetXs() { + var $$ = this, + idsForX = Object.keys($$.data.xs); + + + return idsForX.length ? $$.data.xs[idsForX[0]] : null; + }, + getOtherTargetX: function getOtherTargetX(index) { + var xs = this.getOtherTargetXs(); + + return xs && index < xs.length ? xs[index] : null; + }, + addXs: function addXs(xs) { + var $$ = this; + + Object.keys(xs).forEach(function (id) { + $$.config.data_xs[id] = xs[id]; + }); + }, + hasMultipleX: function hasMultipleX(xs) { + // https://github.com/d3/d3-collection + return (0, _d3Collection.set)(Object.keys(xs).map(function (id) { + return xs[id]; + })).size() > 1; + }, + isMultipleX: function isMultipleX() { + return (0, _util.notEmpty)(this.config.data_xs) || !this.config.data_xSort || this.hasType("bubble") || this.hasType("scatter"); + }, + addName: function addName(data) { + var $$ = this, + name = void 0; + + + return data && (name = $$.config.data_names[data.id], data.name = name === undefined ? data.id : name), data; + }, + getAllValuesOnIndex: function getAllValuesOnIndex(index) { + var $$ = this; + + return $$.filterTargetsToShow($$.data.targets).map(function (t) { + return $$.addName($$.getValueOnIndex(t.values, index)); + }); + }, + getValueOnIndex: function getValueOnIndex(values, index) { + var valueOnIndex = values.filter(function (v) { + return v.index === index; + }); + + return valueOnIndex.length ? valueOnIndex[0] : null; + }, + updateTargetX: function updateTargetX(targets, x) { + var $$ = this; + + targets.forEach(function (t) { + t.values.forEach(function (v, i) { + v.x = $$.generateTargetX(x[i], t.id, i); + }), $$.data.xs[t.id] = x; + }); + }, + updateTargetXs: function updateTargetXs(targets, xs) { + var $$ = this; + + targets.forEach(function (t) { + xs[t.id] && $$.updateTargetX([t], xs[t.id]); + }); + }, + generateTargetX: function generateTargetX(rawX, id, index) { + var $$ = this, + x = index; + + + return $$.isTimeSeries() ? x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index)) : $$.isCustomX() && !$$.isCategorized() && (x = (0, _util.isValue)(rawX) ? +rawX : $$.getXValue(id, index)), x; + }, + cloneTarget: function cloneTarget(target) { + return { + id: target.id, + id_org: target.id_org, + values: target.values.map(function (d) { + return { x: d.x, value: d.value, id: d.id }; + }) + }; + }, + updateXs: function updateXs() { + var $$ = this; + + $$.data.targets.length && ($$.xs = [], $$.data.targets[0].values.forEach(function (v) { + $$.xs[v.index] = v.x; + })); + }, + getPrevX: function getPrevX(i) { + var x = this.xs[i - 1]; + + return (0, _util.isDefined)(x) ? x : null; + }, + getNextX: function getNextX(i) { + var x = this.xs[i + 1]; + + return (0, _util.isDefined)(x) ? x : null; + }, + + + /** + * Get base value isAreaRangeType + * @param data Data object + * @return {Number} + * @private + */ + getBaseValue: function getBaseValue(data) { + var $$ = this, + value = data.value; + + // In case of area-range, data is given as: [low, mid, high] or {low, mid, high} + // will take the 'mid' as the base value + + return value && $$.isAreaRangeType(data) && (value = $$.getAreaRangeData(data, "mid")), value; + }, + + + /** + * Get min/max value from the data + * @private + * @param {Array} data array data to be evaluated + * @return {{min: {Number}, max: {Number}}} + */ + getMinMaxValue: function getMinMaxValue(data) { + var getBaseValue = this.getBaseValue.bind(this), + min = void 0, + max = void 0; + + + return (data || this.data.targets.map(function (t) { + return t.values; + })).forEach(function (v) { + min = (0, _d3Array.min)([min, (0, _d3Array.min)(v, getBaseValue)]), max = (0, _d3Array.max)([max, (0, _d3Array.max)(v, getBaseValue)]); + }), { min: min, max: max }; + }, + + + /** + * Get the min/max data + * @private + * @return {{min: Array, max: Array}} + */ + getMinMaxData: function getMinMaxData() { + var $$ = this, + minMaxData = $$.getCache("$minMaxData"); + + + if (!minMaxData) { + var data = $$.data.targets.map(function (t) { + return t.values; + }), + minMax = $$.getMinMaxValue(data), + min = [], + max = []; + data.forEach(function (v) { + var minData = $$.getFilteredDataByValue(v, minMax.min), + maxData = $$.getFilteredDataByValue(v, minMax.max); + minData.length && (min = min.concat(minData)), maxData.length && (max = max.concat(maxData)); + }), $$.addCache("$minMaxData", minMaxData = { min: min, max: max }); + } + + return minMaxData; + }, + + + /** + * Get total data sum + * @private + * @return {Number} + */ + getTotalDataSum: function getTotalDataSum() { + var $$ = this, + totalDataSum = $$.getCache("$totalDataSum"); + + + if (!totalDataSum) { + var total = 0; + + $$.data.targets.map(function (t) { + return t.values; + }).forEach(function (v) { + total += (0, _d3Array.sum)(v, function (t) { + return t.value; + }); + }), $$.addCache("$totalDataSum", totalDataSum = total); + } + + return totalDataSum; + }, + + + /** + * Get filtered data by value + * @param {Object} data + * @param {Number} value + * @return {Array} filtered array data + * @private + */ + getFilteredDataByValue: function getFilteredDataByValue(data, value) { + var _this = this; + + return data.filter(function (t) { + return _this.getBaseValue(t) === value; + }); + }, + + + /** + * Return the max length of the data + * @return {Number} max data length + * @private + */ + getMaxDataCount: function getMaxDataCount() { + return (0, _d3Array.max)(this.data.targets, function (t) { + return t.values.length; + }); + }, + getMaxDataCountTarget: function getMaxDataCountTarget(targets) { + var length = targets.length, + max = 0, + maxTarget = void 0; + + + return length > 1 ? targets.forEach(function (t) { + t.values.length > max && (maxTarget = t, max = t.values.length); + }) : maxTarget = length ? targets[0] : null, maxTarget; + }, + mapToIds: function mapToIds(targets) { + return targets.map(function (d) { + return d.id; + }); + }, + mapToTargetIds: function mapToTargetIds(ids) { + var $$ = this; + + return ids ? (0, _util.isArray)(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets); + }, + hasTarget: function hasTarget(targets, id) { + var ids = this.mapToIds(targets); + + for (var val, i = 0; val = ids[i]; i++) if (val === id) return !0; + + return !1; + }, + isTargetToShow: function isTargetToShow(targetId) { + return this.hiddenTargetIds.indexOf(targetId) < 0; + }, + isLegendToShow: function isLegendToShow(targetId) { + return this.hiddenLegendIds.indexOf(targetId) < 0; + }, + filterTargetsToShow: function filterTargetsToShow(targets) { + var $$ = this; + + return targets.filter(function (t) { + return $$.isTargetToShow(t.id); + }); + }, + mapTargetsToUniqueXs: function mapTargetsToUniqueXs(targets) { + var $$ = this, + xs = (0, _d3Collection.set)((0, _d3Array.merge)(targets.map(function (t) { + return t.values.map(function (v) { + return +v.x; + }); + }))).values(); + + + return xs = $$.isTimeSeries() ? xs.map(function (x) { + return new Date(+x); + }) : xs.map(function (x) { + return +x; + }), xs.sort(function (a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + }); + }, + addHiddenTargetIds: function addHiddenTargetIds(targetIds) { + this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds); + }, + removeHiddenTargetIds: function removeHiddenTargetIds(targetIds) { + this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + addHiddenLegendIds: function addHiddenLegendIds(targetIds) { + this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds); + }, + removeHiddenLegendIds: function removeHiddenLegendIds(targetIds) { + this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + getValuesAsIdKeyed: function getValuesAsIdKeyed(targets) { + var ys = {}; + + return targets.forEach(function (t) { + var data = []; + + t.values.forEach(function (v) { + var value = v.value; + + (0, _util.isArray)(value) ? data.push.apply(data, value) : (0, _util.isObject)(value) && "high" in value ? data.push.apply(data, Object.values(value)) : data.push(value); + }), ys[t.id] = data; + }), ys; + }, + checkValueInTargets: function checkValueInTargets(targets, checker) { + var ids = Object.keys(targets), + values = void 0; + + + for (var i = 0; i < ids.length; i++) { + values = targets[ids[i]].values; + + + for (var j = 0; j < values.length; j++) if (checker(values[j].value)) return !0; + } + + return !1; + }, + hasNegativeValueInTargets: function hasNegativeValueInTargets(targets) { + return this.checkValueInTargets(targets, function (v) { + return v < 0; + }); + }, + hasPositiveValueInTargets: function hasPositiveValueInTargets(targets) { + return this.checkValueInTargets(targets, function (v) { + return v > 0; + }); + }, + _checkOrder: function _checkOrder(type) { + var config = this.config; + + return (0, _util.isString)(config.data_order) && config.data_order.toLowerCase() === type; + }, + isOrderDesc: function isOrderDesc() { + return this._checkOrder("desc"); + }, + isOrderAsc: function isOrderAsc() { + return this._checkOrder("asc"); + }, + + + /** + * Sort targets data + * @param {Array} targetsValue + * @return {Array} + * @private + */ + orderTargets: function orderTargets(targetsValue) { + var $$ = this, + config = $$.config, + targets = [].concat(targetsValue), + orderAsc = $$.isOrderAsc(), + orderDesc = $$.isOrderDesc(); + // TODO: accept name array for order + + return orderAsc || orderDesc ? targets.sort(function (t1, t2) { + var reducer = function (p, c) { + return p + Math.abs(c.value); + }, + t1Sum = t1.values.reduce(reducer, 0), + t2Sum = t2.values.reduce(reducer, 0); + + return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum; + }) : (0, _util.isFunction)(config.data_order) && targets.sort(config.data_order), targets; + }, + filterByX: function filterByX(targets, x) { + return (0, _d3Array.merge)(targets.map(function (t) { + return t.values; + })).filter(function (v) { + return v.x - x === 0; + }); + }, + filterRemoveNull: function filterRemoveNull(data) { + var _this2 = this; + + return data.filter(function (d) { + return (0, _util.isValue)(_this2.getBaseValue(d)); + }); + }, + filterByXDomain: function filterByXDomain(targets, xDomain) { + return targets.map(function (t) { + return { + id: t.id, + id_org: t.id_org, + values: t.values.filter(function (v) { + return xDomain[0] <= v.x && v.x <= xDomain[1]; + }) + }; + }); + }, + hasDataLabel: function hasDataLabel() { + var dataLabels = this.config.data_labels; + + return (0, _util.isBoolean)(dataLabels) && dataLabels || (0, _util.isObjectType)(dataLabels) && (0, _util.notEmpty)(dataLabels); + }, + getDataLabelLength: function getDataLabelLength(min, max, key) { + var $$ = this, + lengths = [0, 0]; + + + return $$.selectChart.select("svg").selectAll(".dummy").data([min, max]).enter().append("text").text(function (d) { + return $$.dataLabelFormat(d.id)(d); + }).each(function (d, i) { + lengths[i] = this.getBoundingClientRect()[key] * 1.3; + }).remove(), lengths; + }, + isNoneArc: function isNoneArc(d) { + return this.hasTarget(this.data.targets, d.id); + }, + isArc: function isArc(d) { + return "data" in d && this.hasTarget(this.data.targets, d.data.id); + }, + findSameXOfValues: function findSameXOfValues(values, index) { + var targetX = values[index].x, + sames = [], + i = void 0; + + + for (i = index - 1; i >= 0 && !(targetX !== values[i].x); i--) sames.push(values[i]); + + for (i = index; i < values.length && !(targetX !== values[i].x); i++) sames.push(values[i]); + + return sames; + }, + findClosestFromTargets: function findClosestFromTargets(targets, pos) { + var $$ = this, + candidates = targets.map(function (target) { + return $$.findClosest(target.values, pos); + }); + // map to array of closest points of each target + + // decide closest point and return + return $$.findClosest(candidates, pos); + }, + findClosest: function findClosest(values, pos) { + var $$ = this, + minDist = $$.config.point_sensitivity, + closest = void 0; + + // find mouseovering bar + + return values.filter(function (v) { + return v && $$.isBarType(v.id); + }).forEach(function (v) { + var shape = $$.main.select("." + _classes2.default.bars + $$.getTargetSelectorSuffix(v.id) + " ." + _classes2.default.bar + "-" + v.index).node(); + + !closest && $$.isWithinBar(shape) && (closest = v); + }), values.filter(function (v) { + return v && !$$.isBarType(v.id); + }).forEach(function (v) { + var d = $$.dist(v, pos); + + d < minDist && (minDist = d, closest = v); + }), closest; + }, + dist: function dist(data, pos) { + var $$ = this, + isRotated = $$.config.axis_rotated, + xIndex = isRotated ? 1 : 0, + yIndex = isRotated ? 0 : 1, + y = $$.circleY(data, data.index), + x = $$.x(data.x); + + + return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2)); + }, + + + /** + * Convert data for step type + * @param {Array} values Object data values + * @return {Array} + * @private + */ + convertValuesToStep: function convertValuesToStep(values) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + stepType = config.line_step_type, + isCategorized = $$.isCategorized(), + converted = (0, _util.isArray)(values) ? values.concat() : [values]; + + + if (!isRotated && !isCategorized) return values; + + // insert & append cloning first/last value to be fully rendered covering on each gap sides + var id = converted[0].id, + x = converted[0].x - 1, + value = converted[0].value; + + // insert + + return isCategorized && converted.unshift({ x: x, value: value, id: id }), stepType === "step-after" && converted.unshift({ x: x - 1, value: value, id: id }), x = converted.length, value = converted[x - 1].value, isCategorized && converted.push({ x: x, value: value, id: id }), stepType === "step-before" && converted.push({ x: x + 1, value: value, id: id }), converted; + }, + convertValuesToRange: function convertValuesToRange(values) { + var converted = (0, _util.isArray)(values) ? values.concat() : [values], + ranges = []; + + + return converted.forEach(function (range) { + var x = range.x, + id = range.id; + ranges.push({ + x: x, + id: id, + value: range.value[0] + }), ranges.push({ + x: x, + id: id, + value: range.value[2] + }); + }), ranges; + }, + updateDataAttributes: function updateDataAttributes(name, attrs) { + var $$ = this, + config = $$.config, + current = config["data_" + name]; + return (0, _util.isUndefined)(attrs) ? current : (Object.keys(attrs).forEach(function (id) { + current[id] = attrs[id]; + }), $$.redraw({ withLegend: !0 }), current); + }, + getAreaRangeData: function getAreaRangeData(d, type) { + var value = d.value; + + if ((0, _util.isArray)(value)) { + var index = ["high", "mid", "low"].indexOf(type); + + return index === -1 ? null : value[index]; + } + + return value[type]; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 22 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__22__; + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Dsv = __webpack_require__(24), + _d3Collection = __webpack_require__(22), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + convertUrlToData: function convertUrlToData(url) { + var _this = this, + mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "csv", + headers = arguments[2], + keys = arguments[3], + done = arguments[4], + req = new XMLHttpRequest(); + + if (headers) for (var _iterator = Object.keys(headers), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + if (_i = _iterator.next(), _i.done) break; + _ref = _i.value; + } + + var header = _ref; + req.setRequestHeader(header, headers[header]); + } + + req.open("GET", url), req.onreadystatechange = function () { + if (req.readyState === 4) if (req.status === 200) { + var response = req.responseText; + + response && done.call(_this, _this["convert" + (0, _util.capitalize)(mimeType) + "ToData"](mimeType === "json" ? JSON.parse(response) : response, keys)); + } else throw new Error(url + ": Something went wrong loading!"); + }, req.send(); + }, + _convertCsvTsvToData: function _convertCsvTsvToData(parser, xsv) { + var rows = parser.rows(xsv), + d = void 0; + + + return rows.length === 1 ? (d = [{}], rows[0].forEach(function (id) { + d[0][id] = null; + })) : d = parser.parse(xsv), d; + }, + convertCsvToData: function convertCsvToData(xsv) { + return this._convertCsvTsvToData({ + rows: _d3Dsv.csvParseRows, + parse: _d3Dsv.csvParse + }, xsv); + }, + convertTsvToData: function convertTsvToData(tsv) { + return this._convertCsvTsvToData({ + rows: _d3Dsv.tsvParseRows, + parse: _d3Dsv.tsvParse + }, tsv); + }, + convertJsonToData: function convertJsonToData(json, keysParam) { + var _this2 = this, + config = this.config, + newRows = [], + targetKeys = void 0, + data = void 0; + + if ((0, _util.isArray)(json)) { + var keys = keysParam || config.data_keys; + + keys.x ? (targetKeys = keys.value.concat(keys.x), config.data_x = keys.x) : targetKeys = keys.value, newRows.push(targetKeys), json.forEach(function (o) { + var newRow = []; + + for (var _iterator2 = targetKeys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + if (_i2 = _iterator2.next(), _i2.done) break; + _ref2 = _i2.value; + } + + var key = _ref2; + + // convert undefined to null because undefined data will be removed in convertDataToTargets() + var v = _this2.findValueInJson(o, key); + + (0, _util.isUndefined)(v) && (v = null), newRow.push(v); + } + + newRows.push(newRow); + }), data = this.convertRowsToData(newRows); + } else Object.keys(json).forEach(function (key) { + var tmp = json[key].concat(); + + tmp.unshift(key), newRows.push(tmp); + }), data = this.convertColumnsToData(newRows); + + return data; + }, + findValueInJson: function findValueInJson(object, path) { + if (object[path] !== undefined) return object[path]; + + var convertedPath = path.replace(/\[(\w+)\]/g, ".$1"), + pathArray = convertedPath.replace(/^\./, "").split("."), + target = object; // convert indexes to properties (replace [] with .) + // strip a leading dot + + for (var _iterator3 = pathArray, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + if (_i3 = _iterator3.next(), _i3.done) break; + _ref3 = _i3.value; + } + + var k = _ref3; + + if (k in target) target = target[k];else { + target = undefined; + + break; + } + } + + return target; + }, + convertRowsToData: function convertRowsToData(rows) { + var keys = rows[0], + newRows = []; + + + for (var i = 1, len1 = rows.length; i < len1; i++) { + var newRow = {}; + + for (var j = 0, len2 = rows[i].length; j < len2; j++) { + if ((0, _util.isUndefined)(rows[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!"); + + newRow[keys[j]] = rows[i][j]; + } + + newRows.push(newRow); + } + + return newRows; + }, + convertColumnsToData: function convertColumnsToData(columns) { + var newRows = []; + + for (var i = 0, len1 = columns.length; i < len1; i++) { + var key = columns[i][0]; + + for (var j = 1, len2 = columns[i].length; j < len2; j++) { + + if ((0, _util.isUndefined)(newRows[j - 1]) && (newRows[j - 1] = {}), (0, _util.isUndefined)(columns[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!"); + + newRows[j - 1][key] = columns[i][j]; + } + } + + return newRows; + }, + convertDataToTargets: function convertDataToTargets(data, appendXs) { + var _this3 = this, + $$ = this, + config = $$.config, + ids = (0, _d3Collection.keys)(data[0]).filter($$.isNotX, $$), + xs = (0, _d3Collection.keys)(data[0]).filter($$.isX, $$), + xsData = void 0; + + ids.forEach(function (id) { + var xKey = _this3.getXKey(id); + + _this3.isCustomX() || _this3.isTimeSeries() ? xs.indexOf(xKey) >= 0 ? xsData = (appendXs && $$.data.xs[id] || []).concat(data.map(function (d) { + return d[xKey]; + }).filter(_util.isValue).map(function (rawX, i) { + return $$.generateTargetX(rawX, id, i); + })) : config.data_x ? xsData = _this3.getOtherTargetXs() : (0, _util.notEmpty)(config.data_xs) && (xsData = $$.getXValuesOfXKey(xKey, $$.data.targets)) : xsData = data.map(function (d, i) { + return i; + }), xsData && (_this3.data.xs[id] = xsData); + }), ids.forEach(function (id) { + if (!xsData) throw new Error("x is not defined for id = \"" + id + "\"."); + }); + + + // convert to target + var targets = ids.map(function (id, index) { + var convertedId = config.data_idConverter(id), + xKey = $$.getXKey(id), + isCategorized = $$.isCustomX() && $$.isCategorized(), + hasCategory = isCategorized && data.map(function (v) { + return v.x; + }).every(function (v) { + return config.axis_x_categories.indexOf(v) > -1; + }); + + + return { + id: convertedId, + id_org: id, + values: data.map(function (d, i) { + var rawX = d[xKey], + value = d[id], + x = void 0; + + + return value = value === null || isNaN(value) ? (0, _util.isArray)(value) || (0, _util.isObject)(value) && value.high ? value : null : +d[id], isCategorized && index === 0 && !(0, _util.isUndefined)(rawX) ? (!hasCategory && index === 0 && i === 0 && (config.axis_x_categories = []), x = config.axis_x_categories.indexOf(rawX), x === -1 && (x = config.axis_x_categories.length, config.axis_x_categories.push(rawX))) : x = $$.generateTargetX(rawX, id, i), ((0, _util.isUndefined)(d[id]) || $$.data.xs[id].length <= i) && (x = undefined), { x: x, value: value, id: convertedId }; + }).filter(function (v) { + return (0, _util.isDefined)(v.x); + }) + }; + }); + + // finish targets + + + return targets.forEach(function (t) { + config.data_xSort && (t.values = t.values.sort(function (v1, v2) { + var x1 = v1.x || v1.x === 0 ? v1.x : Infinity, + x2 = v2.x || v2.x === 0 ? v2.x : Infinity; + + + return x1 - x2; + })), t.values.forEach(function (v, i) { + var index = $$.data.targets ? $$.getIndexByX(v.x) : null; + + v.index = index === null ? i : index; + }), $$.data.xs[t.id].sort(function (v1, v2) { + return v1 - v2; + }); + }), $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets), $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets), config.data_type && $$.setTargetType($$.mapToIds(targets).filter(function (id) { + return !(id in config.data_types); + }), config.data_type), targets.forEach(function (d) { + return $$.addCache(d.id_org, d, !0); + }), targets; + } +}); + +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__24__; + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + load: function load(rawTargets, args) { + var $$ = this, + targets = rawTargets; + targets && (args.filter && (targets = targets.filter(args.filter)), (args.type || args.types) && targets.forEach(function (t) { + var type = args.types && args.types[t.id] || args.type; + + $$.setTargetType(t.id, type); + }), $$.data.targets.forEach(function (d) { + for (var i = 0; i < targets.length; i++) if (d.id === targets[i].id) { + d.values = targets[i].values, targets.splice(i, 1); + + break; + } + }), $$.data.targets = $$.data.targets.concat(targets)), $$.updateTargets($$.data.targets), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }), args.done && args.done(); + }, + loadFromArgs: function loadFromArgs(args) { + var $$ = this, + data = void 0; + + + // reset internally cached data + $$.resetCache(), args.data ? data = args.data : args.url ? $$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, function (d) { + $$.load($$.convertDataToTargets(d), args); + }) : args.json ? data = $$.convertJsonToData(args.json, args.keys) : args.rows ? data = $$.convertRowsToData(args.rows) : args.columns && (data = $$.convertColumnsToData(args.columns)), $$.load(data ? $$.convertDataToTargets(data) : null, args); + }, + unload: function unload(rawTargetIds, customDoneCb) { + var $$ = this, + done = customDoneCb, + targetIds = rawTargetIds; + + // reset internally cached data + + // If no target, call done and return + return $$.resetCache(), done || (done = function () {}), targetIds = targetIds.filter(function (id) { + return $$.hasTarget($$.data.targets, id); + }), targetIds && targetIds.length !== 0 ? void ($$.svg.selectAll(targetIds.map(function (id) { + return $$.selectorTarget(id); + })).transition().style("opacity", "0").remove().call($$.endall, done), targetIds.forEach(function (id) { + $$.withoutFadeIn[id] = !1, $$.legend && $$.legend.selectAll("." + _classes2.default.legendItem + $$.getTargetSelectorSuffix(id)).remove(), $$.data.targets = $$.data.targets.filter(function (t) { + return t.id !== id; + }); + })) : void done(); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Category Name + * @private + * @param {Number} index + * @returns {String} gategory Name + */ + categoryName: function categoryName(i) { + var config = this.config; + + return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i; + } +}); + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Drag = __webpack_require__(28), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the area that detects the event. + * Add a container for the zone that detects the event. + * @private + */ + initEventRect: function initEventRect() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.eventRects).style("fill-opacity", "0"); + }, + + + /** + * Redraws the area that detects the event. + * @private + */ + redrawEventRect: function redrawEventRect() { + var $$ = this, + config = $$.config, + zoomEnabled = config.zoom_enabled, + isMultipleX = $$.isMultipleX(), + eventRectUpdate = void 0, + eventRects = $$.main.select("." + _classes2.default.eventRects).style("cursor", zoomEnabled && (zoomEnabled === !0 || zoomEnabled.type === "wheel") ? config.axis_rotate ? "ns-resize" : "ew-resize" : null).classed(_classes2.default.eventRectsMultiple, isMultipleX).classed(_classes2.default.eventRectsSingle, !isMultipleX); + + // clear old rects + + if (eventRects.selectAll("." + _classes2.default.eventRect).remove(), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), isMultipleX) eventRectUpdate = $$.eventRect.data([0]), eventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter()).merge(eventRectUpdate);else { + // Set data and update $$.eventRect + var maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets); + + eventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), eventRectUpdate = $$.eventRect.data(function (d) { + return d; + }), eventRectUpdate.exit().remove(), eventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter()).merge(eventRectUpdate); + } + + $$.updateEventRect(eventRectUpdate), $$.inputType !== "touch" || $$.svg.on("touchstart.eventRect") || $$.hasArcType() || $$.bindTouchOnEventRect(isMultipleX); + }, + bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) { + var $$ = this, + config = $$.config, + getEventRect = function () { + var touch = _d3Selection.event.changedTouches[0]; + + return (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY)); + }, + getIndex = function (eventRect) { + var index = eventRect && eventRect.attr("class") && eventRect.attr("class").replace(new RegExp("(" + _classes2.default.eventRect + "-?|s)", "g"), "") * 1; + + return (isNaN(index) || index === null) && (index = -1), index; + }, + selectRect = function (context) { + if (isMultipleX) $$.selectRectForMultipleXs(context);else { + var eventRect = getEventRect(), + index = getIndex(eventRect); + $$.setOver(index), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, eventRect, index); + } + }, + preventDefault = config.interaction_inputType_touch.preventDefault, + isPrevented = (0, _util.isBoolean)(preventDefault) && preventDefault || !1, + preventThreshold = !isNaN(preventDefault) && preventDefault || null, + startPx = void 0, + preventEvent = function (event) { + var eventType = event.type, + touch = event.changedTouches[0], + currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")]; + + + // prevent document scrolling + eventType === "touchstart" ? isPrevented ? event.preventDefault() : preventThreshold !== null && (startPx = currentXY) : eventType === "touchmove" && (isPrevented || startPx === !0 || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) && (startPx = !0, event.preventDefault()); + }; + + // call event.preventDefault() + // according 'interaction.inputType.touch.preventDefault' option + + + // bind touch events + $$.svg.on("touchstart.eventRect touchmove.eventRect", function () { + var eventRect = getEventRect(); + + if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) { + if ($$.dragging || $$.flowing || $$.hasArcType()) return; + + preventEvent(_d3Selection.event), selectRect(this); + } else $$.unselectRect(); + }).on("touchend.eventRect", function () { + var eventRect = getEventRect(); + + if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) { + if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1)); + + // Call event handler + var index = getIndex(eventRect); + + isMultipleX || index === -1 || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onout.call($$.api, d2); + }); + } + }); + }, + + + /** + * Updates the location and size of the eventRect. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + */ + updateEventRect: function updateEventRect(eventRectUpdate) { + var $$ = this, + config = $$.config, + xScale = $$.zoomScale || $$.x, + eventRectData = eventRectUpdate || $$.eventRect.data(), + isRotated = config.axis_rotated, + x = void 0, + y = void 0, + w = void 0, + h = void 0; // set update selection if null + + if ($$.isMultipleX()) x = 0, y = 0, w = $$.width, h = $$.height;else { + var rectW = void 0, + rectX = void 0; + + + if ($$.isCategorized()) rectW = $$.getEventRectWidth(), rectX = function (d) { + return xScale(d.x) - rectW / 2; + };else { + $$.updateXs(); + + + var getPrevNextX = function (d) { + var index = d.index; + + return { + prev: $$.getPrevX(index), + next: $$.getNextX(index) + }; + }; + + rectW = function (d) { + var x = getPrevNextX(d); + + // if there this is a single data point make the eventRect full width (or height) + return x.prev === null && x.next === null ? isRotated ? $$.height : $$.width : (x.prev === null && (x.prev = xScale.domain()[0]), x.next === null && (x.next = xScale.domain()[1]), Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2)); + }, rectX = function (d) { + var x = getPrevNextX(d), + thisX = $$.data.xs[d.id][d.index]; + + + // if there this is a single data point position the eventRect at 0 + return x.prev === null && x.next === null ? 0 : (x.prev === null && (x.prev = xScale.domain()[0]), (xScale(thisX) + xScale(x.prev)) / 2); + }; + } + + x = isRotated ? 0 : rectX, y = isRotated ? rectX : 0, w = isRotated ? $$.width : rectW, h = isRotated ? rectW : $$.height; + } + + eventRectData.attr("class", $$.classEvent.bind($$)).attr("x", x).attr("y", y).attr("width", w).attr("height", h); + }, + selectRectForSingle: function selectRectForSingle(context, eventRect, index) { + var $$ = this, + config = $$.config, + isSelectionEnabled = config.data_selection_enabled, + isSelectionGrouped = config.data_selection_grouped, + isTooltipGrouped = config.tooltip_grouped, + selectedData = $$.getAllValuesOnIndex(index); + isTooltipGrouped && ($$.showTooltip(selectedData, context), $$.showXGridFocus(selectedData), !isSelectionEnabled || isSelectionGrouped) || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function () { + (0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED, !0), isSelectionEnabled && eventRect.style("cursor", isSelectionGrouped ? "pointer" : null), isTooltipGrouped || ($$.hideXGridFocus(), $$.hideTooltip(), !isSelectionGrouped && $$.expandCirclesBars(index)); + }).filter(function (d) { + return $$.isWithinShape(this, d); + }).call(function (selected) { + var d = selected.data(); + + isSelectionEnabled && (isSelectionGrouped || config.data_selection_isselectable(d)) && eventRect.style("cursor", "pointer"), isTooltipGrouped || ($$.showTooltip(d, context), $$.showXGridFocus(d), $$.unexpandCircles(), selected.each(function (d) { + return $$.expandCirclesBars(index, d.id); + })); + }); + }, + expandCirclesBars: function expandCirclesBars(index, id, reset) { + var $$ = this, + config = $$.config; + config.point_focus_expand_enabled && $$.expandCircles(index, id, reset), $$.expandBars(index, id, reset); + }, + selectRectForMultipleXs: function selectRectForMultipleXs(context) { + var $$ = this, + config = $$.config, + targetsToShow = $$.filterTargetsToShow($$.data.targets); + + + // do nothing when dragging + if (!($$.dragging || $$.hasArcType(targetsToShow))) { + var mouse = (0, _d3Selection.mouse)(context), + closest = $$.findClosestFromTargets(targetsToShow, mouse); + + + if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id) && (config.data_onout.call($$.api, $$.mouseover), $$.mouseover = undefined), !closest) return void $$.unselectRect(); + + var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x), + selectedData = sameXData.map(function (d) { + return $$.addName(d); + }); + + // show tooltip when cursor is close to some point + + $$.showTooltip(selectedData, context), $$.expandCirclesBars(closest.index, closest.id, !0), $$.showXGridFocus(selectedData), ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && ($$.svg.select("." + _classes2.default.eventRect).style("cursor", "pointer"), !$$.mouseover && (config.data_onover.call($$.api, closest), $$.mouseover = closest)); + } + }, + + + /** + * Unselect EventRect. + * @private + */ + unselectRect: function unselectRect() { + var $$ = this; + + $$.svg.select("." + _classes2.default.eventRect).style("cursor", null), $$.hideXGridFocus(), $$.hideTooltip(), $$.unexpandCircles(), $$.unexpandBars(); + }, + setOver: function setOver(index) { + var $$ = this, + config = $$.config; + $$.expandCirclesBars(index, null, !0), index !== -1 && $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onover.call($$.api, d2); + }); + }, + + + /** + * Return draggable selection function + * @return {Function} + * @private + */ + getDraggableSelection: function getDraggableSelection() { + var $$ = this, + config = $$.config; + + + return config.interaction_enabled && config.data_selection_draggable && $$.drag ? (0, _d3Drag.drag)().on("drag", function () { + $$.drag((0, _d3Selection.mouse)(this)); + }).on("start", function () { + $$.dragstart((0, _d3Selection.mouse)(this)); + }).on("end", function () { + $$.dragend(); + }) : function () {}; + }, + + + /** + * Create eventRect for each data on the x-axis. + * Register touch and drag events. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + * @returns {Object} d3.select(CLASS.eventRects) object. + */ + generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) { + var $$ = this, + config = $$.config, + rect = eventRectEnter.append("rect").attr("class", $$.classEvent.bind($$)).style("cursor", config.data_selection_enabled && config.data_selection_grouped ? "pointer" : null).on("click", function (d) { + if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1)); + + var index = d.index; + + $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + (config.data_selection_grouped || $$.isWithinShape(this, d2)) && ($$.toggleShape(this, d2, index), $$.config.data_onclick.call($$.api, d2, this)); + }); + }).call($$.getDraggableSelection()); + + + return $$.inputType === "mouse" && rect.on("mouseover", function (d) { + $$.dragging || $$.flowing || $$.hasArcType() || $$.setOver(d.index); + }).on("mousemove", function (d) { + // do nothing while dragging/flowing + if (!($$.dragging || $$.flowing || $$.hasArcType())) { + var index = d.index, + eventRect = $$.svg.select("." + _classes2.default.eventRect + "-" + index); + $$.isStepType(d) && $$.config.line_step_type === "step-after" && (0, _d3Selection.mouse)(this)[0] < $$.x($$.getXValue(d.id, index)) && (index -= 1), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, eventRect, index); + } + }).on("mouseout", function (d) { + // chart is destroyed + if ($$.config && !$$.hasArcType()) { + + var index = d.index; + + $$.unselectRect(), $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onout.call($$.api, d2); + }); + } + }), rect; + }, + + + /** + * Create an eventRect, + * Register touch and drag events. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + * @returns {Object} d3.select(CLASS.eventRects) object. + */ + generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) { + var $$ = this, + config = $$.config, + rect = eventRectEnter.append("rect").attr("x", 0).attr("y", 0).attr("width", $$.width).attr("height", $$.height).attr("class", _classes2.default.eventRect).on("click", function () { + var targetsToShow = $$.filterTargetsToShow($$.data.targets); + + // select if selection enabled + if (!$$.hasArcType(targetsToShow)) { + var mouse = (0, _d3Selection.mouse)(this), + closest = $$.findClosestFromTargets(targetsToShow, mouse); + !closest || ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && $$.main.selectAll("." + _classes2.default.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + _classes2.default.shape + "-" + closest.index).each(function () { + (config.data_selection_grouped || $$.isWithinShape(this, closest)) && ($$.toggleShape(this, closest, closest.index), $$.config.data_onclick.call($$.api, closest, this)); + }); + } + }).call($$.getDraggableSelection()); + + + return $$.inputType === "mouse" && rect.on("mouseover mousemove", function () { + $$.selectRectForMultipleXs(this); + }).on("mouseout", function () { + !$$.config || $$.hasArcType() || $$.unselectRect(); + }), rect; + }, + + + /** + * Dispatch a mouse event. + * @private + * @param {String} type event type + * @param {Number} index Index of eventRect + * @param {Array} mouse x and y coordinate value + */ + dispatchEvent: function dispatchEvent(type, index, mouse) { + var $$ = this, + selector = "." + ($$.isMultipleX() ? _classes2.default.eventRect : _classes2.default.eventRect + "-" + index), + eventRect = $$.main.select(selector).node(), + box = eventRect.getBoundingClientRect(), + x = box.left + (mouse ? mouse[0] : 0) + box.width / 2, + y = box.top + (mouse ? mouse[1] : 0); + + _util.emulateEvent[/^mouse/.test(type) ? "mouse" : "touch"](eventRect, type, { + screenX: x, + screenY: y, + clientX: x, + clientY: y + }); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 28 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__28__; + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getCurrentWidth: function getCurrentWidth() { + var $$ = this; + + return $$.config.size_width || $$.getParentWidth(); + }, + getCurrentHeight: function getCurrentHeight() { + var $$ = this, + config = $$.config, + h = config.size_height || $$.getParentHeight(); + + + return h > 0 ? h : 320 / ($$.hasType("gauge") && !config.gauge_fullCircle ? 2 : 1); + }, + getCurrentPaddingTop: function getCurrentPaddingTop() { + var $$ = this, + config = $$.config, + padding = (0, _util.isValue)(config.padding_top) ? config.padding_top : 0; + + + return $$.title && $$.title.node() && (padding += $$.getTitlePadding()), padding; + }, + getCurrentPaddingBottom: function getCurrentPaddingBottom() { + var config = this.config; + + return (0, _util.isValue)(config.padding_bottom) ? config.padding_bottom : 0; + }, + getCurrentPaddingLeft: function getCurrentPaddingLeft(withoutRecompute) { + var $$ = this, + config = $$.config, + paddingLeft = void 0; + + + return paddingLeft = (0, _util.isValue)(config.padding_left) ? config.padding_left : config.axis_rotated ? config.axis_x_show ? Math.max((0, _util.ceil10)($$.getAxisWidthByAxisId("x", withoutRecompute)), 40) : 1 : !config.axis_y_show || config.axis_y_inner ? $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1 : (0, _util.ceil10)($$.getAxisWidthByAxisId("y", withoutRecompute)), paddingLeft; + }, + getCurrentPaddingRight: function getCurrentPaddingRight() { + var $$ = this, + config = $$.config, + legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0, + paddingRight = void 0; + + + return paddingRight = (0, _util.isValue)(config.padding_right) ? config.padding_right + 1 : config.axis_rotated ? 10 + legendWidthOnRight : !config.axis_y2_show || config.axis_y2_inner ? 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0) : (0, _util.ceil10)($$.getAxisWidthByAxisId("y2")) + legendWidthOnRight, paddingRight; + }, + + + /** + * Get the parent rect element's size + * @param {String} key property/attribute name + * @private + */ + getParentRectValue: function getParentRectValue(key) { + for (var offsetName = "offset" + (0, _util.capitalize)(key), parent = this.selectChart.node(), v = void 0; !v && parent && parent.tagName !== "BODY";) { + try { + v = parent.getBoundingClientRect()[key]; + } catch (e) { + offsetName in parent && (v = parent[offsetName]); + } + + parent = parent.parentNode; + } + + if (key === "width") { + // Sometimes element's width value is incorrect(ex. flex container) + // In this case, use body's offsetWidth instead. + var bodyWidth = document.body.offsetWidth; + + v > bodyWidth && (v = bodyWidth); + } + + return v; + }, + getParentWidth: function getParentWidth() { + return this.getParentRectValue("width"); + }, + getParentHeight: function getParentHeight() { + var h = this.selectChart.style("height"); + + return h.indexOf("px") > 0 ? +h.replace("px", "") : 0; + }, + getSvgLeft: function getSvgLeft(withoutRecompute) { + var $$ = this, + config = $$.config, + hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner, + leftAxisClass = config.axis_rotated ? _classes2.default.axisX : _classes2.default.axisY, + leftAxis = $$.main.select("." + leftAxisClass).node(), + svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 }, + chartRect = $$.selectChart.node().getBoundingClientRect(), + hasArc = $$.hasArcType(), + svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute)); + + + return svgLeft > 0 ? svgLeft : 0; + }, + getAxisWidthByAxisId: function getAxisWidthByAxisId(id, withoutRecompute) { + var $$ = this, + position = $$.axis.getLabelPositionById(id); + + + return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40); + }, + getHorizontalAxisHeight: function getHorizontalAxisHeight(axisId) { + var $$ = this, + config = $$.config, + h = 30; + + + // Calculate x axis height when tick rotated + return axisId !== "x" || config.axis_x_show ? axisId === "x" && config.axis_x_height ? config.axis_x_height : axisId !== "y" || config.axis_y_show ? axisId !== "y2" || config.axis_y2_show ? (axisId === "x" && !config.axis_rotated && config.axis_x_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180)), axisId === "y" && config.axis_rotated && config.axis_y_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180)), h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === "y2" ? -10 : 0)) : $$.rotated_padding_top : !config.legend_show || $$.isLegendRight || $$.isLegendInset ? 1 : 10 : 8; + }, + getEventRectWidth: function getEventRectWidth() { + return Math.max(0, this.xAxis.tickInterval()); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Shape = __webpack_require__(31), + _d3Selection = __webpack_require__(5), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getShapeIndices: function getShapeIndices(typeFilter) { + var $$ = this, + config = $$.config, + indices = {}, + i = 0; + + + return $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) { + for (var groups, j = 0; groups = config.data_groups[j]; j++) if (!(groups.indexOf(d.id) < 0)) for (var _row5, _k5 = 0; _row5 = groups[_k5]; _k5++) if (_row5 in indices) { + indices[d.id] = indices[_row5]; + + break; + } + + (0, _util.isUndefined)(indices[d.id]) && (indices[d.id] = i++); + }), indices.__max__ = i - 1, indices; + }, + getShapeX: function getShapeX(offset, targetsNum, indices, isSub) { + var $$ = this, + scale = isSub ? $$.subX : $$.zoomScale || $$.x, + barPadding = $$.config.bar_padding; + + + return function (d) { + var index = d.id in indices ? indices[d.id] : 0, + x = d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0; + + // adjust x position for bar.padding option + + return offset && x && targetsNum > 1 && barPadding && (index && (x += barPadding * index), targetsNum > 2 ? x -= (targetsNum - 1) * barPadding / 2 : targetsNum === 2 && (x -= barPadding / 2)), x; + }; + }, + getShapeY: function getShapeY(isSub) { + var $$ = this; + + return function (d) { + var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id); + + return scale(d.value); + }; + }, + getShapeOffset: function getShapeOffset(typeFilter, indices, isSub) { + var $$ = this, + targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))), + targetIds = targets.map(function (t) { + return t.id; + }); + + + return function (d, idx) { + var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id), + y0 = scale(0), + offset = y0, + i = idx; + + + return targets.forEach(function (t) { + var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values; + + t.id === d.id || indices[t.id] !== indices[d.id] || targetIds.indexOf(t.id) < targetIds.indexOf(d.id) && (((0, _util.isUndefined)(values[i]) || +values[i].x !== +d.x) && (i = -1, values.forEach(function (v, j) { + var x1 = v.x.constructor === Date ? +v.x : v.x, + x2 = d.x.constructor === Date ? +d.x : d.x; + x1 === x2 && (i = j); + })), i in values && values[i].value * d.value >= 0 && (offset += scale(values[i].value) - y0)); + }), offset; + }; + }, + isWithinShape: function isWithinShape(that, d) { + var $$ = this, + shape = (0, _d3Selection.select)(that), + isWithin = void 0; + + + return $$.isTargetToShow(d.id) ? $$.hasValidPointType(that.nodeName) ? isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.pointSelectR(d) * 1.5) : that.nodeName === "path" && (isWithin = !shape.classed(_classes2.default.bar) || $$.isWithinBar(that)) : isWithin = !1, isWithin; + }, + getInterpolate: function getInterpolate(d) { + var $$ = this, + interpolation = $$.getInterpolateType(d); + + + return { + "basis": _d3Shape.curveBasis, + "basis-closed": _d3Shape.curveBasisClosed, + "basis-open": _d3Shape.curveBasisOpen, + "bundle": _d3Shape.curveBundle, + "cardinal": _d3Shape.curveCardinal, + "cardinal-closed": _d3Shape.curveCardinalClosed, + "cardinal-open": _d3Shape.curveCardinalOpen, + "catmull-rom": _d3Shape.curveCatmullRom, + "catmull-rom-closed": _d3Shape.curveCatmullRomClosed, + "catmull-rom-open": _d3Shape.curveCatmullRomOpen, + "monotone-x": _d3Shape.curveMonotoneX, + "monotone-y": _d3Shape.curveMonotoneY, + "natural": _d3Shape.curveNatural, + "linear-closed": _d3Shape.curveLinearClosed, + "linear": _d3Shape.curveLinear, + "step": _d3Shape.curveStep, + "step-after": _d3Shape.curveStepAfter, + "step-before": _d3Shape.curveStepBefore + }[interpolation]; + }, + getInterpolateType: function getInterpolateType(d) { + var $$ = this, + type = $$.config.spline_interpolation_type, + interpolation = $$.isInterpolationType(type) ? type : "cardinal"; + + + return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : "linear"; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 31 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__31__; + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Shape = __webpack_require__(31), + _d3Array = __webpack_require__(6), + _d3Interpolate = __webpack_require__(33), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initPie: function initPie() { + var $$ = this, + config = $$.config, + padding = config.pie_padding, + padAngle = $$.hasType("pie") && padding ? padding * .01 : config[config.data_type + "_padAngle"] ? config[config.data_type + "_padAngle"] : 0; + $$.pie = (0, _d3Shape.pie)().padAngle(padAngle).value(function (d) { + return d.values.reduce(function (a, b) { + return a + b.value; + }, 0); + }), config.data_order || $$.pie.sort(null); + }, + updateRadius: function updateRadius() { + var $$ = this, + config = $$.config, + radius = config.pie_innerRadius, + padding = config.pie_padding, + w = config.gauge_width || config.donut_width; + $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2, $$.radius = $$.radiusExpanded * .95, $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : .6; + + + var innerRadius = radius || (padding ? padding * ($$.innerRadiusRatio + .1) : 0); + + $$.innerRadius = $$.hasType("donut") || $$.hasType("gauge") ? $$.radius * $$.innerRadiusRatio : innerRadius; + }, + updateArc: function updateArc() { + var $$ = this; + + $$.svgArc = $$.getSvgArc(), $$.svgArcExpanded = $$.getSvgArcExpanded(), $$.svgArcExpandedSub = $$.getSvgArcExpanded(.98); + }, + updateAngle: function updateAngle(dValue) { + var $$ = this, + config = $$.config, + d = dValue, + found = !1, + index = 0, + gMin = void 0, + gMax = void 0, + gTic = void 0, + gValue = void 0; + return config ? ($$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) { + found || t.data.id !== d.data.id || (found = !0, d = t, d.index = index), index++; + }), isNaN(d.startAngle) && (d.startAngle = 0), isNaN(d.endAngle) && (d.endAngle = d.startAngle), $$.isGaugeType(d.data) && (gMin = config.gauge_min, gMax = config.gauge_max, gTic = Math.PI * (config.gauge_fullCircle ? 2 : 1) / (gMax - gMin), gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin, d.startAngle = config.gauge_startingAngle, d.endAngle = d.startAngle + gTic * gValue), found ? d : null) : null; + }, + getSvgArc: function getSvgArc() { + var $$ = this, + arc = (0, _d3Shape.arc)().outerRadius($$.radius).innerRadius($$.innerRadius), + newArc = function (d, withoutUpdate) { + if (withoutUpdate) return arc(d); // for interpolate + + var updated = $$.updateAngle(d); + + return updated ? arc(updated) : "M 0 0"; + }; + + // TODO: extends all function + + + return newArc.centroid = arc.centroid, newArc; + }, + getSvgArcExpanded: function getSvgArcExpanded(rate) { + var $$ = this, + arc = (0, _d3Shape.arc)().outerRadius($$.radiusExpanded * (rate || 1)).innerRadius($$.innerRadius); + + + return function (d) { + var updated = $$.updateAngle(d); + + return updated ? arc(updated) : "M 0 0"; + }; + }, + getArc: function getArc(d, withoutUpdate, force) { + return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0"; + }, + transformForArcLabel: function transformForArcLabel(d) { + var $$ = this, + config = $$.config, + updated = $$.updateAngle(d), + translate = ""; + + + if (updated && !$$.hasType("gauge")) { + var c = this.svgArc.centroid(updated), + x = isNaN(c[0]) ? 0 : c[0], + y = isNaN(c[1]) ? 0 : c[1], + h = Math.sqrt(x * x + y * y), + ratio = $$.hasType("donut") && config.donut_label_ratio || $$.hasType("pie") && config.pie_label_ratio; + ratio = ratio ? (0, _util.isFunction)(ratio) ? ratio(d, $$.radius, h) : ratio : $$.radius && (h ? (36 / $$.radius > .375 ? 1.175 - 36 / $$.radius : .8) * $$.radius / h : 0), translate = "translate(" + x * ratio + "," + y * ratio + ")"; + } + + return translate; + }, + getArcRatio: function getArcRatio(d) { + var $$ = this, + config = $$.config, + val = null; + + + if (d) + // if has padAngle set, calculate rate based on value + if ($$.pie.padAngle()()) { + var total = $$.getTotalDataSum(); + + $$.hiddenTargetIds.length && (total -= (0, _d3Array.sum)($$.api.data.values.call($$.api, $$.hiddenTargetIds))), val = d.value / total; + } else val = (d.endAngle - d.startAngle) / (Math.PI * ($$.hasType("gauge") && !config.gauge_fullCircle ? 1 : 2)); + + return val; + }, + convertToArcData: function convertToArcData(d) { + return this.addName({ + id: d.data.id, + value: d.value, + ratio: this.getArcRatio(d), + index: d.index + }); + }, + textForArcLabel: function textForArcLabel(val) { + var $$ = this, + d = val.node ? val.datum() : val; + + + if (!$$.shouldShowArcLabel()) return ""; + + var updated = $$.updateAngle(d), + value = updated ? updated.value : null, + ratio = $$.getArcRatio(updated), + id = d.data.id; + + + if (!$$.hasType("gauge") && !$$.meetsArcLabelThreshold(ratio)) return ""; + + var text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, id).toString(); + + if (val.node) if (text.indexOf("\n") === -1) val.text(text);else { + var multiline = text.split("\n"), + len = multiline.length - 1; + multiline.forEach(function (v, i) { + val.append("tspan").attr("x", 0).attr("dy", (i === 0 ? -len : 1) + "em").text(v); + }); + } + + return text; + }, + textForGaugeMinMax: function textForGaugeMinMax(value, isMax) { + var format = this.getGaugeLabelExtents(); + + return format ? format(value, isMax) : value; + }, + expandArc: function expandArc(targetIds) { + var $$ = this, + interval = void 0; + + + // MEMO: avoid to cancel transition + if ($$.transiting) return void (interval = window.setInterval(function () { + $$.transiting || (window.clearInterval(interval), $$.legend.selectAll("." + _classes2.default.legendItemFocused).size() > 0 && $$.expandArc(targetIds)); + }, 10)); + + var newTargetIds = $$.mapToTargetIds(targetIds); + + $$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).each(function (d) { + $$.shouldExpand(d.data.id) && (0, _d3Selection.select)(this).selectAll("path").transition().duration($$.expandDuration(d.data.id)).attr("d", $$.svgArcExpanded).transition().duration($$.expandDuration(d.data.id) * 2).attr("d", $$.svgArcExpandedSub); + }); + }, + unexpandArc: function unexpandArc(targetIds) { + var $$ = this; + + if (!$$.transiting) { + + var newTargetIds = $$.mapToTargetIds(targetIds); + + $$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).selectAll("path").transition().duration(function (d) { + return $$.expandDuration(d.data.id); + }).attr("d", $$.svgArc), $$.svg.selectAll("" + _classes2.default.arc).style("opacity", "1"); + } + }, + expandDuration: function expandDuration(id) { + var $$ = this, + config = $$.config; + return $$.isDonutType(id) ? config.donut_expand_duration : $$.isGaugeType(id) ? config.gauge_expand_duration : $$.isPieType(id) ? config.pie_expand_duration : 50; + }, + shouldExpand: function shouldExpand(id) { + var $$ = this, + config = $$.config; + + + return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand; + }, + shouldShowArcLabel: function shouldShowArcLabel() { + var $$ = this, + config = $$.config, + shouldShow = !0; + + + // when gauge, always true + return $$.hasType("donut") ? shouldShow = config.donut_label_show : $$.hasType("pie") && (shouldShow = config.pie_label_show), shouldShow; + }, + meetsArcLabelThreshold: function meetsArcLabelThreshold(ratio) { + var $$ = this, + config = $$.config, + threshold = $$.hasType("donut") ? config.donut_label_threshold : config.pie_label_threshold; + + + return ratio >= threshold; + }, + getArcLabelFormat: function getArcLabelFormat() { + var $$ = this, + config = $$.config, + format = config.pie_label_format; + + + return $$.hasType("gauge") ? format = config.gauge_label_format : $$.hasType("donut") && (format = config.donut_label_format), format; + }, + getGaugeLabelExtents: function getGaugeLabelExtents() { + var config = this.config; + + return config.gauge_label_extents; + }, + getArcTitle: function getArcTitle() { + var $$ = this; + + return $$.hasType("donut") ? $$.config.donut_title : ""; + }, + updateTargetsForArc: function updateTargetsForArc(targets) { + var $$ = this, + main = $$.main, + classChartArc = $$.classChartArc.bind($$), + classArcs = $$.classArcs.bind($$), + classFocus = $$.classFocus.bind($$), + mainPieUpdate = main.select("." + _classes2.default.chartArcs).selectAll("." + _classes2.default.chartArc).data($$.pie(targets)).attr("class", function (d) { + return classChartArc(d) + classFocus(d.data); + }), + mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc); + mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate), mainPieEnter.append("text").attr("dy", $$.hasType("gauge") ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none"); + }, + initArc: function initArc() { + var $$ = this; + + $$.arcs = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc")), $$.setArcTitle(); + }, + + + /** + * Set arc title text + * @private + */ + setArcTitle: function setArcTitle() { + var $$ = this, + title = $$.getArcTitle(); + + + if (title) { + var multiline = title.split("\n"), + text = $$.arcs.append("text").attr("class", _classes2.default.chartArcsTitle).style("text-anchor", "middle"); + + + // if is multiline text + if (multiline.length > 1) { + var fontSize = +text.style("font-size").replace("px", ""), + height = Math.floor(text.text(".").node().getBBox().height, text.text("")); + multiline.forEach(function (v, i) { + return text.insert("tspan").text(v).attr("x", 0).attr("dy", i ? height : 0); + }), text.attr("y", "-" + (fontSize * (multiline.length - 2) || fontSize / 2)); + } else text.text(title); + } + }, + redrawArc: function redrawArc(duration, durationForExit, withTransform) { + + function selectArc(_this, arcData, id) { + $$.expandArc(id), $$.api.focus(id), $$.toggleFocusLegend(id, !0), $$.showTooltip([arcData], _this); + } + + function unselectArc(arcData) { + var id = arcData && arcData.id || undefined; + + $$.unexpandArc(id), $$.api.revert(), $$.revertLegend(), $$.hideTooltip(); + } + + var $$ = this, + config = $$.config, + main = $$.main, + isTouch = $$.inputType === "touch", + isMouse = $$.inputType === "mouse", + mainArc = main.selectAll("." + _classes2.default.arcs).selectAll("." + _classes2.default.arc).data($$.arcData.bind($$)); + + + if (mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove(), mainArc = mainArc.enter().append("path").attr("class", $$.classArc.bind($$)).style("fill", function (d) { + return $$.color(d.data); + }).style("cursor", function (d) { + return config.interaction_enabled && (config.data_selection_isselectable(d) ? "pointer" : null); + }).style("opacity", "0").each(function (d) { + $$.isGaugeType(d.data) && (d.startAngle = config.gauge_startingAngle, d.endAngle = config.gauge_startingAngle), this._current = d; + }).merge(mainArc), mainArc.attr("transform", function (d) { + return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : ""; + }).style("opacity", function (d) { + return d === this._current ? "0" : "1"; + }).each(function () { + $$.transiting = !0; + }).transition().duration(duration).attrTween("d", function (d) { + var updated = $$.updateAngle(d); + + if (!updated) return function () { + return "M 0 0"; + }; + + isNaN(this._current.startAngle) && (this._current.startAngle = 0), isNaN(this._current.endAngle) && (this._current.endAngle = this._current.startAngle); + + + var interpolate = (0, _d3Interpolate.interpolate)(this._current, updated); + + return this._current = interpolate(0), function (t) { + var interpolated = interpolate(t); + + // data.id will be updated by interporator + return interpolated.data = d.data, $$.getArc(interpolated, !0); + }; + }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) { + return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id); + }) + // Where gauge reading color would receive customization. + .style("opacity", "1").call($$.endall, function () { + $$.transiting = !1; + }), config.interaction_enabled && (mainArc.on("click", function (d, i) { + var updated = $$.updateAngle(d), + arcData = void 0; + updated && (arcData = $$.convertToArcData(updated), $$.toggleShape && $$.toggleShape(this, arcData, i), $$.config.data_onclick.call($$.api, arcData, this)); + }), isMouse && mainArc.on("mouseover", function (d) { + if (!$$.transiting) // skip while transiting + { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + selectArc(this, arcData, id), $$.config.data_onover(arcData, this); + } + }).on("mouseout", function (d) { + if (!$$.transiting) // skip while transiting + { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null; + unselectArc(), $$.config.data_onout(arcData, this); + } + }).on("mousemove", function (d) { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null; + $$.showTooltip([arcData], this); + }), isTouch && $$.hasArcType())) { + var _getEventArc = function () { + var touch = _d3Selection.event.changedTouches[0], + eventArc = (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY)); + + + return eventArc; + }; + + $$.svg.on("touchstart", function () { + if (!$$.transiting) // skip while transiting + { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onover(arcData, this); + } + }).on("touchend", function () { + if (!$$.transiting) // skip while transiting + { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onout(arcData, this); + } + }).on("touchmove", function () { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id); + }); + } + + var gaugeTextValue = main.selectAll("." + _classes2.default.chartArc).select("text").style("opacity", "0").attr("class", function (d) { + return $$.isGaugeType(d.data) ? _classes2.default.gaugeValue : ""; + }); + + config.gauge_fullCircle && gaugeTextValue.attr("dy", "" + Math.round($$.radius / 14)); + + + // to handle multiline text for gauge type + var textMethod = !gaugeTextValue.empty() && gaugeTextValue.classed(_classes2.default.gaugeValue) ? "call" : "text"; + + if (gaugeTextValue[textMethod]($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) { + return $$.isGaugeType(d.data) ? Math.round($$.radius / 5) + "px" : ""; + }).transition().duration(duration).style("opacity", function (d) { + return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? "1" : "0"; + }), main.select("." + _classes2.default.chartArcsTitle).style("opacity", $$.hasType("donut") || $$.hasType("gauge") ? "1" : "0"), $$.hasType("gauge")) { + var endAngle = (config.gauge_fullCircle ? -4 : -1) * config.gauge_startingAngle; + + $$.arcs.select("." + _classes2.default.chartArcsBackground).attr("d", function () { + var d = { + data: [{ value: config.gauge_max }], + startAngle: config.gauge_startingAngle, + endAngle: endAngle + }; + + return $$.getArc(d, !0, !0); + }), $$.arcs.select("." + _classes2.default.chartArcsGaugeUnit).attr("dy", ".75em").text(config.gauge_label_show ? config.gauge_units : ""), config.gauge_label_show && ($$.arcs.select("." + _classes2.default.chartArcsGaugeMin).attr("dx", -1 * ($$.innerRadius + ($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)), !config.gauge_fullCircle && $$.arcs.select("." + _classes2.default.chartArcsGaugeMax).attr("dx", $$.innerRadius + ($$.radius - $$.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0))); + } + }, + initGauge: function initGauge() { + var $$ = this, + config = $$.config, + arcs = $$.arcs; + $$.hasType("gauge") && (arcs.append("path").attr("class", _classes2.default.chartArcsBackground), arcs.append("text").attr("class", _classes2.default.chartArcsGaugeUnit).style("text-anchor", "middle").style("pointer-events", "none"), config.gauge_label_show && (arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMin).style("text-anchor", "middle").style("pointer-events", "none"), !config.gauge_fullCircle && arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMax).style("text-anchor", "middle").style("pointer-events", "none"))); + }, + getGaugeLabelHeight: function getGaugeLabelHeight() { + return this.config.gauge_label_show ? 20 : 0; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 33 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__33__; + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + initBar: function initBar() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars); + }, + updateTargetsForBar: function updateTargetsForBar(targets) { + var $$ = this, + config = $$.config, + classChartBar = $$.classChartBar.bind($$), + classBars = $$.classBars.bind($$), + classFocus = $$.classFocus.bind($$), + mainBarUpdate = $$.main.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", function (d) { + return classChartBar(d) + classFocus(d); + }), + mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", "none"); + + + // Bars for each data + mainBarEnter.append("g").attr("class", classBars).style("cursor", function (d) { + return config.data_selection_isselectable(d) ? "pointer" : null; + }); + }, + updateBar: function updateBar(durationForExit) { + var $$ = this, + barData = $$.barData.bind($$), + classBar = $$.classBar.bind($$), + initialOpacity = $$.initialOpacity.bind($$), + color = function (d) { + return $$.color(d.id); + }; + + $$.mainBar = $$.main.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data(barData), $$.mainBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainBar = $$.mainBar.enter().append("path").attr("class", classBar).style("stroke", color).style("fill", color).merge($$.mainBar).style("opacity", initialOpacity); + }, + redrawBar: function redrawBar(drawBar, withTransition) { + return [(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar).attr("d", drawBar).style("fill", this.color).style("opacity", "1")]; + }, + getBarW: function getBarW(axis, barTargetsNum) { + var $$ = this, + config = $$.config, + w = (0, _util.isNumber)(config.bar_width) ? config.bar_width : barTargetsNum ? axis.tickInterval($$.getMaxDataCount()) * config.bar_width_ratio / barTargetsNum : 0; + + + return config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w; + }, + getBars: function getBars(i, id) { + var $$ = this, + suffix = (0, _util.isValue)(i) ? "-" + i : ""; + + + return (id ? $$.main.selectAll("." + _classes2.default.bars + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.bar + suffix); + }, + expandBars: function expandBars(i, id, reset) { + var $$ = this; + + reset && $$.unexpandBars(), $$.getBars(i, id).classed(_classes2.default.EXPANDED, !0); + }, + unexpandBars: function unexpandBars(i) { + this.getBars(i).classed(_classes2.default.EXPANDED, !1); + }, + generateDrawBar: function generateDrawBar(barIndices, isSub) { + var $$ = this, + config = $$.config, + getPoints = $$.generateGetBarPoints(barIndices, isSub), + isRotated = config.axis_rotated, + isGrouped = config.data_groups.length, + barRadius = config.bar_radius, + barRadiusRatio = config.bar_radius_ratio, + getRadius = (0, _util.isNumber)(barRadius) && barRadius > 0 ? function () { + return barRadius; + } : (0, _util.isNumber)(barRadiusRatio) ? function (w) { + return w * barRadiusRatio; + } : null; + + // get the bar radius + + return function (d, i) { + // 4 points that make a bar + var points = getPoints(d, i), + indexX = +isRotated, + indexY = +!indexX, + isNegative = d.value < 0, + pathRadius = ["", ""], + radius = 0; + + // switch points if axis is rotated, not applicable for sub chart + + if (getRadius && !isGrouped) { + var index = isRotated ? indexY : indexX, + barW = points[2][index] - points[0][index]; + radius = getRadius(barW); + + + var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " "; + + pathRadius[+!isRotated] = "" + arc + radius + "," + radius, pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"](), isNegative && pathRadius.reverse(); + } + + // path string data shouldn't be containing new line chars + // https://github.com/naver/billboard.js/issues/530 + var path = isRotated ? "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY]; + + return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z"; + }; + }, + generateGetBarPoints: function generateGetBarPoints(barIndices, isSub) { + var $$ = this, + axis = isSub ? $$.subXAxis : $$.xAxis, + barTargetsNum = barIndices.__max__ + 1, + barW = $$.getBarW(axis, barTargetsNum), + barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub), + barY = $$.getShapeY(!!isSub), + barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = barOffset(d, i) || y0, + posX = barX(d), + posY = barY(d); // offset is for stacked bar chart + + + // fix posY not to overflow opposite quadrant + + // 4 points that make a bar + return $$.config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX + barW, posY - (y0 - offset)], [posX + barW, offset]]; + }; + }, + isWithinBar: function isWithinBar(that) { + var mouse = (0, _d3Selection.mouse)(that), + list = (0, _util.getRectSegList)(that), + box = that.getBBox(), + seg0 = list[0], + seg1 = list[1], + x = Math.min(seg0.x, seg1.x), + y = Math.min(seg0.y, seg1.y), + w = box.width, + h = box.height; + + + return x - 2 < mouse[0] && mouse[0] < x + w + 2 && y - 2 < mouse[1] && mouse[1] < y + h + 2; + } +}); + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(6), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializer + * @private + */ + initBubble: function initBubble() { + var $$ = this, + config = $$.config; + $$.hasType("bubble") && (config.point_show = !0, config.point_type = "circle", config.point_sensitivity = 25); + }, + + + /** + * Get user agent's computed value for the total length of the path in user units + * https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength + * @return {Number} + * @private + */ + getBaseLength: function getBaseLength() { + var $$ = this, + baseLength = $$.getCache("$baseLength"); + + + return baseLength || $$.addCache("$baseLength", baseLength = (0, _d3Array.min)([$$.axes.x.select("path").node().getTotalLength(), $$.axes.y.select("path").node().getTotalLength()])), baseLength; + }, + + + /** + * Get the radius value for bubble circle + * @param {Object} d + * @return {Number} + * @private + */ + getBubbleR: function getBubbleR(d) { + var $$ = this, + maxR = $$.config.bubble_maxR; + (0, _util.isFunction)(maxR) ? maxR = maxR(d) : !(0, _util.isNumber)(maxR) && (maxR = $$.getBaseLength() / ($$.getMaxDataCount() * 2) + 12); + var max = (0, _d3Array.max)($$.getMinMaxData().max.map(function (d) { + return (0, _util.isObject)(d.value) ? d.value.mid : d.value; + })), + maxArea = maxR * maxR * Math.PI, + area = d.value * (maxArea / max); + + + return Math.sqrt(area / Math.PI); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Shape = __webpack_require__(31), + _d3Selection = __webpack_require__(5), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initLine: function initLine() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines); + }, + updateTargetsForLine: function updateTargetsForLine(targets) { + var $$ = this, + config = $$.config, + classChartLine = $$.classChartLine.bind($$), + classLines = $$.classLines.bind($$), + classAreas = $$.classAreas.bind($$), + classCircles = $$.classCircles.bind($$), + classFocus = $$.classFocus.bind($$), + mainLineUpdate = $$.main.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", function (d) { + return classChartLine(d) + classFocus(d); + }), + mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none"); + + + // Lines for each data + mainLineEnter.append("g").attr("class", classLines), mainLineEnter.append("g").attr("class", classAreas), config.point_show && (config.data_selection_enabled && mainLineEnter.append("g").attr("class", function (d) { + return $$.generateClass(_classes2.default.selectedCircles, d.id); + }), mainLineEnter.append("g").attr("class", classCircles).style("cursor", function (d) { + return config.data_selection_isselectable(d) ? "pointer" : null; + })), targets.forEach(function (t) { + $$.main.selectAll("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + _classes2.default.selectedCircle).each(function (d) { + d.value = t.values[d.index].value; + }); + }); + }, + updateLine: function updateLine(durationForExit) { + var $$ = this; + + $$.mainLine = $$.main.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.mainLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainLine = $$.mainLine.enter().append("path").attr("class", function (d) { + return $$.classLine.bind($$)(d) + " " + ($$.extraLineClasses(d) || ""); + }).style("stroke", $$.color).merge($$.mainLine).style("opacity", $$.initialOpacity.bind($$)).style("shape-rendering", function (d) { + return $$.isStepType(d) ? "crispEdges" : ""; + }).attr("transform", null); + }, + redrawLine: function redrawLine(drawLine, withTransition) { + return [(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine).attr("d", drawLine).style("stroke", this.color).style("opacity", "1")]; + }, + + + /** + * Get the curve interpolate + * @param {Array} d Data object + * @return {Function} + * @private + */ + getCurve: function getCurve(d) { + var $$ = this, + isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d); + + + // when is step & rotated, should be computed in different way + // https://github.com/naver/billboard.js/issues/471 + return isRotatedStepType ? function (context) { + var step = $$.getInterpolate(d)(context); + + // keep the original method + + + return step.orgPoint = step.point, step.pointRotated = function (x, y) { + this._point === 1 && (this._point = 2); + + + var y1 = this._y * (1 - this._t) + y * this._t; + + this._context.lineTo(this._x, y1), this._context.lineTo(x, y1), this._x = x, this._y = y; + }, step.point = function (x, y) { + this._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y); + }, step; + } : $$.getInterpolate(d); + }, + generateDrawLine: function generateDrawLine(lineIndices, isSub) { + var $$ = this, + config = $$.config, + lineConnectNull = config.line_connectNull, + isRotated = config.axis_rotated, + getPoints = $$.generateGetLinePoints(lineIndices, isSub), + yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale, + xValue = function (d) { + return (isSub ? $$.subxx : $$.xx).call($$, d); + }, + yValue = function (d, i) { + return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getBaseValue(d)); + }, + line = (0, _d3Shape.line)(); + + return line = isRotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue), lineConnectNull || (line = line.defined(function (d) { + return $$.getBaseValue(d) !== null; + })), function (d) { + var x = isSub ? $$.x : $$.subX, + y = yScaleGetter.call($$, d.id), + values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values, + x0 = 0, + y0 = 0, + path = void 0; + + + return $$.isLineType(d) ? config.data_regions[d.id] ? path = $$.lineWithRegions(values, x, y, config.data_regions[d.id]) : ($$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = line.curve($$.getCurve(d))(values)) : (values[0] && (x0 = x(values[0].x), y0 = y(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0), path || "M 0 0"; + }; + }, + generateGetLinePoints: function generateGetLinePoints(lineIndices, isSubValue) { + // partial duplication of generateGetBarPoints + var $$ = this, + config = $$.config, + lineTargetsNum = lineIndices.__max__ + 1, + isSub = !!isSubValue, + x = $$.getShapeX(0, lineTargetsNum, lineIndices, isSub), + y = $$.getShapeY(isSub), + lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = lineOffset(d, i) || y0, + posX = x(d), + posY = y(d); // offset is for stacked area chart + + // fix posY not to overflow opposite quadrant + config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0); + + + // 1 point that marks the line position + var point = [posX, posY - (y0 - offset)]; + + return [point, point, // from here and below, needed for compatibility + point, point]; + }; + }, + lineWithRegions: function lineWithRegions(d, x, y, _regions) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isTimeSeries = $$.isTimeSeries(), + xOffset = $$.isCategorized() ? .5 : 0, + regions = [], + xp = void 0, + yp = void 0, + diff = void 0, + diffx2 = void 0, + isWithinRegions = function (withinX, withinRegions) { + for (var reg, i = 0; reg = withinRegions[i]; i++) if (reg.start < withinX && withinX <= reg.end) return reg.style; + + return !1; + }; // default value + + // check weather data is within region + + + // Check start/end of regions + if ((0, _util.isDefined)(_regions)) { + var getValue = function (v, def) { + return (0, _util.isUndefined)(v) ? def : isTimeSeries ? $$.parseDate(v) : v; + }; + + for (var reg, i = 0; reg = _regions[i]; i++) { + var start = getValue(reg.start, d[0].x), + end = getValue(reg.end, d[d.length - 1].x), + style = reg.style || { dasharray: "2 2" }; + regions[i] = { start: start, end: end, style: style }; + } + } + + // Set scales + + var xValue = isRotated ? function (dt) { + return y(dt.value); + } : function (dt) { + return x(dt.x); + }, + yValue = isRotated ? function (dt) { + return x(dt.x); + } : function (dt) { + return y(dt.value); + }, + generateM = function (points) { + return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1]; + }, + sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) { + var x0 = d0.x.getTime(), + xDiff = d1.x - d0.x, + xv0 = new Date(x0 + xDiff * k), + xv1 = new Date(x0 + xDiff * (k + timeseriesDiff)), + points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]]; + + + return generateM(points); + } : function (d0, d1, k, otherDiff) { + var points = isRotated ? [[y(yp(k), !0), x(xp(k))], [y(yp(k + otherDiff), !0), x(xp(k + otherDiff))]] : [[x(xp(k), !0), y(yp(k))], [x(xp(k + otherDiff), !0), y(yp(k + otherDiff))]]; + + return generateM(points); + }, + path = "M"; + + // Define svg generator function for region + + + // Generate + + + for (var data, _i = 0; data = d[_i]; _i++) { + var prevData = d[_i - 1], + style = isWithinRegions(data.x, regions); + + + // Draw as normal + if ((0, _util.isUndefined)(regions) || !style) path += "" + (_i ? "L" : "") + xValue(data) + "," + yValue(data);else { + try { + style = style.dasharray.split(" "); + } catch (e) { + style = "2 2".split(" "); + } + + // Draw with region // TODO: Fix for horizotal charts + xp = $$.getScale(prevData.x + xOffset, data.x + xOffset, isTimeSeries), yp = $$.getScale(prevData.value, data.value); + var dx = x(data.x) - x(prevData.x), + dy = y(data.value) - y(prevData.value), + dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + diff = style[0] / dd, diffx2 = diff * style[1]; + + + for (var j = diff; j <= 1; j += diffx2) path += sWithRegion(prevData, data, j, diff), j + diffx2 >= 1 && (path += sWithRegion(prevData, data, 1, 0)); + } + } + + return path; + }, + updateArea: function updateArea(durationForExit) { + var $$ = this; + + $$.mainArea = $$.main.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.mainArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainArea = $$.mainArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () { + return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0"; + }).merge($$.mainArea), $$.mainArea.style("opacity", $$.orgAreaOpacity); + }, + redrawArea: function redrawArea(drawArea, withTransition) { + var $$ = this; + + return [(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea).attr("d", drawArea).style("fill", this.color).style("opacity", function (d) { + return $$.isAreaRangeType(d) ? $$.orgAreaOpacity / 1.75 : $$.orgAreaOpacity; + })]; + }, + + + /** + * Generate area path data + * @param areaIndices + * @param isSub + * @return {function(*=): (*|string)} + * @private + */ + generateDrawArea: function generateDrawArea(areaIndices, isSub) { + var $$ = this, + config = $$.config, + lineConnectNull = config.line_connectNull, + isRotated = config.axis_rotated, + isGrouped = config.data_groups.length > 0, + getPoints = $$.generateGetAreaPoints(areaIndices, isSub), + yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale, + xValue = function (d) { + return (isSub ? $$.subxx : $$.xx).call($$, d); + }, + value0 = function (d, i) { + return isGrouped ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "high") : $$.getAreaBaseValue(d.id)); + }, + value1 = function (d, i) { + return isGrouped ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "low") : d.value); + }; + + return function (d) { + var values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values, + x0 = 0, + y0 = 0, + path = void 0; + + + if ($$.isAreaType(d)) { + var area = (0, _d3Shape.area)(); + + area = isRotated ? area.y(xValue).x0(value0).x1(value1) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1), lineConnectNull || (area = area.defined(function (d) { + return $$.getBaseValue(d) !== null; + })), $$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = area.curve($$.getCurve(d))(values); + } else values[0] && (x0 = $$.x(values[0].x), y0 = $$.getYScale(d.id)(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0; + + return path || "M 0 0"; + }; + }, + getAreaBaseValue: function getAreaBaseValue() { + return 0; + }, + generateGetAreaPoints: function generateGetAreaPoints(areaIndices, isSub) { + // partial duplication of generateGetBarPoints + var $$ = this, + config = $$.config, + areaTargetsNum = areaIndices.__max__ + 1, + x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub), + y = $$.getShapeY(!!isSub), + areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = areaOffset(d, i) || y0, + posX = x(d), + posY = y(d); // offset is for stacked area chart + + + // fix posY not to overflow opposite quadrant + + // 1 point that marks the area position + return config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility + [posX, offset] // needed for compatibility + ]; + }; + }, + updateCircle: function updateCircle() { + var $$ = this; + + $$.config.point_show && ($$.mainCircle = $$.main.selectAll("." + _classes2.default.circles).selectAll("." + _classes2.default.circle).data(function (d) { + return !$$.isBarType(d) && (!$$.isLineType(d) || $$.shouldDrawPointsForLine(d)) && $$.labelishData(d); + }), $$.mainCircle.exit().remove(), $$.mainCircle = $$.mainCircle.enter().append($$.point("create", this, $$.classCircle.bind($$), $$.pointR.bind($$), $$.color)).merge($$.mainCircle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$))); + }, + redrawCircle: function redrawCircle(cx, cy, withTransition, flow) { + var $$ = this, + selectedCircles = $$.main.selectAll("." + _classes2.default.selectedCircle); + + + if (!$$.config.point_show) return []; + + var mainCircles = []; + + $$.mainCircle.each(function (d) { + var fn = $$.point("update", $$, cx, cy, $$.opacityForCircle.bind($$), $$.color, withTransition, flow, selectedCircles).bind(this), + result = fn(d); + mainCircles.push(result); + }); + + + var posAttr = $$.isCirclePoint() ? "c" : ""; + + return [mainCircles, selectedCircles.attr(posAttr + "x", cx).attr(posAttr + "y", cy)]; + }, + circleX: function circleX(d) { + var $$ = this, + hasValue = (0, _util.isValue)(d.x); + + + return $$.config.zoom_enabled && $$.zoomScale ? hasValue ? $$.zoomScale(d.x) : null : hasValue ? $$.x(d.x) : null; + }, + updateCircleY: function updateCircleY() { + var $$ = this, + lineIndices = void 0, + getPoints = void 0; + $$.config.data_groups.length > 0 ? (lineIndices = $$.getShapeIndices($$.isLineType), getPoints = $$.generateGetLinePoints(lineIndices), $$.circleY = function (d, i) { + return getPoints(d, i)[0][1]; + }) : $$.circleY = function (d) { + return $$.getYScale(d.id)($$.getBaseValue(d)); + }; + }, + getCircles: function getCircles(i, id) { + var $$ = this, + suffix = (0, _util.isValue)(i) ? "-" + i : ""; + + + return (id ? $$.main.selectAll("." + _classes2.default.circles + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.circle + suffix); + }, + expandCircles: function expandCircles(i, id, reset) { + var $$ = this, + r = $$.pointExpandedR.bind($$); + reset && $$.unexpandCircles(); + var circles = $$.getCircles(i, id).classed(_classes2.default.EXPANDED, !0), + scale = r(circles) / $$.config.point_r; + $$.isCirclePoint() ? circles.attr("r", r) : circles.each(function () { + var point = (0, _d3Selection.select)(this), + box = this.getBBox(), + x1 = box.x + box.width * .5, + y1 = box.y + box.height * .5; + this.tagName === "circle" ? point.attr("r", r) : point.style("transform", "translate(" + (1 - scale) * x1 + "px, " + (1 - scale) * y1 + "px) scale(" + scale + ")"); + }); + }, + unexpandCircles: function unexpandCircles(i) { + var $$ = this, + r = $$.pointR.bind($$), + circles = $$.getCircles(i).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED); + }).classed(_classes2.default.EXPANDED, !1); + circles.attr("r", r), $$.isCirclePoint() || circles.style("transform", "scale(" + r(circles) / $$.config.point_r + ")"); + }, + pointR: function (d) { + var $$ = this, + config = $$.config, + pointR = config.point_r, + r = pointR; + + + return $$.isStepType(d) ? r = 0 : $$.isBubbleType(d) ? r = $$.getBubbleR(d) : (0, _util.isFunction)(pointR) && (r = pointR(d)), r; + }, + pointExpandedR: function pointExpandedR(d) { + var $$ = this, + config = $$.config, + scale = $$.isBubbleType(d) ? 1.15 : 1.75; + + + return config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d); + }, + pointSelectR: function pointSelectR(d) { + var $$ = this, + selectR = $$.config.point_select_r; + + + return (0, _util.isFunction)(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4; + }, + isWithinCircle: function isWithinCircle(node, r) { + var mouse = (0, _d3Selection.mouse)(node), + element = (0, _d3Selection.select)(node), + prefix = this.isCirclePoint() ? "c" : "", + cx = +element.attr(prefix + "x"), + cy = +element.attr(prefix + "y"); + + + // if node don't have cx/y or x/y attribute value + if (!(cx || cy) && node.nodeType === 1) { + var domRect = node.getBBox ? node.getBBox() : node.getBoundingClientRect(); + + cx = domRect.x, cy = domRect.y; + } + + return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r; + }, + isWithinStep: function isWithinStep(that, y) { + return Math.abs(y - (0, _d3Selection.mouse)(that)[1]) < 30; + }, + shouldDrawPointsForLine: function shouldDrawPointsForLine(d) { + var linePoint = this.config.line_point; + + return linePoint === !0 || (0, _util.isArray)(linePoint) && linePoint.indexOf(d.id) !== -1; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + hasValidPointType: function hasValidPointType(type) { + return (/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type) + ); + }, + hasValidPointDrawMethods: function hasValidPointDrawMethods(type) { + var pointType = type || this.config.point_type; + + return (0, _util.isObjectType)(pointType) && (0, _util.isFunction)(pointType.create) && (0, _util.isFunction)(pointType.update); + }, + insertPointInfoDefs: function insertPointInfoDefs(point, id) { + var $$ = this, + parser = new DOMParser(), + doc = parser.parseFromString(point, "image/svg+xml"), + node = doc.firstChild, + clone = document.createElementNS(_d3Selection.namespaces.svg, node.nodeName.toLowerCase()), + attribs = node.attributes; + + + for (var name, i = 0; name = attribs[i]; i++) name = name.name, clone.setAttribute(name, node.getAttribute(name)); + + clone.id = id, clone.style.fill = "inherit", clone.style.stroke = "inherit", node.children.length && (clone.innerHTML = (0, _util.toArray)(node.children).map(function (v) { + return v.outerHTML; + }).join("")), $$.defs.node().appendChild(clone); + }, + pointFromDefs: function pointFromDefs(id) { + return this.defs.select("#" + id); + }, + generatePoint: function generatePoint() { + var $$ = this, + config = $$.config, + ids = [], + pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type]; + + + return function (method, context) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key]; + + return function (d) { + var id = d.id || d.data && d.data.id || d, + element = (0, _d3Selection.select)(this), + point = void 0; + + + if (ids.indexOf(id) < 0 && ids.push(id), point = pattern[ids.indexOf(id) % pattern.length], $$.hasValidPointType(point)) point = $$[point];else if (!$$.hasValidPointDrawMethods(point)) { + var pointId = $$.datetimeId + "-point-" + id, + pointFromDefs = $$.pointFromDefs(pointId); + + + if (pointFromDefs.size() < 1 && $$.insertPointInfoDefs(point, pointId), method === "create") return $$.custom.create.bind(context).apply(undefined, [element, pointId].concat(args)); + if (method === "update") return $$.custom.update.bind(context).apply(undefined, [element].concat(args)); + } + + return point[method].bind(context).apply(undefined, [element].concat(args)); + }; + }; + }, + getTransitionName: function getTransitionName() { + return Math.random().toString(); + }, + + + custom: { + create: function create(element, id, cssClassFn, sizeFn, fillStyleFn) { + return element.append("use").attr("xlink:href", "#" + id).attr("class", cssClassFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + box = element.node().getBBox(); + box.width /= 2, box.height /= 2; + + var xPosFn2 = function (d) { + return xPosFn(d) - box.width; + }, + yPosFn2 = function (d) { + return yPosFn(d) - box.height; + }, + mainCircles = element; + + if (withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = element.attr("x", xPosFn2)), mainCircles = element.transition(transitionName).attr("x", xPosFn2).attr("y", yPosFn2).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = element.attr("x", xPosFn2).attr("y", yPosFn2); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + }, + + // 'circle' data point + circle: { + create: function create(element, cssClassFn, sizeFn, fillStyleFn) { + return element.append("circle").attr("class", cssClassFn).attr("r", sizeFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + mainCircles = element; + + // when '.load()' called, bubble size should be updated + + if ($$.hasType("bubble") && (mainCircles = mainCircles.attr("r", $$.pointR.bind($$))), withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = mainCircles.attr("cx", xPosFn)), mainCircles = mainCircles.transition(transitionName).attr("cx", xPosFn).attr("cy", yPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = mainCircles.attr("cx", xPosFn).attr("cy", yPosFn); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + }, + + // 'rectangle' data point + rectangle: { + create: function create(element, cssClassFn, sizeFn, fillStyleFn) { + var rectSizeFn = function (d) { + return sizeFn(d) * 2; + }; + + return element.append("rect").attr("class", cssClassFn).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + r = $$.config.point_r, + rectXPosFn = function (d) { + return xPosFn(d) - r; + }, + rectYPosFn = function (d) { + return yPosFn(d) - r; + }, + mainCircles = element; + + if (withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = mainCircles.attr("x", rectXPosFn)), mainCircles = mainCircles.transition(transitionName).attr("x", rectXPosFn).attr("y", rectYPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = mainCircles.attr("x", rectXPosFn).attr("y", rectYPosFn); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Array = __webpack_require__(6), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get the position value + * @param {Boolean} isClockwise If the direction is clockwise + * @param {String} type Coordinate type 'x' or 'y' + * @param {Number} edge Number of edge + * @param {Number} pos The indexed position + * @param {Number} range + * @param {Number} ratio + * @return {number} + * @private + */ +function getPosition(isClockwise, type, edge, pos, range, ratio) { + var index = isClockwise && pos > 0 ? edge - pos : pos, + r = 2 * Math.PI, + func = type === "x" ? Math.sin : Math.cos; + + + return range * (1 - ratio * func(index * r / edge)); +} + +// cache key +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var cacheKey = "$radarPoints"; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initRadar: function initRadar() { + var $$ = this, + config = $$.config; + $$.hasType("radar") && ($$.radars = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartRadars), $$.radars.levels = $$.radars.append("g").attr("class", _classes2.default.levels), $$.radars.axes = $$.radars.append("g").attr("class", _classes2.default.axis), $$.radars.shapes = $$.radars.append("g").attr("class", _classes2.default.shapes), $$.maxValue = config.radar_axis_max || $$.getMinMaxData().max[0].value); + }, + getRadarSize: function getRadarSize() { + var $$ = this, + config = $$.config, + padding = config.axis_x_categories.length < 4 ? -20 : 10, + size = (Math.min($$.arcWidth, $$.arcHeight) - padding) / 2; + + + return [size, size]; + }, + updateTargetsForRadar: function updateTargetsForRadar(targets) { + var $$ = this, + config = $$.config; + (0, _util.isEmpty)(config.axis_x_categories) && (config.axis_x_categories = (0, _d3Array.range)(0, (0, _d3Array.max)(targets).values.length)), $$.generateRadarPoints(); + }, + getRadarPosition: function getRadarPosition(type, index, range, ratio) { + var $$ = this, + config = $$.config, + _$$$getRadarSize = $$.getRadarSize(), + width = _$$$getRadarSize[0], + height = _$$$getRadarSize[1], + edge = config.axis_x_categories.length, + isClockwise = config.radar_direction_clockwise, + pos = (0, _util.toArray)(type).map(function (v) { + return getPosition(isClockwise, v, edge, index, (0, _util.isDefined)(range) ? range : type === "x" ? width : height, ratio || config.radar_size_ratio); + }); + + return pos.length === 1 ? pos[0] : pos; + }, + + + /** + * Generate data points + * @private + */ + generateRadarPoints: function generateRadarPoints() { + var $$ = this, + config = $$.config, + targets = $$.data.targets, + _$$$getRadarSize2 = $$.getRadarSize(), + width = _$$$getRadarSize2[0], + height = _$$$getRadarSize2[1], + points = $$.getCache(cacheKey) || {}, + size = points._size; + + // recalculate position only when the previous dimension has been changed + if (!size || size.width !== width && size.height !== height) { + var getRatio = function (v) { + return parseFloat(Math.max(v, 0)) / $$.maxValue * config.radar_size_ratio; + }; + + targets.forEach(function (d) { + points[d.id] = d.values.map(function (v, i) { + return $$.getRadarPosition(["x", "y"], i, undefined, getRatio(v.value)); + }); + }), points._size = { width: width, height: height }, $$.addCache(cacheKey, points); + } + }, + redrawRadar: function redrawRadar(duration, durationForExit) { + var $$ = this, + translate = $$.getTranslate("radar"); + + + // Adjust radar, circles and texts' position + translate && ($$.radars.attr("transform", translate), $$.main.selectAll("." + _classes2.default.circles).attr("transform", translate), $$.main.select("." + _classes2.default.chartTexts).attr("transform", translate), $$.generateRadarPoints(), $$.updateRadarLevel(), $$.updateRadarAxes(), $$.updateRadarShape(duration, durationForExit)); + }, + generateGetRadarPoints: function generateGetRadarPoints() { + var $$ = this, + points = $$.getCache(cacheKey); + + + return function (d, i) { + var point = points[d.id][i]; + + return [point, point, point, point]; + }; + }, + updateRadarLevel: function updateRadarLevel() { + var $$ = this, + config = $$.config, + _$$$getRadarSize3 = $$.getRadarSize(), + width = _$$$getRadarSize3[0], + height = _$$$getRadarSize3[1], + depth = config.radar_level_depth, + edge = config.axis_x_categories.length, + showText = config.radar_level_text_show, + radarLevels = $$.radars.levels, + levelData = (0, _d3Array.range)(0, depth), + radius = config.radar_size_ratio * Math.min(width, height), + levelRatio = levelData.map(function (l) { + return radius * ((l + 1) / depth); + }), + levelTextFormat = config.radar_level_text_format, + points = levelData.map(function (v) { + var range = levelRatio[v], + pos = (0, _d3Array.range)(0, edge).map(function (i) { + return $$.getRadarPosition(["x", "y"], i, range, 1).join(","); + }); + + + return pos.join(" "); + }), + level = radarLevels.selectAll("." + _classes2.default.level).data(levelData); + + // Generate points + level.exit().remove(); + + + var levelEnter = level.enter().append("g").attr("class", function (d, i) { + return _classes2.default.level + " " + _classes2.default.level + "-" + i; + }); + + levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden"), showText && (radarLevels.select("text").empty() && radarLevels.append("text").attr("dx", "-.5em").attr("dy", "-.7em").style("text-anchor", "end").text(function () { + return levelTextFormat(0); + }), levelEnter.append("text").attr("dx", "-.5em").style("text-anchor", "end").text(function (d) { + return levelTextFormat($$.maxValue / levelData.length * (d + 1)); + })), levelEnter.merge(level).attr("transform", function (d) { + return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")"; + }).selectAll("polygon").attr("points", function (d) { + return points[d]; + }), showText && radarLevels.selectAll("text").attr("x", function (d) { + return (0, _util.isUndefined)(d) ? width : points[d].split(",")[0]; + }).attr("y", function (d) { + return (0, _util.isUndefined)(d) ? height : 0; + }); + }, + updateRadarAxes: function updateRadarAxes() { + var $$ = this, + config = $$.config, + _$$$getRadarSize4 = $$.getRadarSize(), + width = _$$$getRadarSize4[0], + height = _$$$getRadarSize4[1], + categories = config.axis_x_categories, + axis = $$.radars.axes.selectAll("g").data(categories);axis.exit().remove(); + + + var axisEnter = axis.enter().append("g").attr("class", function (d, i) { + return _classes2.default.axis + "-" + i; + }); + + config.radar_axis_line_show && axisEnter.append("line"), config.radar_axis_text_show && axisEnter.append("text"), axis = axisEnter.merge(axis), config.radar_axis_line_show && axis.select("line").attr("x1", width).attr("y1", height).attr("x2", function (d, i) { + return $$.getRadarPosition("x", i); + }).attr("y2", function (d, i) { + return $$.getRadarPosition("y", i); + }), config.radar_axis_text_show && axis.select("text").style("text-anchor", "middle").attr("dy", ".5em").text(function (d) { + return d; + }).datum(function (d, i) { + return { index: i }; + }).attr("x", function (d, i) { + return $$.getRadarPosition("x", i, undefined, 1); + }).attr("y", function (d, i) { + return $$.getRadarPosition("y", i, undefined, 1); + }), $$.bindEvent(); + }, + bindEvent: function bindEvent() { + var _this = this, + $$ = this, + config = $$.config; + + if (config.interaction_enabled) { + var isMouse = $$.inputType === "mouse"; + + $$.radars.select("." + _classes2.default.axis).on((isMouse ? "mouseover " : "") + "click", function () { + if (!$$.transiting) // skip while transiting + { + var target = (0, _d3Selection.select)(_d3Selection.event.target), + index = target.datum().index; + $$.selectRectForSingle($$.svg.node(), null, index), $$.setOver(index); + } + }).on("mouseout", isMouse ? function () { + _this.hideTooltip(), _this.unexpandCircles(); + } : null); + } + }, + updateRadarShape: function updateRadarShape(duration, durationForExit) { + var $$ = this, + targets = $$.data.targets, + points = $$.getCache(cacheKey), + areas = $$.radars.shapes.selectAll("polygon").data(targets), + areasEnter = areas.enter().append("g").attr("class", $$.classChartRadar.bind($$)); + areas.exit().transition().duration(durationForExit).remove(), areasEnter.append("polygon").merge(areas).transition().duration(duration).style("fill", function (d) { + return $$.color(d); + }).style("stroke", function (d) { + return $$.color(d); + }).attr("points", function (d) { + return points[d.id].join(" "); + }); + }, + + + /** + * Get data point x coordinate + * @param {Object} d Data object + * @return {Number} + * @private + */ + radarCircleX: function radarCircleX(d) { + return this.getCache(cacheKey)[d.id][d.index][0]; + }, + + + /** + * Get data point y coordinate + * @param {Object} d Data object + * @return {Number} + * @private + */ + radarCircleY: function radarCircleY(d) { + return this.getCache(cacheKey)[d.id][d.index][1]; + } +}); + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the text + * @private + */ + initText: function initText() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartTexts), $$.mainText = (0, _d3Selection.selectAll)([]); + }, + + + /** + * Update chartText + * @private + * @param {Object} $$.data.targets + */ + updateTargetsForText: function updateTargetsForText(targets) { + var $$ = this, + classChartText = $$.classChartText.bind($$), + classTexts = $$.classTexts.bind($$), + classFocus = $$.classFocus.bind($$), + mainTextUpdate = $$.main.select("." + _classes2.default.chartTexts).selectAll("." + _classes2.default.chartText).data(targets).attr("class", function (d) { + return classChartText(d) + classFocus(d); + }), + mainTextEnter = mainTextUpdate.enter().append("g").attr("class", classChartText).style("opacity", "0").style("pointer-events", "none"); + mainTextEnter.append("g").attr("class", classTexts); + }, + + + /** + * Update text + * @private + * @param {Number} Fade-out transition duration + */ + updateText: function updateText(durationForExit) { + var _this = this, + $$ = this, + config = $$.config, + dataFn = $$.labelishData.bind($$), + classText = $$.classText.bind($$); + + $$.mainText = $$.main.selectAll("." + _classes2.default.texts).selectAll("." + _classes2.default.text).data(function (d) { + return _this.isRadarType(d) ? d.values : dataFn(d); + }), $$.mainText.exit().transition().duration(durationForExit).style("fill-opacity", "0").remove(), $$.mainText = $$.mainText.enter().append("text").merge($$.mainText).attr("class", classText).attr("text-anchor", function (d) { + return config.axis_rotated ? d.value < 0 ? "end" : "start" : "middle"; + }).style("stroke", "none").style("fill", function (d) { + return $$.color(d); + }).style("fill-opacity", "0").text(function (d, i, j) { + return $$.dataLabelFormat(d.id)(d.value, d.id, i, j); + }); + }, + + + /** + * Redraw chartText + * @private + * @param {Number} x Attribute + * @param {Number} y Attribute + * @param {Object} options.flow + * @param {Boolean} indicates transition is enabled + * @returns {Object} $$.mainText + */ + redrawText: function redrawText(xForText, yForText, forFlow, withTransition) { + return [(withTransition ? this.mainText.transition() : this.mainText).attr("x", xForText).attr("y", yForText).style("fill", this.color).style("fill-opacity", forFlow ? 0 : this.opacityForText.bind(this))]; + }, + + + /** + * Gets the getBoundingClientRect value of the element + * @private + * @param {HTMLElement|d3.selection} textVal + * @param {String} className + * @param {HTMLElement|d3.selection} elementVal + * @returns {Object} value of element.getBoundingClientRect() + */ + getTextRect: function getTextRect(textVal, className, elementVal) { + var text = (textVal.node ? textVal.node() : textVal).textContent, + element = elementVal.node ? elementVal.node() : elementVal, + dummy = (0, _d3Selection.select)("body").append("div").classed("bb", !0), + svg = dummy.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "0px").style("left", "0px"), + font = (0, _d3Selection.select)(element).style("font"), + rect = void 0; + + + return svg.selectAll(".dummy").data([text]).enter().append("text").classed(className, !!className).style("font", font).text(text).each(function () { + rect = this.getBoundingClientRect(); + }), dummy.remove(), rect; + }, + + + /** + * Gets the x or y coordinate of the text + * @private + * @param {Object} area Indices + * @param {Object} bar Indices + * @param {Object} line Indices + * @param {Boolean} whether or not to x + * @returns {Number} coordinates + */ + generateXYForText: function generateXYForText(areaIndices, barIndices, lineIndices, forX) { + var $$ = this, + getAreaPoints = $$.generateGetAreaPoints(areaIndices, !1), + getBarPoints = $$.generateGetBarPoints(barIndices, !1), + getLinePoints = $$.generateGetLinePoints(lineIndices, !1), + getRadarPoints = $$.generateGetRadarPoints(), + getter = forX ? $$.getXForText : $$.getYForText; + + + return function (d, i) { + var getPoints = $$.isAreaType(d) && getAreaPoints || $$.isBarType(d) && getBarPoints || $$.isRadarType(d) && getRadarPoints || getLinePoints; + + return getter.call($$, getPoints(d, i), d, this); + }; + }, + + + /** + * Gets the x coordinate of the text + * @private + * @param {Object} points + * @param {Object} data + * @param {HTMLElement} element + * @returns {Number} x coordinate + */ + getXForText: function getXForText(points, d, textElement) { + var $$ = this, + config = $$.config, + xPos = void 0, + padding = void 0; + + + return config.axis_rotated ? (padding = $$.isBarType(d) ? 4 : 6, xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1)) : xPos = $$.hasType("bar") ? (points[2][0] + points[0][0]) / 2 : points[0][0], d.value === null && (xPos > $$.width ? xPos = $$.width - textElement.getBoundingClientRect().width : xPos < 0 && (xPos = 4)), xPos + (config.data_labels_position.x || 0); + }, + + + /** + * Gets the y coordinate of the text + * @private + * @param {Object} points + * @param {Object} data + * @param {HTMLElement} element + * @returns {Number} y coordinate + */ + getYForText: function getYForText(points, d, textElement) { + var $$ = this, + config = $$.config, + r = config.point_r, + baseY = 3, + yPos = void 0; + + + if (config.axis_rotated) yPos = (points[0][0] + points[2][0] + textElement.getBoundingClientRect().height * .6) / 2;else if (yPos = points[2][1], (0, _util.isNumber)(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d)) && (baseY += config.point_r / 2.3), d.value < 0 || d.value === 0 && !$$.hasPositiveValue) yPos += textElement.getBoundingClientRect().height, $$.isBarType(d) && $$.isSafari() ? yPos -= baseY : !$$.isBarType(d) && $$.isChrome() && (yPos += baseY);else { + var diff = -baseY * 2; + + $$.isBarType(d) ? diff = -baseY : $$.isBubbleType(d) && (diff = baseY), yPos += diff; + } + + // show labels regardless of the domain if value is null + if (d.value === null && !config.axis_rotated) { + var boxHeight = textElement.getBoundingClientRect().height; + + yPos < boxHeight ? yPos = boxHeight : yPos > this.height && (yPos = this.height - 4); + } + + return yPos + (config.data_labels_position.y || 0); + } +}); + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + setTargetType: function setTargetType(targetIds, type) { + var $$ = this, + config = $$.config; + $$.mapToTargetIds(targetIds).forEach(function (id) { + $$.withoutFadeIn[id] = type === config.data_types[id], config.data_types[id] = type; + }), targetIds || (config.data_type = type); + }, + hasType: function hasType(type, targetsValue) { + var $$ = this, + types = $$.config.data_types, + targets = targetsValue || $$.data.targets, + has = !1; + + + return targets && targets.length ? targets.forEach(function (target) { + var t = types[target.id]; + + (t && t.indexOf(type) >= 0 || !t && type === "line") && (has = !0); + }) : Object.keys(types).length ? Object.keys(types).forEach(function (id) { + types[id] === type && (has = !0); + }) : has = $$.config.data_type === type, has; + }, + + + /** + * Check if contains arc types chart + * @param {Object} targets + * @param {Array} exclude Excluded types + * @return {boolean} + * @private + */ + hasArcType: function hasArcType(targets) { + var _this = this, + exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [], + types = ["pie", "donut", "gauge", "radar"].filter(function (v) { + return exclude.indexOf(v) === -1; + }); + + return !types.every(function (v) { + return !_this.hasType(v, targets); + }); + }, + isLineType: function isLineType(d) { + var id = (0, _util.isString)(d) ? d : d.id; + + return !this.config.data_types[id] || this.isTypeOf(id, ["line", "spline", "area", "area-spline", "area-spline-range", "area-line-range", "step", "area-step"]); + }, + isTypeOf: function isTypeOf(d, type) { + var id = (0, _util.isString)(d) ? d : d.id, + dataType = this.config.data_types[id]; + + + return (0, _util.isArray)(type) ? type.indexOf(dataType) >= 0 : dataType === type; + }, + isStepType: function isStepType(d) { + return this.isTypeOf(d, ["step", "area-step"]); + }, + isSplineType: function isSplineType(d) { + return this.isTypeOf(d, ["spline", "area-spline", "area-spline-range"]); + }, + isAreaType: function isAreaType(d) { + return this.isTypeOf(d, ["area", "area-spline", "area-spline-range", "area-line-range", "area-step"]); + }, + isAreaRangeType: function isAreaRangeType(d) { + return this.isTypeOf(d, ["area-spline-range", "area-line-range"]); + }, + isBarType: function isBarType(d) { + return this.isTypeOf(d, "bar"); + }, + isBubbleType: function isBubbleType(d) { + return this.isTypeOf(d, "bubble"); + }, + isScatterType: function isScatterType(d) { + return this.isTypeOf(d, "scatter"); + }, + isPieType: function isPieType(d) { + return this.isTypeOf(d, "pie"); + }, + isGaugeType: function isGaugeType(d) { + return this.isTypeOf(d, "gauge"); + }, + isDonutType: function isDonutType(d) { + return this.isTypeOf(d, "donut"); + }, + isRadarType: function isRadarType(d) { + return this.isTypeOf(d, "radar"); + }, + isArcType: function isArcType(d) { + return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isRadarType(d); + }, + + + // determine if is 'circle' data point + isCirclePoint: function isCirclePoint() { + var config = this.config, + pattern = config.point_pattern; + + + return config.point_type === "circle" && (!pattern || (0, _util.isArray)(pattern) && pattern.length === 0); + }, + lineData: function lineData(d) { + return this.isLineType(d) ? [d] : []; + }, + arcData: function arcData(d) { + return this.isArcType(d.data) ? [d] : []; + }, + barData: function barData(d) { + return this.isBarType(d) ? d.values : []; + }, + + + /** + * Get data adapt for data label showing + * @param {Object} d Data object + * @return {Array} + * @private + */ + labelishData: function labelishData(d) { + return this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isRadarType(d) ? d.values : []; + }, + barLineBubbleData: function barLineBubbleData(d) { + return this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : []; + }, + + + // https://github.com/d3/d3-shape#curves + isInterpolationType: function isInterpolationType(type) { + return ["basis", "basis-closed", "basis-open", "bundle", "cardinal", "cardinal-closed", "cardinal-open", "catmull-rom", "catmull-rom-closed", "catmull-rom-open", "linear", "linear-closed", "monotone-x", "monotone-y", "natural"].indexOf(type) >= 0; + } +}); + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Grid position and text anchor helpers +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var getGridTextAnchor = function (d) { + return (0, _util.isValue)(d.position) || "end"; +}, + getGridTextDx = function (d) { + return d.position === "start" ? 4 : d.position === "middle" ? 0 : -4; +}, + getGridTextX = function (isX, width, height) { + return function (d) { + var x = isX ? 0 : width; + + return d.position === "start" ? x = isX ? -height : 0 : d.position === "middle" && (x = (isX ? -height : width) / 2), x; + }; +}; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initGrid: function initGrid() { + var $$ = this, + config = $$.config; + $$.xgrid = (0, _d3Selection.selectAll)([]), config.grid_lines_front || $$.initGridLines(), config.grid_front || $$.initXYFocusGrid(); + }, + initGridLines: function initGridLines() { + var $$ = this; + + $$.gridLines = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid + " " + _classes2.default.gridLines), $$.gridLines.append("g").attr("class", _classes2.default.xgridLines), $$.gridLines.append("g").attr("class", _classes2.default.ygridLines), $$.xgridLines = (0, _d3Selection.selectAll)([]); + }, + updateXGrid: function updateXGrid(withoutUpdate) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + xgridData = $$.generateGridData(config.grid_x_type, $$.x), + tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0; + $$.xgridAttr = isRotated ? { + "x1": 0, + "x2": $$.width, + "y1": function y1(d) { + return $$.x(d) - tickOffset; + }, + "y2": function y2(d) { + return $$.x(d) - tickOffset; + } + } : { + "x1": function x1(d) { + return $$.x(d) + tickOffset; + }, + "x2": function x2(d) { + return $$.x(d) + tickOffset; + }, + "y1": 0, + "y2": $$.height + }, $$.xgrid = $$.main.select("." + _classes2.default.xgrids).selectAll("." + _classes2.default.xgrid).data(xgridData), $$.xgrid.exit().remove(), $$.xgrid = $$.xgrid.enter().append("line").attr("class", _classes2.default.xgrid).merge($$.xgrid), withoutUpdate || $$.xgrid.each(function () { + var grid = (0, _d3Selection.select)(this); + + Object.keys($$.xgridAttr).forEach(function (id) { + grid.attr(id, $$.xgridAttr[id]).style("opacity", function () { + return grid.attr(isRotated ? "y1" : "x1") === (isRotated ? $$.height : 0) ? "0" : "1"; + }); + }); + }); + }, + updateYGrid: function updateYGrid() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks); + $$.ygrid = $$.main.select("." + _classes2.default.ygrids).selectAll("." + _classes2.default.ygrid).data(gridValues), $$.ygrid.exit().remove(), $$.ygrid = $$.ygrid.enter().append("line").attr("class", _classes2.default.ygrid).merge($$.ygrid), $$.ygrid.attr("x1", isRotated ? $$.y : 0).attr("x2", isRotated ? $$.y : $$.width).attr("y1", isRotated ? 0 : $$.y).attr("y2", isRotated ? $$.height : $$.y), $$.smoothLines($$.ygrid, "grid"); + }, + updateGrid: function updateGrid(duration) { + var $$ = this; + + // hide if arc type + $$.grid.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden"), $$.updateXGridLines(duration), $$.updateYGridLines(duration); + }, + + + /** + * Update X Grid lines + * @param {Number} duration + * @private + */ + updateXGridLines: function updateXGridLines(duration) { + var $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated; + config.grid_x_show && $$.updateXGrid(), $$.xgridLines = main.select("." + _classes2.default.xgridLines).selectAll("." + _classes2.default.xgridLine).data(config.grid_x_lines), $$.xgridLines.exit().transition().duration(duration).style("opacity", "0").remove(); + + + // enter + var xgridLine = $$.xgridLines.enter().append("g"); + + xgridLine.append("line").style("opacity", "0"), xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0"), $$.xgridLines = xgridLine.merge($$.xgridLines), $$.xgridLines.attr("class", function (d) { + return (_classes2.default.xgridLine + " " + (d.class || "")).trim(); + }).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).text(function (d) { + return d.text; + }).transition().style("opacity", "1"); + }, + + + /** + * Update Y Grid lines + * @param {Number} duration + * @private + */ + updateYGridLines: function updateYGridLines(duration) { + var $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated; + config.grid_y_show && $$.updateYGrid(), $$.ygridLines = main.select("." + _classes2.default.ygridLines).selectAll("." + _classes2.default.ygridLine).data(config.grid_y_lines), $$.ygridLines.exit().transition().duration(duration).style("opacity", "0").remove(); + + + // enter + var ygridLine = $$.ygridLines.enter().append("g"); + + ygridLine.append("line").style("opacity", "0"), ygridLine.append("text").attr("transform", isRotated ? "rotate(-90)" : "").style("opacity", "0"), $$.ygridLines = ygridLine.merge($$.ygridLines); + + + // update + var yv = $$.yv.bind($$); + + $$.ygridLines.attr("class", function (d) { + return (_classes2.default.ygridLine + " " + (d.class || "")).trim(); + }).select("line").transition().duration(duration).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : $$.width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? $$.height : yv).transition().style("opacity", "1"), $$.ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).attr("dy", -5).attr("x", getGridTextX(isRotated, $$.width, $$.height)).attr("y", yv).text(function (d) { + return d.text; + }).transition().style("opacity", "1"); + }, + redrawGrid: function redrawGrid(withTransition) { + var $$ = this, + isRotated = $$.config.axis_rotated, + xv = $$.xv.bind($$), + lines = $$.xgridLines.select("line"), + texts = $$.xgridLines.select("text"); + + + return lines = (withTransition ? lines.transition() : lines).attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? $$.width : xv).attr("y1", isRotated ? xv : 0).attr("y2", isRotated ? xv : $$.height), texts = (withTransition ? texts.transition() : texts).attr("x", getGridTextX(!isRotated, $$.width, $$.height)).attr("y", xv).text(function (d) { + return d.text; + }), [(withTransition ? lines.transition() : lines).style("opacity", "1"), (withTransition ? texts.transition() : texts).style("opacity", "1")]; + }, + initXYFocusGrid: function initXYFocusGrid() { + var $$ = this, + config = $$.config; + $$.grid = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid), config.grid_x_show && $$.grid.append("g").attr("class", _classes2.default.xgrids), config.grid_y_show && $$.grid.append("g").attr("class", _classes2.default.ygrids), config.grid_focus_show && $$.grid.append("g").attr("class", _classes2.default.xgridFocus).append("line").attr("class", _classes2.default.xgridFocus); + }, + showXGridFocus: function showXGridFocus(selectedData) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + dataToShow = selectedData.filter(function (d) { + return d && (0, _util.isValue)($$.getBaseValue(d)); + }), + focusEl = $$.main.selectAll("line." + _classes2.default.xgridFocus), + xx = $$.xx.bind($$); + !config.tooltip_show || $$.hasType("bubble") || $$.hasType("scatter") || $$.hasArcType() || (focusEl.style("visibility", "visible").data([dataToShow[0]]).attr(isRotated ? "y1" : "x1", xx).attr(isRotated ? "y2" : "x2", xx), $$.smoothLines(focusEl, "grid")); + + // Hide when bubble/scatter plot exists + }, + hideXGridFocus: function hideXGridFocus() { + this.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden"); + }, + updateXgridFocus: function updateXgridFocus() { + var $$ = this, + isRotated = $$.config.axis_rotated; + $$.main.select("line." + _classes2.default.xgridFocus).attr("x1", isRotated ? 0 : -10).attr("x2", isRotated ? $$.width : -10).attr("y1", isRotated ? -10 : 0).attr("y2", isRotated ? -10 : $$.height); + }, + generateGridData: function generateGridData(type, scale) { + var $$ = this, + tickNum = $$.main.select("." + _classes2.default.axisX).selectAll(".tick").size(), + gridData = []; + + + if (type === "year") { + var xDomain = $$.getXDomain(), + firstYear = xDomain[0].getFullYear(), + lastYear = xDomain[1].getFullYear(); + + + for (var i = firstYear; i <= lastYear; i++) gridData.push(new Date(i + "-01-01 00:00:00")); + } else gridData = scale.ticks(10), gridData.length > tickNum && (gridData = gridData.filter(function (d) { + return (d + "").indexOf(".") < 0; + })); + + return gridData; + }, + getGridFilterToRemove: function getGridFilterToRemove(params) { + return params ? function (line) { + var found = !1; + + return ((0, _util.isArray)(params) ? params.concat() : [params]).forEach(function (param) { + ("value" in param && line.value === param.value || "class" in param && line.class === param.class) && (found = !0); + }), found; + } : function () { + return !0; + }; + }, + removeGridLines: function removeGridLines(params, forX) { + var $$ = this, + config = $$.config, + toRemove = $$.getGridFilterToRemove(params), + classLines = forX ? _classes2.default.xgridLines : _classes2.default.ygridLines, + classLine = forX ? _classes2.default.xgridLine : _classes2.default.ygridLine; + $$.main.select("." + classLines).selectAll("." + classLine).filter(toRemove).transition().duration(config.transition_duration).style("opacity", "0").remove(); + + + var gridLines = "grid_" + (forX ? "x" : "y") + "_lines"; + + config[gridLines] = config[gridLines].filter(function toShow(line) { + return !toRemove(line); + }); + } +}); + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the tooltip + * @private + */ + initTooltip: function initTooltip() { + var $$ = this, + config = $$.config; + + + // Show tooltip if needed + if ($$.tooltip = $$.selectChart.style("position", "relative").append("div").attr("class", _classes2.default.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none"), config.tooltip_init_show) { + if ($$.isTimeSeries() && (0, _util.isString)(config.tooltip_init_x)) { + var targets = $$.data.targets[0], + i = void 0, + val = void 0; + + + for (config.tooltip_init_x = $$.parseDate(config.tooltip_init_x), i = 0; (val = targets.values[i]) && val.x - config.tooltip_init_x !== 0; i++); + + config.tooltip_init_x = i; + } + + $$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) { + return $$.addName(d.values[config.tooltip_init_x]); + }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType(null, ["radar"])), $$.color)), $$.tooltip.style("top", config.tooltip_init_position.top).style("left", config.tooltip_init_position.left).style("display", "block"); + } + }, + + + /** + * Returns the tooltip content(HTML string) + * @param {Object} d data + * @param {Function} defaultTitleFormat Default title format + * @param {Function} defaultValueFormat Default format for each data value in the tooltip. + * @param {Function} color Color function + * @returns {String} html + * @private + */ + getTooltipContent: function getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) { + var $$ = this, + config = $$.config, + titleFormat = config.tooltip_format_title || defaultTitleFormat, + nameFormat = config.tooltip_format_name || function (name) { + return name; + }, + valueFormat = config.tooltip_format_value || defaultValueFormat, + order = config.tooltip_order, + getRowValue = function (row) { + return $$.getBaseValue(row); + }, + getBgColor = $$.levelColor ? function (row) { + return $$.levelColor(row.value); + } : function (row) { + return color(row.id); + }; + + if (order === null && config.data_groups.length) { + // for stacked data, order should aligned with the visually displayed data + var ids = $$.orderTargets($$.data.targets).map(function (i2) { + return i2.id; + }).reverse(); + + d.sort(function (a, b) { + var v1 = a ? a.value : null, + v2 = b ? b.value : null; + + + return v1 > 0 && v2 > 0 && (v1 = a.id ? ids.indexOf(a.id) : null, v2 = b.id ? ids.indexOf(b.id) : null), v1 - v2; + }); + } else if (/^(asc|desc)$/.test(order)) { + d.sort(function (a, b) { + var v1 = a ? getRowValue(a) : null, + v2 = b ? getRowValue(b) : null; + + + return order === "asc" ? v1 - v2 : v2 - v1; + }); + } else (0, _util.isFunction)(order) && d.sort(order); + + var text = void 0, + row = void 0, + param = void 0, + value = void 0; + + + for (var i = 0, len = d.length; i < len; i++) if ((row = d[i]) && (getRowValue(row) || getRowValue(row) === 0)) { + + if (!text) { + var title = (0, _util.sanitise)(titleFormat ? titleFormat(row.x) : row.x); + + text = "" + ((0, _util.isValue)(title) ? "" : ""); + } + + if (param = [row.ratio, row.id, row.index, d], $$.isAreaRangeType(row) ? (value = ["high", "low"].map(function (v) { + return (0, _util.sanitise)(valueFormat.apply(undefined, [$$.getAreaRangeData(row, v)].concat(param))); + }), value = "Mid: " + value + " High: " + value[0] + " Low: " + value[1]) : value = (0, _util.sanitise)(valueFormat.apply(undefined, [getRowValue(row)].concat(param))), value !== undefined) { + // Skip elements when their name is set to null + if (row.name === null) continue; + + var name = (0, _util.sanitise)(nameFormat.apply(undefined, [row.name].concat(param))), + bgcolor = getBgColor(row); + text += ""; + } + } + + return text + "
    " + title + "
    ", text += $$.patterns ? "" : "", text += name + "" + value + "
    "; + }, + + + /** + * Returns the position of the tooltip + * @param {Object} dataToShow data + * @param {String} tWidth Width value of tooltip element + * @param {String} tHeight Height value of tooltip element + * @param {HTMLElement} element + * @returns {Object} top, left value + * @private + */ + tooltipPosition: function tooltipPosition(dataToShow, tWidth, tHeight, element) { + var $$ = this, + config = $$.config, + _d3Mouse = (0, _d3Selection.mouse)(element), + left = _d3Mouse[0], + top = _d3Mouse[1], + svgLeft = $$.getSvgLeft(!0), + chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight(); + + // Determine tooltip position + if (top += 20, $$.hasArcType()) { + var raw = $$.inputType === "touch" || $$.hasType("radar"); + + raw || (top += $$.height / 2, left += ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2); + } else { + var dataScale = $$.x(dataToShow[0].x); + + config.axis_rotated ? (top = dataScale + 20, left += svgLeft + 100, chartRight -= svgLeft) : (top -= 5, left = svgLeft + $$.getCurrentPaddingLeft(!0) + 20 + ($$.zoomScale ? left : dataScale)); + } + + var right = left + tWidth; + + return right > chartRight && (left -= right - chartRight + 20), top + tHeight > $$.currentHeight && (top -= tHeight + 30), top < 0 && (top = 0), { top: top, left: left }; + }, + + + /** + * Show the tooltip + * @private + * @param {Object} selectedData + * @param {HTMLElement} element + */ + showTooltip: function showTooltip(selectedData, element) { + var $$ = this, + config = $$.config, + forArc = $$.hasArcType(null, ["radar"]), + dataToShow = selectedData.filter(function (d) { + return d && (0, _util.isValue)($$.getBaseValue(d)); + }), + positionFunction = config.tooltip_position || $$.tooltipPosition; + + + if (dataToShow.length !== 0 && config.tooltip_show) { + var datum = $$.tooltip.datum(), + width = datum && datum.width || 0, + height = datum && datum.height || 0; + + + if (!datum || datum.current !== JSON.stringify(selectedData)) { + var html = config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color); + + (0, _util.callFn)(config.tooltip_onshow, $$), $$.tooltip.html(html).style("display", "block").datum({ + current: JSON.stringify(selectedData), + width: width = $$.tooltip.property("offsetWidth"), + height: height = $$.tooltip.property("offsetHeight") + }), (0, _util.callFn)(config.tooltip_onshown, $$), $$._handleLinkedCharts(!0, selectedData[0].index); + } + + // Get tooltip dimensions + var position = positionFunction.call(this, dataToShow, width, height, element); + + // Set tooltip position + $$.tooltip.style("top", position.top + "px").style("left", position.left + "px"); + } + }, + + + /** + * Hide the tooltip + * @private + */ + hideTooltip: function hideTooltip() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.tooltip_onhide, $$), this.tooltip.style("display", "none").datum(null), (0, _util.callFn)(config.tooltip_onhidden, $$), $$._handleLinkedCharts(!1); + }, + + + /** + * Toggle display for linked chart instances + * @param {Boolean} show true: show, false: hide + * @param {Number} index x Axis index + * @private + */ + _handleLinkedCharts: function _handleLinkedCharts(show, index) { + var $$ = this; + + if ($$.config.tooltip_linked) { + var linkedName = $$.config.tooltip_linked_name; + + $$.api.internal.charts.forEach(function (c) { + if (c !== $$.api) { + var internal = c.internal, + isLinked = internal.config.tooltip_linked, + name = internal.config.tooltip_linked_name, + isInDom = document.body.contains(c.element); + + + if (isLinked && linkedName === name && isInDom) { + var isShowing = internal.tooltip.style("display") === "block"; + + // prevent throwing error for non-paired linked indexes + try { + isShowing ^ show && c.tooltip[isShowing ? "hide" : "show"]({ index: index }); + } catch (e) {} + } + } + }); + } + } +}); + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the legend. + * @private + */ + initLegend: function initLegend() { + var $$ = this, + config = $$.config; + $$.legendItemTextBox = {}, $$.legendHasRendered = !1, $$.legend = $$.svg.append("g"), config.legend_show ? config.legend_contents_bindto && config.legend_contents_template ? $$.updateLegendTemplate() : ($$.legend.attr("transform", $$.getTranslate("legend")), $$.updateLegendWithDefaults()) : ($$.legend.style("visibility", "hidden"), $$.hiddenLegendIds = $$.mapToIds($$.data.targets)); + }, + + + /** + * Update legend using template option + * @private + */ + updateLegendTemplate: function updateLegendTemplate() { + var $$ = this, + config = $$.config, + wrapper = (0, _d3Selection.select)(config.legend_contents_bindto), + template = config.legend_contents_template; + + + if (!wrapper.empty()) { + var targets = $$.data.targets, + ids = [], + html = ""; + $$.mapToIds(targets).forEach(function (v) { + var content = (0, _util.isFunction)(template) ? template.call($$, v, $$.color(v), $$.api.data(v)[0].values) : template.replace(/{=COLOR}/g, $$.color(v)).replace(/{=TITLE}/g, v); + + content && (ids.push(v), html += content); + }); + + + var legendItem = wrapper.html(html).selectAll(function () { + return this.childNodes; + }).data(ids); + + $$.setLegendItem(legendItem); + } + }, + + + /** + * Update the legend to its default value. + * @private + */ + updateLegendWithDefaults: function updateLegendWithDefaults() { + var $$ = this; + + $$.updateLegend($$.mapToIds($$.data.targets), { + withTransform: !1, + withTransitionForTransform: !1, + withTransition: !1 + }); + }, + + + /** + * Update the size of the legend. + * @private + * @param {Number} height + * @param {Number} width + */ + updateSizeForLegend: function updateSizeForLegend(legendHeight, legendWidth) { + var $$ = this, + config = $$.config, + insetLegendPosition = { + top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y, + left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + .5 : $$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + .5 + }; + $$.margin3 = { + top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight, + right: NaN, + bottom: 0, + left: $$.isLegendRight ? $$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0 + }; + }, + + + /** + * Transform Legend + * @private + * @param {Boolean} whether or not to transition. + */ + transformLegend: function transformLegend(withTransition) { + var $$ = this; + + (withTransition ? $$.legend.transition() : $$.legend).attr("transform", $$.getTranslate("legend")); + }, + + + /** + * Update the legend step + * @private + * @param {Number} step + */ + updateLegendStep: function updateLegendStep(step) { + this.legendStep = step; + }, + + + /** + * Update legend item width + * @private + * @param {Number} width + */ + updateLegendItemWidth: function updateLegendItemWidth(w) { + this.legendItemWidth = w; + }, + + + /** + * Update legend item height + * @private + * @param {Number} height + */ + updateLegendItemHeight: function updateLegendItemHeight(h) { + this.legendItemHeight = h; + }, + + + /** + * Get the width of the legend + * @private + * @param {Number} width + */ + getLegendWidth: function getLegendWidth() { + var $$ = this; + + return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0; + }, + + + /** + * Get the height of the legend + * @private + * @param {Number} height + */ + getLegendHeight: function getLegendHeight() { + var $$ = this, + h = 0; + + return $$.config.legend_show && ($$.isLegendRight ? h = $$.currentHeight : h = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1)), h; + }, + + + /** + * Get the opacity of the legend + * @private + * @param {Object} d3.Select + * @returns {Number} opacity + */ + opacityForLegend: function opacityForLegend(legendItem) { + return legendItem.classed(_classes2.default.legendItemHidden) ? null : "1"; + }, + + + /** + * Get the opacity of the legend that is unfocused + * @private + * @param {Object} legendItem, d3.Select + * @returns {Number} opacity + */ + opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) { + return legendItem.classed(_classes2.default.legendItemHidden) ? null : "0.3"; + }, + + + /** + * Toggles the focus of the legend + * @private + * @param {Array} ID's of target + * @param {Boolean} whether or not to focus. + */ + toggleFocusLegend: function toggleFocusLegend(targetIds, focus) { + var $$ = this, + targetIdz = $$.mapToTargetIds(targetIds); + $$.legend.selectAll("." + _classes2.default.legendItem).filter(function (id) { + return targetIdz.indexOf(id) >= 0; + }).classed(_classes2.default.legendItemFocused, focus).transition().duration(100).style("opacity", function () { + var opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend; + + return opacity.call($$, (0, _d3Selection.select)(this)); + }); + }, + + + /** + * Revert the legend to its default state + * @private + */ + revertLegend: function revertLegend() { + var $$ = this; + + $$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemFocused, !1).transition().duration(100).style("opacity", function () { + return $$.opacityForLegend((0, _d3Selection.select)(this)); + }); + }, + + + /** + * Shows the legend + * @private + * @param {Array} ID's of target + */ + showLegend: function showLegend(targetIds) { + var $$ = this, + config = $$.config; + config.legend_show || (config.legend_show = !0, $$.legend.style("visibility", "visible"), !$$.legendHasRendered && $$.updateLegendWithDefaults()), $$.removeHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("visibility", "visible").transition().style("opacity", function () { + return $$.opacityForLegend((0, _d3Selection.select)(this)); + }); + }, + + + /** + * Hide the legend + * @private + * @param {Array} ID's of target + */ + hideLegend: function hideLegend(targetIds) { + var $$ = this, + config = $$.config; + config.legend_show && (0, _util.isEmpty)(targetIds) && (config.legend_show = !1, $$.legend.style("visibility", "hidden")), $$.addHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("opacity", "0").style("visibility", "hidden"); + }, + + + /** + * Clear the LegendItemTextBox cache. + * @private + */ + clearLegendItemTextBoxCache: function clearLegendItemTextBoxCache() { + this.legendItemTextBox = {}; + }, + + + /** + * Set legend item style & bind events + * @private + * @param {d3.selection} item + */ + setLegendItem: function setLegendItem(item) { + var $$ = this, + config = $$.config, + isTouch = $$.inputType === "touch"; + item.attr("class", function (id) { + var node = (0, _d3Selection.select)(this), + itemClass = !node.empty() && node.attr("class") || ""; + + + return itemClass + $$.generateClass(_classes2.default.legendItem, id); + }).style("visibility", function (id) { + return $$.isLegendToShow(id) ? "visible" : "hidden"; + }).style("cursor", "pointer").on("click", function (id) { + (0, _util.callFn)(config.legend_item_onclick, $$, id) || (_d3Selection.event.altKey ? ($$.api.hide(), $$.api.show(id)) : ($$.api.toggle(id), !isTouch && $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert())), isTouch && $$.hideTooltip(); + }), isTouch || item.on("mouseout", function (id) { + (0, _util.callFn)(config.legend_item_onout, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !1), $$.api.revert()); + }).on("mouseover", function (id) { + (0, _util.callFn)(config.legend_item_onover, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !0), !$$.transiting && $$.isTargetToShow(id) && $$.api.focus(id)); + }); + }, + + + /** + * Update the legend + * @private + * @param {Array} ID's of target + * @param {Object} withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition. + * @param {Object} the return value of the generateTransitions + */ + updateLegend: function updateLegend(targetIds, options, transitions) { + var $$ = this, + config = $$.config, + tileWidth = config.legend_item_tile_width + 5, + maxWidth = 0, + maxHeight = 0, + xForLegend = void 0, + yForLegend = void 0, + totalLength = 0, + offsets = {}, + widths = {}, + heights = {}, + margins = [0], + steps = {}, + step = 0, + background = void 0, + isLegendRightOrInset = $$.isLegendRight || $$.isLegendInset, + targetIdz = targetIds.filter(function (id) { + return !(0, _util.isDefined)(config.data_names[id]) || config.data_names[id] !== null; + }), + optionz = options || {}, + withTransition = (0, _util.getOption)(optionz, "withTransition", !0), + withTransitionForTransform = (0, _util.getOption)(optionz, "withTransitionForTransform", !0), + getTextBox = function (textElement, id) { + + return $$.legendItemTextBox[id] || ($$.legendItemTextBox[id] = $$.getTextRect(textElement, _classes2.default.legendItem, textElement)), $$.legendItemTextBox[id]; + }, + updatePositions = function (textElement, id, index) { + var isLast = index === targetIdz.length - 1, + box = getTextBox(textElement, id), + itemWidth = box.width + tileWidth + (isLast && !isLegendRightOrInset ? 0 : 10) + config.legend_padding, + itemHeight = box.height + 4, + itemLength = isLegendRightOrInset ? itemHeight : itemWidth, + areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(), + margin = void 0, + updateValues = function (id2, withoutStep) { + withoutStep || (margin = (areaLength - totalLength - itemLength) / 2, margin < 10 && (margin = (areaLength - itemLength) / 2, totalLength = 0, step++)), steps[id2] = step, margins[step] = $$.isLegendInset ? 10 : margin, offsets[id2] = totalLength, totalLength += itemLength; + }; + + // MEMO: care about condifion of step, totalLength + + + if (index === 0 && (totalLength = 0, step = 0, maxWidth = 0, maxHeight = 0), config.legend_show && !$$.isLegendToShow(id)) return widths[id] = 0, heights[id] = 0, steps[id] = 0, void (offsets[id] = 0); + + widths[id] = itemWidth, heights[id] = itemHeight, (!maxWidth || itemWidth >= maxWidth) && (maxWidth = itemWidth), (!maxHeight || itemHeight >= maxHeight) && (maxHeight = itemHeight); + + + var maxLength = isLegendRightOrInset ? maxHeight : maxWidth; + + config.legend_equally ? (Object.keys(widths).forEach(function (id2) { + return widths[id2] = maxWidth; + }), Object.keys(heights).forEach(function (id2) { + return heights[id2] = maxHeight; + }), margin = (areaLength - maxLength * targetIdz.length) / 2, margin < 10 ? (totalLength = 0, step = 0, targetIdz.forEach(function (id2) { + return updateValues(id2); + })) : updateValues(id, !0)) : updateValues(id); + }; + + // Skip elements when their name is set to null + + + $$.isLegendInset && (step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length, $$.updateLegendStep(step)), $$.isLegendRight ? (xForLegend = function (id) { + return maxWidth * steps[id]; + }, yForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }) : $$.isLegendInset ? (xForLegend = function (id) { + return maxWidth * steps[id] + 10; + }, yForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }) : (xForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }, yForLegend = function (id) { + return maxHeight * steps[id]; + }); + + var xForLegendText = function (id, i) { + return xForLegend(id, i) + 4 + config.legend_item_tile_width; + }, + xForLegendRect = function (id, i) { + return xForLegend(id, i); + }, + x1ForLegendTile = function (id, i) { + return xForLegend(id, i) - 2; + }, + x2ForLegendTile = function (id, i) { + return xForLegend(id, i) - 2 + config.legend_item_tile_width; + }, + yForLegendText = function (id, i) { + return yForLegend(id, i) + 9; + }, + yForLegendRect = function (id, i) { + return yForLegend(id, i) - 5; + }, + yForLegendTile = function (id, i) { + return yForLegend(id, i) + 4; + }, + l = $$.legend.selectAll("." + _classes2.default.legendItem).data(targetIdz).enter().append("g"); + + // Define g for legend area + + + $$.setLegendItem(l), l.append("text").text(function (id) { + return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id; + }).each(function (id, i) { + updatePositions(this, id, i); + }).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendText), l.append("rect").attr("class", _classes2.default.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendRect); + + + var usePoint = $$.config.legend_usePoint; + + if (usePoint) { + var ids = []; + + l.append(function (d) { + var pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type]; + + ids.indexOf(d) === -1 && ids.push(d); + + + var point = pattern[ids.indexOf(d) % pattern.length]; + + return point === "rectangle" && (point = "rect"), document.createElementNS(_d3Selection.namespaces.svg, $$.hasValidPointType(point) ? point : "use"); + }).attr("class", _classes2.default.legendItemPoint).style("fill", function (d) { + return $$.color(d); + }).style("pointer-events", "none").attr("href", function (data, idx, selection) { + var node = selection[idx], + nodeName = node.nodeName.toLowerCase(); + + + return nodeName === "use" ? "#" + $$.datetimeId + "-point-" + data : undefined; + }); + } else l.append("line").attr("class", _classes2.default.legendItemTile).style("stroke", $$.color).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : -200).attr("y1", isLegendRightOrInset ? -200 : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : -200).attr("y2", isLegendRightOrInset ? -200 : yForLegendTile).attr("stroke-width", config.legend_item_tile_height); + + // Set background for inset legend + background = $$.legend.select("." + _classes2.default.legendBackground + " rect"), $$.isLegendInset && maxWidth > 0 && background.size() === 0 && (background = $$.legend.insert("g", "." + _classes2.default.legendItem).attr("class", _classes2.default.legendBackground).append("rect")); + + + var texts = $$.legend.selectAll("text").data(targetIdz).text(function (id) { + return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id; + }) // MEMO: needed for update + .each(function (id, i) { + updatePositions(this, id, i); + }); + + (withTransition ? texts.transition() : texts).attr("x", xForLegendText).attr("y", yForLegendText); + + + var rects = $$.legend.selectAll("rect." + _classes2.default.legendItemEvent).data(targetIdz); + + if ((withTransition ? rects.transition() : rects).attr("width", function (id) { + return widths[id]; + }).attr("height", function (id) { + return heights[id]; + }).attr("x", xForLegendRect).attr("y", yForLegendRect), usePoint) { + var tiles = $$.legend.selectAll("." + _classes2.default.legendItemPoint).data(targetIdz); + + (withTransition ? tiles.transition() : tiles).each(function () { + var nodeName = this.nodeName.toLowerCase(), + pointR = $$.config.point_r, + x = "x", + y = "y", + xOffset = 2, + yOffset = 2.5, + radius = void 0, + width = void 0, + height = void 0; + + + if (nodeName === "circle") { + var size = pointR * .2; + + x = "cx", y = "cy", radius = pointR + size, xOffset = pointR * 2, yOffset = -size; + } else if (nodeName === "rect") { + var _size = pointR * 2.5; + + width = _size, height = _size, yOffset = 3; + } + + (0, _d3Selection.select)(this).attr(x, function (d) { + return x1ForLegendTile(d) + xOffset; + }).attr(y, function (d) { + return yForLegendTile(d) - yOffset; + }).attr("r", radius).attr("width", width).attr("height", height); + }); + } else { + var _tiles = $$.legend.selectAll("line." + _classes2.default.legendItemTile).data(targetIdz); + + (withTransition ? _tiles.transition() : _tiles).style("stroke", $$.color).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile); + } + + background && (withTransition ? background.transition() : background).attr("height", $$.getLegendHeight() - 12).attr("width", maxWidth * (step + 1) + 10), $$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemHidden, function (id) { + return !$$.isTargetToShow(id); + }), $$.updateLegendItemWidth(maxWidth), $$.updateLegendItemHeight(maxHeight), $$.updateLegendStep(step), $$.updateSizes(), $$.updateScales(!withTransition), $$.updateSvgSize(), $$.transformAll(withTransitionForTransform, transitions), $$.legendHasRendered = !0; + } +}); + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the title + * @private + */ + initTitle: function initTitle() { + var $$ = this; + + $$.title = $$.svg.append("text").text($$.config.title_text).attr("class", $$.CLASS.title); + }, + + + /** + * Redraw title + * @private + */ + redrawTitle: function redrawTitle() { + var $$ = this; + + $$.title.attr("x", $$.xForTitle.bind($$)).attr("y", $$.yForTitle.bind($$)); + }, + + + /** + * Returns the x attribute value of the title + * @private + * @returns {Number} x attribute value + */ + xForTitle: function xForTitle() { + var $$ = this, + config = $$.config, + position = config.title_position || "left", + x = void 0; + + + return x = position.indexOf("right") >= 0 ? $$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width - config.title_padding.right : position.indexOf("center") >= 0 ? ($$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width) / 2 : config.title_padding.left, x; + }, + + + /** + * Returns the y attribute value of the title + * @private + * @returns {Number} y attribute value + */ + yForTitle: function yForTitle() { + var $$ = this; + + return $$.config.title_padding.top + $$.getTextRect($$.title, $$.CLASS.title, $$.title).height; + }, + + + /** + * Get title padding + * @private + * @returns {Number} padding value + */ + getTitlePadding: function getTitlePadding() { + var $$ = this; + + return $$.yForTitle() + $$.config.title_padding.bottom; + } +}); + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + getClipPath: function getClipPath(id) { + var $$ = this, + config = $$.config; + + + if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) return null; + + var isIE9 = window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0; + + return "url(" + (isIE9 ? "" : document.URL.split("#")[0]) + "#" + id + ")"; + }, + appendClip: function appendClip(parent, id) { + return parent.append("clipPath").attr("id", id).append("rect"); + }, + getAxisClipX: function getAxisClipX(forHorizontal) { + // axis line width + padding for left + var left = Math.max(30, this.margin.left); + + return forHorizontal ? -(1 + left) : -(left - 1); + }, + getAxisClipY: function getAxisClipY(forHorizontal) { + return forHorizontal ? -20 : -this.margin.top; + }, + getXAxisClipX: function getXAxisClipX() { + var $$ = this; + + return $$.getAxisClipX(!$$.config.axis_rotated); + }, + getXAxisClipY: function getXAxisClipY() { + var $$ = this; + + return $$.getAxisClipY(!$$.config.axis_rotated); + }, + getYAxisClipX: function getYAxisClipX() { + var $$ = this; + + return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated); + }, + getYAxisClipY: function getYAxisClipY() { + var $$ = this; + + return $$.getAxisClipY($$.config.axis_rotated); + }, + getAxisClipWidth: function getAxisClipWidth(forHorizontal) { + var $$ = this, + left = Math.max(30, $$.margin.left), + right = Math.max(30, $$.margin.right); + + + // width + axis line width + padding for left/right + return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20; + }, + getAxisClipHeight: function getAxisClipHeight(forHorizontal) { + // less than 20 is not enough to show the axis label 'outer' without legend + return (forHorizontal ? this.margin.bottom : this.margin.top + this.height) + 20; + }, + getXAxisClipWidth: function getXAxisClipWidth() { + var $$ = this; + + return $$.getAxisClipWidth(!$$.config.axis_rotated); + }, + getXAxisClipHeight: function getXAxisClipHeight() { + var $$ = this; + + return $$.getAxisClipHeight(!$$.config.axis_rotated); + }, + getYAxisClipWidth: function getYAxisClipWidth() { + var $$ = this; + + return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0); + }, + getYAxisClipHeight: function getYAxisClipHeight() { + var $$ = this; + + return $$.getAxisClipHeight($$.config.axis_rotated); + } +}); + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + initRegion: function initRegion() { + var $$ = this; + + $$.region = $$.main.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.regions); + }, + updateRegion: function updateRegion(duration) { + var $$ = this, + config = $$.config; + + + // hide if arc type + $$.region.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.mainRegion = $$.main.select("." + _classes2.default.regions).selectAll("." + _classes2.default.region).data(config.regions), $$.mainRegion.exit().transition().duration(duration).style("opacity", "0").remove(), $$.mainRegion = $$.mainRegion.enter().append("g").merge($$.mainRegion).attr("class", $$.classRegion.bind($$)), $$.mainRegion.append("rect").style("fill-opacity", "0"); + }, + redrawRegion: function redrawRegion(withTransition) { + var $$ = this, + regions = $$.mainRegion.select("rect"); + + + return regions = (withTransition ? regions.transition() : regions).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$)), [(withTransition ? regions.transition() : regions).style("fill-opacity", function (d) { + return (0, _util.isValue)(d.opacity) ? d.opacity : "0.1"; + }).on("end", function () { + (0, _d3Selection.select)(this.parentNode).selectAll("rect:not([x])").remove(); + })]; + }, + getRegionXY: function getRegionXY(type, d) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isX = type === "x", + key = "start", + scale = void 0, + pos = 0; + + + return d.axis === "y" || d.axis === "y2" ? (!isX && (key = "end"), (isX ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], pos = scale(d[key]))) : (isX ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, pos = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), pos; + }, + regionX: function regionX(d) { + return this.getRegionXY("x", d); + }, + regionY: function regionY(d) { + return this.getRegionXY("y", d); + }, + getRegionSize: function getRegionSize(type, d) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isWidth = type === "width", + start = $$[isWidth ? "regionX" : "regionY"](d), + scale = void 0, + key = "end", + end = $$[type]; + + + return d.axis === "y" || d.axis === "y2" ? (!isWidth && (key = "start"), (isWidth ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], end = scale(d[key]))) : (isWidth ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, end = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), end < start ? 0 : end - start; + }, + regionWidth: function regionWidth(d) { + return this.getRegionSize("width", d); + }, + regionHeight: function regionHeight(d) { + return this.getRegionSize("height", d); + }, + isRegionOnX: function isRegionOnX(d) { + return !d.axis || d.axis === "x"; + } +}); // selection + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Called when dragging. + * Data points can be selected. + * @private + * @param {Object} mouse Object + */ + drag: function drag(mouse) { + var $$ = this, + config = $$.config, + main = $$.main; + + + if (!$$.hasArcType() && config.data_selection_enabled && ( // do nothing if not selectable + !config.zoom_enabled || $$.zoom.altDomain) && config.data_selection_multiple // skip when single selection because drag is used for multiple selection + ) { + var _$$$dragStart = $$.dragStart, + sx = _$$$dragStart[0], + sy = _$$$dragStart[1], + mx = mouse[0], + my = mouse[1], + minX = Math.min(sx, mx), + maxX = Math.max(sx, mx), + minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my), + maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my); + main.select("." + _classes2.default.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY), main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).filter(function (d) { + return config.data_selection_isselectable(d); + }).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + isSelected = shape.classed(_classes2.default.SELECTED), + isIncluded = shape.classed(_classes2.default.INCLUDED), + _x = void 0, + _y = void 0, + _w = void 0, + _h = void 0, + toggle = void 0, + isWithin = !1, + box = void 0; + + if (shape.classed(_classes2.default.circle)) _x = shape.attr("cx") * 1, _y = shape.attr("cy") * 1, toggle = $$.togglePoint, isWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;else if (shape.classed(_classes2.default.bar)) box = (0, _util.getPathBox)(this), _x = box.x, _y = box.y, _w = box.width, _h = box.height, toggle = $$.togglePath, isWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);else + // line/area selection not supported yet + return; + + isWithin ^ isIncluded && (shape.classed(_classes2.default.INCLUDED, !isIncluded), shape.classed(_classes2.default.SELECTED, !isSelected), toggle.call($$, !isSelected, shape, d, i)); + }); + } + }, + + + /** + * Called when the drag starts. + * Adds and Shows the drag area. + * @private + * @param {Object} mouse Object + */ + dragstart: function dragstart(mouse) { + var $$ = this, + config = $$.config; + $$.hasArcType() || !config.data_selection_enabled || ($$.dragStart = mouse, $$.main.select("." + _classes2.default.chart).append("rect").attr("class", _classes2.default.dragarea).style("opacity", "0.1"), $$.setDragStatus(!0)); + }, + + + /** + * Called when the drag finishes. + * Removes the drag area. + * @private + */ + dragend: function dragend() { + var $$ = this, + config = $$.config; + $$.hasArcType() || !config.data_selection_enabled || ($$.main.select("." + _classes2.default.dragarea).transition().duration(100).style("opacity", "0").remove(), $$.main.selectAll("." + _classes2.default.shape).classed(_classes2.default.INCLUDED, !1), $$.setDragStatus(!1)); + }, + setDragStatus: function setDragStatus(isDragging) { + this.dragging = isDragging; + } +}); + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Color = __webpack_require__(49), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Select a point + * @private + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + selectPoint: function selectPoint(target, d, i) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + cx = (isRotated ? $$.circleY : $$.circleX).bind($$), + cy = (isRotated ? $$.circleX : $$.circleY).bind($$), + r = $$.pointSelectR.bind($$); + (0, _util.callFn)(config.data_onselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () { + return $$.generateClass(_classes2.default.selectedCircle, i); + }).attr("cx", cx).attr("cy", cy).attr("stroke", function () { + return $$.color(d); + }).attr("r", function (d2) { + return $$.pointSelectR(d2) * 1.4; + }).transition().duration(100).attr("r", r); + }, + + + /** + * Unelect a point + * @private + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + unselectPoint: function unselectPoint(target, d, i) { + var $$ = this; + + (0, _util.callFn)($$.config.data_onunselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).transition().duration(100).attr("r", 0).remove(); + }, + + + /** + * Toggles the selection of points + * @private + * @param {Boolean} whether or not to select. + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + togglePoint: function togglePoint(selected, target, d, i) { + var method = (selected ? "" : "un") + "selectPoint"; + + this[method](target, d, i); + }, + + + /** + * Select a path + * @private + * @param {Object} target path + * @param {Object} data + */ + selectPath: function selectPath(target, d) { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.data_onselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () { + return (0, _d3Color.rgb)($$.color(d)).brighter(.75); + }); + }, + + + /** + * Unelect a path + * @private + * @param {Object} target path + * @param {Object} data + */ + unselectPath: function unselectPath(target, d) { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.data_onunselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () { + return $$.color(d); + }); + }, + + + /** + * Toggles the selection of lines + * @private + * @param {Boolean} whether or not to select. + * @param {Object} target shape + * @param {Object} data + * @param {Number} index + */ + togglePath: function togglePath(selected, target, d, i) { + this[(selected ? "" : "un") + "selectPath"](target, d, i); + }, + + + /** + * Returns the toggle method of the target + * @private + * @param {Object} target shape + * @param {Object} data + * @returns {Function} toggle method + */ + getToggle: function getToggle(that, d) { + var $$ = this; + + return that.nodeName === "path" ? $$.togglePath : $$.isStepType(d) ? function () {} : // circle is hidden in step chart, so treat as within the click area + $$.togglePoint; + }, + + + /** + * Toggles the selection of shapes + * @private + * @param {Object} target shape + * @param {Object} data + * @param {Number} index + */ + toggleShape: function toggleShape(that, d, i) { + var $$ = this, + config = $$.config, + shape = (0, _d3Selection.select)(that), + isSelected = shape.classed(_classes2.default.SELECTED), + toggle = $$.getToggle(that, d).bind($$), + toggledShape = void 0; + + + if (config.data_selection_enabled && config.data_selection_isselectable(d)) { + if (!config.data_selection_multiple) { + var selector = "." + _classes2.default.shapes; + + config.data_selection_grouped && (selector += $$.getTargetSelectorSuffix(d.id)), $$.main.selectAll(selector).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this); + + shape.classed(_classes2.default.SELECTED) && (toggledShape = shape, toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i)); + }); + } + + toggledShape && toggledShape.node() === shape.node() || (shape.classed(_classes2.default.SELECTED, !isSelected), toggle(!isSelected, shape, d, i)); + } + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 49 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__49__; + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Brush = __webpack_require__(13), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the brush. + * @private + */ + initBrush: function initBrush() { + var $$ = this; + + // set the brush + $$.brush = $$.config.axis_rotated ? (0, _d3Brush.brushY)() : (0, _d3Brush.brushX)(); + + + // set "brush" event + var brushHandler = function () { + $$.redrawForBrush(); + }; + + $$.brush.on("start", function () { + $$.inputType === "touch" && $$.hideTooltip(), brushHandler(); + }).on("brush", brushHandler), $$.brush.update = function () { + var extent = this.extent()(); + + return extent[1].filter(function (v) { + return isNaN(v); + }).length === 0 && $$.context && $$.context.select("." + _classes2.default.brush).call(this), this; + }, $$.brush.scale = function (scale, height) { + var overlay = $$.svg.select(".bb-brush .overlay"), + extent = [[0, 0]]; + scale.range ? extent.push([scale.range()[1], (height || !overlay.empty()) && ~~overlay.attr("height") || 60]) : scale.constructor === Array && extent.push(scale), $$.config.axis_rotated && extent.reverse(), this.extent($$.config.axis_x_extent || extent), this.update(); + }, $$.brush.getSelection = function () { + return $$.context ? $$.context.select("." + _classes2.default.brush) : (0, _d3Selection.select)([]); + }; + }, + + + /** + * Initialize the subchart. + * @private + */ + initSubchart: function initSubchart() { + var $$ = this, + config = $$.config, + visibility = config.subchart_show ? "visible" : "hidden"; + $$.context = $$.svg.append("g").attr("transform", $$.getTranslate("context")); + + + var context = $$.context; + + context.style("visibility", visibility), context.append("g").attr("clip-path", $$.clipPathForSubchart).attr("class", _classes2.default.chart), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines), context.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.brush).call($$.brush), $$.axes.subx = context.append("g").attr("class", _classes2.default.axisX).attr("transform", $$.getTranslate("subx")).attr("clip-path", config.axis_rotated ? "" : $$.clipPathForXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden"); + }, + + + /** + * Update sub chart + * @private + * @param {Object} $$.data.targets + */ + updateTargetsForSubchart: function updateTargetsForSubchart(targets) { + var $$ = this, + context = $$.context, + config = $$.config, + classChartBar = $$.classChartBar.bind($$), + classBars = $$.classBars.bind($$), + classChartLine = $$.classChartLine.bind($$), + classLines = $$.classLines.bind($$), + classAreas = $$.classAreas.bind($$); + + + if (config.subchart_show) { + // -- Bar --// + var contextBarUpdate = context.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", classChartBar), + contextBarEnter = contextBarUpdate.enter().append("g").style("opacity", "0").attr("class", classChartBar).merge(contextBarUpdate); + + + // Bars for each data + contextBarEnter.append("g").attr("class", classBars); + + + // -- Line --// + var contextLineUpdate = context.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", classChartLine), + contextLineEnter = contextLineUpdate.enter().append("g").style("opacity", "0").attr("class", classChartLine).merge(contextLineUpdate); + + + // Lines for each data + contextLineEnter.append("g").attr("class", classLines), contextLineEnter.append("g").attr("class", classAreas), context.selectAll("." + _classes2.default.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? $$.width2 : $$.height2); + } + }, + + + /** + * Update the bar of the sub chart + * @private + * @param {Object} durationForExit + */ + updateBarForSubchart: function updateBarForSubchart(durationForExit) { + var $$ = this; + + $$.contextBar = $$.context.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data($$.barData.bind($$)), $$.contextBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextBar = $$.contextBar.enter().append("path").attr("class", $$.classBar.bind($$)).style("stroke", "none").style("fill", $$.color).merge($$.contextBar).style("opacity", $$.initialOpacity.bind($$)); + }, + + + /** + * Redraw the bar of the subchart + * @private + * @param {String} path in subchart bar + * @param {Boolean} whether or not to transition. + * @param {Number} transition duration + */ + redrawBarForSubchart: function redrawBarForSubchart(drawBarOnSub, withTransition, duration) { + var contextBar = void 0; + + contextBar = withTransition ? this.contextBar.transition(Math.random().toString()).duration(duration) : this.contextBar, contextBar.attr("d", drawBarOnSub).style("opacity", "1"); + }, + + + /** + * Update the line of the sub chart + * @private + * @param {Number} Fade-out transition duration + */ + updateLineForSubchart: function updateLineForSubchart(durationForExit) { + var $$ = this; + + $$.contextLine = $$.context.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.contextLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextLine = $$.contextLine.enter().append("path").attr("class", $$.classLine.bind($$)).style("stroke", $$.color).merge($$.contextLine).style("opacity", $$.initialOpacity.bind($$)); + }, + + + /** + * Redraw the line of the subchart + * @private + * @param {String} path in subchart line + * @param {Boolean} whether or not to transition + * @param {Number} transition duration + */ + redrawLineForSubchart: function redrawLineForSubchart(drawLineOnSub, withTransition, duration) { + var contextLine = void 0; + + contextLine = withTransition ? this.contextLine.transition(Math.random().toString()).duration(duration) : this.contextLine, contextLine.attr("d", drawLineOnSub).style("opacity", "1"); + }, + + + /** + * Update the area of the sub chart + * @private + * @param {Number} Fade-out transition duration + */ + updateAreaForSubchart: function updateAreaForSubchart(durationForExit) { + var $$ = this; + + $$.contextArea = $$.context.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.contextArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextArea = $$.contextArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () { + return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0"; + }).merge($$.contextArea).style("opacity", "0"); + }, + + /** + * Redraw the area of the subchart + * @private + * @param {String} path in subchart line + * @param {Boolean} whether or not to transition + * @param {Number} transition duration + */ + redrawAreaForSubchart: function redrawAreaForSubchart(drawAreaOnSub, withTransition, duration) { + var contextArea = void 0; + + contextArea = withTransition ? this.contextArea.transition(Math.random().toString()).duration(duration) : this.contextArea, contextArea.attr("d", drawAreaOnSub).style("fill", this.color).style("opacity", this.orgAreaOpacity); + }, + + + /** + * Redraw subchart. + * @private + * @param {Boolean} whether or not to show subchart + * @param Do not use. + * @param {Number} transition duration + * @param Do not use. + * @param {Object} area Indices + * @param {Object} bar Indices + * @param {Object} line Indices + */ + redrawSubchart: function redrawSubchart(withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices) { + var $$ = this, + config = $$.config; + + + // subchart + if ($$.context.style("visibility", config.subchart_show ? "visible" : "hidden"), config.subchart_show && (_d3Selection.event && _d3Selection.event.type === "zoom" && $$.brush.update(), withSubchart)) + + // update subchart elements if needed + { + (0, _util.brushEmpty)($$) || $$.brush.update(); + + + // setup drawer - MEMO: this must be called after axis updated + var drawAreaOnSub = $$.generateDrawArea(areaIndices, !0), + drawBarOnSub = $$.generateDrawBar(barIndices, !0), + drawLineOnSub = $$.generateDrawLine(lineIndices, !0); + $$.updateBarForSubchart(duration), $$.updateLineForSubchart(duration), $$.updateAreaForSubchart(duration), $$.redrawBarForSubchart(drawBarOnSub, duration, duration), $$.redrawLineForSubchart(drawLineOnSub, duration, duration), $$.redrawAreaForSubchart(drawAreaOnSub, duration, duration); + } + }, + + /** + * Redraw the brush. + * @private + */ + redrawForBrush: function redrawForBrush() { + var $$ = this, + x = $$.x; + $$.redraw({ + withTransition: !1, + withY: $$.config.zoom_rescale, + withSubchart: !1, + withUpdateXDomain: !0, + withDimension: !1 + }), $$.config.subchart_onbrush.call($$.api, x.orgDomain()); + }, + + + /** + * Transform context + * @private + * @param {Boolean} indicates transition is enabled + * @param {Object} The return value of the generateTransitions method of Axis. + */ + transformContext: function transformContext(withTransition, transitions) { + var $$ = this, + subXAxis = void 0; + transitions && transitions.axisSubX ? subXAxis = transitions.axisSubX : (subXAxis = $$.context.select("." + _classes2.default.axisX), withTransition && (subXAxis = subXAxis.transition())), $$.context.attr("transform", $$.getTranslate("context")), subXAxis.attr("transform", $$.getTranslate("subx")); + }, + + + /** + * Get default extent + * @private + * @returns {Array} default extent + */ + getDefaultExtent: function getDefaultExtent() { + var $$ = this, + config = $$.config, + extent = (0, _util.isFunction)(config.axis_x_extent) ? config.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent; + + + return $$.isTimeSeries() && (extent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])]), extent; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(6), + _d3Selection = __webpack_require__(5), + _d3Drag = __webpack_require__(28), + _d3Zoom = __webpack_require__(52), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize zoom. + * @private + */ + initZoom: function initZoom() { + var $$ = this; + + $$.zoomScale = null, $$.generateZoom(); + }, + + + /** + * Bind zoom event + * @param {Boolean} bind Weather bind or unbound + * @private + */ + bindZoomEvent: function bindZoomEvent() { + var bind = !(arguments.length > 0 && arguments[0] !== undefined) || arguments[0], + $$ = this, + zoomEnabled = $$.config.zoom_enabled; + $$.redrawEventRect(), zoomEnabled && bind ? zoomEnabled === !0 || zoomEnabled.type === "wheel" ? $$.bindZoomOnEventRect() : zoomEnabled.type === "drag" && $$.bindZoomOnDrag() : bind === !1 && ($$.api.unzoom(), $$.main.select("." + _classes2.default.eventRects).on(".zoom", null).on(".drag", null)); + }, + + + /** + * Generate zoom + * @private + */ + generateZoom: function generateZoom() { + var $$ = this, + config = $$.config, + zoom = (0, _d3Zoom.zoom)().duration(0).on("start", $$.onZoomStart.bind($$)).on("zoom", $$.onZoom.bind($$)).on("end", $$.onZoomEnd.bind($$)); + + + // get zoom extent + zoom.orgScaleExtent = function () { + var extent = config.zoom_extent || [1, 10]; + + return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])]; + }, zoom.updateScaleExtent = function () { + var ratio = (0, _util.diffDomain)($$.x.orgDomain()) / (0, _util.diffDomain)($$.getZoomDomain()), + extent = this.orgScaleExtent(); + + + return this.scaleExtent([extent[0] * ratio, extent[1] * ratio]), this; + }, zoom.updateTransformScale = function (transform) { + // rescale from the original scale + var newScale = transform.rescaleX($$.subX.orgScale()), + domain = $$.trimXDomain(newScale.domain()), + rescale = config.zoom_rescale; + newScale.domain(domain, $$.orgXDomain), $$.zoomScale = $$.getCustomizedScale(newScale), $$.xAxis.scale($$.zoomScale), rescale && $$.x.domain($$.zoomScale.orgDomain()); + }, $$.zoom = zoom; + }, + + + /** + * 'start' event listener + * @private + */ + onZoomStart: function onZoomStart() { + var $$ = this, + event = _d3Selection.event.sourceEvent; + $$.zoom.altDomain = event.altKey ? $$.x.orgDomain() : null, $$.zoom.startEvent = event, (0, _util.callFn)($$.config.zoom_onzoomstart, $$.api, event); + }, + + + /** + * 'zoom' event listener + * @private + */ + onZoom: function onZoom() { + var $$ = this, + config = $$.config, + event = _d3Selection.event; + + + if (config.zoom_enabled) { + var isMousemove = event.sourceEvent.type === "mousemove", + transform = event.transform; + return $$.zoom.updateTransformScale(transform), $$.filterTargetsToShow($$.data.targets).length === 0 ? void 0 : isMousemove && $$.zoom.altDomain ? ($$.x.domain($$.zoom.altDomain), void transform.scale($$.zoomScale).updateScaleExtent()) : void ($$.isCategorized() && $$.x.orgDomain()[0] === $$.orgXDomain[0] && $$.x.domain([$$.orgXDomain[0] - 1e-10, $$.x.orgDomain()[1]]), $$.redraw({ + withTransition: !1, + withY: config.zoom_rescale, + withSubchart: !1, + withEventRect: !1, + withDimension: !1 + }), $$.cancelClick = isMousemove, (0, _util.callFn)(config.zoom_onzoom, $$.api, $$.x.orgDomain())); + } + }, + + + /** + * 'end' event listener + * @private + */ + onZoomEnd: function onZoomEnd() { + var $$ = this, + startEvent = $$.zoom.startEvent; + + + // if click, do nothing. otherwise, click interaction will be canceled. + event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY || ($$.redrawEventRect(), $$.updateZoom(), (0, _util.callFn)($$.config.zoom_onzoomend, $$.api, $$.x.orgDomain())); + }, + + + /** + * Get zoom domain + * @private + * @returns {Array} zoom domain + */ + getZoomDomain: function getZoomDomain() { + var $$ = this, + config = $$.config, + min = (0, _d3Array.min)([$$.orgXDomain[0], config.zoom_x_min]), + max = (0, _d3Array.max)([$$.orgXDomain[1], config.zoom_x_max]); + + + return [min, max]; + }, + + + /** + * Update zoom + * @private + */ + updateZoom: function updateZoom() { + var $$ = this; + + if ($$.zoomScale) { + var zoomDomain = $$.zoomScale.domain(), + xDomain = $$.x.domain(), + delta = .015; + // arbitrary value + + // check if the zoomed chart is fully shown, then reset scale when zoom is out as initial + (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta) && ($$.xAxis.scale($$.x), $$.zoomScale = null); + } + }, + + + /** + * Attach zoom event on + * @private + */ + bindZoomOnEventRect: function bindZoomOnEventRect() { + var $$ = this; + + $$.main.select("." + _classes2.default.eventRects).call($$.zoom).on("dblclick.zoom", null); + }, + + + /** + * Initialize the drag behaviour used for zooming. + * @private + */ + initZoomBehaviour: function initZoomBehaviour() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + start = 0, + end = 0, + zoomRect = null; + $$.zoomBehaviour = (0, _d3Drag.drag)().on("start", function () { + $$.setDragStatus(!0), zoomRect || (zoomRect = $$.main.append("rect").attr("clip-path", $$.clipPath).attr("class", _classes2.default.zoomBrush).attr("width", isRotated ? $$.width : 0).attr("height", isRotated ? 0 : $$.height)), start = (0, _d3Selection.mouse)(this)[0], end = start, zoomRect.attr("x", start).attr("width", 0); + }).on("drag", function () { + end = (0, _d3Selection.mouse)(this)[0], zoomRect.attr("x", Math.min(start, end)).attr("width", Math.abs(end - start)); + }).on("end", function () { + var _ref, + scale = $$.zoomScale || $$.x; + + $$.setDragStatus(!1), zoomRect.attr("x", 0).attr("width", 0), start > end && (_ref = [end, start], start = _ref[0], end = _ref[1], _ref), start !== end && $$.api.zoom([start, end].map(function (v) { + return scale.invert(v); + })); + }); + }, + + + /** + * Enable zooming by dragging using the zoombehaviour. + * @private + */ + bindZoomOnDrag: function bindZoomOnDrag() { + var $$ = this; + + $$.main.select("." + _classes2.default.eventRects).call($$.zoomBehaviour); + }, + setZoomResetButton: function setZoomResetButton() { + var $$ = this, + config = $$.config, + resetButton = config.zoom_resetButton; + resetButton && config.zoom_enabled.type === "drag" && ($$.zoom.resetBtn ? $$.zoom.resetBtn.style("display", null) : $$.zoom.resetBtn = $$.selectChart.append("div").classed(_classes2.default.button, !0).append("span").on("click", $$.api.unzoom.bind($$)).classed(_classes2.default.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom")); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 52 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__52__; + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Scale = __webpack_require__(10), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Set pattern's background color + * (it adds a element to simulate bg-color) + * @param {SVGPatternElement} pattern SVG pattern element + * @param {String} color Color string + * @param {String} id ID to be set + * @return {{id: string, node: SVGPatternElement}} + * @private + */ +var colorizePattern = function (pattern, color, id) { + var node = (0, _d3Selection.select)(pattern.cloneNode(!0)); + + return node.attr("id", id).insert("rect", ":first-child").attr("width", node.attr("width")).attr("height", node.attr("height")).style("fill", color), { + id: id, + node: node.node() + }; +}, + schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"]; + +// Replacement of d3.schemeCategory10. +// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic) +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Get color pattern from CSS file + * CSS should be defined as: background-image: url("#00c73c;#fa7171; ..."); + * @return {Array} + * @private + */ + getColorFromCss: function getColorFromCss() { + var body = document.body, + pattern = body["__colorPattern__"]; + + + if (!pattern) { + var span = document.createElement("span"); + span.className = _classes2.default.colorPattern, span.style.display = "none", body.appendChild(span); + + + var content = window.getComputedStyle(span).backgroundImage; + + span.parentNode.removeChild(span), content.indexOf(";") > -1 && (pattern = content.replace(/url[^#]*|["'()]|(\s|%20)/g, "").split(";").map(function (v) { + return v.trim().replace(/[\"'\s]/g, ""); + }).filter(Boolean), body["__colorPattern__"] = pattern); + } + + return pattern; + }, + generateColor: function generateColor() { + var $$ = this, + config = $$.config, + colors = config.data_colors, + callback = config.data_color, + ids = [], + pattern = (0, _util.notEmpty)(config.color_pattern) ? config.color_pattern : (0, _d3Scale.scaleOrdinal)($$.getColorFromCss() || schemeCategory10).range(), + originalColorPattern = pattern; + + + if ((0, _util.isFunction)(config.color_tiles)) { + var tiles = config.color_tiles(), + colorizedPatterns = pattern.map(function (p, index) { + var color = p.replace(/[#\(\)\s,]/g, ""), + id = $$.datetimeId + "-pattern-" + color + "-" + index; + + + return colorizePattern(tiles[index % tiles.length], p, id); + }); + + // Add background color to patterns + + pattern = colorizedPatterns.map(function (p) { + return "url(#" + p.id + ")"; + }), $$.patterns = colorizedPatterns; + } + + return function (d) { + var id = d.id || d.data && d.data.id || d, + isLine = $$.isTypeOf(id, ["line", "spline", "step"]) || !$$.config.data_types[id], + color = void 0; + + // if callback function is provided + + return (0, _util.isFunction)(colors[id]) ? color = colors[id](d) : colors[id] ? color = colors[id] : (ids.indexOf(id) < 0 && ids.push(id), color = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] : pattern[ids.indexOf(id) % pattern.length], colors[id] = color), (0, _util.isFunction)(callback) ? callback(color, d) : color; + }; + }, + generateLevelColor: function generateLevelColor() { + var $$ = this, + config = $$.config, + colors = config.color_pattern, + threshold = config.color_threshold, + asValue = threshold.unit === "value", + max = threshold.max || 100, + values = threshold.values && threshold.values.length ? threshold.values : []; + + + return (0, _util.notEmpty)(threshold) ? function (value) { + var color = colors[colors.length - 1]; + + for (var v, i = 0; i < values.length; i++) if (v = asValue ? value : value * 100 / max, v < values[i]) { + color = colors[i]; + + break; + } + + return color; + } : null; + } +}); + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var getFormat = function ($$, typeValue, v) { + var config = $$.config, + type = "axis_" + typeValue + "_tick_format", + format = config[type] ? config[type] : $$.defaultValueFormat; + + + return format(v); +}; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getYFormat: function getYFormat(forArc) { + var $$ = this, + formatForY = $$.yFormat, + formatForY2 = $$.y2Format; + + + return forArc && !$$.hasType("gauge") && (formatForY = $$.defaultArcValueFormat, formatForY2 = $$.defaultArcValueFormat), function (v, ratio, id) { + var format = $$.axis.getId(id) === "y2" ? formatForY2 : formatForY; + + return format.call($$, v, ratio); + }; + }, + yFormat: function yFormat(v) { + return getFormat(this, "y", v); + }, + y2Format: function y2Format(v) { + return getFormat(this, "y2", v); + }, + defaultValueFormat: function defaultValueFormat(v) { + return (0, _util.isValue)(v) ? +v : ""; + }, + defaultArcValueFormat: function defaultArcValueFormat(v, ratio) { + return (ratio * 100).toFixed(1) + "%"; + }, + dataLabelFormat: function dataLabelFormat(targetId) { + var $$ = this, + dataLabels = $$.config.data_labels, + defaultFormat = function (v) { + return (0, _util.isValue)(v) ? +v : ""; + }, + format = defaultFormat; + + // find format according to axis id + + + return (0, _util.isFunction)(dataLabels.format) ? format = dataLabels.format : (0, _util.isObjectType)(dataLabels.format) && (dataLabels.format[targetId] ? format = dataLabels.format[targetId] === !0 ? defaultFormat : dataLabels.format[targetId] : format = function () { + return ""; + }), format; + } +}); + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + hasCaches: function hasCaches(key) { + var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1]; + + if (isDataType) { + for (var i = 0, len = key.length; i < len; i++) if (!(key[i] in this.cache)) return !1; + + return !0; + } + + return key in this.cache; + }, + addCache: function addCache(key, value) { + var isDataType = !!(arguments.length > 2 && arguments[2] !== undefined) && arguments[2]; + this.cache[key] = isDataType ? this.cloneTarget(value) : value; + }, + getCache: function getCache(key) { + var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1]; + + if (isDataType) { + var targets = []; + + for (var id, i = 0; id = key[i]; i++) id in this.cache && targets.push(this.cloneTarget(this.cache[id])); + + return targets; + } + + return this.cache[key] || null; + }, + + + /** + * reset cached data + * @param {Boolean} all true: reset all data, false: reset only '$' prefixed key data + * @private + */ + resetCache: function resetCache(all) { + var $$ = this; + + for (var x in $$.cache) (all || /^\$/.test(x)) && ($$.cache[x] = null); + } +}); + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + CLASS: _classes2.default, + + generateClass: function generateClass(prefix, targetId) { + return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId)); + }, + classText: function classText(d) { + return this.generateClass(_classes2.default.text, d.index); + }, + classTexts: function classTexts(d) { + return this.generateClass(_classes2.default.texts, d.id); + }, + classShape: function classShape(d) { + return this.generateClass(_classes2.default.shape, d.index); + }, + classShapes: function classShapes(d) { + return this.generateClass(_classes2.default.shapes, d.id); + }, + generateExtraLineClass: function generateExtraLineClass() { + var $$ = this, + classes = $$.config.line_classes || [], + ids = []; + + + return function (d) { + var id = d.id || d.data && d.data.id || d; + + return ids.indexOf(id) < 0 && ids.push(id), classes[ids.indexOf(id) % classes.length]; + }; + }, + classLine: function classLine(d) { + return this.classShape(d) + this.generateClass(_classes2.default.line, d.id); + }, + classLines: function classLines(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.lines, d.id); + }, + classCircle: function classCircle(d) { + return this.classShape(d) + this.generateClass(_classes2.default.circle, d.index); + }, + classCircles: function classCircles(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.circles, d.id); + }, + classBar: function classBar(d) { + return this.classShape(d) + this.generateClass(_classes2.default.bar, d.index); + }, + classBars: function classBars(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.bars, d.id); + }, + classArc: function classArc(d) { + return this.classShape(d.data) + this.generateClass(_classes2.default.arc, d.data.id); + }, + classArcs: function classArcs(d) { + return this.classShapes(d.data) + this.generateClass(_classes2.default.arcs, d.data.id); + }, + classArea: function classArea(d) { + return this.classShape(d) + this.generateClass(_classes2.default.area, d.id); + }, + classAreas: function classAreas(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.areas, d.id); + }, + classRegion: function classRegion(d, i) { + return this.generateClass(_classes2.default.region, i) + " " + ("class" in d ? d.class : ""); + }, + classEvent: function classEvent(d) { + return this.generateClass(_classes2.default.eventRect, d.index); + }, + classTarget: function classTarget(id) { + var additionalClassSuffix = this.config.data_classes[id], + additionalClass = ""; + + + return additionalClassSuffix && (additionalClass = " " + _classes2.default.target + "-" + additionalClassSuffix), this.generateClass(_classes2.default.target, id) + additionalClass; + }, + classFocus: function classFocus(d) { + return this.classFocused(d) + this.classDefocused(d); + }, + classFocused: function classFocused(d) { + return " " + (this.focusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.focused : ""); + }, + classDefocused: function classDefocused(d) { + return " " + (this.defocusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.defocused : ""); + }, + classChartText: function classChartText(d) { + return _classes2.default.chartText + this.classTarget(d.id); + }, + classChartLine: function classChartLine(d) { + return _classes2.default.chartLine + this.classTarget(d.id); + }, + classChartBar: function classChartBar(d) { + return _classes2.default.chartBar + this.classTarget(d.id); + }, + classChartArc: function classChartArc(d) { + return _classes2.default.chartArc + this.classTarget(d.data.id); + }, + classChartRadar: function classChartRadar(d) { + return _classes2.default.chartRadar + this.classTarget(d.id); + }, + getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) { + return targetId || targetId === 0 ? ("-" + targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-") : ""; + }, + selectorTarget: function selectorTarget(id, prefix) { + return (prefix || "") + "." + (_classes2.default.target + this.getTargetSelectorSuffix(id)); + }, + selectorTargets: function selectorTargets(idsValue, prefix) { + var $$ = this, + ids = idsValue || []; + + + return ids.length ? ids.map(function (id) { + return $$.selectorTarget(id, prefix); + }) : null; + }, + selectorLegend: function selectorLegend(id) { + return "." + (_classes2.default.legendItem + this.getTargetSelectorSuffix(id)); + }, + selectorLegends: function selectorLegends(ids) { + var $$ = this; + + return ids && ids.length ? ids.map(function (id) { + return $$.selectorLegend(id); + }) : null; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * This API highlights specified targets and fade out the others.

    + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted. + * @method focus + * @instance + * @memberOf Chart + * @param {String|Array} targetIdsValue Target ids to be highlighted. + * @example + * // data1 will be highlighted and the others will be faded out + * chart.focus("data1"); + * + * // data1 and data2 will be highlighted and the others will be faded out + * chart.focus(["data1", "data2"]); + * + * // all targets will be highlighted + * chart.focus(); + */ + focus: function focus(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))); + this.revert(), this.defocus(), candidates.classed(_classes2.default.focused, !0).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.expandArc(targetIds), $$.toggleFocusLegend(targetIds, !0), $$.focusedTargetIds = targetIds, $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + + + /** + * This API fades out specified targets and reverts the others.

    + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out. + * @method defocus + * @instance + * @memberOf Chart + * @param {String|Array} Target ids to be faded out. + * @example + * // data1 will be faded out and the others will be reverted. + * chart.defocus("data1"); + * + * // data1 and data2 will be faded out and the others will be reverted. + * chart.defocus(["data1", "data2"]); + * + * // all targets will be faded out. + * chart.defocus(); + */ + defocus: function defocus(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))); + candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !0), $$.hasArcType() && $$.unexpandArc(targetIds), $$.toggleFocusLegend(targetIds, !1), $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }), $$.defocusedTargetIds = targetIds; + }, + + + /** + * This API reverts specified targets.

    + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted. + * @method revert + * @instance + * @memberOf Chart + * @param {String|Array} Target ids to be reverted + * @example + * // data1 will be reverted. + * chart.revert("data1"); + * + * // data1 and data2 will be reverted. + * chart.revert(["data1", "data2"]); + * + * // all targets will be reverted. + * chart.revert(); + */ + revert: function revert(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); + // should be for all targets + + candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.unexpandArc(targetIds), $$.config.legend_show && ($$.showLegend(targetIds.filter($$.isLegendToShow.bind($$))), $$.legend.selectAll($$.selectorLegends(targetIds)).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused); + }).classed(_classes2.default.legendItemFocused, !1)), $$.focusedTargetIds = [], $$.defocusedTargetIds = []; + } +}); + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Show data series on chart + * @method show + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:
    + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // show 'data1' + * chart.show("data1"); + * + * // show 'data1' and 'data3' + * chart.show(["data1", "data3"]); + */ + show: function show(targetIdsValue) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue); + $$.removeHiddenTargetIds(targetIds); + + var targets = $$.svg.selectAll($$.selectorTargets(targetIds)); + + targets.transition().style("opacity", "1", "important").call($$.endall, function () { + targets.style("opacity", null).style("opacity", "1"); + }), options.withLegend && $$.showLegend(targetIds), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }); + }, + + + /** + * Hide data series from chart + * @method hide + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:
    + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // hide 'data1' + * chart.hide("data1"); + * + * // hide 'data1' and 'data3' + * chart.hide(["data1", "data3"]); + */ + hide: function hide(targetIdsValue) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue); + $$.addHiddenTargetIds(targetIds); + + var targets = $$.svg.selectAll($$.selectorTargets(targetIds)); + + targets.transition().style("opacity", "0", "important").call($$.endall, function () { + targets.style("opacity", null).style("opacity", "0"); + }), options.withLegend && $$.hideLegend(targetIds), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }); + }, + + + /** + * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa. + * @method toggle + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:
    + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // toggle 'data1' + * chart.toggle("data1"); + * + * // toggle 'data1' and 'data3' + * chart.toggle(["data1", "data3"]); + */ + toggle: function toggle(targetIds) { + var _this = this, + options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targets = { show: [], hide: [] }; + + // sort show & hide target ids + $$.mapToTargetIds(targetIds).forEach(function (id) { + return targets[$$.isTargetToShow(id) ? "hide" : "show"].push(id); + }), targets.show.length && this.show(targets.show, options), targets.hide.length && setTimeout(function () { + return _this.hide(targets.hide, options); + }, 0); + } +}); + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(6), + _d3Zoom = __webpack_require__(52), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Zoom by giving x domain. + * @method zoom + * @instance + * @memberOf Chart + * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned. + * @return {Array} domain value in array + * @example + * // Zoom to specified domain + * chart.zoom([10, 20]); + * + * // Get the current zoomed domain + * chart.zoom(); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var zoom = function (domainValue) { + var $$ = this.internal, + domain = domainValue, + resultDomain = void 0; + + + if ($$.config.zoom_enabled && domain) { + var isTimeSeries = $$.isTimeSeries(); + + if (isTimeSeries && (domain = domain.map(function (x) { + return $$.parseDate(x); + })), $$.config.subchart_show) { + var xScale = $$.zoomScale || $$.x; + + $$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]), resultDomain = domain; + } else { + var orgDomain = $$.subX.domain(), + k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]), + gap = $$.isCategorized() ? $$.xAxis.tickOffset() : 0, + tx = isTimeSeries ? 0 - k * $$.x(domain[0].getTime()) : domain[0] - k * ($$.x(domain[0]) - gap); + $$.zoom.updateTransformScale(_d3Zoom.zoomIdentity.translate(tx, 0).scale(k)), resultDomain = $$.zoomScale.domain(); + } + + $$.redraw({ + withTransition: !0, + withY: $$.config.zoom_rescale, + withDimension: !1 + }), $$.setZoomResetButton(), (0, _util.callFn)($$.config.zoom_onzoom, this, $$.x.orgDomain()); + } else resultDomain = $$.zoomScale ? $$.zoomScale.domain() : $$.x.orgDomain(); + + return resultDomain; +}; + +(0, _util.extend)(zoom, { + /** + * Enable and disable zooming. + * @method zoom․enable + * @instance + * @memberOf Chart + * @param {String|Boolean} enabled Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.
    When set to false, the current zooming status will be reset. + * @example + * // Enable zooming using the mouse wheel + * chart.zoom.enable(true); + * // Or + * chart.zoom.enable("wheel"); + * + * // Enable zooming by dragging + * chart.zoom.enable("drag"); + * + * // Disable zooming + * chart.zoom.enable(false); + */ + enable: function enable() { + var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "wheel", + $$ = this.internal, + config = $$.config, + enableType = enabled; + enabled && (enableType = (0, _util.isString)(enabled) && /^(drag|wheel)$/.test(enabled) ? { type: enabled } : enabled), config.zoom_enabled = enableType, $$.zoom ? enabled === !1 && $$.bindZoomEvent(!1) : ($$.initZoom(), $$.initZoomBehaviour(), $$.bindZoomEvent()), $$.updateAndRedraw(); + }, + + /** + * Set or get x Axis maximum zoom range value + * @method zoom․max + * @instance + * @memberOf Chart + * @param {Number} [max] maximum value to set for zoom + * @return {Number} zoom max value + * @example + * // Set maximum range value + * chart.zoom.max(20); + */ + max: function max(_max) { + var $$ = this.internal, + config = $$.config; + + + return (_max === 0 || _max) && (config.zoom_x_max = (0, _d3Array.max)([$$.orgXDomain[1], _max])), config.zoom_x_max; + }, + + /** + * Set or get x Axis minimum zoom range value + * @method zoom․min + * @instance + * @memberOf Chart + * @param {Number} [min] minimum value tp set for zoom + * @return {Number} zoom min value + * @example + * // Set minimum range value + * chart.zoom.min(-1); + */ + min: function min(_min) { + var $$ = this.internal, + config = $$.config; + + + return (_min === 0 || _min) && (config.zoom_x_min = (0, _d3Array.min)([$$.orgXDomain[0], _min])), config.zoom_x_min; + }, + + /** + * Set zoom range + * @method zoom․range + * @instance + * @memberOf Chart + * @param {Object} [range] + * @return {Object} zoom range value + * { + * min: 0, + * max: 100 + * } + * @example + * chart.zoom.range({ + * min: 10, + * max: 100 + * }); + */ + range: function range(_range) { + var zoom = this.zoom; + + return (0, _util.isObject)(_range) && ((0, _util.isDefined)(_range.min) && zoom.min(_range.min), (0, _util.isDefined)(_range.max) && zoom.max(_range.max)), { + min: zoom.min(), + max: zoom.max() + }; + } +}), (0, _util.extend)(_Chart2.default.prototype, { + zoom: zoom, + + /** + * Unzoom zoomed area + * @method unzoom + * @instance + * @memberOf Chart + * @example + * chart.unzoom(); + */ + unzoom: function unzoom() { + var $$ = this.internal, + config = $$.config; + $$.zoomScale && (config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(_d3Zoom.zoomIdentity), $$.updateZoom(), $$.zoom.resetBtn && $$.zoom.resetBtn.style("display", "none"), $$.redraw({ + withTransition: !0, + withY: config.zoom_rescale + })); + } +}); + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Load data to the chart.

    + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. + * - Note: + * unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.
    + * done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering + * @method load + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:
    + * + * | Key | Description | + * | --- | --- | + * | - url
    - json
    - rows
    - columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added | + * | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. | + * | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. | + * | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. | + * | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. | + * | - type
    - types | The type of targets will be updated. type must be String and types must be Object. | + * | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. | + * | done | The specified function will be called after data loaded.| + * + * @example + * // Load data1 and unload data2 and data3 + * chart.load({ + * columns: [ + * ["data1", 100, 200, 150, ...], + * ... + * ], + * unload: ["data2", "data3"], + * url: "...", + * done: function() { ... } + * }); + */ + load: function load(args) { + var $$ = this.internal, + config = $$.config; + + // update xs if specified + + // use cache if exists + return args.xs && $$.addXs(args.xs), "names" in args && this.data.names(args.names), "classes" in args && Object.keys(args.classes).forEach(function (id) { + config.data_classes[id] = args.classes[id]; + }), "categories" in args && $$.isCategorized() && (config.axis_x_categories = args.categories), "axes" in args && Object.keys(args.axes).forEach(function (id) { + config.data_axes[id] = args.axes[id]; + }), "colors" in args && Object.keys(args.colors).forEach(function (id) { + config.data_colors[id] = args.colors[id]; + }), "cacheIds" in args && $$.hasCaches(args.cacheIds, !0) ? void $$.load($$.getCache(args.cacheIds, !0), args.done) : void ("unload" in args && args.unload !== !1 ? $$.unload($$.mapToTargetIds(args.unload === !0 ? null : args.unload), function () { + return $$.loadFromArgs(args); + }) : $$.loadFromArgs(args)); + + // unload if needed + }, + + + /** + * Unload data to the chart.

    + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. + * - Note: + * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.
    + * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering. + * @method unload + * @instance + * @memberOf Chart + * @param {Object} args + * - If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded. + * - If done given, the specified function will be called after data loded. + * @example + * // Unload data2 and data3 + * chart.unload({ + * ids: ["data2", "data3"] + * }); + */ + unload: function unload(argsValue) { + var $$ = this.internal, + args = argsValue || {}; + (0, _util.isArray)(args) ? args = { ids: args } : (0, _util.isString)(args) && (args = { ids: [args] }), $$.unload($$.mapToTargetIds(args.ids), function () { + $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }), args.done && args.done(); + }); + } +}); + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _d3Ease = __webpack_require__(62), + _d3Transition = __webpack_require__(7), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Flow data to the chart.

    + * By this API, you can append new data points to the chart. + * @method flow + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:
    + * + * | Key | Type | Description | + * | --- | --- | --- | + * | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) | + * | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) | + * | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) | + * | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points | + * | length | Number | The lower x edge will move by the number of this argument | + * | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default | + * | done | Function | The specified function will be called when flow ends | + * + * - **NOTE:** + * If json, rows and columns given, the data will be loaded.
    + * If data that has the same target id is given, the chart will be appended.
    + * Otherwise, new target will be added. One of these is required when calling.
    + * If json specified, keys is required as well as data.json. + * @example + * // 2 data points will be apprended to the tail and popped from the head. + * // After that, 4 data points will be appended and no data points will be poppoed. + * chart.flow({ + * columns: [ + * ["x", "2018-01-11", "2018-01-21"], + * ["data1", 500, 200], + * ["data2", 100, 300], + * ["data3", 200, 120] + * ], + * to: "2013-01-11", + * done: function () { + * chart.flow({ + * columns: [ + * ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"], + * ["data1", 200, 300, 100, 250], + * ["data2", 100, 90, 40, 120], + * ["data3", 100, 100, 300, 500] + * ], + * length: 2, + * duration: 1500 + * }); + * } + * }); + */ + flow: function flow(args) { + var $$ = this.internal, + notfoundIds = [], + orgDataCount = $$.getMaxDataCount(), + data = void 0, + domain = void 0, + length = 0, + tail = 0, + diff = void 0, + to = void 0; + + + if (args.json) data = $$.convertJsonToData(args.json, args.keys);else if (args.rows) data = $$.convertRowsToData(args.rows);else if (args.columns) data = $$.convertColumnsToData(args.columns);else return; + + var targets = $$.convertDataToTargets(data, !0); + + // Update/Add data + $$.data.targets.forEach(function (t) { + var found = !1; + + for (var i = 0; i < targets.length; i++) if (t.id === targets[i].id) { + found = !0, t.values[t.values.length - 1] && (tail = t.values[t.values.length - 1].index + 1), length = targets[i].values.length; + + + for (var _j = 0; _j < length; _j++) targets[i].values[_j].index = tail + _j, $$.isTimeSeries() || (targets[i].values[_j].x = tail + _j); + + t.values = t.values.concat(targets[i].values), targets.splice(i, 1); + + break; + } + + found || notfoundIds.push(t.id); + }), $$.data.targets.forEach(function (t) { + for (var i = 0; i < notfoundIds.length; i++) if (t.id === notfoundIds[i]) { + tail = t.values[t.values.length - 1].index + 1; + + + for (var _j2 = 0; _j2 < length; _j2++) t.values.push({ + id: t.id, + index: tail + _j2, + x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + _j2) : tail + _j2, + value: null + }); + } + }), $$.data.targets.length && targets.forEach(function (t) { + var missing = []; + + for (var i = $$.data.targets[0].values[0].index; i < tail; i++) missing.push({ + id: t.id, + index: i, + x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i, + value: null + }); + + t.values.forEach(function (v) { + v.index += tail, $$.isTimeSeries() || (v.x += tail); + }), t.values = missing.concat(t.values); + }), $$.data.targets = $$.data.targets.concat(targets); + // add remained + + // check data count because behavior needs to change when it"s only one + // const dataCount = $$.getMaxDataCount(); + var baseTarget = $$.data.targets[0], + baseValue = baseTarget.values[0]; + + + // Update length to flow if needed + (0, _util.isDefined)(args.to) ? (length = 0, to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to, baseTarget.values.forEach(function (v) { + v.x < to && length++; + })) : (0, _util.isDefined)(args.length) && (length = args.length), orgDataCount ? orgDataCount === 1 && $$.isTimeSeries() && (diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2, domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)], $$.updateXDomain(null, !0, !0, !1, domain)) : (diff = $$.isTimeSeries() ? baseTarget.values.length > 1 ? baseTarget.values[baseTarget.values.length - 1].x - baseValue.x : baseValue.x - $$.getXDomain($$.data.targets)[0] : 1, domain = [baseValue.x - diff, baseValue.x], $$.updateXDomain(null, !0, !0, !1, domain)), $$.updateTargets($$.data.targets), $$.redraw({ + flow: { + index: baseValue.index, + length: length, + duration: (0, _util.isValue)(args.duration) ? args.duration : $$.config.transition_duration, + done: args.done, + orgDataCount: orgDataCount + }, + withLegend: !0, + withTransition: orgDataCount > 1, + withTrimXDomain: !1, + withUpdateXAxis: !0 + }); + } +}), (0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Generate flow + * @memberOf ChartInternal + * @private + * @param {Object} args + * @return {Function} + */ + generateFlow: function generateFlow(args) { + var $$ = this, + config = $$.config; + + + return function () { + var targets = args.targets, + flow = args.flow, + drawBar = args.drawBar, + drawLine = args.drawLine, + drawArea = args.drawArea, + cx = args.cx, + cy = args.cy, + xv = args.xv, + xForText = args.xForText, + yForText = args.yForText, + duration = args.duration, + translateX = void 0, + scaleX = 1, + flowIndex = flow.index, + flowLength = flow.length, + flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex), + flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength), + orgDomain = $$.x.domain(), + durationForFlow = flow.duration || duration, + done = flow.done || function () {}, + wait = $$.generateWait(), + xgrid = $$.xgrid || (0, _d3Selection.selectAll)([]), + xgridLines = $$.xgridLines || (0, _d3Selection.selectAll)([]), + mainRegion = $$.mainRegion || (0, _d3Selection.selectAll)([]), + mainText = $$.mainText || (0, _d3Selection.selectAll)([]), + mainBar = $$.mainBar || (0, _d3Selection.selectAll)([]), + mainLine = $$.mainLine || (0, _d3Selection.selectAll)([]), + mainArea = $$.mainArea || (0, _d3Selection.selectAll)([]), + mainCircle = $$.mainCircle || (0, _d3Selection.selectAll)([]); + + // set flag + $$.flowing = !0, $$.data.targets.forEach(function (d) { + d.values.splice(0, flowLength); + }); + + + // update x domain to generate axis elements for flow + var domain = $$.updateXDomain(targets, !0, !0); + + // update elements related to x scale + $$.updateXGrid && $$.updateXGrid(!0), flow.orgDataCount ? flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x) ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : $$.isTimeSeries() ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : translateX = $$.x(flowStart.x) - $$.x(flowEnd.x) : $$.data.targets[0].values.length === 1 ? $$.isTimeSeries() ? (flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0), flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1), translateX = $$.x(flowStart.x) - $$.x(flowEnd.x)) : translateX = (0, _util.diffDomain)(domain) / 2 : translateX = $$.x(orgDomain[0]) - $$.x(domain[0]), scaleX = (0, _util.diffDomain)(orgDomain) / (0, _util.diffDomain)(domain); + + var transform = "translate(" + translateX + ",0) scale(" + scaleX + ",1)"; + + $$.hideXGridFocus(); + + + var gt = (0, _d3Transition.transition)().ease(_d3Ease.easeLinear).duration(durationForFlow); + + wait.add([$$.axes.x.transition(gt).call($$.xAxis.setTransition(gt)), mainBar.transition(gt).attr("transform", transform), mainLine.transition(gt).attr("transform", transform), mainArea.transition(gt).attr("transform", transform), mainCircle.transition(gt).attr("transform", transform), mainText.transition(gt).attr("transform", transform), mainRegion.filter($$.isRegionOnX).transition(gt).attr("transform", transform), xgrid.transition(gt).attr("transform", transform), xgridLines.transition(gt).attr("transform", transform)]), gt.call(wait, function () { + var shapes = [], + texts = [], + eventRects = []; + + + // remove flowed elements + if (flowLength) { + for (var index, i = 0; i < flowLength; i++) index = flowIndex + i, shapes.push("." + _classes2.default.shape + "-" + index), texts.push("." + _classes2.default.text + "-" + index), eventRects.push("." + _classes2.default.eventRect + "-" + index); + + $$.svg.selectAll("." + _classes2.default.shapes).selectAll(shapes).remove(), $$.svg.selectAll("." + _classes2.default.texts).selectAll(texts).remove(), $$.svg.selectAll("." + _classes2.default.eventRects).selectAll(eventRects).remove(), $$.svg.select("." + _classes2.default.xgrid).remove(); + } + + // draw again for removing flowed elements and reverting attr + + + if (xgrid.size() && xgrid.attr("transform", null).attr($$.xgridAttr), xgridLines.attr("transform", null), xgridLines.select("line").attr("x1", config.axis_rotated ? 0 : xv).attr("x2", config.axis_rotated ? $$.width : xv), xgridLines.select("text").attr("x", config.axis_rotated ? $$.width : 0).attr("y", xv), mainBar.attr("transform", null).attr("d", drawBar), mainLine.attr("transform", null).attr("d", drawLine), mainArea.attr("transform", null).attr("d", drawArea), mainCircle.attr("transform", null), $$.isCirclePoint()) mainCircle.attr("cx", cx).attr("cy", cy);else { + var xFunc = function (d) { + return cx(d) - config.point_r; + }, + yFunc = function (d) { + return cy(d) - config.point_r; + }; + + mainCircle.attr("x", xFunc).attr("y", yFunc).attr("cx", cx) // when pattern is used, it possibly contain 'circle' also. + .attr("cy", cy); + } + + mainText.attr("transform", null).attr("x", xForText).attr("y", yForText).style("fill-opacity", $$.opacityForText.bind($$)), mainRegion.attr("transform", null), mainRegion.select("rect").filter($$.isRegionOnX).attr("x", $$.regionX.bind($$)).attr("width", $$.regionWidth.bind($$)), config.interaction_enabled && $$.redrawEventRect(), done(), $$.flowing = !1; + }); + }; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 62 */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__62__; + +/***/ }), +/* 63 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get selected data points.

    + * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true. + * @method selected + * @instance + * @memberOf Chart + * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned. + * @return {Array} dataPoint Array of the data points.
    ex.) `[{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]` + * @example + * // all selected data points will be returned. + * chart.selected(); + * // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ] + * + * // all selected data points of data1 will be returned. + * chart.selected("data1"); + */ + selected: function selected(targetId) { + var $$ = this.internal, + dataPoint = []; + + + return $$.main.selectAll("." + (_classes2.default.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + _classes2.default.shape).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.SELECTED); + }).each(function (d) { + return dataPoint.push(d); + }), dataPoint; + }, + + + /** + * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)` + * @method select + * @instance + * @memberOf Chart + * @param {String|Array} [ids] id value to get selected. + * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points. + * @param {Boolean} [resetOther] Unselect already selected. + * @example + * // select all data points + * chart.select(); + * + * // select all from 'data2' + * chart.select("data2"); + * + * // select all from 'data1' and 'data2' + * chart.select(["data1", "data2"]); + * + * // select from 'data1', indices 2 and unselect others selected + * chart.select("data1", [2], true); + * + * // select from 'data1', indices 0, 3 and 5 + * chart.select("data1", [0, 3, 5]); + */ + select: function select(ids, indices, resetOther) { + var $$ = this.internal, + config = $$.config; + config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + id = d.data ? d.data.id : d.id, + toggle = $$.getToggle(this, d).bind($$), + isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0, + isTargetIndex = !indices || indices.indexOf(i) >= 0, + isSelected = shape.classed(_classes2.default.SELECTED); + + + // line/area selection not supported yet + shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || (isTargetId && isTargetIndex ? config.data_selection_isselectable(d) && !isSelected && toggle(!0, shape.classed(_classes2.default.SELECTED, !0), d, i) : (0, _util.isDefined)(resetOther) && resetOther && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i)); + }); + }, + + + /** + * Set data points to be un-selected. + * @method unselect + * @instance + * @memberOf Chart + * @param {String|Array} [ids] id value to be unselected. + * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points. + * @example + * // unselect all data points + * chart.unselect(); + * + * // unselect all from 'data1' + * chart.unselect("data1"); + * + * // unselect from 'data1', indices 2 + * chart.unselect("data1", [2]); + */ + unselect: function unselect(ids, indices) { + var $$ = this.internal, + config = $$.config; + config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + id = d.data ? d.data.id : d.id, + toggle = $$.getToggle(this, d).bind($$), + isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0, + isTargetIndex = !indices || indices.indexOf(i) >= 0, + isSelected = shape.classed(_classes2.default.SELECTED); + + + // line/area selection not supported yet + shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i); + }); + } +}); + +/***/ }), +/* 64 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Change the type of the chart. + * @method transform + * @instance + * @memberOf Chart + * @param {String} type Specify the type to be transformed. The types listed in data.type can be used. + * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate. + * @example + * // all targets will be bar chart. + * chart.transform("bar"); + * + * // only data1 will be bar chart. + * chart.transform("bar", "data1"); + * + * // only data1 and data2 will be bar chart. + * chart.transform("bar", ["data1", "data2"]); + */ + transform: function transform(type, targetIds) { + var $$ = this.internal, + options = ["pie", "donut"].indexOf(type) >= 0 ? { withTransform: !0 } : null; + $$.transformTo(targetIds, type, options); + } +}), (0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Change the type of the chart. + * @private + * @param {String|Array} targetIds + * @param {String} type + * @param {Object} optionsForRedraw + */ + transformTo: function transformTo(targetIds, type, optionsForRedraw) { + var $$ = this, + withTransitionForAxis = !$$.hasArcType(), + options = optionsForRedraw || { withTransitionForAxis: withTransitionForAxis }; + options.withTransitionForTransform = !1, $$.transiting = !1, $$.setTargetType(targetIds, type), $$.updateTargets($$.data.targets), $$.updateAndRedraw(options); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 65 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Update groups for the targets. + * @method groups + * @instance + * @memberOf Chart + * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped. + * @example + * // data1 and data2 will be a new group. + * chart.groups([ + * ["data1", "data2"] + * ]); + */ + groups: function groups(_groups) { + var $$ = this.internal, + config = $$.config; + return (0, _util.isUndefined)(_groups) ? config.data_groups : (config.data_groups = _groups, $$.redraw(), config.data_groups); + } +}); + +/***/ }), +/* 66 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Update x grid lines. + * @method xgrids + * @instance + * @memberOf Chart + * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines. + * @example + * // Show 2 x grid lines + * chart.xgrids([ + * {value: 1, text: "Label 1"}, + * {value: 4, text: "Label 4"} + * ]); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var xgrids = function (grids) { + var $$ = this.internal, + config = $$.config; + return grids ? (config.grid_x_lines = grids, $$.redrawWithoutRescale(), config.grid_x_lines) : config.grid_x_lines; +}; + +(0, _util.extend)(xgrids, { + /** + * Add x grid lines.
    + * This API adds new x grid lines instead of replacing like xgrids. + * @method xgrids․add + * @instance + * @memberOf Chart + * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added. + * @example + * // Add a new x grid line + * chart.xgrids.add( + * {value: 4, text: "Label 4"} + * ); + * + * // Add new x grid lines + * chart.xgrids.add([ + * {value: 2, text: "Label 2"}, + * {value: 4, text: "Label 4"} + * ]); + */ + add: function add(grids) { + return this.xgrids(this.internal.config.grid_x_lines.concat(grids || [])); + }, + + /** + * Remove x grid lines.
    + * This API removes x grid lines. + * @method xgrids․remove + * @instance + * @memberOf Chart + * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed. + * @example + * // x grid line on x = 2 will be removed + * chart.xgrids.remove({value: 2}); + * + * // x grid lines that have 'grid-A' will be removed + * chart.xgrids.remove({ + * class: "grid-A" + * }); + * + * // all of x grid lines will be removed + * chart.xgrids.remove(); + */ + remove: function remove(params) { + this.internal.removeGridLines(params, !0); + } +}); + + +/** + * Update y grid lines. + * @method ygrids + * @instance + * @memberOf Chart + * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines. + * @example + * // Show 2 y grid lines + * chart.ygrids([ + * {value: 100, text: "Label 1"}, + * {value: 400, text: "Label 4"} + * ]); + */ +var ygrids = function (grids) { + var $$ = this.internal, + config = $$.config; + return grids ? (config.grid_y_lines = grids, $$.redrawWithoutRescale(), config.grid_y_lines) : config.grid_y_lines; +}; + +(0, _util.extend)(ygrids, { + /** + * Add y grid lines.
    + * This API adds new y grid lines instead of replacing like ygrids. + * @method ygrids․add + * @instance + * @memberOf Chart + * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added. + * @example + * // Add a new x grid line + * chart.ygrids.add( + * {value: 400, text: "Label 4"} + * ); + * + * // Add new x grid lines + * chart.ygrids.add([ + * {value: 200, text: "Label 2"}, + * {value: 400, text: "Label 4"} + * ]); + */ + add: function add(grids) { + return this.ygrids(this.internal.config.grid_y_lines.concat(grids || [])); + }, + + /** + * Remove y grid lines.
    + * This API removes x grid lines. + * @method ygrids․remove + * @instance + * @memberOf Chart + * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed. + * @example + * // y grid line on y = 200 will be removed + * chart.ygrids.remove({value: 200}); + * + * // y grid lines that have 'grid-A' will be removed + * chart.ygrids.remove({ + * class: "grid-A" + * }); + * + * // all of y grid lines will be removed + * chart.ygrids.remove(); + */ + remove: function remove(params) { + this.internal.removeGridLines(params, !1); + } +}), (0, _util.extend)(_Chart2.default.prototype, { + xgrids: xgrids, + ygrids: ygrids +}); + +/***/ }), +/* 67 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _classes = __webpack_require__(14), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Update regions. + * @method regions + * @instance + * @memberOf Chart + * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions. + * @return {Array} regions + * @example + * // Show 2 regions + * chart.regions([ + * {axis: "x", start: 5, class: "regionX"}, + * {axis: "y", end: 50, class: "regionY"} + * ]); + */ +var regions = function (_regions) { + var $$ = this.internal, + config = $$.config; + return _regions ? (config.regions = _regions, $$.redrawWithoutRescale(), config.regions) : config.regions; +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(regions, { + /** + * Add new region.

    + * This API adds new region instead of replacing like regions. + * @method regions․add + * @instance + * @memberOf Chart + * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added. + * @return {Array} regions + * @example + * // Add a new region + * chart.regions.add( + * {axis: "x", start: 5, class: "regionX"} + * ); + * + * // Add new regions + * chart.regions.add([ + * {axis: "x", start: 5, class: "regionX"}, + * {axis: "y", end: 50, class: "regionY"} + *]); + */ + add: function add(regions) { + var $$ = this.internal, + config = $$.config; + return regions ? (config.regions = config.regions.concat(regions), $$.redrawWithoutRescale(), config.regions) : config.regions; + }, + + /** + * Remove regions.

    + * This API removes regions. + * @method regions․remove + * @instance + * @memberOf Chart + * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed. + * @return {Array} regions + * @example + * // regions that have 'region-A' or 'region-B' will be removed. + * chart.regions.remove({ + * classes: [ + * "region-A", "region-B" + * ] + * }); + * + * // all of regions will be removed. + * chart.regions.remove(); + */ + remove: function remove(optionsValue) { + var $$ = this.internal, + config = $$.config, + options = optionsValue || {}, + duration = $$.getOption(options, "duration", config.transition_duration), + classes = $$.getOption(options, "classes", [_classes2.default.region]), + regions = $$.main.select("." + _classes2.default.regions).selectAll(classes.map(function (c) { + return "." + c; + })); + + + return (duration ? regions.transition().duration(duration) : regions).style("opacity", "0").remove(), config.regions = config.regions.filter(function (region) { + var found = !1; + + return !region.class || (region.class.split(" ").forEach(function (c) { + classes.indexOf(c) >= 0 && (found = !0); + }), !found); + }), config.regions; + } +}), (0, _util.extend)(_Chart2.default.prototype, { regions: regions }); + +/***/ }), +/* 68 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get data loaded in the chart. + * @method data + * @instance + * @memberOf Chart + * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned. + * @example + * // Get only data1 data + * chart.data("data1"); + * + * // Get data1 and data2 data + * chart.data(["data1", "data2"]); + * + * // Get all data + * chart.data(); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var data = function (targetIds) { + var targets = this.internal.data.targets; + + return (0, _util.isUndefined)(targetIds) ? targets : targets.filter(function (t) { + return targetIds.indexOf(t.id) >= 0; + }); +}; + +(0, _util.extend)(data, { + /** + * Get data shown in the chart. + * @method data․shown + * @instance + * @memberOf Chart + * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned. + * @example + * // Get shown data by filtering to include only data1 data + * chart.data.shown("data1"); + * + * // Get shown data by filtering to include data1 and data2 data + * chart.data.shown(["data1", "data2"]); + * + * // Get all shown data + * chart.data.shown(); + */ + shown: function shown(targetIds) { + return this.internal.filterTargetsToShow(this.data(targetIds)); + }, + + /** + * Get values of the data loaded in the chart. + * @method data․values + * @instance + * @memberOf Chart + * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned + * @example + * // Get data1 values + * chart.data.values("data1"); + */ + values: function (targetId) { + var values = null; + + if (targetId) { + var targets = this.data(targetId); + + targets && (0, _util.isArray)(targets) && (values = [], targets.forEach(function (v) { + values = values.concat(v.values.map(function (d) { + return d.value; + })); + })); + } + + return values; + }, + + /** + * Get and set names of the data loaded in the chart. + * @method data․names + * @instance + * @memberOf Chart + * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as + * @example + * // Get current names + * chart.data.names(); + * + * // Update names + * chart.data.names({ + * data1: "New Name 1", + * data2: "New Name 2" + *}); + */ + names: function names(_names) { + + return this.internal.clearLegendItemTextBoxCache(), this.internal.updateDataAttributes("names", _names); + }, + + /** + * Get and set colors of the data loaded in the chart. + * @method data․colors + * @instance + * @memberOf Chart + * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as + * @example + * // Get current colors + * chart.data.colors(); + * + * // Update colors + * chart.data.colors({ + * data1: "#FFFFFF", + * data2: "#000000" + * }); + */ + colors: function colors(_colors) { + return this.internal.updateDataAttributes("colors", _colors); + }, + + /** + * Get and set axes of the data loaded in the chart. + * @method data․axes + * @instance + * @memberOf Chart + * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as + * @example + * // Get current axes + * chart.data.axes(); + * + * // Update axes + * chart.data.axes({ + * data1: "y", + * data2: "y2" + * }); + */ + axes: function axes(_axes) { + return this.internal.updateDataAttributes("axes", _axes); + } +}), (0, _util.extend)(_Chart2.default.prototype, { data: data }); + +/***/ }), +/* 69 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Set specified category name on category axis. + * @method category + * @instance + * @memberOf Chart + * @param {Number} i index of category to be changed + * @param {String} category category value to be changed + * @example + * chart.category(2, "Category 3"); + */ + category: function category(i, _category) { + var $$ = this.internal, + config = $$.config; + + + return arguments.length > 1 && (config.axis_x_categories[i] = _category, $$.redraw()), config.axis_x_categories[i]; + }, + + + /** + * Set category names on category axis. + * @method categories + * @instance + * @memberOf Chart + * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required. + * @example + * chart.categories([ + * "Category 1", "Category 2", ... + * ]); + */ + categories: function categories(_categories) { + var $$ = this.internal, + config = $$.config; + return arguments.length ? (config.axis_x_categories = _categories, $$.redraw(), config.axis_x_categories) : config.axis_x_categories; + } +}); + +/***/ }), +/* 70 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get the color + * @method color + * @instance + * @memberOf Chart + * @param {String} id id to get the color + * @example + * chart.color("data1"); + */ + color: function color(id) { + return this.internal.color(id); // more patterns + } +}); + +/***/ }), +/* 71 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get and set x values for the chart. + * @method x + * @instance + * @memberOf Chart + * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids. + * @return {Object} xs + * @example + * // Get current x values + * chart.x(); + * + * // Update x values for all targets + * chart.x([100, 200, 300, 400, ...]); + */ + x: function x(_x) { + var $$ = this.internal; + + return arguments.length && ($$.updateTargetX($$.data.targets, _x), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), $$.data.xs; + }, + + + /** + * Get and set x values for the chart. + * @method xs + * @instance + * @memberOf Chart + * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids. + * @return {Object} xs + * @example + * // Get current x values + * chart.xs(); + * + * // Update x values for all targets + * chart.xs({ + * data1: [10, 20, 30, 40, ...], + * data2: [100, 200, 300, 400, ...] + * }); + */ + xs: function xs(_xs) { + var $$ = this.internal; + + return arguments.length && ($$.updateTargetXs($$.data.targets, _xs), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), $$.data.xs; + } +}); + +/***/ }), +/* 72 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Set the min/max value + * @param {Chart} $$ + * @param {String} type + * @param {Object} value + * @return {undefined} + * @private + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var setMinMax = function ($$, type, value) { + var config = $$.config, + axisY = "axis_y_" + type, + axisY2 = "axis_y2_" + type; + + + return (0, _util.isDefined)(value) && ((0, _util.isObjectType)(value) ? ((0, _util.isValue)(value.x) && (config["axis_x_" + type] = value.x), (0, _util.isValue)(value.y) && (config[axisY] = value.y), (0, _util.isValue)(value.y2) && (config[axisY2] = value.y2)) : (config[axisY] = value, config[axisY2] = value), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), undefined; +}, + getMinMax = function ($$, type) { + var config = $$.config; + + + return { + x: config["axis_x_" + type], + y: config["axis_y_" + type], + y2: config["axis_y2_" + type] + }; +}, + axis = (0, _util.extend)(function () {}, { + /** + * Get and set axis labels. + * @method axis․labels + * @instance + * @memberOf Chart + * @param {Object} labels specified axis' label to be updated. + * @example + * // Update axis' label + * chart.axis.labels({ + * x: "New X Axis Label", + * y: "New Y Axis Label" + * }); + */ + labels: function labels(_labels) { + var $$ = this.internal; + + arguments.length && (Object.keys(_labels).forEach(function (axisId) { + $$.axis.setLabelText(axisId, _labels[axisId]); + }), $$.axis.updateLabels()); + }, + + /** + * Get and set axis min value. + * @method axis․min + * @instance + * @memberOf Chart + * @param {Object} min If min is given, specified axis' min value will be updated.
    + * If no argument is given, the min values set on generating option for each axis will be returned. + * If not set any min values on generation, it will return `undefined`. + * @example + * // Update axis' min + * chart.axis.min({ + * x: -10, + * y: 1000, + * y2: 100 + * }); + */ + min: function min(_min) { + var $$ = this.internal; + + return arguments.length ? setMinMax($$, "min", _min) : getMinMax($$, "min"); + }, + + /** + * Get and set axis max value. + * @method axis․max + * @instance + * @memberOf Chart + * @param {Object} max If max is given, specified axis' max value will be updated.
    + * If no argument is given, the max values set on generating option for each axis will be returned. + * If not set any max values on generation, it will return `undefined`. + * @example + * // Update axis' label + * chart.axis.max({ + * x: 100, + * y: 1000, + * y2: 10000 + * }); + */ + max: function max(_max) { + var $$ = this.internal; + + return arguments.length ? setMinMax($$, "max", _max) : getMinMax($$, "max"); + }, + + /** + * Get and set axis min and max value. + * @method axis․range + * @instance + * @memberOf Chart + * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned. + * @example + * // Update axis' label + * chart.axis.range({ + * min: { + * x: -10, + * y: -1000, + * y2: -10000 + * }, + * max: { + * x: 100, + * y: 1000, + * y2: 10000 + * }, + * }); + */ + range: function range(_range) { + var axis = this.axis; + + if (arguments.length) (0, _util.isDefined)(_range.max) && axis.max(_range.max), (0, _util.isDefined)(_range.min) && axis.min(_range.min);else return { + max: axis.max(), + min: axis.min() + }; + + return undefined; + } +}); + +/** + * Get the min/max value + * @param {Chart} $$ + * @param {String} type + * @return {{x, y, y2}} + * @private + */ + + +/** + * Define axis + * @ignore + */ + + +(0, _util.extend)(_Chart2.default.prototype, { axis: axis }); + +/***/ }), +/* 73 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Define legend + * @ignore + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var legend = (0, _util.extend)(function () {}, { + /** + * Show legend for each target. + * @method legend․show + * @instance + * @memberOf Chart + * @param {String|Array} targetIds + * - If targetIds is given, specified target's legend will be shown. + * - If only one target is the candidate, String can be passed. + * - If no argument is given, all of target's legend will be shown. + * @example + * // Show legend for data1. + * chart.legend.show("data1"); + * + * // Show legend for data1 and data2. + * chart.legend.show(["data1", "data2"]); + * + * // Show all legend. + * chart.legend.show(); + */ + show: function show(targetIds) { + var $$ = this.internal; + + $$.showLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 }); + }, + + /** + * Hide legend for each target. + * @method legend․hide + * @instance + * @memberOf Chart + * @param {String|Array} targetIds + * - If targetIds is given, specified target's legend will be hidden. + * - If only one target is the candidate, String can be passed. + * - If no argument is given, all of target's legend will be hidden. + * @example + * // Hide legend for data1. + * chart.legend.hide("data1"); + * + * // Hide legend for data1 and data2. + * chart.legend.hide(["data1", "data2"]); + * + * // Hide all legend. + * chart.legend.hide(); + */ + hide: function hide(targetIds) { + var $$ = this.internal; + + $$.hideLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 }); + } +}); + +(0, _util.extend)(_Chart2.default.prototype, { legend: legend }); + +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _browser = __webpack_require__(75), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Resize the chart. + * @method resize + * @instance + * @memberOf Chart + * @param {Object} size This argument should include width and height in pixels. + * @example + * // Resize to 640x480 + * chart.resize({ + * width: 640, + * height: 480 + * }); + */ + resize: function resize(size) { + var config = this.internal.config; + + config.size_width = size ? size.width : null, config.size_height = size ? size.height : null, this.flush(); + }, + + + /** + * Force to redraw. + * @method flush + * @instance + * @memberOf Chart + * @param {Boolean} [soft] For soft redraw. + * @example + * chart.flush(); + * + * // for soft redraw + * chart.flush(true); + */ + flush: function flush(soft) { + var $$ = this.internal; + + // reset possible zoom scale + $$.zoomScale = null, soft ? $$.redraw({ + withTransform: !0, + withUpdateXDomain: !0, + withUpdateOrgXDomain: !0, + withLegend: !0 + }) : $$.updateAndRedraw({ + withLegend: !0, + withTransition: !1, + withTransitionForTransform: !1 + }); + }, + + + /** + * Reset the chart object and remove element and events completely. + * @method destroy + * @instance + * @memberOf Chart + * @example + * chart.destroy(); + */ + destroy: function destroy() { + var _this = this, + $$ = this.internal; + + return (0, _util.notEmpty)($$) && ($$.charts.splice($$.charts.indexOf(this), 1), (0, _util.isDefined)($$.resizeTimeout) && _browser.window.clearTimeout($$.resizeTimeout), (0, _d3Selection.select)(_browser.window).on("resize.bb", null), $$.selectChart.classed("bb", !1).html(""), Object.keys(this).forEach(function (key) { + key === "internal" && Object.keys($$).forEach(function (k) { + $$[k] = null; + }), _this[key] = null, delete _this[key]; + })), null; + }, + + + /** + * Get or set single config option value. + * @method config + * @instance + * @memberOf Chart + * @param {String} name The option key name. + * @param {*} [value] The value accepted for indicated option. + * @param {Boolean} [redraw] Set to redraw with the new option changes. + * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only. + * @example + * // Getter + * chart.config("gauge.max"); + * + * // Setter + * chart.config("gauge.max", 100); + * + * // Setter & redraw with the new option + * chart.config("gauge.max", 100, true); + */ + config: function config(name, value, redraw) { + var $$ = this.internal, + key = name && name.replace(/\./g, "_"), + res = void 0; + + + return key in $$.config && ((0, _util.isDefined)(value) ? ($$.config[key] = value, res = value, redraw && this.flush(!0)) : res = $$.config[key]), res; + } +}); + +/***/ }), +/* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.document = exports.window = undefined; + +var _util = __webpack_require__(11), + win = (0, _util.isDefined)(window) && window.Math === Math ? window : (0, _util.isDefined)(self) && (self.Math === Math ? self : Function("return this")()), + doc = win.document; + +/** + * Window object + * @module + * @ignore + */ +/* eslint-disable no-new-func */ + + +/* eslint-enable no-new-func */ + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +exports.window = win; +exports.document = doc; + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Define tooltip + * @ignore + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var tooltip = (0, _util.extend)(function () {}, { + /** + * Show tooltip + * @method tooltip․show + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:
    + * + * | Key | Type | Description | + * | --- | --- | --- | + * | index | Number | Determine focus by index | + * | x | Number | Date | Determine focus by x Axis index | + * | data | Object | Determine focus data with following keys: `x` or `index`.
    When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is set, the target is determined by mouse position and needs specify `x`, `id` and `value`. | + * | mouse | Array | Determine x and y coordinate value relative the targeted x Axis element.
    It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` | + * + * @example + * // show the 2nd x Axis coordinate tooltip + * chart.tooltip.show({ + * index: 1 + * }); + * + * // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element. + * chart.tooltip.show({ + * data: {x: 2}, + * mouse: [50, 100] + * }); + * + * // show tooltip for timeseries x axis + * chart.tooltip.show({ + * x: new Date("2018-01-02 00:00") + * }); + */ + show: function show() { + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + $$ = this.internal, + index = void 0, + mouse = void 0; + + + // determine mouse position on the chart + args.mouse && (mouse = args.mouse), args.data ? $$.isMultipleX() ? (mouse = [$$.x(args.data.x), $$.getYScale(args.data.id)(args.data.value)], index = null) : index = (0, _util.isValue)(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x) : (0, _util.isDefined)(args.x) ? index = $$.getIndexByX(args.x) : (0, _util.isDefined)(args.index) && (index = args.index), ($$.inputType === "mouse" ? ["mouseover", "mousemove"] : ["touchstart"]).forEach(function (eventName) { + $$.dispatchEvent(eventName, index, mouse); + }); + }, + + /** + * Hide tooltip + * @method tooltip․hide + * @instance + * @memberOf Chart + */ + hide: function hide() { + var $$ = this.internal; + + $$.hideTooltip(), $$.hideXGridFocus(), $$.unexpandCircles(), $$.unexpandBars(); + } +}); + +(0, _util.extend)(_Chart2.default.prototype, { tooltip: tooltip }); + +/***/ }), +/* 77 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var ua = window.navigator.userAgent; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + isSafari: function isSafari() { + return ua.indexOf("Safari") > -1 && !this.isChrome(); + }, + isChrome: function isChrome() { + return ua.indexOf("Chrome") > -1; + }, + isMobile: function isMobile() { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent + return ua.indexOf("Mobi") > -1; + } +}); + +/***/ }), +/* 78 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(5), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(11); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Encode to base64 + * @param {String} str + * @return {String} + * @private + * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding + */ +var b64EncodeUnicode = function (str) { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) { + return String.fromCharCode("0x" + p); + })); +}, + nodeToSvgDataUrl = function (node) { + var bounds = node.getBoundingClientRect(), + clone = node.cloneNode(!0), + styleSheets = (0, _util.toArray)(document.styleSheets), + cssRules = (0, _util.getCssRules)(styleSheets), + cssText = cssRules.filter(function (r) { + return r.cssText; + }).map(function (r) { + return r.cssText; + }); + clone.setAttribute("xmlns", _d3Selection.namespaces.xhtml); + var nodeXml = new XMLSerializer().serializeToString(clone), + dataStr = ("\n\t\t\t\n\t\t\t\t\n\t\t\t\t" + nodeXml + "\n\t\t\t").replace(/#/g, "%23").replace("/\n/g", "%0A"); + + // foreignObject not supported in IE11 and below + // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx + + return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr); +}; + +/** + * Convert svg node to data url + * @param {HTMLElement} node + * @return {String} + * @private + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Export chart as an image. + * - **NOTE:** + * - IE11 and below not work properly due to the lack of the feature(foreignObject) support + * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image. + * @method export + * @instance + * @memberOf Chart + * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format) + * @param {Function} [callback] The callback to be invoked when export is ready. + * @return {String} dataURI + * @example + * chart.export(); + * // --> "data:image/svg+xml;base64,PHN..." + * + * // Initialize the download automatically + * chart.export("image/png", dataUrl => { + * const link = document.createElement("a"); + * + * link.download = `${Date.now()}.png`; + * link.href = dataUrl; + * link.innerHTML = "Download chart as image"; + * + * document.body.appendChild(link); + * }); + */ + export: function _export() { + var mimeType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png", + callback = arguments[1], + svgDataUrl = nodeToSvgDataUrl(this.element); + + + if ((0, _util.isFunction)(callback)) { + var img = new Image(); + + img.crosssOrigin = "Anonymous", img.onload = function () { + var canvas = document.createElement("canvas"), + ctx = canvas.getContext("2d"); + canvas.width = img.width, canvas.height = img.height, ctx.drawImage(img, 0, 0), canvas.toBlob(function (blob) { + callback(window.URL.createObjectURL(blob)); + }, mimeType); + }, img.src = svgDataUrl; + } + + return svgDataUrl; + } +}); + +/***/ }) +/******/ ]); +}); +//# sourceMappingURL=billboard.js.map \ No newline at end of file diff --git a/dist/billboard.js.map b/dist/billboard.js.map new file mode 100644 index 000000000..2c225384e --- /dev/null +++ b/dist/billboard.js.map @@ -0,0 +1 @@ +{"version":3,"file":"billboard.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///src/core.js","webpack:///src/internals/Chart.js","webpack:///./node_modules/babel-helper-modules/lib/classCallCheck.js","webpack:///src/internals/ChartInternal.js","webpack:///external {\"commonjs\":\"d3-time-format\",\"commonjs2\":\"d3-time-format\",\"amd\":\"d3-time-format\",\"root\":\"d3\"}","webpack:///external {\"commonjs\":\"d3-selection\",\"commonjs2\":\"d3-selection\",\"amd\":\"d3-selection\",\"root\":\"d3\"}","webpack:///external {\"commonjs\":\"d3-array\",\"commonjs2\":\"d3-array\",\"amd\":\"d3-array\",\"root\":\"d3\"}","webpack:///external {\"commonjs\":\"d3-transition\",\"commonjs2\":\"d3-transition\",\"amd\":\"d3-transition\",\"root\":\"d3\"}","webpack:///src/axis/Axis.js","webpack:///src/axis/bb.axis.js","webpack:///external {\"commonjs\":\"d3-scale\",\"commonjs2\":\"d3-scale\",\"amd\":\"d3-scale\",\"root\":\"d3\"}","webpack:///src/internals/util.js","webpack:///./node_modules/babel-helper-modules/lib/typeof.js","webpack:///external {\"commonjs\":\"d3-brush\",\"commonjs2\":\"d3-brush\",\"amd\":\"d3-brush\",\"root\":\"d3\"}","webpack:///src/config/classes.js","webpack:///./src/scss/billboard.scss?b00e","webpack:///src/config/config.js","webpack:///src/config/Options.js","webpack:///src/internals/scale.js","webpack:///src/internals/domain.js","webpack:///src/data/data.js","webpack:///external {\"commonjs\":\"d3-collection\",\"commonjs2\":\"d3-collection\",\"amd\":\"d3-collection\",\"root\":\"d3\"}","webpack:///src/data/data.convert.js","webpack:///external {\"commonjs\":\"d3-dsv\",\"commonjs2\":\"d3-dsv\",\"amd\":\"d3-dsv\",\"root\":\"d3\"}","webpack:///src/data/data.load.js","webpack:///src/internals/category.js","webpack:///src/interactions/interaction.js","webpack:///external {\"commonjs\":\"d3-drag\",\"commonjs2\":\"d3-drag\",\"amd\":\"d3-drag\",\"root\":\"d3\"}","webpack:///src/internals/size.js","webpack:///src/shape/shape.js","webpack:///external {\"commonjs\":\"d3-shape\",\"commonjs2\":\"d3-shape\",\"amd\":\"d3-shape\",\"root\":\"d3\"}","webpack:///src/shape/arc.js","webpack:///external {\"commonjs\":\"d3-interpolate\",\"commonjs2\":\"d3-interpolate\",\"amd\":\"d3-interpolate\",\"root\":\"d3\"}","webpack:///src/shape/bar.js","webpack:///src/shape/bubble.js","webpack:///src/shape/line.js","webpack:///src/shape/point.js","webpack:///src/shape/radar.js","webpack:///src/internals/text.js","webpack:///src/internals/type.js","webpack:///src/internals/grid.js","webpack:///src/internals/tooltip.js","webpack:///src/internals/legend.js","webpack:///src/internals/title.js","webpack:///src/internals/clip.js","webpack:///src/internals/region.js","webpack:///src/interactions/drag.js","webpack:///src/internals/selection.js","webpack:///external {\"commonjs\":\"d3-color\",\"commonjs2\":\"d3-color\",\"amd\":\"d3-color\",\"root\":\"d3\"}","webpack:///src/interactions/subchart.js","webpack:///src/interactions/zoom.js","webpack:///external {\"commonjs\":\"d3-zoom\",\"commonjs2\":\"d3-zoom\",\"amd\":\"d3-zoom\",\"root\":\"d3\"}","webpack:///src/internals/color.js","webpack:///src/internals/format.js","webpack:///src/internals/cache.js","webpack:///src/internals/class.js","webpack:///src/api/api.focus.js","webpack:///src/api/api.show.js","webpack:///src/api/api.zoom.js","webpack:///src/api/api.load.js","webpack:///src/api/api.flow.js","webpack:///external {\"commonjs\":\"d3-ease\",\"commonjs2\":\"d3-ease\",\"amd\":\"d3-ease\",\"root\":\"d3\"}","webpack:///src/api/api.selection.js","webpack:///src/api/api.transform.js","webpack:///src/api/api.group.js","webpack:///src/api/api.grid.js","webpack:///src/api/api.region.js","webpack:///src/api/api.data.js","webpack:///src/api/api.category.js","webpack:///src/api/api.color.js","webpack:///src/api/api.x.js","webpack:///src/api/api.axis.js","webpack:///src/api/api.legend.js","webpack:///src/api/api.chart.js","webpack:///src/internals/browser.js","webpack:///src/api/api.tooltip.js","webpack:///src/internals/ua.js","webpack:///src/api/api.export.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-array\"), require(\"d3-transition\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-collection\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-color\"), require(\"d3-zoom\"), require(\"d3-ease\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3-time-format\", \"d3-selection\", \"d3-array\", \"d3-transition\", \"d3-scale\", \"d3-brush\", \"d3-collection\", \"d3-dsv\", \"d3-drag\", \"d3-shape\", \"d3-interpolate\", \"d3-color\", \"d3-zoom\", \"d3-ease\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-array\"), require(\"d3-transition\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-collection\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-color\"), require(\"d3-zoom\"), require(\"d3-ease\")) : factory(root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function(__WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__22__, __WEBPACK_EXTERNAL_MODULE__24__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__33__, __WEBPACK_EXTERNAL_MODULE__49__, __WEBPACK_EXTERNAL_MODULE__52__, __WEBPACK_EXTERNAL_MODULE__62__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"./internals/Chart\";\nimport ChartInternal from \"./internals/ChartInternal\";\nimport Axis from \"./axis/Axis\";\nimport \"./scss/billboard.scss\";\n\n/**\n * @namespace bb\n * @version 1.6.0\n */\nconst bb = {\n\t/**\n\t * Version information\n\t * @property {String} version version\n\t * @example\n\t * bb.version; // \"1.0.0\"\n\t * @memberOf bb\n\t */\n\tversion: \"1.6.0\",\n\n\t/**\n\t * Generate chart\n\t * @param {Options} options chart options\n\t * @memberOf bb\n\t * @return {Chart}\n\t * @see {@link Options} for different generation options\n\t * @see {@link Chart} for different methods API\n\t * @example\n\t * \n\t *
    \n\t * @example\n\t * // generate chart with options\n\t * var chart = bb.generate({\n\t * \"bindto\": \"#LineChart\"\n\t * \"data\": {\n\t * \"columns\": [\n\t * [\"data1\", 30, 200, 100, 400, 150, 250],\n\t * [\"data2\", 50, 20, 10, 40, 15, 25]\n\t * ]\n\t * }\n\t * });\n\t *\n\t * // call some API\n\t * // ex) get the data of 'data1'\n\t * chart.data(\"data1\");\n\t */\n\tgenerate(config) {\n\t\tconst inst = new Chart(config);\n\n\t\tinst.internal.charts = this.instance;\n\t\tthis.instance.push(inst);\n\n\t\treturn inst;\n\t},\n\n\t/**\n\t * An array containing instance created\n\t * @property {Array} instance instance array\n\t * @example\n\t * // generate charts\n\t * var chart1 = bb.generate(...);\n\t * var chart2 = bb.generate(...);\n\t *\n\t * bb.instance; // [ chart1, chart2, ... ]\n\t * @memberOf bb\n\t */\n\tinstance: [],\n\n\t/**\n\t * Internal chart object\n\t * @private\n\t */\n\tchart: {\n\t\tfn: Chart.prototype,\n\t\tinternal: {\n\t\t\tfn: ChartInternal.prototype,\n\t\t\taxis: {\n\t\t\t\tfn: Axis.prototype\n\t\t\t}\n\t\t}\n\t}\n};\n\nrequire(\"./config/config.js\");\nrequire(\"./internals/scale.js\");\nrequire(\"./internals/domain.js\");\nrequire(\"./data/data.js\");\nrequire(\"./data/data.convert.js\");\nrequire(\"./data/data.load.js\");\nrequire(\"./internals/category.js\");\nrequire(\"./interactions/interaction.js\");\nrequire(\"./internals/size.js\");\nrequire(\"./shape/shape.js\");\nrequire(\"./shape/arc.js\");\nrequire(\"./shape/bar.js\");\nrequire(\"./shape/bubble.js\");\nrequire(\"./shape/line.js\");\nrequire(\"./shape/point.js\");\nrequire(\"./shape/radar.js\");\nrequire(\"./internals/text.js\");\nrequire(\"./internals/type.js\");\nrequire(\"./internals/grid.js\");\nrequire(\"./internals/tooltip.js\");\nrequire(\"./internals/legend.js\");\nrequire(\"./internals/title.js\");\nrequire(\"./internals/clip.js\");\nrequire(\"./internals/region.js\");\nrequire(\"./interactions/drag.js\");\nrequire(\"./internals/selection.js\");\nrequire(\"./interactions/subchart.js\");\nrequire(\"./interactions/zoom.js\");\nrequire(\"./internals/color.js\");\nrequire(\"./internals/format.js\");\nrequire(\"./internals/cache.js\");\nrequire(\"./internals/class.js\");\nrequire(\"./api/api.focus.js\");\nrequire(\"./api/api.show.js\");\nrequire(\"./api/api.zoom.js\");\nrequire(\"./api/api.load.js\");\nrequire(\"./api/api.flow.js\");\nrequire(\"./api/api.selection.js\");\nrequire(\"./api/api.transform.js\");\nrequire(\"./api/api.group.js\");\nrequire(\"./api/api.grid.js\");\nrequire(\"./api/api.region.js\");\nrequire(\"./api/api.data.js\");\nrequire(\"./api/api.category.js\");\nrequire(\"./api/api.color.js\");\nrequire(\"./api/api.x.js\");\nrequire(\"./api/api.axis.js\");\nrequire(\"./api/api.legend.js\");\nrequire(\"./api/api.chart.js\");\nrequire(\"./api/api.tooltip.js\");\nrequire(\"./axis/bb.axis.js\");\nrequire(\"./internals/ua.js\");\nrequire(\"./api/api.export.js\");\n\nexport {bb};\nexport default bb;\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @license MIT\n * @ignore\n */\nimport ChartInternal from \"./ChartInternal\";\n\n/**\n * Main chart class.\n * - Note: Instantiated via `bb.generate()`.\n * @class Chart\n * @example\n * var chart = bb.generate({\n * data: {\n * columns: [\n *\t [\"x\", \"2015-11-02\", \"2015-12-01\", \"2016-01-01\", \"2016-02-01\", \"2016-03-01\"],\n * \t [\"count1\", 11, 8, 7, 6, 5 ],\n *\t [\"count2\", 9, 3, 6, 2, 8 ]\n * ]}\n * }\n * @see {@link bb.generate} for the initialization.\n*/\nexport default class Chart {\n\tconstructor(config) {\n\t\tconst $$ = new ChartInternal(this);\n\n\t\tthis.internal = $$;\n\n\t\t$$.loadConfig(config);\n\t\t$$.beforeInit(config);\n\t\t$$.init();\n\n\t\t/**\n\t\t * Access primary node elements\n\t\t * @name Chart#$\n\t\t * @type Object\n\t\t * @property {Object} $\n\t\t * @property {d3.selection} $.chart Wrapper element\n\t\t * @property {d3.selection} $.svg Main svg element\n\t\t * @property {d3.selection} $.defs Definition element\n\t\t * @property {d3.selection} $.main Main grouping element\n\t\t * @property {d3.selection} $.tooltip Tooltip element\n\t\t * @property {d3.selection} $.legend Legend element\n\t\t * @property {d3.selection} $.title Title element\n\t\t * @property {d3.selection} $.grid Grid element\n\t\t * @property {d3.selection} $.arc Arc element\n\t\t * @property {Object} $.bar\n\t\t * @property {d3.selection} $.bar.bars Bar elements\n\t\t * @property {Object} $.line\n\t\t * @property {d3.selection} $.line.lines Line elements\n\t\t * @property {d3.selection} $.line.areas Areas elements\n\t\t * @property {d3.selection} $.line.circles Data point circle elements\n\t\t * @property {Object} $.text\n\t\t * @property {d3.selection} $.text.texts Data label text elements\n\t\t * @instance\n\t\t * @memberOf Chart\n\t\t * @example\n\t\t * var chart = bb.generate({ ... });\n\t\t *\n\t\t * chart.$.chart; // wrapper element\n\t\t * chart.$.line.circles; // all data point circle elements\n\t\t */\n\t\tthis.$ = $$.getChartElements();\n\n\t\t$$.afterInit(config);\n\n\t\t// bind \"this\" to nested API\n\t\t(function bindThis(fn, target, argThis) {\n\t\t\tObject.keys(fn).forEach(key => {\n\t\t\t\ttarget[key] = fn[key].bind(argThis);\n\n\t\t\t\tObject.keys(fn[key]).length &&\n\t\t\t\t\tbindThis(fn[key], target[key], argThis);\n\t\t\t});\n\t\t})(Chart.prototype, this, this);\n\t}\n}\n","\"use strict\";\n\nexports.__esModule = true;\n\nexports.default = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\nimport {\n\ttimeParse as d3TimeParse,\n\ttimeFormat as d3TimeFormat,\n\tutcParse as d3UtcParse,\n\tutcFormat as d3UtcFormat\n} from \"d3-time-format\";\nimport {\n\tselect as d3Select,\n\tselectAll as d3SelectAll\n} from \"d3-selection\";\nimport {extent as d3Extent} from \"d3-array\";\nimport {transition as d3Transition} from \"d3-transition\";\n\nimport Axis from \"../axis/Axis\";\nimport CLASS from \"../config/classes\";\nimport {notEmpty, asHalfPixel, getOption, isValue, isArray, isFunction, isDefined, isString, isNumber, isObject, callFn} from \"./util\";\n\n/**\n * Internal chart class.\n * - Note: Instantiated internally, not exposed for public.\n * @class ChartInternal\n * @ignore\n * @private\n*/\nexport default class ChartInternal {\n\tconstructor(api) {\n\t\tconst $$ = this;\n\n\t\t$$.api = api;\n\t\t$$.config = $$.getOptions();\n\t\t$$.data = {};\n\t\t$$.cache = {};\n\t\t$$.axes = {};\n\t}\n\n\tbeforeInit() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t// can do something\n\t\tcallFn(config.onbeforeinit, $$);\n\t}\n\n\tafterInit() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t// can do something\n\t\tcallFn(config.onafterinit, $$);\n\t}\n\n\tinit() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet convertedData;\n\n\t\t$$.initParams();\n\n\t\tif (config.data_url) {\n\t\t\t$$.convertUrlToData(\n\t\t\t\tconfig.data_url,\n\t\t\t\tconfig.data_mimeType,\n\t\t\t\tconfig.data_headers,\n\t\t\t\tconfig.data_keys,\n\t\t\t\t$$.initWithData\n\t\t\t);\n\t\t} else if (config.data_json) {\n\t\t\tconvertedData = $$.convertJsonToData(config.data_json, config.data_keys);\n\t\t} else if (config.data_rows) {\n\t\t\tconvertedData = $$.convertRowsToData(config.data_rows);\n\t\t} else if (config.data_columns) {\n\t\t\tconvertedData = $$.convertColumnsToData(config.data_columns);\n\t\t} else {\n\t\t\tthrow Error(\"url or json or rows or columns is required.\");\n\t\t}\n\n\t\tconvertedData && $$.initWithData(convertedData);\n\t}\n\n\tinitParams() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\n\t\t// datetime to be used for uniqueness\n\t\t$$.datetimeId = `bb-${+new Date()}`;\n\n\t\t// MEMO: clipId needs to be unique because it conflicts when multiple charts exist\n\t\t$$.clipId = `${$$.datetimeId}-clip`;\n\t\t$$.clipIdForXAxis = `${$$.clipId}-xaxis`;\n\t\t$$.clipIdForYAxis = `${$$.clipId}-yaxis`;\n\t\t$$.clipIdForGrid = `${$$.clipId}-grid`;\n\t\t$$.clipIdForSubchart = `${$$.clipId}-subchart`;\n\n\t\t// Define 'clip-path' attribute values\n\t\t$$.clipPath = $$.getClipPath($$.clipId);\n\t\t$$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis);\n\t\t$$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis);\n\t\t$$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid);\n\t\t$$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart);\n\n\t\t$$.dragStart = null;\n\t\t$$.dragging = false;\n\t\t$$.flowing = false;\n\t\t$$.cancelClick = false;\n\t\t$$.mouseover = false;\n\t\t$$.transiting = false;\n\n\t\t$$.color = $$.generateColor();\n\t\t$$.levelColor = $$.generateLevelColor();\n\t\t$$.point = $$.generatePoint();\n\n\t\t$$.extraLineClasses = $$.generateExtraLineClass();\n\n\t\t$$.dataTimeFormat = config.data_xLocaltime ? d3TimeParse : d3UtcParse;\n\t\t$$.axisTimeFormat = config.axis_x_localtime ? d3TimeFormat : d3UtcFormat;\n\n\t\t$$.defaultAxisTimeFormat = d => {\n\t\t\tconst specifier = (d.getMilliseconds() && \".%L\") ||\n\t\t\t\t(d.getSeconds() && \".:%S\") ||\n\t\t\t\t(d.getMinutes() && \"%I:%M\") ||\n\t\t\t\t(d.getHours() && \"%I %p\") ||\n\t\t\t\t((d.getDay() && d.getDate() !== 1) && \"%-m/%-d\") ||\n\t\t\t\t(d.getDate() !== 1 && \"%b %d\") ||\n\t\t\t\t(d.getMonth() && \"%-m/%-d\") ||\n\t\t\t\t\"%Y/%-m/%-d\";\n\n\t\t\treturn $$.axisTimeFormat(specifier)(d);\n\t\t};\n\n\t\t$$.hiddenTargetIds = [];\n\t\t$$.hiddenLegendIds = [];\n\t\t$$.focusedTargetIds = [];\n\t\t$$.defocusedTargetIds = [];\n\n\t\t$$.xOrient = isRotated ? \"left\" : \"bottom\";\n\t\t$$.yOrient = isRotated ?\n\t\t\t(config.axis_y_inner ? \"top\" : \"bottom\") : (config.axis_y_inner ? \"right\" : \"left\");\n\t\t$$.y2Orient = isRotated ?\n\t\t\t(config.axis_y2_inner ? \"bottom\" : \"top\") : (config.axis_y2_inner ? \"left\" : \"right\");\n\t\t$$.subXOrient = isRotated ? \"left\" : \"bottom\";\n\n\t\t$$.isLegendRight = config.legend_position === \"right\";\n\t\t$$.isLegendInset = config.legend_position === \"inset\";\n\n\t\t$$.isLegendTop = config.legend_inset_anchor === \"top-left\" ||\n\t\t\tconfig.legend_inset_anchor === \"top-right\";\n\t\t$$.isLegendLeft = config.legend_inset_anchor === \"top-left\" ||\n\t\t\tconfig.legend_inset_anchor === \"bottom-left\";\n\n\t\t$$.legendStep = 0;\n\t\t$$.legendItemWidth = 0;\n\t\t$$.legendItemHeight = 0;\n\n\t\t$$.currentMaxTickWidths = {\n\t\t\tx: 0, y: 0, y2: 0\n\t\t};\n\n\t\t$$.rotated_padding_left = 30;\n\t\t$$.rotated_padding_right = isRotated && !config.axis_x_show ? 0 : 30;\n\t\t$$.rotated_padding_top = 5;\n\n\t\t$$.withoutFadeIn = {};\n\t\t$$.inputType = $$.convertInputType();\n\n\t\t$$.axes.subx = d3SelectAll([]); // needs when excluding subchart.js\n\t}\n\n\tinitWithData(data) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.axis = new Axis($$);\n\n\t\tconfig.subchart_show && $$.initBrush();\n\n\t\tif (config.zoom_enabled) {\n\t\t\t$$.initZoom();\n\t\t\t$$.initZoomBehaviour();\n\t\t}\n\n\t\tconst bindto = {\n\t\t\telement: config.bindto,\n\t\t\tclassname: \"bb\"\n\t\t};\n\n\t\tif (isObject(config.bindto)) {\n\t\t\tbindto.element = config.bindto.element || \"#chart\";\n\t\t\tbindto.classname = config.bindto.classname || bindto.classname;\n\t\t}\n\n\t\t// select bind element\n\t\t$$.selectChart = isFunction(bindto.element.node) ?\n\t\t\tconfig.bindto.element : d3Select(!bindto.element ? [] : bindto.element);\n\n\t\t$$.selectChart.html(\"\").classed(bindto.classname, true);\n\n\t\t// Init data as targets\n\t\t$$.data.xs = {};\n\t\t$$.data.targets = $$.convertDataToTargets(data);\n\n\t\tif (config.data_filter) {\n\t\t\t$$.data.targets = $$.data.targets.filter(config.data_filter);\n\t\t}\n\n\t\t// Set targets to hide if needed\n\t\tif (config.data_hide) {\n\t\t\t$$.addHiddenTargetIds(\n\t\t\t\tconfig.data_hide === true ?\n\t\t\t\t\t$$.mapToIds($$.data.targets) : config.data_hide\n\t\t\t);\n\t\t}\n\t\tif (config.legend_hide) {\n\t\t\t$$.addHiddenLegendIds(\n\t\t\t\tconfig.legend_hide === true ?\n\t\t\t\t\t$$.mapToIds($$.data.targets) : config.legend_hide\n\t\t\t);\n\t\t}\n\n\t\t// when gauge, hide legend // TODO: fix\n\t\tif ($$.hasType(\"gauge\")) {\n\t\t\tconfig.legend_show = false;\n\t\t}\n\n\t\t// Init sizes and scales\n\t\t$$.updateSizes();\n\t\t$$.updateScales();\n\n\t\t// Set domains for each scale\n\t\t$$.x.domain(d3Extent($$.getXDomain($$.data.targets)));\n\t\t$$.y.domain($$.getYDomain($$.data.targets, \"y\"));\n\t\t$$.y2.domain($$.getYDomain($$.data.targets, \"y2\"));\n\t\t$$.subX.domain($$.x.domain());\n\t\t$$.subY.domain($$.y.domain());\n\t\t$$.subY2.domain($$.y2.domain());\n\n\t\t// Save original x domain for zoom update\n\t\t$$.orgXDomain = $$.x.domain();\n\n\t\t// -- Basic Elements --\n\t\t$$.svg = $$.selectChart.append(\"svg\")\n\t\t\t.style(\"overflow\", \"hidden\")\n\t\t\t.style(\"display\", \"block\");\n\n\t\tif (config.interaction_enabled && $$.inputType) {\n\t\t\tconst isTouch = $$.inputType === \"touch\";\n\n\t\t\t$$.svg\n\t\t\t\t.on(isTouch ? \"touchstart\" : \"mouseenter\", () => callFn(config.onover, $$))\n\t\t\t\t.on(isTouch ? \"touchend\" : \"mouseleave\", () => callFn(config.onout, $$));\n\t\t}\n\n\t\tconfig.svg_classname &&\n\t\t\t$$.svg.attr(\"class\", config.svg_classname);\n\n\t\t// Define defs\n\t\t$$.defs = $$.svg.append(\"defs\");\n\n\t\t$$.clipChart = $$.appendClip($$.defs, $$.clipId);\n\t\t$$.clipXAxis = $$.appendClip($$.defs, $$.clipIdForXAxis);\n\t\t$$.clipYAxis = $$.appendClip($$.defs, $$.clipIdForYAxis);\n\t\t$$.clipGrid = $$.appendClip($$.defs, $$.clipIdForGrid);\n\t\t$$.clipSubchart = $$.appendClip($$.defs, $$.clipIdForSubchart);\n\n\t\t// set color patterns\n\t\tif (isFunction(config.color_tiles) && $$.patterns) {\n\t\t\t$$.patterns.forEach(p => $$.defs.append(() => p.node));\n\t\t}\n\n\t\t$$.updateSvgSize();\n\n\t\t// Define regions\n\t\tconst main = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"main\"));\n\n\t\t$$.main = main;\n\n\t\t// initialize subchart when subchart show option is set\n\t\tconfig.subchart_show &&\n\t\t\t$$.initSubchart &&\n\t\t\t\t$$.initSubchart();\n\n\t\t$$.initTooltip && $$.initTooltip();\n\t\t$$.initLegend && $$.initLegend();\n\t\t$$.initTitle && $$.initTitle();\n\n\t\t// -- Main Region --\n\n\t\t// text when empty\n\t\tmain.append(\"text\")\n\t\t\t.attr(\"class\", `${CLASS.text} ${CLASS.empty}`)\n\t\t\t.attr(\"text-anchor\", \"middle\") // horizontal centering of text at x position in all browsers.\n\t\t\t.attr(\"dominant-baseline\", \"middle\"); // vertical centering of text at y position in all browsers, except IE.\n\n\t\t// Regions\n\t\t$$.initRegion();\n\n\t\t// Grids\n\t\t$$.initGrid();\n\n\t\t// Add Axis here, when clipPath is 'false'\n\t\t!config.clipPath && $$.axis.init();\n\n\t\t// Define g for chart area\n\t\tmain.append(\"g\").attr(\"class\", CLASS.chart)\n\t\t\t.attr(\"clip-path\", $$.clipPath);\n\n\t\t// Grid lines\n\t\tconfig.grid_lines_front && $$.initGridLines();\n\t\tconfig.grid_front && $$.initXYFocusGrid();\n\n\t\t// Cover whole with rects for events\n\t\t$$.initEventRect();\n\n\t\t// Define g for chart\n\t\t$$.initChartElements();\n\n\t\t// if zoom privileged, insert rect to forefront\n\t\t// TODO: is this needed?\n\t\tmain.insert(\"rect\", config.zoom_privileged ? null : `g.${CLASS.regions}`)\n\t\t\t.attr(\"class\", CLASS.zoomRect)\n\t\t\t.attr(\"width\", $$.width)\n\t\t\t.attr(\"height\", $$.height)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.on(\"dblclick.zoom\", null);\n\n\t\t// Set default extent if defined\n\t\tconfig.axis_x_extent &&\n\t\t\t$$.brush.scale($$.getDefaultExtent());\n\n\t\t// Add Axis here, when clipPath is 'true'\n\t\tconfig.clipPath && $$.axis.init();\n\n\t\t// Set targets\n\t\t$$.updateTargets($$.data.targets);\n\n\t\t// Draw with targets\n\t\t$$.updateDimension();\n\n\t\t// oninit callback\n\t\tconfig.oninit.call($$);\n\n\t\t$$.redraw({\n\t\t\twithTransition: false,\n\t\t\twithTransform: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithTransitionForAxis: false,\n\t\t\tinitializing: true\n\t\t});\n\n\t\t// data.onmin/max callback\n\t\tif (config.data_onmin || config.data_onmax) {\n\t\t\tconst minMax = $$.getMinMaxData();\n\n\t\t\tcallFn(config.data_onmin, $$, minMax.min);\n\t\t\tcallFn(config.data_onmax, $$, minMax.max);\n\t\t}\n\n\t\t// Bind resize event\n\t\t$$.bindResize();\n\n\t\t// export element of the chart\n\t\t$$.api.element = $$.selectChart.node();\n\t}\n\n\tinitChartElements() {\n\t\t[\"Pie\", \"Bar\", \"Line\", \"Arc\", \"Gauge\", \"Bubble\", \"Radar\", \"Text\"].forEach(v => {\n\t\t\tconst method = `init${v}`;\n\n\t\t\tthis[method] && this[method]();\n\t\t});\n\t}\n\n\tgetChartElements() {\n\t\tconst $$ = this;\n\n\t\treturn {\n\t\t\tchart: $$.selectChart,\n\t\t\tsvg: $$.svg,\n\t\t\tdefs: $$.defs,\n\t\t\tmain: $$.main,\n\t\t\ttooltip: $$.tooltip,\n\t\t\tlegend: $$.legend,\n\t\t\ttitle: $$.title,\n\t\t\tgrid: $$.grid,\n\t\t\tarc: $$.arcs,\n\t\t\tbar: {\n\t\t\t\tbars: $$.mainBar\n\t\t\t},\n\t\t\tline: {\n\t\t\t\tlines: $$.mainLine,\n\t\t\t\tareas: $$.mainArea,\n\t\t\t\tcircles: $$.mainCircle\n\t\t\t},\n\t\t\ttext: {\n\t\t\t\ttexts: $$.texts\n\t\t\t}\n\t\t};\n\t}\n\n\tsmoothLines(el, type) {\n\t\tif (type === \"grid\") {\n\t\t\tel.each(function() {\n\t\t\t\tconst g = d3Select(this);\n\t\t\t\tconst [x1, x2, y1, y2] = [\"x1\", \"x2\", \"y1\", \"y2\"]\n\t\t\t\t\t.map(v => Math.ceil(g.attr(v)));\n\n\t\t\t\tg.attr({x1, x2, y1, y2});\n\t\t\t});\n\t\t}\n\t}\n\n\tupdateSizes() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst hasArc = $$.hasArcType();\n\n\t\tconst legendHeight = $$.legend ? $$.getLegendHeight() : 0;\n\t\tconst legendWidth = $$.legend ? $$.getLegendWidth() : 0;\n\t\tconst legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight;\n\t\tconst xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight(\"x\");\n\t\tconst subchartHeight = config.subchart_show && !hasArc ?\n\t\t\t(config.subchart_size_height + xAxisHeight) : 0;\n\n\t\t$$.currentWidth = $$.getCurrentWidth();\n\t\t$$.currentHeight = $$.getCurrentHeight();\n\n\t\t// for main\n\t\t$$.margin = isRotated ? {\n\t\t\ttop: $$.getHorizontalAxisHeight(\"y2\") + $$.getCurrentPaddingTop(),\n\t\t\tright: hasArc ? 0 : $$.getCurrentPaddingRight(),\n\t\t\tbottom: $$.getHorizontalAxisHeight(\"y\") + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n\t\t\tleft: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())\n\t\t} : {\n\t\t\ttop: 4 + $$.getCurrentPaddingTop(), // for top tick text\n\t\t\tright: hasArc ? 0 : $$.getCurrentPaddingRight(),\n\t\t\tbottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),\n\t\t\tleft: hasArc ? 0 : $$.getCurrentPaddingLeft()\n\t\t};\n\n\t\t// for subchart\n\t\t$$.margin2 = isRotated ? {\n\t\t\ttop: $$.margin.top,\n\t\t\tright: NaN,\n\t\t\tbottom: 20 + legendHeightForBottom,\n\t\t\tleft: $$.rotated_padding_left\n\t\t} : {\n\t\t\ttop: $$.currentHeight - subchartHeight - legendHeightForBottom,\n\t\t\tright: NaN,\n\t\t\tbottom: xAxisHeight + legendHeightForBottom,\n\t\t\tleft: $$.margin.left\n\t\t};\n\n\t\t// for legend\n\t\t$$.margin3 = {\n\t\t\ttop: 0,\n\t\t\tright: NaN,\n\t\t\tbottom: 0,\n\t\t\tleft: 0\n\t\t};\n\n\t\t$$.updateSizeForLegend &&\n\t\t\t$$.updateSizeForLegend(legendHeight, legendWidth);\n\n\t\t$$.width = $$.currentWidth - $$.margin.left - $$.margin.right;\n\t\t$$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom;\n\n\t\tif ($$.width < 0) {\n\t\t\t$$.width = 0;\n\t\t}\n\n\t\tif ($$.height < 0) {\n\t\t\t$$.height = 0;\n\t\t}\n\n\t\t$$.width2 = isRotated ?\n\t\t\t$$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width;\n\n\t\t$$.height2 = isRotated ?\n\t\t\t$$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom;\n\n\t\tif ($$.width2 < 0) {\n\t\t\t$$.width2 = 0;\n\t\t}\n\n\t\tif ($$.height2 < 0) {\n\t\t\t$$.height2 = 0;\n\t\t}\n\n\t\t// for arc\n\t\t$$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0);\n\t\t$$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10);\n\n\t\tif ($$.hasType(\"gauge\") && !config.gauge_fullCircle) {\n\t\t\t$$.arcHeight += $$.height - $$.getGaugeLabelHeight();\n\t\t}\n\n\t\t$$.updateRadius && $$.updateRadius();\n\n\t\tif ($$.isLegendRight && hasArc) {\n\t\t\t$$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1;\n\t\t}\n\t}\n\n\t/**\n\t * Update targeted element with given data\n\t * @param {Object} targets Data object formatted as 'target'\n\t * @private\n\t */\n\tupdateTargets(targets) {\n\t\tconst $$ = this;\n\n\t\t// Text\n\t\t$$.updateTargetsForText(targets);\n\n\t\t// Bar\n\t\t$$.updateTargetsForBar(targets);\n\n\t\t// Line\n\t\t$$.updateTargetsForLine(targets);\n\n\t\t// Arc & Radar\n\t\t$$.hasArcType(targets) && (\n\t\t\t$$.hasType(\"radar\") ?\n\t\t\t\t$$.updateTargetsForRadar(targets) :\n\t\t\t\t$$.updateTargetsForArc(targets)\n\t\t);\n\n\t\t// Sub Chart\n\t\t$$.updateTargetsForSubchart &&\n\t\t\t$$.updateTargetsForSubchart(targets);\n\n\t\t// Fade-in each chart\n\t\t$$.showTargets();\n\t}\n\n\t/**\n\t * Display targeted elements\n\t * @private\n\t */\n\tshowTargets() {\n\t\tconst $$ = this;\n\n\t\t$$.svg.selectAll(`.${CLASS.target}`)\n\t\t\t.filter(d => $$.isTargetToShow(d.id))\n\t\t\t.transition()\n\t\t\t.duration($$.config.transition_duration)\n\t\t\t.style(\"opacity\", \"1\");\n\t}\n\n\tgetWithOption(options) {\n\t\tconst withOptions = {\n\t\t\tY: true,\n\t\t\tSubchart: true,\n\t\t\tTransition: true,\n\t\t\tEventRect: true,\n\t\t\tDimension: true,\n\t\t\tTrimXDomain: true,\n\t\t\tTransform: false,\n\t\t\tUpdateXDomain: false,\n\t\t\tUpdateOrgXDomain: false,\n\t\t\tLegend: false,\n\t\t\tUpdateXAxis: \"UpdateXDomain\",\n\t\t\tTransitionForExit: \"Transition\",\n\t\t\tTransitionForAxis: \"Transition\"\n\t\t};\n\n\t\tObject.keys(withOptions).forEach(key => {\n\t\t\tlet defVal = withOptions[key];\n\n\t\t\tif (isString(defVal)) {\n\t\t\t\tdefVal = withOptions[defVal];\n\t\t\t}\n\n\t\t\twithOptions[key] = getOption(options, `with${key}`, defVal);\n\t\t});\n\n\t\treturn withOptions;\n\t}\n\n\tredraw(options = {}, transitionsValue) {\n\t\tconst $$ = this;\n\t\tconst main = $$.main;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst hasRadar = $$.hasType(\"radar\");\n\n\t\tconst areaIndices = $$.getShapeIndices($$.isAreaType);\n\t\tconst barIndices = $$.getShapeIndices($$.isBarType);\n\t\tconst lineIndices = $$.getShapeIndices($$.isLineType);\n\n\t\tconst hideAxis = $$.hasArcType();\n\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\t\tconst xv = $$.xv.bind($$);\n\n\t\tlet tickValues;\n\t\tlet intervalForCulling;\n\t\tlet xDomainForZoom;\n\n\t\tconst wth = $$.getWithOption(options);\n\t\tconst duration = wth.Transition ? config.transition_duration : 0;\n\t\tconst durationForExit = wth.TransitionForExit ? duration : 0;\n\t\tconst durationForAxis = wth.TransitionForAxis ? duration : 0;\n\n\t\tconst transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis);\n\n\t\t!(options.initializing && config.tooltip_init_show) &&\n\t\t\t$$.inputType === \"touch\" && $$.hideTooltip();\n\n\t\t// update legend and transform each g\n\t\tif (wth.Legend && config.legend_show && !config.legend_contents_bindto) {\n\t\t\t$$.updateLegend($$.mapToIds($$.data.targets), options, transitions);\n\t\t} else if (wth.Dimension) {\n\t\t\t// need to update dimension (e.g. axis.y.tick.values) because y tick values should change\n\t\t\t// no need to update axis in it because they will be updated in redraw()\n\t\t\t$$.updateDimension(true);\n\t\t}\n\n\t\t// MEMO: needed for grids calculation\n\t\tif ($$.isCategorized() && targetsToShow.length === 0) {\n\t\t\t$$.x.domain([0, $$.axes.x.selectAll(\".tick\").size()]);\n\t\t}\n\n\t\tif (targetsToShow.length) {\n\t\t\t$$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain);\n\n\t\t\tif (!config.axis_x_tick_values) {\n\t\t\t\ttickValues = $$.axis.updateXAxisTickValues(targetsToShow);\n\t\t\t}\n\t\t} else {\n\t\t\t$$.xAxis.tickValues([]);\n\t\t\t$$.subXAxis.tickValues([]);\n\t\t}\n\n\t\tif (config.zoom_rescale && !options.flow) {\n\t\t\txDomainForZoom = $$.x.orgDomain();\n\t\t}\n\n\t\t[\"y\", \"y2\"].forEach(key => {\n\t\t\tconst axis = $$[key];\n\t\t\tconst tickValues = config[`axis_${key}_tick_values`];\n\t\t\tconst tickCount = config[`axis_${key}_tick_count`];\n\n\t\t\taxis.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));\n\n\t\t\tif (!tickValues && tickCount) {\n\t\t\t\tconst domain = axis.domain();\n\n\t\t\t\t$$[`${key}Axis`].tickValues(\n\t\t\t\t\t$$.axis.generateTickValues(\n\t\t\t\t\t\tdomain,\n\t\t\t\t\t\tdomain.every(v => v === 0) ? 1 : tickCount,\n\t\t\t\t\t\t$$.isTimeSeriesY()\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\t// axes\n\t\t$$.axis.redraw(transitions, hideAxis);\n\n\t\t// Update axis label\n\t\t$$.axis.updateLabels(wth.Transition);\n\n\t\t// show/hide if manual culling needed\n\t\tif ((wth.UpdateXDomain || wth.UpdateXAxis) && targetsToShow.length) {\n\t\t\tif (config.axis_x_tick_culling && tickValues) {\n\t\t\t\tfor (let i = 1; i < tickValues.length; i++) {\n\t\t\t\t\tif (tickValues.length / i < config.axis_x_tick_culling_max) {\n\t\t\t\t\t\tintervalForCulling = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$$.svg.selectAll(`.${CLASS.axisX} .tick text`).each(function(e) {\n\t\t\t\t\tconst index = tickValues.indexOf(e);\n\n\t\t\t\t\tindex >= 0 &&\n\t\t\t\t\t\td3Select(this).style(\"display\", index % intervalForCulling ? \"none\" : \"block\");\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\t$$.svg.selectAll(`.${CLASS.axisX} .tick text`).style(\"display\", \"block\");\n\t\t\t}\n\t\t}\n\n\t\t// setup drawer - MEMO: these must be called after axis updated\n\t\tconst drawArea = $$.generateDrawArea ?\n\t\t\t$$.generateDrawArea(areaIndices, false) : undefined;\n\n\t\tconst drawBar = $$.generateDrawBar ?\n\t\t\t$$.generateDrawBar(barIndices) : undefined;\n\n\t\tconst drawLine = $$.generateDrawLine ?\n\t\t\t$$.generateDrawLine(lineIndices, false) : undefined;\n\n\t\tconst xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, true);\n\t\tconst yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, false);\n\n\t\t// Update sub domain\n\t\tif (wth.Y) {\n\t\t\t$$.subY.domain($$.getYDomain(targetsToShow, \"y\"));\n\t\t\t$$.subY2.domain($$.getYDomain(targetsToShow, \"y2\"));\n\t\t}\n\n\t\t// xgrid focus\n\t\t$$.updateXgridFocus();\n\n\t\t// Data empty label positioning and text.\n\t\tmain.select(`text.${CLASS.text}.${CLASS.empty}`)\n\t\t\t.attr(\"x\", $$.width / 2)\n\t\t\t.attr(\"y\", $$.height / 2)\n\t\t\t.text(config.data_empty_label_text)\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", targetsToShow.length ? 0 : 1);\n\n\t\t// grid\n\t\t$$.updateGrid(duration);\n\n\t\t// rect for regions\n\t\t$$.updateRegion(duration);\n\n\t\t// bars\n\t\t$$.updateBar(durationForExit);\n\n\t\t// lines, areas and circles\n\t\t$$.updateLine(durationForExit);\n\t\t$$.updateArea(durationForExit);\n\t\t$$.updateCircle();\n\n\t\t// text\n\t\t$$.hasDataLabel() && $$.updateText(durationForExit);\n\n\t\t// title\n\t\t$$.redrawTitle && $$.redrawTitle();\n\n\t\t// arc\n\t\t$$.redrawArc && $$.redrawArc(duration, durationForExit, wth.Transform);\n\n\t\t// radar\n\t\thasRadar && $$.redrawRadar(duration, durationForExit);\n\n\t\t// subchart\n\t\tconfig.subchart_show && $$.redrawSubchart &&\n\t\t\t$$.redrawSubchart(\n\t\t\t\twth.Subchart,\n\t\t\t\ttransitions,\n\t\t\t\tduration,\n\t\t\t\tdurationForExit,\n\t\t\t\tareaIndices,\n\t\t\t\tbarIndices,\n\t\t\t\tlineIndices\n\t\t\t);\n\n\t\t// circles for select\n\t\tmain.selectAll(`.${CLASS.selectedCircles}`)\n\t\t\t.filter($$.isBarType.bind($$))\n\t\t\t.selectAll(\"circle\")\n\t\t\t.remove();\n\n\t\t// event rects will redrawn when flow called\n\t\tif (config.interaction_enabled && !options.flow && wth.EventRect) {\n\t\t\t$$.redrawEventRect();\n\t\t\t$$.bindZoomEvent();\n\t\t}\n\n\t\t// update circleY based on updated parameters\n\t\t$$.updateCircleY();\n\n\t\t// generate circle x/y functions depending on updated params\n\t\tconst cx = (hasRadar ? $$.radarCircleX : (isRotated ? $$.circleY : $$.circleX)).bind($$);\n\t\tconst cy = (hasRadar ? $$.radarCircleY : (isRotated ? $$.circleX : $$.circleY)).bind($$);\n\n\t\t// generate flow\n\t\tconst flow = options.flow && $$.generateFlow({\n\t\t\ttargets: targetsToShow,\n\t\t\tflow: options.flow,\n\t\t\tduration: options.flow.duration,\n\t\t\tdrawBar,\n\t\t\tdrawLine,\n\t\t\tdrawArea,\n\t\t\tcx,\n\t\t\tcy,\n\t\t\txv,\n\t\t\txForText,\n\t\t\tyForText\n\t\t});\n\n\t\tconst isTransition = (duration || flow) && $$.isTabVisible();\n\n\t\t// redraw list\n\t\tconst redrawList = [\n\t\t\t$$.redrawBar(drawBar, isTransition),\n\t\t\t$$.redrawLine(drawLine, isTransition),\n\t\t\t$$.redrawArea(drawArea, isTransition),\n\t\t\t$$.redrawCircle(cx, cy, isTransition, flow),\n\t\t\t$$.redrawText(xForText, yForText, options.flow, isTransition),\n\t\t\t$$.redrawRegion(isTransition),\n\t\t\t$$.redrawGrid(isTransition)\n\t\t];\n\n\t\t// callback function after redraw ends\n\t\tconst afterRedraw = flow || config.onrendered ? () => {\n\t\t\tflow && flow();\n\t\t\tcallFn(config.onrendered, $$);\n\t\t} : null;\n\n\t\tif (afterRedraw) {\n\t\t\t// Only use transition when current tab is visible.\n\t\t\tif (isTransition) {\n\t\t\t\t// Wait for end of transitions for callback\n\t\t\t\tconst waitForDraw = $$.generateWait();\n\n\t\t\t\t// transition should be derived from one transition\n\t\t\t\td3Transition().duration(duration)\n\t\t\t\t\t.each(() => {\n\t\t\t\t\t\tredrawList\n\t\t\t\t\t\t\t.reduce((acc, t1) => acc.concat(t1), [])\n\t\t\t\t\t\t\t.forEach(t => waitForDraw.add(t));\n\t\t\t\t\t})\n\t\t\t\t\t.call(waitForDraw, afterRedraw);\n\t\t\t} else {\n\t\t\t\tafterRedraw();\n\t\t\t}\n\t\t}\n\n\t\t// update fadein condition\n\t\t$$.mapToIds($$.data.targets).forEach(id => {\n\t\t\t$$.withoutFadeIn[id] = true;\n\t\t});\n\t}\n\n\tupdateAndRedraw(options = {}) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet transitions;\n\n\t\t// same with redraw\n\t\toptions.withTransition = getOption(options, \"withTransition\", true);\n\t\toptions.withTransform = getOption(options, \"withTransform\", false);\n\t\toptions.withLegend = getOption(options, \"withLegend\", false);\n\n\t\t// NOT same with redraw\n\t\toptions.withUpdateXDomain = true;\n\t\toptions.withUpdateOrgXDomain = true;\n\t\toptions.withTransitionForExit = false;\n\t\toptions.withTransitionForTransform = getOption(options, \"withTransitionForTransform\", options.withTransition);\n\n\t\t// MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called)\n\t\t$$.updateSizes();\n\n\t\t// MEMO: called in updateLegend in redraw if withLegend\n\t\tif (!(options.withLegend && config.legend_show)) {\n\t\t\ttransitions = $$.axis.generateTransitions(\n\t\t\t\toptions.withTransitionForAxis ? config.transition_duration : 0\n\t\t\t);\n\n\t\t\t// Update scales\n\t\t\t$$.updateScales();\n\t\t\t$$.updateSvgSize();\n\n\t\t\t// Update g positions\n\t\t\t$$.transformAll(options.withTransitionForTransform, transitions);\n\t\t}\n\n\t\t// Draw with new sizes & scales\n\t\t$$.redraw(options, transitions);\n\t}\n\n\tredrawWithoutRescale() {\n\t\tthis.redraw({\n\t\t\twithY: false,\n\t\t\twithSubchart: false,\n\t\t\twithEventRect: false,\n\t\t\twithTransitionForAxis: false\n\t\t});\n\t}\n\n\tisTimeSeries() {\n\t\treturn this.config.axis_x_type === \"timeseries\";\n\t}\n\n\tisCategorized() {\n\t\treturn this.config.axis_x_type.indexOf(\"category\") >= 0 || this.hasType(\"radar\");\n\t}\n\n\tisCustomX() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\treturn !$$.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));\n\t}\n\n\tisTimeSeriesY() {\n\t\treturn this.config.axis_y_type === \"timeseries\";\n\t}\n\n\tgetTranslate(target) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\n\t\tlet x;\n\t\tlet y;\n\n\t\tif (target === \"main\") {\n\t\t\tx = asHalfPixel($$.margin.left);\n\t\t\ty = asHalfPixel($$.margin.top);\n\t\t} else if (target === \"context\") {\n\t\t\tx = asHalfPixel($$.margin2.left);\n\t\t\ty = asHalfPixel($$.margin2.top);\n\t\t} else if (target === \"legend\") {\n\t\t\tx = $$.margin3.left;\n\t\t\ty = $$.margin3.top;\n\t\t} else if (target === \"x\") {\n\t\t\tx = 0;\n\t\t\ty = isRotated ? 0 : $$.height;\n\t\t} else if (target === \"y\") {\n\t\t\tx = 0;\n\t\t\ty = isRotated ? $$.height : 0;\n\t\t} else if (target === \"y2\") {\n\t\t\tx = isRotated ? 0 : $$.width;\n\t\t\ty = isRotated ? 1 : 0;\n\t\t} else if (target === \"subx\") {\n\t\t\tx = 0;\n\t\t\ty = isRotated ? 0 : $$.height2;\n\t\t} else if (target === \"arc\") {\n\t\t\tx = $$.arcWidth / 2;\n\t\t\ty = $$.arcHeight / 2;\n\t\t} else if (target === \"radar\") {\n\t\t\tconst diff = ($$.arcWidth - $$.arcHeight) / 2;\n\n\t\t\tx = Math.max(diff, 0) + 4;\n\t\t\ty = diff < 0 ? Math.abs(diff) : asHalfPixel($$.margin.top);\n\t\t}\n\n\t\treturn `translate(${x}, ${y})`;\n\t}\n\n\tinitialOpacity(d) {\n\t\treturn this.getBaseValue(d) !== null &&\n\t\t\tthis.withoutFadeIn[d.id] ? \"1\" : \"0\";\n\t}\n\n\tinitialOpacityForCircle(d) {\n\t\treturn this.getBaseValue(d) !== null &&\n\t\t\tthis.withoutFadeIn[d.id] ? this.opacityForCircle(d) : \"0\";\n\t}\n\n\topacityForCircle(d) {\n\t\tconst opacity = this.config.point_show ? \"1\" : \"0\";\n\n\t\treturn isValue(this.getBaseValue(d)) ?\n\t\t\t(this.isBubbleType(d) || this.isScatterType(d) ? \"0.5\" : opacity) : \"0\";\n\t}\n\n\topacityForText() {\n\t\treturn this.hasDataLabel() ? \"1\" : \"0\";\n\t}\n\n\txx(d) {\n\t\tconst fn = this.config.zoom_enabled && this.zoomScale ?\n\t\t\tthis.zoomScale : this.x;\n\n\t\treturn d ? fn(d.x) : null;\n\t}\n\n\txv(d) {\n\t\tconst $$ = this;\n\t\tlet value = $$.getBaseValue(d);\n\n\t\tif ($$.isTimeSeries()) {\n\t\t\tvalue = $$.parseDate(value);\n\t\t} else if ($$.isCategorized() && isString(value)) {\n\t\t\tvalue = $$.config.axis_x_categories.indexOf(value);\n\t\t}\n\n\t\treturn Math.ceil($$.x(value));\n\t}\n\n\tyv(d) {\n\t\tconst $$ = this;\n\t\tconst yScale = d.axis && d.axis === \"y2\" ? $$.y2 : $$.y;\n\n\t\treturn Math.ceil(yScale($$.getBaseValue(d)));\n\t}\n\n\tsubxx(d) {\n\t\treturn d ? this.subX(d.x) : null;\n\t}\n\n\ttransformMain(withTransition, transitions) {\n\t\tconst $$ = this;\n\t\tlet xAxis;\n\t\tlet yAxis;\n\t\tlet y2Axis;\n\n\t\tif (transitions && transitions.axisX) {\n\t\t\txAxis = transitions.axisX;\n\t\t} else {\n\t\t\txAxis = $$.main.select(`.${CLASS.axisX}`);\n\n\t\t\tif (withTransition) {\n\t\t\t\txAxis = xAxis.transition();\n\t\t\t}\n\t\t}\n\n\t\tif (transitions && transitions.axisY) {\n\t\t\tyAxis = transitions.axisY;\n\t\t} else {\n\t\t\tyAxis = $$.main.select(`.${CLASS.axisY}`);\n\n\t\t\tif (withTransition) {\n\t\t\t\tyAxis = yAxis.transition();\n\t\t\t}\n\t\t}\n\n\t\tif (transitions && transitions.axisY2) {\n\t\t\ty2Axis = transitions.axisY2;\n\t\t} else {\n\t\t\ty2Axis = $$.main.select(`.${CLASS.axisY2}`);\n\n\t\t\tif (withTransition) {\n\t\t\t\ty2Axis = y2Axis.transition();\n\t\t\t}\n\t\t}\n\n\t\t(withTransition ? $$.main.transition() : $$.main)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"main\"));\n\n\t\txAxis.attr(\"transform\", $$.getTranslate(\"x\"));\n\t\tyAxis.attr(\"transform\", $$.getTranslate(\"y\"));\n\t\ty2Axis.attr(\"transform\", $$.getTranslate(\"y2\"));\n\n\t\t$$.main.select(`.${CLASS.chartArcs}`)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"arc\"));\n\t}\n\n\ttransformAll(withTransition, transitions) {\n\t\tconst $$ = this;\n\n\t\t$$.transformMain(withTransition, transitions);\n\n\t\t$$.config.subchart_show &&\n\t\t\t$$.transformContext(withTransition, transitions);\n\n\t\t$$.legend &&\n\t\t\t$$.transformLegend(withTransition);\n\t}\n\n\tupdateSvgSize() {\n\t\tconst $$ = this;\n\t\tconst brush = $$.svg.select(`.${CLASS.brush} .overlay`);\n\t\tconst brushHeight = brush.size() ? brush.attr(\"height\") : 0;\n\n\t\t$$.svg\n\t\t\t.attr(\"width\", $$.currentWidth)\n\t\t\t.attr(\"height\", $$.currentHeight);\n\n\t\t$$.svg.selectAll([`#${$$.clipId}`, `#${$$.clipIdForGrid}`])\n\t\t\t.select(\"rect\")\n\t\t\t.attr(\"width\", $$.width)\n\t\t\t.attr(\"height\", $$.height);\n\n\t\t$$.svg.select(`#${$$.clipIdForXAxis}`)\n\t\t\t.select(\"rect\")\n\t\t\t.attr(\"x\", $$.getXAxisClipX.bind($$))\n\t\t\t.attr(\"y\", $$.getXAxisClipY.bind($$))\n\t\t\t.attr(\"width\", $$.getXAxisClipWidth.bind($$))\n\t\t\t.attr(\"height\", $$.getXAxisClipHeight.bind($$));\n\n\t\t$$.svg.select(`#${$$.clipIdForYAxis}`)\n\t\t\t.select(\"rect\")\n\t\t\t.attr(\"x\", $$.getYAxisClipX.bind($$))\n\t\t\t.attr(\"y\", $$.getYAxisClipY.bind($$))\n\t\t\t.attr(\"width\", $$.getYAxisClipWidth.bind($$))\n\t\t\t.attr(\"height\", $$.getYAxisClipHeight.bind($$));\n\n\t\t$$.svg.select(`#${$$.clipIdForSubchart}`)\n\t\t\t.select(\"rect\")\n\t\t\t.attr(\"width\", $$.width)\n\t\t\t.attr(\"height\", brushHeight);\n\n\t\t$$.svg.select(`.${CLASS.zoomRect}`)\n\t\t\t.attr(\"width\", $$.width)\n\t\t\t.attr(\"height\", $$.height);\n\n\t\t$$.brush && $$.brush.scale($$.subX, brushHeight);\n\t}\n\n\tupdateDimension(withoutAxis) {\n\t\tconst $$ = this;\n\n\t\tif (!withoutAxis) {\n\t\t\tif ($$.config.axis_rotated) {\n\t\t\t\t$$.axes.x.call($$.xAxis);\n\t\t\t\t$$.axes.subx.call($$.subXAxis);\n\t\t\t} else {\n\t\t\t\t$$.axes.y.call($$.yAxis);\n\t\t\t\t$$.axes.y2.call($$.y2Axis);\n\t\t\t}\n\t\t}\n\n\t\t$$.updateSizes();\n\n\t\t// pass 'withoutAxis' param to not animate at the init rendering\n\t\t$$.updateScales(withoutAxis);\n\n\t\t$$.updateSvgSize();\n\t\t$$.transformAll(false);\n\t}\n\n\tbindResize() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.resizeFunction = $$.generateResize();\n\t\t$$.resizeFunction.add(() => config.onresize.call($$));\n\n\t\tif (config.resize_auto) {\n\t\t\t$$.resizeFunction.add(() => {\n\t\t\t\tisDefined($$.resizeTimeout) &&\n\t\t\t\t\twindow.clearTimeout($$.resizeTimeout);\n\n\t\t\t\t$$.resizeTimeout = window.setTimeout(() => {\n\t\t\t\t\tdelete $$.resizeTimeout;\n\t\t\t\t\t$$.api.flush();\n\t\t\t\t}, 100);\n\t\t\t});\n\t\t}\n\n\t\t$$.resizeFunction.add(() => config.onresized.call($$));\n\n\t\t// attach resize event\n\t\t// get the possible previous attached\n\t\tconst resizeEvents = d3Select(window).on(\"resize.bb\");\n\n\t\tresizeEvents && $$.resizeFunction.add(resizeEvents);\n\t\td3Select(window).on(\"resize.bb\", $$.resizeFunction);\n\t}\n\n\tgenerateResize() {\n\t\tconst resizeFunctions = [];\n\n\t\tfunction callResizeFunctions() {\n\t\t\tresizeFunctions.forEach(f => f());\n\t\t}\n\n\t\tcallResizeFunctions.add = function(f) {\n\t\t\tresizeFunctions.push(f);\n\t\t};\n\n\t\tcallResizeFunctions.remove = function(f) {\n\t\t\tfor (let i = 0, len = resizeFunctions.length; i < len; i++) {\n\t\t\t\tif (resizeFunctions[i] === f) {\n\t\t\t\t\tresizeFunctions.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn callResizeFunctions;\n\t}\n\n\tendall(transition, callback) {\n\t\tlet n = 0;\n\n\t\ttransition\n\t\t\t.each(() => ++n)\n\t\t\t.on(\"end\", function(...args) {\n\t\t\t\t!--n && callback.apply(this, ...args);\n\t\t\t});\n\t}\n\n\tgenerateWait() {\n\t\tlet transitionsToWait = [];\n\t\tconst f = function(transition, callback) {\n\t\t\tlet timer;\n\n\t\t\tfunction loop() {\n\t\t\t\tlet done = 0;\n\n\t\t\t\ttransitionsToWait.forEach(t => {\n\t\t\t\t\tif (t.empty()) {\n\t\t\t\t\t\tdone++;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tt.transition();\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tdone++;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\ttimer && clearTimeout(timer);\n\n\t\t\t\tif (done === transitionsToWait.length) {\n\t\t\t\t\tcallback && callback();\n\t\t\t\t} else {\n\t\t\t\t\ttimer = setTimeout(loop, 50);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tloop();\n\t\t};\n\n\t\tf.add = function(transition) {\n\t\t\tisArray(transition) ?\n\t\t\t\t(transitionsToWait = transitionsToWait.concat(transition)) :\n\t\t\t\ttransitionsToWait.push(transition);\n\t\t};\n\n\t\treturn f;\n\t}\n\n\tparseDate(date) {\n\t\tconst $$ = this;\n\t\tlet parsedDate;\n\n\t\tif (date instanceof Date) {\n\t\t\tparsedDate = date;\n\t\t} else if (isString(date)) {\n\t\t\tparsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date);\n\t\t} else if (isNumber(date) && !isNaN(date)) {\n\t\t\tparsedDate = new Date(+date);\n\t\t}\n\n\t\tif (!parsedDate || isNaN(+parsedDate)) {\n\t\t\tconsole && console.error &&\n\t\t\t\tconsole.error(`Failed to parse x '${date}' to Date object`);\n\t\t}\n\n\t\treturn parsedDate;\n\t}\n\n\tisTabVisible() {\n\t\treturn !document[\n\t\t\t[\"hidden\", \"mozHidden\", \"msHidden\", \"webkitHidden\"]\n\t\t\t\t.filter(v => v in document)[0]\n\t\t];\n\t}\n\n\tconvertInputType() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isMobile = $$.isMobile();\n\t\tconst hasMouse = config.interaction_inputType_mouse && !isMobile ? (\"onmouseover\" in window) : false;\n\t\tlet hasTouch = false;\n\n\t\tif (config.interaction_inputType_touch) {\n\t\t\t// Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js\n\t\t\t// On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true\n\t\t\thasTouch = (\"ontouchmove\" in window) || (window.DocumentTouch && document instanceof window.DocumentTouch);\n\t\t}\n\n\t\treturn (hasMouse && \"mouse\") || (hasTouch && \"touch\") || null;\n\t}\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__4__;","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","module.exports = __WEBPACK_EXTERNAL_MODULE__7__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport bbAxis from \"./bb.axis\";\nimport CLASS from \"../config/classes\";\nimport {capitalize, isFunction, isString, isValue, isEmpty, isNumber, isObjectType} from \"../internals/util\";\n\nconst isHorizontal = ($$, forHorizontal) => {\n\tconst isRotated = $$.config.axis_rotated;\n\n\treturn forHorizontal ? isRotated : !isRotated;\n};\n\nexport default class Axis {\n\tconstructor(owner) {\n\t\tthis.owner = owner;\n\t}\n\n\tinit() {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst main = $$.main;\n\n\t\t[\"x\", \"y\", \"y2\"].forEach(v => {\n\t\t\tconst axisStr = `axis${capitalize(v)}`;\n\t\t\tconst classAxis = `${CLASS.axis} ${CLASS[axisStr]}`;\n\t\t\tconst classLabel = CLASS[`${axisStr}Label`];\n\n\t\t\t$$.axes[v] = main.append(\"g\")\n\t\t\t\t.attr(\"class\", classAxis)\n\t\t\t\t.attr(\"clip-path\", () => {\n\t\t\t\t\tlet res = null;\n\n\t\t\t\t\tif (v === \"x\") {\n\t\t\t\t\t\tres = $$.clipPathForXAxis;\n\t\t\t\t\t} else if (v === \"y\" && config.axis_y_inner) {\n\t\t\t\t\t\tres = $$.clipPathForYAxis;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn res;\n\t\t\t\t})\n\t\t\t\t.attr(\"transform\", $$.getTranslate(v))\n\t\t\t\t.style(\"visibility\", config[`axis_${v}_show`] ? \"visible\" : \"hidden\");\n\n\t\t\t$$.axes[v].append(\"text\")\n\t\t\t\t.attr(\"class\", classLabel)\n\t\t\t\t.attr(\"transform\", [\"rotate(-90)\", null][\n\t\t\t\t\tv === \"x\" ? +!isRotated : +isRotated\n\t\t\t\t])\n\t\t\t\t.style(\"text-anchor\", this.textAnchorForXAxisLabel.bind(this));\n\t\t});\n\t}\n\n\tgetXAxis(axisName, scale, orient, tickFormat,\n\t\ttickValues, withOuterTick, withoutTransition, withoutRotateTickText) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst isCategory = $$.isCategorized();\n\t\tconst axisParams = {\n\t\t\tisCategory,\n\t\t\twithOuterTick,\n\t\t\twithoutTransition,\n\t\t\tconfig,\n\t\t\taxisName,\n\t\t\ttickMultiline: config.axis_x_tick_multiline,\n\t\t\ttickWidth: config.axis_x_tick_width,\n\t\t\ttickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,\n\t\t\ttickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(),\n\t\t\torgXScale: $$.x\n\t\t};\n\n\t\tconst axis = bbAxis(axisParams)\n\t\t\t.scale($$.zoomScale || scale)\n\t\t\t.orient(orient);\n\n\t\tlet newTickValues = tickValues;\n\n\t\tif ($$.isTimeSeries() && tickValues && !isFunction(tickValues)) {\n\t\t\tnewTickValues = tickValues.map(v => $$.parseDate(v));\n\t\t}\n\n\t\t// Set tick\n\t\taxis.tickFormat(tickFormat).tickValues(newTickValues);\n\n\t\tif (isCategory) {\n\t\t\taxis.tickCentered(config.axis_x_tick_centered);\n\n\t\t\tif (isEmpty(config.axis_x_tick_culling)) {\n\t\t\t\tconfig.axis_x_tick_culling = false;\n\t\t\t}\n\t\t}\n\n\t\treturn axis;\n\t}\n\n\tgetYAxis(axisName, scale, orient, tickFormat, tickValues,\n\t\twithOuterTick, withoutTransition, withoutRotateTickText) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst axisParams = {\n\t\t\twithOuterTick,\n\t\t\twithoutTransition,\n\t\t\tconfig,\n\t\t\taxisName,\n\t\t\ttickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate\n\t\t};\n\t\tconst axis = bbAxis(axisParams)\n\t\t\t.scale(scale)\n\t\t\t.orient(orient)\n\t\t\t.tickFormat(tickFormat);\n\n\t\t$$.isTimeSeriesY() ?\n\t\t\t// https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time\n\t\t\taxis.ticks(config.axis_y_tick_time_value) :\n\t\t\taxis.tickValues(tickValues);\n\n\t\treturn axis;\n\t}\n\n\tupdateXAxisTickValues(targets, axis) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst xTickCount = config.axis_x_tick_count;\n\t\tlet tickValues;\n\n\t\tif (config.axis_x_tick_fit || xTickCount) {\n\t\t\ttickValues = this.generateTickValues(\n\t\t\t\t$$.mapTargetsToUniqueXs(targets),\n\t\t\t\txTickCount,\n\t\t\t\t$$.isTimeSeries()\n\t\t\t);\n\t\t}\n\n\t\tif (axis) {\n\t\t\taxis.tickValues(tickValues);\n\t\t} else {\n\t\t\t$$.xAxis.tickValues(tickValues);\n\t\t\t$$.subXAxis.tickValues(tickValues);\n\t\t}\n\n\t\treturn tickValues;\n\t}\n\n\tgetId(id) {\n\t\tconst config = this.owner.config;\n\n\t\treturn id in config.data_axes ? config.data_axes[id] : \"y\";\n\t}\n\n\tgetXAxisTickFormat() {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst tickFormat = config.axis_x_tick_format;\n\t\tconst isTimeSeries = $$.isTimeSeries();\n\t\tconst isCategorized = $$.isCategorized();\n\t\tlet format;\n\n\t\tif (tickFormat) {\n\t\t\tif (isFunction(tickFormat)) {\n\t\t\t\tformat = tickFormat;\n\t\t\t} else if (isTimeSeries) {\n\t\t\t\tformat = date => (date ? $$.axisTimeFormat(tickFormat)(date) : \"\");\n\t\t\t}\n\t\t} else {\n\t\t\tformat = isTimeSeries ? $$.defaultAxisTimeFormat : (\n\t\t\t\tisCategorized ?\n\t\t\t\t\t$$.categoryName : v => (v < 0 ? v.toFixed(0) : v)\n\t\t\t);\n\t\t}\n\n\t\treturn isFunction(format) ? v =>\n\t\t\tformat.apply($$, isCategorized ?\n\t\t\t\t[v, $$.categoryName(v)] : [v]\n\t\t\t) : format;\n\t}\n\n\tgetTickValues(type) {\n\t\tconst $$ = this.owner;\n\t\tconst tickValues = $$.config[`axis_${type}_tick_values`];\n\t\tconst axis = $$[`${type}Axis`];\n\n\t\treturn tickValues || (axis ? axis.tickValues() : undefined);\n\t}\n\n\tgetXAxisTickValues() {\n\t\treturn this.getTickValues(\"x\");\n\t}\n\n\tgetYAxisTickValues() {\n\t\treturn this.getTickValues(\"y\");\n\t}\n\n\tgetY2AxisTickValues() {\n\t\treturn this.getTickValues(\"y2\");\n\t}\n\n\tgetLabelOptionByAxisId(axisId) {\n\t\treturn this.owner.config[`axis_${axisId}_label`];\n\t}\n\n\tgetLabelText(axisId) {\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\n\n\t\treturn isString(option) ? option : (\n\t\t\toption ? option.text : null\n\t\t);\n\t}\n\n\tsetLabelText(axisId, text) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\n\n\t\tif (isString(option)) {\n\t\t\tconfig[`axis_${axisId}_label`] = text;\n\t\t} else if (option) {\n\t\t\toption.text = text;\n\t\t}\n\t}\n\n\tgetLabelPosition(axisId, defaultPosition) {\n\t\tconst isRotated = this.owner.config.axis_rotated;\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\n\t\tconst position = (isObjectType(option) && option.position) ?\n\t\t\toption.position : defaultPosition[+!isRotated];\n\n\t\tconst has = v => !!~position.indexOf(v);\n\n\t\treturn {\n\t\t\tisInner: has(\"inner\"),\n\t\t\tisOuter: has(\"outer\"),\n\t\t\tisLeft: has(\"left\"),\n\t\t\tisCenter: has(\"center\"),\n\t\t\tisRight: has(\"right\"),\n\t\t\tisTop: has(\"top\"),\n\t\t\tisMiddle: has(\"middle\"),\n\t\t\tisBottom: has(\"bottom\")\n\t\t};\n\t}\n\n\tgetXAxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"x\", [\"inner-top\", \"inner-right\"]);\n\t}\n\n\tgetYAxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"y\", [\"inner-right\", \"inner-top\"]);\n\t}\n\n\tgetY2AxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"y2\", [\"inner-right\", \"inner-top\"]);\n\t}\n\n\tgetLabelPositionById(id) {\n\t\treturn this[`get${id.toUpperCase()}AxisLabelPosition`]();\n\t}\n\n\ttextForXAxisLabel() {\n\t\treturn this.getLabelText(\"x\");\n\t}\n\n\ttextForYAxisLabel() {\n\t\treturn this.getLabelText(\"y\");\n\t}\n\n\ttextForY2AxisLabel() {\n\t\treturn this.getLabelText(\"y2\");\n\t}\n\n\txForAxisLabel(position, forHorizontal = true) {\n\t\tconst $$ = this.owner;\n\t\tlet x = position.isMiddle ? -$$.height / 2 : 0;\n\n\t\tif (isHorizontal($$, forHorizontal)) {\n\t\t\tx = position.isLeft ? 0 : (\n\t\t\t\tposition.isCenter ? $$.width / 2 : $$.width\n\t\t\t);\n\t\t} else if (position.isBottom) {\n\t\t\tx = -$$.height;\n\t\t}\n\n\t\treturn x;\n\t}\n\n\tdxForAxisLabel(position, forHorizontal = true) {\n\t\tconst $$ = this.owner;\n\t\tlet dx = position.isBottom ? \"0.5em\" : \"0\";\n\n\t\tif (isHorizontal($$, forHorizontal)) {\n\t\t\tdx = position.isLeft ? \"0.5em\" : (\n\t\t\t\tposition.isRight ? \"-0.5em\" : \"0\"\n\t\t\t);\n\t\t} else if (position.isTop) {\n\t\t\tdx = \"-0.5em\";\n\t\t}\n\n\t\treturn dx;\n\t}\n\n\ttextAnchorForAxisLabel(position, forHorizontal = true) {\n\t\tconst $$ = this.owner;\n\t\tlet anchor = position.isMiddle ? \"middle\" : \"end\";\n\n\t\tif (isHorizontal($$, forHorizontal)) {\n\t\t\tanchor = position.isLeft ? \"start\" : (\n\t\t\t\tposition.isCenter ? \"middle\" : \"end\"\n\t\t\t);\n\t\t} else if (position.isBottom) {\n\t\t\tanchor = \"start\";\n\t\t}\n\n\t\treturn anchor;\n\t}\n\n\txForXAxisLabel() {\n\t\treturn this.xForAxisLabel(this.getXAxisLabelPosition(), false);\n\t}\n\n\txForYAxisLabel() {\n\t\treturn this.xForAxisLabel(this.getYAxisLabelPosition());\n\t}\n\n\txForY2AxisLabel() {\n\t\treturn this.xForAxisLabel(this.getY2AxisLabelPosition());\n\t}\n\n\tdxForXAxisLabel() {\n\t\treturn this.dxForAxisLabel(this.getXAxisLabelPosition(), false);\n\t}\n\n\tdxForYAxisLabel() {\n\t\treturn this.dxForAxisLabel(this.getYAxisLabelPosition());\n\t}\n\n\tdxForY2AxisLabel() {\n\t\treturn this.dxForAxisLabel(this.getY2AxisLabelPosition());\n\t}\n\n\tdyForXAxisLabel() {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst isInner = this.getXAxisLabelPosition().isInner;\n\t\tconst xHeight = config.axis_x_height;\n\n\t\tif (config.axis_rotated) {\n\t\t\treturn isInner ? \"1.2em\" : -25 - this.getMaxTickWidth(\"x\");\n\t\t} else if (isInner) {\n\t\t\treturn \"-0.5em\";\n\t\t} else if (xHeight) {\n\t\t\treturn xHeight - 10;\n\t\t} else {\n\t\t\treturn \"3em\";\n\t\t}\n\t}\n\n\tdyForYAxisLabel() {\n\t\tconst $$ = this.owner;\n\t\tconst isInner = this.getYAxisLabelPosition().isInner;\n\n\t\tif ($$.config.axis_rotated) {\n\t\t\treturn isInner ? \"-0.5em\" : \"3em\";\n\t\t} else {\n\t\t\treturn isInner ? \"1.2em\" : -10 - ($$.config.axis_y_inner ? 0 : (this.getMaxTickWidth(\"y\") + 10));\n\t\t}\n\t}\n\n\tdyForY2AxisLabel() {\n\t\tconst $$ = this.owner;\n\t\tconst isInner = this.getY2AxisLabelPosition().isInner;\n\n\t\tif ($$.config.axis_rotated) {\n\t\t\treturn isInner ? \"1.2em\" : \"-2.2em\";\n\t\t} else {\n\t\t\treturn isInner ? \"-0.5em\" : 15 + ($$.config.axis_y2_inner ? 0 : (this.getMaxTickWidth(\"y2\") + 15));\n\t\t}\n\t}\n\n\ttextAnchorForXAxisLabel() {\n\t\treturn this.textAnchorForAxisLabel(this.getXAxisLabelPosition(), false);\n\t}\n\n\ttextAnchorForYAxisLabel() {\n\t\treturn this.textAnchorForAxisLabel(this.getYAxisLabelPosition());\n\t}\n\n\ttextAnchorForY2AxisLabel() {\n\t\treturn this.textAnchorForAxisLabel(this.getY2AxisLabelPosition());\n\t}\n\n\tgetMaxTickWidth(id, withoutRecompute) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tconst currentTickMax = $$.currentMaxTickWidths;\n\t\tlet maxWidth = 0;\n\n\t\tif (withoutRecompute && currentTickMax[id]) {\n\t\t\treturn currentTickMax[id];\n\t\t}\n\n\t\tif ($$.svg) {\n\t\t\tconst isYAxis = /^y2?$/.test(id);\n\t\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\t\t\tconst getFrom = isYAxis ? \"getY\" : \"getX\";\n\n\t\t\tconst scale = $$[id].copy().domain($$[`${getFrom}Domain`](targetsToShow, id));\n\t\t\tconst axis = this[`${getFrom}Axis`](\n\t\t\t\tid,\n\t\t\t\tscale,\n\t\t\t\t$$[`${id}Orient`],\n\t\t\t\tisYAxis ? config[`axis_${id}_tick_format`] : $$.xAxisTickFormat,\n\t\t\t\tnull,\n\t\t\t\tfalse,\n\t\t\t\ttrue,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\t!isYAxis && this.updateXAxisTickValues(targetsToShow, axis);\n\n\t\t\tconst dummy = $$.selectChart.append(\"svg\")\n\t\t\t\t.style(\"visibility\", \"hidden\");\n\n\t\t\tdummy.call(axis).selectAll(\"text\")\n\t\t\t\t.each(function() {\n\t\t\t\t\tmaxWidth = Math.max(maxWidth, this.getBoundingClientRect().width);\n\t\t\t\t});\n\n\t\t\tdummy.remove();\n\t\t}\n\n\t\tif (maxWidth > 0) {\n\t\t\tcurrentTickMax[id] = maxWidth;\n\t\t}\n\n\t\treturn currentTickMax[id];\n\t}\n\n\tupdateLabels(withTransition) {\n\t\tconst $$ = this.owner;\n\t\tconst labels = {\n\t\t\tX: $$.main.select(`.${CLASS.axisX} .${CLASS.axisXLabel}`),\n\t\t\tY: $$.main.select(`.${CLASS.axisY} .${CLASS.axisYLabel}`),\n\t\t\tY2: $$.main.select(`.${CLASS.axisY2} .${CLASS.axisY2Label}`)\n\t\t};\n\n\t\tObject.keys(labels).forEach(v => {\n\t\t\tconst node = labels[v];\n\t\t\tconst axisLabel = `${v}AxisLabel`;\n\n\t\t\t(withTransition ? node.transition() : node)\n\t\t\t\t.attr(\"x\", this[`xFor${axisLabel}`].bind(this))\n\t\t\t\t.attr(\"dx\", this[`dxFor${axisLabel}`].bind(this))\n\t\t\t\t.attr(\"dy\", this[`dyFor${axisLabel}`].bind(this))\n\t\t\t\t.text(this[`textFor${axisLabel}`].bind(this));\n\t\t});\n\t}\n\n\tgetPadding(padding, key, defaultValue, domainLength) {\n\t\tconst p = isNumber(padding) ? padding : padding[key];\n\n\t\tif (!isValue(p)) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\tif (padding.unit === \"ratio\") {\n\t\t\treturn padding[key] * domainLength;\n\t\t}\n\n\t\t// assume padding is pixels if unit is not specified\n\t\treturn this.convertPixelsToAxisPadding(p, domainLength);\n\t}\n\n\tconvertPixelsToAxisPadding(pixels, domainLength) {\n\t\tconst $$ = this.owner;\n\t\tconst length = $$.config.axis_rotated ? $$.width : $$.height;\n\n\t\treturn domainLength * (pixels / length);\n\t}\n\n\tgenerateTickValues(values, tickCount, forTimeSeries) {\n\t\tlet tickValues = values;\n\t\tlet start;\n\t\tlet end;\n\t\tlet count;\n\t\tlet interval;\n\t\tlet i;\n\t\tlet tickValue;\n\n\t\tif (tickCount) {\n\t\t\tconst targetCount = isFunction(tickCount) ? tickCount() : tickCount;\n\n\t\t\t// compute ticks according to tickCount\n\t\t\tif (targetCount === 1) {\n\t\t\t\ttickValues = [values[0]];\n\t\t\t} else if (targetCount === 2) {\n\t\t\t\ttickValues = [values[0], values[values.length - 1]];\n\t\t\t} else if (targetCount > 2) {\n\t\t\t\tcount = targetCount - 2;\n\t\t\t\tstart = values[0];\n\t\t\t\tend = values[values.length - 1];\n\t\t\t\tinterval = (end - start) / (count + 1);\n\n\t\t\t\t// re-construct unique values\n\t\t\t\ttickValues = [start];\n\n\t\t\t\tfor (i = 0; i < count; i++) {\n\t\t\t\t\ttickValue = +start + interval * (i + 1);\n\t\t\t\t\ttickValues.push(forTimeSeries ? new Date(tickValue) : tickValue);\n\t\t\t\t}\n\n\t\t\t\ttickValues.push(end);\n\t\t\t}\n\t\t}\n\n\t\tif (!forTimeSeries) {\n\t\t\ttickValues = tickValues.sort((a, b) => a - b);\n\t\t}\n\n\t\treturn tickValues;\n\t}\n\n\tgenerateTransitions(duration) {\n\t\tconst $$ = this.owner;\n\t\tconst axes = $$.axes;\n\n\t\tconst [axisX, axisY, axisY2, axisSubX] = [\"x\", \"y\", \"y2\", \"subx\"]\n\t\t\t.map(v => (duration ? axes[v].transition().duration(duration) : axes[v]));\n\n\t\treturn {axisX, axisY, axisY2, axisSubX};\n\t}\n\n\tredraw(transitions, isHidden) {\n\t\tconst $$ = this.owner;\n\t\tconst opacity = isHidden ? \"0\" : \"1\";\n\n\t\t[\"x\", \"y\", \"y2\", \"subx\"].forEach(v => {\n\t\t\t$$.axes[v].style(\"opacity\", opacity);\n\t\t});\n\n\t\ttransitions.axisX.call($$.xAxis);\n\t\ttransitions.axisY.call($$.yAxis);\n\t\ttransitions.axisY2.call($$.y2Axis);\n\t\ttransitions.axisSubX.call($$.subXAxis);\n\t}\n}\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n * @ignore\n */\nimport {scaleLinear as d3ScaleLinear} from \"d3-scale\";\nimport {select as d3Select} from \"d3-selection\";\nimport {isArray, toArray, isDefined, isFunction, isString, isNumber} from \"../internals/util\";\n\n// Features:\n// 1. category axis\n// 2. ceil values of translate/x/y to int for half pixel anti-aliasing\n// 3. multiline tick text\n\n/**\n * Compute a character dimension\n * @param {d3.selection} node\n * @return {{w: number, h: number}}\n * @private\n */\nconst getSizeFor1Char = node => {\n\t// default size for one character\n\tconst size = {\n\t\tw: 5.5,\n\t\th: 11.5\n\t};\n\n\t!node.empty() && node.select(\"text\")\n\t\t.text(\"0\")\n\t\t.call(el => {\n\t\t\ttry {\n\t\t\t\tconst box = el.node().getBBox();\n\t\t\t\tconst h = box.height;\n\t\t\t\tconst w = box.width;\n\n\t\t\t\tif (h && w) {\n\t\t\t\t\tsize.h = h;\n\t\t\t\t\tsize.w = w;\n\t\t\t\t}\n\n\t\t\t\tel.text(\"\");\n\t\t\t} catch (e) {}\n\t\t});\n\n\treturn (getSizeFor1Char.size = size);\n};\n\nexport default function(params = {}) {\n\tlet scale = d3ScaleLinear();\n\tlet orient = \"bottom\";\n\tconst innerTickSize = 6;\n\tconst outerTickSize = params.withOuterTick ? 6 : 0;\n\tconst tickPadding = 3;\n\tlet tickValues = null;\n\tlet tickFormat;\n\tlet tickArguments;\n\tlet tickOffset = 0;\n\tlet tickCulling = true;\n\tlet tickCentered;\n\tlet transition;\n\n\tfunction axisX(selection, x) {\n\t\tselection.attr(\"transform\", d => `translate(${Math.ceil(x(d) + tickOffset)}, 0)`);\n\t}\n\n\tfunction axisY(selection, y) {\n\t\tselection.attr(\"transform\", d => `translate(0,${Math.ceil(y(d))})`);\n\t}\n\n\tfunction scaleExtent(domain) {\n\t\tconst start = domain[0];\n\t\tconst stop = domain[domain.length - 1];\n\n\t\treturn start < stop ? [start, stop] : [stop, start];\n\t}\n\n\tfunction generateTicks(scale) {\n\t\tconst ticks = [];\n\n\t\tif (scale.ticks) {\n\t\t\treturn scale.ticks(\n\t\t\t\t...(tickArguments ? toArray(tickArguments) : [])\n\t\t\t).map(v => (\n\t\t\t\t// round the tick value if is number\n\t\t\t\t(isString(v) && isNumber(v) && !isNaN(v) &&\n\t\t\t\t\tMath.round(v * 10) / 10\n\t\t\t\t) || v\n\t\t\t));\n\t\t}\n\n\t\tconst domain = scale.domain();\n\n\t\tfor (let i = Math.ceil(domain[0]); i < domain[1]; i++) {\n\t\t\tticks.push(i);\n\t\t}\n\n\t\tif (ticks.length > 0 && ticks[0] > 0) {\n\t\t\tticks.unshift(ticks[0] - (ticks[1] - ticks[0]));\n\t\t}\n\n\t\treturn ticks;\n\t}\n\n\tfunction copyScale() {\n\t\tconst newScale = scale.copy();\n\n\t\tif (!newScale.domain().length) {\n\t\t\tnewScale.domain(scale.domain());\n\t\t}\n\n\t\treturn newScale;\n\t}\n\n\tfunction textFormatted(v) {\n\t\t// to round float numbers from 'binary floating point'\n\t\t// https://en.wikipedia.org/wiki/Double-precision_floating-point_format\n\t\t// https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand\n\t\tconst value = /\\d+\\.\\d+0{5,}\\d$/.test(v) ? +String(v).replace(/0+\\d$/, \"\") : v;\n\t\tconst formatted = tickFormat ? tickFormat(value) : value;\n\n\t\treturn isDefined(formatted) ? formatted : \"\";\n\t}\n\n\tfunction transitionise(selection) {\n\t\treturn params.withoutTransition ?\n\t\t\tselection.interrupt() : selection.transition(transition);\n\t}\n\n\tfunction axis(g) {\n\t\tg.each(function() {\n\t\t\tconst g = d3Select(this);\n\n\t\t\taxis.g = g;\n\n\t\t\tlet scale0 = this.__chart__ || scale;\n\t\t\tlet scale1 = copyScale();\n\n\t\t\tthis.__chart__ = scale1;\n\n\t\t\t// count of tick data in array\n\t\t\tconst ticks = tickValues || generateTicks(scale1);\n\n\t\t\t// update selection\n\t\t\tlet tick = g.selectAll(\".tick\")\n\t\t\t\t.data(ticks, scale1);\n\n\t\t\t// enter selection\n\t\t\tconst tickEnter = tick\n\t\t\t\t.enter()\n\t\t\t\t.insert(\"g\", \".domain\")\n\t\t\t\t.attr(\"class\", \"tick\")\n\t\t\t\t.style(\"opacity\", \"1\");\n\n\t\t\t// MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks.\n\t\t\tconst tickExit = tick.exit().remove();\n\n\t\t\t// enter + update selection\n\t\t\ttick = tickEnter.merge(tick);\n\n\t\t\tconst tickUpdate = transitionise(tick).style(\"opacity\", \"1\");\n\t\t\tlet tickX;\n\t\t\tlet tickY;\n\n\t\t\tconst range = scale.rangeExtent ?\n\t\t\t\tscale.rangeExtent() :\n\t\t\t\tscaleExtent((params.orgXScale || scale).range());\n\n\t\t\t// update selection - data join\n\t\t\tconst path = g.selectAll(\".domain\").data([0]);\n\n\t\t\t// enter + update selection\n\t\t\tconst pathUpdate = path.enter()\n\t\t\t\t.append(\"path\")\n\t\t\t\t.attr(\"class\", \"domain\")\n\t\t\t\t.merge(transitionise(path));\n\n\t\t\ttickEnter.append(\"line\");\n\t\t\ttickEnter.append(\"text\");\n\n\t\t\tconst lineEnter = tickEnter.select(\"line\");\n\t\t\tconst lineUpdate = tickUpdate.select(\"line\");\n\t\t\tconst textEnter = tickEnter.select(\"text\");\n\t\t\tconst textUpdate = tickUpdate.select(\"text\");\n\n\t\t\tif (params.isCategory) {\n\t\t\t\ttickOffset = Math.ceil((scale1(1) - scale1(0)) / 2);\n\t\t\t\ttickX = tickCentered ? 0 : tickOffset;\n\t\t\t\ttickY = tickCentered ? tickOffset : 0;\n\t\t\t} else {\n\t\t\t\ttickX = 0;\n\t\t\t\ttickOffset = tickX;\n\t\t\t}\n\n\t\t\tconst sizeFor1Char = getSizeFor1Char.size || getSizeFor1Char(g.select(\".tick\"));\n\t\t\tconst counts = [];\n\t\t\tconst tickLength = Math.max(innerTickSize, 0) + tickPadding;\n\n\t\t\tconst isLeftRight = /^(left|right)$/.test(orient);\n\t\t\tconst isTopBottom = /^(top|bottom)$/.test(orient);\n\n\t\t\t// this should be called only when category axis\n\t\t\tfunction splitTickText(d, maxWidthValue) {\n\t\t\t\tconst tickText = textFormatted(d);\n\t\t\t\tconst splitted = isString(tickText) && tickText.indexOf(\"\\n\") > -1 ?\n\t\t\t\t\ttickText.split(\"\\n\") : [];\n\n\t\t\t\tif (splitted.length) {\n\t\t\t\t\treturn splitted;\n\t\t\t\t}\n\n\t\t\t\tlet maxWidth = maxWidthValue;\n\t\t\t\tlet subtext;\n\t\t\t\tlet spaceIndex;\n\t\t\t\tlet textWidth;\n\n\t\t\t\tif (isArray(tickText)) {\n\t\t\t\t\treturn tickText;\n\t\t\t\t}\n\n\t\t\t\tif (!maxWidth || maxWidth <= 0) {\n\t\t\t\t\tmaxWidth = isLeftRight ? 95 : (\n\t\t\t\t\t\tparams.isCategory ?\n\t\t\t\t\t\t\t(Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12) : 110\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tfunction split(splitted, text) {\n\t\t\t\t\tspaceIndex = undefined;\n\n\t\t\t\t\tfor (let i = 1; i < text.length; i++) {\n\t\t\t\t\t\tif (text.charAt(i) === \" \") {\n\t\t\t\t\t\t\tspaceIndex = i;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsubtext = text.substr(0, i + 1);\n\t\t\t\t\t\ttextWidth = sizeFor1Char.w * subtext.length;\n\n\t\t\t\t\t\t// if text width gets over tick width, split by space index or current index\n\t\t\t\t\t\tif (maxWidth < textWidth) {\n\t\t\t\t\t\t\treturn split(\n\t\t\t\t\t\t\t\tsplitted.concat(text.substr(0, spaceIndex || i)),\n\t\t\t\t\t\t\t\ttext.slice(spaceIndex ? spaceIndex + 1 : i)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn splitted.concat(text);\n\t\t\t\t}\n\n\t\t\t\treturn split(splitted, String(tickText));\n\t\t\t}\n\n\t\t\tlet tspan = tick.select(\"text\")\n\t\t\t\t.selectAll(\"tspan\")\n\t\t\t\t.data((d, index) => {\n\t\t\t\t\tconst split = params.tickMultiline ?\n\t\t\t\t\t\tsplitTickText(d, params.tickWidth) : (\n\t\t\t\t\t\t\tisArray(textFormatted(d)) ?\n\t\t\t\t\t\t\t\ttextFormatted(d).concat() : [textFormatted(d)]\n\t\t\t\t\t\t);\n\n\t\t\t\t\tcounts[index] = split.length;\n\n\t\t\t\t\treturn split.map(splitted => ({index, splitted}));\n\t\t\t\t});\n\n\t\t\ttspan.exit().remove();\n\n\t\t\ttspan = tspan\n\t\t\t\t.enter()\n\t\t\t\t.append(\"tspan\")\n\t\t\t\t.merge(tspan)\n\t\t\t\t.text(d => d.splitted);\n\n\t\t\t// line/text enter and path update\n\t\t\tconst tickTransform = isTopBottom ? axisX : axisY;\n\t\t\tconst sign = /^(top|left)$/.test(orient) ? -1 : 1;\n\t\t\tconst axisPx = tickTransform === axisX ? \"y\" : \"x\";\n\n\t\t\tlineEnter.attr(`${axisPx}2`, innerTickSize * sign);\n\t\t\ttextEnter.attr(`${axisPx}`, tickLength * sign);\n\n\t\t\tpathUpdate.attr(\"d\", () => {\n\t\t\t\tconst outerTickSized = outerTickSize * sign;\n\n\t\t\t\treturn isTopBottom ?\n\t\t\t\t\t`M${range[0]},${outerTickSized}V0H${range[1]}V${outerTickSized}` :\n\t\t\t\t\t`M${outerTickSized},${range[0]}H0V${range[1]}H${outerTickSized}`;\n\t\t\t});\n\n\t\t\t// tick text helpers\n\t\t\tconst rotate = params.tickTextRotate;\n\t\t\tconst tickSize = d => {\n\t\t\t\tconst tickPosition = scale(d) + (tickCentered ? 0 : tickOffset);\n\n\t\t\t\treturn range[0] < tickPosition && tickPosition < range[1] ? innerTickSize : 0;\n\t\t\t};\n\t\t\tconst textAnchorForText = r => (!r ? \"middle\" : (r > 0 ? \"start\" : \"end\"));\n\t\t\tconst textTransform = r => (r ? `rotate(${r})` : null);\n\t\t\tconst yForText = r => (r ? 11.5 - 2.5 * (r / 15) * (r > 0 ? 1 : -1) : tickLength);\n\n\t\t\t// get the axis' tick position configuration\n\t\t\tconst tickTextPos = params.axisName && /^(x|y|y2)$/.test(params.axisName) ?\n\t\t\t\tparams.config[`axis_${params.axisName}_tick_text_position`] : {x: 0, y: 0};\n\n\t\t\t// set 's position\n\t\t\ttspan\n\t\t\t\t.attr(\"x\", isTopBottom ? 0 : tickLength * sign)\n\t\t\t\t.attr(\"dx\", (() => {\n\t\t\t\t\tlet dx = 0;\n\n\t\t\t\t\tif (orient === \"bottom\" && rotate) {\n\t\t\t\t\t\tdx = 8 * Math.sin(Math.PI * (rotate / 180));\n\t\t\t\t\t}\n\n\t\t\t\t\treturn dx + (tickTextPos.x || 0);\n\t\t\t\t})())\n\t\t\t\t.attr(\"dy\", (d, i) => {\n\t\t\t\t\tconst defValue = \".71em\";\n\t\t\t\t\tlet dy = 0;\n\n\t\t\t\t\tif (orient !== \"top\") {\n\t\t\t\t\t\tif (i === 0) {\n\t\t\t\t\t\t\tdy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) :\n\t\t\t\t\t\t\t\t(tickTextPos.y === 0 ? defValue : 0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdy = sizeFor1Char.h;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn isNumber(dy) && tickTextPos.y ?\n\t\t\t\t\t\tdy + tickTextPos.y : dy || defValue;\n\t\t\t\t});\n\n\t\t\tswitch (orient) {\n\t\t\t\tcase \"bottom\":\n\t\t\t\t\tlineUpdate\n\t\t\t\t\t\t.attr(\"x1\", tickX)\n\t\t\t\t\t\t.attr(\"x2\", tickX)\n\t\t\t\t\t\t.attr(\"y2\", tickSize);\n\n\t\t\t\t\ttextUpdate\n\t\t\t\t\t\t.attr(\"x\", 0)\n\t\t\t\t\t\t.attr(\"y\", yForText(rotate))\n\t\t\t\t\t\t.style(\"text-anchor\", textAnchorForText(rotate))\n\t\t\t\t\t\t.attr(\"transform\", textTransform(rotate));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"top\":\n\t\t\t\t\tlineUpdate\n\t\t\t\t\t\t.attr(\"x2\", 0)\n\t\t\t\t\t\t.attr(\"y2\", -innerTickSize);\n\n\t\t\t\t\ttextUpdate\n\t\t\t\t\t\t.attr(\"x\", 0)\n\t\t\t\t\t\t.attr(\"y\", -tickLength)\n\t\t\t\t\t\t.style(\"text-anchor\", \"middle\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tlineUpdate\n\t\t\t\t\t\t.attr(\"x2\", -innerTickSize)\n\t\t\t\t\t\t.attr(\"y1\", tickY)\n\t\t\t\t\t\t.attr(\"y2\", tickY);\n\n\t\t\t\t\ttextUpdate\n\t\t\t\t\t\t.attr(\"x\", -tickLength)\n\t\t\t\t\t\t.attr(\"y\", tickOffset)\n\t\t\t\t\t\t.style(\"text-anchor\", \"end\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tlineUpdate\n\t\t\t\t\t\t.attr(\"x2\", innerTickSize)\n\t\t\t\t\t\t.attr(\"y2\", 0);\n\n\t\t\t\t\ttextUpdate\n\t\t\t\t\t\t.attr(\"x\", tickLength)\n\t\t\t\t\t\t.attr(\"y\", 0)\n\t\t\t\t\t\t.style(\"text-anchor\", \"start\");\n\t\t\t}\n\n\t\t\t// Append for tooltip display\n\t\t\tparams.tickTitle && textUpdate.append && textUpdate.append(\"title\")\n\t\t\t\t.each(function(index) {\n\t\t\t\t\td3Select(this).text(params.tickTitle[index]);\n\t\t\t\t});\n\n\t\t\tif (scale1.bandwidth) {\n\t\t\t\tconst x = scale1;\n\t\t\t\tconst dx = x.bandwidth() / 2;\n\n\t\t\t\tscale0 = d => x(d) + dx;\n\t\t\t\tscale1 = scale0;\n\t\t\t} else if (scale0.bandwidth) {\n\t\t\t\tscale0 = scale1;\n\t\t\t} else {\n\t\t\t\ttickExit.call(tickTransform, scale1);\n\t\t\t}\n\n\t\t\ttickEnter.call(tickTransform, scale0);\n\t\t\ttickUpdate.call(tickTransform, scale1);\n\t\t});\n\t}\n\n\taxis.scale = function(x) {\n\t\tif (!arguments.length) {\n\t\t\treturn scale;\n\t\t}\n\n\t\tscale = x;\n\n\t\treturn axis;\n\t};\n\n\taxis.orient = function(x) {\n\t\tif (!arguments.length) {\n\t\t\treturn orient;\n\t\t}\n\n\t\torient = x in {\n\t\t\ttop: 1,\n\t\t\tright: 1,\n\t\t\tbottom: 1,\n\t\t\tleft: 1\n\t\t} ? String(x) : \"bottom\";\n\n\t\treturn axis;\n\t};\n\n\taxis.tickFormat = function(format) {\n\t\tif (!arguments.length) {\n\t\t\treturn tickFormat;\n\t\t}\n\n\t\ttickFormat = format;\n\n\t\treturn axis;\n\t};\n\n\taxis.tickCentered = function(isCentered) {\n\t\tif (!arguments.length) {\n\t\t\treturn tickCentered;\n\t\t}\n\n\t\ttickCentered = isCentered;\n\n\t\treturn axis;\n\t};\n\n\t/**\n\t * Return tick's offset value.\n\t * The value will be set for 'category' axis type.\n\t * @return {number}\n\t * @private\n\t */\n\taxis.tickOffset = () => tickOffset;\n\n\t/**\n\t * Get tick interval count\n\t * @private\n\t * @param {Number} size Total data size\n\t * @return {number}\n\t */\n\taxis.tickInterval = function(size) {\n\t\tlet interval;\n\n\t\tif (params.isCategory) {\n\t\t\tinterval = tickOffset * 2;\n\t\t} else {\n\t\t\tconst length = axis.g.select(\"path.domain\")\n\t\t\t\t.node()\n\t\t\t\t.getTotalLength() - outerTickSize * 2;\n\n\t\t\tinterval = length / (size || axis.g.selectAll(\"line\").size());\n\t\t}\n\n\t\treturn interval === Infinity ? 0 : interval;\n\t};\n\n\taxis.ticks = function(...args) {\n\t\tif (!args.length) {\n\t\t\treturn tickArguments;\n\t\t}\n\n\t\ttickArguments = toArray(args);\n\n\t\treturn axis;\n\t};\n\n\taxis.tickCulling = function(culling) {\n\t\tif (!arguments.length) {\n\t\t\treturn tickCulling;\n\t\t}\n\n\t\ttickCulling = culling;\n\n\t\treturn axis;\n\t};\n\n\taxis.tickValues = function(x) {\n\t\tif (isFunction(x)) {\n\t\t\ttickValues = () => x(scale.domain());\n\t\t} else {\n\t\t\tif (!arguments.length) {\n\t\t\t\treturn tickValues;\n\t\t\t}\n\n\t\t\ttickValues = x;\n\t\t}\n\n\t\treturn axis;\n\t};\n\n\taxis.setTransition = t => {\n\t\ttransition = t;\n\n\t\treturn axis;\n\t};\n\n\treturn axis;\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__10__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {event as d3Event} from \"d3-selection\";\nimport {brushSelection as d3BrushSelection} from \"d3-brush\";\nimport CLASS from \"../config/classes\";\n\nconst isValue = v => v || v === 0;\nconst isFunction = v => typeof v === \"function\";\nconst isString = v => typeof v === \"string\";\nconst isNumber = v => typeof v === \"number\";\nconst isUndefined = v => typeof v === \"undefined\";\nconst isDefined = v => typeof v !== \"undefined\";\nconst isBoolean = v => typeof v === \"boolean\";\nconst ceil10 = v => Math.ceil(v / 10) * 10;\nconst asHalfPixel = n => Math.ceil(n) + 0.5;\nconst diffDomain = d => d[1] - d[0];\nconst isObjectType = v => typeof v === \"object\";\nconst isEmpty = o => (\n\tisUndefined(o) || o === null ||\n\t\t(isString(o) && o.length === 0) ||\n\t\t(isObjectType(o) && Object.keys(o).length === 0)\n);\nconst notEmpty = o => !isEmpty(o);\n\n/**\n * Check if is array\n * @param {Array} arr\n * @returns {Boolean}\n * @private\n */\nconst isArray = arr => arr && arr.constructor === Array;\n\n/**\n * Check if is object\n * @param {Object} obj\n * @returns {Boolean}\n * @private\n */\nconst isObject = obj => obj && !obj.nodeType && isObjectType(obj) && !isArray(obj);\n\nconst getOption = (options, key, defaultValue) => (\n\tisDefined(options[key]) ? options[key] : defaultValue\n);\n\nconst hasValue = (dict, value) => {\n\tlet found = false;\n\n\tObject.keys(dict).forEach(key => (dict[key] === value) && (found = true));\n\n\treturn found;\n};\n\n/**\n * Call function with arguments\n * @param {Function} fn Function to be called\n * @param {*} args Arguments\n * @return {Boolean} true: fn is function, false: fn is not function\n * @private\n */\nconst callFn = (fn, ...args) => {\n\tconst isFn = isFunction(fn);\n\n\tisFn && fn.call(...args);\n\treturn isFn;\n};\n\n/**\n * Replace tag sign to html entity\n * @param {String} str\n * @return {String}\n * @private\n */\nconst sanitise = str => (isString(str) ? str.replace(/</g, \"<\").replace(/>/g, \">\") : str);\n\n// substitution of SVGPathSeg API polyfill\nconst getRectSegList = path => {\n\t/*\n\t * seg1 ---------- seg2\n\t * | |\n\t * | |\n\t * | |\n\t * seg0 ---------- seg3\n\t * */\n\tconst bbox = path.getBBox();\n\tconst [x, y, width, height] = [bbox.x, bbox.y, bbox.width, bbox.height];\n\n\treturn [\n\t\t{x, y: y + height}, // seg0\n\t\t{x, y}, // seg1\n\t\t{x: x + width, y}, // seg2\n\t\t{x: x + width, y: y + height} // seg3\n\t];\n};\n\nconst getPathBox = path => {\n\tconst box = path.getBoundingClientRect();\n\tconst [width, height] = [box.width, box.height];\n\tconst items = getRectSegList(path);\n\tconst x = items[0].x;\n\tconst y = Math.min(items[0].y, items[1].y);\n\n\treturn {\n\t\tx, y, width, height\n\t};\n};\n\n// return brush selection array\nconst getBrushSelection = ctx => {\n\tlet selection = null;\n\tconst event = d3Event;\n\tconst main = ctx.context || ctx.main;\n\n\t// check from event\n\tif (event && event.constructor.name === \"BrushEvent\") {\n\t\tselection = event.selection;\n\t// check from brush area selection\n\t} else if (main && (selection = main.select(`.${CLASS.brush}`).node())) {\n\t\tselection = d3BrushSelection(selection);\n\t}\n\n\treturn selection;\n};\n\nconst brushEmpty = ctx => {\n\tconst selection = getBrushSelection(ctx);\n\n\tif (selection) {\n\t\t// brush selected area\n\t\t// two-dimensional: [[x0, y0], [x1, y1]]\n\t\t// one-dimensional: [x0, x1] or [y0, y1]\n\t\treturn selection[0] === selection[1];\n\t}\n\n\treturn true;\n};\n\nconst extend = (target = {}, source) => {\n\tfor (const p in source) {\n\t\ttarget[p] = source[p];\n\t}\n\n\treturn target;\n};\n\n/**\n * Return first letter capitalized\n * @param {String} str\n * @return {String} capitalized string\n * @private\n */\nconst capitalize = str => str.charAt(0).toUpperCase() + str.slice(1);\n\n/**\n * Merge object returning new object\n * @param {Object} target\n * @param {Object} objectN\n * @returns {Object} merged target object\n * @private\n * @example\n * var target = { a: 1 };\n * utils.extend(target, { b: 2, c: 3 });\n * target; // { a: 1, b: 2, c: 3 };\n */\nconst merge = (target, ...objectN) => {\n\tif (!objectN.length || (objectN.length === 1 && !objectN[0])) {\n\t\treturn target;\n\t}\n\n\tconst source = objectN.shift();\n\n\tif (isObject(target) && isObject(source)) {\n\t\tObject.keys(source).forEach(key => {\n\t\t\tconst value = source[key];\n\n\t\t\tif (isObject(value)) {\n\t\t\t\t!target[key] && (target[key] = {});\n\n\t\t\t\ttarget[key] = merge(target[key], value);\n\t\t\t} else {\n\t\t\t\ttarget[key] = isArray(value) ?\n\t\t\t\t\tvalue.concat() : value;\n\t\t\t}\n\t\t});\n\t}\n\n\treturn extend(target, ...objectN);\n};\n\n/**\n * Convert to array\n * @param {Object} v\n * @returns {Array}\n * @private\n */\nconst toArray = v => [].slice.call(v);\n\n/**\n * Get css rules for specified stylesheets\n * @param {Array} styleSheets The stylesheets to get the rules from\n * @returns {Array}\n * @private\n */\nconst getCssRules = styleSheets => {\n\tlet rules = [];\n\n\tstyleSheets.forEach(sheet => {\n\t\ttry {\n\t\t\tif (sheet.cssRules && sheet.cssRules.length) {\n\t\t\t\trules = rules.concat(toArray(sheet.cssRules));\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(`Error while reading rules from ${sheet.href}: ${e.toString()}`);\n\t\t}\n\t});\n\n\treturn rules;\n};\n\n// emulate event\nconst emulateEvent = {\n\tmouse: (() => {\n\t\tconst getParams = () => ({\n\t\t\tbubbles: false, cancelable: false, screenX: 0, screenY: 0, clientX: 0, clientY: 0\n\t\t});\n\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-new\n\t\t\tnew MouseEvent(\"t\");\n\n\t\t\treturn (el, eventType, params = getParams()) => {\n\t\t\t\tel.dispatchEvent(new MouseEvent(eventType, params));\n\t\t\t};\n\t\t} catch (e) {\n\t\t\t// Polyfills DOM4 MouseEvent\n\t\t\treturn (el, eventType, params = getParams()) => {\n\t\t\t\tconst mouseEvent = document.createEvent(\"MouseEvent\");\n\n\t\t\t\t// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/initMouseEvent\n\t\t\t\tmouseEvent.initMouseEvent(\n\t\t\t\t\teventType,\n\t\t\t\t\tparams.bubbles,\n\t\t\t\t\tparams.cancelable,\n\t\t\t\t\twindow,\n\t\t\t\t\t0, // the event's mouse click count\n\t\t\t\t\tparams.screenX, params.screenY,\n\t\t\t\t\tparams.clientX, params.clientY,\n\t\t\t\t\tfalse, false, false, false, 0, null\n\t\t\t\t);\n\n\t\t\t\tel.dispatchEvent(mouseEvent);\n\t\t\t};\n\t\t}\n\t})(),\n\ttouch: (el, eventType, params) => {\n\t\tconst touchObj = new Touch(Object.assign({\n\t\t\tidentifier: Date.now(),\n\t\t\ttarget: el,\n\t\t\tradiusX: 2.5,\n\t\t\tradiusY: 2.5,\n\t\t\trotationAngle: 10,\n\t\t\tforce: 0.5\n\t\t}, params));\n\n\t\tel.dispatchEvent(new TouchEvent(eventType, {\n\t\t\tcancelable: true,\n\t\t\tbubbles: true,\n\t\t\tshiftKey: true,\n\t\t\ttouches: [touchObj],\n\t\t\ttargetTouches: [],\n\t\t\tchangedTouches: [touchObj]\n\t\t}));\n\t}\n};\n\nexport {\n\tasHalfPixel,\n\tbrushEmpty,\n\tcallFn,\n\tcapitalize,\n\tceil10,\n\tdiffDomain,\n\temulateEvent,\n\textend,\n\tgetBrushSelection,\n\tgetCssRules,\n\tgetOption,\n\tgetPathBox,\n\tgetRectSegList,\n\thasValue,\n\tisArray,\n\tisBoolean,\n\tisDefined,\n\tisEmpty,\n\tisFunction,\n\tisNumber,\n\tisObject,\n\tisObjectType,\n\tisString,\n\tisUndefined,\n\tisValue,\n\tnotEmpty,\n\tmerge,\n\tsanitise,\n\ttoArray\n};\n","\"use strict\";\n\nexports.__esModule = true;\n\nfunction _typeof(obj) { return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; }\n\nexports.default = function (obj) {\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj === \"undefined\" ? \"undefined\" : _typeof(obj);\n};","module.exports = __WEBPACK_EXTERNAL_MODULE__13__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n/**\n * CSS class names definition\n * @private\n */\nexport default {\n\tarc: \"bb-arc\",\n\tarcs: \"bb-arcs\",\n\tarea: \"bb-area\",\n\tareas: \"bb-areas\",\n\taxis: \"bb-axis\",\n\taxisX: \"bb-axis-x\",\n\taxisXLabel: \"bb-axis-x-label\",\n\taxisY: \"bb-axis-y\",\n\taxisY2: \"bb-axis-y2\",\n\taxisY2Label: \"bb-axis-y2-label\",\n\taxisYLabel: \"bb-axis-y-label\",\n\tbar: \"bb-bar\",\n\tbars: \"bb-bars\",\n\tbrush: \"bb-brush\",\n\tbutton: \"bb-button\",\n\tbuttonZoomReset: \"bb-zoom-reset\",\n\tchart: \"bb-chart\",\n\tchartArc: \"bb-chart-arc\",\n\tchartArcs: \"bb-chart-arcs\",\n\tchartArcsBackground: \"bb-chart-arcs-background\",\n\tchartArcsGaugeMax: \"bb-chart-arcs-gauge-max\",\n\tchartArcsGaugeMin: \"bb-chart-arcs-gauge-min\",\n\tchartArcsGaugeUnit: \"bb-chart-arcs-gauge-unit\",\n\tchartArcsTitle: \"bb-chart-arcs-title\",\n\tchartBar: \"bb-chart-bar\",\n\tchartBars: \"bb-chart-bars\",\n\tchartLine: \"bb-chart-line\",\n\tchartLines: \"bb-chart-lines\",\n\tchartRadar: \"bb-chart-radar\",\n\tchartRadars: \"bb-chart-radars\",\n\tchartText: \"bb-chart-text\",\n\tchartTexts: \"bb-chart-texts\",\n\tcircle: \"bb-circle\",\n\tcircles: \"bb-circles\",\n\tcolorPattern: \"bb-color-pattern\",\n\tdefocused: \"bb-defocused\",\n\tdragarea: \"bb-dragarea\",\n\tempty: \"bb-empty\",\n\teventRect: \"bb-event-rect\",\n\teventRects: \"bb-event-rects\",\n\teventRectsMultiple: \"bb-event-rects-multiple\",\n\teventRectsSingle: \"bb-event-rects-single\",\n\tfocused: \"bb-focused\",\n\tgaugeValue: \"bb-gauge-value\",\n\tgrid: \"bb-grid\",\n\tgridLines: \"bb-grid-lines\",\n\tlegendBackground: \"bb-legend-background\",\n\tlegendItem: \"bb-legend-item\",\n\tlegendItemEvent: \"bb-legend-item-event\",\n\tlegendItemFocused: \"bb-legend-item-focused\",\n\tlegendItemHidden: \"bb-legend-item-hidden\",\n\tlegendItemPoint: \"bb-legend-item-point\",\n\tlegendItemTile: \"bb-legend-item-tile\",\n\tlevel: \"bb-level\",\n\tlevels: \"bb-levels\",\n\tline: \"bb-line\",\n\tlines: \"bb-lines\",\n\tregion: \"bb-region\",\n\tregions: \"bb-regions\",\n\tselectedCircle: \"bb-selected-circle\",\n\tselectedCircles: \"bb-selected-circles\",\n\tshape: \"bb-shape\",\n\tshapes: \"bb-shapes\",\n\ttarget: \"bb-target\",\n\ttext: \"bb-text\",\n\ttexts: \"bb-texts\",\n\ttitle: \"bb-title\",\n\ttooltip: \"bb-tooltip\",\n\ttooltipContainer: \"bb-tooltip-container\",\n\ttooltipName: \"bb-tooltip-name\",\n\txgrid: \"bb-xgrid\",\n\txgridFocus: \"bb-xgrid-focus\",\n\txgridLine: \"bb-xgrid-line\",\n\txgridLines: \"bb-xgrid-lines\",\n\txgrids: \"bb-xgrids\",\n\tygrid: \"bb-ygrid\",\n\tygridLine: \"bb-ygrid-line\",\n\tygridLines: \"bb-ygrid-lines\",\n\tygrids: \"bb-ygrids\",\n\tzoomBrush: \"bb-zoom-brush\",\n\tzoomRect: \"bb-zoom-rect\",\n\tEXPANDED: \"_expanded_\",\n\tSELECTED: \"_selected_\",\n\tINCLUDED: \"_included_\"\n};\n","// extracted by mini-css-extract-plugin","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Options from \"./Options\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {isDefined, isObjectType, merge, extend} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tgetOptions() {\n\t\tconst config = new Options();\n\n\t\treturn merge(\n\t\t\tconfig.value,\n\t\t\tthis.additionalConfig\n\t\t);\n\t},\n\n\tadditionalConfig: {},\n\n\t/**\n\t * Load configuration option\n\t * @param {Object} config User's generation config value\n\t * @private\n\t */\n\tloadConfig(config) {\n\t\tconst thisConfig = this.config;\n\t\tlet target;\n\t\tlet keys;\n\t\tlet read;\n\n\t\tconst find = () => {\n\t\t\tconst key = keys.shift();\n\n\t\t\tif (key && target && isObjectType(target) && key in target) {\n\t\t\t\ttarget = target[key];\n\t\t\t\treturn find();\n\t\t\t} else if (!key) {\n\t\t\t\treturn target;\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t};\n\n\t\tObject.keys(thisConfig).forEach(key => {\n\t\t\ttarget = config;\n\t\t\tkeys = key.split(\"_\");\n\t\t\tread = find();\n\n\t\t\tif (isDefined(read)) {\n\t\t\t\tthisConfig[key] = read;\n\t\t\t}\n\t\t});\n\t}\n});\n\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\n/**\n * Class to set options on generating chart.\n * - It's instantiated internally, not exposed for public.\n * @class Options\n * @see {@link bb.generate} to use these options on generating the chart\n */\nexport default class Options {\n\tconstructor() {\n\t\tthis.value = {\n\t\t\t/**\n\t\t\t * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.\n\t\t\t * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).<br><br>\n\t\t\t * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.<br>\n\t\t\t * @name bindto\n\t\t\t * @memberOf Options\n\t\t\t * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn.\n\t\t\t * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn.\n\t\t\t * @property {String} [bindto.classname=bb] Specify the class name of bind element.<br>\n\t\t\t * **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.\n\t\t\t * @default #chart\n\t\t\t * @example\n\t\t\t * bindto: \"#myContainer\"\n\t\t\t *\n\t\t\t * // or HTMLElement\n\t\t\t * bindto: document.getElementById(\"myContainer\")\n\t\t\t *\n\t\t\t * // or D3 selection object\n\t\t\t * bindto: d3.select(\"#myContainer\")\n\t\t\t *\n\t\t\t * // or to change default classname\n\t\t\t * bindto: {\n\t\t\t * element: \"#chart\",\n\t\t\t * classname: \"bill-board\" // ex) <div id='chart' class='bill-board'>\n\t\t\t * }\n\t\t\t */\n\t\t\tbindto: \"#chart\",\n\n\t\t\t/**\n\t\t\t * Set 'clip-path' attribute for chart element\n\t\t\t * - **NOTE:**\n\t\t\t * > When is false, chart node element is positioned after the axis node in DOM tree hierarchy.\n\t\t\t * > Is to make chart element positioned over axis element.\n\t\t\t * @name clipPath\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * // don't set 'clip-path' attribute\n\t\t\t * clipPath: false\n\t\t\t */\n\t\t\tclipPath: true,\n\n\t\t\t/**\n\t\t\t * Set svg element's class name\n\t\t\t * @name svg\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {String} [svg.classname] class name for svg element\n\t\t\t * @example\n\t\t\t * svg: {\n * classname: \"test_class\"\n\t\t\t * }\n\t\t\t */\n\t\t\tsvg_classname: undefined,\n\n\t\t\t/**\n\t\t\t * The desired size of the chart element.\n\t\t\t * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.\n\t\t\t * @name size\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Number} [size.width] width of the chart element\n\t\t\t * @property {Number} [size.height] height of the chart element\n\t\t\t * @example\n\t\t\t * size: {\n * width: 640,\n * height: 480\n\t\t\t * }\n\t\t\t */\n\t\t\tsize_width: undefined,\n\t\t\tsize_height: undefined,\n\n\t\t\t/**\n\t\t\t * The padding of the chart element.\n\t\t\t * @name padding\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Number} [padding.top] padding on the top of chart\n\t\t\t * @property {Number} [padding.right] padding on the right of chart\n\t\t\t * @property {Number} [padding.bottom] padding on the bottom of chart\n\t\t\t * @property {Number} [padding.left] padding on the left of chart\n\t\t\t * @example\n\t\t\t * padding: {\n * top: 20,\n * right: 20,\n * bottom: 20,\n * left: 20\n\t\t\t * }\n\t\t\t */\n\t\t\tpadding_left: undefined,\n\t\t\tpadding_right: undefined,\n\t\t\tpadding_top: undefined,\n\t\t\tpadding_bottom: undefined,\n\n\t\t\t/**\n\t\t\t * Set chart resize options\n\t\t\t * @name resize\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes.\n\t\t\t * @example\n\t\t\t * resize: {\n\t\t\t * auto: false\n\t\t\t * }\n\t\t\t */\n\t\t\tresize_auto: true,\n\n\t\t\t/**\n\t\t\t * Set zoom options\n\t\t\t * @name zoom\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [zoom.enabled=false] Enable zooming.\n\t\t\t * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type.\n\t\t\t * - **Available types:**\n\t\t\t * - wheel\n\t\t\t * - drag\n\t\t\t * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.<br>\n\t\t\t * If true set, y domain will be updated according to the zoomed region.\n\t\t\t * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.\n\t\t\t * @property {Number} [zoom.x.min] Set x Axis minimum zoom range\n\t\t\t * @property {Number} [zoom.x.max] Set x Axis maximum zoom range\n\t\t\t * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br>\n\t\t\t * Specified function receives the zoom event.\n\t\t\t * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br>\n\t\t\t * Specified function receives the zoomed domain.\n\t\t\t * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br>\n\t\t\t * Specified function receives the zoomed domain.\n\t\t\t * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom\n\t\t\t * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button.\n\t\t\t * @example\n\t\t\t * zoom: {\n\t\t\t * enabled: {\n * type: \"drag\"\n * },\n\t\t\t * rescale: true,\n\t\t\t * extent: [1, 100] // enable more zooming\n\t\t\t * x: {\n\t\t\t * min: -1, // set min range\n\t\t\t * max: 10 // set max range\n\t\t\t * },\n\t\t\t * onzoomstart: function(event) { ... },\n\t\t\t * onzoom: function(domain) { ... },\n\t\t\t * onzoomend: function(domain) { ... },\n\t\t\t *\n\t\t\t * // show reset button when is zoomed-in\n\t\t\t * resetButton: true,\n\t\t\t *\n\t\t\t * // customized text value for reset zoom button\n\t\t\t * resetButton: {\n\t\t\t * text: \"Unzoom\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tzoom_enabled: undefined,\n\t\t\tzoom_extent: undefined,\n\t\t\tzoom_privileged: false,\n\t\t\tzoom_rescale: false,\n\t\t\tzoom_onzoom: undefined,\n\t\t\tzoom_onzoomstart: undefined,\n\t\t\tzoom_onzoomend: undefined,\n\t\t\tzoom_resetButton: true,\n\t\t\tzoom_x_min: undefined,\n\t\t\tzoom_x_max: undefined,\n\n\t\t\t/**\n\t\t\t * Interaction options\n\t\t\t * @name interaction\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>\n\t\t\t * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.\n\t\t\t * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)\n\t\t\t * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction\n\t\t\t * @property {Boolean} [interaction.inputType.touch=true] enable or disable touch interaction\n\t\t\t * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.\n\t\t\t * @example\n\t\t\t * interaction: {\n * enabled: false,\n * inputType: {\n * mouse: true,\n * touch: false\n *\n * // or declare preventDefault explicitly.\n * // In this case touch inputType is enabled by default\n * touch: {\n * preventDefault: true\n *\n * // or threshold pixel value (pixel moved from touchstart to touchmove)\n * preventDefault: 5\n * }\n * }\n\t\t\t * }\n\t\t\t */\n\t\t\tinteraction_enabled: true,\n\t\t\tinteraction_brighten: true,\n\t\t\tinteraction_inputType_mouse: true,\n\t\t\tinteraction_inputType_touch: {},\n\n\t\t\t/**\n\t\t\t * Set a callback to execute when mouse/touch enters the chart.\n\t\t\t * @name onover\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onover: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonover: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback to execute when mouse/touch leaves the chart.\n\t\t\t * @name onout\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onout: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonout: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback to execute when user resizes the screen.\n\t\t\t * @name onresize\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onresize: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonresize: () => {},\n\n\t\t\t/**\n\t\t\t * SSet a callback to execute when screen resize finished.\n\t\t\t * @name onresized\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onresized: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonresized: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback to execute before the chart is initialized\n\t\t\t * @name onbeforeinit\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onbeforeinit: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonbeforeinit: undefined,\n\n\t\t\t/**\n\t\t\t * Set a callback to execute when the chart is initialized.\n\t\t\t * @name oninit\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * oninit: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\toninit: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback to execute after the chart is initialized\n\t\t\t * @name onafterinit\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function(){}\n\t\t\t * @example\n\t\t\t * onafterinit: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonafterinit: undefined,\n\n\t\t\t/**\n\t\t\t * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.\n\t\t\t * @name onrendered\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * onrendered: function() {\n\t\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tonrendered: undefined,\n\n\t\t\t/**\n\t\t\t * Set duration of transition (in milliseconds) for chart animation.<br><br>\n\t\t\t * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.\n\t\t\t * @name transition\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Number} [transition.duration=350] duration in milliseconds\n\t\t\t * @example\n\t\t\t * transition: {\n\t\t\t * duration: 500\n\t\t\t * }\n\t\t\t */\n\t\t\ttransition_duration: 350,\n\n\t\t\t/**\n\t\t\t * Specify the key of x values in the data.<br><br>\n\t\t\t * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.\n\t\t\t * @name data․x\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n * x: \"date\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_x: undefined,\n\n\t\t\t/**\n\t\t\t * Specify the keys of the x values for each data.<br><br>\n\t\t\t * This option can be used if we want to show the data that has different x values.\n\t\t\t * @name data․xs\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n * xs: {\n * data1: \"x1\",\n * data2: \"x2\"\n * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_xs: {},\n\n\t\t\t/**\n\t\t\t * Set a format to parse string specifed as x.\n\t\t\t * @name data․xFormat\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default %Y-%m-%d\n\t\t\t * @example\n\t\t\t * data: {\n * xFormat: \"%Y-%m-%d %H:%M:%S\"\n\t\t\t * }\n\t\t\t * @see [D3's time specifier](https://npm.runkit.com/d3-time-format)\n\t\t\t */\n\t\t\tdata_xFormat: \"%Y-%m-%d\",\n\n\t\t\t/**\n\t\t\t * Set localtime format to parse x axis.\n\t\t\t * @name data․xLocaltime\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * data: {\n * xLocaltime: false\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_xLocaltime: true,\n\n\t\t\t/**\n\t\t\t * Sort on x axis.\n\t\t\t * @name data․xSort\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * data: {\n * xSort: false\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_xSort: true,\n\t\t\tdata_idConverter: id => id,\n\n\t\t\t/**\n\t\t\t * Set custom data name.\n\t\t\t * @name data․names\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n * names: {\n * data1: \"Data Name 1\",\n * data2: \"Data Name 2\"\n * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_names: {},\n\n\t\t\t/**\n\t\t\t * Set custom data class.<br><br>\n\t\t\t * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).\n\t\t\t * @name data․classes\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n * classes: {\n * data1: \"additional-data1-class\",\n * data2: \"additional-data2-class\"\n * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_classes: {},\n\n\t\t\t/**\n\t\t\t * Set groups for the data for stacking.\n\t\t\t * @name data․groups\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default []\n\t\t\t * @example\n\t\t\t * data: {\n * groups: [\n * [\"data1\", \"data2\"],\n * [\"data3\"]\n * ]\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_groups: [],\n\n\t\t\t/**\n\t\t\t * Set y axis the data related to. y and y2 can be used.\n\t\t\t * @name data․axes\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * axes: {\n\t\t\t * data1: \"y\",\n\t\t\t * data2: \"y2\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_axes: {},\n\n\t\t\t/**\n\t\t\t * Set chart type at once.<br><br>\n\t\t\t * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>\n\t\t\t * **Available Values:**\n\t\t\t * - area\n\t\t\t * - area-line-range\n\t\t\t * - area-spline\n\t\t\t * - area-spline-range\n\t\t\t * - area-step\n\t\t\t * - bar\n\t\t\t * - bubble\n\t\t\t * - donut\n\t\t\t * - gauge\n\t\t\t * - line\n\t\t\t * - pie\n\t\t\t * - radar\n\t\t\t * - scatter\n\t\t\t * - spline\n\t\t\t * - step\n\t\t\t * @name data․type\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default line\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * type: \"bar\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_type: undefined,\n\n\t\t\t/**\n\t\t\t * Set chart type for each data.<br>\n\t\t\t * This setting overwrites data.type setting.\n\t\t\t * - **NOTE:** `radar` type can't be combined with other types.\n\t\t\t * @name data․types\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * types: {\n\t\t\t * data1: \"bar\",\n\t\t\t * data2: \"spline\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_types: {},\n\n\t\t\t/**\n\t\t\t * Set labels options\n\t\t\t * @name data․labels\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [data.labels=false] Show or hide labels on each data points\n\t\t\t * @property {Function} [data.labels.format={}] Set formatter function for data labels.<br>\n\t\t\t * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:<br>\n\t\t\t * - `v` is the value of the data point where the label is shown.\n\t\t\t * - `id` is the id of the data where the label is shown.\n\t\t\t * - `i` is the index of the data point where the label is shown.\n\t\t\t * - `j` is the sub index of the data point where the label is shown.<br><br>\n\t\t\t * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))\n\t\t\t * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original.\n\t\t\t * @property {NUmber} [data.labels.position.y=0] y coordinate position, relative the original.\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * labels: true,\n\t\t\t *\n\t\t\t * // or set specific options\n\t\t\t * labels: {\n\t\t\t * format: function(v, id, i, j) { ... },\n\t\t\t *\n\t\t\t * // it's possible to set for each data\n\t\t\t * format: {\n\t\t\t * data1: function(v, id, i, j) { ... },\n\t\t\t * ...\n\t\t\t * },\n\t\t\t * position: {\n\t\t\t * x: -10,\n\t\t\t * y: 10\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_labels: {},\n\t\t\tdata_labels_position: {},\n\n\t\t\t/**\n\t\t\t * This option changes the order of stacking data and pieces of pie/donut.\n\t\t\t * - If `null` specified, it will be the order the data loaded.\n\t\t\t * - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>\n\t\t\t *\n\t\t\t * **Available Values:**\n\t\t\t * - `desc`: In descending order\n\t\t\t * - `asc`: In ascending order\n\t\t\t * - `null`: It keeps the data load order\n\t\t\t * - `function(data1, data2) { ... }`: Array.sort compareFunction\n\t\t\t * @name data․order\n\t\t\t * @memberOf Options\n\t\t\t * @type {String|Function|null}\n\t\t\t * @default desc\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * // in descending order (default)\n\t\t\t * order: \"desc\"\n\t\t\t *\n\t\t\t * // in ascending order\n\t\t\t * order: \"asc\"\n\t\t\t *\n\t\t\t * // keeps data input order\n\t\t\t * order: null\n\t\t\t *\n\t\t\t * // specifying sort function\n\t\t\t * order: function(a, b) {\n\t\t\t * // param data passed format\n\t\t\t * {\n\t\t\t * id: \"data1\", id_org: \"data1\", values: [\n\t\t\t * {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"},\n\t\t\t * ...\n\t\t\t * ]\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_order: \"desc\",\n\n\t\t\t/**\n\t\t\t * Define regions for each data.<br>\n\t\t\t * The values must be an array for each data and it should include an object that has `start`, `end` and `style`.\n\t\t\t * - The object type should be as:\n\t\t\t * - start {Number}: Start data point number. If not set, the start will be the first data point.\n\t\t\t * - [end] {Number}: End data point number. If not set, the end will be the last data point.\n\t\t\t * - [style.dasharray=\"2 2\"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.\n\t\t\t * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.\n\t\t\t * @name data․regions\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * regions: {\n\t\t\t * data1: [{\n\t\t\t * start: 1,\n\t\t\t * end: 2,\n\t\t\t * style: {\n\t\t\t * dasharray: \"5 2\"\n\t\t\t * }\n\t\t\t * }, {\n\t\t\t * start: 3\n\t\t\t * }],\n\t\t\t * ...\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_regions: {},\n\n\t\t\t/**\n\t\t\t * Set color converter function.<br><br>\n\t\t\t * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').\n\t\t\t * @name data․color\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * color: function(color, d) { ... }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_color: undefined,\n\n\t\t\t/**\n\t\t\t * Set color for each data.\n\t\t\t * @name data․colors\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * colors: {\n\t\t\t * data1: \"#ff0000\",\n\t\t\t * ...\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_colors: {},\n\n\t\t\t/**\n\t\t\t * Hide each data when the chart appears.<br><br>\n\t\t\t * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.\n\t\t\t * @name data․hide\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean|Array}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * // all of data will be hidden\n\t\t\t * hide: true\n\t\t\t *\n\t\t\t * // specified data will be hidden\n\t\t\t * hide: [\"data1\", ...]\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_hide: false,\n\t\t\tdata_filter: undefined,\n\n\t\t\t/**\n\t\t\t * Set data selection enabled.<br><br>\n\t\t\t * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).\n\t\t\t * @name data․selection․enabled\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * selection: {\n\t\t\t * enabled: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_selection_enabled: false,\n\n\t\t\t/**\n\t\t\t * Set grouped selection enabled.<br><br>\n\t\t\t * If this option set true, multiple data points that have same x value will be selected by one selection.\n\t\t\t * @name data․selection․grouped\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * selection: {\n\t\t\t * grouped: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_selection_grouped: false,\n\n\t\t\t/**\n\t\t\t * Set a callback for each data point to determine if it's selectable or not.<br><br>\n\t\t\t * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.\n\t\t\t * @name data․selection․isselectable\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() { return true; }\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * selection: {\n\t\t\t * isselectable: function(d) { ... }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_selection_isselectable: () => true,\n\n\t\t\t/**\n\t\t\t * Set multiple data points selection enabled.<br><br>\n\t\t\t * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.\n\t\t\t * @name data․selection․multiple\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * selection: {\n\t\t\t * multiple: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_selection_multiple: true,\n\n\t\t\t/**\n\t\t\t * Enable to select data points by dragging.\n\t\t\t * If this option set true, data points can be selected by dragging.\n\t\t\t * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.\n\t\t\t * @name data․selection․draggable\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * selection: {\n\t\t\t * draggable: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_selection_draggable: false,\n\n\t\t\t/**\n\t\t\t * Set a callback for click event on each data point.<br><br>\n\t\t\t * This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object.\n\t\t\t * @name data․onclick\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * onclick: function(d, element) { ... }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onclick: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback for mouse/touch over event on each data point.<br><br>\n\t\t\t * This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object.\n\t\t\t * @name data․onover\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * onover: function(d) { ... }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onover: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback for mouse/touch out event on each data point.<br><br>\n\t\t\t * This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object.\n\t\t\t * @name data․onout\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * onout: function(d) { ... }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onout: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback for on data selection.\n\t\t\t * @name data․onselected\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * onselected: function(d, element) {\n\t\t\t * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n\t\t\t * // element - <circle>\n\t\t\t * ...\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onselected: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback for on data un-selection.\n\t\t\t * @name data․onunselected\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default function() {}\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * onunselected: function(d, element) {\n\t\t\t * // d - ex) {x: 4, value: 150, id: \"data1\", index: 4, name: \"data1\"}\n\t\t\t * // element - <circle>\n\t\t\t * ...\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onunselected: () => {},\n\n\t\t\t/**\n\t\t\t * Set a callback for minimum data\n\t\t\t * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison\n\t\t\t * @name data․onmin\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * onmin: function(data) {\n\t\t\t * // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onmin: undefined,\n\n\t\t\t/**\n\t\t\t * Set a callback for maximum data\n\t\t\t * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison\n\t\t\t * @name data․onmax\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * onmax: function(data) {\n\t\t\t * // data - ex) [{x: 3, value: 400, id: \"data1\", index: 3}, ... ]\n\t\t * ...\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_onmax: undefined,\n\n\t\t\t/**\n\t\t\t * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the \"file://\" protocol as the most browsers will block XMLHTTPRequests.\n\t\t\t * @name data․url\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * url: \"/data/test.csv\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_url: undefined,\n\t\t\tdata_headers: undefined,\n\n\t\t\t/**\n\t\t\t * Parse a JSON object for data. See also data.keys.\n\t\t\t * @name data․json\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default undefined\n\t\t\t * @see data․keys\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * json: [\n\t\t\t * {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n\t\t\t * {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n\t\t\t * {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n\t\t\t * {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n\t\t\t * ],\n\t\t\t * keys: {\n\t\t\t * // x: \"name\", // it's possible to specify 'x' when category axis\n\t\t\t * value: [\"upload\", \"download\"]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_json: undefined,\n\n\t\t\t/**\n\t\t\t * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.\n\t\t\t * @name data․rows\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * rows: [\n\t\t\t * [\"A\", \"B\", \"C\"],\n\t\t\t * [90, 120, 300],\n\t\t\t * [40, 160, 240],\n\t\t\t * [50, 200, 290],\n\t\t\t * [120, 160, 230],\n\t\t\t * [80, 130, 300],\n\t\t\t * [90, 220, 320]\n\t\t\t * ]\n\t\t\t * }\n\t\t\t *\n\t\t\t * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:\n\t\t\t * // - an array of [high, mid, low] data following the order\n\t\t\t * // - or an object with 'high', 'mid' and 'low' key value\n\t\t\t * data: {\n\t\t\t * rows: [\n\t\t\t * [\"data1\", \"data2\"],\n\t\t\t * [\n\t\t\t * // or {high:150, mid: 140, low: 110}, 120\n\t\t\t * [150, 140, 110], 120\n\t\t\t * ],\n\t\t\t * [[155, 130, 115], 55],\n\t\t\t * [[160, 135, 120], 60]\n\t\t\t * ],\n\t\t\t * types: {\n\t\t\t * data1: \"area-line-range\",\n\t\t\t * data2: \"line\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_rows: undefined,\n\n\t\t\t/**\n\t\t\t * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.\n\t\t\t * @name data․columns\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * columns: [\n\t\t\t * [\"data1\", 30, 20, 50, 40, 60, 50],\n\t\t\t * [\"data2\", 200, 130, 90, 240, 130, 220],\n\t\t\t * [\"data3\", 300, 200, 160, 400, 250, 250]\n\t\t\t * ]\n\t\t\t * }\n\t\t\t *\n\t\t\t * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:\n\t\t\t * // - an array of [high, mid, low] data following the order\n\t\t\t * // - or an object with 'high', 'mid' and 'low' key value\n\t\t\t * data: {\n\t\t\t * columns: [\n\t\t\t * [\"data1\",\n\t\t\t * [150, 140, 110], // or {high:150, mid: 140, low: 110}\n\t\t\t * [150, 140, 110],\n\t\t\t * [150, 140, 110]\n\t\t\t * ]\n\t\t\t * ],\n\t\t\t * type: \"area-line-range\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_columns: undefined,\n\n\t\t\t/**\n\t\t\t * Used if loading JSON via data.url.\n\t\t\t * @name data․mimeType\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * mimeType: \"json\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_mimeType: undefined,\n\n\t\t\t/**\n\t\t\t * Choose which JSON object keys correspond to desired data.\n\t\t\t * @name data․keys\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * json: [\n\t\t\t * {name: \"www.site1.com\", upload: 200, download: 200, total: 400},\n\t\t\t * {name: \"www.site2.com\", upload: 100, download: 300, total: 400},\n\t\t\t * {name: \"www.site3.com\", upload: 300, download: 200, total: 500},\n\t\t\t * {name: \"www.site4.com\", upload: 400, download: 100, total: 500}\n\t\t\t * ],\n\t\t\t * keys: {\n\t\t\t * // x: \"name\", // it's possible to specify 'x' when category axis\n\t\t\t * value: [\"upload\", \"download\"]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_keys: undefined,\n\n\t\t\t/**\n\t\t\t * Set text displayed when empty data.\n\t\t\t * @name data․empty․label․text\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default \"\"\n\t\t\t * @example\n\t\t\t * data: {\n\t\t\t * empty: {\n\t\t\t * label: {\n\t\t\t * text: \"No Data\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tdata_empty_label_text: \"\",\n\n\t\t\t/**\n\t\t\t * Set subchart options\n\t\t\t * @name subchart\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart.\n\t\t\t * @property {Boolean} [subchart.size.height] Change the height of the subchart.\n\t\t\t * @property {Boolean} [subchart.onbrush] Set callback for brush event.<br>\n\t\t\t * Specified function receives the current zoomed x domain.\n\t\t\t * @example\n\t\t\t * subchart: {\n\t\t\t * show: true,\n\t\t\t * size: {\n\t\t\t * height: 20\n\t\t\t * },\n\t\t\t * onbrush: function(domain) { ... }\n\t\t\t * }\n\t\t\t */\n\t\t\tsubchart_show: false,\n\t\t\tsubchart_size_height: 60,\n\t\t\tsubchart_axis_x_show: true,\n\t\t\tsubchart_onbrush: () => {},\n\n\t\t\t/**\n\t\t\t * Set color of the data values\n\t\t\t * @name color\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Array} [color.pattern] custom color pattern\n\t\t\t * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).\n\t\t\t * - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>\n\t\t\t * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>\n\t\t\t * - `bb-colorize-pattern-red`\n\t\t\t * - `bb-colorize-pattern-fff`\n\t\t\t * @property {Object} [color.threshold] color threshold\n\t\t\t * @property {String} [color.threshold.unit] unit\n\t\t\t * @property {Array} [color.threshold.value] value\n\t\t\t * @property {Array} [color.threshold.max=100] max value\n\t\t\t * @example\n\t\t\t * color: {\n\t\t\t * pattern: [\"#1f77b4\", \"#aec7e8\", ...],\n\t\t\t *\n\t\t\t * // Set colors' patterns\n\t\t\t * // it should return an array of SVGPatternElement\n\t\t\t * tiles: function() {\n\t\t\t * var pattern = document.createElementNS(\"http://www.w3.org/2000/svg\", \"pattern\");\n\t\t\t * var g = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n\t\t\t * var circle1 = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n\t\t\t *\n\t\t\t * pattern.setAttribute(\"patternUnits\", \"userSpaceOnUse\");\n\t\t\t * pattern.setAttribute(\"width\", \"32\");\n\t\t\t * pattern.setAttribute(\"height\", \"32\");\n\t\t\t *\n\t\t\t * g.style.fill = \"#000\";\n\t\t\t * g.style.opacity = \"0.2\";\n *\n\t\t\t * circle1.setAttribute(\"cx\", \"3\");\n\t\t\t * circle1.setAttribute(\"cy\", \"3\");\n\t\t\t * circle1.setAttribute(\"r\", \"3\");\n *\n\t\t\t * g.appendChild(circle1);\n\t\t\t * pattern.appendChild(g);\n\t\t\t *\n\t\t\t * return [pattern];\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tcolor_pattern: [],\n\t\t\tcolor_tiles: undefined,\n\t\t\tcolor_threshold: {},\n\n\t\t\t/**\n\t\t\t * Legend options\n\t\t\t * @name legend\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [legend.show=true] Show or hide legend.\n\t\t\t * @property {Boolean} [legend.hide=false] Hide legend\n\t\t\t * If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.\n\t\t\t * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.\n\t\t\t * @property {String|Function} [legend.contents.template=undefined] Set item's template.<br>\n\t\t\t * - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:\n\t\t\t * - {=COLOR}: data color value\n\t\t\t * - {=TITLE}: data title value\n\t\t\t * - If set `function` value, will pass following arguments to the given function:\n\t\t\t * - title {String}: data's id value\n\t\t\t * - color {String}: color string\n\t\t\t * - data {Array}: data array\n\t\t\t * @property {String} [legend.position=bottom] Change the position of legend.<br>\n\t\t\t * Available values are: `bottom`, `right` and `inset` are supported.\n\t\t\t * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>\n\t\t\t * This option accepts object that has the keys `anchor`, `x`, `y` and `step`.\n\t\t\t * - **anchor** decides the position of the legend:\n\t\t\t * - top-left\n\t\t\t * - top-right\n\t\t\t * - bottom-left\n\t\t\t * - bottom-right\n\t\t\t * - **x** and **y**:\n\t\t\t * - set the position of the legend based on the anchor.\n\t\t\t * - **step**:\n\t\t\t * - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).\n\t\t\t * @property {Boolean} [legend.equally=false] Set to all items have same width size.\n\t\t\t * @property {Boolean} [legend.padding=0] Set padding value\n\t\t\t * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.\n\t\t\t * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.\n\t\t\t * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.\n\t\t\t * @property {Number} [legend.item.tile.width=10] Set width of item tile element\n\t\t\t * @property {Number} [legend.item.tile.height=10] Set height of item tile element\n\t\t\t * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend.\n\t\t\t * @example\n\t\t\t * legend: {\n\t\t\t * show: true,\n\t\t\t * hide: true,\n\t\t\t * //or hide: \"data1\"\n * //or hide: [\"data1\", \"data2\"]\n\t\t\t * contents: {\n\t\t\t * bindto: \"#legend\", // <ul id='legend'></ul>\n\t\t\t *\n\t\t\t * // will be as: <li style='background-color:#1f77b4'>data1</li>\n\t\t\t * template: \"<li style='background-color:{=COLOR}'>{=TITLE}</li>\"\n\t\t\t *\n\t\t\t * // or using function\n\t\t\t * template: function(id, color, data) {\n\t\t\t * // if you want omit some legend, return falsy value\n\t\t\t * if (title !== \"data1\") {\n\t\t\t * return \"<li style='background-color:\"+ color +\">\"+ title +\"</li>\";\n\t\t\t * }\n\t\t\t * }\n\t\t\t * },\n * position: \"bottom\", // bottom, right, inset\n\t\t\t * inset: {\n\t\t\t * anchor: \"top-right\" // top-left, top-right, bottom-left, bottom-right\n\t\t\t * x: 20,\n\t\t\t * y: 10,\n\t\t\t * step: 2\n\t\t\t * },\n * equally: false,\n * padding: 10,\n * item: {\n\t\t\t * onclick: function(id) { ... },\n\t\t\t * onover: function(id) { ... },\n\t\t\t * onout: function(id) { ... },\n\t\t\t *\n\t\t\t * // set tile's size\n\t\t\t * tile: {\n\t\t\t * width: 20,\n\t\t\t * height: 15\n\t\t\t * }\n\t\t\t * },\n\t\t\t * usePoint: true\n\t\t\t * }\n\t\t\t */\n\t\t\tlegend_show: true,\n\t\t\tlegend_hide: false,\n\t\t\tlegend_contents_bindto: undefined,\n\t\t\tlegend_contents_template: undefined,\n\t\t\tlegend_position: \"bottom\",\n\t\t\tlegend_inset_anchor: \"top-left\",\n\t\t\tlegend_inset_x: 10,\n\t\t\tlegend_inset_y: 0,\n\t\t\tlegend_inset_step: undefined,\n\t\t\tlegend_item_onclick: undefined,\n\t\t\tlegend_item_onover: undefined,\n\t\t\tlegend_item_onout: undefined,\n\t\t\tlegend_equally: false,\n\t\t\tlegend_padding: 0,\n\t\t\tlegend_item_tile_width: 10,\n\t\t\tlegend_item_tile_height: 10,\n\t\t\tlegend_usePoint: false,\n\n\t\t\t/**\n\t\t\t * Switch x and y axis position.\n\t\t\t * @name axis․rotated\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * rotated: true\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_rotated: false,\n\n\t\t\t/**\n\t\t\t * Set clip-path attribute for x axis element\n\t\t\t * @name axis․x․clipPath\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * // don't set 'clip-path' attribute\n\t\t\t * clipPath: false\n\t\t\t */\n\t\t\taxis_x_clipPath: true,\n\n\t\t\t/**\n\t\t\t * Show or hide x axis.\n\t\t\t * @name axis․x․show\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * show: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_show: true,\n\n\t\t\t/**\n\t\t\t * Set type of x axis.<br><br>\n\t\t\t * **Available Values:**\n\t\t\t * - timeseries\n\t\t\t * - category\n\t\t\t * - indexed\n\t\t\t * @name axis․x․type\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default indexed\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * type: \"timeseries\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_type: \"indexed\",\n\n\t\t\t/**\n\t\t\t * Set how to treat the timezone of x values.<br>\n\t\t\t * If true, treat x value as localtime. If false, convert to UTC internally.\n\t\t\t * @name axis․x․localtime\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * localtime: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_localtime: true,\n\n\t\t\t/**\n\t\t\t * Set category names on category axis.\n\t\t\t * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.\n\t\t\t * @name axis․x․categories\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default []\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * categories: [\"Category 1\", \"Category 2\", ...]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_categories: [],\n\n\t\t\t/**\n\t\t\t * Centerise ticks on category axis.\n\t\t\t * @name axis․x․tick․centered\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * centered: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_centered: false,\n\n\t\t\t/**\n\t\t\t * A function to format tick value. Format string is also available for timeseries data.\n\t\t\t * @name axis․x․tick․format\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * // for timeseries, a 'datetime' object is given as parameter\n\t\t\t * format: function(x) {\n\t\t\t * return x.getFullYear();\n\t\t\t * }\n\t\t\t *\n\t\t\t * // for category, index(Number) and categoryName(String) are given as parameter\n\t\t\t * format: function(index, categoryName) {\n\t\t\t * return categoryName.substr(0, 10);\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_format: undefined,\n\n\t\t\t/**\n\t\t\t * Setting for culling ticks.<br><br>\n\t\t\t * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>\n\t\t\t * We can change the number of ticks to be shown by axis.x.tick.culling.max.\n\t\t\t * @name axis․x․tick․culling\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default\n\t\t\t * - true for indexed axis and timeseries axis\n\t\t\t * - false for category axis\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * culling: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_culling: {},\n\n\t\t\t/**\n\t\t\t * The number of tick texts will be adjusted to less than this value.\n\t\t\t * @name axis․x․tick․culling․max\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default 10\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * culling: {\n\t\t\t * max: 5\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_culling_max: 10,\n\n\t\t\t/**\n\t\t\t * The number of x axis ticks to show.<br><br>\n\t\t\t * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).\n\t\t\t * @name axis․x․tick․count\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * count: 5\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_count: undefined,\n\n\t\t\t/**\n\t\t\t * Set the x Axis tick text's position relatively its original position\n\t\t\t * @name axis․x․tick․text․position\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {x: 0, y:0}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * text: {\n\t\t\t * position: {\n\t\t\t * x: 10,\n\t\t\t * y: 10\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_text_position: {x: 0, y: 0},\n\n\t\t\t/**\n\t\t\t * Fit x axis ticks.<br><br>\n\t\t\t * If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points.\n\t\t\t * @name axis․x․tick․fit\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * fit: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_fit: true,\n\n\t\t\t/**\n\t\t\t * Set the x values of ticks manually.<br><br>\n\t\t\t * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option.\n\t\t\t * @name axis․x․tick․values\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default null\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * values: [1, 2, 4, 8, 16, 32, ...]\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_values: null,\n\n\t\t\t/**\n\t\t\t * Rotate x axis tick text.<br>\n\t\t\t * If you set negative value, it will rotate to opposite direction.\n\t\t\t * @name axis․x․tick․rotate\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default 0\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * rotate: 60\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_rotate: 0,\n\n\t\t\t/**\n\t\t\t * Show x axis outer tick.\n\t\t\t * @name axis․x․tick․outer\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * outer: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_outer: true,\n\n\t\t\t/**\n\t\t\t * Set tick text to be multiline\n\t\t\t * - **NOTE:**\n\t\t\t * > When x tick text contains `\\n`, it's used as line break and 'axis.x.tick.width' option is ignored.\n\t\t\t * @name axis․x․tick․multiline\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * multiline: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * @example\n\t\t\t * // example of line break with '\\n'\n\t\t\t * // In this case, 'axis.x.tick.width' is ignored\n\t\t\t * data: {\n\t\t\t * x: \"x\",\n\t\t\t * columns: [\n\t\t\t * [\"x\", \"long\\ntext\", \"Another\\nLong\\nText\"],\n\t\t\t * ...\n\t\t\t * ],\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_multiline: true,\n\n\n\t\t\t/**\n\t\t\t * Set tick width\n\t\t\t * - **NOTE:**\n\t\t\t * > When x tick text contains `\\n`, this option is ignored.\n\t\t\t * @name axis․x․tick․width\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default null\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * width: 50\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_width: null,\n\n\t\t\t/**\n\t\t\t * Set to display system tooltip for tick text\n\t\t\t * - **NOTE:** Only available for category axis type (`axis.x.type='category'`)\n\t\t\t * @name axis․x․tick․tooltip\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * tick: {\n\t\t\t * tooltip: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_tick_tooltip: false,\n\n\t\t\t/**\n\t\t\t * Set max value of x axis range.\n\t\t\t * @name axis․x․max\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * max: 100\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_max: undefined,\n\n\t\t\t/**\n\t\t\t * Set min value of x axis range.\n\t\t\t * @name axis․x․min\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * min: -100\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_min: undefined,\n\n\t\t\t/**\n\t\t\t * Set padding for x axis.<br><br>\n\t\t\t * If this option is set, the range of x axis will increase/decrease according to the values.\n\t\t\t * If no padding is needed in the rage of x axis, 0 should be set.\n\t\t\t * - **NOTE:**\n\t\t\t * The padding values aren't based on pixels. It differs according axis types<br>\n\t\t\t * - **category:** The unit of tick value\n\t\t\t * ex. the given value `1`, is same as the width of 1 tick width\n\t\t\t * - **timeseries:** Numeric time value\n\t\t\t * ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width\n\t\t\t * @name axis․x․padding\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * padding: {\n\t\t\t * // when axis type is 'category'\n\t\t\t * left: 1, // set left padding width of equivalent value of a tick's width\n\t\t\t * right: 0.5 // set right padding width as half of equivalent value of tick's width\n\t\t\t *\n\t\t\t * // when axis type is 'timeseries'\n\t\t\t * left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width\n\t\t\t * right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_padding: {},\n\n\t\t\t/**\n\t\t\t * Set height of x axis.<br><br>\n\t\t\t * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.\n\t\t\t * @name axis․x․height\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * height: 20\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_height: undefined,\n\n\t\t\t/**\n\t\t\t * Set default extent for subchart and zoom. This can be an array or function that returns an array.\n\t\t\t * @name axis․x․extent\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner\n\t\t\t * // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521\n\t\t\t * extent: [\n\t\t\t * [0, 0], [200, 60]\n\t\t\t * ]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_extent: undefined,\n\n\t\t\t/**\n\t\t\t * Set label on x axis.<br><br>\n\t\t\t * You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default.\n\t\t\t * - **If it's horizontal axis:**\n\t\t\t * - inner-right [default]\n\t\t\t * - inner-center\n\t\t\t * - inner-left\n\t\t\t * - outer-right\n\t\t\t * - outer-center\n\t\t\t * - outer-left\n\t\t\t * - **If it's vertical axis:**\n\t\t\t * - inner-top [default]\n\t\t\t * - inner-middle\n\t\t\t * - inner-bottom\n\t\t\t * - outer-top\n\t\t\t * - outer-middle\n\t\t\t * - outer-bottom\n\t\t\t * @name axis․x․label\n\t\t\t * @memberOf Options\n\t\t\t * @type {String|Object}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * label: \"Your X Axis\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t *\n\t\t\t * axis: {\n\t\t\t * x: {\n\t\t\t * label: {\n\t\t\t * text: \"Your X Axis\",\n\t\t\t * position: \"outer-center\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_x_label: {},\n\n\t\t\t/**\n\t\t\t * Set clip-path attribute for y axis element\n\t\t\t * @name axis․y․clipPath\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * // don't set 'clip-path' attribute\n\t\t\t * clipPath: false\n\t\t\t */\n\t\t\taxis_y_clipPath: true,\n\n\t\t\t/**\n\t\t\t * Show or hide y axis.\n\t\t\t * @name axis․y․show\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * show: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_show: true,\n\n\t\t\t/**\n\t\t\t * Set type of y axis.<br><br>\n\t\t\t * **Available Values:**\n\t\t\t * - timeseries\n\t\t\t * - category\n\t\t\t * - indexed\n\t\t\t * @name axis․y․type\n\t\t\t * @memberOf Options\n\t\t\t * @type {String}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * type: \"timeseries\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_type: undefined,\n\n\t\t\t/**\n\t\t\t * Set max value of y axis.\n\t\t\t * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n\t\t\t * @name axis․y․max\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * max: 1000\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_max: undefined,\n\n\t\t\t/**\n\t\t\t * Set min value of y axis.\n\t\t\t * - **NOTE:**\n\t\t\t * Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).\n\t\t\t * @name axis․y․min\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * min: 1000\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_min: undefined,\n\n\t\t\t/**\n\t\t\t * Change the direction of y axis.<br><br>\n\t\t\t * If true set, the direction will be from the top to the bottom.\n\t\t\t * @name axis․y․inverted\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * inverted: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_inverted: false,\n\n\t\t\t/**\n\t\t\t * Set center value of y axis.\n\t\t\t * @name axis․y․center\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * center: 0\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_center: undefined,\n\n\t\t\t/**\n\t\t\t * Show y axis inside of the chart.\n\t\t\t * @name axis․y․inner\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * inner: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_inner: false,\n\n\t\t\t/**\n\t\t\t * Set label on y axis.<br><br>\n\t\t\t * You can set y axis label and change its position by this option. This option works in the same way as axis.x.label.\n\t\t\t * @name axis․y․label\n\t\t\t * @memberOf Options\n\t\t\t * @type {String|Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * label: \"Your Y Axis\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t *\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * label: {\n\t\t\t * text: \"Your Y Axis\",\n\t\t\t * position: \"outer-middle\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_label: {},\n\n\t\t\t/**\n\t\t\t * Set formatter for y axis tick text.<br><br>\n\t\t\t * This option accepts d3.format object as well as a function you define.\n\t\t\t * @name axis․y․tick․format\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * format: function(x) {\n\t\t\t * return x.getFullYear();\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_tick_format: undefined,\n\n\t\t\t/**\n\t\t\t * Show y axis outer tick.\n\t\t\t * @name axis․y․tick․outer\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * outer: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_tick_outer: true,\n\n\t\t\t/**\n\t\t\t * Set y axis tick values manually.\n\t\t\t * @name axis․y․tick․values\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default null\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * values: [100, 1000, 10000]\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_tick_values: null,\n\t\t\taxis_y_tick_rotate: 0,\n\n\t\t\t/**\n\t\t\t * Set the number of y axis ticks.<br><br>\n\t\t\t * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n\t\t\t * @name axis․y․tick․count\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * count: 5\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_tick_count: undefined,\n\n\t\t\t/**\n\t\t\t * Set the y Axis tick text's position relatively its original position\n\t\t\t * @name axis․y․tick․text․position\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {x: 0, y:0}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * text: {\n\t\t\t * position: {\n\t\t\t * x: 10,\n\t\t\t * y: 10\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_tick_text_position: {x: 0, y: 0},\n\n\t\t\t/**\n\t\t\t * Set the number of y axis ticks.<br><br>\n\t\t\t * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.\n\t\t\t * @name axis․y․tick․time\n\t\t\t * @memberOf Options\n\t\t\t * @private\n\t\t\t * @type {Object}\n\t\t\t * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * tick: {\n\t\t\t * time: {\n\t\t\t * // ticks at 15-minute intervals\n\t\t\t * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks\n\t\t\t * value: d3.timeMinute.every(15)\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\t// @TODO: not fully implemented yet\n\t\t\taxis_y_tick_time_value: undefined,\n\n\t\t\t/**\n\t\t\t * Set padding for y axis.<br><br>\n\t\t\t * You can set padding for y axis to create more space on the edge of the axis.\n\t\t\t * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\n\t\t\t *\n\t\t\t * - **NOTE:** For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.\n\t\t\t * @name axis․y․padding\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * padding: {\n\t\t\t * top: 0,\n\t\t\t * bottom: 0\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_padding: {},\n\n\t\t\t/**\n\t\t\t * Set default range of y axis.<br><br>\n\t\t\t * This option set the default value for y axis when there is no data on init.\n\t\t\t * @name axis․y․default\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y: {\n\t\t\t * default: [0, 1000]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y_default: undefined,\n\n\t\t\t/**\n\t\t\t * Show or hide y2 axis.\n\t\t\t * @name axis․y2․show\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * show: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_show: false,\n\n\t\t\t/**\n\t\t\t * Set max value of y2 axis.\n\t\t\t * @name axis․y2․max\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * max: 1000\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_max: undefined,\n\n\t\t\t/**\n\t\t\t * Set min value of y2 axis.\n\t\t\t * @name axis․y2․min\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * min: -1000\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_min: undefined,\n\n\t\t\t/**\n\t\t\t * Change the direction of y2 axis.<br><br>\n\t\t\t * If true set, the direction will be from the top to the bottom.\n\t\t\t * @name axis․y2․inverted\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * inverted: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_inverted: false,\n\n\t\t\t/**\n\t\t\t * Set center value of y2 axis.\n\t\t\t * @name axis․y2․center\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * center: 0\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_center: undefined,\n\n\t\t\t/**\n\t\t\t * Show y2 axis inside of the chart.\n\t\t\t * @name axis․y2․inner\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default false\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * inner: true\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_inner: false,\n\n\t\t\t/**\n\t\t\t * Set label on y2 axis.<br><br>\n\t\t\t * You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label.\n\t\t\t * @name axis․y2․label\n\t\t\t * @memberOf Options\n\t\t\t * @type {String|Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * label: \"Your Y2 Axis\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t *\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * label: {\n\t\t\t * text: \"Your Y2 Axis\",\n\t\t\t * position: \"outer-middle\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_label: {},\n\n\t\t\t/**\n\t\t\t * Set formatter for y2 axis tick text.<br><br>\n\t\t\t * This option works in the same way as axis.y.format.\n\t\t\t * @name axis․y2․tick․format\n\t\t\t * @memberOf Options\n\t\t\t * @type {Function}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * tick: {\n\t\t\t * format: d3.format(\"$,\")\n\t\t\t * //or format: function(d) { return \"$\" + d; }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_tick_format: undefined,\n\n\t\t\t/**\n\t\t\t * Show or hide y2 axis outer tick.\n\t\t\t * @name axis․y2․tick․outer\n\t\t\t * @memberOf Options\n\t\t\t * @type {Boolean}\n\t\t\t * @default true\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * tick: {\n\t\t\t * outer: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_tick_outer: true,\n\n\t\t\t/**\n\t\t\t * Set y2 axis tick values manually.\n\t\t\t * @name axis․y2․tick․values\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default null\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * tick: {\n\t\t\t * values: [100, 1000, 10000]\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_tick_values: null,\n\n\t\t\t/**\n\t\t\t * Set the number of y2 axis ticks.\n\t\t\t * - **NOTE:** This works in the same way as axis.y.tick.count.\n\t\t\t * @name axis․y2․tick․count\n\t\t\t * @memberOf Options\n\t\t\t * @type {Number}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * tick: {\n\t\t\t * count: 5\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_tick_count: undefined,\n\n\t\t\t/**\n\t\t\t * Set the y2 Axis tick text's position relatively its original position\n\t\t\t * @name axis․y2․tick․text․position\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {x: 0, y:0}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * tick: {\n\t\t\t * text: {\n\t\t\t * position: {\n\t\t\t * x: 10,\n\t\t\t * y: 10\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_tick_text_position: {x: 0, y: 0},\n\n\t\t\t/**\n\t\t\t * Set the number of y2 axis ticks.\n\t\t\t * - **NOTE:** This works in the same way as axis.y.tick.count.\n\t\t\t * @name axis․y2․padding\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @default {}\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * padding: {\n\t\t\t * top: 100,\n\t\t\t * bottom: 100\n\t\t\t * }\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_padding: {},\n\n\t\t\t/**\n\t\t\t * Set default range of y2 axis.<br><br>\n\t\t\t * This option set the default value for y2 axis when there is no data on init.\n\t\t\t * @name axis․y2․default\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * axis: {\n\t\t\t * y2: {\n\t\t\t * default: [0, 1000]\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\taxis_y2_default: undefined,\n\n\t\t\t/**\n\t\t\t * Set related options\n\t\t\t * @name grid\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.\n\t\t\t * @property {Boolean} [x.show=false] Show grids along x axis.\n\t\t\t * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.<br>\n\t\t\t * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.\n\t\t\t * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.\n\t\t\t * @property {Boolean} [y.show=false] Show grids along x axis.\n\t\t\t * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.<br>\n\t\t\t * This option accepts array including object that has value, text, position and class.\n\t\t\t * @property {Boolean} [y.ticks=10] Number of y grids to be shown.\n\t\t\t * @property {Boolean} [focus.show=true] Show grids when focus.\n\t\t\t * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements.\n\t\t\t * @default undefined\n\t\t\t * @example\n\t\t\t * grid: {\n\t\t\t * x: {\n\t\t\t * show: true,\n\t\t\t * lines: [\n\t\t\t * {value: 2, text: \"Label on 2\"},\n\t\t\t * {value: 5, text: \"Label on 5\", class: \"label-5\"}\n\t\t\t * {value: 6, text: \"Label on 6\", position: \"start\"}\n\t\t\t * ]\n\t\t\t * },\n\t\t\t * y: {\n\t\t\t * show: true,\n\t\t\t * lines: [\n\t\t\t * {value: 100, text: \"Label on 100\"},\n\t\t\t * {value: 200, text: \"Label on 200\", class: \"label-200\"}\n\t\t\t * {value: 300, text: \"Label on 300\", position: 'middle'}\n\t\t\t * ],\n\t\t\t * ticks: 5\n\t\t\t * },\n\t\t\t * front: true,\n\t\t\t * focus: {\n\t\t\t * show: false\n\t\t\t * },\n\t\t\t * lines: {\n\t\t\t * front: false\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tgrid_x_show: false,\n\t\t\tgrid_x_type: \"tick\",\n\t\t\tgrid_x_lines: [],\n\t\t\tgrid_y_show: false,\n\t\t\tgrid_y_lines: [],\n\t\t\tgrid_y_ticks: 10,\n\t\t\tgrid_focus_show: true,\n\t\t\tgrid_front: false,\n\t\t\tgrid_lines_front: true,\n\n\t\t\t/**\n\t\t\t * Set point options\n\t\t\t * @name point\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [point.show=true] Whether to show each point in line.\n\t\t\t * @property {Number|Function} [point.r=2.5] The radius size of each point.<br>\n\t\t\t * - **NOTE:** Disabled for 'bubble' type\n\t\t\t * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.\n\t\t\t * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.<br>\n\t\t\t * - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`\n\t\t\t * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected.\n\t\t\t * @property {String} [point.type=\"circle\"] The type of point to be drawn<br>\n\t\t\t * - **NOTE:**\n\t\t\t * - If chart has 'bubble' type, only circle can be used.\n\t\t\t * - For IE, non circle point expansions are not supported due to lack of transform support.\n\t\t\t * - **Available Values:**\n\t\t\t * - circle\n\t\t\t * - rectangle\n\t\t\t * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line<br>\n\t\t\t * - **NOTE:**\n\t\t\t * - This is an `experimental` feature and can have some unexpected behaviors.\n\t\t\t * - If chart has 'bubble' type, only circle can be used.\n\t\t\t * - For IE, non circle point expansions are not supported due to lack of transform support.\n\t\t\t * - **Available Values:**\n\t\t\t * - circle\n\t\t\t * - rectangle\n\t\t\t * - svg shape tag interpreted as string<br>\n\t\t\t * (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)\n\t\t\t * @example\n\t\t\t * point: {\n\t\t\t * show: false,\n\t\t\t * r: 5,\n\t\t\t *\n\t\t\t * // or customize the radius\n\t\t\t * r: function(d) {\n\t\t\t * ...\n\t\t\t * return r;\n\t\t\t * },\n\t\t\t *\n\t\t\t * focus: {\n\t\t\t * expand: {\n\t\t\t * enabled: true,\n\t\t\t * r: 1\n\t\t\t * }\n\t\t\t * },\n\t\t\t * select: {\n\t\t\t * r: 3\n\t\t\t * },\n\t\t\t *\n\t\t\t * // valid values are \"circle\" or \"rectangle\"\n\t\t\t * type: \"rectangle\",\n\t\t\t *\n\t\t\t * // or indicate as pattern\n \t\t\t * pattern: [\n \t\t\t * \"circle\",\n \t\t\t * \"rectangle\",\n \t\t\t * \"<polygon points='0 6 4 0 -4 0'></polygon>\"\n \t\t\t * ],\n\t\t\t * }\n\t\t\t */\n\t\t\tpoint_show: true,\n\t\t\tpoint_r: 2.5,\n\t\t\tpoint_sensitivity: 10,\n\t\t\tpoint_focus_expand_enabled: true,\n\t\t\tpoint_focus_expand_r: undefined,\n\t\t\tpoint_pattern: [],\n\t\t\tpoint_select_r: undefined,\n\t\t\tpoint_type: \"circle\",\n\n\t\t\t/**\n\t\t\t * Set line options\n\t\t\t * @name line\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.<br>\n\t\t\t * If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.\n\t\t\t * @property {Array} [line.classes=undefined] If set, used to set a css class on each line.\n\t\t\t * @property {Boolean} [line.step.type=step] Change step type for step chart.<br>\n\t\t\t * **Available values:**\n\t\t\t * - step\n\t\t\t * - step-before\n\t\t\t * - step-after\n\t\t\t * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.\n\t\t\t * @example\n\t\t\t * line: {\n\t\t\t * connectNull: true,\n\t\t\t * classes: [\n\t\t\t * \"line-class1\",\n\t\t\t * \"line-class2\"\n\t\t\t * ],\n\t\t\t * step: {\n\t\t\t * type: \"step-after\"\n\t\t\t * },\n\t\t\t *\n\t\t\t * // hide all data points ('point.show=false' also has similar effect)\n\t\t\t * point: false,\n\t\t\t *\n\t\t\t * // show data points for only indicated datas\n\t\t\t * point: [\n\t\t\t * \"data1\", \"data3\"\n\t\t\t * ]\n\t\t\t * }\n\t\t\t */\n\t\t\tline_connectNull: false,\n\t\t\tline_step_type: \"step\",\n\t\t\tline_classes: undefined,\n\t\t\tline_point: true,\n\n\t\t\t/**\n\t\t\t * Set bar options\n\t\t\t * @name bar\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [bar.padding=0] The padding pixel value between each bar.\n\t\t\t * @property {Number} [bar.radius] Set the radius of bar edge in pixel.<br>- **NOTE:** Only for non-stacking bars.\n\t\t\t * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.\n\t\t\t * @property {Number} [bar.width] Change the width of bar chart.\n\t\t\t * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.\n\t\t\t * @property {Number} [bar.width.max] The maximum width value for ratio.\n\t\t\t * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.\n\t\t\t * @example\n\t\t\t * bar: {\n\t\t\t * padding: 1,\n\t\t\t *\n\t\t\t * // the 'radius' option can be used only for non-stacking bars\n\t\t\t * radius: 10,\n\t\t\t * // or\n\t\t\t * radius: {\n\t\t\t * ratio: 0.5\n\t\t\t * }\n\t\t\t *\n\t\t\t * width: 10,\n\t\t\t * // or\n\t\t\t * width: {\n\t\t\t * ratio: 0.2,\n\t\t\t * max: 20\n\t\t\t * },\n\t\t\t *\n\t\t\t * zerobased: false\n\t\t\t * }\n\t\t\t */\n\t\t\tbar_padding: 0,\n\t\t\tbar_radius: undefined,\n\t\t\tbar_radius_ratio: undefined,\n\t\t\tbar_width: undefined,\n\t\t\tbar_width_ratio: 0.6,\n\t\t\tbar_width_max: undefined,\n\t\t\tbar_zerobased: true,\n\n\t\t\t/**\n\t\t\t * Set bubble options\n\t\t\t * @name bubble\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value\n\t\t\t * @example\n\t\t\t * bubble: {\n\t\t\t * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.\n\t\t\t * // And the lesser will have radius relatively from tha max value.\n\t\t\t * maxR: 50,\n\t\t\t *\n\t\t\t * // or set radius callback\n\t\t\t * maxR: function(d) {\n\t\t\t * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: \"data2\", index: 5}\n\t\t\t * ...\n\t\t\t * return Math.sqrt(d.value * 2);\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tbubble_maxR: 35,\n\n\t\t\t/**\n\t\t\t * Set area options\n\t\t\t * @name area\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.\n\t\t\t * @property {Boolean} [area.above=false]\n\t\t\t * @example\n\t\t\t * area: {\n\t\t\t * zerobased: false,\n\t\t\t * above: true\n\t\t\t * }\n\t\t\t */\n\t\t\tarea_zerobased: true,\n\t\t\tarea_above: false,\n\n\t\t\t/**\n\t\t\t * Set pie options\n\t\t\t * @name pie\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece.\n\t\t\t * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.\n\t\t\t * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels.\n\t\t\t * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position.\n\t\t\t * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces.\n\t\t\t * @property {Number} [pie.innerRadius=0] Sets the inner radius of pie arc.\n\t\t\t * @property {Number} [pie.padAngle=0] Set padding between data.\n\t\t\t * @property {Number} [pie.padding=0] Sets the gap between pie arcs.\n\t\t\t * @example\n\t\t\t * pie: {\n\t\t\t * label: {\n\t\t\t * show: false,\n\t\t\t * format: function(value, ratio, id) {\n\t\t\t * return d3.format(\"$\")(value);\n\t\t\t * },\n\t\t\t * threshold: 0.1,\n\t\t\t *\n\t\t\t * // set ratio callback. Should return ratio value\n\t\t\t * ratio: function(d, radius, h) {\n\t\t\t * ...\n\t\t\t * return ratio;\n\t\t\t * },\n\t\t\t * // or set ratio number\n\t\t\t * ratio: 0.5\n\t\t\t * },\n\t\t\t * expand: false,\n\t\t\t * innerRadius: 0,\n\t\t\t * padAngle: 0.1,\n\t\t\t * padding: 0\n\t\t\t * }\n\t\t\t */\n\t\t\tpie_label_show: true,\n\t\t\tpie_label_format: undefined,\n\t\t\tpie_label_threshold: 0.05,\n\t\t\tpie_label_ratio: undefined,\n\t\t\tpie_expand: {},\n\t\t\tpie_expand_duration: 50,\n\t\t\tpie_innerRadius: 0,\n\t\t\tpie_padAngle: 0,\n\t\t\tpie_padding: 0,\n\n\t\t\t/**\n\t\t\t * Set gauge options\n\t\t\t * @name gauge\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.\n\t\t\t * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge.\n\t\t\t * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\\n` character.\n\t\t\t * @property {Function} [gauge.label.extents] Set customized min/max label text.\n\t\t\t * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge.\n\t\t\t * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.\n\t\t\t * @property {Number} [gauge.min=0] Set min value of the gauge.\n\t\t\t * @property {Number} [gauge.max=100] Set max value of the gauge.\n\t\t\t * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2]\n\t\t\t * @property {String} [gauge.units] Set units of the gauge.\n\t\t\t * @property {Number} [gauge.width] Set width of gauge chart.\n\t\t\t * @example\n\t\t\t * gauge: {\n\t\t\t * fullCircle: false,\n\t\t\t * label: {\n\t\t\t * show: false,\n\t\t\t * format: function(value, ratio) {\n\t\t\t * return value;\n\t\t\t *\n\t\t\t * // to multiline, return with '\\n' character\n\t\t\t * // return value +\"%\\nLine1\\n2Line2\";\n\t\t\t * },\n\t\t\t * extents: function(value, isMax) {\n\t\t \t * return (isMax ? \"Max:\" : \"Min:\") + value;\n\t\t\t * }\n\t\t\t * },\n\t\t\t * expand: false,\n\t\t\t *\n\t\t\t * // or set duration\n\t\t\t * expand: {\n\t\t\t * duration: 20\n\t\t\t * },\n\t\t\t * min: -100,\n\t\t\t * max: 200,\n\t\t\t * units: \"%\",\n\t\t\t * width: 10\n\t\t\t * }\n\t\t\t */\n\t\t\tgauge_fullCircle: false,\n\t\t\tgauge_label_show: true,\n\t\t\tgauge_label_format: undefined,\n\t\t\tgauge_min: 0,\n\t\t\tgauge_max: 100,\n\t\t\tgauge_startingAngle: -1 * Math.PI / 2,\n\t\t\tgauge_label_extents: undefined,\n\t\t\tgauge_units: undefined,\n\t\t\tgauge_width: undefined,\n\t\t\tgauge_expand: {},\n\t\t\tgauge_expand_duration: 50,\n\n\n\t\t\t/**\n\t\t\t * Set donut options\n\t\t\t * @name donut\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece.\n\t\t\t * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.\n\t\t\t * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels.\n\t\t\t * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position.\n\t\t\t * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces.\n\t\t\t * @property {Number} [donut.width] Set width of donut chart.\n\t\t\t * @property {String} [donut.title=\"\"] Set title of donut chart. Use `\\n` character to enter line break.\n\t\t\t * @property {Number} [donut.padAngle=0] Set padding between data.\n\t\t\t * @example\n\t\t\t * donut: {\n\t\t\t * label: {\n\t\t\t * show: false,\n\t\t\t * format: function(value, ratio, id) {\n\t\t\t * return d3.format(\"$\")(value);\n\t\t\t * },\n\t\t\t * threshold: 0.1,\n\t\t\t *\n\t\t\t * // set ratio callback. Should return ratio value\n\t\t\t * ratio: function(d, radius, h) {\n\t\t\t * \t...\n\t\t\t * \treturn ratio;\n\t\t\t * },\n\t\t\t * // or set ratio number\n\t\t\t * ratio: 0.5\n\t\t\t * },\n\t\t\t * expand: false,\n\t\t\t * width: 10,\n\t\t\t * padAngle: 0.2,\n\t\t\t * title: \"Donut Title\"\n\t\t\t *\n\t\t\t * // title with line break\n\t\t\t * title: \"Title1\\nTitle2\"\n\t\t\t * }\n\t\t\t */\n\t\t\tdonut_label_show: true,\n\t\t\tdonut_label_format: undefined,\n\t\t\tdonut_label_threshold: 0.05,\n\t\t\tdonut_label_ratio: undefined,\n\t\t\tdonut_width: undefined,\n\t\t\tdonut_title: \"\",\n\t\t\tdonut_expand: {},\n\t\t\tdonut_expand_duration: 50,\n\t\t\tdonut_padAngle: 0,\n\n\t\t\t/**\n\t\t\t * Set spline options\n\t\t\t * @name spline\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {String} [spline.interpolation.type=cardinal]\n\t\t\t * @example\n\t\t\t * spline: {\n\t\t\t * interpolation: {\n\t\t\t * type: \"cardinal\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tspline_interpolation_type: \"cardinal\",\n\n\t\t\t/**\n\t\t\t * Set radar options\n\t\t\t * @name radar\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data.\n\t\t\t * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line.\n\t\t\t * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text.\n\t\t\t * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn.\n\t\t\t * @property {Number} [radar.level.depth=3] Set the level depth.\n\t\t\t * @property {Boolean} [radar.level.show=true] Show or hide level.\n\t\t\t * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value.\n\t\t\t * @property {Boolean} [radar.level.text.show=true] Show or hide level text.\n\t\t\t * @property {Number} [radar.size.ratio=0.87] Set size ratio.\n\t\t\t * @example\n\t\t\t * radar: {\n\t\t\t * axis: {\n\t\t\t * max: 50,\n\t\t\t * line: {\n\t\t\t * show: false\n\t\t\t * },\n\t\t\t * text: {\n\t\t\t * show: false\n\t\t\t * }\n\t\t\t * },\n\t\t\t * direction: {\n\t\t\t * clockwise: true\n\t\t\t * },\n\t\t\t * level: {\n\t\t\t * show: false,\n\t\t\t * text: {\n\t\t\t * format: function(x) {\n\t\t\t * return x + \"%\";\n\t\t\t * },\n\t\t\t * show: true\n\t\t\t * }\n\t\t\t * },\n\t\t\t * size: {\n\t\t\t * ratio: 0.7\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\tradar_axis_max: undefined,\n\t\t\tradar_axis_line_show: true,\n\t\t\tradar_axis_text_show: true,\n\t\t\tradar_level_depth: 3,\n\t\t\tradar_level_show: true,\n\t\t\tradar_level_text_format: x => (x % 1 === 0 ? x : x.toFixed(2)),\n\t\t\tradar_level_text_show: true,\n\t\t\tradar_size_ratio: 0.87,\n\t\t\tradar_direction_clockwise: false,\n\n\t\t\t/**\n\t\t\t * Show rectangles inside the chart.<br><br>\n\t\t\t * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional.\n\t\t\t * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class.\n\t\t\t * @name regions\n\t\t\t * @memberOf Options\n\t\t\t * @type {Array}\n\t\t\t * @default []\n\t\t\t * @example\n\t\t\t * regions: [\n\t\t\t * {\n\t\t\t * axis: \"x\",\n\t\t\t * start: 1,\n\t\t\t * end: 4,\n\t\t\t * class: \"region-1-4\"\n\t\t\t * }\n\t\t\t * ]\n\t\t\t */\n\t\t\tregions: [],\n\n\t\t\t/**\n\t\t\t * Tooltip options\n\t\t\t * @name tooltip\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {Boolean} [tooltip.show=true] Show or hide tooltip.<br>\n\t\t\t * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.\n\t\t\t * - **NOTE:** The overlapped data points will be displayed as grouped even if set false.\n\t\t\t * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.\n\t\t\t * @property {String} [tooltip.linked.name=\"\"] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.\n\t\t\t * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br>\n\t\t\t * Specified function receives x of the data point to show.\n\t\t\t * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>\n\t\t\t * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.\n\t\t\t * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>\n\t\t\t * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.\n\t\t\t * If undefined returned, the row of that value will be skipped.\n\t\t\t * @property {Function} [tooltip.position] Set custom position for the tooltip.<br>\n\t\t\t * This option can be used to modify the tooltip position by returning object that has top and left.\n\t\t\t * @property {Function} [tooltip.contents] Set custom HTML for the tooltip.<br>\n\t\t\t * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.\n\t\t\t * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization.\n\t\t\t * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization.\n\t\t\t * @property {Object} [tooltip.init.position={top: \"0px\",left: \"50px\"}] Set the position of tooltip at the initialization.\n\t\t\t * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.\n\t\t\t * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.\n\t\t\t * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown\n\t\t\t * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.\n\t\t\t * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br>\n\t\t\t * **Available Values:**\n\t\t\t * - `desc`: In descending data value order\n\t\t\t * - `asc`: In ascending data value order\n\t\t\t * - `null`: It keeps the data display order<br>\n\t\t\t * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>\n\t\t\t * If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string \"\")\n\t\t\t * - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)\n\t\t\t * @example\n\t\t\t * tooltip: {\n\t\t\t * show: true,\n\t\t\t * grouped: false,\n\t\t\t * format: {\n\t\t\t * title: function(x) { return \"Data \" + x; },\n\t\t\t * name: function(name, ratio, id, index) { return name; },\n\t\t\t * value: function(value, ratio, id, index) { return ratio; }\n\t\t\t * },\n\t\t\t * position: function(data, width, height, element) {\n\t\t\t * return {top: 0, left: 0}\n \t\t\t * },\n \t\t\t * contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\n \t\t\t * return ... // formatted html as you want\n \t\t * },\n \t\t *\n \t\t * // sort tooltip data value display in ascending order\n \t\t * order: \"asc\",\n \t\t *\n\t\t\t * // specifying sort function\n\t\t\t * order: function(a, b) {\n\t\t\t * // param data passed format\n\t\t\t * {x: 5, value: 250, id: \"data1\", index: 5, name: \"data1\"}\n\t\t\t * ...\n\t\t\t * },\n\t\t\t *\n\t\t\t * // show at the initialization\n\t\t\t * init: {\n\t\t\t * show: true,\n\t\t\t * x: 2,\n\t\t\t * position: {\n\t\t\t * top: \"150px\",\n\t\t\t * left: \"250px\"\n\t\t\t * }\n\t\t\t * },\n\t\t\t *\n\t\t\t * // fires prior tooltip is shown\n\t\t\t * onshow: function() { ...},\n\t\t\t * // fires prior tooltip is hidden\n\t\t\t * onhide: function() { ... },\n\t\t\t * // fires after tooltip is shown\n\t\t\t * onshown: function() { ... },\n\t\t\t * // fires after tooltip is hidden\n\t\t\t * onhidden: function() { ... },\n\t\t\t *\n\t\t\t * // Link any tooltips when multiple charts are on the screen where same x coordinates are available\n\t\t\t * // Useful for timeseries correlation\n\t\t\t * linked: true,\n\t\t\t *\n\t\t\t * // Specify name to interact those with the same name only.\n\t\t\t * linked: {\n\t\t\t * name: \"some-group\"\n\t\t\t * }\n\t\t\t * }\n\t\t\t */\n\t\t\ttooltip_show: true,\n\t\t\ttooltip_grouped: true,\n\t\t\ttooltip_format_title: undefined,\n\t\t\ttooltip_format_name: undefined,\n\t\t\ttooltip_format_value: undefined,\n\t\t\ttooltip_position: undefined,\n\t\t\ttooltip_contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\n\t\t\t\treturn this.getTooltipContent ?\n\t\t\t\t\tthis.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : \"\";\n\t\t\t},\n\t\t\ttooltip_init_show: false,\n\t\t\ttooltip_init_x: 0,\n\t\t\ttooltip_init_position: {\n\t\t\t\ttop: \"0px\",\n\t\t\t\tleft: \"50px\"\n\t\t\t},\n\t\t\ttooltip_linked: false,\n\t\t\ttooltip_linked_name: \"\",\n\t\t\ttooltip_onshow: () => {},\n\t\t\ttooltip_onhide: () => {},\n\t\t\ttooltip_onshown: () => {},\n\t\t\ttooltip_onhidden: () => {},\n\t\t\ttooltip_order: null,\n\n\t\t\t/**\n\t\t\t * Set title options\n\t\t\t * @name title\n\t\t\t * @memberOf Options\n\t\t\t * @type {Object}\n\t\t\t * @property {String} [title.text]\n\t\t\t * @property {Number} [title.padding.top=0]\n\t\t\t * @property {Number} [title.padding.right=0]\n\t\t\t * @property {Number} [title.padding.bottom=0]\n\t\t\t * @property {Number} [title.padding.left=0]\n\t\t\t * @property {String} [title.position=top-center]\n\t\t\t * @example\n\t\t\t * title: {\n\t\t\t * text: \"Title Text\",\n\t\t\t * padding: {\n\t\t\t * top: 10,\n\t\t\t * right: 10,\n\t\t\t * bottom: 10,\n\t\t\t * left: 10\n\t\t\t * },\n\t\t\t * position: \"top-center\"\n\t\t\t * }\n\t\t\t */\n\t\t\ttitle_text: undefined,\n\t\t\ttitle_padding: {\n\t\t\t\ttop: 0,\n\t\t\t\tright: 0,\n\t\t\t\tbottom: 0,\n\t\t\t\tleft: 0\n\t\t\t},\n\t\t\ttitle_position: \"top-center\"\n\t\t};\n\t}\n}\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tscaleTime as d3ScaleTime,\n\tscaleLinear as d3ScaleLinear\n} from \"d3-scale\";\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tgetScale(min, max, forTimeseries) {\n\t\treturn (forTimeseries ?\n\t\t\td3ScaleTime() : d3ScaleLinear()\n\t\t).range([min, max]);\n\t},\n\n\t/**\n\t * Get x Axis scale function\n\t * @param {Number} min\n\t * @param {Number} max\n\t * @param {Number} domain\n\t * @param {Function} offset The offset getter to be sum\n\t * @return {Function} scale\n\t * @private\n\t */\n\tgetX(min, max, domain, offset) {\n\t\tconst $$ = this;\n\t\tconst scale = $$.zoomScale || $$.getScale(min, max, $$.isTimeSeries());\n\n\t\treturn $$.getCustomizedScale(\n\t\t\tdomain ? scale.domain(domain) : scale,\n\t\t\toffset\n\t\t);\n\t},\n\n\tgetY(min, max, domain) {\n\t\tconst scale = this.getScale(min, max, this.isTimeSeriesY());\n\n\t\tdomain && scale.domain(domain);\n\n\t\treturn scale;\n\t},\n\n\t/**\n\t * Get customized scale\n\t * @param {d3.scaleLinear|d3.scaleTime} scaleValue\n\t * @param {Function} offsetValue Offset getter to be sum\n\t * @return {} scale\n\t * @private\n\t */\n\tgetCustomizedScale(scaleValue, offsetValue) {\n\t\tconst $$ = this;\n\t\tconst offset = offsetValue || (() => $$.xAxis.tickOffset());\n\t\tconst scale = function(d, raw) {\n\t\t\tconst v = scaleValue(d) + offset();\n\n\t\t\treturn raw ? v : Math.ceil(v);\n\t\t};\n\n\t\t// copy original scale methods\n\t\tfor (const key in scaleValue) {\n\t\t\tscale[key] = scaleValue[key];\n\t\t}\n\n\t\tscale.orgDomain = () => scaleValue.domain();\n\t\tscale.orgScale = () => scaleValue;\n\n\t\t// define custom domain() for categorized axis\n\t\tif ($$.isCategorized()) {\n\t\t\tscale.domain = function(domainValue) {\n\t\t\t\tlet domain = domainValue;\n\n\t\t\t\tif (!arguments.length) {\n\t\t\t\t\tdomain = this.orgDomain();\n\n\t\t\t\t\treturn [domain[0], domain[1] + 1];\n\t\t\t\t}\n\n\t\t\t\tscaleValue.domain(domain);\n\n\t\t\t\treturn scale;\n\t\t\t};\n\t\t}\n\n\t\treturn scale;\n\t},\n\n\tgetYScale(id) {\n\t\treturn this.axis.getId(id) === \"y2\" ? this.y2 : this.y;\n\t},\n\n\tgetSubYScale(id) {\n\t\treturn this.axis.getId(id) === \"y2\" ? this.subY2 : this.subY;\n\t},\n\n\t/**\n\t * Update scale\n\t * @private\n\t * @param {Boolean} withoutTransitionAtInit - param is given at the init rendering\n\t */\n\tupdateScales(withoutTransitionAtInit) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isInit = !$$.x;\n\n\t\t// update edges\n\t\t$$.xMin = isRotated ? 1 : 0;\n\t\t$$.xMax = isRotated ? $$.height : $$.width;\n\t\t$$.yMin = isRotated ? 0 : $$.height;\n\t\t$$.yMax = isRotated ? $$.width : 1;\n\t\t$$.subXMin = $$.xMin;\n\t\t$$.subXMax = $$.xMax;\n\t\t$$.subYMin = isRotated ? 0 : $$.height2;\n\t\t$$.subYMax = isRotated ? $$.width2 : 1;\n\n\t\t// update scales\n\t\t$$.x = $$.getX($$.xMin, $$.xMax,\n\t\t\tisInit ? undefined : $$.x.orgDomain(), () => $$.xAxis.tickOffset());\n\t\t$$.y = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y_default : $$.y.domain());\n\t\t$$.y2 = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y2_default : $$.y2.domain());\n\t\t$$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, d => (d % 1 ? 0 : $$.subXAxis.tickOffset()));\n\t\t$$.subY = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y_default : $$.subY.domain());\n\t\t$$.subY2 = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y2_default : $$.subY2.domain());\n\n\t\t// update axes\n\t\t$$.xAxisTickFormat = $$.axis.getXAxisTickFormat();\n\t\t$$.xAxisTickValues = $$.axis.getXAxisTickValues();\n\t\t$$.yAxisTickValues = $$.axis.getYAxisTickValues();\n\t\t$$.y2AxisTickValues = $$.axis.getY2AxisTickValues();\n\n\t\t$$.xAxis = $$.axis\n\t\t\t.getXAxis(\"x\", $$.x, $$.xOrient, $$.xAxisTickFormat,\n\t\t\t\t$$.xAxisTickValues, config.axis_x_tick_outer, withoutTransitionAtInit);\n\n\t\t$$.subXAxis = $$.axis\n\t\t\t.getXAxis(\"subx\", $$.subX, $$.subXOrient, $$.xAxisTickFormat,\n\t\t\t\t$$.xAxisTickValues, config.axis_x_tick_outer);\n\n\t\t$$.yAxis = $$.axis\n\t\t\t.getYAxis(\"y\", $$.y, $$.yOrient, config.axis_y_tick_format,\n\t\t\t\t$$.yAxisTickValues, config.axis_y_tick_outer);\n\n\t\t$$.y2Axis = $$.axis\n\t\t\t.getYAxis(\"y2\", $$.y2, $$.y2Orient, config.axis_y2_tick_format,\n\t\t\t\t$$.y2AxisTickValues, config.axis_y2_tick_outer);\n\n\t\t// update for arc\n\t\t$$.updateArc && $$.updateArc();\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmin as d3Min,\n\tmax as d3Max,\n\textent as d3Extent\n} from \"d3-array\"; // selection\nimport ChartInternal from \"./ChartInternal\";\nimport {extend, brushEmpty, getBrushSelection, isDefined, notEmpty, isValue, isObject, isNumber, diffDomain} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tgetYDomainMinMax(targets, type) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isMin = type === \"min\";\n\n\t\tconst dataGroups = config.data_groups;\n\t\tconst ids = $$.mapToIds(targets);\n\t\tconst ys = $$.getValuesAsIdKeyed(targets);\n\t\tconst f = isMin ? d3Min : d3Max;\n\n\t\tif (dataGroups.length > 0) {\n\t\t\tconst hasValue = $$[`has${isMin ? \"Negative\" : \"Positive\"}ValueInTargets`](targets);\n\t\t\tlet baseId;\n\t\t\tlet idsInGroup;\n\n\t\t\tfor (let j = 0; (idsInGroup = dataGroups[j]); j++) {\n\t\t\t\t// Determine baseId\n\t\t\t\tidsInGroup = idsInGroup.filter(v => ids.indexOf(v) >= 0);\n\n\t\t\t\tif (idsInGroup.length === 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tbaseId = idsInGroup[0];\n\n\t\t\t\t// Consider values\n\t\t\t\tif (hasValue && ys[baseId]) {\n\t\t\t\t\tconst setter = isMin ? (v, i) => {\n\t\t\t\t\t\tys[baseId][i] = v < 0 ? v : 0;\n\t\t\t\t\t} : (v, i) => {\n\t\t\t\t\t\tys[baseId][i] = v > 0 ? v : 0;\n\t\t\t\t\t};\n\n\t\t\t\t\tys[baseId].forEach(setter);\n\t\t\t\t}\n\n\t\t\t\t// Compute min\n\t\t\t\tfor (let k = 1, id; (id = idsInGroup[k]); k++) {\n\t\t\t\t\tif (!ys[id]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tys[id].forEach((v, i) => {\n\t\t\t\t\t\tconst val = +v;\n\t\t\t\t\t\tconst meetCondition = isMin ? val > 0 : val < 0;\n\n\t\t\t\t\t\tif ($$.axis.getId(id) === $$.axis.getId(baseId) &&\n\t\t\t\t\t\t\tys[baseId] && !(hasValue && meetCondition)) {\n\t\t\t\t\t\t\tys[baseId][i] += val;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn f(Object.keys(ys).map(key => f(ys[key])));\n\t},\n\n\tgetYDomainMin(targets) {\n\t\treturn this.getYDomainMinMax(targets, \"min\");\n\t},\n\n\tgetYDomainMax(targets) {\n\t\treturn this.getYDomainMinMax(targets, \"max\");\n\t},\n\n\tgetYDomain(targets, axisId, xDomain) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst targetsByAxisId = targets.filter(t => $$.axis.getId(t.id) === axisId);\n\t\tconst yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;\n\t\tconst yMin = axisId === \"y2\" ? config.axis_y2_min : config.axis_y_min;\n\t\tconst yMax = axisId === \"y2\" ? config.axis_y2_max : config.axis_y_max;\n\t\tlet yDomainMin = $$.getYDomainMin(yTargets);\n\t\tlet yDomainMax = $$.getYDomainMax(yTargets);\n\t\tconst center = axisId === \"y2\" ? config.axis_y2_center : config.axis_y_center;\n\t\tlet isZeroBased = ($$.hasType(\"bar\", yTargets) && config.bar_zerobased) || ($$.hasType(\"area\", yTargets) && config.area_zerobased);\n\t\tconst isInverted = axisId === \"y2\" ? config.axis_y2_inverted : config.axis_y_inverted;\n\t\tconst showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated;\n\t\tconst showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;\n\t\tlet lengths;\n\n\t\t// MEMO: avoid inverting domain unexpectedly\n\t\tyDomainMin = isValue(yMin) ? yMin :\n\t\t\t(isValue(yMax) ? (yDomainMin < yMax ? yDomainMin : yMax - 10) : yDomainMin);\n\t\tyDomainMax = isValue(yMax) ? yMax :\n\t\t\t(isValue(yMin) ? (yMin < yDomainMax ? yDomainMax : yMin + 10) : yDomainMax);\n\n\t\tif (yTargets.length === 0) { // use current domain if target of axisId is none\n\t\t\treturn axisId === \"y2\" ? $$.y2.domain() : $$.y.domain();\n\t\t}\n\n\t\tif (isNaN(yDomainMin)) { // set minimum to zero when not number\n\t\t\tyDomainMin = 0;\n\t\t}\n\n\t\tif (isNaN(yDomainMax)) { // set maximum to have same value as yDomainMin\n\t\t\tyDomainMax = yDomainMin;\n\t\t}\n\n\t\tif (yDomainMin === yDomainMax) {\n\t\t\tyDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;\n\t\t}\n\n\t\tconst isAllPositive = yDomainMin >= 0 && yDomainMax >= 0;\n\t\tconst isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;\n\n\t\t// Cancel zerobased if axis_*_min / axis_*_max specified\n\t\tif ((isValue(yMin) && isAllPositive) || (isValue(yMax) && isAllNegative)) {\n\t\t\tisZeroBased = false;\n\t\t}\n\n\t\t// Bar/Area chart should be 0-based if all positive|negative\n\t\tif (isZeroBased) {\n\t\t\tisAllPositive && (yDomainMin = 0);\n\t\t\tisAllNegative && (yDomainMax = 0);\n\t\t}\n\n\t\tconst domainLength = Math.abs(yDomainMax - yDomainMin);\n\t\tlet paddingTop = domainLength * 0.1;\n\t\tlet paddingBottom = domainLength * 0.1;\n\n\t\tif (isDefined(center)) {\n\t\t\tconst yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));\n\n\t\t\tyDomainMax = center + yDomainAbs;\n\t\t\tyDomainMin = center - yDomainAbs;\n\t\t}\n\n\t\t// add padding for data label\n\t\tif (showHorizontalDataLabel) {\n\t\t\tlengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"width\");\n\t\t\tconst diff = diffDomain($$.y.range());\n\t\t\tconst ratio = [lengths[0] / diff, lengths[1] / diff];\n\n\t\t\tpaddingTop += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1]));\n\t\t\tpaddingBottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));\n\t\t} else if (showVerticalDataLabel) {\n\t\t\tlengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"height\");\n\t\t\tpaddingTop += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength);\n\t\t\tpaddingBottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength);\n\t\t}\n\n\t\tif (axisId === \"y\" && notEmpty(config.axis_y_padding)) {\n\t\t\tpaddingTop = $$.axis.getPadding(config.axis_y_padding, \"top\", paddingTop, domainLength);\n\t\t\tpaddingBottom = $$.axis.getPadding(config.axis_y_padding, \"bottom\", paddingBottom, domainLength);\n\t\t}\n\n\t\tif (axisId === \"y2\" && notEmpty(config.axis_y2_padding)) {\n\t\t\tpaddingTop = $$.axis.getPadding(config.axis_y2_padding, \"top\", paddingTop, domainLength);\n\t\t\tpaddingBottom = $$.axis.getPadding(config.axis_y2_padding, \"bottom\", paddingBottom, domainLength);\n\t\t}\n\n\t\t// Bar/Area chart should be 0-based if all positive|negative\n\t\tif (isZeroBased) {\n\t\t\tisAllPositive && (paddingBottom = yDomainMin);\n\t\t\tisAllNegative && (paddingTop = -yDomainMax);\n\t\t}\n\n\t\tconst domain = [yDomainMin - paddingBottom, yDomainMax + paddingTop];\n\n\t\treturn isInverted ? domain.reverse() : domain;\n\t},\n\n\tgetXDomainMinMax(targets, type) {\n\t\tconst $$ = this;\n\t\tconst value = $$.config[`axis_x_${type}`];\n\t\tconst f = type === \"min\" ? d3Min : d3Max;\n\n\t\treturn isDefined(value) ?\n\t\t\t($$.isTimeSeries() ? $$.parseDate(value) : value) :\n\t\t\tf(targets, t => f(t.values, v => v.x));\n\t},\n\n\tgetXDomainMin(targets) {\n\t\treturn this.getXDomainMinMax(targets, \"min\");\n\t},\n\n\tgetXDomainMax(targets) {\n\t\treturn this.getXDomainMinMax(targets, \"max\");\n\t},\n\n\tgetXDomainPadding(domain) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst diff = domain[1] - domain[0];\n\t\tconst xPadding = config.axis_x_padding;\n\t\tlet maxDataCount;\n\t\tlet padding;\n\n\t\tif ($$.isCategorized()) {\n\t\t\tpadding = 0;\n\t\t} else if ($$.hasType(\"bar\")) {\n\t\t\tmaxDataCount = $$.getMaxDataCount();\n\t\t\tpadding = maxDataCount > 1 ? (diff / (maxDataCount - 1)) / 2 : 0.5;\n\t\t} else {\n\t\t\tpadding = diff * 0.01;\n\t\t}\n\n\t\tlet left = padding;\n\t\tlet right = padding;\n\n\t\tif (isObject(xPadding) && notEmpty(xPadding)) {\n\t\t\tleft = isValue(xPadding.left) ? xPadding.left : padding;\n\t\t\tright = isValue(xPadding.right) ? xPadding.right : padding;\n\t\t} else if (isNumber(config.axis_x_padding)) {\n\t\t\tleft = xPadding;\n\t\t\tright = xPadding;\n\t\t}\n\n\t\treturn {left, right};\n\t},\n\n\tgetXDomain(targets) {\n\t\tconst $$ = this;\n\t\tconst xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)];\n\t\tlet firstX = xDomain[0];\n\t\tlet lastX = xDomain[1];\n\t\tconst padding = $$.getXDomainPadding(xDomain);\n\t\tlet min = 0;\n\t\tlet max = 0;\n\t\t// show center of x domain if min and max are the same\n\n\t\tif ((firstX - lastX) === 0 && !$$.isCategorized()) {\n\t\t\tif ($$.isTimeSeries()) {\n\t\t\t\tfirstX = new Date(firstX.getTime() * 0.5);\n\t\t\t\tlastX = new Date(lastX.getTime() * 1.5);\n\t\t\t} else {\n\t\t\t\tfirstX = firstX === 0 ? 1 : (firstX * 0.5);\n\t\t\t\tlastX = lastX === 0 ? -1 : (lastX * 1.5);\n\t\t\t}\n\t\t}\n\n\t\tif (firstX || firstX === 0) {\n\t\t\tmin = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left;\n\t\t}\n\n\t\tif (lastX || lastX === 0) {\n\t\t\tmax = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right;\n\t\t}\n\n\t\treturn [min, max];\n\t},\n\n\tupdateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst zoomEnabled = config.zoom_enabled;\n\n\t\tif (withUpdateOrgXDomain) {\n\t\t\t$$.x.domain(domain || d3Extent($$.getXDomain(targets)));\n\t\t\t$$.orgXDomain = $$.x.domain();\n\n\t\t\tzoomEnabled && $$.zoom.updateScaleExtent();\n\n\t\t\t$$.subX.domain($$.x.domain());\n\t\t\t$$.brush && $$.brush.scale($$.subX);\n\t\t}\n\n\t\tif (withUpdateXDomain) {\n\t\t\tconst domainValue = domain || (!$$.brush || brushEmpty($$)) ?\n\t\t\t\t$$.orgXDomain : getBrushSelection($$).map($$.subX.invert);\n\n\t\t\t$$.x.domain(domainValue);\n\t\t\tzoomEnabled && $$.zoom.updateScaleExtent();\n\t\t}\n\n\t\t// Trim domain when too big by zoom mousemove event\n\t\twithTrim && $$.x.domain($$.trimXDomain($$.x.orgDomain()));\n\n\t\treturn $$.x.domain();\n\t},\n\n\ttrimXDomain(domain) {\n\t\tconst zoomDomain = this.getZoomDomain();\n\t\tconst min = zoomDomain[0];\n\t\tconst max = zoomDomain[1];\n\n\t\tif (domain[0] <= min) {\n\t\t\tdomain[1] = +domain[1] + (min - domain[0]);\n\t\t\tdomain[0] = min;\n\t\t}\n\n\t\tif (max <= domain[1]) {\n\t\t\tdomain[0] = +domain[0] - (domain[1] - max);\n\t\t\tdomain[1] = max;\n\t\t}\n\n\t\treturn domain;\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmin as d3Min,\n\tmax as d3Max,\n\tmerge as d3Merge,\n\tsum as d3Sum\n} from \"d3-array\";\nimport {set as d3Set} from \"d3-collection\";\nimport CLASS from \"../config/classes\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {\n\textend,\n\thasValue,\n\tisArray,\n\tisBoolean,\n\tisDefined,\n\tisFunction,\n\tisObject,\n\tisObjectType,\n\tisString,\n\tisUndefined,\n\tisValue,\n\tnotEmpty\n} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tisX(key) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst dataKey = config.data_x && key === config.data_x;\n\t\tconst existValue = notEmpty(config.data_xs) && hasValue(config.data_xs, key);\n\n\t\treturn dataKey || existValue;\n\t},\n\n\tisNotX(key) {\n\t\treturn !this.isX(key);\n\t},\n\n\tgetXKey(id) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\treturn config.data_x ?\n\t\t\tconfig.data_x : (notEmpty(config.data_xs) ? config.data_xs[id] : null);\n\t},\n\n\tgetXValuesOfXKey(key, targets) {\n\t\tconst $$ = this;\n\t\tconst ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];\n\t\tlet xValues;\n\n\t\tids.forEach(id => {\n\t\t\tif ($$.getXKey(id) === key) {\n\t\t\t\txValues = $$.data.xs[id];\n\t\t\t}\n\t\t});\n\n\t\treturn xValues;\n\t},\n\n\tgetIndexByX(x) {\n\t\tconst $$ = this;\n\t\tconst data = $$.filterByX($$.data.targets, x);\n\n\t\treturn data.length ? data[0].index : null;\n\t},\n\n\tgetXValue(id, i) {\n\t\tconst $$ = this;\n\n\t\treturn id in $$.data.xs &&\n\t\t\t$$.data.xs[id] &&\n\t\t\tisValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;\n\t},\n\n\tgetOtherTargetXs() {\n\t\tconst $$ = this;\n\t\tconst idsForX = Object.keys($$.data.xs);\n\n\t\treturn idsForX.length ? $$.data.xs[idsForX[0]] : null;\n\t},\n\n\tgetOtherTargetX(index) {\n\t\tconst xs = this.getOtherTargetXs();\n\n\t\treturn xs && index < xs.length ? xs[index] : null;\n\t},\n\n\taddXs(xs) {\n\t\tconst $$ = this;\n\n\t\tObject.keys(xs).forEach(id => {\n\t\t\t$$.config.data_xs[id] = xs[id];\n\t\t});\n\t},\n\n\thasMultipleX(xs) {\n\t\t// https://github.com/d3/d3-collection\n\t\treturn d3Set(Object.keys(xs).map(id => xs[id])).size() > 1;\n\t},\n\n\tisMultipleX() {\n\t\treturn notEmpty(this.config.data_xs) ||\n\t\t\t!this.config.data_xSort ||\n\t\t\tthis.hasType(\"bubble\") ||\n\t\t\tthis.hasType(\"scatter\");\n\t},\n\n\taddName(data) {\n\t\tconst $$ = this;\n\t\tlet name;\n\n\t\tif (data) {\n\t\t\tname = $$.config.data_names[data.id];\n\t\t\tdata.name = name !== undefined ? name : data.id;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\tgetAllValuesOnIndex(index) {\n\t\tconst $$ = this;\n\n\t\treturn $$.filterTargetsToShow($$.data.targets)\n\t\t\t.map(t => $$.addName($$.getValueOnIndex(t.values, index)));\n\t},\n\n\tgetValueOnIndex(values, index) {\n\t\tconst valueOnIndex = values.filter(v => v.index === index);\n\n\t\treturn valueOnIndex.length ? valueOnIndex[0] : null;\n\t},\n\n\tupdateTargetX(targets, x) {\n\t\tconst $$ = this;\n\n\t\ttargets.forEach(t => {\n\t\t\tt.values.forEach((v, i) => {\n\t\t\t\tv.x = $$.generateTargetX(x[i], t.id, i);\n\t\t\t});\n\n\t\t\t$$.data.xs[t.id] = x;\n\t\t});\n\t},\n\n\tupdateTargetXs(targets, xs) {\n\t\tconst $$ = this;\n\n\t\ttargets.forEach(t => {\n\t\t\txs[t.id] && $$.updateTargetX([t], xs[t.id]);\n\t\t});\n\t},\n\n\tgenerateTargetX(rawX, id, index) {\n\t\tconst $$ = this;\n\t\tlet x = index;\n\n\t\tif ($$.isTimeSeries()) {\n\t\t\tx = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index));\n\t\t} else if ($$.isCustomX() && !$$.isCategorized()) {\n\t\t\tx = isValue(rawX) ? +rawX : $$.getXValue(id, index);\n\t\t}\n\n\t\treturn x;\n\t},\n\n\tcloneTarget(target) {\n\t\treturn {\n\t\t\tid: target.id,\n\t\t\tid_org: target.id_org,\n\t\t\tvalues: target.values.map(d => ({x: d.x, value: d.value, id: d.id}))\n\t\t};\n\t},\n\n\tupdateXs() {\n\t\tconst $$ = this;\n\n\t\tif ($$.data.targets.length) {\n\t\t\t$$.xs = [];\n\n\t\t\t$$.data.targets[0].values.forEach(v => {\n\t\t\t\t$$.xs[v.index] = v.x;\n\t\t\t});\n\t\t}\n\t},\n\n\tgetPrevX(i) {\n\t\tconst x = this.xs[i - 1];\n\n\t\treturn isDefined(x) ? x : null;\n\t},\n\n\tgetNextX(i) {\n\t\tconst x = this.xs[i + 1];\n\n\t\treturn isDefined(x) ? x : null;\n\t},\n\n\t/**\n\t * Get base value isAreaRangeType\n\t * @param data Data object\n\t * @return {Number}\n\t * @private\n\t */\n\tgetBaseValue(data) {\n\t\tconst $$ = this;\n\t\tlet value = data.value;\n\n\t\t// In case of area-range, data is given as: [low, mid, high] or {low, mid, high}\n\t\t// will take the 'mid' as the base value\n\t\tif (value && $$.isAreaRangeType(data)) {\n\t\t\tvalue = $$.getAreaRangeData(data, \"mid\");\n\t\t}\n\n\t\treturn value;\n\t},\n\n\t/**\n\t * Get min/max value from the data\n\t * @private\n\t * @param {Array} data array data to be evaluated\n\t * @return {{min: {Number}, max: {Number}}}\n\t */\n\tgetMinMaxValue(data) {\n\t\tconst getBaseValue = this.getBaseValue.bind(this);\n\t\tlet min;\n\t\tlet max;\n\n\t\t(data || this.data.targets.map(t => t.values))\n\t\t\t.forEach(v => {\n\t\t\t\tmin = d3Min([min, d3Min(v, getBaseValue)]);\n\t\t\t\tmax = d3Max([max, d3Max(v, getBaseValue)]);\n\t\t\t});\n\n\t\treturn {min, max};\n\t},\n\n\t/**\n\t * Get the min/max data\n\t * @private\n\t * @return {{min: Array, max: Array}}\n\t */\n\tgetMinMaxData() {\n\t\tconst $$ = this;\n\t\tconst cacheKey = \"$minMaxData\";\n\t\tlet minMaxData = $$.getCache(cacheKey);\n\n\t\tif (!minMaxData) {\n\t\t\tconst data = $$.data.targets.map(t => t.values);\n\t\t\tconst minMax = $$.getMinMaxValue(data);\n\n\t\t\tlet min = [];\n\t\t\tlet max = [];\n\n\t\t\tdata.forEach(v => {\n\t\t\t\tconst minData = $$.getFilteredDataByValue(v, minMax.min);\n\t\t\t\tconst maxData = $$.getFilteredDataByValue(v, minMax.max);\n\n\t\t\t\tif (minData.length) {\n\t\t\t\t\tmin = min.concat(minData);\n\t\t\t\t}\n\n\t\t\t\tif (maxData.length) {\n\t\t\t\t\tmax = max.concat(maxData);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t// update the cached data\n\t\t\t$$.addCache(cacheKey, minMaxData = {min, max});\n\t\t}\n\n\t\treturn minMaxData;\n\t},\n\n\t/**\n\t * Get total data sum\n\t * @private\n\t * @return {Number}\n\t */\n\tgetTotalDataSum() {\n\t\tconst $$ = this;\n\t\tconst cacheKey = \"$totalDataSum\";\n\t\tlet totalDataSum = $$.getCache(cacheKey);\n\n\t\tif (!totalDataSum) {\n\t\t\tlet total = 0;\n\n\t\t\t$$.data.targets.map(t => t.values)\n\t\t\t\t.forEach(v => {\n\t\t\t\t\ttotal += d3Sum(v, t => t.value);\n\t\t\t\t});\n\n\t\t\t$$.addCache(cacheKey, totalDataSum = total);\n\t\t}\n\n\t\treturn totalDataSum;\n\t},\n\n\t/**\n\t * Get filtered data by value\n\t * @param {Object} data\n\t * @param {Number} value\n\t * @return {Array} filtered array data\n\t * @private\n\t */\n\tgetFilteredDataByValue(data, value) {\n\t\treturn data.filter(t => this.getBaseValue(t) === value);\n\t},\n\n\t/**\n\t * Return the max length of the data\n\t * @return {Number} max data length\n\t * @private\n\t */\n\tgetMaxDataCount() {\n\t\treturn d3Max(this.data.targets, t => t.values.length);\n\t},\n\n\tgetMaxDataCountTarget(targets) {\n\t\tconst length = targets.length;\n\t\tlet max = 0;\n\t\tlet maxTarget;\n\n\t\tif (length > 1) {\n\t\t\ttargets.forEach(t => {\n\t\t\t\tif (t.values.length > max) {\n\t\t\t\t\tmaxTarget = t;\n\t\t\t\t\tmax = t.values.length;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tmaxTarget = length ? targets[0] : null;\n\t\t}\n\n\t\treturn maxTarget;\n\t},\n\n\tmapToIds(targets) {\n\t\treturn targets.map(d => d.id);\n\t},\n\n\tmapToTargetIds(ids) {\n\t\tconst $$ = this;\n\n\t\treturn ids ? (isArray(ids) ? ids.concat() : [ids]) : $$.mapToIds($$.data.targets);\n\t},\n\n\thasTarget(targets, id) {\n\t\tconst ids = this.mapToIds(targets);\n\n\t\tfor (let i = 0, val; (val = ids[i]); i++) {\n\t\t\tif (val === id) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\tisTargetToShow(targetId) {\n\t\treturn this.hiddenTargetIds.indexOf(targetId) < 0;\n\t},\n\n\tisLegendToShow(targetId) {\n\t\treturn this.hiddenLegendIds.indexOf(targetId) < 0;\n\t},\n\n\tfilterTargetsToShow(targets) {\n\t\tconst $$ = this;\n\n\t\treturn targets.filter(t => $$.isTargetToShow(t.id));\n\t},\n\n\tmapTargetsToUniqueXs(targets) {\n\t\tconst $$ = this;\n\t\tlet xs = d3Set(d3Merge(\n\t\t\ttargets.map(t => t.values.map(v => +v.x))\n\t\t)).values();\n\n\t\txs = $$.isTimeSeries() ? xs.map(x => new Date(+x)) : xs.map(x => +x);\n\n\t\treturn xs.sort((a, b) => (a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN));\n\t},\n\n\taddHiddenTargetIds(targetIds) {\n\t\tthis.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds);\n\t},\n\n\tremoveHiddenTargetIds(targetIds) {\n\t\tthis.hiddenTargetIds = this.hiddenTargetIds.filter(id => targetIds.indexOf(id) < 0);\n\t},\n\n\taddHiddenLegendIds(targetIds) {\n\t\tthis.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds);\n\t},\n\n\tremoveHiddenLegendIds(targetIds) {\n\t\tthis.hiddenLegendIds = this.hiddenLegendIds.filter(id => targetIds.indexOf(id) < 0);\n\t},\n\n\tgetValuesAsIdKeyed(targets) {\n\t\tconst ys = {};\n\n\t\ttargets.forEach(t => {\n\t\t\tconst data = [];\n\n\t\t\tt.values.forEach(v => {\n\t\t\t\tconst value = v.value;\n\n\t\t\t\tif (isArray(value)) {\n\t\t\t\t\tdata.push(...value);\n\t\t\t\t} else if (isObject(value) && \"high\" in value) {\n\t\t\t\t\tdata.push(...Object.values(value));\n\t\t\t\t} else {\n\t\t\t\t\tdata.push(value);\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tys[t.id] = data;\n\t\t});\n\n\t\treturn ys;\n\t},\n\n\tcheckValueInTargets(targets, checker) {\n\t\tconst ids = Object.keys(targets);\n\t\tlet values;\n\n\t\tfor (let i = 0; i < ids.length; i++) {\n\t\t\tvalues = targets[ids[i]].values;\n\n\t\t\tfor (let j = 0; j < values.length; j++) {\n\t\t\t\tif (checker(values[j].value)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\thasNegativeValueInTargets(targets) {\n\t\treturn this.checkValueInTargets(targets, v => v < 0);\n\t},\n\n\thasPositiveValueInTargets(targets) {\n\t\treturn this.checkValueInTargets(targets, v => v > 0);\n\t},\n\n\t_checkOrder(type) {\n\t\tconst config = this.config;\n\n\t\treturn isString(config.data_order) &&\n\t\t\tconfig.data_order.toLowerCase() === type;\n\t},\n\n\tisOrderDesc() {\n\t\treturn this._checkOrder(\"desc\");\n\t},\n\n\tisOrderAsc() {\n\t\treturn this._checkOrder(\"asc\");\n\t},\n\n\t/**\n\t * Sort targets data\n\t * @param {Array} targetsValue\n\t * @return {Array}\n\t * @private\n\t */\n\torderTargets(targetsValue) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst targets = [...targetsValue];\n\t\tconst orderAsc = $$.isOrderAsc();\n\t\tconst orderDesc = $$.isOrderDesc();\n\n\t\tif (orderAsc || orderDesc) {\n\t\t\ttargets.sort((t1, t2) => {\n\t\t\t\tconst reducer = (p, c) => p + Math.abs(c.value);\n\t\t\t\tconst t1Sum = t1.values.reduce(reducer, 0);\n\t\t\t\tconst t2Sum = t2.values.reduce(reducer, 0);\n\n\t\t\t\treturn orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;\n\t\t\t});\n\t\t} else if (isFunction(config.data_order)) {\n\t\t\ttargets.sort(config.data_order);\n\t\t} // TODO: accept name array for order\n\n\t\treturn targets;\n\t},\n\n\tfilterByX(targets, x) {\n\t\treturn d3Merge(targets.map(t => t.values)).filter(v => v.x - x === 0);\n\t},\n\n\tfilterRemoveNull(data) {\n\t\treturn data.filter(d => isValue(this.getBaseValue(d)));\n\t},\n\n\tfilterByXDomain(targets, xDomain) {\n\t\treturn targets.map(t => ({\n\t\t\tid: t.id,\n\t\t\tid_org: t.id_org,\n\t\t\tvalues: t.values.filter(v => xDomain[0] <= v.x && v.x <= xDomain[1])\n\t\t}));\n\t},\n\n\thasDataLabel() {\n\t\tconst dataLabels = this.config.data_labels;\n\n\t\treturn (isBoolean(dataLabels) && dataLabels) ||\n\t\t\t(isObjectType(dataLabels) && notEmpty(dataLabels));\n\t},\n\n\tgetDataLabelLength(min, max, key) {\n\t\tconst $$ = this;\n\t\tconst lengths = [0, 0];\n\t\tconst paddingCoef = 1.3;\n\n\t\t$$.selectChart.select(\"svg\").selectAll(\".dummy\")\n\t\t\t.data([min, max])\n\t\t\t.enter()\n\t\t\t.append(\"text\")\n\t\t\t.text(d => $$.dataLabelFormat(d.id)(d))\n\t\t\t.each(function(d, i) {\n\t\t\t\tlengths[i] = this.getBoundingClientRect()[key] * paddingCoef;\n\t\t\t})\n\t\t\t.remove();\n\n\t\treturn lengths;\n\t},\n\n\tisNoneArc(d) {\n\t\treturn this.hasTarget(this.data.targets, d.id);\n\t},\n\n\tisArc(d) {\n\t\treturn \"data\" in d && this.hasTarget(this.data.targets, d.data.id);\n\t},\n\n\tfindSameXOfValues(values, index) {\n\t\tconst targetX = values[index].x;\n\t\tconst sames = [];\n\t\tlet i;\n\n\t\tfor (i = index - 1; i >= 0; i--) {\n\t\t\tif (targetX !== values[i].x) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tsames.push(values[i]);\n\t\t}\n\n\t\tfor (i = index; i < values.length; i++) {\n\t\t\tif (targetX !== values[i].x) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tsames.push(values[i]);\n\t\t}\n\n\t\treturn sames;\n\t},\n\n\tfindClosestFromTargets(targets, pos) {\n\t\tconst $$ = this;\n\t\tconst candidates = targets.map(target => $$.findClosest(target.values, pos)); // map to array of closest points of each target\n\n\t\t// decide closest point and return\n\t\treturn $$.findClosest(candidates, pos);\n\t},\n\n\tfindClosest(values, pos) {\n\t\tconst $$ = this;\n\t\tlet minDist = $$.config.point_sensitivity;\n\t\tlet closest;\n\n\t\t// find mouseovering bar\n\t\tvalues\n\t\t\t.filter(v => v && $$.isBarType(v.id))\n\t\t\t.forEach(v => {\n\t\t\t\tconst shape = $$.main.select(`.${CLASS.bars}${$$.getTargetSelectorSuffix(v.id)} .${CLASS.bar}-${v.index}`).node();\n\n\t\t\t\tif (!closest && $$.isWithinBar(shape)) {\n\t\t\t\t\tclosest = v;\n\t\t\t\t}\n\t\t\t});\n\n\t\t// find closest point from non-bar\n\t\tvalues\n\t\t\t.filter(v => v && !$$.isBarType(v.id))\n\t\t\t.forEach(v => {\n\t\t\t\tconst d = $$.dist(v, pos);\n\n\t\t\t\tif (d < minDist) {\n\t\t\t\t\tminDist = d;\n\t\t\t\t\tclosest = v;\n\t\t\t\t}\n\t\t\t});\n\n\t\treturn closest;\n\t},\n\n\tdist(data, pos) {\n\t\tconst $$ = this;\n\t\tconst isRotated = $$.config.axis_rotated;\n\n\t\tconst xIndex = isRotated ? 1 : 0;\n\t\tconst yIndex = isRotated ? 0 : 1;\n\t\tconst y = $$.circleY(data, data.index);\n\t\tconst x = $$.x(data.x);\n\n\t\treturn Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));\n\t},\n\n\t/**\n\t * Convert data for step type\n\t * @param {Array} values Object data values\n\t * @return {Array}\n\t * @private\n\t */\n\tconvertValuesToStep(values) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst stepType = config.line_step_type;\n\t\tconst isCategorized = $$.isCategorized();\n\n\t\tconst converted = isArray(values) ? values.concat() : [values];\n\n\t\tif (!isRotated && !isCategorized) {\n\t\t\treturn values;\n\t\t}\n\n\t\t// insert & append cloning first/last value to be fully rendered covering on each gap sides\n\t\tconst id = converted[0].id;\n\n\t\t// insert\n\t\tlet x = converted[0].x - 1;\n\t\tlet value = converted[0].value;\n\n\t\tisCategorized && converted.unshift({x, value, id});\n\n\t\tstepType === \"step-after\" &&\n\t\t\tconverted.unshift({x: x - 1, value, id});\n\n\t\t// append\n\t\tx = converted.length;\n\t\tvalue = converted[x - 1].value;\n\n\t\tisCategorized && converted.push({x, value, id});\n\n\t\tstepType === \"step-before\" &&\n\t\t\tconverted.push({x: x + 1, value, id});\n\n\t\treturn converted;\n\t},\n\n\tconvertValuesToRange(values) {\n\t\tconst converted = isArray(values) ? values.concat() : [values];\n\t\tconst ranges = [];\n\n\t\tconverted.forEach(range => {\n\t\t\tconst x = range.x;\n\t\t\tconst id = range.id;\n\n\t\t\tranges.push({\n\t\t\t\tx,\n\t\t\t\tid,\n\t\t\t\tvalue: range.value[0]\n\t\t\t});\n\n\t\t\tranges.push({\n\t\t\t\tx,\n\t\t\t\tid,\n\t\t\t\tvalue: range.value[2]\n\t\t\t});\n\t\t});\n\n\t\treturn ranges;\n\t},\n\n\tupdateDataAttributes(name, attrs) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst current = config[`data_${name}`];\n\n\t\tif (isUndefined(attrs)) {\n\t\t\treturn current;\n\t\t}\n\n\t\tObject.keys(attrs).forEach(id => {\n\t\t\tcurrent[id] = attrs[id];\n\t\t});\n\n\t\t$$.redraw({withLegend: true});\n\n\t\treturn current;\n\t},\n\n\tgetAreaRangeData(d, type) {\n\t\tconst value = d.value;\n\n\t\tif (isArray(value)) {\n\t\t\tconst index = [\"high\", \"mid\", \"low\"].indexOf(type);\n\n\t\t\treturn index === -1 ? null : value[index];\n\t\t}\n\n\t\treturn value[type];\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__22__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tcsvParse as d3CsvParse,\n\ttsvParse as d3TsvParse,\n\tcsvParseRows as d3CsvParseRows,\n\ttsvParseRows as d3TsvParseRows,\n} from \"d3-dsv\";\nimport {keys as d3Keys} from \"d3-collection\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {isUndefined, isDefined, isObject, isValue, notEmpty, extend, isArray, capitalize} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tconvertUrlToData(url, mimeType = \"csv\", headers, keys, done) {\n\t\tconst req = new XMLHttpRequest();\n\n\t\tif (headers) {\n\t\t\tfor (const header of Object.keys(headers)) {\n\t\t\t\treq.setRequestHeader(header, headers[header]);\n\t\t\t}\n\t\t}\n\n\t\treq.open(\"GET\", url);\n\t\treq.onreadystatechange = () => {\n\t\t\tif (req.readyState === 4) {\n\t\t\t\tif (req.status === 200) {\n\t\t\t\t\tconst response = req.responseText;\n\n\t\t\t\t\tresponse && done.call(this,\n\t\t\t\t\t\tthis[`convert${capitalize(mimeType)}ToData`](\n\t\t\t\t\t\t\tmimeType === \"json\" ? JSON.parse(response) : response,\n\t\t\t\t\t\t\tkeys\n\t\t\t\t\t\t));\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(`${url}: Something went wrong loading!`);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treq.send();\n\t},\n\n\t_convertCsvTsvToData(parser, xsv) {\n\t\tconst rows = parser.rows(xsv);\n\t\tlet d;\n\n\t\tif (rows.length === 1) {\n\t\t\td = [{}];\n\n\t\t\trows[0].forEach(id => {\n\t\t\t\td[0][id] = null;\n\t\t\t});\n\t\t} else {\n\t\t\td = parser.parse(xsv);\n\t\t}\n\n\t\treturn d;\n\t},\n\n\tconvertCsvToData(xsv) {\n\t\treturn this._convertCsvTsvToData({\n\t\t\trows: d3CsvParseRows,\n\t\t\tparse: d3CsvParse\n\t\t}, xsv);\n\t},\n\n\tconvertTsvToData(tsv) {\n\t\treturn this._convertCsvTsvToData({\n\t\t\trows: d3TsvParseRows,\n\t\t\tparse: d3TsvParse\n\t\t}, tsv);\n\t},\n\n\tconvertJsonToData(json, keysParam) {\n\t\tconst config = this.config;\n\t\tconst newRows = [];\n\t\tlet targetKeys;\n\t\tlet data;\n\n\t\tif (isArray(json)) {\n\t\t\tconst keys = keysParam || config.data_keys;\n\n\t\t\tif (keys.x) {\n\t\t\t\ttargetKeys = keys.value.concat(keys.x);\n\t\t\t\tconfig.data_x = keys.x;\n\t\t\t} else {\n\t\t\t\ttargetKeys = keys.value;\n\t\t\t}\n\n\t\t\tnewRows.push(targetKeys);\n\n\t\t\tjson.forEach(o => {\n\t\t\t\tconst newRow = [];\n\n\t\t\t\tfor (const key of targetKeys) {\n\t\t\t\t\t// convert undefined to null because undefined data will be removed in convertDataToTargets()\n\t\t\t\t\tlet v = this.findValueInJson(o, key);\n\n\t\t\t\t\tif (isUndefined(v)) {\n\t\t\t\t\t\tv = null;\n\t\t\t\t\t}\n\n\t\t\t\t\tnewRow.push(v);\n\t\t\t\t}\n\n\t\t\t\tnewRows.push(newRow);\n\t\t\t});\n\n\t\t\tdata = this.convertRowsToData(newRows);\n\t\t} else {\n\t\t\tObject.keys(json).forEach(key => {\n\t\t\t\tconst tmp = json[key].concat();\n\n\t\t\t\ttmp.unshift(key);\n\t\t\t\tnewRows.push(tmp);\n\t\t\t});\n\n\t\t\tdata = this.convertColumnsToData(newRows);\n\t\t}\n\n\t\treturn data;\n\t},\n\n\tfindValueInJson(object, path) {\n\t\tif (object[path] !== undefined) {\n\t\t\treturn object[path];\n\t\t}\n\n\t\tconst convertedPath = path.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties (replace [] with .)\n\t\tconst pathArray = convertedPath.replace(/^\\./, \"\").split(\".\"); // strip a leading dot\n\t\tlet target = object;\n\n\t\tfor (const k of pathArray) {\n\t\t\tif (k in target) {\n\t\t\t\ttarget = target[k];\n\t\t\t} else {\n\t\t\t\ttarget = undefined;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn target;\n\t},\n\n\tconvertRowsToData(rows) {\n\t\tconst keys = rows[0];\n\t\tconst newRows = [];\n\n\t\tfor (let i = 1, len1 = rows.length; i < len1; i++) {\n\t\t\tconst newRow = {};\n\n\t\t\tfor (let j = 0, len2 = rows[i].length; j < len2; j++) {\n\t\t\t\tif (isUndefined(rows[i][j])) {\n\t\t\t\t\tthrow new Error(`Source data is missing a component at (${i}, ${j})!`);\n\t\t\t\t}\n\n\t\t\t\tnewRow[keys[j]] = rows[i][j];\n\t\t\t}\n\n\t\t\tnewRows.push(newRow);\n\t\t}\n\n\t\treturn newRows;\n\t},\n\n\tconvertColumnsToData(columns) {\n\t\tconst newRows = [];\n\n\t\tfor (let i = 0, len1 = columns.length; i < len1; i++) {\n\t\t\tconst key = columns[i][0];\n\n\t\t\tfor (let j = 1, len2 = columns[i].length; j < len2; j++) {\n\t\t\t\tif (isUndefined(newRows[j - 1])) {\n\t\t\t\t\tnewRows[j - 1] = {};\n\t\t\t\t}\n\n\t\t\t\tif (isUndefined(columns[i][j])) {\n\t\t\t\t\tthrow new Error(`Source data is missing a component at (${i}, ${j})!`);\n\t\t\t\t}\n\n\t\t\t\tnewRows[j - 1][key] = columns[i][j];\n\t\t\t}\n\t\t}\n\n\t\treturn newRows;\n\t},\n\n\tconvertDataToTargets(data, appendXs) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst ids = d3Keys(data[0]).filter($$.isNotX, $$);\n\t\tconst xs = d3Keys(data[0]).filter($$.isX, $$);\n\t\tlet xsData;\n\n\t\t// save x for update data by load when custom x and bb.x API\n\t\tids.forEach(id => {\n\t\t\tconst xKey = this.getXKey(id);\n\n\t\t\tif (this.isCustomX() || this.isTimeSeries()) {\n\t\t\t\t// if included in input data\n\t\t\t\tif (xs.indexOf(xKey) >= 0) {\n\t\t\t\t\txsData = ((appendXs && $$.data.xs[id]) || [])\n\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\tdata.map(d => d[xKey])\n\t\t\t\t\t\t\t\t.filter(isValue)\n\t\t\t\t\t\t\t\t.map((rawX, i) => $$.generateTargetX(rawX, id, i))\n\t\t\t\t\t\t);\n\t\t\t\t} else if (config.data_x) {\n\t\t\t\t\t// if not included in input data, find from preloaded data of other id's x\n\t\t\t\t\txsData = this.getOtherTargetXs();\n\t\t\t\t} else if (notEmpty(config.data_xs)) {\n\t\t\t\t\t// if not included in input data, find from preloaded data\n\t\t\t\t\txsData = $$.getXValuesOfXKey(xKey, $$.data.targets);\n\t\t\t\t}\n\t\t\t\t// MEMO: if no x included, use same x of current will be used\n\t\t\t} else {\n\t\t\t\txsData = data.map((d, i) => i);\n\t\t\t}\n\n\t\t\txsData && (this.data.xs[id] = xsData);\n\t\t});\n\n\t\t// check x is defined\n\t\tids.forEach(id => {\n\t\t\tif (!xsData) {\n\t\t\t\tthrow new Error(`x is not defined for id = \"${id}\".`);\n\t\t\t}\n\t\t});\n\n\t\t// convert to target\n\t\tconst targets = ids.map((id, index) => {\n\t\t\tconst convertedId = config.data_idConverter(id);\n\t\t\tconst xKey = $$.getXKey(id);\n\t\t\tconst isCategorized = $$.isCustomX() && $$.isCategorized();\n\t\t\tconst hasCategory = isCategorized && data.map(v => v.x)\n\t\t\t\t.every(v => config.axis_x_categories.indexOf(v) > -1);\n\n\t\t\treturn {\n\t\t\t\tid: convertedId,\n\t\t\t\tid_org: id,\n\t\t\t\tvalues: data.map((d, i) => {\n\t\t\t\t\tconst rawX = d[xKey];\n\t\t\t\t\tlet value = d[id];\n\t\t\t\t\tlet x;\n\n\t\t\t\t\tvalue = value !== null && !isNaN(value) ?\n\t\t\t\t\t\t+d[id] : (isArray(value) || (isObject(value) && value.high) ? value : null);\n\n\t\t\t\t\t// use x as categories if custom x and categorized\n\t\t\t\t\tif (isCategorized && index === 0 && !isUndefined(rawX)) {\n\t\t\t\t\t\tif (!hasCategory && index === 0 && i === 0) {\n\t\t\t\t\t\t\tconfig.axis_x_categories = [];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tx = config.axis_x_categories.indexOf(rawX);\n\n\t\t\t\t\t\tif (x === -1) {\n\t\t\t\t\t\t\tx = config.axis_x_categories.length;\n\t\t\t\t\t\t\tconfig.axis_x_categories.push(rawX);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tx = $$.generateTargetX(rawX, id, i);\n\t\t\t\t\t}\n\n\t\t\t\t\t// mark as x = undefined if value is undefined and filter to remove after mapped\n\t\t\t\t\tif (isUndefined(d[id]) || $$.data.xs[id].length <= i) {\n\t\t\t\t\t\tx = undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {x, value, id: convertedId};\n\t\t\t\t}).filter(v => isDefined(v.x))\n\t\t\t};\n\t\t});\n\n\t\t// finish targets\n\t\ttargets.forEach(t => {\n\t\t\t// sort values by its x\n\t\t\tif (config.data_xSort) {\n\t\t\t\tt.values = t.values.sort((v1, v2) => {\n\t\t\t\t\tconst x1 = v1.x || v1.x === 0 ? v1.x : Infinity;\n\t\t\t\t\tconst x2 = v2.x || v2.x === 0 ? v2.x : Infinity;\n\n\t\t\t\t\treturn x1 - x2;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// indexing each value\n\t\t\tt.values.forEach((v, i) => {\n\t\t\t\tconst index = $$.data.targets ? $$.getIndexByX(v.x) : null;\n\n\t\t\t\tv.index = index === null ? i : index;\n\t\t\t});\n\n\t\t\t// this needs to be sorted because its index and value.index is identical\n\t\t\t$$.data.xs[t.id].sort((v1, v2) => v1 - v2);\n\t\t});\n\n\t\t// cache information about values\n\t\t$$.hasNegativeValue = $$.hasNegativeValueInTargets(targets);\n\t\t$$.hasPositiveValue = $$.hasPositiveValueInTargets(targets);\n\n\t\t// set target types\n\t\tif (config.data_type) {\n\t\t\t$$.setTargetType($$.mapToIds(targets)\n\t\t\t\t.filter(id => !(id in config.data_types)), config.data_type);\n\t\t}\n\n\t\t// cache as original id keyed\n\t\ttargets.forEach(d => $$.addCache(d.id_org, d, true));\n\n\t\treturn targets;\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__24__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport CLASS from \"../config/classes\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {extend} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tload(rawTargets, args) {\n\t\tconst $$ = this;\n\t\tlet targets = rawTargets;\n\n\t\tif (targets) {\n\t\t\t// filter loading targets if needed\n\t\t\tif (args.filter) {\n\t\t\t\ttargets = targets.filter(args.filter);\n\t\t\t}\n\n\t\t\t// set type if args.types || args.type specified\n\t\t\tif (args.type || args.types) {\n\t\t\t\ttargets.forEach(t => {\n\t\t\t\t\tconst type = (args.types && args.types[t.id]) || args.type;\n\n\t\t\t\t\t$$.setTargetType(t.id, type);\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Update/Add data\n\t\t\t$$.data.targets.forEach(d => {\n\t\t\t\tfor (let i = 0; i < targets.length; i++) {\n\t\t\t\t\tif (d.id === targets[i].id) {\n\t\t\t\t\t\td.values = targets[i].values;\n\t\t\t\t\t\ttargets.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t$$.data.targets = $$.data.targets.concat(targets); // add remained\n\t\t}\n\n\t\t// Set targets\n\t\t$$.updateTargets($$.data.targets);\n\n\t\t// Redraw with new targets\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithLegend: true\n\t\t});\n\n\t\targs.done && args.done();\n\t},\n\n\tloadFromArgs(args) {\n\t\tconst $$ = this;\n\t\tlet data;\n\n\t\t// reset internally cached data\n\t\t$$.resetCache();\n\n\t\tif (args.data) {\n\t\t\tdata = args.data;\n\t\t} else if (args.url) {\n\t\t\t$$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, d => {\n\t\t\t\t$$.load($$.convertDataToTargets(d), args);\n\t\t\t});\n\t\t} else if (args.json) {\n\t\t\tdata = $$.convertJsonToData(args.json, args.keys);\n\t\t} else if (args.rows) {\n\t\t\tdata = $$.convertRowsToData(args.rows);\n\t\t} else if (args.columns) {\n\t\t\tdata = $$.convertColumnsToData(args.columns);\n\t\t}\n\n\t\t$$.load(data ? $$.convertDataToTargets(data) : null, args);\n\t},\n\n\tunload(rawTargetIds, customDoneCb) {\n\t\tconst $$ = this;\n\t\tlet done = customDoneCb;\n\t\tlet targetIds = rawTargetIds;\n\n\t\t// reset internally cached data\n\t\t$$.resetCache();\n\n\t\tif (!done) {\n\t\t\tdone = () => {};\n\t\t}\n\n\t\t// filter existing target\n\t\ttargetIds = targetIds.filter(id => $$.hasTarget($$.data.targets, id));\n\n\t\t// If no target, call done and return\n\t\tif (!targetIds || targetIds.length === 0) {\n\t\t\tdone();\n\t\t\treturn;\n\t\t}\n\n\t\t$$.svg.selectAll(targetIds.map(id => $$.selectorTarget(id)))\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove()\n\t\t\t.call($$.endall, done);\n\n\t\ttargetIds.forEach(id => {\n\t\t\t// Reset fadein for future load\n\t\t\t$$.withoutFadeIn[id] = false;\n\t\t\t// Remove target's elements\n\t\t\tif ($$.legend) {\n\t\t\t\t$$.legend.selectAll(`.${CLASS.legendItem}${$$.getTargetSelectorSuffix(id)}`).remove();\n\t\t\t}\n\t\t\t// Remove target\n\t\t\t$$.data.targets = $$.data.targets.filter(t => t.id !== id);\n\t\t});\n\t}\n});\n\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Category Name\n\t * @private\n\t * @param {Number} index\n\t * @returns {String} gategory Name\n\t */\n\tcategoryName(i) {\n\t\tconst config = this.config;\n\n\t\treturn i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmouse as d3Mouse,\n\tselect as d3Select,\n\tevent as d3Event\n} from \"d3-selection\";\nimport {drag as d3Drag} from \"d3-drag\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {emulateEvent, extend, isBoolean} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initialize the area that detects the event.\n\t * Add a container for the zone that detects the event.\n\t * @private\n\t */\n\tinitEventRect() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.chart}`)\n\t\t\t.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.eventRects)\n\t\t\t.style(\"fill-opacity\", \"0\");\n\t},\n\n\t/**\n\t * Redraws the area that detects the event.\n\t * @private\n\t */\n\tredrawEventRect() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst zoomEnabled = config.zoom_enabled;\n\t\tconst isMultipleX = $$.isMultipleX();\n\n\t\tlet eventRectUpdate;\n\t\tconst eventRects = $$.main.select(`.${CLASS.eventRects}`)\n\t\t\t.style(\"cursor\", zoomEnabled && (zoomEnabled === true || zoomEnabled.type === \"wheel\") ? (\n\t\t\t\tconfig.axis_rotate ? \"ns-resize\" : \"ew-resize\"\n\t\t\t) : null)\n\t\t\t.classed(CLASS.eventRectsMultiple, isMultipleX)\n\t\t\t.classed(CLASS.eventRectsSingle, !isMultipleX);\n\n\t\t// clear old rects\n\t\teventRects.selectAll(`.${CLASS.eventRect}`).remove();\n\n\t\t// open as public constiable\n\t\t$$.eventRect = eventRects.selectAll(`.${CLASS.eventRect}`);\n\n\t\tif (isMultipleX) {\n\t\t\teventRectUpdate = $$.eventRect.data([0]);\n\t\t\t// update\n\t\t\t// enter: only one rect will be added\n\t\t\t// exit: not needed because always only one rect exists\n\t\t\teventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter())\n\t\t\t\t.merge(eventRectUpdate);\n\t\t} else {\n\t\t\t// Set data and update $$.eventRect\n\t\t\tconst maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets);\n\n\t\t\teventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []);\n\t\t\t$$.eventRect = eventRects.selectAll(`.${CLASS.eventRect}`);\n\t\t\teventRectUpdate = $$.eventRect.data(d => d);\n\n\t\t\t// exit\n\t\t\teventRectUpdate.exit().remove();\n\n\t\t\t// update\n\t\t\teventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter())\n\t\t\t\t.merge(eventRectUpdate);\n\t\t}\n\n\t\t$$.updateEventRect(eventRectUpdate);\n\n\t\tif ($$.inputType === \"touch\" && !$$.svg.on(\"touchstart.eventRect\") && !$$.hasArcType()) {\n\t\t\t$$.bindTouchOnEventRect(isMultipleX);\n\t\t}\n\t},\n\n\tbindTouchOnEventRect(isMultipleX) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst getEventRect = () => {\n\t\t\tconst touch = d3Event.changedTouches[0];\n\n\t\t\treturn d3Select(document.elementFromPoint(touch.clientX, touch.clientY));\n\t\t};\n\n\t\tconst getIndex = eventRect => {\n\t\t\tlet index = eventRect && eventRect.attr(\"class\") && eventRect.attr(\"class\")\n\t\t\t\t.replace(new RegExp(`(${CLASS.eventRect}-?|s)`, \"g\"), \"\") * 1;\n\n\t\t\tif (isNaN(index) || index === null) {\n\t\t\t\tindex = -1;\n\t\t\t}\n\n\t\t\treturn index;\n\t\t};\n\n\t\tconst selectRect = context => {\n\t\t\tif (isMultipleX) {\n\t\t\t\t$$.selectRectForMultipleXs(context);\n\t\t\t} else {\n\t\t\t\tconst eventRect = getEventRect();\n\t\t\t\tconst index = getIndex(eventRect);\n\n\t\t\t\t$$.setOver(index);\n\n\t\t\t\tindex === -1 ?\n\t\t\t\t\t$$.unselectRect() :\n\t\t\t\t\t$$.selectRectForSingle(context, eventRect, index);\n\t\t\t}\n\t\t};\n\n\t\t// call event.preventDefault()\n\t\t// according 'interaction.inputType.touch.preventDefault' option\n\t\tconst preventDefault = config.interaction_inputType_touch.preventDefault;\n\t\tconst isPrevented = (isBoolean(preventDefault) && preventDefault) || false;\n\t\tconst preventThreshold = (!isNaN(preventDefault) && preventDefault) || null;\n\t\tlet startPx;\n\n\t\tconst preventEvent = event => {\n\t\t\tconst eventType = event.type;\n\t\t\tconst touch = event.changedTouches[0];\n\t\t\tconst currentXY = touch[`client${config.axis_rotated ? \"Y\" : \"X\"}`];\n\n\t\t\t// prevent document scrolling\n\t\t\tif (eventType === \"touchstart\") {\n\t\t\t\tif (isPrevented) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if (preventThreshold !== null) {\n\t\t\t\t\tstartPx = currentXY;\n\t\t\t\t}\n\t\t\t} else if (eventType === \"touchmove\") {\n\t\t\t\tif (isPrevented || startPx === true || (\n\t\t\t\t\tpreventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold\n\t\t\t\t)) {\n\t\t\t\t\t// once prevented, keep prevented during whole 'touchmove' context\n\t\t\t\t\tstartPx = true;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// bind touch events\n\t\t$$.svg\n\t\t\t.on(\"touchstart.eventRect touchmove.eventRect\", function() {\n\t\t\t\tconst eventRect = getEventRect();\n\n\t\t\t\tif (!eventRect.empty() && eventRect.classed(CLASS.eventRect)) {\n\t\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tpreventEvent(d3Event);\n\t\t\t\t\tselectRect(this);\n\t\t\t\t} else {\n\t\t\t\t\t$$.unselectRect();\n\t\t\t\t}\n\t\t\t})\n\t\t\t.on(\"touchend.eventRect\", () => {\n\t\t\t\tconst eventRect = getEventRect();\n\n\t\t\t\tif (!eventRect.empty() && eventRect.classed(CLASS.eventRect)) {\n\t\t\t\t\tif ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) {\n\t\t\t\t\t\t$$.cancelClick && ($$.cancelClick = false);\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Call event handler\n\t\t\t\t\tconst index = getIndex(eventRect);\n\n\t\t\t\t\t!isMultipleX && index !== -1 &&\n\t\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\n\t\t\t\t\t\t.each(d2 => config.data_onout.call($$.api, d2));\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t/**\n\t * Updates the location and size of the eventRect.\n\t * @private\n\t * @param {Object} d3.select(CLASS.eventRects) object.\n\t */\n\tupdateEventRect(eventRectUpdate) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst xScale = $$.zoomScale || $$.x;\n\t\tconst eventRectData = eventRectUpdate || $$.eventRect.data();// set update selection if null\n\t\tconst isRotated = config.axis_rotated;\n\t\tlet x;\n\t\tlet y;\n\t\tlet w;\n\t\tlet h;\n\n\t\tif ($$.isMultipleX()) {\n\t\t\t// TODO: rotated not supported yet\n\t\t\tx = 0;\n\t\t\ty = 0;\n\t\t\tw = $$.width;\n\t\t\th = $$.height;\n\t\t} else {\n\t\t\tlet rectW;\n\t\t\tlet rectX;\n\n\t\t\tif ($$.isCategorized()) {\n\t\t\t\trectW = $$.getEventRectWidth();\n\t\t\t\trectX = d => xScale(d.x) - (rectW / 2);\n\t\t\t} else {\n\t\t\t\t// update index for x that is used by prevX and nextX\n\t\t\t\t$$.updateXs();\n\n\t\t\t\tconst getPrevNextX = d => {\n\t\t\t\t\tconst index = d.index;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tprev: $$.getPrevX(index),\n\t\t\t\t\t\tnext: $$.getNextX(index)\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\trectW = d => {\n\t\t\t\t\tconst x = getPrevNextX(d);\n\n\t\t\t\t\t// if there this is a single data point make the eventRect full width (or height)\n\t\t\t\t\tif (x.prev === null && x.next === null) {\n\t\t\t\t\t\treturn isRotated ? $$.height : $$.width;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x.prev === null) {\n\t\t\t\t\t\tx.prev = xScale.domain()[0];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x.next === null) {\n\t\t\t\t\t\tx.next = xScale.domain()[1];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2);\n\t\t\t\t};\n\n\t\t\t\trectX = d => {\n\t\t\t\t\tconst x = getPrevNextX(d);\n\t\t\t\t\tconst thisX = $$.data.xs[d.id][d.index];\n\n\t\t\t\t\t// if there this is a single data point position the eventRect at 0\n\t\t\t\t\tif (x.prev === null && x.next === null) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (x.prev === null) {\n\t\t\t\t\t\tx.prev = xScale.domain()[0];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (xScale(thisX) + xScale(x.prev)) / 2;\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tx = isRotated ? 0 : rectX;\n\t\t\ty = isRotated ? rectX : 0;\n\t\t\tw = isRotated ? $$.width : rectW;\n\t\t\th = isRotated ? rectW : $$.height;\n\t\t}\n\n\t\teventRectData.attr(\"class\", $$.classEvent.bind($$))\n\t\t\t.attr(\"x\", x)\n\t\t\t.attr(\"y\", y)\n\t\t\t.attr(\"width\", w)\n\t\t\t.attr(\"height\", h);\n\t},\n\n\tselectRectForSingle(context, eventRect, index) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isSelectionEnabled = config.data_selection_enabled;\n\t\tconst isSelectionGrouped = config.data_selection_grouped;\n\t\tconst isTooltipGrouped = config.tooltip_grouped;\n\t\tconst selectedData = $$.getAllValuesOnIndex(index);\n\n\t\tif (isTooltipGrouped) {\n\t\t\t$$.showTooltip(selectedData, context);\n\t\t\t$$.showXGridFocus(selectedData);\n\n\t\t\tif (!isSelectionEnabled || isSelectionGrouped) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\n\t\t\t.each(function() {\n\t\t\t\td3Select(this).classed(CLASS.EXPANDED, true);\n\n\t\t\t\tif (isSelectionEnabled) {\n\t\t\t\t\teventRect.style(\"cursor\", isSelectionGrouped ? \"pointer\" : null);\n\t\t\t\t}\n\n\t\t\t\tif (!isTooltipGrouped) {\n\t\t\t\t\t$$.hideXGridFocus();\n\t\t\t\t\t$$.hideTooltip();\n\n\t\t\t\t\t!isSelectionGrouped && $$.expandCirclesBars(index);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.filter(function(d) {\n\t\t\t\treturn $$.isWithinShape(this, d);\n\t\t\t})\n\t\t\t.call(selected => {\n\t\t\t\tconst d = selected.data();\n\n\t\t\t\tif (isSelectionEnabled && (isSelectionGrouped || config.data_selection_isselectable(d))) {\n\t\t\t\t\teventRect.style(\"cursor\", \"pointer\");\n\t\t\t\t}\n\n\t\t\t\tif (!isTooltipGrouped) {\n\t\t\t\t\t$$.showTooltip(d, context);\n\t\t\t\t\t$$.showXGridFocus(d);\n\n\t\t\t\t\t$$.unexpandCircles();\n\t\t\t\t\tselected.each(d => $$.expandCirclesBars(index, d.id));\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\texpandCirclesBars(index, id, reset) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconfig.point_focus_expand_enabled &&\n\t\t\t$$.expandCircles(index, id, reset);\n\n\t\t$$.expandBars(index, id, reset);\n\t},\n\n\tselectRectForMultipleXs(context) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\n\t\t// do nothing when dragging\n\t\tif ($$.dragging || $$.hasArcType(targetsToShow)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst mouse = d3Mouse(context);\n\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\n\n\t\tif ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {\n\t\t\tconfig.data_onout.call($$.api, $$.mouseover);\n\t\t\t$$.mouseover = undefined;\n\t\t}\n\n\t\tif (!closest) {\n\t\t\t$$.unselectRect();\n\t\t\treturn;\n\t\t}\n\n\t\tconst sameXData = (\n\t\t\t$$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped\n\t\t) ? [closest] : $$.filterByX(targetsToShow, closest.x);\n\n\t\t// show tooltip when cursor is close to some point\n\t\tconst selectedData = sameXData.map(d => $$.addName(d));\n\n\t\t$$.showTooltip(selectedData, context);\n\n\t\t// expand points\n\t\t$$.expandCirclesBars(closest.index, closest.id, true);\n\n\t\t// Show xgrid focus line\n\t\t$$.showXGridFocus(selectedData);\n\n\t\t// Show cursor as pointer if point is close to mouse position\n\t\tif ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\n\t\t\t$$.svg.select(`.${CLASS.eventRect}`).style(\"cursor\", \"pointer\");\n\n\t\t\tif (!$$.mouseover) {\n\t\t\t\tconfig.data_onover.call($$.api, closest);\n\t\t\t\t$$.mouseover = closest;\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Unselect EventRect.\n\t * @private\n\t */\n\tunselectRect() {\n\t\tconst $$ = this;\n\n\t\t$$.svg.select(`.${CLASS.eventRect}`).style(\"cursor\", null);\n\t\t$$.hideXGridFocus();\n\t\t$$.hideTooltip();\n\t\t$$.unexpandCircles();\n\t\t$$.unexpandBars();\n\t},\n\n\tsetOver(index) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.expandCirclesBars(index, null, true);\n\n\t\t// Call event handler\n\t\tindex !== -1 && $$.main.selectAll(`.${CLASS.shape}-${index}`)\n\t\t\t.each(d2 => config.data_onover.call($$.api, d2));\n\t},\n\n\t/**\n\t * Return draggable selection function\n\t * @return {Function}\n\t * @private\n\t */\n\tgetDraggableSelection() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\treturn config.interaction_enabled && config.data_selection_draggable && $$.drag ?\n\t\t\td3Drag()\n\t\t\t\t.on(\"drag\", function() { $$.drag(d3Mouse(this)); })\n\t\t\t\t.on(\"start\", function() { $$.dragstart(d3Mouse(this)); })\n\t\t\t\t.on(\"end\", () => { $$.dragend(); }) : () => {};\n\t},\n\n\t/**\n\t * Create eventRect for each data on the x-axis.\n\t * Register touch and drag events.\n\t * @private\n\t * @param {Object} d3.select(CLASS.eventRects) object.\n\t * @returns {Object} d3.select(CLASS.eventRects) object.\n\t */\n\tgenerateEventRectsForSingleX(eventRectEnter) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst rect = eventRectEnter.append(\"rect\")\n\t\t\t.attr(\"class\", $$.classEvent.bind($$))\n\t\t\t.style(\"cursor\", config.data_selection_enabled && config.data_selection_grouped ? \"pointer\" : null)\n\t\t\t.on(\"click\", d => {\n\t\t\t\tif ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) {\n\t\t\t\t\t$$.cancelClick && ($$.cancelClick = false);\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst index = d.index;\n\n\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\n\t\t\t\t\t.each(function(d2) {\n\t\t\t\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, d2)) {\n\t\t\t\t\t\t\t$$.toggleShape(this, d2, index);\n\t\t\t\t\t\t\t$$.config.data_onclick.call($$.api, d2, this);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t})\n\t\t\t.call($$.getDraggableSelection());\n\n\t\tif ($$.inputType === \"mouse\") {\n\t\t\trect\n\t\t\t\t.on(\"mouseover\", d => {\n\t\t\t\t\t// do nothing while dragging/flowing\n\t\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$$.setOver(d.index);\n\t\t\t\t})\n\t\t\t\t.on(\"mousemove\", function(d) {\n\t\t\t\t\t// do nothing while dragging/flowing\n\t\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet index = d.index;\n\t\t\t\t\tconst eventRect = $$.svg.select(`.${CLASS.eventRect}-${index}`);\n\n\t\t\t\t\tif ($$.isStepType(d) &&\n\t\t\t\t\t\t$$.config.line_step_type === \"step-after\" &&\n\t\t\t\t\t\td3Mouse(this)[0] < $$.x($$.getXValue(d.id, index))\n\t\t\t\t\t) {\n\t\t\t\t\t\tindex -= 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tindex === -1 ?\n\t\t\t\t\t\t$$.unselectRect() : $$.selectRectForSingle(this, eventRect, index);\n\t\t\t\t})\n\t\t\t\t.on(\"mouseout\", d => {\n\t\t\t\t\t// chart is destroyed\n\t\t\t\t\tif (!$$.config || $$.hasArcType()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst index = d.index;\n\n\t\t\t\t\t$$.unselectRect();\n\n\t\t\t\t\t// Call event handler\n\t\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\n\t\t\t\t\t\t.each(d2 => config.data_onout.call($$.api, d2));\n\t\t\t\t});\n\t\t}\n\n\t\treturn rect;\n\t},\n\n\t/**\n\t * Create an eventRect,\n\t * Register touch and drag events.\n\t * @private\n\t * @param {Object} d3.select(CLASS.eventRects) object.\n\t * @returns {Object} d3.select(CLASS.eventRects) object.\n\t */\n\tgenerateEventRectsForMultipleXs(eventRectEnter) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst rect = eventRectEnter\n\t\t\t.append(\"rect\")\n\t\t\t.attr(\"x\", 0)\n\t\t\t.attr(\"y\", 0)\n\t\t\t.attr(\"width\", $$.width)\n\t\t\t.attr(\"height\", $$.height)\n\t\t\t.attr(\"class\", CLASS.eventRect)\n\t\t\t.on(\"click\", function() {\n\t\t\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\n\t\t\t\tif ($$.hasArcType(targetsToShow)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst mouse = d3Mouse(this);\n\t\t\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\n\n\t\t\t\tif (!closest) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// select if selection enabled\n\t\t\t\tif ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\n\t\t\t\t\t$$.main.selectAll(`.${CLASS.shapes}${$$.getTargetSelectorSuffix(closest.id)}`)\n\t\t\t\t\t\t.selectAll(`.${CLASS.shape}-${closest.index}`)\n\t\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, closest)) {\n\t\t\t\t\t\t\t\t$$.toggleShape(this, closest, closest.index);\n\t\t\t\t\t\t\t\t$$.config.data_onclick.call($$.api, closest, this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t\t.call($$.getDraggableSelection());\n\n\t\tif ($$.inputType === \"mouse\") {\n\t\t\trect\n\t\t\t\t.on(\"mouseover mousemove\", function() {\n\t\t\t\t\t$$.selectRectForMultipleXs(this);\n\t\t\t\t})\n\t\t\t\t.on(\"mouseout\", () => {\n\t\t\t\t\t// chart is destroyed\n\t\t\t\t\tif (!$$.config || $$.hasArcType()) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t$$.unselectRect();\n\t\t\t\t});\n\t\t}\n\n\t\treturn rect;\n\t},\n\n\t/**\n\t * Dispatch a mouse event.\n\t * @private\n\t * @param {String} type event type\n\t * @param {Number} index Index of eventRect\n\t * @param {Array} mouse x and y coordinate value\n\t */\n\tdispatchEvent(type, index, mouse) {\n\t\tconst $$ = this;\n\t\tconst selector = `.${\n\t\t\t$$.isMultipleX() ? CLASS.eventRect : `${CLASS.eventRect}-${index}`\n\t\t}`;\n\n\t\tconst eventRect = $$.main.select(selector).node();\n\t\tconst box = eventRect.getBoundingClientRect();\n\t\tconst x = box.left + (mouse ? mouse[0] : 0) + (box.width / 2);\n\t\tconst y = box.top + (mouse ? mouse[1] : 0);\n\t\tconst params = {\n\t\t\tscreenX: x,\n\t\t\tscreenY: y,\n\t\t\tclientX: x,\n\t\t\tclientY: y\n\t\t};\n\n\t\temulateEvent[/^mouse/.test(type) ? \"mouse\" : \"touch\"](eventRect, type, params);\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__28__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {isValue, ceil10, extend, capitalize} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tgetCurrentWidth() {\n\t\tconst $$ = this;\n\n\t\treturn $$.config.size_width || $$.getParentWidth();\n\t},\n\n\tgetCurrentHeight() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst h = config.size_height || $$.getParentHeight();\n\n\t\treturn h > 0 ? h : 320 / ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 2 : 1);\n\t},\n\n\tgetCurrentPaddingTop() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet padding = isValue(config.padding_top) ?\n\t\t\tconfig.padding_top : 0;\n\n\t\tif ($$.title && $$.title.node()) {\n\t\t\tpadding += $$.getTitlePadding();\n\t\t}\n\n\t\treturn padding;\n\t},\n\n\tgetCurrentPaddingBottom() {\n\t\tconst config = this.config;\n\n\t\treturn isValue(config.padding_bottom) ?\n\t\t\tconfig.padding_bottom : 0;\n\t},\n\n\tgetCurrentPaddingLeft(withoutRecompute) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet paddingLeft;\n\n\t\tif (isValue(config.padding_left)) {\n\t\t\tpaddingLeft = config.padding_left;\n\t\t} else if (config.axis_rotated) {\n\t\t\tpaddingLeft = !config.axis_x_show ?\n\t\t\t\t1 : Math.max(ceil10($$.getAxisWidthByAxisId(\"x\", withoutRecompute)), 40);\n\t\t} else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated\n\t\t\tpaddingLeft = $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;\n\t\t} else {\n\t\t\tpaddingLeft = ceil10($$.getAxisWidthByAxisId(\"y\", withoutRecompute));\n\t\t}\n\n\t\treturn paddingLeft;\n\t},\n\n\tgetCurrentPaddingRight() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst defaultPadding = 10;\n\t\tconst legendWidthOnRight = $$.isLegendRight ?\n\t\t\t$$.getLegendWidth() + 20 : 0;\n\t\tlet paddingRight;\n\n\t\tif (isValue(config.padding_right)) {\n\t\t\tpaddingRight = config.padding_right + 1; // 1 is needed not to hide tick line\n\t\t} else if (config.axis_rotated) {\n\t\t\tpaddingRight = defaultPadding + legendWidthOnRight;\n\t\t} else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated\n\t\t\tpaddingRight = 2 +\n\t\t\t\tlegendWidthOnRight +\n\t\t\t\t($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0);\n\t\t} else {\n\t\t\tpaddingRight = ceil10($$.getAxisWidthByAxisId(\"y2\")) + legendWidthOnRight;\n\t\t}\n\n\t\treturn paddingRight;\n\t},\n\n\t/**\n\t * Get the parent rect element's size\n\t * @param {String} key property/attribute name\n\t * @private\n\t */\n\tgetParentRectValue(key) {\n\t\tconst offsetName = `offset${capitalize(key)}`;\n\t\tlet parent = this.selectChart.node();\n\t\tlet v;\n\n\t\twhile (!v && parent && parent.tagName !== \"BODY\") {\n\t\t\ttry {\n\t\t\t\tv = parent.getBoundingClientRect()[key];\n\t\t\t} catch (e) {\n\t\t\t\tif (offsetName in parent) {\n\t\t\t\t\t// In IE in certain cases getBoundingClientRect\n\t\t\t\t\t// will cause an \"unspecified error\"\n\t\t\t\t\tv = parent[offsetName];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tparent = parent.parentNode;\n\t\t}\n\n\t\tif (key === \"width\") {\n\t\t\t// Sometimes element's width value is incorrect(ex. flex container)\n\t\t\t// In this case, use body's offsetWidth instead.\n\t\t\tconst bodyWidth = document.body.offsetWidth;\n\n\t\t\tv > bodyWidth && (v = bodyWidth);\n\t\t}\n\n\t\treturn v;\n\t},\n\n\tgetParentWidth() {\n\t\treturn this.getParentRectValue(\"width\");\n\t},\n\n\tgetParentHeight() {\n\t\tconst h = this.selectChart.style(\"height\");\n\n\t\treturn h.indexOf(\"px\") > 0 ? +h.replace(\"px\", \"\") : 0;\n\t},\n\n\tgetSvgLeft(withoutRecompute) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);\n\t\tconst leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY;\n\t\tconst leftAxis = $$.main.select(`.${leftAxisClass}`).node();\n\t\tconst svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {right: 0};\n\t\tconst chartRect = $$.selectChart.node().getBoundingClientRect();\n\t\tconst hasArc = $$.hasArcType();\n\t\tconst svgLeft = svgRect.right -\n\t\t\tchartRect.left -\n\t\t\t(hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));\n\n\t\treturn svgLeft > 0 ? svgLeft : 0;\n\t},\n\n\tgetAxisWidthByAxisId(id, withoutRecompute) {\n\t\tconst $$ = this;\n\t\tconst position = $$.axis.getLabelPositionById(id);\n\n\t\treturn $$.axis.getMaxTickWidth(id, withoutRecompute) +\n\t\t\t(position.isInner ? 20 : 40);\n\t},\n\n\tgetHorizontalAxisHeight(axisId) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet h = 30;\n\n\t\tif (axisId === \"x\" && !config.axis_x_show) {\n\t\t\treturn 8;\n\t\t}\n\n\t\tif (axisId === \"x\" && config.axis_x_height) {\n\t\t\treturn config.axis_x_height;\n\t\t}\n\n\t\tif (axisId === \"y\" && !config.axis_y_show) {\n\t\t\treturn config.legend_show &&\n\t\t\t\t!$$.isLegendRight &&\n\t\t\t\t!$$.isLegendInset ? 10 : 1;\n\t\t}\n\n\t\tif (axisId === \"y2\" && !config.axis_y2_show) {\n\t\t\treturn $$.rotated_padding_top;\n\t\t}\n\n\t\t// Calculate x axis height when tick rotated\n\t\tif (axisId === \"x\" && !config.axis_rotated && config.axis_x_tick_rotate) {\n\t\t\th = 30 +\n\t\t\t\t$$.axis.getMaxTickWidth(axisId) *\n\t\t\t\tMath.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);\n\t\t}\n\n\t\t// Calculate y axis height when tick rotated\n\t\tif (axisId === \"y\" && config.axis_rotated && config.axis_y_tick_rotate) {\n\t\t\th = 30 +\n\t\t\t\t$$.axis.getMaxTickWidth(axisId) *\n\t\t\t\tMath.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180);\n\t\t}\n\n\t\treturn h +\n\t\t\t($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) +\n\t\t\t(axisId === \"y2\" ? -10 : 0);\n\t},\n\n\tgetEventRectWidth() {\n\t\treturn Math.max(0, this.xAxis.tickInterval());\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tcurveStepBefore as d3CurveStepBefore,\n\tcurveStepAfter as d3CurveStepAfter,\n\tcurveBasisClosed as d3CurveBasisClosed,\n\tcurveBasisOpen as d3CurveBasisOpen,\n\tcurveBasis as d3CurveBasis,\n\tcurveBundle as d3CurveBundle,\n\tcurveCardinalClosed as d3CurveCardinalClosed,\n\tcurveCardinalOpen as d3CurveCardinalOpen,\n\tcurveCardinal as d3CurveCardinal,\n\tcurveCatmullRomClosed as d3CurveCatmullRomClosed,\n\tcurveCatmullRomOpen as d3CurveCatmullRomOpen,\n\tcurveCatmullRom as d3CurveCatmullRom,\n\tcurveLinearClosed as d3CurveLinearClosed,\n\tcurveLinear as d3CurveLinear,\n\tcurveMonotoneX as d3CurveMonotoneX,\n\tcurveMonotoneY as d3CurveMonotoneY,\n\tcurveNatural as d3CurveNatural,\n\tcurveStep as d3CurveStep\n} from \"d3-shape\";\nimport {select as d3Select} from \"d3-selection\";\nimport CLASS from \"../config/classes\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {isUndefined, extend} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tgetShapeIndices(typeFilter) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst indices = {};\n\t\tlet i = 0;\n\n\t\t$$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))\n\t\t\t.forEach(d => {\n\t\t\t\tfor (let j = 0, groups; (groups = config.data_groups[j]); j++) {\n\t\t\t\t\tif (groups.indexOf(d.id) < 0) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tfor (let k = 0, row; (row = groups[k]); k++) {\n\t\t\t\t\t\tif (row in indices) {\n\t\t\t\t\t\t\tindices[d.id] = indices[row];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (isUndefined(indices[d.id])) {\n\t\t\t\t\tindices[d.id] = i++;\n\t\t\t\t}\n\t\t\t});\n\n\t\tindices.__max__ = i - 1;\n\n\t\treturn indices;\n\t},\n\n\tgetShapeX(offset, targetsNum, indices, isSub) {\n\t\tconst $$ = this;\n\t\tconst scale = isSub ? $$.subX : ($$.zoomScale || $$.x);\n\t\tconst barPadding = $$.config.bar_padding;\n\n\t\treturn d => {\n\t\t\tconst index = d.id in indices ? indices[d.id] : 0;\n\t\t\tlet x = d.x || d.x === 0 ?\n\t\t\t\tscale(d.x) - offset * (targetsNum / 2 - index) : 0;\n\n\t\t\t// adjust x position for bar.padding option\n\t\t\tif (offset && x && targetsNum > 1 && barPadding) {\n\t\t\t\tif (index) {\n\t\t\t\t\tx += barPadding * index;\n\t\t\t\t}\n\n\t\t\t\tif (targetsNum > 2) {\n\t\t\t\t\tx -= (targetsNum - 1) * barPadding / 2;\n\t\t\t\t} else if (targetsNum === 2) {\n\t\t\t\t\tx -= barPadding / 2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn x;\n\t\t};\n\t},\n\n\tgetShapeY(isSub) {\n\t\tconst $$ = this;\n\n\t\treturn d => {\n\t\t\tconst scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);\n\n\t\t\treturn scale(d.value);\n\t\t};\n\t},\n\n\tgetShapeOffset(typeFilter, indices, isSub) {\n\t\tconst $$ = this;\n\t\tconst targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)));\n\t\tconst targetIds = targets.map(t => t.id);\n\n\t\treturn (d, idx) => {\n\t\t\tconst scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);\n\t\t\tconst y0 = scale(0);\n\t\t\tlet offset = y0;\n\t\t\tlet i = idx;\n\n\t\t\ttargets.forEach(t => {\n\t\t\t\tconst values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;\n\n\t\t\t\tif (t.id === d.id || indices[t.id] !== indices[d.id]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {\n\t\t\t\t\t// check if the x values line up\n\t\t\t\t\tif (isUndefined(values[i]) || +values[i].x !== +d.x) { // \"+\" for timeseries\n\t\t\t\t\t\t// if not, try to find the value that does line up\n\t\t\t\t\t\ti = -1;\n\n\t\t\t\t\t\tvalues.forEach((v, j) => {\n\t\t\t\t\t\t\tconst x1 = v.x.constructor === Date ? +v.x : v.x;\n\t\t\t\t\t\t\tconst x2 = d.x.constructor === Date ? +d.x : d.x;\n\n\t\t\t\t\t\t\tif (x1 === x2) {\n\t\t\t\t\t\t\t\ti = j;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (i in values && values[i].value * d.value >= 0) {\n\t\t\t\t\t\toffset += scale(values[i].value) - y0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn offset;\n\t\t};\n\t},\n\n\tisWithinShape(that, d) {\n\t\tconst $$ = this;\n\t\tconst shape = d3Select(that);\n\t\tlet isWithin;\n\n\t\tif (!$$.isTargetToShow(d.id)) {\n\t\t\tisWithin = false;\n\t\t} else if ($$.hasValidPointType(that.nodeName)) {\n\t\t\tisWithin = $$.isStepType(d) ?\n\t\t\t\t$$.isWithinStep(that, $$.getYScale(d.id)(d.value)) :\n\t\t\t\t$$.isWithinCircle(that, $$.pointSelectR(d) * 1.5);\n\t\t} else if (that.nodeName === \"path\") {\n\t\t\tisWithin = shape.classed(CLASS.bar) ? $$.isWithinBar(that) : true;\n\t\t}\n\n\t\treturn isWithin;\n\t},\n\n\tgetInterpolate(d) {\n\t\tconst $$ = this;\n\t\tconst interpolation = $$.getInterpolateType(d);\n\n\t\treturn {\n\t\t\t\"basis\": d3CurveBasis,\n\t\t\t\"basis-closed\": d3CurveBasisClosed,\n\t\t\t\"basis-open\": d3CurveBasisOpen,\n\t\t\t\"bundle\": d3CurveBundle,\n\t\t\t\"cardinal\": d3CurveCardinal,\n\t\t\t\"cardinal-closed\": d3CurveCardinalClosed,\n\t\t\t\"cardinal-open\": d3CurveCardinalOpen,\n\t\t\t\"catmull-rom\": d3CurveCatmullRom,\n\t\t\t\"catmull-rom-closed\": d3CurveCatmullRomClosed,\n\t\t\t\"catmull-rom-open\": d3CurveCatmullRomOpen,\n\t\t\t\"monotone-x\": d3CurveMonotoneX,\n\t\t\t\"monotone-y\": d3CurveMonotoneY,\n\t\t\t\"natural\": d3CurveNatural,\n\t\t\t\"linear-closed\": d3CurveLinearClosed,\n\t\t\t\"linear\": d3CurveLinear,\n\t\t\t\"step\": d3CurveStep,\n\t\t\t\"step-after\": d3CurveStepAfter,\n\t\t\t\"step-before\": d3CurveStepBefore\n\t\t}[interpolation];\n\t},\n\n\tgetInterpolateType(d) {\n\t\tconst $$ = this;\n\t\tconst type = $$.config.spline_interpolation_type;\n\t\tconst interpolation = $$.isInterpolationType(type) ? type : \"cardinal\";\n\n\t\treturn $$.isSplineType(d) ?\n\t\t\tinterpolation : (\n\t\t\t\t$$.isStepType(d) ?\n\t\t\t\t\t$$.config.line_step_type : \"linear\"\n\t\t\t);\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__31__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tevent as d3Event\n} from \"d3-selection\";\nimport {\n\tarc as d3Arc,\n\tpie as d3Pie\n} from \"d3-shape\";\nimport {sum as d3Sum} from \"d3-array\";\nimport {interpolate as d3Interpolate} from \"d3-interpolate\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, isFunction} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tinitPie() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst padding = config.pie_padding;\n\n\t\tconst padAngle = $$.hasType(\"pie\") && padding ?\n\t\t\tpadding * 0.01 : config[`${config.data_type}_padAngle`] ?\n\t\t\t\tconfig[`${config.data_type}_padAngle`] : 0;\n\n\t\t$$.pie = d3Pie()\n\t\t\t.padAngle(padAngle)\n\t\t\t.value(d => d.values.reduce((a, b) => a + b.value, 0));\n\n\t\t!config.data_order && $$.pie.sort(null);\n\t},\n\n\tupdateRadius() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst radius = config.pie_innerRadius;\n\t\tconst padding = config.pie_padding;\n\t\tconst w = config.gauge_width || config.donut_width;\n\n\t\t$$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2;\n\t\t$$.radius = $$.radiusExpanded * 0.95;\n\t\t$$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : 0.6;\n\n\t\tconst innerRadius = radius || (\n\t\t\tpadding ? padding * ($$.innerRadiusRatio + 0.1) : 0\n\t\t);\n\n\t\t$$.innerRadius = $$.hasType(\"donut\") || $$.hasType(\"gauge\") ?\n\t\t\t$$.radius * $$.innerRadiusRatio : innerRadius;\n\t},\n\n\tupdateArc() {\n\t\tconst $$ = this;\n\n\t\t$$.svgArc = $$.getSvgArc();\n\t\t$$.svgArcExpanded = $$.getSvgArcExpanded();\n\t\t$$.svgArcExpandedSub = $$.getSvgArcExpanded(0.98);\n\t},\n\n\tupdateAngle(dValue) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet d = dValue;\n\t\tlet found = false;\n\t\tlet index = 0;\n\t\tlet gMin;\n\t\tlet gMax;\n\t\tlet gTic;\n\t\tlet gValue;\n\n\t\tif (!config) {\n\t\t\treturn null;\n\t\t}\n\n\t\t$$.pie($$.filterTargetsToShow($$.data.targets)).forEach(t => {\n\t\t\tif (!found && t.data.id === d.data.id) {\n\t\t\t\tfound = true;\n\t\t\t\td = t;\n\t\t\t\td.index = index;\n\t\t\t}\n\n\t\t\tindex++;\n\t\t});\n\n\t\tif (isNaN(d.startAngle)) {\n\t\t\td.startAngle = 0;\n\t\t}\n\n\t\tif (isNaN(d.endAngle)) {\n\t\t\td.endAngle = d.startAngle;\n\t\t}\n\n\t\tif ($$.isGaugeType(d.data)) {\n\t\t\tgMin = config.gauge_min;\n\t\t\tgMax = config.gauge_max;\n\t\t\tgTic = (Math.PI * (config.gauge_fullCircle ? 2 : 1)) / (gMax - gMin);\n\n\t\t\tgValue = d.value < gMin ?\n\t\t\t\t0 : (d.value < gMax ? d.value - gMin : (gMax - gMin));\n\n\t\t\td.startAngle = config.gauge_startingAngle;\n\t\t\td.endAngle = d.startAngle + gTic * gValue;\n\t\t}\n\n\t\treturn found ? d : null;\n\t},\n\n\tgetSvgArc() {\n\t\tconst $$ = this;\n\t\tconst arc = d3Arc()\n\t\t\t.outerRadius($$.radius)\n\t\t\t.innerRadius($$.innerRadius);\n\n\t\tconst newArc = (d, withoutUpdate) => {\n\t\t\tif (withoutUpdate) {\n\t\t\t\treturn arc(d);\n\t\t\t} // for interpolate\n\n\t\t\tconst updated = $$.updateAngle(d);\n\n\t\t\treturn updated ? arc(updated) : \"M 0 0\";\n\t\t};\n\n\t\t// TODO: extends all function\n\t\tnewArc.centroid = arc.centroid;\n\n\t\treturn newArc;\n\t},\n\n\tgetSvgArcExpanded(rate) {\n\t\tconst $$ = this;\n\t\tconst arc = d3Arc()\n\t\t\t.outerRadius($$.radiusExpanded * (rate || 1))\n\t\t\t.innerRadius($$.innerRadius);\n\n\t\treturn function(d) {\n\t\t\tconst updated = $$.updateAngle(d);\n\n\t\t\treturn updated ? arc(updated) : \"M 0 0\";\n\t\t};\n\t},\n\n\tgetArc(d, withoutUpdate, force) {\n\t\treturn force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : \"M 0 0\";\n\t},\n\n\ttransformForArcLabel(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst updated = $$.updateAngle(d);\n\t\tlet translate = \"\";\n\n\t\tif (updated && !$$.hasType(\"gauge\")) {\n\t\t\tconst c = this.svgArc.centroid(updated);\n\t\t\tconst x = isNaN(c[0]) ? 0 : c[0];\n\t\t\tconst y = isNaN(c[1]) ? 0 : c[1];\n\t\t\tconst h = Math.sqrt(x * x + y * y);\n\n\t\t\tlet ratio = ($$.hasType(\"donut\") && config.donut_label_ratio) ||\n\t\t\t\t($$.hasType(\"pie\") && config.pie_label_ratio);\n\n\t\t\tif (ratio) {\n\t\t\t\tratio = isFunction(ratio) ? ratio(d, $$.radius, h) : ratio;\n\t\t\t} else {\n\t\t\t\tratio = $$.radius &&\n\t\t\t\t\t(h ? (36 / $$.radius > 0.375 ? 1.175 - 36 / $$.radius : 0.8) * $$.radius / h : 0);\n\t\t\t}\n\n\t\t\ttranslate = `translate(${x * ratio},${y * ratio})`;\n\t\t}\n\n\t\treturn translate;\n\t},\n\n\tgetArcRatio(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet val = null;\n\n\t\tif (d) {\n\t\t\t// if has padAngle set, calculate rate based on value\n\t\t\tif ($$.pie.padAngle()()) {\n\t\t\t\tlet total = $$.getTotalDataSum();\n\n\t\t\t\tif ($$.hiddenTargetIds.length) {\n\t\t\t\t\ttotal -= d3Sum($$.api.data.values.call($$.api, $$.hiddenTargetIds));\n\t\t\t\t}\n\n\t\t\t\tval = d.value / total;\n\n\t\t\t// otherwise, based on the rendered angle value\n\t\t\t} else {\n\t\t\t\tval = (d.endAngle - d.startAngle) / (\n\t\t\t\t\tMath.PI * ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 1 : 2)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn val;\n\t},\n\n\tconvertToArcData(d) {\n\t\treturn this.addName({\n\t\t\tid: d.data.id,\n\t\t\tvalue: d.value,\n\t\t\tratio: this.getArcRatio(d),\n\t\t\tindex: d.index,\n\t\t});\n\t},\n\n\ttextForArcLabel(val) {\n\t\tconst $$ = this;\n\t\tconst d = val.node ? val.datum() : val;\n\n\t\tif (!$$.shouldShowArcLabel()) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst updated = $$.updateAngle(d);\n\t\tconst value = updated ? updated.value : null;\n\t\tconst ratio = $$.getArcRatio(updated);\n\t\tconst id = d.data.id;\n\n\t\tif (!$$.hasType(\"gauge\") && !$$.meetsArcLabelThreshold(ratio)) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tconst text = (\n\t\t\t$$.getArcLabelFormat() || $$.defaultArcValueFormat\n\t\t)(value, ratio, id).toString();\n\n\t\tif (val.node) {\n\t\t\tif (text.indexOf(\"\\n\") === -1) {\n\t\t\t\tval.text(text);\n\t\t\t} else {\n\t\t\t\tconst multiline = text.split(\"\\n\");\n\t\t\t\tconst len = multiline.length - 1;\n\n\t\t\t\tmultiline.forEach((v, i) => {\n\t\t\t\t\tval.append(\"tspan\")\n\t\t\t\t\t\t.attr(\"x\", 0)\n\t\t\t\t\t\t.attr(\"dy\", `${i === 0 ? -len : 1}em`)\n\t\t\t\t\t\t.text(v);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn text;\n\t},\n\n\ttextForGaugeMinMax(value, isMax) {\n\t\tconst format = this.getGaugeLabelExtents();\n\n\t\treturn format ? format(value, isMax) : value;\n\t},\n\n\texpandArc(targetIds) {\n\t\tconst $$ = this;\n\t\tlet interval;\n\n\t\t// MEMO: avoid to cancel transition\n\t\tif ($$.transiting) {\n\t\t\tinterval = window.setInterval(() => {\n\t\t\t\tif (!$$.transiting) {\n\t\t\t\t\twindow.clearInterval(interval);\n\n\t\t\t\t\t$$.legend.selectAll(`.${CLASS.legendItemFocused}`).size() > 0 &&\n\t\t\t\t\t\t$$.expandArc(targetIds);\n\t\t\t\t}\n\t\t\t}, 10);\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst newTargetIds = $$.mapToTargetIds(targetIds);\n\n\t\t$$.svg.selectAll($$.selectorTargets(newTargetIds, `.${CLASS.chartArc}`)).each(function(d) {\n\t\t\tif (!$$.shouldExpand(d.data.id)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\td3Select(this).selectAll(\"path\")\n\t\t\t\t.transition()\n\t\t\t\t.duration($$.expandDuration(d.data.id))\n\t\t\t\t.attr(\"d\", $$.svgArcExpanded)\n\t\t\t\t.transition()\n\t\t\t\t.duration($$.expandDuration(d.data.id) * 2)\n\t\t\t\t.attr(\"d\", $$.svgArcExpandedSub);\n\t\t});\n\t},\n\n\tunexpandArc(targetIds) {\n\t\tconst $$ = this;\n\n\t\tif ($$.transiting) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst newTargetIds = $$.mapToTargetIds(targetIds);\n\n\t\t$$.svg.selectAll($$.selectorTargets(newTargetIds, `.${CLASS.chartArc}`))\n\t\t\t.selectAll(\"path\")\n\t\t\t.transition()\n\t\t\t.duration(d => $$.expandDuration(d.data.id))\n\t\t\t.attr(\"d\", $$.svgArc);\n\n\t\t$$.svg.selectAll(`${CLASS.arc}`)\n\t\t\t.style(\"opacity\", \"1\");\n\t},\n\n\texpandDuration(id) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ($$.isDonutType(id)) {\n\t\t\treturn config.donut_expand_duration;\n\t\t} else if ($$.isGaugeType(id)) {\n\t\t\treturn config.gauge_expand_duration;\n\t\t} else if ($$.isPieType(id)) {\n\t\t\treturn config.pie_expand_duration;\n\t\t} else {\n\t\t\treturn 50;\n\t\t}\n\t},\n\n\tshouldExpand(id) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\treturn ($$.isDonutType(id) && config.donut_expand) ||\n\t\t\t($$.isGaugeType(id) && config.gauge_expand) ||\n\t\t\t($$.isPieType(id) && config.pie_expand);\n\t},\n\n\tshouldShowArcLabel() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet shouldShow = true;\n\n\t\tif ($$.hasType(\"donut\")) {\n\t\t\tshouldShow = config.donut_label_show;\n\t\t} else if ($$.hasType(\"pie\")) {\n\t\t\tshouldShow = config.pie_label_show;\n\t\t}\n\n\t\t// when gauge, always true\n\t\treturn shouldShow;\n\t},\n\n\tmeetsArcLabelThreshold(ratio) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst threshold = $$.hasType(\"donut\") ? config.donut_label_threshold : config.pie_label_threshold;\n\n\t\treturn ratio >= threshold;\n\t},\n\n\tgetArcLabelFormat() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet format = config.pie_label_format;\n\n\t\tif ($$.hasType(\"gauge\")) {\n\t\t\tformat = config.gauge_label_format;\n\t\t} else if ($$.hasType(\"donut\")) {\n\t\t\tformat = config.donut_label_format;\n\t\t}\n\n\t\treturn format;\n\t},\n\n\tgetGaugeLabelExtents() {\n\t\tconst config = this.config;\n\n\t\treturn config.gauge_label_extents;\n\t},\n\n\tgetArcTitle() {\n\t\tconst $$ = this;\n\n\t\treturn $$.hasType(\"donut\") ? $$.config.donut_title : \"\";\n\t},\n\n\tupdateTargetsForArc(targets) {\n\t\tconst $$ = this;\n\t\tconst main = $$.main;\n\t\tconst classChartArc = $$.classChartArc.bind($$);\n\t\tconst classArcs = $$.classArcs.bind($$);\n\t\tconst classFocus = $$.classFocus.bind($$);\n\t\tconst mainPieUpdate = main.select(`.${CLASS.chartArcs}`)\n\t\t\t.selectAll(`.${CLASS.chartArc}`)\n\t\t\t.data($$.pie(targets))\n\t\t\t.attr(\"class\", d => classChartArc(d) + classFocus(d.data));\n\n\t\tconst mainPieEnter = mainPieUpdate.enter().append(\"g\")\n\t\t\t.attr(\"class\", classChartArc);\n\n\t\tmainPieEnter.append(\"g\")\n\t\t\t.attr(\"class\", classArcs)\n\t\t\t.merge(mainPieUpdate);\n\n\t\tmainPieEnter.append(\"text\")\n\t\t\t.attr(\"dy\", $$.hasType(\"gauge\") ? \"-.1em\" : \".35em\")\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.style(\"text-anchor\", \"middle\")\n\t\t\t.style(\"pointer-events\", \"none\");\n\t\t// MEMO: can not keep same color..., but not bad to update color in redraw\n\t\t// mainPieUpdate.exit().remove();\n\t},\n\n\tinitArc() {\n\t\tconst $$ = this;\n\n\t\t$$.arcs = $$.main.select(`.${CLASS.chart}`)\n\t\t\t.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartArcs)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"arc\"));\n\n\t\t$$.setArcTitle();\n\t},\n\n\t/**\n\t * Set arc title text\n\t * @private\n\t */\n\tsetArcTitle() {\n\t\tconst $$ = this;\n\t\tconst title = $$.getArcTitle();\n\n\t\tif (title) {\n\t\t\tconst multiline = title.split(\"\\n\");\n\t\t\tconst text = $$.arcs.append(\"text\")\n\t\t\t\t.attr(\"class\", CLASS.chartArcsTitle)\n\t\t\t\t.style(\"text-anchor\", \"middle\");\n\n\t\t\t// if is multiline text\n\t\t\tif (multiline.length > 1) {\n\t\t\t\tconst fontSize = +text.style(\"font-size\").replace(\"px\", \"\");\n\t\t\t\tconst height = Math.floor(\n\t\t\t\t\ttext.text(\".\").node()\n\t\t\t\t\t\t.getBBox().height, text.text(\"\")\n\t\t\t\t);\n\n\t\t\t\tmultiline.forEach((v, i) =>\n\t\t\t\t\ttext.insert(\"tspan\")\n\t\t\t\t\t\t.text(v)\n\t\t\t\t\t\t.attr(\"x\", 0)\n\t\t\t\t\t\t.attr(\"dy\", i ? height : 0)\n\t\t\t\t);\n\n\t\t\t\ttext.attr(\"y\", `-${\n\t\t\t\t\tfontSize * (multiline.length - 2) ||\n\t\t\t\t\tfontSize / 2\n\t\t\t\t}`);\n\t\t\t} else {\n\t\t\t\ttext.text(title);\n\t\t\t}\n\t\t}\n\t},\n\n\tredrawArc(duration, durationForExit, withTransform) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst main = $$.main;\n\t\tconst isTouch = $$.inputType === \"touch\";\n\t\tconst isMouse = $$.inputType === \"mouse\";\n\n\t\tfunction selectArc(_this, arcData, id) {\n\t\t\t// transitions\n\t\t\t$$.expandArc(id);\n\t\t\t$$.api.focus(id);\n\t\t\t$$.toggleFocusLegend(id, true);\n\t\t\t$$.showTooltip([arcData], _this);\n\t\t}\n\n\t\tfunction unselectArc(arcData) {\n\t\t\tconst id = (arcData && arcData.id) || undefined;\n\n\t\t\t$$.unexpandArc(id);\n\t\t\t$$.api.revert();\n\t\t\t$$.revertLegend();\n\t\t\t$$.hideTooltip();\n\t\t}\n\n\t\tlet mainArc = main.selectAll(`.${CLASS.arcs}`)\n\t\t\t.selectAll(`.${CLASS.arc}`)\n\t\t\t.data($$.arcData.bind($$));\n\n\t\tmainArc.exit().transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\tmainArc = mainArc.enter().append(\"path\")\n\t\t\t.attr(\"class\", $$.classArc.bind($$))\n\t\t\t.style(\"fill\", d => $$.color(d.data))\n\t\t\t.style(\"cursor\", d => config.interaction_enabled && (config.data_selection_isselectable(d) ? \"pointer\" : null))\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.each(function(d) {\n\t\t\t\tif ($$.isGaugeType(d.data)) {\n\t\t\t\t\td.startAngle = config.gauge_startingAngle;\n\t\t\t\t\td.endAngle = config.gauge_startingAngle;\n\t\t\t\t}\n\n\t\t\t\tthis._current = d;\n\t\t\t})\n\t\t\t.merge(mainArc);\n\n\t\tmainArc\n\t\t\t.attr(\"transform\", d => (!$$.isGaugeType(d.data) && withTransform ? \"scale(0)\" : \"\"))\n\t\t\t.style(\"opacity\", function(d) {\n\t\t\t\treturn d === this._current ? \"0\" : \"1\";\n\t\t\t})\n\t\t\t.each(() => {\n\t\t\t\t$$.transiting = true;\n\t\t\t})\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.attrTween(\"d\", function(d) {\n\t\t\t\tconst updated = $$.updateAngle(d);\n\n\t\t\t\tif (!updated) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\treturn \"M 0 0\";\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (isNaN(this._current.startAngle)) {\n\t\t\t\t\tthis._current.startAngle = 0;\n\t\t\t\t}\n\n\t\t\t\tif (isNaN(this._current.endAngle)) {\n\t\t\t\t\tthis._current.endAngle = this._current.startAngle;\n\t\t\t\t}\n\n\t\t\t\tconst interpolate = d3Interpolate(this._current, updated);\n\n\t\t\t\tthis._current = interpolate(0);\n\n\t\t\t\treturn function(t) {\n\t\t\t\t\tconst interpolated = interpolate(t);\n\n\t\t\t\t\tinterpolated.data = d.data; // data.id will be updated by interporator\n\t\t\t\t\treturn $$.getArc(interpolated, true);\n\t\t\t\t};\n\t\t\t})\n\t\t\t.attr(\"transform\", withTransform ? \"scale(1)\" : \"\")\n\t\t\t.style(\"fill\", d => ($$.levelColor ?\n\t\t\t\t$$.levelColor(d.data.values[0].value) : $$.color(d.data.id))\n\t\t\t)\n\t\t\t// Where gauge reading color would receive customization.\n\t\t\t.style(\"opacity\", \"1\")\n\t\t\t.call($$.endall, () => {\n\t\t\t\t$$.transiting = false;\n\t\t\t});\n\n\t\tif (config.interaction_enabled) {\n\t\t\tmainArc\n\t\t\t\t.on(\"click\", function(d, i) {\n\t\t\t\t\tconst updated = $$.updateAngle(d);\n\t\t\t\t\tlet arcData;\n\n\t\t\t\t\tif (updated) {\n\t\t\t\t\t\tarcData = $$.convertToArcData(updated);\n\n\t\t\t\t\t\t$$.toggleShape && $$.toggleShape(this, arcData, i);\n\t\t\t\t\t\t$$.config.data_onclick.call($$.api, arcData, this);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tif (isMouse) {\n\t\t\t\tmainArc\n\t\t\t\t\t.on(\"mouseover\", function(d) {\n\t\t\t\t\t\tif ($$.transiting) { // skip while transiting\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst updated = $$.updateAngle(d);\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\t\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\n\n\t\t\t\t\t\tselectArc(this, arcData, id);\n\n\t\t\t\t\t\t$$.config.data_onover(arcData, this);\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"mouseout\", function(d) {\n\t\t\t\t\t\tif ($$.transiting) { // skip while transiting\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst updated = $$.updateAngle(d);\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\n\t\t\t\t\t\tunselectArc();\n\n\t\t\t\t\t\t$$.config.data_onout(arcData, this);\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"mousemove\", function(d) {\n\t\t\t\t\t\tconst updated = $$.updateAngle(d);\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\n\t\t\t\t\t\t$$.showTooltip([arcData], this);\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (isTouch && $$.hasArcType()) {\n\t\t\t\tconst getEventArc = () => {\n\t\t\t\t\tconst touch = d3Event.changedTouches[0];\n\t\t\t\t\tconst eventArc = d3Select(document.elementFromPoint(touch.clientX, touch.clientY));\n\n\t\t\t\t\treturn eventArc;\n\t\t\t\t};\n\n\t\t\t\t$$.svg\n\t\t\t\t\t.on(\"touchstart\", function() {\n\t\t\t\t\t\tif ($$.transiting) { // skip while transiting\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst eventArc = getEventArc();\n\t\t\t\t\t\tconst datum = eventArc.datum();\n\t\t\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\t\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\n\n\t\t\t\t\t\tid === undefined ?\n\t\t\t\t\t\t\tunselectArc() : selectArc(this, arcData, id);\n\n\t\t\t\t\t\t$$.config.data_onover(arcData, this);\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"touchend\", function() {\n\t\t\t\t\t\tif ($$.transiting) { // skip while transiting\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst eventArc = getEventArc();\n\t\t\t\t\t\tconst datum = eventArc.datum();\n\t\t\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\t\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\n\n\t\t\t\t\t\tid === undefined ?\n\t\t\t\t\t\t\tunselectArc() : selectArc(this, arcData, id);\n\n\t\t\t\t\t\t$$.config.data_onout(arcData, this);\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"touchmove\", function() {\n\t\t\t\t\t\tconst eventArc = getEventArc();\n\t\t\t\t\t\tconst datum = eventArc.datum();\n\t\t\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\n\t\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\n\t\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\n\n\t\t\t\t\t\tid === undefined ?\n\t\t\t\t\t\t\tunselectArc() : selectArc(this, arcData, id);\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tconst gaugeTextValue = main.selectAll(`.${CLASS.chartArc}`)\n\t\t\t.select(\"text\")\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.attr(\"class\", d => ($$.isGaugeType(d.data) ? CLASS.gaugeValue : \"\"));\n\n\t\tconfig.gauge_fullCircle && gaugeTextValue.attr(\"dy\", `${Math.round($$.radius / 14)}`);\n\n\t\t// to handle multiline text for gauge type\n\t\tconst textMethod = !gaugeTextValue.empty() &&\n\t\t\tgaugeTextValue.classed(CLASS.gaugeValue) ? \"call\" : \"text\";\n\n\t\tgaugeTextValue[textMethod]($$.textForArcLabel.bind($$))\n\t\t\t.attr(\"transform\", $$.transformForArcLabel.bind($$))\n\t\t\t.style(\"font-size\", d => ($$.isGaugeType(d.data) ? `${Math.round($$.radius / 5)}px` : \"\"))\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.style(\"opacity\", d => ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? \"1\" : \"0\"));\n\n\t\tmain.select(`.${CLASS.chartArcsTitle}`)\n\t\t\t.style(\"opacity\", $$.hasType(\"donut\") || $$.hasType(\"gauge\") ? \"1\" : \"0\");\n\n\t\tif ($$.hasType(\"gauge\")) {\n\t\t\tconst endAngle = (config.gauge_fullCircle ? -4 : -1) * config.gauge_startingAngle;\n\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsBackground}`)\n\t\t\t\t.attr(\"d\", () => {\n\t\t\t\t\tconst d = {\n\t\t\t\t\t\tdata: [{value: config.gauge_max}],\n\t\t\t\t\t\tstartAngle: config.gauge_startingAngle,\n\t\t\t\t\t\tendAngle: endAngle\n\t\t\t\t\t};\n\n\t\t\t\t\treturn $$.getArc(d, true, true);\n\t\t\t\t});\n\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsGaugeUnit}`)\n\t\t\t\t.attr(\"dy\", \".75em\")\n\t\t\t\t.text(config.gauge_label_show ? config.gauge_units : \"\");\n\n\t\t\tif (config.gauge_label_show) {\n\t\t\t\t$$.arcs.select(`.${CLASS.chartArcsGaugeMin}`)\n\t\t\t\t\t.attr(\"dx\", `${-1 * ($$.innerRadius + (($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)))}px`)\n\t\t\t\t\t.attr(\"dy\", \"1.2em\")\n\t\t\t\t\t.text($$.textForGaugeMinMax(config.gauge_min, false));\n\n\t\t\t\t// show max text when isn't fullCircle\n\t\t\t\t!config.gauge_fullCircle && $$.arcs.select(`.${CLASS.chartArcsGaugeMax}`)\n\t\t\t\t\t.attr(\"dx\", `${$$.innerRadius + (($$.radius - $$.innerRadius) / 2)}px`)\n\t\t\t\t\t.attr(\"dy\", \"1.2em\")\n\t\t\t\t\t.text($$.textForGaugeMinMax(config.gauge_max, true));\n\t\t\t}\n\t\t}\n\t},\n\n\tinitGauge() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst arcs = $$.arcs;\n\n\t\tif ($$.hasType(\"gauge\")) {\n\t\t\tarcs.append(\"path\")\n\t\t\t\t.attr(\"class\", CLASS.chartArcsBackground);\n\n\t\t\tarcs.append(\"text\")\n\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeUnit)\n\t\t\t\t.style(\"text-anchor\", \"middle\")\n\t\t\t\t.style(\"pointer-events\", \"none\");\n\n\t\t\tif (config.gauge_label_show) {\n\t\t\t\tarcs.append(\"text\")\n\t\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeMin)\n\t\t\t\t\t.style(\"text-anchor\", \"middle\")\n\t\t\t\t\t.style(\"pointer-events\", \"none\");\n\n\t\t\t\t!config.gauge_fullCircle && arcs.append(\"text\")\n\t\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeMax)\n\t\t\t\t\t.style(\"text-anchor\", \"middle\")\n\t\t\t\t\t.style(\"pointer-events\", \"none\");\n\t\t\t}\n\t\t}\n\t},\n\n\tgetGaugeLabelHeight() {\n\t\treturn this.config.gauge_label_show ? 20 : 0;\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__33__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {mouse as d3Mouse} from \"d3-selection\";\nimport CLASS from \"../config/classes\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {extend, isValue, isNumber, getRectSegList} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tinitBar() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartBars);\n\t},\n\n\tupdateTargetsForBar(targets) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst classChartBar = $$.classChartBar.bind($$);\n\t\tconst classBars = $$.classBars.bind($$);\n\t\tconst classFocus = $$.classFocus.bind($$);\n\t\tconst mainBarUpdate = $$.main.select(`.${CLASS.chartBars}`)\n\t\t\t.selectAll(`.${CLASS.chartBar}`)\n\t\t\t.data(targets)\n\t\t\t.attr(\"class\", d => classChartBar(d) + classFocus(d));\n\t\tconst mainBarEnter = mainBarUpdate.enter().append(\"g\")\n\t\t\t.attr(\"class\", classChartBar)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.style(\"pointer-events\", \"none\");\n\n\t\t// Bars for each data\n\t\tmainBarEnter.append(\"g\")\n\t\t\t.attr(\"class\", classBars)\n\t\t\t.style(\"cursor\", d => (config.data_selection_isselectable(d) ? \"pointer\" : null));\n\t},\n\n\tupdateBar(durationForExit) {\n\t\tconst $$ = this;\n\t\tconst barData = $$.barData.bind($$);\n\t\tconst classBar = $$.classBar.bind($$);\n\t\tconst initialOpacity = $$.initialOpacity.bind($$);\n\t\tconst color = d => $$.color(d.id);\n\n\t\t$$.mainBar = $$.main.selectAll(`.${CLASS.bars}`).selectAll(`.${CLASS.bar}`)\n\t\t\t.data(barData);\n\n\t\t$$.mainBar.exit().transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.mainBar = $$.mainBar.enter().append(\"path\")\n\t\t\t.attr(\"class\", classBar)\n\t\t\t.style(\"stroke\", color)\n\t\t\t.style(\"fill\", color)\n\t\t\t.merge($$.mainBar)\n\t\t\t.style(\"opacity\", initialOpacity);\n\t},\n\n\tredrawBar(drawBar, withTransition) {\n\t\treturn [\n\t\t\t(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar)\n\t\t\t\t.attr(\"d\", drawBar)\n\t\t\t\t.style(\"fill\", this.color)\n\t\t\t\t.style(\"opacity\", \"1\")\n\t\t];\n\t},\n\n\tgetBarW(axis, barTargetsNum) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst w = isNumber(config.bar_width) ?\n\t\t\tconfig.bar_width : barTargetsNum ?\n\t\t\t\t(axis.tickInterval($$.getMaxDataCount()) * config.bar_width_ratio) / barTargetsNum : 0;\n\n\t\treturn config.bar_width_max && w > config.bar_width_max ?\n\t\t\tconfig.bar_width_max : w;\n\t},\n\n\tgetBars(i, id) {\n\t\tconst $$ = this;\n\t\tconst suffix = (isValue(i) ? `-${i}` : ``);\n\n\t\treturn (id ? $$.main\n\t\t\t.selectAll(`.${CLASS.bars}${$$.getTargetSelectorSuffix(id)}`) : $$.main)\n\t\t\t.selectAll(`.${CLASS.bar}${suffix}`);\n\t},\n\n\texpandBars(i, id, reset) {\n\t\tconst $$ = this;\n\n\t\treset && $$.unexpandBars();\n\t\t$$.getBars(i, id).classed(CLASS.EXPANDED, true);\n\t},\n\n\tunexpandBars(i) {\n\t\tthis.getBars(i).classed(CLASS.EXPANDED, false);\n\t},\n\n\tgenerateDrawBar(barIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst getPoints = $$.generateGetBarPoints(barIndices, isSub);\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isGrouped = config.data_groups.length;\n\t\tconst barRadius = config.bar_radius;\n\t\tconst barRadiusRatio = config.bar_radius_ratio;\n\n\t\t// get the bar radius\n\t\tconst getRadius = isNumber(barRadius) && barRadius > 0 ?\n\t\t\t() => barRadius : (\n\t\t\t\tisNumber(barRadiusRatio) ? w => w * barRadiusRatio : null\n\t\t\t);\n\n\t\treturn (d, i) => {\n\t\t\t// 4 points that make a bar\n\t\t\tconst points = getPoints(d, i);\n\n\t\t\t// switch points if axis is rotated, not applicable for sub chart\n\t\t\tconst indexX = +isRotated;\n\t\t\tconst indexY = +!indexX;\n\n\t\t\tconst isNegative = d.value < 0;\n\t\t\tconst pathRadius = [\"\", \"\"];\n\t\t\tlet radius = 0;\n\n\t\t\tif (getRadius && !isGrouped) {\n\t\t\t\tconst index = isRotated ? indexY : indexX;\n\t\t\t\tconst barW = points[2][index] - points[0][index];\n\n\t\t\t\tradius = getRadius(barW);\n\n\t\t\t\tconst arc = `a${radius},${radius} ${isNegative ? `1 0 0` : `0 0 1`} `;\n\n\t\t\t\tpathRadius[+!isRotated] = `${arc}${radius},${radius}`;\n\t\t\t\tpathRadius[+isRotated] = `${arc}${[-radius, radius][isRotated ? \"sort\" : \"reverse\"]()}`;\n\n\t\t\t\tisNegative && pathRadius.reverse();\n\t\t\t}\n\n\t\t\t// path string data shouldn't be containing new line chars\n\t\t\t// https://github.com/naver/billboard.js/issues/530\n\t\t\tconst path = isRotated ?\n\t\t\t\t`H${points[1][indexX] - radius} ${pathRadius[0]}V${points[2][indexY] - radius} ${pathRadius[1]}H${points[3][indexX]}` :\n\t\t\t\t`V${points[1][indexY] + (isNegative ? -radius : radius)} ${pathRadius[0]}H${points[2][indexX] - radius} ${pathRadius[1]}V${points[3][indexY]}`;\n\n\t\t\treturn `M${points[0][indexX]},${points[0][indexY]}${path}z`;\n\t\t};\n\t},\n\n\tgenerateGetBarPoints(barIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst axis = isSub ? $$.subXAxis : $$.xAxis;\n\t\tconst barTargetsNum = barIndices.__max__ + 1;\n\t\tconst barW = $$.getBarW(axis, barTargetsNum);\n\t\tconst barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub);\n\t\tconst barY = $$.getShapeY(!!isSub);\n\t\tconst barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub);\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\n\n\t\treturn (d, i) => {\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\n\t\t\tconst offset = barOffset(d, i) || y0; // offset is for stacked bar chart\n\t\t\tconst posX = barX(d);\n\t\t\tlet posY = barY(d);\n\n\t\t\t// fix posY not to overflow opposite quadrant\n\t\t\tif ($$.config.axis_rotated && (\n\t\t\t\t(d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)\n\t\t\t)) {\n\t\t\t\tposY = y0;\n\t\t\t}\n\n\t\t\t// 4 points that make a bar\n\t\t\treturn [\n\t\t\t\t[posX, offset],\n\t\t\t\t[posX, posY - (y0 - offset)],\n\t\t\t\t[posX + barW, posY - (y0 - offset)],\n\t\t\t\t[posX + barW, offset]\n\t\t\t];\n\t\t};\n\t},\n\n\tisWithinBar(that) {\n\t\tconst mouse = d3Mouse(that);\n\t\tconst list = getRectSegList(that);\n\t\tconst box = that.getBBox();\n\t\tconst seg0 = list[0];\n\t\tconst seg1 = list[1];\n\t\tconst x = Math.min(seg0.x, seg1.x);\n\t\tconst y = Math.min(seg0.y, seg1.y);\n\t\tconst w = box.width;\n\t\tconst h = box.height;\n\t\tconst offset = 2;\n\t\tconst sx = x - offset;\n\t\tconst ex = x + w + offset;\n\t\tconst sy = y + h + offset;\n\t\tconst ey = y - offset;\n\n\t\treturn sx < mouse[0] &&\n\t\t\tmouse[0] < ex &&\n\t\t\tey < mouse[1] &&\n\t\t\tmouse[1] < sy;\n\t}\n});\n\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmin as d3Min,\n\tmax as d3Max\n} from \"d3-array\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {extend, isFunction, isNumber, isObject} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initializer\n\t * @private\n\t */\n\tinitBubble() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ($$.hasType(\"bubble\")) {\n\t\t\tconfig.point_show = true;\n\t\t\tconfig.point_type = \"circle\";\n\t\t\tconfig.point_sensitivity = 25;\n\t\t}\n\t},\n\n\t/**\n\t * Get user agent's computed value for the total length of the path in user units\n\t * https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength\n\t * @return {Number}\n\t * @private\n\t */\n\tgetBaseLength() {\n\t\tconst $$ = this;\n\t\tconst cacheKey = \"$baseLength\";\n\t\tlet baseLength = $$.getCache(cacheKey);\n\n\t\tif (!baseLength) {\n\t\t\t$$.addCache(cacheKey, baseLength = d3Min([\n\t\t\t\t$$.axes.x.select(\"path\").node()\n\t\t\t\t\t.getTotalLength(),\n\t\t\t\t$$.axes.y.select(\"path\").node()\n\t\t\t\t\t.getTotalLength()\n\t\t\t]));\n\t\t}\n\n\t\treturn baseLength;\n\t},\n\n\t/**\n\t * Get the radius value for bubble circle\n\t * @param {Object} d\n\t * @return {Number}\n\t * @private\n \t */\n\tgetBubbleR(d) {\n\t\tconst $$ = this;\n\t\tlet maxR = $$.config.bubble_maxR;\n\n\t\tif (isFunction(maxR)) {\n\t\t\tmaxR = maxR(d);\n\t\t} else if (!isNumber(maxR)) {\n\t\t\tmaxR = ($$.getBaseLength() / ($$.getMaxDataCount() * 2)) + 12;\n\t\t}\n\n\t\tconst max = d3Max($$.getMinMaxData().max.map(d => (isObject(d.value) ? d.value.mid : d.value)));\n\t\tconst maxArea = maxR * maxR * Math.PI;\n\t\tconst area = d.value * (maxArea / max);\n\n\t\treturn Math.sqrt(area / Math.PI);\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tarea as d3Area,\n\tline as d3Line\n} from \"d3-shape\";\nimport {\n\tmouse as d3Mouse,\n\tselect as d3Select\n} from \"d3-selection\";\nimport CLASS from \"../config/classes\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {extend, isArray, isDefined, isFunction, isUndefined, isValue} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\tinitLine() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartLines);\n\t},\n\n\tupdateTargetsForLine(targets) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst classChartLine = $$.classChartLine.bind($$);\n\t\tconst classLines = $$.classLines.bind($$);\n\t\tconst classAreas = $$.classAreas.bind($$);\n\t\tconst classCircles = $$.classCircles.bind($$);\n\t\tconst classFocus = $$.classFocus.bind($$);\n\n\t\tconst mainLineUpdate = $$.main.select(`.${CLASS.chartLines}`)\n\t\t\t.selectAll(`.${CLASS.chartLine}`)\n\t\t\t.data(targets)\n\t\t\t.attr(\"class\", d => classChartLine(d) + classFocus(d));\n\n\t\tconst mainLineEnter = mainLineUpdate.enter().append(\"g\")\n\t\t\t.attr(\"class\", classChartLine)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.style(\"pointer-events\", \"none\");\n\n\t\t// Lines for each data\n\t\tmainLineEnter.append(\"g\")\n\t\t\t.attr(\"class\", classLines);\n\n\t\t// Areas\n\t\tmainLineEnter.append(\"g\")\n\t\t\t.attr(\"class\", classAreas);\n\n\t\tif (config.point_show) {\n\t\t\t// Circles for each data point on lines\n\t\t\tconfig.data_selection_enabled && mainLineEnter.append(\"g\")\n\t\t\t\t.attr(\"class\", d => $$.generateClass(CLASS.selectedCircles, d.id));\n\n\t\t\tmainLineEnter.append(\"g\")\n\t\t\t\t.attr(\"class\", classCircles)\n\t\t\t\t.style(\"cursor\", d => (config.data_selection_isselectable(d) ? \"pointer\" : null));\n\t\t}\n\n\t\t// Update date for selected circles\n\t\ttargets.forEach(t => {\n\t\t\t$$.main.selectAll(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(t.id)}`)\n\t\t\t\t.selectAll(`${CLASS.selectedCircle}`)\n\t\t\t\t.each(d => {\n\t\t\t\t\td.value = t.values[d.index].value;\n\t\t\t\t});\n\t\t});\n\n\t\t// MEMO: can not keep same color...\n\t\t// mainLineUpdate.exit().remove();\n\t},\n\n\tupdateLine(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.mainLine = $$.main\n\t\t\t.selectAll(`.${CLASS.lines}`)\n\t\t\t.selectAll(`.${CLASS.line}`)\n\t\t\t.data($$.lineData.bind($$));\n\n\t\t$$.mainLine.exit().transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.mainLine = $$.mainLine.enter()\n\t\t\t.append(\"path\")\n\t\t\t.attr(\"class\", d => `${$$.classLine.bind($$)(d)} ${$$.extraLineClasses(d) || \"\"}`)\n\t\t\t.style(\"stroke\", $$.color)\n\t\t\t.merge($$.mainLine)\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$))\n\t\t\t.style(\"shape-rendering\", d => ($$.isStepType(d) ? \"crispEdges\" : \"\"))\n\t\t\t.attr(\"transform\", null);\n\t},\n\n\tredrawLine(drawLine, withTransition) {\n\t\treturn [\n\t\t\t(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine)\n\t\t\t\t.attr(\"d\", drawLine)\n\t\t\t\t.style(\"stroke\", this.color)\n\t\t\t\t.style(\"opacity\", \"1\")\n\t\t];\n\t},\n\n\t/**\n\t * Get the curve interpolate\n\t * @param {Array} d Data object\n\t * @return {Function}\n\t * @private\n\t */\n\tgetCurve(d) {\n\t\tconst $$ = this;\n\t\tconst isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d);\n\n\t\t// when is step & rotated, should be computed in different way\n\t\t// https://github.com/naver/billboard.js/issues/471\n\t\treturn isRotatedStepType ? context => {\n\t\t\tconst step = $$.getInterpolate(d)(context);\n\n\t\t\t// keep the original method\n\t\t\tstep.orgPoint = step.point;\n\n\t\t\t// to get rotated path data\n\t\t\tstep.pointRotated = function(x, y) {\n\t\t\t\tthis._point === 1 && (this._point = 2);\n\n\t\t\t\tconst y1 = this._y * (1 - this._t) + y * this._t;\n\n\t\t\t\tthis._context.lineTo(this._x, y1);\n\t\t\t\tthis._context.lineTo(x, y1);\n\n\t\t\t\tthis._x = x;\n\t\t\t\tthis._y = y;\n\t\t\t};\n\n\t\t\tstep.point = function(x, y) {\n\t\t\t\tthis._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y);\n\t\t\t};\n\n\t\t\treturn step;\n\t\t} : $$.getInterpolate(d);\n\t},\n\n\tgenerateDrawLine(lineIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst lineConnectNull = config.line_connectNull;\n\t\tconst isRotated = config.axis_rotated;\n\n\t\tconst getPoints = $$.generateGetLinePoints(lineIndices, isSub);\n\t\tconst yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale;\n\n\t\tconst xValue = d => (isSub ? $$.subxx : $$.xx).call($$, d);\n\t\tconst yValue = (d, i) => (config.data_groups.length > 0 ?\n\t\t\tgetPoints(d, i)[0][1] :\n\t\t\tyScaleGetter.call($$, d.id)($$.getBaseValue(d))\n\t\t);\n\n\t\tlet line = d3Line();\n\n\t\tline = isRotated ?\n\t\t\tline.x(yValue).y(xValue) : line.x(xValue).y(yValue);\n\n\t\tif (!lineConnectNull) {\n\t\t\tline = line.defined(d => $$.getBaseValue(d) !== null);\n\t\t}\n\n\t\treturn d => {\n\t\t\tconst x = isSub ? $$.x : $$.subX;\n\t\t\tconst y = yScaleGetter.call($$, d.id);\n\t\t\tlet values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values;\n\t\t\tlet x0 = 0;\n\t\t\tlet y0 = 0;\n\t\t\tlet path;\n\n\t\t\tif ($$.isLineType(d)) {\n\t\t\t\tif (config.data_regions[d.id]) {\n\t\t\t\t\tpath = $$.lineWithRegions(values, x, y, config.data_regions[d.id]);\n\t\t\t\t} else {\n\t\t\t\t\tif ($$.isStepType(d)) {\n\t\t\t\t\t\tvalues = $$.convertValuesToStep(values);\n\t\t\t\t\t}\n\n\t\t\t\t\tpath = line.curve($$.getCurve(d))(values);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (values[0]) {\n\t\t\t\t\tx0 = x(values[0].x);\n\t\t\t\t\ty0 = y(values[0].value);\n\t\t\t\t}\n\n\t\t\t\tpath = isRotated ? `M ${y0} ${x0}` : `M ${x0} ${y0}`;\n\t\t\t}\n\n\t\t\treturn path || \"M 0 0\";\n\t\t};\n\t},\n\n\tgenerateGetLinePoints(lineIndices, isSubValue) { // partial duplication of generateGetBarPoints\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst lineTargetsNum = lineIndices.__max__ + 1;\n\t\tconst isSub = !!isSubValue;\n\t\tconst x = $$.getShapeX(0, lineTargetsNum, lineIndices, isSub);\n\t\tconst y = $$.getShapeY(isSub);\n\t\tconst lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub);\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\n\n\t\treturn (d, i) => {\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\n\t\t\tconst offset = lineOffset(d, i) || y0; // offset is for stacked area chart\n\t\t\tconst posX = x(d);\n\t\t\tlet posY = y(d);\n\n\t\t\t// fix posY not to overflow opposite quadrant\n\t\t\tif (config.axis_rotated && (\n\t\t\t\t(d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)\n\t\t\t)) {\n\t\t\t\tposY = y0;\n\t\t\t}\n\n\t\t\t// 1 point that marks the line position\n\t\t\tconst point = [posX, posY - (y0 - offset)];\n\n\t\t\treturn [\n\t\t\t\tpoint,\n\t\t\t\tpoint, // from here and below, needed for compatibility\n\t\t\t\tpoint,\n\t\t\t\tpoint\n\t\t\t];\n\t\t};\n\t},\n\n\tlineWithRegions(d, x, y, _regions) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isTimeSeries = $$.isTimeSeries();\n\t\tconst xOffset = $$.isCategorized() ? 0.5 : 0;\n\t\tconst regions = [];\n\t\tconst dasharray = \"2 2\"; // default value\n\n\t\tlet xp;\n\t\tlet yp;\n\t\tlet diff;\n\t\tlet diffx2;\n\n\t\t// check weather data is within region\n\t\tconst isWithinRegions = (withinX, withinRegions) => {\n\t\t\tfor (let i = 0, reg; (reg = withinRegions[i]); i++) {\n\t\t\t\tif (reg.start < withinX && withinX <= reg.end) {\n\t\t\t\t\treturn reg.style;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t};\n\n\t\t// Check start/end of regions\n\t\tif (isDefined(_regions)) {\n\t\t\tconst getValue = (v, def) => (\n\t\t\t\tisUndefined(v) ? def : (isTimeSeries ? $$.parseDate(v) : v)\n\t\t\t);\n\n\t\t\tfor (let i = 0, reg; (reg = _regions[i]); i++) {\n\t\t\t\tconst start = getValue(reg.start, d[0].x);\n\t\t\t\tconst end = getValue(reg.end, d[d.length - 1].x);\n\t\t\t\tconst style = reg.style || {dasharray};\n\n\t\t\t\tregions[i] = {start, end, style};\n\t\t\t}\n\t\t}\n\n\t\t// Set scales\n\t\tconst xValue = isRotated ? dt => y(dt.value) : dt => x(dt.x);\n\t\tconst yValue = isRotated ? dt => x(dt.x) : dt => y(dt.value);\n\n\t\t// Define svg generator function for region\n\t\tconst generateM = points => `M${points[0][0]},${points[0][1]}L${points[1][0]},${points[1][1]}`;\n\n\t\tconst sWithRegion = isTimeSeries ? (d0, d1, k, timeseriesDiff) => {\n\t\t\tconst x0 = d0.x.getTime();\n\t\t\tconst xDiff = d1.x - d0.x;\n\t\t\tconst xv0 = new Date(x0 + xDiff * k);\n\t\t\tconst xv1 = new Date(x0 + xDiff * (k + timeseriesDiff));\n\n\t\t\tconst points = isRotated ?\n\t\t\t\t[[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] :\n\t\t\t\t[[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];\n\n\t\t\treturn generateM(points);\n\t\t} : (d0, d1, k, otherDiff) => {\n\t\t\tconst points = isRotated ?\n\t\t\t\t[[y(yp(k), true), x(xp(k))], [y(yp(k + otherDiff), true), x(xp(k + otherDiff))]] :\n\t\t\t\t[[x(xp(k), true), y(yp(k))], [x(xp(k + otherDiff), true), y(yp(k + otherDiff))]];\n\n\t\t\treturn generateM(points);\n\t\t};\n\n\t\t// Generate\n\t\tlet path = \"M\";\n\n\t\tfor (let i = 0, data; (data = d[i]); i++) {\n\t\t\tconst prevData = d[i - 1];\n\t\t\tlet style = isWithinRegions(data.x, regions);\n\n\t\t\t// Draw as normal\n\t\t\tif (isUndefined(regions) || !style) {\n\t\t\t\tpath += `${i ? \"L\" : \"\"}${xValue(data)},${yValue(data)}`;\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tstyle = style.dasharray.split(\" \");\n\t\t\t\t} catch (e) {\n\t\t\t\t\tstyle = dasharray.split(\" \");\n\t\t\t\t}\n\n\t\t\t\t// Draw with region // TODO: Fix for horizotal charts\n\t\t\t\txp = $$.getScale(prevData.x + xOffset, data.x + xOffset, isTimeSeries);\n\t\t\t\typ = $$.getScale(prevData.value, data.value);\n\n\t\t\t\tconst dx = x(data.x) - x(prevData.x);\n\t\t\t\tconst dy = y(data.value) - y(prevData.value);\n\t\t\t\tconst dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n\t\t\t\tdiff = style[0] / dd;\n\t\t\t\tdiffx2 = diff * style[1];\n\n\t\t\t\tfor (let j = diff; j <= 1; j += diffx2) {\n\t\t\t\t\tpath += sWithRegion(prevData, data, j, diff);\n\n\t\t\t\t\t// to make sure correct line drawing\n\t\t\t\t\tif (j + diffx2 >= 1) {\n\t\t\t\t\t\tpath += sWithRegion(prevData, data, 1, 0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn path;\n\t},\n\n\tupdateArea(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.mainArea = $$.main.selectAll(`.${CLASS.areas}`)\n\t\t\t.selectAll(`.${CLASS.area}`)\n\t\t\t.data($$.lineData.bind($$));\n\n\t\t$$.mainArea.exit().transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.mainArea = $$.mainArea.enter().append(\"path\")\n\t\t\t.attr(\"class\", $$.classArea.bind($$))\n\t\t\t.style(\"fill\", $$.color)\n\t\t\t.style(\"opacity\", function() {\n\t\t\t\t$$.orgAreaOpacity = d3Select(this).style(\"opacity\");\n\t\t\t\treturn \"0\";\n\t\t\t})\n\t\t\t.merge($$.mainArea);\n\n\t\t$$.mainArea\n\t\t\t.style(\"opacity\", $$.orgAreaOpacity);\n\t},\n\n\tredrawArea(drawArea, withTransition) {\n\t\tconst $$ = this;\n\n\t\treturn [\n\t\t\t(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea)\n\t\t\t\t.attr(\"d\", drawArea)\n\t\t\t\t.style(\"fill\", this.color)\n\t\t\t\t.style(\"opacity\", d => ($$.isAreaRangeType(d) ? $$.orgAreaOpacity / 1.75 : $$.orgAreaOpacity))\n\t\t];\n\t},\n\n\t/**\n\t * Generate area path data\n\t * @param areaIndices\n\t * @param isSub\n\t * @return {function(*=): (*|string)}\n\t * @private\n\t */\n\tgenerateDrawArea(areaIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst lineConnectNull = config.line_connectNull;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isGrouped = config.data_groups.length > 0;\n\n\t\tconst getPoints = $$.generateGetAreaPoints(areaIndices, isSub);\n\t\tconst yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale;\n\n\t\tconst xValue = d => (isSub ? $$.subxx : $$.xx).call($$, d);\n\t\tconst value0 = (d, i) => (isGrouped ?\n\t\t\tgetPoints(d, i)[0][1] :\n\t\t\tyScaleGetter.call($$, d.id)(\n\t\t\t\t$$.isAreaRangeType(d) ?\n\t\t\t\t\t$$.getAreaRangeData(d, \"high\") : $$.getAreaBaseValue(d.id)\n\t\t\t));\n\t\tconst value1 = (d, i) => (isGrouped ?\n\t\t\tgetPoints(d, i)[1][1] :\n\t\t\tyScaleGetter.call($$, d.id)(\n\t\t\t\t$$.isAreaRangeType(d) ?\n\t\t\t\t\t$$.getAreaRangeData(d, \"low\") : d.value\n\t\t\t));\n\n\t\treturn d => {\n\t\t\tlet values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values;\n\t\t\tlet x0 = 0;\n\t\t\tlet y0 = 0;\n\t\t\tlet path;\n\n\t\t\tif ($$.isAreaType(d)) {\n\t\t\t\tlet area = d3Area();\n\n\t\t\t\tarea = isRotated ?\n\t\t\t\t\tarea.y(xValue)\n\t\t\t\t\t\t.x0(value0)\n\t\t\t\t\t\t.x1(value1) :\n\t\t\t\t\tarea.x(xValue)\n\t\t\t\t\t\t.y0(config.area_above ? 0 : value0)\n\t\t\t\t\t\t.y1(value1);\n\n\t\t\t\tif (!lineConnectNull) {\n\t\t\t\t\tarea = area.defined(d => $$.getBaseValue(d) !== null);\n\t\t\t\t}\n\n\t\t\t\tif ($$.isStepType(d)) {\n\t\t\t\t\tvalues = $$.convertValuesToStep(values);\n\t\t\t\t}\n\n\t\t\t\tpath = area.curve($$.getCurve(d))(values);\n\t\t\t} else {\n\t\t\t\tif (values[0]) {\n\t\t\t\t\tx0 = $$.x(values[0].x);\n\t\t\t\t\ty0 = $$.getYScale(d.id)(values[0].value);\n\t\t\t\t}\n\n\t\t\t\tpath = isRotated ? `M ${y0} ${x0}` : `M ${x0} ${y0}`;\n\t\t\t}\n\n\t\t\treturn path || \"M 0 0\";\n\t\t};\n\t},\n\n\tgetAreaBaseValue() {\n\t\treturn 0;\n\t},\n\n\tgenerateGetAreaPoints(areaIndices, isSub) {\n\t\t// partial duplication of generateGetBarPoints\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst areaTargetsNum = areaIndices.__max__ + 1;\n\t\tconst x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub);\n\t\tconst y = $$.getShapeY(!!isSub);\n\t\tconst areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub);\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\n\n\t\treturn function(d, i) {\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\n\t\t\tconst offset = areaOffset(d, i) || y0; // offset is for stacked area chart\n\t\t\tconst posX = x(d);\n\t\t\tlet posY = y(d);\n\n\t\t\t// fix posY not to overflow opposite quadrant\n\t\t\tif (config.axis_rotated && (\n\t\t\t\t(d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)\n\t\t\t)) {\n\t\t\t\tposY = y0;\n\t\t\t}\n\n\t\t\t// 1 point that marks the area position\n\t\t\treturn [\n\t\t\t\t[posX, offset],\n\t\t\t\t[posX, posY - (y0 - offset)],\n\t\t\t\t[posX, posY - (y0 - offset)], // needed for compatibility\n\t\t\t\t[posX, offset] // needed for compatibility\n\t\t\t];\n\t\t};\n\t},\n\n\tupdateCircle() {\n\t\tconst $$ = this;\n\n\t\tif (!$$.config.point_show) {\n\t\t\treturn;\n\t\t}\n\n\t\t$$.mainCircle = $$.main.selectAll(`.${CLASS.circles}`).selectAll(`.${CLASS.circle}`)\n\t\t\t.data(d => !$$.isBarType(d) && (!$$.isLineType(d) || $$.shouldDrawPointsForLine(d)) &&\n\t\t\t\t$$.labelishData(d));\n\n\t\t$$.mainCircle.exit().remove();\n\n\t\t$$.mainCircle = $$.mainCircle.enter()\n\t\t\t.append($$.point(\"create\", this, $$.classCircle.bind($$), $$.pointR.bind($$), $$.color))\n\t\t\t.merge($$.mainCircle)\n\t\t\t.style(\"stroke\", $$.color)\n\t\t\t.style(\"opacity\", $$.initialOpacityForCircle.bind($$));\n\t},\n\n\tredrawCircle(cx, cy, withTransition, flow) {\n\t\tconst $$ = this;\n\t\tconst selectedCircles = $$.main.selectAll(`.${CLASS.selectedCircle}`);\n\n\t\tif (!$$.config.point_show) {\n\t\t\treturn [];\n\t\t}\n\n\t\tconst mainCircles = [];\n\n\t\t$$.mainCircle.each(function(d) {\n\t\t\tconst fn = $$.point(\"update\", $$, cx, cy, $$.opacityForCircle.bind($$), $$.color, withTransition, flow, selectedCircles).bind(this);\n\t\t\tconst result = fn(d);\n\n\t\t\tmainCircles.push(result);\n\t\t});\n\n\t\tconst posAttr = $$.isCirclePoint() ? \"c\" : \"\";\n\n\t\treturn [\n\t\t\tmainCircles,\n\t\t\tselectedCircles\n\t\t\t\t.attr(`${posAttr}x`, cx)\n\t\t\t\t.attr(`${posAttr}y`, cy)\n\t\t];\n\t},\n\n\tcircleX(d) {\n\t\tconst $$ = this;\n\t\tconst hasValue = isValue(d.x);\n\n\t\treturn $$.config.zoom_enabled && $$.zoomScale ?\n\t\t\t(hasValue ? $$.zoomScale(d.x) : null) :\n\t\t\t(hasValue ? $$.x(d.x) : null);\n\t},\n\n\tupdateCircleY() {\n\t\tconst $$ = this;\n\t\tlet lineIndices;\n\t\tlet getPoints;\n\n\t\tif ($$.config.data_groups.length > 0) {\n\t\t\tlineIndices = $$.getShapeIndices($$.isLineType);\n\t\t\tgetPoints = $$.generateGetLinePoints(lineIndices);\n\n\t\t\t$$.circleY = (d, i) => getPoints(d, i)[0][1];\n\t\t} else {\n\t\t\t$$.circleY = d => $$.getYScale(d.id)($$.getBaseValue(d));\n\t\t}\n\t},\n\n\tgetCircles(i, id) {\n\t\tconst $$ = this;\n\t\tconst suffix = (isValue(i) ? `-${i}` : ``);\n\n\t\treturn (id ? $$.main.selectAll(`.${CLASS.circles}${$$.getTargetSelectorSuffix(id)}`) : $$.main)\n\t\t\t.selectAll(`.${CLASS.circle}${suffix}`);\n\t},\n\n\texpandCircles(i, id, reset) {\n\t\tconst $$ = this;\n\t\tconst r = $$.pointExpandedR.bind($$);\n\n\t\treset && $$.unexpandCircles();\n\n\t\tconst circles = $$.getCircles(i, id).classed(CLASS.EXPANDED, true);\n\t\tconst scale = r(circles) / $$.config.point_r;\n\n\t\tif ($$.isCirclePoint()) {\n\t\t\tcircles.attr(\"r\", r);\n\t\t} else {\n\t\t\t// transform must be applied to each node individually\n\t\t\tcircles.each(function() {\n\t\t\t\tconst point = d3Select(this);\n\n\t\t\t\tconst box = this.getBBox();\n\t\t\t\tconst x1 = box.x + (box.width * 0.5);\n\t\t\t\tconst y1 = box.y + (box.height * 0.5);\n\t\t\t\tconst x2 = (1 - scale) * x1;\n\t\t\t\tconst y2 = (1 - scale) * y1;\n\n\t\t\t\tthis.tagName === \"circle\" ?\n\t\t\t\t\tpoint.attr(\"r\", r) :\n\t\t\t\t\tpoint.style(\"transform\", `translate(${x2}px, ${y2}px) scale(${scale})`);\n\t\t\t});\n\t\t}\n\t},\n\n\tunexpandCircles(i) {\n\t\tconst $$ = this;\n\t\tconst r = $$.pointR.bind($$);\n\n\t\tconst circles = $$.getCircles(i)\n\t\t\t.filter(function() {\n\t\t\t\treturn d3Select(this).classed(CLASS.EXPANDED);\n\t\t\t})\n\t\t\t.classed(CLASS.EXPANDED, false);\n\n\t\tcircles.attr(\"r\", r);\n\n\t\t!$$.isCirclePoint() &&\n\t\t\tcircles.style(\"transform\", `scale(${r(circles) / $$.config.point_r})`);\n\t},\n\n\tpointR(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst pointR = config.point_r;\n\t\tlet r = pointR;\n\n\t\tif ($$.isStepType(d)) {\n\t\t\tr = 0;\n\t\t} else if ($$.isBubbleType(d)) {\n\t\t\tr = $$.getBubbleR(d);\n\t\t} else if (isFunction(pointR)) {\n\t\t\tr = pointR(d);\n\t\t}\n\n\t\treturn r;\n\t},\n\n\tpointExpandedR(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst scale = $$.isBubbleType(d) ? 1.15 : 1.75;\n\n\t\treturn config.point_focus_expand_enabled ?\n\t\t\t(config.point_focus_expand_r || $$.pointR(d) * scale) : $$.pointR(d);\n\t},\n\n\tpointSelectR(d) {\n\t\tconst $$ = this;\n\t\tconst selectR = $$.config.point_select_r;\n\n\t\treturn isFunction(selectR) ?\n\t\t\tselectR(d) : (selectR || $$.pointR(d) * 4);\n\t},\n\n\tisWithinCircle(node, r) {\n\t\tconst mouse = d3Mouse(node);\n\t\tconst element = d3Select(node);\n\t\tconst prefix = this.isCirclePoint() ? \"c\" : \"\";\n\n\t\tlet cx = +element.attr(`${prefix}x`);\n\t\tlet cy = +element.attr(`${prefix}y`);\n\n\t\t// if node don't have cx/y or x/y attribute value\n\t\tif (!(cx || cy) && node.nodeType === 1) {\n\t\t\tconst domRect = node.getBBox ? node.getBBox() : node.getBoundingClientRect();\n\n\t\t\tcx = domRect.x;\n\t\t\tcy = domRect.y;\n\t\t}\n\n\t\treturn Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r;\n\t},\n\n\tisWithinStep(that, y) {\n\t\treturn Math.abs(y - d3Mouse(that)[1]) < 30;\n\t},\n\n\tshouldDrawPointsForLine(d) {\n\t\tconst linePoint = this.config.line_point;\n\n\t\treturn linePoint === true ||\n\t\t\t(isArray(linePoint) && linePoint.indexOf(d.id) !== -1);\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tnamespaces as d3Namespaces,\n\tselect as d3Select\n} from \"d3-selection\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {isFunction, isObjectType, toArray, extend, notEmpty} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\thasValidPointType(type) {\n\t\treturn /^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type);\n\t},\n\n\thasValidPointDrawMethods(type) {\n\t\tconst pointType = type || this.config.point_type;\n\n\t\treturn isObjectType(pointType) &&\n\t\t\tisFunction(pointType.create) && isFunction(pointType.update);\n\t},\n\n\tinsertPointInfoDefs(point, id) {\n\t\tconst $$ = this;\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString(point, \"image/svg+xml\");\n\t\tconst node = doc.firstChild;\n\t\tconst clone = document.createElementNS(d3Namespaces.svg, node.nodeName.toLowerCase());\n\t\tconst attribs = node.attributes;\n\n\t\tfor (let i = 0, name; (name = attribs[i]); i++) {\n\t\t\tname = name.name;\n\t\t\tclone.setAttribute(name, node.getAttribute(name));\n\t\t}\n\n\t\tclone.id = id;\n\t\tclone.style.fill = \"inherit\";\n\t\tclone.style.stroke = \"inherit\";\n\n\t\t// when has child nodes\n\t\tif (node.children.length) {\n\t\t\tclone.innerHTML = toArray(node.children)\n\t\t\t\t.map(v => v.outerHTML)\n\t\t\t\t.join(\"\");\n\t\t}\n\n\t\t$$.defs.node().appendChild(clone);\n\t},\n\n\tpointFromDefs(id) {\n\t\treturn this.defs.select(`#${id}`);\n\t},\n\n\tgeneratePoint() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst ids = [];\n\t\tconst pattern = notEmpty(config.point_pattern) ? config.point_pattern : [config.point_type];\n\n\t\treturn function(method, context, ...args) {\n\t\t\treturn function(d) {\n\t\t\t\tconst id = d.id || (d.data && d.data.id) || d;\n\t\t\t\tconst element = d3Select(this);\n\t\t\t\tlet point;\n\n\t\t\t\tif (ids.indexOf(id) < 0) {\n\t\t\t\t\tids.push(id);\n\t\t\t\t}\n\t\t\t\tpoint = pattern[ids.indexOf(id) % pattern.length];\n\n\t\t\t\tif ($$.hasValidPointType(point)) {\n\t\t\t\t\tpoint = $$[point];\n\t\t\t\t} else if (!$$.hasValidPointDrawMethods(point)) {\n\t\t\t\t\tconst pointId = `${$$.datetimeId}-point-${id}`;\n\t\t\t\t\tconst pointFromDefs = $$.pointFromDefs(pointId);\n\n\t\t\t\t\tif (pointFromDefs.size() < 1) {\n\t\t\t\t\t\t$$.insertPointInfoDefs(point, pointId);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (method === \"create\") {\n\t\t\t\t\t\treturn $$.custom.create.bind(context)(element, pointId, ...args);\n\t\t\t\t\t} else if (method === \"update\") {\n\t\t\t\t\t\treturn $$.custom.update.bind(context)(element, ...args);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn point[method].bind(context)(element, ...args);\n\t\t\t};\n\t\t};\n\t},\n\n\tgetTransitionName() {\n\t\treturn Math.random().toString();\n\t},\n\n\tcustom: {\n\t\tcreate(element, id, cssClassFn, sizeFn, fillStyleFn) {\n\t\t\treturn element.append(\"use\")\n\t\t\t\t.attr(\"xlink:href\", `#${id}`)\n\t\t\t\t.attr(\"class\", cssClassFn)\n\t\t\t\t.style(\"fill\", fillStyleFn)\n\t\t\t\t.node();\n\t\t},\n\n\t\tupdate(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn,\n\t\t\twithTransition, flow, selectedCircles) {\n\t\t\tconst $$ = this;\n\t\t\tconst box = element.node().getBBox();\n\n\t\t\tbox.width /= 2;\n\t\t\tbox.height /= 2;\n\n\t\t\tconst xPosFn2 = d => xPosFn(d) - box.width;\n\t\t\tconst yPosFn2 = d => yPosFn(d) - box.height;\n\t\t\tlet mainCircles = element;\n\n\t\t\tif (withTransition) {\n\t\t\t\tconst transitionName = $$.getTransitionName();\n\n\t\t\t\tif (flow) {\n\t\t\t\t\tmainCircles = element\n\t\t\t\t\t\t.attr(\"x\", xPosFn2);\n\t\t\t\t}\n\n\t\t\t\tmainCircles = element\n\t\t\t\t\t.transition(transitionName)\n\t\t\t\t\t.attr(\"x\", xPosFn2)\n\t\t\t\t\t.attr(\"y\", yPosFn2)\n\t\t\t\t\t.transition(transitionName);\n\n\t\t\t\tselectedCircles.transition($$.getTransitionName());\n\t\t\t} else {\n\t\t\t\tmainCircles = element\n\t\t\t\t\t.attr(\"x\", xPosFn2)\n\t\t\t\t\t.attr(\"y\", yPosFn2);\n\t\t\t}\n\n\t\t\treturn mainCircles\n\t\t\t\t.style(\"opacity\", opacityStyleFn)\n\t\t\t\t.style(\"fill\", fillStyleFn);\n\t\t}\n\t},\n\n\t// 'circle' data point\n\tcircle: {\n\t\tcreate(element, cssClassFn, sizeFn, fillStyleFn) {\n\t\t\treturn element.append(\"circle\")\n\t\t\t\t.attr(\"class\", cssClassFn)\n\t\t\t\t.attr(\"r\", sizeFn)\n\t\t\t\t.style(\"fill\", fillStyleFn)\n\t\t\t\t.node();\n\t\t},\n\n\t\tupdate(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn,\n\t\t\twithTransition, flow, selectedCircles) {\n\t\t\tconst $$ = this;\n\t\t\tlet mainCircles = element;\n\n\t\t\t// when '.load()' called, bubble size should be updated\n\t\t\tif ($$.hasType(\"bubble\")) {\n\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t.attr(\"r\", $$.pointR.bind($$));\n\t\t\t}\n\n\t\t\tif (withTransition) {\n\t\t\t\tconst transitionName = $$.getTransitionName();\n\n\t\t\t\tif (flow) {\n\t\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t\t.attr(\"cx\", xPosFn);\n\t\t\t\t}\n\n\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t.transition(transitionName)\n\t\t\t\t\t.attr(\"cx\", xPosFn)\n\t\t\t\t\t.attr(\"cy\", yPosFn)\n\t\t\t\t\t.transition(transitionName);\n\n\t\t\t\tselectedCircles.transition($$.getTransitionName());\n\t\t\t} else {\n\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t.attr(\"cx\", xPosFn)\n\t\t\t\t\t.attr(\"cy\", yPosFn);\n\t\t\t}\n\n\t\t\treturn mainCircles\n\t\t\t\t.style(\"opacity\", opacityStyleFn)\n\t\t\t\t.style(\"fill\", fillStyleFn);\n\t\t}\n\t},\n\n\t// 'rectangle' data point\n\trectangle: {\n\t\tcreate(element, cssClassFn, sizeFn, fillStyleFn) {\n\t\t\tconst rectSizeFn = d => sizeFn(d) * 2.0;\n\n\t\t\treturn element.append(\"rect\")\n\t\t\t\t.attr(\"class\", cssClassFn)\n\t\t\t\t.attr(\"width\", rectSizeFn)\n\t\t\t\t.attr(\"height\", rectSizeFn)\n\t\t\t\t.style(\"fill\", fillStyleFn)\n\t\t\t\t.node();\n\t\t},\n\n\t\tupdate(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn,\n\t\t\twithTransition, flow, selectedCircles) {\n\t\t\tconst $$ = this;\n\t\t\tconst r = $$.config.point_r;\n\t\t\tconst rectXPosFn = d => xPosFn(d) - r;\n\t\t\tconst rectYPosFn = d => yPosFn(d) - r;\n\n\t\t\tlet mainCircles = element;\n\n\t\t\tif (withTransition) {\n\t\t\t\tconst transitionName = $$.getTransitionName();\n\n\t\t\t\tif (flow) {\n\t\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t\t.attr(\"x\", rectXPosFn);\n\t\t\t\t}\n\n\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t.transition(transitionName)\n\t\t\t\t\t.attr(\"x\", rectXPosFn)\n\t\t\t\t\t.attr(\"y\", rectYPosFn)\n\t\t\t\t\t.transition(transitionName);\n\n\t\t\t\tselectedCircles.transition($$.getTransitionName());\n\t\t\t} else {\n\t\t\t\tmainCircles = mainCircles\n\t\t\t\t\t.attr(\"x\", rectXPosFn)\n\t\t\t\t\t.attr(\"y\", rectYPosFn);\n\t\t\t}\n\n\t\t\treturn mainCircles\n\t\t\t\t.style(\"opacity\", opacityStyleFn)\n\t\t\t\t.style(\"fill\", fillStyleFn);\n\t\t}\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tevent as d3Event\n} from \"d3-selection\";\nimport {\n\tmax as d3Max,\n\trange as d3Range\n} from \"d3-array\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, isDefined, isEmpty, isUndefined, toArray} from \"../internals/util\";\n\n/**\n * Get the position value\n * @param {Boolean} isClockwise If the direction is clockwise\n * @param {String} type Coordinate type 'x' or 'y'\n * @param {Number} edge Number of edge\n * @param {Number} pos The indexed position\n * @param {Number} range\n * @param {Number} ratio\n * @return {number}\n * @private\n */\nfunction getPosition(isClockwise, type, edge, pos, range, ratio) {\n\tconst index = isClockwise && pos > 0 ? edge - pos : pos;\n\tconst r = 2 * Math.PI;\n\tconst func = type === \"x\" ? Math.sin : Math.cos;\n\n\treturn range * (1 - ratio * func(index * r / edge));\n}\n\n// cache key\nconst cacheKey = \"$radarPoints\";\n\nextend(ChartInternal.prototype, {\n\tinitRadar() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ($$.hasType(\"radar\")) {\n\t\t\t$$.radars = $$.main.select(`.${CLASS.chart}`).append(\"g\")\n\t\t\t\t.attr(\"class\", CLASS.chartRadars);\n\n\t\t\t// level\n\t\t\t$$.radars.levels = $$.radars.append(\"g\")\n\t\t\t\t.attr(\"class\", CLASS.levels);\n\n\t\t\t// axis\n\t\t\t$$.radars.axes = $$.radars.append(\"g\")\n\t\t\t\t.attr(\"class\", CLASS.axis);\n\n\t\t\t// shapes\n\t\t\t$$.radars.shapes = $$.radars.append(\"g\")\n\t\t\t\t.attr(\"class\", CLASS.shapes);\n\n\t\t\t$$.maxValue = config.radar_axis_max || $$.getMinMaxData().max[0].value;\n\t\t}\n\t},\n\n\tgetRadarSize() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst padding = config.axis_x_categories.length < 4 ? -20 : 10;\n\t\tconst size = (Math.min($$.arcWidth, $$.arcHeight) - padding) / 2;\n\n\t\treturn [size, size];\n\t},\n\n\tupdateTargetsForRadar(targets) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif (isEmpty(config.axis_x_categories)) {\n\t\t\tconfig.axis_x_categories = d3Range(0, d3Max(targets).values.length);\n\t\t}\n\n\t\t$$.generateRadarPoints();\n\t},\n\n\tgetRadarPosition(type, index, range, ratio) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst [width, height] = $$.getRadarSize();\n\t\tconst edge = config.axis_x_categories.length;\n\t\tconst isClockwise = config.radar_direction_clockwise;\n\n\t\tconst pos = toArray(type).map(v => getPosition(\n\t\t\tisClockwise,\n\t\t\tv,\n\t\t\tedge,\n\t\t\tindex,\n\t\t\tisDefined(range) ? range : (type === \"x\" ? width : height),\n\t\t\tratio || config.radar_size_ratio\n\t\t));\n\n\t\treturn pos.length === 1 ? pos[0] : pos;\n\t},\n\n\t/**\n\t * Generate data points\n\t * @private\n\t */\n\tgenerateRadarPoints() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst targets = $$.data.targets;\n\n\t\tconst [width, height] = $$.getRadarSize();\n\t\tconst points = $$.getCache(cacheKey) || {};\n\t\tconst size = points._size;\n\n\t\t// recalculate position only when the previous dimension has been changed\n\t\tif (!size || (size.width !== width && size.height !== height)) {\n\t\t\tconst getRatio = v => (parseFloat(Math.max(v, 0)) / $$.maxValue) * config.radar_size_ratio;\n\n\t\t\ttargets.forEach(d => {\n\t\t\t\tpoints[d.id] = d.values.map((v, i) => (\n\t\t\t\t\t$$.getRadarPosition([\"x\", \"y\"], i, undefined, getRatio(v.value))\n\t\t\t\t));\n\t\t\t});\n\n\t\t\tpoints._size = {width, height};\n\t\t\t$$.addCache(cacheKey, points);\n\t\t}\n\t},\n\n\tredrawRadar(duration, durationForExit) {\n\t\tconst $$ = this;\n\t\tconst translate = $$.getTranslate(\"radar\");\n\n\t\t// Adjust radar, circles and texts' position\n\t\tif (translate) {\n\t\t\t$$.radars.attr(\"transform\", translate);\n\t\t\t$$.main.selectAll(`.${CLASS.circles}`).attr(\"transform\", translate);\n\t\t\t$$.main.select(`.${CLASS.chartTexts}`).attr(\"transform\", translate);\n\n\t\t\t$$.generateRadarPoints();\n\t\t\t$$.updateRadarLevel();\n\t\t\t$$.updateRadarAxes();\n\t\t\t$$.updateRadarShape(duration, durationForExit);\n\t\t}\n\t},\n\n\tgenerateGetRadarPoints() {\n\t\tconst $$ = this;\n\t\tconst points = $$.getCache(cacheKey);\n\n\t\treturn (d, i) => {\n\t\t\tconst point = points[d.id][i];\n\n\t\t\treturn [\n\t\t\t\tpoint,\n\t\t\t\tpoint,\n\t\t\t\tpoint,\n\t\t\t\tpoint\n\t\t\t];\n\t\t};\n\t},\n\n\tupdateRadarLevel() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst [width, height] = $$.getRadarSize();\n\t\tconst depth = config.radar_level_depth;\n\t\tconst edge = config.axis_x_categories.length;\n\t\tconst showText = config.radar_level_text_show;\n\n\t\tconst radarLevels = $$.radars.levels;\n\t\tconst levelData = d3Range(0, depth);\n\n\t\tconst radius = config.radar_size_ratio * Math.min(width, height);\n\t\tconst levelRatio = levelData.map(l => radius * ((l + 1) / depth));\n\t\tconst levelTextFormat = config.radar_level_text_format;\n\n\t\t// Generate points\n\t\tconst points = levelData.map(v => {\n\t\t\tconst range = levelRatio[v];\n\t\t\tconst pos = d3Range(0, edge).map(i => (\n\t\t\t\t$$.getRadarPosition([\"x\", \"y\"], i, range, 1)).join(\",\")\n\t\t\t);\n\n\t\t\treturn pos.join(\" \");\n\t\t});\n\n\t\tconst level = radarLevels\n\t\t\t.selectAll(`.${CLASS.level}`)\n\t\t\t.data(levelData);\n\n\t\tlevel.exit().remove();\n\n\t\tconst levelEnter = level.enter().append(\"g\")\n\t\t\t.attr(\"class\", (d, i) => `${CLASS.level} ${CLASS.level}-${i}`);\n\n\t\tlevelEnter.append(\"polygon\")\n\t\t\t.style(\"visibility\", config.radar_level_show ? null : \"hidden\");\n\n\t\tif (showText) {\n\t\t\tif (radarLevels.select(\"text\").empty()) {\n\t\t\t\tradarLevels\n\t\t\t\t\t.append(\"text\")\n\t\t\t\t\t.attr(\"dx\", \"-.5em\")\n\t\t\t\t\t.attr(\"dy\", \"-.7em\")\n\t\t\t\t\t.style(\"text-anchor\", \"end\")\n\t\t\t\t\t.text(() => levelTextFormat(0));\n\t\t\t}\n\n\t\t\tlevelEnter.append(\"text\")\n\t\t\t\t.attr(\"dx\", \"-.5em\")\n\t\t\t\t.style(\"text-anchor\", \"end\")\n\t\t\t\t.text(d => levelTextFormat(\n\t\t\t\t\t$$.maxValue / levelData.length * (d + 1)\n\t\t\t\t));\n\t\t}\n\n\t\tlevelEnter\n\t\t\t.merge(level)\n\t\t\t.attr(\"transform\", d => `translate(${width - levelRatio[d]}, ${height - levelRatio[d]})`)\n\t\t\t.selectAll(\"polygon\")\n\t\t\t.attr(\"points\", d => points[d]);\n\n\t\t// update level text position\n\t\tif (showText) {\n\t\t\tradarLevels.selectAll(\"text\")\n\t\t\t\t.attr(\"x\", d => (isUndefined(d) ? width : points[d].split(\",\")[0]))\n\t\t\t\t.attr(\"y\", d => (isUndefined(d) ? height : 0));\n\t\t}\n\t},\n\n\tupdateRadarAxes() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst [width, height] = $$.getRadarSize();\n\t\tconst categories = config.axis_x_categories;\n\n\t\tlet axis = $$.radars.axes.selectAll(\"g\")\n\t\t\t.data(categories);\n\n\t\taxis.exit().remove();\n\n\t\tconst axisEnter = axis.enter().append(\"g\")\n\t\t\t.attr(\"class\", (d, i) => `${CLASS.axis}-${i}`);\n\n\t\tconfig.radar_axis_line_show && axisEnter.append(\"line\");\n\t\tconfig.radar_axis_text_show && axisEnter.append(\"text\");\n\n\t\taxis = axisEnter.merge(axis);\n\n\t\t// axis line\n\t\tif (config.radar_axis_line_show) {\n\t\t\taxis.select(\"line\")\n\t\t\t\t.attr(\"x1\", width)\n\t\t\t\t.attr(\"y1\", height)\n\t\t\t\t.attr(\"x2\", (d, i) => $$.getRadarPosition(\"x\", i))\n\t\t\t\t.attr(\"y2\", (d, i) => $$.getRadarPosition(\"y\", i));\n\t\t}\n\n\t\t// axis text\n\t\tif (config.radar_axis_text_show) {\n\t\t\taxis.select(\"text\")\n\t\t\t\t.style(\"text-anchor\", \"middle\")\n\t\t\t\t.attr(\"dy\", \".5em\")\n\t\t\t\t.text(d => d)\n\t\t\t\t.datum((d, i) => ({index: i}))\n\t\t\t\t.attr(\"x\", (d, i) => $$.getRadarPosition(\"x\", i, undefined, 1))\n\t\t\t\t.attr(\"y\", (d, i) => $$.getRadarPosition(\"y\", i, undefined, 1));\n\t\t}\n\n\t\t$$.bindEvent();\n\t},\n\n\tbindEvent() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif (config.interaction_enabled) {\n\t\t\tconst isMouse = $$.inputType === \"mouse\";\n\n\t\t\t$$.radars.select(`.${CLASS.axis}`)\n\t\t\t\t.on(`${isMouse ? \"mouseover \" : \"\"}click`, () => {\n\t\t\t\t\tif ($$.transiting) { // skip while transiting\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst target = d3Select(d3Event.target);\n\t\t\t\t\tconst index = target.datum().index;\n\n\t\t\t\t\t$$.selectRectForSingle($$.svg.node(), null, index);\n\t\t\t\t\t$$.setOver(index);\n\t\t\t\t})\n\t\t\t\t.on(\"mouseout\", isMouse ? () => {\n\t\t\t\t\tthis.hideTooltip();\n\t\t\t\t\tthis.unexpandCircles();\n\t\t\t\t} : null);\n\t\t}\n\t},\n\n\tupdateRadarShape(duration, durationForExit) {\n\t\tconst $$ = this;\n\t\tconst targets = $$.data.targets;\n\t\tconst points = $$.getCache(cacheKey);\n\n\t\tconst areas = $$.radars.shapes\n\t\t\t.selectAll(\"polygon\")\n\t\t\t.data(targets);\n\n\t\tconst areasEnter = areas.enter().append(\"g\")\n\t\t\t.attr(\"class\", $$.classChartRadar.bind($$));\n\n\t\tareas.exit().transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.remove();\n\n\t\tareasEnter\n\t\t\t.append(\"polygon\")\n\t\t\t.merge(areas)\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.style(\"fill\", d => $$.color(d))\n\t\t\t.style(\"stroke\", d => $$.color(d))\n\t\t\t.attr(\"points\", d => points[d.id].join(\" \"));\n\t},\n\n\t/**\n\t * Get data point x coordinate\n\t * @param {Object} d Data object\n\t * @return {Number}\n\t * @private\n\t */\n\tradarCircleX(d) {\n\t\treturn this.getCache(cacheKey)[d.id][d.index][0];\n\t},\n\n\t/**\n\t * Get data point y coordinate\n\t * @param {Object} d Data object\n\t * @return {Number}\n\t * @private\n\t */\n\tradarCircleY(d) {\n\t\treturn this.getCache(cacheKey)[d.id][d.index][1];\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tselectAll as d3SelectAll\n} from \"d3-selection\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, isNumber} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initializes the text\n\t * @private\n\t */\n\tinitText() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartTexts);\n\n\t\t$$.mainText = d3SelectAll([]);\n\t},\n\n\t/**\n\t * Update chartText\n\t * @private\n\t * @param {Object} $$.data.targets\n\t */\n\tupdateTargetsForText(targets) {\n\t\tconst $$ = this;\n\t\tconst classChartText = $$.classChartText.bind($$);\n\t\tconst classTexts = $$.classTexts.bind($$);\n\t\tconst classFocus = $$.classFocus.bind($$);\n\t\tconst mainTextUpdate = $$.main.select(`.${CLASS.chartTexts}`).selectAll(`.${CLASS.chartText}`)\n\t\t\t.data(targets)\n\t\t\t.attr(\"class\", d => classChartText(d) + classFocus(d));\n\n\t\tconst mainTextEnter = mainTextUpdate.enter().append(\"g\")\n\t\t\t.attr(\"class\", classChartText)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.style(\"pointer-events\", \"none\");\n\n\t\tmainTextEnter.append(\"g\")\n\t\t\t.attr(\"class\", classTexts);\n\t},\n\n\t/**\n\t * Update text\n\t * @private\n\t * @param {Number} Fade-out transition duration\n\t */\n\tupdateText(durationForExit) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst dataFn = $$.labelishData.bind($$);\n\t\tconst classText = $$.classText.bind($$);\n\n\t\t$$.mainText = $$.main.selectAll(`.${CLASS.texts}`).selectAll(`.${CLASS.text}`)\n\t\t\t.data(d => (this.isRadarType(d) ? d.values : dataFn(d)));\n\n\t\t$$.mainText.exit()\n\t\t\t.transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"fill-opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.mainText = $$.mainText.enter()\n\t\t\t.append(\"text\")\n\t\t\t.merge($$.mainText)\n\t\t\t.attr(\"class\", classText)\n\t\t\t.attr(\"text-anchor\", d => (config.axis_rotated ? (d.value < 0 ? \"end\" : \"start\") : \"middle\"))\n\t\t\t.style(\"stroke\", \"none\")\n\t\t\t.style(\"fill\", d => $$.color(d))\n\t\t\t.style(\"fill-opacity\", \"0\")\n\t\t\t.text((d, i, j) => $$.dataLabelFormat(d.id)(d.value, d.id, i, j));\n\t},\n\n\t/**\n\t * Redraw chartText\n\t * @private\n\t * @param {Number} x Attribute\n\t * @param {Number} y Attribute\n\t * @param {Object} options.flow\n\t * @param {Boolean} indicates transition is enabled\n\t * @returns {Object} $$.mainText\n\t */\n\tredrawText(xForText, yForText, forFlow, withTransition) {\n\t\treturn [\n\t\t\t(withTransition ? this.mainText.transition() : this.mainText)\n\t\t\t\t.attr(\"x\", xForText)\n\t\t\t\t.attr(\"y\", yForText)\n\t\t\t\t.style(\"fill\", this.color)\n\t\t\t\t.style(\"fill-opacity\", forFlow ? 0 : this.opacityForText.bind(this))\n\t\t];\n\t},\n\n\t/**\n\t * Gets the getBoundingClientRect value of the element\n\t * @private\n\t * @param {HTMLElement|d3.selection} textVal\n\t * @param {String} className\n\t * @param {HTMLElement|d3.selection} elementVal\n\t * @returns {Object} value of element.getBoundingClientRect()\n\t */\n\tgetTextRect(textVal, className, elementVal) {\n\t\tconst text = (textVal.node ? textVal.node() : textVal).textContent;\n\t\tconst element = elementVal.node ? elementVal.node() : elementVal;\n\n\t\tconst dummy = d3Select(\"body\").append(\"div\")\n\t\t\t.classed(\"bb\", true);\n\n\t\tconst svg = dummy.append(\"svg\")\n\t\t\t.style(\"visibility\", \"hidden\")\n\t\t\t.style(\"position\", \"fixed\")\n\t\t\t.style(\"top\", \"0px\")\n\t\t\t.style(\"left\", \"0px\");\n\n\t\tconst font = d3Select(element).style(\"font\");\n\t\tlet rect;\n\n\t\tsvg.selectAll(\".dummy\")\n\t\t\t.data([text])\n\t\t\t.enter()\n\t\t\t.append(\"text\")\n\t\t\t.classed(className, !!className)\n\t\t\t.style(\"font\", font)\n\t\t\t.text(text)\n\t\t\t.each(function() {\n\t\t\t\trect = this.getBoundingClientRect();\n\t\t\t});\n\n\t\tdummy.remove();\n\n\t\treturn rect;\n\t},\n\n\t/**\n\t * Gets the x or y coordinate of the text\n\t * @private\n\t * @param {Object} area Indices\n\t * @param {Object} bar Indices\n\t * @param {Object} line Indices\n\t * @param {Boolean} whether or not to x\n\t * @returns {Number} coordinates\n\t */\n\tgenerateXYForText(areaIndices, barIndices, lineIndices, forX) {\n\t\tconst $$ = this;\n\t\tconst getAreaPoints = $$.generateGetAreaPoints(areaIndices, false);\n\t\tconst getBarPoints = $$.generateGetBarPoints(barIndices, false);\n\t\tconst getLinePoints = $$.generateGetLinePoints(lineIndices, false);\n\t\tconst getRadarPoints = $$.generateGetRadarPoints();\n\t\tconst getter = forX ? $$.getXForText : $$.getYForText;\n\n\t\treturn function(d, i) {\n\t\t\tconst getPoints = ($$.isAreaType(d) && getAreaPoints) ||\n\t\t\t\t($$.isBarType(d) && getBarPoints) ||\n\t\t\t\t($$.isRadarType(d) && getRadarPoints) ||\n\t\t\t\tgetLinePoints;\n\n\t\t\treturn getter.call($$, getPoints(d, i), d, this);\n\t\t};\n\t},\n\n\t/**\n\t * Gets the x coordinate of the text\n\t * @private\n\t * @param {Object} points\n\t * @param {Object} data\n\t * @param {HTMLElement} element\n\t * @returns {Number} x coordinate\n\t */\n\tgetXForText(points, d, textElement) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet xPos;\n\t\tlet padding;\n\n\t\tif (config.axis_rotated) {\n\t\t\tpadding = $$.isBarType(d) ? 4 : 6;\n\t\t\txPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);\n\t\t} else {\n\t\t\txPos = $$.hasType(\"bar\") ? (points[2][0] + points[0][0]) / 2 : points[0][0];\n\t\t}\n\t\t// show labels regardless of the domain if value is null\n\t\tif (d.value === null) {\n\t\t\tif (xPos > $$.width) {\n\t\t\t\txPos = $$.width - textElement.getBoundingClientRect().width;\n\t\t\t} else if (xPos < 0) {\n\t\t\t\txPos = 4;\n\t\t\t}\n\t\t}\n\n\t\treturn xPos + (config.data_labels_position.x || 0);\n\t},\n\n\t/**\n\t * Gets the y coordinate of the text\n\t * @private\n\t * @param {Object} points\n\t * @param {Object} data\n\t * @param {HTMLElement} element\n\t * @returns {Number} y coordinate\n\t */\n\tgetYForText(points, d, textElement) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst r = config.point_r;\n\t\tlet baseY = 3;\n\t\tlet yPos;\n\n\t\tif (config.axis_rotated) {\n\t\t\tyPos = (points[0][0] + points[2][0] + textElement.getBoundingClientRect().height * 0.6) / 2;\n\t\t} else {\n\t\t\tyPos = points[2][1];\n\n\t\t\tif (isNumber(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d))) {\n\t\t\t\tbaseY += config.point_r / 2.3;\n\t\t\t}\n\n\t\t\tif (d.value < 0 || (d.value === 0 && !$$.hasPositiveValue)) {\n\t\t\t\tyPos += textElement.getBoundingClientRect().height;\n\n\t\t\t\tif ($$.isBarType(d) && $$.isSafari()) {\n\t\t\t\t\tyPos -= baseY;\n\t\t\t\t} else if (!$$.isBarType(d) && $$.isChrome()) {\n\t\t\t\t\tyPos += baseY;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet diff = -baseY * 2;\n\n\t\t\t\tif ($$.isBarType(d)) {\n\t\t\t\t\tdiff = -baseY;\n\t\t\t\t} else if ($$.isBubbleType(d)) {\n\t\t\t\t\tdiff = baseY;\n\t\t\t\t}\n\n\t\t\t\tyPos += diff;\n\t\t\t}\n\t\t}\n\n\t\t// show labels regardless of the domain if value is null\n\t\tif (d.value === null && !config.axis_rotated) {\n\t\t\tconst boxHeight = textElement.getBoundingClientRect().height;\n\n\t\t\tif (yPos < boxHeight) {\n\t\t\t\tyPos = boxHeight;\n\t\t\t} else if (yPos > this.height) {\n\t\t\t\tyPos = this.height - 4;\n\t\t\t}\n\t\t}\n\n\t\treturn yPos + (config.data_labels_position.y || 0);\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {isString, isArray, extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tsetTargetType(targetIds, type) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.mapToTargetIds(targetIds).forEach(id => {\n\t\t\t$$.withoutFadeIn[id] = (type === config.data_types[id]);\n\t\t\tconfig.data_types[id] = type;\n\t\t});\n\n\t\tif (!targetIds) {\n\t\t\tconfig.data_type = type;\n\t\t}\n\t},\n\n\thasType(type, targetsValue) {\n\t\tconst $$ = this;\n\t\tconst types = $$.config.data_types;\n\t\tconst targets = targetsValue || $$.data.targets;\n\t\tlet has = false;\n\n\t\tif (targets && targets.length) {\n\t\t\ttargets.forEach(target => {\n\t\t\t\tconst t = types[target.id];\n\n\t\t\t\tif ((t && t.indexOf(type) >= 0) || (!t && type === \"line\")) {\n\t\t\t\t\thas = true;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (Object.keys(types).length) {\n\t\t\tObject.keys(types).forEach(id => {\n\t\t\t\tif (types[id] === type) {\n\t\t\t\t\thas = true;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\thas = $$.config.data_type === type;\n\t\t}\n\n\t\treturn has;\n\t},\n\n\t/**\n\t * Check if contains arc types chart\n\t * @param {Object} targets\n\t * @param {Array} exclude Excluded types\n\t * @return {boolean}\n\t * @private\n\t */\n\thasArcType(targets, exclude = []) {\n\t\tconst types = [\"pie\", \"donut\", \"gauge\", \"radar\"]\n\t\t\t.filter(v => exclude.indexOf(v) === -1);\n\n\t\treturn !types.every(v => !this.hasType(v, targets));\n\t},\n\n\tisLineType(d) {\n\t\tconst id = isString(d) ? d : d.id;\n\n\t\treturn !this.config.data_types[id] ||\n\t\t\tthis.isTypeOf(id, [\"line\", \"spline\", \"area\", \"area-spline\", \"area-spline-range\", \"area-line-range\", \"step\", \"area-step\"]);\n\t},\n\n\tisTypeOf(d, type) {\n\t\tconst id = isString(d) ? d : d.id;\n\t\tconst dataType = this.config.data_types[id];\n\n\t\treturn isArray(type) ?\n\t\t\ttype.indexOf(dataType) >= 0 : dataType === type;\n\t},\n\n\tisStepType(d) {\n\t\treturn this.isTypeOf(d, [\"step\", \"area-step\"]);\n\t},\n\n\tisSplineType(d) {\n\t\treturn this.isTypeOf(d, [\"spline\", \"area-spline\", \"area-spline-range\"]);\n\t},\n\n\tisAreaType(d) {\n\t\treturn this.isTypeOf(d, [\"area\", \"area-spline\", \"area-spline-range\", \"area-line-range\", \"area-step\"]);\n\t},\n\n\tisAreaRangeType(d) {\n\t\treturn this.isTypeOf(d, [\"area-spline-range\", \"area-line-range\"]);\n\t},\n\n\tisBarType(d) {\n\t\treturn this.isTypeOf(d, \"bar\");\n\t},\n\n\tisBubbleType(d) {\n\t\treturn this.isTypeOf(d, \"bubble\");\n\t},\n\n\tisScatterType(d) {\n\t\treturn this.isTypeOf(d, \"scatter\");\n\t},\n\n\tisPieType(d) {\n\t\treturn this.isTypeOf(d, \"pie\");\n\t},\n\n\tisGaugeType(d) {\n\t\treturn this.isTypeOf(d, \"gauge\");\n\t},\n\n\tisDonutType(d) {\n\t\treturn this.isTypeOf(d, \"donut\");\n\t},\n\n\tisRadarType(d) {\n\t\treturn this.isTypeOf(d, \"radar\");\n\t},\n\n\tisArcType(d) {\n\t\treturn this.isPieType(d) ||\n\t\t\tthis.isDonutType(d) ||\n\t\t\tthis.isGaugeType(d) ||\n\t\t\tthis.isRadarType(d);\n\t},\n\n\t// determine if is 'circle' data point\n\tisCirclePoint() {\n\t\tconst config = this.config;\n\t\tconst pattern = config.point_pattern;\n\n\t\treturn config.point_type === \"circle\" &&\n\t\t\t(!pattern || (isArray(pattern) && pattern.length === 0));\n\t},\n\n\tlineData(d) {\n\t\treturn this.isLineType(d) ? [d] : [];\n\t},\n\n\tarcData(d) {\n\t\treturn this.isArcType(d.data) ? [d] : [];\n\t},\n\n\tbarData(d) {\n\t\treturn this.isBarType(d) ? d.values : [];\n\t},\n\n\t/**\n\t * Get data adapt for data label showing\n\t * @param {Object} d Data object\n\t * @return {Array}\n\t * @private\n\t */\n\tlabelishData(d) {\n\t\treturn this.isBarType(d) ||\n\t\t\tthis.isLineType(d) ||\n\t\t\tthis.isScatterType(d) ||\n\t\t\tthis.isBubbleType(d) ||\n\t\t\tthis.isRadarType(d) ? d.values : [];\n\t},\n\n\tbarLineBubbleData(d) {\n\t\treturn this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ?\n\t\t\td.values : [];\n\t},\n\n\t// https://github.com/d3/d3-shape#curves\n\tisInterpolationType(type) {\n\t\treturn [\n\t\t\t\"basis\",\n\t\t\t\"basis-closed\",\n\t\t\t\"basis-open\",\n\t\t\t\"bundle\",\n\t\t\t\"cardinal\",\n\t\t\t\"cardinal-closed\",\n\t\t\t\"cardinal-open\",\n\t\t\t\"catmull-rom\",\n\t\t\t\"catmull-rom-closed\",\n\t\t\t\"catmull-rom-open\",\n\t\t\t\"linear\",\n\t\t\t\"linear-closed\",\n\t\t\t\"monotone-x\",\n\t\t\t\"monotone-y\",\n\t\t\t\"natural\"\n\t\t].indexOf(type) >= 0;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tselectAll as d3SelectAll\n} from \"d3-selection\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, isArray, isValue} from \"./util\";\n\n// Grid position and text anchor helpers\nconst getGridTextAnchor = d => isValue(d.position) || \"end\";\nconst getGridTextDx = d => (d.position === \"start\" ? 4 : (d.position === \"middle\" ? 0 : -4));\nconst getGridTextX = (isX, width, height) => d => {\n\tlet x = isX ? 0 : width;\n\n\tif (d.position === \"start\") {\n\t\tx = isX ? -height : 0;\n\t} else if (d.position === \"middle\") {\n\t\tx = (isX ? -height : width) / 2;\n\t}\n\n\treturn x;\n};\n\nextend(ChartInternal.prototype, {\n\tinitGrid() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.xgrid = d3SelectAll([]);\n\n\t\t!config.grid_lines_front && $$.initGridLines();\n\t\t!config.grid_front && $$.initXYFocusGrid();\n\t},\n\n\tinitGridLines() {\n\t\tconst $$ = this;\n\n\t\t$$.gridLines = $$.main.append(\"g\")\n\t\t\t.attr(\"clip-path\", $$.clipPathForGrid)\n\t\t\t.attr(\"class\", `${CLASS.grid} ${CLASS.gridLines}`);\n\n\t\t$$.gridLines.append(\"g\").attr(\"class\", CLASS.xgridLines);\n\t\t$$.gridLines.append(\"g\").attr(\"class\", CLASS.ygridLines);\n\n\t\t$$.xgridLines = d3SelectAll([]);\n\t},\n\n\tupdateXGrid(withoutUpdate) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst xgridData = $$.generateGridData(config.grid_x_type, $$.x);\n\t\tconst tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;\n\n\t\t$$.xgridAttr = isRotated ? {\n\t\t\t\"x1\": 0,\n\t\t\t\"x2\": $$.width,\n\t\t\t\"y1\": d => $$.x(d) - tickOffset,\n\t\t\t\"y2\": d => $$.x(d) - tickOffset,\n\t\t} : {\n\t\t\t\"x1\": d => $$.x(d) + tickOffset,\n\t\t\t\"x2\": d => $$.x(d) + tickOffset,\n\t\t\t\"y1\": 0,\n\t\t\t\"y2\": $$.height,\n\t\t};\n\n\t\t$$.xgrid = $$.main.select(`.${CLASS.xgrids}`)\n\t\t\t.selectAll(`.${CLASS.xgrid}`)\n\t\t\t.data(xgridData);\n\n\t\t$$.xgrid.exit().remove();\n\n\t\t$$.xgrid = $$.xgrid.enter()\n\t\t\t.append(\"line\")\n\t\t\t.attr(\"class\", CLASS.xgrid)\n\t\t\t.merge($$.xgrid);\n\n\t\tif (!withoutUpdate) {\n\t\t\t$$.xgrid.each(function() {\n\t\t\t\tconst grid = d3Select(this);\n\n\t\t\t\tObject.keys($$.xgridAttr).forEach(id => {\n\t\t\t\t\tgrid.attr(id, $$.xgridAttr[id])\n\t\t\t\t\t\t.style(\"opacity\", () => (\n\t\t\t\t\t\t\tgrid.attr(isRotated ? \"y1\" : \"x1\") === (isRotated ? $$.height : 0) ?\n\t\t\t\t\t\t\t\t\"0\" : \"1\"\n\t\t\t\t\t\t));\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t},\n\n\tupdateYGrid() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks);\n\n\t\t$$.ygrid = $$.main.select(`.${CLASS.ygrids}`)\n\t\t\t.selectAll(`.${CLASS.ygrid}`)\n\t\t\t.data(gridValues);\n\n\t\t$$.ygrid.exit().remove();\n\n\t\t$$.ygrid = $$.ygrid\n\t\t\t.enter()\n\t\t\t.append(\"line\")\n\t\t\t.attr(\"class\", CLASS.ygrid)\n\t\t\t.merge($$.ygrid);\n\n\t\t$$.ygrid.attr(\"x1\", isRotated ? $$.y : 0)\n\t\t\t.attr(\"x2\", isRotated ? $$.y : $$.width)\n\t\t\t.attr(\"y1\", isRotated ? 0 : $$.y)\n\t\t\t.attr(\"y2\", isRotated ? $$.height : $$.y);\n\n\t\t$$.smoothLines($$.ygrid, \"grid\");\n\t},\n\n\tupdateGrid(duration) {\n\t\tconst $$ = this;\n\n\t\t// hide if arc type\n\t\t$$.grid.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\");\n\n\t\t$$.main.select(`line.${CLASS.xgridFocus}`)\n\t\t\t.style(\"visibility\", \"hidden\");\n\n\t\t$$.updateXGridLines(duration);\n\t\t$$.updateYGridLines(duration);\n\t},\n\n\t/**\n\t * Update X Grid lines\n\t * @param {Number} duration\n\t * @private\n\t */\n\tupdateXGridLines(duration) {\n\t\tconst $$ = this;\n\t\tconst main = $$.main;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\n\t\tconfig.grid_x_show && $$.updateXGrid();\n\n\t\t$$.xgridLines = main.select(`.${CLASS.xgridLines}`)\n\t\t\t.selectAll(`.${CLASS.xgridLine}`)\n\t\t\t.data(config.grid_x_lines);\n\n\t\t// exit\n\t\t$$.xgridLines.exit().transition()\n\t\t\t.duration(duration)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t// enter\n\t\tconst xgridLine = $$.xgridLines.enter().append(\"g\");\n\n\t\txgridLine.append(\"line\")\n\t\t\t.style(\"opacity\", \"0\");\n\n\t\txgridLine.append(\"text\")\n\t\t\t.attr(\"transform\", isRotated ? \"\" : \"rotate(-90)\")\n\t\t\t.attr(\"dy\", -5)\n\t\t\t.style(\"opacity\", \"0\");\n\n\t\t$$.xgridLines = xgridLine.merge($$.xgridLines);\n\n\t\t$$.xgridLines\n\t\t\t.attr(\"class\", d => `${CLASS.xgridLine} ${d.class || \"\"}`.trim())\n\t\t\t.select(\"text\")\n\t\t\t.attr(\"text-anchor\", getGridTextAnchor)\n\t\t\t.attr(\"dx\", getGridTextDx)\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.text(d => d.text)\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", \"1\");\n\t},\n\n\t/**\n\t * Update Y Grid lines\n\t * @param {Number} duration\n\t * @private\n\t */\n\tupdateYGridLines(duration) {\n\t\tconst $$ = this;\n\t\tconst main = $$.main;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\n\t\tconfig.grid_y_show && $$.updateYGrid();\n\n\t\t$$.ygridLines = main.select(`.${CLASS.ygridLines}`)\n\t\t\t.selectAll(`.${CLASS.ygridLine}`)\n\t\t\t.data(config.grid_y_lines);\n\n\t\t// exit\n\t\t$$.ygridLines.exit()\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t// enter\n\t\tconst ygridLine = $$.ygridLines.enter().append(\"g\");\n\n\t\tygridLine.append(\"line\")\n\t\t\t.style(\"opacity\", \"0\");\n\n\t\tygridLine.append(\"text\")\n\t\t\t.attr(\"transform\", isRotated ? \"rotate(-90)\" : \"\")\n\t\t\t.style(\"opacity\", \"0\");\n\n\t\t$$.ygridLines = ygridLine.merge($$.ygridLines);\n\n\t\t// update\n\t\tconst yv = $$.yv.bind($$);\n\n\t\t$$.ygridLines\n\t\t\t.attr(\"class\", d => `${CLASS.ygridLine} ${d.class || \"\"}`.trim())\n\t\t\t.select(\"line\")\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.attr(\"x1\", isRotated ? yv : 0)\n\t\t\t.attr(\"x2\", isRotated ? yv : $$.width)\n\t\t\t.attr(\"y1\", isRotated ? 0 : yv)\n\t\t\t.attr(\"y2\", isRotated ? $$.height : yv)\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", \"1\");\n\n\t\t$$.ygridLines.select(\"text\")\n\t\t\t.attr(\"text-anchor\", getGridTextAnchor)\n\t\t\t.attr(\"dx\", getGridTextDx)\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.attr(\"dy\", -5)\n\t\t\t.attr(\"x\", getGridTextX(isRotated, $$.width, $$.height))\n\t\t\t.attr(\"y\", yv)\n\t\t\t.text(d => d.text)\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", \"1\");\n\t},\n\n\tredrawGrid(withTransition) {\n\t\tconst $$ = this;\n\t\tconst isRotated = $$.config.axis_rotated;\n\t\tconst xv = $$.xv.bind($$);\n\n\t\tlet lines = $$.xgridLines.select(\"line\");\n\t\tlet texts = $$.xgridLines.select(\"text\");\n\n\t\tlines = (withTransition ? lines.transition() : lines)\n\t\t\t.attr(\"x1\", isRotated ? 0 : xv)\n\t\t\t.attr(\"x2\", isRotated ? $$.width : xv)\n\t\t\t.attr(\"y1\", isRotated ? xv : 0)\n\t\t\t.attr(\"y2\", isRotated ? xv : $$.height);\n\n\t\ttexts = (withTransition ? texts.transition() : texts)\n\t\t\t.attr(\"x\", getGridTextX(!isRotated, $$.width, $$.height))\n\t\t\t.attr(\"y\", xv)\n\t\t\t.text(d => d.text);\n\n\t\treturn [\n\t\t\t(withTransition ? lines.transition() : lines).style(\"opacity\", \"1\"),\n\t\t\t(withTransition ? texts.transition() : texts).style(\"opacity\", \"1\")\n\t\t];\n\t},\n\n\tinitXYFocusGrid() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.grid = $$.main.append(\"g\")\n\t\t\t.attr(\"clip-path\", $$.clipPathForGrid)\n\t\t\t.attr(\"class\", CLASS.grid);\n\n\t\tconfig.grid_x_show &&\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.xgrids);\n\n\t\tconfig.grid_y_show &&\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.ygrids);\n\n\t\tif (config.grid_focus_show) {\n\t\t\t$$.grid.append(\"g\")\n\t\t\t\t.attr(\"class\", CLASS.xgridFocus)\n\t\t\t\t.append(\"line\")\n\t\t\t\t.attr(\"class\", CLASS.xgridFocus);\n\t\t}\n\t},\n\n\tshowXGridFocus(selectedData) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst dataToShow = selectedData.filter(d => d && isValue($$.getBaseValue(d)));\n\t\tconst focusEl = $$.main.selectAll(`line.${CLASS.xgridFocus}`);\n\t\tconst xx = $$.xx.bind($$);\n\n\t\tif (!config.tooltip_show) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Hide when bubble/scatter plot exists\n\t\tif ($$.hasType(\"bubble\") || $$.hasType(\"scatter\") || $$.hasArcType()) {\n\t\t\treturn;\n\t\t}\n\n\t\tfocusEl\n\t\t\t.style(\"visibility\", \"visible\")\n\t\t\t.data([dataToShow[0]])\n\t\t\t.attr(isRotated ? \"y1\" : \"x1\", xx)\n\t\t\t.attr(isRotated ? \"y2\" : \"x2\", xx);\n\n\t\t$$.smoothLines(focusEl, \"grid\");\n\t},\n\n\thideXGridFocus() {\n\t\tthis.main.select(`line.${CLASS.xgridFocus}`).style(\"visibility\", \"hidden\");\n\t},\n\n\tupdateXgridFocus() {\n\t\tconst $$ = this;\n\t\tconst isRotated = $$.config.axis_rotated;\n\n\t\t$$.main.select(`line.${CLASS.xgridFocus}`)\n\t\t\t.attr(\"x1\", isRotated ? 0 : -10)\n\t\t\t.attr(\"x2\", isRotated ? $$.width : -10)\n\t\t\t.attr(\"y1\", isRotated ? -10 : 0)\n\t\t\t.attr(\"y2\", isRotated ? -10 : $$.height);\n\t},\n\n\tgenerateGridData(type, scale) {\n\t\tconst $$ = this;\n\t\tconst tickNum = $$.main.select(`.${CLASS.axisX}`)\n\t\t\t.selectAll(\".tick\")\n\t\t\t.size();\n\t\tlet gridData = [];\n\n\t\tif (type === \"year\") {\n\t\t\tconst xDomain = $$.getXDomain();\n\t\t\tconst firstYear = xDomain[0].getFullYear();\n\t\t\tconst lastYear = xDomain[1].getFullYear();\n\n\t\t\tfor (let i = firstYear; i <= lastYear; i++) {\n\t\t\t\tgridData.push(new Date(`${i}-01-01 00:00:00`));\n\t\t\t}\n\t\t} else {\n\t\t\tgridData = scale.ticks(10);\n\n\t\t\tif (gridData.length > tickNum) { // use only int\n\t\t\t\tgridData = gridData.filter(d => String(d).indexOf(\".\") < 0);\n\t\t\t}\n\t\t}\n\n\t\treturn gridData;\n\t},\n\n\tgetGridFilterToRemove(params) {\n\t\treturn params ? line => {\n\t\t\tlet found = false;\n\n\t\t\t(isArray(params) ? params.concat() : [params]).forEach(param => {\n\t\t\t\tif (((\"value\" in param && line.value === param.value) || (\"class\" in param && line.class === param.class))) {\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn found;\n\t\t} : () => true;\n\t},\n\n\tremoveGridLines(params, forX) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst toRemove = $$.getGridFilterToRemove(params);\n\t\tconst toShow = line => !toRemove(line);\n\t\tconst classLines = forX ? CLASS.xgridLines : CLASS.ygridLines;\n\t\tconst classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;\n\n\t\t$$.main.select(`.${classLines}`)\n\t\t\t.selectAll(`.${classLine}`)\n\t\t\t.filter(toRemove)\n\t\t\t.transition()\n\t\t\t.duration(config.transition_duration)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\tconst gridLines = `grid_${forX ? \"x\" : \"y\"}_lines`;\n\n\t\tconfig[gridLines] = config[gridLines].filter(toShow);\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {mouse as d3Mouse} from \"d3-selection\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, isFunction, isString, isValue, callFn, sanitise} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initializes the tooltip\n\t * @private\n\t */\n\tinitTooltip() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.tooltip = $$.selectChart\n\t\t\t.style(\"position\", \"relative\")\n\t\t\t.append(\"div\")\n\t\t\t.attr(\"class\", CLASS.tooltipContainer)\n\t\t\t.style(\"position\", \"absolute\")\n\t\t\t.style(\"pointer-events\", \"none\")\n\t\t\t.style(\"display\", \"none\");\n\n\t\t// Show tooltip if needed\n\t\tif (config.tooltip_init_show) {\n\t\t\tif ($$.isTimeSeries() && isString(config.tooltip_init_x)) {\n\t\t\t\tconst targets = $$.data.targets[0];\n\t\t\t\tlet i;\n\t\t\t\tlet val;\n\n\t\t\t\tconfig.tooltip_init_x = $$.parseDate(config.tooltip_init_x);\n\n\t\t\t\tfor (i = 0; (val = targets.values[i]); i++) {\n\t\t\t\t\tif ((val.x - config.tooltip_init_x) === 0) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tconfig.tooltip_init_x = i;\n\t\t\t}\n\n\t\t\t$$.tooltip.html(config.tooltip_contents.call($$,\n\t\t\t\t$$.data.targets.map(d => $$.addName(d.values[config.tooltip_init_x])),\n\t\t\t\t$$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType(null, [\"radar\"])), $$.color));\n\n\t\t\t$$.tooltip.style(\"top\", config.tooltip_init_position.top)\n\t\t\t\t.style(\"left\", config.tooltip_init_position.left)\n\t\t\t\t.style(\"display\", \"block\");\n\t\t}\n\t},\n\n\t/**\n\t * Returns the tooltip content(HTML string)\n\t * @param {Object} d data\n\t * @param {Function} defaultTitleFormat Default title format\n\t * @param {Function} defaultValueFormat Default format for each data value in the tooltip.\n\t * @param {Function} color Color function\n\t * @returns {String} html\n\t * @private\n\t */\n\tgetTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst titleFormat = config.tooltip_format_title || defaultTitleFormat;\n\t\tconst nameFormat = config.tooltip_format_name || (name => name);\n\t\tconst valueFormat = config.tooltip_format_value || defaultValueFormat;\n\t\tconst order = config.tooltip_order;\n\n\t\tconst getRowValue = row => $$.getBaseValue(row);\n\t\tconst getBgColor = $$.levelColor ? row => $$.levelColor(row.value) : row => color(row.id);\n\n\t\tif (order === null && config.data_groups.length) {\n\t\t\t// for stacked data, order should aligned with the visually displayed data\n\t\t\tconst ids = $$.orderTargets($$.data.targets)\n\t\t\t\t.map(i2 => i2.id)\n\t\t\t\t.reverse();\n\n\t\t\td.sort((a, b) => {\n\t\t\t\tlet v1 = a ? a.value : null;\n\t\t\t\tlet v2 = b ? b.value : null;\n\n\t\t\t\tif (v1 > 0 && v2 > 0) {\n\t\t\t\t\tv1 = a.id ? ids.indexOf(a.id) : null;\n\t\t\t\t\tv2 = b.id ? ids.indexOf(b.id) : null;\n\t\t\t\t}\n\n\t\t\t\treturn v1 - v2;\n\t\t\t});\n\t\t} else if (/^(asc|desc)$/.test(order)) {\n\t\t\tconst isAscending = order === \"asc\";\n\n\t\t\td.sort((a, b) => {\n\t\t\t\tconst v1 = a ? getRowValue(a) : null;\n\t\t\t\tconst v2 = b ? getRowValue(b) : null;\n\n\t\t\t\treturn isAscending ? v1 - v2 : v2 - v1;\n\t\t\t});\n\t\t} else if (isFunction(order)) {\n\t\t\td.sort(order);\n\t\t}\n\n\t\tlet text;\n\t\tlet row;\n\t\tlet param;\n\t\tlet value;\n\n\t\tfor (let i = 0, len = d.length; i < len; i++) {\n\t\t\tif (!((row = d[i]) && (getRowValue(row) || getRowValue(row) === 0))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!text) {\n\t\t\t\tconst title = sanitise(titleFormat ? titleFormat(row.x) : row.x);\n\n\t\t\t\ttext = `<table class=\"${$$.CLASS.tooltip}\">${\n\t\t\t\t\tisValue(title) ? `<tr><th colspan=\"2\">${title}</th></tr>` : \"\"\n\t\t\t\t}`;\n\t\t\t}\n\n\t\t\tparam = [row.ratio, row.id, row.index, d];\n\n\t\t\tif ($$.isAreaRangeType(row)) {\n\t\t\t\tvalue = [\"high\", \"low\"].map(v => sanitise(\n\t\t\t\t\tvalueFormat($$.getAreaRangeData(row, v), ...param)\n\t\t\t\t));\n\n\t\t\t\tvalue = `<b>Mid:</b> ${value} <b>High:</b> ${value[0]} <b>Low:</b> ${value[1]}`;\n\t\t\t} else {\n\t\t\t\tvalue = sanitise(valueFormat(getRowValue(row), ...param));\n\t\t\t}\n\n\t\t\tif (value !== undefined) {\n\t\t\t\t// Skip elements when their name is set to null\n\t\t\t\tif (row.name === null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst name = sanitise(nameFormat(row.name, ...param));\n\t\t\t\tconst bgcolor = getBgColor(row);\n\n\t\t\t\ttext += `<tr class=\"${$$.CLASS.tooltipName}${$$.getTargetSelectorSuffix(row.id)}\"><td class=\"name\">`;\n\n\t\t\t\ttext += $$.patterns ?\n\t\t\t\t\t`<svg><rect style=\"fill:${bgcolor}\" width=\"10\" height=\"10\"></rect></svg>` :\n\t\t\t\t\t`<span style=\"background-color:${bgcolor}\"></span>`;\n\n\t\t\t\ttext += `${name}</td><td class=\"value\">${value}</td></tr>`;\n\t\t\t}\n\t\t}\n\n\t\treturn `${text}</table>`;\n\t},\n\n\t/**\n\t * Returns the position of the tooltip\n\t * @param {Object} dataToShow data\n\t * @param {String} tWidth Width value of tooltip element\n\t * @param {String} tHeight Height value of tooltip element\n\t * @param {HTMLElement} element\n\t * @returns {Object} top, left value\n\t * @private\n\t */\n\ttooltipPosition(dataToShow, tWidth, tHeight, element) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet [left, top] = d3Mouse(element);\n\n\t\tconst svgLeft = $$.getSvgLeft(true);\n\t\tlet chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();\n\n\t\ttop += 20;\n\n\t\t// Determine tooltip position\n\t\tif ($$.hasArcType()) {\n\t\t\tconst raw = $$.inputType === \"touch\" || $$.hasType(\"radar\");\n\n\t\t\tif (!raw) {\n\t\t\t\ttop += $$.height / 2;\n\t\t\t\tleft += ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2;\n\t\t\t}\n\t\t} else {\n\t\t\tconst dataScale = $$.x(dataToShow[0].x);\n\n\t\t\tif (config.axis_rotated) {\n\t\t\t\ttop = dataScale + 20;\n\t\t\t\tleft += svgLeft + 100;\n\t\t\t\tchartRight -= svgLeft;\n\t\t\t} else {\n\t\t\t\ttop -= 5;\n\t\t\t\tleft = svgLeft + $$.getCurrentPaddingLeft(true) + 20 + ($$.zoomScale ? left : dataScale);\n\t\t\t}\n\t\t}\n\n\t\tconst right = left + tWidth;\n\n\t\tif (right > chartRight) {\n\t\t\t// 20 is needed for Firefox to keep tooltip width\n\t\t\tleft -= right - chartRight + 20;\n\t\t}\n\n\t\tif (top + tHeight > $$.currentHeight) {\n\t\t\ttop -= tHeight + 30;\n\t\t}\n\n\t\tif (top < 0) {\n\t\t\ttop = 0;\n\t\t}\n\n\t\treturn {top, left};\n\t},\n\n\t/**\n\t * Show the tooltip\n\t * @private\n\t * @param {Object} selectedData\n\t * @param {HTMLElement} element\n\t */\n\tshowTooltip(selectedData, element) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst forArc = $$.hasArcType(null, [\"radar\"]);\n\t\tconst dataToShow = selectedData.filter(d => d && isValue($$.getBaseValue(d)));\n\t\tconst positionFunction = config.tooltip_position || $$.tooltipPosition;\n\n\t\tif (dataToShow.length === 0 || !config.tooltip_show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst datum = $$.tooltip.datum();\n\t\tlet width = (datum && datum.width) || 0;\n\t\tlet height = (datum && datum.height) || 0;\n\n\t\tif (!datum || datum.current !== JSON.stringify(selectedData)) {\n\t\t\tconst html = config.tooltip_contents.call(\n\t\t\t\t$$,\n\t\t\t\tselectedData,\n\t\t\t\t$$.axis.getXAxisTickFormat(),\n\t\t\t\t$$.getYFormat(forArc),\n\t\t\t\t$$.color\n\t\t\t);\n\n\t\t\tcallFn(config.tooltip_onshow, $$);\n\n\t\t\t// set tooltip content\n\t\t\t$$.tooltip.html(html)\n\t\t\t\t.style(\"display\", \"block\")\n\t\t\t\t.datum({\n\t\t\t\t\tcurrent: JSON.stringify(selectedData),\n\t\t\t\t\twidth: width = $$.tooltip.property(\"offsetWidth\"),\n\t\t\t\t\theight: height = $$.tooltip.property(\"offsetHeight\")\n\t\t\t\t});\n\n\t\t\tcallFn(config.tooltip_onshown, $$);\n\t\t\t$$._handleLinkedCharts(true, selectedData[0].index);\n\t\t}\n\n\t\t// Get tooltip dimensions\n\t\tconst position = positionFunction.call(this, dataToShow, width, height, element);\n\n\t\t// Set tooltip position\n\t\t$$.tooltip\n\t\t\t.style(\"top\", `${position.top}px`)\n\t\t\t.style(\"left\", `${position.left}px`);\n\t},\n\n\t/**\n\t * Hide the tooltip\n\t * @private\n\t */\n\thideTooltip() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tcallFn(config.tooltip_onhide, $$);\n\n\t\t// hide tooltip\n\t\tthis.tooltip.style(\"display\", \"none\").datum(null);\n\n\t\tcallFn(config.tooltip_onhidden, $$);\n\t\t$$._handleLinkedCharts(false);\n\t},\n\n\t/**\n\t * Toggle display for linked chart instances\n\t * @param {Boolean} show true: show, false: hide\n\t * @param {Number} index x Axis index\n\t * @private\n\t */\n\t_handleLinkedCharts(show, index) {\n\t\tconst $$ = this;\n\n\t\tif ($$.config.tooltip_linked) {\n\t\t\tconst linkedName = $$.config.tooltip_linked_name;\n\n\t\t\t$$.api.internal.charts.forEach(c => {\n\t\t\t\tif (c !== $$.api) {\n\t\t\t\t\tconst internal = c.internal;\n\t\t\t\t\tconst isLinked = internal.config.tooltip_linked;\n\t\t\t\t\tconst name = internal.config.tooltip_linked_name;\n\t\t\t\t\tconst isInDom = document.body.contains(c.element);\n\n\t\t\t\t\tif (isLinked && linkedName === name && isInDom) {\n\t\t\t\t\t\tconst isShowing = internal.tooltip.style(\"display\") === \"block\";\n\n\t\t\t\t\t\t// prevent throwing error for non-paired linked indexes\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tisShowing ^ show && c.tooltip[isShowing ? \"hide\" : \"show\"]({index});\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tevent as d3Event,\n\tnamespaces as d3Namespaces\n} from \"d3-selection\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, callFn, isDefined, getOption, isEmpty, isFunction, notEmpty} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initialize the legend.\n\t * @private\n\t */\n\tinitLegend() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.legendItemTextBox = {};\n\t\t$$.legendHasRendered = false;\n\t\t$$.legend = $$.svg.append(\"g\");\n\n\t\tif (config.legend_show) {\n\t\t\tif (config.legend_contents_bindto && config.legend_contents_template) {\n\t\t\t\t$$.updateLegendTemplate();\n\t\t\t} else {\n\t\t\t\t$$.legend.attr(\"transform\", $$.getTranslate(\"legend\"));\n\n\t\t\t\t// MEMO: call here to update legend box and translate for all\n\t\t\t\t// MEMO: translate will be updated by this, so transform not needed in updateLegend()\n\t\t\t\t$$.updateLegendWithDefaults();\n\t\t\t}\n\t\t} else {\n\t\t\t$$.legend.style(\"visibility\", \"hidden\");\n\t\t\t$$.hiddenLegendIds = $$.mapToIds($$.data.targets);\n\t\t}\n\t},\n\n\t/**\n\t * Update legend using template option\n\t * @private\n\t */\n\tupdateLegendTemplate() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst wrapper = d3Select(config.legend_contents_bindto);\n\t\tconst template = config.legend_contents_template;\n\n\t\tif (!wrapper.empty()) {\n\t\t\tconst targets = $$.data.targets;\n\t\t\tconst ids = [];\n\t\t\tlet html = \"\";\n\n\t\t\t$$.mapToIds(targets).forEach(v => {\n\t\t\t\tconst content = isFunction(template) ?\n\t\t\t\t\ttemplate.call($$, v, $$.color(v), $$.api.data(v)[0].values) :\n\t\t\t\t\ttemplate\n\t\t\t\t\t\t.replace(/{=COLOR}/g, $$.color(v))\n\t\t\t\t\t\t.replace(/{=TITLE}/g, v);\n\n\t\t\t\tif (content) {\n\t\t\t\t\tids.push(v);\n\t\t\t\t\thtml += content;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconst legendItem = wrapper.html(html)\n\t\t\t\t.selectAll(function() { return this.childNodes; })\n\t\t\t\t.data(ids);\n\n\t\t\t$$.setLegendItem(legendItem);\n\t\t}\n\t},\n\n\t/**\n\t * Update the legend to its default value.\n\t * @private\n\t */\n\tupdateLegendWithDefaults() {\n\t\tconst $$ = this;\n\n\t\t$$.updateLegend($$.mapToIds($$.data.targets), {\n\t\t\twithTransform: false,\n\t\t\twithTransitionForTransform: false,\n\t\t\twithTransition: false\n\t\t});\n\t},\n\n\t/**\n\t * Update the size of the legend.\n\t * @private\n\t * @param {Number} height\n\t * @param {Number} width\n\t */\n\tupdateSizeForLegend(legendHeight, legendWidth) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst insetLegendPosition = {\n\t\t\ttop: $$.isLegendTop ?\n\t\t\t\t$$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 :\n\t\t\t\t$$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y,\n\t\t\tleft: $$.isLegendLeft ?\n\t\t\t\t$$.getCurrentPaddingLeft() + config.legend_inset_x + 0.5 :\n\t\t\t\t$$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + 0.5\n\t\t};\n\n\t\t$$.margin3 = {\n\t\t\ttop: $$.isLegendRight ?\n\t\t\t\t0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight,\n\t\t\tright: NaN,\n\t\t\tbottom: 0,\n\t\t\tleft: $$.isLegendRight ?\n\t\t\t\t$$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0\n\t\t};\n\t},\n\n\t/**\n\t * Transform Legend\n\t * @private\n\t * @param {Boolean} whether or not to transition.\n\t */\n\ttransformLegend(withTransition) {\n\t\tconst $$ = this;\n\n\t\t(withTransition ? $$.legend.transition() : $$.legend)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"legend\"));\n\t},\n\n\t/**\n\t * Update the legend step\n\t * @private\n\t * @param {Number} step\n\t */\n\tupdateLegendStep(step) {\n\t\tthis.legendStep = step;\n\t},\n\n\t/**\n\t * Update legend item width\n\t * @private\n\t * @param {Number} width\n\t */\n\tupdateLegendItemWidth(w) {\n\t\tthis.legendItemWidth = w;\n\t},\n\n\t/**\n\t * Update legend item height\n\t * @private\n\t * @param {Number} height\n\t */\n\tupdateLegendItemHeight(h) {\n\t\tthis.legendItemHeight = h;\n\t},\n\n\t/**\n\t * Get the width of the legend\n\t * @private\n\t * @param {Number} width\n\t */\n\tgetLegendWidth() {\n\t\tconst $$ = this;\n\n\t\treturn $$.config.legend_show ?\n\t\t\t$$.isLegendRight ||\n\t\t\t$$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;\n\t},\n\n\t/**\n\t * Get the height of the legend\n\t * @private\n\t * @param {Number} height\n\t */\n\tgetLegendHeight() {\n\t\tconst $$ = this;\n\t\tlet h = 0;\n\n\t\tif ($$.config.legend_show) {\n\t\t\tif ($$.isLegendRight) {\n\t\t\t\th = $$.currentHeight;\n\t\t\t} else {\n\t\t\t\th = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1);\n\t\t\t}\n\t\t}\n\t\treturn h;\n\t},\n\n\t/**\n\t * Get the opacity of the legend\n\t * @private\n\t * @param {Object} d3.Select\n\t * @returns {Number} opacity\n\t */\n\topacityForLegend(legendItem) {\n\t\treturn legendItem.classed(CLASS.legendItemHidden) ? null : \"1\";\n\t},\n\n\t/**\n\t * Get the opacity of the legend that is unfocused\n\t * @private\n\t * @param {Object} legendItem, d3.Select\n\t * @returns {Number} opacity\n\t */\n\topacityForUnfocusedLegend(legendItem) {\n\t\treturn legendItem.classed(CLASS.legendItemHidden) ? null : \"0.3\";\n\t},\n\n\t/**\n\t * Toggles the focus of the legend\n\t * @private\n\t * @param {Array} ID's of target\n\t * @param {Boolean} whether or not to focus.\n\t */\n\ttoggleFocusLegend(targetIds, focus) {\n\t\tconst $$ = this;\n\t\tconst targetIdz = $$.mapToTargetIds(targetIds);\n\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\n\t\t\t.filter(id => targetIdz.indexOf(id) >= 0)\n\t\t\t.classed(CLASS.legendItemFocused, focus)\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.style(\"opacity\", function() {\n\t\t\t\tconst opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend;\n\n\t\t\t\treturn opacity.call($$, d3Select(this));\n\t\t\t});\n\t},\n\n\t/**\n\t * Revert the legend to its default state\n\t * @private\n\t */\n\trevertLegend() {\n\t\tconst $$ = this;\n\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\n\t\t\t.classed(CLASS.legendItemFocused, false)\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.style(\"opacity\", function() {\n\t\t\t\treturn $$.opacityForLegend(d3Select(this));\n\t\t\t});\n\t},\n\n\t/**\n\t * Shows the legend\n\t * @private\n\t * @param {Array} ID's of target\n\t */\n\tshowLegend(targetIds) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif (!config.legend_show) {\n\t\t\tconfig.legend_show = true;\n\t\t\t$$.legend.style(\"visibility\", \"visible\");\n\n\t\t\tif (!$$.legendHasRendered) {\n\t\t\t\t$$.updateLegendWithDefaults();\n\t\t\t}\n\t\t}\n\t\t$$.removeHiddenLegendIds(targetIds);\n\n\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\n\t\t\t.style(\"visibility\", \"visible\")\n\t\t\t.transition()\n\t\t\t.style(\"opacity\", function() {\n\t\t\t\treturn $$.opacityForLegend(d3Select(this));\n\t\t\t});\n\t},\n\n\t/**\n\t * Hide the legend\n\t * @private\n\t * @param {Array} ID's of target\n\t */\n\thideLegend(targetIds) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif (config.legend_show && isEmpty(targetIds)) {\n\t\t\tconfig.legend_show = false;\n\t\t\t$$.legend.style(\"visibility\", \"hidden\");\n\t\t}\n\n\t\t$$.addHiddenLegendIds(targetIds);\n\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.style(\"visibility\", \"hidden\");\n\t},\n\n\t/**\n\t * Clear the LegendItemTextBox cache.\n\t * @private\n\t */\n\tclearLegendItemTextBoxCache() {\n\t\tthis.legendItemTextBox = {};\n\t},\n\n\t/**\n\t * Set legend item style & bind events\n\t * @private\n\t * @param {d3.selection} item\n\t */\n\tsetLegendItem(item) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isTouch = $$.inputType === \"touch\";\n\n\t\titem\n\t\t\t.attr(\"class\", function(id) {\n\t\t\t\tconst node = d3Select(this);\n\t\t\t\tconst itemClass = (!node.empty() && node.attr(\"class\")) || \"\";\n\n\t\t\t\treturn itemClass + $$.generateClass(CLASS.legendItem, id);\n\t\t\t})\n\t\t\t.style(\"visibility\", id => ($$.isLegendToShow(id) ? \"visible\" : \"hidden\"))\n\t\t\t.style(\"cursor\", \"pointer\")\n\t\t\t.on(\"click\", id => {\n\t\t\t\tif (!callFn(config.legend_item_onclick, $$, id)) {\n\t\t\t\t\tif (d3Event.altKey) {\n\t\t\t\t\t\t$$.api.hide();\n\t\t\t\t\t\t$$.api.show(id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$$.api.toggle(id);\n\t\t\t\t\t\t!isTouch && $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tisTouch && $$.hideTooltip();\n\t\t\t});\n\n\t\tif (!isTouch) {\n\t\t\titem\n\t\t\t\t.on(\"mouseout\", function(id) {\n\t\t\t\t\tif (!callFn(config.legend_item_onout, $$, id)) {\n\t\t\t\t\t\td3Select(this).classed(CLASS.legendItemFocused, false);\n\t\t\t\t\t\t$$.api.revert();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.on(\"mouseover\", function(id) {\n\t\t\t\t\tif (!callFn(config.legend_item_onover, $$, id)) {\n\t\t\t\t\t\td3Select(this).classed(CLASS.legendItemFocused, true);\n\n\t\t\t\t\t\tif (!$$.transiting && $$.isTargetToShow(id)) {\n\t\t\t\t\t\t\t$$.api.focus(id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\t},\n\n\t/**\n\t * Update the legend\n\t * @private\n\t * @param {Array} ID's of target\n\t * @param {Object} withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.\n\t * @param {Object} the return value of the generateTransitions\n\t */\n\tupdateLegend(targetIds, options, transitions) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst paddingTop = 4;\n\t\tconst paddingRight = 10;\n\t\tconst posMin = 10;\n\t\tconst tileWidth = config.legend_item_tile_width + 5;\n\t\tlet maxWidth = 0;\n\t\tlet maxHeight = 0;\n\t\tlet xForLegend;\n\t\tlet yForLegend;\n\t\tlet totalLength = 0;\n\t\tconst offsets = {};\n\t\tconst widths = {};\n\t\tconst heights = {};\n\t\tconst margins = [0];\n\t\tconst steps = {};\n\t\tlet step = 0;\n\t\tlet background;\n\t\tconst isLegendRightOrInset = $$.isLegendRight || $$.isLegendInset;\n\n\t\t// Skip elements when their name is set to null\n\t\tconst targetIdz = targetIds\n\t\t\t.filter(id => !isDefined(config.data_names[id]) || config.data_names[id] !== null);\n\t\tconst optionz = options || {};\n\t\tconst withTransition = getOption(optionz, \"withTransition\", true);\n\t\tconst withTransitionForTransform = getOption(optionz, \"withTransitionForTransform\", true);\n\n\t\tconst getTextBox = function(textElement, id) {\n\t\t\tif (!$$.legendItemTextBox[id]) {\n\t\t\t\t$$.legendItemTextBox[id] =\n\t\t\t\t\t$$.getTextRect(textElement, CLASS.legendItem, textElement);\n\t\t\t}\n\n\t\t\treturn $$.legendItemTextBox[id];\n\t\t};\n\n\t\tconst updatePositions = function(textElement, id, index) {\n\t\t\tconst reset = index === 0;\n\t\t\tconst isLast = index === targetIdz.length - 1;\n\t\t\tconst box = getTextBox(textElement, id);\n\t\t\tconst itemWidth = box.width + tileWidth +\n\t\t\t\t(isLast && !isLegendRightOrInset ? 0 : paddingRight) + config.legend_padding;\n\t\t\tconst itemHeight = box.height + paddingTop;\n\t\t\tconst itemLength = isLegendRightOrInset ? itemHeight : itemWidth;\n\t\t\tconst areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth();\n\t\t\tlet margin;\n\n\t\t\t// MEMO: care about condifion of step, totalLength\n\t\t\tconst updateValues = function(id2, withoutStep) {\n\t\t\t\tif (!withoutStep) {\n\t\t\t\t\tmargin = (areaLength - totalLength - itemLength) / 2;\n\n\t\t\t\t\tif (margin < posMin) {\n\t\t\t\t\t\tmargin = (areaLength - itemLength) / 2;\n\t\t\t\t\t\ttotalLength = 0;\n\t\t\t\t\t\tstep++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tsteps[id2] = step;\n\t\t\t\tmargins[step] = $$.isLegendInset ? 10 : margin;\n\t\t\t\toffsets[id2] = totalLength;\n\t\t\t\ttotalLength += itemLength;\n\t\t\t};\n\n\t\t\tif (reset) {\n\t\t\t\ttotalLength = 0;\n\t\t\t\tstep = 0;\n\t\t\t\tmaxWidth = 0;\n\t\t\t\tmaxHeight = 0;\n\t\t\t}\n\n\t\t\tif (config.legend_show && !$$.isLegendToShow(id)) {\n\t\t\t\twidths[id] = 0;\n\t\t\t\theights[id] = 0;\n\t\t\t\tsteps[id] = 0;\n\t\t\t\toffsets[id] = 0;\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\twidths[id] = itemWidth;\n\t\t\theights[id] = itemHeight;\n\n\t\t\tif (!maxWidth || itemWidth >= maxWidth) {\n\t\t\t\tmaxWidth = itemWidth;\n\t\t\t}\n\n\t\t\tif (!maxHeight || itemHeight >= maxHeight) {\n\t\t\t\tmaxHeight = itemHeight;\n\t\t\t}\n\n\t\t\tconst maxLength = isLegendRightOrInset ? maxHeight : maxWidth;\n\n\t\t\tif (config.legend_equally) {\n\t\t\t\tObject.keys(widths).forEach(id2 => (widths[id2] = maxWidth));\n\t\t\t\tObject.keys(heights).forEach(id2 => (heights[id2] = maxHeight));\n\t\t\t\tmargin = (areaLength - maxLength * targetIdz.length) / 2;\n\n\t\t\t\tif (margin < posMin) {\n\t\t\t\t\ttotalLength = 0;\n\t\t\t\t\tstep = 0;\n\t\t\t\t\ttargetIdz.forEach(id2 => updateValues(id2));\n\t\t\t\t} else {\n\t\t\t\t\tupdateValues(id, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tupdateValues(id);\n\t\t\t}\n\t\t};\n\n\t\tif ($$.isLegendInset) {\n\t\t\tstep = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;\n\t\t\t$$.updateLegendStep(step);\n\t\t}\n\n\t\tif ($$.isLegendRight) {\n\t\t\txForLegend = id => maxWidth * steps[id];\n\t\t\tyForLegend = id => margins[steps[id]] + offsets[id];\n\t\t} else if ($$.isLegendInset) {\n\t\t\txForLegend = id => maxWidth * steps[id] + 10;\n\t\t\tyForLegend = id => margins[steps[id]] + offsets[id];\n\t\t} else {\n\t\t\txForLegend = id => margins[steps[id]] + offsets[id];\n\t\t\tyForLegend = id => maxHeight * steps[id];\n\t\t}\n\n\t\tconst xForLegendText = (id, i) => xForLegend(id, i) + 4 + config.legend_item_tile_width;\n\t\tconst xForLegendRect = (id, i) => xForLegend(id, i);\n\t\tconst x1ForLegendTile = (id, i) => xForLegend(id, i) - 2;\n\t\tconst x2ForLegendTile = (id, i) => xForLegend(id, i) - 2 + config.legend_item_tile_width;\n\n\t\tconst yForLegendText = (id, i) => yForLegend(id, i) + 9;\n\t\tconst yForLegendRect = (id, i) => yForLegend(id, i) - 5;\n\t\tconst yForLegendTile = (id, i) => yForLegend(id, i) + 4;\n\n\t\tconst pos = -200;\n\n\t\t// Define g for legend area\n\t\tconst l = $$.legend.selectAll(`.${CLASS.legendItem}`)\n\t\t\t.data(targetIdz)\n\t\t\t.enter()\n\t\t\t.append(\"g\");\n\n\t\t$$.setLegendItem(l);\n\n\t\tl.append(\"text\")\n\t\t\t.text(id => (isDefined(config.data_names[id]) ? config.data_names[id] : id))\n\t\t\t.each(function(id, i) {\n\t\t\t\tupdatePositions(this, id, i);\n\t\t\t})\n\t\t\t.style(\"pointer-events\", \"none\")\n\t\t\t.attr(\"x\", isLegendRightOrInset ? xForLegendText : pos)\n\t\t\t.attr(\"y\", isLegendRightOrInset ? pos : yForLegendText);\n\n\t\tl.append(\"rect\")\n\t\t\t.attr(\"class\", CLASS.legendItemEvent)\n\t\t\t.style(\"fill-opacity\", \"0\")\n\t\t\t.attr(\"x\", isLegendRightOrInset ? xForLegendRect : pos)\n\t\t\t.attr(\"y\", isLegendRightOrInset ? pos : yForLegendRect);\n\n\t\tconst usePoint = $$.config.legend_usePoint;\n\n\t\tif (usePoint) {\n\t\t\tconst ids = [];\n\n\t\t\tl.append(d => {\n\t\t\t\tconst pattern = notEmpty(config.point_pattern) ?\n\t\t\t\t\tconfig.point_pattern : [config.point_type];\n\n\t\t\t\tids.indexOf(d) === -1 && ids.push(d);\n\n\t\t\t\tlet point = pattern[ids.indexOf(d) % pattern.length];\n\n\t\t\t\tif (point === \"rectangle\") {\n\t\t\t\t\tpoint = \"rect\";\n\t\t\t\t}\n\n\t\t\t\treturn document.createElementNS(d3Namespaces.svg, $$.hasValidPointType(point) ? point : \"use\");\n\t\t\t})\n\t\t\t\t.attr(\"class\", CLASS.legendItemPoint)\n\t\t\t\t.style(\"fill\", d => $$.color(d))\n\t\t\t\t.style(\"pointer-events\", \"none\")\n\t\t\t\t.attr(\"href\", (data, idx, selection) => {\n\t\t\t\t\tconst node = selection[idx];\n\t\t\t\t\tconst nodeName = node.nodeName.toLowerCase();\n\n\t\t\t\t\treturn nodeName === \"use\" ? `#${$$.datetimeId}-point-${data}` : undefined;\n\t\t\t\t});\n\t\t} else {\n\t\t\tl.append(\"line\")\n\t\t\t\t.attr(\"class\", CLASS.legendItemTile)\n\t\t\t\t.style(\"stroke\", $$.color)\n\t\t\t\t.style(\"pointer-events\", \"none\")\n\t\t\t\t.attr(\"x1\", isLegendRightOrInset ? x1ForLegendTile : pos)\n\t\t\t\t.attr(\"y1\", isLegendRightOrInset ? pos : yForLegendTile)\n\t\t\t\t.attr(\"x2\", isLegendRightOrInset ? x2ForLegendTile : pos)\n\t\t\t\t.attr(\"y2\", isLegendRightOrInset ? pos : yForLegendTile)\n\t\t\t\t.attr(\"stroke-width\", config.legend_item_tile_height);\n\t\t}\n\n\t\t// Set background for inset legend\n\t\tbackground = $$.legend.select(`.${CLASS.legendBackground} rect`);\n\n\t\tif ($$.isLegendInset && maxWidth > 0 && background.size() === 0) {\n\t\t\tbackground = $$.legend.insert(\"g\", `.${CLASS.legendItem}`)\n\t\t\t\t.attr(\"class\", CLASS.legendBackground)\n\t\t\t\t.append(\"rect\");\n\t\t}\n\n\t\tconst texts = $$.legend.selectAll(\"text\")\n\t\t\t.data(targetIdz)\n\t\t\t.text(id => (isDefined(config.data_names[id]) ? config.data_names[id] : id)) // MEMO: needed for update\n\t\t\t.each(function(id, i) {\n\t\t\t\tupdatePositions(this, id, i);\n\t\t\t});\n\n\t\t(withTransition ? texts.transition() : texts)\n\t\t\t.attr(\"x\", xForLegendText)\n\t\t\t.attr(\"y\", yForLegendText);\n\n\t\tconst rects = $$.legend.selectAll(`rect.${CLASS.legendItemEvent}`)\n\t\t\t.data(targetIdz);\n\n\t\t(withTransition ? rects.transition() : rects)\n\t\t\t.attr(\"width\", id => widths[id])\n\t\t\t.attr(\"height\", id => heights[id])\n\t\t\t.attr(\"x\", xForLegendRect)\n\t\t\t.attr(\"y\", yForLegendRect);\n\n\n\t\tif (usePoint) {\n\t\t\tconst tiles = $$.legend.selectAll(`.${CLASS.legendItemPoint}`)\n\t\t\t\t.data(targetIdz);\n\n\t\t\t(withTransition ? tiles.transition() : tiles)\n\t\t\t\t.each(function() {\n\t\t\t\t\tconst nodeName = this.nodeName.toLowerCase();\n\t\t\t\t\tconst pointR = $$.config.point_r;\n\t\t\t\t\tlet x = \"x\";\n\t\t\t\t\tlet y = \"y\";\n\t\t\t\t\tlet xOffset = 2;\n\t\t\t\t\tlet yOffset = 2.5;\n\t\t\t\t\tlet radius;\n\t\t\t\t\tlet width;\n\t\t\t\t\tlet height;\n\n\t\t\t\t\tif (nodeName === \"circle\") {\n\t\t\t\t\t\tconst size = pointR * 0.2;\n\n\t\t\t\t\t\tx = \"cx\";\n\t\t\t\t\t\ty = \"cy\";\n\t\t\t\t\t\tradius = pointR + size;\n\t\t\t\t\t\txOffset = pointR * 2;\n\t\t\t\t\t\tyOffset = -size;\n\t\t\t\t\t} else if (nodeName === \"rect\") {\n\t\t\t\t\t\tconst size = pointR * 2.5;\n\n\t\t\t\t\t\twidth = size;\n\t\t\t\t\t\theight = size;\n\t\t\t\t\t\tyOffset = 3;\n\t\t\t\t\t}\n\n\t\t\t\t\td3Select(this)\n\t\t\t\t\t\t.attr(x, d => x1ForLegendTile(d) + xOffset)\n\t\t\t\t\t\t.attr(y, d => yForLegendTile(d) - yOffset)\n\t\t\t\t\t\t.attr(\"r\", radius)\n\t\t\t\t\t\t.attr(\"width\", width)\n\t\t\t\t\t\t.attr(\"height\", height);\n\t\t\t\t});\n\t\t} else {\n\t\t\tconst tiles = $$.legend.selectAll(`line.${CLASS.legendItemTile}`)\n\t\t\t\t.data(targetIdz);\n\n\t\t\t(withTransition ? tiles.transition() : tiles)\n\t\t\t\t.style(\"stroke\", $$.color)\n\t\t\t\t.attr(\"x1\", x1ForLegendTile)\n\t\t\t\t.attr(\"y1\", yForLegendTile)\n\t\t\t\t.attr(\"x2\", x2ForLegendTile)\n\t\t\t\t.attr(\"y2\", yForLegendTile);\n\t\t}\n\n\t\tif (background) {\n\t\t\t(withTransition ? background.transition() : background)\n\t\t\t\t.attr(\"height\", $$.getLegendHeight() - 12)\n\t\t\t\t.attr(\"width\", maxWidth * (step + 1) + 10);\n\t\t}\n\n\t\t// toggle legend state\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\n\t\t\t.classed(CLASS.legendItemHidden, id => !$$.isTargetToShow(id));\n\n\t\t// Update all to reflect change of legend\n\t\t$$.updateLegendItemWidth(maxWidth);\n\t\t$$.updateLegendItemHeight(maxHeight);\n\t\t$$.updateLegendStep(step);\n\n\t\t// Update size and scale\n\t\t$$.updateSizes();\n\t\t$$.updateScales(!withTransition);\n\t\t$$.updateSvgSize();\n\n\t\t// Update g positions\n\t\t$$.transformAll(withTransitionForTransform, transitions);\n\t\t$$.legendHasRendered = true;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initializes the title\n\t * @private\n\t */\n\tinitTitle() {\n\t\tconst $$ = this;\n\n\t\t$$.title = $$.svg.append(\"text\")\n\t\t\t.text($$.config.title_text)\n\t\t\t.attr(\"class\", $$.CLASS.title);\n\t},\n\n\t/**\n\t * Redraw title\n\t * @private\n\t */\n\tredrawTitle() {\n\t\tconst $$ = this;\n\n\t\t$$.title.attr(\"x\", $$.xForTitle.bind($$))\n\t\t\t.attr(\"y\", $$.yForTitle.bind($$));\n\t},\n\n\t/**\n\t * Returns the x attribute value of the title\n\t * @private\n\t * @returns {Number} x attribute value\n\t */\n\txForTitle() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst position = config.title_position || \"left\";\n\t\tlet x;\n\n\t\tif (position.indexOf(\"right\") >= 0) {\n\t\t\tx = $$.currentWidth -\n\t\t\t\t$$.getTextRect($$.title, $$.CLASS.title, $$.title).width -\n\t\t\t\tconfig.title_padding.right;\n\t\t} else if (position.indexOf(\"center\") >= 0) {\n\t\t\tx = ($$.currentWidth -\n\t\t\t\t$$.getTextRect($$.title, $$.CLASS.title, $$.title).width) / 2;\n\t\t} else { // left\n\t\t\tx = config.title_padding.left;\n\t\t}\n\n\t\treturn x;\n\t},\n\n\t/**\n\t * Returns the y attribute value of the title\n\t * @private\n\t * @returns {Number} y attribute value\n\t */\n\tyForTitle() {\n\t\tconst $$ = this;\n\n\t\treturn $$.config.title_padding.top +\n\t\t\t$$.getTextRect($$.title, $$.CLASS.title, $$.title).height;\n\t},\n\n\t/**\n\t * Get title padding\n\t * @private\n\t * @returns {Number} padding value\n\t */\n\tgetTitlePadding() {\n\t\tconst $$ = this;\n\n\t\treturn $$.yForTitle() + $$.config.title_padding.bottom;\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tgetClipPath(id) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ((!config.clipPath && /-clip$/.test(id)) ||\n\t\t\t(!config.axis_x_clipPath && /-clip-xaxis$/.test(id)) ||\n\t\t\t(!config.axis_y_clipPath && /-clip-yaxis$/.test(id))) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst isIE9 = window.navigator.appVersion\n\t\t\t.toLowerCase().indexOf(\"msie 9.\") >= 0;\n\n\t\treturn `url(${(isIE9 ? \"\" : document.URL.split(\"#\")[0])}#${id})`;\n\t},\n\n\tappendClip(parent, id) {\n\t\treturn parent.append(\"clipPath\")\n\t\t\t.attr(\"id\", id)\n\t\t\t.append(\"rect\");\n\t},\n\n\tgetAxisClipX(forHorizontal) {\n\t\t// axis line width + padding for left\n\t\tconst left = Math.max(30, this.margin.left);\n\n\t\treturn forHorizontal ? -(1 + left) : -(left - 1);\n\t},\n\n\tgetAxisClipY(forHorizontal) {\n\t\treturn forHorizontal ? -20 : -this.margin.top;\n\t},\n\n\tgetXAxisClipX() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipX(!$$.config.axis_rotated);\n\t},\n\n\tgetXAxisClipY() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipY(!$$.config.axis_rotated);\n\t},\n\n\tgetYAxisClipX() {\n\t\tconst $$ = this;\n\n\t\treturn $$.config.axis_y_inner ?\n\t\t\t-1 : $$.getAxisClipX($$.config.axis_rotated);\n\t},\n\n\tgetYAxisClipY() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipY($$.config.axis_rotated);\n\t},\n\n\tgetAxisClipWidth(forHorizontal) {\n\t\tconst $$ = this;\n\t\tconst left = Math.max(30, $$.margin.left);\n\t\tconst right = Math.max(30, $$.margin.right);\n\n\t\t// width + axis line width + padding for left/right\n\t\treturn forHorizontal ?\n\t\t\t$$.width + 2 + left + right : $$.margin.left + 20;\n\t},\n\n\tgetAxisClipHeight(forHorizontal) {\n\t\t// less than 20 is not enough to show the axis label 'outer' without legend\n\t\treturn (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 20;\n\t},\n\n\tgetXAxisClipWidth() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipWidth(!$$.config.axis_rotated);\n\t},\n\n\tgetXAxisClipHeight() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipHeight(!$$.config.axis_rotated);\n\t},\n\n\tgetYAxisClipWidth() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);\n\t},\n\n\tgetYAxisClipHeight() {\n\t\tconst $$ = this;\n\n\t\treturn $$.getAxisClipHeight($$.config.axis_rotated);\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\"; // selection\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {isValue, extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\tinitRegion() {\n\t\tconst $$ = this;\n\n\t\t$$.region = $$.main.append(\"g\")\n\t\t\t.attr(\"clip-path\", $$.clipPath)\n\t\t\t.attr(\"class\", CLASS.regions);\n\t},\n\n\tupdateRegion(duration) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t// hide if arc type\n\t\t$$.region.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\");\n\n\t\t// select <g> element\n\t\t$$.mainRegion = $$.main.select(`.${CLASS.regions}`)\n\t\t\t.selectAll(`.${CLASS.region}`)\n\t\t\t.data(config.regions);\n\n\t\t$$.mainRegion.exit()\n\t\t\t.transition()\n\t\t\t.duration(duration)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.mainRegion = $$.mainRegion.enter()\n\t\t\t.append(\"g\")\n\t\t\t.merge($$.mainRegion)\n\t\t\t.attr(\"class\", $$.classRegion.bind($$));\n\n\t\t$$.mainRegion\n\t\t\t.append(\"rect\")\n\t\t\t.style(\"fill-opacity\", \"0\");\n\t},\n\n\tredrawRegion(withTransition) {\n\t\tconst $$ = this;\n\t\tlet regions = $$.mainRegion.select(\"rect\");\n\n\t\tregions = (withTransition ? regions.transition() : regions)\n\t\t\t.attr(\"x\", $$.regionX.bind($$))\n\t\t\t.attr(\"y\", $$.regionY.bind($$))\n\t\t\t.attr(\"width\", $$.regionWidth.bind($$))\n\t\t\t.attr(\"height\", $$.regionHeight.bind($$));\n\n\t\treturn [\n\t\t\t(withTransition ? regions.transition() : regions)\n\t\t\t\t.style(\"fill-opacity\", d => (isValue(d.opacity) ? d.opacity : \"0.1\"))\n\t\t\t\t.on(\"end\", function() {\n\t\t\t\t\t// remove unnecessary rect after transition\n\t\t\t\t\td3Select(this.parentNode)\n\t\t\t\t\t\t.selectAll(\"rect:not([x])\")\n\t\t\t\t\t\t.remove();\n\t\t\t\t})\n\t\t];\n\t},\n\n\tgetRegionXY(type, d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isX = type === \"x\";\n\t\tlet key = \"start\";\n\t\tlet scale;\n\t\tlet pos = 0;\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\tif (!isX) {\n\t\t\t\tkey = \"end\";\n\t\t\t}\n\n\t\t\tif ((isX ? isRotated : !isRotated) && key in d) {\n\t\t\t\tscale = $$[d.axis];\n\t\t\t\tpos = scale(d[key]);\n\t\t\t}\n\t\t} else if ((isX ? !isRotated : isRotated) && key in d) {\n\t\t\tscale = $$.zoomScale || $$.x;\n\t\t\tpos = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key]);\n\t\t}\n\n\t\treturn pos;\n\t},\n\n\tregionX(d) {\n\t\treturn this.getRegionXY(\"x\", d);\n\t},\n\n\tregionY(d) {\n\t\treturn this.getRegionXY(\"y\", d);\n\t},\n\n\tgetRegionSize(type, d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst isWidth = type === \"width\";\n\t\tconst start = $$[isWidth ? \"regionX\" : \"regionY\"](d);\n\t\tlet scale;\n\t\tlet key = \"end\";\n\t\tlet end = $$[type];\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\tif (!isWidth) {\n\t\t\t\tkey = \"start\";\n\t\t\t}\n\n\t\t\tif ((isWidth ? isRotated : !isRotated) && key in d) {\n\t\t\t\tscale = $$[d.axis];\n\t\t\t\tend = scale(d[key]);\n\t\t\t}\n\t\t} else if ((isWidth ? !isRotated : isRotated) && key in d) {\n\t\t\tscale = $$.zoomScale || $$.x;\n\t\t\tend = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key]);\n\t\t}\n\n\t\treturn end < start ? 0 : end - start;\n\t},\n\n\tregionWidth(d) {\n\t\treturn this.getRegionSize(\"width\", d);\n\t},\n\n\tregionHeight(d) {\n\t\treturn this.getRegionSize(\"height\", d);\n\t},\n\n\tisRegionOnX(d) {\n\t\treturn !d.axis || d.axis === \"x\";\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, getPathBox} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Called when dragging.\n\t * Data points can be selected.\n\t * @private\n\t * @param {Object} mouse Object\n\t */\n\tdrag(mouse) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst main = $$.main;\n\n\t\tif ($$.hasArcType() ||\n\t\t\t!config.data_selection_enabled || // do nothing if not selectable\n\t\t\t(config.zoom_enabled && !$$.zoom.altDomain) || // skip if zoomable because of conflict drag behavior\n\t\t\t!config.data_selection_multiple // skip when single selection because drag is used for multiple selection\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst [sx, sy] = $$.dragStart;\n\t\tconst [mx, my] = mouse;\n\n\t\tconst minX = Math.min(sx, mx);\n\t\tconst maxX = Math.max(sx, mx);\n\t\tconst minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my);\n\t\tconst maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my);\n\n\t\tmain.select(`.${CLASS.dragarea}`)\n\t\t\t.attr(\"x\", minX)\n\t\t\t.attr(\"y\", minY)\n\t\t\t.attr(\"width\", maxX - minX)\n\t\t\t.attr(\"height\", maxY - minY);\n\n\t\t// TODO: binary search when multiple xs\n\t\tmain.selectAll(`.${CLASS.shapes}`)\n\t\t\t.selectAll(`.${CLASS.shape}`)\n\t\t\t.filter(d => config.data_selection_isselectable(d))\n\t\t\t.each(function(d, i) {\n\t\t\t\tconst shape = d3Select(this);\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\n\t\t\t\tconst isIncluded = shape.classed(CLASS.INCLUDED);\n\n\t\t\t\tlet _x;\n\t\t\t\tlet\t_y;\n\t\t\t\tlet\t_w;\n\t\t\t\tlet _h;\n\t\t\t\tlet toggle;\n\t\t\t\tlet isWithin = false;\n\t\t\t\tlet box;\n\n\t\t\t\tif (shape.classed(CLASS.circle)) {\n\t\t\t\t\t_x = shape.attr(\"cx\") * 1;\n\t\t\t\t\t_y = shape.attr(\"cy\") * 1;\n\t\t\t\t\ttoggle = $$.togglePoint;\n\t\t\t\t\tisWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;\n\t\t\t\t} else if (shape.classed(CLASS.bar)) {\n\t\t\t\t\tbox = getPathBox(this);\n\t\t\t\t\t_x = box.x;\n\t\t\t\t\t_y = box.y;\n\t\t\t\t\t_w = box.width;\n\t\t\t\t\t_h = box.height;\n\t\t\t\t\ttoggle = $$.togglePath;\n\t\t\t\t\tisWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);\n\t\t\t\t} else {\n\t\t\t\t\t// line/area selection not supported yet\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isWithin ^ isIncluded) {\n\t\t\t\t\tshape.classed(CLASS.INCLUDED, !isIncluded);\n\t\t\t\t\t// TODO: included/unincluded callback here\n\t\t\t\t\tshape.classed(CLASS.SELECTED, !isSelected);\n\t\t\t\t\ttoggle.call($$, !isSelected, shape, d, i);\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t/**\n\t * Called when the drag starts.\n\t * Adds and Shows the drag area.\n\t * @private\n\t * @param {Object} mouse Object\n\t */\n\tdragstart(mouse) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ($$.hasArcType() || !config.data_selection_enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\t$$.dragStart = mouse;\n\n\t\t$$.main.select(`.${CLASS.chart}`)\n\t\t\t.append(\"rect\")\n\t\t\t.attr(\"class\", CLASS.dragarea)\n\t\t\t.style(\"opacity\", \"0.1\");\n\n\t\t$$.setDragStatus(true);\n\t},\n\n\t/**\n\t * Called when the drag finishes.\n\t * Removes the drag area.\n\t * @private\n\t */\n\tdragend() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tif ($$.hasArcType() || !config.data_selection_enabled) { // do nothing if not selectable\n\t\t\treturn;\n\t\t}\n\n\t\t$$.main.select(`.${CLASS.dragarea}`)\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.main.selectAll(`.${CLASS.shape}`)\n\t\t\t.classed(CLASS.INCLUDED, false);\n\n\t\t$$.setDragStatus(false);\n\t},\n\n\tsetDragStatus(isDragging) {\n\t\tthis.dragging = isDragging;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport {rgb as d3Rgb} from \"d3-color\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, callFn} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Select a point\n\t * @private\n\t * @param {Object} target point\n\t * @param {Object} data\n\t * @param {Number} index\n\t */\n\tselectPoint(target, d, i) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tconst cx = (isRotated ? $$.circleY : $$.circleX).bind($$);\n\t\tconst cy = (isRotated ? $$.circleX : $$.circleY).bind($$);\n\t\tconst r = $$.pointSelectR.bind($$);\n\n\t\tcallFn(config.data_onselected, $$.api, d, target.node());\n\n\t\t// add selected-circle on low layer g\n\t\t$$.main.select(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(d.id)}`)\n\t\t\t.selectAll(`.${CLASS.selectedCircle}-${i}`)\n\t\t\t.data([d])\n\t\t\t.enter()\n\t\t\t.append(\"circle\")\n\t\t\t.attr(\"class\", () => $$.generateClass(CLASS.selectedCircle, i))\n\t\t\t.attr(\"cx\", cx)\n\t\t\t.attr(\"cy\", cy)\n\t\t\t.attr(\"stroke\", () => $$.color(d))\n\t\t\t.attr(\"r\", d2 => $$.pointSelectR(d2) * 1.4)\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.attr(\"r\", r);\n\t},\n\n\t/**\n\t * Unelect a point\n\t * @private\n\t * @param {Object} target point\n\t * @param {Object} data\n\t * @param {Number} index\n\t */\n\tunselectPoint(target, d, i) {\n\t\tconst $$ = this;\n\n\t\tcallFn($$.config.data_onunselected, $$.api, d, target.node());\n\n\t\t// remove selected-circle from low layer g\n\t\t$$.main.select(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(d.id)}`)\n\t\t\t.selectAll(`.${CLASS.selectedCircle}-${i}`)\n\t\t\t.transition()\n\t\t\t.duration(100)\n\t\t\t.attr(\"r\", 0)\n\t\t\t.remove();\n\t},\n\n\t/**\n\t * Toggles the selection of points\n\t * @private\n\t * @param {Boolean} whether or not to select.\n\t * @param {Object} target point\n\t * @param {Object} data\n\t * @param {Number} index\n\t */\n\ttogglePoint(selected, target, d, i) {\n\t\tconst method = `${selected ? \"\" : \"un\"}selectPoint`;\n\n\t\tthis[method](target, d, i);\n\t},\n\n\t/**\n\t * Select a path\n\t * @private\n\t * @param {Object} target path\n\t * @param {Object} data\n\t */\n\tselectPath(target, d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tcallFn(config.data_onselected, $$, d, target.node());\n\n\t\tif (config.interaction_brighten) {\n\t\t\ttarget.transition().duration(100)\n\t\t\t\t.style(\"fill\", () => d3Rgb($$.color(d)).brighter(0.75));\n\t\t}\n\t},\n\n\t/**\n\t * Unelect a path\n\t * @private\n\t * @param {Object} target path\n\t * @param {Object} data\n\t */\n\tunselectPath(target, d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tcallFn(config.data_onunselected, $$, d, target.node());\n\n\t\tif (config.interaction_brighten) {\n\t\t\ttarget.transition().duration(100)\n\t\t\t\t.style(\"fill\", () => $$.color(d));\n\t\t}\n\t},\n\n\t/**\n\t * Toggles the selection of lines\n\t * @private\n\t * @param {Boolean} whether or not to select.\n\t * @param {Object} target shape\n\t * @param {Object} data\n\t * @param {Number} index\n\t */\n\ttogglePath(selected, target, d, i) {\n\t\tthis[\n\t\t\t`${selected ? \"\" : \"un\"}selectPath`\n\t\t](target, d, i);\n\t},\n\n\t/**\n\t * Returns the toggle method of the target\n\t * @private\n\t * @param {Object} target shape\n\t * @param {Object} data\n\t * @returns {Function} toggle method\n\t */\n\tgetToggle(that, d) {\n\t\tconst $$ = this;\n\n\t\treturn that.nodeName === \"path\" ?\n\t\t\t$$.togglePath : (\n\t\t\t\t$$.isStepType(d) ?\n\t\t\t\t\t() => {} : // circle is hidden in step chart, so treat as within the click area\n\t\t\t\t\t$$.togglePoint\n\t\t\t);\n\t},\n\n\t/**\n\t * Toggles the selection of shapes\n\t * @private\n\t * @param {Object} target shape\n\t * @param {Object} data\n\t * @param {Number} index\n\t */\n\ttoggleShape(that, d, i) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst shape = d3Select(that);\n\t\tconst isSelected = shape.classed(CLASS.SELECTED);\n\t\tconst toggle = $$.getToggle(that, d).bind($$);\n\t\tlet toggledShape;\n\n\t\tif (config.data_selection_enabled && config.data_selection_isselectable(d)) {\n\t\t\tif (!config.data_selection_multiple) {\n\t\t\t\tlet selector = `.${CLASS.shapes}`;\n\n\t\t\t\tif (config.data_selection_grouped) {\n\t\t\t\t\tselector += $$.getTargetSelectorSuffix(d.id);\n\t\t\t\t}\n\n\t\t\t\t$$.main.selectAll(selector)\n\t\t\t\t\t.selectAll(`.${CLASS.shape}`)\n\t\t\t\t\t.each(function(d, i) {\n\t\t\t\t\t\tconst shape = d3Select(this);\n\n\t\t\t\t\t\tif (shape.classed(CLASS.SELECTED)) {\n\t\t\t\t\t\t\ttoggledShape = shape;\n\t\t\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (!toggledShape || toggledShape.node() !== shape.node()) {\n\t\t\t\tshape.classed(CLASS.SELECTED, !isSelected);\n\t\t\t\ttoggle(!isSelected, shape, d, i);\n\t\t\t}\n\t\t}\n\t},\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__49__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tselect as d3Select,\n\tevent as d3Event\n} from \"d3-selection\";\nimport {\n\tbrushX as d3BrushX,\n\tbrushY as d3BrushY\n} from \"d3-brush\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, brushEmpty, isFunction} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initialize the brush.\n\t * @private\n\t */\n\tinitBrush() {\n\t\tconst $$ = this;\n\n\t\t// set the brush\n\t\t$$.brush = $$.config.axis_rotated ? d3BrushY() : d3BrushX();\n\n\t\t// set \"brush\" event\n\t\tconst brushHandler = () => {\n\t\t\t$$.redrawForBrush();\n\t\t};\n\n\t\t$$.brush\n\t\t\t.on(\"start\", () => {\n\t\t\t\t$$.inputType === \"touch\" && $$.hideTooltip();\n\t\t\t\tbrushHandler();\n\t\t\t})\n\t\t\t.on(\"brush\", brushHandler);\n\n\t\t$$.brush.update = function() {\n\t\t\tconst extent = this.extent()();\n\n\t\t\tif (extent[1].filter(v => isNaN(v)).length === 0) {\n\t\t\t\t$$.context && $$.context.select(`.${CLASS.brush}`).call(this);\n\t\t\t}\n\n\t\t\treturn this;\n\t\t};\n\n\t\t// set the brush extent\n\t\t$$.brush.scale = function(scale, height) {\n\t\t\tconst overlay = $$.svg.select(\".bb-brush .overlay\");\n\t\t\tconst extent = [[0, 0]];\n\n\t\t\tif (scale.range) {\n\t\t\t\textent.push([\n\t\t\t\t\tscale.range()[1],\n\t\t\t\t\t((height || !overlay.empty()) && ~~overlay.attr(\"height\")) || 60\n\t\t\t\t]);\n\t\t\t} else if (scale.constructor === Array) {\n\t\t\t\textent.push(scale);\n\t\t\t}\n\n\t\t\t$$.config.axis_rotated && extent.reverse();\n\t\t\tthis.extent($$.config.axis_x_extent || extent);\n\n\t\t\t// when extent updates, brush selection also be re-applied\n\t\t\t// https://github.com/d3/d3/issues/2918\n\t\t\tthis.update();\n\t\t};\n\n\t\t$$.brush.getSelection = () => (\n\t\t\t$$.context ? $$.context.select(`.${CLASS.brush}`) : d3Select([])\n\t\t);\n\t},\n\n\t/**\n\t * Initialize the subchart.\n\t * @private\n\t */\n\tinitSubchart() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst visibility = config.subchart_show ? \"visible\" : \"hidden\";\n\n\t\t$$.context = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"context\"));\n\n\t\tconst context = $$.context;\n\n\t\tcontext.style(\"visibility\", visibility);\n\n\t\t// Define g for chart area\n\t\tcontext.append(\"g\")\n\t\t\t.attr(\"clip-path\", $$.clipPathForSubchart)\n\t\t\t.attr(\"class\", CLASS.chart);\n\n\t\t// Define g for bar chart area\n\t\tcontext.select(`.${CLASS.chart}`)\n\t\t\t.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartBars);\n\n\t\t// Define g for line chart area\n\t\tcontext.select(`.${CLASS.chart}`)\n\t\t\t.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.chartLines);\n\n\t\t// Add extent rect for Brush\n\t\tcontext.append(\"g\")\n\t\t\t.attr(\"clip-path\", $$.clipPath)\n\t\t\t.attr(\"class\", CLASS.brush)\n\t\t\t.call($$.brush);\n\n\t\t// ATTENTION: This must be called AFTER chart added\n\t\t// Add Axis\n\t\t$$.axes.subx = context.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.axisX)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"subx\"))\n\t\t\t.attr(\"clip-path\", config.axis_rotated ? \"\" : $$.clipPathForXAxis)\n\t\t\t.style(\"visibility\", config.subchart_axis_x_show ? visibility : \"hidden\");\n\t},\n\n\t/**\n\t * Update sub chart\n\t * @private\n\t * @param {Object} $$.data.targets\n\t */\n\tupdateTargetsForSubchart(targets) {\n\t\tconst $$ = this;\n\t\tconst context = $$.context;\n\t\tconst config = $$.config;\n\t\tconst classChartBar = $$.classChartBar.bind($$);\n\t\tconst classBars = $$.classBars.bind($$);\n\t\tconst classChartLine = $$.classChartLine.bind($$);\n\t\tconst classLines = $$.classLines.bind($$);\n\t\tconst classAreas = $$.classAreas.bind($$);\n\n\t\tif (config.subchart_show) {\n\t\t\t// -- Bar --//\n\t\t\tconst contextBarUpdate = context.select(`.${CLASS.chartBars}`)\n\t\t\t\t.selectAll(`.${CLASS.chartBar}`)\n\t\t\t\t.data(targets)\n\t\t\t\t.attr(\"class\", classChartBar);\n\t\t\tconst contextBarEnter = contextBarUpdate.enter()\n\t\t\t\t.append(\"g\")\n\t\t\t\t.style(\"opacity\", \"0\")\n\t\t\t\t.attr(\"class\", classChartBar)\n\t\t\t\t.merge(contextBarUpdate);\n\n\t\t\t// Bars for each data\n\t\t\tcontextBarEnter.append(\"g\")\n\t\t\t\t.attr(\"class\", classBars);\n\n\t\t\t// -- Line --//\n\t\t\tconst contextLineUpdate = context.select(`.${CLASS.chartLines}`)\n\t\t\t\t.selectAll(`.${CLASS.chartLine}`)\n\t\t\t\t.data(targets)\n\t\t\t\t.attr(\"class\", classChartLine);\n\t\t\tconst contextLineEnter = contextLineUpdate.enter().append(\"g\")\n\t\t\t\t.style(\"opacity\", \"0\")\n\t\t\t\t.attr(\"class\", classChartLine)\n\t\t\t\t.merge(contextLineUpdate);\n\n\t\t\t// Lines for each data\n\t\t\tcontextLineEnter.append(\"g\")\n\t\t\t\t.attr(\"class\", classLines);\n\n\t\t\t// Area\n\t\t\tcontextLineEnter.append(\"g\")\n\t\t\t\t.attr(\"class\", classAreas);\n\n\t\t\t// -- Brush --//\n\t\t\tcontext.selectAll(`.${CLASS.brush} rect`)\n\t\t\t\t.attr(config.axis_rotated ? \"width\" : \"height\", config.axis_rotated ? $$.width2 : $$.height2);\n\t\t}\n\t},\n\n\t/**\n\t * Update the bar of the sub chart\n\t * @private\n\t * @param {Object} durationForExit\n\t */\n\tupdateBarForSubchart(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.contextBar = $$.context.selectAll(`.${CLASS.bars}`).selectAll(`.${CLASS.bar}`)\n\t\t\t.data($$.barData.bind($$));\n\n\t\t$$.contextBar\n\t\t\t.exit()\n\t\t\t.transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.contextBar = $$.contextBar\n\t\t\t.enter()\n\t\t\t.append(\"path\")\n\t\t\t.attr(\"class\", $$.classBar.bind($$))\n\t\t\t.style(\"stroke\", \"none\")\n\t\t\t.style(\"fill\", $$.color)\n\t\t\t.merge($$.contextBar)\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$));\n\t},\n\n\t/**\n\t * Redraw the bar of the subchart\n\t * @private\n\t * @param {String} path in subchart bar\n\t * @param {Boolean} whether or not to transition.\n\t * @param {Number} transition duration\n\t */\n\tredrawBarForSubchart(drawBarOnSub, withTransition, duration) {\n\t\tlet contextBar;\n\n\t\tif (withTransition) {\n\t\t\tcontextBar = this.contextBar.transition(Math.random().toString()).duration(duration);\n\t\t} else {\n\t\t\tcontextBar = this.contextBar;\n\t\t}\n\n\t\tcontextBar.attr(\"d\", drawBarOnSub)\n\t\t\t.style(\"opacity\", \"1\");\n\t},\n\n\t/**\n\t * Update the line of the sub chart\n\t * @private\n\t * @param {Number} Fade-out transition duration\n\t */\n\tupdateLineForSubchart(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.contextLine = $$.context.selectAll(`.${CLASS.lines}`).selectAll(`.${CLASS.line}`)\n\t\t\t.data($$.lineData.bind($$));\n\n\t\t$$.contextLine\n\t\t\t.exit()\n\t\t\t.transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.contextLine = $$.contextLine\n\t\t\t.enter()\n\t\t\t.append(\"path\")\n\t\t\t.attr(\"class\", $$.classLine.bind($$))\n\t\t\t.style(\"stroke\", $$.color)\n\t\t\t.merge($$.contextLine)\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$));\n\t},\n\n\t/**\n\t * Redraw the line of the subchart\n\t * @private\n\t * @param {String} path in subchart line\n\t * @param {Boolean} whether or not to transition\n\t * @param {Number} transition duration\n\t */\n\tredrawLineForSubchart(drawLineOnSub, withTransition, duration) {\n\t\tlet contextLine;\n\n\t\tif (withTransition) {\n\t\t\tcontextLine = this.contextLine.transition(Math.random().toString()).duration(duration);\n\t\t} else {\n\t\t\tcontextLine = this.contextLine;\n\t\t}\n\n\t\tcontextLine.attr(\"d\", drawLineOnSub)\n\t\t\t.style(\"opacity\", \"1\");\n\t},\n\n\t/**\n\t * Update the area of the sub chart\n\t * @private\n\t * @param {Number} Fade-out transition duration\n\t */\n\tupdateAreaForSubchart(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.contextArea = $$.context.selectAll(`.${CLASS.areas}`)\n\t\t\t.selectAll(`.${CLASS.area}`)\n\t\t\t.data($$.lineData.bind($$));\n\n\t\t$$.contextArea\n\t\t\t.exit()\n\t\t\t.transition()\n\t\t\t.duration(durationForExit)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\t$$.contextArea = $$.contextArea\n\t\t\t.enter()\n\t\t\t.append(\"path\")\n\t\t\t.attr(\"class\", $$.classArea.bind($$))\n\t\t\t.style(\"fill\", $$.color)\n\t\t\t.style(\"opacity\", function() {\n\t\t\t\t$$.orgAreaOpacity = d3Select(this).style(\"opacity\");\n\t\t\t\treturn \"0\";\n\t\t\t})\n\t\t\t.merge($$.contextArea)\n\t\t\t.style(\"opacity\", \"0\");\n\t},\n\t/**\n\t * Redraw the area of the subchart\n\t * @private\n\t * @param {String} path in subchart line\n\t * @param {Boolean} whether or not to transition\n\t * @param {Number} transition duration\n\t */\n\tredrawAreaForSubchart(drawAreaOnSub, withTransition, duration) {\n\t\tlet contextArea;\n\n\t\tif (withTransition) {\n\t\t\tcontextArea = this.contextArea.transition(Math.random().toString()).duration(duration);\n\t\t} else {\n\t\t\tcontextArea = this.contextArea;\n\t\t}\n\n\t\tcontextArea.attr(\"d\", drawAreaOnSub)\n\t\t\t.style(\"fill\", this.color)\n\t\t\t.style(\"opacity\", this.orgAreaOpacity);\n\t},\n\n\t/**\n\t * Redraw subchart.\n\t * @private\n\t * @param {Boolean} whether or not to show subchart\n\t * @param Do not use.\n\t * @param {Number} transition duration\n\t * @param Do not use.\n\t * @param {Object} area Indices\n\t * @param {Object} bar Indices\n\t * @param {Object} line Indices\n\t */\n\tredrawSubchart(withSubchart, transitions, duration,\n\t\tdurationForExit, areaIndices, barIndices, lineIndices) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t$$.context.style(\"visibility\", config.subchart_show ? \"visible\" : \"hidden\");\n\n\t\t// subchart\n\t\tif (config.subchart_show) {\n\t\t\t// reflect main chart to extent on subchart if zoomed\n\t\t\tif (d3Event && d3Event.type === \"zoom\") {\n\t\t\t\t$$.brush.update();\n\t\t\t}\n\n\t\t\t// update subchart elements if needed\n\t\t\tif (withSubchart) {\n\t\t\t\t// extent rect\n\t\t\t\t!brushEmpty($$) && $$.brush.update();\n\n\t\t\t\t// setup drawer - MEMO: this must be called after axis updated\n\t\t\t\tconst drawAreaOnSub = $$.generateDrawArea(areaIndices, true);\n\t\t\t\tconst drawBarOnSub = $$.generateDrawBar(barIndices, true);\n\t\t\t\tconst drawLineOnSub = $$.generateDrawLine(lineIndices, true);\n\n\t\t\t\t$$.updateBarForSubchart(duration);\n\t\t\t\t$$.updateLineForSubchart(duration);\n\t\t\t\t$$.updateAreaForSubchart(duration);\n\n\t\t\t\t$$.redrawBarForSubchart(drawBarOnSub, duration, duration);\n\t\t\t\t$$.redrawLineForSubchart(drawLineOnSub, duration, duration);\n\t\t\t\t$$.redrawAreaForSubchart(drawAreaOnSub, duration, duration);\n\t\t\t}\n\t\t}\n\t},\n\t/**\n\t * Redraw the brush.\n\t * @private\n\t */\n\tredrawForBrush() {\n\t\tconst $$ = this;\n\t\tconst x = $$.x;\n\n\t\t$$.redraw({\n\t\t\twithTransition: false,\n\t\t\twithY: $$.config.zoom_rescale,\n\t\t\twithSubchart: false,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithDimension: false\n\t\t});\n\n\t\t$$.config.subchart_onbrush.call($$.api, x.orgDomain());\n\t},\n\n\t/**\n\t * Transform context\n\t * @private\n\t * @param {Boolean} indicates transition is enabled\n\t * @param {Object} The return value of the generateTransitions method of Axis.\n\t */\n\ttransformContext(withTransition, transitions) {\n\t\tconst $$ = this;\n\t\tlet subXAxis;\n\n\t\tif (transitions && transitions.axisSubX) {\n\t\t\tsubXAxis = transitions.axisSubX;\n\t\t} else {\n\t\t\tsubXAxis = $$.context.select(`.${CLASS.axisX}`);\n\t\t\tif (withTransition) { subXAxis = subXAxis.transition(); }\n\t\t}\n\n\t\t$$.context.attr(\"transform\", $$.getTranslate(\"context\"));\n\t\tsubXAxis.attr(\"transform\", $$.getTranslate(\"subx\"));\n\t},\n\n\t/**\n\t * Get default extent\n\t * @private\n\t * @returns {Array} default extent\n\t */\n\tgetDefaultExtent() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tlet extent = isFunction(config.axis_x_extent) ?\n\t\t\tconfig.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent;\n\n\t\tif ($$.isTimeSeries()) {\n\t\t\textent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])];\n\t\t}\n\n\t\treturn extent;\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmin as d3Min,\n\tmax as d3Max\n} from \"d3-array\";\nimport {\n\tmouse as d3Mouse,\n\tevent as d3Event\n} from \"d3-selection\";\nimport {drag as d3Drag} from \"d3-drag\";\nimport {zoom as d3Zoom} from \"d3-zoom\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, callFn, diffDomain} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Initialize zoom.\n\t * @private\n\t */\n\tinitZoom() {\n\t\tconst $$ = this;\n\n\t\t$$.zoomScale = null;\n\t\t$$.generateZoom();\n\t},\n\n\t/**\n\t * Bind zoom event\n\t * @param {Boolean} bind Weather bind or unbound\n\t * @private\n\t */\n\tbindZoomEvent(bind = true) {\n\t\tconst $$ = this;\n\t\tconst zoomEnabled = $$.config.zoom_enabled;\n\n\t\t$$.redrawEventRect();\n\n\t\tif (zoomEnabled && bind) {\n\t\t\tif (zoomEnabled === true || zoomEnabled.type === \"wheel\") {\n\t\t\t\t$$.bindZoomOnEventRect();\n\t\t\t} else if (zoomEnabled.type === \"drag\") {\n\t\t\t\t$$.bindZoomOnDrag();\n\t\t\t}\n\t\t} else if (bind === false) {\n\t\t\t$$.api.unzoom();\n\n\t\t\t$$.main.select(`.${CLASS.eventRects}`)\n\t\t\t\t.on(\".zoom\", null)\n\t\t\t\t.on(\".drag\", null);\n\t\t}\n\t},\n\n\t/**\n\t * Generate zoom\n\t * @private\n\t */\n\tgenerateZoom() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\tconst zoom = d3Zoom().duration(0)\n\t\t\t.on(\"start\", $$.onZoomStart.bind($$))\n\t\t\t.on(\"zoom\", $$.onZoom.bind($$))\n\t\t\t.on(\"end\", $$.onZoomEnd.bind($$));\n\n\t\t// get zoom extent\n\t\tzoom.orgScaleExtent = () => {\n\t\t\tconst extent = config.zoom_extent || [1, 10];\n\n\t\t\treturn [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];\n\t\t};\n\n\t\tzoom.updateScaleExtent = function() {\n\t\t\tconst ratio = diffDomain($$.x.orgDomain()) / diffDomain($$.getZoomDomain());\n\t\t\tconst extent = this.orgScaleExtent();\n\n\t\t\tthis.scaleExtent([extent[0] * ratio, extent[1] * ratio]);\n\n\t\t\treturn this;\n\t\t};\n\n\t\t/**\n\t\t * Update scale according zoom transform value\n\t\t * @param {Object} transform\n\t\t * @private\n\t\t */\n\t\tzoom.updateTransformScale = transform => {\n\t\t\t// rescale from the original scale\n\t\t\tconst newScale = transform.rescaleX($$.subX.orgScale());\n\t\t\tconst domain = $$.trimXDomain(newScale.domain());\n\t\t\tconst rescale = config.zoom_rescale;\n\n\t\t\tnewScale.domain(domain, $$.orgXDomain);\n\n\t\t\t$$.zoomScale = $$.getCustomizedScale(newScale);\n\t\t\t$$.xAxis.scale($$.zoomScale);\n\n\t\t\trescale && $$.x.domain($$.zoomScale.orgDomain());\n\t\t};\n\n\t\t$$.zoom = zoom;\n\t},\n\n\t/**\n\t * 'start' event listener\n\t * @private\n\t */\n\tonZoomStart() {\n\t\tconst $$ = this;\n\t\tconst event = d3Event.sourceEvent;\n\n\t\t$$.zoom.altDomain = event.altKey ?\n\t\t\t$$.x.orgDomain() : null;\n\n\t\t$$.zoom.startEvent = event;\n\t\tcallFn($$.config.zoom_onzoomstart, $$.api, event);\n\t},\n\n\t/**\n\t * 'zoom' event listener\n\t * @private\n\t */\n\tonZoom() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst event = d3Event;\n\n\t\tif (!config.zoom_enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst isMousemove = event.sourceEvent.type === \"mousemove\";\n\t\tconst transform = event.transform;\n\n\t\t$$.zoom.updateTransformScale(transform);\n\n\t\tif ($$.filterTargetsToShow($$.data.targets).length === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isMousemove && $$.zoom.altDomain) {\n\t\t\t$$.x.domain($$.zoom.altDomain);\n\t\t\ttransform.scale($$.zoomScale).updateScaleExtent();\n\t\t\treturn;\n\t\t}\n\n\t\tif ($$.isCategorized() && $$.x.orgDomain()[0] === $$.orgXDomain[0]) {\n\t\t\t$$.x.domain([$$.orgXDomain[0] - 1e-10, $$.x.orgDomain()[1]]);\n\t\t}\n\n\t\t$$.redraw({\n\t\t\twithTransition: false,\n\t\t\twithY: config.zoom_rescale,\n\t\t\twithSubchart: false,\n\t\t\twithEventRect: false,\n\t\t\twithDimension: false\n\t\t});\n\n\t\t$$.cancelClick = isMousemove;\n\t\tcallFn(config.zoom_onzoom, $$.api, $$.x.orgDomain());\n\t},\n\n\t/**\n\t * 'end' event listener\n\t * @private\n\t */\n\tonZoomEnd() {\n\t\tconst $$ = this;\n\t\tconst startEvent = $$.zoom.startEvent;\n\n\t\t// if click, do nothing. otherwise, click interaction will be canceled.\n\t\tif (event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY) {\n\t\t\treturn;\n\t\t}\n\n\t\t$$.redrawEventRect();\n\t\t$$.updateZoom();\n\n\t\tcallFn($$.config.zoom_onzoomend, $$.api, $$.x.orgDomain());\n\t},\n\n\t/**\n\t * Get zoom domain\n\t * @private\n\t * @returns {Array} zoom domain\n\t */\n\tgetZoomDomain() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst min = d3Min([$$.orgXDomain[0], config.zoom_x_min]);\n\t\tconst max = d3Max([$$.orgXDomain[1], config.zoom_x_max]);\n\n\t\treturn [min, max];\n\t},\n\n\t/**\n\t * Update zoom\n\t * @private\n\t */\n\tupdateZoom() {\n\t\tconst $$ = this;\n\n\t\tif ($$.zoomScale) {\n\t\t\tconst zoomDomain = $$.zoomScale.domain();\n\t\t\tconst xDomain = $$.x.domain();\n\t\t\tconst delta = 0.015; // arbitrary value\n\n\t\t\t// check if the zoomed chart is fully shown, then reset scale when zoom is out as initial\n\t\t\tif (\n\t\t\t\t(zoomDomain[0] <= xDomain[0] || (zoomDomain[0] - delta) <= xDomain[0]) &&\n\t\t\t\t(xDomain[1] <= zoomDomain[1] || xDomain[1] <= (zoomDomain[1] - delta))\n\t\t\t) {\n\t\t\t\t$$.xAxis.scale($$.x);\n\t\t\t\t$$.zoomScale = null;\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Attach zoom event on <rect>\n\t * @private\n\t */\n\tbindZoomOnEventRect() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.eventRects}`)\n\t\t\t.call($$.zoom)\n\t\t\t.on(\"dblclick.zoom\", null);\n\t},\n\n\t/**\n\t * Initialize the drag behaviour used for zooming.\n\t * @private\n\t */\n\tinitZoomBehaviour() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst isRotated = config.axis_rotated;\n\t\tlet start = 0;\n\t\tlet end = 0;\n\t\tlet zoomRect = null;\n\n\t\t$$.zoomBehaviour = d3Drag()\n\t\t\t.on(\"start\", function() {\n\t\t\t\t$$.setDragStatus(true);\n\n\t\t\t\tif (!zoomRect) {\n\t\t\t\t\tzoomRect = $$.main.append(\"rect\")\n\t\t\t\t\t\t.attr(\"clip-path\", $$.clipPath)\n\t\t\t\t\t\t.attr(\"class\", CLASS.zoomBrush)\n\t\t\t\t\t\t.attr(\"width\", isRotated ? $$.width : 0)\n\t\t\t\t\t\t.attr(\"height\", isRotated ? 0 : $$.height);\n\t\t\t\t}\n\n\t\t\t\tstart = d3Mouse(this)[0];\n\t\t\t\tend = start;\n\n\t\t\t\tzoomRect\n\t\t\t\t\t.attr(\"x\", start)\n\t\t\t\t\t.attr(\"width\", 0);\n\t\t\t})\n\t\t\t.on(\"drag\", function() {\n\t\t\t\tend = d3Mouse(this)[0];\n\n\t\t\t\tzoomRect\n\t\t\t\t\t.attr(\"x\", Math.min(start, end))\n\t\t\t\t\t.attr(\"width\", Math.abs(end - start));\n\t\t\t})\n\t\t\t.on(\"end\", () => {\n\t\t\t\tconst scale = $$.zoomScale || $$.x;\n\n\t\t\t\t$$.setDragStatus(false);\n\n\t\t\t\tzoomRect\n\t\t\t\t\t.attr(\"x\", 0)\n\t\t\t\t\t.attr(\"width\", 0);\n\n\t\t\t\tif (start > end) {\n\t\t\t\t\t[start, end] = [end, start];\n\t\t\t\t}\n\n\t\t\t\tif (start !== end) {\n\t\t\t\t\t$$.api.zoom([start, end].map(v => scale.invert(v)));\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t/**\n\t * Enable zooming by dragging using the zoombehaviour.\n\t * @private\n\t */\n\tbindZoomOnDrag() {\n\t\tconst $$ = this;\n\n\t\t$$.main.select(`.${CLASS.eventRects}`)\n\t\t\t.call($$.zoomBehaviour);\n\t},\n\n\tsetZoomResetButton() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst resetButton = config.zoom_resetButton;\n\n\t\tif (resetButton && config.zoom_enabled.type === \"drag\") {\n\t\t\tif (!$$.zoom.resetBtn) {\n\t\t\t\t$$.zoom.resetBtn = $$.selectChart.append(\"div\")\n\t\t\t\t\t.classed(CLASS.button, true)\n\t\t\t\t\t.append(\"span\")\n\t\t\t\t\t.on(\"click\", $$.api.unzoom.bind($$))\n\t\t\t\t\t.classed(CLASS.buttonZoomReset, true)\n\t\t\t\t\t.text(resetButton.text || \"Reset Zoom\");\n\t\t\t} else {\n\t\t\t\t$$.zoom.resetBtn.style(\"display\", null);\n\t\t\t}\n\t\t}\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__52__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport {scaleOrdinal as d3ScaleOrdinal} from \"d3-scale\";\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {notEmpty, extend, isFunction} from \"./util\";\n\n/**\n * Set pattern's background color\n * (it adds a <rect> element to simulate bg-color)\n * @param {SVGPatternElement} pattern SVG pattern element\n * @param {String} color Color string\n * @param {String} id ID to be set\n * @return {{id: string, node: SVGPatternElement}}\n * @private\n */\nconst colorizePattern = (pattern, color, id) => {\n\tconst node = d3Select(pattern.cloneNode(true));\n\n\tnode\n\t\t.attr(\"id\", id)\n\t\t.insert(\"rect\", \":first-child\")\n\t\t.attr(\"width\", node.attr(\"width\"))\n\t\t.attr(\"height\", node.attr(\"height\"))\n\t\t.style(\"fill\", color);\n\n\treturn {\n\t\tid,\n\t\tnode: node.node()\n\t};\n};\n\n// Replacement of d3.schemeCategory10.\n// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic)\nconst schemeCategory10 = [\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\", \"#d62728\", \"#9467bd\", \"#8c564b\", \"#e377c2\", \"#7f7f7f\", \"#bcbd22\", \"#17becf\"];\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Get color pattern from CSS file\n\t * CSS should be defined as: background-image: url(\"#00c73c;#fa7171; ...\");\n\t * @return {Array}\n\t * @private\n\t */\n\tgetColorFromCss() {\n\t\tconst cacheKey = \"__colorPattern__\";\n\t\tconst body = document.body;\n\t\tlet pattern = body[cacheKey];\n\n\t\tif (!pattern) {\n\t\t\tconst delimiter = \";\";\n\t\t\tconst span = document.createElement(\"span\");\n\n\t\t\tspan.className = CLASS.colorPattern;\n\t\t\tspan.style.display = \"none\";\n\t\t\tbody.appendChild(span);\n\n\t\t\tconst content = window.getComputedStyle(span).backgroundImage;\n\n\t\t\tspan.parentNode.removeChild(span);\n\n\t\t\tif (content.indexOf(delimiter) > -1) {\n\t\t\t\tpattern = content\n\t\t\t\t\t.replace(/url[^#]*|[\"'()]|(\\s|%20)/g, \"\")\n\t\t\t\t\t.split(delimiter)\n\t\t\t\t\t.map(v => v.trim().replace(/[\\\"'\\s]/g, \"\"))\n\t\t\t\t\t.filter(Boolean);\n\n\t\t\t\tbody[cacheKey] = pattern;\n\t\t\t}\n\t\t}\n\n\t\treturn pattern;\n\t},\n\n\tgenerateColor() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst colors = config.data_colors;\n\t\tconst callback = config.data_color;\n\t\tconst ids = [];\n\n\t\tlet pattern = notEmpty(config.color_pattern) ? config.color_pattern :\n\t\t\td3ScaleOrdinal($$.getColorFromCss() || schemeCategory10).range();\n\n\t\tconst originalColorPattern = pattern;\n\n\t\tif (isFunction(config.color_tiles)) {\n\t\t\tconst tiles = config.color_tiles();\n\n\t\t\t// Add background color to patterns\n\t\t\tconst colorizedPatterns = pattern.map((p, index) => {\n\t\t\t\tconst color = p.replace(/[#\\(\\)\\s,]/g, \"\");\n\t\t\t\tconst id = `${$$.datetimeId}-pattern-${color}-${index}`;\n\n\t\t\t\treturn colorizePattern(tiles[index % tiles.length], p, id);\n\t\t\t});\n\n\t\t\tpattern = colorizedPatterns.map(p => `url(#${p.id})`);\n\t\t\t$$.patterns = colorizedPatterns;\n\t\t}\n\n\t\treturn function(d) {\n\t\t\tconst id = d.id || (d.data && d.data.id) || d;\n\t\t\tconst isLine = $$.isTypeOf(id, [\"line\", \"spline\", \"step\"]) || !$$.config.data_types[id];\n\t\t\tlet color;\n\n\t\t\t// if callback function is provided\n\t\t\tif (isFunction(colors[id])) {\n\t\t\t\tcolor = colors[id](d);\n\n\t\t\t// if specified, choose that color\n\t\t\t} else if (colors[id]) {\n\t\t\t\tcolor = colors[id];\n\n\t\t\t// if not specified, choose from pattern\n\t\t\t} else {\n\t\t\t\tif (ids.indexOf(id) < 0) {\n\t\t\t\t\tids.push(id);\n\t\t\t\t}\n\n\t\t\t\tcolor = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] :\n\t\t\t\t\tpattern[ids.indexOf(id) % pattern.length];\n\n\t\t\t\tcolors[id] = color;\n\t\t\t}\n\n\t\t\treturn isFunction(callback) ?\n\t\t\t\tcallback(color, d) : color;\n\t\t};\n\t},\n\n\tgenerateLevelColor() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst colors = config.color_pattern;\n\t\tconst threshold = config.color_threshold;\n\n\t\tconst asValue = threshold.unit === \"value\";\n\t\tconst max = threshold.max || 100;\n\t\tconst values = threshold.values &&\n\t\t\tthreshold.values.length ? threshold.values : [];\n\n\t\treturn notEmpty(threshold) ? function(value) {\n\t\t\tlet color = colors[colors.length - 1];\n\n\t\t\tfor (let i = 0, v; i < values.length; i++) {\n\t\t\t\tv = asValue ? value : (value * 100 / max);\n\n\t\t\t\tif (v < values[i]) {\n\t\t\t\t\tcolor = colors[i];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn color;\n\t\t} : null;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {isValue, isFunction, isObjectType, extend} from \"./util\";\n\nconst getFormat = ($$, typeValue, v) => {\n\tconst config = $$.config;\n\tconst type = `axis_${typeValue}_tick_format`;\n\tconst format = config[type] ?\n\t\tconfig[type] : $$.defaultValueFormat;\n\n\treturn format(v);\n};\n\nextend(ChartInternal.prototype, {\n\tgetYFormat(forArc) {\n\t\tconst $$ = this;\n\t\tlet formatForY = $$.yFormat;\n\t\tlet formatForY2 = $$.y2Format;\n\n\t\tif (forArc && !$$.hasType(\"gauge\")) {\n\t\t\tformatForY = $$.defaultArcValueFormat;\n\t\t\tformatForY2 = $$.defaultArcValueFormat;\n\t\t}\n\n\t\treturn function(v, ratio, id) {\n\t\t\tconst format = $$.axis.getId(id) === \"y2\" ?\n\t\t\t\tformatForY2 : formatForY;\n\n\t\t\treturn format.call($$, v, ratio);\n\t\t};\n\t},\n\n\tyFormat(v) {\n\t\treturn getFormat(this, \"y\", v);\n\t},\n\n\ty2Format(v) {\n\t\treturn getFormat(this, \"y2\", v);\n\t},\n\n\tdefaultValueFormat(v) {\n\t\treturn isValue(v) ? +v : \"\";\n\t},\n\n\tdefaultArcValueFormat(v, ratio) {\n\t\treturn `${(ratio * 100).toFixed(1)}%`;\n\t},\n\n\tdataLabelFormat(targetId) {\n\t\tconst $$ = this;\n\t\tconst dataLabels = $$.config.data_labels;\n\t\tconst defaultFormat = v => (isValue(v) ? +v : \"\");\n\t\tlet format = defaultFormat;\n\n\t\t// find format according to axis id\n\t\tif (isFunction(dataLabels.format)) {\n\t\t\tformat = dataLabels.format;\n\t\t} else if (isObjectType(dataLabels.format)) {\n\t\t\tif (dataLabels.format[targetId]) {\n\t\t\t\tformat = dataLabels.format[targetId] === true ? defaultFormat : dataLabels.format[targetId];\n\t\t\t} else {\n\t\t\t\tformat = () => \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn format;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nextend(ChartInternal.prototype, {\n\thasCaches(key, isDataType = false) {\n\t\tif (isDataType) {\n\t\t\tfor (let i = 0, len = key.length; i < len; i++) {\n\t\t\t\tif (!(key[i] in this.cache)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn key in this.cache;\n\t\t}\n\t},\n\n\taddCache(key, value, isDataType = false) {\n\t\tthis.cache[key] = isDataType ? this.cloneTarget(value) : value;\n\t},\n\n\tgetCache(key, isDataType = false) {\n\t\tif (isDataType) {\n\t\t\tconst targets = [];\n\n\t\t\tfor (let i = 0, id; (id = key[i]); i++) {\n\t\t\t\tif (id in this.cache) {\n\t\t\t\t\ttargets.push(this.cloneTarget(this.cache[id]));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn targets;\n\t\t} else {\n\t\t\treturn this.cache[key] || null;\n\t\t}\n\t},\n\n\t/**\n\t * reset cached data\n\t * @param {Boolean} all true: reset all data, false: reset only '$' prefixed key data\n\t * @private\n \t */\n\tresetCache(all) {\n\t\tconst $$ = this;\n\n\t\tfor (const x in $$.cache) {\n\t\t\t// reset the prefixed '$' key(which is internal use data) only.\n\t\t\tif (all || /^\\$/.test(x)) {\n\t\t\t\t$$.cache[x] = null;\n\t\t\t}\n\t\t}\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend} from \"./util\";\n\n\nextend(ChartInternal.prototype, {\n\tCLASS,\n\n\tgenerateClass(prefix, targetId) {\n\t\treturn ` ${prefix} ${prefix + this.getTargetSelectorSuffix(targetId)}`;\n\t},\n\n\tclassText(d) {\n\t\treturn this.generateClass(CLASS.text, d.index);\n\t},\n\n\tclassTexts(d) {\n\t\treturn this.generateClass(CLASS.texts, d.id);\n\t},\n\n\tclassShape(d) {\n\t\treturn this.generateClass(CLASS.shape, d.index);\n\t},\n\n\tclassShapes(d) {\n\t\treturn this.generateClass(CLASS.shapes, d.id);\n\t},\n\n\tgenerateExtraLineClass() {\n\t\tconst $$ = this;\n\t\tconst classes = $$.config.line_classes || [];\n\t\tconst ids = [];\n\n\t\treturn function(d) {\n\t\t\tconst id = d.id || (d.data && d.data.id) || d;\n\n\t\t\tif (ids.indexOf(id) < 0) {\n\t\t\t\tids.push(id);\n\t\t\t}\n\n\t\t\treturn classes[ids.indexOf(id) % classes.length];\n\t\t};\n\t},\n\n\tclassLine(d) {\n\t\treturn this.classShape(d) + this.generateClass(CLASS.line, d.id);\n\t},\n\n\tclassLines(d) {\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.lines, d.id);\n\t},\n\n\tclassCircle(d) {\n\t\treturn this.classShape(d) + this.generateClass(CLASS.circle, d.index);\n\t},\n\n\tclassCircles(d) {\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.circles, d.id);\n\t},\n\n\tclassBar(d) {\n\t\treturn this.classShape(d) + this.generateClass(CLASS.bar, d.index);\n\t},\n\n\tclassBars(d) {\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.bars, d.id);\n\t},\n\n\tclassArc(d) {\n\t\treturn this.classShape(d.data) + this.generateClass(CLASS.arc, d.data.id);\n\t},\n\n\tclassArcs(d) {\n\t\treturn this.classShapes(d.data) + this.generateClass(CLASS.arcs, d.data.id);\n\t},\n\n\tclassArea(d) {\n\t\treturn this.classShape(d) + this.generateClass(CLASS.area, d.id);\n\t},\n\n\tclassAreas(d) {\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.areas, d.id);\n\t},\n\n\tclassRegion(d, i) {\n\t\treturn `${this.generateClass(CLASS.region, i)} ${\"class\" in d ? d.class : \"\"}`;\n\t},\n\n\tclassEvent(d) {\n\t\treturn this.generateClass(CLASS.eventRect, d.index);\n\t},\n\n\tclassTarget(id) {\n\t\tconst additionalClassSuffix = this.config.data_classes[id];\n\t\tlet additionalClass = \"\";\n\n\t\tif (additionalClassSuffix) {\n\t\t\tadditionalClass = ` ${CLASS.target}-${additionalClassSuffix}`;\n\t\t}\n\n\t\treturn this.generateClass(CLASS.target, id) + additionalClass;\n\t},\n\n\tclassFocus(d) {\n\t\treturn this.classFocused(d) + this.classDefocused(d);\n\t},\n\n\tclassFocused(d) {\n\t\treturn ` ${this.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : \"\"}`;\n\t},\n\n\tclassDefocused(d) {\n\t\treturn ` ${this.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : \"\"}`;\n\t},\n\n\tclassChartText(d) {\n\t\treturn CLASS.chartText + this.classTarget(d.id);\n\t},\n\n\tclassChartLine(d) {\n\t\treturn CLASS.chartLine + this.classTarget(d.id);\n\t},\n\n\tclassChartBar(d) {\n\t\treturn CLASS.chartBar + this.classTarget(d.id);\n\t},\n\n\tclassChartArc(d) {\n\t\treturn CLASS.chartArc + this.classTarget(d.data.id);\n\t},\n\n\tclassChartRadar(d) {\n\t\treturn CLASS.chartRadar + this.classTarget(d.id);\n\t},\n\n\tgetTargetSelectorSuffix(targetId) {\n\t\treturn targetId || targetId === 0 ?\n\t\t\t`-${targetId}`.replace(/[\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g, \"-\") : \"\";\n\t},\n\n\tselectorTarget(id, prefix) {\n\t\treturn `${prefix || \"\"}.${CLASS.target + this.getTargetSelectorSuffix(id)}`;\n\t},\n\n\tselectorTargets(idsValue, prefix) {\n\t\tconst $$ = this;\n\t\tconst ids = idsValue || [];\n\n\t\treturn ids.length ?\n\t\t\tids.map(id => $$.selectorTarget(id, prefix)) : null;\n\t},\n\n\tselectorLegend(id) {\n\t\treturn `.${CLASS.legendItem + this.getTargetSelectorSuffix(id)}`;\n\t},\n\n\tselectorLegends(ids) {\n\t\tconst $$ = this;\n\n\t\treturn ids && ids.length ?\n\t\t\tids.map(id => $$.selectorLegend(id)) : null;\n\t},\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport Chart from \"../internals/Chart\";\nimport CLASS from \"../config/classes\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * This API highlights specified targets and fade out the others.<br><br>\n\t * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.\n\t * @method focus\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} targetIdsValue Target ids to be highlighted.\n\t * @example\n\t * // data1 will be highlighted and the others will be faded out\n\t * chart.focus(\"data1\");\n\t *\n\t * // data1 and data2 will be highlighted and the others will be faded out\n\t * chart.focus([\"data1\", \"data2\"]);\n\t *\n\t * // all targets will be highlighted\n\t * chart.focus();\n\t */\n\tfocus(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tconst candidates = $$.svg.selectAll(\n\t\t\t$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))\n\t\t);\n\n\t\tthis.revert();\n\t\tthis.defocus();\n\n\t\tcandidates.classed(CLASS.focused, true).classed(CLASS.defocused, false);\n\n\t\t$$.hasArcType() &&\n\t\t$$.expandArc(targetIds);\n\n\t\t$$.toggleFocusLegend(targetIds, true);\n\n\t\t$$.focusedTargetIds = targetIds;\n\t\t$$.defocusedTargetIds = $$.defocusedTargetIds.filter(id => targetIds.indexOf(id) < 0);\n\t},\n\n\t/**\n\t * This API fades out specified targets and reverts the others.<br><br>\n\t * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.\n\t * @method defocus\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} Target ids to be faded out.\n\t * @example\n\t * // data1 will be faded out and the others will be reverted.\n\t * chart.defocus(\"data1\");\n\t *\n\t * // data1 and data2 will be faded out and the others will be reverted.\n\t * chart.defocus([\"data1\", \"data2\"]);\n\t *\n\t * // all targets will be faded out.\n\t * chart.defocus();\n\t */\n\tdefocus(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tconst candidates = $$.svg.selectAll(\n\t\t\t$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))\n\t\t);\n\n\t\tcandidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);\n\t\t$$.hasArcType() && $$.unexpandArc(targetIds);\n\t\t$$.toggleFocusLegend(targetIds, false);\n\n\t\t$$.focusedTargetIds = $$.focusedTargetIds.filter(id => targetIds.indexOf(id) < 0);\n\t\t$$.defocusedTargetIds = targetIds;\n\t},\n\n\t/**\n\t * This API reverts specified targets.<br><br>\n\t * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.\n\t * @method revert\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} Target ids to be reverted\n\t * @example\n\t * // data1 will be reverted.\n\t * chart.revert(\"data1\");\n\t *\n\t * // data1 and data2 will be reverted.\n\t * chart.revert([\"data1\", \"data2\"]);\n\t *\n\t * // all targets will be reverted.\n\t * chart.revert();\n\t */\n\trevert(targetIdsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\t\tconst candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets\n\n\t\tcandidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);\n\t\t$$.hasArcType() && $$.unexpandArc(targetIds);\n\n\t\tif ($$.config.legend_show) {\n\t\t\t$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));\n\t\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\n\t\t\t\t.filter(function() {\n\t\t\t\t\treturn d3Select(this).classed(CLASS.legendItemFocused);\n\t\t\t\t})\n\t\t\t\t.classed(CLASS.legendItemFocused, false);\n\t\t}\n\n\t\t$$.focusedTargetIds = [];\n\t\t$$.defocusedTargetIds = [];\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Show data series on chart\n\t * @method show\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} [targetIdsValue=all] The target id value.\n\t * @param {Object} [options] The object can consist with following members:<br>\n\t *\n\t * | Key | Type | default | Description |\n\t * | --- | --- | --- | --- |\n\t * | withLegend | Boolean | false | whether or not display legend |\n\t *\n\t * @example\n\t * // show 'data1'\n\t * chart.show(\"data1\");\n\t *\n\t * // show 'data1' and 'data3'\n\t * chart.show([\"data1\", \"data3\"]);\n\t */\n\tshow(targetIdsValue, options = {}) {\n\t\tconst $$ = this.internal;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\n\t\t$$.removeHiddenTargetIds(targetIds);\n\t\tconst targets = $$.svg.selectAll($$.selectorTargets(targetIds));\n\n\t\ttargets.transition()\n\t\t\t.style(\"opacity\", \"1\", \"important\")\n\t\t\t.call($$.endall, () => {\n\t\t\t\ttargets.style(\"opacity\", null).style(\"opacity\", \"1\");\n\t\t\t});\n\n\t\toptions.withLegend && $$.showLegend(targetIds);\n\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithLegend: true\n\t\t});\n\t},\n\n\t/**\n\t * Hide data series from chart\n\t * @method hide\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} [targetIdsValue=all] The target id value.\n\t * @param {Object} [options] The object can consist with following members:<br>\n\t *\n\t * | Key | Type | default | Description |\n\t * | --- | --- | --- | --- |\n\t * | withLegend | Boolean | false | whether or not display legend |\n\t *\n\t * @example\n\t * // hide 'data1'\n\t * chart.hide(\"data1\");\n\t *\n\t * // hide 'data1' and 'data3'\n\t * chart.hide([\"data1\", \"data3\"]);\n\t */\n\thide(targetIdsValue, options = {}) {\n\t\tconst $$ = this.internal;\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\n\n\t\t$$.addHiddenTargetIds(targetIds);\n\t\tconst targets = $$.svg.selectAll($$.selectorTargets(targetIds));\n\n\t\ttargets.transition()\n\t\t\t.style(\"opacity\", \"0\", \"important\")\n\t\t\t.call($$.endall, () => {\n\t\t\t\ttargets.style(\"opacity\", null).style(\"opacity\", \"0\");\n\t\t\t});\n\n\t\toptions.withLegend && $$.hideLegend(targetIds);\n\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithLegend: true\n\t\t});\n\t},\n\n\t/**\n\t * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.\n\t * @method toggle\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} [targetIdsValue=all] The target id value.\n\t * @param {Object} [options] The object can consist with following members:<br>\n\t *\n\t * | Key | Type | default | Description |\n\t * | --- | --- | --- | --- |\n\t * | withLegend | Boolean | false | whether or not display legend |\n\t *\n\t * @example\n\t * // toggle 'data1'\n\t * chart.toggle(\"data1\");\n\t *\n\t * // toggle 'data1' and 'data3'\n\t * chart.toggle([\"data1\", \"data3\"]);\n\t */\n\ttoggle(targetIds, options = {}) {\n\t\tconst $$ = this.internal;\n\t\tconst targets = {show: [], hide: []};\n\n\t\t// sort show & hide target ids\n\t\t$$.mapToTargetIds(targetIds)\n\t\t\t.forEach(id => targets[$$.isTargetToShow(id) ? \"hide\" : \"show\"].push(id));\n\n\t\t// perform show & hide task separately\n\t\t// https://github.com/naver/billboard.js/issues/454\n\t\ttargets.show.length && this.show(targets.show, options);\n\t\ttargets.hide.length && setTimeout(() => this.hide(targets.hide, options), 0);\n\t}\n});\n\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {\n\tmin as d3Min,\n\tmax as d3Max\n} from \"d3-array\";\nimport {zoomIdentity as d3ZoomIdentity} from \"d3-zoom\";\nimport Chart from \"../internals/Chart\";\nimport {callFn, isDefined, isObject, isString, extend} from \"../internals/util\";\n\n/**\n * Zoom by giving x domain.\n * @method zoom\n * @instance\n * @memberOf Chart\n * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.\n * @return {Array} domain value in array\n * @example\n * // Zoom to specified domain\n * chart.zoom([10, 20]);\n *\n * // Get the current zoomed domain\n * chart.zoom();\n */\nconst zoom = function(domainValue) {\n\tconst $$ = this.internal;\n\tlet domain = domainValue;\n\tlet resultDomain;\n\n\tif ($$.config.zoom_enabled && domain) {\n\t\tconst isTimeSeries = $$.isTimeSeries();\n\n\t\tif (isTimeSeries) {\n\t\t\tdomain = domain.map(x => $$.parseDate(x));\n\t\t}\n\n\t\tif ($$.config.subchart_show) {\n\t\t\tconst xScale = $$.zoomScale || $$.x;\n\n\t\t\t$$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]);\n\t\t\tresultDomain = domain;\n\t\t} else {\n\t\t\tconst orgDomain = $$.subX.domain();\n\t\t\tconst k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]);\n\t\t\tconst gap = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;\n\t\t\tconst tx = isTimeSeries ?\n\t\t\t\t(0 - k * $$.x(domain[0].getTime())) : domain[0] - k * ($$.x(domain[0]) - gap);\n\n\t\t\t$$.zoom.updateTransformScale(\n\t\t\t\td3ZoomIdentity.translate(tx, 0).scale(k)\n\t\t\t);\n\n\t\t\tresultDomain = $$.zoomScale.domain();\n\t\t}\n\n\t\t$$.redraw({\n\t\t\twithTransition: true,\n\t\t\twithY: $$.config.zoom_rescale,\n\t\t\twithDimension: false\n\t\t});\n\n\t\t$$.setZoomResetButton();\n\t\tcallFn($$.config.zoom_onzoom, this, $$.x.orgDomain());\n\t} else {\n\t\tresultDomain = $$.zoomScale ?\n\t\t\t$$.zoomScale.domain() : $$.x.orgDomain();\n\t}\n\n\treturn resultDomain;\n};\n\nextend(zoom, {\n\t/**\n\t * Enable and disable zooming.\n\t * @method zoom․enable\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Boolean} enabled Possible string values are \"wheel\" or \"drag\". If enabled is true, \"wheel\" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset.\n\t * @example\n\t * // Enable zooming using the mouse wheel\n\t * chart.zoom.enable(true);\n\t * // Or\n\t * chart.zoom.enable(\"wheel\");\n\t *\n\t * // Enable zooming by dragging\n\t * chart.zoom.enable(\"drag\");\n\t *\n\t * // Disable zooming\n\t * chart.zoom.enable(false);\n\t */\n\tenable: function(enabled = \"wheel\") {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\t\tlet enableType = enabled;\n\n\t\tif (enabled) {\n\t\t\tenableType = isString(enabled) && /^(drag|wheel)$/.test(enabled) ?\n\t\t\t\t{type: enabled} : enabled;\n\t\t}\n\n\t\tconfig.zoom_enabled = enableType;\n\n\t\tif (!$$.zoom) {\n\t\t\t$$.initZoom();\n\t\t\t$$.initZoomBehaviour();\n\t\t\t$$.bindZoomEvent();\n\t\t} else if (enabled === false) {\n\t\t\t$$.bindZoomEvent(false);\n\t\t}\n\n\t\t$$.updateAndRedraw();\n\t},\n\n\t/**\n\t * Set or get x Axis maximum zoom range value\n\t * @method zoom․max\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Number} [max] maximum value to set for zoom\n\t * @return {Number} zoom max value\n\t * @example\n\t * // Set maximum range value\n\t * chart.zoom.max(20);\n\t */\n\tmax: function(max) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (max === 0 || max) {\n\t\t\tconfig.zoom_x_max = d3Max([$$.orgXDomain[1], max]);\n\t\t}\n\n\t\treturn config.zoom_x_max;\n\t},\n\n\t/**\n\t * Set or get x Axis minimum zoom range value\n\t * @method zoom․min\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Number} [min] minimum value tp set for zoom\n\t * @return {Number} zoom min value\n\t * @example\n\t * // Set minimum range value\n\t * chart.zoom.min(-1);\n\t */\n\tmin: function(min) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (min === 0 || min) {\n\t\t\tconfig.zoom_x_min = d3Min([$$.orgXDomain[0], min]);\n\t\t}\n\n\t\treturn config.zoom_x_min;\n\t},\n\n\t/**\n\t * Set zoom range\n\t * @method zoom․range\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} [range]\n\t * @return {Object} zoom range value\n\t * {\n\t * min: 0,\n\t * max: 100\n\t * }\n\t * @example\n\t * chart.zoom.range({\n\t * min: 10,\n\t * max: 100\n\t * });\n\t */\n\trange: function(range) {\n\t\tconst zoom = this.zoom;\n\n\t\tif (isObject(range)) {\n\t\t\tisDefined(range.min) && zoom.min(range.min);\n\t\t\tisDefined(range.max) && zoom.max(range.max);\n\t\t}\n\n\t\treturn {\n\t\t\tmin: zoom.min(),\n\t\t\tmax: zoom.max()\n\t\t};\n\t}\n});\n\nextend(Chart.prototype, {\n\tzoom,\n\n\t/**\n\t * Unzoom zoomed area\n\t * @method unzoom\n\t * @instance\n\t * @memberOf Chart\n\t * @example\n\t * chart.unzoom();\n\t */\n\tunzoom() {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif ($$.zoomScale) {\n\t\t\tconfig.subchart_show ?\n\t\t\t\t$$.brush.getSelection().call($$.brush.move, null) :\n\t\t\t\t$$.zoom.updateTransformScale(d3ZoomIdentity);\n\n\t\t\t$$.updateZoom();\n\t\t\t$$.zoom.resetBtn && $$.zoom.resetBtn.style(\"display\", \"none\");\n\n\t\t\t$$.redraw({\n\t\t\t\twithTransition: true,\n\t\t\t\twithY: config.zoom_rescale\n\t\t\t});\n\t\t}\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend, isString, isArray} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Load data to the chart.<br><br>\n\t * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n\t * - <b>Note:</b>\n\t * unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>\n\t * done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering\n\t * @method load\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} args The object can consist with following members:<br>\n\t *\n\t * | Key | Description |\n\t * | --- | --- |\n\t * | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |\n\t * | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |\n\t * | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |\n\t * | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |\n\t * | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |\n\t * | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. |\n\t * | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |\n\t * | done | The specified function will be called after data loaded.|\n\t *\n\t * @example\n\t * // Load data1 and unload data2 and data3\n\t * chart.load({\n\t * columns: [\n\t * [\"data1\", 100, 200, 150, ...],\n\t * ...\n\t * ],\n\t * unload: [\"data2\", \"data3\"],\n\t * url: \"...\",\n\t * done: function() { ... }\n\t * });\n\t */\n\tload(args) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\t// update xs if specified\n\t\targs.xs && $$.addXs(args.xs);\n\n\t\t// update names if exists\n\t\t\"names\" in args && this.data.names(args.names);\n\n\t\t// update classes if exists\n\t\t\"classes\" in args && Object.keys(args.classes).forEach(id => {\n\t\t\tconfig.data_classes[id] = args.classes[id];\n\t\t});\n\n\t\t// update categories if exists\n\t\tif (\"categories\" in args && $$.isCategorized()) {\n\t\t\tconfig.axis_x_categories = args.categories;\n\t\t}\n\n\t\t// update axes if exists\n\t\t\"axes\" in args && Object.keys(args.axes).forEach(id => {\n\t\t\tconfig.data_axes[id] = args.axes[id];\n\t\t});\n\n\n\t\t// update colors if exists\n\t\t\"colors\" in args && Object.keys(args.colors).forEach(id => {\n\t\t\tconfig.data_colors[id] = args.colors[id];\n\t\t});\n\n\t\t// use cache if exists\n\t\tif (\"cacheIds\" in args && $$.hasCaches(args.cacheIds, true)) {\n\t\t\t$$.load($$.getCache(args.cacheIds, true), args.done);\n\t\t\treturn;\n\t\t}\n\n\t\t// unload if needed\n\t\tif (\"unload\" in args && args.unload !== false) {\n\t\t\t// TODO: do not unload if target will load (included in url/rows/columns)\n\t\t\t$$.unload($$.mapToTargetIds(args.unload === true ? null : args.unload), () =>\n\t\t\t\t$$.loadFromArgs(args)\n\t\t\t);\n\t\t} else {\n\t\t\t$$.loadFromArgs(args);\n\t\t}\n\t},\n\n\t/**\n\t * Unload data to the chart.<br><br>\n\t * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.\n\t * - <b>Note:</b>\n\t * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>\n\t * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.\n\t * @method unload\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} args\n\t * - If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded.\n\t * - If done given, the specified function will be called after data loded.\n\t * @example\n\t * // Unload data2 and data3\n\t * chart.unload({\n\t * ids: [\"data2\", \"data3\"]\n\t * });\n\t */\n\tunload(argsValue) {\n\t\tconst $$ = this.internal;\n\t\tlet args = argsValue || {};\n\n\t\tif (isArray(args)) {\n\t\t\targs = {ids: args};\n\t\t} else if (isString(args)) {\n\t\t\targs = {ids: [args]};\n\t\t}\n\n\t\t$$.unload($$.mapToTargetIds(args.ids), () => {\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithLegend: true\n\t\t\t});\n\n\t\t\targs.done && args.done();\n\t\t});\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {selectAll as d3SelectAll} from \"d3-selection\";\nimport {easeLinear as d3EaseLinear} from \"d3-ease\";\nimport {transition as d3Transition} from \"d3-transition\";\nimport Chart from \"../internals/Chart\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {isDefined, isValue, diffDomain, extend} from \"../internals/util\";\nimport CLASS from \"../config/classes\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Flow data to the chart.<br><br>\n\t * By this API, you can append new data points to the chart.\n\t * @method flow\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} args The object can consist with following members:<br>\n\t *\n\t * | Key | Type | Description |\n\t * | --- | --- | --- |\n\t * | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) |\n\t * | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) |\n\t * | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) |\n\t * | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points |\n\t * | length | Number | The lower x edge will move by the number of this argument |\n\t * | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default |\n\t * | done | Function | The specified function will be called when flow ends |\n\t *\n\t * - **NOTE:**\n\t * If json, rows and columns given, the data will be loaded.<br>\n\t * If data that has the same target id is given, the chart will be appended.<br>\n\t * Otherwise, new target will be added. One of these is required when calling.<br>\n\t * If json specified, keys is required as well as data.json.\n\t * @example\n\t * // 2 data points will be apprended to the tail and popped from the head.\n\t * // After that, 4 data points will be appended and no data points will be poppoed.\n\t * chart.flow({\n\t * columns: [\n\t * [\"x\", \"2018-01-11\", \"2018-01-21\"],\n\t * [\"data1\", 500, 200],\n\t * [\"data2\", 100, 300],\n\t * [\"data3\", 200, 120]\n\t * ],\n\t * to: \"2013-01-11\",\n\t * done: function () {\n\t * chart.flow({\n\t * columns: [\n\t * [\"x\", \"2018-02-11\", \"2018-02-12\", \"2018-02-13\", \"2018-02-14\"],\n\t * [\"data1\", 200, 300, 100, 250],\n\t * [\"data2\", 100, 90, 40, 120],\n\t * [\"data3\", 100, 100, 300, 500]\n\t * ],\n\t * length: 2,\n * duration: 1500\n\t * });\n\t * }\n\t * });\n\t */\n\tflow(args) {\n\t\tconst $$ = this.internal;\n\t\tconst notfoundIds = [];\n\t\tconst orgDataCount = $$.getMaxDataCount();\n\n\t\tlet data;\n\t\tlet domain;\n\t\tlet length = 0;\n\t\tlet tail = 0;\n\t\tlet diff;\n\t\tlet to;\n\n\t\tif (args.json) {\n\t\t\tdata = $$.convertJsonToData(args.json, args.keys);\n\t\t} else if (args.rows) {\n\t\t\tdata = $$.convertRowsToData(args.rows);\n\t\t} else if (args.columns) {\n\t\t\tdata = $$.convertColumnsToData(args.columns);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tconst targets = $$.convertDataToTargets(data, true);\n\n\t\t// Update/Add data\n\t\t$$.data.targets.forEach(t => {\n\t\t\tlet found = false;\n\n\t\t\tfor (let i = 0; i < targets.length; i++) {\n\t\t\t\tif (t.id === targets[i].id) {\n\t\t\t\t\tfound = true;\n\n\t\t\t\t\tif (t.values[t.values.length - 1]) {\n\t\t\t\t\t\ttail = t.values[t.values.length - 1].index + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tlength = targets[i].values.length;\n\n\t\t\t\t\tfor (let j = 0; j < length; j++) {\n\t\t\t\t\t\ttargets[i].values[j].index = tail + j;\n\n\t\t\t\t\t\tif (!$$.isTimeSeries()) {\n\t\t\t\t\t\t\ttargets[i].values[j].x = tail + j;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tt.values = t.values.concat(targets[i].values);\n\t\t\t\t\ttargets.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t!found && notfoundIds.push(t.id);\n\t\t});\n\n\t\t// Append null for not found targets\n\t\t$$.data.targets.forEach(t => {\n\t\t\tfor (let i = 0; i < notfoundIds.length; i++) {\n\t\t\t\tif (t.id === notfoundIds[i]) {\n\t\t\t\t\ttail = t.values[t.values.length - 1].index + 1;\n\n\t\t\t\t\tfor (let j = 0; j < length; j++) {\n\t\t\t\t\t\tt.values.push({\n\t\t\t\t\t\t\tid: t.id,\n\t\t\t\t\t\t\tindex: tail + j,\n\t\t\t\t\t\t\tx: $$.isTimeSeries() ? $$.getOtherTargetX(tail + j) : tail + j,\n\t\t\t\t\t\t\tvalue: null\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// Generate null values for new target\n\t\tif ($$.data.targets.length) {\n\t\t\ttargets.forEach(t => {\n\t\t\t\tconst missing = [];\n\n\t\t\t\tfor (let i = $$.data.targets[0].values[0].index; i < tail; i++) {\n\t\t\t\t\tmissing.push({\n\t\t\t\t\t\tid: t.id,\n\t\t\t\t\t\tindex: i,\n\t\t\t\t\t\tx: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,\n\t\t\t\t\t\tvalue: null\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tt.values.forEach(v => {\n\t\t\t\t\tv.index += tail;\n\n\t\t\t\t\tif (!$$.isTimeSeries()) {\n\t\t\t\t\t\tv.x += tail;\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tt.values = missing.concat(t.values);\n\t\t\t});\n\t\t}\n\n\t\t$$.data.targets = $$.data.targets.concat(targets); // add remained\n\n\t\t// check data count because behavior needs to change when it\"s only one\n\t\t// const dataCount = $$.getMaxDataCount();\n\t\tconst baseTarget = $$.data.targets[0];\n\t\tconst baseValue = baseTarget.values[0];\n\n\t\t// Update length to flow if needed\n\t\tif (isDefined(args.to)) {\n\t\t\tlength = 0;\n\t\t\tto = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to;\n\t\t\tbaseTarget.values.forEach(v => {\n\t\t\t\tv.x < to && length++;\n\t\t\t});\n\t\t} else if (isDefined(args.length)) {\n\t\t\tlength = args.length;\n\t\t}\n\n\t\t// If only one data, update the domain to flow from left edge of the chart\n\t\tif (!orgDataCount) {\n\t\t\tif ($$.isTimeSeries()) {\n\t\t\t\tdiff = baseTarget.values.length > 1 ?\n\t\t\t\t\tbaseTarget.values[baseTarget.values.length - 1].x - baseValue.x :\n\t\t\t\t\tbaseValue.x - $$.getXDomain($$.data.targets)[0];\n\t\t\t} else {\n\t\t\t\tdiff = 1;\n\t\t\t}\n\n\t\t\tdomain = [baseValue.x - diff, baseValue.x];\n\t\t\t$$.updateXDomain(null, true, true, false, domain);\n\t\t} else if (orgDataCount === 1) {\n\t\t\tif ($$.isTimeSeries()) {\n\t\t\t\tdiff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;\n\t\t\t\tdomain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];\n\t\t\t\t$$.updateXDomain(null, true, true, false, domain);\n\t\t\t}\n\t\t}\n\n\t\t// Set targets\n\t\t$$.updateTargets($$.data.targets);\n\n\t\t// Redraw with new targets\n\t\t$$.redraw({\n\t\t\tflow: {\n\t\t\t\tindex: baseValue.index,\n\t\t\t\tlength: length,\n\t\t\t\tduration: isValue(args.duration) ? args.duration : $$.config.transition_duration,\n\t\t\t\tdone: args.done,\n\t\t\t\torgDataCount: orgDataCount,\n\t\t\t},\n\t\t\twithLegend: true,\n\t\t\twithTransition: orgDataCount > 1,\n\t\t\twithTrimXDomain: false,\n\t\t\twithUpdateXAxis: true\n\t\t});\n\t}\n});\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Generate flow\n\t * @memberOf ChartInternal\n\t * @private\n\t * @param {Object} args\n\t * @return {Function}\n\t */\n\tgenerateFlow(args) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\treturn function() {\n\t\t\tconst targets = args.targets;\n\t\t\tconst flow = args.flow;\n\t\t\tconst drawBar = args.drawBar;\n\t\t\tconst drawLine = args.drawLine;\n\t\t\tconst drawArea = args.drawArea;\n\t\t\tconst cx = args.cx;\n\t\t\tconst cy = args.cy;\n\t\t\tconst xv = args.xv;\n\t\t\tconst xForText = args.xForText;\n\t\t\tconst yForText = args.yForText;\n\t\t\tconst duration = args.duration;\n\n\t\t\tlet translateX;\n\t\t\tlet scaleX = 1;\n\t\t\tconst flowIndex = flow.index;\n\t\t\tconst flowLength = flow.length;\n\t\t\tlet flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex);\n\t\t\tlet flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength);\n\t\t\tconst orgDomain = $$.x.domain();\n\t\t\tconst durationForFlow = flow.duration || duration;\n\t\t\tconst done = flow.done || function() {};\n\t\t\tconst wait = $$.generateWait();\n\n\t\t\tconst xgrid = $$.xgrid || d3SelectAll([]);\n\t\t\tconst xgridLines = $$.xgridLines || d3SelectAll([]);\n\t\t\tconst mainRegion = $$.mainRegion || d3SelectAll([]);\n\t\t\tconst mainText = $$.mainText || d3SelectAll([]);\n\t\t\tconst mainBar = $$.mainBar || d3SelectAll([]);\n\t\t\tconst mainLine = $$.mainLine || d3SelectAll([]);\n\t\t\tconst mainArea = $$.mainArea || d3SelectAll([]);\n\t\t\tconst mainCircle = $$.mainCircle || d3SelectAll([]);\n\n\t\t\t// set flag\n\t\t\t$$.flowing = true;\n\n\t\t\t// remove head data after rendered\n\t\t\t$$.data.targets.forEach(d => {\n\t\t\t\td.values.splice(0, flowLength);\n\t\t\t});\n\n\t\t\t// update x domain to generate axis elements for flow\n\t\t\tconst domain = $$.updateXDomain(targets, true, true);\n\n\t\t\t// update elements related to x scale\n\t\t\tif ($$.updateXGrid) { $$.updateXGrid(true); }\n\n\t\t\t// generate transform to flow\n\t\t\tif (!flow.orgDataCount) { // if empty\n\t\t\t\tif ($$.data.targets[0].values.length !== 1) {\n\t\t\t\t\ttranslateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\n\t\t\t\t} else {\n\t\t\t\t\tif ($$.isTimeSeries()) {\n\t\t\t\t\t\tflowStart = $$.getValueOnIndex($$.data.targets[0].values, 0);\n\t\t\t\t\t\tflowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1);\n\t\t\t\t\t\ttranslateX = $$.x(flowStart.x) - $$.x(flowEnd.x);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttranslateX = diffDomain(domain) / 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x)) {\n\t\t\t\ttranslateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\n\t\t\t} else {\n\t\t\t\tif ($$.isTimeSeries()) {\n\t\t\t\t\ttranslateX = ($$.x(orgDomain[0]) - $$.x(domain[0]));\n\t\t\t\t} else {\n\t\t\t\t\ttranslateX = ($$.x(flowStart.x) - $$.x(flowEnd.x));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tscaleX = (diffDomain(orgDomain) / diffDomain(domain));\n\t\t\tconst transform = `translate(${translateX},0) scale(${scaleX},1)`;\n\n\t\t\t$$.hideXGridFocus();\n\n\t\t\tconst gt = d3Transition().ease(d3EaseLinear)\n\t\t\t\t.duration(durationForFlow);\n\n\t\t\twait.add([\n\t\t\t\t$$.axes.x\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.call($$.xAxis.setTransition(gt)),\n\n\t\t\t\tmainBar\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\tmainLine\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\tmainArea\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\tmainCircle\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\tmainText\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\tmainRegion\n\t\t\t\t\t.filter($$.isRegionOnX)\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\txgrid\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\n\t\t\t\txgridLines\n\t\t\t\t\t.transition(gt)\n\t\t\t\t\t.attr(\"transform\", transform),\n\t\t\t]);\n\n\t\t\tgt.call(wait, () => {\n\t\t\t\tconst shapes = [];\n\t\t\t\tconst texts = [];\n\t\t\t\tconst eventRects = [];\n\n\t\t\t\t// remove flowed elements\n\t\t\t\tif (flowLength) {\n\t\t\t\t\tfor (let i = 0; i < flowLength; i++) {\n\t\t\t\t\t\tconst index = flowIndex + i;\n\n\t\t\t\t\t\tshapes.push(`.${CLASS.shape}-${index}`);\n\t\t\t\t\t\ttexts.push(`.${CLASS.text}-${index}`);\n\t\t\t\t\t\teventRects.push(`.${CLASS.eventRect}-${index}`);\n\t\t\t\t\t}\n\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.shapes}`)\n\t\t\t\t\t\t.selectAll(shapes)\n\t\t\t\t\t\t.remove();\n\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.texts}`)\n\t\t\t\t\t\t.selectAll(texts)\n\t\t\t\t\t\t.remove();\n\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.eventRects}`)\n\t\t\t\t\t\t.selectAll(eventRects)\n\t\t\t\t\t\t.remove();\n\n\t\t\t\t\t$$.svg.select(`.${CLASS.xgrid}`)\n\t\t\t\t\t\t.remove();\n\t\t\t\t}\n\n\t\t\t\t// draw again for removing flowed elements and reverting attr\n\t\t\t\txgrid.size() && xgrid\n\t\t\t\t\t.attr(\"transform\", null)\n\t\t\t\t\t.attr($$.xgridAttr);\n\n\t\t\t\txgridLines\n\t\t\t\t\t.attr(\"transform\", null);\n\n\t\t\t\txgridLines.select(\"line\")\n\t\t\t\t\t.attr(\"x1\", config.axis_rotated ? 0 : xv)\n\t\t\t\t\t.attr(\"x2\", config.axis_rotated ? $$.width : xv);\n\n\t\t\t\txgridLines.select(\"text\")\n\t\t\t\t\t.attr(\"x\", config.axis_rotated ? $$.width : 0)\n\t\t\t\t\t.attr(\"y\", xv);\n\n\t\t\t\tmainBar\n\t\t\t\t\t.attr(\"transform\", null)\n\t\t\t\t\t.attr(\"d\", drawBar);\n\n\t\t\t\tmainLine\n\t\t\t\t\t.attr(\"transform\", null)\n\t\t\t\t\t.attr(\"d\", drawLine);\n\n\t\t\t\tmainArea\n\t\t\t\t\t.attr(\"transform\", null)\n\t\t\t\t\t.attr(\"d\", drawArea);\n\n\t\t\t\tmainCircle\n\t\t\t\t\t.attr(\"transform\", null);\n\n\t\t\t\tif ($$.isCirclePoint()) {\n\t\t\t\t\tmainCircle\n\t\t\t\t\t\t.attr(\"cx\", cx)\n\t\t\t\t\t\t.attr(\"cy\", cy);\n\t\t\t\t} else {\n\t\t\t\t\tconst xFunc = d => cx(d) - config.point_r;\n\t\t\t\t\tconst yFunc = d => cy(d) - config.point_r;\n\n\t\t\t\t\tmainCircle\n\t\t\t\t\t\t.attr(\"x\", xFunc)\n\t\t\t\t\t\t.attr(\"y\", yFunc)\n\t\t\t\t\t\t.attr(\"cx\", cx) // when pattern is used, it possibly contain 'circle' also.\n\t\t\t\t\t\t.attr(\"cy\", cy);\n\t\t\t\t}\n\n\t\t\t\tmainText\n\t\t\t\t\t.attr(\"transform\", null)\n\t\t\t\t\t.attr(\"x\", xForText)\n\t\t\t\t\t.attr(\"y\", yForText)\n\t\t\t\t\t.style(\"fill-opacity\", $$.opacityForText.bind($$));\n\n\t\t\t\tmainRegion\n\t\t\t\t\t.attr(\"transform\", null);\n\n\t\t\t\tmainRegion.select(\"rect\").filter($$.isRegionOnX)\n\t\t\t\t\t.attr(\"x\", $$.regionX.bind($$))\n\t\t\t\t\t.attr(\"width\", $$.regionWidth.bind($$));\n\n\t\t\t\tconfig.interaction_enabled && $$.redrawEventRect();\n\n\t\t\t\t// callback for end of flow\n\t\t\t\tdone();\n\n\t\t\t\t$$.flowing = false;\n\t\t\t});\n\t\t};\n\t}\n});\n","module.exports = __WEBPACK_EXTERNAL_MODULE__62__;","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport Chart from \"../internals/Chart\";\nimport {isDefined, extend} from \"../internals/util\";\nimport CLASS from \"../config/classes\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Get selected data points.<br><br>\n\t * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.\n\t * @method selected\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.\n\t * @return {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: \"data1\", index: 1, name: \"data1\"}, ...]`\n\t * @example\n\t * // all selected data points will be returned.\n\t * chart.selected();\n\t * // --> ex.) [{x: 1, value: 200, id: \"data1\", index: 1, name: \"data1\"}, ... ]\n\t *\n\t * // all selected data points of data1 will be returned.\n\t * chart.selected(\"data1\");\n\t */\n\tselected(targetId) {\n\t\tconst $$ = this.internal;\n\t\tconst dataPoint = [];\n\n\t\t$$.main.selectAll(`.${CLASS.shapes + $$.getTargetSelectorSuffix(targetId)}`)\n\t\t\t.selectAll(`.${CLASS.shape}`)\n\t\t\t.filter(function() {\n\t\t\t\treturn d3Select(this).classed(CLASS.SELECTED);\n\t\t\t})\n\t\t\t.each(d => dataPoint.push(d));\n\n\t\treturn dataPoint;\n\t},\n\n\t/**\n\t * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)`\n\t * @method select\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} [ids] id value to get selected.\n\t * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.\n\t * @param {Boolean} [resetOther] Unselect already selected.\n\t * @example\n\t * // select all data points\n\t * chart.select();\n\t *\n\t * // select all from 'data2'\n\t * chart.select(\"data2\");\n\t *\n\t * // select all from 'data1' and 'data2'\n\t * chart.select([\"data1\", \"data2\"]);\n\t *\n\t * // select from 'data1', indices 2 and unselect others selected\n\t * chart.select(\"data1\", [2], true);\n\t *\n\t * // select from 'data1', indices 0, 3 and 5\n\t * chart.select(\"data1\", [0, 3, 5]);\n\t */\n\tselect(ids, indices, resetOther) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (!config.data_selection_enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\t$$.main.selectAll(`.${CLASS.shapes}`)\n\t\t\t.selectAll(`.${CLASS.shape}`)\n\t\t\t.each(function(d, i) {\n\t\t\t\tconst shape = d3Select(this);\n\t\t\t\tconst id = d.data ? d.data.id : d.id;\n\t\t\t\tconst toggle = $$.getToggle(this, d).bind($$);\n\t\t\t\tconst isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;\n\t\t\t\tconst isTargetIndex = !indices || indices.indexOf(i) >= 0;\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\n\n\t\t\t\t// line/area selection not supported yet\n\t\t\t\tif (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isTargetId && isTargetIndex) {\n\t\t\t\t\tif (config.data_selection_isselectable(d) && !isSelected) {\n\t\t\t\t\t\ttoggle(true, shape.classed(CLASS.SELECTED, true), d, i);\n\t\t\t\t\t}\n\t\t\t\t} else if (isDefined(resetOther) && resetOther && isSelected) {\n\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t/**\n\t * Set data points to be un-selected.\n\t * @method unselect\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} [ids] id value to be unselected.\n\t * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.\n\t * @example\n\t * // unselect all data points\n\t * chart.unselect();\n\t *\n\t * // unselect all from 'data1'\n\t * chart.unselect(\"data1\");\n\t *\n\t * // unselect from 'data1', indices 2\n\t * chart.unselect(\"data1\", [2]);\n\t */\n\tunselect(ids, indices) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (!config.data_selection_enabled) {\n\t\t\treturn;\n\t\t}\n\n\t\t$$.main.selectAll(`.${CLASS.shapes}`)\n\t\t\t.selectAll(`.${CLASS.shape}`)\n\t\t\t.each(function(d, i) {\n\t\t\t\tconst shape = d3Select(this);\n\t\t\t\tconst id = d.data ? d.data.id : d.id;\n\t\t\t\tconst toggle = $$.getToggle(this, d).bind($$);\n\t\t\t\tconst isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;\n\t\t\t\tconst isTargetIndex = !indices || indices.indexOf(i) >= 0;\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\n\n\t\t\t\t// line/area selection not supported yet\n\t\t\t\tif (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected) {\n\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\n\t\t\t\t}\n\t\t\t});\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Change the type of the chart.\n\t * @method transform\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String} type Specify the type to be transformed. The types listed in data.type can be used.\n\t * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate.\n\t * @example\n\t * // all targets will be bar chart.\n\t * chart.transform(\"bar\");\n\t *\n\t * // only data1 will be bar chart.\n\t * chart.transform(\"bar\", \"data1\");\n\t *\n\t * // only data1 and data2 will be bar chart.\n\t * chart.transform(\"bar\", [\"data1\", \"data2\"]);\n\t */\n\ttransform(type, targetIds) {\n\t\tconst $$ = this.internal;\n\t\tconst options = [\"pie\", \"donut\"]\n\t\t\t.indexOf(type) >= 0 ? {withTransform: true} : null;\n\n\t\t$$.transformTo(targetIds, type, options);\n\t}\n});\n\nextend(ChartInternal.prototype, {\n\t/**\n\t * Change the type of the chart.\n\t * @private\n\t * @param {String|Array} targetIds\n\t * @param {String} type\n\t * @param {Object} optionsForRedraw\n\t */\n\ttransformTo(targetIds, type, optionsForRedraw) {\n\t\tconst $$ = this;\n\t\tconst withTransitionForAxis = !$$.hasArcType();\n\t\tconst options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};\n\n\t\toptions.withTransitionForTransform = false;\n\t\t$$.transiting = false;\n\n\t\t$$.setTargetType(targetIds, type);\n\t\t$$.updateTargets($$.data.targets); // this is needed when transforming to arc\n\t\t$$.updateAndRedraw(options);\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {isUndefined, extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Update groups for the targets.\n\t * @method groups\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.\n\t * @example\n\t * // data1 and data2 will be a new group.\n\t * chart.groups([\n\t * [\"data1\", \"data2\"]\n\t * ]);\n\t */\n\tgroups(groups) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (isUndefined(groups)) {\n\t\t\treturn config.data_groups;\n\t\t}\n\n\t\tconfig.data_groups = groups;\n\t\t$$.redraw();\n\n\t\treturn config.data_groups;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\n/**\n * Update x grid lines.\n * @method xgrids\n * @instance\n * @memberOf Chart\n * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.\n * @example\n * // Show 2 x grid lines\n * chart.xgrids([\n * {value: 1, text: \"Label 1\"},\n * {value: 4, text: \"Label 4\"}\n * ]);\n */\nconst xgrids = function(grids) {\n\tconst $$ = this.internal;\n\tconst config = $$.config;\n\n\tif (!grids) {\n\t\treturn config.grid_x_lines;\n\t}\n\n\tconfig.grid_x_lines = grids;\n\t$$.redrawWithoutRescale();\n\n\treturn config.grid_x_lines;\n};\n\nextend(xgrids, {\n\t/**\n\t * Add x grid lines.<br>\n\t * This API adds new x grid lines instead of replacing like xgrids.\n\t * @method xgrids․add\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.\n\t * @example\n\t * // Add a new x grid line\n\t * chart.xgrids.add(\n\t * {value: 4, text: \"Label 4\"}\n\t * );\n\t *\n\t * // Add new x grid lines\n\t * chart.xgrids.add([\n\t * {value: 2, text: \"Label 2\"},\n\t * {value: 4, text: \"Label 4\"}\n\t * ]);\n\t */\n\tadd: function(grids) {\n\t\treturn this.xgrids(\n\t\t\tthis.internal.config.grid_x_lines\n\t\t\t\t.concat(grids || [])\n\t\t);\n\t},\n\n\t/**\n\t * Remove x grid lines.<br>\n\t * This API removes x grid lines.\n\t * @method xgrids․remove\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.\n\t * @example\n\t * // x grid line on x = 2 will be removed\n\t * chart.xgrids.remove({value: 2});\n\t *\n\t * // x grid lines that have 'grid-A' will be removed\n\t * chart.xgrids.remove({\n\t * class: \"grid-A\"\n\t * });\n\t *\n\t * // all of x grid lines will be removed\n\t * chart.xgrids.remove();\n\t */\n\tremove: function(params) { // TODO: multiple\n\t\tthis.internal.removeGridLines(params, true);\n\t}\n});\n\n\n/**\n * Update y grid lines.\n * @method ygrids\n * @instance\n * @memberOf Chart\n * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.\n * @example\n * // Show 2 y grid lines\n * chart.ygrids([\n * {value: 100, text: \"Label 1\"},\n * {value: 400, text: \"Label 4\"}\n * ]);\n */\nconst ygrids = function(grids) {\n\tconst $$ = this.internal;\n\tconst config = $$.config;\n\n\tif (!grids) {\n\t\treturn config.grid_y_lines;\n\t}\n\n\tconfig.grid_y_lines = grids;\n\t$$.redrawWithoutRescale();\n\n\treturn config.grid_y_lines;\n};\n\nextend(ygrids, {\n\t/**\n\t * Add y grid lines.<br>\n\t * This API adds new y grid lines instead of replacing like ygrids.\n\t * @method ygrids․add\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.\n\t * @example\n\t * // Add a new x grid line\n\t * chart.ygrids.add(\n\t * {value: 400, text: \"Label 4\"}\n\t * );\n\t *\n\t * // Add new x grid lines\n\t * chart.ygrids.add([\n\t * {value: 200, text: \"Label 2\"},\n\t * {value: 400, text: \"Label 4\"}\n\t * ]);\n\t */\n\tadd: function(grids) {\n\t\treturn this.ygrids(\n\t\t\tthis.internal.config.grid_y_lines\n\t\t\t\t.concat(grids || [])\n\t\t);\n\t},\n\n\t/**\n\t * Remove y grid lines.<br>\n\t * This API removes x grid lines.\n\t * @method ygrids․remove\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.\n\t * @example\n\t * // y grid line on y = 200 will be removed\n\t * chart.ygrids.remove({value: 200});\n\t *\n\t * // y grid lines that have 'grid-A' will be removed\n\t * chart.ygrids.remove({\n\t * class: \"grid-A\"\n\t * });\n\t *\n\t * // all of y grid lines will be removed\n\t * chart.ygrids.remove();\n\t */\n\tremove: function(params) { // TODO: multiple\n\t\tthis.internal.removeGridLines(params, false);\n\t}\n});\n\nextend(Chart.prototype, {\n\txgrids,\n\tygrids\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport CLASS from \"../config/classes\";\nimport {extend} from \"../internals/util\";\n\n/**\n * Update regions.\n * @method regions\n * @instance\n * @memberOf Chart\n * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.\n * @return {Array} regions\n * @example\n * // Show 2 regions\n * chart.regions([\n * {axis: \"x\", start: 5, class: \"regionX\"},\n * {axis: \"y\", end: 50, class: \"regionY\"}\n * ]);\n */\nconst regions = function(regions) {\n\tconst $$ = this.internal;\n\tconst config = $$.config;\n\n\tif (!regions) {\n\t\treturn config.regions;\n\t}\n\n\tconfig.regions = regions;\n\t$$.redrawWithoutRescale();\n\n\treturn config.regions;\n};\n\nextend(regions, {\n\t/**\n\t * Add new region.<br><br>\n\t * This API adds new region instead of replacing like regions.\n\t * @method regions․add\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.\n\t * @return {Array} regions\n\t * @example\n\t * // Add a new region\n\t * chart.regions.add(\n\t * {axis: \"x\", start: 5, class: \"regionX\"}\n\t * );\n\t *\n\t * // Add new regions\n\t * chart.regions.add([\n\t * {axis: \"x\", start: 5, class: \"regionX\"},\n\t * {axis: \"y\", end: 50, class: \"regionY\"}\n\t *]);\n\t */\n\tadd: function(regions) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (!regions) {\n\t\t\treturn config.regions;\n\t\t}\n\n\t\tconfig.regions = config.regions.concat(regions);\n\t\t$$.redrawWithoutRescale();\n\n\t\treturn config.regions;\n\t},\n\n\t/**\n\t * Remove regions.<br><br>\n\t * This API removes regions.\n\t * @method regions․remove\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.\n\t * @return {Array} regions\n\t * @example\n\t * // regions that have 'region-A' or 'region-B' will be removed.\n\t * chart.regions.remove({\n\t * classes: [\n\t * \"region-A\", \"region-B\"\n\t * ]\n\t * });\n\t *\n\t * // all of regions will be removed.\n\t * chart.regions.remove();\n\t */\n\tremove: function(optionsValue) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tconst options = optionsValue || {};\n\t\tconst duration = $$.getOption(options, \"duration\", config.transition_duration);\n\t\tconst classes = $$.getOption(options, \"classes\", [CLASS.region]);\n\t\tconst regions = $$.main.select(`.${CLASS.regions}`)\n\t\t\t.selectAll(classes.map(c => `.${c}`));\n\n\t\t(duration ? regions.transition().duration(duration) : regions)\n\t\t\t.style(\"opacity\", \"0\")\n\t\t\t.remove();\n\n\t\tconfig.regions = config.regions.filter(region => {\n\t\t\tlet found = false;\n\n\t\t\tif (!region.class) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tregion.class.split(\" \").forEach(c => {\n\t\t\t\tif (classes.indexOf(c) >= 0) {\n\t\t\t\t\tfound = true;\n\t\t\t\t}\n\t\t\t});\n\n\t\t\treturn !found;\n\t\t});\n\n\t\treturn config.regions;\n\t}\n});\n\nextend(Chart.prototype, {regions});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend, isUndefined, isArray} from \"../internals/util\";\n\n/**\n * Get data loaded in the chart.\n * @method data\n * @instance\n * @memberOf Chart\n * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.\n * @example\n * // Get only data1 data\n * chart.data(\"data1\");\n *\n * // Get data1 and data2 data\n * chart.data([\"data1\", \"data2\"]);\n *\n * // Get all data\n * chart.data();\n */\nconst data = function(targetIds) {\n\tconst targets = this.internal.data.targets;\n\n\treturn isUndefined(targetIds) ?\n\t\ttargets : targets.filter(t => targetIds.indexOf(t.id) >= 0);\n};\n\nextend(data, {\n\t/**\n\t * Get data shown in the chart.\n\t * @method data․shown\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.\n\t * @example\n\t * // Get shown data by filtering to include only data1 data\n\t * chart.data.shown(\"data1\");\n\t *\n\t * // Get shown data by filtering to include data1 and data2 data\n\t * chart.data.shown([\"data1\", \"data2\"]);\n\t *\n\t * // Get all shown data\n\t * chart.data.shown();\n\t */\n\tshown: function(targetIds) {\n\t\treturn this.internal.filterTargetsToShow(this.data(targetIds));\n\t},\n\n\t/**\n\t * Get values of the data loaded in the chart.\n\t * @method data․values\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned\n\t * @example\n\t * // Get data1 values\n\t * chart.data.values(\"data1\");\n\t */\n\tvalues: function(targetId) {\n\t\tlet values = null;\n\n\t\tif (targetId) {\n\t\t\tconst targets = this.data(targetId);\n\n\t\t\tif (targets && isArray(targets)) {\n\t\t\t\tvalues = [];\n\n\t\t\t\ttargets.forEach(v => {\n\t\t\t\t\tvalues = values.concat(v.values.map(d => d.value));\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn values;\n\t},\n\n\t/**\n\t * Get and set names of the data loaded in the chart.\n\t * @method data․names\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as\n\t * @example\n\t * // Get current names\n\t * chart.data.names();\n\t *\n\t * // Update names\n\t * chart.data.names({\n\t * data1: \"New Name 1\",\n\t * data2: \"New Name 2\"\n\t *});\n\t */\n\tnames: function(names) {\n\t\tthis.internal.clearLegendItemTextBoxCache();\n\n\t\treturn this.internal.updateDataAttributes(\"names\", names);\n\t},\n\n\t/**\n\t * Get and set colors of the data loaded in the chart.\n\t * @method data․colors\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as\n\t * @example\n\t * // Get current colors\n\t * chart.data.colors();\n\t *\n\t * // Update colors\n\t * chart.data.colors({\n\t * data1: \"#FFFFFF\",\n\t * data2: \"#000000\"\n\t * });\n\t */\n\tcolors: function(colors) {\n\t\treturn this.internal.updateDataAttributes(\"colors\", colors);\n\t},\n\n\t/**\n\t * Get and set axes of the data loaded in the chart.\n\t * @method data․axes\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as\n\t * @example\n\t * // Get current axes\n\t * chart.data.axes();\n\t *\n\t * // Update axes\n\t * chart.data.axes({\n\t * data1: \"y\",\n\t * data2: \"y2\"\n\t * });\n\t */\n\taxes: function(axes) {\n\t\treturn this.internal.updateDataAttributes(\"axes\", axes);\n\t}\n});\n\nextend(Chart.prototype, {data});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Set specified category name on category axis.\n\t * @method category\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Number} i index of category to be changed\n\t * @param {String} category category value to be changed\n\t * @example\n\t * chart.category(2, \"Category 3\");\n\t */\n\tcategory(i, category) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (arguments.length > 1) {\n\t\t\tconfig.axis_x_categories[i] = category;\n\t\t\t$$.redraw();\n\t\t}\n\n\t\treturn config.axis_x_categories[i];\n\t},\n\n\t/**\n\t * Set category names on category axis.\n\t * @method categories\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.\n\t * @example\n\t * chart.categories([\n\t * \"Category 1\", \"Category 2\", ...\n\t * ]);\n\t */\n\tcategories(categories) {\n\t\tconst $$ = this.internal;\n\t\tconst config = $$.config;\n\n\t\tif (!arguments.length) {\n\t\t\treturn config.axis_x_categories;\n\t\t}\n\n\t\tconfig.axis_x_categories = categories;\n\t\t$$.redraw();\n\n\t\treturn config.axis_x_categories;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Get the color\n\t * @method color\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String} id id to get the color\n\t * @example\n\t * chart.color(\"data1\");\n\t */\n\tcolor(id) {\n\t\treturn this.internal.color(id); // more patterns\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Get and set x values for the chart.\n\t * @method x\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n\t * @return {Object} xs\n\t * @example\n\t * // Get current x values\n\t * chart.x();\n\t *\n\t * // Update x values for all targets\n\t * chart.x([100, 200, 300, 400, ...]);\n\t */\n\tx(x) {\n\t\tconst $$ = this.internal;\n\n\t\tif (arguments.length) {\n\t\t\t$$.updateTargetX($$.data.targets, x);\n\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true\n\t\t\t});\n\t\t}\n\n\t\treturn $$.data.xs;\n\t},\n\n\t/**\n\t * Get and set x values for the chart.\n\t * @method xs\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.\n\t * @return {Object} xs\n\t * @example\n\t * // Get current x values\n\t * chart.xs();\n\t *\n\t * // Update x values for all targets\n\t * chart.xs({\n\t * data1: [10, 20, 30, 40, ...],\n\t * data2: [100, 200, 300, 400, ...]\n\t * });\n\t */\n\txs(xs) {\n\t\tconst $$ = this.internal;\n\n\t\tif (arguments.length) {\n\t\t\t$$.updateTargetXs($$.data.targets, xs);\n\n\t\t\t$$.redraw({\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithUpdateXDomain: true\n\t\t\t});\n\t\t}\n\n\t\treturn $$.data.xs;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {isValue, isDefined, isObjectType, extend} from \"../internals/util\";\n\n/**\n * Set the min/max value\n * @param {Chart} $$\n * @param {String} type\n * @param {Object} value\n * @return {undefined}\n * @private\n */\nconst setMinMax = ($$, type, value) => {\n\tconst config = $$.config;\n\tconst axisX = `axis_x_${type}`;\n\tconst axisY = `axis_y_${type}`;\n\tconst axisY2 = `axis_y2_${type}`;\n\n\tif (isDefined(value)) {\n\t\tif (isObjectType(value)) {\n\t\t\tisValue(value.x) && (config[axisX] = value.x);\n\t\t\tisValue(value.y) && (config[axisY] = value.y);\n\t\t\tisValue(value.y2) && (config[axisY2] = value.y2);\n\t\t} else {\n\t\t\tconfig[axisY] = value;\n\t\t\tconfig[axisY2] = value;\n\t\t}\n\n\t\t$$.redraw({\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithUpdateXDomain: true\n\t\t});\n\t}\n\n\treturn undefined;\n};\n\n/**\n * Get the min/max value\n * @param {Chart} $$\n * @param {String} type\n * @return {{x, y, y2}}\n * @private\n */\nconst getMinMax = ($$, type) => {\n\tconst config = $$.config;\n\tconst axisX = `axis_x_${type}`;\n\tconst axisY = `axis_y_${type}`;\n\tconst axisY2 = `axis_y2_${type}`;\n\n\treturn {\n\t\tx: config[axisX],\n\t\ty: config[axisY],\n\t\ty2: config[axisY2]\n\t};\n};\n\n/**\n * Define axis\n * @ignore\n */\nconst axis = extend(() => {}, {\n\t/**\n\t * Get and set axis labels.\n\t * @method axis․labels\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} labels specified axis' label to be updated.\n\t * @example\n\t * // Update axis' label\n\t * chart.axis.labels({\n\t * x: \"New X Axis Label\",\n\t * y: \"New Y Axis Label\"\n\t * });\n\t */\n\tlabels: function(labels) {\n\t\tconst $$ = this.internal;\n\n\t\tif (arguments.length) {\n\t\t\tObject.keys(labels).forEach(axisId => {\n\t\t\t\t$$.axis.setLabelText(axisId, labels[axisId]);\n\t\t\t});\n\n\t\t\t$$.axis.updateLabels();\n\t\t}\n\t},\n\n\t/**\n\t * Get and set axis min value.\n\t * @method axis․min\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} min If min is given, specified axis' min value will be updated.<br>\n\t * If no argument is given, the min values set on generating option for each axis will be returned.\n\t * If not set any min values on generation, it will return `undefined`.\n\t * @example\n\t * // Update axis' min\n\t * chart.axis.min({\n\t * x: -10,\n\t * y: 1000,\n\t * y2: 100\n\t * });\n\t */\n\tmin: function(min) {\n\t\tconst $$ = this.internal;\n\n\t\treturn arguments.length ?\n\t\t\tsetMinMax($$, \"min\", min) :\n\t\t\tgetMinMax($$, \"min\");\n\t},\n\n\t/**\n\t * Get and set axis max value.\n\t * @method axis․max\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} max If max is given, specified axis' max value will be updated.<br>\n\t * If no argument is given, the max values set on generating option for each axis will be returned.\n\t * If not set any max values on generation, it will return `undefined`.\n\t * @example\n\t * // Update axis' label\n\t * chart.axis.max({\n\t * x: 100,\n\t * y: 1000,\n\t * y2: 10000\n\t * });\n\t */\n\tmax: function(max) {\n\t\tconst $$ = this.internal;\n\n\t\treturn arguments.length ?\n\t\t\tsetMinMax($$, \"max\", max) :\n\t\t\tgetMinMax($$, \"max\");\n\t},\n\n\t/**\n\t * Get and set axis min and max value.\n\t * @method axis․range\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.\n\t * @example\n\t * // Update axis' label\n\t * chart.axis.range({\n\t * min: {\n\t * x: -10,\n\t * y: -1000,\n\t * y2: -10000\n\t * },\n\t * max: {\n\t * x: 100,\n\t * y: 1000,\n\t * y2: 10000\n\t * },\n\t * });\n\t */\n\trange: function(range) {\n\t\tconst axis = this.axis;\n\n\t\tif (arguments.length) {\n\t\t\tisDefined(range.max) && axis.max(range.max);\n\t\t\tisDefined(range.min) && axis.min(range.min);\n\t\t} else {\n\t\t\treturn {\n\t\t\t\tmax: axis.max(),\n\t\t\t\tmin: axis.min()\n\t\t\t};\n\t\t}\n\n\t\treturn undefined;\n\t}\n});\n\nextend(Chart.prototype, {axis});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {extend} from \"../internals/util\";\n\n/**\n * Define legend\n * @ignore\n */\nconst legend = extend(() => {}, {\n\t/**\n\t * Show legend for each target.\n\t * @method legend․show\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} targetIds\n\t * - If targetIds is given, specified target's legend will be shown.\n\t * - If only one target is the candidate, String can be passed.\n\t * - If no argument is given, all of target's legend will be shown.\n\t * @example\n\t * // Show legend for data1.\n\t * chart.legend.show(\"data1\");\n\t *\n\t * // Show legend for data1 and data2.\n\t * chart.legend.show([\"data1\", \"data2\"]);\n\t *\n\t * // Show all legend.\n\t * chart.legend.show();\n\t */\n\tshow: function(targetIds) {\n\t\tconst $$ = this.internal;\n\n\t\t$$.showLegend($$.mapToTargetIds(targetIds));\n\t\t$$.updateAndRedraw({withLegend: true});\n\t},\n\n\t/**\n\t * Hide legend for each target.\n\t * @method legend․hide\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String|Array} targetIds\n\t * - If targetIds is given, specified target's legend will be hidden.\n\t * - If only one target is the candidate, String can be passed.\n\t * - If no argument is given, all of target's legend will be hidden.\n\t * @example\n\t * // Hide legend for data1.\n\t * chart.legend.hide(\"data1\");\n\t *\n\t * // Hide legend for data1 and data2.\n\t * chart.legend.hide([\"data1\", \"data2\"]);\n\t *\n\t * // Hide all legend.\n\t * chart.legend.hide();\n\t */\n\thide: function(targetIds) {\n\t\tconst $$ = this.internal;\n\n\t\t$$.hideLegend($$.mapToTargetIds(targetIds));\n\t\t$$.updateAndRedraw({withLegend: true});\n\t}\n});\n\nextend(Chart.prototype, {legend});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {select as d3Select} from \"d3-selection\";\nimport Chart from \"../internals/Chart\";\nimport {window} from \"../internals/browser\";\nimport {notEmpty, isDefined, extend} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Resize the chart.\n\t * @method resize\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} size This argument should include width and height in pixels.\n\t * @example\n\t * // Resize to 640x480\n\t * chart.resize({\n\t * width: 640,\n\t * height: 480\n\t * });\n\t */\n\tresize(size) {\n\t\tconst config = this.internal.config;\n\n\t\tconfig.size_width = size ? size.width : null;\n\t\tconfig.size_height = size ? size.height : null;\n\n\t\tthis.flush();\n\t},\n\n\t/**\n\t * Force to redraw.\n\t * @method flush\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Boolean} [soft] For soft redraw.\n\t * @example\n\t * chart.flush();\n\t *\n\t * // for soft redraw\n\t * chart.flush(true);\n\t */\n\tflush(soft) {\n\t\tconst $$ = this.internal;\n\n\t\t// reset possible zoom scale\n\t\t$$.zoomScale = null;\n\n\t\tsoft ? $$.redraw({\n\t\t\twithTransform: true,\n\t\t\twithUpdateXDomain: true,\n\t\t\twithUpdateOrgXDomain: true,\n\t\t\twithLegend: true\n\t\t}) : $$.updateAndRedraw({\n\t\t\twithLegend: true,\n\t\t\twithTransition: false,\n\t\t\twithTransitionForTransform: false,\n\t\t});\n\t},\n\n\t/**\n\t * Reset the chart object and remove element and events completely.\n\t * @method destroy\n\t * @instance\n\t * @memberOf Chart\n\t * @example\n\t * chart.destroy();\n\t */\n\tdestroy() {\n\t\tconst $$ = this.internal;\n\n\t\tif (notEmpty($$)) {\n\t\t\t$$.charts.splice($$.charts.indexOf(this), 1);\n\n\t\t\t// clear timers\n\t\t\tisDefined($$.resizeTimeout) && window.clearTimeout($$.resizeTimeout);\n\n\t\t\td3Select(window).on(\"resize.bb\", null);\n\t\t\t$$.selectChart.classed(\"bb\", false).html(\"\");\n\n\t\t\t// releasing references\n\t\t\tObject.keys(this).forEach(key => {\n\t\t\t\tkey === \"internal\" && Object.keys($$).forEach(k => {\n\t\t\t\t\t$$[k] = null;\n\t\t\t\t});\n\n\t\t\t\tthis[key] = null;\n\t\t\t\tdelete this[key];\n\t\t\t});\n\t\t}\n\n\t\treturn null;\n\t},\n\n\t/**\n\t * Get or set single config option value.\n\t * @method config\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String} name The option key name.\n\t * @param {*} [value] The value accepted for indicated option.\n\t * @param {Boolean} [redraw] Set to redraw with the new option changes.\n\t * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.\n\t * @example\n\t * // Getter\n\t * chart.config(\"gauge.max\");\n\t *\n\t * // Setter\n\t * chart.config(\"gauge.max\", 100);\n\t *\n\t * // Setter & redraw with the new option\n\t * chart.config(\"gauge.max\", 100, true);\n\t */\n\tconfig(name, value, redraw) {\n\t\tconst $$ = this.internal;\n\t\tconst key = name && name.replace(/\\./g, \"_\");\n\t\tlet res;\n\n\t\tif (key in $$.config) {\n\t\t\tif (isDefined(value)) {\n\t\t\t\t$$.config[key] = value;\n\t\t\t\tres = value;\n\n\t\t\t\tredraw && this.flush(true);\n\t\t\t} else {\n\t\t\t\tres = $$.config[key];\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {isDefined} from \"../internals/util\";\n\n/**\n * Window object\n * @module\n * @ignore\n */\n/* eslint-disable no-new-func */\nconst win = isDefined(window) && window.Math === Math ?\n\twindow : isDefined(self) && (\n\t\tself.Math === Math ?\n\t\t\tself : Function(\"return this\")()\n\t);\n/* eslint-enable no-new-func */\n\nconst doc = win.document;\n\nexport {\n\twin as window,\n\tdoc as document\n};\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport Chart from \"../internals/Chart\";\nimport {isValue, isDefined, extend} from \"../internals/util\";\n\n/**\n * Define tooltip\n * @ignore\n */\nconst tooltip = extend(() => {}, {\n\t/**\n\t * Show tooltip\n\t * @method tooltip․show\n\t * @instance\n\t * @memberOf Chart\n\t * @param {Object} args The object can consist with following members:<br>\n\t *\n\t * | Key | Type | Description |\n\t * | --- | --- | --- |\n\t * | index | Number | Determine focus by index |\n\t * | x | Number | Date | Determine focus by x Axis index |\n\t * | data | Object | Determine focus data with following keys: `x` or `index`.<br>When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is set, the target is determined by mouse position and needs specify `x`, `id` and `value`. |\n\t * | mouse | Array | Determine x and y coordinate value relative the targeted x Axis element.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |\n\t *\n\t * @example\n\t * // show the 2nd x Axis coordinate tooltip\n\t * chart.tooltip.show({\n\t * index: 1\n\t * });\n\t *\n\t * // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element.\n\t * chart.tooltip.show({\n\t * data: {x: 2},\n\t * mouse: [50, 100]\n\t * });\n\t *\n\t * // show tooltip for timeseries x axis\n\t * chart.tooltip.show({\n\t * x: new Date(\"2018-01-02 00:00\")\n\t * });\n\t */\n\tshow: function(args = {}) {\n\t\tconst $$ = this.internal;\n\t\tlet index;\n\t\tlet mouse;\n\n\t\t// determine mouse position on the chart\n\t\tif (args.mouse) {\n\t\t\tmouse = args.mouse;\n\t\t}\n\n\t\t// determine focus data\n\t\tif (args.data) {\n\t\t\tif ($$.isMultipleX()) {\n\t\t\t\t// if multiple xs, target point will be determined by mouse\n\t\t\t\tmouse = [\n\t\t\t\t\t$$.x(args.data.x),\n\t\t\t\t\t$$.getYScale(args.data.id)(args.data.value)\n\t\t\t\t];\n\n\t\t\t\tindex = null;\n\t\t\t} else {\n\t\t\t\t// TODO: when tooltip_grouped = false\n\t\t\t\tindex = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);\n\t\t\t}\n\t\t} else if (isDefined(args.x)) {\n\t\t\tindex = $$.getIndexByX(args.x);\n\t\t} else if (isDefined(args.index)) {\n\t\t\tindex = args.index;\n\t\t}\n\n\t\t// emulate events to show\n\t\t($$.inputType === \"mouse\" ?\n\t\t\t[\"mouseover\", \"mousemove\"] : [\"touchstart\"]\n\t\t).forEach(eventName => {\n\t\t\t$$.dispatchEvent(eventName, index, mouse);\n\t\t});\n\t},\n\n\t/**\n\t * Hide tooltip\n\t * @method tooltip․hide\n\t * @instance\n\t * @memberOf Chart\n\t */\n\thide: function() {\n\t\tconst $$ = this.internal;\n\n\t\t$$.hideTooltip();\n\t\t$$.hideXGridFocus();\n\t\t$$.unexpandCircles();\n\t\t$$.unexpandBars();\n\t}\n});\n\nextend(Chart.prototype, {tooltip});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport ChartInternal from \"./ChartInternal\";\nimport {extend} from \"./util\";\n\nconst ua = window.navigator.userAgent;\n\nextend(ChartInternal.prototype, {\n\tisSafari() {\n\t\treturn ua.indexOf(\"Safari\") > -1 && !this.isChrome();\n\t},\n\n\tisChrome() {\n\t\treturn ua.indexOf(\"Chrome\") > -1;\n\t},\n\n\tisMobile() {\n\t\t// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent\n\t\treturn ua.indexOf(\"Mobi\") > -1;\n\t}\n});\n","/**\n * Copyright (c) 2017 NAVER Corp.\n * billboard.js project is licensed under the MIT license\n */\nimport {namespaces as d3Namespaces} from \"d3-selection\";\nimport Chart from \"../internals/Chart\";\nimport {extend, isFunction, toArray, getCssRules} from \"../internals/util\";\n\n/**\n * Encode to base64\n * @param {String} str\n * @return {String}\n * @private\n * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding\n */\nconst b64EncodeUnicode = str => btoa(\n\tencodeURIComponent(str)\n\t\t.replace(/%([0-9A-F]{2})/g, (match, p) => String.fromCharCode(`0x${p}`))\n);\n\n/**\n * Convert svg node to data url\n * @param {HTMLElement} node\n * @return {String}\n * @private\n */\nconst nodeToSvgDataUrl = node => {\n\tconst bounds = node.getBoundingClientRect();\n\tconst clone = node.cloneNode(true);\n\tconst styleSheets = toArray(document.styleSheets);\n\tconst cssRules = getCssRules(styleSheets);\n\tconst cssText = cssRules.filter(r => r.cssText).map(r => r.cssText);\n\n\tclone.setAttribute(\"xmlns\", d3Namespaces.xhtml);\n\n\tconst nodeXml = new XMLSerializer().serializeToString(clone);\n\n\t// foreignObject not supported in IE11 and below\n\t// https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx\n\tconst dataStr = `<svg xmlns=\"${d3Namespaces.svg}\" width=\"${bounds.width}\" height=\"${bounds.height}\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t<style>${cssText.join(\"\\n\")}</style>\n\t\t\t\t${nodeXml}\n\t\t\t</foreignObject></svg>`\n\t\t.replace(/#/g, \"%23\")\n\t\t.replace(\"/\\n/g\", \"%0A\");\n\n\treturn `data:image/svg+xml;base64,${b64EncodeUnicode(dataStr)}`;\n};\n\nextend(Chart.prototype, {\n\t/**\n\t * Export chart as an image.\n\t * - **NOTE:**\n\t * - IE11 and below not work properly due to the lack of the feature(<a href=\"https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx\">foreignObject</a>) support\n\t * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.\n\t * @method export\n\t * @instance\n\t * @memberOf Chart\n\t * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)\n\t * @param {Function} [callback] The callback to be invoked when export is ready.\n\t * @return {String} dataURI\n\t * @example\n\t * chart.export();\n\t * // --> \"data:image/svg+xml;base64,PHN...\"\n\t *\n\t * // Initialize the download automatically\n\t * chart.export(\"image/png\", dataUrl => {\n\t * const link = document.createElement(\"a\");\n\t *\n\t * link.download = `${Date.now()}.png`;\n\t * link.href = dataUrl;\n\t * link.innerHTML = \"Download chart as image\";\n\t *\n\t * document.body.appendChild(link);\n\t * });\n\t */\n\texport(mimeType = \"image/png\", callback) {\n\t\tconst svgDataUrl = nodeToSvgDataUrl(this.element);\n\n\t\tif (isFunction(callback)) {\n\t\t\tconst img = new Image();\n\n\t\t\timg.crosssOrigin = \"Anonymous\";\n\t\t\timg.onload = () => {\n\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\n\t\t\t\tcanvas.width = img.width;\n\t\t\t\tcanvas.height = img.height;\n\t\t\t\tctx.drawImage(img, 0, 0);\n\n\t\t\t\tcanvas.toBlob(blob => {\n\t\t\t\t\tcallback(window.URL.createObjectURL(blob));\n\t\t\t\t}, mimeType);\n\t\t\t};\n\n\t\t\timg.src = svgDataUrl;\n\t\t}\n\n\t\treturn svgDataUrl;\n\t}\n});\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC3EA;AACA;;;AACA;;;;AATA;;;;AAaA;AACA;;;;;;;AAOA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAA;;;;;;;;;;;AAWA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AADA;AAFA;AAFA;AA9DA;AACA;AAwEA;AAsDA;AACA;;;;;;;;;;;;;;;;;;ACrIA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AAAA;AACA;AACA;AA0CA;AACA;AAIA;AACA;AACA;;;;;;;;AArDA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACcA;;;;;;;AAOA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAKA;AACA;AACA;AAAA;AAAA;AAKA;AACA;AAEA;AAAA;AAKA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AAiBA;AACA;AAEA;AAAA;AAAA;AAMA;AAiCA;AACA;AAQA;AACA;AA2BA;AADA;AAYA;AAEA;AAAA;AAIA;AACA;AACA;AAOA;AACA;AACA;AAFA;AACA;AA8DA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAcA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AA6EA;AACA;AA/DA;AAsDA;AACA;AACA;AACA;AACA;AACA;AANA;AAWA;AACA;AACA;AAEA;AACA;AACA;AACA;AAIA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AAGA;AACA;AACA;AACA;AAHA;AAKA;AACA;AADA;AAlBA;AAsBA;AAGA;AAEA;AAAA;AAEA;AAAA;AAFA;AAAA;AAAA;AAAA;AAKA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA;AAKA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AAJA;AASA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AACA;AAJA;AASA;AACA;AACA;AACA;AAJA;AAgDA;AAQA;AACA;AACA;AACA;AAqBA;AAOA;AACA;AACA;AACA;AAAA;AAIA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAbA;AACA;AAyBA;AATA;AACA;AACA;AAKA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAkFA;AACA;AA3BA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AACA;AACA;AAGA;AAAA;AAIA;AACA;AAWA;AAEA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAIA;AAzGA;AAAA;AAAA;AAAA;AAAA;AAuHA;AACA;AACA;AAmEA;AA5LA;AAAA;AAAA;AAkMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAjMA;AAAA;AAAA;AA8NA;AAEA;AACA;AAjCA;AACA;AACA;AAeA;AACA;AACA;AASA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AAIA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAMA;AA6BA;AAGA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAGA;AACA;AAGA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AAyBA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AAGA;AAEA;AAGA;AACA;AACA;AAEA;AAGA;AACA;AAGA;AACA;AAEA;AACA;AAEA;AAAA;AACA;AACA;AAQA;AACA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAMA;AAuCA;AAGA;AACA;AACA;AAOA;AAEA;AAAA;AAAA;AAKA;AAiCA;AAGA;AACA;AACA;AAiBA;AAEA;AAAA;AAIA;AACA;AAAA;AAIA;AAIA;AAEA;AACA;AAGA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AALA;AACA;AAkBA;AAZA;AACA;AAGA;AAEA;AACA;AAAA;AACA;AAEA;AAGA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AA1BA;AA4BA;AACA;AAOA;AALA;AAGA;AAGA;AAEA;AAAA;AACA;AACA;AAeA;AACA;AAGA;AAEA;AAAA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAWA;AACA;AA9uCA;;;;;;;AA6BA;;;;;;;AC7BA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;ACQA;AACA;AACA;AACA;AACA;;;;;AAEA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AAAA;AAAA;AAAA;AAKA;AAGA;AACA;AAOA;AACA;AAUA;AACA;AAGA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA;AAJA;AAAA;AACA;AACA;AAoCA;AAdA;AAAA;AAeA;AAGA;AAAA;AAAA;AAIA;AACA;AACA;AACA;AACA;AALA;AAHA;AACA;AACA;AAkBA;AAJA;AACA;AAIA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAmBA;AACA;AAGA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAmBA;AATA;AAAA;AAKA;AAAA;AAIA;AAAA;AAIA;AAEA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AAKA;AAKA;AAEA;AAAA;AAAA;AAAA;AAMA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAeA;AAEA;AAAA;AAAA;AASA;AAEA;AAAA;AAAA;AASA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;AACA;AACA;AAAA;AACA;AAEA;AAEA;AACA;AAGA;AACA;AAKA;AACA;AAEA;AAAA;AAAA;AAGA;AACA;AACA;AAHA;AACA;AAKA;AAAA;AAAA;AAIA;AAKA;AACA;AAGA;AACA;AASA;AAXA;AAaA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AAIA;AACA;AACA;AACA;AAKA;AAHA;AAAA;AAIA;AAGA;AAAA;AAAA;AAIA;AAAA;AAJA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AAEA;AAAA;AAIA;AACA;AACA;AAMA;;;AAjhBA;;;;;;;;;;;;ACiCA;AACA;AAaA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAFA;AAAA;AACA;AASA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAAA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAsEA;AACA;AACA;AAwBA;AACA;AACA;AACA;AAAA;AACA;AAOA;AACA;AACA;AAOA;AACA;AACA;AA/CA;AAAA;AACA;AACA;AAGA;AACA;AANA;AAAA;AAAA;AAAA;AAAA;AAiDA;AACA;AAzHA;AACA;AACA;AAHA;AAAA;AAQA;AACA;AACA;AAAA;AAVA;AAAA;AAAA;AAAA;AACA;AAYA;AACA;AACA;AAEA;AACA;AACA;AAKA;AACA;AAGA;AA5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAqCA;AACA;AACA;AACA;AACA;AAKA;AA/CA;AAAA;AAAA;AAAA;AAuDA;AAvDA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8HA;AACA;AAOA;AAAA;AAAA;AACA;AAEA;AAMA;AAAA;AACA;AACA;AAAA;AAjJA;AAAA;AAAA;AAsJA;AAIA;AACA;AACA;AAGA;AACA;AACA;AAjKA;AAAA;AAoKA;AACA;AACA;AACA;AAvKA;AACA;AA2KA;AACA;AACA;AAkFA;AA5EA;AACA;AAKA;AACA;AACA;AACA;AACA;AAWA;AAEA;AAjCA;AAAA;AAFA;AAAA;AACA;AAAA;AAoFA;AACA;AAEA;AAAA;AAIA;AAAA;AAAA;AAEA;AACA;AAKA;AAEA;AACA;AACA;AAlWA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAodA;AAnHA;AAQA;AAEA;AAMA;AACA;AACA;AACA;AAJA;AAQA;AAEA;AAQA;AAEA;AAQA;AAQA;AAAA;AASA;AACA;AACA;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AADA;AAQA;AAEA;AAQA;AAGA;AACA;AAAA;AAEA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAGA;AACA;;;;AAnfA;AACA;AACA;AACA;AACA;AAFA;AACA;AAqBA;AAdA;AAAA;AAAA;AAAA;AAKA;AAMA;AACA;AAGA;AACA;AArCA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAdA;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;;;;ACQA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAKA;AAAA;AAAA;AAQA;AAAA;AAAA;AAQA;AAAA;AAAA;AAEA;AAAA;AAAA;AAIA;AACA;AACA;AAGA;AAFA;AAAA;AAGA;AASA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AAQA;AAAA;AAAA;AAGA;AACA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AACA;AACA;AAAA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AADA;AAGA;AAGA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAOA;AACA;AAEA;AACA;AACA;AAFA;AAWA;AAEA;AAAA;AAAA;AACA;AAAA;AACA;AAGA;AACA;AAQA;AAAA;AAAA;AAaA;AAAA;AACA;AAAA;AACA;AAGA;AACA;AAgBA;AAbA;AACA;AACA;AAQA;AAIA;AAQA;AAAA;AAAA;AAQA;AACA;AACA;AAWA;AATA;AACA;AAGA;AACA;AACA;AACA;AAGA;AAGA;AACA;AACA;AAAA;AACA;AADA;AAAA;AACA;AAGA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AAMA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AANA;AAQA;AApDA;AACA;AApMA;;;;;;;;AAQA;;;;;;;;AAoBA;;;;;;;;;AAcA;;;;;;;;AAQA;AACA;AACA;AA8BA;AACA;AACA;AAoCA;;;;;;;;AAQA;;;;;;;;;;;;;AAoCA;;;;;;;;AAQA;;;;;;;;AAsBA;AA5NA;;;;;;AAqRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;ACRA;;;;;;;;;;ACAA;;;;AAIA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApFA;;;;;;;ACRA;;;;;;;;;;;;;;;;;;ACQA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAAA;AACA;AACA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AAFA;AAWA;AACA;AACA;AACA;AAOA;AACA;AA7CA;;;;;;;;;;;;;;;;;;;ACRA;;;;AAIA;;;;;;AAMA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;AAcA;AAAA;AAAA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA;AACA;AAEA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;AAeA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;AAuBA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AA3xFA;AA6xFA;AACA;AAhyFA;;;;;;;;;;;;;;;;;ACCA;AACA;AACA;AAGA;AACA;AACA;AAAA;;;;;;;;;AASA;AAAA;AAAA;AACA;AACA;AAEA;AAIA;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAEA;AAAA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAuBA;AApBA;AAAA;AACA;AAAA;AAKA;AACA;AAFA;AAYA;AAIA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAWA;AAAA;AAGA;AAAA;AA4BA;AA5IA;;;;;;;;;;;;;;;;;;;ACHA;AAIA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAqDA;AACA;AAzCA;AAEA;AAAA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAKA;AAAA;AAIA;AAIA;AAbA;AAlBA;AAoCA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAGA;AAAA;AAHA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAeA;AACA;AAKA;AACA;AACA;AAEA;AA1BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAsDA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AAAA;AAKA;AAEA;AACA;AAKA;AACA;AACA;AAcA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AARA;AAAA;AACA;AACA;AA0BA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AACA;AAmBA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAaA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAaA;AACA;AAlSA;;;;;;;;;;;;;;;;;;;;;;ACgBA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AALA;AAGA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAIA;AAEA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAHA;AAKA;AAEA;AACA;AACA;AACA;AAIA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AANA;AAAA;AAEA;AAEA;AAGA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AAAA;AADA;AAAA;AAAA;AAOA;AAAA;AAAA;AAIA;AAOA;AAIA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAcA;AATA;AAIA;AAMA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAFA;AAAA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAmBA;AAjBA;AACA;AACA;AACA;AACA;AACA;AAOA;AAGA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAKA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;AACA;AACA;AAXA;AACA;AAAA;AADA;AAAA;AACA;AAIA;AACA;AAMA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAHA;AAAA;AAKA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AAaA;AANA;AAAA;AAEA;AACA;AAIA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAOA;AACA;AAOA;AACA;AAEA;AAAA;AAAA;AAEA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAsBA;AArBA;AAAA;AAEA;AACA;AACA;AAGA;AAIA;AAAA;AAEA;AACA;AACA;AAIA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AAGA;AAdA;AAAA;AAAA;AACA;AAgBA;AACA;AAiBA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAmBA;AAjBA;AAAA;AAIA;AACA;AACA;AACA;AAHA;AAOA;AACA;AACA;AAHA;AAKA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AAKA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhrBA;;;;;;;;;AC5BA;;;;;;;;;;;;;;;;;ACAA;;;;AAcA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AACA;AADA;AACA;AAIA;AAEA;AAEA;AACA;AACA;AAKA;AAIA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AAYA;AANA;AACA;AAMA;AAEA;AACA;AACA;AACA;AAFA;AAIA;AAEA;AACA;AACA;AACA;AAFA;AAIA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AAUA;AACA;AACA;AAAA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAFA;AAAA;AAAA;AAMA;AACA;AAEA;AAAA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AACA;AAAA;AAGA;AACA;AAAA;AACA;AANA;AACA;AAQA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AACA;AAKA;AAAA;AAEA;AAAA;AAWA;AAAA;AAIA;AAIA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAIA;AAAA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AA2BA;AACA;AAAA;AAAA;AAjCA;AAmCA;AACA;AACA;AACA;AACA;AAkCA;AAjCA;AACA;AAAA;AACA;AACA;AAEA;AACA;AAKA;AACA;AACA;AACA;AAGA;AAAA;AACA;AASA;AAAA;AAIA;AAAA;AAGA;AA3SA;;;;;;ACdA;;;;;;;;;;;;;;;;;ACQA;AACA;AAAA;AAAA;AAIA;AASA;AACA;AACA;AACA;AAKA;AAEA;AACA;AACA;AACA;AAEA;AAUA;AACA;AACA;AAHA;AAOA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAMA;AACA;AAUA;AAEA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AASA;AAfA;AAaA;AAAA;AAQA;AAAA;AAQA;AAMA;AAAA;AACA;AACA;AA5GA;;;;;;;;;;;;;;;;;;ACRA;;;;AAOA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAXA;;;;;;;;;;;;;;;;;;;ACOA;AACA;;;;;AAKA;AACA;AACA;AACA;AAIA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAaA;AACA;AAKA;AAQA;AACA;AACA;AACA;AAEA;AAAA;AAQA;AACA;AACA;AAKA;AAEA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AARA;AAWA;AACA;AAMA;AACA;AAnBA;AAsBA;AAEA;AAAA;AAIA;AAKA;AACA;AAlCA;AAAA;AAAA;AAAA;AAAA;AA2CA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAeA;AACA;AA7BA;AACA;AACA;AACA;AA2BA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAUA;AAMA;AAAA;AACA;AACA;AAEA;AAEA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAHA;AAiBA;AAEA;AAAA;AACA;AACA;AAEA;AAJA;AAcA;AACA;AACA;AACA;AAIA;AACA;AACA;AAKA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAWA;AAYA;AAEA;AACA;AAEA;AACA;AACA;AASA;AAAA;AAEA;AACA;AAEA;AAAA;AAAA;AAIA;AAIA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AAbA;AAAA;AAsBA;AAAA;AACA;AAFA;AACA;AAEA;AAxBA;AAyCA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAKA;AAEA;AAAA;AAAA;AAIA;AAIA;AAAA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAQA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AA8CA;AAzCA;AAKA;AAEA;AACA;AAAA;AAAA;AAOA;AAPA;AAgBA;AAEA;AACA;AACA;AAGA;AACA;AACA;AAIA;AAAA;AAVA;AAWA;AAIA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAYA;AACA;AAYA;AAXA;AAAA;AAAA;AAOA;AAQA;AAKA;AApBA;AAsBA;AACA;AACA;AAgBA;AAZA;AACA;AAGA;AAKA;AAIA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAgBA;AANA;AACA;AACA;AACA;AAJA;AAQA;AAxkBA;;;;;;;;;ACdA;;;;;;;;;;;;;;;;;ACQA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAcA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAkBA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAMA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAWA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAqBA;AAvBA;AAwCA;AAEA;AACA;AACA;AA9LA;;;;;;;;;;;;;;;;;;;;;;ACqBA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AA0BA;AApBA;AAOA;AACA;AAAA;AACA;AACA;AAGA;AAGA;AAKA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAAA;AAAA;AACA;AAIA;AACA;AAYA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAGA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAiCA;AA5BA;AACA;AACA;AAUA;AAAA;AAIA;AAGA;AAOA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAaA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlBA;AAoBA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAKA;AAvKA;;;;;;;;;AC7BA;;;;;;;;;;;;;;;;;;;;;ACkBA;AACA;AAAA;AAAA;AAAA;AAAA;AASA;AAEA;AAAA;AAAA;AAAA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AAEA;AACA;AAGA;AAEA;AAEA;AACA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA;AAOA;AAuBA;AAEA;AAAA;AAAA;AAAA;AAOA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAOA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AAMA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AALA;AAAA;AAAA;AAAA;AACA;AACA;AAWA;AACA;AAGA;AACA;AAGA;AAGA;AAAA;AAIA;AACA;AAIA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AAMA;AACA;AAIA;AACA;AACA;AACA;AAWA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAGA;AAAA;AATA;AAcA;AAEA;AAAA;AAAA;AAAA;AAaA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAGA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA;AAAA;AATA;AAcA;AAWA;AAEA;AACA;AACA;AACA;AAMA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAAA;AAAA;AAOA;AAAA;AAAA;AAWA;AAGA;AACA;AAEA;AACA;AAMA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAvBA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AA8FA;AA7DA;AAAA;AACA;AAAA;AAGA;AAMA;AAIA;AAAA;AAEA;AACA;AAEA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAMA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAGA;AA1CA;AA6CA;AACA;AAIA;AAAA;AAIA;AAMA;AAKA;AAAA;AAAA;AAAA;AAAA;AAQA;AARA;AAWA;AAEA;AAAA;AAAA;AAAA;AAOA;AAPA;AAUA;AACA;AAAA;AAIA;AACA;AAIA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AAVA;AAcA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AAVA;AAcA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AAEA;AACA;AACA;AAEA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAYA;AARA;AAAA;AAGA;AAAA;AAMA;AACA;AACA;AAEA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AAkBA;AACA;AAEA;AAAA;AAAA;AAAA;AAKA;AAqBA;AAEA;AACA;AACA;AAxtBA;;;;;;;;;AClBA;;;;;;;;;;;;;;;;;;ACAA;;;;AASA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA;AAAA;AATA;AACA;AACA;AAaA;AACA;AAEA;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AACA;AACA;AAcA;AAEA;AACA;AAMA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAGA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AAAA;AACA;AAAA;AACA;AAJA;AACA;AAKA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AAOA;AAAA;AAAA;AAIA;AACA;AACA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAMA;AACA;AAMA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAcA;AAIA;AApMA;;;;;;;;;;;;;;;;ACEA;AACA;;;;AAIA;AAAA;AAAA;AAIA;AAKA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AACA;AACA;AAYA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AAJA;AAUA;AAAA;AAVA;AAAA;AACA;AACA;AAYA;AACA;AA5DA;;;;;;;;;;;;;;;;;;;;;;ACKA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AAAA;AAZA;AACA;AACA;AAiBA;AACA;AAUA;AAAA;AAIA;AAAA;AAKA;AAGA;AACA;AACA;AAIA;AAEA;AACA;AACA;AACA;AAYA;AAAA;AAIA;AAAA;AAEA;AAEA;AACA;AAMA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAkBA;AAfA;AACA;AACA;AAAA;AACA;AACA;AAKA;AAGA;AACA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA;AAAA;AATA;AAUA;AAAA;AAVA;AACA;AAuBA;AAHA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAyBA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAGA;AAGA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA;AACA;AAKA;AACA;AACA;AAVA;AACA;AACA;AASA;AACA;AACA;AAAA;AAAA;AACA;AAGA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AAzCA;AAyCA;AAAA;AAAA;AAAA;AAzCA;AA0CA;AAAA;AAAA;AAAA;AA1CA;AA6CA;AAAA;AA7CA;AA+CA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AACA;AACA;AAGA;AACA;AAhEA;AACA;AA2CA;AACA;AACA;AAoBA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAAA;AAAA;AAeA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAcA;AACA;AAKA;AAEA;AACA;AACA;AACA;AAIA;AAAA;AAEA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAAA;AAVA;AAWA;AAAA;AAXA;AAiBA;AAAA;AACA;AAMA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AASA;AAAA;AAQA;AACA;AAQA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAMA;AACA;AAIA;AAJA;AAMA;AACA;AAEA;AACA;AACA;AACA;AAKA;AAAA;AAUA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAGA;AACA;AACA;AAAA;AAAA;AAIA;AACA;AACA;AACA;AAAA;AACA;AACA;AAMA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAGA;AAEA;AAAA;AAAA;AAAA;AAKA;AAIA;AAAA;AAEA;AAAA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAIA;AAJA;AAAA;AASA;AAIA;AAAA;AAAA;AAAA;AASA;AAGA;AAEA;AAEA;AAAA;AAAA;AAAA;AAMA;AACA;AAGA;AAIA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAYA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAhpBA;;;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAIA;AAOA;AAAA;AAKA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AAEA;AAAA;AACA;AACA;AAMA;AAEA;AAGA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAKA;AAEA;AACA;AAAA;AAIA;AACA;AALA;AAOA;AAAA;AAPA;AAQA;AAAA;AARA;AACA;AAUA;AACA;AACA;AACA;AAYA;AACA;AAKA;AAGA;AA7CA;AACA;AA+CA;AACA;AACA;AACA;AAKA;AAEA;AACA;AAAA;AACA;AAGA;AACA;AAKA;AACA;AACA;AACA;AAYA;AACA;AAKA;AAGA;AA5CA;AACA;AA8CA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAMA;AAEA;AACA;AAAA;AAAA;AAGA;AAAA;AAHA;AAIA;AAAA;AAJA;AACA;AAOA;AACA;AACA;AACA;AAYA;AACA;AAKA;AAGA;AA7CA;AAvLA;;;;;;;;;;;;;;;;;;;;;;ACKA;;;;;;;;;;;AAWA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAnCA;;;;AAoCA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AAkBA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AAEA;AAAA;AAAA;AAIA;AAKA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMA;AAAA;AACA;AAQA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AAIA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAUA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAMA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;AAAA;AAXA;AAAA;AAeA;AAAA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AAtBA;AACA;AAaA;AAcA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAUA;AAAA;AAMA;AAAA;AAOA;AAAA;AAEA;AAAA;AAKA;AAAA;AACA;AAAA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AAAA;AACA;AACA;AAUA;AAAA;AACA;AAAA;AAQA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AAAA;AAIA;AAEA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAOA;AAPA;AASA;AAEA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AASA;AAAA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AAnTA;;;;;;;;;;;;;;;;;;ACtCA;;;;AAYA;AACA;;;;AAIA;AACA;AACA;AACA;AAIA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AAAA;AAPA;AAcA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AAAA;AAYA;AAAA;AAEA;AAAA;AAEA;AAAA;AACA;AACA;AACA;AAAA;;;;;;;;;AASA;AACA;AAOA;AACA;AACA;AAAA;;;;;;;;AAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AA2BA;AALA;AACA;AAKA;AACA;AACA;AAAA;;;;;;;;;AASA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAAA;;;;;;;;AAQA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAmBA;AACA;AACA;AACA;AAAA;;;;;;;;AAQA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AAkBA;AACA;AACA;AAOA;AACA;AAEA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAnPA;;;;;;;;;;;;;;;ACZA;;;;AAOA;AACA;AAAA;AAAA;AAIA;AACA;AAEA;AAKA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAsBA;AAhBA;AACA;AAFA;AAMA;AAGA;AAGA;AAMA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAIA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AAKA;AAEA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAiBA;AArLA;;;;;;;;;;;;;;;;;;ACKA;AAZA;;;;AAaA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AAOA;AACA;AAVA;AACA;AAWA;AACA;AAAA;AAAA;AAIA;AAIA;AAEA;AACA;AACA;AACA;AAQA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AAAA;AAJA;AAMA;AAAA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AAJA;AAoBA;AACA;AACA;AACA;AACA;AAAA;AAIA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAMA;AAkBA;AAEA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AAUA;AACA;AACA;AACA;AAWA;AAAA;AAMA;AAAA;AAGA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AAAA;AAmBA;AAAA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAiBA;AAFA;AAAA;AAMA;AAEA;AAAA;AAAA;AAIA;AAgBA;AAEA;AAAA;AAAA;AAAA;AAAA;AAIA;AAAA;AAJA;AAAA;AAQA;AACA;AAGA;AAYA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAIA;AAKA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAGA;AAIA;AAAA;AACA;AAGA;AACA;AAEA;AACA;AACA;AACA;AAOA;AANA;AAIA;AAGA;AAAA;AAAA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AACA;AACA;AAMA;AACA;AACA;AAdA;AAAA;AAeA;AA/WA;;;;;;;;;;;;;;;;;;AC3BA;;;;AASA;AACA;;;;AAIA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAKA;AACA;AAKA;AACA;AACA;AACA;AACA;AAAA;AAMA;AACA;AACA;AACA;AAAA;;;;;;;;;AASA;AAAA;AAAA;AAAA;AAAA;AAIA;AAAA;AAJA;AAAA;AAAA;AAQA;AAAA;AARA;AASA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AAGA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAtCA;AAAA;AAAA;AAAA;AACA;AACA;AA4CA;AACA;AAIA;AACA;AACA;AACA;AAGA;AACA;AAaA;AATA;AAAA;AAUA;AACA;AACA;AAHA;AAAA;AASA;AAOA;AAxCA;AACA;AA0CA;AACA;AACA;AACA;AAAA;;;;;;;;;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAQA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAQA;AACA;AACA;AACA;AAcA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAAA;AAAA;AAIA;AAAA;AAJA;AACA;AACA;AAKA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AAOA;AAMA;AACA;AACA;AAHA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AApCA;AAuCA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAIA;AAOA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlTA;;;;;;;;;;;;;;;;;;ACTA;;;;AAaA;AACA;;;;AAIA;AAAA;AAAA;AAIA;AAkBA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AAKA;AAIA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAAA;AAKA;AAGA;AAJA;AASA;AACA;AAEA;AACA;AACA;AALA;AAQA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AACA;AAUA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AACA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAIA;AAcA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAIA;AASA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAKA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAGA;AAWA;AAKA;AAIA;AAEA;AAOA;AAEA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBA;AAAA;AAvBA;AAAA;AAAA;AAAA;AACA;AAiCA;AACA;AAnCA;AAqCA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA;AAcA;AACA;AAjBA;AACA;AACA;AAuBA;AACA;AAQA;AACA;AACA;AASA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAMA;AAAA;AAOA;AACA;AA1FA;AACA;AACA;AAyFA;AAMA;AAAA;AACA;AAAA;AAEA;AAAA;AACA;AAAA;AAEA;AAAA;AACA;AAAA;AACA;AA9HA;AAgIA;AAAA;AAhIA;AAiIA;AAAA;AAjIA;AAkIA;AAAA;AAlIA;AAmIA;AAAA;AAnIA;AAqIA;AAAA;AArIA;AAsIA;AAAA;AAtIA;AAuIA;AAAA;AAvIA;AACA;AA0IA;AACA;AACA;AAIA;AAGA;AAAA;AAEA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AAKA;AACA;AAEA;AAAA;AAEA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAWA;AACA;AACA;AACA;AAMA;AAEA;AAAA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AASA;AANA;AAAA;AACA;AAAA;AAMA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAIA;AACA;AACA;AACA;AAEA;AAMA;AACA;AACA;AAQA;AAAA;AAeA;AAlpBA;;;;;;;;;;;;;;;ACbA;;;;AAOA;AACA;;;;AAIA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAeA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AACA;AAtEA;;;;;;;;;;;;;;;ACPA;;;;AAOA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAKA;AACA;AAEA;AACA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAhGA;;;;;;;;;;;;;;;;;;ACPA;;;;AASA;AACA;AACA;AACA;AACA;AAGA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAqBA;AAEA;AAAA;AAAA;AACA;AACA;AAQA;AAEA;AAAA;AAGA;AAGA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAqBA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAsBA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAlIA;;;;;;;;;;;;;;;;;;ACTA;;;;AASA;AACA;;;;;;AAMA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAEA;AAFA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBA;AASA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAYA;AAcA;AACA;AACA;AAEA;AAMA;AA/DA;AAgEA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AAYA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAIA;AAcA;AAEA;AACA;AACA;AAjIA;;;;;;;;;;;;;;;;;;;ACCA;AACA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAQA;AAAA;AAGA;AAAA;AACA;AAAA;AAIA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AASA;AACA;AACA;AAAA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AAIA;AAAA;AAEA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AAIA;AAAA;AAEA;AACA;AACA;AAAA;;;;;;;;AAQA;AACA;AAGA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AACA;AAIA;AAEA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AAIA;AACA;AACA;AACA;AAIA;AACA;AAjLA;;;;;;;;;ACVA;;;;;;;;;;;;;;;;;;;ACgBA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AAIA;AACA;AAKA;AAJA;AAAA;AAKA;AAGA;AAAA;AAIA;AAeA;AAEA;AAAA;AAGA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AAAA;AACA;AACA;AA8BA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AADA;AAAA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AAhBA;AAAA;AACA;AACA;AAwBA;AACA;AAUA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAkBA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AAEA;AAOA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAiBA;AACA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AAEA;AAOA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAkBA;AACA;AAGA;AACA;AAAA;;;;;;;AAOA;AACA;AACA;AAEA;AAQA;AACA;AACA;AAAA;;;;;;;;;;;AAWA;AACA;AAAA;AACA;AACA;AAIA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AAAA;AAJA;AAAA;AAAA;AASA;AAOA;AAEA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAIA;AACA;AACA;AACA;AACA;AACA;AALA;AASA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAIA;AASA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AAxZA;;;;;;;;;;;;;;;;;;;;;;;;ACEA;AACA;;;;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAIA;AAeA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAIA;AACA;AAQA;AADA;AAAA;AAAA;AAMA;AAMA;AAGA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAIA;AAKA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAwBA;AACA;AACA;AACA;AACA;AALA;AAvBA;AAiCA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAQA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAEA;AAMA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAEA;AAgBA;AAEA;AAKA;AACA;AAAA;AACA;AAEA;AAWA;AAAA;AAEA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AACA;AACA;AAEA;AAEA;AAAA;AAAA;AAAA;AAKA;AAYA;AA7SA;;;;;;;;;AClBA;;;;;;;;;;;;;;;;;;;ACUA;;;;;;;;;AASA;AACA;AACA;AAQA;AACA;AACA;AAFA;AAIA;AAIA;AACA;AAHA;AACA;AApCA;;;;;;AAuCA;AACA;;;;;;AAMA;AAAA;AAAA;AACA;AACA;AAGA;AAAA;AAIA;AACA;AACA;AAEA;AACA;AACA;AAMA;AAAA;AAKA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAUA;AAAA;AAAA;AAIA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAPA;AACA;AAOA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAmBA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AACA;AACA;AACA;AAIA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAxHA;;;;;;;;;;;;;;;ACvCA;;;;AAOA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAGA;AAAA;AAHA;AACA;AAKA;AACA;AACA;AASA;AAJA;AAAA;AAKA;AArDA;;;;;;;;;;;;;;;AChBA;;;;AAOA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAKA;AACA;AACA;AAAA;AAEA;AAEA;AAAA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AAAA;AAEA;AACA;AACA;AAAA;;;;;AAKA;AACA;AACA;AACA;AAMA;AAjDA;;;;;;;;;;;;;;;;;ACEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAKA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AA5JA;;;;;;;;;;;;;;;;;;;;;ACTA;;;;AASA;AACA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AAAA;AAAA;AAOA;AAWA;AAAA;AACA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AAAA;AAAA;AAOA;AAIA;AAAA;AAEA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAOA;AACA;AAMA;AA3GA;;;;;;;;;;;;;;;ACTA;;;;AAOA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AAAA;AAAA;AAAA;AAIA;AACA;AAAA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AAHA;AAKA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;;;AAmBA;AAAA;AAAA;AAAA;AAIA;AACA;AAAA;AACA;AACA;AAGA;AACA;AAKA;AACA;AACA;AAHA;AAKA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;;;AAmBA;AAAA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AAAA;AAKA;AAAA;AACA;AAlHA;;;;;;;;;;;;;;;;;ACKA;;;;;;;;;;;;;;AAZA;;;;AA0BA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAKA;AAHA;AAAA;AAIA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAOA;AAKA;AACA;AACA;AACA;AACA;AACA;AAHA;AAQA;AACA;AAIA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AAAA;AAAA;AAAA;AAAA;AAKA;AAgBA;AACA;AACA;;;;;;;;;;;AAWA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AAMA;AACA;AACA;AAFA;AAIA;AAnHA;AAuHA;AACA;AACA;;;;;;;;AAQA;AAAA;AAAA;AAIA;AASA;AACA;AAFA;AAKA;AA5BA;;;;;;;;;;;;;;;AC/LA;;;;AAOA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA;AAAA;AAAA;AACA;AAGA;AACA;AA0BA;AA/BA;AAYA;AACA;AASA;AACA;AAKA;AACA;AAWA;AAAA;AACA;AAJA;AASA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;;AAkBA;AAAA;AAAA;AAIA;AAOA;AACA;AACA;AACA;AAHA;AAOA;AACA;AAxHA;;;;;;;;;;;;;;;;;;;;;;ACKA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAMA;AACA;AAOA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AAEA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAJA;AAOA;AAEA;AAKA;AACA;AACA;AAEA;AACA;AACA;AACA;AAJA;AACA;AAOA;AACA;AAKA;AAGA;AAGA;AACA;AACA;AACA;AAtGA;AAAA;AACA;AACA;AAwGA;AACA;AAIA;AACA;AA8BA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AAXA;AAaA;AA3MA;AA+MA;;;;;;;AAOA;AAAA;AAAA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAgCA;AACA;AAIA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAyBA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AAuCA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAOA;AAcA;AACA;AACA;AACA;AACA;AA6BA;AAIA;AACA;AAAA;AADA;AAEA;AAAA;AACA;AACA;AAAA;AAKA;AACA;AACA;AAmBA;AACA;AACA;AAnOA;;;;;;;;;AC1NA;;;;;;;;;;;;;;;;;;ACAA;;;;AASA;AACA;;;;;;;;;;;;;;;;AAgBA;AAAA;AAAA;AACA;AACA;AASA;AAJA;AACA;AACA;AAAA;AAGA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;AAwBA;AAAA;AAAA;AAIA;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAWA;AACA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AAAA;AAIA;AAMA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAOA;AACA;AApIA;;;;;;;;;;;;;;;;;ACDA;AACA;;;;;;;;;;;;;;;;;AAiBA;AAAA;AAAA;AAKA;AACA;AAxBA;AA4BA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAKA;AAMA;AAnBA;;;;;;;;;;;;;;;;;;ACnCA;;;;AAOA;AACA;;;;;;;;;;;;AAYA;AAAA;AAAA;AAAA;AAYA;AAzBA;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;AAPA;;;;AAoBA;AAAA;AAAA;AAAA;AAYA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AAhDA;AACA;AACA;AAkDA;;;;;;;;;;;;;AAaA;AAAA;AAAA;AAAA;AAYA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AAIA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AAhDA;AAoDA;AACA;AAFA;;;;;;;;;;;;;;;;;AC5JA;;;;;;;;;;;;;;AAcA;AAAA;AAAA;AAAA;AAYA;;;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AAAA;AAAA;AAAA;AAYA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAAA;AACA;AACA;AAoBA;AAfA;AACA;AAFA;AAQA;AAGA;AAGA;AAGA;AArFA;;;;;;;;;;;;;;;AC7BA;;;;;;;;;;;;;;;;AAPA;;;;AAuBA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AA7GA;;;;;;;;;;;;;;;AC9BA;;;;AAOA;AACA;;;;;;;;;;AAUA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AAAA;;;;;;;;;;;AAWA;AAAA;AAAA;AAAA;AAYA;AA9CA;;;;;;;;;;;;;;;ACPA;;;;AAOA;AACA;;;;;;;;;AASA;AACA;AACA;AAZA;;;;;;;;;;;;;;;ACPA;;;;AAOA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AAUA;AALA;AACA;AAFA;AAOA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AAUA;AALA;AACA;AAFA;AAOA;AA5DA;;;;;;;;;;;;;;;ACAA;;;;;;;;AAPA;;;;AAeA;AAAA;AAAA;AAAA;AACA;AACA;AAoBA;AALA;AACA;AAFA;AAOA;AASA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AAHA;AAKA;AAMA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AAGA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AACA;AAGA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AAqBA;AACA;AACA;AACA;AAKA;AACA;AAFA;AACA;AAKA;AACA;AA7GA;AACA;AAzBA;;;;;;;;;AAoBA;;;;;;AAoHA;;;;;;;;;;;;;;;ACzKA;;;;AAPA;;;;AAWA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;;AAmBA;AACA;AACA;AACA;AAEA;AAnDA;AACA;AAqDA;;;;;;;;;;;;;;;;;ACjEA;;;;AASA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AAIA;AACA;AACA;AAAA;;;;;;;;;;;;AAYA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAJA;AAMA;AACA;AACA;AAHA;AAKA;AACA;AACA;AAAA;;;;;;;;AAQA;AAAA;AAAA;AACA;AAsBA;AATA;AACA;AACA;AAIA;AAIA;AACA;AACA;AAAA;;;;;;;;;;;;;;;;;;;AAmBA;AAAA;AAAA;AAAA;AACA;AACA;AAcA;AACA;AA3HA;;;;;;;;;;;;;ACGA;AAOA;AACA;AAdA;;;;;AAKA;AACA;AACA;AAIA;AACA;AAlBA;;;;AAsBA;AACA;;;;;;;;;;;;;;;AChBA;;;;AAPA;;;;AAWA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AA4BA;AACA;AACA;AACA;AACA;;;;;;AAMA;AACA;AACA;AACA;AAIA;AAnFA;AACA;AAqFA;;;;;;;;;;;;;;;ACjGA;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAZA;;;;;;;;;;;;;;;;ACDA;;;;;;;AAOA;AAAA;AAEA;AAAA;AAFA;AAWA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAEA;AAPA;AAAA;AACA;AAUA;AACA;AACA;AAQA;AACA;AACA;AA7BA;;;;;;AApBA;;;;;;AAkDA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAIA;AAKA;AACA;AACA;AAGA;AACA;AACA;AACA;AAnDA;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/dist/billboard.min.css b/dist/billboard.min.css new file mode 100644 index 000000000..0ff683802 --- /dev/null +++ b/dist/billboard.min.css @@ -0,0 +1,11 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-moz-user-select:none;-webkit-user-select:none;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arc path{stroke:#fff}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke:#fff;stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-target.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused{opacity:.3!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;opacity:.75;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-tooltip-container{z-index:10}.bb-tooltip{-moz-box-shadow:7px 7px 12px -9px #777;-webkit-box-shadow:7px 7px 12px -9px #777;background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip td.value{text-align:right}.bb-area{opacity:.2;stroke-width:0}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px} +/*# sourceMappingURL=billboard.min.css.map*/ \ No newline at end of file diff --git a/dist/billboard.min.css.map b/dist/billboard.min.css.map new file mode 100644 index 000000000..1061a411f --- /dev/null +++ b/dist/billboard.min.css.map @@ -0,0 +1 @@ +{"version":3,"file":"billboard.min.css","sources":[],"mappings":";;;;;;;;;A","sourceRoot":""} \ No newline at end of file diff --git a/dist/billboard.min.js b/dist/billboard.min.js new file mode 100644 index 000000000..4a8e43567 --- /dev/null +++ b/dist/billboard.min.js @@ -0,0 +1,11 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +!function webpackUniversalModuleDefinition(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("d3-time-format"),require("d3-selection"),require("d3-array"),require("d3-transition"),require("d3-scale"),require("d3-brush"),require("d3-collection"),require("d3-dsv"),require("d3-drag"),require("d3-shape"),require("d3-interpolate"),require("d3-color"),require("d3-zoom"),require("d3-ease"));else if("function"==typeof define&&define.amd)define(["d3-time-format","d3-selection","d3-array","d3-transition","d3-scale","d3-brush","d3-collection","d3-dsv","d3-drag","d3-shape","d3-interpolate","d3-color","d3-zoom","d3-ease"],e);else{var i="object"==typeof exports?e(require("d3-time-format"),require("d3-selection"),require("d3-array"),require("d3-transition"),require("d3-scale"),require("d3-brush"),require("d3-collection"),require("d3-dsv"),require("d3-drag"),require("d3-shape"),require("d3-interpolate"),require("d3-color"),require("d3-zoom"),require("d3-ease")):e(t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3,t.d3);for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(window,function(t,e,i,n,a,r,o,s,l,u,d,c,f,g){return function(t){var e={};function __webpack_require__(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,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,i){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)__webpack_require__.d(i,n,function(e){return t[e]}.bind(null,n));return i},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,i){"use strict";e.__esModule=!0,e.bb=undefined;var n=_interopRequireDefault(i(1)),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}i(15);var o={version:"1.6.0",generate:function generate(t){var e=new n["default"](t);return e.internal.charts=this.instance,this.instance.push(e),e},instance:[],chart:{fn:n["default"].prototype,internal:{fn:a["default"].prototype,axis:{fn:r["default"].prototype}}}};i(17),i(19),i(20),i(21),i(23),i(25),i(26),i(27),i(29),i(30),i(32),i(34),i(35),i(36),i(37),i(38),i(39),i(40),i(41),i(42),i(43),i(44),i(45),i(46),i(47),i(48),i(50),i(51),i(53),i(54),i(55),i(56),i(57),i(58),i(59),i(60),i(61),i(63),i(64),i(65),i(66),i(67),i(68),i(69),i(70),i(71),i(72),i(73),i(74),i(76),i(9),i(77),i(78),e.bb=o,e["default"]=o},function(t,e,i){"use strict";e.__esModule=!0;var n=_interopRequireDefault(i(2)),a=_interopRequireDefault(i(3));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}e["default"]=function Chart(t){(0,n["default"])(this,Chart);var e=new a["default"](this);this.internal=e,e.loadConfig(t),e.beforeInit(t),e.init(),this.$=e.getChartElements(),e.afterInit(t),function bindThis(t,e,i){Object.keys(t).forEach(function(n){e[n]=t[n].bind(i),Object.keys(t[n]).length&&bindThis(t[n],e[n],i)})}(Chart.prototype,this,this)},t.exports=e["default"]},function(t,e,i){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,i){"use strict";e.__esModule=!0;var n=_interopRequireDefault(i(2)),a=i(4),r=i(5),o=i(6),s=i(7),l=_interopRequireDefault(i(8)),u=_interopRequireDefault(i(14)),d=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var c=function(){function ChartInternal(t){(0,n["default"])(this,ChartInternal);var e=this;e.api=t,e.config=e.getOptions(),e.data={},e.cache={},e.axes={}}return ChartInternal.prototype.beforeInit=function beforeInit(){var t=this.config;(0,d.callFn)(t.onbeforeinit,this)},ChartInternal.prototype.afterInit=function afterInit(){var t=this.config;(0,d.callFn)(t.onafterinit,this)},ChartInternal.prototype.init=function init(){var t=this,e=t.config,i=void 0;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)i=t.convertJsonToData(e.data_json,e.data_keys);else if(e.data_rows)i=t.convertRowsToData(e.data_rows);else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");i=t.convertColumnsToData(e.data_columns)}i&&t.initWithData(i)},ChartInternal.prototype.initParams=function initParams(){var t=this,e=t.config,i=e.axis_rotated;t.datetimeId="bb-"+ +new Date,t.clipId=t.datetimeId+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.point=t.generatePoint(),t.extraLineClasses=t.generateExtraLineClass(),t.dataTimeFormat=e.data_xLocaltime?a.timeParse:a.utcParse,t.axisTimeFormat=e.axis_x_localtime?a.timeFormat:a.utcFormat,t.defaultAxisTimeFormat=function(e){var i=(e.getMilliseconds()?".%L":e.getSeconds()&&".:%S")||e.getMinutes()&&"%I:%M"||e.getHours()&&"%I %p"||e.getDay()&&1!==e.getDate()&&"%-m/%-d"||1!==e.getDate()&&"%b %d"||e.getMonth()&&"%-m/%-d"||"%Y/%-m/%-d";return t.axisTimeFormat(i)(e)},t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=i?"left":"bottom",t.yOrient=i?e.axis_y_inner?"top":"bottom":e.axis_y_inner?"right":"left",t.y2Orient=i?e.axis_y2_inner?"bottom":"top":e.axis_y2_inner?"left":"right",t.subXOrient=i?"left":"bottom",t.isLegendRight="right"===e.legend_position,t.isLegendInset="inset"===e.legend_position,t.isLegendTop="top-left"===e.legend_inset_anchor||"top-right"===e.legend_inset_anchor,t.isLegendLeft="top-left"===e.legend_inset_anchor||"bottom-left"===e.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=i&&!e.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.inputType=t.convertInputType(),t.axes.subx=(0,r.selectAll)([])},ChartInternal.prototype.initWithData=function initWithData(t){var e=this,i=e.config;e.axis=new l["default"](e),i.subchart_show&&e.initBrush(),i.zoom_enabled&&(e.initZoom(),e.initZoomBehaviour());var n={element:i.bindto,classname:"bb"};if((0,d.isObject)(i.bindto)&&(n.element=i.bindto.element||"#chart",n.classname=i.bindto.classname||n.classname),e.selectChart=(0,d.isFunction)(n.element.node)?i.bindto.element:(0,r.select)(n.element?n.element:[]),e.selectChart.html("").classed(n.classname,!0),e.data.xs={},e.data.targets=e.convertDataToTargets(t),i.data_filter&&(e.data.targets=e.data.targets.filter(i.data_filter)),i.data_hide&&e.addHiddenTargetIds(!0===i.data_hide?e.mapToIds(e.data.targets):i.data_hide),i.legend_hide&&e.addHiddenLegendIds(!0===i.legend_hide?e.mapToIds(e.data.targets):i.legend_hide),e.hasType("gauge")&&(i.legend_show=!1),e.updateSizes(),e.updateScales(),e.x.domain((0,o.extent)(e.getXDomain(e.data.targets))),e.y.domain(e.getYDomain(e.data.targets,"y")),e.y2.domain(e.getYDomain(e.data.targets,"y2")),e.subX.domain(e.x.domain()),e.subY.domain(e.y.domain()),e.subY2.domain(e.y2.domain()),e.orgXDomain=e.x.domain(),e.svg=e.selectChart.append("svg").style("overflow","hidden").style("display","block"),i.interaction_enabled&&e.inputType){var a="touch"===e.inputType;e.svg.on(a?"touchstart":"mouseenter",function(){return(0,d.callFn)(i.onover,e)}).on(a?"touchend":"mouseleave",function(){return(0,d.callFn)(i.onout,e)})}i.svg_classname&&e.svg.attr("class",i.svg_classname),e.defs=e.svg.append("defs"),e.clipChart=e.appendClip(e.defs,e.clipId),e.clipXAxis=e.appendClip(e.defs,e.clipIdForXAxis),e.clipYAxis=e.appendClip(e.defs,e.clipIdForYAxis),e.clipGrid=e.appendClip(e.defs,e.clipIdForGrid),e.clipSubchart=e.appendClip(e.defs,e.clipIdForSubchart),(0,d.isFunction)(i.color_tiles)&&e.patterns&&e.patterns.forEach(function(t){return e.defs.append(function(){return t.node})}),e.updateSvgSize();var s=e.svg.append("g").attr("transform",e.getTranslate("main"));if(e.main=s,i.subchart_show&&e.initSubchart&&e.initSubchart(),e.initTooltip&&e.initTooltip(),e.initLegend&&e.initLegend(),e.initTitle&&e.initTitle(),s.append("text").attr("class",u["default"].text+" "+u["default"].empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),e.initRegion(),e.initGrid(),i.clipPath||e.axis.init(),s.append("g").attr("class",u["default"].chart).attr("clip-path",e.clipPath),i.grid_lines_front&&e.initGridLines(),i.grid_front&&e.initXYFocusGrid(),e.initEventRect(),e.initChartElements(),s.insert("rect",i.zoom_privileged?null:"g."+u["default"].regions).attr("class",u["default"].zoomRect).attr("width",e.width).attr("height",e.height).style("opacity","0").on("dblclick.zoom",null),i.axis_x_extent&&e.brush.scale(e.getDefaultExtent()),i.clipPath&&e.axis.init(),e.updateTargets(e.data.targets),e.updateDimension(),i.oninit.call(e),e.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){var c=e.getMinMaxData();(0,d.callFn)(i.data_onmin,e,c.min),(0,d.callFn)(i.data_onmax,e,c.max)}e.bindResize(),e.api.element=e.selectChart.node()},ChartInternal.prototype.initChartElements=function initChartElements(){var t=this;["Pie","Bar","Line","Arc","Gauge","Bubble","Radar","Text"].forEach(function(e){var i="init"+e;t[i]&&t[i]()})},ChartInternal.prototype.getChartElements=function getChartElements(){var t=this;return{chart:t.selectChart,svg:t.svg,defs:t.defs,main:t.main,tooltip:t.tooltip,legend:t.legend,title:t.title,grid:t.grid,arc:t.arcs,bar:{bars:t.mainBar},line:{lines:t.mainLine,areas:t.mainArea,circles:t.mainCircle},text:{texts:t.texts}}},ChartInternal.prototype.smoothLines=function smoothLines(t,e){"grid"===e&&t.each(function(){var t=(0,r.select)(this),e=["x1","x2","y1","y2"].map(function(e){return Math.ceil(t.attr(e))}),i=e[0],n=e[1],a=e[2],o=e[3];t.attr({x1:i,x2:n,y1:a,y2:o})})},ChartInternal.prototype.updateSizes=function updateSizes(){var t=this,e=t.config,i=e.axis_rotated,n=t.hasArcType(),a=t.legend?t.getLegendHeight():0,r=t.legend?t.getLegendWidth():0,o=t.isLegendRight||t.isLegendInset?0:a,s=i||n?0:t.getHorizontalAxisHeight("x"),l=e.subchart_show&&!n?e.subchart_size_height+s:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=i?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:n?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+o+t.getCurrentPaddingBottom(),left:l+(n?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:n?0:t.getCurrentPaddingRight(),bottom:s+l+o+t.getCurrentPaddingBottom(),left:n?0:t.getCurrentPaddingLeft()},t.margin2=i?{top:t.margin.top,right:NaN,bottom:20+o,left:t.rotated_padding_left}:{top:t.currentHeight-l-o,right:NaN,bottom:s+o,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(a,r),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=i?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=i?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?r+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&n&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},ChartInternal.prototype.updateTargets=function updateTargets(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType(t)&&(e.hasType("radar")?e.updateTargetsForRadar(t):e.updateTargetsForArc(t)),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},ChartInternal.prototype.showTargets=function showTargets(){var t=this;t.svg.selectAll("."+u["default"].target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity","1")},ChartInternal.prototype.getWithOption=function getWithOption(t){var e={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};return Object.keys(e).forEach(function(i){var n=e[i];(0,d.isString)(n)&&(n=e[n]),e[i]=(0,d.getOption)(t,"with"+i,n)}),e},ChartInternal.prototype.redraw=function redraw(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments[1],i=this,n=i.main,a=i.config,o=a.axis_rotated,l=i.hasType("radar"),c=i.getShapeIndices(i.isAreaType),f=i.getShapeIndices(i.isBarType),g=i.getShapeIndices(i.isLineType),h=i.hasArcType(),p=i.filterTargetsToShow(i.data.targets),x=i.xv.bind(i),_=void 0,m=void 0,v=void 0,y=i.getWithOption(t),b=y.Transition?a.transition_duration:0,T=y.TransitionForExit?b:0,A=y.TransitionForAxis?b:0,w=e||i.axis.generateTransitions(A);if(t.initializing&&a.tooltip_init_show||"touch"!==i.inputType||i.hideTooltip(),y.Legend&&a.legend_show&&!a.legend_contents_bindto?i.updateLegend(i.mapToIds(i.data.targets),t,w):y.Dimension&&i.updateDimension(!0),i.isCategorized()&&0===p.length&&i.x.domain([0,i.axes.x.selectAll(".tick").size()]),p.length?(i.updateXDomain(p,y.UpdateXDomain,y.UpdateOrgXDomain,y.TrimXDomain),!a.axis_x_tick_values&&(_=i.axis.updateXAxisTickValues(p))):(i.xAxis.tickValues([]),i.subXAxis.tickValues([])),a.zoom_rescale&&!t.flow&&(v=i.x.orgDomain()),["y","y2"].forEach(function(t){var e=i[t],n=a["axis_"+t+"_tick_values"],r=a["axis_"+t+"_tick_count"];if(e.domain(i.getYDomain(p,t,v)),!n&&r){var o=e.domain();i[t+"Axis"].tickValues(i.axis.generateTickValues(o,o.every(function(t){return 0===t})?1:r,i.isTimeSeriesY()))}}),i.axis.redraw(w,h),i.axis.updateLabels(y.Transition),(y.UpdateXDomain||y.UpdateXAxis)&&p.length)if(a.axis_x_tick_culling&&_){for(var D=1;D<_.length;D++)if(_.length/D<a.axis_x_tick_culling_max){m=D;break}i.svg.selectAll("."+u["default"].axisX+" .tick text").each(function(t){var e=_.indexOf(t);e>=0&&(0,r.select)(this).style("display",e%m?"none":"block")})}else i.svg.selectAll("."+u["default"].axisX+" .tick text").style("display","block");var L=i.generateDrawArea?i.generateDrawArea(c,!1):undefined,S=i.generateDrawBar?i.generateDrawBar(f):undefined,C=i.generateDrawLine?i.generateDrawLine(g,!1):undefined,R=i.generateXYForText(c,f,g,!0),F=i.generateXYForText(c,f,g,!1);y.Y&&(i.subY.domain(i.getYDomain(p,"y")),i.subY2.domain(i.getYDomain(p,"y2"))),i.updateXgridFocus(),n.select("text."+u["default"].text+"."+u["default"].empty).attr("x",i.width/2).attr("y",i.height/2).text(a.data_empty_label_text).transition().style("opacity",p.length?0:1),i.updateGrid(b),i.updateRegion(b),i.updateBar(T),i.updateLine(T),i.updateArea(T),i.updateCircle(),i.hasDataLabel()&&i.updateText(T),i.redrawTitle&&i.redrawTitle(),i.redrawArc&&i.redrawArc(b,T,y.Transform),l&&i.redrawRadar(b,T),a.subchart_show&&i.redrawSubchart&&i.redrawSubchart(y.Subchart,w,b,T,c,f,g),n.selectAll("."+u["default"].selectedCircles).filter(i.isBarType.bind(i)).selectAll("circle").remove(),a.interaction_enabled&&!t.flow&&y.EventRect&&(i.redrawEventRect(),i.bindZoomEvent()),i.updateCircleY();var X=(l?i.radarCircleX:o?i.circleY:i.circleX).bind(i),I=(l?i.radarCircleY:o?i.circleX:i.circleY).bind(i),M=t.flow&&i.generateFlow({targets:p,flow:t.flow,duration:t.flow.duration,drawBar:S,drawLine:C,drawArea:L,cx:X,cy:I,xv:x,xForText:R,yForText:F}),k=(b||M)&&i.isTabVisible(),E=[i.redrawBar(S,k),i.redrawLine(C,k),i.redrawArea(L,k),i.redrawCircle(X,I,k,M),i.redrawText(R,F,t.flow,k),i.redrawRegion(k),i.redrawGrid(k)],B=M||a.onrendered?function(){M&&M(),(0,d.callFn)(a.onrendered,i)}:null;if(B)if(k){var O=i.generateWait();(0,s.transition)().duration(b).each(function(){E.reduce(function(t,e){return t.concat(e)},[]).forEach(function(t){return O.add(t)})}).call(O,B)}else B();i.mapToIds(i.data.targets).forEach(function(t){i.withoutFadeIn[t]=!0})},ChartInternal.prototype.updateAndRedraw=function updateAndRedraw(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=this,i=e.config,n=void 0;t.withTransition=(0,d.getOption)(t,"withTransition",!0),t.withTransform=(0,d.getOption)(t,"withTransform",!1),t.withLegend=(0,d.getOption)(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=(0,d.getOption)(t,"withTransitionForTransform",t.withTransition),e.updateSizes(),t.withLegend&&i.legend_show||(n=e.axis.generateTransitions(t.withTransitionForAxis?i.transition_duration:0),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,n)),e.redraw(t,n)},ChartInternal.prototype.redrawWithoutRescale=function redrawWithoutRescale(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},ChartInternal.prototype.isTimeSeries=function isTimeSeries(){return"timeseries"===this.config.axis_x_type},ChartInternal.prototype.isCategorized=function isCategorized(){return this.config.axis_x_type.indexOf("category")>=0||this.hasType("radar")},ChartInternal.prototype.isCustomX=function isCustomX(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||(0,d.notEmpty)(t.data_xs))},ChartInternal.prototype.isTimeSeriesY=function isTimeSeriesY(){return"timeseries"===this.config.axis_y_type},ChartInternal.prototype.getTranslate=function getTranslate(t){var e=this,i=e.config.axis_rotated,n=void 0,a=void 0;if("main"===t)n=(0,d.asHalfPixel)(e.margin.left),a=(0,d.asHalfPixel)(e.margin.top);else if("context"===t)n=(0,d.asHalfPixel)(e.margin2.left),a=(0,d.asHalfPixel)(e.margin2.top);else if("legend"===t)n=e.margin3.left,a=e.margin3.top;else if("x"===t)n=0,a=i?0:e.height;else if("y"===t)n=0,a=i?e.height:0;else if("y2"===t)n=i?0:e.width,a=i?1:0;else if("subx"===t)n=0,a=i?0:e.height2;else if("arc"===t)n=e.arcWidth/2,a=e.arcHeight/2;else if("radar"===t){var r=(e.arcWidth-e.arcHeight)/2;n=Math.max(r,0)+4,a=r<0?Math.abs(r):(0,d.asHalfPixel)(e.margin.top)}return"translate("+n+", "+a+")"},ChartInternal.prototype.initialOpacity=function initialOpacity(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?"1":"0"},ChartInternal.prototype.initialOpacityForCircle=function initialOpacityForCircle(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):"0"},ChartInternal.prototype.opacityForCircle=function opacityForCircle(t){var e=this.config.point_show?"1":"0";return(0,d.isValue)(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":e:"0"},ChartInternal.prototype.opacityForText=function opacityForText(){return this.hasDataLabel()?"1":"0"},ChartInternal.prototype.xx=function xx(t){var e=this.config.zoom_enabled&&this.zoomScale?this.zoomScale:this.x;return t?e(t.x):null},ChartInternal.prototype.xv=function xv(t){var e=this,i=e.getBaseValue(t);return e.isTimeSeries()?i=e.parseDate(i):e.isCategorized()&&(0,d.isString)(i)&&(i=e.config.axis_x_categories.indexOf(i)),Math.ceil(e.x(i))},ChartInternal.prototype.yv=function yv(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(this.getBaseValue(t)))},ChartInternal.prototype.subxx=function subxx(t){return t?this.subX(t.x):null},ChartInternal.prototype.transformMain=function transformMain(t,e){var i=this,n=void 0,a=void 0,r=void 0;e&&e.axisX?n=e.axisX:(n=i.main.select("."+u["default"].axisX),t&&(n=n.transition())),e&&e.axisY?a=e.axisY:(a=i.main.select("."+u["default"].axisY),t&&(a=a.transition())),e&&e.axisY2?r=e.axisY2:(r=i.main.select("."+u["default"].axisY2),t&&(r=r.transition())),(t?i.main.transition():i.main).attr("transform",i.getTranslate("main")),n.attr("transform",i.getTranslate("x")),a.attr("transform",i.getTranslate("y")),r.attr("transform",i.getTranslate("y2")),i.main.select("."+u["default"].chartArcs).attr("transform",i.getTranslate("arc"))},ChartInternal.prototype.transformAll=function transformAll(t,e){var i=this;i.transformMain(t,e),i.config.subchart_show&&i.transformContext(t,e),i.legend&&i.transformLegend(t)},ChartInternal.prototype.updateSvgSize=function updateSvgSize(){var t=this,e=t.svg.select("."+u["default"].brush+" .overlay"),i=e.size()?e.attr("height"):0;t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",i),t.svg.select("."+u["default"].zoomRect).attr("width",t.width).attr("height",t.height),t.brush&&t.brush.scale(t.subX,i)},ChartInternal.prototype.updateDimension=function updateDimension(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},ChartInternal.prototype.bindResize=function bindResize(){var t=this,e=t.config;t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){return e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){(0,d.isDefined)(t.resizeTimeout)&&window.clearTimeout(t.resizeTimeout),t.resizeTimeout=window.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){return e.onresized.call(t)});var i=(0,r.select)(window).on("resize.bb");i&&t.resizeFunction.add(i),(0,r.select)(window).on("resize.bb",t.resizeFunction)},ChartInternal.prototype.generateResize=function generateResize(){function callResizeFunctions(){t.forEach(function(t){return t()})}var t=[];return callResizeFunctions.add=function(e){t.push(e)},callResizeFunctions.remove=function(e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e){t.splice(i,1);break}},callResizeFunctions},ChartInternal.prototype.endall=function endall(t,e){var i=0;t.each(function(){return++i}).on("end",function(){for(var t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];--i||e.apply.apply(e,[this].concat(n))})},ChartInternal.prototype.generateWait=function generateWait(){var t=[],e=function(e,i){var n=void 0;!function loop(){var e=0;t.forEach(function(t){if(t.empty())e++;else try{t.transition()}catch(i){e++}}),n&&clearTimeout(n),e===t.length?i&&i():n=setTimeout(loop,50)}()};return e.add=function(e){(0,d.isArray)(e)?t=t.concat(e):t.push(e)},e},ChartInternal.prototype.parseDate=function parseDate(t){var e=void 0;return t instanceof Date?e=t:(0,d.isString)(t)?e=this.dataTimeFormat(this.config.data_xFormat)(t):(0,d.isNumber)(t)&&!isNaN(t)&&(e=new Date(+t)),(!e||isNaN(+e))&&console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e},ChartInternal.prototype.isTabVisible=function isTabVisible(){return!document[["hidden","mozHidden","msHidden","webkitHidden"].filter(function(t){return t in document})[0]]},ChartInternal.prototype.convertInputType=function convertInputType(){var t=this.config,e=this.isMobile(),i=t.interaction_inputType_mouse&&!e&&"onmouseover"in window,n=!1;return t.interaction_inputType_touch&&(n="ontouchmove"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),(i?"mouse":n&&"touch")||null},ChartInternal}();e["default"]=c,t.exports=e["default"]},function(e,i){e.exports=t},function(t,i){t.exports=e},function(t,e){t.exports=i},function(t,e){t.exports=n},function(t,e,i){"use strict";e.__esModule=!0;var n=_interopRequireDefault(i(2)),a=_interopRequireDefault(i(9)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t,e){var i=t.config.axis_rotated;return e?i:!i},l=function(){function Axis(t){(0,n["default"])(this,Axis),this.owner=t}return Axis.prototype.init=function init(){var t=this,e=this.owner,i=e.config,n=i.axis_rotated,a=e.main;["x","y","y2"].forEach(function(s){var l="axis"+(0,o.capitalize)(s),u=r["default"].axis+" "+r["default"][l],d=r["default"][l+"Label"];e.axes[s]=a.append("g").attr("class",u).attr("clip-path",function(){var t=null;return"x"===s?t=e.clipPathForXAxis:"y"===s&&i.axis_y_inner&&(t=e.clipPathForYAxis),t}).attr("transform",e.getTranslate(s)).style("visibility",i["axis_"+s+"_show"]?"visible":"hidden"),e.axes[s].append("text").attr("class",d).attr("transform",["rotate(-90)",null]["x"===s?+!n:+n]).style("text-anchor",t.textAnchorForXAxisLabel.bind(t))})},Axis.prototype.getXAxis=function getXAxis(t,e,i,n,r,s,l,u){var d=this.owner,c=d.config,f=d.isCategorized(),g={isCategory:f,withOuterTick:s,withoutTransition:l,config:c,axisName:t,tickMultiline:c.axis_x_tick_multiline,tickWidth:c.axis_x_tick_width,tickTextRotate:u?0:c.axis_x_tick_rotate,tickTitle:f&&c.axis_x_tick_tooltip&&d.api.categories(),orgXScale:d.x},h=(0,a["default"])(g).scale(d.zoomScale||e).orient(i),p=r;return d.isTimeSeries()&&r&&!(0,o.isFunction)(r)&&(p=r.map(function(t){return d.parseDate(t)})),h.tickFormat(n).tickValues(p),f&&(h.tickCentered(c.axis_x_tick_centered),(0,o.isEmpty)(c.axis_x_tick_culling)&&(c.axis_x_tick_culling=!1)),h},Axis.prototype.getYAxis=function getYAxis(t,e,i,n,r,o,s,l){var u=this.owner,d=u.config,c={withOuterTick:o,withoutTransition:s,config:d,axisName:t,tickTextRotate:l?0:d.axis_y_tick_rotate},f=(0,a["default"])(c).scale(e).orient(i).tickFormat(n);return u.isTimeSeriesY()?f.ticks(d.axis_y_tick_time_value):f.tickValues(r),f},Axis.prototype.updateXAxisTickValues=function updateXAxisTickValues(t,e){var i=this.owner,n=i.config,a=n.axis_x_tick_count,r=void 0;return(n.axis_x_tick_fit||a)&&(r=this.generateTickValues(i.mapTargetsToUniqueXs(t),a,i.isTimeSeries())),e?e.tickValues(r):(i.xAxis.tickValues(r),i.subXAxis.tickValues(r)),r},Axis.prototype.getId=function getId(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},Axis.prototype.getXAxisTickFormat=function getXAxisTickFormat(){var t=this.owner,e=t.config.axis_x_tick_format,i=t.isTimeSeries(),n=t.isCategorized(),a=void 0;return e?(0,o.isFunction)(e)?a=e:i&&(a=function(i){return i?t.axisTimeFormat(e)(i):""}):a=i?t.defaultAxisTimeFormat:n?t.categoryName:function(t){return t<0?t.toFixed(0):t},(0,o.isFunction)(a)?function(e){return a.apply(t,n?[e,t.categoryName(e)]:[e])}:a},Axis.prototype.getTickValues=function getTickValues(t){var e=this.owner,i=e.config["axis_"+t+"_tick_values"],n=e[t+"Axis"];return i||(n?n.tickValues():undefined)},Axis.prototype.getXAxisTickValues=function getXAxisTickValues(){return this.getTickValues("x")},Axis.prototype.getYAxisTickValues=function getYAxisTickValues(){return this.getTickValues("y")},Axis.prototype.getY2AxisTickValues=function getY2AxisTickValues(){return this.getTickValues("y2")},Axis.prototype.getLabelOptionByAxisId=function getLabelOptionByAxisId(t){return this.owner.config["axis_"+t+"_label"]},Axis.prototype.getLabelText=function getLabelText(t){var e=this.getLabelOptionByAxisId(t);return(0,o.isString)(e)?e:e?e.text:null},Axis.prototype.setLabelText=function setLabelText(t,e){var i=this.owner.config,n=this.getLabelOptionByAxisId(t);(0,o.isString)(n)?i["axis_"+t+"_label"]=e:n&&(n.text=e)},Axis.prototype.getLabelPosition=function getLabelPosition(t,e){var i=this.owner.config.axis_rotated,n=this.getLabelOptionByAxisId(t),a=(0,o.isObjectType)(n)&&n.position?n.position:e[+!i],r=function(t){return!!~a.indexOf(t)};return{isInner:r("inner"),isOuter:r("outer"),isLeft:r("left"),isCenter:r("center"),isRight:r("right"),isTop:r("top"),isMiddle:r("middle"),isBottom:r("bottom")}},Axis.prototype.getXAxisLabelPosition=function getXAxisLabelPosition(){return this.getLabelPosition("x",["inner-top","inner-right"])},Axis.prototype.getYAxisLabelPosition=function getYAxisLabelPosition(){return this.getLabelPosition("y",["inner-right","inner-top"])},Axis.prototype.getY2AxisLabelPosition=function getY2AxisLabelPosition(){return this.getLabelPosition("y2",["inner-right","inner-top"])},Axis.prototype.getLabelPositionById=function getLabelPositionById(t){return this["get"+t.toUpperCase()+"AxisLabelPosition"]()},Axis.prototype.textForXAxisLabel=function textForXAxisLabel(){return this.getLabelText("x")},Axis.prototype.textForYAxisLabel=function textForYAxisLabel(){return this.getLabelText("y")},Axis.prototype.textForY2AxisLabel=function textForY2AxisLabel(){return this.getLabelText("y2")},Axis.prototype.xForAxisLabel=function xForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],i=this.owner,n=t.isMiddle?-i.height/2:0;return s(i,e)?n=t.isLeft?0:t.isCenter?i.width/2:i.width:t.isBottom&&(n=-i.height),n},Axis.prototype.dxForAxisLabel=function dxForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],i=this.owner,n=t.isBottom?"0.5em":"0";return s(i,e)?n=t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop&&(n="-0.5em"),n},Axis.prototype.textAnchorForAxisLabel=function textAnchorForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],i=this.owner,n=t.isMiddle?"middle":"end";return s(i,e)?n=t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom&&(n="start"),n},Axis.prototype.xForXAxisLabel=function xForXAxisLabel(){return this.xForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.xForYAxisLabel=function xForYAxisLabel(){return this.xForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.xForY2AxisLabel=function xForY2AxisLabel(){return this.xForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.dxForXAxisLabel=function dxForXAxisLabel(){return this.dxForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.dxForYAxisLabel=function dxForYAxisLabel(){return this.dxForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.dxForY2AxisLabel=function dxForY2AxisLabel(){return this.dxForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.dyForXAxisLabel=function dyForXAxisLabel(){var t=this.owner.config,e=this.getXAxisLabelPosition().isInner,i=t.axis_x_height;return t.axis_rotated?e?"1.2em":-25-this.getMaxTickWidth("x"):e?"-0.5em":i?i-10:"3em"},Axis.prototype.dyForYAxisLabel=function dyForYAxisLabel(){var t=this.owner,e=this.getYAxisLabelPosition().isInner;return t.config.axis_rotated?e?"-0.5em":"3em":e?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},Axis.prototype.dyForY2AxisLabel=function dyForY2AxisLabel(){var t=this.owner,e=this.getY2AxisLabelPosition().isInner;return t.config.axis_rotated?e?"1.2em":"-2.2em":e?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},Axis.prototype.textAnchorForXAxisLabel=function textAnchorForXAxisLabel(){return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.textAnchorForYAxisLabel=function textAnchorForYAxisLabel(){return this.textAnchorForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.textAnchorForY2AxisLabel=function textAnchorForY2AxisLabel(){return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.getMaxTickWidth=function getMaxTickWidth(t,e){var i=this.owner,n=i.config,a=i.currentMaxTickWidths,r=0;if(e&&a[t])return a[t];if(i.svg){var o=/^y2?$/.test(t),s=i.filterTargetsToShow(i.data.targets),l=o?"getY":"getX",u=i[t].copy().domain(i[l+"Domain"](s,t)),d=this[l+"Axis"](t,u,i[t+"Orient"],o?n["axis_"+t+"_tick_format"]:i.xAxisTickFormat,null,!1,!0,!0);o||this.updateXAxisTickValues(s,d);var c=i.selectChart.append("svg").style("visibility","hidden");c.call(d).selectAll("text").each(function(){r=Math.max(r,this.getBoundingClientRect().width)}),c.remove()}return r>0&&(a[t]=r),a[t]},Axis.prototype.updateLabels=function updateLabels(t){var e=this,i=this.owner,n={X:i.main.select("."+r["default"].axisX+" ."+r["default"].axisXLabel),Y:i.main.select("."+r["default"].axisY+" ."+r["default"].axisYLabel),Y2:i.main.select("."+r["default"].axisY2+" ."+r["default"].axisY2Label)};Object.keys(n).forEach(function(i){var a=n[i],r=i+"AxisLabel";(t?a.transition():a).attr("x",e["xFor"+r].bind(e)).attr("dx",e["dxFor"+r].bind(e)).attr("dy",e["dyFor"+r].bind(e)).text(e["textFor"+r].bind(e))})},Axis.prototype.getPadding=function getPadding(t,e,i,n){var a=(0,o.isNumber)(t)?t:t[e];return(0,o.isValue)(a)?"ratio"===t.unit?t[e]*n:this.convertPixelsToAxisPadding(a,n):i},Axis.prototype.convertPixelsToAxisPadding=function convertPixelsToAxisPadding(t,e){var i=this.owner;return e*(t/(i.config.axis_rotated?i.width:i.height))},Axis.prototype.generateTickValues=function generateTickValues(t,e,i){var n=t,a=void 0,r=void 0,s=void 0,l=void 0,u=void 0,d=void 0;if(e){var c=(0,o.isFunction)(e)?e():e;if(1===c)n=[t[0]];else if(2===c)n=[t[0],t[t.length-1]];else if(c>2){for(s=c-2,a=t[0],l=((r=t[t.length-1])-a)/(s+1),n=[a],u=0;u<s;u++)d=+a+l*(u+1),n.push(i?new Date(d):d);n.push(r)}}return i||(n=n.sort(function(t,e){return t-e})),n},Axis.prototype.generateTransitions=function generateTransitions(t){var e=this.owner.axes,i=["x","y","y2","subx"].map(function(i){return t?e[i].transition().duration(t):e[i]});return{axisX:i[0],axisY:i[1],axisY2:i[2],axisSubX:i[3]}},Axis.prototype.redraw=function redraw(t,e){var i=this.owner,n=e?"0":"1";["x","y","y2","subx"].forEach(function(t){i.axes[t].style("opacity",n)}),t.axisX.call(i.xAxis),t.axisY.call(i.yAxis),t.axisY2.call(i.y2Axis),t.axisSubX.call(i.subXAxis)},Axis}();e["default"]=l,t.exports=e["default"]},function(t,e,i){"use strict";e.__esModule=!0,e["default"]=function(){function axisX(t,e){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+c)+", 0)"})}function axisY(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})}function textFormatted(t){var e=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,i=u?u(e):e;return(0,r.isDefined)(i)?i:""}function transitionise(e){return t.withoutTransition?e.interrupt():e.transition(h)}function axis(n){n.each(function(){var n=(0,a.select)(this);axis.g=n;var u=this.__chart__||e,f=function copyScale(){var t=e.copy();return t.domain().length||t.domain(e.domain()),t}();this.__chart__=f;var h=l||function generateTicks(t){var e=[];if(t.ticks)return t.ticks.apply(t,d?(0,r.toArray)(d):[]).map(function(t){return(0,r.isString)(t)&&(0,r.isNumber)(t)&&!isNaN(t)&&Math.round(10*t)/10||t});for(var i=t.domain(),n=Math.ceil(i[0]);n<i[1];n++)e.push(n);return e.length>0&&e[0]>0&&e.unshift(e[0]-(e[1]-e[0])),e}(f),p=n.selectAll(".tick").data(h,f),x=p.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),_=p.exit().remove(),m=transitionise(p=x.merge(p)).style("opacity","1"),v=void 0,y=void 0,b=e.rangeExtent?e.rangeExtent():function scaleExtent(t){var e=t[0],i=t[t.length-1];return e<i?[e,i]:[i,e]}((t.orgXScale||e).range()),T=n.selectAll(".domain").data([0]),A=T.enter().append("path").attr("class","domain").merge(transitionise(T));x.append("line"),x.append("text");var w=x.select("line"),D=m.select("line"),L=x.select("text"),S=m.select("text");t.isCategory?(c=Math.ceil((f(1)-f(0))/2),v=g?0:c,y=g?c:0):c=v=0;var C=o.size||o(n.select(".tick")),R=[],F=(Math.max(6,0),/^(left|right)$/.test(i)),X=/^(top|bottom)$/.test(i),I=p.select("text").selectAll("tspan").data(function(e,i){var n=t.tickMultiline?function splitTickText(e,i){var n=textFormatted(e),a=(0,r.isString)(n)&&n.indexOf("\n")>-1?n.split("\n"):[];if(a.length)return a;var o=i,s=void 0,l=void 0,u=void 0;return(0,r.isArray)(n)?n:((!o||o<=0)&&(o=F?95:t.isCategory?Math.ceil(f(h[1])-f(h[0]))-12:110),function split(t,e){l=undefined;for(var i=1;i<e.length;i++)if(" "===e.charAt(i)&&(l=i),s=e.substr(0,i+1),u=C.w*s.length,o<u)return split(t.concat(e.substr(0,l||i)),e.slice(l?l+1:i));return t.concat(e)}(a,n+""))}(e,t.tickWidth):(0,r.isArray)(textFormatted(e))?textFormatted(e).concat():[textFormatted(e)];return R[i]=n.length,n.map(function(t){return{index:i,splitted:t}})});I.exit().remove(),I=I.enter().append("tspan").merge(I).text(function(t){return t.splitted});var M=X?axisX:axisY,k=/^(top|left)$/.test(i)?-1:1,E=M===axisX?"y":"x";w.attr(E+"2",6*k),L.attr(""+E,9*k),A.attr("d",function(){var t=s*k;return X?"M"+b[0]+","+t+"V0H"+b[1]+"V"+t:"M"+t+","+b[0]+"H0V"+b[1]+"H"+t});var B=t.tickTextRotate,O=t.axisName&&/^(x|y|y2)$/.test(t.axisName)?t.config["axis_"+t.axisName+"_tick_text_position"]:{x:0,y:0};if(I.attr("x",X?0:9*k).attr("dx",function(){var t=0;return"bottom"===i&&B&&(t=8*Math.sin(Math.PI*(B/180))),t+(O.x||0)}()).attr("dy",function(t,e){var n=0;return"top"!==i&&(n=0===e?F?-((R[t.index]-1)*(C.h/2)-3):0===O.y?".71em":0:C.h),(0,r.isNumber)(n)&&O.y?n+O.y:n||".71em"}),"bottom"===i?(D.attr("x1",v).attr("x2",v).attr("y2",function tickSize(t){var i=e(t)+(g?0:c);return b[0]<i&&i<b[1]?6:0}),S.attr("x",0).attr("y",function yForText(t){return t?11.5-t/15*2.5*(t>0?1:-1):9}(B)).style("text-anchor",function textAnchorForText(t){return t?t>0?"start":"end":"middle"}(B)).attr("transform",function textTransform(t){return t?"rotate("+t+")":null}(B))):"top"===i?(D.attr("x2",0).attr("y2",-6),S.attr("x",0).attr("y",-9).style("text-anchor","middle")):"left"===i?(D.attr("x2",-6).attr("y1",y).attr("y2",y),S.attr("x",-9).attr("y",c).style("text-anchor","end")):"right"===i&&(D.attr("x2",6).attr("y2",0),S.attr("x",9).attr("y",0).style("text-anchor","start")),t.tickTitle&&S.append&&S.append("title").each(function(e){(0,a.select)(this).text(t.tickTitle[e])}),f.bandwidth){var P=f,z=P.bandwidth()/2;f=u=function scale0(t){return P(t)+z}}else u.bandwidth?u=f:_.call(M,f);x.call(M,u),m.call(M,f)})}var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=(0,n.scaleLinear)(),i="bottom",s=t.withOuterTick?6:0,l=null,u=void 0,d=void 0,c=0,f=!0,g=void 0,h=void 0;return axis.scale=function(t){return arguments.length?(e=t,axis):e},axis.orient=function(t){return arguments.length?(i=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",axis):i},axis.tickFormat=function(t){return arguments.length?(u=t,axis):u},axis.tickCentered=function(t){return arguments.length?(g=t,axis):g},axis.tickOffset=function(){return c},axis.tickInterval=function(e){var i=void 0;t.isCategory?i=2*c:i=(axis.g.select("path.domain").node().getTotalLength()-2*s)/(e||axis.g.selectAll("line").size());return i===Infinity?0:i},axis.ticks=function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return e.length?(d=(0,r.toArray)(e),axis):d},axis.tickCulling=function(t){return arguments.length?(f=t,axis):f},axis.tickValues=function(t){if((0,r.isFunction)(t))l=function tickValues(){return t(e.domain())};else{if(!arguments.length)return l;l=t}return axis},axis.setTransition=function(t){return h=t,axis},axis};var n=i(10),a=i(5),r=i(11),o=function getSizeFor1Char(t){var e={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){try{var i=t.node().getBBox(),n=i.height,a=i.width;n&&a&&(e.h=n,e.w=a),t.text("")}catch(r){}}),getSizeFor1Char.size=e};t.exports=e["default"]},function(t,e){t.exports=a},function(t,e,i){"use strict";e.__esModule=!0,e.toArray=e.sanitise=e.merge=e.notEmpty=e.isValue=e.isUndefined=e.isString=e.isObjectType=e.isObject=e.isNumber=e.isFunction=e.isEmpty=e.isDefined=e.isBoolean=e.isArray=e.hasValue=e.getRectSegList=e.getPathBox=e.getOption=e.getCssRules=e.getBrushSelection=e.extend=e.emulateEvent=e.diffDomain=e.ceil10=e.capitalize=e.callFn=e.brushEmpty=e.asHalfPixel=undefined;var n=_interopRequireDefault(i(12)),a=i(5),r=i(13),o=_interopRequireDefault(i(14));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t){return"function"==typeof t},l=function(t){return"string"==typeof t},u=function(t){return void 0===t},d=function(t){return void 0!==t},c=function(t){return"object"===(void 0===t?"undefined":(0,n["default"])(t))},f=function(t){return u(t)||null===t||l(t)&&0===t.length||c(t)&&0===Object.keys(t).length},g=function(t){return t&&t.constructor===Array},h=function(t){return t&&!t.nodeType&&c(t)&&!g(t)},p=function(t){var e=t.getBBox(),i=[e.x,e.y,e.width,e.height],n=i[0],a=i[1],r=i[2],o=i[3];return[{x:n,y:a+o},{x:n,y:a},{x:n+r,y:a},{x:n+r,y:a+o}]},x=function(t){var e=null,i=a.event,n=t.context||t.main;return i&&"BrushEvent"===i.constructor.name?e=i.selection:n&&(e=n.select("."+o["default"].brush).node())&&(e=(0,r.brushSelection)(e)),e},_=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments[1];for(var i in e)t[i]=e[i];return t},m=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];if(!i.length||1===i.length&&!i[0])return t;var a=i.shift();return h(t)&&h(a)&&Object.keys(a).forEach(function(e){var i=a[e];h(i)?(!t[e]&&(t[e]={}),t[e]=m(t[e],i)):t[e]=g(i)?i.concat():i}),_.apply(undefined,[t].concat(i))},v=function(t){return[].slice.call(t)},y={mouse:function(){try{return new MouseEvent("t"),function(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0};t.dispatchEvent(new MouseEvent(e,i))}}catch(t){return function(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0},n=document.createEvent("MouseEvent");n.initMouseEvent(e,i.bubbles,i.cancelable,window,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}}(),touch:function touch(t,e,i){var n=new Touch(Object.assign({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},i));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[n],targetTouches:[],changedTouches:[n]}))}};e.asHalfPixel=function(t){return Math.ceil(t)+.5},e.brushEmpty=function(t){var e=x(t);return!e||e[0]===e[1]},e.callFn=function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];var a=s(t);return a&&t.call.apply(t,i),a},e.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},e.ceil10=function(t){return 10*Math.ceil(t/10)},e.diffDomain=function(t){return t[1]-t[0]},e.emulateEvent=y,e.extend=_,e.getBrushSelection=x,e.getCssRules=function(t){var e=[];return t.forEach(function(t){try{t.cssRules&&t.cssRules.length&&(e=e.concat(v(t.cssRules)))}catch(i){console.error("Error while reading rules from "+t.href+": "+i.toString())}}),e},e.getOption=function(t,e,i){return d(t[e])?t[e]:i},e.getPathBox=function(t){var e=t.getBoundingClientRect(),i=[e.width,e.height],n=i[0],a=i[1],r=p(t);return{x:r[0].x,y:Math.min(r[0].y,r[1].y),width:n,height:a}},e.getRectSegList=p,e.hasValue=function(t,e){var i=!1;return Object.keys(t).forEach(function(n){return t[n]===e&&(i=!0)}),i},e.isArray=g,e.isBoolean=function(t){return"boolean"==typeof t},e.isDefined=d,e.isEmpty=f,e.isFunction=s,e.isNumber=function(t){return"number"==typeof t},e.isObject=h,e.isObjectType=c,e.isString=l,e.isUndefined=u,e.isValue=function(t){return t||0===t},e.notEmpty=function(t){return!f(t)},e.merge=m,e.sanitise=function(t){return l(t)?t.replace(/</g,"<").replace(/>/g,">"):t},e.toArray=v},function(t,e,i){"use strict";e.__esModule=!0,e["default"]=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":function _typeof(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}(t)}},function(t,e){t.exports=r},function(t,e,i){"use strict";e.__esModule=!0,e["default"]={arc:"bb-arc",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",buttonZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",zoomRect:"bb-zoom-rect",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},t.exports=e["default"]},function(t,e,i){},,function(t,e,i){"use strict";var n=_interopRequireDefault(i(18)),a=_interopRequireDefault(i(3)),r=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,r.extend)(a["default"].prototype,{getOptions:function getOptions(){var t=new n["default"];return(0,r.merge)(t.value,this.additionalConfig)},additionalConfig:{},loadConfig:function loadConfig(t){var e=this.config,i=void 0,n=void 0,a=void 0,o=function(){var t=n.shift();return t&&i&&(0,r.isObjectType)(i)&&t in i?(i=i[t],o()):t?undefined:i};Object.keys(e).forEach(function(s){i=t,n=s.split("_"),a=o(),(0,r.isDefined)(a)&&(e[s]=a)})}})},function(t,e,i){"use strict";e.__esModule=!0;var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(2));e["default"]=function Options(){(0,n["default"])(this,Options),this.value={bindto:"#chart",clipPath:!0,svg_classname:undefined,size_width:undefined,size_height:undefined,padding_left:undefined,padding_right:undefined,padding_top:undefined,padding_bottom:undefined,resize_auto:!0,zoom_enabled:undefined,zoom_extent:undefined,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:undefined,zoom_onzoomstart:undefined,zoom_onzoomend:undefined,zoom_resetButton:!0,zoom_x_min:undefined,zoom_x_max:undefined,interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},onover:function onover(){},onout:function onout(){},onresize:function onresize(){},onresized:function onresized(){},onbeforeinit:undefined,oninit:function oninit(){},onafterinit:undefined,onrendered:undefined,transition_duration:350,data_x:undefined,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function data_idConverter(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:undefined,data_types:{},data_labels:{},data_labels_position:{},data_order:"desc",data_regions:{},data_color:undefined,data_colors:{},data_hide:!1,data_filter:undefined,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function data_selection_isselectable(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function data_onclick(){},data_onover:function data_onover(){},data_onout:function data_onout(){},data_onselected:function data_onselected(){},data_onunselected:function data_onunselected(){},data_onmin:undefined,data_onmax:undefined,data_url:undefined,data_headers:undefined,data_json:undefined,data_rows:undefined,data_columns:undefined,data_mimeType:undefined,data_keys:undefined,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function subchart_onbrush(){},color_pattern:[],color_tiles:undefined,color_threshold:{},legend_show:!0,legend_hide:!1,legend_contents_bindto:undefined,legend_contents_template:undefined,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:undefined,legend_item_onclick:undefined,legend_item_onover:undefined,legend_item_onout:undefined,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1,axis_rotated:!1,axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:undefined,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:undefined,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:undefined,axis_x_min:undefined,axis_x_padding:{},axis_x_height:undefined,axis_x_extent:undefined,axis_x_label:{},axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:undefined,axis_y_max:undefined,axis_y_min:undefined,axis_y_inverted:!1,axis_y_center:undefined,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:undefined,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:undefined,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:undefined,axis_y_padding:{},axis_y_default:undefined,axis_y2_show:!1,axis_y2_max:undefined,axis_y2_min:undefined,axis_y2_inverted:!1,axis_y2_center:undefined,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:undefined,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:undefined,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:undefined,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_front:!1,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:undefined,point_pattern:[],point_select_r:undefined,point_type:"circle",line_connectNull:!1,line_step_type:"step",line_classes:undefined,line_point:!0,bar_padding:0,bar_radius:undefined,bar_radius_ratio:undefined,bar_width:undefined,bar_width_ratio:.6,bar_width_max:undefined,bar_zerobased:!0,bubble_maxR:35,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:undefined,pie_label_threshold:.05,pie_label_ratio:undefined,pie_expand:{},pie_expand_duration:50,pie_innerRadius:0,pie_padAngle:0,pie_padding:0,gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:undefined,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:undefined,gauge_units:undefined,gauge_width:undefined,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:undefined,donut_label_threshold:.05,donut_label_ratio:undefined,donut_width:undefined,donut_title:"",donut_expand:{},donut_expand_duration:50,donut_padAngle:0,spline_interpolation_type:"cardinal",radar_axis_max:undefined,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function radar_level_text_format(t){return t%1==0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1,regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:undefined,tooltip_format_name:undefined,tooltip_format_value:undefined,tooltip_position:undefined,tooltip_contents:function tooltip_contents(t,e,i,n){return this.getTooltipContent?this.getTooltipContent(t,e,i,n):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function tooltip_onshow(){},tooltip_onhide:function tooltip_onhide(){},tooltip_onshown:function tooltip_onshown(){},tooltip_onhidden:function tooltip_onhidden(){},tooltip_order:null,title_text:undefined,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"}},t.exports=e["default"]},function(t,e,i){"use strict";var n=i(10),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3));(0,i(11).extend)(a["default"].prototype,{getScale:function getScale(t,e,i){return(i?(0,n.scaleTime)():(0,n.scaleLinear)()).range([t,e])},getX:function getX(t,e,i,n){var a=this.zoomScale||this.getScale(t,e,this.isTimeSeries());return this.getCustomizedScale(i?a.domain(i):a,n)},getY:function getY(t,e,i){var n=this.getScale(t,e,this.isTimeSeriesY());return i&&n.domain(i),n},getCustomizedScale:function getCustomizedScale(t,e){var i=this,n=e||function(){return i.xAxis.tickOffset()},a=function(e,i){var a=t(e)+n();return i?a:Math.ceil(a)};for(var r in t)a[r]=t[r];return a.orgDomain=function(){return t.domain()},a.orgScale=function(){return t},i.isCategorized()&&(a.domain=function(e){var i=e;return arguments.length?(t.domain(i),a):[(i=this.orgDomain())[0],i[1]+1]}),a},getYScale:function getYScale(t){return"y2"===this.axis.getId(t)?this.y2:this.y},getSubYScale:function getSubYScale(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},updateScales:function updateScales(t){var e=this,i=e.config,n=i.axis_rotated,a=!e.x;e.xMin=n?1:0,e.xMax=n?e.height:e.width,e.yMin=n?0:e.height,e.yMax=n?e.width:1,e.subXMin=e.xMin,e.subXMax=e.xMax,e.subYMin=n?0:e.height2,e.subYMax=n?e.width2:1,e.x=e.getX(e.xMin,e.xMax,a?undefined:e.x.orgDomain(),function(){return e.xAxis.tickOffset()}),e.y=e.getY(e.yMin,e.yMax,a?i.axis_y_default:e.y.domain()),e.y2=e.getY(e.yMin,e.yMax,a?i.axis_y2_default:e.y2.domain()),e.subX=e.getX(e.xMin,e.xMax,e.orgXDomain,function(t){return t%1?0:e.subXAxis.tickOffset()}),e.subY=e.getY(e.subYMin,e.subYMax,a?i.axis_y_default:e.subY.domain()),e.subY2=e.getY(e.subYMin,e.subYMax,a?i.axis_y2_default:e.subY2.domain()),e.xAxisTickFormat=e.axis.getXAxisTickFormat(),e.xAxisTickValues=e.axis.getXAxisTickValues(),e.yAxisTickValues=e.axis.getYAxisTickValues(),e.y2AxisTickValues=e.axis.getY2AxisTickValues(),e.xAxis=e.axis.getXAxis("x",e.x,e.xOrient,e.xAxisTickFormat,e.xAxisTickValues,i.axis_x_tick_outer,t),e.subXAxis=e.axis.getXAxis("subx",e.subX,e.subXOrient,e.xAxisTickFormat,e.xAxisTickValues,i.axis_x_tick_outer),e.yAxis=e.axis.getYAxis("y",e.y,e.yOrient,i.axis_y_tick_format,e.yAxisTickValues,i.axis_y_tick_outer),e.y2Axis=e.axis.getYAxis("y2",e.y2,e.y2Orient,i.axis_y2_tick_format,e.y2AxisTickValues,i.axis_y2_tick_outer),e.updateArc&&e.updateArc()}})},function(t,e,i){"use strict";var n=i(6),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),r=i(11);(0,r.extend)(a["default"].prototype,{getYDomainMinMax:function getYDomainMinMax(t,e){var i=this,a="min"===e,r=i.config.data_groups,o=i.mapToIds(t),s=i.getValuesAsIdKeyed(t),l=a?n.min:n.max;return r.length>0&&function(){for(var e=i["has"+(a?"Negative":"Positive")+"ValueInTargets"](t),n=void 0,l=void 0,u=0;l=r[u];u++)if(0!==(l=l.filter(function(t){return o.indexOf(t)>=0})).length){if(n=l[0],e&&s[n]){var d=a?function(t,e){s[n][e]=t<0?t:0}:function(t,e){s[n][e]=t>0?t:0};s[n].forEach(d)}for(var c,f=function(t,r){return s[r]?void s[r].forEach(function(t,o){var l=+t,u=a?l>0:l<0;i.axis.getId(r)===i.axis.getId(n)&&s[n]&&(!e||!u)&&(s[n][o]+=l)}):"continue"},g=1;c=l[g];g++)f(0,c)}}(),l(Object.keys(s).map(function(t){return l(s[t])}))},getYDomainMin:function getYDomainMin(t){return this.getYDomainMinMax(t,"min")},getYDomainMax:function getYDomainMax(t){return this.getYDomainMinMax(t,"max")},getYDomain:function getYDomain(t,e,i){var n=this,a=n.config,o=t.filter(function(t){return n.axis.getId(t.id)===e}),s=i?n.filterByXDomain(o,i):o,l="y2"===e?a.axis_y2_min:a.axis_y_min,u="y2"===e?a.axis_y2_max:a.axis_y_max,d=n.getYDomainMin(s),c=n.getYDomainMax(s),f="y2"===e?a.axis_y2_center:a.axis_y_center,g=n.hasType("bar",s)&&a.bar_zerobased||n.hasType("area",s)&&a.area_zerobased,h="y2"===e?a.axis_y2_inverted:a.axis_y_inverted,p=n.hasDataLabel()&&a.axis_rotated,x=n.hasDataLabel()&&!a.axis_rotated,_=void 0;if(d=(0,r.isValue)(l)?l:(0,r.isValue)(u)?d<u?d:u-10:d,c=(0,r.isValue)(u)?u:(0,r.isValue)(l)?l<c?c:l+10:c,0===s.length)return"y2"===e?n.y2.domain():n.y.domain();isNaN(d)&&(d=0),isNaN(c)&&(c=d),d===c&&(d<0?c=0:d=0);var m=d>=0&&c>=0,v=d<=0&&c<=0;((0,r.isValue)(l)&&m||(0,r.isValue)(u)&&v)&&(g=!1),g&&(m&&(d=0),v&&(c=0));var y=Math.abs(c-d),b=.1*y,T=.1*y;if((0,r.isDefined)(f)){var A=Math.max(Math.abs(d),Math.abs(c));c=f+A,d=f-A}if(p){_=n.getDataLabelLength(d,c,"width");var w=(0,r.diffDomain)(n.y.range()),D=[_[0]/w,_[1]/w];b+=y*(D[1]/(1-D[0]-D[1])),T+=y*(D[0]/(1-D[0]-D[1]))}else x&&(_=n.getDataLabelLength(d,c,"height"),b+=n.axis.convertPixelsToAxisPadding(_[1],y),T+=n.axis.convertPixelsToAxisPadding(_[0],y));"y"===e&&(0,r.notEmpty)(a.axis_y_padding)&&(b=n.axis.getPadding(a.axis_y_padding,"top",b,y),T=n.axis.getPadding(a.axis_y_padding,"bottom",T,y)),"y2"===e&&(0,r.notEmpty)(a.axis_y2_padding)&&(b=n.axis.getPadding(a.axis_y2_padding,"top",b,y),T=n.axis.getPadding(a.axis_y2_padding,"bottom",T,y)),g&&(m&&(T=d),v&&(b=-c));var L=[d-T,c+b];return h?L.reverse():L},getXDomainMinMax:function getXDomainMinMax(t,e){var i=this.config["axis_x_"+e],a="min"===e?n.min:n.max;return(0,r.isDefined)(i)?this.isTimeSeries()?this.parseDate(i):i:a(t,function(t){return a(t.values,function(t){return t.x})})},getXDomainMin:function getXDomainMin(t){return this.getXDomainMinMax(t,"min")},getXDomainMax:function getXDomainMax(t){return this.getXDomainMinMax(t,"max")},getXDomainPadding:function getXDomainPadding(t){var e=this.config,i=t[1]-t[0],n=e.axis_x_padding,a=void 0,o=void 0;this.isCategorized()?o=0:this.hasType("bar")?o=(a=this.getMaxDataCount())>1?i/(a-1)/2:.5:o=.01*i;var s=o,l=o;return(0,r.isObject)(n)&&(0,r.notEmpty)(n)?(s=(0,r.isValue)(n.left)?n.left:o,l=(0,r.isValue)(n.right)?n.right:o):(0,r.isNumber)(e.axis_x_padding)&&(s=n,l=n),{left:s,right:l}},getXDomain:function getXDomain(t){var e=this,i=[e.getXDomainMin(t),e.getXDomainMax(t)],n=i[0],a=i[1],r=e.getXDomainPadding(i),o=0,s=0;return n-a!=0||e.isCategorized()||(e.isTimeSeries()?(n=new Date(.5*n.getTime()),a=new Date(1.5*a.getTime())):(n=0===n?1:.5*n,a=0===a?-1:1.5*a)),(n||0===n)&&(o=e.isTimeSeries()?new Date(n.getTime()-r.left):n-r.left),(a||0===a)&&(s=e.isTimeSeries()?new Date(a.getTime()+r.right):a+r.right),[o,s]},updateXDomain:function updateXDomain(t,e,i,a,o){var s=this,l=s.config.zoom_enabled;if(i&&(s.x.domain(o||(0,n.extent)(s.getXDomain(t))),s.orgXDomain=s.x.domain(),l&&s.zoom.updateScaleExtent(),s.subX.domain(s.x.domain()),s.brush&&s.brush.scale(s.subX)),e){var u=o||!s.brush||(0,r.brushEmpty)(s)?s.orgXDomain:(0,r.getBrushSelection)(s).map(s.subX.invert);s.x.domain(u),l&&s.zoom.updateScaleExtent()}return a&&s.x.domain(s.trimXDomain(s.x.orgDomain())),s.x.domain()},trimXDomain:function trimXDomain(t){var e=this.getZoomDomain(),i=e[0],n=e[1];return t[0]<=i&&(t[1]=+t[1]+(i-t[0]),t[0]=i),n<=t[1]&&(t[0]=+t[0]-(t[1]-n),t[1]=n),t}})},function(t,e,i){"use strict";var n=i(6),a=i(22),r=_interopRequireDefault(i(14)),o=_interopRequireDefault(i(3)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{isX:function isX(t){var e=this.config,i=e.data_x&&t===e.data_x,n=(0,s.notEmpty)(e.data_xs)&&(0,s.hasValue)(e.data_xs,t);return i||n},isNotX:function isNotX(t){return!this.isX(t)},getXKey:function getXKey(t){var e=this.config;return e.data_x?e.data_x:(0,s.notEmpty)(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function getXValuesOfXKey(t,e){var i=this,n=void 0;return(e&&(0,s.notEmpty)(e)?i.mapToIds(e):[]).forEach(function(e){i.getXKey(e)===t&&(n=i.data.xs[e])}),n},getIndexByX:function getIndexByX(t){var e=this.filterByX(this.data.targets,t);return e.length?e[0].index:null},getXValue:function getXValue(t,e){return t in this.data.xs&&this.data.xs[t]&&(0,s.isValue)(this.data.xs[t][e])?this.data.xs[t][e]:e},getOtherTargetXs:function getOtherTargetXs(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function getOtherTargetX(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function addXs(t){var e=this;Object.keys(t).forEach(function(i){e.config.data_xs[i]=t[i]})},hasMultipleX:function hasMultipleX(t){return(0,a.set)(Object.keys(t).map(function(e){return t[e]})).size()>1},isMultipleX:function isMultipleX(){return(0,s.notEmpty)(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function addName(t){var e=void 0;return t&&(e=this.config.data_names[t.id],t.name=e===undefined?t.id:e),t},getAllValuesOnIndex:function getAllValuesOnIndex(t){var e=this;return e.filterTargetsToShow(e.data.targets).map(function(i){return e.addName(e.getValueOnIndex(i.values,t))})},getValueOnIndex:function getValueOnIndex(t,e){var i=t.filter(function(t){return t.index===e});return i.length?i[0]:null},updateTargetX:function updateTargetX(t,e){var i=this;t.forEach(function(t){t.values.forEach(function(n,a){n.x=i.generateTargetX(e[a],t.id,a)}),i.data.xs[t.id]=e})},updateTargetXs:function updateTargetXs(t,e){var i=this;t.forEach(function(t){e[t.id]&&i.updateTargetX([t],e[t.id])})},generateTargetX:function generateTargetX(t,e,i){var n=this,a=i;return n.isTimeSeries()?a=t?n.parseDate(t):n.parseDate(n.getXValue(e,i)):n.isCustomX()&&!n.isCategorized()&&(a=(0,s.isValue)(t)?+t:n.getXValue(e,i)),a},cloneTarget:function cloneTarget(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},updateXs:function updateXs(){var t=this;t.data.targets.length&&(t.xs=[],t.data.targets[0].values.forEach(function(e){t.xs[e.index]=e.x}))},getPrevX:function getPrevX(t){var e=this.xs[t-1];return(0,s.isDefined)(e)?e:null},getNextX:function getNextX(t){var e=this.xs[t+1];return(0,s.isDefined)(e)?e:null},getBaseValue:function getBaseValue(t){var e=t.value;return e&&this.isAreaRangeType(t)&&(e=this.getAreaRangeData(t,"mid")),e},getMinMaxValue:function getMinMaxValue(t){var e=this.getBaseValue.bind(this),i=void 0,a=void 0;return(t||this.data.targets.map(function(t){return t.values})).forEach(function(t){i=(0,n.min)([i,(0,n.min)(t,e)]),a=(0,n.max)([a,(0,n.max)(t,e)])}),{min:i,max:a}},getMinMaxData:function getMinMaxData(){var t=this,e=t.getCache("$minMaxData");if(!e){var i=t.data.targets.map(function(t){return t.values}),n=t.getMinMaxValue(i),a=[],r=[];i.forEach(function(e){var i=t.getFilteredDataByValue(e,n.min),o=t.getFilteredDataByValue(e,n.max);i.length&&(a=a.concat(i)),o.length&&(r=r.concat(o))}),t.addCache("$minMaxData",e={min:a,max:r})}return e},getTotalDataSum:function getTotalDataSum(){var t=this.getCache("$totalDataSum");if(!t){var e=0;this.data.targets.map(function(t){return t.values}).forEach(function(t){e+=(0,n.sum)(t,function(t){return t.value})}),this.addCache("$totalDataSum",t=e)}return t},getFilteredDataByValue:function getFilteredDataByValue(t,e){var i=this;return t.filter(function(t){return i.getBaseValue(t)===e})},getMaxDataCount:function getMaxDataCount(){return(0,n.max)(this.data.targets,function(t){return t.values.length})},getMaxDataCountTarget:function getMaxDataCountTarget(t){var e=t.length,i=0,n=void 0;return e>1?t.forEach(function(t){t.values.length>i&&(n=t,i=t.values.length)}):n=e?t[0]:null,n},mapToIds:function mapToIds(t){return t.map(function(t){return t.id})},mapToTargetIds:function mapToTargetIds(t){return t?(0,s.isArray)(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function hasTarget(t,e){for(var i,n=this.mapToIds(t),a=0;i=n[a];a++)if(i===e)return!0;return!1},isTargetToShow:function isTargetToShow(t){return this.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function isLegendToShow(t){return this.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function filterTargetsToShow(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},mapTargetsToUniqueXs:function mapTargetsToUniqueXs(t){var e=(0,a.set)((0,n.merge)(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values();return(e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})).sort(function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN})},addHiddenTargetIds:function addHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function removeHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(e){return t.indexOf(e)<0})},addHiddenLegendIds:function addHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function removeHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(e){return t.indexOf(e)<0})},getValuesAsIdKeyed:function getValuesAsIdKeyed(t){var e={};return t.forEach(function(t){var i=[];t.values.forEach(function(t){var e=t.value;(0,s.isArray)(e)?i.push.apply(i,e):(0,s.isObject)(e)&&"high"in e?i.push.apply(i,Object.values(e)):i.push(e)}),e[t.id]=i}),e},checkValueInTargets:function checkValueInTargets(t,e){for(var i=Object.keys(t),n=void 0,a=0;a<i.length;a++){n=t[i[a]].values;for(var r=0;r<n.length;r++)if(e(n[r].value))return!0}return!1},hasNegativeValueInTargets:function hasNegativeValueInTargets(t){return this.checkValueInTargets(t,function(t){return t<0})},hasPositiveValueInTargets:function hasPositiveValueInTargets(t){return this.checkValueInTargets(t,function(t){return t>0})},_checkOrder:function _checkOrder(t){var e=this.config;return(0,s.isString)(e.data_order)&&e.data_order.toLowerCase()===t},isOrderDesc:function isOrderDesc(){return this._checkOrder("desc")},isOrderAsc:function isOrderAsc(){return this._checkOrder("asc")},orderTargets:function orderTargets(t){var e=this.config,i=[].concat(t),n=this.isOrderAsc(),a=this.isOrderDesc();return n||a?i.sort(function(t,e){var i=function(t,e){return t+Math.abs(e.value)},a=t.values.reduce(i,0),r=e.values.reduce(i,0);return n?r-a:a-r}):(0,s.isFunction)(e.data_order)&&i.sort(e.data_order),i},filterByX:function filterByX(t,e){return(0,n.merge)(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},filterRemoveNull:function filterRemoveNull(t){var e=this;return t.filter(function(t){return(0,s.isValue)(e.getBaseValue(t))})},filterByXDomain:function filterByXDomain(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},hasDataLabel:function hasDataLabel(){var t=this.config.data_labels;return(0,s.isBoolean)(t)&&t||(0,s.isObjectType)(t)&&(0,s.notEmpty)(t)},getDataLabelLength:function getDataLabelLength(t,e,i){var n=this,a=[0,0];return n.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return n.dataLabelFormat(t.id)(t)}).each(function(t,e){a[e]=1.3*this.getBoundingClientRect()[i]}).remove(),a},isNoneArc:function isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc:function isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function findSameXOfValues(t,e){var i=t[e].x,n=[],a=void 0;for(a=e-1;a>=0&&i===t[a].x;a--)n.push(t[a]);for(a=e;a<t.length&&i===t[a].x;a++)n.push(t[a]);return n},findClosestFromTargets:function findClosestFromTargets(t,e){var i=this,n=t.map(function(t){return i.findClosest(t.values,e)});return i.findClosest(n,e)},findClosest:function findClosest(t,e){var i=this,n=i.config.point_sensitivity,a=void 0;return t.filter(function(t){return t&&i.isBarType(t.id)}).forEach(function(t){var e=i.main.select("."+r["default"].bars+i.getTargetSelectorSuffix(t.id)+" ."+r["default"].bar+"-"+t.index).node();!a&&i.isWithinBar(e)&&(a=t)}),t.filter(function(t){return t&&!i.isBarType(t.id)}).forEach(function(t){var r=i.dist(t,e);r<n&&(n=r,a=t)}),a},dist:function dist(t,e){var i=this.config.axis_rotated,n=i?1:0,a=i?0:1,r=this.circleY(t,t.index),o=this.x(t.x);return Math.sqrt(Math.pow(o-e[n],2)+Math.pow(r-e[a],2))},convertValuesToStep:function convertValuesToStep(t){var e=this.config,i=e.axis_rotated,n=e.line_step_type,a=this.isCategorized(),r=(0,s.isArray)(t)?t.concat():[t];if(!i&&!a)return t;var o=r[0].id,l=r[0].x-1,u=r[0].value;return a&&r.unshift({x:l,value:u,id:o}),"step-after"===n&&r.unshift({x:l-1,value:u,id:o}),u=r[(l=r.length)-1].value,a&&r.push({x:l,value:u,id:o}),"step-before"===n&&r.push({x:l+1,value:u,id:o}),r},convertValuesToRange:function convertValuesToRange(t){var e=[];return((0,s.isArray)(t)?t.concat():[t]).forEach(function(t){var i=t.x,n=t.id;e.push({x:i,id:n,value:t.value[0]}),e.push({x:i,id:n,value:t.value[2]})}),e},updateDataAttributes:function updateDataAttributes(t,e){var i=this.config["data_"+t];return(0,s.isUndefined)(e)?i:(Object.keys(e).forEach(function(t){i[t]=e[t]}),this.redraw({withLegend:!0}),i)},getAreaRangeData:function getAreaRangeData(t,e){var i=t.value;if((0,s.isArray)(i)){var n=["high","mid","low"].indexOf(e);return-1===n?null:i[n]}return i[e]}})},function(t,e){t.exports=o},function(t,e,i){"use strict";var n=i(24),a=i(22),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),o=i(11);(0,o.extend)(r["default"].prototype,{convertUrlToData:function convertUrlToData(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"csv",n=arguments[2],a=arguments[3],r=arguments[4],s=new XMLHttpRequest;if(n){var l=Object.keys(n),u=Array.isArray(l),d=0;for(l=u?l:l[Symbol.iterator]();;){var c;if(u){if(d>=l.length)break;c=l[d++]}else{if((d=l.next()).done)break;c=d.value}var f=c;s.setRequestHeader(f,n[f])}}s.open("GET",t),s.onreadystatechange=function(){if(4===s.readyState){if(200!==s.status)throw new Error(t+": Something went wrong loading!");var n=s.responseText;n&&r.call(e,e["convert"+(0,o.capitalize)(i)+"ToData"]("json"===i?JSON.parse(n):n,a))}},s.send()},_convertCsvTsvToData:function _convertCsvTsvToData(t,e){var i=t.rows(e),n=void 0;return 1===i.length?(n=[{}],i[0].forEach(function(t){n[0][t]=null})):n=t.parse(e),n},convertCsvToData:function convertCsvToData(t){return this._convertCsvTsvToData({rows:n.csvParseRows,parse:n.csvParse},t)},convertTsvToData:function convertTsvToData(t){return this._convertCsvTsvToData({rows:n.tsvParseRows,parse:n.tsvParse},t)},convertJsonToData:function convertJsonToData(t,e){var i=this,n=this.config,a=[],r=void 0,s=void 0;if((0,o.isArray)(t)){var l=e||n.data_keys;l.x?(r=l.value.concat(l.x),n.data_x=l.x):r=l.value,a.push(r),t.forEach(function(t){var e=[],n=r,s=Array.isArray(n),l=0;for(n=s?n:n[Symbol.iterator]();;){var u;if(s){if(l>=n.length)break;u=n[l++]}else{if((l=n.next()).done)break;u=l.value}var d=u,c=i.findValueInJson(t,d);(0,o.isUndefined)(c)&&(c=null),e.push(c)}a.push(e)}),s=this.convertRowsToData(a)}else Object.keys(t).forEach(function(e){var i=t[e].concat();i.unshift(e),a.push(i)}),s=this.convertColumnsToData(a);return s},findValueInJson:function findValueInJson(t,e){if(t[e]!==undefined)return t[e];var i=t,n=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),a=Array.isArray(n),r=0;for(n=a?n:n[Symbol.iterator]();;){var o;if(a){if(r>=n.length)break;o=n[r++]}else{if((r=n.next()).done)break;o=r.value}if(!(o in i)){i=undefined;break}i=i[o]}return i},convertRowsToData:function convertRowsToData(t){for(var e=t[0],i=[],n=1,a=t.length;n<a;n++){for(var r={},s=0,l=t[n].length;s<l;s++){if((0,o.isUndefined)(t[n][s]))throw new Error("Source data is missing a component at ("+n+", "+s+")!");r[e[s]]=t[n][s]}i.push(r)}return i},convertColumnsToData:function convertColumnsToData(t){for(var e=[],i=0,n=t.length;i<n;i++)for(var a=t[i][0],r=1,s=t[i].length;r<s;r++){if((0,o.isUndefined)(e[r-1])&&(e[r-1]={}),(0,o.isUndefined)(t[i][r]))throw new Error("Source data is missing a component at ("+i+", "+r+")!");e[r-1][a]=t[i][r]}return e},convertDataToTargets:function convertDataToTargets(t,e){var i=this,n=this,r=n.config,s=(0,a.keys)(t[0]).filter(n.isNotX,n),l=(0,a.keys)(t[0]).filter(n.isX,n),u=void 0;s.forEach(function(a){var s=i.getXKey(a);i.isCustomX()||i.isTimeSeries()?l.indexOf(s)>=0?u=(e&&n.data.xs[a]||[]).concat(t.map(function(t){return t[s]}).filter(o.isValue).map(function(t,e){return n.generateTargetX(t,a,e)})):r.data_x?u=i.getOtherTargetXs():(0,o.notEmpty)(r.data_xs)&&(u=n.getXValuesOfXKey(s,n.data.targets)):u=t.map(function(t,e){return e}),u&&(i.data.xs[a]=u)}),s.forEach(function(t){if(!u)throw new Error('x is not defined for id = "'+t+'".')});var d=s.map(function(e,i){var a=r.data_idConverter(e),s=n.getXKey(e),l=n.isCustomX()&&n.isCategorized(),u=l&&t.map(function(t){return t.x}).every(function(t){return r.axis_x_categories.indexOf(t)>-1});return{id:a,id_org:e,values:t.map(function(t,d){var c=t[s],f=t[e],g=void 0;return f=null===f||isNaN(f)?(0,o.isArray)(f)||(0,o.isObject)(f)&&f.high?f:null:+t[e],l&&0===i&&!(0,o.isUndefined)(c)?(!u&&0===i&&0===d&&(r.axis_x_categories=[]),-1===(g=r.axis_x_categories.indexOf(c))&&(g=r.axis_x_categories.length,r.axis_x_categories.push(c))):g=n.generateTargetX(c,e,d),((0,o.isUndefined)(t[e])||n.data.xs[e].length<=d)&&(g=undefined),{x:g,value:f,id:a}}).filter(function(t){return(0,o.isDefined)(t.x)})}});return d.forEach(function(t){r.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:Infinity)-(e.x||0===e.x?e.x:Infinity)})),t.values.forEach(function(t,e){var i=n.data.targets?n.getIndexByX(t.x):null;t.index=null===i?e:i}),n.data.xs[t.id].sort(function(t,e){return t-e})}),n.hasNegativeValue=n.hasNegativeValueInTargets(d),n.hasPositiveValue=n.hasPositiveValueInTargets(d),r.data_type&&n.setTargetType(n.mapToIds(d).filter(function(t){return!(t in r.data_types)}),r.data_type),d.forEach(function(t){return n.addCache(t.id_org,t,!0)}),d}})},function(t,e){t.exports=s},function(t,e,i){"use strict";var n=_interopRequireDefault(i(14)),a=_interopRequireDefault(i(3));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,i(11).extend)(a["default"].prototype,{load:function load(t,e){var i=this,n=t;n&&(e.filter&&(n=n.filter(e.filter)),(e.type||e.types)&&n.forEach(function(t){var n=e.types&&e.types[t.id]||e.type;i.setTargetType(t.id,n)}),i.data.targets.forEach(function(t){for(var e=0;e<n.length;e++)if(t.id===n[e].id){t.values=n[e].values,n.splice(e,1);break}}),i.data.targets=i.data.targets.concat(n)),i.updateTargets(i.data.targets),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},loadFromArgs:function loadFromArgs(t){var e=this,i=void 0;e.resetCache(),t.data?i=t.data:t.url?e.convertUrlToData(t.url,t.mimeType,t.headers,t.keys,function(i){e.load(e.convertDataToTargets(i),t)}):t.json?i=e.convertJsonToData(t.json,t.keys):t.rows?i=e.convertRowsToData(t.rows):t.columns&&(i=e.convertColumnsToData(t.columns)),e.load(i?e.convertDataToTargets(i):null,t)},unload:function unload(t,e){var i=this,a=e,r=t;return i.resetCache(),a||(a=function(){}),(r=r.filter(function(t){return i.hasTarget(i.data.targets,t)}))&&0!==r.length?(i.svg.selectAll(r.map(function(t){return i.selectorTarget(t)})).transition().style("opacity","0").remove().call(i.endall,a),void r.forEach(function(t){i.withoutFadeIn[t]=!1,i.legend&&i.legend.selectAll("."+n["default"].legendItem+i.getTargetSelectorSuffix(t)).remove(),i.data.targets=i.data.targets.filter(function(e){return e.id!==t})})):void a()}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3));(0,i(11).extend)(n["default"].prototype,{categoryName:function categoryName(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t}})},function(t,e,i){"use strict";var n=i(5),a=i(28),r=_interopRequireDefault(i(3)),o=_interopRequireDefault(i(14)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(r["default"].prototype,{initEventRect:function initEventRect(){this.main.select("."+o["default"].chart).append("g").attr("class",o["default"].eventRects).style("fill-opacity","0")},redrawEventRect:function redrawEventRect(){var t=this,e=t.config,i=e.zoom_enabled,n=t.isMultipleX(),a=void 0,r=t.main.select("."+o["default"].eventRects).style("cursor",!i||!0!==i&&"wheel"!==i.type?null:e.axis_rotate?"ns-resize":"ew-resize").classed(o["default"].eventRectsMultiple,n).classed(o["default"].eventRectsSingle,!n);if(r.selectAll("."+o["default"].eventRect).remove(),t.eventRect=r.selectAll("."+o["default"].eventRect),n)a=t.eventRect.data([0]),a=t.generateEventRectsForMultipleXs(a.enter()).merge(a);else{var s=t.getMaxDataCountTarget(t.data.targets);r.datum(s?s.values:[]),t.eventRect=r.selectAll("."+o["default"].eventRect),(a=t.eventRect.data(function(t){return t})).exit().remove(),a=t.generateEventRectsForSingleX(a.enter()).merge(a)}t.updateEventRect(a),"touch"!==t.inputType||t.svg.on("touchstart.eventRect")||t.hasArcType()||t.bindTouchOnEventRect(n)},bindTouchOnEventRect:function bindTouchOnEventRect(t){var e=this,i=e.config,a=function(){var t=n.event.changedTouches[0];return(0,n.select)(document.elementFromPoint(t.clientX,t.clientY))},r=function(t){var e=t&&t.attr("class")&&1*t.attr("class").replace(new RegExp("("+o["default"].eventRect+"-?|s)","g"),"");return(isNaN(e)||null===e)&&(e=-1),e},l=i.interaction_inputType_touch.preventDefault,u=(0,s.isBoolean)(l)&&l||!1,d=!isNaN(l)&&l||null,c=void 0;e.svg.on("touchstart.eventRect touchmove.eventRect",function(){var s=a();if(!s.empty()&&s.classed(o["default"].eventRect)){if(e.dragging||e.flowing||e.hasArcType())return;(function(t){var e=t.type,n=t.changedTouches[0]["client"+(i.axis_rotated?"Y":"X")];"touchstart"===e?u?t.preventDefault():null!==d&&(c=n):"touchmove"===e&&(u||!0===c||null!==d&&Math.abs(c-n)>=d)&&(c=!0,t.preventDefault())})(n.event),function(i){if(t)e.selectRectForMultipleXs(i);else{var n=a(),o=r(n);e.setOver(o),-1===o?e.unselectRect():e.selectRectForSingle(i,n,o)}}(this)}else e.unselectRect()}).on("touchend.eventRect",function(){var n=a();if(!n.empty()&&n.classed(o["default"].eventRect)){if(e.hasArcType()||!e.toggleShape||e.cancelClick)return void(e.cancelClick&&(e.cancelClick=!1));var s=r(n);t||-1===s||e.main.selectAll("."+o["default"].shape+"-"+s).each(function(t){return i.data_onout.call(e.api,t)})}})},updateEventRect:function updateEventRect(t){var e=this,i=e.config,n=e.zoomScale||e.x,a=t||e.eventRect.data(),r=i.axis_rotated,o=void 0,s=void 0,l=void 0,u=void 0;if(e.isMultipleX())o=0,s=0,l=e.width,u=e.height;else{var d=void 0,c=void 0;if(e.isCategorized())d=e.getEventRectWidth(),c=function(t){return n(t.x)-d/2};else{e.updateXs();var f=function(t){var i=t.index;return{prev:e.getPrevX(i),next:e.getNextX(i)}};d=function(t){var i=f(t);return null===i.prev&&null===i.next?r?e.height:e.width:(null===i.prev&&(i.prev=n.domain()[0]),null===i.next&&(i.next=n.domain()[1]),Math.max(0,(n(i.next)-n(i.prev))/2))},c=function(t){var i=f(t),a=e.data.xs[t.id][t.index];return null===i.prev&&null===i.next?0:(null===i.prev&&(i.prev=n.domain()[0]),(n(a)+n(i.prev))/2)}}o=r?0:c,s=r?c:0,l=r?e.width:d,u=r?d:e.height}a.attr("class",e.classEvent.bind(e)).attr("x",o).attr("y",s).attr("width",l).attr("height",u)},selectRectForSingle:function selectRectForSingle(t,e,i){var a=this,r=a.config,s=r.data_selection_enabled,l=r.data_selection_grouped,u=r.tooltip_grouped,d=a.getAllValuesOnIndex(i);u&&(a.showTooltip(d,t),a.showXGridFocus(d),!s||l)||a.main.selectAll("."+o["default"].shape+"-"+i).each(function(){(0,n.select)(this).classed(o["default"].EXPANDED,!0),s&&e.style("cursor",l?"pointer":null),u||(a.hideXGridFocus(),a.hideTooltip(),!l&&a.expandCirclesBars(i))}).filter(function(t){return a.isWithinShape(this,t)}).call(function(n){var o=n.data();s&&(l||r.data_selection_isselectable(o))&&e.style("cursor","pointer"),u||(a.showTooltip(o,t),a.showXGridFocus(o),a.unexpandCircles(),n.each(function(t){return a.expandCirclesBars(i,t.id)}))})},expandCirclesBars:function expandCirclesBars(t,e,i){this.config.point_focus_expand_enabled&&this.expandCircles(t,e,i),this.expandBars(t,e,i)},selectRectForMultipleXs:function selectRectForMultipleXs(t){var e=this,i=e.config,a=e.filterTargetsToShow(e.data.targets);if(!e.dragging&&!e.hasArcType(a)){var r=(0,n.mouse)(t),s=e.findClosestFromTargets(a,r);if(e.mouseover&&(!s||s.id!==e.mouseover.id)&&(i.data_onout.call(e.api,e.mouseover),e.mouseover=undefined),!s)return void e.unselectRect();var l=(e.isBubbleType(s)||e.isScatterType(s)||!i.tooltip_grouped?[s]:e.filterByX(a,s.x)).map(function(t){return e.addName(t)});e.showTooltip(l,t),e.expandCirclesBars(s.index,s.id,!0),e.showXGridFocus(l),(e.isBarType(s.id)||e.dist(s,r)<i.point_sensitivity)&&(e.svg.select("."+o["default"].eventRect).style("cursor","pointer"),!e.mouseover&&(i.data_onover.call(e.api,s),e.mouseover=s))}},unselectRect:function unselectRect(){var t=this;t.svg.select("."+o["default"].eventRect).style("cursor",null),t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars()},setOver:function setOver(t){var e=this,i=e.config;e.expandCirclesBars(t,null,!0),-1!==t&&e.main.selectAll("."+o["default"].shape+"-"+t).each(function(t){return i.data_onover.call(e.api,t)})},getDraggableSelection:function getDraggableSelection(){var t=this,e=t.config;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?(0,a.drag)().on("drag",function(){t.drag((0,n.mouse)(this))}).on("start",function(){t.dragstart((0,n.mouse)(this))}).on("end",function(){t.dragend()}):function(){}},generateEventRectsForSingleX:function generateEventRectsForSingleX(t){var e=this,i=e.config,a=t.append("rect").attr("class",e.classEvent.bind(e)).style("cursor",i.data_selection_enabled&&i.data_selection_grouped?"pointer":null).on("click",function(t){if(e.hasArcType()||!e.toggleShape||e.cancelClick)e.cancelClick&&(e.cancelClick=!1);else{var n=t.index;e.main.selectAll("."+o["default"].shape+"-"+n).each(function(t){(i.data_selection_grouped||e.isWithinShape(this,t))&&(e.toggleShape(this,t,n),e.config.data_onclick.call(e.api,t,this))})}}).call(e.getDraggableSelection());return"mouse"===e.inputType&&a.on("mouseover",function(t){e.dragging||e.flowing||e.hasArcType()||e.setOver(t.index)}).on("mousemove",function(t){if(!(e.dragging||e.flowing||e.hasArcType())){var i=t.index,a=e.svg.select("."+o["default"].eventRect+"-"+i);e.isStepType(t)&&"step-after"===e.config.line_step_type&&(0,n.mouse)(this)[0]<e.x(e.getXValue(t.id,i))&&(i-=1),-1===i?e.unselectRect():e.selectRectForSingle(this,a,i)}}).on("mouseout",function(t){if(e.config&&!e.hasArcType()){var n=t.index;e.unselectRect(),e.main.selectAll("."+o["default"].shape+"-"+n).each(function(t){return i.data_onout.call(e.api,t)})}}),a},generateEventRectsForMultipleXs:function generateEventRectsForMultipleXs(t){var e=this,i=e.config,a=t.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class",o["default"].eventRect).on("click",function(){var t=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(t)){var a=(0,n.mouse)(this),r=e.findClosestFromTargets(t,a);!r||(e.isBarType(r.id)||e.dist(r,a)<i.point_sensitivity)&&e.main.selectAll("."+o["default"].shapes+e.getTargetSelectorSuffix(r.id)).selectAll("."+o["default"].shape+"-"+r.index).each(function(){(i.data_selection_grouped||e.isWithinShape(this,r))&&(e.toggleShape(this,r,r.index),e.config.data_onclick.call(e.api,r,this))})}}).call(e.getDraggableSelection());return"mouse"===e.inputType&&a.on("mouseover mousemove",function(){e.selectRectForMultipleXs(this)}).on("mouseout",function(){!e.config||e.hasArcType()||e.unselectRect()}),a},dispatchEvent:function dispatchEvent(t,e,i){var n="."+(this.isMultipleX()?o["default"].eventRect:o["default"].eventRect+"-"+e),a=this.main.select(n).node(),r=a.getBoundingClientRect(),l=r.left+(i?i[0]:0)+r.width/2,u=r.top+(i?i[1]:0);s.emulateEvent[/^mouse/.test(t)?"mouse":"touch"](a,t,{screenX:l,screenY:u,clientX:l,clientY:u})}})},function(t,e){t.exports=l},function(t,e,i){"use strict";var n=_interopRequireDefault(i(3)),a=_interopRequireDefault(i(14)),r=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,r.extend)(n["default"].prototype,{getCurrentWidth:function getCurrentWidth(){return this.config.size_width||this.getParentWidth()},getCurrentHeight:function getCurrentHeight(){var t=this.config,e=t.size_height||this.getParentHeight();return e>0?e:320/(this.hasType("gauge")&&!t.gauge_fullCircle?2:1)},getCurrentPaddingTop:function getCurrentPaddingTop(){var t=this.config,e=(0,r.isValue)(t.padding_top)?t.padding_top:0;return this.title&&this.title.node()&&(e+=this.getTitlePadding()),e},getCurrentPaddingBottom:function getCurrentPaddingBottom(){var t=this.config;return(0,r.isValue)(t.padding_bottom)?t.padding_bottom:0},getCurrentPaddingLeft:function getCurrentPaddingLeft(t){var e=this.config;return(0,r.isValue)(e.padding_left)?e.padding_left:e.axis_rotated?e.axis_x_show?Math.max((0,r.ceil10)(this.getAxisWidthByAxisId("x",t)),40):1:!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:(0,r.ceil10)(this.getAxisWidthByAxisId("y",t))},getCurrentPaddingRight:function getCurrentPaddingRight(){var t=this,e=t.config,i=t.isLegendRight?t.getLegendWidth()+20:0;return(0,r.isValue)(e.padding_right)?e.padding_right+1:e.axis_rotated?10+i:!e.axis_y2_show||e.axis_y2_inner?2+i+(t.axis.getY2AxisLabelPosition().isOuter?20:0):(0,r.ceil10)(t.getAxisWidthByAxisId("y2"))+i},getParentRectValue:function getParentRectValue(t){for(var e="offset"+(0,r.capitalize)(t),i=this.selectChart.node(),n=void 0;!n&&i&&"BODY"!==i.tagName;){try{n=i.getBoundingClientRect()[t]}catch(o){e in i&&(n=i[e])}i=i.parentNode}if("width"===t){var a=document.body.offsetWidth;n>a&&(n=a)}return n},getParentWidth:function getParentWidth(){return this.getParentRectValue("width")},getParentHeight:function getParentHeight(){var t=this.selectChart.style("height");return t.indexOf("px")>0?+t.replace("px",""):0},getSvgLeft:function getSvgLeft(t){var e=this,i=e.config,n=i.axis_rotated||!i.axis_rotated&&!i.axis_y_inner,r=i.axis_rotated?a["default"].axisX:a["default"].axisY,o=e.main.select("."+r).node(),s=o&&n?o.getBoundingClientRect():{right:0},l=e.selectChart.node().getBoundingClientRect(),u=e.hasArcType(),d=s.right-l.left-(u?0:e.getCurrentPaddingLeft(t));return d>0?d:0},getAxisWidthByAxisId:function getAxisWidthByAxisId(t,e){var i=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(i.isInner?20:40)},getHorizontalAxisHeight:function getHorizontalAxisHeight(t){var e=this,i=e.config,n=30;return"x"!==t||i.axis_x_show?"x"===t&&i.axis_x_height?i.axis_x_height:"y"!==t||i.axis_y_show?"y2"!==t||i.axis_y2_show?("x"===t&&!i.axis_rotated&&i.axis_x_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-i.axis_x_tick_rotate)/180)),"y"===t&&i.axis_rotated&&i.axis_y_tick_rotate&&(n=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-i.axis_y_tick_rotate)/180)),n+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!i.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},getEventRectWidth:function getEventRectWidth(){return Math.max(0,this.xAxis.tickInterval())}})},function(t,e,i){"use strict";var n=i(31),a=i(5),r=_interopRequireDefault(i(14)),o=_interopRequireDefault(i(3)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{getShapeIndices:function getShapeIndices(t){var e=this.config,i={},n=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(var a,r=0;a=e.data_groups[r];r++)if(!(a.indexOf(t.id)<0))for(var o,l=0;o=a[l];l++)if(o in i){i[t.id]=i[o];break}(0,s.isUndefined)(i[t.id])&&(i[t.id]=n++)}),i.__max__=n-1,i},getShapeX:function getShapeX(t,e,i,n){var a=n?this.subX:this.zoomScale||this.x,r=this.config.bar_padding;return function(n){var o=n.id in i?i[n.id]:0,s=n.x||0===n.x?a(n.x)-t*(e/2-o):0;return t&&s&&e>1&&r&&(o&&(s+=r*o),e>2?s-=(e-1)*r/2:2===e&&(s-=r/2)),s}},getShapeY:function getShapeY(t){var e=this;return function(i){return(t?e.getSubYScale(i.id):e.getYScale(i.id))(i.value)}},getShapeOffset:function getShapeOffset(t,e,i){var n=this,a=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),r=a.map(function(t){return t.id});return function(t,o){var l=i?n.getSubYScale(t.id):n.getYScale(t.id),u=l(0),d=u,c=o;return a.forEach(function(i){var a=n.isStepType(t)?n.convertValuesToStep(i.values):i.values;i.id===t.id||e[i.id]!==e[t.id]||r.indexOf(i.id)<r.indexOf(t.id)&&(((0,s.isUndefined)(a[c])||+a[c].x!=+t.x)&&(c=-1,a.forEach(function(e,i){(e.x.constructor===Date?+e.x:e.x)===(t.x.constructor===Date?+t.x:t.x)&&(c=i)})),c in a&&a[c].value*t.value>=0&&(d+=l(a[c].value)-u))}),d}},isWithinShape:function isWithinShape(t,e){var i=this,n=(0,a.select)(t),o=void 0;return i.isTargetToShow(e.id)?i.hasValidPointType(t.nodeName)?o=i.isStepType(e)?i.isWithinStep(t,i.getYScale(e.id)(e.value)):i.isWithinCircle(t,1.5*i.pointSelectR(e)):"path"===t.nodeName&&(o=!n.classed(r["default"].bar)||i.isWithinBar(t)):o=!1,o},getInterpolate:function getInterpolate(t){var e=this.getInterpolateType(t);return{basis:n.curveBasis,"basis-closed":n.curveBasisClosed,"basis-open":n.curveBasisOpen,bundle:n.curveBundle,cardinal:n.curveCardinal,"cardinal-closed":n.curveCardinalClosed,"cardinal-open":n.curveCardinalOpen,"catmull-rom":n.curveCatmullRom,"catmull-rom-closed":n.curveCatmullRomClosed,"catmull-rom-open":n.curveCatmullRomOpen,"monotone-x":n.curveMonotoneX,"monotone-y":n.curveMonotoneY,natural:n.curveNatural,"linear-closed":n.curveLinearClosed,linear:n.curveLinear,step:n.curveStep,"step-after":n.curveStepAfter,"step-before":n.curveStepBefore}[e]},getInterpolateType:function getInterpolateType(t){var e=this,i=e.config.spline_interpolation_type,n=e.isInterpolationType(i)?i:"cardinal";return e.isSplineType(t)?n:e.isStepType(t)?e.config.line_step_type:"linear"}})},function(t,e){t.exports=u},function(t,e,i){"use strict";var n=i(5),a=i(31),r=i(6),o=i(33),s=_interopRequireDefault(i(3)),l=_interopRequireDefault(i(14)),u=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,u.extend)(s["default"].prototype,{initPie:function initPie(){var t=this.config,e=t.pie_padding,i=this.hasType("pie")&&e?.01*e:t[t.data_type+"_padAngle"]?t[t.data_type+"_padAngle"]:0;this.pie=(0,a.pie)().padAngle(i).value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}),t.data_order||this.pie.sort(null)},updateRadius:function updateRadius(){var t=this,e=t.config,i=e.pie_innerRadius,n=e.pie_padding,a=e.gauge_width||e.donut_width;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2,t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=a?(t.radius-a)/t.radius:.6;var r=i||(n?n*(t.innerRadiusRatio+.1):0);t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:r},updateArc:function updateArc(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},updateAngle:function updateAngle(t){var e=this,i=e.config,n=t,a=!1,r=0,o=void 0,s=void 0,l=void 0,u=void 0;return i?(e.pie(e.filterTargetsToShow(e.data.targets)).forEach(function(t){a||t.data.id!==n.data.id||(a=!0,(n=t).index=r),r++}),isNaN(n.startAngle)&&(n.startAngle=0),isNaN(n.endAngle)&&(n.endAngle=n.startAngle),e.isGaugeType(n.data)&&(o=i.gauge_min,s=i.gauge_max,l=Math.PI*(i.gauge_fullCircle?2:1)/(s-o),u=n.value<o?0:n.value<s?n.value-o:s-o,n.startAngle=i.gauge_startingAngle,n.endAngle=n.startAngle+l*u),a?n:null):null},getSvgArc:function getSvgArc(){var t=this,e=(0,a.arc)().outerRadius(t.radius).innerRadius(t.innerRadius),i=function(i,n){if(n)return e(i);var a=t.updateAngle(i);return a?e(a):"M 0 0"};return i.centroid=e.centroid,i},getSvgArcExpanded:function getSvgArcExpanded(t){var e=this,i=(0,a.arc)().outerRadius(e.radiusExpanded*(t||1)).innerRadius(e.innerRadius);return function(t){var n=e.updateAngle(t);return n?i(n):"M 0 0"}},getArc:function getArc(t,e,i){return i||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function transformForArcLabel(t){var e=this,i=e.config,n=e.updateAngle(t),a="";if(n&&!e.hasType("gauge")){var r=this.svgArc.centroid(n),o=isNaN(r[0])?0:r[0],s=isNaN(r[1])?0:r[1],l=Math.sqrt(o*o+s*s),d=e.hasType("donut")&&i.donut_label_ratio||e.hasType("pie")&&i.pie_label_ratio;a="translate("+o*(d=d?(0,u.isFunction)(d)?d(t,e.radius,l):d:e.radius&&(l?(36/e.radius>.375?1.175-36/e.radius:.8)*e.radius/l:0))+","+s*d+")"}return a},getArcRatio:function getArcRatio(t){var e=this,i=e.config,n=null;if(t)if(e.pie.padAngle()()){var a=e.getTotalDataSum();e.hiddenTargetIds.length&&(a-=(0,r.sum)(e.api.data.values.call(e.api,e.hiddenTargetIds))),n=t.value/a}else n=(t.endAngle-t.startAngle)/(Math.PI*(e.hasType("gauge")&&!i.gauge_fullCircle?1:2));return n},convertToArcData:function convertToArcData(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},textForArcLabel:function textForArcLabel(t){var e=this,i=t.node?t.datum():t;if(!e.shouldShowArcLabel())return"";var n=e.updateAngle(i),a=n?n.value:null,r=e.getArcRatio(n),o=i.data.id;if(!e.hasType("gauge")&&!e.meetsArcLabelThreshold(r))return"";var s=(e.getArcLabelFormat()||e.defaultArcValueFormat)(a,r,o).toString();if(t.node)if(-1===s.indexOf("\n"))t.text(s);else{var l=s.split("\n"),u=l.length-1;l.forEach(function(e,i){t.append("tspan").attr("x",0).attr("dy",(0===i?-u:1)+"em").text(e)})}return s},textForGaugeMinMax:function textForGaugeMinMax(t,e){var i=this.getGaugeLabelExtents();return i?i(t,e):t},expandArc:function expandArc(t){var e=this,i=void 0;if(e.transiting)i=window.setInterval(function(){e.transiting||(window.clearInterval(i),e.legend.selectAll("."+l["default"].legendItemFocused).size()>0&&e.expandArc(t))},10);else{var a=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(a,"."+l["default"].chartArc)).each(function(t){e.shouldExpand(t.data.id)&&(0,n.select)(this).selectAll("path").transition().duration(e.expandDuration(t.data.id)).attr("d",e.svgArcExpanded).transition().duration(2*e.expandDuration(t.data.id)).attr("d",e.svgArcExpandedSub)})}},unexpandArc:function unexpandArc(t){var e=this;if(!e.transiting){var i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i,"."+l["default"].chartArc)).selectAll("path").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr("d",e.svgArc),e.svg.selectAll(""+l["default"].arc).style("opacity","1")}},expandDuration:function expandDuration(t){var e=this.config;return this.isDonutType(t)?e.donut_expand_duration:this.isGaugeType(t)?e.gauge_expand_duration:this.isPieType(t)?e.pie_expand_duration:50},shouldExpand:function shouldExpand(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},shouldShowArcLabel:function shouldShowArcLabel(){var t=this.config,e=!0;return this.hasType("donut")?e=t.donut_label_show:this.hasType("pie")&&(e=t.pie_label_show),e},meetsArcLabelThreshold:function meetsArcLabelThreshold(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},getArcLabelFormat:function getArcLabelFormat(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},getGaugeLabelExtents:function getGaugeLabelExtents(){return this.config.gauge_label_extents},getArcTitle:function getArcTitle(){return this.hasType("donut")?this.config.donut_title:""},updateTargetsForArc:function updateTargetsForArc(t){var e=this,i=e.main,n=e.classChartArc.bind(e),a=e.classArcs.bind(e),r=e.classFocus.bind(e),o=i.select("."+l["default"].chartArcs).selectAll("."+l["default"].chartArc).data(e.pie(t)).attr("class",function(t){return n(t)+r(t.data)}),s=o.enter().append("g").attr("class",n);s.append("g").attr("class",a).merge(o),s.append("text").attr("dy",e.hasType("gauge")?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none")},initArc:function initArc(){this.arcs=this.main.select("."+l["default"].chart).append("g").attr("class",l["default"].chartArcs).attr("transform",this.getTranslate("arc")),this.setArcTitle()},setArcTitle:function setArcTitle(){var t=this.getArcTitle();if(t){var e=t.split("\n"),i=this.arcs.append("text").attr("class",l["default"].chartArcsTitle).style("text-anchor","middle");if(e.length>1){var n=+i.style("font-size").replace("px",""),a=Math.floor(i.text(".").node().getBBox().height,i.text(""));e.forEach(function(t,e){return i.insert("tspan").text(t).attr("x",0).attr("dy",e?a:0)}),i.attr("y","-"+(n*(e.length-2)||n/2))}else i.text(t)}},redrawArc:function redrawArc(t,e,i){function selectArc(t,e,i){a.expandArc(i),a.api.focus(i),a.toggleFocusLegend(i,!0),a.showTooltip([e],t)}function unselectArc(t){var e=t&&t.id||undefined;a.unexpandArc(e),a.api.revert(),a.revertLegend(),a.hideTooltip()}var a=this,r=a.config,s=a.main,u="touch"===a.inputType,d="mouse"===a.inputType,c=s.selectAll("."+l["default"].arcs).selectAll("."+l["default"].arc).data(a.arcData.bind(a));if(c.exit().transition().duration(e).style("opacity","0").remove(),(c=c.enter().append("path").attr("class",a.classArc.bind(a)).style("fill",function(t){return a.color(t.data)}).style("cursor",function(t){return r.interaction_enabled&&(r.data_selection_isselectable(t)?"pointer":null)}).style("opacity","0").each(function(t){a.isGaugeType(t.data)&&(t.startAngle=r.gauge_startingAngle,t.endAngle=r.gauge_startingAngle),this._current=t}).merge(c)).attr("transform",function(t){return!a.isGaugeType(t.data)&&i?"scale(0)":""}).style("opacity",function(t){return t===this._current?"0":"1"}).each(function(){a.transiting=!0}).transition().duration(t).attrTween("d",function(t){var e=a.updateAngle(t);if(!e)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var i=(0,o.interpolate)(this._current,e);return this._current=i(0),function(e){var n=i(e);return n.data=t.data,a.getArc(n,!0)}}).attr("transform",i?"scale(1)":"").style("fill",function(t){return a.levelColor?a.levelColor(t.data.values[0].value):a.color(t.data.id)}).style("opacity","1").call(a.endall,function(){a.transiting=!1}),r.interaction_enabled&&(c.on("click",function(t,e){var i=a.updateAngle(t),n=void 0;i&&(n=a.convertToArcData(i),a.toggleShape&&a.toggleShape(this,n,e),a.config.data_onclick.call(a.api,n,this))}),d&&c.on("mouseover",function(t){if(!a.transiting){var e=a.updateAngle(t),i=e?a.convertToArcData(e):null;selectArc(this,i,i&&i.id||undefined),a.config.data_onover(i,this)}}).on("mouseout",function(t){if(!a.transiting){var e=a.updateAngle(t),i=e?a.convertToArcData(e):null;unselectArc(),a.config.data_onout(i,this)}}).on("mousemove",function(t){var e=a.updateAngle(t),i=e?a.convertToArcData(e):null;a.showTooltip([i],this)}),u&&a.hasArcType())){var f=function(){var t=n.event.changedTouches[0];return(0,n.select)(document.elementFromPoint(t.clientX,t.clientY))};a.svg.on("touchstart",function(){if(!a.transiting){var t=f().datum(),e=t&&t.data&&t.data.id?a.updateAngle(t):null,i=e?a.convertToArcData(e):null,n=i&&i.id||undefined;n===undefined?unselectArc():selectArc(this,i,n),a.config.data_onover(i,this)}}).on("touchend",function(){if(!a.transiting){var t=f().datum(),e=t&&t.data&&t.data.id?a.updateAngle(t):null,i=e?a.convertToArcData(e):null,n=i&&i.id||undefined;n===undefined?unselectArc():selectArc(this,i,n),a.config.data_onout(i,this)}}).on("touchmove",function(){var t=f().datum(),e=t&&t.data&&t.data.id?a.updateAngle(t):null,i=e?a.convertToArcData(e):null,n=i&&i.id||undefined;n===undefined?unselectArc():selectArc(this,i,n)})}var g=s.selectAll("."+l["default"].chartArc).select("text").style("opacity","0").attr("class",function(t){return a.isGaugeType(t.data)?l["default"].gaugeValue:""});if(r.gauge_fullCircle&&g.attr("dy",""+Math.round(a.radius/14)),g[!g.empty()&&g.classed(l["default"].gaugeValue)?"call":"text"](a.textForArcLabel.bind(a)).attr("transform",a.transformForArcLabel.bind(a)).style("font-size",function(t){return a.isGaugeType(t.data)?Math.round(a.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return a.isTargetToShow(t.data.id)&&a.isArcType(t.data)?"1":"0"}),s.select("."+l["default"].chartArcsTitle).style("opacity",a.hasType("donut")||a.hasType("gauge")?"1":"0"),a.hasType("gauge")){var h=(r.gauge_fullCircle?-4:-1)*r.gauge_startingAngle;a.arcs.select("."+l["default"].chartArcsBackground).attr("d",function(){var t={data:[{value:r.gauge_max}],startAngle:r.gauge_startingAngle,endAngle:h};return a.getArc(t,!0,!0)}),a.arcs.select("."+l["default"].chartArcsGaugeUnit).attr("dy",".75em").text(r.gauge_label_show?r.gauge_units:""),r.gauge_label_show&&(a.arcs.select("."+l["default"].chartArcsGaugeMin).attr("dx",-1*(a.innerRadius+(a.radius-a.innerRadius)/(r.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_min,!1)),!r.gauge_fullCircle&&a.arcs.select("."+l["default"].chartArcsGaugeMax).attr("dx",a.innerRadius+(a.radius-a.innerRadius)/2+"px").attr("dy","1.2em").text(a.textForGaugeMinMax(r.gauge_max,!0)))}},initGauge:function initGauge(){var t=this.config,e=this.arcs;this.hasType("gauge")&&(e.append("path").attr("class",l["default"].chartArcsBackground),e.append("text").attr("class",l["default"].chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.gauge_label_show&&(e.append("text").attr("class",l["default"].chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),!t.gauge_fullCircle&&e.append("text").attr("class",l["default"].chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none")))},getGaugeLabelHeight:function getGaugeLabelHeight(){return this.config.gauge_label_show?20:0}})},function(t,e){t.exports=d},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(14)),r=_interopRequireDefault(i(3)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{initBar:function initBar(){this.main.select("."+a["default"].chart).append("g").attr("class",a["default"].chartBars)},updateTargetsForBar:function updateTargetsForBar(t){var e=this,i=e.config,n=e.classChartBar.bind(e),r=e.classBars.bind(e),o=e.classFocus.bind(e);e.main.select("."+a["default"].chartBars).selectAll("."+a["default"].chartBar).data(t).attr("class",function(t){return n(t)+o(t)}).enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none").append("g").attr("class",r).style("cursor",function(t){return i.data_selection_isselectable(t)?"pointer":null})},updateBar:function updateBar(t){var e=this,i=e.barData.bind(e),n=e.classBar.bind(e),r=e.initialOpacity.bind(e),o=function(t){return e.color(t.id)};e.mainBar=e.main.selectAll("."+a["default"].bars).selectAll("."+a["default"].bar).data(i),e.mainBar.exit().transition().duration(t).style("opacity","0").remove(),e.mainBar=e.mainBar.enter().append("path").attr("class",n).style("stroke",o).style("fill",o).merge(e.mainBar).style("opacity",r)},redrawBar:function redrawBar(t,e){return[(e?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",t).style("fill",this.color).style("opacity","1")]},getBarW:function getBarW(t,e){var i=this.config,n=(0,o.isNumber)(i.bar_width)?i.bar_width:e?t.tickInterval(this.getMaxDataCount())*i.bar_width_ratio/e:0;return i.bar_width_max&&n>i.bar_width_max?i.bar_width_max:n},getBars:function getBars(t,e){var i=(0,o.isValue)(t)?"-"+t:"";return(e?this.main.selectAll("."+a["default"].bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+a["default"].bar+i)},expandBars:function expandBars(t,e,i){i&&this.unexpandBars(),this.getBars(t,e).classed(a["default"].EXPANDED,!0)},unexpandBars:function unexpandBars(t){this.getBars(t).classed(a["default"].EXPANDED,!1)},generateDrawBar:function generateDrawBar(t,e){var i=this.config,n=this.generateGetBarPoints(t,e),a=i.axis_rotated,r=i.data_groups.length,s=i.bar_radius,l=i.bar_radius_ratio,u=(0,o.isNumber)(s)&&s>0?function(){return s}:(0,o.isNumber)(l)?function(t){return t*l}:null;return function(t,e){var i=n(t,e),o=+a,s=+!o,l=t.value<0,d=["",""],c=0;if(u&&!r){var f=a?s:o,g=i[2][f]-i[0][f],h="a"+(c=u(g))+","+c+" "+(l?"1 0 0":"0 0 1")+" ";d[+!a]=""+h+c+","+c,d[+a]=""+h+[-c,c][a?"sort":"reverse"](),l&&d.reverse()}var p=a?"H"+(i[1][o]-c)+" "+d[0]+"V"+(i[2][s]-c)+" "+d[1]+"H"+i[3][o]:"V"+(i[1][s]+(l?-c:c))+" "+d[0]+"H"+(i[2][o]-c)+" "+d[1]+"V"+i[3][s];return"M"+i[0][o]+","+i[0][s]+p+"z"}},generateGetBarPoints:function generateGetBarPoints(t,e){var i=this,n=e?i.subXAxis:i.xAxis,a=t.__max__+1,r=i.getBarW(n,a),o=i.getShapeX(r,a,t,!!e),s=i.getShapeY(!!e),l=i.getShapeOffset(i.isBarType,t,!!e),u=e?i.getSubYScale:i.getYScale;return function(t,e){var n=u.call(i,t.id)(0),a=l(t,e)||n,d=o(t),c=s(t);return i.config.axis_rotated&&(t.value>0&&c<n||t.value<0&&n<c)&&(c=n),[[d,a],[d,c-(n-a)],[d+r,c-(n-a)],[d+r,a]]}},isWithinBar:function isWithinBar(t){var e=(0,n.mouse)(t),i=(0,o.getRectSegList)(t),a=t.getBBox(),r=i[0],s=i[1],l=Math.min(r.x,s.x),u=Math.min(r.y,s.y),d=a.width,c=a.height;return l-2<e[0]&&e[0]<l+d+2&&u-2<e[1]&&e[1]<u+c+2}})},function(t,e,i){"use strict";var n=i(6),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),r=i(11);(0,r.extend)(a["default"].prototype,{initBubble:function initBubble(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)},getBaseLength:function getBaseLength(){var t=this.getCache("$baseLength");return t||this.addCache("$baseLength",t=(0,n.min)([this.axes.x.select("path").node().getTotalLength(),this.axes.y.select("path").node().getTotalLength()])),t},getBubbleR:function getBubbleR(t){var e=this.config.bubble_maxR;(0,r.isFunction)(e)?e=e(t):!(0,r.isNumber)(e)&&(e=this.getBaseLength()/(2*this.getMaxDataCount())+12);var i=(0,n.max)(this.getMinMaxData().max.map(function(t){return(0,r.isObject)(t.value)?t.value.mid:t.value})),a=e*e*Math.PI,o=t.value*(a/i);return Math.sqrt(o/Math.PI)}})},function(t,e,i){"use strict";var n=i(31),a=i(5),r=_interopRequireDefault(i(14)),o=_interopRequireDefault(i(3)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{initLine:function initLine(){this.main.select("."+r["default"].chart).append("g").attr("class",r["default"].chartLines)},updateTargetsForLine:function updateTargetsForLine(t){var e=this,i=e.config,n=e.classChartLine.bind(e),a=e.classLines.bind(e),o=e.classAreas.bind(e),s=e.classCircles.bind(e),l=e.classFocus.bind(e),u=e.main.select("."+r["default"].chartLines).selectAll("."+r["default"].chartLine).data(t).attr("class",function(t){return n(t)+l(t)}).enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none");u.append("g").attr("class",a),u.append("g").attr("class",o),i.point_show&&(i.data_selection_enabled&&u.append("g").attr("class",function(t){return e.generateClass(r["default"].selectedCircles,t.id)}),u.append("g").attr("class",s).style("cursor",function(t){return i.data_selection_isselectable(t)?"pointer":null})),t.forEach(function(t){e.main.selectAll("."+r["default"].selectedCircles+e.getTargetSelectorSuffix(t.id)).selectAll(""+r["default"].selectedCircle).each(function(e){e.value=t.values[e.index].value})})},updateLine:function updateLine(t){var e=this;e.mainLine=e.main.selectAll("."+r["default"].lines).selectAll("."+r["default"].line).data(e.lineData.bind(e)),e.mainLine.exit().transition().duration(t).style("opacity","0").remove(),e.mainLine=e.mainLine.enter().append("path").attr("class",function(t){return e.classLine.bind(e)(t)+" "+(e.extraLineClasses(t)||"")}).style("stroke",e.color).merge(e.mainLine).style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null)},redrawLine:function redrawLine(t,e){return[(e?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity","1")]},getCurve:function getCurve(t){var e=this;return e.config.axis_rotated&&e.isStepType(t)?function(i){var n=e.getInterpolate(t)(i);return n.orgPoint=n.point,n.pointRotated=function(t,e){1===this._point&&(this._point=2);var i=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,i),this._context.lineTo(t,i),this._x=t,this._y=e},n.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},n}:e.getInterpolate(t)},generateDrawLine:function generateDrawLine(t,e){var i=this,a=i.config,r=a.line_connectNull,o=a.axis_rotated,s=i.generateGetLinePoints(t,e),l=e?i.getSubYScale:i.getYScale,u=function(t){return(e?i.subxx:i.xx).call(i,t)},d=function(t,e){return a.data_groups.length>0?s(t,e)[0][1]:l.call(i,t.id)(i.getBaseValue(t))},c=(0,n.line)();return c=o?c.x(d).y(u):c.x(u).y(d),r||(c=c.defined(function(t){return null!==i.getBaseValue(t)})),function(t){var n=e?i.x:i.subX,s=l.call(i,t.id),u=r?i.filterRemoveNull(t.values):t.values,d=0,f=0,g=void 0;return i.isLineType(t)?a.data_regions[t.id]?g=i.lineWithRegions(u,n,s,a.data_regions[t.id]):(i.isStepType(t)&&(u=i.convertValuesToStep(u)),g=c.curve(i.getCurve(t))(u)):(u[0]&&(d=n(u[0].x),f=s(u[0].value)),g=o?"M "+f+" "+d:"M "+d+" "+f),g||"M 0 0"}},generateGetLinePoints:function generateGetLinePoints(t,e){var i=this,n=i.config,a=t.__max__+1,r=!!e,o=i.getShapeX(0,a,t,r),s=i.getShapeY(r),l=i.getShapeOffset(i.isLineType,t,r),u=r?i.getSubYScale:i.getYScale;return function(t,e){var a=u.call(i,t.id)(0),r=l(t,e)||a,d=o(t),c=s(t);n.axis_rotated&&(t.value>0&&c<a||t.value<0&&a<c)&&(c=a);var f=[d,c-(a-r)];return[f,f,f,f]}},lineWithRegions:function lineWithRegions(t,e,i,n){var a=this,r=a.config.axis_rotated,o=a.isTimeSeries(),l=a.isCategorized()?.5:0,u=[],d=void 0,c=void 0,f=void 0,g=void 0,h=function(t,e){for(var i,n=0;i=e[n];n++)if(i.start<t&&t<=i.end)return i.style;return!1};if((0,s.isDefined)(n))for(var p,x=function(t,e){return(0,s.isUndefined)(t)?e:o?a.parseDate(t):t},_=0;p=n[_];_++){var m=x(p.start,t[0].x),v=x(p.end,t[t.length-1].x),y=p.style||{dasharray:"2 2"};u[_]={start:m,end:v,style:y}}for(var b,T=r?function(t){return i(t.value)}:function(t){return e(t.x)},A=r?function(t){return e(t.x)}:function(t){return i(t.value)},w=function(t){return"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]},D=o?function(t,n,a,o){var s=t.x.getTime(),l=n.x-t.x,u=new Date(s+l*a),d=new Date(s+l*(a+o)),g=r?[[i(c(a)),e(u)],[i(c(a+f)),e(d)]]:[[e(u),i(c(a))],[e(d),i(c(a+f))]];return w(g)}:function(t,n,a,o){var s=r?[[i(c(a),!0),e(d(a))],[i(c(a+o),!0),e(d(a+o))]]:[[e(d(a),!0),i(c(a))],[e(d(a+o),!0),i(c(a+o))]];return w(s)},L="M",S=0;b=t[S];S++){var C=t[S-1];y=h(b.x,u);if((0,s.isUndefined)(u)||!y)L+=(S?"L":"")+T(b)+","+A(b);else{try{y=y.dasharray.split(" ")}catch(M){y="2 2".split(" ")}d=a.getScale(C.x+l,b.x+l,o),c=a.getScale(C.value,b.value);var R=e(b.x)-e(C.x),F=i(b.value)-i(C.value),X=Math.sqrt(Math.pow(R,2)+Math.pow(F,2));g=(f=y[0]/X)*y[1];for(var I=f;I<=1;I+=g)L+=D(C,b,I,f),I+g>=1&&(L+=D(C,b,1,0))}}return L},updateArea:function updateArea(t){var e=this;e.mainArea=e.main.selectAll("."+r["default"].areas).selectAll("."+r["default"].area).data(e.lineData.bind(e)),e.mainArea.exit().transition().duration(t).style("opacity","0").remove(),e.mainArea=e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=(0,a.select)(this).style("opacity"),"0"}).merge(e.mainArea),e.mainArea.style("opacity",e.orgAreaOpacity)},redrawArea:function redrawArea(t,e){var i=this;return[(e?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",t).style("fill",this.color).style("opacity",function(t){return i.isAreaRangeType(t)?i.orgAreaOpacity/1.75:i.orgAreaOpacity})]},generateDrawArea:function generateDrawArea(t,e){var i=this,a=i.config,r=a.line_connectNull,o=a.axis_rotated,s=a.data_groups.length>0,l=i.generateGetAreaPoints(t,e),u=e?i.getSubYScale:i.getYScale,d=function(t){return(e?i.subxx:i.xx).call(i,t)},c=function(t,e){return s?l(t,e)[0][1]:u.call(i,t.id)(i.isAreaRangeType(t)?i.getAreaRangeData(t,"high"):i.getAreaBaseValue(t.id))},f=function(t,e){return s?l(t,e)[1][1]:u.call(i,t.id)(i.isAreaRangeType(t)?i.getAreaRangeData(t,"low"):t.value)};return function(t){var e=r?i.filterRemoveNull(t.values):t.values,s=0,l=0,u=void 0;if(i.isAreaType(t)){var g=(0,n.area)();g=o?g.y(d).x0(c).x1(f):g.x(d).y0(a.area_above?0:c).y1(f),r||(g=g.defined(function(t){return null!==i.getBaseValue(t)})),i.isStepType(t)&&(e=i.convertValuesToStep(e)),u=g.curve(i.getCurve(t))(e)}else e[0]&&(s=i.x(e[0].x),l=i.getYScale(t.id)(e[0].value)),u=o?"M "+l+" "+s:"M "+s+" "+l;return u||"M 0 0"}},getAreaBaseValue:function getAreaBaseValue(){return 0},generateGetAreaPoints:function generateGetAreaPoints(t,e){var i=this,n=i.config,a=t.__max__+1,r=i.getShapeX(0,a,t,!!e),o=i.getShapeY(!!e),s=i.getShapeOffset(i.isAreaType,t,!!e),l=e?i.getSubYScale:i.getYScale;return function(t,e){var a=l.call(i,t.id)(0),u=s(t,e)||a,d=r(t),c=o(t);return n.axis_rotated&&(t.value>0&&c<a||t.value<0&&a<c)&&(c=a),[[d,u],[d,c-(a-u)],[d,c-(a-u)],[d,u]]}},updateCircle:function updateCircle(){var t=this;t.config.point_show&&(t.mainCircle=t.main.selectAll("."+r["default"].circles).selectAll("."+r["default"].circle).data(function(e){return!t.isBarType(e)&&(!t.isLineType(e)||t.shouldDrawPointsForLine(e))&&t.labelishData(e)}),t.mainCircle.exit().remove(),t.mainCircle=t.mainCircle.enter().append(t.point("create",this,t.classCircle.bind(t),t.pointR.bind(t),t.color)).merge(t.mainCircle).style("stroke",t.color).style("opacity",t.initialOpacityForCircle.bind(t)))},redrawCircle:function redrawCircle(t,e,i,n){var a=this,o=a.main.selectAll("."+r["default"].selectedCircle);if(!a.config.point_show)return[];var s=[];a.mainCircle.each(function(r){var l=a.point("update",a,t,e,a.opacityForCircle.bind(a),a.color,i,n,o).bind(this)(r);s.push(l)});var l=a.isCirclePoint()?"c":"";return[s,o.attr(l+"x",t).attr(l+"y",e)]},circleX:function circleX(t){var e=(0,s.isValue)(t.x);return this.config.zoom_enabled&&this.zoomScale?e?this.zoomScale(t.x):null:e?this.x(t.x):null},updateCircleY:function updateCircleY(){var t=this,e=void 0,i=void 0;t.config.data_groups.length>0?(e=t.getShapeIndices(t.isLineType),i=t.generateGetLinePoints(e),t.circleY=function(t,e){return i(t,e)[0][1]}):t.circleY=function(e){return t.getYScale(e.id)(t.getBaseValue(e))}},getCircles:function getCircles(t,e){var i=(0,s.isValue)(t)?"-"+t:"";return(e?this.main.selectAll("."+r["default"].circles+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+r["default"].circle+i)},expandCircles:function expandCircles(t,e,i){var n=this,o=n.pointExpandedR.bind(n);i&&n.unexpandCircles();var s=n.getCircles(t,e).classed(r["default"].EXPANDED,!0),l=o(s)/n.config.point_r;n.isCirclePoint()?s.attr("r",o):s.each(function(){var t=(0,a.select)(this),e=this.getBBox(),i=e.x+.5*e.width,n=e.y+.5*e.height;"circle"===this.tagName?t.attr("r",o):t.style("transform","translate("+(1-l)*i+"px, "+(1-l)*n+"px) scale("+l+")")})},unexpandCircles:function unexpandCircles(t){var e=this,i=e.pointR.bind(e),n=e.getCircles(t).filter(function(){return(0,a.select)(this).classed(r["default"].EXPANDED)}).classed(r["default"].EXPANDED,!1);n.attr("r",i),e.isCirclePoint()||n.style("transform","scale("+i(n)/e.config.point_r+")")},pointR:function(t){var e=this.config.point_r,i=e;return this.isStepType(t)?i=0:this.isBubbleType(t)?i=this.getBubbleR(t):(0,s.isFunction)(e)&&(i=e(t)),i},pointExpandedR:function pointExpandedR(t){var e=this.config,i=this.isBubbleType(t)?1.15:1.75;return e.point_focus_expand_enabled?e.point_focus_expand_r||this.pointR(t)*i:this.pointR(t)},pointSelectR:function pointSelectR(t){var e=this.config.point_select_r;return(0,s.isFunction)(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function isWithinCircle(t,e){var i=(0,a.mouse)(t),n=(0,a.select)(t),r=this.isCirclePoint()?"c":"",o=+n.attr(r+"x"),s=+n.attr(r+"y");if(!o&&!s&&1===t.nodeType){var l=t.getBBox?t.getBBox():t.getBoundingClientRect();o=l.x,s=l.y}return Math.sqrt(Math.pow(o-i[0],2)+Math.pow(s-i[1],2))<e},isWithinStep:function isWithinStep(t,e){return Math.abs(e-(0,a.mouse)(t)[1])<30},shouldDrawPointsForLine:function shouldDrawPointsForLine(t){var e=this.config.line_point;return!0===e||(0,s.isArray)(e)&&-1!==e.indexOf(t.id)}})},function(t,e,i){"use strict";var n=i(5),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),r=i(11);(0,r.extend)(a["default"].prototype,{hasValidPointType:function hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function hasValidPointDrawMethods(t){var e=t||this.config.point_type;return(0,r.isObjectType)(e)&&(0,r.isFunction)(e.create)&&(0,r.isFunction)(e.update)},insertPointInfoDefs:function insertPointInfoDefs(t,e){for(var i,a=(new DOMParser).parseFromString(t,"image/svg+xml").firstChild,o=document.createElementNS(n.namespaces.svg,a.nodeName.toLowerCase()),s=a.attributes,l=0;i=s[l];l++)i=i.name,o.setAttribute(i,a.getAttribute(i));o.id=e,o.style.fill="inherit",o.style.stroke="inherit",a.children.length&&(o.innerHTML=(0,r.toArray)(a.children).map(function(t){return t.outerHTML}).join("")),this.defs.node().appendChild(o)},pointFromDefs:function pointFromDefs(t){return this.defs.select("#"+t)},generatePoint:function generatePoint(){var t=this,e=t.config,i=[],a=(0,r.notEmpty)(e.point_pattern)?e.point_pattern:[e.point_type];return function(e,r){for(var o=arguments.length,s=Array(o>2?o-2:0),l=2;l<o;l++)s[l-2]=arguments[l];return function(o){var l=o.id||o.data&&o.data.id||o,u=(0,n.select)(this),d=void 0;if(i.indexOf(l)<0&&i.push(l),d=a[i.indexOf(l)%a.length],t.hasValidPointType(d))d=t[d];else if(!t.hasValidPointDrawMethods(d)){var c=t.datetimeId+"-point-"+l;if(t.pointFromDefs(c).size()<1&&t.insertPointInfoDefs(d,c),"create"===e)return t.custom.create.bind(r).apply(undefined,[u,c].concat(s));if("update"===e)return t.custom.update.bind(r).apply(undefined,[u].concat(s))}return d[e].bind(r).apply(undefined,[u].concat(s))}}},getTransitionName:function getTransitionName(){return Math.random().toString()},custom:{create:function create(t,e,i,n,a){return t.append("use").attr("xlink:href","#"+e).attr("class",i).style("fill",a).node()},update:function update(t,e,i,n,a,r,o,s){var l=t.node().getBBox();l.width/=2,l.height/=2;var u=function(t){return e(t)-l.width},d=function(t){return i(t)-l.height},c=t;if(r){var f=this.getTransitionName();o&&(c=t.attr("x",u)),c=t.transition(f).attr("x",u).attr("y",d).transition(f),s.transition(this.getTransitionName())}else c=t.attr("x",u).attr("y",d);return c.style("opacity",n).style("fill",a)}},circle:{create:function create(t,e,i,n){return t.append("circle").attr("class",e).attr("r",i).style("fill",n).node()},update:function update(t,e,i,n,a,r,o,s){var l=this,u=t;if(l.hasType("bubble")&&(u=u.attr("r",l.pointR.bind(l))),r){var d=l.getTransitionName();o&&(u=u.attr("cx",e)),u=u.transition(d).attr("cx",e).attr("cy",i).transition(d),s.transition(l.getTransitionName())}else u=u.attr("cx",e).attr("cy",i);return u.style("opacity",n).style("fill",a)}},rectangle:{create:function create(t,e,i,n){var a=function(t){return 2*i(t)};return t.append("rect").attr("class",e).attr("width",a).attr("height",a).style("fill",n).node()},update:function update(t,e,i,n,a,r,o,s){var l=this.config.point_r,u=function(t){return e(t)-l},d=function(t){return i(t)-l},c=t;if(r){var f=this.getTransitionName();o&&(c=c.attr("x",u)),c=c.transition(f).attr("x",u).attr("y",d).transition(f),s.transition(this.getTransitionName())}else c=c.attr("x",u).attr("y",d);return c.style("opacity",n).style("fill",a)}}})},function(t,e,i){"use strict";var n=i(5),a=i(6),r=_interopRequireDefault(i(3)),o=_interopRequireDefault(i(14)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var l="$radarPoints";(0,s.extend)(r["default"].prototype,{initRadar:function initRadar(){var t=this,e=t.config;t.hasType("radar")&&(t.radars=t.main.select("."+o["default"].chart).append("g").attr("class",o["default"].chartRadars),t.radars.levels=t.radars.append("g").attr("class",o["default"].levels),t.radars.axes=t.radars.append("g").attr("class",o["default"].axis),t.radars.shapes=t.radars.append("g").attr("class",o["default"].shapes),t.maxValue=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function getRadarSize(){var t=this.config.axis_x_categories.length<4?-20:10,e=(Math.min(this.arcWidth,this.arcHeight)-t)/2;return[e,e]},updateTargetsForRadar:function updateTargetsForRadar(t){var e=this.config;(0,s.isEmpty)(e.axis_x_categories)&&(e.axis_x_categories=(0,a.range)(0,(0,a.max)(t).values.length)),this.generateRadarPoints()},getRadarPosition:function getRadarPosition(t,e,i,n){var a=this.config,r=this.getRadarSize(),o=r[0],l=r[1],u=a.axis_x_categories.length,d=a.radar_direction_clockwise,c=(0,s.toArray)(t).map(function(r){return function getPosition(t,e,i,n,a,r){var o=t&&n>0?i-n:n,s=2*Math.PI;return a*(1-r*("x"===e?Math.sin:Math.cos)(o*s/i))}(d,r,u,e,(0,s.isDefined)(i)?i:"x"===t?o:l,n||a.radar_size_ratio)});return 1===c.length?c[0]:c},generateRadarPoints:function generateRadarPoints(){var t=this,e=t.config,i=t.data.targets,n=t.getRadarSize(),a=n[0],r=n[1],o=t.getCache(l)||{},s=o._size;if(!s||s.width!==a&&s.height!==r){i.forEach(function(i){o[i.id]=i.values.map(function(i,n){return t.getRadarPosition(["x","y"],n,undefined,function(i){return parseFloat(Math.max(i,0))/t.maxValue*e.radar_size_ratio}(i.value))})}),o._size={width:a,height:r},t.addCache(l,o)}},redrawRadar:function redrawRadar(t,e){var i=this,n=i.getTranslate("radar");n&&(i.radars.attr("transform",n),i.main.selectAll("."+o["default"].circles).attr("transform",n),i.main.select("."+o["default"].chartTexts).attr("transform",n),i.generateRadarPoints(),i.updateRadarLevel(),i.updateRadarAxes(),i.updateRadarShape(t,e))},generateGetRadarPoints:function generateGetRadarPoints(){var t=this.getCache(l);return function(e,i){var n=t[e.id][i];return[n,n,n,n]}},updateRadarLevel:function updateRadarLevel(){var t=this,e=t.config,i=t.getRadarSize(),n=i[0],r=i[1],l=e.radar_level_depth,u=e.axis_x_categories.length,d=e.radar_level_text_show,c=t.radars.levels,f=(0,a.range)(0,l),g=e.radar_size_ratio*Math.min(n,r),h=f.map(function(t){return g*((t+1)/l)}),p=e.radar_level_text_format,x=f.map(function(e){var i=h[e];return(0,a.range)(0,u).map(function(e){return t.getRadarPosition(["x","y"],e,i,1).join(",")}).join(" ")}),_=c.selectAll("."+o["default"].level).data(f);_.exit().remove();var m=_.enter().append("g").attr("class",function(t,e){return o["default"].level+" "+o["default"].level+"-"+e});m.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),d&&(c.select("text").empty()&&c.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return p(0)}),m.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return p(t.maxValue/f.length*(e+1))})),m.merge(_).attr("transform",function(t){return"translate("+(n-h[t])+", "+(r-h[t])+")"}).selectAll("polygon").attr("points",function(t){return x[t]}),d&&c.selectAll("text").attr("x",function(t){return(0,s.isUndefined)(t)?n:x[t].split(",")[0]}).attr("y",function(t){return(0,s.isUndefined)(t)?r:0})},updateRadarAxes:function updateRadarAxes(){var t=this,e=t.config,i=t.getRadarSize(),n=i[0],a=i[1],r=e.axis_x_categories,s=t.radars.axes.selectAll("g").data(r);s.exit().remove();var l=s.enter().append("g").attr("class",function(t,e){return o["default"].axis+"-"+e});e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),s=l.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",n).attr("y1",a).attr("x2",function(e,i){return t.getRadarPosition("x",i)}).attr("y2",function(e,i){return t.getRadarPosition("y",i)}),e.radar_axis_text_show&&s.select("text").style("text-anchor","middle").attr("dy",".5em").text(function(t){return t}).datum(function(t,e){return{index:e}}).attr("x",function(e,i){return t.getRadarPosition("x",i,undefined,1)}).attr("y",function(e,i){return t.getRadarPosition("y",i,undefined,1)}),t.bindEvent()},bindEvent:function bindEvent(){var t=this,e=this;if(e.config.interaction_enabled){var i="mouse"===e.inputType;e.radars.select("."+o["default"].axis).on((i?"mouseover ":"")+"click",function(){if(!e.transiting){var t=(0,n.select)(n.event.target).datum().index;e.selectRectForSingle(e.svg.node(),null,t),e.setOver(t)}}).on("mouseout",i?function(){t.hideTooltip(),t.unexpandCircles()}:null)}},updateRadarShape:function updateRadarShape(t,e){var i=this,n=i.data.targets,a=i.getCache(l),r=i.radars.shapes.selectAll("polygon").data(n),o=r.enter().append("g").attr("class",i.classChartRadar.bind(i));r.exit().transition().duration(e).remove(),o.append("polygon").merge(r).transition().duration(t).style("fill",function(t){return i.color(t)}).style("stroke",function(t){return i.color(t)}).attr("points",function(t){return a[t.id].join(" ")})},radarCircleX:function radarCircleX(t){return this.getCache(l)[t.id][t.index][0]},radarCircleY:function radarCircleY(t){return this.getCache(l)[t.id][t.index][1]}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{initText:function initText(){this.main.select("."+r["default"].chart).append("g").attr("class",r["default"].chartTexts),this.mainText=(0,n.selectAll)([])},updateTargetsForText:function updateTargetsForText(t){var e=this,i=e.classChartText.bind(e),n=e.classTexts.bind(e),a=e.classFocus.bind(e);e.main.select("."+r["default"].chartTexts).selectAll("."+r["default"].chartText).data(t).attr("class",function(t){return i(t)+a(t)}).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none").append("g").attr("class",n)},updateText:function updateText(t){var e=this,i=this,n=i.config,a=i.labelishData.bind(i),o=i.classText.bind(i);i.mainText=i.main.selectAll("."+r["default"].texts).selectAll("."+r["default"].text).data(function(t){return e.isRadarType(t)?t.values:a(t)}),i.mainText.exit().transition().duration(t).style("fill-opacity","0").remove(),i.mainText=i.mainText.enter().append("text").merge(i.mainText).attr("class",o).attr("text-anchor",function(t){return n.axis_rotated?t.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(t){return i.color(t)}).style("fill-opacity","0").text(function(t,e,n){return i.dataLabelFormat(t.id)(t.value,t.id,e,n)})},redrawText:function redrawText(t,e,i,n){return[(n?this.mainText.transition():this.mainText).attr("x",t).attr("y",e).style("fill",this.color).style("fill-opacity",i?0:this.opacityForText.bind(this))]},getTextRect:function getTextRect(t,e,i){var a=(t.node?t.node():t).textContent,r=i.node?i.node():i,o=(0,n.select)("body").append("div").classed("bb",!0),s=o.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px"),l=(0,n.select)(r).style("font"),u=void 0;return s.selectAll(".dummy").data([a]).enter().append("text").classed(e,!!e).style("font",l).text(a).each(function(){u=this.getBoundingClientRect()}),o.remove(),u},generateXYForText:function generateXYForText(t,e,i,n){var a=this,r=a.generateGetAreaPoints(t,!1),o=a.generateGetBarPoints(e,!1),s=a.generateGetLinePoints(i,!1),l=a.generateGetRadarPoints(),u=n?a.getXForText:a.getYForText;return function(t,e){var i=a.isAreaType(t)&&r||a.isBarType(t)&&o||a.isRadarType(t)&&l||s;return u.call(a,i(t,e),t,this)}},getXForText:function getXForText(t,e,i){var n=this,a=n.config,r=void 0,o=void 0;return a.axis_rotated?(o=n.isBarType(e)?4:6,r=t[2][1]+o*(e.value<0?-1:1)):r=n.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(r>n.width?r=n.width-i.getBoundingClientRect().width:r<0&&(r=4)),r+(a.data_labels_position.x||0)},getYForText:function getYForText(t,e,i){var n=this,a=n.config,r=a.point_r,s=3,l=void 0;if(a.axis_rotated)l=(t[0][0]+t[2][0]+.6*i.getBoundingClientRect().height)/2;else if(l=t[2][1],(0,o.isNumber)(r)&&r>5&&(n.isLineType(e)||n.isScatterType(e))&&(s+=a.point_r/2.3),e.value<0||0===e.value&&!n.hasPositiveValue)l+=i.getBoundingClientRect().height,n.isBarType(e)&&n.isSafari()?l-=s:!n.isBarType(e)&&n.isChrome()&&(l+=s);else{var u=2*-s;n.isBarType(e)?u=-s:n.isBubbleType(e)&&(u=s),l+=u}if(null===e.value&&!a.axis_rotated){var d=i.getBoundingClientRect().height;l<d?l=d:l>this.height&&(l=this.height-4)}return l+(a.data_labels_position.y||0)}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),a=i(11);(0,a.extend)(n["default"].prototype,{setTargetType:function setTargetType(t,e){var i=this,n=i.config;i.mapToTargetIds(t).forEach(function(t){i.withoutFadeIn[t]=e===n.data_types[t],n.data_types[t]=e}),t||(n.data_type=e)},hasType:function hasType(t,e){var i=this.config.data_types,n=e||this.data.targets,a=!1;return n&&n.length?n.forEach(function(e){var n=i[e.id];(n&&n.indexOf(t)>=0||!n&&"line"===t)&&(a=!0)}):Object.keys(i).length?Object.keys(i).forEach(function(e){i[e]===t&&(a=!0)}):a=this.config.data_type===t,a},hasArcType:function hasArcType(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return!["pie","donut","gauge","radar"].filter(function(t){return-1===i.indexOf(t)}).every(function(i){return!e.hasType(i,t)})},isLineType:function isLineType(t){var e=(0,a.isString)(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"])},isTypeOf:function isTypeOf(t,e){var i=(0,a.isString)(t)?t:t.id,n=this.config.data_types[i];return(0,a.isArray)(e)?e.indexOf(n)>=0:n===e},isStepType:function isStepType(t){return this.isTypeOf(t,["step","area-step"])},isSplineType:function isSplineType(t){return this.isTypeOf(t,["spline","area-spline","area-spline-range"])},isAreaType:function isAreaType(t){return this.isTypeOf(t,["area","area-spline","area-spline-range","area-line-range","area-step"])},isAreaRangeType:function isAreaRangeType(t){return this.isTypeOf(t,["area-spline-range","area-line-range"])},isBarType:function isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType:function isBubbleType(t){return this.isTypeOf(t,"bubble")},isScatterType:function isScatterType(t){return this.isTypeOf(t,"scatter")},isPieType:function isPieType(t){return this.isTypeOf(t,"pie")},isGaugeType:function isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType:function isDonutType(t){return this.isTypeOf(t,"donut")},isRadarType:function isRadarType(t){return this.isTypeOf(t,"radar")},isArcType:function isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isRadarType(t)},isCirclePoint:function isCirclePoint(){var t=this.config,e=t.point_pattern;return"circle"===t.point_type&&(!e||(0,a.isArray)(e)&&0===e.length)},lineData:function lineData(t){return this.isLineType(t)?[t]:[]},arcData:function arcData(t){return this.isArcType(t.data)?[t]:[]},barData:function barData(t){return this.isBarType(t)?t.values:[]},labelishData:function labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isRadarType(t)?t.values:[]},barLineBubbleData:function barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function isInterpolationType(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t){return(0,o.isValue)(t.position)||"end"},l=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},u=function(t,e,i){return function(n){var a=t?0:e;return"start"===n.position?a=t?-i:0:"middle"===n.position&&(a=(t?-i:e)/2),a}};(0,o.extend)(a["default"].prototype,{initGrid:function initGrid(){var t=this.config;this.xgrid=(0,n.selectAll)([]),t.grid_lines_front||this.initGridLines(),t.grid_front||this.initXYFocusGrid()},initGridLines:function initGridLines(){var t=this;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",r["default"].grid+" "+r["default"].gridLines),t.gridLines.append("g").attr("class",r["default"].xgridLines),t.gridLines.append("g").attr("class",r["default"].ygridLines),t.xgridLines=(0,n.selectAll)([])},updateXGrid:function updateXGrid(t){var e=this,i=e.config,a=i.axis_rotated,o=e.generateGridData(i.grid_x_type,e.x),s=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=a?{x1:0,x2:e.width,y1:function y1(t){return e.x(t)-s},y2:function y2(t){return e.x(t)-s}}:{x1:function x1(t){return e.x(t)+s},x2:function x2(t){return e.x(t)+s},y1:0,y2:e.height},e.xgrid=e.main.select("."+r["default"].xgrids).selectAll("."+r["default"].xgrid).data(o),e.xgrid.exit().remove(),e.xgrid=e.xgrid.enter().append("line").attr("class",r["default"].xgrid).merge(e.xgrid),t||e.xgrid.each(function(){var t=(0,n.select)(this);Object.keys(e.xgridAttr).forEach(function(i){t.attr(i,e.xgridAttr[i]).style("opacity",function(){return t.attr(a?"y1":"x1")===(a?e.height:0)?"0":"1"})})})},updateYGrid:function updateYGrid(){var t=this,e=t.config,i=e.axis_rotated,n=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select("."+r["default"].ygrids).selectAll("."+r["default"].ygrid).data(n),t.ygrid.exit().remove(),t.ygrid=t.ygrid.enter().append("line").attr("class",r["default"].ygrid).merge(t.ygrid),t.ygrid.attr("x1",i?t.y:0).attr("x2",i?t.y:t.width).attr("y1",i?0:t.y).attr("y2",i?t.height:t.y),t.smoothLines(t.ygrid,"grid")},updateGrid:function updateGrid(t){var e=this;e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),e.main.select("line."+r["default"].xgridFocus).style("visibility","hidden"),e.updateXGridLines(t),e.updateYGridLines(t)},updateXGridLines:function updateXGridLines(t){var e=this,i=e.main,n=e.config,a=n.axis_rotated;n.grid_x_show&&e.updateXGrid(),e.xgridLines=i.select("."+r["default"].xgridLines).selectAll("."+r["default"].xgridLine).data(n.grid_x_lines),e.xgridLines.exit().transition().duration(t).style("opacity","0").remove();var o=e.xgridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",a?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),e.xgridLines=o.merge(e.xgridLines),e.xgridLines.attr("class",function(t){return(r["default"].xgridLine+" "+(t["class"]||"")).trim()}).select("text").attr("text-anchor",s).attr("dx",l).transition().duration(t).text(function(t){return t.text}).transition().style("opacity","1")},updateYGridLines:function updateYGridLines(t){var e=this,i=e.main,n=e.config,a=n.axis_rotated;n.grid_y_show&&e.updateYGrid(),e.ygridLines=i.select("."+r["default"].ygridLines).selectAll("."+r["default"].ygridLine).data(n.grid_y_lines),e.ygridLines.exit().transition().duration(t).style("opacity","0").remove();var o=e.ygridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",a?"rotate(-90)":"").style("opacity","0"),e.ygridLines=o.merge(e.ygridLines);var d=e.yv.bind(e);e.ygridLines.attr("class",function(t){return(r["default"].ygridLine+" "+(t["class"]||"")).trim()}).select("line").transition().duration(t).attr("x1",a?d:0).attr("x2",a?d:e.width).attr("y1",a?0:d).attr("y2",a?e.height:d).transition().style("opacity","1"),e.ygridLines.select("text").attr("text-anchor",s).attr("dx",l).transition().duration(t).attr("dy",-5).attr("x",u(a,e.width,e.height)).attr("y",d).text(function(t){return t.text}).transition().style("opacity","1")},redrawGrid:function redrawGrid(t){var e=this,i=e.config.axis_rotated,n=e.xv.bind(e),a=e.xgridLines.select("line"),r=e.xgridLines.select("text");return a=(t?a.transition():a).attr("x1",i?0:n).attr("x2",i?e.width:n).attr("y1",i?n:0).attr("y2",i?n:e.height),r=(t?r.transition():r).attr("x",u(!i,e.width,e.height)).attr("y",n).text(function(t){return t.text}),[(t?a.transition():a).style("opacity","1"),(t?r.transition():r).style("opacity","1")]},initXYFocusGrid:function initXYFocusGrid(){var t=this,e=t.config;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",r["default"].grid),e.grid_x_show&&t.grid.append("g").attr("class",r["default"].xgrids),e.grid_y_show&&t.grid.append("g").attr("class",r["default"].ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",r["default"].xgridFocus).append("line").attr("class",r["default"].xgridFocus)},showXGridFocus:function showXGridFocus(t){var e=this,i=e.config,n=i.axis_rotated,a=t.filter(function(t){return t&&(0,o.isValue)(e.getBaseValue(t))}),s=e.main.selectAll("line."+r["default"].xgridFocus),l=e.xx.bind(e);!i.tooltip_show||e.hasType("bubble")||e.hasType("scatter")||e.hasArcType()||(s.style("visibility","visible").data([a[0]]).attr(n?"y1":"x1",l).attr(n?"y2":"x2",l),e.smoothLines(s,"grid"))},hideXGridFocus:function hideXGridFocus(){this.main.select("line."+r["default"].xgridFocus).style("visibility","hidden")},updateXgridFocus:function updateXgridFocus(){var t=this.config.axis_rotated;this.main.select("line."+r["default"].xgridFocus).attr("x1",t?0:-10).attr("x2",t?this.width:-10).attr("y1",t?-10:0).attr("y2",t?-10:this.height)},generateGridData:function generateGridData(t,e){var i=this.main.select("."+r["default"].axisX).selectAll(".tick").size(),n=[];if("year"===t)for(var a=this.getXDomain(),o=a[0].getFullYear(),s=a[1].getFullYear(),l=o;l<=s;l++)n.push(new Date(l+"-01-01 00:00:00"));else(n=e.ticks(10)).length>i&&(n=n.filter(function(t){return(t+"").indexOf(".")<0}));return n},getGridFilterToRemove:function getGridFilterToRemove(t){return t?function(e){var i=!1;return((0,o.isArray)(t)?t.concat():[t]).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e["class"]===t["class"])&&(i=!0)}),i}:function(){return!0}},removeGridLines:function removeGridLines(t,e){var i=this.config,n=this.getGridFilterToRemove(t),a=e?r["default"].xgridLines:r["default"].ygridLines,o=e?r["default"].xgridLine:r["default"].ygridLine;this.main.select("."+a).selectAll("."+o).filter(n).transition().duration(i.transition_duration).style("opacity","0").remove();var s="grid_"+(e?"x":"y")+"_lines";i[s]=i[s].filter(function toShow(t){return!n(t)})}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{initTooltip:function initTooltip(){var t=this,e=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",r["default"].tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),e.tooltip_init_show){if(t.isTimeSeries()&&(0,o.isString)(e.tooltip_init_x)){var i=t.data.targets[0],n=void 0,a=void 0;for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),n=0;(a=i.values[n])&&a.x-e.tooltip_init_x!=0;n++);e.tooltip_init_x=n}t.tooltip.html(e.tooltip_contents.call(t,t.data.targets.map(function(i){return t.addName(i.values[e.tooltip_init_x])}),t.axis.getXAxisTickFormat(),t.getYFormat(t.hasArcType(null,["radar"])),t.color)),t.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display","block")}},getTooltipContent:function getTooltipContent(t,e,i,n){var a=this,r=a.config,s=r.tooltip_format_title||e,l=r.tooltip_format_name||function(t){return t},u=r.tooltip_format_value||i,d=r.tooltip_order,c=function(t){return a.getBaseValue(t)},f=a.levelColor?function(t){return a.levelColor(t.value)}:function(t){return n(t.id)};if(null===d&&r.data_groups.length){var g=a.orderTargets(a.data.targets).map(function(t){return t.id}).reverse();t.sort(function(t,e){var i=t?t.value:null,n=e?e.value:null;return i>0&&n>0&&(i=t.id?g.indexOf(t.id):null,n=e.id?g.indexOf(e.id):null),i-n})}else/^(asc|desc)$/.test(d)?t.sort(function(t,e){var i=t?c(t):null,n=e?c(e):null;return"asc"===d?i-n:n-i}):(0,o.isFunction)(d)&&t.sort(d);for(var h=void 0,p=void 0,x=void 0,_=void 0,m=0,v=t.length;m<v;m++)if((p=t[m])&&(c(p)||0===c(p))){if(!h){var y=(0,o.sanitise)(s?s(p.x):p.x);h='<table class="'+a.CLASS.tooltip+'">'+((0,o.isValue)(y)?'<tr><th colspan="2">'+y+"</th></tr>":"")}if(x=[p.ratio,p.id,p.index,t],a.isAreaRangeType(p)?_="<b>Mid:</b> "+(_=["high","low"].map(function(t){return(0,o.sanitise)(u.apply(undefined,[a.getAreaRangeData(p,t)].concat(x)))}))+" <b>High:</b> "+_[0]+" <b>Low:</b> "+_[1]:_=(0,o.sanitise)(u.apply(undefined,[c(p)].concat(x))),_!==undefined){if(null===p.name)continue;var b=(0,o.sanitise)(l.apply(undefined,[p.name].concat(x))),T=f(p);h+='<tr class="'+a.CLASS.tooltipName+a.getTargetSelectorSuffix(p.id)+'"><td class="name">',h+=a.patterns?'<svg><rect style="fill:'+T+'" width="10" height="10"></rect></svg>':'<span style="background-color:'+T+'"></span>',h+=b+'</td><td class="value">'+_+"</td></tr>"}}return h+"</table>"},tooltipPosition:function tooltipPosition(t,e,i,a){var r=this,o=r.config,s=(0,n.mouse)(a),l=s[0],u=s[1],d=r.getSvgLeft(!0),c=d+r.currentWidth-r.getCurrentPaddingRight();if(u+=20,r.hasArcType()){"touch"===r.inputType||r.hasType("radar")||(u+=r.height/2,l+=(r.width-(r.isLegendRight?r.getLegendWidth():0))/2)}else{var f=r.x(t[0].x);o.axis_rotated?(u=f+20,l+=d+100,c-=d):(u-=5,l=d+r.getCurrentPaddingLeft(!0)+20+(r.zoomScale?l:f))}var g=l+e;return g>c&&(l-=g-c+20),u+i>r.currentHeight&&(u-=i+30),u<0&&(u=0),{top:u,left:l}},showTooltip:function showTooltip(t,e){var i=this,n=i.config,a=i.hasArcType(null,["radar"]),r=t.filter(function(t){return t&&(0,o.isValue)(i.getBaseValue(t))}),s=n.tooltip_position||i.tooltipPosition;if(0!==r.length&&n.tooltip_show){var l=i.tooltip.datum(),u=l&&l.width||0,d=l&&l.height||0;if(!l||l.current!==JSON.stringify(t)){var c=n.tooltip_contents.call(i,t,i.axis.getXAxisTickFormat(),i.getYFormat(a),i.color);(0,o.callFn)(n.tooltip_onshow,i),i.tooltip.html(c).style("display","block").datum({current:JSON.stringify(t),width:u=i.tooltip.property("offsetWidth"),height:d=i.tooltip.property("offsetHeight")}),(0,o.callFn)(n.tooltip_onshown,i),i._handleLinkedCharts(!0,t[0].index)}var f=s.call(this,r,u,d,e);i.tooltip.style("top",f.top+"px").style("left",f.left+"px")}},hideTooltip:function hideTooltip(){var t=this.config;(0,o.callFn)(t.tooltip_onhide,this),this.tooltip.style("display","none").datum(null),(0,o.callFn)(t.tooltip_onhidden,this),this._handleLinkedCharts(!1)},_handleLinkedCharts:function _handleLinkedCharts(t,e){var i=this;if(i.config.tooltip_linked){var n=i.config.tooltip_linked_name;i.api.internal.charts.forEach(function(a){if(a!==i.api){var r=a.internal,o=r.config.tooltip_linked,s=r.config.tooltip_linked_name,l=document.body.contains(a.element);if(o&&n===s&&l){var u="block"===r.tooltip.style("display");try{u^t&&a.tooltip[u?"hide":"show"]({index:e})}catch(d){}}}})}}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{initLegend:function initLegend(){var t=this,e=t.config;t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g"),e.legend_show?e.legend_contents_bindto&&e.legend_contents_template?t.updateLegendTemplate():(t.legend.attr("transform",t.getTranslate("legend")),t.updateLegendWithDefaults()):(t.legend.style("visibility","hidden"),t.hiddenLegendIds=t.mapToIds(t.data.targets))},updateLegendTemplate:function updateLegendTemplate(){var t=this,e=t.config,i=(0,n.select)(e.legend_contents_bindto),a=e.legend_contents_template;if(!i.empty()){var r=t.data.targets,s=[],l="";t.mapToIds(r).forEach(function(e){var i=(0,o.isFunction)(a)?a.call(t,e,t.color(e),t.api.data(e)[0].values):a.replace(/{=COLOR}/g,t.color(e)).replace(/{=TITLE}/g,e);i&&(s.push(e),l+=i)});var u=i.html(l).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(u)}},updateLegendWithDefaults:function updateLegendWithDefaults(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},updateSizeForLegend:function updateSizeForLegend(t,e){var i=this,n=i.config,a={top:i.isLegendTop?i.getCurrentPaddingTop()+n.legend_inset_y+5.5:i.currentHeight-t-i.getCurrentPaddingBottom()-n.legend_inset_y,left:i.isLegendLeft?i.getCurrentPaddingLeft()+n.legend_inset_x+.5:i.currentWidth-e-i.getCurrentPaddingRight()-n.legend_inset_x+.5};i.margin3={top:i.isLegendRight?0:i.isLegendInset?a.top:i.currentHeight-t,right:NaN,bottom:0,left:i.isLegendRight?i.currentWidth-e:i.isLegendInset?a.left:0}},transformLegend:function transformLegend(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},updateLegendStep:function updateLegendStep(t){this.legendStep=t},updateLegendItemWidth:function updateLegendItemWidth(t){this.legendItemWidth=t},updateLegendItemHeight:function updateLegendItemHeight(t){this.legendItemHeight=t},getLegendWidth:function getLegendWidth(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},getLegendHeight:function getLegendHeight(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},opacityForLegend:function opacityForLegend(t){return t.classed(r["default"].legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function opacityForUnfocusedLegend(t){return t.classed(r["default"].legendItemHidden)?null:"0.3"},toggleFocusLegend:function toggleFocusLegend(t,e){var i=this,a=i.mapToTargetIds(t);i.legend.selectAll("."+r["default"].legendItem).filter(function(t){return a.indexOf(t)>=0}).classed(r["default"].legendItemFocused,e).transition().duration(100).style("opacity",function(){return(e?i.opacityForLegend:i.opacityForUnfocusedLegend).call(i,(0,n.select)(this))})},revertLegend:function revertLegend(){var t=this;t.legend.selectAll("."+r["default"].legendItem).classed(r["default"].legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend((0,n.select)(this))})},showLegend:function showLegend(t){var e=this,i=e.config;i.legend_show||(i.legend_show=!0,e.legend.style("visibility","visible"),!e.legendHasRendered&&e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend((0,n.select)(this))})},hideLegend:function hideLegend(t){var e=this,i=e.config;i.legend_show&&(0,o.isEmpty)(t)&&(i.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function clearLegendItemTextBoxCache(){this.legendItemTextBox={}},setLegendItem:function setLegendItem(t){var e=this,i=e.config,a="touch"===e.inputType;t.attr("class",function(t){var i=(0,n.select)(this);return(!i.empty()&&i.attr("class")||"")+e.generateClass(r["default"].legendItem,t)}).style("visibility",function(t){return e.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){(0,o.callFn)(i.legend_item_onclick,e,t)||(n.event.altKey?(e.api.hide(),e.api.show(t)):(e.api.toggle(t),!a&&e.isTargetToShow(t)?e.api.focus(t):e.api.revert())),a&&e.hideTooltip()}),a||t.on("mouseout",function(t){(0,o.callFn)(i.legend_item_onout,e,t)||((0,n.select)(this).classed(r["default"].legendItemFocused,!1),e.api.revert())}).on("mouseover",function(t){(0,o.callFn)(i.legend_item_onover,e,t)||((0,n.select)(this).classed(r["default"].legendItemFocused,!0),!e.transiting&&e.isTargetToShow(t)&&e.api.focus(t))})},updateLegend:function updateLegend(t,e,i){var a=this,s=a.config,l=s.legend_item_tile_width+5,u=0,d=0,c=void 0,f=void 0,g=0,h={},p={},x={},_=[0],m={},v=0,y=void 0,b=a.isLegendRight||a.isLegendInset,T=t.filter(function(t){return!(0,o.isDefined)(s.data_names[t])||null!==s.data_names[t]}),A=e||{},w=(0,o.getOption)(A,"withTransition",!0),D=(0,o.getOption)(A,"withTransitionForTransform",!0),L=function(t,e,i){var n=i===T.length-1,o=function(t,e){return a.legendItemTextBox[e]||(a.legendItemTextBox[e]=a.getTextRect(t,r["default"].legendItem,t)),a.legendItemTextBox[e]}(t,e),c=o.width+l+(n&&!b?0:10)+s.legend_padding,f=o.height+4,y=b?f:c,A=b?a.getLegendHeight():a.getLegendWidth(),w=void 0,D=function(t,e){e||(w=(A-g-y)/2)<10&&(w=(A-y)/2,g=0,v++),m[t]=v,_[v]=a.isLegendInset?10:w,h[t]=g,g+=y};if(0===i&&(g=0,v=0,u=0,d=0),s.legend_show&&!a.isLegendToShow(e))return p[e]=0,x[e]=0,m[e]=0,void(h[e]=0);p[e]=c,x[e]=f,(!u||c>=u)&&(u=c),(!d||f>=d)&&(d=f);var L=b?d:u;s.legend_equally?(Object.keys(p).forEach(function(t){return p[t]=u}),Object.keys(x).forEach(function(t){return x[t]=d}),(w=(A-L*T.length)/2)<10?(g=0,v=0,T.forEach(function(t){return D(t)})):D(e,!0)):D(e)};a.isLegendInset&&(v=s.legend_inset_step?s.legend_inset_step:T.length,a.updateLegendStep(v)),a.isLegendRight?(c=function(t){return u*m[t]},f=function(t){return _[m[t]]+h[t]}):a.isLegendInset?(c=function(t){return u*m[t]+10},f=function(t){return _[m[t]]+h[t]}):(c=function(t){return _[m[t]]+h[t]},f=function(t){return d*m[t]});var S=function(t,e){return c(t,e)+4+s.legend_item_tile_width},C=function(t,e){return c(t,e)},R=function(t,e){return c(t,e)-2},F=function(t,e){return c(t,e)-2+s.legend_item_tile_width},X=function(t,e){return f(t,e)+9},I=function(t,e){return f(t,e)-5},M=function(t,e){return f(t,e)+4},k=a.legend.selectAll("."+r["default"].legendItem).data(T).enter().append("g");a.setLegendItem(k),k.append("text").text(function(t){return(0,o.isDefined)(s.data_names[t])?s.data_names[t]:t}).each(function(t,e){L(this,t,e)}).style("pointer-events","none").attr("x",b?S:-200).attr("y",b?-200:X),k.append("rect").attr("class",r["default"].legendItemEvent).style("fill-opacity","0").attr("x",b?C:-200).attr("y",b?-200:I);var E=a.config.legend_usePoint;if(E){var B=[];k.append(function(t){var e=(0,o.notEmpty)(s.point_pattern)?s.point_pattern:[s.point_type];-1===B.indexOf(t)&&B.push(t);var i=e[B.indexOf(t)%e.length];return"rectangle"===i&&(i="rect"),document.createElementNS(n.namespaces.svg,a.hasValidPointType(i)?i:"use")}).attr("class",r["default"].legendItemPoint).style("fill",function(t){return a.color(t)}).style("pointer-events","none").attr("href",function(t,e,i){return"use"===i[e].nodeName.toLowerCase()?"#"+a.datetimeId+"-point-"+t:undefined})}else k.append("line").attr("class",r["default"].legendItemTile).style("stroke",a.color).style("pointer-events","none").attr("x1",b?R:-200).attr("y1",b?-200:M).attr("x2",b?F:-200).attr("y2",b?-200:M).attr("stroke-width",s.legend_item_tile_height);y=a.legend.select("."+r["default"].legendBackground+" rect"),a.isLegendInset&&u>0&&0===y.size()&&(y=a.legend.insert("g","."+r["default"].legendItem).attr("class",r["default"].legendBackground).append("rect"));var O=a.legend.selectAll("text").data(T).text(function(t){return(0,o.isDefined)(s.data_names[t])?s.data_names[t]:t}).each(function(t,e){L(this,t,e)});(w?O.transition():O).attr("x",S).attr("y",X);var P=a.legend.selectAll("rect."+r["default"].legendItemEvent).data(T);if((w?P.transition():P).attr("width",function(t){return p[t]}).attr("height",function(t){return x[t]}).attr("x",C).attr("y",I),E){var z=a.legend.selectAll("."+r["default"].legendItemPoint).data(T);(w?z.transition():z).each(function(){var t=this.nodeName.toLowerCase(),e=a.config.point_r,i="x",r="y",o=2,s=2.5,l=void 0,u=void 0,d=void 0;if("circle"===t){var c=.2*e;i="cx",r="cy",l=e+c,o=2*e,s=-c}else if("rect"===t){var f=2.5*e;u=f,d=f,s=3}(0,n.select)(this).attr(i,function(t){return R(t)+o}).attr(r,function(t){return M(t)-s}).attr("r",l).attr("width",u).attr("height",d)})}else{var Y=a.legend.selectAll("line."+r["default"].legendItemTile).data(T);(w?Y.transition():Y).style("stroke",a.color).attr("x1",R).attr("y1",M).attr("x2",F).attr("y2",M)}y&&(w?y.transition():y).attr("height",a.getLegendHeight()-12).attr("width",u*(v+1)+10),a.legend.selectAll("."+r["default"].legendItem).classed(r["default"].legendItemHidden,function(t){return!a.isTargetToShow(t)}),a.updateLegendItemWidth(u),a.updateLegendItemHeight(d),a.updateLegendStep(v),a.updateSizes(),a.updateScales(!w),a.updateSvgSize(),a.transformAll(D,i),a.legendHasRendered=!0}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3));(0,i(11).extend)(n["default"].prototype,{initTitle:function initTitle(){this.title=this.svg.append("text").text(this.config.title_text).attr("class",this.CLASS.title)},redrawTitle:function redrawTitle(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},xForTitle:function xForTitle(){var t=this,e=t.config,i=e.title_position||"left";return i.indexOf("right")>=0?t.currentWidth-t.getTextRect(t.title,t.CLASS.title,t.title).width-e.title_padding.right:i.indexOf("center")>=0?(t.currentWidth-t.getTextRect(t.title,t.CLASS.title,t.title).width)/2:e.title_padding.left},yForTitle:function yForTitle(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title,t.CLASS.title,t.title).height},getTitlePadding:function getTitlePadding(){return this.yForTitle()+this.config.title_padding.bottom}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3));(0,i(11).extend)(n["default"].prototype,{getClipPath:function getClipPath(t){var e=this.config;return!e.clipPath&&/-clip$/.test(t)||!e.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!e.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+t+")"},appendClip:function appendClip(t,e){return t.append("clipPath").attr("id",e).append("rect")},getAxisClipX:function getAxisClipX(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},getAxisClipY:function getAxisClipY(t){return t?-20:-this.margin.top},getXAxisClipX:function getXAxisClipX(){return this.getAxisClipX(!this.config.axis_rotated)},getXAxisClipY:function getXAxisClipY(){return this.getAxisClipY(!this.config.axis_rotated)},getYAxisClipX:function getYAxisClipX(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},getYAxisClipY:function getYAxisClipY(){return this.getAxisClipY(this.config.axis_rotated)},getAxisClipWidth:function getAxisClipWidth(t){var e=Math.max(30,this.margin.left),i=Math.max(30,this.margin.right);return t?this.width+2+e+i:this.margin.left+20},getAxisClipHeight:function getAxisClipHeight(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},getXAxisClipWidth:function getXAxisClipWidth(){return this.getAxisClipWidth(!this.config.axis_rotated)},getXAxisClipHeight:function getXAxisClipHeight(){return this.getAxisClipHeight(!this.config.axis_rotated)},getYAxisClipWidth:function getYAxisClipWidth(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},getYAxisClipHeight:function getYAxisClipHeight(){return this.getAxisClipHeight(this.config.axis_rotated)}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{initRegion:function initRegion(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",r["default"].regions)},updateRegion:function updateRegion(t){var e=this,i=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select("."+r["default"].regions).selectAll("."+r["default"].region).data(i.regions),e.mainRegion.exit().transition().duration(t).style("opacity","0").remove(),e.mainRegion=e.mainRegion.enter().append("g").merge(e.mainRegion).attr("class",e.classRegion.bind(e)),e.mainRegion.append("rect").style("fill-opacity","0")},redrawRegion:function redrawRegion(t){var e=this,i=e.mainRegion.select("rect");return i=(t?i.transition():i).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),[(t?i.transition():i).style("fill-opacity",function(t){return(0,o.isValue)(t.opacity)?t.opacity:"0.1"}).on("end",function(){(0,n.select)(this.parentNode).selectAll("rect:not([x])").remove()})]},getRegionXY:function getRegionXY(t,e){var i=this,n=i.config.axis_rotated,a="x"===t,r="start",o=0;return"y"===e.axis||"y2"===e.axis?(!a&&(r="end"),(a?n:!n)&&r in e&&(o=(0,i[e.axis])(e[r]))):(a?!n:n)&&r in e&&(o=(i.zoomScale||i.x)(i.isTimeSeries()?i.parseDate(e[r]):e[r])),o},regionX:function regionX(t){return this.getRegionXY("x",t)},regionY:function regionY(t){return this.getRegionXY("y",t)},getRegionSize:function getRegionSize(t,e){var i=this,n=i.config.axis_rotated,a="width"===t,r=i[a?"regionX":"regionY"](e),o="end",s=i[t];return"y"===e.axis||"y2"===e.axis?(!a&&(o="start"),(a?n:!n)&&o in e&&(s=(0,i[e.axis])(e[o]))):(a?!n:n)&&o in e&&(s=(i.zoomScale||i.x)(i.isTimeSeries()?i.parseDate(e[o]):e[o])),s<r?0:s-r},regionWidth:function regionWidth(t){return this.getRegionSize("width",t)},regionHeight:function regionHeight(t){return this.getRegionSize("height",t)},isRegionOnX:function isRegionOnX(t){return!t.axis||"x"===t.axis}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(3)),r=_interopRequireDefault(i(14)),o=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{drag:function drag(t){var e=this,i=e.config,a=e.main;if(!e.hasArcType()&&i.data_selection_enabled&&(!i.zoom_enabled||e.zoom.altDomain)&&i.data_selection_multiple){var s=e.dragStart,l=s[0],u=s[1],d=t[0],c=t[1],f=Math.min(l,d),g=Math.max(l,d),h=i.data_selection_grouped?e.margin.top:Math.min(u,c),p=i.data_selection_grouped?e.height:Math.max(u,c);a.select("."+r["default"].dragarea).attr("x",f).attr("y",h).attr("width",g-f).attr("height",p-h),a.selectAll("."+r["default"].shapes).selectAll("."+r["default"].shape).filter(function(t){return i.data_selection_isselectable(t)}).each(function(t,i){var a=(0,n.select)(this),s=a.classed(r["default"].SELECTED),l=a.classed(r["default"].INCLUDED),u=void 0,d=void 0,c=void 0,x=void 0,_=void 0,m=!1,v=void 0;if(a.classed(r["default"].circle))u=1*a.attr("cx"),d=1*a.attr("cy"),_=e.togglePoint,m=f<u&&u<g&&h<d&&d<p;else{if(!a.classed(r["default"].bar))return;u=(v=(0,o.getPathBox)(this)).x,d=v.y,c=v.width,x=v.height,_=e.togglePath,m=!(g<u||u+c<f||p<d||d+x<h)}m^l&&(a.classed(r["default"].INCLUDED,!l),a.classed(r["default"].SELECTED,!s),_.call(e,!s,a,t,i))})}},dragstart:function dragstart(t){var e=this,i=e.config;e.hasArcType()||!i.data_selection_enabled||(e.dragStart=t,e.main.select("."+r["default"].chart).append("rect").attr("class",r["default"].dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function dragend(){var t=this,e=t.config;t.hasArcType()||!e.data_selection_enabled||(t.main.select("."+r["default"].dragarea).transition().duration(100).style("opacity","0").remove(),t.main.selectAll("."+r["default"].shape).classed(r["default"].INCLUDED,!1),t.setDragStatus(!1))},setDragStatus:function setDragStatus(t){this.dragging=t}})},function(t,e,i){"use strict";var n=i(5),a=i(49),r=_interopRequireDefault(i(3)),o=_interopRequireDefault(i(14)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(r["default"].prototype,{selectPoint:function selectPoint(t,e,i){var n=this,a=n.config,r=a.axis_rotated,l=(r?n.circleY:n.circleX).bind(n),u=(r?n.circleX:n.circleY).bind(n),d=n.pointSelectR.bind(n);(0,s.callFn)(a.data_onselected,n.api,e,t.node()),n.main.select("."+o["default"].selectedCircles+n.getTargetSelectorSuffix(e.id)).selectAll("."+o["default"].selectedCircle+"-"+i).data([e]).enter().append("circle").attr("class",function(){return n.generateClass(o["default"].selectedCircle,i)}).attr("cx",l).attr("cy",u).attr("stroke",function(){return n.color(e)}).attr("r",function(t){return 1.4*n.pointSelectR(t)}).transition().duration(100).attr("r",d)},unselectPoint:function unselectPoint(t,e,i){(0,s.callFn)(this.config.data_onunselected,this.api,e,t.node()),this.main.select("."+o["default"].selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll("."+o["default"].selectedCircle+"-"+i).transition().duration(100).attr("r",0).remove()},togglePoint:function togglePoint(t,e,i,n){this[(t?"":"un")+"selectPoint"](e,i,n)},selectPath:function selectPath(t,e){var i=this,n=i.config;(0,s.callFn)(n.data_onselected,i,e,t.node()),n.interaction_brighten&&t.transition().duration(100).style("fill",function(){return(0,a.rgb)(i.color(e)).brighter(.75)})},unselectPath:function unselectPath(t,e){var i=this,n=i.config;(0,s.callFn)(n.data_onunselected,i,e,t.node()),n.interaction_brighten&&t.transition().duration(100).style("fill",function(){return i.color(e)})},togglePath:function togglePath(t,e,i,n){this[(t?"":"un")+"selectPath"](e,i,n)},getToggle:function getToggle(t,e){return"path"===t.nodeName?this.togglePath:this.isStepType(e)?function(){}:this.togglePoint},toggleShape:function toggleShape(t,e,i){var a=this,r=a.config,s=(0,n.select)(t),l=s.classed(o["default"].SELECTED),u=a.getToggle(t,e).bind(a),d=void 0;if(r.data_selection_enabled&&r.data_selection_isselectable(e)){if(!r.data_selection_multiple){var c="."+o["default"].shapes;r.data_selection_grouped&&(c+=a.getTargetSelectorSuffix(e.id)),a.main.selectAll(c).selectAll("."+o["default"].shape).each(function(t,e){var i=(0,n.select)(this);i.classed(o["default"].SELECTED)&&(d=i,u(!1,i.classed(o["default"].SELECTED,!1),t,e))})}d&&d.node()===s.node()||(s.classed(o["default"].SELECTED,!l),u(!l,s,e,i))}}})},function(t,e){t.exports=c},function(t,e,i){"use strict";var n=i(5),a=i(13),r=_interopRequireDefault(i(3)),o=_interopRequireDefault(i(14)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(r["default"].prototype,{initBrush:function initBrush(){var t=this;t.brush=t.config.axis_rotated?(0,a.brushY)():(0,a.brushX)();var e=function(){t.redrawForBrush()};t.brush.on("start",function(){"touch"===t.inputType&&t.hideTooltip(),e()}).on("brush",e),t.brush.update=function(){return 0===this.extent()()[1].filter(function(t){return isNaN(t)}).length&&t.context&&t.context.select("."+o["default"].brush).call(this),this},t.brush.scale=function(e,i){var n=t.svg.select(".bb-brush .overlay"),a=[[0,0]];e.range?a.push([e.range()[1],(i||!n.empty())&&~~n.attr("height")||60]):e.constructor===Array&&a.push(e),t.config.axis_rotated&&a.reverse(),this.extent(t.config.axis_x_extent||a),this.update()},t.brush.getSelection=function(){return t.context?t.context.select("."+o["default"].brush):(0,n.select)([])}},initSubchart:function initSubchart(){var t=this,e=t.config,i=e.subchart_show?"visible":"hidden";t.context=t.svg.append("g").attr("transform",t.getTranslate("context"));var n=t.context;n.style("visibility",i),n.append("g").attr("clip-path",t.clipPathForSubchart).attr("class",o["default"].chart),n.select("."+o["default"].chart).append("g").attr("class",o["default"].chartBars),n.select("."+o["default"].chart).append("g").attr("class",o["default"].chartLines),n.append("g").attr("clip-path",t.clipPath).attr("class",o["default"].brush).call(t.brush),t.axes.subx=n.append("g").attr("class",o["default"].axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis).style("visibility",e.subchart_axis_x_show?i:"hidden")},updateTargetsForSubchart:function updateTargetsForSubchart(t){var e=this,i=e.context,n=e.config,a=e.classChartBar.bind(e),r=e.classBars.bind(e),s=e.classChartLine.bind(e),l=e.classLines.bind(e),u=e.classAreas.bind(e);if(n.subchart_show){var d=i.select("."+o["default"].chartBars).selectAll("."+o["default"].chartBar).data(t).attr("class",a);d.enter().append("g").style("opacity","0").attr("class",a).merge(d).append("g").attr("class",r);var c=i.select("."+o["default"].chartLines).selectAll("."+o["default"].chartLine).data(t).attr("class",s),f=c.enter().append("g").style("opacity","0").attr("class",s).merge(c);f.append("g").attr("class",l),f.append("g").attr("class",u),i.selectAll("."+o["default"].brush+" rect").attr(n.axis_rotated?"width":"height",n.axis_rotated?e.width2:e.height2)}},updateBarForSubchart:function updateBarForSubchart(t){var e=this;e.contextBar=e.context.selectAll("."+o["default"].bars).selectAll("."+o["default"].bar).data(e.barData.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity","0").remove(),e.contextBar=e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color).merge(e.contextBar).style("opacity",e.initialOpacity.bind(e))},redrawBarForSubchart:function redrawBarForSubchart(t,e,i){(e?this.contextBar.transition(Math.random().toString()).duration(i):this.contextBar).attr("d",t).style("opacity","1")},updateLineForSubchart:function updateLineForSubchart(t){var e=this;e.contextLine=e.context.selectAll("."+o["default"].lines).selectAll("."+o["default"].line).data(e.lineData.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity","0").remove(),e.contextLine=e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color).merge(e.contextLine).style("opacity",e.initialOpacity.bind(e))},redrawLineForSubchart:function redrawLineForSubchart(t,e,i){(e?this.contextLine.transition(Math.random().toString()).duration(i):this.contextLine).attr("d",t).style("opacity","1")},updateAreaForSubchart:function updateAreaForSubchart(t){var e=this;e.contextArea=e.context.selectAll("."+o["default"].areas).selectAll("."+o["default"].area).data(e.lineData.bind(e)),e.contextArea.exit().transition().duration(t).style("opacity","0").remove(),e.contextArea=e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=(0,n.select)(this).style("opacity"),"0"}).merge(e.contextArea).style("opacity","0")},redrawAreaForSubchart:function redrawAreaForSubchart(t,e,i){(e?this.contextArea.transition(Math.random().toString()).duration(i):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function redrawSubchart(t,e,i,a,r,o,l){var u=this,d=u.config;if(u.context.style("visibility",d.subchart_show?"visible":"hidden"),d.subchart_show&&(n.event&&"zoom"===n.event.type&&u.brush.update(),t)){(0,s.brushEmpty)(u)||u.brush.update();var c=u.generateDrawArea(r,!0),f=u.generateDrawBar(o,!0),g=u.generateDrawLine(l,!0);u.updateBarForSubchart(i),u.updateLineForSubchart(i),u.updateAreaForSubchart(i),u.redrawBarForSubchart(f,i,i),u.redrawLineForSubchart(g,i,i),u.redrawAreaForSubchart(c,i,i)}},redrawForBrush:function redrawForBrush(){var t=this,e=t.x;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,e.orgDomain())},transformContext:function transformContext(t,e){var i=void 0;e&&e.axisSubX?i=e.axisSubX:(i=this.context.select("."+o["default"].axisX),t&&(i=i.transition())),this.context.attr("transform",this.getTranslate("context")),i.attr("transform",this.getTranslate("subx"))},getDefaultExtent:function getDefaultExtent(){var t=this,e=t.config,i=(0,s.isFunction)(e.axis_x_extent)?e.axis_x_extent(t.getXDomain(t.data.targets)):e.axis_x_extent;return t.isTimeSeries()&&(i=[t.parseDate(i[0]),t.parseDate(i[1])]),i}})},function(t,e,i){"use strict";var n=i(6),a=i(5),r=i(28),o=i(52),s=_interopRequireDefault(i(3)),l=_interopRequireDefault(i(14)),u=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,u.extend)(s["default"].prototype,{initZoom:function initZoom(){this.zoomScale=null,this.generateZoom()},bindZoomEvent:function bindZoomEvent(){var t=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0],e=this,i=e.config.zoom_enabled;e.redrawEventRect(),i&&t?!0===i||"wheel"===i.type?e.bindZoomOnEventRect():"drag"===i.type&&e.bindZoomOnDrag():!1===t&&(e.api.unzoom(),e.main.select("."+l["default"].eventRects).on(".zoom",null).on(".drag",null))},generateZoom:function generateZoom(){var t=this,e=t.config,i=(0,o.zoom)().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=function(){var i=e.zoom_extent||[1,10];return[i[0],Math.max(t.getMaxDataCount()/i[1],i[1])]},i.updateScaleExtent=function(){var e=(0,u.diffDomain)(t.x.orgDomain())/(0,u.diffDomain)(t.getZoomDomain()),i=this.orgScaleExtent();return this.scaleExtent([i[0]*e,i[1]*e]),this},i.updateTransformScale=function(i){var n=i.rescaleX(t.subX.orgScale()),a=t.trimXDomain(n.domain()),r=e.zoom_rescale;n.domain(a,t.orgXDomain),t.zoomScale=t.getCustomizedScale(n),t.xAxis.scale(t.zoomScale),r&&t.x.domain(t.zoomScale.orgDomain())},t.zoom=i},onZoomStart:function onZoomStart(){var t=this,e=a.event.sourceEvent;t.zoom.altDomain=e.altKey?t.x.orgDomain():null,t.zoom.startEvent=e,(0,u.callFn)(t.config.zoom_onzoomstart,t.api,e)},onZoom:function onZoom(){var t=this,e=t.config,i=a.event;if(e.zoom_enabled){var n="mousemove"===i.sourceEvent.type,r=i.transform;return t.zoom.updateTransformScale(r),0===t.filterTargetsToShow(t.data.targets).length?void 0:n&&t.zoom.altDomain?(t.x.domain(t.zoom.altDomain),void r.scale(t.zoomScale).updateScaleExtent()):(t.isCategorized()&&t.x.orgDomain()[0]===t.orgXDomain[0]&&t.x.domain([t.orgXDomain[0]-1e-10,t.x.orgDomain()[1]]),t.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),t.cancelClick=n,void(0,u.callFn)(e.zoom_onzoom,t.api,t.x.orgDomain()))}},onZoomEnd:function onZoomEnd(){var t=this,e=t.zoom.startEvent;event&&e.clientX===event.clientX&&e.clientY===event.clientY||(t.redrawEventRect(),t.updateZoom(),(0,u.callFn)(t.config.zoom_onzoomend,t.api,t.x.orgDomain()))},getZoomDomain:function getZoomDomain(){var t=this.config;return[(0,n.min)([this.orgXDomain[0],t.zoom_x_min]),(0,n.max)([this.orgXDomain[1],t.zoom_x_max])]},updateZoom:function updateZoom(){var t=this;if(t.zoomScale){var e=t.zoomScale.domain(),i=t.x.domain();(e[0]<=i[0]||e[0]-.015<=i[0])&&(i[1]<=e[1]||i[1]<=e[1]-.015)&&(t.xAxis.scale(t.x),t.zoomScale=null)}},bindZoomOnEventRect:function bindZoomOnEventRect(){this.main.select("."+l["default"].eventRects).call(this.zoom).on("dblclick.zoom",null)},initZoomBehaviour:function initZoomBehaviour(){var t=this,e=t.config.axis_rotated,i=0,n=0,o=null;t.zoomBehaviour=(0,r.drag)().on("start",function(){t.setDragStatus(!0),o||(o=t.main.append("rect").attr("clip-path",t.clipPath).attr("class",l["default"].zoomBrush).attr("width",e?t.width:0).attr("height",e?0:t.height)),i=(0,a.mouse)(this)[0],n=i,o.attr("x",i).attr("width",0)}).on("drag",function(){n=(0,a.mouse)(this)[0],o.attr("x",Math.min(i,n)).attr("width",Math.abs(n-i))}).on("end",function(){var e,a=t.zoomScale||t.x;t.setDragStatus(!1),o.attr("x",0).attr("width",0),i>n&&(i=(e=[n,i])[0],n=e[1]),i!==n&&t.api.zoom([i,n].map(function(t){return a.invert(t)}))})},bindZoomOnDrag:function bindZoomOnDrag(){this.main.select("."+l["default"].eventRects).call(this.zoomBehaviour)},setZoomResetButton:function setZoomResetButton(){var t=this,e=t.config,i=e.zoom_resetButton;i&&"drag"===e.zoom_enabled.type&&(t.zoom.resetBtn?t.zoom.resetBtn.style("display",null):t.zoom.resetBtn=t.selectChart.append("div").classed(l["default"].button,!0).append("span").on("click",t.api.unzoom.bind(t)).classed(l["default"].buttonZoomReset,!0).text(i.text||"Reset Zoom"))}})},function(t,e){t.exports=f},function(t,e,i){"use strict";var n=i(5),a=i(10),r=_interopRequireDefault(i(3)),o=_interopRequireDefault(i(14)),s=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var l=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];(0,s.extend)(r["default"].prototype,{getColorFromCss:function getColorFromCss(){var t=document.body,e=t.__colorPattern__;if(!e){var i=document.createElement("span");i.className=o["default"].colorPattern,i.style.display="none",t.appendChild(i);var n=window.getComputedStyle(i).backgroundImage;i.parentNode.removeChild(i),n.indexOf(";")>-1&&(e=n.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return t.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),t.__colorPattern__=e)}return e},generateColor:function generateColor(){var t=this,e=t.config,i=e.data_colors,r=e.data_color,o=[],u=(0,s.notEmpty)(e.color_pattern)?e.color_pattern:(0,a.scaleOrdinal)(t.getColorFromCss()||l).range(),d=u;if((0,s.isFunction)(e.color_tiles)){var c=e.color_tiles(),f=u.map(function(e,i){var a=e.replace(/[#\(\)\s,]/g,""),r=t.datetimeId+"-pattern-"+a+"-"+i;return function(t,e,i){var a=(0,n.select)(t.cloneNode(!0));return a.attr("id",i).insert("rect",":first-child").attr("width",a.attr("width")).attr("height",a.attr("height")).style("fill",e),{id:i,node:a.node()}}(c[i%c.length],e,r)});u=f.map(function(t){return"url(#"+t.id+")"}),t.patterns=f}return function(e){var n=e.id||e.data&&e.data.id||e,a=t.isTypeOf(n,["line","spline","step"])||!t.config.data_types[n],l=void 0;return(0,s.isFunction)(i[n])?l=i[n](e):i[n]?l=i[n]:(o.indexOf(n)<0&&o.push(n),l=a?d[o.indexOf(n)%d.length]:u[o.indexOf(n)%u.length],i[n]=l),(0,s.isFunction)(r)?r(l,e):l}},generateLevelColor:function generateLevelColor(){var t=this.config,e=t.color_pattern,i=t.color_threshold,n="value"===i.unit,a=i.max||100,r=i.values&&i.values.length?i.values:[];return(0,s.notEmpty)(i)?function(t){for(var i=e[e.length-1],o=0;o<r.length;o++)if((n?t:100*t/a)<r[o]){i=e[o];break}return i}:null}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),a=i(11);var r=function(t,e,i){var n=t.config,a="axis_"+e+"_tick_format";return(n[a]?n[a]:t.defaultValueFormat)(i)};(0,a.extend)(n["default"].prototype,{getYFormat:function getYFormat(t){var e=this,i=e.yFormat,n=e.y2Format;return t&&!e.hasType("gauge")&&(i=e.defaultArcValueFormat,n=e.defaultArcValueFormat),function(t,a,r){return("y2"===e.axis.getId(r)?n:i).call(e,t,a)}},yFormat:function yFormat(t){return r(this,"y",t)},y2Format:function y2Format(t){return r(this,"y2",t)},defaultValueFormat:function defaultValueFormat(t){return(0,a.isValue)(t)?+t:""},defaultArcValueFormat:function defaultArcValueFormat(t,e){return(100*e).toFixed(1)+"%"},dataLabelFormat:function dataLabelFormat(t){var e=this.config.data_labels,i=function(t){return(0,a.isValue)(t)?+t:""},n=i;return(0,a.isFunction)(e.format)?n=e.format:(0,a.isObjectType)(e.format)&&(n=e.format[t]?!0===e.format[t]?i:e.format[t]:function(){return""}),n}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3));(0,i(11).extend)(n["default"].prototype,{hasCaches:function hasCaches(t){if(!!(arguments.length>1&&arguments[1]!==undefined)&&arguments[1]){for(var e=0,i=t.length;e<i;e++)if(!(t[e]in this.cache))return!1;return!0}return t in this.cache},addCache:function addCache(t,e){var i=!!(arguments.length>2&&arguments[2]!==undefined)&&arguments[2];this.cache[t]=i?this.cloneTarget(e):e},getCache:function getCache(t){if(!!(arguments.length>1&&arguments[1]!==undefined)&&arguments[1]){for(var e,i=[],n=0;e=t[n];n++)e in this.cache&&i.push(this.cloneTarget(this.cache[e]));return i}return this.cache[t]||null},resetCache:function resetCache(t){for(var e in this.cache)(t||/^\$/.test(e))&&(this.cache[e]=null)}})},function(t,e,i){"use strict";var n=_interopRequireDefault(i(3)),a=_interopRequireDefault(i(14));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,i(11).extend)(n["default"].prototype,{CLASS:a["default"],generateClass:function generateClass(t,e){return" "+t+" "+(t+this.getTargetSelectorSuffix(e))},classText:function classText(t){return this.generateClass(a["default"].text,t.index)},classTexts:function classTexts(t){return this.generateClass(a["default"].texts,t.id)},classShape:function classShape(t){return this.generateClass(a["default"].shape,t.index)},classShapes:function classShapes(t){return this.generateClass(a["default"].shapes,t.id)},generateExtraLineClass:function generateExtraLineClass(){var t=this.config.line_classes||[],e=[];return function(i){var n=i.id||i.data&&i.data.id||i;return e.indexOf(n)<0&&e.push(n),t[e.indexOf(n)%t.length]}},classLine:function classLine(t){return this.classShape(t)+this.generateClass(a["default"].line,t.id)},classLines:function classLines(t){return this.classShapes(t)+this.generateClass(a["default"].lines,t.id)},classCircle:function classCircle(t){return this.classShape(t)+this.generateClass(a["default"].circle,t.index)},classCircles:function classCircles(t){return this.classShapes(t)+this.generateClass(a["default"].circles,t.id)},classBar:function classBar(t){return this.classShape(t)+this.generateClass(a["default"].bar,t.index)},classBars:function classBars(t){return this.classShapes(t)+this.generateClass(a["default"].bars,t.id)},classArc:function classArc(t){return this.classShape(t.data)+this.generateClass(a["default"].arc,t.data.id)},classArcs:function classArcs(t){return this.classShapes(t.data)+this.generateClass(a["default"].arcs,t.data.id)},classArea:function classArea(t){return this.classShape(t)+this.generateClass(a["default"].area,t.id)},classAreas:function classAreas(t){return this.classShapes(t)+this.generateClass(a["default"].areas,t.id)},classRegion:function classRegion(t,e){return this.generateClass(a["default"].region,e)+" "+("class"in t?t["class"]:"")},classEvent:function classEvent(t){return this.generateClass(a["default"].eventRect,t.index)},classTarget:function classTarget(t){var e=this.config.data_classes[t],i="";return e&&(i=" "+a["default"].target+"-"+e),this.generateClass(a["default"].target,t)+i},classFocus:function classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function classFocused(t){return" "+(this.focusedTargetIds.indexOf(t.id)>=0?a["default"].focused:"")},classDefocused:function classDefocused(t){return" "+(this.defocusedTargetIds.indexOf(t.id)>=0?a["default"].defocused:"")},classChartText:function classChartText(t){return a["default"].chartText+this.classTarget(t.id)},classChartLine:function classChartLine(t){return a["default"].chartLine+this.classTarget(t.id)},classChartBar:function classChartBar(t){return a["default"].chartBar+this.classTarget(t.id)},classChartArc:function classChartArc(t){return a["default"].chartArc+this.classTarget(t.data.id)},classChartRadar:function classChartRadar(t){return a["default"].chartRadar+this.classTarget(t.id)},getTargetSelectorSuffix:function getTargetSelectorSuffix(t){return t||0===t?("-"+t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function selectorTarget(t,e){return(e||"")+"."+(a["default"].target+this.getTargetSelectorSuffix(t))},selectorTargets:function selectorTargets(t,e){var i=this,n=t||[];return n.length?n.map(function(t){return i.selectorTarget(t,e)}):null},selectorLegend:function selectorLegend(t){return"."+(a["default"].legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function selectorLegends(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null}})},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(1)),r=_interopRequireDefault(i(14));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,i(11).extend)(a["default"].prototype,{focus:function focus(t){var e=this.internal,i=e.mapToTargetIds(t),n=e.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),n.classed(r["default"].focused,!0).classed(r["default"].defocused,!1),e.hasArcType()&&e.expandArc(i),e.toggleFocusLegend(i,!0),e.focusedTargetIds=i,e.defocusedTargetIds=e.defocusedTargetIds.filter(function(t){return i.indexOf(t)<0})},defocus:function defocus(t){var e=this.internal,i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i.filter(e.isTargetToShow,e))).classed(r["default"].focused,!1).classed(r["default"].defocused,!0),e.hasArcType()&&e.unexpandArc(i),e.toggleFocusLegend(i,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(t){return i.indexOf(t)<0}),e.defocusedTargetIds=i},revert:function revert(t){var e=this.internal,i=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(i)).classed(r["default"].focused,!1).classed(r["default"].defocused,!1),e.hasArcType()&&e.unexpandArc(i),e.config.legend_show&&(e.showLegend(i.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(i)).filter(function(){return(0,n.select)(this).classed(r["default"].legendItemFocused)}).classed(r["default"].legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1));(0,i(11).extend)(n["default"].prototype,{show:function show(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=this.internal,n=i.mapToTargetIds(t);i.removeHiddenTargetIds(n);var a=i.svg.selectAll(i.selectorTargets(n));a.transition().style("opacity","1","important").call(i.endall,function(){a.style("opacity",null).style("opacity","1")}),e.withLegend&&i.showLegend(n),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},hide:function hide(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=this.internal,n=i.mapToTargetIds(t);i.addHiddenTargetIds(n);var a=i.svg.selectAll(i.selectorTargets(n));a.transition().style("opacity","0","important").call(i.endall,function(){a.style("opacity",null).style("opacity","0")}),e.withLegend&&i.hideLegend(n),i.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},toggle:function toggle(t){var e=this,i=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this.internal,a={show:[],hide:[]};n.mapToTargetIds(t).forEach(function(t){return a[n.isTargetToShow(t)?"hide":"show"].push(t)}),a.show.length&&this.show(a.show,i),a.hide.length&&setTimeout(function(){return e.hide(a.hide,i)},0)}})},function(t,e,i){"use strict";var n=i(6),a=i(52),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),o=i(11);var s=function(t){var e=this.internal,i=t,n=void 0;if(e.config.zoom_enabled&&i){var r=e.isTimeSeries();if(r&&(i=i.map(function(t){return e.parseDate(t)})),e.config.subchart_show){var s=e.zoomScale||e.x;e.brush.getSelection().call(e.brush.move,[s(i[0]),s(i[1])]),n=i}else{var l=e.subX.domain(),u=(l[1]-l[0])/(i[1]-i[0]),d=e.isCategorized()?e.xAxis.tickOffset():0,c=r?0-u*e.x(i[0].getTime()):i[0]-u*(e.x(i[0])-d);e.zoom.updateTransformScale(a.zoomIdentity.translate(c,0).scale(u)),n=e.zoomScale.domain()}e.redraw({withTransition:!0,withY:e.config.zoom_rescale,withDimension:!1}),e.setZoomResetButton(),(0,o.callFn)(e.config.zoom_onzoom,this,e.x.orgDomain())}else n=e.zoomScale?e.zoomScale.domain():e.x.orgDomain();return n};(0,o.extend)(s,{enable:function enable(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"wheel",e=this.internal,i=e.config,n=t;t&&(n=(0,o.isString)(t)&&/^(drag|wheel)$/.test(t)?{type:t}:t),i.zoom_enabled=n,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.initZoomBehaviour(),e.bindZoomEvent()),e.updateAndRedraw()},max:function max(t){var e=this.internal,i=e.config;return(0===t||t)&&(i.zoom_x_max=(0,n.max)([e.orgXDomain[1],t])),i.zoom_x_max},min:function min(t){var e=this.internal,i=e.config;return(0===t||t)&&(i.zoom_x_min=(0,n.min)([e.orgXDomain[0],t])),i.zoom_x_min},range:function range(t){var e=this.zoom;return(0,o.isObject)(t)&&((0,o.isDefined)(t.min)&&e.min(t.min),(0,o.isDefined)(t.max)&&e.max(t.max)),{min:e.min(),max:e.max()}}}),(0,o.extend)(r["default"].prototype,{zoom:s,unzoom:function unzoom(){var t=this.internal,e=t.config;t.zoomScale&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(a.zoomIdentity),t.updateZoom(),t.zoom.resetBtn&&t.zoom.resetBtn.style("display","none"),t.redraw({withTransition:!0,withY:e.zoom_rescale}))}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);(0,a.extend)(n["default"].prototype,{load:function load(t){var e=this.internal,i=e.config;return t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(e){i.data_classes[e]=t.classes[e]}),"categories"in t&&e.isCategorized()&&(i.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(e){i.data_axes[e]=t.axes[e]}),"colors"in t&&Object.keys(t.colors).forEach(function(e){i.data_colors[e]=t.colors[e]}),"cacheIds"in t&&e.hasCaches(t.cacheIds,!0)?void e.load(e.getCache(t.cacheIds,!0),t.done):void("unload"in t&&!1!==t.unload?e.unload(e.mapToTargetIds(!0===t.unload?null:t.unload),function(){return e.loadFromArgs(t)}):e.loadFromArgs(t))},unload:function unload(t){var e=this.internal,i=t||{};(0,a.isArray)(i)?i={ids:i}:(0,a.isString)(i)&&(i={ids:[i]}),e.unload(e.mapToTargetIds(i.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),i.done&&i.done()})}})},function(t,e,i){"use strict";var n=i(5),a=i(62),r=i(7),o=_interopRequireDefault(i(1)),s=_interopRequireDefault(i(3)),l=i(11),u=_interopRequireDefault(i(14));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,l.extend)(o["default"].prototype,{flow:function flow(t){var e=this.internal,i=[],n=e.getMaxDataCount(),a=void 0,r=void 0,o=0,s=0,u=void 0,d=void 0;if(t.json)a=e.convertJsonToData(t.json,t.keys);else if(t.rows)a=e.convertRowsToData(t.rows);else{if(!t.columns)return;a=e.convertColumnsToData(t.columns)}var c=e.convertDataToTargets(a,!0);e.data.targets.forEach(function(t){for(var n=!1,a=0;a<c.length;a++)if(t.id===c[a].id){n=!0,t.values[t.values.length-1]&&(s=t.values[t.values.length-1].index+1),o=c[a].values.length;for(var r=0;r<o;r++)c[a].values[r].index=s+r,e.isTimeSeries()||(c[a].values[r].x=s+r);t.values=t.values.concat(c[a].values),c.splice(a,1);break}n||i.push(t.id)}),e.data.targets.forEach(function(t){for(var n=0;n<i.length;n++)if(t.id===i[n]){s=t.values[t.values.length-1].index+1;for(var a=0;a<o;a++)t.values.push({id:t.id,index:s+a,x:e.isTimeSeries()?e.getOtherTargetX(s+a):s+a,value:null})}}),e.data.targets.length&&c.forEach(function(t){for(var i=[],n=e.data.targets[0].values[0].index;n<s;n++)i.push({id:t.id,index:n,x:e.isTimeSeries()?e.getOtherTargetX(n):n,value:null});t.values.forEach(function(t){t.index+=s,e.isTimeSeries()||(t.x+=s)}),t.values=i.concat(t.values)}),e.data.targets=e.data.targets.concat(c);var f=e.data.targets[0],g=f.values[0];(0,l.isDefined)(t.to)?(o=0,d=e.isTimeSeries()?e.parseDate(t.to):t.to,f.values.forEach(function(t){t.x<d&&o++})):(0,l.isDefined)(t.length)&&(o=t.length),n?1===n&&e.isTimeSeries()&&(u=(f.values[f.values.length-1].x-g.x)/2,r=[new Date(+g.x-u),new Date(+g.x+u)],e.updateXDomain(null,!0,!0,!1,r)):(u=e.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-g.x:g.x-e.getXDomain(e.data.targets)[0]:1,r=[g.x-u,g.x],e.updateXDomain(null,!0,!0,!1,r)),e.updateTargets(e.data.targets),e.redraw({flow:{index:g.index,length:o,duration:(0,l.isValue)(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:n},withLegend:!0,withTransition:n>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}),(0,l.extend)(s["default"].prototype,{generateFlow:function generateFlow(t){var e=this,i=e.config;return function(){var o=t.targets,s=t.flow,d=t.drawBar,c=t.drawLine,f=t.drawArea,g=t.cx,h=t.cy,p=t.xv,x=t.xForText,_=t.yForText,m=t.duration,v=void 0,y=s.index,b=s.length,T=e.getValueOnIndex(e.data.targets[0].values,y),A=e.getValueOnIndex(e.data.targets[0].values,y+b),w=e.x.domain(),D=s.duration||m,L=s.done||function(){},S=e.generateWait(),C=e.xgrid||(0,n.selectAll)([]),R=e.xgridLines||(0,n.selectAll)([]),F=e.mainRegion||(0,n.selectAll)([]),X=e.mainText||(0,n.selectAll)([]),I=e.mainBar||(0,n.selectAll)([]),M=e.mainLine||(0,n.selectAll)([]),k=e.mainArea||(0,n.selectAll)([]),E=e.mainCircle||(0,n.selectAll)([]);e.flowing=!0,e.data.targets.forEach(function(t){t.values.splice(0,b)});var B=e.updateXDomain(o,!0,!0);e.updateXGrid&&e.updateXGrid(!0),s.orgDataCount?v=1===s.orgDataCount||(T&&T.x)===(A&&A.x)?e.x(w[0])-e.x(B[0]):e.isTimeSeries()?e.x(w[0])-e.x(B[0]):e.x(T.x)-e.x(A.x):1===e.data.targets[0].values.length?e.isTimeSeries()?(T=e.getValueOnIndex(e.data.targets[0].values,0),A=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),v=e.x(T.x)-e.x(A.x)):v=(0,l.diffDomain)(B)/2:v=e.x(w[0])-e.x(B[0]);var O="translate("+v+",0) scale("+(0,l.diffDomain)(w)/(0,l.diffDomain)(B)+",1)";e.hideXGridFocus();var P=(0,r.transition)().ease(a.easeLinear).duration(D);S.add([e.axes.x.transition(P).call(e.xAxis.setTransition(P)),I.transition(P).attr("transform",O),M.transition(P).attr("transform",O),k.transition(P).attr("transform",O),E.transition(P).attr("transform",O),X.transition(P).attr("transform",O),F.filter(e.isRegionOnX).transition(P).attr("transform",O),C.transition(P).attr("transform",O),R.transition(P).attr("transform",O)]),P.call(S,function(){var t=[],n=[],a=[];if(b){for(var r,o=0;o<b;o++)r=y+o,t.push("."+u["default"].shape+"-"+r),n.push("."+u["default"].text+"-"+r),a.push("."+u["default"].eventRect+"-"+r);e.svg.selectAll("."+u["default"].shapes).selectAll(t).remove(),e.svg.selectAll("."+u["default"].texts).selectAll(n).remove(),e.svg.selectAll("."+u["default"].eventRects).selectAll(a).remove(),e.svg.select("."+u["default"].xgrid).remove()}if(C.size()&&C.attr("transform",null).attr(e.xgridAttr),R.attr("transform",null),R.select("line").attr("x1",i.axis_rotated?0:p).attr("x2",i.axis_rotated?e.width:p),R.select("text").attr("x",i.axis_rotated?e.width:0).attr("y",p),I.attr("transform",null).attr("d",d),M.attr("transform",null).attr("d",c),k.attr("transform",null).attr("d",f),E.attr("transform",null),e.isCirclePoint())E.attr("cx",g).attr("cy",h);else{E.attr("x",function(t){return g(t)-i.point_r}).attr("y",function(t){return h(t)-i.point_r}).attr("cx",g).attr("cy",h)}X.attr("transform",null).attr("x",x).attr("y",_).style("fill-opacity",e.opacityForText.bind(e)),F.attr("transform",null),F.select("rect").filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),i.interaction_enabled&&e.redrawEventRect(),L(),e.flowing=!1})}}})},function(t,e){t.exports=g},function(t,e,i){"use strict";var n=i(5),a=_interopRequireDefault(i(1)),r=i(11),o=_interopRequireDefault(i(14));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,r.extend)(a["default"].prototype,{selected:function selected(t){var e=this.internal,i=[];return e.main.selectAll("."+(o["default"].shapes+e.getTargetSelectorSuffix(t))).selectAll("."+o["default"].shape).filter(function(){return(0,n.select)(this).classed(o["default"].SELECTED)}).each(function(t){return i.push(t)}),i},select:function select(t,e,i){var a=this.internal,s=a.config;s.data_selection_enabled&&a.main.selectAll("."+o["default"].shapes).selectAll("."+o["default"].shape).each(function(l,u){var d=(0,n.select)(this),c=l.data?l.data.id:l.id,f=a.getToggle(this,l).bind(a),g=s.data_selection_grouped||!t||t.indexOf(c)>=0,h=!e||e.indexOf(u)>=0,p=d.classed(o["default"].SELECTED);d.classed(o["default"].line)||d.classed(o["default"].area)||(g&&h?s.data_selection_isselectable(l)&&!p&&f(!0,d.classed(o["default"].SELECTED,!0),l,u):(0,r.isDefined)(i)&&i&&p&&f(!1,d.classed(o["default"].SELECTED,!1),l,u))})},unselect:function unselect(t,e){var i=this.internal,a=i.config;a.data_selection_enabled&&i.main.selectAll("."+o["default"].shapes).selectAll("."+o["default"].shape).each(function(r,s){var l=(0,n.select)(this),u=r.data?r.data.id:r.id,d=i.getToggle(this,r).bind(i),c=a.data_selection_grouped||!t||t.indexOf(u)>=0,f=!e||e.indexOf(s)>=0,g=l.classed(o["default"].SELECTED);l.classed(o["default"].line)||l.classed(o["default"].area)||c&&f&&a.data_selection_isselectable(r)&&g&&d(!1,l.classed(o["default"].SELECTED,!1),r,s)})}})},function(t,e,i){"use strict";var n=_interopRequireDefault(i(1)),a=_interopRequireDefault(i(3)),r=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,r.extend)(n["default"].prototype,{transform:function transform(t,e){var i=this.internal,n=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;i.transformTo(e,t,n)}}),(0,r.extend)(a["default"].prototype,{transformTo:function transformTo(t,e,i){var n=this,a=!n.hasArcType(),r=i||{withTransitionForAxis:a};r.withTransitionForTransform=!1,n.transiting=!1,n.setTargetType(t,e),n.updateTargets(n.data.targets),n.updateAndRedraw(r)}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);(0,a.extend)(n["default"].prototype,{groups:function groups(t){var e=this.internal,i=e.config;return(0,a.isUndefined)(t)?i.data_groups:(i.data_groups=t,e.redraw(),i.data_groups)}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);var r=function(t){var e=this.internal,i=e.config;return t?(i.grid_x_lines=t,e.redrawWithoutRescale(),i.grid_x_lines):i.grid_x_lines};(0,a.extend)(r,{add:function add(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!0)}});var o=function(t){var e=this.internal,i=e.config;return t?(i.grid_y_lines=t,e.redrawWithoutRescale(),i.grid_y_lines):i.grid_y_lines};(0,a.extend)(o,{add:function add(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!1)}}),(0,a.extend)(n["default"].prototype,{xgrids:r,ygrids:o})},function(t,e,i){"use strict";var n=_interopRequireDefault(i(1)),a=_interopRequireDefault(i(14)),r=i(11);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var o=function(t){var e=this.internal,i=e.config;return t?(i.regions=t,e.redrawWithoutRescale(),i.regions):i.regions};(0,r.extend)(o,{add:function add(t){var e=this.internal,i=e.config;return t?(i.regions=i.regions.concat(t),e.redrawWithoutRescale(),i.regions):i.regions},remove:function remove(t){var e=this.internal,i=e.config,n=t||{},r=e.getOption(n,"duration",i.transition_duration),o=e.getOption(n,"classes",[a["default"].region]),s=e.main.select("."+a["default"].regions).selectAll(o.map(function(t){return"."+t}));return(r?s.transition().duration(r):s).style("opacity","0").remove(),i.regions=i.regions.filter(function(t){var e=!1;return!t["class"]||(t["class"].split(" ").forEach(function(t){o.indexOf(t)>=0&&(e=!0)}),!e)}),i.regions}}),(0,r.extend)(n["default"].prototype,{regions:o})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);var r=function(t){var e=this.internal.data.targets;return(0,a.isUndefined)(t)?e:e.filter(function(e){return t.indexOf(e.id)>=0})};(0,a.extend)(r,{shown:function shown(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t){var e=null;if(t){var i=this.data(t);i&&(0,a.isArray)(i)&&(e=[],i.forEach(function(t){e=e.concat(t.values.map(function(t){return t.value}))}))}return e},names:function names(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},colors:function colors(t){return this.internal.updateDataAttributes("colors",t)},axes:function axes(t){return this.internal.updateDataAttributes("axes",t)}}),(0,a.extend)(n["default"].prototype,{data:r})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1));(0,i(11).extend)(n["default"].prototype,{category:function category(t,e){var i=this.internal,n=i.config;return arguments.length>1&&(n.axis_x_categories[t]=e,i.redraw()),n.axis_x_categories[t]},categories:function categories(t){var e=this.internal,i=e.config;return arguments.length?(i.axis_x_categories=t,e.redraw(),i.axis_x_categories):i.axis_x_categories}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1));(0,i(11).extend)(n["default"].prototype,{color:function color(t){return this.internal.color(t)}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1));(0,i(11).extend)(n["default"].prototype,{x:function x(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},xs:function xs(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);var r=function(t,e,i){var n=t.config,r="axis_y_"+e,o="axis_y2_"+e;return(0,a.isDefined)(i)&&((0,a.isObjectType)(i)?((0,a.isValue)(i.x)&&(n["axis_x_"+e]=i.x),(0,a.isValue)(i.y)&&(n[r]=i.y),(0,a.isValue)(i.y2)&&(n[o]=i.y2)):(n[r]=i,n[o]=i),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),undefined},o=function(t,e){var i=t.config;return{x:i["axis_x_"+e],y:i["axis_y_"+e],y2:i["axis_y2_"+e]}},s=(0,a.extend)(function(){},{labels:function labels(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach(function(i){e.axis.setLabelText(i,t[i])}),e.axis.updateLabels())},min:function min(t){var e=this.internal;return arguments.length?r(e,"min",t):o(e,"min")},max:function max(t){var e=this.internal;return arguments.length?r(e,"max",t):o(e,"max")},range:function range(t){var e=this.axis;return arguments.length?((0,a.isDefined)(t.max)&&e.max(t.max),(0,a.isDefined)(t.min)&&e.min(t.min),undefined):{max:e.max(),min:e.min()}}});(0,a.extend)(n["default"].prototype,{axis:s})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);var r=(0,a.extend)(function(){},{show:function show(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function hide(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}});(0,a.extend)(n["default"].prototype,{legend:r})},function(t,e,i){"use strict";var n=i(5),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),r=i(75),o=i(11);(0,o.extend)(a["default"].prototype,{resize:function resize(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},flush:function flush(t){var e=this.internal;e.zoomScale=null,t?e.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):e.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},destroy:function destroy(){var t=this,e=this.internal;return(0,o.notEmpty)(e)&&(e.charts.splice(e.charts.indexOf(this),1),(0,o.isDefined)(e.resizeTimeout)&&r.window.clearTimeout(e.resizeTimeout),(0,n.select)(r.window).on("resize.bb",null),e.selectChart.classed("bb",!1).html(""),Object.keys(this).forEach(function(i){"internal"===i&&Object.keys(e).forEach(function(t){e[t]=null}),t[i]=null,delete t[i]})),null},config:function config(t,e,i){var n=this.internal,a=t&&t.replace(/\./g,"_"),r=void 0;return a in n.config&&((0,o.isDefined)(e)?(n.config[a]=e,r=e,i&&this.flush(!0)):r=n.config[a]),r}})},function(t,e,i){"use strict";e.__esModule=!0,e.document=e.window=undefined;var n=i(11),a=(0,n.isDefined)(window)&&window.Math===Math?window:(0,n.isDefined)(self)&&(self.Math===Math?self:Function("return this")()),r=a.document;e.window=a,e.document=r},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),a=i(11);var r=(0,a.extend)(function(){},{show:function show(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=this.internal,i=void 0,n=void 0;t.mouse&&(n=t.mouse),t.data?e.isMultipleX()?(n=[e.x(t.data.x),e.getYScale(t.data.id)(t.data.value)],i=null):i=(0,a.isValue)(t.data.index)?t.data.index:e.getIndexByX(t.data.x):(0,a.isDefined)(t.x)?i=e.getIndexByX(t.x):(0,a.isDefined)(t.index)&&(i=t.index),("mouse"===e.inputType?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){e.dispatchEvent(t,i,n)})},hide:function hide(){var t=this.internal;t.hideTooltip(),t.hideXGridFocus(),t.unexpandCircles(),t.unexpandBars()}});(0,a.extend)(n["default"].prototype,{tooltip:r})},function(t,e,i){"use strict";var n=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(3)),a=i(11);var r=window.navigator.userAgent;(0,a.extend)(n["default"].prototype,{isSafari:function isSafari(){return r.indexOf("Safari")>-1&&!this.isChrome()},isChrome:function isChrome(){return r.indexOf("Chrome")>-1},isMobile:function isMobile(){return r.indexOf("Mobi")>-1}})},function(t,e,i){"use strict";var n=i(5),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(i(1)),r=i(11);var o=function(t){var e=t.getBoundingClientRect(),i=t.cloneNode(!0),a=(0,r.toArray)(document.styleSheets),o=(0,r.getCssRules)(a).filter(function(t){return t.cssText}).map(function(t){return t.cssText});i.setAttribute("xmlns",n.namespaces.xhtml);var s=(new XMLSerializer).serializeToString(i);return"data:image/svg+xml;base64,"+function(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))}(('<svg xmlns="'+n.namespaces.svg+'" width="'+e.width+'" height="'+e.height+'">\n\t\t\t<foreignObject width="100%" height="100%">\n\t\t\t\t<style>'+o.join("\n")+"</style>\n\t\t\t\t"+s+"\n\t\t\t</foreignObject></svg>").replace(/#/g,"%23").replace("/\n/g","%0A"))};(0,r.extend)(a["default"].prototype,{"export":function _export(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"image/png",e=arguments[1],i=o(this.element);if((0,r.isFunction)(e)){var n=new Image;n.crosssOrigin="Anonymous",n.onload=function(){var i=document.createElement("canvas"),a=i.getContext("2d");i.width=n.width,i.height=n.height,a.drawImage(n,0,0),i.toBlob(function(t){e(window.URL.createObjectURL(t))},t)},n.src=i}return i}})}])}); +//# sourceMappingURL=billboard.min.js.map \ No newline at end of file diff --git a/dist/billboard.min.js.map b/dist/billboard.min.js.map new file mode 100644 index 000000000..a821b529b --- /dev/null +++ b/dist/billboard.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"billboard.min.js","sources":["webpack:///webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-array\"), require(\"d3-transition\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-collection\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-color\"), require(\"d3-zoom\"), require(\"d3-ease\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3-time-format\", \"d3-selection\", \"d3-array\", \"d3-transition\", \"d3-scale\", \"d3-brush\", \"d3-collection\", \"d3-dsv\", \"d3-drag\", \"d3-shape\", \"d3-interpolate\", \"d3-color\", \"d3-zoom\", \"d3-ease\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"d3-time-format\"), require(\"d3-selection\"), require(\"d3-array\"), require(\"d3-transition\"), require(\"d3-scale\"), require(\"d3-brush\"), require(\"d3-collection\"), require(\"d3-dsv\"), require(\"d3-drag\"), require(\"d3-shape\"), require(\"d3-interpolate\"), require(\"d3-color\"), require(\"d3-zoom\"), require(\"d3-ease\")) : factory(root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"], root[\"d3\"]);\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function(__WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__22__, __WEBPACK_EXTERNAL_MODULE__24__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__33__, __WEBPACK_EXTERNAL_MODULE__49__, __WEBPACK_EXTERNAL_MODULE__52__, __WEBPACK_EXTERNAL_MODULE__62__) {\nreturn "],"mappings":";;;;;;;;;AAAA","sourceRoot":""} \ No newline at end of file diff --git a/dist/billboard.pkgd.js b/dist/billboard.pkgd.js new file mode 100644 index 000000000..353178741 --- /dev/null +++ b/dist/billboard.pkgd.js @@ -0,0 +1,24212 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + * + * All-in-one packaged file for ease use of 'billboard.js' with below dependency. + * - d3 ^5.5.0 + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define([], factory); + else { + var a = factory(); + for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; + } +})(window, 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] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = 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; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.bb = undefined; + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _Axis = __webpack_require__(4), + _Axis2 = _interopRequireDefault(_Axis); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * @namespace bb + * @version 1.6.0 + */ +var bb = { + /** + * Version information + * @property {String} version version + * @example + * bb.version; // "1.0.0" + * @memberOf bb + */ + version: "1.6.0", + + /** + * Generate chart + * @param {Options} options chart options + * @memberOf bb + * @return {Chart} + * @see {@link Options} for different generation options + * @see {@link Chart} for different methods API + * @example + * <!-- chart holder --> + * <div id="LineChart"></div> + * @example + * // generate chart with options + * var chart = bb.generate({ + * "bindto": "#LineChart" + * "data": { + * "columns": [ + * ["data1", 30, 200, 100, 400, 150, 250], + * ["data2", 50, 20, 10, 40, 15, 25] + * ] + * } + * }); + * + * // call some API + * // ex) get the data of 'data1' + * chart.data("data1"); + */ + generate: function generate(config) { + var inst = new _Chart2.default(config); + + return inst.internal.charts = this.instance, this.instance.push(inst), inst; + }, + + + /** + * An array containing instance created + * @property {Array} instance instance array + * @example + * // generate charts + * var chart1 = bb.generate(...); + * var chart2 = bb.generate(...); + * + * bb.instance; // [ chart1, chart2, ... ] + * @memberOf bb + */ + instance: [], + + /** + * Internal chart object + * @private + */ + chart: { + fn: _Chart2.default.prototype, + internal: { + fn: _ChartInternal2.default.prototype, + axis: { + fn: _Axis2.default.prototype + } + } + } +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +__webpack_require__(9), __webpack_require__(11), __webpack_require__(12), __webpack_require__(13), __webpack_require__(14), __webpack_require__(15), __webpack_require__(16), __webpack_require__(17), __webpack_require__(18), __webpack_require__(19), __webpack_require__(20), __webpack_require__(21), __webpack_require__(22), __webpack_require__(23), __webpack_require__(24), __webpack_require__(25), __webpack_require__(26), __webpack_require__(27), __webpack_require__(28), __webpack_require__(29), __webpack_require__(30), __webpack_require__(31), __webpack_require__(32), __webpack_require__(33), __webpack_require__(34), __webpack_require__(35), __webpack_require__(36), __webpack_require__(37), __webpack_require__(38), __webpack_require__(39), __webpack_require__(40), __webpack_require__(41), __webpack_require__(42), __webpack_require__(43), __webpack_require__(44), __webpack_require__(45), __webpack_require__(46), __webpack_require__(47), __webpack_require__(48), __webpack_require__(49), __webpack_require__(50), __webpack_require__(51), __webpack_require__(52), __webpack_require__(53), __webpack_require__(54), __webpack_require__(55), __webpack_require__(56), __webpack_require__(57), __webpack_require__(58), __webpack_require__(60), __webpack_require__(5), __webpack_require__(61), __webpack_require__(62); +exports.bb = bb; +exports.default = bb; + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Main chart class. + * - Note: Instantiated via `bb.generate()`. + * @class Chart + * @example + * var chart = bb.generate({ + * data: { + * columns: [ + * ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"], + * ["count1", 11, 8, 7, 6, 5 ], + * ["count2", 9, 3, 6, 2, 8 ] + * ]} + * } + * @see {@link bb.generate} for the initialization. +*/ +var Chart = function Chart(config) { + (0, _classCallCheck3.default)(this, Chart); + + var $$ = new _ChartInternal2.default(this); + + this.internal = $$, $$.loadConfig(config), $$.beforeInit(config), $$.init(), this.$ = $$.getChartElements(), $$.afterInit(config), function bindThis(fn, target, argThis) { + Object.keys(fn).forEach(function (key) { + target[key] = fn[key].bind(argThis), Object.keys(fn[key]).length && bindThis(fn[key], target[key], argThis); + }); + }(Chart.prototype, this, this); +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @license MIT + * @ignore + */ + + +exports.default = Chart; +module.exports = exports["default"]; + +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +exports.default = function (instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } +}; + +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _d3TimeFormat = __webpack_require__(75), + _d3Selection = __webpack_require__(64), + _d3Array = __webpack_require__(66), + _d3Transition = __webpack_require__(67), + _Axis = __webpack_require__(4), + _Axis2 = _interopRequireDefault(_Axis), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Internal chart class. + * - Note: Instantiated internally, not exposed for public. + * @class ChartInternal + * @ignore + * @private +*/ +var ChartInternal = function () { + function ChartInternal(api) { + (0, _classCallCheck3.default)(this, ChartInternal); + + var $$ = this; + + $$.api = api, $$.config = $$.getOptions(), $$.data = {}, $$.cache = {}, $$.axes = {}; + } + + return ChartInternal.prototype.beforeInit = function beforeInit() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.onbeforeinit, $$); + }, ChartInternal.prototype.afterInit = function afterInit() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.onafterinit, $$); + }, ChartInternal.prototype.init = function init() { + var $$ = this, + config = $$.config, + convertedData = void 0; + + + if ($$.initParams(), config.data_url) $$.convertUrlToData(config.data_url, config.data_mimeType, config.data_headers, config.data_keys, $$.initWithData);else if (config.data_json) convertedData = $$.convertJsonToData(config.data_json, config.data_keys);else if (config.data_rows) convertedData = $$.convertRowsToData(config.data_rows);else if (config.data_columns) convertedData = $$.convertColumnsToData(config.data_columns);else throw Error("url or json or rows or columns is required."); + + convertedData && $$.initWithData(convertedData); + }, ChartInternal.prototype.initParams = function initParams() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated; + $$.datetimeId = "bb-" + +new Date(), $$.clipId = $$.datetimeId + "-clip", $$.clipIdForXAxis = $$.clipId + "-xaxis", $$.clipIdForYAxis = $$.clipId + "-yaxis", $$.clipIdForGrid = $$.clipId + "-grid", $$.clipIdForSubchart = $$.clipId + "-subchart", $$.clipPath = $$.getClipPath($$.clipId), $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis), $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid), $$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart), $$.dragStart = null, $$.dragging = !1, $$.flowing = !1, $$.cancelClick = !1, $$.mouseover = !1, $$.transiting = !1, $$.color = $$.generateColor(), $$.levelColor = $$.generateLevelColor(), $$.point = $$.generatePoint(), $$.extraLineClasses = $$.generateExtraLineClass(), $$.dataTimeFormat = config.data_xLocaltime ? _d3TimeFormat.timeParse : _d3TimeFormat.utcParse, $$.axisTimeFormat = config.axis_x_localtime ? _d3TimeFormat.timeFormat : _d3TimeFormat.utcFormat, $$.defaultAxisTimeFormat = function (d) { + var specifier = d.getMilliseconds() && ".%L" || d.getSeconds() && ".:%S" || d.getMinutes() && "%I:%M" || d.getHours() && "%I %p" || d.getDay() && d.getDate() !== 1 && "%-m/%-d" || d.getDate() !== 1 && "%b %d" || d.getMonth() && "%-m/%-d" || "%Y/%-m/%-d"; + + return $$.axisTimeFormat(specifier)(d); + }, $$.hiddenTargetIds = [], $$.hiddenLegendIds = [], $$.focusedTargetIds = [], $$.defocusedTargetIds = [], $$.xOrient = isRotated ? "left" : "bottom", $$.yOrient = isRotated ? config.axis_y_inner ? "top" : "bottom" : config.axis_y_inner ? "right" : "left", $$.y2Orient = isRotated ? config.axis_y2_inner ? "bottom" : "top" : config.axis_y2_inner ? "left" : "right", $$.subXOrient = isRotated ? "left" : "bottom", $$.isLegendRight = config.legend_position === "right", $$.isLegendInset = config.legend_position === "inset", $$.isLegendTop = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "top-right", $$.isLegendLeft = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "bottom-left", $$.legendStep = 0, $$.legendItemWidth = 0, $$.legendItemHeight = 0, $$.currentMaxTickWidths = { + x: 0, y: 0, y2: 0 + }, $$.rotated_padding_left = 30, $$.rotated_padding_right = isRotated && !config.axis_x_show ? 0 : 30, $$.rotated_padding_top = 5, $$.withoutFadeIn = {}, $$.inputType = $$.convertInputType(), $$.axes.subx = (0, _d3Selection.selectAll)([]); + }, ChartInternal.prototype.initWithData = function initWithData(data) { + var $$ = this, + config = $$.config; + $$.axis = new _Axis2.default($$), config.subchart_show && $$.initBrush(), config.zoom_enabled && ($$.initZoom(), $$.initZoomBehaviour()); + + + var bindto = { + element: config.bindto, + classname: "bb" + }; + + if ((0, _util.isObject)(config.bindto) && (bindto.element = config.bindto.element || "#chart", bindto.classname = config.bindto.classname || bindto.classname), $$.selectChart = (0, _util.isFunction)(bindto.element.node) ? config.bindto.element : (0, _d3Selection.select)(bindto.element ? bindto.element : []), $$.selectChart.html("").classed(bindto.classname, !0), $$.data.xs = {}, $$.data.targets = $$.convertDataToTargets(data), config.data_filter && ($$.data.targets = $$.data.targets.filter(config.data_filter)), config.data_hide && $$.addHiddenTargetIds(config.data_hide === !0 ? $$.mapToIds($$.data.targets) : config.data_hide), config.legend_hide && $$.addHiddenLegendIds(config.legend_hide === !0 ? $$.mapToIds($$.data.targets) : config.legend_hide), $$.hasType("gauge") && (config.legend_show = !1), $$.updateSizes(), $$.updateScales(), $$.x.domain((0, _d3Array.extent)($$.getXDomain($$.data.targets))), $$.y.domain($$.getYDomain($$.data.targets, "y")), $$.y2.domain($$.getYDomain($$.data.targets, "y2")), $$.subX.domain($$.x.domain()), $$.subY.domain($$.y.domain()), $$.subY2.domain($$.y2.domain()), $$.orgXDomain = $$.x.domain(), $$.svg = $$.selectChart.append("svg").style("overflow", "hidden").style("display", "block"), config.interaction_enabled && $$.inputType) { + var isTouch = $$.inputType === "touch"; + + $$.svg.on(isTouch ? "touchstart" : "mouseenter", function () { + return (0, _util.callFn)(config.onover, $$); + }).on(isTouch ? "touchend" : "mouseleave", function () { + return (0, _util.callFn)(config.onout, $$); + }); + } + + config.svg_classname && $$.svg.attr("class", config.svg_classname), $$.defs = $$.svg.append("defs"), $$.clipChart = $$.appendClip($$.defs, $$.clipId), $$.clipXAxis = $$.appendClip($$.defs, $$.clipIdForXAxis), $$.clipYAxis = $$.appendClip($$.defs, $$.clipIdForYAxis), $$.clipGrid = $$.appendClip($$.defs, $$.clipIdForGrid), $$.clipSubchart = $$.appendClip($$.defs, $$.clipIdForSubchart), (0, _util.isFunction)(config.color_tiles) && $$.patterns && $$.patterns.forEach(function (p) { + return $$.defs.append(function () { + return p.node; + }); + }), $$.updateSvgSize(); + + + // Define regions + var main = $$.svg.append("g").attr("transform", $$.getTranslate("main")); + + // data.onmin/max callback + if ($$.main = main, config.subchart_show && $$.initSubchart && $$.initSubchart(), $$.initTooltip && $$.initTooltip(), $$.initLegend && $$.initLegend(), $$.initTitle && $$.initTitle(), main.append("text").attr("class", _classes2.default.text + " " + _classes2.default.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers. + .attr("dominant-baseline", "middle"), $$.initRegion(), $$.initGrid(), config.clipPath || $$.axis.init(), main.append("g").attr("class", _classes2.default.chart).attr("clip-path", $$.clipPath), config.grid_lines_front && $$.initGridLines(), config.grid_front && $$.initXYFocusGrid(), $$.initEventRect(), $$.initChartElements(), main.insert("rect", config.zoom_privileged ? null : "g." + _classes2.default.regions).attr("class", _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height).style("opacity", "0").on("dblclick.zoom", null), config.axis_x_extent && $$.brush.scale($$.getDefaultExtent()), config.clipPath && $$.axis.init(), $$.updateTargets($$.data.targets), $$.updateDimension(), config.oninit.call($$), $$.redraw({ + withTransition: !1, + withTransform: !0, + withUpdateXDomain: !0, + withUpdateOrgXDomain: !0, + withTransitionForAxis: !1, + initializing: !0 + }), config.data_onmin || config.data_onmax) { + var minMax = $$.getMinMaxData(); + + (0, _util.callFn)(config.data_onmin, $$, minMax.min), (0, _util.callFn)(config.data_onmax, $$, minMax.max); + } + + // Bind resize event + $$.bindResize(), $$.api.element = $$.selectChart.node(); + }, ChartInternal.prototype.initChartElements = function initChartElements() { + var _this = this; + + ["Pie", "Bar", "Line", "Arc", "Gauge", "Bubble", "Radar", "Text"].forEach(function (v) { + var method = "init" + v; + + _this[method] && _this[method](); + }); + }, ChartInternal.prototype.getChartElements = function getChartElements() { + var $$ = this; + + return { + chart: $$.selectChart, + svg: $$.svg, + defs: $$.defs, + main: $$.main, + tooltip: $$.tooltip, + legend: $$.legend, + title: $$.title, + grid: $$.grid, + arc: $$.arcs, + bar: { + bars: $$.mainBar + }, + line: { + lines: $$.mainLine, + areas: $$.mainArea, + circles: $$.mainCircle + }, + text: { + texts: $$.texts + } + }; + }, ChartInternal.prototype.smoothLines = function smoothLines(el, type) { + type === "grid" && el.each(function () { + var g = (0, _d3Selection.select)(this), + _map = ["x1", "x2", "y1", "y2"].map(function (v) { + return Math.ceil(g.attr(v)); + }), + x1 = _map[0], + x2 = _map[1], + y1 = _map[2], + y2 = _map[3];g.attr({ x1: x1, x2: x2, y1: y1, y2: y2 }); + }); + }, ChartInternal.prototype.updateSizes = function updateSizes() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + hasArc = $$.hasArcType(), + legendHeight = $$.legend ? $$.getLegendHeight() : 0, + legendWidth = $$.legend ? $$.getLegendWidth() : 0, + legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight, + xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight("x"), + subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + xAxisHeight : 0; + $$.currentWidth = $$.getCurrentWidth(), $$.currentHeight = $$.getCurrentHeight(), $$.margin = isRotated ? { + top: $$.getHorizontalAxisHeight("y2") + $$.getCurrentPaddingTop(), + right: hasArc ? 0 : $$.getCurrentPaddingRight(), + bottom: $$.getHorizontalAxisHeight("y") + legendHeightForBottom + $$.getCurrentPaddingBottom(), + left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft()) + } : { + top: 4 + $$.getCurrentPaddingTop(), // for top tick text + right: hasArc ? 0 : $$.getCurrentPaddingRight(), + bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(), + left: hasArc ? 0 : $$.getCurrentPaddingLeft() + }, $$.margin2 = isRotated ? { + top: $$.margin.top, + right: NaN, + bottom: 20 + legendHeightForBottom, + left: $$.rotated_padding_left + } : { + top: $$.currentHeight - subchartHeight - legendHeightForBottom, + right: NaN, + bottom: xAxisHeight + legendHeightForBottom, + left: $$.margin.left + }, $$.margin3 = { + top: 0, + right: NaN, + bottom: 0, + left: 0 + }, $$.updateSizeForLegend && $$.updateSizeForLegend(legendHeight, legendWidth), $$.width = $$.currentWidth - $$.margin.left - $$.margin.right, $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom, $$.width < 0 && ($$.width = 0), $$.height < 0 && ($$.height = 0), $$.width2 = isRotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width, $$.height2 = isRotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom, $$.width2 < 0 && ($$.width2 = 0), $$.height2 < 0 && ($$.height2 = 0), $$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0), $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10), $$.hasType("gauge") && !config.gauge_fullCircle && ($$.arcHeight += $$.height - $$.getGaugeLabelHeight()), $$.updateRadius && $$.updateRadius(), $$.isLegendRight && hasArc && ($$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1); + }, ChartInternal.prototype.updateTargets = function updateTargets(targets) { + var $$ = this; + + // Text + $$.updateTargetsForText(targets), $$.updateTargetsForBar(targets), $$.updateTargetsForLine(targets), $$.hasArcType(targets) && ($$.hasType("radar") ? $$.updateTargetsForRadar(targets) : $$.updateTargetsForArc(targets)), $$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets), $$.showTargets(); + }, ChartInternal.prototype.showTargets = function showTargets() { + var $$ = this; + + $$.svg.selectAll("." + _classes2.default.target).filter(function (d) { + return $$.isTargetToShow(d.id); + }).transition().duration($$.config.transition_duration).style("opacity", "1"); + }, ChartInternal.prototype.getWithOption = function getWithOption(options) { + var withOptions = { + Y: !0, + Subchart: !0, + Transition: !0, + EventRect: !0, + Dimension: !0, + TrimXDomain: !0, + Transform: !1, + UpdateXDomain: !1, + UpdateOrgXDomain: !1, + Legend: !1, + UpdateXAxis: "UpdateXDomain", + TransitionForExit: "Transition", + TransitionForAxis: "Transition" + }; + + return Object.keys(withOptions).forEach(function (key) { + var defVal = withOptions[key]; + + (0, _util.isString)(defVal) && (defVal = withOptions[defVal]), withOptions[key] = (0, _util.getOption)(options, "with" + key, defVal); + }), withOptions; + }, ChartInternal.prototype.redraw = function redraw() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + transitionsValue = arguments[1], + $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated, + hasRadar = $$.hasType("radar"), + areaIndices = $$.getShapeIndices($$.isAreaType), + barIndices = $$.getShapeIndices($$.isBarType), + lineIndices = $$.getShapeIndices($$.isLineType), + hideAxis = $$.hasArcType(), + targetsToShow = $$.filterTargetsToShow($$.data.targets), + xv = $$.xv.bind($$), + tickValues = void 0, + intervalForCulling = void 0, + xDomainForZoom = void 0, + wth = $$.getWithOption(options), + duration = wth.Transition ? config.transition_duration : 0, + durationForExit = wth.TransitionForExit ? duration : 0, + durationForAxis = wth.TransitionForAxis ? duration : 0, + transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis); + + + // show/hide if manual culling needed + if (options.initializing && config.tooltip_init_show || $$.inputType !== "touch" || $$.hideTooltip(), wth.Legend && config.legend_show && !config.legend_contents_bindto ? $$.updateLegend($$.mapToIds($$.data.targets), options, transitions) : wth.Dimension && $$.updateDimension(!0), $$.isCategorized() && targetsToShow.length === 0 && $$.x.domain([0, $$.axes.x.selectAll(".tick").size()]), targetsToShow.length ? ($$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain), !config.axis_x_tick_values && (tickValues = $$.axis.updateXAxisTickValues(targetsToShow))) : ($$.xAxis.tickValues([]), $$.subXAxis.tickValues([])), config.zoom_rescale && !options.flow && (xDomainForZoom = $$.x.orgDomain()), ["y", "y2"].forEach(function (key) { + var axis = $$[key], + tickValues = config["axis_" + key + "_tick_values"], + tickCount = config["axis_" + key + "_tick_count"]; + + + if (axis.domain($$.getYDomain(targetsToShow, key, xDomainForZoom)), !tickValues && tickCount) { + var domain = axis.domain(); + + $$[key + "Axis"].tickValues($$.axis.generateTickValues(domain, domain.every(function (v) { + return v === 0; + }) ? 1 : tickCount, $$.isTimeSeriesY())); + } + }), $$.axis.redraw(transitions, hideAxis), $$.axis.updateLabels(wth.Transition), (wth.UpdateXDomain || wth.UpdateXAxis) && targetsToShow.length) if (config.axis_x_tick_culling && tickValues) { + for (var _i = 1; _i < tickValues.length; _i++) if (tickValues.length / _i < config.axis_x_tick_culling_max) { + intervalForCulling = _i; + + break; + } + + $$.svg.selectAll("." + _classes2.default.axisX + " .tick text").each(function (e) { + var index = tickValues.indexOf(e); + + index >= 0 && (0, _d3Selection.select)(this).style("display", index % intervalForCulling ? "none" : "block"); + }); + } else $$.svg.selectAll("." + _classes2.default.axisX + " .tick text").style("display", "block"); + + // setup drawer - MEMO: these must be called after axis updated + var drawArea = $$.generateDrawArea ? $$.generateDrawArea(areaIndices, !1) : undefined, + drawBar = $$.generateDrawBar ? $$.generateDrawBar(barIndices) : undefined, + drawLine = $$.generateDrawLine ? $$.generateDrawLine(lineIndices, !1) : undefined, + xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !0), + yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !1); + wth.Y && ($$.subY.domain($$.getYDomain(targetsToShow, "y")), $$.subY2.domain($$.getYDomain(targetsToShow, "y2"))), $$.updateXgridFocus(), main.select("text." + _classes2.default.text + "." + _classes2.default.empty).attr("x", $$.width / 2).attr("y", $$.height / 2).text(config.data_empty_label_text).transition().style("opacity", targetsToShow.length ? 0 : 1), $$.updateGrid(duration), $$.updateRegion(duration), $$.updateBar(durationForExit), $$.updateLine(durationForExit), $$.updateArea(durationForExit), $$.updateCircle(), $$.hasDataLabel() && $$.updateText(durationForExit), $$.redrawTitle && $$.redrawTitle(), $$.redrawArc && $$.redrawArc(duration, durationForExit, wth.Transform), hasRadar && $$.redrawRadar(duration, durationForExit), config.subchart_show && $$.redrawSubchart && $$.redrawSubchart(wth.Subchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices), main.selectAll("." + _classes2.default.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(), config.interaction_enabled && !options.flow && wth.EventRect && ($$.redrawEventRect(), $$.bindZoomEvent()), $$.updateCircleY(); + + + // generate circle x/y functions depending on updated params + var cx = (hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX).bind($$), + cy = (hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY).bind($$), + flow = options.flow && $$.generateFlow({ + targets: targetsToShow, + flow: options.flow, + duration: options.flow.duration, + drawBar: drawBar, + drawLine: drawLine, + drawArea: drawArea, + cx: cx, + cy: cy, + xv: xv, + xForText: xForText, + yForText: yForText + }), + isTransition = (duration || flow) && $$.isTabVisible(), + redrawList = [$$.redrawBar(drawBar, isTransition), $$.redrawLine(drawLine, isTransition), $$.redrawArea(drawArea, isTransition), $$.redrawCircle(cx, cy, isTransition, flow), $$.redrawText(xForText, yForText, options.flow, isTransition), $$.redrawRegion(isTransition), $$.redrawGrid(isTransition)], + afterRedraw = flow || config.onrendered ? function () { + flow && flow(), (0, _util.callFn)(config.onrendered, $$); + } : null; + + // generate flow + + + // redraw list + + + // callback function after redraw ends + + if (afterRedraw) + // Only use transition when current tab is visible. + if (isTransition) { + // Wait for end of transitions for callback + var waitForDraw = $$.generateWait(); + + // transition should be derived from one transition + (0, _d3Transition.transition)().duration(duration).each(function () { + redrawList.reduce(function (acc, t1) { + return acc.concat(t1); + }, []).forEach(function (t) { + return waitForDraw.add(t); + }); + }).call(waitForDraw, afterRedraw); + } else afterRedraw(); + + // update fadein condition + $$.mapToIds($$.data.targets).forEach(function (id) { + $$.withoutFadeIn[id] = !0; + }); + }, ChartInternal.prototype.updateAndRedraw = function updateAndRedraw() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + $$ = this, + config = $$.config, + transitions = void 0; + options.withTransition = (0, _util.getOption)(options, "withTransition", !0), options.withTransform = (0, _util.getOption)(options, "withTransform", !1), options.withLegend = (0, _util.getOption)(options, "withLegend", !1), options.withUpdateXDomain = !0, options.withUpdateOrgXDomain = !0, options.withTransitionForExit = !1, options.withTransitionForTransform = (0, _util.getOption)(options, "withTransitionForTransform", options.withTransition), $$.updateSizes(), options.withLegend && config.legend_show || (transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0), $$.updateScales(), $$.updateSvgSize(), $$.transformAll(options.withTransitionForTransform, transitions)), $$.redraw(options, transitions); + }, ChartInternal.prototype.redrawWithoutRescale = function redrawWithoutRescale() { + this.redraw({ + withY: !1, + withSubchart: !1, + withEventRect: !1, + withTransitionForAxis: !1 + }); + }, ChartInternal.prototype.isTimeSeries = function isTimeSeries() { + return this.config.axis_x_type === "timeseries"; + }, ChartInternal.prototype.isCategorized = function isCategorized() { + return this.config.axis_x_type.indexOf("category") >= 0 || this.hasType("radar"); + }, ChartInternal.prototype.isCustomX = function isCustomX() { + var $$ = this, + config = $$.config; + + + return !$$.isTimeSeries() && (config.data_x || (0, _util.notEmpty)(config.data_xs)); + }, ChartInternal.prototype.isTimeSeriesY = function isTimeSeriesY() { + return this.config.axis_y_type === "timeseries"; + }, ChartInternal.prototype.getTranslate = function getTranslate(target) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + x = void 0, + y = void 0; + + + if (target === "main") x = (0, _util.asHalfPixel)($$.margin.left), y = (0, _util.asHalfPixel)($$.margin.top);else if (target === "context") x = (0, _util.asHalfPixel)($$.margin2.left), y = (0, _util.asHalfPixel)($$.margin2.top);else if (target === "legend") x = $$.margin3.left, y = $$.margin3.top;else if (target === "x") x = 0, y = isRotated ? 0 : $$.height;else if (target === "y") x = 0, y = isRotated ? $$.height : 0;else if (target === "y2") x = isRotated ? 0 : $$.width, y = isRotated ? 1 : 0;else if (target === "subx") x = 0, y = isRotated ? 0 : $$.height2;else if (target === "arc") x = $$.arcWidth / 2, y = $$.arcHeight / 2;else if (target === "radar") { + var diff = ($$.arcWidth - $$.arcHeight) / 2; + + x = Math.max(diff, 0) + 4, y = diff < 0 ? Math.abs(diff) : (0, _util.asHalfPixel)($$.margin.top); + } + + return "translate(" + x + ", " + y + ")"; + }, ChartInternal.prototype.initialOpacity = function initialOpacity(d) { + return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? "1" : "0"; + }, ChartInternal.prototype.initialOpacityForCircle = function initialOpacityForCircle(d) { + return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : "0"; + }, ChartInternal.prototype.opacityForCircle = function opacityForCircle(d) { + var opacity = this.config.point_show ? "1" : "0"; + + return (0, _util.isValue)(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity : "0"; + }, ChartInternal.prototype.opacityForText = function opacityForText() { + return this.hasDataLabel() ? "1" : "0"; + }, ChartInternal.prototype.xx = function xx(d) { + var fn = this.config.zoom_enabled && this.zoomScale ? this.zoomScale : this.x; + + return d ? fn(d.x) : null; + }, ChartInternal.prototype.xv = function xv(d) { + var $$ = this, + value = $$.getBaseValue(d); + + + return $$.isTimeSeries() ? value = $$.parseDate(value) : $$.isCategorized() && (0, _util.isString)(value) && (value = $$.config.axis_x_categories.indexOf(value)), Math.ceil($$.x(value)); + }, ChartInternal.prototype.yv = function yv(d) { + var $$ = this, + yScale = d.axis && d.axis === "y2" ? $$.y2 : $$.y; + + + return Math.ceil(yScale($$.getBaseValue(d))); + }, ChartInternal.prototype.subxx = function subxx(d) { + return d ? this.subX(d.x) : null; + }, ChartInternal.prototype.transformMain = function transformMain(withTransition, transitions) { + var $$ = this, + xAxis = void 0, + yAxis = void 0, + y2Axis = void 0; + transitions && transitions.axisX ? xAxis = transitions.axisX : (xAxis = $$.main.select("." + _classes2.default.axisX), withTransition && (xAxis = xAxis.transition())), transitions && transitions.axisY ? yAxis = transitions.axisY : (yAxis = $$.main.select("." + _classes2.default.axisY), withTransition && (yAxis = yAxis.transition())), transitions && transitions.axisY2 ? y2Axis = transitions.axisY2 : (y2Axis = $$.main.select("." + _classes2.default.axisY2), withTransition && (y2Axis = y2Axis.transition())), (withTransition ? $$.main.transition() : $$.main).attr("transform", $$.getTranslate("main")), xAxis.attr("transform", $$.getTranslate("x")), yAxis.attr("transform", $$.getTranslate("y")), y2Axis.attr("transform", $$.getTranslate("y2")), $$.main.select("." + _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc")); + }, ChartInternal.prototype.transformAll = function transformAll(withTransition, transitions) { + var $$ = this; + + $$.transformMain(withTransition, transitions), $$.config.subchart_show && $$.transformContext(withTransition, transitions), $$.legend && $$.transformLegend(withTransition); + }, ChartInternal.prototype.updateSvgSize = function updateSvgSize() { + var $$ = this, + brush = $$.svg.select("." + _classes2.default.brush + " .overlay"), + brushHeight = brush.size() ? brush.attr("height") : 0; + $$.svg.attr("width", $$.currentWidth).attr("height", $$.currentHeight), $$.svg.selectAll(["#" + $$.clipId, "#" + $$.clipIdForGrid]).select("rect").attr("width", $$.width).attr("height", $$.height), $$.svg.select("#" + $$.clipIdForXAxis).select("rect").attr("x", $$.getXAxisClipX.bind($$)).attr("y", $$.getXAxisClipY.bind($$)).attr("width", $$.getXAxisClipWidth.bind($$)).attr("height", $$.getXAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForYAxis).select("rect").attr("x", $$.getYAxisClipX.bind($$)).attr("y", $$.getYAxisClipY.bind($$)).attr("width", $$.getYAxisClipWidth.bind($$)).attr("height", $$.getYAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForSubchart).select("rect").attr("width", $$.width).attr("height", brushHeight), $$.svg.select("." + _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height), $$.brush && $$.brush.scale($$.subX, brushHeight); + }, ChartInternal.prototype.updateDimension = function updateDimension(withoutAxis) { + var $$ = this; + + withoutAxis || ($$.config.axis_rotated ? ($$.axes.x.call($$.xAxis), $$.axes.subx.call($$.subXAxis)) : ($$.axes.y.call($$.yAxis), $$.axes.y2.call($$.y2Axis))), $$.updateSizes(), $$.updateScales(withoutAxis), $$.updateSvgSize(), $$.transformAll(!1); + }, ChartInternal.prototype.bindResize = function bindResize() { + var $$ = this, + config = $$.config; + $$.resizeFunction = $$.generateResize(), $$.resizeFunction.add(function () { + return config.onresize.call($$); + }), config.resize_auto && $$.resizeFunction.add(function () { + (0, _util.isDefined)($$.resizeTimeout) && window.clearTimeout($$.resizeTimeout), $$.resizeTimeout = window.setTimeout(function () { + delete $$.resizeTimeout, $$.api.flush(); + }, 100); + }), $$.resizeFunction.add(function () { + return config.onresized.call($$); + }); + + + // attach resize event + // get the possible previous attached + var resizeEvents = (0, _d3Selection.select)(window).on("resize.bb"); + + resizeEvents && $$.resizeFunction.add(resizeEvents), (0, _d3Selection.select)(window).on("resize.bb", $$.resizeFunction); + }, ChartInternal.prototype.generateResize = function generateResize() { + + function callResizeFunctions() { + resizeFunctions.forEach(function (f) { + return f(); + }); + } + + var resizeFunctions = []; + + return callResizeFunctions.add = function (f) { + resizeFunctions.push(f); + }, callResizeFunctions.remove = function (f) { + for (var i = 0, len = resizeFunctions.length; i < len; i++) if (resizeFunctions[i] === f) { + resizeFunctions.splice(i, 1); + + break; + } + }, callResizeFunctions; + }, ChartInternal.prototype.endall = function endall(transition, callback) { + var n = 0; + + transition.each(function () { + return ++n; + }).on("end", function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + + --n || callback.apply.apply(callback, [this].concat(args)); + }); + }, ChartInternal.prototype.generateWait = function generateWait() { + var transitionsToWait = [], + f = function (transition, callback) { + + function loop() { + var done = 0; + + transitionsToWait.forEach(function (t) { + if (t.empty()) return void done++; + + try { + t.transition(); + } catch (e) { + done++; + } + }), timer && clearTimeout(timer), done === transitionsToWait.length ? callback && callback() : timer = setTimeout(loop, 50); + } + + var timer = void 0;loop(); + }; + + return f.add = function (transition) { + (0, _util.isArray)(transition) ? transitionsToWait = transitionsToWait.concat(transition) : transitionsToWait.push(transition); + }, f; + }, ChartInternal.prototype.parseDate = function parseDate(date) { + var $$ = this, + parsedDate = void 0; + + + return date instanceof Date ? parsedDate = date : (0, _util.isString)(date) ? parsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date) : (0, _util.isNumber)(date) && !isNaN(date) && (parsedDate = new Date(+date)), (!parsedDate || isNaN(+parsedDate)) && console && console.error && console.error("Failed to parse x '" + date + "' to Date object"), parsedDate; + }, ChartInternal.prototype.isTabVisible = function isTabVisible() { + return !document[["hidden", "mozHidden", "msHidden", "webkitHidden"].filter(function (v) { + return v in document; + })[0]]; + }, ChartInternal.prototype.convertInputType = function convertInputType() { + var $$ = this, + config = $$.config, + isMobile = $$.isMobile(), + hasMouse = config.interaction_inputType_mouse && !isMobile && "onmouseover" in window, + hasTouch = !1; + + + return config.interaction_inputType_touch && (hasTouch = "ontouchmove" in window || window.DocumentTouch && document instanceof window.DocumentTouch), hasMouse && "mouse" || hasTouch && "touch" || null; + }, ChartInternal; +}(); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @ignore + */ + + +exports.default = ChartInternal; +module.exports = exports["default"]; + +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2), + _bb = __webpack_require__(5), + _bb2 = _interopRequireDefault(_bb), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isHorizontal = function ($$, forHorizontal) { + var isRotated = $$.config.axis_rotated; + + return forHorizontal ? isRotated : !isRotated; +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +var Axis = function () { + function Axis(owner) { + (0, _classCallCheck3.default)(this, Axis), this.owner = owner; + } + + return Axis.prototype.init = function init() { + var _this = this, + $$ = this.owner, + config = $$.config, + isRotated = config.axis_rotated, + main = $$.main; + + ["x", "y", "y2"].forEach(function (v) { + var axisStr = "axis" + (0, _util.capitalize)(v), + classAxis = _classes2.default.axis + " " + _classes2.default[axisStr], + classLabel = _classes2.default[axisStr + "Label"]; + $$.axes[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () { + var res = null; + + return v === "x" ? res = $$.clipPathForXAxis : v === "y" && config.axis_y_inner && (res = $$.clipPathForYAxis), res; + }).attr("transform", $$.getTranslate(v)).style("visibility", config["axis_" + v + "_show"] ? "visible" : "hidden"), $$.axes[v].append("text").attr("class", classLabel).attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated]).style("text-anchor", _this.textAnchorForXAxisLabel.bind(_this)); + }); + }, Axis.prototype.getXAxis = function getXAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) { + var $$ = this.owner, + config = $$.config, + isCategory = $$.isCategorized(), + axisParams = { + isCategory: isCategory, + withOuterTick: withOuterTick, + withoutTransition: withoutTransition, + config: config, + axisName: axisName, + tickMultiline: config.axis_x_tick_multiline, + tickWidth: config.axis_x_tick_width, + tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate, + tickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(), + orgXScale: $$.x + }, + axis = (0, _bb2.default)(axisParams).scale($$.zoomScale || scale).orient(orient), + newTickValues = tickValues; + + + return $$.isTimeSeries() && tickValues && !(0, _util.isFunction)(tickValues) && (newTickValues = tickValues.map(function (v) { + return $$.parseDate(v); + })), axis.tickFormat(tickFormat).tickValues(newTickValues), isCategory && (axis.tickCentered(config.axis_x_tick_centered), (0, _util.isEmpty)(config.axis_x_tick_culling) && (config.axis_x_tick_culling = !1)), axis; + }, Axis.prototype.getYAxis = function getYAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) { + var $$ = this.owner, + config = $$.config, + axisParams = { + withOuterTick: withOuterTick, + withoutTransition: withoutTransition, + config: config, + axisName: axisName, + tickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate + }, + axis = (0, _bb2.default)(axisParams).scale(scale).orient(orient).tickFormat(tickFormat); + + + return $$.isTimeSeriesY() ? + // https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time + axis.ticks(config.axis_y_tick_time_value) : axis.tickValues(tickValues), axis; + }, Axis.prototype.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) { + var $$ = this.owner, + config = $$.config, + xTickCount = config.axis_x_tick_count, + tickValues = void 0; + + + return (config.axis_x_tick_fit || xTickCount) && (tickValues = this.generateTickValues($$.mapTargetsToUniqueXs(targets), xTickCount, $$.isTimeSeries())), axis ? axis.tickValues(tickValues) : ($$.xAxis.tickValues(tickValues), $$.subXAxis.tickValues(tickValues)), tickValues; + }, Axis.prototype.getId = function getId(id) { + var config = this.owner.config; + + return id in config.data_axes ? config.data_axes[id] : "y"; + }, Axis.prototype.getXAxisTickFormat = function getXAxisTickFormat() { + var $$ = this.owner, + config = $$.config, + tickFormat = config.axis_x_tick_format, + isTimeSeries = $$.isTimeSeries(), + isCategorized = $$.isCategorized(), + format = void 0; + + + return tickFormat ? (0, _util.isFunction)(tickFormat) ? format = tickFormat : isTimeSeries && (format = function (date) { + return date ? $$.axisTimeFormat(tickFormat)(date) : ""; + }) : format = isTimeSeries ? $$.defaultAxisTimeFormat : isCategorized ? $$.categoryName : function (v) { + return v < 0 ? v.toFixed(0) : v; + }, (0, _util.isFunction)(format) ? function (v) { + return format.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]); + } : format; + }, Axis.prototype.getTickValues = function getTickValues(type) { + var $$ = this.owner, + tickValues = $$.config["axis_" + type + "_tick_values"], + axis = $$[type + "Axis"]; + + + return tickValues || (axis ? axis.tickValues() : undefined); + }, Axis.prototype.getXAxisTickValues = function getXAxisTickValues() { + return this.getTickValues("x"); + }, Axis.prototype.getYAxisTickValues = function getYAxisTickValues() { + return this.getTickValues("y"); + }, Axis.prototype.getY2AxisTickValues = function getY2AxisTickValues() { + return this.getTickValues("y2"); + }, Axis.prototype.getLabelOptionByAxisId = function getLabelOptionByAxisId(axisId) { + return this.owner.config["axis_" + axisId + "_label"]; + }, Axis.prototype.getLabelText = function getLabelText(axisId) { + var option = this.getLabelOptionByAxisId(axisId); + + return (0, _util.isString)(option) ? option : option ? option.text : null; + }, Axis.prototype.setLabelText = function setLabelText(axisId, text) { + var $$ = this.owner, + config = $$.config, + option = this.getLabelOptionByAxisId(axisId); + (0, _util.isString)(option) ? config["axis_" + axisId + "_label"] = text : option && (option.text = text); + }, Axis.prototype.getLabelPosition = function getLabelPosition(axisId, defaultPosition) { + var isRotated = this.owner.config.axis_rotated, + option = this.getLabelOptionByAxisId(axisId), + position = (0, _util.isObjectType)(option) && option.position ? option.position : defaultPosition[+!isRotated], + has = function (v) { + return !!~position.indexOf(v); + }; + + return { + isInner: has("inner"), + isOuter: has("outer"), + isLeft: has("left"), + isCenter: has("center"), + isRight: has("right"), + isTop: has("top"), + isMiddle: has("middle"), + isBottom: has("bottom") + }; + }, Axis.prototype.getXAxisLabelPosition = function getXAxisLabelPosition() { + return this.getLabelPosition("x", ["inner-top", "inner-right"]); + }, Axis.prototype.getYAxisLabelPosition = function getYAxisLabelPosition() { + return this.getLabelPosition("y", ["inner-right", "inner-top"]); + }, Axis.prototype.getY2AxisLabelPosition = function getY2AxisLabelPosition() { + return this.getLabelPosition("y2", ["inner-right", "inner-top"]); + }, Axis.prototype.getLabelPositionById = function getLabelPositionById(id) { + return this["get" + id.toUpperCase() + "AxisLabelPosition"](); + }, Axis.prototype.textForXAxisLabel = function textForXAxisLabel() { + return this.getLabelText("x"); + }, Axis.prototype.textForYAxisLabel = function textForYAxisLabel() { + return this.getLabelText("y"); + }, Axis.prototype.textForY2AxisLabel = function textForY2AxisLabel() { + return this.getLabelText("y2"); + }, Axis.prototype.xForAxisLabel = function xForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + x = position.isMiddle ? -$$.height / 2 : 0; + + + return isHorizontal($$, forHorizontal) ? x = position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width : position.isBottom && (x = -$$.height), x; + }, Axis.prototype.dxForAxisLabel = function dxForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + dx = position.isBottom ? "0.5em" : "0"; + + + return isHorizontal($$, forHorizontal) ? dx = position.isLeft ? "0.5em" : position.isRight ? "-0.5em" : "0" : position.isTop && (dx = "-0.5em"), dx; + }, Axis.prototype.textAnchorForAxisLabel = function textAnchorForAxisLabel(position) { + var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1], + $$ = this.owner, + anchor = position.isMiddle ? "middle" : "end"; + + + return isHorizontal($$, forHorizontal) ? anchor = position.isLeft ? "start" : position.isCenter ? "middle" : "end" : position.isBottom && (anchor = "start"), anchor; + }, Axis.prototype.xForXAxisLabel = function xForXAxisLabel() { + return this.xForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.xForYAxisLabel = function xForYAxisLabel() { + return this.xForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.xForY2AxisLabel = function xForY2AxisLabel() { + return this.xForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.dxForXAxisLabel = function dxForXAxisLabel() { + return this.dxForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.dxForYAxisLabel = function dxForYAxisLabel() { + return this.dxForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.dxForY2AxisLabel = function dxForY2AxisLabel() { + return this.dxForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.dyForXAxisLabel = function dyForXAxisLabel() { + var $$ = this.owner, + config = $$.config, + isInner = this.getXAxisLabelPosition().isInner, + xHeight = config.axis_x_height; + return config.axis_rotated ? isInner ? "1.2em" : -25 - this.getMaxTickWidth("x") : isInner ? "-0.5em" : xHeight ? xHeight - 10 : "3em"; + }, Axis.prototype.dyForYAxisLabel = function dyForYAxisLabel() { + var $$ = this.owner, + isInner = this.getYAxisLabelPosition().isInner; + return $$.config.axis_rotated ? isInner ? "-0.5em" : "3em" : isInner ? "1.2em" : -10 - ($$.config.axis_y_inner ? 0 : this.getMaxTickWidth("y") + 10); + }, Axis.prototype.dyForY2AxisLabel = function dyForY2AxisLabel() { + var $$ = this.owner, + isInner = this.getY2AxisLabelPosition().isInner; + return $$.config.axis_rotated ? isInner ? "1.2em" : "-2.2em" : isInner ? "-0.5em" : 15 + ($$.config.axis_y2_inner ? 0 : this.getMaxTickWidth("y2") + 15); + }, Axis.prototype.textAnchorForXAxisLabel = function textAnchorForXAxisLabel() { + return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(), !1); + }, Axis.prototype.textAnchorForYAxisLabel = function textAnchorForYAxisLabel() { + return this.textAnchorForAxisLabel(this.getYAxisLabelPosition()); + }, Axis.prototype.textAnchorForY2AxisLabel = function textAnchorForY2AxisLabel() { + return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition()); + }, Axis.prototype.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) { + var $$ = this.owner, + config = $$.config, + currentTickMax = $$.currentMaxTickWidths, + maxWidth = 0; + + + if (withoutRecompute && currentTickMax[id]) return currentTickMax[id]; + + if ($$.svg) { + var isYAxis = /^y2?$/.test(id), + targetsToShow = $$.filterTargetsToShow($$.data.targets), + getFrom = isYAxis ? "getY" : "getX", + scale = $$[id].copy().domain($$[getFrom + "Domain"](targetsToShow, id)), + axis = this[getFrom + "Axis"](id, scale, $$[id + "Orient"], isYAxis ? config["axis_" + id + "_tick_format"] : $$.xAxisTickFormat, null, !1, !0, !0); + isYAxis || this.updateXAxisTickValues(targetsToShow, axis); + + + var dummy = $$.selectChart.append("svg").style("visibility", "hidden"); + + dummy.call(axis).selectAll("text").each(function () { + maxWidth = Math.max(maxWidth, this.getBoundingClientRect().width); + }), dummy.remove(); + } + + return maxWidth > 0 && (currentTickMax[id] = maxWidth), currentTickMax[id]; + }, Axis.prototype.updateLabels = function updateLabels(withTransition) { + var _this2 = this, + $$ = this.owner, + labels = { + X: $$.main.select("." + _classes2.default.axisX + " ." + _classes2.default.axisXLabel), + Y: $$.main.select("." + _classes2.default.axisY + " ." + _classes2.default.axisYLabel), + Y2: $$.main.select("." + _classes2.default.axisY2 + " ." + _classes2.default.axisY2Label) + }; + + Object.keys(labels).forEach(function (v) { + var node = labels[v], + axisLabel = v + "AxisLabel"; + (withTransition ? node.transition() : node).attr("x", _this2["xFor" + axisLabel].bind(_this2)).attr("dx", _this2["dxFor" + axisLabel].bind(_this2)).attr("dy", _this2["dyFor" + axisLabel].bind(_this2)).text(_this2["textFor" + axisLabel].bind(_this2)); + }); + }, Axis.prototype.getPadding = function getPadding(padding, key, defaultValue, domainLength) { + var p = (0, _util.isNumber)(padding) ? padding : padding[key]; + + // assume padding is pixels if unit is not specified + return (0, _util.isValue)(p) ? padding.unit === "ratio" ? padding[key] * domainLength : this.convertPixelsToAxisPadding(p, domainLength) : defaultValue; + }, Axis.prototype.convertPixelsToAxisPadding = function convertPixelsToAxisPadding(pixels, domainLength) { + var $$ = this.owner, + length = $$.config.axis_rotated ? $$.width : $$.height; + + + return domainLength * (pixels / length); + }, Axis.prototype.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) { + var tickValues = values, + start = void 0, + end = void 0, + count = void 0, + interval = void 0, + i = void 0, + tickValue = void 0; + + + if (tickCount) { + var targetCount = (0, _util.isFunction)(tickCount) ? tickCount() : tickCount; + + // compute ticks according to tickCount + if (targetCount === 1) tickValues = [values[0]];else if (targetCount === 2) tickValues = [values[0], values[values.length - 1]];else if (targetCount > 2) { + + for (count = targetCount - 2, start = values[0], end = values[values.length - 1], interval = (end - start) / (count + 1), tickValues = [start], i = 0; i < count; i++) tickValue = +start + interval * (i + 1), tickValues.push(forTimeSeries ? new Date(tickValue) : tickValue); + + tickValues.push(end); + } + } + + return forTimeSeries || (tickValues = tickValues.sort(function (a, b) { + return a - b; + })), tickValues; + }, Axis.prototype.generateTransitions = function generateTransitions(duration) { + var $$ = this.owner, + axes = $$.axes, + _map = ["x", "y", "y2", "subx"].map(function (v) { + return duration ? axes[v].transition().duration(duration) : axes[v]; + }), + axisX = _map[0], + axisY = _map[1], + axisY2 = _map[2], + axisSubX = _map[3]; + + return { axisX: axisX, axisY: axisY, axisY2: axisY2, axisSubX: axisSubX }; + }, Axis.prototype.redraw = function redraw(transitions, isHidden) { + var $$ = this.owner, + opacity = isHidden ? "0" : "1"; + ["x", "y", "y2", "subx"].forEach(function (v) { + $$.axes[v].style("opacity", opacity); + }), transitions.axisX.call($$.xAxis), transitions.axisY.call($$.yAxis), transitions.axisY2.call($$.y2Axis), transitions.axisSubX.call($$.subXAxis); + }, Axis; +}(); + +exports.default = Axis; +module.exports = exports["default"]; + +/***/ }), +/* 5 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +exports.default = function () { + + function axisX(selection, x) { + selection.attr("transform", function (d) { + return "translate(" + Math.ceil(x(d) + tickOffset) + ", 0)"; + }); + } + + function axisY(selection, y) { + selection.attr("transform", function (d) { + return "translate(0," + Math.ceil(y(d)) + ")"; + }); + } + + function scaleExtent(domain) { + var start = domain[0], + stop = domain[domain.length - 1]; + + + return start < stop ? [start, stop] : [stop, start]; + } + + function generateTicks(scale) { + var ticks = []; + + if (scale.ticks) return scale.ticks.apply(scale, tickArguments ? (0, _util.toArray)(tickArguments) : []).map(function (v) { + return ( + // round the tick value if is number + (0, _util.isString)(v) && (0, _util.isNumber)(v) && !isNaN(v) && Math.round(v * 10) / 10 || v + ); + }); + + for (var domain = scale.domain(), i = Math.ceil(domain[0]); i < domain[1]; i++) ticks.push(i); + + return ticks.length > 0 && ticks[0] > 0 && ticks.unshift(ticks[0] - (ticks[1] - ticks[0])), ticks; + } + + function copyScale() { + var newScale = scale.copy(); + + return newScale.domain().length || newScale.domain(scale.domain()), newScale; + } + + function textFormatted(v) { + // to round float numbers from 'binary floating point' + // https://en.wikipedia.org/wiki/Double-precision_floating-point_format + // https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand + var value = /\d+\.\d+0{5,}\d$/.test(v) ? +(v + "").replace(/0+\d$/, "") : v, + formatted = tickFormat ? tickFormat(value) : value; + + + return (0, _util.isDefined)(formatted) ? formatted : ""; + } + + function transitionise(selection) { + return params.withoutTransition ? selection.interrupt() : selection.transition(transition); + } + + function axis(g) { + g.each(function () { + + // this should be called only when category axis + function splitTickText(d, maxWidthValue) { + + function split(splitted, text) { + spaceIndex = undefined; + + + for (var i = 1; i < text.length; i++) + + // if text width gets over tick width, split by space index or current index + if (text.charAt(i) === " " && (spaceIndex = i), subtext = text.substr(0, i + 1), textWidth = sizeFor1Char.w * subtext.length, maxWidth < textWidth) return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i)); + + return splitted.concat(text); + } + + var tickText = textFormatted(d), + splitted = (0, _util.isString)(tickText) && tickText.indexOf("\n") > -1 ? tickText.split("\n") : []; + + + if (splitted.length) return splitted; + + var maxWidth = maxWidthValue, + subtext = void 0, + spaceIndex = void 0, + textWidth = void 0; + return (0, _util.isArray)(tickText) ? tickText : ((!maxWidth || maxWidth <= 0) && (maxWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12 : 110), split(splitted, tickText + "")); + } + + var g = (0, _d3Selection.select)(this); + + axis.g = g; + var scale0 = this.__chart__ || scale, + scale1 = copyScale(); + this.__chart__ = scale1; + + + // count of tick data in array + var ticks = tickValues || generateTicks(scale1), + tick = g.selectAll(".tick").data(ticks, scale1), + tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", "1"), + tickExit = tick.exit().remove(); + + // update selection + + + // enter selection + + + // MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks. + + tick = tickEnter.merge(tick); + var tickUpdate = transitionise(tick).style("opacity", "1"), + tickX = void 0, + tickY = void 0, + range = scale.rangeExtent ? scale.rangeExtent() : scaleExtent((params.orgXScale || scale).range()), + path = g.selectAll(".domain").data([0]), + pathUpdate = path.enter().append("path").attr("class", "domain").merge(transitionise(path)); + + // update selection - data join + + + // enter + update selection + + tickEnter.append("line"), tickEnter.append("text"); + var lineEnter = tickEnter.select("line"), + lineUpdate = tickUpdate.select("line"), + textEnter = tickEnter.select("text"), + textUpdate = tickUpdate.select("text"); + params.isCategory ? (tickOffset = Math.ceil((scale1(1) - scale1(0)) / 2), tickX = tickCentered ? 0 : tickOffset, tickY = tickCentered ? tickOffset : 0) : (tickX = 0, tickOffset = tickX); + var sizeFor1Char = getSizeFor1Char.size || getSizeFor1Char(g.select(".tick")), + counts = [], + tickLength = Math.max(6, 0) + 3, + isLeftRight = /^(left|right)$/.test(orient), + isTopBottom = /^(top|bottom)$/.test(orient), + tspan = tick.select("text").selectAll("tspan").data(function (d, index) { + var split = params.tickMultiline ? splitTickText(d, params.tickWidth) : (0, _util.isArray)(textFormatted(d)) ? textFormatted(d).concat() : [textFormatted(d)]; + + return counts[index] = split.length, split.map(function (splitted) { + return { index: index, splitted: splitted }; + }); + }); + tspan.exit().remove(), tspan = tspan.enter().append("tspan").merge(tspan).text(function (d) { + return d.splitted; + }); + + + // line/text enter and path update + var tickTransform = isTopBottom ? axisX : axisY, + sign = /^(top|left)$/.test(orient) ? -1 : 1, + axisPx = tickTransform === axisX ? "y" : "x"; + lineEnter.attr(axisPx + "2", 6 * sign), textEnter.attr("" + axisPx, 9 * sign), pathUpdate.attr("d", function () { + var outerTickSized = outerTickSize * sign; + + return isTopBottom ? "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized : "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized; + }); + + // tick text helpers + var rotate = params.tickTextRotate, + tickSize = function tickSize(d) { + var tickPosition = scale(d) + (tickCentered ? 0 : tickOffset); + + return range[0] < tickPosition && tickPosition < range[1] ? 6 : 0; + }, + tickTextPos = params.axisName && /^(x|y|y2)$/.test(params.axisName) ? params.config["axis_" + params.axisName + "_tick_text_position"] : { x: 0, y: 0 }; + + // get the axis' tick position configuration + + + if (tspan.attr("x", isTopBottom ? 0 : 9 * sign).attr("dx", function () { + var dx = 0; + + return orient === "bottom" && rotate && (dx = 8 * Math.sin(Math.PI * (rotate / 180))), dx + (tickTextPos.x || 0); + }()).attr("dy", function (d, i) { + var dy = 0; + + + return orient !== "top" && (i === 0 ? dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? ".71em" : 0 : dy = sizeFor1Char.h), (0, _util.isNumber)(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || ".71em"; + }), orient === "bottom" ? (lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", tickSize), textUpdate.attr("x", 0).attr("y", function yForText(r) { + return r ? 11.5 - 2.5 * (r / 15) * (r > 0 ? 1 : -1) : 9; + }(rotate)).style("text-anchor", function textAnchorForText(r) { + return r ? r > 0 ? "start" : "end" : "middle"; + }(rotate)).attr("transform", function textTransform(r) { + return r ? "rotate(" + r + ")" : null; + }(rotate))) : orient === "top" ? (lineUpdate.attr("x2", 0).attr("y2", -6), textUpdate.attr("x", 0).attr("y", -9).style("text-anchor", "middle")) : orient === "left" ? (lineUpdate.attr("x2", -6).attr("y1", tickY).attr("y2", tickY), textUpdate.attr("x", -9).attr("y", tickOffset).style("text-anchor", "end")) : orient === "right" ? (lineUpdate.attr("x2", 6).attr("y2", 0), textUpdate.attr("x", 9).attr("y", 0).style("text-anchor", "start")) : void 0, (params.tickTitle && textUpdate.append && textUpdate.append("title").each(function (index) { + (0, _d3Selection.select)(this).text(params.tickTitle[index]); + }), scale1.bandwidth)) { + var x = scale1, + dx = x.bandwidth() / 2; + scale0 = function scale0(d) { + return x(d) + dx; + }, scale1 = scale0; + } else scale0.bandwidth ? scale0 = scale1 : tickExit.call(tickTransform, scale1); + + tickEnter.call(tickTransform, scale0), tickUpdate.call(tickTransform, scale1); + }); + } + + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + scale = (0, _d3Scale.scaleLinear)(), + orient = "bottom", + outerTickSize = params.withOuterTick ? 6 : 0, + tickValues = null, + tickFormat = void 0, + tickArguments = void 0, + tickOffset = 0, + tickCulling = !0, + tickCentered = void 0, + transition = void 0; + + + return axis.scale = function (x) { + return arguments.length ? (scale = x, axis) : scale; + }, axis.orient = function (x) { + return arguments.length ? (orient = x in { + top: 1, + right: 1, + bottom: 1, + left: 1 + } ? x + "" : "bottom", axis) : orient; + }, axis.tickFormat = function (format) { + return arguments.length ? (tickFormat = format, axis) : tickFormat; + }, axis.tickCentered = function (isCentered) { + return arguments.length ? (tickCentered = isCentered, axis) : tickCentered; + }, axis.tickOffset = function () { + return tickOffset; + }, axis.tickInterval = function (size) { + var interval = void 0; + + if (params.isCategory) interval = tickOffset * 2;else { + var length = axis.g.select("path.domain").node().getTotalLength() - outerTickSize * 2; + + interval = length / (size || axis.g.selectAll("line").size()); + } + + return interval === Infinity ? 0 : interval; + }, axis.ticks = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; + + return args.length ? (tickArguments = (0, _util.toArray)(args), axis) : tickArguments; + }, axis.tickCulling = function (culling) { + return arguments.length ? (tickCulling = culling, axis) : tickCulling; + }, axis.tickValues = function (x) { + if ((0, _util.isFunction)(x)) tickValues = function tickValues() { + return x(scale.domain()); + };else { + if (!arguments.length) return tickValues; + + tickValues = x; + } + + return axis; + }, axis.setTransition = function (t) { + + return transition = t, axis; + }, axis; +}; + +var _d3Scale = __webpack_require__(65), + _d3Selection = __webpack_require__(64), + _util = __webpack_require__(6), + getSizeFor1Char = function getSizeFor1Char(node) { + // default size for one character + var size = { + w: 5.5, + h: 11.5 + }; + + return node.empty() || node.select("text").text("0").call(function (el) { + try { + var box = el.node().getBBox(), + h = box.height, + w = box.width; + h && w && (size.h = h, size.w = w), el.text(""); + } catch (e) {} + }), getSizeFor1Char.size = size; +}; + +// Features: +// 1. category axis +// 2. ceil values of translate/x/y to int for half pixel anti-aliasing +// 3. multiline tick text + +/** + * Compute a character dimension + * @param {d3.selection} node + * @return {{w: number, h: number}} + * @private + */ + + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * @ignore + */ +module.exports = exports["default"]; + +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.toArray = exports.sanitise = exports.merge = exports.notEmpty = exports.isValue = exports.isUndefined = exports.isString = exports.isObjectType = exports.isObject = exports.isNumber = exports.isFunction = exports.isEmpty = exports.isDefined = exports.isBoolean = exports.isArray = exports.hasValue = exports.getRectSegList = exports.getPathBox = exports.getOption = exports.getCssRules = exports.getBrushSelection = exports.extend = exports.emulateEvent = exports.diffDomain = exports.ceil10 = exports.capitalize = exports.callFn = exports.brushEmpty = exports.asHalfPixel = undefined; + +var _typeof2 = __webpack_require__(7), + _typeof3 = _interopRequireDefault(_typeof2), + _d3Selection = __webpack_require__(64), + _d3Brush = __webpack_require__(76), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var isValue = function (v) { + return v || v === 0; +}, + isFunction = function (v) { + return typeof v === "function"; +}, + isString = function (v) { + return typeof v === "string"; +}, + isNumber = function (v) { + return typeof v === "number"; +}, + isUndefined = function (v) { + return typeof v === "undefined"; +}, + isDefined = function (v) { + return typeof v !== "undefined"; +}, + isBoolean = function (v) { + return typeof v === "boolean"; +}, + ceil10 = function (v) { + return Math.ceil(v / 10) * 10; +}, + asHalfPixel = function (n) { + return Math.ceil(n) + .5; +}, + diffDomain = function (d) { + return d[1] - d[0]; +}, + isObjectType = function (v) { + return (typeof v === "undefined" ? "undefined" : (0, _typeof3.default)(v)) === "object"; +}, + isEmpty = function (o) { + return isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && Object.keys(o).length === 0; +}, + notEmpty = function (o) { + return !isEmpty(o); +}, + isArray = function (arr) { + return arr && arr.constructor === Array; +}, + isObject = function (obj) { + return obj && !obj.nodeType && isObjectType(obj) && !isArray(obj); +}, + getOption = function (options, key, defaultValue) { + return isDefined(options[key]) ? options[key] : defaultValue; +}, + hasValue = function (dict, value) { + var found = !1; + + return Object.keys(dict).forEach(function (key) { + return dict[key] === value && (found = !0); + }), found; +}, + callFn = function (fn) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key]; + + var isFn = isFunction(fn); + + return isFn && fn.call.apply(fn, args), isFn; +}, + sanitise = function (str) { + return isString(str) ? str.replace(/</g, "<").replace(/>/g, ">") : str; +}, + getRectSegList = function (path) { + /* + * seg1 ---------- seg2 + * | | + * | | + * | | + * seg0 ---------- seg3 + * */ + var bbox = path.getBBox(), + _ref = [bbox.x, bbox.y, bbox.width, bbox.height], + x = _ref[0], + y = _ref[1], + width = _ref[2], + height = _ref[3]; + + return [{ x: x, y: y + height }, // seg0 + { x: x, y: y }, // seg1 + { x: x + width, y: y }, // seg2 + { x: x + width, y: y + height // seg3 + }]; +}, + getPathBox = function (path) { + var box = path.getBoundingClientRect(), + _ref2 = [box.width, box.height], + width = _ref2[0], + height = _ref2[1], + items = getRectSegList(path), + x = items[0].x, + y = Math.min(items[0].y, items[1].y); + + return { + x: x, y: y, width: width, height: height + }; +}, + getBrushSelection = function (ctx) { + var selection = null, + event = _d3Selection.event, + main = ctx.context || ctx.main; + + // check from event + + return event && event.constructor.name === "BrushEvent" ? selection = event.selection : main && (selection = main.select("." + _classes2.default.brush).node()) && (selection = (0, _d3Brush.brushSelection)(selection)), selection; +}, + brushEmpty = function (ctx) { + var selection = getBrushSelection(ctx); + + return !selection || selection[0] === selection[1]; +}, + extend = function () { + var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + source = arguments[1]; + + for (var p in source) target[p] = source[p]; + + return target; +}, + capitalize = function (str) { + return str.charAt(0).toUpperCase() + str.slice(1); +}, + merge = function (target) { + for (var _len2 = arguments.length, objectN = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) objectN[_key2 - 1] = arguments[_key2]; + + if (!objectN.length || objectN.length === 1 && !objectN[0]) return target; + + var source = objectN.shift(); + + return isObject(target) && isObject(source) && Object.keys(source).forEach(function (key) { + var value = source[key]; + + isObject(value) ? (!target[key] && (target[key] = {}), target[key] = merge(target[key], value)) : target[key] = isArray(value) ? value.concat() : value; + }), extend.apply(undefined, [target].concat(objectN)); +}, + toArray = function (v) { + return [].slice.call(v); +}, + getCssRules = function (styleSheets) { + var rules = []; + + return styleSheets.forEach(function (sheet) { + try { + sheet.cssRules && sheet.cssRules.length && (rules = rules.concat(toArray(sheet.cssRules))); + } catch (e) { + console.error("Error while reading rules from " + sheet.href + ": " + e.toString()); + } + }), rules; +}, + emulateEvent = { + mouse: function () { + var getParams = function () { + return { + bubbles: !1, cancelable: !1, screenX: 0, screenY: 0, clientX: 0, clientY: 0 + }; + }; + + try { + + return new MouseEvent("t"), function (el, eventType) { + var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(); + el.dispatchEvent(new MouseEvent(eventType, params)); + }; + } catch (e) { + // Polyfills DOM4 MouseEvent + return function (el, eventType) { + var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(), + mouseEvent = document.createEvent("MouseEvent"); + mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, // the event's mouse click count + params.screenX, params.screenY, params.clientX, params.clientY, !1, !1, !1, !1, 0, null), el.dispatchEvent(mouseEvent); + }; + } + }(), + touch: function touch(el, eventType, params) { + var touchObj = new Touch(Object.assign({ + identifier: Date.now(), + target: el, + radiusX: 2.5, + radiusY: 2.5, + rotationAngle: 10, + force: .5 + }, params)); + + el.dispatchEvent(new TouchEvent(eventType, { + cancelable: !0, + bubbles: !0, + shiftKey: !0, + touches: [touchObj], + targetTouches: [], + changedTouches: [touchObj] + })); + } +}; + +/** + * Check if is array + * @param {Array} arr + * @returns {Boolean} + * @private + */ + + +/** + * Check if is object + * @param {Object} obj + * @returns {Boolean} + * @private + */ + + +/** + * Call function with arguments + * @param {Function} fn Function to be called + * @param {*} args Arguments + * @return {Boolean} true: fn is function, false: fn is not function + * @private + */ + + +/** + * Replace tag sign to html entity + * @param {String} str + * @return {String} + * @private + */ + + +// substitution of SVGPathSeg API polyfill + + +// return brush selection array + + +/** + * Return first letter capitalized + * @param {String} str + * @return {String} capitalized string + * @private + */ + + +/** + * Merge object returning new object + * @param {Object} target + * @param {Object} objectN + * @returns {Object} merged target object + * @private + * @example + * var target = { a: 1 }; + * utils.extend(target, { b: 2, c: 3 }); + * target; // { a: 1, b: 2, c: 3 }; + */ + + +/** + * Convert to array + * @param {Object} v + * @returns {Array} + * @private + */ + + +/** + * Get css rules for specified stylesheets + * @param {Array} styleSheets The stylesheets to get the rules from + * @returns {Array} + * @private + */ + + +// emulate event +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +exports.asHalfPixel = asHalfPixel; +exports.brushEmpty = brushEmpty; +exports.callFn = callFn; +exports.capitalize = capitalize; +exports.ceil10 = ceil10; +exports.diffDomain = diffDomain; +exports.emulateEvent = emulateEvent; +exports.extend = extend; +exports.getBrushSelection = getBrushSelection; +exports.getCssRules = getCssRules; +exports.getOption = getOption; +exports.getPathBox = getPathBox; +exports.getRectSegList = getRectSegList; +exports.hasValue = hasValue; +exports.isArray = isArray; +exports.isBoolean = isBoolean; +exports.isDefined = isDefined; +exports.isEmpty = isEmpty; +exports.isFunction = isFunction; +exports.isNumber = isNumber; +exports.isObject = isObject; +exports.isObjectType = isObjectType; +exports.isString = isString; +exports.isUndefined = isUndefined; +exports.isValue = isValue; +exports.notEmpty = notEmpty; +exports.merge = merge; +exports.sanitise = sanitise; +exports.toArray = toArray; + +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = true; + +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; } + +exports.default = function (obj) { + return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); +}; + +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +/** + * CSS class names definition + * @private + */ +exports.default = { + arc: "bb-arc", + arcs: "bb-arcs", + area: "bb-area", + areas: "bb-areas", + axis: "bb-axis", + axisX: "bb-axis-x", + axisXLabel: "bb-axis-x-label", + axisY: "bb-axis-y", + axisY2: "bb-axis-y2", + axisY2Label: "bb-axis-y2-label", + axisYLabel: "bb-axis-y-label", + bar: "bb-bar", + bars: "bb-bars", + brush: "bb-brush", + button: "bb-button", + buttonZoomReset: "bb-zoom-reset", + chart: "bb-chart", + chartArc: "bb-chart-arc", + chartArcs: "bb-chart-arcs", + chartArcsBackground: "bb-chart-arcs-background", + chartArcsGaugeMax: "bb-chart-arcs-gauge-max", + chartArcsGaugeMin: "bb-chart-arcs-gauge-min", + chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit", + chartArcsTitle: "bb-chart-arcs-title", + chartBar: "bb-chart-bar", + chartBars: "bb-chart-bars", + chartLine: "bb-chart-line", + chartLines: "bb-chart-lines", + chartRadar: "bb-chart-radar", + chartRadars: "bb-chart-radars", + chartText: "bb-chart-text", + chartTexts: "bb-chart-texts", + circle: "bb-circle", + circles: "bb-circles", + colorPattern: "bb-color-pattern", + defocused: "bb-defocused", + dragarea: "bb-dragarea", + empty: "bb-empty", + eventRect: "bb-event-rect", + eventRects: "bb-event-rects", + eventRectsMultiple: "bb-event-rects-multiple", + eventRectsSingle: "bb-event-rects-single", + focused: "bb-focused", + gaugeValue: "bb-gauge-value", + grid: "bb-grid", + gridLines: "bb-grid-lines", + legendBackground: "bb-legend-background", + legendItem: "bb-legend-item", + legendItemEvent: "bb-legend-item-event", + legendItemFocused: "bb-legend-item-focused", + legendItemHidden: "bb-legend-item-hidden", + legendItemPoint: "bb-legend-item-point", + legendItemTile: "bb-legend-item-tile", + level: "bb-level", + levels: "bb-levels", + line: "bb-line", + lines: "bb-lines", + region: "bb-region", + regions: "bb-regions", + selectedCircle: "bb-selected-circle", + selectedCircles: "bb-selected-circles", + shape: "bb-shape", + shapes: "bb-shapes", + target: "bb-target", + text: "bb-text", + texts: "bb-texts", + title: "bb-title", + tooltip: "bb-tooltip", + tooltipContainer: "bb-tooltip-container", + tooltipName: "bb-tooltip-name", + xgrid: "bb-xgrid", + xgridFocus: "bb-xgrid-focus", + xgridLine: "bb-xgrid-line", + xgridLines: "bb-xgrid-lines", + xgrids: "bb-xgrids", + ygrid: "bb-ygrid", + ygridLine: "bb-ygrid-line", + ygridLines: "bb-ygrid-lines", + ygrids: "bb-ygrids", + zoomBrush: "bb-zoom-brush", + zoomRect: "bb-zoom-rect", + EXPANDED: "_expanded_", + SELECTED: "_selected_", + INCLUDED: "_included_" +}; +module.exports = exports["default"]; + +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Options = __webpack_require__(10), + _Options2 = _interopRequireDefault(_Options), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getOptions: function getOptions() { + var config = new _Options2.default(); + + return (0, _util.merge)(config.value, this.additionalConfig); + }, + + + additionalConfig: {}, + + /** + * Load configuration option + * @param {Object} config User's generation config value + * @private + */ + loadConfig: function loadConfig(config) { + var thisConfig = this.config, + target = void 0, + keys = void 0, + read = void 0, + find = function () { + var key = keys.shift(); + + return key && target && (0, _util.isObjectType)(target) && key in target ? (target = target[key], find()) : key ? undefined : target; + }; + + Object.keys(thisConfig).forEach(function (key) { + target = config, keys = key.split("_"), read = find(), (0, _util.isDefined)(read) && (thisConfig[key] = read); + }); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; + +var _classCallCheck2 = __webpack_require__(2), + _classCallCheck3 = _interopRequireDefault(_classCallCheck2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +/** + * Class to set options on generating chart. + * - It's instantiated internally, not exposed for public. + * @class Options + * @see {@link bb.generate} to use these options on generating the chart + */ +var Options = function Options() { + (0, _classCallCheck3.default)(this, Options), this.value = { + /** + * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also. + * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).<br><br> + * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.<br> + * @name bindto + * @memberOf Options + * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn. + * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn. + * @property {String} [bindto.classname=bb] Specify the class name of bind element.<br> + * **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly. + * @default #chart + * @example + * bindto: "#myContainer" + * + * // or HTMLElement + * bindto: document.getElementById("myContainer") + * + * // or D3 selection object + * bindto: d3.select("#myContainer") + * + * // or to change default classname + * bindto: { + * element: "#chart", + * classname: "bill-board" // ex) <div id='chart' class='bill-board'> + * } + */ + bindto: "#chart", + + /** + * Set 'clip-path' attribute for chart element + * - **NOTE:** + * > When is false, chart node element is positioned after the axis node in DOM tree hierarchy. + * > Is to make chart element positioned over axis element. + * @name clipPath + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * // don't set 'clip-path' attribute + * clipPath: false + */ + clipPath: !0, + + /** + * Set svg element's class name + * @name svg + * @memberOf Options + * @type {Object} + * @property {String} [svg.classname] class name for svg element + * @example + * svg: { + * classname: "test_class" + * } + */ + svg_classname: undefined, + + /** + * The desired size of the chart element. + * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to. + * @name size + * @memberOf Options + * @type {Object} + * @property {Number} [size.width] width of the chart element + * @property {Number} [size.height] height of the chart element + * @example + * size: { + * width: 640, + * height: 480 + * } + */ + size_width: undefined, + size_height: undefined, + + /** + * The padding of the chart element. + * @name padding + * @memberOf Options + * @type {Object} + * @property {Number} [padding.top] padding on the top of chart + * @property {Number} [padding.right] padding on the right of chart + * @property {Number} [padding.bottom] padding on the bottom of chart + * @property {Number} [padding.left] padding on the left of chart + * @example + * padding: { + * top: 20, + * right: 20, + * bottom: 20, + * left: 20 + * } + */ + padding_left: undefined, + padding_right: undefined, + padding_top: undefined, + padding_bottom: undefined, + + /** + * Set chart resize options + * @name resize + * @memberOf Options + * @type {Object} + * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes. + * @example + * resize: { + * auto: false + * } + */ + resize_auto: !0, + + /** + * Set zoom options + * @name zoom + * @memberOf Options + * @type {Object} + * @property {Boolean} [zoom.enabled=false] Enable zooming. + * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type. + * - **Available types:** + * - wheel + * - drag + * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.<br> + * If true set, y domain will be updated according to the zoomed region. + * @property {Array} [zoom.extent=[1, 10]] Change zoom extent. + * @property {Number} [zoom.x.min] Set x Axis minimum zoom range + * @property {Number} [zoom.x.max] Set x Axis maximum zoom range + * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br> + * Specified function receives the zoom event. + * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br> + * Specified function receives the zoomed domain. + * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br> + * Specified function receives the zoomed domain. + * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom + * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button. + * @example + * zoom: { + * enabled: { + * type: "drag" + * }, + * rescale: true, + * extent: [1, 100] // enable more zooming + * x: { + * min: -1, // set min range + * max: 10 // set max range + * }, + * onzoomstart: function(event) { ... }, + * onzoom: function(domain) { ... }, + * onzoomend: function(domain) { ... }, + * + * // show reset button when is zoomed-in + * resetButton: true, + * + * // customized text value for reset zoom button + * resetButton: { + * text: "Unzoom" + * } + * } + */ + zoom_enabled: undefined, + zoom_extent: undefined, + zoom_privileged: !1, + zoom_rescale: !1, + zoom_onzoom: undefined, + zoom_onzoomstart: undefined, + zoom_onzoomend: undefined, + zoom_resetButton: !0, + zoom_x_min: undefined, + zoom_x_max: undefined, + + /** + * Interaction options + * @name interaction + * @memberOf Options + * @type {Object} + * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br> + * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled. + * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area) + * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction + * @property {Boolean} [interaction.inputType.touch=true] enable or disable touch interaction + * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling. + * @example + * interaction: { + * enabled: false, + * inputType: { + * mouse: true, + * touch: false + * + * // or declare preventDefault explicitly. + * // In this case touch inputType is enabled by default + * touch: { + * preventDefault: true + * + * // or threshold pixel value (pixel moved from touchstart to touchmove) + * preventDefault: 5 + * } + * } + * } + */ + interaction_enabled: !0, + interaction_brighten: !0, + interaction_inputType_mouse: !0, + interaction_inputType_touch: {}, + + /** + * Set a callback to execute when mouse/touch enters the chart. + * @name onover + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onover: function() { + * ... + * } + */ + onover: function onover() {}, + + /** + * Set a callback to execute when mouse/touch leaves the chart. + * @name onout + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onout: function() { + * ... + * } + */ + onout: function onout() {}, + + /** + * Set a callback to execute when user resizes the screen. + * @name onresize + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onresize: function() { + * ... + * } + */ + onresize: function onresize() {}, + + /** + * SSet a callback to execute when screen resize finished. + * @name onresized + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onresized: function() { + * ... + * } + */ + onresized: function onresized() {}, + + /** + * Set a callback to execute before the chart is initialized + * @name onbeforeinit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onbeforeinit: function() { + * ... + * } + */ + onbeforeinit: undefined, + + /** + * Set a callback to execute when the chart is initialized. + * @name oninit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * oninit: function() { + * ... + * } + */ + oninit: function oninit() {}, + + /** + * Set a callback to execute after the chart is initialized + * @name onafterinit + * @memberOf Options + * @type {Function} + * @default function(){} + * @example + * onafterinit: function() { + * ... + * } + */ + onafterinit: undefined, + + /** + * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed. + * @name onrendered + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onrendered: function() { + * ... + * } + */ + onrendered: undefined, + + /** + * Set duration of transition (in milliseconds) for chart animation.<br><br> + * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data. + * @name transition + * @memberOf Options + * @type {Object} + * @property {Number} [transition.duration=350] duration in milliseconds + * @example + * transition: { + * duration: 500 + * } + */ + transition_duration: 350, + + /** + * Specify the key of x values in the data.<br><br> + * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names. + * @name data․x + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * x: "date" + * } + */ + data_x: undefined, + + /** + * Specify the keys of the x values for each data.<br><br> + * This option can be used if we want to show the data that has different x values. + * @name data․xs + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * xs: { + * data1: "x1", + * data2: "x2" + * } + * } + */ + data_xs: {}, + + /** + * Set a format to parse string specifed as x. + * @name data․xFormat + * @memberOf Options + * @type {String} + * @default %Y-%m-%d + * @example + * data: { + * xFormat: "%Y-%m-%d %H:%M:%S" + * } + * @see [D3's time specifier](https://npm.runkit.com/d3-time-format) + */ + data_xFormat: "%Y-%m-%d", + + /** + * Set localtime format to parse x axis. + * @name data․xLocaltime + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * xLocaltime: false + * } + */ + data_xLocaltime: !0, + + /** + * Sort on x axis. + * @name data․xSort + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * xSort: false + * } + */ + data_xSort: !0, + data_idConverter: function data_idConverter(id) { + return id; + }, + + /** + * Set custom data name. + * @name data․names + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * names: { + * data1: "Data Name 1", + * data2: "Data Name 2" + * } + * } + */ + data_names: {}, + + /** + * Set custom data class.<br><br> + * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class). + * @name data․classes + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * classes: { + * data1: "additional-data1-class", + * data2: "additional-data2-class" + * } + * } + */ + data_classes: {}, + + /** + * Set groups for the data for stacking. + * @name data․groups + * @memberOf Options + * @type {Array} + * @default [] + * @example + * data: { + * groups: [ + * ["data1", "data2"], + * ["data3"] + * ] + * } + */ + data_groups: [], + + /** + * Set y axis the data related to. y and y2 can be used. + * @name data․axes + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * axes: { + * data1: "y", + * data2: "y2" + * } + * } + */ + data_axes: {}, + + /** + * Set chart type at once.<br><br> + * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br> + * **Available Values:** + * - area + * - area-line-range + * - area-spline + * - area-spline-range + * - area-step + * - bar + * - bubble + * - donut + * - gauge + * - line + * - pie + * - radar + * - scatter + * - spline + * - step + * @name data․type + * @memberOf Options + * @type {String} + * @default line + * @example + * data: { + * type: "bar" + * } + */ + data_type: undefined, + + /** + * Set chart type for each data.<br> + * This setting overwrites data.type setting. + * - **NOTE:** `radar` type can't be combined with other types. + * @name data․types + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * types: { + * data1: "bar", + * data2: "spline" + * } + * } + */ + data_types: {}, + + /** + * Set labels options + * @name data․labels + * @memberOf Options + * @type {Object} + * @property {Boolean} [data.labels=false] Show or hide labels on each data points + * @property {Function} [data.labels.format={}] Set formatter function for data labels.<br> + * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:<br> + * - `v` is the value of the data point where the label is shown. + * - `id` is the id of the data where the label is shown. + * - `i` is the index of the data point where the label is shown. + * - `j` is the sub index of the data point where the label is shown.<br><br> + * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$')) + * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original. + * @property {NUmber} [data.labels.position.y=0] y coordinate position, relative the original. + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * labels: true, + * + * // or set specific options + * labels: { + * format: function(v, id, i, j) { ... }, + * + * // it's possible to set for each data + * format: { + * data1: function(v, id, i, j) { ... }, + * ... + * }, + * position: { + * x: -10, + * y: 10 + * } + * } + * } + */ + data_labels: {}, + data_labels_position: {}, + + /** + * This option changes the order of stacking data and pieces of pie/donut. + * - If `null` specified, it will be the order the data loaded. + * - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br> + * + * **Available Values:** + * - `desc`: In descending order + * - `asc`: In ascending order + * - `null`: It keeps the data load order + * - `function(data1, data2) { ... }`: Array.sort compareFunction + * @name data․order + * @memberOf Options + * @type {String|Function|null} + * @default desc + * @example + * data: { + * // in descending order (default) + * order: "desc" + * + * // in ascending order + * order: "asc" + * + * // keeps data input order + * order: null + * + * // specifying sort function + * order: function(a, b) { + * // param data passed format + * { + * id: "data1", id_org: "data1", values: [ + * {x: 5, value: 250, id: "data1", index: 5, name: "data1"}, + * ... + * ] + * } + * } + * } + */ + data_order: "desc", + + /** + * Define regions for each data.<br> + * The values must be an array for each data and it should include an object that has `start`, `end` and `style`. + * - The object type should be as: + * - start {Number}: Start data point number. If not set, the start will be the first data point. + * - [end] {Number}: End data point number. If not set, the end will be the last data point. + * - [style.dasharray="2 2"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area. + * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions. + * @name data․regions + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * regions: { + * data1: [{ + * start: 1, + * end: 2, + * style: { + * dasharray: "5 2" + * } + * }, { + * start: 3 + * }], + * ... + * } + * } + */ + data_regions: {}, + + /** + * Set color converter function.<br><br> + * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00'). + * @name data․color + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * data: { + * color: function(color, d) { ... } + * } + */ + data_color: undefined, + + /** + * Set color for each data. + * @name data․colors + * @memberOf Options + * @type {Object} + * @default {} + * @example + * data: { + * colors: { + * data1: "#ff0000", + * ... + * } + * } + */ + data_colors: {}, + + /** + * Hide each data when the chart appears.<br><br> + * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden. + * @name data․hide + * @memberOf Options + * @type {Boolean|Array} + * @default false + * @example + * data: { + * // all of data will be hidden + * hide: true + * + * // specified data will be hidden + * hide: ["data1", ...] + * } + */ + data_hide: !1, + data_filter: undefined, + + /** + * Set data selection enabled.<br><br> + * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected). + * @name data․selection․enabled + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * enabled: true + * } + * } + */ + data_selection_enabled: !1, + + /** + * Set grouped selection enabled.<br><br> + * If this option set true, multiple data points that have same x value will be selected by one selection. + * @name data․selection․grouped + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * grouped: true + * } + * } + */ + data_selection_grouped: !1, + + /** + * Set a callback for each data point to determine if it's selectable or not.<br><br> + * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean. + * @name data․selection․isselectable + * @memberOf Options + * @type {Function} + * @default function() { return true; } + * @example + * data: { + * selection: { + * isselectable: function(d) { ... } + * } + * } + */ + data_selection_isselectable: function data_selection_isselectable() { + return !0; + }, + + /** + * Set multiple data points selection enabled.<br><br> + * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected. + * @name data․selection․multiple + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * data: { + * selection: { + * multiple: false + * } + * } + */ + data_selection_multiple: !0, + + /** + * Enable to select data points by dragging. + * If this option set true, data points can be selected by dragging. + * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event. + * @name data․selection․draggable + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * data: { + * selection: { + * draggable: true + * } + * } + */ + data_selection_draggable: !1, + + /** + * Set a callback for click event on each data point.<br><br> + * This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object. + * @name data․onclick + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onclick: function(d, element) { ... } + * } + */ + data_onclick: function data_onclick() {}, + + /** + * Set a callback for mouse/touch over event on each data point.<br><br> + * This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object. + * @name data․onover + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onover: function(d) { ... } + * } + */ + data_onover: function data_onover() {}, + + /** + * Set a callback for mouse/touch out event on each data point.<br><br> + * This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object. + * @name data․onout + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onout: function(d) { ... } + * } + */ + data_onout: function data_onout() {}, + + /** + * Set a callback for on data selection. + * @name data․onselected + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onselected: function(d, element) { + * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"} + * // element - <circle> + * ... + * } + * } + */ + data_onselected: function data_onselected() {}, + + /** + * Set a callback for on data un-selection. + * @name data․onunselected + * @memberOf Options + * @type {Function} + * @default function() {} + * @example + * data: { + * onunselected: function(d, element) { + * // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"} + * // element - <circle> + * ... + * } + * } + */ + data_onunselected: function data_onunselected() {}, + + /** + * Set a callback for minimum data + * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison + * @name data․onmin + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onmin: function(data) { + * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ] + * ... + * } + */ + data_onmin: undefined, + + /** + * Set a callback for maximum data + * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison + * @name data․onmax + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * onmax: function(data) { + * // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ] + * ... + * } + */ + data_onmax: undefined, + + /** + * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests. + * @name data․url + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * url: "/data/test.csv" + * } + */ + data_url: undefined, + data_headers: undefined, + + /** + * Parse a JSON object for data. See also data.keys. + * @name data․json + * @memberOf Options + * @type {Object} + * @default undefined + * @see data․keys + * @example + * data: { + * json: [ + * {name: "www.site1.com", upload: 200, download: 200, total: 400}, + * {name: "www.site2.com", upload: 100, download: 300, total: 400}, + * {name: "www.site3.com", upload: 300, download: 200, total: 500}, + * {name: "www.site4.com", upload: 400, download: 100, total: 500} + * ], + * keys: { + * // x: "name", // it's possible to specify 'x' when category axis + * value: ["upload", "download"] + * } + * } + */ + data_json: undefined, + + /** + * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order. + * @name data․rows + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * data: { + * rows: [ + * ["A", "B", "C"], + * [90, 120, 300], + * [40, 160, 240], + * [50, 200, 290], + * [120, 160, 230], + * [80, 130, 300], + * [90, 220, 320] + * ] + * } + * + * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain: + * // - an array of [high, mid, low] data following the order + * // - or an object with 'high', 'mid' and 'low' key value + * data: { + * rows: [ + * ["data1", "data2"], + * [ + * // or {high:150, mid: 140, low: 110}, 120 + * [150, 140, 110], 120 + * ], + * [[155, 130, 115], 55], + * [[160, 135, 120], 60] + * ], + * types: { + * data1: "area-line-range", + * data2: "line" + * } + * } + */ + data_rows: undefined, + + /** + * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values. + * @name data․columns + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * data: { + * columns: [ + * ["data1", 30, 20, 50, 40, 60, 50], + * ["data2", 200, 130, 90, 240, 130, 220], + * ["data3", 300, 200, 160, 400, 250, 250] + * ] + * } + * + * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain: + * // - an array of [high, mid, low] data following the order + * // - or an object with 'high', 'mid' and 'low' key value + * data: { + * columns: [ + * ["data1", + * [150, 140, 110], // or {high:150, mid: 140, low: 110} + * [150, 140, 110], + * [150, 140, 110] + * ] + * ], + * type: "area-line-range" + * } + */ + data_columns: undefined, + + /** + * Used if loading JSON via data.url. + * @name data․mimeType + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * mimeType: "json" + * } + */ + data_mimeType: undefined, + + /** + * Choose which JSON object keys correspond to desired data. + * @name data․keys + * @memberOf Options + * @type {String} + * @default undefined + * @example + * data: { + * json: [ + * {name: "www.site1.com", upload: 200, download: 200, total: 400}, + * {name: "www.site2.com", upload: 100, download: 300, total: 400}, + * {name: "www.site3.com", upload: 300, download: 200, total: 500}, + * {name: "www.site4.com", upload: 400, download: 100, total: 500} + * ], + * keys: { + * // x: "name", // it's possible to specify 'x' when category axis + * value: ["upload", "download"] + * } + * } + */ + data_keys: undefined, + + /** + * Set text displayed when empty data. + * @name data․empty․label․text + * @memberOf Options + * @type {String} + * @default "" + * @example + * data: { + * empty: { + * label: { + * text: "No Data" + * } + * } + * } + */ + data_empty_label_text: "", + + /** + * Set subchart options + * @name subchart + * @memberOf Options + * @type {Object} + * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart. + * @property {Boolean} [subchart.size.height] Change the height of the subchart. + * @property {Boolean} [subchart.onbrush] Set callback for brush event.<br> + * Specified function receives the current zoomed x domain. + * @example + * subchart: { + * show: true, + * size: { + * height: 20 + * }, + * onbrush: function(domain) { ... } + * } + */ + subchart_show: !1, + subchart_size_height: 60, + subchart_axis_x_show: !0, + subchart_onbrush: function subchart_onbrush() {}, + + /** + * Set color of the data values + * @name color + * @memberOf Options + * @type {Object} + * @property {Array} [color.pattern] custom color pattern + * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement). + * - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br> + * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br> + * - `bb-colorize-pattern-red` + * - `bb-colorize-pattern-fff` + * @property {Object} [color.threshold] color threshold + * @property {String} [color.threshold.unit] unit + * @property {Array} [color.threshold.value] value + * @property {Array} [color.threshold.max=100] max value + * @example + * color: { + * pattern: ["#1f77b4", "#aec7e8", ...], + * + * // Set colors' patterns + * // it should return an array of SVGPatternElement + * tiles: function() { + * var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern"); + * var g = document.createElementNS("http://www.w3.org/2000/svg", "g"); + * var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle"); + * + * pattern.setAttribute("patternUnits", "userSpaceOnUse"); + * pattern.setAttribute("width", "32"); + * pattern.setAttribute("height", "32"); + * + * g.style.fill = "#000"; + * g.style.opacity = "0.2"; + * + * circle1.setAttribute("cx", "3"); + * circle1.setAttribute("cy", "3"); + * circle1.setAttribute("r", "3"); + * + * g.appendChild(circle1); + * pattern.appendChild(g); + * + * return [pattern]; + * } + * } + */ + color_pattern: [], + color_tiles: undefined, + color_threshold: {}, + + /** + * Legend options + * @name legend + * @memberOf Options + * @type {Object} + * @property {Boolean} [legend.show=true] Show or hide legend. + * @property {Boolean} [legend.hide=false] Hide legend + * If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden. + * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items. + * @property {String|Function} [legend.contents.template=undefined] Set item's template.<br> + * - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string: + * - {=COLOR}: data color value + * - {=TITLE}: data title value + * - If set `function` value, will pass following arguments to the given function: + * - title {String}: data's id value + * - color {String}: color string + * - data {Array}: data array + * @property {String} [legend.position=bottom] Change the position of legend.<br> + * Available values are: `bottom`, `right` and `inset` are supported. + * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br> + * This option accepts object that has the keys `anchor`, `x`, `y` and `step`. + * - **anchor** decides the position of the legend: + * - top-left + * - top-right + * - bottom-left + * - bottom-right + * - **x** and **y**: + * - set the position of the legend based on the anchor. + * - **step**: + * - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns). + * @property {Boolean} [legend.equally=false] Set to all items have same width size. + * @property {Boolean} [legend.padding=0] Set padding value + * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item. + * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item. + * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item. + * @property {Number} [legend.item.tile.width=10] Set width of item tile element + * @property {Number} [legend.item.tile.height=10] Set height of item tile element + * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend. + * @example + * legend: { + * show: true, + * hide: true, + * //or hide: "data1" + * //or hide: ["data1", "data2"] + * contents: { + * bindto: "#legend", // <ul id='legend'></ul> + * + * // will be as: <li style='background-color:#1f77b4'>data1</li> + * template: "<li style='background-color:{=COLOR}'>{=TITLE}</li>" + * + * // or using function + * template: function(id, color, data) { + * // if you want omit some legend, return falsy value + * if (title !== "data1") { + * return "<li style='background-color:"+ color +">"+ title +"</li>"; + * } + * } + * }, + * position: "bottom", // bottom, right, inset + * inset: { + * anchor: "top-right" // top-left, top-right, bottom-left, bottom-right + * x: 20, + * y: 10, + * step: 2 + * }, + * equally: false, + * padding: 10, + * item: { + * onclick: function(id) { ... }, + * onover: function(id) { ... }, + * onout: function(id) { ... }, + * + * // set tile's size + * tile: { + * width: 20, + * height: 15 + * } + * }, + * usePoint: true + * } + */ + legend_show: !0, + legend_hide: !1, + legend_contents_bindto: undefined, + legend_contents_template: undefined, + legend_position: "bottom", + legend_inset_anchor: "top-left", + legend_inset_x: 10, + legend_inset_y: 0, + legend_inset_step: undefined, + legend_item_onclick: undefined, + legend_item_onover: undefined, + legend_item_onout: undefined, + legend_equally: !1, + legend_padding: 0, + legend_item_tile_width: 10, + legend_item_tile_height: 10, + legend_usePoint: !1, + + /** + * Switch x and y axis position. + * @name axis․rotated + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * rotated: true + * } + */ + axis_rotated: !1, + + /** + * Set clip-path attribute for x axis element + * @name axis․x․clipPath + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * // don't set 'clip-path' attribute + * clipPath: false + */ + axis_x_clipPath: !0, + + /** + * Show or hide x axis. + * @name axis․x․show + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * show: false + * } + * } + */ + axis_x_show: !0, + + /** + * Set type of x axis.<br><br> + * **Available Values:** + * - timeseries + * - category + * - indexed + * @name axis․x․type + * @memberOf Options + * @type {String} + * @default indexed + * @example + * axis: { + * x: { + * type: "timeseries" + * } + * } + */ + axis_x_type: "indexed", + + /** + * Set how to treat the timezone of x values.<br> + * If true, treat x value as localtime. If false, convert to UTC internally. + * @name axis․x․localtime + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * localtime: false + * } + * } + */ + axis_x_localtime: !0, + + /** + * Set category names on category axis. + * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required. + * @name axis․x․categories + * @memberOf Options + * @type {Array} + * @default [] + * @example + * axis: { + * x: { + * categories: ["Category 1", "Category 2", ...] + * } + * } + */ + axis_x_categories: [], + + /** + * Centerise ticks on category axis. + * @name axis․x․tick․centered + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * x: { + * tick: { + * centered: true + * } + * } + * } + */ + axis_x_tick_centered: !1, + + /** + * A function to format tick value. Format string is also available for timeseries data. + * @name axis․x․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * x: { + * tick: { + * // for timeseries, a 'datetime' object is given as parameter + * format: function(x) { + * return x.getFullYear(); + * } + * + * // for category, index(Number) and categoryName(String) are given as parameter + * format: function(index, categoryName) { + * return categoryName.substr(0, 10); + * } + * } + * } + * } + */ + axis_x_tick_format: undefined, + + /** + * Setting for culling ticks.<br><br> + * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br> + * We can change the number of ticks to be shown by axis.x.tick.culling.max. + * @name axis․x․tick․culling + * @memberOf Options + * @type {Boolean} + * @default + * - true for indexed axis and timeseries axis + * - false for category axis + * @example + * axis: { + * x: { + * tick: { + * culling: false + * } + * } + * } + */ + axis_x_tick_culling: {}, + + /** + * The number of tick texts will be adjusted to less than this value. + * @name axis․x․tick․culling․max + * @memberOf Options + * @type {Number} + * @default 10 + * @example + * axis: { + * x: { + * tick: { + * culling: { + * max: 5 + * } + * } + * } + * } + */ + axis_x_tick_culling_max: 10, + + /** + * The number of x axis ticks to show.<br><br> + * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value). + * @name axis․x․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_x_tick_count: undefined, + + /** + * Set the x Axis tick text's position relatively its original position + * @name axis․x․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * x: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_x_tick_text_position: { x: 0, y: 0 }, + + /** + * Fit x axis ticks.<br><br> + * If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points. + * @name axis․x․tick․fit + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * fit: false + * } + * } + * } + */ + axis_x_tick_fit: !0, + + /** + * Set the x values of ticks manually.<br><br> + * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option. + * @name axis․x․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * x: { + * tick: { + * values: [1, 2, 4, 8, 16, 32, ...] + * } + * } + * } + */ + axis_x_tick_values: null, + + /** + * Rotate x axis tick text.<br> + * If you set negative value, it will rotate to opposite direction. + * @name axis․x․tick․rotate + * @memberOf Options + * @type {Number} + * @default 0 + * @example + * axis: { + * x: { + * tick: { + * rotate: 60 + * } + * } + * } + */ + axis_x_tick_rotate: 0, + + /** + * Show x axis outer tick. + * @name axis․x․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_x_tick_outer: !0, + + /** + * Set tick text to be multiline + * - **NOTE:** + * > When x tick text contains `\n`, it's used as line break and 'axis.x.tick.width' option is ignored. + * @name axis․x․tick․multiline + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * x: { + * tick: { + * multiline: false + * } + * } + * } + * @example + * // example of line break with '\n' + * // In this case, 'axis.x.tick.width' is ignored + * data: { + * x: "x", + * columns: [ + * ["x", "long\ntext", "Another\nLong\nText"], + * ... + * ], + * } + */ + axis_x_tick_multiline: !0, + + /** + * Set tick width + * - **NOTE:** + * > When x tick text contains `\n`, this option is ignored. + * @name axis․x․tick․width + * @memberOf Options + * @type {Number} + * @default null + * @example + * axis: { + * x: { + * tick: { + * width: 50 + * } + * } + * } + */ + axis_x_tick_width: null, + + /** + * Set to display system tooltip for tick text + * - **NOTE:** Only available for category axis type (`axis.x.type='category'`) + * @name axis․x․tick․tooltip + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * x: { + * tick: { + * tooltip: true + * } + * } + * } + */ + axis_x_tick_tooltip: !1, + + /** + * Set max value of x axis range. + * @name axis․x․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * max: 100 + * } + * } + */ + axis_x_max: undefined, + + /** + * Set min value of x axis range. + * @name axis․x․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * min: -100 + * } + * } + */ + axis_x_min: undefined, + + /** + * Set padding for x axis.<br><br> + * If this option is set, the range of x axis will increase/decrease according to the values. + * If no padding is needed in the rage of x axis, 0 should be set. + * - **NOTE:** + * The padding values aren't based on pixels. It differs according axis types<br> + * - **category:** The unit of tick value + * ex. the given value `1`, is same as the width of 1 tick width + * - **timeseries:** Numeric time value + * ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width + * @name axis․x․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * x: { + * padding: { + * // when axis type is 'category' + * left: 1, // set left padding width of equivalent value of a tick's width + * right: 0.5 // set right padding width as half of equivalent value of tick's width + * + * // when axis type is 'timeseries' + * left: 1000*60*60*24, // set left padding width of equivalent value of a day tick's width + * right: 1000*60*60*12 // set right padding width as half of equivalent value of a day tick's width + * } + * } + * } + */ + axis_x_padding: {}, + + /** + * Set height of x axis.<br><br> + * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel. + * @name axis․x․height + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * x: { + * height: 20 + * } + * } + */ + axis_x_height: undefined, + + /** + * Set default extent for subchart and zoom. This can be an array or function that returns an array. + * @name axis․x․extent + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * x: { + * // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner + * // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521 + * extent: [ + * [0, 0], [200, 60] + * ] + * } + * } + */ + axis_x_extent: undefined, + + /** + * Set label on x axis.<br><br> + * You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default. + * - **If it's horizontal axis:** + * - inner-right [default] + * - inner-center + * - inner-left + * - outer-right + * - outer-center + * - outer-left + * - **If it's vertical axis:** + * - inner-top [default] + * - inner-middle + * - inner-bottom + * - outer-top + * - outer-middle + * - outer-bottom + * @name axis․x․label + * @memberOf Options + * @type {String|Object} + * @default undefined + * @example + * axis: { + * x: { + * label: "Your X Axis" + * } + * } + * + * axis: { + * x: { + * label: { + * text: "Your X Axis", + * position: "outer-center" + * } + * } + * } + */ + axis_x_label: {}, + + /** + * Set clip-path attribute for y axis element + * @name axis․y․clipPath + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * // don't set 'clip-path' attribute + * clipPath: false + */ + axis_y_clipPath: !0, + + /** + * Show or hide y axis. + * @name axis․y․show + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y: { + * show: false + * } + * } + */ + axis_y_show: !0, + + /** + * Set type of y axis.<br><br> + * **Available Values:** + * - timeseries + * - category + * - indexed + * @name axis․y․type + * @memberOf Options + * @type {String} + * @default undefined + * @example + * axis: { + * y: { + * type: "timeseries" + * } + * } + */ + axis_y_type: undefined, + + /** + * Set max value of y axis. + * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0). + * @name axis․y․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * max: 1000 + * } + * } + */ + axis_y_max: undefined, + + /** + * Set min value of y axis. + * - **NOTE:** + * Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0). + * @name axis․y․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * min: 1000 + * } + * } + */ + axis_y_min: undefined, + + /** + * Change the direction of y axis.<br><br> + * If true set, the direction will be from the top to the bottom. + * @name axis․y․inverted + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y: { + * inverted: true + * } + * } + */ + axis_y_inverted: !1, + + /** + * Set center value of y axis. + * @name axis․y․center + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * center: 0 + * } + * } + */ + axis_y_center: undefined, + + /** + * Show y axis inside of the chart. + * @name axis․y․inner + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y: { + * inner: true + * } + * } + */ + axis_y_inner: !1, + + /** + * Set label on y axis.<br><br> + * You can set y axis label and change its position by this option. This option works in the same way as axis.x.label. + * @name axis․y․label + * @memberOf Options + * @type {String|Object} + * @default {} + * @example + * axis: { + * y: { + * label: "Your Y Axis" + * } + * } + * + * axis: { + * y: { + * label: { + * text: "Your Y Axis", + * position: "outer-middle" + * } + * } + * } + */ + axis_y_label: {}, + + /** + * Set formatter for y axis tick text.<br><br> + * This option accepts d3.format object as well as a function you define. + * @name axis․y․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * y: { + * tick: { + * format: function(x) { + * return x.getFullYear(); + * } + * } + * } + * } + */ + axis_y_tick_format: undefined, + + /** + * Show y axis outer tick. + * @name axis․y․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_y_tick_outer: !0, + + /** + * Set y axis tick values manually. + * @name axis․y․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * y: { + * tick: { + * values: [100, 1000, 10000] + * } + * } + * } + */ + axis_y_tick_values: null, + axis_y_tick_rotate: 0, + + /** + * Set the number of y axis ticks.<br><br> + * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful. + * @name axis․y․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_y_tick_count: undefined, + + /** + * Set the y Axis tick text's position relatively its original position + * @name axis․y․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * y: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_y_tick_text_position: { x: 0, y: 0 }, + + /** + * Set the number of y axis ticks.<br><br> + * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful. + * @name axis․y․tick․time + * @memberOf Options + * @private + * @type {Object} + * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals) + * @example + * axis: { + * y: { + * tick: { + * time: { + * // ticks at 15-minute intervals + * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks + * value: d3.timeMinute.every(15) + * } + * } + * } + * } + */ + // @TODO: not fully implemented yet + axis_y_tick_time_value: undefined, + + /** + * Set padding for y axis.<br><br> + * You can set padding for y axis to create more space on the edge of the axis. + * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels. + * + * - **NOTE:** For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom. + * @name axis․y․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * y: { + * padding: { + * top: 0, + * bottom: 0 + * } + * } + * } + */ + axis_y_padding: {}, + + /** + * Set default range of y axis.<br><br> + * This option set the default value for y axis when there is no data on init. + * @name axis․y․default + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * y: { + * default: [0, 1000] + * } + * } + */ + axis_y_default: undefined, + + /** + * Show or hide y2 axis. + * @name axis․y2․show + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * show: true + * } + * } + */ + axis_y2_show: !1, + + /** + * Set max value of y2 axis. + * @name axis․y2․max + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * max: 1000 + * } + * } + */ + axis_y2_max: undefined, + + /** + * Set min value of y2 axis. + * @name axis․y2․min + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * min: -1000 + * } + * } + */ + axis_y2_min: undefined, + + /** + * Change the direction of y2 axis.<br><br> + * If true set, the direction will be from the top to the bottom. + * @name axis․y2․inverted + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * inverted: true + * } + * } + */ + axis_y2_inverted: !1, + + /** + * Set center value of y2 axis. + * @name axis․y2․center + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * center: 0 + * } + * } + */ + axis_y2_center: undefined, + + /** + * Show y2 axis inside of the chart. + * @name axis․y2․inner + * @memberOf Options + * @type {Boolean} + * @default false + * @example + * axis: { + * y2: { + * inner: true + * } + * } + */ + axis_y2_inner: !1, + + /** + * Set label on y2 axis.<br><br> + * You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label. + * @name axis․y2․label + * @memberOf Options + * @type {String|Object} + * @default {} + * @example + * axis: { + * y2: { + * label: "Your Y2 Axis" + * } + * } + * + * axis: { + * y2: { + * label: { + * text: "Your Y2 Axis", + * position: "outer-middle" + * } + * } + * } + */ + axis_y2_label: {}, + + /** + * Set formatter for y2 axis tick text.<br><br> + * This option works in the same way as axis.y.format. + * @name axis․y2․tick․format + * @memberOf Options + * @type {Function} + * @default undefined + * @example + * axis: { + * y2: { + * tick: { + * format: d3.format("$,") + * //or format: function(d) { return "$" + d; } + * } + * } + * } + */ + axis_y2_tick_format: undefined, + + /** + * Show or hide y2 axis outer tick. + * @name axis․y2․tick․outer + * @memberOf Options + * @type {Boolean} + * @default true + * @example + * axis: { + * y2: { + * tick: { + * outer: false + * } + * } + * } + */ + axis_y2_tick_outer: !0, + + /** + * Set y2 axis tick values manually. + * @name axis․y2․tick․values + * @memberOf Options + * @type {Array} + * @default null + * @example + * axis: { + * y2: { + * tick: { + * values: [100, 1000, 10000] + * } + * } + * } + */ + axis_y2_tick_values: null, + + /** + * Set the number of y2 axis ticks. + * - **NOTE:** This works in the same way as axis.y.tick.count. + * @name axis․y2․tick․count + * @memberOf Options + * @type {Number} + * @default undefined + * @example + * axis: { + * y2: { + * tick: { + * count: 5 + * } + * } + * } + */ + axis_y2_tick_count: undefined, + + /** + * Set the y2 Axis tick text's position relatively its original position + * @name axis․y2․tick․text․position + * @memberOf Options + * @type {Object} + * @default {x: 0, y:0} + * @example + * axis: { + * y2: { + * tick: { + * text: { + * position: { + * x: 10, + * y: 10 + * } + * } + * } + * } + * } + */ + axis_y2_tick_text_position: { x: 0, y: 0 }, + + /** + * Set the number of y2 axis ticks. + * - **NOTE:** This works in the same way as axis.y.tick.count. + * @name axis․y2․padding + * @memberOf Options + * @type {Object} + * @default {} + * @example + * axis: { + * y2: { + * padding: { + * top: 100, + * bottom: 100 + * } + * } + * } + */ + axis_y2_padding: {}, + + /** + * Set default range of y2 axis.<br><br> + * This option set the default value for y2 axis when there is no data on init. + * @name axis․y2․default + * @memberOf Options + * @type {Array} + * @default undefined + * @example + * axis: { + * y2: { + * default: [0, 1000] + * } + * } + */ + axis_y2_default: undefined, + + /** + * Set related options + * @name grid + * @memberOf Options + * @type {Object} + * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements. + * @property {Boolean} [x.show=false] Show grids along x axis. + * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.<br> + * This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available. + * If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer. + * @property {Boolean} [y.show=false] Show grids along x axis. + * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.<br> + * This option accepts array including object that has value, text, position and class. + * @property {Boolean} [y.ticks=10] Number of y grids to be shown. + * @property {Boolean} [focus.show=true] Show grids when focus. + * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements. + * @default undefined + * @example + * grid: { + * x: { + * show: true, + * lines: [ + * {value: 2, text: "Label on 2"}, + * {value: 5, text: "Label on 5", class: "label-5"} + * {value: 6, text: "Label on 6", position: "start"} + * ] + * }, + * y: { + * show: true, + * lines: [ + * {value: 100, text: "Label on 100"}, + * {value: 200, text: "Label on 200", class: "label-200"} + * {value: 300, text: "Label on 300", position: 'middle'} + * ], + * ticks: 5 + * }, + * front: true, + * focus: { + * show: false + * }, + * lines: { + * front: false + * } + * } + */ + grid_x_show: !1, + grid_x_type: "tick", + grid_x_lines: [], + grid_y_show: !1, + grid_y_lines: [], + grid_y_ticks: 10, + grid_focus_show: !0, + grid_front: !1, + grid_lines_front: !0, + + /** + * Set point options + * @name point + * @memberOf Options + * @type {Object} + * @property {Boolean} [point.show=true] Whether to show each point in line. + * @property {Number|Function} [point.r=2.5] The radius size of each point.<br> + * - **NOTE:** Disabled for 'bubble' type + * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus. + * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.<br> + * - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15` + * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected. + * @property {String} [point.type="circle"] The type of point to be drawn<br> + * - **NOTE:** + * - If chart has 'bubble' type, only circle can be used. + * - For IE, non circle point expansions are not supported due to lack of transform support. + * - **Available Values:** + * - circle + * - rectangle + * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line<br> + * - **NOTE:** + * - This is an `experimental` feature and can have some unexpected behaviors. + * - If chart has 'bubble' type, only circle can be used. + * - For IE, non circle point expansions are not supported due to lack of transform support. + * - **Available Values:** + * - circle + * - rectangle + * - svg shape tag interpreted as string<br> + * (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`) + * @example + * point: { + * show: false, + * r: 5, + * + * // or customize the radius + * r: function(d) { + * ... + * return r; + * }, + * + * focus: { + * expand: { + * enabled: true, + * r: 1 + * } + * }, + * select: { + * r: 3 + * }, + * + * // valid values are "circle" or "rectangle" + * type: "rectangle", + * + * // or indicate as pattern + * pattern: [ + * "circle", + * "rectangle", + * "<polygon points='0 6 4 0 -4 0'></polygon>" + * ], + * } + */ + point_show: !0, + point_r: 2.5, + point_sensitivity: 10, + point_focus_expand_enabled: !0, + point_focus_expand_r: undefined, + point_pattern: [], + point_select_r: undefined, + point_type: "circle", + + /** + * Set line options + * @name line + * @memberOf Options + * @type {Object} + * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.<br> + * If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty. + * @property {Array} [line.classes=undefined] If set, used to set a css class on each line. + * @property {Boolean} [line.step.type=step] Change step type for step chart.<br> + * **Available values:** + * - step + * - step-before + * - step-after + * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for. + * @example + * line: { + * connectNull: true, + * classes: [ + * "line-class1", + * "line-class2" + * ], + * step: { + * type: "step-after" + * }, + * + * // hide all data points ('point.show=false' also has similar effect) + * point: false, + * + * // show data points for only indicated datas + * point: [ + * "data1", "data3" + * ] + * } + */ + line_connectNull: !1, + line_step_type: "step", + line_classes: undefined, + line_point: !0, + + /** + * Set bar options + * @name bar + * @memberOf Options + * @type {Object} + * @property {Boolean} [bar.padding=0] The padding pixel value between each bar. + * @property {Number} [bar.radius] Set the radius of bar edge in pixel.<br>- **NOTE:** Only for non-stacking bars. + * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width. + * @property {Number} [bar.width] Change the width of bar chart. + * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio. + * @property {Number} [bar.width.max] The maximum width value for ratio. + * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart. + * @example + * bar: { + * padding: 1, + * + * // the 'radius' option can be used only for non-stacking bars + * radius: 10, + * // or + * radius: { + * ratio: 0.5 + * } + * + * width: 10, + * // or + * width: { + * ratio: 0.2, + * max: 20 + * }, + * + * zerobased: false + * } + */ + bar_padding: 0, + bar_radius: undefined, + bar_radius_ratio: undefined, + bar_width: undefined, + bar_width_ratio: .6, + bar_width_max: undefined, + bar_zerobased: !0, + + /** + * Set bubble options + * @name bubble + * @memberOf Options + * @type {Object} + * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value + * @example + * bubble: { + * // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50. + * // And the lesser will have radius relatively from tha max value. + * maxR: 50, + * + * // or set radius callback + * maxR: function(d) { + * // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5} + * ... + * return Math.sqrt(d.value * 2); + * } + * } + */ + bubble_maxR: 35, + + /** + * Set area options + * @name area + * @memberOf Options + * @type {Object} + * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart. + * @property {Boolean} [area.above=false] + * @example + * area: { + * zerobased: false, + * above: true + * } + */ + area_zerobased: !0, + area_above: !1, + + /** + * Set pie options + * @name pie + * @memberOf Options + * @type {Object} + * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece. + * @property {Function} [pie.label.format] Set formatter for the label on each pie piece. + * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels. + * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position. + * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces. + * @property {Number} [pie.innerRadius=0] Sets the inner radius of pie arc. + * @property {Number} [pie.padAngle=0] Set padding between data. + * @property {Number} [pie.padding=0] Sets the gap between pie arcs. + * @example + * pie: { + * label: { + * show: false, + * format: function(value, ratio, id) { + * return d3.format("$")(value); + * }, + * threshold: 0.1, + * + * // set ratio callback. Should return ratio value + * ratio: function(d, radius, h) { + * ... + * return ratio; + * }, + * // or set ratio number + * ratio: 0.5 + * }, + * expand: false, + * innerRadius: 0, + * padAngle: 0.1, + * padding: 0 + * } + */ + pie_label_show: !0, + pie_label_format: undefined, + pie_label_threshold: .05, + pie_label_ratio: undefined, + pie_expand: {}, + pie_expand_duration: 50, + pie_innerRadius: 0, + pie_padAngle: 0, + pie_padding: 0, + + /** + * Set gauge options + * @name gauge + * @memberOf Options + * @type {Object} + * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location. + * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge. + * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\n` character. + * @property {Function} [gauge.label.extents] Set customized min/max label text. + * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge. + * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds. + * @property {Number} [gauge.min=0] Set min value of the gauge. + * @property {Number} [gauge.max=100] Set max value of the gauge. + * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2] + * @property {String} [gauge.units] Set units of the gauge. + * @property {Number} [gauge.width] Set width of gauge chart. + * @example + * gauge: { + * fullCircle: false, + * label: { + * show: false, + * format: function(value, ratio) { + * return value; + * + * // to multiline, return with '\n' character + * // return value +"%\nLine1\n2Line2"; + * }, + * extents: function(value, isMax) { + * return (isMax ? "Max:" : "Min:") + value; + * } + * }, + * expand: false, + * + * // or set duration + * expand: { + * duration: 20 + * }, + * min: -100, + * max: 200, + * units: "%", + * width: 10 + * } + */ + gauge_fullCircle: !1, + gauge_label_show: !0, + gauge_label_format: undefined, + gauge_min: 0, + gauge_max: 100, + gauge_startingAngle: -1 * Math.PI / 2, + gauge_label_extents: undefined, + gauge_units: undefined, + gauge_width: undefined, + gauge_expand: {}, + gauge_expand_duration: 50, + + /** + * Set donut options + * @name donut + * @memberOf Options + * @type {Object} + * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece. + * @property {Function} [donut.label.format] Set formatter for the label on each donut piece. + * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels. + * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position. + * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces. + * @property {Number} [donut.width] Set width of donut chart. + * @property {String} [donut.title=""] Set title of donut chart. Use `\n` character to enter line break. + * @property {Number} [donut.padAngle=0] Set padding between data. + * @example + * donut: { + * label: { + * show: false, + * format: function(value, ratio, id) { + * return d3.format("$")(value); + * }, + * threshold: 0.1, + * + * // set ratio callback. Should return ratio value + * ratio: function(d, radius, h) { + * ... + * return ratio; + * }, + * // or set ratio number + * ratio: 0.5 + * }, + * expand: false, + * width: 10, + * padAngle: 0.2, + * title: "Donut Title" + * + * // title with line break + * title: "Title1\nTitle2" + * } + */ + donut_label_show: !0, + donut_label_format: undefined, + donut_label_threshold: .05, + donut_label_ratio: undefined, + donut_width: undefined, + donut_title: "", + donut_expand: {}, + donut_expand_duration: 50, + donut_padAngle: 0, + + /** + * Set spline options + * @name spline + * @memberOf Options + * @type {Object} + * @property {String} [spline.interpolation.type=cardinal] + * @example + * spline: { + * interpolation: { + * type: "cardinal" + * } + * } + */ + spline_interpolation_type: "cardinal", + + /** + * Set radar options + * @name radar + * @memberOf Options + * @type {Object} + * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data. + * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line. + * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text. + * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn. + * @property {Number} [radar.level.depth=3] Set the level depth. + * @property {Boolean} [radar.level.show=true] Show or hide level. + * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value. + * @property {Boolean} [radar.level.text.show=true] Show or hide level text. + * @property {Number} [radar.size.ratio=0.87] Set size ratio. + * @example + * radar: { + * axis: { + * max: 50, + * line: { + * show: false + * }, + * text: { + * show: false + * } + * }, + * direction: { + * clockwise: true + * }, + * level: { + * show: false, + * text: { + * format: function(x) { + * return x + "%"; + * }, + * show: true + * } + * }, + * size: { + * ratio: 0.7 + * } + * } + */ + radar_axis_max: undefined, + radar_axis_line_show: !0, + radar_axis_text_show: !0, + radar_level_depth: 3, + radar_level_show: !0, + radar_level_text_format: function radar_level_text_format(x) { + return x % 1 === 0 ? x : x.toFixed(2); + }, + radar_level_text_show: !0, + radar_size_ratio: .87, + radar_direction_clockwise: !1, + + /** + * Show rectangles inside the chart.<br><br> + * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional. + * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class. + * @name regions + * @memberOf Options + * @type {Array} + * @default [] + * @example + * regions: [ + * { + * axis: "x", + * start: 1, + * end: 4, + * class: "region-1-4" + * } + * ] + */ + regions: [], + + /** + * Tooltip options + * @name tooltip + * @memberOf Options + * @type {Object} + * @property {Boolean} [tooltip.show=true] Show or hide tooltip.<br> + * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points. + * - **NOTE:** The overlapped data points will be displayed as grouped even if set false. + * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown. + * @property {String} [tooltip.linked.name=""] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name. + * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br> + * Specified function receives x of the data point to show. + * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br> + * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br> + * Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + * If undefined returned, the row of that value will be skipped. + * @property {Function} [tooltip.position] Set custom position for the tooltip.<br> + * This option can be used to modify the tooltip position by returning object that has top and left. + * @property {Function} [tooltip.contents] Set custom HTML for the tooltip.<br> + * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points. + * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization. + * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization. + * @property {Object} [tooltip.init.position={top: "0px",left: "50px"}] Set the position of tooltip at the initialization. + * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown. + * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden. + * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown + * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden. + * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br> + * **Available Values:** + * - `desc`: In descending data value order + * - `asc`: In ascending data value order + * - `null`: It keeps the data display order<br> + * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br> + * If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "") + * - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters) + * @example + * tooltip: { + * show: true, + * grouped: false, + * format: { + * title: function(x) { return "Data " + x; }, + * name: function(name, ratio, id, index) { return name; }, + * value: function(value, ratio, id, index) { return ratio; } + * }, + * position: function(data, width, height, element) { + * return {top: 0, left: 0} + * }, + * contents: function(d, defaultTitleFormat, defaultValueFormat, color) { + * return ... // formatted html as you want + * }, + * + * // sort tooltip data value display in ascending order + * order: "asc", + * + * // specifying sort function + * order: function(a, b) { + * // param data passed format + * {x: 5, value: 250, id: "data1", index: 5, name: "data1"} + * ... + * }, + * + * // show at the initialization + * init: { + * show: true, + * x: 2, + * position: { + * top: "150px", + * left: "250px" + * } + * }, + * + * // fires prior tooltip is shown + * onshow: function() { ...}, + * // fires prior tooltip is hidden + * onhide: function() { ... }, + * // fires after tooltip is shown + * onshown: function() { ... }, + * // fires after tooltip is hidden + * onhidden: function() { ... }, + * + * // Link any tooltips when multiple charts are on the screen where same x coordinates are available + * // Useful for timeseries correlation + * linked: true, + * + * // Specify name to interact those with the same name only. + * linked: { + * name: "some-group" + * } + * } + */ + tooltip_show: !0, + tooltip_grouped: !0, + tooltip_format_title: undefined, + tooltip_format_name: undefined, + tooltip_format_value: undefined, + tooltip_position: undefined, + tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) { + return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : ""; + }, + tooltip_init_show: !1, + tooltip_init_x: 0, + tooltip_init_position: { + top: "0px", + left: "50px" + }, + tooltip_linked: !1, + tooltip_linked_name: "", + tooltip_onshow: function tooltip_onshow() {}, + tooltip_onhide: function tooltip_onhide() {}, + tooltip_onshown: function tooltip_onshown() {}, + tooltip_onhidden: function tooltip_onhidden() {}, + tooltip_order: null, + + /** + * Set title options + * @name title + * @memberOf Options + * @type {Object} + * @property {String} [title.text] + * @property {Number} [title.padding.top=0] + * @property {Number} [title.padding.right=0] + * @property {Number} [title.padding.bottom=0] + * @property {Number} [title.padding.left=0] + * @property {String} [title.position=top-center] + * @example + * title: { + * text: "Title Text", + * padding: { + * top: 10, + * right: 10, + * bottom: 10, + * left: 10 + * }, + * position: "top-center" + * } + */ + title_text: undefined, + title_padding: { + top: 0, + right: 0, + bottom: 0, + left: 0 + }, + title_position: "top-center" + }; +}; + +exports.default = Options; +module.exports = exports["default"]; + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Scale = __webpack_require__(65), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getScale: function getScale(min, max, forTimeseries) { + return (forTimeseries ? (0, _d3Scale.scaleTime)() : (0, _d3Scale.scaleLinear)()).range([min, max]); + }, + + + /** + * Get x Axis scale function + * @param {Number} min + * @param {Number} max + * @param {Number} domain + * @param {Function} offset The offset getter to be sum + * @return {Function} scale + * @private + */ + getX: function getX(min, max, domain, offset) { + var $$ = this, + scale = $$.zoomScale || $$.getScale(min, max, $$.isTimeSeries()); + + + return $$.getCustomizedScale(domain ? scale.domain(domain) : scale, offset); + }, + getY: function getY(min, max, domain) { + var scale = this.getScale(min, max, this.isTimeSeriesY()); + + return domain && scale.domain(domain), scale; + }, + + + /** + * Get customized scale + * @param {d3.scaleLinear|d3.scaleTime} scaleValue + * @param {Function} offsetValue Offset getter to be sum + * @return {} scale + * @private + */ + getCustomizedScale: function getCustomizedScale(scaleValue, offsetValue) { + var $$ = this, + offset = offsetValue || function () { + return $$.xAxis.tickOffset(); + }, + scale = function (d, raw) { + var v = scaleValue(d) + offset(); + + return raw ? v : Math.ceil(v); + }; + + // copy original scale methods + for (var key in scaleValue) scale[key] = scaleValue[key]; + + return scale.orgDomain = function () { + return scaleValue.domain(); + }, scale.orgScale = function () { + return scaleValue; + }, $$.isCategorized() && (scale.domain = function (domainValue) { + var domain = domainValue; + + return arguments.length ? (scaleValue.domain(domain), scale) : (domain = this.orgDomain(), [domain[0], domain[1] + 1]); + }), scale; + }, + getYScale: function getYScale(id) { + return this.axis.getId(id) === "y2" ? this.y2 : this.y; + }, + getSubYScale: function getSubYScale(id) { + return this.axis.getId(id) === "y2" ? this.subY2 : this.subY; + }, + + + /** + * Update scale + * @private + * @param {Boolean} withoutTransitionAtInit - param is given at the init rendering + */ + updateScales: function updateScales(withoutTransitionAtInit) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isInit = !$$.x; + + + // update edges + $$.xMin = isRotated ? 1 : 0, $$.xMax = isRotated ? $$.height : $$.width, $$.yMin = isRotated ? 0 : $$.height, $$.yMax = isRotated ? $$.width : 1, $$.subXMin = $$.xMin, $$.subXMax = $$.xMax, $$.subYMin = isRotated ? 0 : $$.height2, $$.subYMax = isRotated ? $$.width2 : 1, $$.x = $$.getX($$.xMin, $$.xMax, isInit ? undefined : $$.x.orgDomain(), function () { + return $$.xAxis.tickOffset(); + }), $$.y = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y_default : $$.y.domain()), $$.y2 = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y2_default : $$.y2.domain()), $$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, function (d) { + return d % 1 ? 0 : $$.subXAxis.tickOffset(); + }), $$.subY = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y_default : $$.subY.domain()), $$.subY2 = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y2_default : $$.subY2.domain()), $$.xAxisTickFormat = $$.axis.getXAxisTickFormat(), $$.xAxisTickValues = $$.axis.getXAxisTickValues(), $$.yAxisTickValues = $$.axis.getYAxisTickValues(), $$.y2AxisTickValues = $$.axis.getY2AxisTickValues(), $$.xAxis = $$.axis.getXAxis("x", $$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer, withoutTransitionAtInit), $$.subXAxis = $$.axis.getXAxis("subx", $$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer), $$.yAxis = $$.axis.getYAxis("y", $$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer), $$.y2Axis = $$.axis.getYAxis("y2", $$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer), $$.updateArc && $$.updateArc(); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(66), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// selection +(0, _util.extend)(_ChartInternal2.default.prototype, { + getYDomainMinMax: function getYDomainMinMax(targets, type) { + var $$ = this, + config = $$.config, + isMin = type === "min", + dataGroups = config.data_groups, + ids = $$.mapToIds(targets), + ys = $$.getValuesAsIdKeyed(targets), + f = isMin ? _d3Array.min : _d3Array.max; + + + return dataGroups.length > 0 && function () { + + for (var hasValue = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets), baseId = void 0, idsInGroup = void 0, j = 0; idsInGroup = dataGroups[j]; j++) if (idsInGroup = idsInGroup.filter(function (v) { + return ids.indexOf(v) >= 0; + }), idsInGroup.length !== 0) { + + // Consider values + if (baseId = idsInGroup[0], hasValue && ys[baseId]) { + var setter = isMin ? function (v, i) { + ys[baseId][i] = v < 0 ? v : 0; + } : function (v, i) { + ys[baseId][i] = v > 0 ? v : 0; + }; + + ys[baseId].forEach(setter); + } + + // Compute min + for (var id, _ret2, _loop = function (k, id) { + return ys[id] ? void ys[id].forEach(function (v, i) { + var val = +v, + meetCondition = isMin ? val > 0 : val < 0; + $$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasValue && meetCondition) && (ys[baseId][i] += val); + }) : "continue"; + }, k = 1; id = idsInGroup[k]; k++) _ret2 = _loop(k, id), _ret2 === "continue"; + } + }(), f(Object.keys(ys).map(function (key) { + return f(ys[key]); + })); + }, + getYDomainMin: function getYDomainMin(targets) { + return this.getYDomainMinMax(targets, "min"); + }, + getYDomainMax: function getYDomainMax(targets) { + return this.getYDomainMinMax(targets, "max"); + }, + getYDomain: function getYDomain(targets, axisId, xDomain) { + var $$ = this, + config = $$.config, + targetsByAxisId = targets.filter(function (t) { + return $$.axis.getId(t.id) === axisId; + }), + yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId, + yMin = axisId === "y2" ? config.axis_y2_min : config.axis_y_min, + yMax = axisId === "y2" ? config.axis_y2_max : config.axis_y_max, + yDomainMin = $$.getYDomainMin(yTargets), + yDomainMax = $$.getYDomainMax(yTargets), + center = axisId === "y2" ? config.axis_y2_center : config.axis_y_center, + isZeroBased = $$.hasType("bar", yTargets) && config.bar_zerobased || $$.hasType("area", yTargets) && config.area_zerobased, + isInverted = axisId === "y2" ? config.axis_y2_inverted : config.axis_y_inverted, + showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated, + showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated, + lengths = void 0; + + // MEMO: avoid inverting domain unexpectedly + + if (yDomainMin = (0, _util.isValue)(yMin) ? yMin : (0, _util.isValue)(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin, yDomainMax = (0, _util.isValue)(yMax) ? yMax : (0, _util.isValue)(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax, yTargets.length === 0) // use current domain if target of axisId is none + return axisId === "y2" ? $$.y2.domain() : $$.y.domain(); + + isNaN(yDomainMin) && (yDomainMin = 0), isNaN(yDomainMax) && (yDomainMax = yDomainMin), yDomainMin === yDomainMax && (yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0); + var isAllPositive = yDomainMin >= 0 && yDomainMax >= 0, + isAllNegative = yDomainMin <= 0 && yDomainMax <= 0; + ((0, _util.isValue)(yMin) && isAllPositive || (0, _util.isValue)(yMax) && isAllNegative) && (isZeroBased = !1), isZeroBased && (isAllPositive && (yDomainMin = 0), isAllNegative && (yDomainMax = 0)); + var domainLength = Math.abs(yDomainMax - yDomainMin), + paddingTop = domainLength * .1, + paddingBottom = domainLength * .1; + + + if ((0, _util.isDefined)(center)) { + var yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax)); + + yDomainMax = center + yDomainAbs, yDomainMin = center - yDomainAbs; + } + + // add padding for data label + if (showHorizontalDataLabel) { + lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "width"); + var diff = (0, _util.diffDomain)($$.y.range()), + ratio = [lengths[0] / diff, lengths[1] / diff]; + paddingTop += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1])), paddingBottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1])); + } else showVerticalDataLabel && (lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "height"), paddingTop += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength), paddingBottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength)); + + axisId === "y" && (0, _util.notEmpty)(config.axis_y_padding) && (paddingTop = $$.axis.getPadding(config.axis_y_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y_padding, "bottom", paddingBottom, domainLength)), axisId === "y2" && (0, _util.notEmpty)(config.axis_y2_padding) && (paddingTop = $$.axis.getPadding(config.axis_y2_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y2_padding, "bottom", paddingBottom, domainLength)), isZeroBased && (isAllPositive && (paddingBottom = yDomainMin), isAllNegative && (paddingTop = -yDomainMax)); + + + var domain = [yDomainMin - paddingBottom, yDomainMax + paddingTop]; + + return isInverted ? domain.reverse() : domain; + }, + getXDomainMinMax: function getXDomainMinMax(targets, type) { + var $$ = this, + value = $$.config["axis_x_" + type], + f = type === "min" ? _d3Array.min : _d3Array.max; + + + return (0, _util.isDefined)(value) ? $$.isTimeSeries() ? $$.parseDate(value) : value : f(targets, function (t) { + return f(t.values, function (v) { + return v.x; + }); + }); + }, + getXDomainMin: function getXDomainMin(targets) { + return this.getXDomainMinMax(targets, "min"); + }, + getXDomainMax: function getXDomainMax(targets) { + return this.getXDomainMinMax(targets, "max"); + }, + getXDomainPadding: function getXDomainPadding(domain) { + var $$ = this, + config = $$.config, + diff = domain[1] - domain[0], + xPadding = config.axis_x_padding, + maxDataCount = void 0, + padding = void 0; + $$.isCategorized() ? padding = 0 : $$.hasType("bar") ? (maxDataCount = $$.getMaxDataCount(), padding = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5) : padding = diff * .01; + var left = padding, + right = padding; + + + return (0, _util.isObject)(xPadding) && (0, _util.notEmpty)(xPadding) ? (left = (0, _util.isValue)(xPadding.left) ? xPadding.left : padding, right = (0, _util.isValue)(xPadding.right) ? xPadding.right : padding) : (0, _util.isNumber)(config.axis_x_padding) && (left = xPadding, right = xPadding), { left: left, right: right }; + }, + getXDomain: function getXDomain(targets) { + var $$ = this, + xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)], + firstX = xDomain[0], + lastX = xDomain[1], + padding = $$.getXDomainPadding(xDomain), + min = 0, + max = 0; + // show center of x domain if min and max are the same + + return firstX - lastX !== 0 || $$.isCategorized() || ($$.isTimeSeries() ? (firstX = new Date(firstX.getTime() * .5), lastX = new Date(lastX.getTime() * 1.5)) : (firstX = firstX === 0 ? 1 : firstX * .5, lastX = lastX === 0 ? -1 : lastX * 1.5)), (firstX || firstX === 0) && (min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left), (lastX || lastX === 0) && (max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right), [min, max]; + }, + updateXDomain: function updateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) { + var $$ = this, + config = $$.config, + zoomEnabled = config.zoom_enabled; + + + if (withUpdateOrgXDomain && ($$.x.domain(domain || (0, _d3Array.extent)($$.getXDomain(targets))), $$.orgXDomain = $$.x.domain(), zoomEnabled && $$.zoom.updateScaleExtent(), $$.subX.domain($$.x.domain()), $$.brush && $$.brush.scale($$.subX)), withUpdateXDomain) { + var domainValue = domain || !$$.brush || (0, _util.brushEmpty)($$) ? $$.orgXDomain : (0, _util.getBrushSelection)($$).map($$.subX.invert); + + $$.x.domain(domainValue), zoomEnabled && $$.zoom.updateScaleExtent(); + } + + // Trim domain when too big by zoom mousemove event + + + return withTrim && $$.x.domain($$.trimXDomain($$.x.orgDomain())), $$.x.domain(); + }, + trimXDomain: function trimXDomain(domain) { + var zoomDomain = this.getZoomDomain(), + min = zoomDomain[0], + max = zoomDomain[1]; + + + return domain[0] <= min && (domain[1] = +domain[1] + (min - domain[0]), domain[0] = min), max <= domain[1] && (domain[0] = +domain[0] - (domain[1] - max), domain[1] = max), domain; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(66), + _d3Collection = __webpack_require__(71), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + isX: function isX(key) { + var $$ = this, + config = $$.config, + dataKey = config.data_x && key === config.data_x, + existValue = (0, _util.notEmpty)(config.data_xs) && (0, _util.hasValue)(config.data_xs, key); + + + return dataKey || existValue; + }, + isNotX: function isNotX(key) { + return !this.isX(key); + }, + getXKey: function getXKey(id) { + var $$ = this, + config = $$.config; + + + return config.data_x ? config.data_x : (0, _util.notEmpty)(config.data_xs) ? config.data_xs[id] : null; + }, + getXValuesOfXKey: function getXValuesOfXKey(key, targets) { + var $$ = this, + ids = targets && (0, _util.notEmpty)(targets) ? $$.mapToIds(targets) : [], + xValues = void 0; + + + return ids.forEach(function (id) { + $$.getXKey(id) === key && (xValues = $$.data.xs[id]); + }), xValues; + }, + getIndexByX: function getIndexByX(x) { + var $$ = this, + data = $$.filterByX($$.data.targets, x); + + + return data.length ? data[0].index : null; + }, + getXValue: function getXValue(id, i) { + var $$ = this; + + return id in $$.data.xs && $$.data.xs[id] && (0, _util.isValue)($$.data.xs[id][i]) ? $$.data.xs[id][i] : i; + }, + getOtherTargetXs: function getOtherTargetXs() { + var $$ = this, + idsForX = Object.keys($$.data.xs); + + + return idsForX.length ? $$.data.xs[idsForX[0]] : null; + }, + getOtherTargetX: function getOtherTargetX(index) { + var xs = this.getOtherTargetXs(); + + return xs && index < xs.length ? xs[index] : null; + }, + addXs: function addXs(xs) { + var $$ = this; + + Object.keys(xs).forEach(function (id) { + $$.config.data_xs[id] = xs[id]; + }); + }, + hasMultipleX: function hasMultipleX(xs) { + // https://github.com/d3/d3-collection + return (0, _d3Collection.set)(Object.keys(xs).map(function (id) { + return xs[id]; + })).size() > 1; + }, + isMultipleX: function isMultipleX() { + return (0, _util.notEmpty)(this.config.data_xs) || !this.config.data_xSort || this.hasType("bubble") || this.hasType("scatter"); + }, + addName: function addName(data) { + var $$ = this, + name = void 0; + + + return data && (name = $$.config.data_names[data.id], data.name = name === undefined ? data.id : name), data; + }, + getAllValuesOnIndex: function getAllValuesOnIndex(index) { + var $$ = this; + + return $$.filterTargetsToShow($$.data.targets).map(function (t) { + return $$.addName($$.getValueOnIndex(t.values, index)); + }); + }, + getValueOnIndex: function getValueOnIndex(values, index) { + var valueOnIndex = values.filter(function (v) { + return v.index === index; + }); + + return valueOnIndex.length ? valueOnIndex[0] : null; + }, + updateTargetX: function updateTargetX(targets, x) { + var $$ = this; + + targets.forEach(function (t) { + t.values.forEach(function (v, i) { + v.x = $$.generateTargetX(x[i], t.id, i); + }), $$.data.xs[t.id] = x; + }); + }, + updateTargetXs: function updateTargetXs(targets, xs) { + var $$ = this; + + targets.forEach(function (t) { + xs[t.id] && $$.updateTargetX([t], xs[t.id]); + }); + }, + generateTargetX: function generateTargetX(rawX, id, index) { + var $$ = this, + x = index; + + + return $$.isTimeSeries() ? x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index)) : $$.isCustomX() && !$$.isCategorized() && (x = (0, _util.isValue)(rawX) ? +rawX : $$.getXValue(id, index)), x; + }, + cloneTarget: function cloneTarget(target) { + return { + id: target.id, + id_org: target.id_org, + values: target.values.map(function (d) { + return { x: d.x, value: d.value, id: d.id }; + }) + }; + }, + updateXs: function updateXs() { + var $$ = this; + + $$.data.targets.length && ($$.xs = [], $$.data.targets[0].values.forEach(function (v) { + $$.xs[v.index] = v.x; + })); + }, + getPrevX: function getPrevX(i) { + var x = this.xs[i - 1]; + + return (0, _util.isDefined)(x) ? x : null; + }, + getNextX: function getNextX(i) { + var x = this.xs[i + 1]; + + return (0, _util.isDefined)(x) ? x : null; + }, + + + /** + * Get base value isAreaRangeType + * @param data Data object + * @return {Number} + * @private + */ + getBaseValue: function getBaseValue(data) { + var $$ = this, + value = data.value; + + // In case of area-range, data is given as: [low, mid, high] or {low, mid, high} + // will take the 'mid' as the base value + + return value && $$.isAreaRangeType(data) && (value = $$.getAreaRangeData(data, "mid")), value; + }, + + + /** + * Get min/max value from the data + * @private + * @param {Array} data array data to be evaluated + * @return {{min: {Number}, max: {Number}}} + */ + getMinMaxValue: function getMinMaxValue(data) { + var getBaseValue = this.getBaseValue.bind(this), + min = void 0, + max = void 0; + + + return (data || this.data.targets.map(function (t) { + return t.values; + })).forEach(function (v) { + min = (0, _d3Array.min)([min, (0, _d3Array.min)(v, getBaseValue)]), max = (0, _d3Array.max)([max, (0, _d3Array.max)(v, getBaseValue)]); + }), { min: min, max: max }; + }, + + + /** + * Get the min/max data + * @private + * @return {{min: Array, max: Array}} + */ + getMinMaxData: function getMinMaxData() { + var $$ = this, + minMaxData = $$.getCache("$minMaxData"); + + + if (!minMaxData) { + var data = $$.data.targets.map(function (t) { + return t.values; + }), + minMax = $$.getMinMaxValue(data), + min = [], + max = []; + data.forEach(function (v) { + var minData = $$.getFilteredDataByValue(v, minMax.min), + maxData = $$.getFilteredDataByValue(v, minMax.max); + minData.length && (min = min.concat(minData)), maxData.length && (max = max.concat(maxData)); + }), $$.addCache("$minMaxData", minMaxData = { min: min, max: max }); + } + + return minMaxData; + }, + + + /** + * Get total data sum + * @private + * @return {Number} + */ + getTotalDataSum: function getTotalDataSum() { + var $$ = this, + totalDataSum = $$.getCache("$totalDataSum"); + + + if (!totalDataSum) { + var total = 0; + + $$.data.targets.map(function (t) { + return t.values; + }).forEach(function (v) { + total += (0, _d3Array.sum)(v, function (t) { + return t.value; + }); + }), $$.addCache("$totalDataSum", totalDataSum = total); + } + + return totalDataSum; + }, + + + /** + * Get filtered data by value + * @param {Object} data + * @param {Number} value + * @return {Array} filtered array data + * @private + */ + getFilteredDataByValue: function getFilteredDataByValue(data, value) { + var _this = this; + + return data.filter(function (t) { + return _this.getBaseValue(t) === value; + }); + }, + + + /** + * Return the max length of the data + * @return {Number} max data length + * @private + */ + getMaxDataCount: function getMaxDataCount() { + return (0, _d3Array.max)(this.data.targets, function (t) { + return t.values.length; + }); + }, + getMaxDataCountTarget: function getMaxDataCountTarget(targets) { + var length = targets.length, + max = 0, + maxTarget = void 0; + + + return length > 1 ? targets.forEach(function (t) { + t.values.length > max && (maxTarget = t, max = t.values.length); + }) : maxTarget = length ? targets[0] : null, maxTarget; + }, + mapToIds: function mapToIds(targets) { + return targets.map(function (d) { + return d.id; + }); + }, + mapToTargetIds: function mapToTargetIds(ids) { + var $$ = this; + + return ids ? (0, _util.isArray)(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets); + }, + hasTarget: function hasTarget(targets, id) { + var ids = this.mapToIds(targets); + + for (var val, i = 0; val = ids[i]; i++) if (val === id) return !0; + + return !1; + }, + isTargetToShow: function isTargetToShow(targetId) { + return this.hiddenTargetIds.indexOf(targetId) < 0; + }, + isLegendToShow: function isLegendToShow(targetId) { + return this.hiddenLegendIds.indexOf(targetId) < 0; + }, + filterTargetsToShow: function filterTargetsToShow(targets) { + var $$ = this; + + return targets.filter(function (t) { + return $$.isTargetToShow(t.id); + }); + }, + mapTargetsToUniqueXs: function mapTargetsToUniqueXs(targets) { + var $$ = this, + xs = (0, _d3Collection.set)((0, _d3Array.merge)(targets.map(function (t) { + return t.values.map(function (v) { + return +v.x; + }); + }))).values(); + + + return xs = $$.isTimeSeries() ? xs.map(function (x) { + return new Date(+x); + }) : xs.map(function (x) { + return +x; + }), xs.sort(function (a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; + }); + }, + addHiddenTargetIds: function addHiddenTargetIds(targetIds) { + this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds); + }, + removeHiddenTargetIds: function removeHiddenTargetIds(targetIds) { + this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + addHiddenLegendIds: function addHiddenLegendIds(targetIds) { + this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds); + }, + removeHiddenLegendIds: function removeHiddenLegendIds(targetIds) { + this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + getValuesAsIdKeyed: function getValuesAsIdKeyed(targets) { + var ys = {}; + + return targets.forEach(function (t) { + var data = []; + + t.values.forEach(function (v) { + var value = v.value; + + (0, _util.isArray)(value) ? data.push.apply(data, value) : (0, _util.isObject)(value) && "high" in value ? data.push.apply(data, Object.values(value)) : data.push(value); + }), ys[t.id] = data; + }), ys; + }, + checkValueInTargets: function checkValueInTargets(targets, checker) { + var ids = Object.keys(targets), + values = void 0; + + + for (var i = 0; i < ids.length; i++) { + values = targets[ids[i]].values; + + + for (var j = 0; j < values.length; j++) if (checker(values[j].value)) return !0; + } + + return !1; + }, + hasNegativeValueInTargets: function hasNegativeValueInTargets(targets) { + return this.checkValueInTargets(targets, function (v) { + return v < 0; + }); + }, + hasPositiveValueInTargets: function hasPositiveValueInTargets(targets) { + return this.checkValueInTargets(targets, function (v) { + return v > 0; + }); + }, + _checkOrder: function _checkOrder(type) { + var config = this.config; + + return (0, _util.isString)(config.data_order) && config.data_order.toLowerCase() === type; + }, + isOrderDesc: function isOrderDesc() { + return this._checkOrder("desc"); + }, + isOrderAsc: function isOrderAsc() { + return this._checkOrder("asc"); + }, + + + /** + * Sort targets data + * @param {Array} targetsValue + * @return {Array} + * @private + */ + orderTargets: function orderTargets(targetsValue) { + var $$ = this, + config = $$.config, + targets = [].concat(targetsValue), + orderAsc = $$.isOrderAsc(), + orderDesc = $$.isOrderDesc(); + // TODO: accept name array for order + + return orderAsc || orderDesc ? targets.sort(function (t1, t2) { + var reducer = function (p, c) { + return p + Math.abs(c.value); + }, + t1Sum = t1.values.reduce(reducer, 0), + t2Sum = t2.values.reduce(reducer, 0); + + return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum; + }) : (0, _util.isFunction)(config.data_order) && targets.sort(config.data_order), targets; + }, + filterByX: function filterByX(targets, x) { + return (0, _d3Array.merge)(targets.map(function (t) { + return t.values; + })).filter(function (v) { + return v.x - x === 0; + }); + }, + filterRemoveNull: function filterRemoveNull(data) { + var _this2 = this; + + return data.filter(function (d) { + return (0, _util.isValue)(_this2.getBaseValue(d)); + }); + }, + filterByXDomain: function filterByXDomain(targets, xDomain) { + return targets.map(function (t) { + return { + id: t.id, + id_org: t.id_org, + values: t.values.filter(function (v) { + return xDomain[0] <= v.x && v.x <= xDomain[1]; + }) + }; + }); + }, + hasDataLabel: function hasDataLabel() { + var dataLabels = this.config.data_labels; + + return (0, _util.isBoolean)(dataLabels) && dataLabels || (0, _util.isObjectType)(dataLabels) && (0, _util.notEmpty)(dataLabels); + }, + getDataLabelLength: function getDataLabelLength(min, max, key) { + var $$ = this, + lengths = [0, 0]; + + + return $$.selectChart.select("svg").selectAll(".dummy").data([min, max]).enter().append("text").text(function (d) { + return $$.dataLabelFormat(d.id)(d); + }).each(function (d, i) { + lengths[i] = this.getBoundingClientRect()[key] * 1.3; + }).remove(), lengths; + }, + isNoneArc: function isNoneArc(d) { + return this.hasTarget(this.data.targets, d.id); + }, + isArc: function isArc(d) { + return "data" in d && this.hasTarget(this.data.targets, d.data.id); + }, + findSameXOfValues: function findSameXOfValues(values, index) { + var targetX = values[index].x, + sames = [], + i = void 0; + + + for (i = index - 1; i >= 0 && !(targetX !== values[i].x); i--) sames.push(values[i]); + + for (i = index; i < values.length && !(targetX !== values[i].x); i++) sames.push(values[i]); + + return sames; + }, + findClosestFromTargets: function findClosestFromTargets(targets, pos) { + var $$ = this, + candidates = targets.map(function (target) { + return $$.findClosest(target.values, pos); + }); + // map to array of closest points of each target + + // decide closest point and return + return $$.findClosest(candidates, pos); + }, + findClosest: function findClosest(values, pos) { + var $$ = this, + minDist = $$.config.point_sensitivity, + closest = void 0; + + // find mouseovering bar + + return values.filter(function (v) { + return v && $$.isBarType(v.id); + }).forEach(function (v) { + var shape = $$.main.select("." + _classes2.default.bars + $$.getTargetSelectorSuffix(v.id) + " ." + _classes2.default.bar + "-" + v.index).node(); + + !closest && $$.isWithinBar(shape) && (closest = v); + }), values.filter(function (v) { + return v && !$$.isBarType(v.id); + }).forEach(function (v) { + var d = $$.dist(v, pos); + + d < minDist && (minDist = d, closest = v); + }), closest; + }, + dist: function dist(data, pos) { + var $$ = this, + isRotated = $$.config.axis_rotated, + xIndex = isRotated ? 1 : 0, + yIndex = isRotated ? 0 : 1, + y = $$.circleY(data, data.index), + x = $$.x(data.x); + + + return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2)); + }, + + + /** + * Convert data for step type + * @param {Array} values Object data values + * @return {Array} + * @private + */ + convertValuesToStep: function convertValuesToStep(values) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + stepType = config.line_step_type, + isCategorized = $$.isCategorized(), + converted = (0, _util.isArray)(values) ? values.concat() : [values]; + + + if (!isRotated && !isCategorized) return values; + + // insert & append cloning first/last value to be fully rendered covering on each gap sides + var id = converted[0].id, + x = converted[0].x - 1, + value = converted[0].value; + + // insert + + return isCategorized && converted.unshift({ x: x, value: value, id: id }), stepType === "step-after" && converted.unshift({ x: x - 1, value: value, id: id }), x = converted.length, value = converted[x - 1].value, isCategorized && converted.push({ x: x, value: value, id: id }), stepType === "step-before" && converted.push({ x: x + 1, value: value, id: id }), converted; + }, + convertValuesToRange: function convertValuesToRange(values) { + var converted = (0, _util.isArray)(values) ? values.concat() : [values], + ranges = []; + + + return converted.forEach(function (range) { + var x = range.x, + id = range.id; + ranges.push({ + x: x, + id: id, + value: range.value[0] + }), ranges.push({ + x: x, + id: id, + value: range.value[2] + }); + }), ranges; + }, + updateDataAttributes: function updateDataAttributes(name, attrs) { + var $$ = this, + config = $$.config, + current = config["data_" + name]; + return (0, _util.isUndefined)(attrs) ? current : (Object.keys(attrs).forEach(function (id) { + current[id] = attrs[id]; + }), $$.redraw({ withLegend: !0 }), current); + }, + getAreaRangeData: function getAreaRangeData(d, type) { + var value = d.value; + + if ((0, _util.isArray)(value)) { + var index = ["high", "mid", "low"].indexOf(type); + + return index === -1 ? null : value[index]; + } + + return value[type]; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 14 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Dsv = __webpack_require__(77), + _d3Collection = __webpack_require__(71), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + convertUrlToData: function convertUrlToData(url) { + var _this = this, + mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "csv", + headers = arguments[2], + keys = arguments[3], + done = arguments[4], + req = new XMLHttpRequest(); + + if (headers) for (var _iterator = Object.keys(headers), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + if (_i = _iterator.next(), _i.done) break; + _ref = _i.value; + } + + var header = _ref; + req.setRequestHeader(header, headers[header]); + } + + req.open("GET", url), req.onreadystatechange = function () { + if (req.readyState === 4) if (req.status === 200) { + var response = req.responseText; + + response && done.call(_this, _this["convert" + (0, _util.capitalize)(mimeType) + "ToData"](mimeType === "json" ? JSON.parse(response) : response, keys)); + } else throw new Error(url + ": Something went wrong loading!"); + }, req.send(); + }, + _convertCsvTsvToData: function _convertCsvTsvToData(parser, xsv) { + var rows = parser.rows(xsv), + d = void 0; + + + return rows.length === 1 ? (d = [{}], rows[0].forEach(function (id) { + d[0][id] = null; + })) : d = parser.parse(xsv), d; + }, + convertCsvToData: function convertCsvToData(xsv) { + return this._convertCsvTsvToData({ + rows: _d3Dsv.csvParseRows, + parse: _d3Dsv.csvParse + }, xsv); + }, + convertTsvToData: function convertTsvToData(tsv) { + return this._convertCsvTsvToData({ + rows: _d3Dsv.tsvParseRows, + parse: _d3Dsv.tsvParse + }, tsv); + }, + convertJsonToData: function convertJsonToData(json, keysParam) { + var _this2 = this, + config = this.config, + newRows = [], + targetKeys = void 0, + data = void 0; + + if ((0, _util.isArray)(json)) { + var keys = keysParam || config.data_keys; + + keys.x ? (targetKeys = keys.value.concat(keys.x), config.data_x = keys.x) : targetKeys = keys.value, newRows.push(targetKeys), json.forEach(function (o) { + var newRow = []; + + for (var _iterator2 = targetKeys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + if (_i2 = _iterator2.next(), _i2.done) break; + _ref2 = _i2.value; + } + + var key = _ref2; + + // convert undefined to null because undefined data will be removed in convertDataToTargets() + var v = _this2.findValueInJson(o, key); + + (0, _util.isUndefined)(v) && (v = null), newRow.push(v); + } + + newRows.push(newRow); + }), data = this.convertRowsToData(newRows); + } else Object.keys(json).forEach(function (key) { + var tmp = json[key].concat(); + + tmp.unshift(key), newRows.push(tmp); + }), data = this.convertColumnsToData(newRows); + + return data; + }, + findValueInJson: function findValueInJson(object, path) { + if (object[path] !== undefined) return object[path]; + + var convertedPath = path.replace(/\[(\w+)\]/g, ".$1"), + pathArray = convertedPath.replace(/^\./, "").split("."), + target = object; // convert indexes to properties (replace [] with .) + // strip a leading dot + + for (var _iterator3 = pathArray, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + if (_i3 = _iterator3.next(), _i3.done) break; + _ref3 = _i3.value; + } + + var k = _ref3; + + if (k in target) target = target[k];else { + target = undefined; + + break; + } + } + + return target; + }, + convertRowsToData: function convertRowsToData(rows) { + var keys = rows[0], + newRows = []; + + + for (var i = 1, len1 = rows.length; i < len1; i++) { + var newRow = {}; + + for (var j = 0, len2 = rows[i].length; j < len2; j++) { + if ((0, _util.isUndefined)(rows[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!"); + + newRow[keys[j]] = rows[i][j]; + } + + newRows.push(newRow); + } + + return newRows; + }, + convertColumnsToData: function convertColumnsToData(columns) { + var newRows = []; + + for (var i = 0, len1 = columns.length; i < len1; i++) { + var key = columns[i][0]; + + for (var j = 1, len2 = columns[i].length; j < len2; j++) { + + if ((0, _util.isUndefined)(newRows[j - 1]) && (newRows[j - 1] = {}), (0, _util.isUndefined)(columns[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!"); + + newRows[j - 1][key] = columns[i][j]; + } + } + + return newRows; + }, + convertDataToTargets: function convertDataToTargets(data, appendXs) { + var _this3 = this, + $$ = this, + config = $$.config, + ids = (0, _d3Collection.keys)(data[0]).filter($$.isNotX, $$), + xs = (0, _d3Collection.keys)(data[0]).filter($$.isX, $$), + xsData = void 0; + + ids.forEach(function (id) { + var xKey = _this3.getXKey(id); + + _this3.isCustomX() || _this3.isTimeSeries() ? xs.indexOf(xKey) >= 0 ? xsData = (appendXs && $$.data.xs[id] || []).concat(data.map(function (d) { + return d[xKey]; + }).filter(_util.isValue).map(function (rawX, i) { + return $$.generateTargetX(rawX, id, i); + })) : config.data_x ? xsData = _this3.getOtherTargetXs() : (0, _util.notEmpty)(config.data_xs) && (xsData = $$.getXValuesOfXKey(xKey, $$.data.targets)) : xsData = data.map(function (d, i) { + return i; + }), xsData && (_this3.data.xs[id] = xsData); + }), ids.forEach(function (id) { + if (!xsData) throw new Error("x is not defined for id = \"" + id + "\"."); + }); + + + // convert to target + var targets = ids.map(function (id, index) { + var convertedId = config.data_idConverter(id), + xKey = $$.getXKey(id), + isCategorized = $$.isCustomX() && $$.isCategorized(), + hasCategory = isCategorized && data.map(function (v) { + return v.x; + }).every(function (v) { + return config.axis_x_categories.indexOf(v) > -1; + }); + + + return { + id: convertedId, + id_org: id, + values: data.map(function (d, i) { + var rawX = d[xKey], + value = d[id], + x = void 0; + + + return value = value === null || isNaN(value) ? (0, _util.isArray)(value) || (0, _util.isObject)(value) && value.high ? value : null : +d[id], isCategorized && index === 0 && !(0, _util.isUndefined)(rawX) ? (!hasCategory && index === 0 && i === 0 && (config.axis_x_categories = []), x = config.axis_x_categories.indexOf(rawX), x === -1 && (x = config.axis_x_categories.length, config.axis_x_categories.push(rawX))) : x = $$.generateTargetX(rawX, id, i), ((0, _util.isUndefined)(d[id]) || $$.data.xs[id].length <= i) && (x = undefined), { x: x, value: value, id: convertedId }; + }).filter(function (v) { + return (0, _util.isDefined)(v.x); + }) + }; + }); + + // finish targets + + + return targets.forEach(function (t) { + config.data_xSort && (t.values = t.values.sort(function (v1, v2) { + var x1 = v1.x || v1.x === 0 ? v1.x : Infinity, + x2 = v2.x || v2.x === 0 ? v2.x : Infinity; + + + return x1 - x2; + })), t.values.forEach(function (v, i) { + var index = $$.data.targets ? $$.getIndexByX(v.x) : null; + + v.index = index === null ? i : index; + }), $$.data.xs[t.id].sort(function (v1, v2) { + return v1 - v2; + }); + }), $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets), $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets), config.data_type && $$.setTargetType($$.mapToIds(targets).filter(function (id) { + return !(id in config.data_types); + }), config.data_type), targets.forEach(function (d) { + return $$.addCache(d.id_org, d, !0); + }), targets; + } +}); + +/***/ }), +/* 15 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + load: function load(rawTargets, args) { + var $$ = this, + targets = rawTargets; + targets && (args.filter && (targets = targets.filter(args.filter)), (args.type || args.types) && targets.forEach(function (t) { + var type = args.types && args.types[t.id] || args.type; + + $$.setTargetType(t.id, type); + }), $$.data.targets.forEach(function (d) { + for (var i = 0; i < targets.length; i++) if (d.id === targets[i].id) { + d.values = targets[i].values, targets.splice(i, 1); + + break; + } + }), $$.data.targets = $$.data.targets.concat(targets)), $$.updateTargets($$.data.targets), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }), args.done && args.done(); + }, + loadFromArgs: function loadFromArgs(args) { + var $$ = this, + data = void 0; + + + // reset internally cached data + $$.resetCache(), args.data ? data = args.data : args.url ? $$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, function (d) { + $$.load($$.convertDataToTargets(d), args); + }) : args.json ? data = $$.convertJsonToData(args.json, args.keys) : args.rows ? data = $$.convertRowsToData(args.rows) : args.columns && (data = $$.convertColumnsToData(args.columns)), $$.load(data ? $$.convertDataToTargets(data) : null, args); + }, + unload: function unload(rawTargetIds, customDoneCb) { + var $$ = this, + done = customDoneCb, + targetIds = rawTargetIds; + + // reset internally cached data + + // If no target, call done and return + return $$.resetCache(), done || (done = function () {}), targetIds = targetIds.filter(function (id) { + return $$.hasTarget($$.data.targets, id); + }), targetIds && targetIds.length !== 0 ? void ($$.svg.selectAll(targetIds.map(function (id) { + return $$.selectorTarget(id); + })).transition().style("opacity", "0").remove().call($$.endall, done), targetIds.forEach(function (id) { + $$.withoutFadeIn[id] = !1, $$.legend && $$.legend.selectAll("." + _classes2.default.legendItem + $$.getTargetSelectorSuffix(id)).remove(), $$.data.targets = $$.data.targets.filter(function (t) { + return t.id !== id; + }); + })) : void done(); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 16 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Category Name + * @private + * @param {Number} index + * @returns {String} gategory Name + */ + categoryName: function categoryName(i) { + var config = this.config; + + return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i; + } +}); + +/***/ }), +/* 17 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Drag = __webpack_require__(72), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the area that detects the event. + * Add a container for the zone that detects the event. + * @private + */ + initEventRect: function initEventRect() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.eventRects).style("fill-opacity", "0"); + }, + + + /** + * Redraws the area that detects the event. + * @private + */ + redrawEventRect: function redrawEventRect() { + var $$ = this, + config = $$.config, + zoomEnabled = config.zoom_enabled, + isMultipleX = $$.isMultipleX(), + eventRectUpdate = void 0, + eventRects = $$.main.select("." + _classes2.default.eventRects).style("cursor", zoomEnabled && (zoomEnabled === !0 || zoomEnabled.type === "wheel") ? config.axis_rotate ? "ns-resize" : "ew-resize" : null).classed(_classes2.default.eventRectsMultiple, isMultipleX).classed(_classes2.default.eventRectsSingle, !isMultipleX); + + // clear old rects + + if (eventRects.selectAll("." + _classes2.default.eventRect).remove(), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), isMultipleX) eventRectUpdate = $$.eventRect.data([0]), eventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter()).merge(eventRectUpdate);else { + // Set data and update $$.eventRect + var maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets); + + eventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), eventRectUpdate = $$.eventRect.data(function (d) { + return d; + }), eventRectUpdate.exit().remove(), eventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter()).merge(eventRectUpdate); + } + + $$.updateEventRect(eventRectUpdate), $$.inputType !== "touch" || $$.svg.on("touchstart.eventRect") || $$.hasArcType() || $$.bindTouchOnEventRect(isMultipleX); + }, + bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) { + var $$ = this, + config = $$.config, + getEventRect = function () { + var touch = _d3Selection.event.changedTouches[0]; + + return (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY)); + }, + getIndex = function (eventRect) { + var index = eventRect && eventRect.attr("class") && eventRect.attr("class").replace(new RegExp("(" + _classes2.default.eventRect + "-?|s)", "g"), "") * 1; + + return (isNaN(index) || index === null) && (index = -1), index; + }, + selectRect = function (context) { + if (isMultipleX) $$.selectRectForMultipleXs(context);else { + var eventRect = getEventRect(), + index = getIndex(eventRect); + $$.setOver(index), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, eventRect, index); + } + }, + preventDefault = config.interaction_inputType_touch.preventDefault, + isPrevented = (0, _util.isBoolean)(preventDefault) && preventDefault || !1, + preventThreshold = !isNaN(preventDefault) && preventDefault || null, + startPx = void 0, + preventEvent = function (event) { + var eventType = event.type, + touch = event.changedTouches[0], + currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")]; + + + // prevent document scrolling + eventType === "touchstart" ? isPrevented ? event.preventDefault() : preventThreshold !== null && (startPx = currentXY) : eventType === "touchmove" && (isPrevented || startPx === !0 || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) && (startPx = !0, event.preventDefault()); + }; + + // call event.preventDefault() + // according 'interaction.inputType.touch.preventDefault' option + + + // bind touch events + $$.svg.on("touchstart.eventRect touchmove.eventRect", function () { + var eventRect = getEventRect(); + + if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) { + if ($$.dragging || $$.flowing || $$.hasArcType()) return; + + preventEvent(_d3Selection.event), selectRect(this); + } else $$.unselectRect(); + }).on("touchend.eventRect", function () { + var eventRect = getEventRect(); + + if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) { + if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1)); + + // Call event handler + var index = getIndex(eventRect); + + isMultipleX || index === -1 || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onout.call($$.api, d2); + }); + } + }); + }, + + + /** + * Updates the location and size of the eventRect. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + */ + updateEventRect: function updateEventRect(eventRectUpdate) { + var $$ = this, + config = $$.config, + xScale = $$.zoomScale || $$.x, + eventRectData = eventRectUpdate || $$.eventRect.data(), + isRotated = config.axis_rotated, + x = void 0, + y = void 0, + w = void 0, + h = void 0; // set update selection if null + + if ($$.isMultipleX()) x = 0, y = 0, w = $$.width, h = $$.height;else { + var rectW = void 0, + rectX = void 0; + + + if ($$.isCategorized()) rectW = $$.getEventRectWidth(), rectX = function (d) { + return xScale(d.x) - rectW / 2; + };else { + $$.updateXs(); + + + var getPrevNextX = function (d) { + var index = d.index; + + return { + prev: $$.getPrevX(index), + next: $$.getNextX(index) + }; + }; + + rectW = function (d) { + var x = getPrevNextX(d); + + // if there this is a single data point make the eventRect full width (or height) + return x.prev === null && x.next === null ? isRotated ? $$.height : $$.width : (x.prev === null && (x.prev = xScale.domain()[0]), x.next === null && (x.next = xScale.domain()[1]), Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2)); + }, rectX = function (d) { + var x = getPrevNextX(d), + thisX = $$.data.xs[d.id][d.index]; + + + // if there this is a single data point position the eventRect at 0 + return x.prev === null && x.next === null ? 0 : (x.prev === null && (x.prev = xScale.domain()[0]), (xScale(thisX) + xScale(x.prev)) / 2); + }; + } + + x = isRotated ? 0 : rectX, y = isRotated ? rectX : 0, w = isRotated ? $$.width : rectW, h = isRotated ? rectW : $$.height; + } + + eventRectData.attr("class", $$.classEvent.bind($$)).attr("x", x).attr("y", y).attr("width", w).attr("height", h); + }, + selectRectForSingle: function selectRectForSingle(context, eventRect, index) { + var $$ = this, + config = $$.config, + isSelectionEnabled = config.data_selection_enabled, + isSelectionGrouped = config.data_selection_grouped, + isTooltipGrouped = config.tooltip_grouped, + selectedData = $$.getAllValuesOnIndex(index); + isTooltipGrouped && ($$.showTooltip(selectedData, context), $$.showXGridFocus(selectedData), !isSelectionEnabled || isSelectionGrouped) || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function () { + (0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED, !0), isSelectionEnabled && eventRect.style("cursor", isSelectionGrouped ? "pointer" : null), isTooltipGrouped || ($$.hideXGridFocus(), $$.hideTooltip(), !isSelectionGrouped && $$.expandCirclesBars(index)); + }).filter(function (d) { + return $$.isWithinShape(this, d); + }).call(function (selected) { + var d = selected.data(); + + isSelectionEnabled && (isSelectionGrouped || config.data_selection_isselectable(d)) && eventRect.style("cursor", "pointer"), isTooltipGrouped || ($$.showTooltip(d, context), $$.showXGridFocus(d), $$.unexpandCircles(), selected.each(function (d) { + return $$.expandCirclesBars(index, d.id); + })); + }); + }, + expandCirclesBars: function expandCirclesBars(index, id, reset) { + var $$ = this, + config = $$.config; + config.point_focus_expand_enabled && $$.expandCircles(index, id, reset), $$.expandBars(index, id, reset); + }, + selectRectForMultipleXs: function selectRectForMultipleXs(context) { + var $$ = this, + config = $$.config, + targetsToShow = $$.filterTargetsToShow($$.data.targets); + + + // do nothing when dragging + if (!($$.dragging || $$.hasArcType(targetsToShow))) { + var mouse = (0, _d3Selection.mouse)(context), + closest = $$.findClosestFromTargets(targetsToShow, mouse); + + + if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id) && (config.data_onout.call($$.api, $$.mouseover), $$.mouseover = undefined), !closest) return void $$.unselectRect(); + + var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x), + selectedData = sameXData.map(function (d) { + return $$.addName(d); + }); + + // show tooltip when cursor is close to some point + + $$.showTooltip(selectedData, context), $$.expandCirclesBars(closest.index, closest.id, !0), $$.showXGridFocus(selectedData), ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && ($$.svg.select("." + _classes2.default.eventRect).style("cursor", "pointer"), !$$.mouseover && (config.data_onover.call($$.api, closest), $$.mouseover = closest)); + } + }, + + + /** + * Unselect EventRect. + * @private + */ + unselectRect: function unselectRect() { + var $$ = this; + + $$.svg.select("." + _classes2.default.eventRect).style("cursor", null), $$.hideXGridFocus(), $$.hideTooltip(), $$.unexpandCircles(), $$.unexpandBars(); + }, + setOver: function setOver(index) { + var $$ = this, + config = $$.config; + $$.expandCirclesBars(index, null, !0), index !== -1 && $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onover.call($$.api, d2); + }); + }, + + + /** + * Return draggable selection function + * @return {Function} + * @private + */ + getDraggableSelection: function getDraggableSelection() { + var $$ = this, + config = $$.config; + + + return config.interaction_enabled && config.data_selection_draggable && $$.drag ? (0, _d3Drag.drag)().on("drag", function () { + $$.drag((0, _d3Selection.mouse)(this)); + }).on("start", function () { + $$.dragstart((0, _d3Selection.mouse)(this)); + }).on("end", function () { + $$.dragend(); + }) : function () {}; + }, + + + /** + * Create eventRect for each data on the x-axis. + * Register touch and drag events. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + * @returns {Object} d3.select(CLASS.eventRects) object. + */ + generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) { + var $$ = this, + config = $$.config, + rect = eventRectEnter.append("rect").attr("class", $$.classEvent.bind($$)).style("cursor", config.data_selection_enabled && config.data_selection_grouped ? "pointer" : null).on("click", function (d) { + if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1)); + + var index = d.index; + + $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + (config.data_selection_grouped || $$.isWithinShape(this, d2)) && ($$.toggleShape(this, d2, index), $$.config.data_onclick.call($$.api, d2, this)); + }); + }).call($$.getDraggableSelection()); + + + return $$.inputType === "mouse" && rect.on("mouseover", function (d) { + $$.dragging || $$.flowing || $$.hasArcType() || $$.setOver(d.index); + }).on("mousemove", function (d) { + // do nothing while dragging/flowing + if (!($$.dragging || $$.flowing || $$.hasArcType())) { + var index = d.index, + eventRect = $$.svg.select("." + _classes2.default.eventRect + "-" + index); + $$.isStepType(d) && $$.config.line_step_type === "step-after" && (0, _d3Selection.mouse)(this)[0] < $$.x($$.getXValue(d.id, index)) && (index -= 1), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, eventRect, index); + } + }).on("mouseout", function (d) { + // chart is destroyed + if ($$.config && !$$.hasArcType()) { + + var index = d.index; + + $$.unselectRect(), $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) { + return config.data_onout.call($$.api, d2); + }); + } + }), rect; + }, + + + /** + * Create an eventRect, + * Register touch and drag events. + * @private + * @param {Object} d3.select(CLASS.eventRects) object. + * @returns {Object} d3.select(CLASS.eventRects) object. + */ + generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) { + var $$ = this, + config = $$.config, + rect = eventRectEnter.append("rect").attr("x", 0).attr("y", 0).attr("width", $$.width).attr("height", $$.height).attr("class", _classes2.default.eventRect).on("click", function () { + var targetsToShow = $$.filterTargetsToShow($$.data.targets); + + // select if selection enabled + if (!$$.hasArcType(targetsToShow)) { + var mouse = (0, _d3Selection.mouse)(this), + closest = $$.findClosestFromTargets(targetsToShow, mouse); + !closest || ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && $$.main.selectAll("." + _classes2.default.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + _classes2.default.shape + "-" + closest.index).each(function () { + (config.data_selection_grouped || $$.isWithinShape(this, closest)) && ($$.toggleShape(this, closest, closest.index), $$.config.data_onclick.call($$.api, closest, this)); + }); + } + }).call($$.getDraggableSelection()); + + + return $$.inputType === "mouse" && rect.on("mouseover mousemove", function () { + $$.selectRectForMultipleXs(this); + }).on("mouseout", function () { + !$$.config || $$.hasArcType() || $$.unselectRect(); + }), rect; + }, + + + /** + * Dispatch a mouse event. + * @private + * @param {String} type event type + * @param {Number} index Index of eventRect + * @param {Array} mouse x and y coordinate value + */ + dispatchEvent: function dispatchEvent(type, index, mouse) { + var $$ = this, + selector = "." + ($$.isMultipleX() ? _classes2.default.eventRect : _classes2.default.eventRect + "-" + index), + eventRect = $$.main.select(selector).node(), + box = eventRect.getBoundingClientRect(), + x = box.left + (mouse ? mouse[0] : 0) + box.width / 2, + y = box.top + (mouse ? mouse[1] : 0); + + _util.emulateEvent[/^mouse/.test(type) ? "mouse" : "touch"](eventRect, type, { + screenX: x, + screenY: y, + clientX: x, + clientY: y + }); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getCurrentWidth: function getCurrentWidth() { + var $$ = this; + + return $$.config.size_width || $$.getParentWidth(); + }, + getCurrentHeight: function getCurrentHeight() { + var $$ = this, + config = $$.config, + h = config.size_height || $$.getParentHeight(); + + + return h > 0 ? h : 320 / ($$.hasType("gauge") && !config.gauge_fullCircle ? 2 : 1); + }, + getCurrentPaddingTop: function getCurrentPaddingTop() { + var $$ = this, + config = $$.config, + padding = (0, _util.isValue)(config.padding_top) ? config.padding_top : 0; + + + return $$.title && $$.title.node() && (padding += $$.getTitlePadding()), padding; + }, + getCurrentPaddingBottom: function getCurrentPaddingBottom() { + var config = this.config; + + return (0, _util.isValue)(config.padding_bottom) ? config.padding_bottom : 0; + }, + getCurrentPaddingLeft: function getCurrentPaddingLeft(withoutRecompute) { + var $$ = this, + config = $$.config, + paddingLeft = void 0; + + + return paddingLeft = (0, _util.isValue)(config.padding_left) ? config.padding_left : config.axis_rotated ? config.axis_x_show ? Math.max((0, _util.ceil10)($$.getAxisWidthByAxisId("x", withoutRecompute)), 40) : 1 : !config.axis_y_show || config.axis_y_inner ? $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1 : (0, _util.ceil10)($$.getAxisWidthByAxisId("y", withoutRecompute)), paddingLeft; + }, + getCurrentPaddingRight: function getCurrentPaddingRight() { + var $$ = this, + config = $$.config, + legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0, + paddingRight = void 0; + + + return paddingRight = (0, _util.isValue)(config.padding_right) ? config.padding_right + 1 : config.axis_rotated ? 10 + legendWidthOnRight : !config.axis_y2_show || config.axis_y2_inner ? 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0) : (0, _util.ceil10)($$.getAxisWidthByAxisId("y2")) + legendWidthOnRight, paddingRight; + }, + + + /** + * Get the parent rect element's size + * @param {String} key property/attribute name + * @private + */ + getParentRectValue: function getParentRectValue(key) { + for (var offsetName = "offset" + (0, _util.capitalize)(key), parent = this.selectChart.node(), v = void 0; !v && parent && parent.tagName !== "BODY";) { + try { + v = parent.getBoundingClientRect()[key]; + } catch (e) { + offsetName in parent && (v = parent[offsetName]); + } + + parent = parent.parentNode; + } + + if (key === "width") { + // Sometimes element's width value is incorrect(ex. flex container) + // In this case, use body's offsetWidth instead. + var bodyWidth = document.body.offsetWidth; + + v > bodyWidth && (v = bodyWidth); + } + + return v; + }, + getParentWidth: function getParentWidth() { + return this.getParentRectValue("width"); + }, + getParentHeight: function getParentHeight() { + var h = this.selectChart.style("height"); + + return h.indexOf("px") > 0 ? +h.replace("px", "") : 0; + }, + getSvgLeft: function getSvgLeft(withoutRecompute) { + var $$ = this, + config = $$.config, + hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner, + leftAxisClass = config.axis_rotated ? _classes2.default.axisX : _classes2.default.axisY, + leftAxis = $$.main.select("." + leftAxisClass).node(), + svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 }, + chartRect = $$.selectChart.node().getBoundingClientRect(), + hasArc = $$.hasArcType(), + svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute)); + + + return svgLeft > 0 ? svgLeft : 0; + }, + getAxisWidthByAxisId: function getAxisWidthByAxisId(id, withoutRecompute) { + var $$ = this, + position = $$.axis.getLabelPositionById(id); + + + return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40); + }, + getHorizontalAxisHeight: function getHorizontalAxisHeight(axisId) { + var $$ = this, + config = $$.config, + h = 30; + + + // Calculate x axis height when tick rotated + return axisId !== "x" || config.axis_x_show ? axisId === "x" && config.axis_x_height ? config.axis_x_height : axisId !== "y" || config.axis_y_show ? axisId !== "y2" || config.axis_y2_show ? (axisId === "x" && !config.axis_rotated && config.axis_x_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180)), axisId === "y" && config.axis_rotated && config.axis_y_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180)), h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === "y2" ? -10 : 0)) : $$.rotated_padding_top : !config.legend_show || $$.isLegendRight || $$.isLegendInset ? 1 : 10 : 8; + }, + getEventRectWidth: function getEventRectWidth() { + return Math.max(0, this.xAxis.tickInterval()); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 19 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Shape = __webpack_require__(63), + _d3Selection = __webpack_require__(64), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getShapeIndices: function getShapeIndices(typeFilter) { + var $$ = this, + config = $$.config, + indices = {}, + i = 0; + + + return $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) { + for (var groups, j = 0; groups = config.data_groups[j]; j++) if (!(groups.indexOf(d.id) < 0)) for (var _row5, _k5 = 0; _row5 = groups[_k5]; _k5++) if (_row5 in indices) { + indices[d.id] = indices[_row5]; + + break; + } + + (0, _util.isUndefined)(indices[d.id]) && (indices[d.id] = i++); + }), indices.__max__ = i - 1, indices; + }, + getShapeX: function getShapeX(offset, targetsNum, indices, isSub) { + var $$ = this, + scale = isSub ? $$.subX : $$.zoomScale || $$.x, + barPadding = $$.config.bar_padding; + + + return function (d) { + var index = d.id in indices ? indices[d.id] : 0, + x = d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0; + + // adjust x position for bar.padding option + + return offset && x && targetsNum > 1 && barPadding && (index && (x += barPadding * index), targetsNum > 2 ? x -= (targetsNum - 1) * barPadding / 2 : targetsNum === 2 && (x -= barPadding / 2)), x; + }; + }, + getShapeY: function getShapeY(isSub) { + var $$ = this; + + return function (d) { + var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id); + + return scale(d.value); + }; + }, + getShapeOffset: function getShapeOffset(typeFilter, indices, isSub) { + var $$ = this, + targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))), + targetIds = targets.map(function (t) { + return t.id; + }); + + + return function (d, idx) { + var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id), + y0 = scale(0), + offset = y0, + i = idx; + + + return targets.forEach(function (t) { + var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values; + + t.id === d.id || indices[t.id] !== indices[d.id] || targetIds.indexOf(t.id) < targetIds.indexOf(d.id) && (((0, _util.isUndefined)(values[i]) || +values[i].x !== +d.x) && (i = -1, values.forEach(function (v, j) { + var x1 = v.x.constructor === Date ? +v.x : v.x, + x2 = d.x.constructor === Date ? +d.x : d.x; + x1 === x2 && (i = j); + })), i in values && values[i].value * d.value >= 0 && (offset += scale(values[i].value) - y0)); + }), offset; + }; + }, + isWithinShape: function isWithinShape(that, d) { + var $$ = this, + shape = (0, _d3Selection.select)(that), + isWithin = void 0; + + + return $$.isTargetToShow(d.id) ? $$.hasValidPointType(that.nodeName) ? isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.pointSelectR(d) * 1.5) : that.nodeName === "path" && (isWithin = !shape.classed(_classes2.default.bar) || $$.isWithinBar(that)) : isWithin = !1, isWithin; + }, + getInterpolate: function getInterpolate(d) { + var $$ = this, + interpolation = $$.getInterpolateType(d); + + + return { + "basis": _d3Shape.curveBasis, + "basis-closed": _d3Shape.curveBasisClosed, + "basis-open": _d3Shape.curveBasisOpen, + "bundle": _d3Shape.curveBundle, + "cardinal": _d3Shape.curveCardinal, + "cardinal-closed": _d3Shape.curveCardinalClosed, + "cardinal-open": _d3Shape.curveCardinalOpen, + "catmull-rom": _d3Shape.curveCatmullRom, + "catmull-rom-closed": _d3Shape.curveCatmullRomClosed, + "catmull-rom-open": _d3Shape.curveCatmullRomOpen, + "monotone-x": _d3Shape.curveMonotoneX, + "monotone-y": _d3Shape.curveMonotoneY, + "natural": _d3Shape.curveNatural, + "linear-closed": _d3Shape.curveLinearClosed, + "linear": _d3Shape.curveLinear, + "step": _d3Shape.curveStep, + "step-after": _d3Shape.curveStepAfter, + "step-before": _d3Shape.curveStepBefore + }[interpolation]; + }, + getInterpolateType: function getInterpolateType(d) { + var $$ = this, + type = $$.config.spline_interpolation_type, + interpolation = $$.isInterpolationType(type) ? type : "cardinal"; + + + return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : "linear"; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Shape = __webpack_require__(63), + _d3Array = __webpack_require__(66), + _d3Interpolate = __webpack_require__(68), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initPie: function initPie() { + var $$ = this, + config = $$.config, + padding = config.pie_padding, + padAngle = $$.hasType("pie") && padding ? padding * .01 : config[config.data_type + "_padAngle"] ? config[config.data_type + "_padAngle"] : 0; + $$.pie = (0, _d3Shape.pie)().padAngle(padAngle).value(function (d) { + return d.values.reduce(function (a, b) { + return a + b.value; + }, 0); + }), config.data_order || $$.pie.sort(null); + }, + updateRadius: function updateRadius() { + var $$ = this, + config = $$.config, + radius = config.pie_innerRadius, + padding = config.pie_padding, + w = config.gauge_width || config.donut_width; + $$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2, $$.radius = $$.radiusExpanded * .95, $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : .6; + + + var innerRadius = radius || (padding ? padding * ($$.innerRadiusRatio + .1) : 0); + + $$.innerRadius = $$.hasType("donut") || $$.hasType("gauge") ? $$.radius * $$.innerRadiusRatio : innerRadius; + }, + updateArc: function updateArc() { + var $$ = this; + + $$.svgArc = $$.getSvgArc(), $$.svgArcExpanded = $$.getSvgArcExpanded(), $$.svgArcExpandedSub = $$.getSvgArcExpanded(.98); + }, + updateAngle: function updateAngle(dValue) { + var $$ = this, + config = $$.config, + d = dValue, + found = !1, + index = 0, + gMin = void 0, + gMax = void 0, + gTic = void 0, + gValue = void 0; + return config ? ($$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) { + found || t.data.id !== d.data.id || (found = !0, d = t, d.index = index), index++; + }), isNaN(d.startAngle) && (d.startAngle = 0), isNaN(d.endAngle) && (d.endAngle = d.startAngle), $$.isGaugeType(d.data) && (gMin = config.gauge_min, gMax = config.gauge_max, gTic = Math.PI * (config.gauge_fullCircle ? 2 : 1) / (gMax - gMin), gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin, d.startAngle = config.gauge_startingAngle, d.endAngle = d.startAngle + gTic * gValue), found ? d : null) : null; + }, + getSvgArc: function getSvgArc() { + var $$ = this, + arc = (0, _d3Shape.arc)().outerRadius($$.radius).innerRadius($$.innerRadius), + newArc = function (d, withoutUpdate) { + if (withoutUpdate) return arc(d); // for interpolate + + var updated = $$.updateAngle(d); + + return updated ? arc(updated) : "M 0 0"; + }; + + // TODO: extends all function + + + return newArc.centroid = arc.centroid, newArc; + }, + getSvgArcExpanded: function getSvgArcExpanded(rate) { + var $$ = this, + arc = (0, _d3Shape.arc)().outerRadius($$.radiusExpanded * (rate || 1)).innerRadius($$.innerRadius); + + + return function (d) { + var updated = $$.updateAngle(d); + + return updated ? arc(updated) : "M 0 0"; + }; + }, + getArc: function getArc(d, withoutUpdate, force) { + return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0"; + }, + transformForArcLabel: function transformForArcLabel(d) { + var $$ = this, + config = $$.config, + updated = $$.updateAngle(d), + translate = ""; + + + if (updated && !$$.hasType("gauge")) { + var c = this.svgArc.centroid(updated), + x = isNaN(c[0]) ? 0 : c[0], + y = isNaN(c[1]) ? 0 : c[1], + h = Math.sqrt(x * x + y * y), + ratio = $$.hasType("donut") && config.donut_label_ratio || $$.hasType("pie") && config.pie_label_ratio; + ratio = ratio ? (0, _util.isFunction)(ratio) ? ratio(d, $$.radius, h) : ratio : $$.radius && (h ? (36 / $$.radius > .375 ? 1.175 - 36 / $$.radius : .8) * $$.radius / h : 0), translate = "translate(" + x * ratio + "," + y * ratio + ")"; + } + + return translate; + }, + getArcRatio: function getArcRatio(d) { + var $$ = this, + config = $$.config, + val = null; + + + if (d) + // if has padAngle set, calculate rate based on value + if ($$.pie.padAngle()()) { + var total = $$.getTotalDataSum(); + + $$.hiddenTargetIds.length && (total -= (0, _d3Array.sum)($$.api.data.values.call($$.api, $$.hiddenTargetIds))), val = d.value / total; + } else val = (d.endAngle - d.startAngle) / (Math.PI * ($$.hasType("gauge") && !config.gauge_fullCircle ? 1 : 2)); + + return val; + }, + convertToArcData: function convertToArcData(d) { + return this.addName({ + id: d.data.id, + value: d.value, + ratio: this.getArcRatio(d), + index: d.index + }); + }, + textForArcLabel: function textForArcLabel(val) { + var $$ = this, + d = val.node ? val.datum() : val; + + + if (!$$.shouldShowArcLabel()) return ""; + + var updated = $$.updateAngle(d), + value = updated ? updated.value : null, + ratio = $$.getArcRatio(updated), + id = d.data.id; + + + if (!$$.hasType("gauge") && !$$.meetsArcLabelThreshold(ratio)) return ""; + + var text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, id).toString(); + + if (val.node) if (text.indexOf("\n") === -1) val.text(text);else { + var multiline = text.split("\n"), + len = multiline.length - 1; + multiline.forEach(function (v, i) { + val.append("tspan").attr("x", 0).attr("dy", (i === 0 ? -len : 1) + "em").text(v); + }); + } + + return text; + }, + textForGaugeMinMax: function textForGaugeMinMax(value, isMax) { + var format = this.getGaugeLabelExtents(); + + return format ? format(value, isMax) : value; + }, + expandArc: function expandArc(targetIds) { + var $$ = this, + interval = void 0; + + + // MEMO: avoid to cancel transition + if ($$.transiting) return void (interval = window.setInterval(function () { + $$.transiting || (window.clearInterval(interval), $$.legend.selectAll("." + _classes2.default.legendItemFocused).size() > 0 && $$.expandArc(targetIds)); + }, 10)); + + var newTargetIds = $$.mapToTargetIds(targetIds); + + $$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).each(function (d) { + $$.shouldExpand(d.data.id) && (0, _d3Selection.select)(this).selectAll("path").transition().duration($$.expandDuration(d.data.id)).attr("d", $$.svgArcExpanded).transition().duration($$.expandDuration(d.data.id) * 2).attr("d", $$.svgArcExpandedSub); + }); + }, + unexpandArc: function unexpandArc(targetIds) { + var $$ = this; + + if (!$$.transiting) { + + var newTargetIds = $$.mapToTargetIds(targetIds); + + $$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).selectAll("path").transition().duration(function (d) { + return $$.expandDuration(d.data.id); + }).attr("d", $$.svgArc), $$.svg.selectAll("" + _classes2.default.arc).style("opacity", "1"); + } + }, + expandDuration: function expandDuration(id) { + var $$ = this, + config = $$.config; + return $$.isDonutType(id) ? config.donut_expand_duration : $$.isGaugeType(id) ? config.gauge_expand_duration : $$.isPieType(id) ? config.pie_expand_duration : 50; + }, + shouldExpand: function shouldExpand(id) { + var $$ = this, + config = $$.config; + + + return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand; + }, + shouldShowArcLabel: function shouldShowArcLabel() { + var $$ = this, + config = $$.config, + shouldShow = !0; + + + // when gauge, always true + return $$.hasType("donut") ? shouldShow = config.donut_label_show : $$.hasType("pie") && (shouldShow = config.pie_label_show), shouldShow; + }, + meetsArcLabelThreshold: function meetsArcLabelThreshold(ratio) { + var $$ = this, + config = $$.config, + threshold = $$.hasType("donut") ? config.donut_label_threshold : config.pie_label_threshold; + + + return ratio >= threshold; + }, + getArcLabelFormat: function getArcLabelFormat() { + var $$ = this, + config = $$.config, + format = config.pie_label_format; + + + return $$.hasType("gauge") ? format = config.gauge_label_format : $$.hasType("donut") && (format = config.donut_label_format), format; + }, + getGaugeLabelExtents: function getGaugeLabelExtents() { + var config = this.config; + + return config.gauge_label_extents; + }, + getArcTitle: function getArcTitle() { + var $$ = this; + + return $$.hasType("donut") ? $$.config.donut_title : ""; + }, + updateTargetsForArc: function updateTargetsForArc(targets) { + var $$ = this, + main = $$.main, + classChartArc = $$.classChartArc.bind($$), + classArcs = $$.classArcs.bind($$), + classFocus = $$.classFocus.bind($$), + mainPieUpdate = main.select("." + _classes2.default.chartArcs).selectAll("." + _classes2.default.chartArc).data($$.pie(targets)).attr("class", function (d) { + return classChartArc(d) + classFocus(d.data); + }), + mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc); + mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate), mainPieEnter.append("text").attr("dy", $$.hasType("gauge") ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none"); + }, + initArc: function initArc() { + var $$ = this; + + $$.arcs = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc")), $$.setArcTitle(); + }, + + + /** + * Set arc title text + * @private + */ + setArcTitle: function setArcTitle() { + var $$ = this, + title = $$.getArcTitle(); + + + if (title) { + var multiline = title.split("\n"), + text = $$.arcs.append("text").attr("class", _classes2.default.chartArcsTitle).style("text-anchor", "middle"); + + + // if is multiline text + if (multiline.length > 1) { + var fontSize = +text.style("font-size").replace("px", ""), + height = Math.floor(text.text(".").node().getBBox().height, text.text("")); + multiline.forEach(function (v, i) { + return text.insert("tspan").text(v).attr("x", 0).attr("dy", i ? height : 0); + }), text.attr("y", "-" + (fontSize * (multiline.length - 2) || fontSize / 2)); + } else text.text(title); + } + }, + redrawArc: function redrawArc(duration, durationForExit, withTransform) { + + function selectArc(_this, arcData, id) { + $$.expandArc(id), $$.api.focus(id), $$.toggleFocusLegend(id, !0), $$.showTooltip([arcData], _this); + } + + function unselectArc(arcData) { + var id = arcData && arcData.id || undefined; + + $$.unexpandArc(id), $$.api.revert(), $$.revertLegend(), $$.hideTooltip(); + } + + var $$ = this, + config = $$.config, + main = $$.main, + isTouch = $$.inputType === "touch", + isMouse = $$.inputType === "mouse", + mainArc = main.selectAll("." + _classes2.default.arcs).selectAll("." + _classes2.default.arc).data($$.arcData.bind($$)); + + + if (mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove(), mainArc = mainArc.enter().append("path").attr("class", $$.classArc.bind($$)).style("fill", function (d) { + return $$.color(d.data); + }).style("cursor", function (d) { + return config.interaction_enabled && (config.data_selection_isselectable(d) ? "pointer" : null); + }).style("opacity", "0").each(function (d) { + $$.isGaugeType(d.data) && (d.startAngle = config.gauge_startingAngle, d.endAngle = config.gauge_startingAngle), this._current = d; + }).merge(mainArc), mainArc.attr("transform", function (d) { + return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : ""; + }).style("opacity", function (d) { + return d === this._current ? "0" : "1"; + }).each(function () { + $$.transiting = !0; + }).transition().duration(duration).attrTween("d", function (d) { + var updated = $$.updateAngle(d); + + if (!updated) return function () { + return "M 0 0"; + }; + + isNaN(this._current.startAngle) && (this._current.startAngle = 0), isNaN(this._current.endAngle) && (this._current.endAngle = this._current.startAngle); + + + var interpolate = (0, _d3Interpolate.interpolate)(this._current, updated); + + return this._current = interpolate(0), function (t) { + var interpolated = interpolate(t); + + // data.id will be updated by interporator + return interpolated.data = d.data, $$.getArc(interpolated, !0); + }; + }).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) { + return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id); + }) + // Where gauge reading color would receive customization. + .style("opacity", "1").call($$.endall, function () { + $$.transiting = !1; + }), config.interaction_enabled && (mainArc.on("click", function (d, i) { + var updated = $$.updateAngle(d), + arcData = void 0; + updated && (arcData = $$.convertToArcData(updated), $$.toggleShape && $$.toggleShape(this, arcData, i), $$.config.data_onclick.call($$.api, arcData, this)); + }), isMouse && mainArc.on("mouseover", function (d) { + if (!$$.transiting) // skip while transiting + { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + selectArc(this, arcData, id), $$.config.data_onover(arcData, this); + } + }).on("mouseout", function (d) { + if (!$$.transiting) // skip while transiting + { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null; + unselectArc(), $$.config.data_onout(arcData, this); + } + }).on("mousemove", function (d) { + var updated = $$.updateAngle(d), + arcData = updated ? $$.convertToArcData(updated) : null; + $$.showTooltip([arcData], this); + }), isTouch && $$.hasArcType())) { + var _getEventArc = function () { + var touch = _d3Selection.event.changedTouches[0], + eventArc = (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY)); + + + return eventArc; + }; + + $$.svg.on("touchstart", function () { + if (!$$.transiting) // skip while transiting + { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onover(arcData, this); + } + }).on("touchend", function () { + if (!$$.transiting) // skip while transiting + { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onout(arcData, this); + } + }).on("touchmove", function () { + var eventArc = _getEventArc(), + datum = eventArc.datum(), + updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null, + arcData = updated ? $$.convertToArcData(updated) : null, + id = arcData && arcData.id || undefined; + + id === undefined ? unselectArc() : selectArc(this, arcData, id); + }); + } + + var gaugeTextValue = main.selectAll("." + _classes2.default.chartArc).select("text").style("opacity", "0").attr("class", function (d) { + return $$.isGaugeType(d.data) ? _classes2.default.gaugeValue : ""; + }); + + config.gauge_fullCircle && gaugeTextValue.attr("dy", "" + Math.round($$.radius / 14)); + + + // to handle multiline text for gauge type + var textMethod = !gaugeTextValue.empty() && gaugeTextValue.classed(_classes2.default.gaugeValue) ? "call" : "text"; + + if (gaugeTextValue[textMethod]($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) { + return $$.isGaugeType(d.data) ? Math.round($$.radius / 5) + "px" : ""; + }).transition().duration(duration).style("opacity", function (d) { + return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? "1" : "0"; + }), main.select("." + _classes2.default.chartArcsTitle).style("opacity", $$.hasType("donut") || $$.hasType("gauge") ? "1" : "0"), $$.hasType("gauge")) { + var endAngle = (config.gauge_fullCircle ? -4 : -1) * config.gauge_startingAngle; + + $$.arcs.select("." + _classes2.default.chartArcsBackground).attr("d", function () { + var d = { + data: [{ value: config.gauge_max }], + startAngle: config.gauge_startingAngle, + endAngle: endAngle + }; + + return $$.getArc(d, !0, !0); + }), $$.arcs.select("." + _classes2.default.chartArcsGaugeUnit).attr("dy", ".75em").text(config.gauge_label_show ? config.gauge_units : ""), config.gauge_label_show && ($$.arcs.select("." + _classes2.default.chartArcsGaugeMin).attr("dx", -1 * ($$.innerRadius + ($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)), !config.gauge_fullCircle && $$.arcs.select("." + _classes2.default.chartArcsGaugeMax).attr("dx", $$.innerRadius + ($$.radius - $$.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0))); + } + }, + initGauge: function initGauge() { + var $$ = this, + config = $$.config, + arcs = $$.arcs; + $$.hasType("gauge") && (arcs.append("path").attr("class", _classes2.default.chartArcsBackground), arcs.append("text").attr("class", _classes2.default.chartArcsGaugeUnit).style("text-anchor", "middle").style("pointer-events", "none"), config.gauge_label_show && (arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMin).style("text-anchor", "middle").style("pointer-events", "none"), !config.gauge_fullCircle && arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMax).style("text-anchor", "middle").style("pointer-events", "none"))); + }, + getGaugeLabelHeight: function getGaugeLabelHeight() { + return this.config.gauge_label_show ? 20 : 0; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 21 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + initBar: function initBar() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars); + }, + updateTargetsForBar: function updateTargetsForBar(targets) { + var $$ = this, + config = $$.config, + classChartBar = $$.classChartBar.bind($$), + classBars = $$.classBars.bind($$), + classFocus = $$.classFocus.bind($$), + mainBarUpdate = $$.main.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", function (d) { + return classChartBar(d) + classFocus(d); + }), + mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", "none"); + + + // Bars for each data + mainBarEnter.append("g").attr("class", classBars).style("cursor", function (d) { + return config.data_selection_isselectable(d) ? "pointer" : null; + }); + }, + updateBar: function updateBar(durationForExit) { + var $$ = this, + barData = $$.barData.bind($$), + classBar = $$.classBar.bind($$), + initialOpacity = $$.initialOpacity.bind($$), + color = function (d) { + return $$.color(d.id); + }; + + $$.mainBar = $$.main.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data(barData), $$.mainBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainBar = $$.mainBar.enter().append("path").attr("class", classBar).style("stroke", color).style("fill", color).merge($$.mainBar).style("opacity", initialOpacity); + }, + redrawBar: function redrawBar(drawBar, withTransition) { + return [(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar).attr("d", drawBar).style("fill", this.color).style("opacity", "1")]; + }, + getBarW: function getBarW(axis, barTargetsNum) { + var $$ = this, + config = $$.config, + w = (0, _util.isNumber)(config.bar_width) ? config.bar_width : barTargetsNum ? axis.tickInterval($$.getMaxDataCount()) * config.bar_width_ratio / barTargetsNum : 0; + + + return config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w; + }, + getBars: function getBars(i, id) { + var $$ = this, + suffix = (0, _util.isValue)(i) ? "-" + i : ""; + + + return (id ? $$.main.selectAll("." + _classes2.default.bars + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.bar + suffix); + }, + expandBars: function expandBars(i, id, reset) { + var $$ = this; + + reset && $$.unexpandBars(), $$.getBars(i, id).classed(_classes2.default.EXPANDED, !0); + }, + unexpandBars: function unexpandBars(i) { + this.getBars(i).classed(_classes2.default.EXPANDED, !1); + }, + generateDrawBar: function generateDrawBar(barIndices, isSub) { + var $$ = this, + config = $$.config, + getPoints = $$.generateGetBarPoints(barIndices, isSub), + isRotated = config.axis_rotated, + isGrouped = config.data_groups.length, + barRadius = config.bar_radius, + barRadiusRatio = config.bar_radius_ratio, + getRadius = (0, _util.isNumber)(barRadius) && barRadius > 0 ? function () { + return barRadius; + } : (0, _util.isNumber)(barRadiusRatio) ? function (w) { + return w * barRadiusRatio; + } : null; + + // get the bar radius + + return function (d, i) { + // 4 points that make a bar + var points = getPoints(d, i), + indexX = +isRotated, + indexY = +!indexX, + isNegative = d.value < 0, + pathRadius = ["", ""], + radius = 0; + + // switch points if axis is rotated, not applicable for sub chart + + if (getRadius && !isGrouped) { + var index = isRotated ? indexY : indexX, + barW = points[2][index] - points[0][index]; + radius = getRadius(barW); + + + var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " "; + + pathRadius[+!isRotated] = "" + arc + radius + "," + radius, pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"](), isNegative && pathRadius.reverse(); + } + + // path string data shouldn't be containing new line chars + // https://github.com/naver/billboard.js/issues/530 + var path = isRotated ? "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY]; + + return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z"; + }; + }, + generateGetBarPoints: function generateGetBarPoints(barIndices, isSub) { + var $$ = this, + axis = isSub ? $$.subXAxis : $$.xAxis, + barTargetsNum = barIndices.__max__ + 1, + barW = $$.getBarW(axis, barTargetsNum), + barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub), + barY = $$.getShapeY(!!isSub), + barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = barOffset(d, i) || y0, + posX = barX(d), + posY = barY(d); // offset is for stacked bar chart + + + // fix posY not to overflow opposite quadrant + + // 4 points that make a bar + return $$.config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX + barW, posY - (y0 - offset)], [posX + barW, offset]]; + }; + }, + isWithinBar: function isWithinBar(that) { + var mouse = (0, _d3Selection.mouse)(that), + list = (0, _util.getRectSegList)(that), + box = that.getBBox(), + seg0 = list[0], + seg1 = list[1], + x = Math.min(seg0.x, seg1.x), + y = Math.min(seg0.y, seg1.y), + w = box.width, + h = box.height; + + + return x - 2 < mouse[0] && mouse[0] < x + w + 2 && y - 2 < mouse[1] && mouse[1] < y + h + 2; + } +}); + +/***/ }), +/* 22 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(66), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializer + * @private + */ + initBubble: function initBubble() { + var $$ = this, + config = $$.config; + $$.hasType("bubble") && (config.point_show = !0, config.point_type = "circle", config.point_sensitivity = 25); + }, + + + /** + * Get user agent's computed value for the total length of the path in user units + * https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength + * @return {Number} + * @private + */ + getBaseLength: function getBaseLength() { + var $$ = this, + baseLength = $$.getCache("$baseLength"); + + + return baseLength || $$.addCache("$baseLength", baseLength = (0, _d3Array.min)([$$.axes.x.select("path").node().getTotalLength(), $$.axes.y.select("path").node().getTotalLength()])), baseLength; + }, + + + /** + * Get the radius value for bubble circle + * @param {Object} d + * @return {Number} + * @private + */ + getBubbleR: function getBubbleR(d) { + var $$ = this, + maxR = $$.config.bubble_maxR; + (0, _util.isFunction)(maxR) ? maxR = maxR(d) : !(0, _util.isNumber)(maxR) && (maxR = $$.getBaseLength() / ($$.getMaxDataCount() * 2) + 12); + var max = (0, _d3Array.max)($$.getMinMaxData().max.map(function (d) { + return (0, _util.isObject)(d.value) ? d.value.mid : d.value; + })), + maxArea = maxR * maxR * Math.PI, + area = d.value * (maxArea / max); + + + return Math.sqrt(area / Math.PI); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 23 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Shape = __webpack_require__(63), + _d3Selection = __webpack_require__(64), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initLine: function initLine() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines); + }, + updateTargetsForLine: function updateTargetsForLine(targets) { + var $$ = this, + config = $$.config, + classChartLine = $$.classChartLine.bind($$), + classLines = $$.classLines.bind($$), + classAreas = $$.classAreas.bind($$), + classCircles = $$.classCircles.bind($$), + classFocus = $$.classFocus.bind($$), + mainLineUpdate = $$.main.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", function (d) { + return classChartLine(d) + classFocus(d); + }), + mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none"); + + + // Lines for each data + mainLineEnter.append("g").attr("class", classLines), mainLineEnter.append("g").attr("class", classAreas), config.point_show && (config.data_selection_enabled && mainLineEnter.append("g").attr("class", function (d) { + return $$.generateClass(_classes2.default.selectedCircles, d.id); + }), mainLineEnter.append("g").attr("class", classCircles).style("cursor", function (d) { + return config.data_selection_isselectable(d) ? "pointer" : null; + })), targets.forEach(function (t) { + $$.main.selectAll("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + _classes2.default.selectedCircle).each(function (d) { + d.value = t.values[d.index].value; + }); + }); + }, + updateLine: function updateLine(durationForExit) { + var $$ = this; + + $$.mainLine = $$.main.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.mainLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainLine = $$.mainLine.enter().append("path").attr("class", function (d) { + return $$.classLine.bind($$)(d) + " " + ($$.extraLineClasses(d) || ""); + }).style("stroke", $$.color).merge($$.mainLine).style("opacity", $$.initialOpacity.bind($$)).style("shape-rendering", function (d) { + return $$.isStepType(d) ? "crispEdges" : ""; + }).attr("transform", null); + }, + redrawLine: function redrawLine(drawLine, withTransition) { + return [(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine).attr("d", drawLine).style("stroke", this.color).style("opacity", "1")]; + }, + + + /** + * Get the curve interpolate + * @param {Array} d Data object + * @return {Function} + * @private + */ + getCurve: function getCurve(d) { + var $$ = this, + isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d); + + + // when is step & rotated, should be computed in different way + // https://github.com/naver/billboard.js/issues/471 + return isRotatedStepType ? function (context) { + var step = $$.getInterpolate(d)(context); + + // keep the original method + + + return step.orgPoint = step.point, step.pointRotated = function (x, y) { + this._point === 1 && (this._point = 2); + + + var y1 = this._y * (1 - this._t) + y * this._t; + + this._context.lineTo(this._x, y1), this._context.lineTo(x, y1), this._x = x, this._y = y; + }, step.point = function (x, y) { + this._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y); + }, step; + } : $$.getInterpolate(d); + }, + generateDrawLine: function generateDrawLine(lineIndices, isSub) { + var $$ = this, + config = $$.config, + lineConnectNull = config.line_connectNull, + isRotated = config.axis_rotated, + getPoints = $$.generateGetLinePoints(lineIndices, isSub), + yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale, + xValue = function (d) { + return (isSub ? $$.subxx : $$.xx).call($$, d); + }, + yValue = function (d, i) { + return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getBaseValue(d)); + }, + line = (0, _d3Shape.line)(); + + return line = isRotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue), lineConnectNull || (line = line.defined(function (d) { + return $$.getBaseValue(d) !== null; + })), function (d) { + var x = isSub ? $$.x : $$.subX, + y = yScaleGetter.call($$, d.id), + values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values, + x0 = 0, + y0 = 0, + path = void 0; + + + return $$.isLineType(d) ? config.data_regions[d.id] ? path = $$.lineWithRegions(values, x, y, config.data_regions[d.id]) : ($$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = line.curve($$.getCurve(d))(values)) : (values[0] && (x0 = x(values[0].x), y0 = y(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0), path || "M 0 0"; + }; + }, + generateGetLinePoints: function generateGetLinePoints(lineIndices, isSubValue) { + // partial duplication of generateGetBarPoints + var $$ = this, + config = $$.config, + lineTargetsNum = lineIndices.__max__ + 1, + isSub = !!isSubValue, + x = $$.getShapeX(0, lineTargetsNum, lineIndices, isSub), + y = $$.getShapeY(isSub), + lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = lineOffset(d, i) || y0, + posX = x(d), + posY = y(d); // offset is for stacked area chart + + // fix posY not to overflow opposite quadrant + config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0); + + + // 1 point that marks the line position + var point = [posX, posY - (y0 - offset)]; + + return [point, point, // from here and below, needed for compatibility + point, point]; + }; + }, + lineWithRegions: function lineWithRegions(d, x, y, _regions) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isTimeSeries = $$.isTimeSeries(), + xOffset = $$.isCategorized() ? .5 : 0, + regions = [], + xp = void 0, + yp = void 0, + diff = void 0, + diffx2 = void 0, + isWithinRegions = function (withinX, withinRegions) { + for (var reg, i = 0; reg = withinRegions[i]; i++) if (reg.start < withinX && withinX <= reg.end) return reg.style; + + return !1; + }; // default value + + // check weather data is within region + + + // Check start/end of regions + if ((0, _util.isDefined)(_regions)) { + var getValue = function (v, def) { + return (0, _util.isUndefined)(v) ? def : isTimeSeries ? $$.parseDate(v) : v; + }; + + for (var reg, i = 0; reg = _regions[i]; i++) { + var start = getValue(reg.start, d[0].x), + end = getValue(reg.end, d[d.length - 1].x), + style = reg.style || { dasharray: "2 2" }; + regions[i] = { start: start, end: end, style: style }; + } + } + + // Set scales + + var xValue = isRotated ? function (dt) { + return y(dt.value); + } : function (dt) { + return x(dt.x); + }, + yValue = isRotated ? function (dt) { + return x(dt.x); + } : function (dt) { + return y(dt.value); + }, + generateM = function (points) { + return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1]; + }, + sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) { + var x0 = d0.x.getTime(), + xDiff = d1.x - d0.x, + xv0 = new Date(x0 + xDiff * k), + xv1 = new Date(x0 + xDiff * (k + timeseriesDiff)), + points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]]; + + + return generateM(points); + } : function (d0, d1, k, otherDiff) { + var points = isRotated ? [[y(yp(k), !0), x(xp(k))], [y(yp(k + otherDiff), !0), x(xp(k + otherDiff))]] : [[x(xp(k), !0), y(yp(k))], [x(xp(k + otherDiff), !0), y(yp(k + otherDiff))]]; + + return generateM(points); + }, + path = "M"; + + // Define svg generator function for region + + + // Generate + + + for (var data, _i = 0; data = d[_i]; _i++) { + var prevData = d[_i - 1], + style = isWithinRegions(data.x, regions); + + + // Draw as normal + if ((0, _util.isUndefined)(regions) || !style) path += "" + (_i ? "L" : "") + xValue(data) + "," + yValue(data);else { + try { + style = style.dasharray.split(" "); + } catch (e) { + style = "2 2".split(" "); + } + + // Draw with region // TODO: Fix for horizotal charts + xp = $$.getScale(prevData.x + xOffset, data.x + xOffset, isTimeSeries), yp = $$.getScale(prevData.value, data.value); + var dx = x(data.x) - x(prevData.x), + dy = y(data.value) - y(prevData.value), + dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)); + diff = style[0] / dd, diffx2 = diff * style[1]; + + + for (var j = diff; j <= 1; j += diffx2) path += sWithRegion(prevData, data, j, diff), j + diffx2 >= 1 && (path += sWithRegion(prevData, data, 1, 0)); + } + } + + return path; + }, + updateArea: function updateArea(durationForExit) { + var $$ = this; + + $$.mainArea = $$.main.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.mainArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainArea = $$.mainArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () { + return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0"; + }).merge($$.mainArea), $$.mainArea.style("opacity", $$.orgAreaOpacity); + }, + redrawArea: function redrawArea(drawArea, withTransition) { + var $$ = this; + + return [(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea).attr("d", drawArea).style("fill", this.color).style("opacity", function (d) { + return $$.isAreaRangeType(d) ? $$.orgAreaOpacity / 1.75 : $$.orgAreaOpacity; + })]; + }, + + + /** + * Generate area path data + * @param areaIndices + * @param isSub + * @return {function(*=): (*|string)} + * @private + */ + generateDrawArea: function generateDrawArea(areaIndices, isSub) { + var $$ = this, + config = $$.config, + lineConnectNull = config.line_connectNull, + isRotated = config.axis_rotated, + isGrouped = config.data_groups.length > 0, + getPoints = $$.generateGetAreaPoints(areaIndices, isSub), + yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale, + xValue = function (d) { + return (isSub ? $$.subxx : $$.xx).call($$, d); + }, + value0 = function (d, i) { + return isGrouped ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "high") : $$.getAreaBaseValue(d.id)); + }, + value1 = function (d, i) { + return isGrouped ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "low") : d.value); + }; + + return function (d) { + var values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values, + x0 = 0, + y0 = 0, + path = void 0; + + + if ($$.isAreaType(d)) { + var area = (0, _d3Shape.area)(); + + area = isRotated ? area.y(xValue).x0(value0).x1(value1) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1), lineConnectNull || (area = area.defined(function (d) { + return $$.getBaseValue(d) !== null; + })), $$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = area.curve($$.getCurve(d))(values); + } else values[0] && (x0 = $$.x(values[0].x), y0 = $$.getYScale(d.id)(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0; + + return path || "M 0 0"; + }; + }, + getAreaBaseValue: function getAreaBaseValue() { + return 0; + }, + generateGetAreaPoints: function generateGetAreaPoints(areaIndices, isSub) { + // partial duplication of generateGetBarPoints + var $$ = this, + config = $$.config, + areaTargetsNum = areaIndices.__max__ + 1, + x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub), + y = $$.getShapeY(!!isSub), + areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub), + yScale = isSub ? $$.getSubYScale : $$.getYScale; + + + return function (d, i) { + var y0 = yScale.call($$, d.id)(0), + offset = areaOffset(d, i) || y0, + posX = x(d), + posY = y(d); // offset is for stacked area chart + + + // fix posY not to overflow opposite quadrant + + // 1 point that marks the area position + return config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility + [posX, offset] // needed for compatibility + ]; + }; + }, + updateCircle: function updateCircle() { + var $$ = this; + + $$.config.point_show && ($$.mainCircle = $$.main.selectAll("." + _classes2.default.circles).selectAll("." + _classes2.default.circle).data(function (d) { + return !$$.isBarType(d) && (!$$.isLineType(d) || $$.shouldDrawPointsForLine(d)) && $$.labelishData(d); + }), $$.mainCircle.exit().remove(), $$.mainCircle = $$.mainCircle.enter().append($$.point("create", this, $$.classCircle.bind($$), $$.pointR.bind($$), $$.color)).merge($$.mainCircle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$))); + }, + redrawCircle: function redrawCircle(cx, cy, withTransition, flow) { + var $$ = this, + selectedCircles = $$.main.selectAll("." + _classes2.default.selectedCircle); + + + if (!$$.config.point_show) return []; + + var mainCircles = []; + + $$.mainCircle.each(function (d) { + var fn = $$.point("update", $$, cx, cy, $$.opacityForCircle.bind($$), $$.color, withTransition, flow, selectedCircles).bind(this), + result = fn(d); + mainCircles.push(result); + }); + + + var posAttr = $$.isCirclePoint() ? "c" : ""; + + return [mainCircles, selectedCircles.attr(posAttr + "x", cx).attr(posAttr + "y", cy)]; + }, + circleX: function circleX(d) { + var $$ = this, + hasValue = (0, _util.isValue)(d.x); + + + return $$.config.zoom_enabled && $$.zoomScale ? hasValue ? $$.zoomScale(d.x) : null : hasValue ? $$.x(d.x) : null; + }, + updateCircleY: function updateCircleY() { + var $$ = this, + lineIndices = void 0, + getPoints = void 0; + $$.config.data_groups.length > 0 ? (lineIndices = $$.getShapeIndices($$.isLineType), getPoints = $$.generateGetLinePoints(lineIndices), $$.circleY = function (d, i) { + return getPoints(d, i)[0][1]; + }) : $$.circleY = function (d) { + return $$.getYScale(d.id)($$.getBaseValue(d)); + }; + }, + getCircles: function getCircles(i, id) { + var $$ = this, + suffix = (0, _util.isValue)(i) ? "-" + i : ""; + + + return (id ? $$.main.selectAll("." + _classes2.default.circles + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.circle + suffix); + }, + expandCircles: function expandCircles(i, id, reset) { + var $$ = this, + r = $$.pointExpandedR.bind($$); + reset && $$.unexpandCircles(); + var circles = $$.getCircles(i, id).classed(_classes2.default.EXPANDED, !0), + scale = r(circles) / $$.config.point_r; + $$.isCirclePoint() ? circles.attr("r", r) : circles.each(function () { + var point = (0, _d3Selection.select)(this), + box = this.getBBox(), + x1 = box.x + box.width * .5, + y1 = box.y + box.height * .5; + this.tagName === "circle" ? point.attr("r", r) : point.style("transform", "translate(" + (1 - scale) * x1 + "px, " + (1 - scale) * y1 + "px) scale(" + scale + ")"); + }); + }, + unexpandCircles: function unexpandCircles(i) { + var $$ = this, + r = $$.pointR.bind($$), + circles = $$.getCircles(i).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED); + }).classed(_classes2.default.EXPANDED, !1); + circles.attr("r", r), $$.isCirclePoint() || circles.style("transform", "scale(" + r(circles) / $$.config.point_r + ")"); + }, + pointR: function (d) { + var $$ = this, + config = $$.config, + pointR = config.point_r, + r = pointR; + + + return $$.isStepType(d) ? r = 0 : $$.isBubbleType(d) ? r = $$.getBubbleR(d) : (0, _util.isFunction)(pointR) && (r = pointR(d)), r; + }, + pointExpandedR: function pointExpandedR(d) { + var $$ = this, + config = $$.config, + scale = $$.isBubbleType(d) ? 1.15 : 1.75; + + + return config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d); + }, + pointSelectR: function pointSelectR(d) { + var $$ = this, + selectR = $$.config.point_select_r; + + + return (0, _util.isFunction)(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4; + }, + isWithinCircle: function isWithinCircle(node, r) { + var mouse = (0, _d3Selection.mouse)(node), + element = (0, _d3Selection.select)(node), + prefix = this.isCirclePoint() ? "c" : "", + cx = +element.attr(prefix + "x"), + cy = +element.attr(prefix + "y"); + + + // if node don't have cx/y or x/y attribute value + if (!(cx || cy) && node.nodeType === 1) { + var domRect = node.getBBox ? node.getBBox() : node.getBoundingClientRect(); + + cx = domRect.x, cy = domRect.y; + } + + return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r; + }, + isWithinStep: function isWithinStep(that, y) { + return Math.abs(y - (0, _d3Selection.mouse)(that)[1]) < 30; + }, + shouldDrawPointsForLine: function shouldDrawPointsForLine(d) { + var linePoint = this.config.line_point; + + return linePoint === !0 || (0, _util.isArray)(linePoint) && linePoint.indexOf(d.id) !== -1; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 24 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + hasValidPointType: function hasValidPointType(type) { + return (/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type) + ); + }, + hasValidPointDrawMethods: function hasValidPointDrawMethods(type) { + var pointType = type || this.config.point_type; + + return (0, _util.isObjectType)(pointType) && (0, _util.isFunction)(pointType.create) && (0, _util.isFunction)(pointType.update); + }, + insertPointInfoDefs: function insertPointInfoDefs(point, id) { + var $$ = this, + parser = new DOMParser(), + doc = parser.parseFromString(point, "image/svg+xml"), + node = doc.firstChild, + clone = document.createElementNS(_d3Selection.namespaces.svg, node.nodeName.toLowerCase()), + attribs = node.attributes; + + + for (var name, i = 0; name = attribs[i]; i++) name = name.name, clone.setAttribute(name, node.getAttribute(name)); + + clone.id = id, clone.style.fill = "inherit", clone.style.stroke = "inherit", node.children.length && (clone.innerHTML = (0, _util.toArray)(node.children).map(function (v) { + return v.outerHTML; + }).join("")), $$.defs.node().appendChild(clone); + }, + pointFromDefs: function pointFromDefs(id) { + return this.defs.select("#" + id); + }, + generatePoint: function generatePoint() { + var $$ = this, + config = $$.config, + ids = [], + pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type]; + + + return function (method, context) { + for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key]; + + return function (d) { + var id = d.id || d.data && d.data.id || d, + element = (0, _d3Selection.select)(this), + point = void 0; + + + if (ids.indexOf(id) < 0 && ids.push(id), point = pattern[ids.indexOf(id) % pattern.length], $$.hasValidPointType(point)) point = $$[point];else if (!$$.hasValidPointDrawMethods(point)) { + var pointId = $$.datetimeId + "-point-" + id, + pointFromDefs = $$.pointFromDefs(pointId); + + + if (pointFromDefs.size() < 1 && $$.insertPointInfoDefs(point, pointId), method === "create") return $$.custom.create.bind(context).apply(undefined, [element, pointId].concat(args)); + if (method === "update") return $$.custom.update.bind(context).apply(undefined, [element].concat(args)); + } + + return point[method].bind(context).apply(undefined, [element].concat(args)); + }; + }; + }, + getTransitionName: function getTransitionName() { + return Math.random().toString(); + }, + + + custom: { + create: function create(element, id, cssClassFn, sizeFn, fillStyleFn) { + return element.append("use").attr("xlink:href", "#" + id).attr("class", cssClassFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + box = element.node().getBBox(); + box.width /= 2, box.height /= 2; + + var xPosFn2 = function (d) { + return xPosFn(d) - box.width; + }, + yPosFn2 = function (d) { + return yPosFn(d) - box.height; + }, + mainCircles = element; + + if (withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = element.attr("x", xPosFn2)), mainCircles = element.transition(transitionName).attr("x", xPosFn2).attr("y", yPosFn2).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = element.attr("x", xPosFn2).attr("y", yPosFn2); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + }, + + // 'circle' data point + circle: { + create: function create(element, cssClassFn, sizeFn, fillStyleFn) { + return element.append("circle").attr("class", cssClassFn).attr("r", sizeFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + mainCircles = element; + + // when '.load()' called, bubble size should be updated + + if ($$.hasType("bubble") && (mainCircles = mainCircles.attr("r", $$.pointR.bind($$))), withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = mainCircles.attr("cx", xPosFn)), mainCircles = mainCircles.transition(transitionName).attr("cx", xPosFn).attr("cy", yPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = mainCircles.attr("cx", xPosFn).attr("cy", yPosFn); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + }, + + // 'rectangle' data point + rectangle: { + create: function create(element, cssClassFn, sizeFn, fillStyleFn) { + var rectSizeFn = function (d) { + return sizeFn(d) * 2; + }; + + return element.append("rect").attr("class", cssClassFn).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node(); + }, + update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) { + var $$ = this, + r = $$.config.point_r, + rectXPosFn = function (d) { + return xPosFn(d) - r; + }, + rectYPosFn = function (d) { + return yPosFn(d) - r; + }, + mainCircles = element; + + if (withTransition) { + var transitionName = $$.getTransitionName(); + + flow && (mainCircles = mainCircles.attr("x", rectXPosFn)), mainCircles = mainCircles.transition(transitionName).attr("x", rectXPosFn).attr("y", rectYPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName()); + } else mainCircles = mainCircles.attr("x", rectXPosFn).attr("y", rectYPosFn); + + return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn); + } + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 25 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Array = __webpack_require__(66), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get the position value + * @param {Boolean} isClockwise If the direction is clockwise + * @param {String} type Coordinate type 'x' or 'y' + * @param {Number} edge Number of edge + * @param {Number} pos The indexed position + * @param {Number} range + * @param {Number} ratio + * @return {number} + * @private + */ +function getPosition(isClockwise, type, edge, pos, range, ratio) { + var index = isClockwise && pos > 0 ? edge - pos : pos, + r = 2 * Math.PI, + func = type === "x" ? Math.sin : Math.cos; + + + return range * (1 - ratio * func(index * r / edge)); +} + +// cache key +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var cacheKey = "$radarPoints"; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initRadar: function initRadar() { + var $$ = this, + config = $$.config; + $$.hasType("radar") && ($$.radars = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartRadars), $$.radars.levels = $$.radars.append("g").attr("class", _classes2.default.levels), $$.radars.axes = $$.radars.append("g").attr("class", _classes2.default.axis), $$.radars.shapes = $$.radars.append("g").attr("class", _classes2.default.shapes), $$.maxValue = config.radar_axis_max || $$.getMinMaxData().max[0].value); + }, + getRadarSize: function getRadarSize() { + var $$ = this, + config = $$.config, + padding = config.axis_x_categories.length < 4 ? -20 : 10, + size = (Math.min($$.arcWidth, $$.arcHeight) - padding) / 2; + + + return [size, size]; + }, + updateTargetsForRadar: function updateTargetsForRadar(targets) { + var $$ = this, + config = $$.config; + (0, _util.isEmpty)(config.axis_x_categories) && (config.axis_x_categories = (0, _d3Array.range)(0, (0, _d3Array.max)(targets).values.length)), $$.generateRadarPoints(); + }, + getRadarPosition: function getRadarPosition(type, index, range, ratio) { + var $$ = this, + config = $$.config, + _$$$getRadarSize = $$.getRadarSize(), + width = _$$$getRadarSize[0], + height = _$$$getRadarSize[1], + edge = config.axis_x_categories.length, + isClockwise = config.radar_direction_clockwise, + pos = (0, _util.toArray)(type).map(function (v) { + return getPosition(isClockwise, v, edge, index, (0, _util.isDefined)(range) ? range : type === "x" ? width : height, ratio || config.radar_size_ratio); + }); + + return pos.length === 1 ? pos[0] : pos; + }, + + + /** + * Generate data points + * @private + */ + generateRadarPoints: function generateRadarPoints() { + var $$ = this, + config = $$.config, + targets = $$.data.targets, + _$$$getRadarSize2 = $$.getRadarSize(), + width = _$$$getRadarSize2[0], + height = _$$$getRadarSize2[1], + points = $$.getCache(cacheKey) || {}, + size = points._size; + + // recalculate position only when the previous dimension has been changed + if (!size || size.width !== width && size.height !== height) { + var getRatio = function (v) { + return parseFloat(Math.max(v, 0)) / $$.maxValue * config.radar_size_ratio; + }; + + targets.forEach(function (d) { + points[d.id] = d.values.map(function (v, i) { + return $$.getRadarPosition(["x", "y"], i, undefined, getRatio(v.value)); + }); + }), points._size = { width: width, height: height }, $$.addCache(cacheKey, points); + } + }, + redrawRadar: function redrawRadar(duration, durationForExit) { + var $$ = this, + translate = $$.getTranslate("radar"); + + + // Adjust radar, circles and texts' position + translate && ($$.radars.attr("transform", translate), $$.main.selectAll("." + _classes2.default.circles).attr("transform", translate), $$.main.select("." + _classes2.default.chartTexts).attr("transform", translate), $$.generateRadarPoints(), $$.updateRadarLevel(), $$.updateRadarAxes(), $$.updateRadarShape(duration, durationForExit)); + }, + generateGetRadarPoints: function generateGetRadarPoints() { + var $$ = this, + points = $$.getCache(cacheKey); + + + return function (d, i) { + var point = points[d.id][i]; + + return [point, point, point, point]; + }; + }, + updateRadarLevel: function updateRadarLevel() { + var $$ = this, + config = $$.config, + _$$$getRadarSize3 = $$.getRadarSize(), + width = _$$$getRadarSize3[0], + height = _$$$getRadarSize3[1], + depth = config.radar_level_depth, + edge = config.axis_x_categories.length, + showText = config.radar_level_text_show, + radarLevels = $$.radars.levels, + levelData = (0, _d3Array.range)(0, depth), + radius = config.radar_size_ratio * Math.min(width, height), + levelRatio = levelData.map(function (l) { + return radius * ((l + 1) / depth); + }), + levelTextFormat = config.radar_level_text_format, + points = levelData.map(function (v) { + var range = levelRatio[v], + pos = (0, _d3Array.range)(0, edge).map(function (i) { + return $$.getRadarPosition(["x", "y"], i, range, 1).join(","); + }); + + + return pos.join(" "); + }), + level = radarLevels.selectAll("." + _classes2.default.level).data(levelData); + + // Generate points + level.exit().remove(); + + + var levelEnter = level.enter().append("g").attr("class", function (d, i) { + return _classes2.default.level + " " + _classes2.default.level + "-" + i; + }); + + levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden"), showText && (radarLevels.select("text").empty() && radarLevels.append("text").attr("dx", "-.5em").attr("dy", "-.7em").style("text-anchor", "end").text(function () { + return levelTextFormat(0); + }), levelEnter.append("text").attr("dx", "-.5em").style("text-anchor", "end").text(function (d) { + return levelTextFormat($$.maxValue / levelData.length * (d + 1)); + })), levelEnter.merge(level).attr("transform", function (d) { + return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")"; + }).selectAll("polygon").attr("points", function (d) { + return points[d]; + }), showText && radarLevels.selectAll("text").attr("x", function (d) { + return (0, _util.isUndefined)(d) ? width : points[d].split(",")[0]; + }).attr("y", function (d) { + return (0, _util.isUndefined)(d) ? height : 0; + }); + }, + updateRadarAxes: function updateRadarAxes() { + var $$ = this, + config = $$.config, + _$$$getRadarSize4 = $$.getRadarSize(), + width = _$$$getRadarSize4[0], + height = _$$$getRadarSize4[1], + categories = config.axis_x_categories, + axis = $$.radars.axes.selectAll("g").data(categories);axis.exit().remove(); + + + var axisEnter = axis.enter().append("g").attr("class", function (d, i) { + return _classes2.default.axis + "-" + i; + }); + + config.radar_axis_line_show && axisEnter.append("line"), config.radar_axis_text_show && axisEnter.append("text"), axis = axisEnter.merge(axis), config.radar_axis_line_show && axis.select("line").attr("x1", width).attr("y1", height).attr("x2", function (d, i) { + return $$.getRadarPosition("x", i); + }).attr("y2", function (d, i) { + return $$.getRadarPosition("y", i); + }), config.radar_axis_text_show && axis.select("text").style("text-anchor", "middle").attr("dy", ".5em").text(function (d) { + return d; + }).datum(function (d, i) { + return { index: i }; + }).attr("x", function (d, i) { + return $$.getRadarPosition("x", i, undefined, 1); + }).attr("y", function (d, i) { + return $$.getRadarPosition("y", i, undefined, 1); + }), $$.bindEvent(); + }, + bindEvent: function bindEvent() { + var _this = this, + $$ = this, + config = $$.config; + + if (config.interaction_enabled) { + var isMouse = $$.inputType === "mouse"; + + $$.radars.select("." + _classes2.default.axis).on((isMouse ? "mouseover " : "") + "click", function () { + if (!$$.transiting) // skip while transiting + { + var target = (0, _d3Selection.select)(_d3Selection.event.target), + index = target.datum().index; + $$.selectRectForSingle($$.svg.node(), null, index), $$.setOver(index); + } + }).on("mouseout", isMouse ? function () { + _this.hideTooltip(), _this.unexpandCircles(); + } : null); + } + }, + updateRadarShape: function updateRadarShape(duration, durationForExit) { + var $$ = this, + targets = $$.data.targets, + points = $$.getCache(cacheKey), + areas = $$.radars.shapes.selectAll("polygon").data(targets), + areasEnter = areas.enter().append("g").attr("class", $$.classChartRadar.bind($$)); + areas.exit().transition().duration(durationForExit).remove(), areasEnter.append("polygon").merge(areas).transition().duration(duration).style("fill", function (d) { + return $$.color(d); + }).style("stroke", function (d) { + return $$.color(d); + }).attr("points", function (d) { + return points[d.id].join(" "); + }); + }, + + + /** + * Get data point x coordinate + * @param {Object} d Data object + * @return {Number} + * @private + */ + radarCircleX: function radarCircleX(d) { + return this.getCache(cacheKey)[d.id][d.index][0]; + }, + + + /** + * Get data point y coordinate + * @param {Object} d Data object + * @return {Number} + * @private + */ + radarCircleY: function radarCircleY(d) { + return this.getCache(cacheKey)[d.id][d.index][1]; + } +}); + +/***/ }), +/* 26 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the text + * @private + */ + initText: function initText() { + var $$ = this; + + $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartTexts), $$.mainText = (0, _d3Selection.selectAll)([]); + }, + + + /** + * Update chartText + * @private + * @param {Object} $$.data.targets + */ + updateTargetsForText: function updateTargetsForText(targets) { + var $$ = this, + classChartText = $$.classChartText.bind($$), + classTexts = $$.classTexts.bind($$), + classFocus = $$.classFocus.bind($$), + mainTextUpdate = $$.main.select("." + _classes2.default.chartTexts).selectAll("." + _classes2.default.chartText).data(targets).attr("class", function (d) { + return classChartText(d) + classFocus(d); + }), + mainTextEnter = mainTextUpdate.enter().append("g").attr("class", classChartText).style("opacity", "0").style("pointer-events", "none"); + mainTextEnter.append("g").attr("class", classTexts); + }, + + + /** + * Update text + * @private + * @param {Number} Fade-out transition duration + */ + updateText: function updateText(durationForExit) { + var _this = this, + $$ = this, + config = $$.config, + dataFn = $$.labelishData.bind($$), + classText = $$.classText.bind($$); + + $$.mainText = $$.main.selectAll("." + _classes2.default.texts).selectAll("." + _classes2.default.text).data(function (d) { + return _this.isRadarType(d) ? d.values : dataFn(d); + }), $$.mainText.exit().transition().duration(durationForExit).style("fill-opacity", "0").remove(), $$.mainText = $$.mainText.enter().append("text").merge($$.mainText).attr("class", classText).attr("text-anchor", function (d) { + return config.axis_rotated ? d.value < 0 ? "end" : "start" : "middle"; + }).style("stroke", "none").style("fill", function (d) { + return $$.color(d); + }).style("fill-opacity", "0").text(function (d, i, j) { + return $$.dataLabelFormat(d.id)(d.value, d.id, i, j); + }); + }, + + + /** + * Redraw chartText + * @private + * @param {Number} x Attribute + * @param {Number} y Attribute + * @param {Object} options.flow + * @param {Boolean} indicates transition is enabled + * @returns {Object} $$.mainText + */ + redrawText: function redrawText(xForText, yForText, forFlow, withTransition) { + return [(withTransition ? this.mainText.transition() : this.mainText).attr("x", xForText).attr("y", yForText).style("fill", this.color).style("fill-opacity", forFlow ? 0 : this.opacityForText.bind(this))]; + }, + + + /** + * Gets the getBoundingClientRect value of the element + * @private + * @param {HTMLElement|d3.selection} textVal + * @param {String} className + * @param {HTMLElement|d3.selection} elementVal + * @returns {Object} value of element.getBoundingClientRect() + */ + getTextRect: function getTextRect(textVal, className, elementVal) { + var text = (textVal.node ? textVal.node() : textVal).textContent, + element = elementVal.node ? elementVal.node() : elementVal, + dummy = (0, _d3Selection.select)("body").append("div").classed("bb", !0), + svg = dummy.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "0px").style("left", "0px"), + font = (0, _d3Selection.select)(element).style("font"), + rect = void 0; + + + return svg.selectAll(".dummy").data([text]).enter().append("text").classed(className, !!className).style("font", font).text(text).each(function () { + rect = this.getBoundingClientRect(); + }), dummy.remove(), rect; + }, + + + /** + * Gets the x or y coordinate of the text + * @private + * @param {Object} area Indices + * @param {Object} bar Indices + * @param {Object} line Indices + * @param {Boolean} whether or not to x + * @returns {Number} coordinates + */ + generateXYForText: function generateXYForText(areaIndices, barIndices, lineIndices, forX) { + var $$ = this, + getAreaPoints = $$.generateGetAreaPoints(areaIndices, !1), + getBarPoints = $$.generateGetBarPoints(barIndices, !1), + getLinePoints = $$.generateGetLinePoints(lineIndices, !1), + getRadarPoints = $$.generateGetRadarPoints(), + getter = forX ? $$.getXForText : $$.getYForText; + + + return function (d, i) { + var getPoints = $$.isAreaType(d) && getAreaPoints || $$.isBarType(d) && getBarPoints || $$.isRadarType(d) && getRadarPoints || getLinePoints; + + return getter.call($$, getPoints(d, i), d, this); + }; + }, + + + /** + * Gets the x coordinate of the text + * @private + * @param {Object} points + * @param {Object} data + * @param {HTMLElement} element + * @returns {Number} x coordinate + */ + getXForText: function getXForText(points, d, textElement) { + var $$ = this, + config = $$.config, + xPos = void 0, + padding = void 0; + + + return config.axis_rotated ? (padding = $$.isBarType(d) ? 4 : 6, xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1)) : xPos = $$.hasType("bar") ? (points[2][0] + points[0][0]) / 2 : points[0][0], d.value === null && (xPos > $$.width ? xPos = $$.width - textElement.getBoundingClientRect().width : xPos < 0 && (xPos = 4)), xPos + (config.data_labels_position.x || 0); + }, + + + /** + * Gets the y coordinate of the text + * @private + * @param {Object} points + * @param {Object} data + * @param {HTMLElement} element + * @returns {Number} y coordinate + */ + getYForText: function getYForText(points, d, textElement) { + var $$ = this, + config = $$.config, + r = config.point_r, + baseY = 3, + yPos = void 0; + + + if (config.axis_rotated) yPos = (points[0][0] + points[2][0] + textElement.getBoundingClientRect().height * .6) / 2;else if (yPos = points[2][1], (0, _util.isNumber)(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d)) && (baseY += config.point_r / 2.3), d.value < 0 || d.value === 0 && !$$.hasPositiveValue) yPos += textElement.getBoundingClientRect().height, $$.isBarType(d) && $$.isSafari() ? yPos -= baseY : !$$.isBarType(d) && $$.isChrome() && (yPos += baseY);else { + var diff = -baseY * 2; + + $$.isBarType(d) ? diff = -baseY : $$.isBubbleType(d) && (diff = baseY), yPos += diff; + } + + // show labels regardless of the domain if value is null + if (d.value === null && !config.axis_rotated) { + var boxHeight = textElement.getBoundingClientRect().height; + + yPos < boxHeight ? yPos = boxHeight : yPos > this.height && (yPos = this.height - 4); + } + + return yPos + (config.data_labels_position.y || 0); + } +}); + +/***/ }), +/* 27 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + setTargetType: function setTargetType(targetIds, type) { + var $$ = this, + config = $$.config; + $$.mapToTargetIds(targetIds).forEach(function (id) { + $$.withoutFadeIn[id] = type === config.data_types[id], config.data_types[id] = type; + }), targetIds || (config.data_type = type); + }, + hasType: function hasType(type, targetsValue) { + var $$ = this, + types = $$.config.data_types, + targets = targetsValue || $$.data.targets, + has = !1; + + + return targets && targets.length ? targets.forEach(function (target) { + var t = types[target.id]; + + (t && t.indexOf(type) >= 0 || !t && type === "line") && (has = !0); + }) : Object.keys(types).length ? Object.keys(types).forEach(function (id) { + types[id] === type && (has = !0); + }) : has = $$.config.data_type === type, has; + }, + + + /** + * Check if contains arc types chart + * @param {Object} targets + * @param {Array} exclude Excluded types + * @return {boolean} + * @private + */ + hasArcType: function hasArcType(targets) { + var _this = this, + exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [], + types = ["pie", "donut", "gauge", "radar"].filter(function (v) { + return exclude.indexOf(v) === -1; + }); + + return !types.every(function (v) { + return !_this.hasType(v, targets); + }); + }, + isLineType: function isLineType(d) { + var id = (0, _util.isString)(d) ? d : d.id; + + return !this.config.data_types[id] || this.isTypeOf(id, ["line", "spline", "area", "area-spline", "area-spline-range", "area-line-range", "step", "area-step"]); + }, + isTypeOf: function isTypeOf(d, type) { + var id = (0, _util.isString)(d) ? d : d.id, + dataType = this.config.data_types[id]; + + + return (0, _util.isArray)(type) ? type.indexOf(dataType) >= 0 : dataType === type; + }, + isStepType: function isStepType(d) { + return this.isTypeOf(d, ["step", "area-step"]); + }, + isSplineType: function isSplineType(d) { + return this.isTypeOf(d, ["spline", "area-spline", "area-spline-range"]); + }, + isAreaType: function isAreaType(d) { + return this.isTypeOf(d, ["area", "area-spline", "area-spline-range", "area-line-range", "area-step"]); + }, + isAreaRangeType: function isAreaRangeType(d) { + return this.isTypeOf(d, ["area-spline-range", "area-line-range"]); + }, + isBarType: function isBarType(d) { + return this.isTypeOf(d, "bar"); + }, + isBubbleType: function isBubbleType(d) { + return this.isTypeOf(d, "bubble"); + }, + isScatterType: function isScatterType(d) { + return this.isTypeOf(d, "scatter"); + }, + isPieType: function isPieType(d) { + return this.isTypeOf(d, "pie"); + }, + isGaugeType: function isGaugeType(d) { + return this.isTypeOf(d, "gauge"); + }, + isDonutType: function isDonutType(d) { + return this.isTypeOf(d, "donut"); + }, + isRadarType: function isRadarType(d) { + return this.isTypeOf(d, "radar"); + }, + isArcType: function isArcType(d) { + return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isRadarType(d); + }, + + + // determine if is 'circle' data point + isCirclePoint: function isCirclePoint() { + var config = this.config, + pattern = config.point_pattern; + + + return config.point_type === "circle" && (!pattern || (0, _util.isArray)(pattern) && pattern.length === 0); + }, + lineData: function lineData(d) { + return this.isLineType(d) ? [d] : []; + }, + arcData: function arcData(d) { + return this.isArcType(d.data) ? [d] : []; + }, + barData: function barData(d) { + return this.isBarType(d) ? d.values : []; + }, + + + /** + * Get data adapt for data label showing + * @param {Object} d Data object + * @return {Array} + * @private + */ + labelishData: function labelishData(d) { + return this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isRadarType(d) ? d.values : []; + }, + barLineBubbleData: function barLineBubbleData(d) { + return this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : []; + }, + + + // https://github.com/d3/d3-shape#curves + isInterpolationType: function isInterpolationType(type) { + return ["basis", "basis-closed", "basis-open", "bundle", "cardinal", "cardinal-closed", "cardinal-open", "catmull-rom", "catmull-rom-closed", "catmull-rom-open", "linear", "linear-closed", "monotone-x", "monotone-y", "natural"].indexOf(type) >= 0; + } +}); + +/***/ }), +/* 28 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// Grid position and text anchor helpers +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var getGridTextAnchor = function (d) { + return (0, _util.isValue)(d.position) || "end"; +}, + getGridTextDx = function (d) { + return d.position === "start" ? 4 : d.position === "middle" ? 0 : -4; +}, + getGridTextX = function (isX, width, height) { + return function (d) { + var x = isX ? 0 : width; + + return d.position === "start" ? x = isX ? -height : 0 : d.position === "middle" && (x = (isX ? -height : width) / 2), x; + }; +}; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + initGrid: function initGrid() { + var $$ = this, + config = $$.config; + $$.xgrid = (0, _d3Selection.selectAll)([]), config.grid_lines_front || $$.initGridLines(), config.grid_front || $$.initXYFocusGrid(); + }, + initGridLines: function initGridLines() { + var $$ = this; + + $$.gridLines = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid + " " + _classes2.default.gridLines), $$.gridLines.append("g").attr("class", _classes2.default.xgridLines), $$.gridLines.append("g").attr("class", _classes2.default.ygridLines), $$.xgridLines = (0, _d3Selection.selectAll)([]); + }, + updateXGrid: function updateXGrid(withoutUpdate) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + xgridData = $$.generateGridData(config.grid_x_type, $$.x), + tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0; + $$.xgridAttr = isRotated ? { + "x1": 0, + "x2": $$.width, + "y1": function y1(d) { + return $$.x(d) - tickOffset; + }, + "y2": function y2(d) { + return $$.x(d) - tickOffset; + } + } : { + "x1": function x1(d) { + return $$.x(d) + tickOffset; + }, + "x2": function x2(d) { + return $$.x(d) + tickOffset; + }, + "y1": 0, + "y2": $$.height + }, $$.xgrid = $$.main.select("." + _classes2.default.xgrids).selectAll("." + _classes2.default.xgrid).data(xgridData), $$.xgrid.exit().remove(), $$.xgrid = $$.xgrid.enter().append("line").attr("class", _classes2.default.xgrid).merge($$.xgrid), withoutUpdate || $$.xgrid.each(function () { + var grid = (0, _d3Selection.select)(this); + + Object.keys($$.xgridAttr).forEach(function (id) { + grid.attr(id, $$.xgridAttr[id]).style("opacity", function () { + return grid.attr(isRotated ? "y1" : "x1") === (isRotated ? $$.height : 0) ? "0" : "1"; + }); + }); + }); + }, + updateYGrid: function updateYGrid() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks); + $$.ygrid = $$.main.select("." + _classes2.default.ygrids).selectAll("." + _classes2.default.ygrid).data(gridValues), $$.ygrid.exit().remove(), $$.ygrid = $$.ygrid.enter().append("line").attr("class", _classes2.default.ygrid).merge($$.ygrid), $$.ygrid.attr("x1", isRotated ? $$.y : 0).attr("x2", isRotated ? $$.y : $$.width).attr("y1", isRotated ? 0 : $$.y).attr("y2", isRotated ? $$.height : $$.y), $$.smoothLines($$.ygrid, "grid"); + }, + updateGrid: function updateGrid(duration) { + var $$ = this; + + // hide if arc type + $$.grid.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden"), $$.updateXGridLines(duration), $$.updateYGridLines(duration); + }, + + + /** + * Update X Grid lines + * @param {Number} duration + * @private + */ + updateXGridLines: function updateXGridLines(duration) { + var $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated; + config.grid_x_show && $$.updateXGrid(), $$.xgridLines = main.select("." + _classes2.default.xgridLines).selectAll("." + _classes2.default.xgridLine).data(config.grid_x_lines), $$.xgridLines.exit().transition().duration(duration).style("opacity", "0").remove(); + + + // enter + var xgridLine = $$.xgridLines.enter().append("g"); + + xgridLine.append("line").style("opacity", "0"), xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0"), $$.xgridLines = xgridLine.merge($$.xgridLines), $$.xgridLines.attr("class", function (d) { + return (_classes2.default.xgridLine + " " + (d.class || "")).trim(); + }).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).text(function (d) { + return d.text; + }).transition().style("opacity", "1"); + }, + + + /** + * Update Y Grid lines + * @param {Number} duration + * @private + */ + updateYGridLines: function updateYGridLines(duration) { + var $$ = this, + main = $$.main, + config = $$.config, + isRotated = config.axis_rotated; + config.grid_y_show && $$.updateYGrid(), $$.ygridLines = main.select("." + _classes2.default.ygridLines).selectAll("." + _classes2.default.ygridLine).data(config.grid_y_lines), $$.ygridLines.exit().transition().duration(duration).style("opacity", "0").remove(); + + + // enter + var ygridLine = $$.ygridLines.enter().append("g"); + + ygridLine.append("line").style("opacity", "0"), ygridLine.append("text").attr("transform", isRotated ? "rotate(-90)" : "").style("opacity", "0"), $$.ygridLines = ygridLine.merge($$.ygridLines); + + + // update + var yv = $$.yv.bind($$); + + $$.ygridLines.attr("class", function (d) { + return (_classes2.default.ygridLine + " " + (d.class || "")).trim(); + }).select("line").transition().duration(duration).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : $$.width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? $$.height : yv).transition().style("opacity", "1"), $$.ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).attr("dy", -5).attr("x", getGridTextX(isRotated, $$.width, $$.height)).attr("y", yv).text(function (d) { + return d.text; + }).transition().style("opacity", "1"); + }, + redrawGrid: function redrawGrid(withTransition) { + var $$ = this, + isRotated = $$.config.axis_rotated, + xv = $$.xv.bind($$), + lines = $$.xgridLines.select("line"), + texts = $$.xgridLines.select("text"); + + + return lines = (withTransition ? lines.transition() : lines).attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? $$.width : xv).attr("y1", isRotated ? xv : 0).attr("y2", isRotated ? xv : $$.height), texts = (withTransition ? texts.transition() : texts).attr("x", getGridTextX(!isRotated, $$.width, $$.height)).attr("y", xv).text(function (d) { + return d.text; + }), [(withTransition ? lines.transition() : lines).style("opacity", "1"), (withTransition ? texts.transition() : texts).style("opacity", "1")]; + }, + initXYFocusGrid: function initXYFocusGrid() { + var $$ = this, + config = $$.config; + $$.grid = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid), config.grid_x_show && $$.grid.append("g").attr("class", _classes2.default.xgrids), config.grid_y_show && $$.grid.append("g").attr("class", _classes2.default.ygrids), config.grid_focus_show && $$.grid.append("g").attr("class", _classes2.default.xgridFocus).append("line").attr("class", _classes2.default.xgridFocus); + }, + showXGridFocus: function showXGridFocus(selectedData) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + dataToShow = selectedData.filter(function (d) { + return d && (0, _util.isValue)($$.getBaseValue(d)); + }), + focusEl = $$.main.selectAll("line." + _classes2.default.xgridFocus), + xx = $$.xx.bind($$); + !config.tooltip_show || $$.hasType("bubble") || $$.hasType("scatter") || $$.hasArcType() || (focusEl.style("visibility", "visible").data([dataToShow[0]]).attr(isRotated ? "y1" : "x1", xx).attr(isRotated ? "y2" : "x2", xx), $$.smoothLines(focusEl, "grid")); + + // Hide when bubble/scatter plot exists + }, + hideXGridFocus: function hideXGridFocus() { + this.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden"); + }, + updateXgridFocus: function updateXgridFocus() { + var $$ = this, + isRotated = $$.config.axis_rotated; + $$.main.select("line." + _classes2.default.xgridFocus).attr("x1", isRotated ? 0 : -10).attr("x2", isRotated ? $$.width : -10).attr("y1", isRotated ? -10 : 0).attr("y2", isRotated ? -10 : $$.height); + }, + generateGridData: function generateGridData(type, scale) { + var $$ = this, + tickNum = $$.main.select("." + _classes2.default.axisX).selectAll(".tick").size(), + gridData = []; + + + if (type === "year") { + var xDomain = $$.getXDomain(), + firstYear = xDomain[0].getFullYear(), + lastYear = xDomain[1].getFullYear(); + + + for (var i = firstYear; i <= lastYear; i++) gridData.push(new Date(i + "-01-01 00:00:00")); + } else gridData = scale.ticks(10), gridData.length > tickNum && (gridData = gridData.filter(function (d) { + return (d + "").indexOf(".") < 0; + })); + + return gridData; + }, + getGridFilterToRemove: function getGridFilterToRemove(params) { + return params ? function (line) { + var found = !1; + + return ((0, _util.isArray)(params) ? params.concat() : [params]).forEach(function (param) { + ("value" in param && line.value === param.value || "class" in param && line.class === param.class) && (found = !0); + }), found; + } : function () { + return !0; + }; + }, + removeGridLines: function removeGridLines(params, forX) { + var $$ = this, + config = $$.config, + toRemove = $$.getGridFilterToRemove(params), + classLines = forX ? _classes2.default.xgridLines : _classes2.default.ygridLines, + classLine = forX ? _classes2.default.xgridLine : _classes2.default.ygridLine; + $$.main.select("." + classLines).selectAll("." + classLine).filter(toRemove).transition().duration(config.transition_duration).style("opacity", "0").remove(); + + + var gridLines = "grid_" + (forX ? "x" : "y") + "_lines"; + + config[gridLines] = config[gridLines].filter(function toShow(line) { + return !toRemove(line); + }); + } +}); + +/***/ }), +/* 29 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the tooltip + * @private + */ + initTooltip: function initTooltip() { + var $$ = this, + config = $$.config; + + + // Show tooltip if needed + if ($$.tooltip = $$.selectChart.style("position", "relative").append("div").attr("class", _classes2.default.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none"), config.tooltip_init_show) { + if ($$.isTimeSeries() && (0, _util.isString)(config.tooltip_init_x)) { + var targets = $$.data.targets[0], + i = void 0, + val = void 0; + + + for (config.tooltip_init_x = $$.parseDate(config.tooltip_init_x), i = 0; (val = targets.values[i]) && val.x - config.tooltip_init_x !== 0; i++); + + config.tooltip_init_x = i; + } + + $$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) { + return $$.addName(d.values[config.tooltip_init_x]); + }), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType(null, ["radar"])), $$.color)), $$.tooltip.style("top", config.tooltip_init_position.top).style("left", config.tooltip_init_position.left).style("display", "block"); + } + }, + + + /** + * Returns the tooltip content(HTML string) + * @param {Object} d data + * @param {Function} defaultTitleFormat Default title format + * @param {Function} defaultValueFormat Default format for each data value in the tooltip. + * @param {Function} color Color function + * @returns {String} html + * @private + */ + getTooltipContent: function getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) { + var $$ = this, + config = $$.config, + titleFormat = config.tooltip_format_title || defaultTitleFormat, + nameFormat = config.tooltip_format_name || function (name) { + return name; + }, + valueFormat = config.tooltip_format_value || defaultValueFormat, + order = config.tooltip_order, + getRowValue = function (row) { + return $$.getBaseValue(row); + }, + getBgColor = $$.levelColor ? function (row) { + return $$.levelColor(row.value); + } : function (row) { + return color(row.id); + }; + + if (order === null && config.data_groups.length) { + // for stacked data, order should aligned with the visually displayed data + var ids = $$.orderTargets($$.data.targets).map(function (i2) { + return i2.id; + }).reverse(); + + d.sort(function (a, b) { + var v1 = a ? a.value : null, + v2 = b ? b.value : null; + + + return v1 > 0 && v2 > 0 && (v1 = a.id ? ids.indexOf(a.id) : null, v2 = b.id ? ids.indexOf(b.id) : null), v1 - v2; + }); + } else if (/^(asc|desc)$/.test(order)) { + d.sort(function (a, b) { + var v1 = a ? getRowValue(a) : null, + v2 = b ? getRowValue(b) : null; + + + return order === "asc" ? v1 - v2 : v2 - v1; + }); + } else (0, _util.isFunction)(order) && d.sort(order); + + var text = void 0, + row = void 0, + param = void 0, + value = void 0; + + + for (var i = 0, len = d.length; i < len; i++) if ((row = d[i]) && (getRowValue(row) || getRowValue(row) === 0)) { + + if (!text) { + var title = (0, _util.sanitise)(titleFormat ? titleFormat(row.x) : row.x); + + text = "<table class=\"" + $$.CLASS.tooltip + "\">" + ((0, _util.isValue)(title) ? "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""); + } + + if (param = [row.ratio, row.id, row.index, d], $$.isAreaRangeType(row) ? (value = ["high", "low"].map(function (v) { + return (0, _util.sanitise)(valueFormat.apply(undefined, [$$.getAreaRangeData(row, v)].concat(param))); + }), value = "<b>Mid:</b> " + value + " <b>High:</b> " + value[0] + " <b>Low:</b> " + value[1]) : value = (0, _util.sanitise)(valueFormat.apply(undefined, [getRowValue(row)].concat(param))), value !== undefined) { + // Skip elements when their name is set to null + if (row.name === null) continue; + + var name = (0, _util.sanitise)(nameFormat.apply(undefined, [row.name].concat(param))), + bgcolor = getBgColor(row); + text += "<tr class=\"" + $$.CLASS.tooltipName + $$.getTargetSelectorSuffix(row.id) + "\"><td class=\"name\">", text += $$.patterns ? "<svg><rect style=\"fill:" + bgcolor + "\" width=\"10\" height=\"10\"></rect></svg>" : "<span style=\"background-color:" + bgcolor + "\"></span>", text += name + "</td><td class=\"value\">" + value + "</td></tr>"; + } + } + + return text + "</table>"; + }, + + + /** + * Returns the position of the tooltip + * @param {Object} dataToShow data + * @param {String} tWidth Width value of tooltip element + * @param {String} tHeight Height value of tooltip element + * @param {HTMLElement} element + * @returns {Object} top, left value + * @private + */ + tooltipPosition: function tooltipPosition(dataToShow, tWidth, tHeight, element) { + var $$ = this, + config = $$.config, + _d3Mouse = (0, _d3Selection.mouse)(element), + left = _d3Mouse[0], + top = _d3Mouse[1], + svgLeft = $$.getSvgLeft(!0), + chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight(); + + // Determine tooltip position + if (top += 20, $$.hasArcType()) { + var raw = $$.inputType === "touch" || $$.hasType("radar"); + + raw || (top += $$.height / 2, left += ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2); + } else { + var dataScale = $$.x(dataToShow[0].x); + + config.axis_rotated ? (top = dataScale + 20, left += svgLeft + 100, chartRight -= svgLeft) : (top -= 5, left = svgLeft + $$.getCurrentPaddingLeft(!0) + 20 + ($$.zoomScale ? left : dataScale)); + } + + var right = left + tWidth; + + return right > chartRight && (left -= right - chartRight + 20), top + tHeight > $$.currentHeight && (top -= tHeight + 30), top < 0 && (top = 0), { top: top, left: left }; + }, + + + /** + * Show the tooltip + * @private + * @param {Object} selectedData + * @param {HTMLElement} element + */ + showTooltip: function showTooltip(selectedData, element) { + var $$ = this, + config = $$.config, + forArc = $$.hasArcType(null, ["radar"]), + dataToShow = selectedData.filter(function (d) { + return d && (0, _util.isValue)($$.getBaseValue(d)); + }), + positionFunction = config.tooltip_position || $$.tooltipPosition; + + + if (dataToShow.length !== 0 && config.tooltip_show) { + var datum = $$.tooltip.datum(), + width = datum && datum.width || 0, + height = datum && datum.height || 0; + + + if (!datum || datum.current !== JSON.stringify(selectedData)) { + var html = config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color); + + (0, _util.callFn)(config.tooltip_onshow, $$), $$.tooltip.html(html).style("display", "block").datum({ + current: JSON.stringify(selectedData), + width: width = $$.tooltip.property("offsetWidth"), + height: height = $$.tooltip.property("offsetHeight") + }), (0, _util.callFn)(config.tooltip_onshown, $$), $$._handleLinkedCharts(!0, selectedData[0].index); + } + + // Get tooltip dimensions + var position = positionFunction.call(this, dataToShow, width, height, element); + + // Set tooltip position + $$.tooltip.style("top", position.top + "px").style("left", position.left + "px"); + } + }, + + + /** + * Hide the tooltip + * @private + */ + hideTooltip: function hideTooltip() { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.tooltip_onhide, $$), this.tooltip.style("display", "none").datum(null), (0, _util.callFn)(config.tooltip_onhidden, $$), $$._handleLinkedCharts(!1); + }, + + + /** + * Toggle display for linked chart instances + * @param {Boolean} show true: show, false: hide + * @param {Number} index x Axis index + * @private + */ + _handleLinkedCharts: function _handleLinkedCharts(show, index) { + var $$ = this; + + if ($$.config.tooltip_linked) { + var linkedName = $$.config.tooltip_linked_name; + + $$.api.internal.charts.forEach(function (c) { + if (c !== $$.api) { + var internal = c.internal, + isLinked = internal.config.tooltip_linked, + name = internal.config.tooltip_linked_name, + isInDom = document.body.contains(c.element); + + + if (isLinked && linkedName === name && isInDom) { + var isShowing = internal.tooltip.style("display") === "block"; + + // prevent throwing error for non-paired linked indexes + try { + isShowing ^ show && c.tooltip[isShowing ? "hide" : "show"]({ index: index }); + } catch (e) {} + } + } + }); + } + } +}); + +/***/ }), +/* 30 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the legend. + * @private + */ + initLegend: function initLegend() { + var $$ = this, + config = $$.config; + $$.legendItemTextBox = {}, $$.legendHasRendered = !1, $$.legend = $$.svg.append("g"), config.legend_show ? config.legend_contents_bindto && config.legend_contents_template ? $$.updateLegendTemplate() : ($$.legend.attr("transform", $$.getTranslate("legend")), $$.updateLegendWithDefaults()) : ($$.legend.style("visibility", "hidden"), $$.hiddenLegendIds = $$.mapToIds($$.data.targets)); + }, + + + /** + * Update legend using template option + * @private + */ + updateLegendTemplate: function updateLegendTemplate() { + var $$ = this, + config = $$.config, + wrapper = (0, _d3Selection.select)(config.legend_contents_bindto), + template = config.legend_contents_template; + + + if (!wrapper.empty()) { + var targets = $$.data.targets, + ids = [], + html = ""; + $$.mapToIds(targets).forEach(function (v) { + var content = (0, _util.isFunction)(template) ? template.call($$, v, $$.color(v), $$.api.data(v)[0].values) : template.replace(/{=COLOR}/g, $$.color(v)).replace(/{=TITLE}/g, v); + + content && (ids.push(v), html += content); + }); + + + var legendItem = wrapper.html(html).selectAll(function () { + return this.childNodes; + }).data(ids); + + $$.setLegendItem(legendItem); + } + }, + + + /** + * Update the legend to its default value. + * @private + */ + updateLegendWithDefaults: function updateLegendWithDefaults() { + var $$ = this; + + $$.updateLegend($$.mapToIds($$.data.targets), { + withTransform: !1, + withTransitionForTransform: !1, + withTransition: !1 + }); + }, + + + /** + * Update the size of the legend. + * @private + * @param {Number} height + * @param {Number} width + */ + updateSizeForLegend: function updateSizeForLegend(legendHeight, legendWidth) { + var $$ = this, + config = $$.config, + insetLegendPosition = { + top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y, + left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + .5 : $$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + .5 + }; + $$.margin3 = { + top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight, + right: NaN, + bottom: 0, + left: $$.isLegendRight ? $$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0 + }; + }, + + + /** + * Transform Legend + * @private + * @param {Boolean} whether or not to transition. + */ + transformLegend: function transformLegend(withTransition) { + var $$ = this; + + (withTransition ? $$.legend.transition() : $$.legend).attr("transform", $$.getTranslate("legend")); + }, + + + /** + * Update the legend step + * @private + * @param {Number} step + */ + updateLegendStep: function updateLegendStep(step) { + this.legendStep = step; + }, + + + /** + * Update legend item width + * @private + * @param {Number} width + */ + updateLegendItemWidth: function updateLegendItemWidth(w) { + this.legendItemWidth = w; + }, + + + /** + * Update legend item height + * @private + * @param {Number} height + */ + updateLegendItemHeight: function updateLegendItemHeight(h) { + this.legendItemHeight = h; + }, + + + /** + * Get the width of the legend + * @private + * @param {Number} width + */ + getLegendWidth: function getLegendWidth() { + var $$ = this; + + return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0; + }, + + + /** + * Get the height of the legend + * @private + * @param {Number} height + */ + getLegendHeight: function getLegendHeight() { + var $$ = this, + h = 0; + + return $$.config.legend_show && ($$.isLegendRight ? h = $$.currentHeight : h = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1)), h; + }, + + + /** + * Get the opacity of the legend + * @private + * @param {Object} d3.Select + * @returns {Number} opacity + */ + opacityForLegend: function opacityForLegend(legendItem) { + return legendItem.classed(_classes2.default.legendItemHidden) ? null : "1"; + }, + + + /** + * Get the opacity of the legend that is unfocused + * @private + * @param {Object} legendItem, d3.Select + * @returns {Number} opacity + */ + opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) { + return legendItem.classed(_classes2.default.legendItemHidden) ? null : "0.3"; + }, + + + /** + * Toggles the focus of the legend + * @private + * @param {Array} ID's of target + * @param {Boolean} whether or not to focus. + */ + toggleFocusLegend: function toggleFocusLegend(targetIds, focus) { + var $$ = this, + targetIdz = $$.mapToTargetIds(targetIds); + $$.legend.selectAll("." + _classes2.default.legendItem).filter(function (id) { + return targetIdz.indexOf(id) >= 0; + }).classed(_classes2.default.legendItemFocused, focus).transition().duration(100).style("opacity", function () { + var opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend; + + return opacity.call($$, (0, _d3Selection.select)(this)); + }); + }, + + + /** + * Revert the legend to its default state + * @private + */ + revertLegend: function revertLegend() { + var $$ = this; + + $$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemFocused, !1).transition().duration(100).style("opacity", function () { + return $$.opacityForLegend((0, _d3Selection.select)(this)); + }); + }, + + + /** + * Shows the legend + * @private + * @param {Array} ID's of target + */ + showLegend: function showLegend(targetIds) { + var $$ = this, + config = $$.config; + config.legend_show || (config.legend_show = !0, $$.legend.style("visibility", "visible"), !$$.legendHasRendered && $$.updateLegendWithDefaults()), $$.removeHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("visibility", "visible").transition().style("opacity", function () { + return $$.opacityForLegend((0, _d3Selection.select)(this)); + }); + }, + + + /** + * Hide the legend + * @private + * @param {Array} ID's of target + */ + hideLegend: function hideLegend(targetIds) { + var $$ = this, + config = $$.config; + config.legend_show && (0, _util.isEmpty)(targetIds) && (config.legend_show = !1, $$.legend.style("visibility", "hidden")), $$.addHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("opacity", "0").style("visibility", "hidden"); + }, + + + /** + * Clear the LegendItemTextBox cache. + * @private + */ + clearLegendItemTextBoxCache: function clearLegendItemTextBoxCache() { + this.legendItemTextBox = {}; + }, + + + /** + * Set legend item style & bind events + * @private + * @param {d3.selection} item + */ + setLegendItem: function setLegendItem(item) { + var $$ = this, + config = $$.config, + isTouch = $$.inputType === "touch"; + item.attr("class", function (id) { + var node = (0, _d3Selection.select)(this), + itemClass = !node.empty() && node.attr("class") || ""; + + + return itemClass + $$.generateClass(_classes2.default.legendItem, id); + }).style("visibility", function (id) { + return $$.isLegendToShow(id) ? "visible" : "hidden"; + }).style("cursor", "pointer").on("click", function (id) { + (0, _util.callFn)(config.legend_item_onclick, $$, id) || (_d3Selection.event.altKey ? ($$.api.hide(), $$.api.show(id)) : ($$.api.toggle(id), !isTouch && $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert())), isTouch && $$.hideTooltip(); + }), isTouch || item.on("mouseout", function (id) { + (0, _util.callFn)(config.legend_item_onout, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !1), $$.api.revert()); + }).on("mouseover", function (id) { + (0, _util.callFn)(config.legend_item_onover, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !0), !$$.transiting && $$.isTargetToShow(id) && $$.api.focus(id)); + }); + }, + + + /** + * Update the legend + * @private + * @param {Array} ID's of target + * @param {Object} withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition. + * @param {Object} the return value of the generateTransitions + */ + updateLegend: function updateLegend(targetIds, options, transitions) { + var $$ = this, + config = $$.config, + tileWidth = config.legend_item_tile_width + 5, + maxWidth = 0, + maxHeight = 0, + xForLegend = void 0, + yForLegend = void 0, + totalLength = 0, + offsets = {}, + widths = {}, + heights = {}, + margins = [0], + steps = {}, + step = 0, + background = void 0, + isLegendRightOrInset = $$.isLegendRight || $$.isLegendInset, + targetIdz = targetIds.filter(function (id) { + return !(0, _util.isDefined)(config.data_names[id]) || config.data_names[id] !== null; + }), + optionz = options || {}, + withTransition = (0, _util.getOption)(optionz, "withTransition", !0), + withTransitionForTransform = (0, _util.getOption)(optionz, "withTransitionForTransform", !0), + getTextBox = function (textElement, id) { + + return $$.legendItemTextBox[id] || ($$.legendItemTextBox[id] = $$.getTextRect(textElement, _classes2.default.legendItem, textElement)), $$.legendItemTextBox[id]; + }, + updatePositions = function (textElement, id, index) { + var isLast = index === targetIdz.length - 1, + box = getTextBox(textElement, id), + itemWidth = box.width + tileWidth + (isLast && !isLegendRightOrInset ? 0 : 10) + config.legend_padding, + itemHeight = box.height + 4, + itemLength = isLegendRightOrInset ? itemHeight : itemWidth, + areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(), + margin = void 0, + updateValues = function (id2, withoutStep) { + withoutStep || (margin = (areaLength - totalLength - itemLength) / 2, margin < 10 && (margin = (areaLength - itemLength) / 2, totalLength = 0, step++)), steps[id2] = step, margins[step] = $$.isLegendInset ? 10 : margin, offsets[id2] = totalLength, totalLength += itemLength; + }; + + // MEMO: care about condifion of step, totalLength + + + if (index === 0 && (totalLength = 0, step = 0, maxWidth = 0, maxHeight = 0), config.legend_show && !$$.isLegendToShow(id)) return widths[id] = 0, heights[id] = 0, steps[id] = 0, void (offsets[id] = 0); + + widths[id] = itemWidth, heights[id] = itemHeight, (!maxWidth || itemWidth >= maxWidth) && (maxWidth = itemWidth), (!maxHeight || itemHeight >= maxHeight) && (maxHeight = itemHeight); + + + var maxLength = isLegendRightOrInset ? maxHeight : maxWidth; + + config.legend_equally ? (Object.keys(widths).forEach(function (id2) { + return widths[id2] = maxWidth; + }), Object.keys(heights).forEach(function (id2) { + return heights[id2] = maxHeight; + }), margin = (areaLength - maxLength * targetIdz.length) / 2, margin < 10 ? (totalLength = 0, step = 0, targetIdz.forEach(function (id2) { + return updateValues(id2); + })) : updateValues(id, !0)) : updateValues(id); + }; + + // Skip elements when their name is set to null + + + $$.isLegendInset && (step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length, $$.updateLegendStep(step)), $$.isLegendRight ? (xForLegend = function (id) { + return maxWidth * steps[id]; + }, yForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }) : $$.isLegendInset ? (xForLegend = function (id) { + return maxWidth * steps[id] + 10; + }, yForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }) : (xForLegend = function (id) { + return margins[steps[id]] + offsets[id]; + }, yForLegend = function (id) { + return maxHeight * steps[id]; + }); + + var xForLegendText = function (id, i) { + return xForLegend(id, i) + 4 + config.legend_item_tile_width; + }, + xForLegendRect = function (id, i) { + return xForLegend(id, i); + }, + x1ForLegendTile = function (id, i) { + return xForLegend(id, i) - 2; + }, + x2ForLegendTile = function (id, i) { + return xForLegend(id, i) - 2 + config.legend_item_tile_width; + }, + yForLegendText = function (id, i) { + return yForLegend(id, i) + 9; + }, + yForLegendRect = function (id, i) { + return yForLegend(id, i) - 5; + }, + yForLegendTile = function (id, i) { + return yForLegend(id, i) + 4; + }, + l = $$.legend.selectAll("." + _classes2.default.legendItem).data(targetIdz).enter().append("g"); + + // Define g for legend area + + + $$.setLegendItem(l), l.append("text").text(function (id) { + return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id; + }).each(function (id, i) { + updatePositions(this, id, i); + }).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendText), l.append("rect").attr("class", _classes2.default.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendRect); + + + var usePoint = $$.config.legend_usePoint; + + if (usePoint) { + var ids = []; + + l.append(function (d) { + var pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type]; + + ids.indexOf(d) === -1 && ids.push(d); + + + var point = pattern[ids.indexOf(d) % pattern.length]; + + return point === "rectangle" && (point = "rect"), document.createElementNS(_d3Selection.namespaces.svg, $$.hasValidPointType(point) ? point : "use"); + }).attr("class", _classes2.default.legendItemPoint).style("fill", function (d) { + return $$.color(d); + }).style("pointer-events", "none").attr("href", function (data, idx, selection) { + var node = selection[idx], + nodeName = node.nodeName.toLowerCase(); + + + return nodeName === "use" ? "#" + $$.datetimeId + "-point-" + data : undefined; + }); + } else l.append("line").attr("class", _classes2.default.legendItemTile).style("stroke", $$.color).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : -200).attr("y1", isLegendRightOrInset ? -200 : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : -200).attr("y2", isLegendRightOrInset ? -200 : yForLegendTile).attr("stroke-width", config.legend_item_tile_height); + + // Set background for inset legend + background = $$.legend.select("." + _classes2.default.legendBackground + " rect"), $$.isLegendInset && maxWidth > 0 && background.size() === 0 && (background = $$.legend.insert("g", "." + _classes2.default.legendItem).attr("class", _classes2.default.legendBackground).append("rect")); + + + var texts = $$.legend.selectAll("text").data(targetIdz).text(function (id) { + return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id; + }) // MEMO: needed for update + .each(function (id, i) { + updatePositions(this, id, i); + }); + + (withTransition ? texts.transition() : texts).attr("x", xForLegendText).attr("y", yForLegendText); + + + var rects = $$.legend.selectAll("rect." + _classes2.default.legendItemEvent).data(targetIdz); + + if ((withTransition ? rects.transition() : rects).attr("width", function (id) { + return widths[id]; + }).attr("height", function (id) { + return heights[id]; + }).attr("x", xForLegendRect).attr("y", yForLegendRect), usePoint) { + var tiles = $$.legend.selectAll("." + _classes2.default.legendItemPoint).data(targetIdz); + + (withTransition ? tiles.transition() : tiles).each(function () { + var nodeName = this.nodeName.toLowerCase(), + pointR = $$.config.point_r, + x = "x", + y = "y", + xOffset = 2, + yOffset = 2.5, + radius = void 0, + width = void 0, + height = void 0; + + + if (nodeName === "circle") { + var size = pointR * .2; + + x = "cx", y = "cy", radius = pointR + size, xOffset = pointR * 2, yOffset = -size; + } else if (nodeName === "rect") { + var _size = pointR * 2.5; + + width = _size, height = _size, yOffset = 3; + } + + (0, _d3Selection.select)(this).attr(x, function (d) { + return x1ForLegendTile(d) + xOffset; + }).attr(y, function (d) { + return yForLegendTile(d) - yOffset; + }).attr("r", radius).attr("width", width).attr("height", height); + }); + } else { + var _tiles = $$.legend.selectAll("line." + _classes2.default.legendItemTile).data(targetIdz); + + (withTransition ? _tiles.transition() : _tiles).style("stroke", $$.color).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile); + } + + background && (withTransition ? background.transition() : background).attr("height", $$.getLegendHeight() - 12).attr("width", maxWidth * (step + 1) + 10), $$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemHidden, function (id) { + return !$$.isTargetToShow(id); + }), $$.updateLegendItemWidth(maxWidth), $$.updateLegendItemHeight(maxHeight), $$.updateLegendStep(step), $$.updateSizes(), $$.updateScales(!withTransition), $$.updateSvgSize(), $$.transformAll(withTransitionForTransform, transitions), $$.legendHasRendered = !0; + } +}); + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initializes the title + * @private + */ + initTitle: function initTitle() { + var $$ = this; + + $$.title = $$.svg.append("text").text($$.config.title_text).attr("class", $$.CLASS.title); + }, + + + /** + * Redraw title + * @private + */ + redrawTitle: function redrawTitle() { + var $$ = this; + + $$.title.attr("x", $$.xForTitle.bind($$)).attr("y", $$.yForTitle.bind($$)); + }, + + + /** + * Returns the x attribute value of the title + * @private + * @returns {Number} x attribute value + */ + xForTitle: function xForTitle() { + var $$ = this, + config = $$.config, + position = config.title_position || "left", + x = void 0; + + + return x = position.indexOf("right") >= 0 ? $$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width - config.title_padding.right : position.indexOf("center") >= 0 ? ($$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width) / 2 : config.title_padding.left, x; + }, + + + /** + * Returns the y attribute value of the title + * @private + * @returns {Number} y attribute value + */ + yForTitle: function yForTitle() { + var $$ = this; + + return $$.config.title_padding.top + $$.getTextRect($$.title, $$.CLASS.title, $$.title).height; + }, + + + /** + * Get title padding + * @private + * @returns {Number} padding value + */ + getTitlePadding: function getTitlePadding() { + var $$ = this; + + return $$.yForTitle() + $$.config.title_padding.bottom; + } +}); + +/***/ }), +/* 32 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + getClipPath: function getClipPath(id) { + var $$ = this, + config = $$.config; + + + if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) return null; + + var isIE9 = window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0; + + return "url(" + (isIE9 ? "" : document.URL.split("#")[0]) + "#" + id + ")"; + }, + appendClip: function appendClip(parent, id) { + return parent.append("clipPath").attr("id", id).append("rect"); + }, + getAxisClipX: function getAxisClipX(forHorizontal) { + // axis line width + padding for left + var left = Math.max(30, this.margin.left); + + return forHorizontal ? -(1 + left) : -(left - 1); + }, + getAxisClipY: function getAxisClipY(forHorizontal) { + return forHorizontal ? -20 : -this.margin.top; + }, + getXAxisClipX: function getXAxisClipX() { + var $$ = this; + + return $$.getAxisClipX(!$$.config.axis_rotated); + }, + getXAxisClipY: function getXAxisClipY() { + var $$ = this; + + return $$.getAxisClipY(!$$.config.axis_rotated); + }, + getYAxisClipX: function getYAxisClipX() { + var $$ = this; + + return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated); + }, + getYAxisClipY: function getYAxisClipY() { + var $$ = this; + + return $$.getAxisClipY($$.config.axis_rotated); + }, + getAxisClipWidth: function getAxisClipWidth(forHorizontal) { + var $$ = this, + left = Math.max(30, $$.margin.left), + right = Math.max(30, $$.margin.right); + + + // width + axis line width + padding for left/right + return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20; + }, + getAxisClipHeight: function getAxisClipHeight(forHorizontal) { + // less than 20 is not enough to show the axis label 'outer' without legend + return (forHorizontal ? this.margin.bottom : this.margin.top + this.height) + 20; + }, + getXAxisClipWidth: function getXAxisClipWidth() { + var $$ = this; + + return $$.getAxisClipWidth(!$$.config.axis_rotated); + }, + getXAxisClipHeight: function getXAxisClipHeight() { + var $$ = this; + + return $$.getAxisClipHeight(!$$.config.axis_rotated); + }, + getYAxisClipWidth: function getYAxisClipWidth() { + var $$ = this; + + return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0); + }, + getYAxisClipHeight: function getYAxisClipHeight() { + var $$ = this; + + return $$.getAxisClipHeight($$.config.axis_rotated); + } +}); + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + initRegion: function initRegion() { + var $$ = this; + + $$.region = $$.main.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.regions); + }, + updateRegion: function updateRegion(duration) { + var $$ = this, + config = $$.config; + + + // hide if arc type + $$.region.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.mainRegion = $$.main.select("." + _classes2.default.regions).selectAll("." + _classes2.default.region).data(config.regions), $$.mainRegion.exit().transition().duration(duration).style("opacity", "0").remove(), $$.mainRegion = $$.mainRegion.enter().append("g").merge($$.mainRegion).attr("class", $$.classRegion.bind($$)), $$.mainRegion.append("rect").style("fill-opacity", "0"); + }, + redrawRegion: function redrawRegion(withTransition) { + var $$ = this, + regions = $$.mainRegion.select("rect"); + + + return regions = (withTransition ? regions.transition() : regions).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$)), [(withTransition ? regions.transition() : regions).style("fill-opacity", function (d) { + return (0, _util.isValue)(d.opacity) ? d.opacity : "0.1"; + }).on("end", function () { + (0, _d3Selection.select)(this.parentNode).selectAll("rect:not([x])").remove(); + })]; + }, + getRegionXY: function getRegionXY(type, d) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isX = type === "x", + key = "start", + scale = void 0, + pos = 0; + + + return d.axis === "y" || d.axis === "y2" ? (!isX && (key = "end"), (isX ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], pos = scale(d[key]))) : (isX ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, pos = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), pos; + }, + regionX: function regionX(d) { + return this.getRegionXY("x", d); + }, + regionY: function regionY(d) { + return this.getRegionXY("y", d); + }, + getRegionSize: function getRegionSize(type, d) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + isWidth = type === "width", + start = $$[isWidth ? "regionX" : "regionY"](d), + scale = void 0, + key = "end", + end = $$[type]; + + + return d.axis === "y" || d.axis === "y2" ? (!isWidth && (key = "start"), (isWidth ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], end = scale(d[key]))) : (isWidth ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, end = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), end < start ? 0 : end - start; + }, + regionWidth: function regionWidth(d) { + return this.getRegionSize("width", d); + }, + regionHeight: function regionHeight(d) { + return this.getRegionSize("height", d); + }, + isRegionOnX: function isRegionOnX(d) { + return !d.axis || d.axis === "x"; + } +}); // selection + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Called when dragging. + * Data points can be selected. + * @private + * @param {Object} mouse Object + */ + drag: function drag(mouse) { + var $$ = this, + config = $$.config, + main = $$.main; + + + if (!$$.hasArcType() && config.data_selection_enabled && ( // do nothing if not selectable + !config.zoom_enabled || $$.zoom.altDomain) && config.data_selection_multiple // skip when single selection because drag is used for multiple selection + ) { + var _$$$dragStart = $$.dragStart, + sx = _$$$dragStart[0], + sy = _$$$dragStart[1], + mx = mouse[0], + my = mouse[1], + minX = Math.min(sx, mx), + maxX = Math.max(sx, mx), + minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my), + maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my); + main.select("." + _classes2.default.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY), main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).filter(function (d) { + return config.data_selection_isselectable(d); + }).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + isSelected = shape.classed(_classes2.default.SELECTED), + isIncluded = shape.classed(_classes2.default.INCLUDED), + _x = void 0, + _y = void 0, + _w = void 0, + _h = void 0, + toggle = void 0, + isWithin = !1, + box = void 0; + + if (shape.classed(_classes2.default.circle)) _x = shape.attr("cx") * 1, _y = shape.attr("cy") * 1, toggle = $$.togglePoint, isWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;else if (shape.classed(_classes2.default.bar)) box = (0, _util.getPathBox)(this), _x = box.x, _y = box.y, _w = box.width, _h = box.height, toggle = $$.togglePath, isWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);else + // line/area selection not supported yet + return; + + isWithin ^ isIncluded && (shape.classed(_classes2.default.INCLUDED, !isIncluded), shape.classed(_classes2.default.SELECTED, !isSelected), toggle.call($$, !isSelected, shape, d, i)); + }); + } + }, + + + /** + * Called when the drag starts. + * Adds and Shows the drag area. + * @private + * @param {Object} mouse Object + */ + dragstart: function dragstart(mouse) { + var $$ = this, + config = $$.config; + $$.hasArcType() || !config.data_selection_enabled || ($$.dragStart = mouse, $$.main.select("." + _classes2.default.chart).append("rect").attr("class", _classes2.default.dragarea).style("opacity", "0.1"), $$.setDragStatus(!0)); + }, + + + /** + * Called when the drag finishes. + * Removes the drag area. + * @private + */ + dragend: function dragend() { + var $$ = this, + config = $$.config; + $$.hasArcType() || !config.data_selection_enabled || ($$.main.select("." + _classes2.default.dragarea).transition().duration(100).style("opacity", "0").remove(), $$.main.selectAll("." + _classes2.default.shape).classed(_classes2.default.INCLUDED, !1), $$.setDragStatus(!1)); + }, + setDragStatus: function setDragStatus(isDragging) { + this.dragging = isDragging; + } +}); + +/***/ }), +/* 35 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Color = __webpack_require__(73), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Select a point + * @private + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + selectPoint: function selectPoint(target, d, i) { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + cx = (isRotated ? $$.circleY : $$.circleX).bind($$), + cy = (isRotated ? $$.circleX : $$.circleY).bind($$), + r = $$.pointSelectR.bind($$); + (0, _util.callFn)(config.data_onselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () { + return $$.generateClass(_classes2.default.selectedCircle, i); + }).attr("cx", cx).attr("cy", cy).attr("stroke", function () { + return $$.color(d); + }).attr("r", function (d2) { + return $$.pointSelectR(d2) * 1.4; + }).transition().duration(100).attr("r", r); + }, + + + /** + * Unelect a point + * @private + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + unselectPoint: function unselectPoint(target, d, i) { + var $$ = this; + + (0, _util.callFn)($$.config.data_onunselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).transition().duration(100).attr("r", 0).remove(); + }, + + + /** + * Toggles the selection of points + * @private + * @param {Boolean} whether or not to select. + * @param {Object} target point + * @param {Object} data + * @param {Number} index + */ + togglePoint: function togglePoint(selected, target, d, i) { + var method = (selected ? "" : "un") + "selectPoint"; + + this[method](target, d, i); + }, + + + /** + * Select a path + * @private + * @param {Object} target path + * @param {Object} data + */ + selectPath: function selectPath(target, d) { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.data_onselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () { + return (0, _d3Color.rgb)($$.color(d)).brighter(.75); + }); + }, + + + /** + * Unelect a path + * @private + * @param {Object} target path + * @param {Object} data + */ + unselectPath: function unselectPath(target, d) { + var $$ = this, + config = $$.config; + (0, _util.callFn)(config.data_onunselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () { + return $$.color(d); + }); + }, + + + /** + * Toggles the selection of lines + * @private + * @param {Boolean} whether or not to select. + * @param {Object} target shape + * @param {Object} data + * @param {Number} index + */ + togglePath: function togglePath(selected, target, d, i) { + this[(selected ? "" : "un") + "selectPath"](target, d, i); + }, + + + /** + * Returns the toggle method of the target + * @private + * @param {Object} target shape + * @param {Object} data + * @returns {Function} toggle method + */ + getToggle: function getToggle(that, d) { + var $$ = this; + + return that.nodeName === "path" ? $$.togglePath : $$.isStepType(d) ? function () {} : // circle is hidden in step chart, so treat as within the click area + $$.togglePoint; + }, + + + /** + * Toggles the selection of shapes + * @private + * @param {Object} target shape + * @param {Object} data + * @param {Number} index + */ + toggleShape: function toggleShape(that, d, i) { + var $$ = this, + config = $$.config, + shape = (0, _d3Selection.select)(that), + isSelected = shape.classed(_classes2.default.SELECTED), + toggle = $$.getToggle(that, d).bind($$), + toggledShape = void 0; + + + if (config.data_selection_enabled && config.data_selection_isselectable(d)) { + if (!config.data_selection_multiple) { + var selector = "." + _classes2.default.shapes; + + config.data_selection_grouped && (selector += $$.getTargetSelectorSuffix(d.id)), $$.main.selectAll(selector).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this); + + shape.classed(_classes2.default.SELECTED) && (toggledShape = shape, toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i)); + }); + } + + toggledShape && toggledShape.node() === shape.node() || (shape.classed(_classes2.default.SELECTED, !isSelected), toggle(!isSelected, shape, d, i)); + } + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Brush = __webpack_require__(76), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize the brush. + * @private + */ + initBrush: function initBrush() { + var $$ = this; + + // set the brush + $$.brush = $$.config.axis_rotated ? (0, _d3Brush.brushY)() : (0, _d3Brush.brushX)(); + + + // set "brush" event + var brushHandler = function () { + $$.redrawForBrush(); + }; + + $$.brush.on("start", function () { + $$.inputType === "touch" && $$.hideTooltip(), brushHandler(); + }).on("brush", brushHandler), $$.brush.update = function () { + var extent = this.extent()(); + + return extent[1].filter(function (v) { + return isNaN(v); + }).length === 0 && $$.context && $$.context.select("." + _classes2.default.brush).call(this), this; + }, $$.brush.scale = function (scale, height) { + var overlay = $$.svg.select(".bb-brush .overlay"), + extent = [[0, 0]]; + scale.range ? extent.push([scale.range()[1], (height || !overlay.empty()) && ~~overlay.attr("height") || 60]) : scale.constructor === Array && extent.push(scale), $$.config.axis_rotated && extent.reverse(), this.extent($$.config.axis_x_extent || extent), this.update(); + }, $$.brush.getSelection = function () { + return $$.context ? $$.context.select("." + _classes2.default.brush) : (0, _d3Selection.select)([]); + }; + }, + + + /** + * Initialize the subchart. + * @private + */ + initSubchart: function initSubchart() { + var $$ = this, + config = $$.config, + visibility = config.subchart_show ? "visible" : "hidden"; + $$.context = $$.svg.append("g").attr("transform", $$.getTranslate("context")); + + + var context = $$.context; + + context.style("visibility", visibility), context.append("g").attr("clip-path", $$.clipPathForSubchart).attr("class", _classes2.default.chart), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines), context.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.brush).call($$.brush), $$.axes.subx = context.append("g").attr("class", _classes2.default.axisX).attr("transform", $$.getTranslate("subx")).attr("clip-path", config.axis_rotated ? "" : $$.clipPathForXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden"); + }, + + + /** + * Update sub chart + * @private + * @param {Object} $$.data.targets + */ + updateTargetsForSubchart: function updateTargetsForSubchart(targets) { + var $$ = this, + context = $$.context, + config = $$.config, + classChartBar = $$.classChartBar.bind($$), + classBars = $$.classBars.bind($$), + classChartLine = $$.classChartLine.bind($$), + classLines = $$.classLines.bind($$), + classAreas = $$.classAreas.bind($$); + + + if (config.subchart_show) { + // -- Bar --// + var contextBarUpdate = context.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", classChartBar), + contextBarEnter = contextBarUpdate.enter().append("g").style("opacity", "0").attr("class", classChartBar).merge(contextBarUpdate); + + + // Bars for each data + contextBarEnter.append("g").attr("class", classBars); + + + // -- Line --// + var contextLineUpdate = context.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", classChartLine), + contextLineEnter = contextLineUpdate.enter().append("g").style("opacity", "0").attr("class", classChartLine).merge(contextLineUpdate); + + + // Lines for each data + contextLineEnter.append("g").attr("class", classLines), contextLineEnter.append("g").attr("class", classAreas), context.selectAll("." + _classes2.default.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? $$.width2 : $$.height2); + } + }, + + + /** + * Update the bar of the sub chart + * @private + * @param {Object} durationForExit + */ + updateBarForSubchart: function updateBarForSubchart(durationForExit) { + var $$ = this; + + $$.contextBar = $$.context.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data($$.barData.bind($$)), $$.contextBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextBar = $$.contextBar.enter().append("path").attr("class", $$.classBar.bind($$)).style("stroke", "none").style("fill", $$.color).merge($$.contextBar).style("opacity", $$.initialOpacity.bind($$)); + }, + + + /** + * Redraw the bar of the subchart + * @private + * @param {String} path in subchart bar + * @param {Boolean} whether or not to transition. + * @param {Number} transition duration + */ + redrawBarForSubchart: function redrawBarForSubchart(drawBarOnSub, withTransition, duration) { + var contextBar = void 0; + + contextBar = withTransition ? this.contextBar.transition(Math.random().toString()).duration(duration) : this.contextBar, contextBar.attr("d", drawBarOnSub).style("opacity", "1"); + }, + + + /** + * Update the line of the sub chart + * @private + * @param {Number} Fade-out transition duration + */ + updateLineForSubchart: function updateLineForSubchart(durationForExit) { + var $$ = this; + + $$.contextLine = $$.context.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.contextLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextLine = $$.contextLine.enter().append("path").attr("class", $$.classLine.bind($$)).style("stroke", $$.color).merge($$.contextLine).style("opacity", $$.initialOpacity.bind($$)); + }, + + + /** + * Redraw the line of the subchart + * @private + * @param {String} path in subchart line + * @param {Boolean} whether or not to transition + * @param {Number} transition duration + */ + redrawLineForSubchart: function redrawLineForSubchart(drawLineOnSub, withTransition, duration) { + var contextLine = void 0; + + contextLine = withTransition ? this.contextLine.transition(Math.random().toString()).duration(duration) : this.contextLine, contextLine.attr("d", drawLineOnSub).style("opacity", "1"); + }, + + + /** + * Update the area of the sub chart + * @private + * @param {Number} Fade-out transition duration + */ + updateAreaForSubchart: function updateAreaForSubchart(durationForExit) { + var $$ = this; + + $$.contextArea = $$.context.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.contextArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextArea = $$.contextArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () { + return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0"; + }).merge($$.contextArea).style("opacity", "0"); + }, + + /** + * Redraw the area of the subchart + * @private + * @param {String} path in subchart line + * @param {Boolean} whether or not to transition + * @param {Number} transition duration + */ + redrawAreaForSubchart: function redrawAreaForSubchart(drawAreaOnSub, withTransition, duration) { + var contextArea = void 0; + + contextArea = withTransition ? this.contextArea.transition(Math.random().toString()).duration(duration) : this.contextArea, contextArea.attr("d", drawAreaOnSub).style("fill", this.color).style("opacity", this.orgAreaOpacity); + }, + + + /** + * Redraw subchart. + * @private + * @param {Boolean} whether or not to show subchart + * @param Do not use. + * @param {Number} transition duration + * @param Do not use. + * @param {Object} area Indices + * @param {Object} bar Indices + * @param {Object} line Indices + */ + redrawSubchart: function redrawSubchart(withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices) { + var $$ = this, + config = $$.config; + + + // subchart + if ($$.context.style("visibility", config.subchart_show ? "visible" : "hidden"), config.subchart_show && (_d3Selection.event && _d3Selection.event.type === "zoom" && $$.brush.update(), withSubchart)) + + // update subchart elements if needed + { + (0, _util.brushEmpty)($$) || $$.brush.update(); + + + // setup drawer - MEMO: this must be called after axis updated + var drawAreaOnSub = $$.generateDrawArea(areaIndices, !0), + drawBarOnSub = $$.generateDrawBar(barIndices, !0), + drawLineOnSub = $$.generateDrawLine(lineIndices, !0); + $$.updateBarForSubchart(duration), $$.updateLineForSubchart(duration), $$.updateAreaForSubchart(duration), $$.redrawBarForSubchart(drawBarOnSub, duration, duration), $$.redrawLineForSubchart(drawLineOnSub, duration, duration), $$.redrawAreaForSubchart(drawAreaOnSub, duration, duration); + } + }, + + /** + * Redraw the brush. + * @private + */ + redrawForBrush: function redrawForBrush() { + var $$ = this, + x = $$.x; + $$.redraw({ + withTransition: !1, + withY: $$.config.zoom_rescale, + withSubchart: !1, + withUpdateXDomain: !0, + withDimension: !1 + }), $$.config.subchart_onbrush.call($$.api, x.orgDomain()); + }, + + + /** + * Transform context + * @private + * @param {Boolean} indicates transition is enabled + * @param {Object} The return value of the generateTransitions method of Axis. + */ + transformContext: function transformContext(withTransition, transitions) { + var $$ = this, + subXAxis = void 0; + transitions && transitions.axisSubX ? subXAxis = transitions.axisSubX : (subXAxis = $$.context.select("." + _classes2.default.axisX), withTransition && (subXAxis = subXAxis.transition())), $$.context.attr("transform", $$.getTranslate("context")), subXAxis.attr("transform", $$.getTranslate("subx")); + }, + + + /** + * Get default extent + * @private + * @returns {Array} default extent + */ + getDefaultExtent: function getDefaultExtent() { + var $$ = this, + config = $$.config, + extent = (0, _util.isFunction)(config.axis_x_extent) ? config.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent; + + + return $$.isTimeSeries() && (extent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])]), extent; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 37 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(66), + _d3Selection = __webpack_require__(64), + _d3Drag = __webpack_require__(72), + _d3Zoom = __webpack_require__(74), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Initialize zoom. + * @private + */ + initZoom: function initZoom() { + var $$ = this; + + $$.zoomScale = null, $$.generateZoom(); + }, + + + /** + * Bind zoom event + * @param {Boolean} bind Weather bind or unbound + * @private + */ + bindZoomEvent: function bindZoomEvent() { + var bind = !(arguments.length > 0 && arguments[0] !== undefined) || arguments[0], + $$ = this, + zoomEnabled = $$.config.zoom_enabled; + $$.redrawEventRect(), zoomEnabled && bind ? zoomEnabled === !0 || zoomEnabled.type === "wheel" ? $$.bindZoomOnEventRect() : zoomEnabled.type === "drag" && $$.bindZoomOnDrag() : bind === !1 && ($$.api.unzoom(), $$.main.select("." + _classes2.default.eventRects).on(".zoom", null).on(".drag", null)); + }, + + + /** + * Generate zoom + * @private + */ + generateZoom: function generateZoom() { + var $$ = this, + config = $$.config, + zoom = (0, _d3Zoom.zoom)().duration(0).on("start", $$.onZoomStart.bind($$)).on("zoom", $$.onZoom.bind($$)).on("end", $$.onZoomEnd.bind($$)); + + + // get zoom extent + zoom.orgScaleExtent = function () { + var extent = config.zoom_extent || [1, 10]; + + return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])]; + }, zoom.updateScaleExtent = function () { + var ratio = (0, _util.diffDomain)($$.x.orgDomain()) / (0, _util.diffDomain)($$.getZoomDomain()), + extent = this.orgScaleExtent(); + + + return this.scaleExtent([extent[0] * ratio, extent[1] * ratio]), this; + }, zoom.updateTransformScale = function (transform) { + // rescale from the original scale + var newScale = transform.rescaleX($$.subX.orgScale()), + domain = $$.trimXDomain(newScale.domain()), + rescale = config.zoom_rescale; + newScale.domain(domain, $$.orgXDomain), $$.zoomScale = $$.getCustomizedScale(newScale), $$.xAxis.scale($$.zoomScale), rescale && $$.x.domain($$.zoomScale.orgDomain()); + }, $$.zoom = zoom; + }, + + + /** + * 'start' event listener + * @private + */ + onZoomStart: function onZoomStart() { + var $$ = this, + event = _d3Selection.event.sourceEvent; + $$.zoom.altDomain = event.altKey ? $$.x.orgDomain() : null, $$.zoom.startEvent = event, (0, _util.callFn)($$.config.zoom_onzoomstart, $$.api, event); + }, + + + /** + * 'zoom' event listener + * @private + */ + onZoom: function onZoom() { + var $$ = this, + config = $$.config, + event = _d3Selection.event; + + + if (config.zoom_enabled) { + var isMousemove = event.sourceEvent.type === "mousemove", + transform = event.transform; + return $$.zoom.updateTransformScale(transform), $$.filterTargetsToShow($$.data.targets).length === 0 ? void 0 : isMousemove && $$.zoom.altDomain ? ($$.x.domain($$.zoom.altDomain), void transform.scale($$.zoomScale).updateScaleExtent()) : void ($$.isCategorized() && $$.x.orgDomain()[0] === $$.orgXDomain[0] && $$.x.domain([$$.orgXDomain[0] - 1e-10, $$.x.orgDomain()[1]]), $$.redraw({ + withTransition: !1, + withY: config.zoom_rescale, + withSubchart: !1, + withEventRect: !1, + withDimension: !1 + }), $$.cancelClick = isMousemove, (0, _util.callFn)(config.zoom_onzoom, $$.api, $$.x.orgDomain())); + } + }, + + + /** + * 'end' event listener + * @private + */ + onZoomEnd: function onZoomEnd() { + var $$ = this, + startEvent = $$.zoom.startEvent; + + + // if click, do nothing. otherwise, click interaction will be canceled. + event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY || ($$.redrawEventRect(), $$.updateZoom(), (0, _util.callFn)($$.config.zoom_onzoomend, $$.api, $$.x.orgDomain())); + }, + + + /** + * Get zoom domain + * @private + * @returns {Array} zoom domain + */ + getZoomDomain: function getZoomDomain() { + var $$ = this, + config = $$.config, + min = (0, _d3Array.min)([$$.orgXDomain[0], config.zoom_x_min]), + max = (0, _d3Array.max)([$$.orgXDomain[1], config.zoom_x_max]); + + + return [min, max]; + }, + + + /** + * Update zoom + * @private + */ + updateZoom: function updateZoom() { + var $$ = this; + + if ($$.zoomScale) { + var zoomDomain = $$.zoomScale.domain(), + xDomain = $$.x.domain(), + delta = .015; + // arbitrary value + + // check if the zoomed chart is fully shown, then reset scale when zoom is out as initial + (zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta) && ($$.xAxis.scale($$.x), $$.zoomScale = null); + } + }, + + + /** + * Attach zoom event on <rect> + * @private + */ + bindZoomOnEventRect: function bindZoomOnEventRect() { + var $$ = this; + + $$.main.select("." + _classes2.default.eventRects).call($$.zoom).on("dblclick.zoom", null); + }, + + + /** + * Initialize the drag behaviour used for zooming. + * @private + */ + initZoomBehaviour: function initZoomBehaviour() { + var $$ = this, + config = $$.config, + isRotated = config.axis_rotated, + start = 0, + end = 0, + zoomRect = null; + $$.zoomBehaviour = (0, _d3Drag.drag)().on("start", function () { + $$.setDragStatus(!0), zoomRect || (zoomRect = $$.main.append("rect").attr("clip-path", $$.clipPath).attr("class", _classes2.default.zoomBrush).attr("width", isRotated ? $$.width : 0).attr("height", isRotated ? 0 : $$.height)), start = (0, _d3Selection.mouse)(this)[0], end = start, zoomRect.attr("x", start).attr("width", 0); + }).on("drag", function () { + end = (0, _d3Selection.mouse)(this)[0], zoomRect.attr("x", Math.min(start, end)).attr("width", Math.abs(end - start)); + }).on("end", function () { + var _ref, + scale = $$.zoomScale || $$.x; + + $$.setDragStatus(!1), zoomRect.attr("x", 0).attr("width", 0), start > end && (_ref = [end, start], start = _ref[0], end = _ref[1], _ref), start !== end && $$.api.zoom([start, end].map(function (v) { + return scale.invert(v); + })); + }); + }, + + + /** + * Enable zooming by dragging using the zoombehaviour. + * @private + */ + bindZoomOnDrag: function bindZoomOnDrag() { + var $$ = this; + + $$.main.select("." + _classes2.default.eventRects).call($$.zoomBehaviour); + }, + setZoomResetButton: function setZoomResetButton() { + var $$ = this, + config = $$.config, + resetButton = config.zoom_resetButton; + resetButton && config.zoom_enabled.type === "drag" && ($$.zoom.resetBtn ? $$.zoom.resetBtn.style("display", null) : $$.zoom.resetBtn = $$.selectChart.append("div").classed(_classes2.default.button, !0).append("span").on("click", $$.api.unzoom.bind($$)).classed(_classes2.default.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom")); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Scale = __webpack_require__(65), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Set pattern's background color + * (it adds a <rect> element to simulate bg-color) + * @param {SVGPatternElement} pattern SVG pattern element + * @param {String} color Color string + * @param {String} id ID to be set + * @return {{id: string, node: SVGPatternElement}} + * @private + */ +var colorizePattern = function (pattern, color, id) { + var node = (0, _d3Selection.select)(pattern.cloneNode(!0)); + + return node.attr("id", id).insert("rect", ":first-child").attr("width", node.attr("width")).attr("height", node.attr("height")).style("fill", color), { + id: id, + node: node.node() + }; +}, + schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"]; + +// Replacement of d3.schemeCategory10. +// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic) +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +(0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Get color pattern from CSS file + * CSS should be defined as: background-image: url("#00c73c;#fa7171; ..."); + * @return {Array} + * @private + */ + getColorFromCss: function getColorFromCss() { + var body = document.body, + pattern = body["__colorPattern__"]; + + + if (!pattern) { + var span = document.createElement("span"); + span.className = _classes2.default.colorPattern, span.style.display = "none", body.appendChild(span); + + + var content = window.getComputedStyle(span).backgroundImage; + + span.parentNode.removeChild(span), content.indexOf(";") > -1 && (pattern = content.replace(/url[^#]*|["'()]|(\s|%20)/g, "").split(";").map(function (v) { + return v.trim().replace(/[\"'\s]/g, ""); + }).filter(Boolean), body["__colorPattern__"] = pattern); + } + + return pattern; + }, + generateColor: function generateColor() { + var $$ = this, + config = $$.config, + colors = config.data_colors, + callback = config.data_color, + ids = [], + pattern = (0, _util.notEmpty)(config.color_pattern) ? config.color_pattern : (0, _d3Scale.scaleOrdinal)($$.getColorFromCss() || schemeCategory10).range(), + originalColorPattern = pattern; + + + if ((0, _util.isFunction)(config.color_tiles)) { + var tiles = config.color_tiles(), + colorizedPatterns = pattern.map(function (p, index) { + var color = p.replace(/[#\(\)\s,]/g, ""), + id = $$.datetimeId + "-pattern-" + color + "-" + index; + + + return colorizePattern(tiles[index % tiles.length], p, id); + }); + + // Add background color to patterns + + pattern = colorizedPatterns.map(function (p) { + return "url(#" + p.id + ")"; + }), $$.patterns = colorizedPatterns; + } + + return function (d) { + var id = d.id || d.data && d.data.id || d, + isLine = $$.isTypeOf(id, ["line", "spline", "step"]) || !$$.config.data_types[id], + color = void 0; + + // if callback function is provided + + return (0, _util.isFunction)(colors[id]) ? color = colors[id](d) : colors[id] ? color = colors[id] : (ids.indexOf(id) < 0 && ids.push(id), color = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] : pattern[ids.indexOf(id) % pattern.length], colors[id] = color), (0, _util.isFunction)(callback) ? callback(color, d) : color; + }; + }, + generateLevelColor: function generateLevelColor() { + var $$ = this, + config = $$.config, + colors = config.color_pattern, + threshold = config.color_threshold, + asValue = threshold.unit === "value", + max = threshold.max || 100, + values = threshold.values && threshold.values.length ? threshold.values : []; + + + return (0, _util.notEmpty)(threshold) ? function (value) { + var color = colors[colors.length - 1]; + + for (var v, i = 0; i < values.length; i++) if (v = asValue ? value : value * 100 / max, v < values[i]) { + color = colors[i]; + + break; + } + + return color; + } : null; + } +}); + +/***/ }), +/* 39 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var getFormat = function ($$, typeValue, v) { + var config = $$.config, + type = "axis_" + typeValue + "_tick_format", + format = config[type] ? config[type] : $$.defaultValueFormat; + + + return format(v); +}; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + getYFormat: function getYFormat(forArc) { + var $$ = this, + formatForY = $$.yFormat, + formatForY2 = $$.y2Format; + + + return forArc && !$$.hasType("gauge") && (formatForY = $$.defaultArcValueFormat, formatForY2 = $$.defaultArcValueFormat), function (v, ratio, id) { + var format = $$.axis.getId(id) === "y2" ? formatForY2 : formatForY; + + return format.call($$, v, ratio); + }; + }, + yFormat: function yFormat(v) { + return getFormat(this, "y", v); + }, + y2Format: function y2Format(v) { + return getFormat(this, "y2", v); + }, + defaultValueFormat: function defaultValueFormat(v) { + return (0, _util.isValue)(v) ? +v : ""; + }, + defaultArcValueFormat: function defaultArcValueFormat(v, ratio) { + return (ratio * 100).toFixed(1) + "%"; + }, + dataLabelFormat: function dataLabelFormat(targetId) { + var $$ = this, + dataLabels = $$.config.data_labels, + defaultFormat = function (v) { + return (0, _util.isValue)(v) ? +v : ""; + }, + format = defaultFormat; + + // find format according to axis id + + + return (0, _util.isFunction)(dataLabels.format) ? format = dataLabels.format : (0, _util.isObjectType)(dataLabels.format) && (dataLabels.format[targetId] ? format = dataLabels.format[targetId] === !0 ? defaultFormat : dataLabels.format[targetId] : format = function () { + return ""; + }), format; + } +}); + +/***/ }), +/* 40 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_ChartInternal2.default.prototype, { + hasCaches: function hasCaches(key) { + var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1]; + + if (isDataType) { + for (var i = 0, len = key.length; i < len; i++) if (!(key[i] in this.cache)) return !1; + + return !0; + } + + return key in this.cache; + }, + addCache: function addCache(key, value) { + var isDataType = !!(arguments.length > 2 && arguments[2] !== undefined) && arguments[2]; + this.cache[key] = isDataType ? this.cloneTarget(value) : value; + }, + getCache: function getCache(key) { + var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1]; + + if (isDataType) { + var targets = []; + + for (var id, i = 0; id = key[i]; i++) id in this.cache && targets.push(this.cloneTarget(this.cache[id])); + + return targets; + } + + return this.cache[key] || null; + }, + + + /** + * reset cached data + * @param {Boolean} all true: reset all data, false: reset only '$' prefixed key data + * @private + */ + resetCache: function resetCache(all) { + var $$ = this; + + for (var x in $$.cache) (all || /^\$/.test(x)) && ($$.cache[x] = null); + } +}); + +/***/ }), +/* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_ChartInternal2.default.prototype, { + CLASS: _classes2.default, + + generateClass: function generateClass(prefix, targetId) { + return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId)); + }, + classText: function classText(d) { + return this.generateClass(_classes2.default.text, d.index); + }, + classTexts: function classTexts(d) { + return this.generateClass(_classes2.default.texts, d.id); + }, + classShape: function classShape(d) { + return this.generateClass(_classes2.default.shape, d.index); + }, + classShapes: function classShapes(d) { + return this.generateClass(_classes2.default.shapes, d.id); + }, + generateExtraLineClass: function generateExtraLineClass() { + var $$ = this, + classes = $$.config.line_classes || [], + ids = []; + + + return function (d) { + var id = d.id || d.data && d.data.id || d; + + return ids.indexOf(id) < 0 && ids.push(id), classes[ids.indexOf(id) % classes.length]; + }; + }, + classLine: function classLine(d) { + return this.classShape(d) + this.generateClass(_classes2.default.line, d.id); + }, + classLines: function classLines(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.lines, d.id); + }, + classCircle: function classCircle(d) { + return this.classShape(d) + this.generateClass(_classes2.default.circle, d.index); + }, + classCircles: function classCircles(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.circles, d.id); + }, + classBar: function classBar(d) { + return this.classShape(d) + this.generateClass(_classes2.default.bar, d.index); + }, + classBars: function classBars(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.bars, d.id); + }, + classArc: function classArc(d) { + return this.classShape(d.data) + this.generateClass(_classes2.default.arc, d.data.id); + }, + classArcs: function classArcs(d) { + return this.classShapes(d.data) + this.generateClass(_classes2.default.arcs, d.data.id); + }, + classArea: function classArea(d) { + return this.classShape(d) + this.generateClass(_classes2.default.area, d.id); + }, + classAreas: function classAreas(d) { + return this.classShapes(d) + this.generateClass(_classes2.default.areas, d.id); + }, + classRegion: function classRegion(d, i) { + return this.generateClass(_classes2.default.region, i) + " " + ("class" in d ? d.class : ""); + }, + classEvent: function classEvent(d) { + return this.generateClass(_classes2.default.eventRect, d.index); + }, + classTarget: function classTarget(id) { + var additionalClassSuffix = this.config.data_classes[id], + additionalClass = ""; + + + return additionalClassSuffix && (additionalClass = " " + _classes2.default.target + "-" + additionalClassSuffix), this.generateClass(_classes2.default.target, id) + additionalClass; + }, + classFocus: function classFocus(d) { + return this.classFocused(d) + this.classDefocused(d); + }, + classFocused: function classFocused(d) { + return " " + (this.focusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.focused : ""); + }, + classDefocused: function classDefocused(d) { + return " " + (this.defocusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.defocused : ""); + }, + classChartText: function classChartText(d) { + return _classes2.default.chartText + this.classTarget(d.id); + }, + classChartLine: function classChartLine(d) { + return _classes2.default.chartLine + this.classTarget(d.id); + }, + classChartBar: function classChartBar(d) { + return _classes2.default.chartBar + this.classTarget(d.id); + }, + classChartArc: function classChartArc(d) { + return _classes2.default.chartArc + this.classTarget(d.data.id); + }, + classChartRadar: function classChartRadar(d) { + return _classes2.default.chartRadar + this.classTarget(d.id); + }, + getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) { + return targetId || targetId === 0 ? ("-" + targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-") : ""; + }, + selectorTarget: function selectorTarget(id, prefix) { + return (prefix || "") + "." + (_classes2.default.target + this.getTargetSelectorSuffix(id)); + }, + selectorTargets: function selectorTargets(idsValue, prefix) { + var $$ = this, + ids = idsValue || []; + + + return ids.length ? ids.map(function (id) { + return $$.selectorTarget(id, prefix); + }) : null; + }, + selectorLegend: function selectorLegend(id) { + return "." + (_classes2.default.legendItem + this.getTargetSelectorSuffix(id)); + }, + selectorLegends: function selectorLegends(ids) { + var $$ = this; + + return ids && ids.length ? ids.map(function (id) { + return $$.selectorLegend(id); + }) : null; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 42 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * This API highlights specified targets and fade out the others.<br><br> + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted. + * @method focus + * @instance + * @memberOf Chart + * @param {String|Array} targetIdsValue Target ids to be highlighted. + * @example + * // data1 will be highlighted and the others will be faded out + * chart.focus("data1"); + * + * // data1 and data2 will be highlighted and the others will be faded out + * chart.focus(["data1", "data2"]); + * + * // all targets will be highlighted + * chart.focus(); + */ + focus: function focus(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))); + this.revert(), this.defocus(), candidates.classed(_classes2.default.focused, !0).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.expandArc(targetIds), $$.toggleFocusLegend(targetIds, !0), $$.focusedTargetIds = targetIds, $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }); + }, + + + /** + * This API fades out specified targets and reverts the others.<br><br> + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out. + * @method defocus + * @instance + * @memberOf Chart + * @param {String|Array} Target ids to be faded out. + * @example + * // data1 will be faded out and the others will be reverted. + * chart.defocus("data1"); + * + * // data1 and data2 will be faded out and the others will be reverted. + * chart.defocus(["data1", "data2"]); + * + * // all targets will be faded out. + * chart.defocus(); + */ + defocus: function defocus(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))); + candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !0), $$.hasArcType() && $$.unexpandArc(targetIds), $$.toggleFocusLegend(targetIds, !1), $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) { + return targetIds.indexOf(id) < 0; + }), $$.defocusedTargetIds = targetIds; + }, + + + /** + * This API reverts specified targets.<br><br> + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted. + * @method revert + * @instance + * @memberOf Chart + * @param {String|Array} Target ids to be reverted + * @example + * // data1 will be reverted. + * chart.revert("data1"); + * + * // data1 and data2 will be reverted. + * chart.revert(["data1", "data2"]); + * + * // all targets will be reverted. + * chart.revert(); + */ + revert: function revert(targetIdsValue) { + var $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue), + candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); + // should be for all targets + + candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.unexpandArc(targetIds), $$.config.legend_show && ($$.showLegend(targetIds.filter($$.isLegendToShow.bind($$))), $$.legend.selectAll($$.selectorLegends(targetIds)).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused); + }).classed(_classes2.default.legendItemFocused, !1)), $$.focusedTargetIds = [], $$.defocusedTargetIds = []; + } +}); + +/***/ }), +/* 43 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Show data series on chart + * @method show + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:<br> + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // show 'data1' + * chart.show("data1"); + * + * // show 'data1' and 'data3' + * chart.show(["data1", "data3"]); + */ + show: function show(targetIdsValue) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue); + $$.removeHiddenTargetIds(targetIds); + + var targets = $$.svg.selectAll($$.selectorTargets(targetIds)); + + targets.transition().style("opacity", "1", "important").call($$.endall, function () { + targets.style("opacity", null).style("opacity", "1"); + }), options.withLegend && $$.showLegend(targetIds), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }); + }, + + + /** + * Hide data series from chart + * @method hide + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:<br> + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // hide 'data1' + * chart.hide("data1"); + * + * // hide 'data1' and 'data3' + * chart.hide(["data1", "data3"]); + */ + hide: function hide(targetIdsValue) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targetIds = $$.mapToTargetIds(targetIdsValue); + $$.addHiddenTargetIds(targetIds); + + var targets = $$.svg.selectAll($$.selectorTargets(targetIds)); + + targets.transition().style("opacity", "0", "important").call($$.endall, function () { + targets.style("opacity", null).style("opacity", "0"); + }), options.withLegend && $$.hideLegend(targetIds), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }); + }, + + + /** + * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa. + * @method toggle + * @instance + * @memberOf Chart + * @param {String|Array} [targetIdsValue=all] The target id value. + * @param {Object} [options] The object can consist with following members:<br> + * + * | Key | Type | default | Description | + * | --- | --- | --- | --- | + * | withLegend | Boolean | false | whether or not display legend | + * + * @example + * // toggle 'data1' + * chart.toggle("data1"); + * + * // toggle 'data1' and 'data3' + * chart.toggle(["data1", "data3"]); + */ + toggle: function toggle(targetIds) { + var _this = this, + options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + $$ = this.internal, + targets = { show: [], hide: [] }; + + // sort show & hide target ids + $$.mapToTargetIds(targetIds).forEach(function (id) { + return targets[$$.isTargetToShow(id) ? "hide" : "show"].push(id); + }), targets.show.length && this.show(targets.show, options), targets.hide.length && setTimeout(function () { + return _this.hide(targets.hide, options); + }, 0); + } +}); + +/***/ }), +/* 44 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Array = __webpack_require__(66), + _d3Zoom = __webpack_require__(74), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Zoom by giving x domain. + * @method zoom + * @instance + * @memberOf Chart + * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned. + * @return {Array} domain value in array + * @example + * // Zoom to specified domain + * chart.zoom([10, 20]); + * + * // Get the current zoomed domain + * chart.zoom(); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var zoom = function (domainValue) { + var $$ = this.internal, + domain = domainValue, + resultDomain = void 0; + + + if ($$.config.zoom_enabled && domain) { + var isTimeSeries = $$.isTimeSeries(); + + if (isTimeSeries && (domain = domain.map(function (x) { + return $$.parseDate(x); + })), $$.config.subchart_show) { + var xScale = $$.zoomScale || $$.x; + + $$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]), resultDomain = domain; + } else { + var orgDomain = $$.subX.domain(), + k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]), + gap = $$.isCategorized() ? $$.xAxis.tickOffset() : 0, + tx = isTimeSeries ? 0 - k * $$.x(domain[0].getTime()) : domain[0] - k * ($$.x(domain[0]) - gap); + $$.zoom.updateTransformScale(_d3Zoom.zoomIdentity.translate(tx, 0).scale(k)), resultDomain = $$.zoomScale.domain(); + } + + $$.redraw({ + withTransition: !0, + withY: $$.config.zoom_rescale, + withDimension: !1 + }), $$.setZoomResetButton(), (0, _util.callFn)($$.config.zoom_onzoom, this, $$.x.orgDomain()); + } else resultDomain = $$.zoomScale ? $$.zoomScale.domain() : $$.x.orgDomain(); + + return resultDomain; +}; + +(0, _util.extend)(zoom, { + /** + * Enable and disable zooming. + * @method zoom․enable + * @instance + * @memberOf Chart + * @param {String|Boolean} enabled Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset. + * @example + * // Enable zooming using the mouse wheel + * chart.zoom.enable(true); + * // Or + * chart.zoom.enable("wheel"); + * + * // Enable zooming by dragging + * chart.zoom.enable("drag"); + * + * // Disable zooming + * chart.zoom.enable(false); + */ + enable: function enable() { + var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "wheel", + $$ = this.internal, + config = $$.config, + enableType = enabled; + enabled && (enableType = (0, _util.isString)(enabled) && /^(drag|wheel)$/.test(enabled) ? { type: enabled } : enabled), config.zoom_enabled = enableType, $$.zoom ? enabled === !1 && $$.bindZoomEvent(!1) : ($$.initZoom(), $$.initZoomBehaviour(), $$.bindZoomEvent()), $$.updateAndRedraw(); + }, + + /** + * Set or get x Axis maximum zoom range value + * @method zoom․max + * @instance + * @memberOf Chart + * @param {Number} [max] maximum value to set for zoom + * @return {Number} zoom max value + * @example + * // Set maximum range value + * chart.zoom.max(20); + */ + max: function max(_max) { + var $$ = this.internal, + config = $$.config; + + + return (_max === 0 || _max) && (config.zoom_x_max = (0, _d3Array.max)([$$.orgXDomain[1], _max])), config.zoom_x_max; + }, + + /** + * Set or get x Axis minimum zoom range value + * @method zoom․min + * @instance + * @memberOf Chart + * @param {Number} [min] minimum value tp set for zoom + * @return {Number} zoom min value + * @example + * // Set minimum range value + * chart.zoom.min(-1); + */ + min: function min(_min) { + var $$ = this.internal, + config = $$.config; + + + return (_min === 0 || _min) && (config.zoom_x_min = (0, _d3Array.min)([$$.orgXDomain[0], _min])), config.zoom_x_min; + }, + + /** + * Set zoom range + * @method zoom․range + * @instance + * @memberOf Chart + * @param {Object} [range] + * @return {Object} zoom range value + * { + * min: 0, + * max: 100 + * } + * @example + * chart.zoom.range({ + * min: 10, + * max: 100 + * }); + */ + range: function range(_range) { + var zoom = this.zoom; + + return (0, _util.isObject)(_range) && ((0, _util.isDefined)(_range.min) && zoom.min(_range.min), (0, _util.isDefined)(_range.max) && zoom.max(_range.max)), { + min: zoom.min(), + max: zoom.max() + }; + } +}), (0, _util.extend)(_Chart2.default.prototype, { + zoom: zoom, + + /** + * Unzoom zoomed area + * @method unzoom + * @instance + * @memberOf Chart + * @example + * chart.unzoom(); + */ + unzoom: function unzoom() { + var $$ = this.internal, + config = $$.config; + $$.zoomScale && (config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(_d3Zoom.zoomIdentity), $$.updateZoom(), $$.zoom.resetBtn && $$.zoom.resetBtn.style("display", "none"), $$.redraw({ + withTransition: !0, + withY: config.zoom_rescale + })); + } +}); + +/***/ }), +/* 45 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Load data to the chart.<br><br> + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. + * - <b>Note:</b> + * unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br> + * done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering + * @method load + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:<br> + * + * | Key | Description | + * | --- | --- | + * | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added | + * | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. | + * | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. | + * | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. | + * | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. | + * | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. | + * | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. | + * | done | The specified function will be called after data loaded.| + * + * @example + * // Load data1 and unload data2 and data3 + * chart.load({ + * columns: [ + * ["data1", 100, 200, 150, ...], + * ... + * ], + * unload: ["data2", "data3"], + * url: "...", + * done: function() { ... } + * }); + */ + load: function load(args) { + var $$ = this.internal, + config = $$.config; + + // update xs if specified + + // use cache if exists + return args.xs && $$.addXs(args.xs), "names" in args && this.data.names(args.names), "classes" in args && Object.keys(args.classes).forEach(function (id) { + config.data_classes[id] = args.classes[id]; + }), "categories" in args && $$.isCategorized() && (config.axis_x_categories = args.categories), "axes" in args && Object.keys(args.axes).forEach(function (id) { + config.data_axes[id] = args.axes[id]; + }), "colors" in args && Object.keys(args.colors).forEach(function (id) { + config.data_colors[id] = args.colors[id]; + }), "cacheIds" in args && $$.hasCaches(args.cacheIds, !0) ? void $$.load($$.getCache(args.cacheIds, !0), args.done) : void ("unload" in args && args.unload !== !1 ? $$.unload($$.mapToTargetIds(args.unload === !0 ? null : args.unload), function () { + return $$.loadFromArgs(args); + }) : $$.loadFromArgs(args)); + + // unload if needed + }, + + + /** + * Unload data to the chart.<br><br> + * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles. + * - <b>Note:</b> + * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br> + * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering. + * @method unload + * @instance + * @memberOf Chart + * @param {Object} args + * - If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded. + * - If done given, the specified function will be called after data loded. + * @example + * // Unload data2 and data3 + * chart.unload({ + * ids: ["data2", "data3"] + * }); + */ + unload: function unload(argsValue) { + var $$ = this.internal, + args = argsValue || {}; + (0, _util.isArray)(args) ? args = { ids: args } : (0, _util.isString)(args) && (args = { ids: [args] }), $$.unload($$.mapToTargetIds(args.ids), function () { + $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0, + withLegend: !0 + }), args.done && args.done(); + }); + } +}); + +/***/ }), +/* 46 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _d3Ease = __webpack_require__(70), + _d3Transition = __webpack_require__(67), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Flow data to the chart.<br><br> + * By this API, you can append new data points to the chart. + * @method flow + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:<br> + * + * | Key | Type | Description | + * | --- | --- | --- | + * | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) | + * | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) | + * | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) | + * | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points | + * | length | Number | The lower x edge will move by the number of this argument | + * | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default | + * | done | Function | The specified function will be called when flow ends | + * + * - **NOTE:** + * If json, rows and columns given, the data will be loaded.<br> + * If data that has the same target id is given, the chart will be appended.<br> + * Otherwise, new target will be added. One of these is required when calling.<br> + * If json specified, keys is required as well as data.json. + * @example + * // 2 data points will be apprended to the tail and popped from the head. + * // After that, 4 data points will be appended and no data points will be poppoed. + * chart.flow({ + * columns: [ + * ["x", "2018-01-11", "2018-01-21"], + * ["data1", 500, 200], + * ["data2", 100, 300], + * ["data3", 200, 120] + * ], + * to: "2013-01-11", + * done: function () { + * chart.flow({ + * columns: [ + * ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"], + * ["data1", 200, 300, 100, 250], + * ["data2", 100, 90, 40, 120], + * ["data3", 100, 100, 300, 500] + * ], + * length: 2, + * duration: 1500 + * }); + * } + * }); + */ + flow: function flow(args) { + var $$ = this.internal, + notfoundIds = [], + orgDataCount = $$.getMaxDataCount(), + data = void 0, + domain = void 0, + length = 0, + tail = 0, + diff = void 0, + to = void 0; + + + if (args.json) data = $$.convertJsonToData(args.json, args.keys);else if (args.rows) data = $$.convertRowsToData(args.rows);else if (args.columns) data = $$.convertColumnsToData(args.columns);else return; + + var targets = $$.convertDataToTargets(data, !0); + + // Update/Add data + $$.data.targets.forEach(function (t) { + var found = !1; + + for (var i = 0; i < targets.length; i++) if (t.id === targets[i].id) { + found = !0, t.values[t.values.length - 1] && (tail = t.values[t.values.length - 1].index + 1), length = targets[i].values.length; + + + for (var _j = 0; _j < length; _j++) targets[i].values[_j].index = tail + _j, $$.isTimeSeries() || (targets[i].values[_j].x = tail + _j); + + t.values = t.values.concat(targets[i].values), targets.splice(i, 1); + + break; + } + + found || notfoundIds.push(t.id); + }), $$.data.targets.forEach(function (t) { + for (var i = 0; i < notfoundIds.length; i++) if (t.id === notfoundIds[i]) { + tail = t.values[t.values.length - 1].index + 1; + + + for (var _j2 = 0; _j2 < length; _j2++) t.values.push({ + id: t.id, + index: tail + _j2, + x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + _j2) : tail + _j2, + value: null + }); + } + }), $$.data.targets.length && targets.forEach(function (t) { + var missing = []; + + for (var i = $$.data.targets[0].values[0].index; i < tail; i++) missing.push({ + id: t.id, + index: i, + x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i, + value: null + }); + + t.values.forEach(function (v) { + v.index += tail, $$.isTimeSeries() || (v.x += tail); + }), t.values = missing.concat(t.values); + }), $$.data.targets = $$.data.targets.concat(targets); + // add remained + + // check data count because behavior needs to change when it"s only one + // const dataCount = $$.getMaxDataCount(); + var baseTarget = $$.data.targets[0], + baseValue = baseTarget.values[0]; + + + // Update length to flow if needed + (0, _util.isDefined)(args.to) ? (length = 0, to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to, baseTarget.values.forEach(function (v) { + v.x < to && length++; + })) : (0, _util.isDefined)(args.length) && (length = args.length), orgDataCount ? orgDataCount === 1 && $$.isTimeSeries() && (diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2, domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)], $$.updateXDomain(null, !0, !0, !1, domain)) : (diff = $$.isTimeSeries() ? baseTarget.values.length > 1 ? baseTarget.values[baseTarget.values.length - 1].x - baseValue.x : baseValue.x - $$.getXDomain($$.data.targets)[0] : 1, domain = [baseValue.x - diff, baseValue.x], $$.updateXDomain(null, !0, !0, !1, domain)), $$.updateTargets($$.data.targets), $$.redraw({ + flow: { + index: baseValue.index, + length: length, + duration: (0, _util.isValue)(args.duration) ? args.duration : $$.config.transition_duration, + done: args.done, + orgDataCount: orgDataCount + }, + withLegend: !0, + withTransition: orgDataCount > 1, + withTrimXDomain: !1, + withUpdateXAxis: !0 + }); + } +}), (0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Generate flow + * @memberOf ChartInternal + * @private + * @param {Object} args + * @return {Function} + */ + generateFlow: function generateFlow(args) { + var $$ = this, + config = $$.config; + + + return function () { + var targets = args.targets, + flow = args.flow, + drawBar = args.drawBar, + drawLine = args.drawLine, + drawArea = args.drawArea, + cx = args.cx, + cy = args.cy, + xv = args.xv, + xForText = args.xForText, + yForText = args.yForText, + duration = args.duration, + translateX = void 0, + scaleX = 1, + flowIndex = flow.index, + flowLength = flow.length, + flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex), + flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength), + orgDomain = $$.x.domain(), + durationForFlow = flow.duration || duration, + done = flow.done || function () {}, + wait = $$.generateWait(), + xgrid = $$.xgrid || (0, _d3Selection.selectAll)([]), + xgridLines = $$.xgridLines || (0, _d3Selection.selectAll)([]), + mainRegion = $$.mainRegion || (0, _d3Selection.selectAll)([]), + mainText = $$.mainText || (0, _d3Selection.selectAll)([]), + mainBar = $$.mainBar || (0, _d3Selection.selectAll)([]), + mainLine = $$.mainLine || (0, _d3Selection.selectAll)([]), + mainArea = $$.mainArea || (0, _d3Selection.selectAll)([]), + mainCircle = $$.mainCircle || (0, _d3Selection.selectAll)([]); + + // set flag + $$.flowing = !0, $$.data.targets.forEach(function (d) { + d.values.splice(0, flowLength); + }); + + + // update x domain to generate axis elements for flow + var domain = $$.updateXDomain(targets, !0, !0); + + // update elements related to x scale + $$.updateXGrid && $$.updateXGrid(!0), flow.orgDataCount ? flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x) ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : $$.isTimeSeries() ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : translateX = $$.x(flowStart.x) - $$.x(flowEnd.x) : $$.data.targets[0].values.length === 1 ? $$.isTimeSeries() ? (flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0), flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1), translateX = $$.x(flowStart.x) - $$.x(flowEnd.x)) : translateX = (0, _util.diffDomain)(domain) / 2 : translateX = $$.x(orgDomain[0]) - $$.x(domain[0]), scaleX = (0, _util.diffDomain)(orgDomain) / (0, _util.diffDomain)(domain); + + var transform = "translate(" + translateX + ",0) scale(" + scaleX + ",1)"; + + $$.hideXGridFocus(); + + + var gt = (0, _d3Transition.transition)().ease(_d3Ease.easeLinear).duration(durationForFlow); + + wait.add([$$.axes.x.transition(gt).call($$.xAxis.setTransition(gt)), mainBar.transition(gt).attr("transform", transform), mainLine.transition(gt).attr("transform", transform), mainArea.transition(gt).attr("transform", transform), mainCircle.transition(gt).attr("transform", transform), mainText.transition(gt).attr("transform", transform), mainRegion.filter($$.isRegionOnX).transition(gt).attr("transform", transform), xgrid.transition(gt).attr("transform", transform), xgridLines.transition(gt).attr("transform", transform)]), gt.call(wait, function () { + var shapes = [], + texts = [], + eventRects = []; + + + // remove flowed elements + if (flowLength) { + for (var index, i = 0; i < flowLength; i++) index = flowIndex + i, shapes.push("." + _classes2.default.shape + "-" + index), texts.push("." + _classes2.default.text + "-" + index), eventRects.push("." + _classes2.default.eventRect + "-" + index); + + $$.svg.selectAll("." + _classes2.default.shapes).selectAll(shapes).remove(), $$.svg.selectAll("." + _classes2.default.texts).selectAll(texts).remove(), $$.svg.selectAll("." + _classes2.default.eventRects).selectAll(eventRects).remove(), $$.svg.select("." + _classes2.default.xgrid).remove(); + } + + // draw again for removing flowed elements and reverting attr + + + if (xgrid.size() && xgrid.attr("transform", null).attr($$.xgridAttr), xgridLines.attr("transform", null), xgridLines.select("line").attr("x1", config.axis_rotated ? 0 : xv).attr("x2", config.axis_rotated ? $$.width : xv), xgridLines.select("text").attr("x", config.axis_rotated ? $$.width : 0).attr("y", xv), mainBar.attr("transform", null).attr("d", drawBar), mainLine.attr("transform", null).attr("d", drawLine), mainArea.attr("transform", null).attr("d", drawArea), mainCircle.attr("transform", null), $$.isCirclePoint()) mainCircle.attr("cx", cx).attr("cy", cy);else { + var xFunc = function (d) { + return cx(d) - config.point_r; + }, + yFunc = function (d) { + return cy(d) - config.point_r; + }; + + mainCircle.attr("x", xFunc).attr("y", yFunc).attr("cx", cx) // when pattern is used, it possibly contain 'circle' also. + .attr("cy", cy); + } + + mainText.attr("transform", null).attr("x", xForText).attr("y", yForText).style("fill-opacity", $$.opacityForText.bind($$)), mainRegion.attr("transform", null), mainRegion.select("rect").filter($$.isRegionOnX).attr("x", $$.regionX.bind($$)).attr("width", $$.regionWidth.bind($$)), config.interaction_enabled && $$.redrawEventRect(), done(), $$.flowing = !1; + }); + }; + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 47 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get selected data points.<br><br> + * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true. + * @method selected + * @instance + * @memberOf Chart + * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned. + * @return {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]` + * @example + * // all selected data points will be returned. + * chart.selected(); + * // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ] + * + * // all selected data points of data1 will be returned. + * chart.selected("data1"); + */ + selected: function selected(targetId) { + var $$ = this.internal, + dataPoint = []; + + + return $$.main.selectAll("." + (_classes2.default.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + _classes2.default.shape).filter(function () { + return (0, _d3Selection.select)(this).classed(_classes2.default.SELECTED); + }).each(function (d) { + return dataPoint.push(d); + }), dataPoint; + }, + + + /** + * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)` + * @method select + * @instance + * @memberOf Chart + * @param {String|Array} [ids] id value to get selected. + * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points. + * @param {Boolean} [resetOther] Unselect already selected. + * @example + * // select all data points + * chart.select(); + * + * // select all from 'data2' + * chart.select("data2"); + * + * // select all from 'data1' and 'data2' + * chart.select(["data1", "data2"]); + * + * // select from 'data1', indices 2 and unselect others selected + * chart.select("data1", [2], true); + * + * // select from 'data1', indices 0, 3 and 5 + * chart.select("data1", [0, 3, 5]); + */ + select: function select(ids, indices, resetOther) { + var $$ = this.internal, + config = $$.config; + config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + id = d.data ? d.data.id : d.id, + toggle = $$.getToggle(this, d).bind($$), + isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0, + isTargetIndex = !indices || indices.indexOf(i) >= 0, + isSelected = shape.classed(_classes2.default.SELECTED); + + + // line/area selection not supported yet + shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || (isTargetId && isTargetIndex ? config.data_selection_isselectable(d) && !isSelected && toggle(!0, shape.classed(_classes2.default.SELECTED, !0), d, i) : (0, _util.isDefined)(resetOther) && resetOther && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i)); + }); + }, + + + /** + * Set data points to be un-selected. + * @method unselect + * @instance + * @memberOf Chart + * @param {String|Array} [ids] id value to be unselected. + * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points. + * @example + * // unselect all data points + * chart.unselect(); + * + * // unselect all from 'data1' + * chart.unselect("data1"); + * + * // unselect from 'data1', indices 2 + * chart.unselect("data1", [2]); + */ + unselect: function unselect(ids, indices) { + var $$ = this.internal, + config = $$.config; + config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) { + var shape = (0, _d3Selection.select)(this), + id = d.data ? d.data.id : d.id, + toggle = $$.getToggle(this, d).bind($$), + isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0, + isTargetIndex = !indices || indices.indexOf(i) >= 0, + isSelected = shape.classed(_classes2.default.SELECTED); + + + // line/area selection not supported yet + shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i); + }); + } +}); + +/***/ }), +/* 48 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Change the type of the chart. + * @method transform + * @instance + * @memberOf Chart + * @param {String} type Specify the type to be transformed. The types listed in data.type can be used. + * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate. + * @example + * // all targets will be bar chart. + * chart.transform("bar"); + * + * // only data1 will be bar chart. + * chart.transform("bar", "data1"); + * + * // only data1 and data2 will be bar chart. + * chart.transform("bar", ["data1", "data2"]); + */ + transform: function transform(type, targetIds) { + var $$ = this.internal, + options = ["pie", "donut"].indexOf(type) >= 0 ? { withTransform: !0 } : null; + $$.transformTo(targetIds, type, options); + } +}), (0, _util.extend)(_ChartInternal2.default.prototype, { + /** + * Change the type of the chart. + * @private + * @param {String|Array} targetIds + * @param {String} type + * @param {Object} optionsForRedraw + */ + transformTo: function transformTo(targetIds, type, optionsForRedraw) { + var $$ = this, + withTransitionForAxis = !$$.hasArcType(), + options = optionsForRedraw || { withTransitionForAxis: withTransitionForAxis }; + options.withTransitionForTransform = !1, $$.transiting = !1, $$.setTargetType(targetIds, type), $$.updateTargets($$.data.targets), $$.updateAndRedraw(options); + } +}); /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + +/***/ }), +/* 49 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Update groups for the targets. + * @method groups + * @instance + * @memberOf Chart + * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped. + * @example + * // data1 and data2 will be a new group. + * chart.groups([ + * ["data1", "data2"] + * ]); + */ + groups: function groups(_groups) { + var $$ = this.internal, + config = $$.config; + return (0, _util.isUndefined)(_groups) ? config.data_groups : (config.data_groups = _groups, $$.redraw(), config.data_groups); + } +}); + +/***/ }), +/* 50 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Update x grid lines. + * @method xgrids + * @instance + * @memberOf Chart + * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines. + * @example + * // Show 2 x grid lines + * chart.xgrids([ + * {value: 1, text: "Label 1"}, + * {value: 4, text: "Label 4"} + * ]); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var xgrids = function (grids) { + var $$ = this.internal, + config = $$.config; + return grids ? (config.grid_x_lines = grids, $$.redrawWithoutRescale(), config.grid_x_lines) : config.grid_x_lines; +}; + +(0, _util.extend)(xgrids, { + /** + * Add x grid lines.<br> + * This API adds new x grid lines instead of replacing like xgrids. + * @method xgrids․add + * @instance + * @memberOf Chart + * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added. + * @example + * // Add a new x grid line + * chart.xgrids.add( + * {value: 4, text: "Label 4"} + * ); + * + * // Add new x grid lines + * chart.xgrids.add([ + * {value: 2, text: "Label 2"}, + * {value: 4, text: "Label 4"} + * ]); + */ + add: function add(grids) { + return this.xgrids(this.internal.config.grid_x_lines.concat(grids || [])); + }, + + /** + * Remove x grid lines.<br> + * This API removes x grid lines. + * @method xgrids․remove + * @instance + * @memberOf Chart + * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed. + * @example + * // x grid line on x = 2 will be removed + * chart.xgrids.remove({value: 2}); + * + * // x grid lines that have 'grid-A' will be removed + * chart.xgrids.remove({ + * class: "grid-A" + * }); + * + * // all of x grid lines will be removed + * chart.xgrids.remove(); + */ + remove: function remove(params) { + this.internal.removeGridLines(params, !0); + } +}); + + +/** + * Update y grid lines. + * @method ygrids + * @instance + * @memberOf Chart + * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines. + * @example + * // Show 2 y grid lines + * chart.ygrids([ + * {value: 100, text: "Label 1"}, + * {value: 400, text: "Label 4"} + * ]); + */ +var ygrids = function (grids) { + var $$ = this.internal, + config = $$.config; + return grids ? (config.grid_y_lines = grids, $$.redrawWithoutRescale(), config.grid_y_lines) : config.grid_y_lines; +}; + +(0, _util.extend)(ygrids, { + /** + * Add y grid lines.<br> + * This API adds new y grid lines instead of replacing like ygrids. + * @method ygrids․add + * @instance + * @memberOf Chart + * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added. + * @example + * // Add a new x grid line + * chart.ygrids.add( + * {value: 400, text: "Label 4"} + * ); + * + * // Add new x grid lines + * chart.ygrids.add([ + * {value: 200, text: "Label 2"}, + * {value: 400, text: "Label 4"} + * ]); + */ + add: function add(grids) { + return this.ygrids(this.internal.config.grid_y_lines.concat(grids || [])); + }, + + /** + * Remove y grid lines.<br> + * This API removes x grid lines. + * @method ygrids․remove + * @instance + * @memberOf Chart + * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed. + * @example + * // y grid line on y = 200 will be removed + * chart.ygrids.remove({value: 200}); + * + * // y grid lines that have 'grid-A' will be removed + * chart.ygrids.remove({ + * class: "grid-A" + * }); + * + * // all of y grid lines will be removed + * chart.ygrids.remove(); + */ + remove: function remove(params) { + this.internal.removeGridLines(params, !1); + } +}), (0, _util.extend)(_Chart2.default.prototype, { + xgrids: xgrids, + ygrids: ygrids +}); + +/***/ }), +/* 51 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _classes = __webpack_require__(8), + _classes2 = _interopRequireDefault(_classes), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Update regions. + * @method regions + * @instance + * @memberOf Chart + * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions. + * @return {Array} regions + * @example + * // Show 2 regions + * chart.regions([ + * {axis: "x", start: 5, class: "regionX"}, + * {axis: "y", end: 50, class: "regionY"} + * ]); + */ +var regions = function (_regions) { + var $$ = this.internal, + config = $$.config; + return _regions ? (config.regions = _regions, $$.redrawWithoutRescale(), config.regions) : config.regions; +}; /** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(regions, { + /** + * Add new region.<br><br> + * This API adds new region instead of replacing like regions. + * @method regions․add + * @instance + * @memberOf Chart + * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added. + * @return {Array} regions + * @example + * // Add a new region + * chart.regions.add( + * {axis: "x", start: 5, class: "regionX"} + * ); + * + * // Add new regions + * chart.regions.add([ + * {axis: "x", start: 5, class: "regionX"}, + * {axis: "y", end: 50, class: "regionY"} + *]); + */ + add: function add(regions) { + var $$ = this.internal, + config = $$.config; + return regions ? (config.regions = config.regions.concat(regions), $$.redrawWithoutRescale(), config.regions) : config.regions; + }, + + /** + * Remove regions.<br><br> + * This API removes regions. + * @method regions․remove + * @instance + * @memberOf Chart + * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed. + * @return {Array} regions + * @example + * // regions that have 'region-A' or 'region-B' will be removed. + * chart.regions.remove({ + * classes: [ + * "region-A", "region-B" + * ] + * }); + * + * // all of regions will be removed. + * chart.regions.remove(); + */ + remove: function remove(optionsValue) { + var $$ = this.internal, + config = $$.config, + options = optionsValue || {}, + duration = $$.getOption(options, "duration", config.transition_duration), + classes = $$.getOption(options, "classes", [_classes2.default.region]), + regions = $$.main.select("." + _classes2.default.regions).selectAll(classes.map(function (c) { + return "." + c; + })); + + + return (duration ? regions.transition().duration(duration) : regions).style("opacity", "0").remove(), config.regions = config.regions.filter(function (region) { + var found = !1; + + return !region.class || (region.class.split(" ").forEach(function (c) { + classes.indexOf(c) >= 0 && (found = !0); + }), !found); + }), config.regions; + } +}), (0, _util.extend)(_Chart2.default.prototype, { regions: regions }); + +/***/ }), +/* 52 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Get data loaded in the chart. + * @method data + * @instance + * @memberOf Chart + * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned. + * @example + * // Get only data1 data + * chart.data("data1"); + * + * // Get data1 and data2 data + * chart.data(["data1", "data2"]); + * + * // Get all data + * chart.data(); + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var data = function (targetIds) { + var targets = this.internal.data.targets; + + return (0, _util.isUndefined)(targetIds) ? targets : targets.filter(function (t) { + return targetIds.indexOf(t.id) >= 0; + }); +}; + +(0, _util.extend)(data, { + /** + * Get data shown in the chart. + * @method data․shown + * @instance + * @memberOf Chart + * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned. + * @example + * // Get shown data by filtering to include only data1 data + * chart.data.shown("data1"); + * + * // Get shown data by filtering to include data1 and data2 data + * chart.data.shown(["data1", "data2"]); + * + * // Get all shown data + * chart.data.shown(); + */ + shown: function shown(targetIds) { + return this.internal.filterTargetsToShow(this.data(targetIds)); + }, + + /** + * Get values of the data loaded in the chart. + * @method data․values + * @instance + * @memberOf Chart + * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned + * @example + * // Get data1 values + * chart.data.values("data1"); + */ + values: function (targetId) { + var values = null; + + if (targetId) { + var targets = this.data(targetId); + + targets && (0, _util.isArray)(targets) && (values = [], targets.forEach(function (v) { + values = values.concat(v.values.map(function (d) { + return d.value; + })); + })); + } + + return values; + }, + + /** + * Get and set names of the data loaded in the chart. + * @method data․names + * @instance + * @memberOf Chart + * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as + * @example + * // Get current names + * chart.data.names(); + * + * // Update names + * chart.data.names({ + * data1: "New Name 1", + * data2: "New Name 2" + *}); + */ + names: function names(_names) { + + return this.internal.clearLegendItemTextBoxCache(), this.internal.updateDataAttributes("names", _names); + }, + + /** + * Get and set colors of the data loaded in the chart. + * @method data․colors + * @instance + * @memberOf Chart + * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as + * @example + * // Get current colors + * chart.data.colors(); + * + * // Update colors + * chart.data.colors({ + * data1: "#FFFFFF", + * data2: "#000000" + * }); + */ + colors: function colors(_colors) { + return this.internal.updateDataAttributes("colors", _colors); + }, + + /** + * Get and set axes of the data loaded in the chart. + * @method data․axes + * @instance + * @memberOf Chart + * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as + * @example + * // Get current axes + * chart.data.axes(); + * + * // Update axes + * chart.data.axes({ + * data1: "y", + * data2: "y2" + * }); + */ + axes: function axes(_axes) { + return this.internal.updateDataAttributes("axes", _axes); + } +}), (0, _util.extend)(_Chart2.default.prototype, { data: data }); + +/***/ }), +/* 53 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Set specified category name on category axis. + * @method category + * @instance + * @memberOf Chart + * @param {Number} i index of category to be changed + * @param {String} category category value to be changed + * @example + * chart.category(2, "Category 3"); + */ + category: function category(i, _category) { + var $$ = this.internal, + config = $$.config; + + + return arguments.length > 1 && (config.axis_x_categories[i] = _category, $$.redraw()), config.axis_x_categories[i]; + }, + + + /** + * Set category names on category axis. + * @method categories + * @instance + * @memberOf Chart + * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required. + * @example + * chart.categories([ + * "Category 1", "Category 2", ... + * ]); + */ + categories: function categories(_categories) { + var $$ = this.internal, + config = $$.config; + return arguments.length ? (config.axis_x_categories = _categories, $$.redraw(), config.axis_x_categories) : config.axis_x_categories; + } +}); + +/***/ }), +/* 54 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get the color + * @method color + * @instance + * @memberOf Chart + * @param {String} id id to get the color + * @example + * chart.color("data1"); + */ + color: function color(id) { + return this.internal.color(id); // more patterns + } +}); + +/***/ }), +/* 55 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Get and set x values for the chart. + * @method x + * @instance + * @memberOf Chart + * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids. + * @return {Object} xs + * @example + * // Get current x values + * chart.x(); + * + * // Update x values for all targets + * chart.x([100, 200, 300, 400, ...]); + */ + x: function x(_x) { + var $$ = this.internal; + + return arguments.length && ($$.updateTargetX($$.data.targets, _x), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), $$.data.xs; + }, + + + /** + * Get and set x values for the chart. + * @method xs + * @instance + * @memberOf Chart + * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids. + * @return {Object} xs + * @example + * // Get current x values + * chart.xs(); + * + * // Update x values for all targets + * chart.xs({ + * data1: [10, 20, 30, 40, ...], + * data2: [100, 200, 300, 400, ...] + * }); + */ + xs: function xs(_xs) { + var $$ = this.internal; + + return arguments.length && ($$.updateTargetXs($$.data.targets, _xs), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), $$.data.xs; + } +}); + +/***/ }), +/* 56 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Set the min/max value + * @param {Chart} $$ + * @param {String} type + * @param {Object} value + * @return {undefined} + * @private + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var setMinMax = function ($$, type, value) { + var config = $$.config, + axisY = "axis_y_" + type, + axisY2 = "axis_y2_" + type; + + + return (0, _util.isDefined)(value) && ((0, _util.isObjectType)(value) ? ((0, _util.isValue)(value.x) && (config["axis_x_" + type] = value.x), (0, _util.isValue)(value.y) && (config[axisY] = value.y), (0, _util.isValue)(value.y2) && (config[axisY2] = value.y2)) : (config[axisY] = value, config[axisY2] = value), $$.redraw({ + withUpdateOrgXDomain: !0, + withUpdateXDomain: !0 + })), undefined; +}, + getMinMax = function ($$, type) { + var config = $$.config; + + + return { + x: config["axis_x_" + type], + y: config["axis_y_" + type], + y2: config["axis_y2_" + type] + }; +}, + axis = (0, _util.extend)(function () {}, { + /** + * Get and set axis labels. + * @method axis․labels + * @instance + * @memberOf Chart + * @param {Object} labels specified axis' label to be updated. + * @example + * // Update axis' label + * chart.axis.labels({ + * x: "New X Axis Label", + * y: "New Y Axis Label" + * }); + */ + labels: function labels(_labels) { + var $$ = this.internal; + + arguments.length && (Object.keys(_labels).forEach(function (axisId) { + $$.axis.setLabelText(axisId, _labels[axisId]); + }), $$.axis.updateLabels()); + }, + + /** + * Get and set axis min value. + * @method axis․min + * @instance + * @memberOf Chart + * @param {Object} min If min is given, specified axis' min value will be updated.<br> + * If no argument is given, the min values set on generating option for each axis will be returned. + * If not set any min values on generation, it will return `undefined`. + * @example + * // Update axis' min + * chart.axis.min({ + * x: -10, + * y: 1000, + * y2: 100 + * }); + */ + min: function min(_min) { + var $$ = this.internal; + + return arguments.length ? setMinMax($$, "min", _min) : getMinMax($$, "min"); + }, + + /** + * Get and set axis max value. + * @method axis․max + * @instance + * @memberOf Chart + * @param {Object} max If max is given, specified axis' max value will be updated.<br> + * If no argument is given, the max values set on generating option for each axis will be returned. + * If not set any max values on generation, it will return `undefined`. + * @example + * // Update axis' label + * chart.axis.max({ + * x: 100, + * y: 1000, + * y2: 10000 + * }); + */ + max: function max(_max) { + var $$ = this.internal; + + return arguments.length ? setMinMax($$, "max", _max) : getMinMax($$, "max"); + }, + + /** + * Get and set axis min and max value. + * @method axis․range + * @instance + * @memberOf Chart + * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned. + * @example + * // Update axis' label + * chart.axis.range({ + * min: { + * x: -10, + * y: -1000, + * y2: -10000 + * }, + * max: { + * x: 100, + * y: 1000, + * y2: 10000 + * }, + * }); + */ + range: function range(_range) { + var axis = this.axis; + + if (arguments.length) (0, _util.isDefined)(_range.max) && axis.max(_range.max), (0, _util.isDefined)(_range.min) && axis.min(_range.min);else return { + max: axis.max(), + min: axis.min() + }; + + return undefined; + } +}); + +/** + * Get the min/max value + * @param {Chart} $$ + * @param {String} type + * @return {{x, y, y2}} + * @private + */ + + +/** + * Define axis + * @ignore + */ + + +(0, _util.extend)(_Chart2.default.prototype, { axis: axis }); + +/***/ }), +/* 57 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Define legend + * @ignore + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var legend = (0, _util.extend)(function () {}, { + /** + * Show legend for each target. + * @method legend․show + * @instance + * @memberOf Chart + * @param {String|Array} targetIds + * - If targetIds is given, specified target's legend will be shown. + * - If only one target is the candidate, String can be passed. + * - If no argument is given, all of target's legend will be shown. + * @example + * // Show legend for data1. + * chart.legend.show("data1"); + * + * // Show legend for data1 and data2. + * chart.legend.show(["data1", "data2"]); + * + * // Show all legend. + * chart.legend.show(); + */ + show: function show(targetIds) { + var $$ = this.internal; + + $$.showLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 }); + }, + + /** + * Hide legend for each target. + * @method legend․hide + * @instance + * @memberOf Chart + * @param {String|Array} targetIds + * - If targetIds is given, specified target's legend will be hidden. + * - If only one target is the candidate, String can be passed. + * - If no argument is given, all of target's legend will be hidden. + * @example + * // Hide legend for data1. + * chart.legend.hide("data1"); + * + * // Hide legend for data1 and data2. + * chart.legend.hide(["data1", "data2"]); + * + * // Hide all legend. + * chart.legend.hide(); + */ + hide: function hide(targetIds) { + var $$ = this.internal; + + $$.hideLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 }); + } +}); + +(0, _util.extend)(_Chart2.default.prototype, { legend: legend }); + +/***/ }), +/* 58 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _browser = __webpack_require__(59), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Resize the chart. + * @method resize + * @instance + * @memberOf Chart + * @param {Object} size This argument should include width and height in pixels. + * @example + * // Resize to 640x480 + * chart.resize({ + * width: 640, + * height: 480 + * }); + */ + resize: function resize(size) { + var config = this.internal.config; + + config.size_width = size ? size.width : null, config.size_height = size ? size.height : null, this.flush(); + }, + + + /** + * Force to redraw. + * @method flush + * @instance + * @memberOf Chart + * @param {Boolean} [soft] For soft redraw. + * @example + * chart.flush(); + * + * // for soft redraw + * chart.flush(true); + */ + flush: function flush(soft) { + var $$ = this.internal; + + // reset possible zoom scale + $$.zoomScale = null, soft ? $$.redraw({ + withTransform: !0, + withUpdateXDomain: !0, + withUpdateOrgXDomain: !0, + withLegend: !0 + }) : $$.updateAndRedraw({ + withLegend: !0, + withTransition: !1, + withTransitionForTransform: !1 + }); + }, + + + /** + * Reset the chart object and remove element and events completely. + * @method destroy + * @instance + * @memberOf Chart + * @example + * chart.destroy(); + */ + destroy: function destroy() { + var _this = this, + $$ = this.internal; + + return (0, _util.notEmpty)($$) && ($$.charts.splice($$.charts.indexOf(this), 1), (0, _util.isDefined)($$.resizeTimeout) && _browser.window.clearTimeout($$.resizeTimeout), (0, _d3Selection.select)(_browser.window).on("resize.bb", null), $$.selectChart.classed("bb", !1).html(""), Object.keys(this).forEach(function (key) { + key === "internal" && Object.keys($$).forEach(function (k) { + $$[k] = null; + }), _this[key] = null, delete _this[key]; + })), null; + }, + + + /** + * Get or set single config option value. + * @method config + * @instance + * @memberOf Chart + * @param {String} name The option key name. + * @param {*} [value] The value accepted for indicated option. + * @param {Boolean} [redraw] Set to redraw with the new option changes. + * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only. + * @example + * // Getter + * chart.config("gauge.max"); + * + * // Setter + * chart.config("gauge.max", 100); + * + * // Setter & redraw with the new option + * chart.config("gauge.max", 100, true); + */ + config: function config(name, value, redraw) { + var $$ = this.internal, + key = name && name.replace(/\./g, "_"), + res = void 0; + + + return key in $$.config && ((0, _util.isDefined)(value) ? ($$.config[key] = value, res = value, redraw && this.flush(!0)) : res = $$.config[key]), res; + } +}); + +/***/ }), +/* 59 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +exports.__esModule = !0; +exports.document = exports.window = undefined; + +var _util = __webpack_require__(6), + win = (0, _util.isDefined)(window) && window.Math === Math ? window : (0, _util.isDefined)(self) && (self.Math === Math ? self : Function("return this")()), + doc = win.document; + +/** + * Window object + * @module + * @ignore + */ +/* eslint-disable no-new-func */ + + +/* eslint-enable no-new-func */ + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +exports.window = win; +exports.document = doc; + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Define tooltip + * @ignore + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var tooltip = (0, _util.extend)(function () {}, { + /** + * Show tooltip + * @method tooltip․show + * @instance + * @memberOf Chart + * @param {Object} args The object can consist with following members:<br> + * + * | Key | Type | Description | + * | --- | --- | --- | + * | index | Number | Determine focus by index | + * | x | Number | Date | Determine focus by x Axis index | + * | data | Object | Determine focus data with following keys: `x` or `index`.<br>When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is set, the target is determined by mouse position and needs specify `x`, `id` and `value`. | + * | mouse | Array | Determine x and y coordinate value relative the targeted x Axis element.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` | + * + * @example + * // show the 2nd x Axis coordinate tooltip + * chart.tooltip.show({ + * index: 1 + * }); + * + * // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element. + * chart.tooltip.show({ + * data: {x: 2}, + * mouse: [50, 100] + * }); + * + * // show tooltip for timeseries x axis + * chart.tooltip.show({ + * x: new Date("2018-01-02 00:00") + * }); + */ + show: function show() { + var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + $$ = this.internal, + index = void 0, + mouse = void 0; + + + // determine mouse position on the chart + args.mouse && (mouse = args.mouse), args.data ? $$.isMultipleX() ? (mouse = [$$.x(args.data.x), $$.getYScale(args.data.id)(args.data.value)], index = null) : index = (0, _util.isValue)(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x) : (0, _util.isDefined)(args.x) ? index = $$.getIndexByX(args.x) : (0, _util.isDefined)(args.index) && (index = args.index), ($$.inputType === "mouse" ? ["mouseover", "mousemove"] : ["touchstart"]).forEach(function (eventName) { + $$.dispatchEvent(eventName, index, mouse); + }); + }, + + /** + * Hide tooltip + * @method tooltip․hide + * @instance + * @memberOf Chart + */ + hide: function hide() { + var $$ = this.internal; + + $$.hideTooltip(), $$.hideXGridFocus(), $$.unexpandCircles(), $$.unexpandBars(); + } +}); + +(0, _util.extend)(_Chart2.default.prototype, { tooltip: tooltip }); + +/***/ }), +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _ChartInternal = __webpack_require__(3), + _ChartInternal2 = _interopRequireDefault(_ChartInternal), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ +var ua = window.navigator.userAgent; + +(0, _util.extend)(_ChartInternal2.default.prototype, { + isSafari: function isSafari() { + return ua.indexOf("Safari") > -1 && !this.isChrome(); + }, + isChrome: function isChrome() { + return ua.indexOf("Chrome") > -1; + }, + isMobile: function isMobile() { + // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent + return ua.indexOf("Mobi") > -1; + } +}); + +/***/ }), +/* 62 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _d3Selection = __webpack_require__(64), + _Chart = __webpack_require__(1), + _Chart2 = _interopRequireDefault(_Chart), + _util = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +/** + * Encode to base64 + * @param {String} str + * @return {String} + * @private + * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding + */ +var b64EncodeUnicode = function (str) { + return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) { + return String.fromCharCode("0x" + p); + })); +}, + nodeToSvgDataUrl = function (node) { + var bounds = node.getBoundingClientRect(), + clone = node.cloneNode(!0), + styleSheets = (0, _util.toArray)(document.styleSheets), + cssRules = (0, _util.getCssRules)(styleSheets), + cssText = cssRules.filter(function (r) { + return r.cssText; + }).map(function (r) { + return r.cssText; + }); + clone.setAttribute("xmlns", _d3Selection.namespaces.xhtml); + var nodeXml = new XMLSerializer().serializeToString(clone), + dataStr = ("<svg xmlns=\"" + _d3Selection.namespaces.svg + "\" width=\"" + bounds.width + "\" height=\"" + bounds.height + "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t<style>" + cssText.join("\n") + "</style>\n\t\t\t\t" + nodeXml + "\n\t\t\t</foreignObject></svg>").replace(/#/g, "%23").replace("/\n/g", "%0A"); + + // foreignObject not supported in IE11 and below + // https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx + + return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr); +}; + +/** + * Convert svg node to data url + * @param {HTMLElement} node + * @return {String} + * @private + */ +/** + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + */ + + +(0, _util.extend)(_Chart2.default.prototype, { + /** + * Export chart as an image. + * - **NOTE:** + * - IE11 and below not work properly due to the lack of the feature(<a href="https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx">foreignObject</a>) support + * - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image. + * @method export + * @instance + * @memberOf Chart + * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format) + * @param {Function} [callback] The callback to be invoked when export is ready. + * @return {String} dataURI + * @example + * chart.export(); + * // --> "data:image/svg+xml;base64,PHN..." + * + * // Initialize the download automatically + * chart.export("image/png", dataUrl => { + * const link = document.createElement("a"); + * + * link.download = `${Date.now()}.png`; + * link.href = dataUrl; + * link.innerHTML = "Download chart as image"; + * + * document.body.appendChild(link); + * }); + */ + export: function _export() { + var mimeType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png", + callback = arguments[1], + svgDataUrl = nodeToSvgDataUrl(this.element); + + + if ((0, _util.isFunction)(callback)) { + var img = new Image(); + + img.crosssOrigin = "Anonymous", img.onload = function () { + var canvas = document.createElement("canvas"), + ctx = canvas.getContext("2d"); + canvas.width = img.width, canvas.height = img.height, ctx.drawImage(img, 0, 0), canvas.toBlob(function (blob) { + callback(window.URL.createObjectURL(blob)); + }, mimeType); + }, img.src = svgDataUrl; + } + + return svgDataUrl; + } +}); + +/***/ }), +/* 63 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-path/src/path.js +var pi = Math.PI, + tau = 2 * pi, + epsilon = 1e-6, + tauEpsilon = tau - epsilon; + +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; +} + +function path() { + return new Path; +} + +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x, y) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x, y) { + this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); + }, + quadraticCurveTo: function(x1, y1, x, y) { + this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, + y0 = this._y1, + x21 = x2 - x1, + y21 = y2 - y1, + x01 = x0 - x1, + y01 = y0 - y1, + l01_2 = x01 * x01 + y01 * y01; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x1,y1). + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. + else if (!(l01_2 > epsilon)) {} + + // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? + // Equivalently, is (x1,y1) coincident with (x2,y2)? + // Or, is the radius zero? Line to (x1,y1). + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Otherwise, draw an arc! + else { + var x20 = x2 - x0, + y20 = y2 - y0, + l21_2 = x21 * x21 + y21 * y21, + l20_2 = x20 * x20 + y20 * y20, + l21 = Math.sqrt(l21_2), + l01 = Math.sqrt(l01_2), + l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), + t01 = l / l01, + t21 = l / l21; + + // If the start tangent is not coincident with (x0,y0), line to. + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); + } + + this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r; + var dx = r * Math.cos(a0), + dy = r * Math.sin(a0), + x0 = x + dx, + y0 = y + dy, + cw = 1 ^ ccw, + da = ccw ? a0 - a1 : a1 - a0; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x0,y0). + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } + + // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). + else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + + // Is this arc empty? We’re done. + if (!r) return; + + // Does the angle go the wrong way? Flip the direction. + if (da < 0) da = da % tau + tau; + + // Is this a complete circle? Draw two arcs to complete the circle. + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } + + // Is this arc non-empty? Draw an arc! + else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); + } + }, + rect: function(x, y, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; + }, + toString: function() { + return this._; + } +}; + +/* harmony default export */ var src_path = (path); + +// CONCATENATED MODULE: ./node_modules/d3-path/index.js + + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function constant() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/math.js +var abs = Math.abs; +var atan2 = Math.atan2; +var cos = Math.cos; +var max = Math.max; +var min = Math.min; +var sin = Math.sin; +var sqrt = Math.sqrt; + +var math_epsilon = 1e-12; +var math_pi = Math.PI; +var halfPi = math_pi / 2; +var math_tau = 2 * math_pi; + +function acos(x) { + return x > 1 ? 0 : x < -1 ? math_pi : Math.acos(x); +} + +function asin(x) { + return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/arc.js + + + + +function arcInnerRadius(d) { + return d.innerRadius; +} + +function arcOuterRadius(d) { + return d.outerRadius; +} + +function arcStartAngle(d) { + return d.startAngle; +} + +function arcEndAngle(d) { + return d.endAngle; +} + +function arcPadAngle(d) { + return d && d.padAngle; // Note: optional! +} + +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, + x32 = x3 - x2, y32 = y3 - y2, + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10); + return [x0 + t * x10, y0 + t * y10]; +} + +// Compute perpendicular offset line of length rc. +// http://mathworld.wolfram.com/Circle-LineIntersection.html +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, + y01 = y0 - y1, + lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), + ox = lo * y01, + oy = -lo * x01, + x11 = x0 + ox, + y11 = y0 + oy, + x10 = x1 + ox, + y10 = y1 + oy, + x00 = (x11 + x10) / 2, + y00 = (y11 + y10) / 2, + dx = x10 - x11, + dy = y10 - y11, + d2 = dx * dx + dy * dy, + r = r1 - rc, + D = x11 * y10 - x10 * y11, + d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), + cx0 = (D * dy - dx * d) / d2, + cy0 = (-D * dx - dy * d) / d2, + cx1 = (D * dy + dx * d) / d2, + cy1 = (-D * dx + dy * d) / d2, + dx0 = cx0 - x00, + dy0 = cy0 - y00, + dx1 = cx1 - x00, + dy1 = cy1 - y00; + + // Pick the closer of the two intersection points. + // TODO Is there a faster way to determine which intersection to use? + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; + + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) + }; +} + +/* harmony default export */ var src_arc = (function() { + var innerRadius = arcInnerRadius, + outerRadius = arcOuterRadius, + cornerRadius = constant(0), + padRadius = null, + startAngle = arcStartAngle, + endAngle = arcEndAngle, + padAngle = arcPadAngle, + context = null; + + function arc() { + var buffer, + r, + r0 = +innerRadius.apply(this, arguments), + r1 = +outerRadius.apply(this, arguments), + a0 = startAngle.apply(this, arguments) - halfPi, + a1 = endAngle.apply(this, arguments) - halfPi, + da = abs(a1 - a0), + cw = a1 > a0; + + if (!context) context = buffer = src_path(); + + // Ensure that the outer radius is always larger than the inner radius. + if (r1 < r0) r = r1, r1 = r0, r0 = r; + + // Is it a point? + if (!(r1 > math_epsilon)) context.moveTo(0, 0); + + // Or is it a circle or annulus? + else if (da > math_tau - math_epsilon) { + context.moveTo(r1 * cos(a0), r1 * sin(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > math_epsilon) { + context.moveTo(r0 * cos(a1), r0 * sin(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } + + // Or is it a circular or annular sector? + else { + var a01 = a0, + a11 = a1, + a00 = a0, + a10 = a1, + da0 = da, + da1 = da, + ap = padAngle.apply(this, arguments) / 2, + rp = (ap > math_epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), + rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), + rc0 = rc, + rc1 = rc, + t0, + t1; + + // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. + if (rp > math_epsilon) { + var p0 = asin(rp / r0 * sin(ap)), + p1 = asin(rp / r1 * sin(ap)); + if ((da0 -= p0 * 2) > math_epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; + else da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > math_epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; + else da1 = 0, a01 = a11 = (a0 + a1) / 2; + } + + var x01 = r1 * cos(a01), + y01 = r1 * sin(a01), + x10 = r0 * cos(a10), + y10 = r0 * sin(a10); + + // Apply rounded corners? + if (rc > math_epsilon) { + var x11 = r1 * cos(a11), + y11 = r1 * sin(a11), + x00 = r0 * cos(a00), + y00 = r0 * sin(a00); + + // Restrict the corner radius according to the sector angle. + if (da < math_pi) { + var oc = da0 > math_epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10], + ax = x01 - oc[0], + ay = y01 - oc[1], + bx = x11 - oc[0], + by = y11 - oc[1], + kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), + lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = min(rc, (r0 - lc) / (kc - 1)); + rc1 = min(rc, (r1 - lc) / (kc + 1)); + } + } + + // Is the sector collapsed to a line? + if (!(da1 > math_epsilon)) context.moveTo(x01, y01); + + // Does the sector’s outer ring have rounded corners? + else if (rc1 > math_epsilon) { + t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); + + context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); + context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw); + context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); + } + } + + // Or is the outer ring just a circular arc? + else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + + // Is there no inner ring, and it’s a circular sector? + // Or perhaps it’s an annular sector collapsed due to padding? + if (!(r0 > math_epsilon) || !(da0 > math_epsilon)) context.lineTo(x10, y10); + + // Does the sector’s inner ring (or point) have rounded corners? + else if (rc0 > math_epsilon) { + t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + + context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); + context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw); + context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); + } + } + + // Or is the inner ring just a circular arc? + else context.arc(0, 0, r0, a10, a00, cw); + } + + context.closePath(); + + if (buffer) return context = null, buffer + "" || null; + } + + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, + a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - math_pi / 2; + return [cos(a) * r, sin(a) * r]; + }; + + arc.innerRadius = function(_) { + return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius; + }; + + arc.outerRadius = function(_) { + return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius; + }; + + arc.cornerRadius = function(_) { + return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius; + }; + + arc.padRadius = function(_) { + return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius; + }; + + arc.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle; + }; + + arc.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle; + }; + + arc.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle; + }; + + arc.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), arc) : context; + }; + + return arc; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/linear.js +function Linear(context) { + this._context = context; +} + +Linear.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: this._context.lineTo(x, y); break; + } + } +}; + +/* harmony default export */ var linear = (function(context) { + return new Linear(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/point.js +function point_x(p) { + return p[0]; +} + +function point_y(p) { + return p[1]; +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/line.js + + + + + +/* harmony default export */ var src_line = (function() { + var x = point_x, + y = point_y, + defined = constant(true), + context = null, + curve = linear, + output = null; + + function line(data) { + var i, + n = data.length, + d, + defined0 = false, + buffer; + + if (context == null) output = curve(buffer = src_path()); + + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) output.lineStart(); + else output.lineEnd(); + } + if (defined0) output.point(+x(d, i, data), +y(d, i, data)); + } + + if (buffer) return output = null, buffer + "" || null; + } + + line.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), line) : x; + }; + + line.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), line) : y; + }; + + line.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined; + }; + + line.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; + }; + + line.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; + }; + + return line; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/area.js + + + + + + +/* harmony default export */ var src_area = (function() { + var x0 = point_x, + x1 = null, + y0 = constant(0), + y1 = point_y, + defined = constant(true), + context = null, + curve = linear, + output = null; + + function area(data) { + var i, + j, + k, + n = data.length, + d, + defined0 = false, + buffer, + x0z = new Array(n), + y0z = new Array(n); + + if (context == null) output = curve(buffer = src_path()); + + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) { + j = i; + output.areaStart(); + output.lineStart(); + } else { + output.lineEnd(); + output.lineStart(); + for (k = i - 1; k >= j; --k) { + output.point(x0z[k], y0z[k]); + } + output.lineEnd(); + output.areaEnd(); + } + } + if (defined0) { + x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); + output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); + } + } + + if (buffer) return output = null, buffer + "" || null; + } + + function arealine() { + return src_line().defined(defined).curve(curve).context(context); + } + + area.x = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0; + }; + + area.x0 = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0; + }; + + area.x1 = function(_) { + return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1; + }; + + area.y = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0; + }; + + area.y0 = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0; + }; + + area.y1 = function(_) { + return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1; + }; + + area.lineX0 = + area.lineY0 = function() { + return arealine().x(x0).y(y0); + }; + + area.lineY1 = function() { + return arealine().x(x0).y(y1); + }; + + area.lineX1 = function() { + return arealine().x(x1).y(y0); + }; + + area.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined; + }; + + area.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; + }; + + area.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; + }; + + return area; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/descending.js +/* harmony default export */ var descending = (function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/identity.js +/* harmony default export */ var identity = (function(d) { + return d; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/pie.js + + + + + +/* harmony default export */ var src_pie = (function() { + var value = identity, + sortValues = descending, + sort = null, + startAngle = constant(0), + endAngle = constant(math_tau), + padAngle = constant(0); + + function pie(data) { + var i, + n = data.length, + j, + k, + sum = 0, + index = new Array(n), + arcs = new Array(n), + a0 = +startAngle.apply(this, arguments), + da = Math.min(math_tau, Math.max(-math_tau, endAngle.apply(this, arguments) - a0)), + a1, + p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), + pa = p * (da < 0 ? -1 : 1), + v; + + for (i = 0; i < n; ++i) { + if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { + sum += v; + } + } + + // Optionally sort the arcs by previously-computed values or by data. + if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); + else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); + + // Compute the arcs! They are stored in the original data's order. + for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { + j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p + }; + } + + return arcs; + } + + pie.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value; + }; + + pie.sortValues = function(_) { + return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; + }; + + pie.sort = function(_) { + return arguments.length ? (sort = _, sortValues = null, pie) : sort; + }; + + pie.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle; + }; + + pie.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle; + }; + + pie.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle; + }; + + return pie; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/radial.js + + +var curveRadialLinear = curveRadial(linear); + +function Radial(curve) { + this._curve = curve; +} + +Radial.prototype = { + areaStart: function() { + this._curve.areaStart(); + }, + areaEnd: function() { + this._curve.areaEnd(); + }, + lineStart: function() { + this._curve.lineStart(); + }, + lineEnd: function() { + this._curve.lineEnd(); + }, + point: function(a, r) { + this._curve.point(r * Math.sin(a), r * -Math.cos(a)); + } +}; + +function curveRadial(curve) { + + function radial(context) { + return new Radial(curve(context)); + } + + radial._curve = curve; + + return radial; +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/lineRadial.js + + + +function lineRadial(l) { + var c = l.curve; + + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + + l.curve = function(_) { + return arguments.length ? c(curveRadial(_)) : c()._curve; + }; + + return l; +} + +/* harmony default export */ var src_lineRadial = (function() { + return lineRadial(src_line().curve(curveRadialLinear)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/areaRadial.js + + + + +/* harmony default export */ var areaRadial = (function() { + var a = src_area().curve(curveRadialLinear), + c = a.curve, + x0 = a.lineX0, + x1 = a.lineX1, + y0 = a.lineY0, + y1 = a.lineY1; + + a.angle = a.x, delete a.x; + a.startAngle = a.x0, delete a.x0; + a.endAngle = a.x1, delete a.x1; + a.radius = a.y, delete a.y; + a.innerRadius = a.y0, delete a.y0; + a.outerRadius = a.y1, delete a.y1; + a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0; + a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1; + a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0; + a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1; + + a.curve = function(_) { + return arguments.length ? c(curveRadial(_)) : c()._curve; + }; + + return a; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/pointRadial.js +/* harmony default export */ var pointRadial = (function(x, y) { + return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/array.js +var slice = Array.prototype.slice; + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/link/index.js + + + + + + +function linkSource(d) { + return d.source; +} + +function linkTarget(d) { + return d.target; +} + +function link_link(curve) { + var source = linkSource, + target = linkTarget, + x = point_x, + y = point_y, + context = null; + + function link() { + var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) context = buffer = src_path(); + curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); + if (buffer) return context = null, buffer + "" || null; + } + + link.source = function(_) { + return arguments.length ? (source = _, link) : source; + }; + + link.target = function(_) { + return arguments.length ? (target = _, link) : target; + }; + + link.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), link) : x; + }; + + link.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), link) : y; + }; + + link.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), link) : context; + }; + + return link; +} + +function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); +} + +function curveVertical(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); +} + +function link_curveRadial(context, x0, y0, x1, y1) { + var p0 = pointRadial(x0, y0), + p1 = pointRadial(x0, y0 = (y0 + y1) / 2), + p2 = pointRadial(x1, y0), + p3 = pointRadial(x1, y1); + context.moveTo(p0[0], p0[1]); + context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); +} + +function linkHorizontal() { + return link_link(curveHorizontal); +} + +function linkVertical() { + return link_link(curveVertical); +} + +function linkRadial() { + var l = link_link(link_curveRadial); + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + return l; +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/circle.js + + +/* harmony default export */ var circle = ({ + draw: function(context, size) { + var r = Math.sqrt(size / math_pi); + context.moveTo(r, 0); + context.arc(0, 0, r, 0, math_tau); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/cross.js +/* harmony default export */ var cross = ({ + draw: function(context, size) { + var r = Math.sqrt(size / 5) / 2; + context.moveTo(-3 * r, -r); + context.lineTo(-r, -r); + context.lineTo(-r, -3 * r); + context.lineTo(r, -3 * r); + context.lineTo(r, -r); + context.lineTo(3 * r, -r); + context.lineTo(3 * r, r); + context.lineTo(r, r); + context.lineTo(r, 3 * r); + context.lineTo(-r, 3 * r); + context.lineTo(-r, r); + context.lineTo(-3 * r, r); + context.closePath(); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/diamond.js +var tan30 = Math.sqrt(1 / 3), + tan30_2 = tan30 * 2; + +/* harmony default export */ var diamond = ({ + draw: function(context, size) { + var y = Math.sqrt(size / tan30_2), + x = y * tan30; + context.moveTo(0, -y); + context.lineTo(x, 0); + context.lineTo(0, y); + context.lineTo(-x, 0); + context.closePath(); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/star.js + + +var ka = 0.89081309152928522810, + kr = Math.sin(math_pi / 10) / Math.sin(7 * math_pi / 10), + kx = Math.sin(math_tau / 10) * kr, + ky = -Math.cos(math_tau / 10) * kr; + +/* harmony default export */ var star = ({ + draw: function(context, size) { + var r = Math.sqrt(size * ka), + x = kx * r, + y = ky * r; + context.moveTo(0, -r); + context.lineTo(x, y); + for (var i = 1; i < 5; ++i) { + var a = math_tau * i / 5, + c = Math.cos(a), + s = Math.sin(a); + context.lineTo(s * r, -c * r); + context.lineTo(c * x - s * y, s * x + c * y); + } + context.closePath(); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/square.js +/* harmony default export */ var square = ({ + draw: function(context, size) { + var w = Math.sqrt(size), + x = -w / 2; + context.rect(x, x, w, w); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/triangle.js +var sqrt3 = Math.sqrt(3); + +/* harmony default export */ var triangle = ({ + draw: function(context, size) { + var y = -Math.sqrt(size / (sqrt3 * 3)); + context.moveTo(0, y * 2); + context.lineTo(-sqrt3 * y, -y); + context.lineTo(sqrt3 * y, -y); + context.closePath(); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol/wye.js +var wye_c = -0.5, + wye_s = Math.sqrt(3) / 2, + wye_k = 1 / Math.sqrt(12), + wye_a = (wye_k / 2 + 1) * 3; + +/* harmony default export */ var wye = ({ + draw: function(context, size) { + var r = Math.sqrt(size / wye_a), + x0 = r / 2, + y0 = r * wye_k, + x1 = x0, + y1 = r * wye_k + r, + x2 = -x1, + y2 = y1; + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + context.lineTo(wye_c * x0 - wye_s * y0, wye_s * x0 + wye_c * y0); + context.lineTo(wye_c * x1 - wye_s * y1, wye_s * x1 + wye_c * y1); + context.lineTo(wye_c * x2 - wye_s * y2, wye_s * x2 + wye_c * y2); + context.lineTo(wye_c * x0 + wye_s * y0, wye_c * y0 - wye_s * x0); + context.lineTo(wye_c * x1 + wye_s * y1, wye_c * y1 - wye_s * x1); + context.lineTo(wye_c * x2 + wye_s * y2, wye_c * y2 - wye_s * x2); + context.closePath(); + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/symbol.js + + + + + + + + + + +var symbols = [ + circle, + cross, + diamond, + square, + star, + triangle, + wye +]; + +/* harmony default export */ var src_symbol = (function() { + var type = constant(circle), + size = constant(64), + context = null; + + function symbol() { + var buffer; + if (!context) context = buffer = src_path(); + type.apply(this, arguments).draw(context, +size.apply(this, arguments)); + if (buffer) return context = null, buffer + "" || null; + } + + symbol.type = function(_) { + return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type; + }; + + symbol.size = function(_) { + return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size; + }; + + symbol.context = function(_) { + return arguments.length ? (context = _ == null ? null : _, symbol) : context; + }; + + return symbol; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/noop.js +/* harmony default export */ var noop = (function() {}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basis.js +function point(that, x, y) { + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x) / 6, + (that._y0 + 4 * that._y1 + y) / 6 + ); +} + +function Basis(context) { + this._context = context; +} + +Basis.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: point(this, this._x1, this._y1); // proceed + case 2: this._context.lineTo(this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ var basis = (function(context) { + return new Basis(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basisClosed.js + + + +function BasisClosed(context) { + this._context = context; +} + +BasisClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x2 = x, this._y2 = y; break; + case 1: this._point = 2; this._x3 = x, this._y3 = y; break; + case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ var basisClosed = (function(context) { + return new BasisClosed(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/basisOpen.js + + +function BasisOpen(context) { + this._context = context; +} + +BasisOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; + case 3: this._point = 4; // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ var basisOpen = (function(context) { + return new BasisOpen(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/bundle.js + + +function Bundle(context, beta) { + this._basis = new Basis(context); + this._beta = beta; +} + +Bundle.prototype = { + lineStart: function() { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function() { + var x = this._x, + y = this._y, + j = x.length - 1; + + if (j > 0) { + var x0 = x[0], + y0 = y[0], + dx = x[j] - x0, + dy = y[j] - y0, + i = -1, + t; + + while (++i <= j) { + t = i / j; + this._basis.point( + this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), + this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) + ); + } + } + + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; + +/* harmony default export */ var curve_bundle = ((function custom(beta) { + + function bundle(context) { + return beta === 1 ? new Basis(context) : new Bundle(context, beta); + } + + bundle.beta = function(beta) { + return custom(+beta); + }; + + return bundle; +})(0.85)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinal.js +function cardinal_point(that, x, y) { + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x), + that._y2 + that._k * (that._y1 - y), + that._x2, + that._y2 + ); +} + +function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +Cardinal.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: cardinal_point(this, this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; this._x1 = x, this._y1 = y; break; + case 2: this._point = 3; // proceed + default: cardinal_point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var cardinal = ((function custom(tension) { + + function cardinal(context) { + return new Cardinal(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinalClosed.js + + + +function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +CardinalClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: cardinal_point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var cardinalClosed = ((function custom(tension) { + + function cardinal(context) { + return new CardinalClosed(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/cardinalOpen.js + + +function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +CardinalOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: cardinal_point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var cardinalOpen = ((function custom(tension) { + + function cardinal(context) { + return new CardinalOpen(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRom.js + + + +function catmullRom_point(that, x, y) { + var x1 = that._x1, + y1 = that._y1, + x2 = that._x2, + y2 = that._y2; + + if (that._l01_a > math_epsilon) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, + n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; + } + + if (that._l23_a > math_epsilon) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, + m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; + y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + } + + that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); +} + +function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRom.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: this.point(this._x2, this._y2); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; // proceed + default: catmullRom_point(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var curve_catmullRom = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRomClosed.js + + + + +function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRomClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: catmullRom_point(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var catmullRomClosed = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/catmullRomOpen.js + + + +function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRomOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: catmullRom_point(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ var catmullRomOpen = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/linearClosed.js + + +function LinearClosed(context) { + this._context = context; +} + +LinearClosed.prototype = { + areaStart: noop, + areaEnd: noop, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._point) this._context.closePath(); + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) this._context.lineTo(x, y); + else this._point = 1, this._context.moveTo(x, y); + } +}; + +/* harmony default export */ var linearClosed = (function(context) { + return new LinearClosed(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/monotone.js +function sign(x) { + return x < 0 ? -1 : 1; +} + +// Calculate the slopes of the tangents (Hermite-type interpolation) based on +// the following paper: Steffen, M. 1990. A Simple Method for Monotonic +// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. +// NOV(II), P. 443, 1990. +function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, + h1 = x2 - that._x1, + s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), + s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), + p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; +} + +// Calculate a one-sided slope. +function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; +} + +// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations +// "you can express cubic Hermite interpolation in terms of cubic Bézier curves +// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". +function monotone_point(that, t0, t1) { + var x0 = that._x0, + y0 = that._y0, + x1 = that._x1, + y1 = that._y1, + dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); +} + +function MonotoneX(context) { + this._context = context; +} + +MonotoneX.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = + this._t0 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x1, this._y1); break; + case 3: monotone_point(this, this._t0, slope2(this, this._t0)); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + var t1 = NaN; + + x = +x, y = +y; + if (x === this._x1 && y === this._y1) return; // Ignore coincident points. + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; monotone_point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; + default: monotone_point(this, this._t0, t1 = slope3(this, x, y)); break; + } + + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + this._t0 = t1; + } +} + +function MonotoneY(context) { + this._context = new ReflectContext(context); +} + +(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { + MonotoneX.prototype.point.call(this, y, x); +}; + +function ReflectContext(context) { + this._context = context; +} + +ReflectContext.prototype = { + moveTo: function(x, y) { this._context.moveTo(y, x); }, + closePath: function() { this._context.closePath(); }, + lineTo: function(x, y) { this._context.lineTo(y, x); }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } +}; + +function monotoneX(context) { + return new MonotoneX(context); +} + +function monotoneY(context) { + return new MonotoneY(context); +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/natural.js +function Natural(context) { + this._context = context; +} + +Natural.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = []; + this._y = []; + }, + lineEnd: function() { + var x = this._x, + y = this._y, + n = x.length; + + if (n) { + this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); + if (n === 2) { + this._context.lineTo(x[1], y[1]); + } else { + var px = controlPoints(x), + py = controlPoints(y); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); + } + } + } + + if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; + +// See https://www.particleincell.com/2012/bezier-splines/ for derivation. +function controlPoints(x) { + var i, + n = x.length - 1, + m, + a = new Array(n), + b = new Array(n), + r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; + for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; + for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; + b[n - 1] = (x[n] + a[n - 1]) / 2; + for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; + return [a, b]; +} + +/* harmony default export */ var natural = (function(context) { + return new Natural(context); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/curve/step.js +function Step(context, t) { + this._context = context; + this._t = t; +} + +Step.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function() { + if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: { + if (this._t <= 0) { + this._context.lineTo(this._x, y); + this._context.lineTo(x, y); + } else { + var x1 = this._x * (1 - this._t) + x * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y); + } + break; + } + } + this._x = x, this._y = y; + } +}; + +/* harmony default export */ var step = (function(context) { + return new Step(context, 0.5); +}); + +function stepBefore(context) { + return new Step(context, 0); +} + +function stepAfter(context) { + return new Step(context, 1); +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/offset/none.js +/* harmony default export */ var none = (function(series, order) { + if (!((n = series.length) > 1)) return; + for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { + s0 = s1, s1 = series[order[i]]; + for (j = 0; j < m; ++j) { + s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; + } + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/order/none.js +/* harmony default export */ var order_none = (function(series) { + var n = series.length, o = new Array(n); + while (--n >= 0) o[n] = n; + return o; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/stack.js + + + + + +function stackValue(d, key) { + return d[key]; +} + +/* harmony default export */ var src_stack = (function() { + var keys = constant([]), + order = order_none, + offset = none, + value = stackValue; + + function stack(data) { + var kz = keys.apply(this, arguments), + i, + m = data.length, + n = kz.length, + sz = new Array(n), + oz; + + for (i = 0; i < n; ++i) { + for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) { + si[j] = sij = [0, +value(data[j], ki, j, data)]; + sij.data = data[j]; + } + si.key = ki; + } + + for (i = 0, oz = order(sz); i < n; ++i) { + sz[oz[i]].index = i; + } + + offset(sz, oz); + return sz; + } + + stack.keys = function(_) { + return arguments.length ? (keys = typeof _ === "function" ? _ : constant(slice.call(_)), stack) : keys; + }; + + stack.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), stack) : value; + }; + + stack.order = function(_) { + return arguments.length ? (order = _ == null ? order_none : typeof _ === "function" ? _ : constant(slice.call(_)), stack) : order; + }; + + stack.offset = function(_) { + return arguments.length ? (offset = _ == null ? none : _, stack) : offset; + }; + + return stack; +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/offset/expand.js + + +/* harmony default export */ var expand = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { + for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; + if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; + } + none(series, order); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/offset/diverging.js +/* harmony default export */ var diverging = (function(series, order) { + if (!((n = series.length) > 1)) return; + for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { + for (yp = yn = 0, i = 0; i < n; ++i) { + if ((dy = (d = series[order[i]][j])[1] - d[0]) >= 0) { + d[0] = yp, d[1] = yp += dy; + } else if (dy < 0) { + d[1] = yn, d[0] = yn += dy; + } else { + d[0] = yp; + } + } + } +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/offset/silhouette.js + + +/* harmony default export */ var silhouette = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { + for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; + s0[j][1] += s0[j][0] = -y / 2; + } + none(series, order); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/offset/wiggle.js + + +/* harmony default export */ var wiggle = (function(series, order) { + if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; + for (var y = 0, j = 1, s0, m, n; j < m; ++j) { + for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { + var si = series[order[i]], + sij0 = si[j][1] || 0, + sij1 = si[j - 1][1] || 0, + s3 = (sij0 - sij1) / 2; + for (var k = 0; k < i; ++k) { + var sk = series[order[k]], + skj0 = sk[j][1] || 0, + skj1 = sk[j - 1][1] || 0; + s3 += skj0 - skj1; + } + s1 += sij0, s2 += s3 * sij0; + } + s0[j - 1][1] += s0[j - 1][0] = y; + if (s1) y -= s2 / s1; + } + s0[j - 1][1] += s0[j - 1][0] = y; + none(series, order); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/order/ascending.js + + +/* harmony default export */ var ascending = (function(series) { + var sums = series.map(ascending_sum); + return order_none(series).sort(function(a, b) { return sums[a] - sums[b]; }); +}); + +function ascending_sum(series) { + var s = 0, i = -1, n = series.length, v; + while (++i < n) if (v = +series[i][1]) s += v; + return s; +} + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/order/descending.js + + +/* harmony default export */ var order_descending = (function(series) { + return ascending(series).reverse(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/order/insideOut.js + + + +/* harmony default export */ var insideOut = (function(series) { + var n = series.length, + i, + j, + sums = series.map(ascending_sum), + order = order_none(series).sort(function(a, b) { return sums[b] - sums[a]; }), + top = 0, + bottom = 0, + tops = [], + bottoms = []; + + for (i = 0; i < n; ++i) { + j = order[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } + + return bottoms.reverse().concat(tops); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/src/order/reverse.js + + +/* harmony default export */ var reverse = (function(series) { + return order_none(series).reverse(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-shape/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "arc", function() { return src_arc; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "area", function() { return src_area; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "line", function() { return src_line; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pie", function() { return src_pie; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "areaRadial", function() { return areaRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "radialArea", function() { return areaRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "lineRadial", function() { return src_lineRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "radialLine", function() { return src_lineRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pointRadial", function() { return pointRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbol", function() { return src_symbol; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return circle; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolCross", function() { return cross; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return diamond; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return square; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolStar", function() { return star; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return triangle; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "symbolWye", function() { return wye; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return basisClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return basisOpen; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveBasis", function() { return basis; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveBundle", function() { return curve_bundle; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return cardinalClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return cardinalOpen; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return cardinal; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return catmullRomClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return catmullRomOpen; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return curve_catmullRom; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return linearClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveLinear", function() { return linear; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return monotoneX; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return monotoneY; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveNatural", function() { return natural; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveStep", function() { return step; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return stepAfter; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return stepBefore; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stack", function() { return src_stack; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return expand; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return diverging; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return none; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return silhouette; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return wiggle; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return ascending; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return order_descending; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return insideOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return order_none; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return reverse; }); + + + + + // Note: radialArea is deprecated! + // Note: radialLine is deprecated! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 64 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/namespaces.js +var xhtml = "http://www.w3.org/1999/xhtml"; + +/* harmony default export */ var namespaces = ({ + svg: "http://www.w3.org/2000/svg", + xhtml: xhtml, + xlink: "http://www.w3.org/1999/xlink", + xml: "http://www.w3.org/XML/1998/namespace", + xmlns: "http://www.w3.org/2000/xmlns/" +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/namespace.js + + +/* harmony default export */ var namespace = (function(name) { + var prefix = name += "", i = prefix.indexOf(":"); + if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); + return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/creator.js + + + +function creatorInherit(name) { + return function() { + var document = this.ownerDocument, + uri = this.namespaceURI; + return uri === xhtml && document.documentElement.namespaceURI === xhtml + ? document.createElement(name) + : document.createElementNS(uri, name); + }; +} + +function creatorFixed(fullname) { + return function() { + return this.ownerDocument.createElementNS(fullname.space, fullname.local); + }; +} + +/* harmony default export */ var creator = (function(name) { + var fullname = namespace(name); + return (fullname.local + ? creatorFixed + : creatorInherit)(fullname); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selector.js +function none() {} + +/* harmony default export */ var src_selector = (function(selector) { + return selector == null ? none : function() { + return this.querySelector(selector); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/select.js + + + +/* harmony default export */ var selection_select = (function(select) { + if (typeof select !== "function") select = src_selector(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + } + } + } + + return new Selection(subgroups, this._parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selectorAll.js +function empty() { + return []; +} + +/* harmony default export */ var selectorAll = (function(selector) { + return selector == null ? empty : function() { + return this.querySelectorAll(selector); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/selectAll.js + + + +/* harmony default export */ var selectAll = (function(select) { + if (typeof select !== "function") select = selectorAll(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + subgroups.push(select.call(node, node.__data__, i, group)); + parents.push(node); + } + } + } + + return new Selection(subgroups, parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/matcher.js +var matcher = function(selector) { + return function() { + return this.matches(selector); + }; +}; + +if (typeof document !== "undefined") { + var matcher_element = document.documentElement; + if (!matcher_element.matches) { + var vendorMatches = matcher_element.webkitMatchesSelector + || matcher_element.msMatchesSelector + || matcher_element.mozMatchesSelector + || matcher_element.oMatchesSelector; + matcher = function(selector) { + return function() { + return vendorMatches.call(this, selector); + }; + }; + } +} + +/* harmony default export */ var src_matcher = (matcher); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/filter.js + + + +/* harmony default export */ var filter = (function(match) { + if (typeof match !== "function") match = src_matcher(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + + return new Selection(subgroups, this._parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/sparse.js +/* harmony default export */ var sparse = (function(update) { + return new Array(update.length); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/enter.js + + + +/* harmony default export */ var selection_enter = (function() { + return new Selection(this._enter || this._groups.map(sparse), this._parents); +}); + +function EnterNode(parent, datum) { + this.ownerDocument = parent.ownerDocument; + this.namespaceURI = parent.namespaceURI; + this._next = null; + this._parent = parent; + this.__data__ = datum; +} + +EnterNode.prototype = { + constructor: EnterNode, + appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, + insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, + querySelector: function(selector) { return this._parent.querySelector(selector); }, + querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } +}; + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/data.js + + + + +var keyPrefix = "$"; // Protect against keys like “__proto__”. + +function bindIndex(parent, group, enter, update, exit, data) { + var i = 0, + node, + groupLength = group.length, + dataLength = data.length; + + // Put any non-null nodes that fit into update. + // Put any null nodes into enter. + // Put any remaining data into enter. + for (; i < dataLength; ++i) { + if (node = group[i]) { + node.__data__ = data[i]; + update[i] = node; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Put any non-null nodes that don’t fit into exit. + for (; i < groupLength; ++i) { + if (node = group[i]) { + exit[i] = node; + } + } +} + +function bindKey(parent, group, enter, update, exit, data, key) { + var i, + node, + nodeByKeyValue = {}, + groupLength = group.length, + dataLength = data.length, + keyValues = new Array(groupLength), + keyValue; + + // Compute the key for each node. + // If multiple nodes have the same key, the duplicates are added to exit. + for (i = 0; i < groupLength; ++i) { + if (node = group[i]) { + keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group); + if (keyValue in nodeByKeyValue) { + exit[i] = node; + } else { + nodeByKeyValue[keyValue] = node; + } + } + } + + // Compute the key for each datum. + // If there a node associated with this key, join and add it to update. + // If there is not (or the key is a duplicate), add it to enter. + for (i = 0; i < dataLength; ++i) { + keyValue = keyPrefix + key.call(parent, data[i], i, data); + if (node = nodeByKeyValue[keyValue]) { + update[i] = node; + node.__data__ = data[i]; + nodeByKeyValue[keyValue] = null; + } else { + enter[i] = new EnterNode(parent, data[i]); + } + } + + // Add any remaining nodes that were not bound to data to exit. + for (i = 0; i < groupLength; ++i) { + if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) { + exit[i] = node; + } + } +} + +/* harmony default export */ var selection_data = (function(value, key) { + if (!value) { + data = new Array(this.size()), j = -1; + this.each(function(d) { data[++j] = d; }); + return data; + } + + var bind = key ? bindKey : bindIndex, + parents = this._parents, + groups = this._groups; + + if (typeof value !== "function") value = constant(value); + + for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { + var parent = parents[j], + group = groups[j], + groupLength = group.length, + data = value.call(parent, parent && parent.__data__, j, parents), + dataLength = data.length, + enterGroup = enter[j] = new Array(dataLength), + updateGroup = update[j] = new Array(dataLength), + exitGroup = exit[j] = new Array(groupLength); + + bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); + + // Now connect the enter nodes to their following update node, such that + // appendChild can insert the materialized enter node before this node, + // rather than at the end of the parent node. + for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { + if (previous = enterGroup[i0]) { + if (i0 >= i1) i1 = i0 + 1; + while (!(next = updateGroup[i1]) && ++i1 < dataLength); + previous._next = next || null; + } + } + } + + update = new Selection(update, parents); + update._enter = enter; + update._exit = exit; + return update; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/exit.js + + + +/* harmony default export */ var selection_exit = (function() { + return new Selection(this._exit || this._groups.map(sparse), this._parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/merge.js + + +/* harmony default export */ var selection_merge = (function(selection) { + + for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new Selection(merges, this._parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/order.js +/* harmony default export */ var order = (function() { + + for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { + for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { + if (node = group[i]) { + if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next); + next = node; + } + } + } + + return this; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/sort.js + + +/* harmony default export */ var sort = (function(compare) { + if (!compare) compare = ascending; + + function compareNode(a, b) { + return a && b ? compare(a.__data__, b.__data__) : !a - !b; + } + + for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group[i]) { + sortgroup[i] = node; + } + } + sortgroup.sort(compareNode); + } + + return new Selection(sortgroups, this._parents).order(); +}); + +function ascending(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +} + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/call.js +/* harmony default export */ var call = (function() { + var callback = arguments[0]; + arguments[0] = this; + callback.apply(null, arguments); + return this; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/nodes.js +/* harmony default export */ var nodes = (function() { + var nodes = new Array(this.size()), i = -1; + this.each(function() { nodes[++i] = this; }); + return nodes; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/node.js +/* harmony default export */ var selection_node = (function() { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { + var node = group[i]; + if (node) return node; + } + } + + return null; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/size.js +/* harmony default export */ var size = (function() { + var size = 0; + this.each(function() { ++size; }); + return size; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/empty.js +/* harmony default export */ var selection_empty = (function() { + return !this.node(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/each.js +/* harmony default export */ var each = (function(callback) { + + for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { + for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { + if (node = group[i]) callback.call(node, node.__data__, i, group); + } + } + + return this; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/attr.js + + +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} + +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} + +function attrConstant(name, value) { + return function() { + this.setAttribute(name, value); + }; +} + +function attrConstantNS(fullname, value) { + return function() { + this.setAttributeNS(fullname.space, fullname.local, value); + }; +} + +function attrFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttribute(name); + else this.setAttribute(name, v); + }; +} + +function attrFunctionNS(fullname, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.removeAttributeNS(fullname.space, fullname.local); + else this.setAttributeNS(fullname.space, fullname.local, v); + }; +} + +/* harmony default export */ var attr = (function(name, value) { + var fullname = namespace(name); + + if (arguments.length < 2) { + var node = this.node(); + return fullname.local + ? node.getAttributeNS(fullname.space, fullname.local) + : node.getAttribute(fullname); + } + + return this.each((value == null + ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction) + : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/window.js +/* harmony default export */ var src_window = (function(node) { + return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node + || (node.document && node) // node is a Window + || node.defaultView; // node is a Document +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/style.js + + +function styleRemove(name) { + return function() { + this.style.removeProperty(name); + }; +} + +function styleConstant(name, value, priority) { + return function() { + this.style.setProperty(name, value, priority); + }; +} + +function styleFunction(name, value, priority) { + return function() { + var v = value.apply(this, arguments); + if (v == null) this.style.removeProperty(name); + else this.style.setProperty(name, v, priority); + }; +} + +/* harmony default export */ var style = (function(name, value, priority) { + return arguments.length > 1 + ? this.each((value == null + ? styleRemove : typeof value === "function" + ? styleFunction + : styleConstant)(name, value, priority == null ? "" : priority)) + : styleValue(this.node(), name); +}); + +function styleValue(node, name) { + return node.style.getPropertyValue(name) + || src_window(node).getComputedStyle(node, null).getPropertyValue(name); +} + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/property.js +function propertyRemove(name) { + return function() { + delete this[name]; + }; +} + +function propertyConstant(name, value) { + return function() { + this[name] = value; + }; +} + +function propertyFunction(name, value) { + return function() { + var v = value.apply(this, arguments); + if (v == null) delete this[name]; + else this[name] = v; + }; +} + +/* harmony default export */ var property = (function(name, value) { + return arguments.length > 1 + ? this.each((value == null + ? propertyRemove : typeof value === "function" + ? propertyFunction + : propertyConstant)(name, value)) + : this.node()[name]; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/classed.js +function classArray(string) { + return string.trim().split(/^|\s+/); +} + +function classList(node) { + return node.classList || new ClassList(node); +} + +function ClassList(node) { + this._node = node; + this._names = classArray(node.getAttribute("class") || ""); +} + +ClassList.prototype = { + add: function(name) { + var i = this._names.indexOf(name); + if (i < 0) { + this._names.push(name); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + remove: function(name) { + var i = this._names.indexOf(name); + if (i >= 0) { + this._names.splice(i, 1); + this._node.setAttribute("class", this._names.join(" ")); + } + }, + contains: function(name) { + return this._names.indexOf(name) >= 0; + } +}; + +function classedAdd(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.add(names[i]); +} + +function classedRemove(node, names) { + var list = classList(node), i = -1, n = names.length; + while (++i < n) list.remove(names[i]); +} + +function classedTrue(names) { + return function() { + classedAdd(this, names); + }; +} + +function classedFalse(names) { + return function() { + classedRemove(this, names); + }; +} + +function classedFunction(names, value) { + return function() { + (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); + }; +} + +/* harmony default export */ var classed = (function(name, value) { + var names = classArray(name + ""); + + if (arguments.length < 2) { + var list = classList(this.node()), i = -1, n = names.length; + while (++i < n) if (!list.contains(names[i])) return false; + return true; + } + + return this.each((typeof value === "function" + ? classedFunction : value + ? classedTrue + : classedFalse)(names, value)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/text.js +function textRemove() { + this.textContent = ""; +} + +function textConstant(value) { + return function() { + this.textContent = value; + }; +} + +function textFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.textContent = v == null ? "" : v; + }; +} + +/* harmony default export */ var selection_text = (function(value) { + return arguments.length + ? this.each(value == null + ? textRemove : (typeof value === "function" + ? textFunction + : textConstant)(value)) + : this.node().textContent; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/html.js +function htmlRemove() { + this.innerHTML = ""; +} + +function htmlConstant(value) { + return function() { + this.innerHTML = value; + }; +} + +function htmlFunction(value) { + return function() { + var v = value.apply(this, arguments); + this.innerHTML = v == null ? "" : v; + }; +} + +/* harmony default export */ var html = (function(value) { + return arguments.length + ? this.each(value == null + ? htmlRemove : (typeof value === "function" + ? htmlFunction + : htmlConstant)(value)) + : this.node().innerHTML; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/raise.js +function raise() { + if (this.nextSibling) this.parentNode.appendChild(this); +} + +/* harmony default export */ var selection_raise = (function() { + return this.each(raise); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/lower.js +function lower() { + if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); +} + +/* harmony default export */ var selection_lower = (function() { + return this.each(lower); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/append.js + + +/* harmony default export */ var append = (function(name) { + var create = typeof name === "function" ? name : creator(name); + return this.select(function() { + return this.appendChild(create.apply(this, arguments)); + }); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/insert.js + + + +function constantNull() { + return null; +} + +/* harmony default export */ var insert = (function(name, before) { + var create = typeof name === "function" ? name : creator(name), + select = before == null ? constantNull : typeof before === "function" ? before : src_selector(before); + return this.select(function() { + return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); + }); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/remove.js +function remove() { + var parent = this.parentNode; + if (parent) parent.removeChild(this); +} + +/* harmony default export */ var selection_remove = (function() { + return this.each(remove); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/clone.js +function selection_cloneShallow() { + return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling); +} + +function selection_cloneDeep() { + return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling); +} + +/* harmony default export */ var clone = (function(deep) { + return this.select(deep ? selection_cloneDeep : selection_cloneShallow); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/datum.js +/* harmony default export */ var datum = (function(value) { + return arguments.length + ? this.property("__data__", value) + : this.node().__data__; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/on.js +var filterEvents = {}; + +var on_event = null; + +if (typeof document !== "undefined") { + var on_element = document.documentElement; + if (!("onmouseenter" in on_element)) { + filterEvents = {mouseenter: "mouseover", mouseleave: "mouseout"}; + } +} + +function filterContextListener(listener, index, group) { + listener = contextListener(listener, index, group); + return function(event) { + var related = event.relatedTarget; + if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) { + listener.call(this, event); + } + }; +} + +function contextListener(listener, index, group) { + return function(event1) { + var event0 = on_event; // Events can be reentrant (e.g., focus). + on_event = event1; + try { + listener.call(this, this.__data__, index, group); + } finally { + on_event = event0; + } + }; +} + +function parseTypenames(typenames) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + return {type: t, name: name}; + }); +} + +function onRemove(typename) { + return function() { + var on = this.__on; + if (!on) return; + for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { + if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + } else { + on[++i] = o; + } + } + if (++i) on.length = i; + else delete this.__on; + }; +} + +function onAdd(typename, value, capture) { + var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener; + return function(d, i, group) { + var on = this.__on, o, listener = wrap(value, i, group); + if (on) for (var j = 0, m = on.length; j < m; ++j) { + if ((o = on[j]).type === typename.type && o.name === typename.name) { + this.removeEventListener(o.type, o.listener, o.capture); + this.addEventListener(o.type, o.listener = listener, o.capture = capture); + o.value = value; + return; + } + } + this.addEventListener(typename.type, listener, capture); + o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture}; + if (!on) this.__on = [o]; + else on.push(o); + }; +} + +/* harmony default export */ var on = (function(typename, value, capture) { + var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; + + if (arguments.length < 2) { + var on = this.node().__on; + if (on) for (var j = 0, m = on.length, o; j < m; ++j) { + for (i = 0, o = on[j]; i < n; ++i) { + if ((t = typenames[i]).type === o.type && t.name === o.name) { + return o.value; + } + } + } + return; + } + + on = value ? onAdd : onRemove; + if (capture == null) capture = false; + for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture)); + return this; +}); + +function customEvent(event1, listener, that, args) { + var event0 = on_event; + event1.sourceEvent = on_event; + on_event = event1; + try { + return listener.apply(that, args); + } finally { + on_event = event0; + } +} + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/dispatch.js + + +function dispatchEvent(node, type, params) { + var window = src_window(node), + event = window.CustomEvent; + + if (typeof event === "function") { + event = new event(type, params); + } else { + event = window.document.createEvent("Event"); + if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; + else event.initEvent(type, false, false); + } + + node.dispatchEvent(event); +} + +function dispatchConstant(type, params) { + return function() { + return dispatchEvent(this, type, params); + }; +} + +function dispatchFunction(type, params) { + return function() { + return dispatchEvent(this, type, params.apply(this, arguments)); + }; +} + +/* harmony default export */ var dispatch = (function(type, params) { + return this.each((typeof params === "function" + ? dispatchFunction + : dispatchConstant)(type, params)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/index.js + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +var root = [null]; + +function Selection(groups, parents) { + this._groups = groups; + this._parents = parents; +} + +function selection_selection() { + return new Selection([[document.documentElement]], root); +} + +Selection.prototype = selection_selection.prototype = { + constructor: Selection, + select: selection_select, + selectAll: selectAll, + filter: filter, + data: selection_data, + enter: selection_enter, + exit: selection_exit, + merge: selection_merge, + order: order, + sort: sort, + call: call, + nodes: nodes, + node: selection_node, + size: size, + empty: selection_empty, + each: each, + attr: attr, + style: style, + property: property, + classed: classed, + text: selection_text, + html: html, + raise: selection_raise, + lower: selection_lower, + append: append, + insert: insert, + remove: selection_remove, + clone: clone, + datum: datum, + on: on, + dispatch: dispatch +}; + +/* harmony default export */ var src_selection = (selection_selection); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/select.js + + +/* harmony default export */ var src_select = (function(selector) { + return typeof selector === "string" + ? new Selection([[document.querySelector(selector)]], [document.documentElement]) + : new Selection([[selector]], root); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/create.js + + + +/* harmony default export */ var src_create = (function(name) { + return src_select(creator(name).call(document.documentElement)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/local.js +var nextId = 0; + +function local() { + return new Local; +} + +function Local() { + this._ = "@" + (++nextId).toString(36); +} + +Local.prototype = local.prototype = { + constructor: Local, + get: function(node) { + var id = this._; + while (!(id in node)) if (!(node = node.parentNode)) return; + return node[id]; + }, + set: function(node, value) { + return node[this._] = value; + }, + remove: function(node) { + return this._ in node && delete node[this._]; + }, + toString: function() { + return this._; + } +}; + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/sourceEvent.js + + +/* harmony default export */ var sourceEvent = (function() { + var current = on_event, source; + while (source = current.sourceEvent) current = source; + return current; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/point.js +/* harmony default export */ var point = (function(node, event) { + var svg = node.ownerSVGElement || node; + + if (svg.createSVGPoint) { + var point = svg.createSVGPoint(); + point.x = event.clientX, point.y = event.clientY; + point = point.matrixTransform(node.getScreenCTM().inverse()); + return [point.x, point.y]; + } + + var rect = node.getBoundingClientRect(); + return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/mouse.js + + + +/* harmony default export */ var mouse = (function(node) { + var event = sourceEvent(); + if (event.changedTouches) event = event.changedTouches[0]; + return point(node, event); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/selectAll.js + + +/* harmony default export */ var src_selectAll = (function(selector) { + return typeof selector === "string" + ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) + : new Selection([selector == null ? [] : selector], root); +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/touch.js + + + +/* harmony default export */ var src_touch = (function(node, touches, identifier) { + if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches; + + for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) { + if ((touch = touches[i]).identifier === identifier) { + return point(node, touch); + } + } + + return null; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/src/touches.js + + + +/* harmony default export */ var src_touches = (function(node, touches) { + if (touches == null) touches = sourceEvent().touches; + + for (var i = 0, n = touches ? touches.length : 0, points = new Array(n); i < n; ++i) { + points[i] = point(node, touches[i]); + } + + return points; +}); + +// CONCATENATED MODULE: ./node_modules/d3-selection/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "create", function() { return src_create; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "creator", function() { return creator; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "local", function() { return local; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "matcher", function() { return src_matcher; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "mouse", function() { return mouse; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "namespace", function() { return namespace; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "namespaces", function() { return namespaces; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "clientPoint", function() { return point; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "select", function() { return src_select; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "selectAll", function() { return src_selectAll; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "selection", function() { return src_selection; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "selector", function() { return src_selector; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "selectorAll", function() { return selectorAll; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "style", function() { return styleValue; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "touch", function() { return src_touch; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "touches", function() { return src_touches; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "window", function() { return src_window; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "event", function() { return on_event; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "customEvent", function() { return customEvent; }); + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 65 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-array/index.js + 31 modules +var d3_array = __webpack_require__(66); + +// EXTERNAL MODULE: ./node_modules/d3-collection/index.js + 6 modules +var d3_collection = __webpack_require__(71); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/array.js +var array = Array.prototype; + +var map = array.map; +var slice = array.slice; + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/ordinal.js + + + +var implicit = {name: "implicit"}; + +function ordinal(range) { + var index = Object(d3_collection["map"])(), + domain = [], + unknown = implicit; + + range = range == null ? [] : slice.call(range); + + function scale(d) { + var key = d + "", i = index.get(key); + if (!i) { + if (unknown !== implicit) return unknown; + index.set(key, i = domain.push(d)); + } + return range[(i - 1) % range.length]; + } + + scale.domain = function(_) { + if (!arguments.length) return domain.slice(); + domain = [], index = Object(d3_collection["map"])(); + var i = -1, n = _.length, d, key; + while (++i < n) if (!index.has(key = (d = _[i]) + "")) index.set(key, domain.push(d)); + return scale; + }; + + scale.range = function(_) { + return arguments.length ? (range = slice.call(_), scale) : range.slice(); + }; + + scale.unknown = function(_) { + return arguments.length ? (unknown = _, scale) : unknown; + }; + + scale.copy = function() { + return ordinal() + .domain(domain) + .range(range) + .unknown(unknown); + }; + + return scale; +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/band.js + + + +function band() { + var scale = ordinal().unknown(undefined), + domain = scale.domain, + ordinalRange = scale.range, + range = [0, 1], + step, + bandwidth, + round = false, + paddingInner = 0, + paddingOuter = 0, + align = 0.5; + + delete scale.unknown; + + function rescale() { + var n = domain().length, + reverse = range[1] < range[0], + start = range[reverse - 0], + stop = range[1 - reverse]; + step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); + if (round) step = Math.floor(step); + start += (stop - start - step * (n - paddingInner)) * align; + bandwidth = step * (1 - paddingInner); + if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); + var values = Object(d3_array["range"])(n).map(function(i) { return start + step * i; }); + return ordinalRange(reverse ? values.reverse() : values); + } + + scale.domain = function(_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; + + scale.range = function(_) { + return arguments.length ? (range = [+_[0], +_[1]], rescale()) : range.slice(); + }; + + scale.rangeRound = function(_) { + return range = [+_[0], +_[1]], round = true, rescale(); + }; + + scale.bandwidth = function() { + return bandwidth; + }; + + scale.step = function() { + return step; + }; + + scale.round = function(_) { + return arguments.length ? (round = !!_, rescale()) : round; + }; + + scale.padding = function(_) { + return arguments.length ? (paddingInner = paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingInner; + }; + + scale.paddingInner = function(_) { + return arguments.length ? (paddingInner = Math.max(0, Math.min(1, _)), rescale()) : paddingInner; + }; + + scale.paddingOuter = function(_) { + return arguments.length ? (paddingOuter = Math.max(0, Math.min(1, _)), rescale()) : paddingOuter; + }; + + scale.align = function(_) { + return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; + }; + + scale.copy = function() { + return band() + .domain(domain()) + .range(range) + .round(round) + .paddingInner(paddingInner) + .paddingOuter(paddingOuter) + .align(align); + }; + + return rescale(); +} + +function pointish(scale) { + var copy = scale.copy; + + scale.padding = scale.paddingOuter; + delete scale.paddingInner; + delete scale.paddingOuter; + + scale.copy = function() { + return pointish(copy()); + }; + + return scale; +} + +function point() { + return pointish(band().paddingInner(1)); +} + +// EXTERNAL MODULE: ./node_modules/d3-interpolate/index.js + 22 modules +var d3_interpolate = __webpack_require__(68); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/number.js +/* harmony default export */ var number = (function(x) { + return +x; +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/continuous.js + + + + + + +var unit = [0, 1]; + +function deinterpolateLinear(a, b) { + return (b -= (a = +a)) + ? function(x) { return (x - a) / b; } + : constant(b); +} + +function deinterpolateClamp(deinterpolate) { + return function(a, b) { + var d = deinterpolate(a = +a, b = +b); + return function(x) { return x <= a ? 0 : x >= b ? 1 : d(x); }; + }; +} + +function reinterpolateClamp(reinterpolate) { + return function(a, b) { + var r = reinterpolate(a = +a, b = +b); + return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); }; + }; +} + +function bimap(domain, range, deinterpolate, reinterpolate) { + var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; + if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0); + else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1); + return function(x) { return r0(d0(x)); }; +} + +function polymap(domain, range, deinterpolate, reinterpolate) { + var j = Math.min(domain.length, range.length) - 1, + d = new Array(j), + r = new Array(j), + i = -1; + + // Reverse descending domains. + if (domain[j] < domain[0]) { + domain = domain.slice().reverse(); + range = range.slice().reverse(); + } + + while (++i < j) { + d[i] = deinterpolate(domain[i], domain[i + 1]); + r[i] = reinterpolate(range[i], range[i + 1]); + } + + return function(x) { + var i = Object(d3_array["bisect"])(domain, x, 1, j) - 1; + return r[i](d[i](x)); + }; +} + +function copy(source, target) { + return target + .domain(source.domain()) + .range(source.range()) + .interpolate(source.interpolate()) + .clamp(source.clamp()); +} + +// deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. +// reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b]. +function continuous(deinterpolate, reinterpolate) { + var domain = unit, + range = unit, + interpolate = d3_interpolate["interpolate"], + clamp = false, + piecewise, + output, + input; + + function rescale() { + piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap; + output = input = null; + return scale; + } + + function scale(x) { + return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate)))(+x); + } + + scale.invert = function(y) { + return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y); + }; + + scale.domain = function(_) { + return arguments.length ? (domain = map.call(_, number), rescale()) : domain.slice(); + }; + + scale.range = function(_) { + return arguments.length ? (range = slice.call(_), rescale()) : range.slice(); + }; + + scale.rangeRound = function(_) { + return range = slice.call(_), interpolate = d3_interpolate["interpolateRound"], rescale(); + }; + + scale.clamp = function(_) { + return arguments.length ? (clamp = !!_, rescale()) : clamp; + }; + + scale.interpolate = function(_) { + return arguments.length ? (interpolate = _, rescale()) : interpolate; + }; + + return rescale(); +} + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatDecimal.js +// Computes the decimal coefficient and exponent of the specified number x with +// significant digits p, where x is positive and p is in [1, 21] or undefined. +// For example, formatDecimal(1.23) returns ["123", 0]. +/* harmony default export */ var formatDecimal = (function(x, p) { + if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity + var i, coefficient = x.slice(0, i); + + // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ + // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). + return [ + coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, + +x.slice(i + 1) + ]; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/exponent.js + + +/* harmony default export */ var src_exponent = (function(x) { + return x = formatDecimal(Math.abs(x)), x ? x[1] : NaN; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatGroup.js +/* harmony default export */ var formatGroup = (function(grouping, thousands) { + return function(value, width) { + var i = value.length, + t = [], + j = 0, + g = grouping[0], + length = 0; + + while (i > 0 && g > 0) { + if (length + g + 1 > width) g = Math.max(1, width - length); + t.push(value.substring(i -= g, i + g)); + if ((length += g + 1) > width) break; + g = grouping[j = (j + 1) % grouping.length]; + } + + return t.reverse().join(thousands); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatNumerals.js +/* harmony default export */ var formatNumerals = (function(numerals) { + return function(value) { + return value.replace(/[0-9]/g, function(i) { + return numerals[+i]; + }); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatSpecifier.js +// [[fill]align][sign][symbol][0][width][,][.precision][~][type] +var re = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; + +function formatSpecifier(specifier) { + return new FormatSpecifier(specifier); +} + +formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof + +function FormatSpecifier(specifier) { + if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); + var match; + this.fill = match[1] || " "; + this.align = match[2] || ">"; + this.sign = match[3] || "-"; + this.symbol = match[4] || ""; + this.zero = !!match[5]; + this.width = match[6] && +match[6]; + this.comma = !!match[7]; + this.precision = match[8] && +match[8].slice(1); + this.trim = !!match[9]; + this.type = match[10] || ""; +} + +FormatSpecifier.prototype.toString = function() { + return this.fill + + this.align + + this.sign + + this.symbol + + (this.zero ? "0" : "") + + (this.width == null ? "" : Math.max(1, this.width | 0)) + + (this.comma ? "," : "") + + (this.precision == null ? "" : "." + Math.max(0, this.precision | 0)) + + (this.trim ? "~" : "") + + this.type; +}; + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTrim.js +// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. +/* harmony default export */ var formatTrim = (function(s) { + out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { + switch (s[i]) { + case ".": i0 = i1 = i; break; + case "0": if (i0 === 0) i0 = i; i1 = i; break; + default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break; + } + } + return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatPrefixAuto.js + + +var prefixExponent; + +/* harmony default export */ var formatPrefixAuto = (function(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1], + i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, + n = coefficient.length; + return i === n ? coefficient + : i > n ? coefficient + new Array(i - n + 1).join("0") + : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) + : "0." + new Array(1 - i).join("0") + formatDecimal(x, Math.max(0, p + i - 1))[0]; // less than 1y! +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatRounded.js + + +/* harmony default export */ var formatRounded = (function(x, p) { + var d = formatDecimal(x, p); + if (!d) return x + ""; + var coefficient = d[0], + exponent = d[1]; + return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient + : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) + : coefficient + new Array(exponent - coefficient.length + 2).join("0"); +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTypes.js + + + +/* harmony default export */ var formatTypes = ({ + "%": function(x, p) { return (x * 100).toFixed(p); }, + "b": function(x) { return Math.round(x).toString(2); }, + "c": function(x) { return x + ""; }, + "d": function(x) { return Math.round(x).toString(10); }, + "e": function(x, p) { return x.toExponential(p); }, + "f": function(x, p) { return x.toFixed(p); }, + "g": function(x, p) { return x.toPrecision(p); }, + "o": function(x) { return Math.round(x).toString(8); }, + "p": function(x, p) { return formatRounded(x * 100, p); }, + "r": formatRounded, + "s": formatPrefixAuto, + "X": function(x) { return Math.round(x).toString(16).toUpperCase(); }, + "x": function(x) { return Math.round(x).toString(16); } +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/identity.js +/* harmony default export */ var identity = (function(x) { + return x; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/locale.js + + + + + + + + + +var prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; + +/* harmony default export */ var src_locale = (function(locale) { + var group = locale.grouping && locale.thousands ? formatGroup(locale.grouping, locale.thousands) : identity, + currency = locale.currency, + decimal = locale.decimal, + numerals = locale.numerals ? formatNumerals(locale.numerals) : identity, + percent = locale.percent || "%"; + + function newFormat(specifier) { + specifier = formatSpecifier(specifier); + + var fill = specifier.fill, + align = specifier.align, + sign = specifier.sign, + symbol = specifier.symbol, + zero = specifier.zero, + width = specifier.width, + comma = specifier.comma, + precision = specifier.precision, + trim = specifier.trim, + type = specifier.type; + + // The "n" type is an alias for ",g". + if (type === "n") comma = true, type = "g"; + + // The "" type, and any invalid type, is an alias for ".12~g". + else if (!formatTypes[type]) precision == null && (precision = 12), trim = true, type = "g"; + + // If zero fill is specified, padding goes after sign and before digits. + if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; + + // Compute the prefix and suffix. + // For SI-prefix, the suffix is lazily computed. + var prefix = symbol === "$" ? currency[0] : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", + suffix = symbol === "$" ? currency[1] : /[%p]/.test(type) ? percent : ""; + + // What format function should we use? + // Is this an integer type? + // Can this type generate exponential notation? + var formatType = formatTypes[type], + maybeSuffix = /[defgprs%]/.test(type); + + // Set the default precision if not specified, + // or clamp the specified precision to the supported range. + // For significant precision, it must be in [1, 21]. + // For fixed precision, it must be in [0, 20]. + precision = precision == null ? 6 + : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) + : Math.max(0, Math.min(20, precision)); + + function format(value) { + var valuePrefix = prefix, + valueSuffix = suffix, + i, n, c; + + if (type === "c") { + valueSuffix = formatType(value) + valueSuffix; + value = ""; + } else { + value = +value; + + // Perform the initial formatting. + var valueNegative = value < 0; + value = formatType(Math.abs(value), precision); + + // Trim insignificant zeros. + if (trim) value = formatTrim(value); + + // If a negative value rounds to zero during formatting, treat as positive. + if (valueNegative && +value === 0) valueNegative = false; + + // Compute the prefix and suffix. + valuePrefix = (valueNegative ? (sign === "(" ? sign : "-") : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; + valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); + + // Break the formatted value into the integer “value” part that can be + // grouped, and fractional or exponential “suffix” part that is not. + if (maybeSuffix) { + i = -1, n = value.length; + while (++i < n) { + if (c = value.charCodeAt(i), 48 > c || c > 57) { + valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; + value = value.slice(0, i); + break; + } + } + } + } + + // If the fill character is not "0", grouping is applied before padding. + if (comma && !zero) value = group(value, Infinity); + + // Compute the padding. + var length = valuePrefix.length + value.length + valueSuffix.length, + padding = length < width ? new Array(width - length + 1).join(fill) : ""; + + // If the fill character is "0", grouping is applied after padding. + if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; + + // Reconstruct the final output based on the desired alignment. + switch (align) { + case "<": value = valuePrefix + value + valueSuffix + padding; break; + case "=": value = valuePrefix + padding + value + valueSuffix; break; + case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; + default: value = padding + valuePrefix + value + valueSuffix; break; + } + + return numerals(value); + } + + format.toString = function() { + return specifier + ""; + }; + + return format; + } + + function formatPrefix(specifier, value) { + var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), + e = Math.max(-8, Math.min(8, Math.floor(src_exponent(value) / 3))) * 3, + k = Math.pow(10, -e), + prefix = prefixes[8 + e / 3]; + return function(value) { + return f(k * value) + prefix; + }; + } + + return { + format: newFormat, + formatPrefix: formatPrefix + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/defaultLocale.js + + +var defaultLocale_locale; +var defaultLocale_format; +var defaultLocale_formatPrefix; + +defaultLocale({ + decimal: ".", + thousands: ",", + grouping: [3], + currency: ["$", ""] +}); + +function defaultLocale(definition) { + defaultLocale_locale = src_locale(definition); + defaultLocale_format = defaultLocale_locale.format; + defaultLocale_formatPrefix = defaultLocale_locale.formatPrefix; + return defaultLocale_locale; +} + +// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionFixed.js + + +/* harmony default export */ var precisionFixed = (function(step) { + return Math.max(0, -src_exponent(Math.abs(step))); +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionPrefix.js + + +/* harmony default export */ var precisionPrefix = (function(step, value) { + return Math.max(0, Math.max(-8, Math.min(8, Math.floor(src_exponent(value) / 3))) * 3 - src_exponent(Math.abs(step))); +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/src/precisionRound.js + + +/* harmony default export */ var precisionRound = (function(step, max) { + step = Math.abs(step), max = Math.abs(max) - step; + return Math.max(0, src_exponent(max) - src_exponent(step)) + 1; +}); + +// CONCATENATED MODULE: ./node_modules/d3-format/index.js + + + + + + + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/tickFormat.js + + + +/* harmony default export */ var src_tickFormat = (function(domain, count, specifier) { + var start = domain[0], + stop = domain[domain.length - 1], + step = Object(d3_array["tickStep"])(start, stop, count == null ? 10 : count), + precision; + specifier = formatSpecifier(specifier == null ? ",f" : specifier); + switch (specifier.type) { + case "s": { + var value = Math.max(Math.abs(start), Math.abs(stop)); + if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision; + return defaultLocale_formatPrefix(specifier, value); + } + case "": + case "e": + case "g": + case "p": + case "r": { + if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); + break; + } + case "f": + case "%": { + if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; + break; + } + } + return defaultLocale_format(specifier); +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/linear.js + + + + + +function linearish(scale) { + var domain = scale.domain; + + scale.ticks = function(count) { + var d = domain(); + return Object(d3_array["ticks"])(d[0], d[d.length - 1], count == null ? 10 : count); + }; + + scale.tickFormat = function(count, specifier) { + return src_tickFormat(domain(), count, specifier); + }; + + scale.nice = function(count) { + if (count == null) count = 10; + + var d = domain(), + i0 = 0, + i1 = d.length - 1, + start = d[i0], + stop = d[i1], + step; + + if (stop < start) { + step = start, start = stop, stop = step; + step = i0, i0 = i1, i1 = step; + } + + step = Object(d3_array["tickIncrement"])(start, stop, count); + + if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + step = Object(d3_array["tickIncrement"])(start, stop, count); + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + step = Object(d3_array["tickIncrement"])(start, stop, count); + } + + if (step > 0) { + d[i0] = Math.floor(start / step) * step; + d[i1] = Math.ceil(stop / step) * step; + domain(d); + } else if (step < 0) { + d[i0] = Math.ceil(start * step) / step; + d[i1] = Math.floor(stop * step) / step; + domain(d); + } + + return scale; + }; + + return scale; +} + +function linear() { + var scale = continuous(deinterpolateLinear, d3_interpolate["interpolateNumber"]); + + scale.copy = function() { + return copy(scale, linear()); + }; + + return linearish(scale); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/identity.js + + + + +function identity_identity() { + var domain = [0, 1]; + + function scale(x) { + return +x; + } + + scale.invert = scale; + + scale.domain = scale.range = function(_) { + return arguments.length ? (domain = map.call(_, number), scale) : domain.slice(); + }; + + scale.copy = function() { + return identity_identity().domain(domain); + }; + + return linearish(scale); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/nice.js +/* harmony default export */ var nice = (function(domain, interval) { + domain = domain.slice(); + + var i0 = 0, + i1 = domain.length - 1, + x0 = domain[i0], + x1 = domain[i1], + t; + + if (x1 < x0) { + t = i0, i0 = i1, i1 = t; + t = x0, x0 = x1, x1 = t; + } + + domain[i0] = interval.floor(x0); + domain[i1] = interval.ceil(x1); + return domain; +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/log.js + + + + + + +function log_deinterpolate(a, b) { + return (b = Math.log(b / a)) + ? function(x) { return Math.log(x / a) / b; } + : constant(b); +} + +function log_reinterpolate(a, b) { + return a < 0 + ? function(t) { return -Math.pow(-b, t) * Math.pow(-a, 1 - t); } + : function(t) { return Math.pow(b, t) * Math.pow(a, 1 - t); }; +} + +function pow10(x) { + return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; +} + +function powp(base) { + return base === 10 ? pow10 + : base === Math.E ? Math.exp + : function(x) { return Math.pow(base, x); }; +} + +function logp(base) { + return base === Math.E ? Math.log + : base === 10 && Math.log10 + || base === 2 && Math.log2 + || (base = Math.log(base), function(x) { return Math.log(x) / base; }); +} + +function reflect(f) { + return function(x) { + return -f(-x); + }; +} + +function log() { + var scale = continuous(log_deinterpolate, log_reinterpolate).domain([1, 10]), + domain = scale.domain, + base = 10, + logs = logp(10), + pows = powp(10); + + function rescale() { + logs = logp(base), pows = powp(base); + if (domain()[0] < 0) logs = reflect(logs), pows = reflect(pows); + return scale; + } + + scale.base = function(_) { + return arguments.length ? (base = +_, rescale()) : base; + }; + + scale.domain = function(_) { + return arguments.length ? (domain(_), rescale()) : domain(); + }; + + scale.ticks = function(count) { + var d = domain(), + u = d[0], + v = d[d.length - 1], + r; + + if (r = v < u) i = u, u = v, v = i; + + var i = logs(u), + j = logs(v), + p, + k, + t, + n = count == null ? 10 : +count, + z = []; + + if (!(base % 1) && j - i < n) { + i = Math.round(i) - 1, j = Math.round(j) + 1; + if (u > 0) for (; i < j; ++i) { + for (k = 1, p = pows(i); k < base; ++k) { + t = p * k; + if (t < u) continue; + if (t > v) break; + z.push(t); + } + } else for (; i < j; ++i) { + for (k = base - 1, p = pows(i); k >= 1; --k) { + t = p * k; + if (t < u) continue; + if (t > v) break; + z.push(t); + } + } + } else { + z = Object(d3_array["ticks"])(i, j, Math.min(j - i, n)).map(pows); + } + + return r ? z.reverse() : z; + }; + + scale.tickFormat = function(count, specifier) { + if (specifier == null) specifier = base === 10 ? ".0e" : ","; + if (typeof specifier !== "function") specifier = defaultLocale_format(specifier); + if (count === Infinity) return specifier; + if (count == null) count = 10; + var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? + return function(d) { + var i = d / pows(Math.round(logs(d))); + if (i * base < base - 0.5) i *= base; + return i <= k ? specifier(d) : ""; + }; + }; + + scale.nice = function() { + return domain(nice(domain(), { + floor: function(x) { return pows(Math.floor(logs(x))); }, + ceil: function(x) { return pows(Math.ceil(logs(x))); } + })); + }; + + scale.copy = function() { + return copy(scale, log().base(base)); + }; + + return scale; +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/pow.js + + + + +function raise(x, exponent) { + return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); +} + +function pow() { + var exponent = 1, + scale = continuous(deinterpolate, reinterpolate), + domain = scale.domain; + + function deinterpolate(a, b) { + return (b = raise(b, exponent) - (a = raise(a, exponent))) + ? function(x) { return (raise(x, exponent) - a) / b; } + : constant(b); + } + + function reinterpolate(a, b) { + b = raise(b, exponent) - (a = raise(a, exponent)); + return function(t) { return raise(a + b * t, 1 / exponent); }; + } + + scale.exponent = function(_) { + return arguments.length ? (exponent = +_, domain(domain())) : exponent; + }; + + scale.copy = function() { + return copy(scale, pow().exponent(exponent)); + }; + + return linearish(scale); +} + +function sqrt() { + return pow().exponent(0.5); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/quantile.js + + + +function quantile() { + var domain = [], + range = [], + thresholds = []; + + function rescale() { + var i = 0, n = Math.max(1, range.length); + thresholds = new Array(n - 1); + while (++i < n) thresholds[i - 1] = Object(d3_array["quantile"])(domain, i / n); + return scale; + } + + function scale(x) { + if (!isNaN(x = +x)) return range[Object(d3_array["bisect"])(thresholds, x)]; + } + + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] : [ + i > 0 ? thresholds[i - 1] : domain[0], + i < thresholds.length ? thresholds[i] : domain[domain.length - 1] + ]; + }; + + scale.domain = function(_) { + if (!arguments.length) return domain.slice(); + domain = []; + for (var i = 0, n = _.length, d; i < n; ++i) if (d = _[i], d != null && !isNaN(d = +d)) domain.push(d); + domain.sort(d3_array["ascending"]); + return rescale(); + }; + + scale.range = function(_) { + return arguments.length ? (range = slice.call(_), rescale()) : range.slice(); + }; + + scale.quantiles = function() { + return thresholds.slice(); + }; + + scale.copy = function() { + return quantile() + .domain(domain) + .range(range); + }; + + return scale; +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/quantize.js + + + + +function quantize() { + var x0 = 0, + x1 = 1, + n = 1, + domain = [0.5], + range = [0, 1]; + + function scale(x) { + if (x <= x) return range[Object(d3_array["bisect"])(domain, x, 0, n)]; + } + + function rescale() { + var i = -1; + domain = new Array(n); + while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); + return scale; + } + + scale.domain = function(_) { + return arguments.length ? (x0 = +_[0], x1 = +_[1], rescale()) : [x0, x1]; + }; + + scale.range = function(_) { + return arguments.length ? (n = (range = slice.call(_)).length - 1, rescale()) : range.slice(); + }; + + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return i < 0 ? [NaN, NaN] + : i < 1 ? [x0, domain[0]] + : i >= n ? [domain[n - 1], x1] + : [domain[i - 1], domain[i]]; + }; + + scale.copy = function() { + return quantize() + .domain([x0, x1]) + .range(range); + }; + + return linearish(scale); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/threshold.js + + + +function threshold() { + var domain = [0.5], + range = [0, 1], + n = 1; + + function scale(x) { + if (x <= x) return range[Object(d3_array["bisect"])(domain, x, 0, n)]; + } + + scale.domain = function(_) { + return arguments.length ? (domain = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); + }; + + scale.range = function(_) { + return arguments.length ? (range = slice.call(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); + }; + + scale.invertExtent = function(y) { + var i = range.indexOf(y); + return [domain[i - 1], domain[i]]; + }; + + scale.copy = function() { + return threshold() + .domain(domain) + .range(range); + }; + + return scale; +} + +// EXTERNAL MODULE: ./node_modules/d3-time/index.js + 16 modules +var d3_time = __webpack_require__(69); + +// EXTERNAL MODULE: ./node_modules/d3-time-format/index.js + 4 modules +var d3_time_format = __webpack_require__(75); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/time.js + + + + + + + + +var durationSecond = 1000, + durationMinute = durationSecond * 60, + durationHour = durationMinute * 60, + durationDay = durationHour * 24, + durationWeek = durationDay * 7, + durationMonth = durationDay * 30, + durationYear = durationDay * 365; + +function date(t) { + return new Date(t); +} + +function time_number(t) { + return t instanceof Date ? +t : +new Date(+t); +} + +function calendar(year, month, week, day, hour, minute, second, millisecond, format) { + var scale = continuous(deinterpolateLinear, d3_interpolate["interpolateNumber"]), + invert = scale.invert, + domain = scale.domain; + + var formatMillisecond = format(".%L"), + formatSecond = format(":%S"), + formatMinute = format("%I:%M"), + formatHour = format("%I %p"), + formatDay = format("%a %d"), + formatWeek = format("%b %d"), + formatMonth = format("%B"), + formatYear = format("%Y"); + + var tickIntervals = [ + [second, 1, durationSecond], + [second, 5, 5 * durationSecond], + [second, 15, 15 * durationSecond], + [second, 30, 30 * durationSecond], + [minute, 1, durationMinute], + [minute, 5, 5 * durationMinute], + [minute, 15, 15 * durationMinute], + [minute, 30, 30 * durationMinute], + [ hour, 1, durationHour ], + [ hour, 3, 3 * durationHour ], + [ hour, 6, 6 * durationHour ], + [ hour, 12, 12 * durationHour ], + [ day, 1, durationDay ], + [ day, 2, 2 * durationDay ], + [ week, 1, durationWeek ], + [ month, 1, durationMonth ], + [ month, 3, 3 * durationMonth ], + [ year, 1, durationYear ] + ]; + + function tickFormat(date) { + return (second(date) < date ? formatMillisecond + : minute(date) < date ? formatSecond + : hour(date) < date ? formatMinute + : day(date) < date ? formatHour + : month(date) < date ? (week(date) < date ? formatDay : formatWeek) + : year(date) < date ? formatMonth + : formatYear)(date); + } + + function tickInterval(interval, start, stop, step) { + if (interval == null) interval = 10; + + // If a desired tick count is specified, pick a reasonable tick interval + // based on the extent of the domain and a rough estimate of tick size. + // Otherwise, assume interval is already a time interval and use it. + if (typeof interval === "number") { + var target = Math.abs(stop - start) / interval, + i = Object(d3_array["bisector"])(function(i) { return i[2]; }).right(tickIntervals, target); + if (i === tickIntervals.length) { + step = Object(d3_array["tickStep"])(start / durationYear, stop / durationYear, interval); + interval = year; + } else if (i) { + i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; + step = i[1]; + interval = i[0]; + } else { + step = Math.max(Object(d3_array["tickStep"])(start, stop, interval), 1); + interval = millisecond; + } + } + + return step == null ? interval : interval.every(step); + } + + scale.invert = function(y) { + return new Date(invert(y)); + }; + + scale.domain = function(_) { + return arguments.length ? domain(map.call(_, time_number)) : domain().map(date); + }; + + scale.ticks = function(interval, step) { + var d = domain(), + t0 = d[0], + t1 = d[d.length - 1], + r = t1 < t0, + t; + if (r) t = t0, t0 = t1, t1 = t; + t = tickInterval(interval, t0, t1, step); + t = t ? t.range(t0, t1 + 1) : []; // inclusive stop + return r ? t.reverse() : t; + }; + + scale.tickFormat = function(count, specifier) { + return specifier == null ? tickFormat : format(specifier); + }; + + scale.nice = function(interval, step) { + var d = domain(); + return (interval = tickInterval(interval, d[0], d[d.length - 1], step)) + ? domain(nice(d, interval)) + : scale; + }; + + scale.copy = function() { + return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); + }; + + return scale; +} + +/* harmony default export */ var time = (function() { + return calendar(d3_time["timeYear"], d3_time["timeMonth"], d3_time["timeWeek"], d3_time["timeDay"], d3_time["timeHour"], d3_time["timeMinute"], d3_time["timeSecond"], d3_time["timeMillisecond"], d3_time_format["timeFormat"]).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]); +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/utcTime.js + + + + +/* harmony default export */ var utcTime = (function() { + return calendar(d3_time["utcYear"], d3_time["utcMonth"], d3_time["utcWeek"], d3_time["utcDay"], d3_time["utcHour"], d3_time["utcMinute"], d3_time["utcSecond"], d3_time["utcMillisecond"], d3_time_format["utcFormat"]).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]); +}); + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/sequential.js + + +function sequential(interpolator) { + var x0 = 0, + x1 = 1, + k10 = 1, + clamp = false; + + function scale(x) { + var t = (x - x0) * k10; + return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t); + } + + scale.domain = function(_) { + return arguments.length ? (x0 = +_[0], x1 = +_[1], k10 = x0 === x1 ? 0 : 1 / (x1 - x0), scale) : [x0, x1]; + }; + + scale.clamp = function(_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; + + scale.interpolator = function(_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + + scale.copy = function() { + return sequential(interpolator).domain([x0, x1]).clamp(clamp); + }; + + return linearish(scale); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/src/diverging.js + + +function diverging(interpolator) { + var x0 = 0, + x1 = 0.5, + x2 = 1, + k10 = 1, + k21 = 1, + clamp = false; + + function scale(x) { + var t = 0.5 + ((x = +x) - x1) * (x < x1 ? k10 : k21); + return interpolator(clamp ? Math.max(0, Math.min(1, t)) : t); + } + + scale.domain = function(_) { + return arguments.length ? (x0 = +_[0], x1 = +_[1], x2 = +_[2], k10 = x0 === x1 ? 0 : 0.5 / (x1 - x0), k21 = x1 === x2 ? 0 : 0.5 / (x2 - x1), scale) : [x0, x1, x2]; + }; + + scale.clamp = function(_) { + return arguments.length ? (clamp = !!_, scale) : clamp; + }; + + scale.interpolator = function(_) { + return arguments.length ? (interpolator = _, scale) : interpolator; + }; + + scale.copy = function() { + return diverging(interpolator).domain([x0, x1, x2]).clamp(clamp); + }; + + return linearish(scale); +} + +// CONCATENATED MODULE: ./node_modules/d3-scale/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleBand", function() { return band; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scalePoint", function() { return point; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleIdentity", function() { return identity_identity; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleLinear", function() { return linear; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleLog", function() { return log; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleOrdinal", function() { return ordinal; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleImplicit", function() { return implicit; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scalePow", function() { return pow; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleSqrt", function() { return sqrt; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleQuantile", function() { return quantile; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleQuantize", function() { return quantize; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleThreshold", function() { return threshold; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleTime", function() { return time; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleUtc", function() { return utcTime; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleSequential", function() { return sequential; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scaleDiverging", function() { return diverging; }); + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 66 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-array/src/ascending.js +/* harmony default export */ var ascending = (function(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/bisector.js + + +/* harmony default export */ var bisector = (function(compare) { + if (compare.length === 1) compare = ascendingComparator(compare); + return { + left: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; + else hi = mid; + } + return lo; + }, + right: function(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + var mid = lo + hi >>> 1; + if (compare(a[mid], x) > 0) hi = mid; + else lo = mid + 1; + } + return lo; + } + }; +}); + +function ascendingComparator(f) { + return function(d, x) { + return ascending(f(d), x); + }; +} + +// CONCATENATED MODULE: ./node_modules/d3-array/src/bisect.js + + + +var ascendingBisect = bisector(ascending); +var bisectRight = ascendingBisect.right; +var bisectLeft = ascendingBisect.left; +/* harmony default export */ var bisect = (bisectRight); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/pairs.js +/* harmony default export */ var pairs = (function(array, f) { + if (f == null) f = pair; + var i = 0, n = array.length - 1, p = array[0], pairs = new Array(n < 0 ? 0 : n); + while (i < n) pairs[i] = f(p, p = array[++i]); + return pairs; +}); + +function pair(a, b) { + return [a, b]; +} + +// CONCATENATED MODULE: ./node_modules/d3-array/src/cross.js + + +/* harmony default export */ var cross = (function(values0, values1, reduce) { + var n0 = values0.length, + n1 = values1.length, + values = new Array(n0 * n1), + i0, + i1, + i, + value0; + + if (reduce == null) reduce = pair; + + for (i0 = i = 0; i0 < n0; ++i0) { + for (value0 = values0[i0], i1 = 0; i1 < n1; ++i1, ++i) { + values[i] = reduce(value0, values1[i1]); + } + } + + return values; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/descending.js +/* harmony default export */ var descending = (function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/number.js +/* harmony default export */ var number = (function(x) { + return x === null ? NaN : +x; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/variance.js + + +/* harmony default export */ var variance = (function(values, valueof) { + var n = values.length, + m = 0, + i = -1, + mean = 0, + value, + delta, + sum = 0; + + if (valueof == null) { + while (++i < n) { + if (!isNaN(value = number(values[i]))) { + delta = value - mean; + mean += delta / ++m; + sum += delta * (value - mean); + } + } + } + + else { + while (++i < n) { + if (!isNaN(value = number(valueof(values[i], i, values)))) { + delta = value - mean; + mean += delta / ++m; + sum += delta * (value - mean); + } + } + } + + if (m > 1) return sum / (m - 1); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/deviation.js + + +/* harmony default export */ var deviation = (function(array, f) { + var v = variance(array, f); + return v ? Math.sqrt(v) : v; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/extent.js +/* harmony default export */ var extent = (function(values, valueof) { + var n = values.length, + i = -1, + value, + min, + max; + + if (valueof == null) { + while (++i < n) { // Find the first comparable value. + if ((value = values[i]) != null && value >= value) { + min = max = value; + while (++i < n) { // Compare the remaining values. + if ((value = values[i]) != null) { + if (min > value) min = value; + if (max < value) max = value; + } + } + } + } + } + + else { + while (++i < n) { // Find the first comparable value. + if ((value = valueof(values[i], i, values)) != null && value >= value) { + min = max = value; + while (++i < n) { // Compare the remaining values. + if ((value = valueof(values[i], i, values)) != null) { + if (min > value) min = value; + if (max < value) max = value; + } + } + } + } + } + + return [min, max]; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/array.js +var array_array = Array.prototype; + +var slice = array_array.slice; +var map = array_array.map; + +// CONCATENATED MODULE: ./node_modules/d3-array/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/identity.js +/* harmony default export */ var identity = (function(x) { + return x; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/range.js +/* harmony default export */ var range = (function(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + + while (++i < n) { + range[i] = start + i * step; + } + + return range; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/ticks.js +var e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); + +/* harmony default export */ var ticks = (function(start, stop, count) { + var reverse, + i = -1, + n, + ticks, + step; + + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) return [start]; + if (reverse = stop < start) n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; + + if (step > 0) { + start = Math.ceil(start / step); + stop = Math.floor(stop / step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) * step; + } else { + start = Math.floor(start * step); + stop = Math.ceil(stop * step); + ticks = new Array(n = Math.ceil(start - stop + 1)); + while (++i < n) ticks[i] = (start - i) / step; + } + + if (reverse) ticks.reverse(); + + return ticks; +}); + +function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log(step) / Math.LN10), + error = step / Math.pow(10, power); + return power >= 0 + ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) + : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); +} + +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; +} + +// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/sturges.js +/* harmony default export */ var sturges = (function(values) { + return Math.ceil(Math.log(values.length) / Math.LN2) + 1; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/histogram.js + + + + + + + + + +/* harmony default export */ var src_histogram = (function() { + var value = identity, + domain = extent, + threshold = sturges; + + function histogram(data) { + var i, + n = data.length, + x, + values = new Array(n); + + for (i = 0; i < n; ++i) { + values[i] = value(data[i], i, data); + } + + var xz = domain(values), + x0 = xz[0], + x1 = xz[1], + tz = threshold(values, x0, x1); + + // Convert number of thresholds into uniform thresholds. + if (!Array.isArray(tz)) { + tz = tickStep(x0, x1, tz); + tz = range(Math.ceil(x0 / tz) * tz, Math.floor(x1 / tz) * tz, tz); // exclusive + } + + // Remove any thresholds outside the domain. + var m = tz.length; + while (tz[0] <= x0) tz.shift(), --m; + while (tz[m - 1] > x1) tz.pop(), --m; + + var bins = new Array(m + 1), + bin; + + // Initialize bins. + for (i = 0; i <= m; ++i) { + bin = bins[i] = []; + bin.x0 = i > 0 ? tz[i - 1] : x0; + bin.x1 = i < m ? tz[i] : x1; + } + + // Assign data to bins by value, ignoring any outside the domain. + for (i = 0; i < n; ++i) { + x = values[i]; + if (x0 <= x && x <= x1) { + bins[bisect(tz, x, 0, m)].push(data[i]); + } + } + + return bins; + } + + histogram.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; + }; + + histogram.domain = function(_) { + return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; + }; + + histogram.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; + }; + + return histogram; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/quantile.js + + +/* harmony default export */ var quantile = (function(values, p, valueof) { + if (valueof == null) valueof = number; + if (!(n = values.length)) return; + if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); + if (p >= 1) return +valueof(values[n - 1], n - 1, values); + var n, + i = (n - 1) * p, + i0 = Math.floor(i), + value0 = +valueof(values[i0], i0, values), + value1 = +valueof(values[i0 + 1], i0 + 1, values); + return value0 + (value1 - value0) * (i - i0); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/freedmanDiaconis.js + + + + + +/* harmony default export */ var freedmanDiaconis = (function(values, min, max) { + values = map.call(values, number).sort(ascending); + return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(values.length, -1 / 3))); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/threshold/scott.js + + +/* harmony default export */ var scott = (function(values, min, max) { + return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(values.length, -1 / 3))); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/max.js +/* harmony default export */ var src_max = (function(values, valueof) { + var n = values.length, + i = -1, + value, + max; + + if (valueof == null) { + while (++i < n) { // Find the first comparable value. + if ((value = values[i]) != null && value >= value) { + max = value; + while (++i < n) { // Compare the remaining values. + if ((value = values[i]) != null && value > max) { + max = value; + } + } + } + } + } + + else { + while (++i < n) { // Find the first comparable value. + if ((value = valueof(values[i], i, values)) != null && value >= value) { + max = value; + while (++i < n) { // Compare the remaining values. + if ((value = valueof(values[i], i, values)) != null && value > max) { + max = value; + } + } + } + } + } + + return max; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/mean.js + + +/* harmony default export */ var src_mean = (function(values, valueof) { + var n = values.length, + m = n, + i = -1, + value, + sum = 0; + + if (valueof == null) { + while (++i < n) { + if (!isNaN(value = number(values[i]))) sum += value; + else --m; + } + } + + else { + while (++i < n) { + if (!isNaN(value = number(valueof(values[i], i, values)))) sum += value; + else --m; + } + } + + if (m) return sum / m; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/median.js + + + + +/* harmony default export */ var median = (function(values, valueof) { + var n = values.length, + i = -1, + value, + numbers = []; + + if (valueof == null) { + while (++i < n) { + if (!isNaN(value = number(values[i]))) { + numbers.push(value); + } + } + } + + else { + while (++i < n) { + if (!isNaN(value = number(valueof(values[i], i, values)))) { + numbers.push(value); + } + } + } + + return quantile(numbers.sort(ascending), 0.5); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/merge.js +/* harmony default export */ var merge = (function(arrays) { + var n = arrays.length, + m, + i = -1, + j = 0, + merged, + array; + + while (++i < n) j += arrays[i].length; + merged = new Array(j); + + while (--n >= 0) { + array = arrays[n]; + m = array.length; + while (--m >= 0) { + merged[--j] = array[m]; + } + } + + return merged; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/min.js +/* harmony default export */ var src_min = (function(values, valueof) { + var n = values.length, + i = -1, + value, + min; + + if (valueof == null) { + while (++i < n) { // Find the first comparable value. + if ((value = values[i]) != null && value >= value) { + min = value; + while (++i < n) { // Compare the remaining values. + if ((value = values[i]) != null && min > value) { + min = value; + } + } + } + } + } + + else { + while (++i < n) { // Find the first comparable value. + if ((value = valueof(values[i], i, values)) != null && value >= value) { + min = value; + while (++i < n) { // Compare the remaining values. + if ((value = valueof(values[i], i, values)) != null && min > value) { + min = value; + } + } + } + } + } + + return min; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/permute.js +/* harmony default export */ var permute = (function(array, indexes) { + var i = indexes.length, permutes = new Array(i); + while (i--) permutes[i] = array[indexes[i]]; + return permutes; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/scan.js + + +/* harmony default export */ var scan = (function(values, compare) { + if (!(n = values.length)) return; + var n, + i = 0, + j = 0, + xi, + xj = values[j]; + + if (compare == null) compare = ascending; + + while (++i < n) { + if (compare(xi = values[i], xj) < 0 || compare(xj, xj) !== 0) { + xj = xi, j = i; + } + } + + if (compare(xj, xj) === 0) return j; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/shuffle.js +/* harmony default export */ var shuffle = (function(array, i0, i1) { + var m = (i1 == null ? array.length : i1) - (i0 = i0 == null ? 0 : +i0), + t, + i; + + while (m) { + i = Math.random() * m-- | 0; + t = array[m + i0]; + array[m + i0] = array[i + i0]; + array[i + i0] = t; + } + + return array; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/sum.js +/* harmony default export */ var src_sum = (function(values, valueof) { + var n = values.length, + i = -1, + value, + sum = 0; + + if (valueof == null) { + while (++i < n) { + if (value = +values[i]) sum += value; // Note: zero and null are equivalent. + } + } + + else { + while (++i < n) { + if (value = +valueof(values[i], i, values)) sum += value; + } + } + + return sum; +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/src/transpose.js + + +/* harmony default export */ var src_transpose = (function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = src_min(matrix, transpose_length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } + } + return transpose; +}); + +function transpose_length(d) { + return d.length; +} + +// CONCATENATED MODULE: ./node_modules/d3-array/src/zip.js + + +/* harmony default export */ var zip = (function() { + return src_transpose(arguments); +}); + +// CONCATENATED MODULE: ./node_modules/d3-array/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bisect", function() { return bisect; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ascending", function() { return ascending; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "bisector", function() { return bisector; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "cross", function() { return cross; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "descending", function() { return descending; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "deviation", function() { return deviation; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "extent", function() { return extent; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "histogram", function() { return src_histogram; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return freedmanDiaconis; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return scott; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return sturges; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "max", function() { return src_max; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "mean", function() { return src_mean; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "median", function() { return median; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "merge", function() { return merge; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "min", function() { return src_min; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "pairs", function() { return pairs; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "permute", function() { return permute; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "quantile", function() { return quantile; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "range", function() { return range; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "scan", function() { return scan; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "sum", function() { return src_sum; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "ticks", function() { return ticks; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "transpose", function() { return src_transpose; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "variance", function() { return variance; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zip", function() { return zip; }); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 67 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-selection/index.js + 49 modules +var d3_selection = __webpack_require__(64); + +// EXTERNAL MODULE: ./node_modules/d3-dispatch/index.js + 1 modules +var d3_dispatch = __webpack_require__(78); + +// CONCATENATED MODULE: ./node_modules/d3-timer/src/timer.js +var timer_frame = 0, // is an animation frame pending? + timeout = 0, // is a timeout pending? + interval = 0, // are any timers active? + pokeDelay = 1000, // how frequently we check for clock skew + taskHead, + taskTail, + clockLast = 0, + clockNow = 0, + clockSkew = 0, + clock = typeof performance === "object" && performance.now ? performance : Date, + setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; + +function now() { + return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); +} + +function clearNow() { + clockNow = 0; +} + +function Timer() { + this._call = + this._time = + this._next = null; +} + +Timer.prototype = timer.prototype = { + constructor: Timer, + restart: function(callback, delay, time) { + if (typeof callback !== "function") throw new TypeError("callback is not a function"); + time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); + if (!this._next && taskTail !== this) { + if (taskTail) taskTail._next = this; + else taskHead = this; + taskTail = this; + } + this._call = callback; + this._time = time; + sleep(); + }, + stop: function() { + if (this._call) { + this._call = null; + this._time = Infinity; + sleep(); + } + } +}; + +function timer(callback, delay, time) { + var t = new Timer; + t.restart(callback, delay, time); + return t; +} + +function timerFlush() { + now(); // Get the current time, if not already set. + ++timer_frame; // Pretend we’ve set an alarm, if we haven’t already. + var t = taskHead, e; + while (t) { + if ((e = clockNow - t._time) >= 0) t._call.call(null, e); + t = t._next; + } + --timer_frame; +} + +function wake() { + clockNow = (clockLast = clock.now()) + clockSkew; + timer_frame = timeout = 0; + try { + timerFlush(); + } finally { + timer_frame = 0; + nap(); + clockNow = 0; + } +} + +function poke() { + var now = clock.now(), delay = now - clockLast; + if (delay > pokeDelay) clockSkew -= delay, clockLast = now; +} + +function nap() { + var t0, t1 = taskHead, t2, time = Infinity; + while (t1) { + if (t1._call) { + if (time > t1._time) time = t1._time; + t0 = t1, t1 = t1._next; + } else { + t2 = t1._next, t1._next = null; + t1 = t0 ? t0._next = t2 : taskHead = t2; + } + } + taskTail = t0; + sleep(time); +} + +function sleep(time) { + if (timer_frame) return; // Soonest alarm already set, or will be. + if (timeout) timeout = clearTimeout(timeout); + var delay = time - clockNow; // Strictly less than if we recomputed clockNow. + if (delay > 24) { + if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); + if (interval) interval = clearInterval(interval); + } else { + if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); + timer_frame = 1, setFrame(wake); + } +} + +// CONCATENATED MODULE: ./node_modules/d3-timer/src/timeout.js + + +/* harmony default export */ var src_timeout = (function(callback, delay, time) { + var t = new Timer; + delay = delay == null ? 0 : +delay; + t.restart(function(elapsed) { + t.stop(); + callback(elapsed + delay); + }, delay, time); + return t; +}); + +// CONCATENATED MODULE: ./node_modules/d3-timer/src/interval.js + + +/* harmony default export */ var src_interval = (function(callback, delay, time) { + var t = new Timer, total = delay; + if (delay == null) return t.restart(callback, delay, time), t; + delay = +delay, time = time == null ? now() : +time; + t.restart(function tick(elapsed) { + elapsed += total; + t.restart(tick, total += delay, time); + callback(elapsed); + }, delay, time); + return t; +}); + +// CONCATENATED MODULE: ./node_modules/d3-timer/index.js + + + + + + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/schedule.js + + + +var emptyOn = Object(d3_dispatch["dispatch"])("start", "end", "interrupt"); +var emptyTween = []; + +var CREATED = 0; +var SCHEDULED = 1; +var STARTING = 2; +var STARTED = 3; +var RUNNING = 4; +var ENDING = 5; +var ENDED = 6; + +/* harmony default export */ var transition_schedule = (function(node, name, id, index, group, timing) { + var schedules = node.__transition; + if (!schedules) node.__transition = {}; + else if (id in schedules) return; + create(node, id, { + name: name, + index: index, // For context during callback. + group: group, // For context during callback. + on: emptyOn, + tween: emptyTween, + time: timing.time, + delay: timing.delay, + duration: timing.duration, + ease: timing.ease, + timer: null, + state: CREATED + }); +}); + +function init(node, id) { + var schedule = get(node, id); + if (schedule.state > CREATED) throw new Error("too late; already scheduled"); + return schedule; +} + +function set(node, id) { + var schedule = get(node, id); + if (schedule.state > STARTING) throw new Error("too late; already started"); + return schedule; +} + +function get(node, id) { + var schedule = node.__transition; + if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); + return schedule; +} + +function create(node, id, self) { + var schedules = node.__transition, + tween; + + // Initialize the self timer when the transition is created. + // Note the actual delay is not known until the first callback! + schedules[id] = self; + self.timer = timer(schedule, 0, self.time); + + function schedule(elapsed) { + self.state = SCHEDULED; + self.timer.restart(start, self.delay, self.time); + + // If the elapsed delay is less than our first sleep, start immediately. + if (self.delay <= elapsed) start(elapsed - self.delay); + } + + function start(elapsed) { + var i, j, n, o; + + // If the state is not SCHEDULED, then we previously errored on start. + if (self.state !== SCHEDULED) return stop(); + + for (i in schedules) { + o = schedules[i]; + if (o.name !== self.name) continue; + + // While this element already has a starting transition during this frame, + // defer starting an interrupting transition until that transition has a + // chance to tick (and possibly end); see d3/d3-transition#54! + if (o.state === STARTED) return src_timeout(start); + + // Interrupt the active transition, if any. + // Dispatch the interrupt event. + if (o.state === RUNNING) { + o.state = ENDED; + o.timer.stop(); + o.on.call("interrupt", node, node.__data__, o.index, o.group); + delete schedules[i]; + } + + // Cancel any pre-empted transitions. No interrupt event is dispatched + // because the cancelled transitions never started. Note that this also + // removes this transition from the pending list! + else if (+i < id) { + o.state = ENDED; + o.timer.stop(); + delete schedules[i]; + } + } + + // Defer the first tick to end of the current frame; see d3/d3#1576. + // Note the transition may be canceled after start and before the first tick! + // Note this must be scheduled before the start event; see d3/d3-transition#16! + // Assuming this is successful, subsequent callbacks go straight to tick. + src_timeout(function() { + if (self.state === STARTED) { + self.state = RUNNING; + self.timer.restart(tick, self.delay, self.time); + tick(elapsed); + } + }); + + // Dispatch the start event. + // Note this must be done before the tween are initialized. + self.state = STARTING; + self.on.call("start", node, node.__data__, self.index, self.group); + if (self.state !== STARTING) return; // interrupted + self.state = STARTED; + + // Initialize the tween, deleting null tween. + tween = new Array(n = self.tween.length); + for (i = 0, j = -1; i < n; ++i) { + if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { + tween[++j] = o; + } + } + tween.length = j + 1; + } + + function tick(elapsed) { + var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), + i = -1, + n = tween.length; + + while (++i < n) { + tween[i].call(null, t); + } + + // Dispatch the end event. + if (self.state === ENDING) { + self.on.call("end", node, node.__data__, self.index, self.group); + stop(); + } + } + + function stop() { + self.state = ENDED; + self.timer.stop(); + delete schedules[id]; + for (var i in schedules) return; // eslint-disable-line no-unused-vars + delete node.__transition; + } +} + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/interrupt.js + + +/* harmony default export */ var interrupt = (function(node, name) { + var schedules = node.__transition, + schedule, + active, + empty = true, + i; + + if (!schedules) return; + + name = name == null ? null : name + ""; + + for (i in schedules) { + if ((schedule = schedules[i]).name !== name) { empty = false; continue; } + active = schedule.state > STARTING && schedule.state < ENDING; + schedule.state = ENDED; + schedule.timer.stop(); + if (active) schedule.on.call("interrupt", node, node.__data__, schedule.index, schedule.group); + delete schedules[i]; + } + + if (empty) delete node.__transition; +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/interrupt.js + + +/* harmony default export */ var selection_interrupt = (function(name) { + return this.each(function() { + interrupt(this, name); + }); +}); + +// EXTERNAL MODULE: ./node_modules/d3-interpolate/index.js + 22 modules +var d3_interpolate = __webpack_require__(68); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/tween.js + + +function tweenRemove(id, name) { + var tween0, tween1; + return function() { + var schedule = set(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = tween0 = tween; + for (var i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1 = tween1.slice(); + tween1.splice(i, 1); + break; + } + } + } + + schedule.tween = tween1; + }; +} + +function tweenFunction(id, name, value) { + var tween0, tween1; + if (typeof value !== "function") throw new Error; + return function() { + var schedule = set(this, id), + tween = schedule.tween; + + // If this node shared tween with the previous node, + // just assign the updated shared tween and we’re done! + // Otherwise, copy-on-write. + if (tween !== tween0) { + tween1 = (tween0 = tween).slice(); + for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { + if (tween1[i].name === name) { + tween1[i] = t; + break; + } + } + if (i === n) tween1.push(t); + } + + schedule.tween = tween1; + }; +} + +/* harmony default export */ var transition_tween = (function(name, value) { + var id = this._id; + + name += ""; + + if (arguments.length < 2) { + var tween = get(this.node(), id).tween; + for (var i = 0, n = tween.length, t; i < n; ++i) { + if ((t = tween[i]).name === name) { + return t.value; + } + } + return null; + } + + return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); +}); + +function tweenValue(transition, name, value) { + var id = transition._id; + + transition.each(function() { + var schedule = set(this, id); + (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); + }); + + return function(node) { + return get(node, id).value[name]; + }; +} + +// EXTERNAL MODULE: ./node_modules/d3-color/index.js + 5 modules +var d3_color = __webpack_require__(73); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/interpolate.js + + + +/* harmony default export */ var transition_interpolate = (function(a, b) { + var c; + return (typeof b === "number" ? d3_interpolate["interpolateNumber"] + : b instanceof d3_color["color"] ? d3_interpolate["interpolateRgb"] + : (c = Object(d3_color["color"])(b)) ? (b = c, d3_interpolate["interpolateRgb"]) + : d3_interpolate["interpolateString"])(a, b); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/attr.js + + + + + +function attrRemove(name) { + return function() { + this.removeAttribute(name); + }; +} + +function attrRemoveNS(fullname) { + return function() { + this.removeAttributeNS(fullname.space, fullname.local); + }; +} + +function attrConstant(name, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = this.getAttribute(name); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function attrConstantNS(fullname, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = this.getAttributeNS(fullname.space, fullname.local); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function attrFunction(name, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0, value1 = value(this); + if (value1 == null) return void this.removeAttribute(name); + value0 = this.getAttribute(name); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +function attrFunctionNS(fullname, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0, value1 = value(this); + if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); + value0 = this.getAttributeNS(fullname.space, fullname.local); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +/* harmony default export */ var attr = (function(name, value) { + var fullname = Object(d3_selection["namespace"])(name), i = fullname === "transform" ? d3_interpolate["interpolateTransformSvg"] : transition_interpolate; + return this.attrTween(name, typeof value === "function" + ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) + : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) + : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value + "")); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/attrTween.js + + +function attrTweenNS(fullname, value) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.setAttributeNS(fullname.space, fullname.local, i(t)); + }; + } + tween._value = value; + return tween; +} + +function attrTween(name, value) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.setAttribute(name, i(t)); + }; + } + tween._value = value; + return tween; +} + +/* harmony default export */ var transition_attrTween = (function(name, value) { + var key = "attr." + name; + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + var fullname = Object(d3_selection["namespace"])(name); + return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/delay.js + + +function delayFunction(id, value) { + return function() { + init(this, id).delay = +value.apply(this, arguments); + }; +} + +function delayConstant(id, value) { + return value = +value, function() { + init(this, id).delay = value; + }; +} + +/* harmony default export */ var transition_delay = (function(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? delayFunction + : delayConstant)(id, value)) + : get(this.node(), id).delay; +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/duration.js + + +function durationFunction(id, value) { + return function() { + set(this, id).duration = +value.apply(this, arguments); + }; +} + +function durationConstant(id, value) { + return value = +value, function() { + set(this, id).duration = value; + }; +} + +/* harmony default export */ var duration = (function(value) { + var id = this._id; + + return arguments.length + ? this.each((typeof value === "function" + ? durationFunction + : durationConstant)(id, value)) + : get(this.node(), id).duration; +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/ease.js + + +function easeConstant(id, value) { + if (typeof value !== "function") throw new Error; + return function() { + set(this, id).ease = value; + }; +} + +/* harmony default export */ var ease = (function(value) { + var id = this._id; + + return arguments.length + ? this.each(easeConstant(id, value)) + : get(this.node(), id).ease; +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/filter.js + + + +/* harmony default export */ var filter = (function(match) { + if (typeof match !== "function") match = Object(d3_selection["matcher"])(match); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { + if ((node = group[i]) && match.call(node, node.__data__, i, group)) { + subgroup.push(node); + } + } + } + + return new Transition(subgroups, this._parents, this._name, this._id); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/merge.js + + +/* harmony default export */ var transition_merge = (function(transition) { + if (transition._id !== this._id) throw new Error; + + for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { + for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { + if (node = group0[i] || group1[i]) { + merge[i] = node; + } + } + } + + for (; j < m0; ++j) { + merges[j] = groups0[j]; + } + + return new Transition(merges, this._parents, this._name, this._id); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/on.js + + +function on_start(name) { + return (name + "").trim().split(/^|\s+/).every(function(t) { + var i = t.indexOf("."); + if (i >= 0) t = t.slice(0, i); + return !t || t === "start"; + }); +} + +function onFunction(id, name, listener) { + var on0, on1, sit = on_start(name) ? init : set; + return function() { + var schedule = sit(this, id), + on = schedule.on; + + // If this node shared a dispatch with the previous node, + // just assign the updated shared dispatch and we’re done! + // Otherwise, copy-on-write. + if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); + + schedule.on = on1; + }; +} + +/* harmony default export */ var on = (function(name, listener) { + var id = this._id; + + return arguments.length < 2 + ? get(this.node(), id).on.on(name) + : this.each(onFunction(id, name, listener)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/remove.js +function removeFunction(id) { + return function() { + var parent = this.parentNode; + for (var i in this.__transition) if (+i !== id) return; + if (parent) parent.removeChild(this); + }; +} + +/* harmony default export */ var remove = (function() { + return this.on("end.remove", removeFunction(this._id)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/select.js + + + + +/* harmony default export */ var transition_select = (function(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = Object(d3_selection["selector"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { + if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { + if ("__data__" in node) subnode.__data__ = node.__data__; + subgroup[i] = subnode; + transition_schedule(subgroup[i], name, id, i, subgroup, get(node, id)); + } + } + } + + return new Transition(subgroups, this._parents, name, id); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/selectAll.js + + + + +/* harmony default export */ var selectAll = (function(select) { + var name = this._name, + id = this._id; + + if (typeof select !== "function") select = Object(d3_selection["selectorAll"])(select); + + for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) { + if (child = children[k]) { + transition_schedule(child, name, id, k, children, inherit); + } + } + subgroups.push(children); + parents.push(node); + } + } + } + + return new Transition(subgroups, parents, name, id); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/selection.js + + +var Selection = d3_selection["selection"].prototype.constructor; + +/* harmony default export */ var selection = (function() { + return new Selection(this._groups, this._parents); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/style.js + + + + + +function styleRemove(name, interpolate) { + var value00, + value10, + interpolate0; + return function() { + var value0 = Object(d3_selection["style"])(this, name), + value1 = (this.style.removeProperty(name), Object(d3_selection["style"])(this, name)); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +function styleRemoveEnd(name) { + return function() { + this.style.removeProperty(name); + }; +} + +function styleConstant(name, interpolate, value1) { + var value00, + interpolate0; + return function() { + var value0 = Object(d3_selection["style"])(this, name); + return value0 === value1 ? null + : value0 === value00 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value1); + }; +} + +function styleFunction(name, interpolate, value) { + var value00, + value10, + interpolate0; + return function() { + var value0 = Object(d3_selection["style"])(this, name), + value1 = value(this); + if (value1 == null) value1 = (this.style.removeProperty(name), Object(d3_selection["style"])(this, name)); + return value0 === value1 ? null + : value0 === value00 && value1 === value10 ? interpolate0 + : interpolate0 = interpolate(value00 = value0, value10 = value1); + }; +} + +/* harmony default export */ var style = (function(name, value, priority) { + var i = (name += "") === "transform" ? d3_interpolate["interpolateTransformCss"] : transition_interpolate; + return value == null ? this + .styleTween(name, styleRemove(name, i)) + .on("end.style." + name, styleRemoveEnd(name)) + : this.styleTween(name, typeof value === "function" + ? styleFunction(name, i, tweenValue(this, "style." + name, value)) + : styleConstant(name, i, value + ""), priority); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/styleTween.js +function styleTween(name, value, priority) { + function tween() { + var node = this, i = value.apply(node, arguments); + return i && function(t) { + node.style.setProperty(name, i(t), priority); + }; + } + tween._value = value; + return tween; +} + +/* harmony default export */ var transition_styleTween = (function(name, value, priority) { + var key = "style." + (name += ""); + if (arguments.length < 2) return (key = this.tween(key)) && key._value; + if (value == null) return this.tween(key, null); + if (typeof value !== "function") throw new Error; + return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/text.js + + +function textConstant(value) { + return function() { + this.textContent = value; + }; +} + +function textFunction(value) { + return function() { + var value1 = value(this); + this.textContent = value1 == null ? "" : value1; + }; +} + +/* harmony default export */ var transition_text = (function(value) { + return this.tween("text", typeof value === "function" + ? textFunction(tweenValue(this, "text", value)) + : textConstant(value == null ? "" : value + "")); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/transition.js + + + +/* harmony default export */ var transition_transition = (function() { + var name = this._name, + id0 = this._id, + id1 = newId(); + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + var inherit = get(node, id0); + transition_schedule(node, name, id1, i, group, { + time: inherit.time + inherit.delay + inherit.duration, + delay: 0, + duration: inherit.duration, + ease: inherit.ease + }); + } + } + } + + return new Transition(groups, this._parents, name, id1); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/index.js + + + + + + + + + + + + + + + + + + + +var transition_id = 0; + +function Transition(groups, parents, name, id) { + this._groups = groups; + this._parents = parents; + this._name = name; + this._id = id; +} + +function src_transition_transition(name) { + return Object(d3_selection["selection"])().transition(name); +} + +function newId() { + return ++transition_id; +} + +var selection_prototype = d3_selection["selection"].prototype; + +Transition.prototype = src_transition_transition.prototype = { + constructor: Transition, + select: transition_select, + selectAll: selectAll, + filter: filter, + merge: transition_merge, + selection: selection, + transition: transition_transition, + call: selection_prototype.call, + nodes: selection_prototype.nodes, + node: selection_prototype.node, + size: selection_prototype.size, + empty: selection_prototype.empty, + each: selection_prototype.each, + on: on, + attr: attr, + attrTween: transition_attrTween, + style: style, + styleTween: transition_styleTween, + text: transition_text, + remove: remove, + tween: transition_tween, + delay: transition_delay, + duration: duration, + ease: ease +}; + +// EXTERNAL MODULE: ./node_modules/d3-ease/index.js + 10 modules +var d3_ease = __webpack_require__(70); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/transition.js + + + + + +var defaultTiming = { + time: null, // Set on use. + delay: 0, + duration: 250, + ease: d3_ease["easeCubicInOut"] +}; + +function transition_inherit(node, id) { + var timing; + while (!(timing = node.__transition) || !(timing = timing[id])) { + if (!(node = node.parentNode)) { + return defaultTiming.time = now(), defaultTiming; + } + } + return timing; +} + +/* harmony default export */ var selection_transition = (function(name) { + var id, + timing; + + if (name instanceof Transition) { + id = name._id, name = name._name; + } else { + id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; + } + + for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { + for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { + if (node = group[i]) { + transition_schedule(node, name, id, i, group, timing || transition_inherit(node, id)); + } + } + } + + return new Transition(groups, this._parents, name, id); +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/index.js + + + + +d3_selection["selection"].prototype.interrupt = selection_interrupt; +d3_selection["selection"].prototype.transition = selection_transition; + +// CONCATENATED MODULE: ./node_modules/d3-transition/src/active.js + + + +var root = [null]; + +/* harmony default export */ var src_active = (function(node, name) { + var schedules = node.__transition, + schedule, + i; + + if (schedules) { + name = name == null ? null : name + ""; + for (i in schedules) { + if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) { + return new Transition([[node]], root, name, +i); + } + } + } + + return null; +}); + +// CONCATENATED MODULE: ./node_modules/d3-transition/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "transition", function() { return src_transition_transition; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "active", function() { return src_active; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interrupt", function() { return interrupt; }); + + + + + + +/***/ }), +/* 68 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-color/index.js + 5 modules +var d3_color = __webpack_require__(73); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basis.js +function basis(t1, v0, v1, v2, v3) { + var t2 = t1 * t1, t3 = t2 * t1; + return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + + (4 - 6 * t2 + 3 * t3) * v1 + + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + + t3 * v3) / 6; +} + +/* harmony default export */ var src_basis = (function(values) { + var n = values.length - 1; + return function(t) { + var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), + v1 = values[i], + v2 = values[i + 1], + v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, + v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/basisClosed.js + + +/* harmony default export */ var basisClosed = (function(values) { + var n = values.length; + return function(t) { + var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), + v0 = values[(i + n - 1) % n], + v1 = values[i % n], + v2 = values[(i + 1) % n], + v3 = values[(i + 2) % n]; + return basis((t - i / n) * n, v0, v1, v2, v3); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/color.js + + +function linear(a, d) { + return function(t) { + return a + t * d; + }; +} + +function exponential(a, b, y) { + return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { + return Math.pow(a + t * b, y); + }; +} + +function color_hue(a, b) { + var d = b - a; + return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); +} + +function gamma(y) { + return (y = +y) === 1 ? nogamma : function(a, b) { + return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); + }; +} + +function nogamma(a, b) { + var d = b - a; + return d ? linear(a, d) : constant(isNaN(a) ? b : a); +} + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/rgb.js + + + + + +/* harmony default export */ var src_rgb = ((function rgbGamma(y) { + var color = gamma(y); + + function rgb(start, end) { + var r = color((start = Object(d3_color["rgb"])(start)).r, (end = Object(d3_color["rgb"])(end)).r), + g = color(start.g, end.g), + b = color(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.r = r(t); + start.g = g(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; + } + + rgb.gamma = rgbGamma; + + return rgb; +})(1)); + +function rgbSpline(spline) { + return function(colors) { + var n = colors.length, + r = new Array(n), + g = new Array(n), + b = new Array(n), + i, color; + for (i = 0; i < n; ++i) { + color = Object(d3_color["rgb"])(colors[i]); + r[i] = color.r || 0; + g[i] = color.g || 0; + b[i] = color.b || 0; + } + r = spline(r); + g = spline(g); + b = spline(b); + color.opacity = 1; + return function(t) { + color.r = r(t); + color.g = g(t); + color.b = b(t); + return color + ""; + }; + }; +} + +var rgbBasis = rgbSpline(src_basis); +var rgbBasisClosed = rgbSpline(basisClosed); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/array.js + + +/* harmony default export */ var array = (function(a, b) { + var nb = b ? b.length : 0, + na = a ? Math.min(nb, a.length) : 0, + x = new Array(na), + c = new Array(nb), + i; + + for (i = 0; i < na; ++i) x[i] = src_value(a[i], b[i]); + for (; i < nb; ++i) c[i] = b[i]; + + return function(t) { + for (i = 0; i < na; ++i) c[i] = x[i](t); + return c; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/date.js +/* harmony default export */ var date = (function(a, b) { + var d = new Date; + return a = +a, b -= a, function(t) { + return d.setTime(a + b * t), d; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/number.js +/* harmony default export */ var number = (function(a, b) { + return a = +a, b -= a, function(t) { + return a + b * t; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/object.js + + +/* harmony default export */ var object = (function(a, b) { + var i = {}, + c = {}, + k; + + if (a === null || typeof a !== "object") a = {}; + if (b === null || typeof b !== "object") b = {}; + + for (k in b) { + if (k in a) { + i[k] = src_value(a[k], b[k]); + } else { + c[k] = b[k]; + } + } + + return function(t) { + for (k in i) c[k] = i[k](t); + return c; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/string.js + + +var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, + reB = new RegExp(reA.source, "g"); + +function zero(b) { + return function() { + return b; + }; +} + +function one(b) { + return function(t) { + return b(t) + ""; + }; +} + +/* harmony default export */ var string = (function(a, b) { + var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b + am, // current match in a + bm, // current match in b + bs, // string preceding current number in b, if any + i = -1, // index in s + s = [], // string constants and placeholders + q = []; // number interpolators + + // Coerce inputs to strings. + a = a + "", b = b + ""; + + // Interpolate pairs of numbers in a & b. + while ((am = reA.exec(a)) + && (bm = reB.exec(b))) { + if ((bs = bm.index) > bi) { // a string precedes the next number in b + bs = b.slice(bi, bs); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match + if (s[i]) s[i] += bm; // coalesce with previous string + else s[++i] = bm; + } else { // interpolate non-matching numbers + s[++i] = null; + q.push({i: i, x: number(am, bm)}); + } + bi = reB.lastIndex; + } + + // Add remains of b. + if (bi < b.length) { + bs = b.slice(bi); + if (s[i]) s[i] += bs; // coalesce with previous string + else s[++i] = bs; + } + + // Special optimization for only a single match. + // Otherwise, interpolate each of the numbers and rejoin the string. + return s.length < 2 ? (q[0] + ? one(q[0].x) + : zero(b)) + : (b = q.length, function(t) { + for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }); +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/value.js + + + + + + + + + +/* harmony default export */ var src_value = (function(a, b) { + var t = typeof b, c; + return b == null || t === "boolean" ? constant(b) + : (t === "number" ? number + : t === "string" ? ((c = Object(d3_color["color"])(b)) ? (b = c, src_rgb) : string) + : b instanceof d3_color["color"] ? src_rgb + : b instanceof Date ? date + : Array.isArray(b) ? array + : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object + : number)(a, b); +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/round.js +/* harmony default export */ var round = (function(a, b) { + return a = +a, b -= a, function(t) { + return Math.round(a + b * t); + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/decompose.js +var degrees = 180 / Math.PI; + +var identity = { + translateX: 0, + translateY: 0, + rotate: 0, + skewX: 0, + scaleX: 1, + scaleY: 1 +}; + +/* harmony default export */ var decompose = (function(a, b, c, d, e, f) { + var scaleX, scaleY, skewX; + if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; + if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; + if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; + if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; + return { + translateX: e, + translateY: f, + rotate: Math.atan2(b, a) * degrees, + skewX: Math.atan(skewX) * degrees, + scaleX: scaleX, + scaleY: scaleY + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/parse.js + + +var cssNode, + cssRoot, + cssView, + svgNode; + +function parseCss(value) { + if (value === "none") return identity; + if (!cssNode) cssNode = document.createElement("DIV"), cssRoot = document.documentElement, cssView = document.defaultView; + cssNode.style.transform = value; + value = cssView.getComputedStyle(cssRoot.appendChild(cssNode), null).getPropertyValue("transform"); + cssRoot.removeChild(cssNode); + value = value.slice(7, -1).split(","); + return decompose(+value[0], +value[1], +value[2], +value[3], +value[4], +value[5]); +} + +function parseSvg(value) { + if (value == null) return identity; + if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); + svgNode.setAttribute("transform", value); + if (!(value = svgNode.transform.baseVal.consolidate())) return identity; + value = value.matrix; + return decompose(value.a, value.b, value.c, value.d, value.e, value.f); +} + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/transform/index.js + + + +function interpolateTransform(parse, pxComma, pxParen, degParen) { + + function pop(s) { + return s.length ? s.pop() + " " : ""; + } + + function translate(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push("translate(", null, pxComma, null, pxParen); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb || yb) { + s.push("translate(" + xb + pxComma + yb + pxParen); + } + } + + function rotate(a, b, s, q) { + if (a !== b) { + if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path + q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "rotate(" + b + degParen); + } + } + + function skewX(a, b, s, q) { + if (a !== b) { + q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); + } else if (b) { + s.push(pop(s) + "skewX(" + b + degParen); + } + } + + function scale(xa, ya, xb, yb, s, q) { + if (xa !== xb || ya !== yb) { + var i = s.push(pop(s) + "scale(", null, ",", null, ")"); + q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); + } else if (xb !== 1 || yb !== 1) { + s.push(pop(s) + "scale(" + xb + "," + yb + ")"); + } + } + + return function(a, b) { + var s = [], // string constants and placeholders + q = []; // number interpolators + a = parse(a), b = parse(b); + translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); + rotate(a.rotate, b.rotate, s, q); + skewX(a.skewX, b.skewX, s, q); + scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); + a = b = null; // gc + return function(t) { + var i = -1, n = q.length, o; + while (++i < n) s[(o = q[i]).i] = o.x(t); + return s.join(""); + }; + }; +} + +var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); +var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/zoom.js +var rho = Math.SQRT2, + rho2 = 2, + rho4 = 4, + epsilon2 = 1e-12; + +function cosh(x) { + return ((x = Math.exp(x)) + 1 / x) / 2; +} + +function sinh(x) { + return ((x = Math.exp(x)) - 1 / x) / 2; +} + +function tanh(x) { + return ((x = Math.exp(2 * x)) - 1) / (x + 1); +} + +// p0 = [ux0, uy0, w0] +// p1 = [ux1, uy1, w1] +/* harmony default export */ var zoom = (function(p0, p1) { + var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], + ux1 = p1[0], uy1 = p1[1], w1 = p1[2], + dx = ux1 - ux0, + dy = uy1 - uy0, + d2 = dx * dx + dy * dy, + i, + S; + + // Special case for u0 ≅ u1. + if (d2 < epsilon2) { + S = Math.log(w1 / w0) / rho; + i = function(t) { + return [ + ux0 + t * dx, + uy0 + t * dy, + w0 * Math.exp(rho * t * S) + ]; + } + } + + // General case. + else { + var d1 = Math.sqrt(d2), + b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), + b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), + r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), + r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); + S = (r1 - r0) / rho; + i = function(t) { + var s = t * S, + coshr0 = cosh(r0), + u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); + return [ + ux0 + u * dx, + uy0 + u * dy, + w0 * coshr0 / cosh(rho * s + r0) + ]; + } + } + + i.duration = S * 1000; + + return i; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/hsl.js + + + +function hsl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color["hsl"])(start)).h, (end = Object(d3_color["hsl"])(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +/* harmony default export */ var src_hsl = (hsl(color_hue)); +var hslLong = hsl(nogamma); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/lab.js + + + +function lab(start, end) { + var l = nogamma((start = Object(d3_color["lab"])(start)).l, (end = Object(d3_color["lab"])(end)).l), + a = nogamma(start.a, end.a), + b = nogamma(start.b, end.b), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.l = l(t); + start.a = a(t); + start.b = b(t); + start.opacity = opacity(t); + return start + ""; + }; +} + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/hcl.js + + + +function hcl(hue) { + return function(start, end) { + var h = hue((start = Object(d3_color["hcl"])(start)).h, (end = Object(d3_color["hcl"])(end)).h), + c = nogamma(start.c, end.c), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.c = c(t); + start.l = l(t); + start.opacity = opacity(t); + return start + ""; + }; + } +} + +/* harmony default export */ var src_hcl = (hcl(color_hue)); +var hclLong = hcl(nogamma); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/cubehelix.js + + + +function cubehelix_cubehelix(hue) { + return (function cubehelixGamma(y) { + y = +y; + + function cubehelix(start, end) { + var h = hue((start = Object(d3_color["cubehelix"])(start)).h, (end = Object(d3_color["cubehelix"])(end)).h), + s = nogamma(start.s, end.s), + l = nogamma(start.l, end.l), + opacity = nogamma(start.opacity, end.opacity); + return function(t) { + start.h = h(t); + start.s = s(t); + start.l = l(Math.pow(t, y)); + start.opacity = opacity(t); + return start + ""; + }; + } + + cubehelix.gamma = cubehelixGamma; + + return cubehelix; + })(1); +} + +/* harmony default export */ var src_cubehelix = (cubehelix_cubehelix(color_hue)); +var cubehelixLong = cubehelix_cubehelix(nogamma); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/piecewise.js +function piecewise(interpolate, values) { + var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); + while (i < n) I[i] = interpolate(v, v = values[++i]); + return function(t) { + var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); + return I[i](t - i); + }; +} + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/quantize.js +/* harmony default export */ var quantize = (function(interpolator, n) { + var samples = new Array(n); + for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); + return samples; +}); + +// CONCATENATED MODULE: ./node_modules/d3-interpolate/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolate", function() { return src_value; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateArray", function() { return array; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateBasis", function() { return src_basis; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateBasisClosed", function() { return basisClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateDate", function() { return date; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateNumber", function() { return number; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateObject", function() { return object; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateRound", function() { return round; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateString", function() { return string; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateTransformCss", function() { return interpolateTransformCss; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateTransformSvg", function() { return interpolateTransformSvg; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateZoom", function() { return zoom; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateRgb", function() { return src_rgb; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateRgbBasis", function() { return rgbBasis; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateRgbBasisClosed", function() { return rgbBasisClosed; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateHsl", function() { return src_hsl; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateHslLong", function() { return hslLong; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateLab", function() { return lab; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateHcl", function() { return src_hcl; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateHclLong", function() { return hclLong; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateCubehelix", function() { return src_cubehelix; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "interpolateCubehelixLong", function() { return cubehelixLong; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "piecewise", function() { return piecewise; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "quantize", function() { return quantize; }); + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 69 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/interval.js +var t0 = new Date, + t1 = new Date; + +function newInterval(floori, offseti, count, field) { + + function interval(date) { + return floori(date = new Date(+date)), date; + } + + interval.floor = interval; + + interval.ceil = function(date) { + return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; + }; + + interval.round = function(date) { + var d0 = interval(date), + d1 = interval.ceil(date); + return date - d0 < d1 - date ? d0 : d1; + }; + + interval.offset = function(date, step) { + return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; + }; + + interval.range = function(start, stop, step) { + var range = [], previous; + start = interval.ceil(start); + step = step == null ? 1 : Math.floor(step); + if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + do range.push(previous = new Date(+start)), offseti(start, step), floori(start); + while (previous < start && start < stop); + return range; + }; + + interval.filter = function(test) { + return newInterval(function(date) { + if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); + }, function(date, step) { + if (date >= date) { + if (step < 0) while (++step <= 0) { + while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty + } else while (--step >= 0) { + while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty + } + } + }); + }; + + if (count) { + interval.count = function(start, end) { + t0.setTime(+start), t1.setTime(+end); + floori(t0), floori(t1); + return Math.floor(count(t0, t1)); + }; + + interval.every = function(step) { + step = Math.floor(step); + return !isFinite(step) || !(step > 0) ? null + : !(step > 1) ? interval + : interval.filter(field + ? function(d) { return field(d) % step === 0; } + : function(d) { return interval.count(0, d) % step === 0; }); + }; + } + + return interval; +} + +// CONCATENATED MODULE: ./node_modules/d3-time/src/millisecond.js + + +var millisecond = newInterval(function() { + // noop +}, function(date, step) { + date.setTime(+date + step); +}, function(start, end) { + return end - start; +}); + +// An optimized implementation for this simple case. +millisecond.every = function(k) { + k = Math.floor(k); + if (!isFinite(k) || !(k > 0)) return null; + if (!(k > 1)) return millisecond; + return newInterval(function(date) { + date.setTime(Math.floor(date / k) * k); + }, function(date, step) { + date.setTime(+date + step * k); + }, function(start, end) { + return (end - start) / k; + }); +}; + +/* harmony default export */ var src_millisecond = (millisecond); +var milliseconds = millisecond.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/duration.js +var durationSecond = 1e3; +var durationMinute = 6e4; +var durationHour = 36e5; +var durationDay = 864e5; +var durationWeek = 6048e5; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/second.js + + + +var second = newInterval(function(date) { + date.setTime(Math.floor(date / durationSecond) * durationSecond); +}, function(date, step) { + date.setTime(+date + step * durationSecond); +}, function(start, end) { + return (end - start) / durationSecond; +}, function(date) { + return date.getUTCSeconds(); +}); + +/* harmony default export */ var src_second = (second); +var seconds = second.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/minute.js + + + +var minute = newInterval(function(date) { + date.setTime(Math.floor(date / durationMinute) * durationMinute); +}, function(date, step) { + date.setTime(+date + step * durationMinute); +}, function(start, end) { + return (end - start) / durationMinute; +}, function(date) { + return date.getMinutes(); +}); + +/* harmony default export */ var src_minute = (minute); +var minutes = minute.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/hour.js + + + +var hour = newInterval(function(date) { + var offset = date.getTimezoneOffset() * durationMinute % durationHour; + if (offset < 0) offset += durationHour; + date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset); +}, function(date, step) { + date.setTime(+date + step * durationHour); +}, function(start, end) { + return (end - start) / durationHour; +}, function(date) { + return date.getHours(); +}); + +/* harmony default export */ var src_hour = (hour); +var hours = hour.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/day.js + + + +var day = newInterval(function(date) { + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setDate(date.getDate() + step); +}, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay; +}, function(date) { + return date.getDate() - 1; +}); + +/* harmony default export */ var src_day = (day); +var days = day.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/week.js + + + +function weekday(i) { + return newInterval(function(date) { + date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setDate(date.getDate() + step * 7); + }, function(start, end) { + return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; + }); +} + +var sunday = weekday(0); +var monday = weekday(1); +var tuesday = weekday(2); +var wednesday = weekday(3); +var thursday = weekday(4); +var friday = weekday(5); +var saturday = weekday(6); + +var sundays = sunday.range; +var mondays = monday.range; +var tuesdays = tuesday.range; +var wednesdays = wednesday.range; +var thursdays = thursday.range; +var fridays = friday.range; +var saturdays = saturday.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/month.js + + +var month = newInterval(function(date) { + date.setDate(1); + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setMonth(date.getMonth() + step); +}, function(start, end) { + return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; +}, function(date) { + return date.getMonth(); +}); + +/* harmony default export */ var src_month = (month); +var months = month.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/year.js + + +var year = newInterval(function(date) { + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); +}, function(date, step) { + date.setFullYear(date.getFullYear() + step); +}, function(start, end) { + return end.getFullYear() - start.getFullYear(); +}, function(date) { + return date.getFullYear(); +}); + +// An optimized implementation for this simple case. +year.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setFullYear(Math.floor(date.getFullYear() / k) * k); + date.setMonth(0, 1); + date.setHours(0, 0, 0, 0); + }, function(date, step) { + date.setFullYear(date.getFullYear() + step * k); + }); +}; + +/* harmony default export */ var src_year = (year); +var years = year.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMinute.js + + + +var utcMinute = newInterval(function(date) { + date.setUTCSeconds(0, 0); +}, function(date, step) { + date.setTime(+date + step * durationMinute); +}, function(start, end) { + return (end - start) / durationMinute; +}, function(date) { + return date.getUTCMinutes(); +}); + +/* harmony default export */ var src_utcMinute = (utcMinute); +var utcMinutes = utcMinute.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcHour.js + + + +var utcHour = newInterval(function(date) { + date.setUTCMinutes(0, 0, 0); +}, function(date, step) { + date.setTime(+date + step * durationHour); +}, function(start, end) { + return (end - start) / durationHour; +}, function(date) { + return date.getUTCHours(); +}); + +/* harmony default export */ var src_utcHour = (utcHour); +var utcHours = utcHour.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcDay.js + + + +var utcDay = newInterval(function(date) { + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCDate(date.getUTCDate() + step); +}, function(start, end) { + return (end - start) / durationDay; +}, function(date) { + return date.getUTCDate() - 1; +}); + +/* harmony default export */ var src_utcDay = (utcDay); +var utcDays = utcDay.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcWeek.js + + + +function utcWeekday(i) { + return newInterval(function(date) { + date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCDate(date.getUTCDate() + step * 7); + }, function(start, end) { + return (end - start) / durationWeek; + }); +} + +var utcSunday = utcWeekday(0); +var utcMonday = utcWeekday(1); +var utcTuesday = utcWeekday(2); +var utcWednesday = utcWeekday(3); +var utcThursday = utcWeekday(4); +var utcFriday = utcWeekday(5); +var utcSaturday = utcWeekday(6); + +var utcSundays = utcSunday.range; +var utcMondays = utcMonday.range; +var utcTuesdays = utcTuesday.range; +var utcWednesdays = utcWednesday.range; +var utcThursdays = utcThursday.range; +var utcFridays = utcFriday.range; +var utcSaturdays = utcSaturday.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcMonth.js + + +var utcMonth = newInterval(function(date) { + date.setUTCDate(1); + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCMonth(date.getUTCMonth() + step); +}, function(start, end) { + return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; +}, function(date) { + return date.getUTCMonth(); +}); + +/* harmony default export */ var src_utcMonth = (utcMonth); +var utcMonths = utcMonth.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/src/utcYear.js + + +var utcYear = newInterval(function(date) { + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); +}, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step); +}, function(start, end) { + return end.getUTCFullYear() - start.getUTCFullYear(); +}, function(date) { + return date.getUTCFullYear(); +}); + +// An optimized implementation for this simple case. +utcYear.every = function(k) { + return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { + date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); + date.setUTCMonth(0, 1); + date.setUTCHours(0, 0, 0, 0); + }, function(date, step) { + date.setUTCFullYear(date.getUTCFullYear() + step * k); + }); +}; + +/* harmony default export */ var src_utcYear = (utcYear); +var utcYears = utcYear.range; + +// CONCATENATED MODULE: ./node_modules/d3-time/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeInterval", function() { return newInterval; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMillisecond", function() { return src_millisecond; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMilliseconds", function() { return milliseconds; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMillisecond", function() { return src_millisecond; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMilliseconds", function() { return milliseconds; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSecond", function() { return src_second; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSeconds", function() { return seconds; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSecond", function() { return src_second; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSeconds", function() { return seconds; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMinute", function() { return src_minute; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMinutes", function() { return minutes; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeHour", function() { return src_hour; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeHours", function() { return hours; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeDay", function() { return src_day; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeDays", function() { return days; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeWeek", function() { return sunday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeWeeks", function() { return sundays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSunday", function() { return sunday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSundays", function() { return sundays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMonday", function() { return monday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMondays", function() { return mondays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeTuesday", function() { return tuesday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeTuesdays", function() { return tuesdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeWednesday", function() { return wednesday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeWednesdays", function() { return wednesdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeThursday", function() { return thursday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeThursdays", function() { return thursdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeFriday", function() { return friday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeFridays", function() { return fridays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSaturday", function() { return saturday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeSaturdays", function() { return saturdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMonth", function() { return src_month; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeMonths", function() { return months; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeYear", function() { return src_year; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeYears", function() { return years; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMinute", function() { return src_utcMinute; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMinutes", function() { return utcMinutes; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcHour", function() { return src_utcHour; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcHours", function() { return utcHours; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcDay", function() { return src_utcDay; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcDays", function() { return utcDays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcWeek", function() { return utcSunday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcWeeks", function() { return utcSundays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSunday", function() { return utcSunday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSundays", function() { return utcSundays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMonday", function() { return utcMonday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMondays", function() { return utcMondays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcTuesday", function() { return utcTuesday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcTuesdays", function() { return utcTuesdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcWednesday", function() { return utcWednesday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcWednesdays", function() { return utcWednesdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcThursday", function() { return utcThursday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcThursdays", function() { return utcThursdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcFriday", function() { return utcFriday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcFridays", function() { return utcFridays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSaturday", function() { return utcSaturday; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcSaturdays", function() { return utcSaturdays; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMonth", function() { return src_utcMonth; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcMonths", function() { return utcMonths; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcYear", function() { return src_utcYear; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcYears", function() { return utcYears; }); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 70 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/linear.js +function linear(t) { + return +t; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/quad.js +function quadIn(t) { + return t * t; +} + +function quadOut(t) { + return t * (2 - t); +} + +function quadInOut(t) { + return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/cubic.js +function cubicIn(t) { + return t * t * t; +} + +function cubicOut(t) { + return --t * t * t + 1; +} + +function cubicInOut(t) { + return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/poly.js +var exponent = 3; + +var polyIn = (function custom(e) { + e = +e; + + function polyIn(t) { + return Math.pow(t, e); + } + + polyIn.exponent = custom; + + return polyIn; +})(exponent); + +var polyOut = (function custom(e) { + e = +e; + + function polyOut(t) { + return 1 - Math.pow(1 - t, e); + } + + polyOut.exponent = custom; + + return polyOut; +})(exponent); + +var polyInOut = (function custom(e) { + e = +e; + + function polyInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; + } + + polyInOut.exponent = custom; + + return polyInOut; +})(exponent); + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/sin.js +var pi = Math.PI, + halfPi = pi / 2; + +function sinIn(t) { + return 1 - Math.cos(t * halfPi); +} + +function sinOut(t) { + return Math.sin(t * halfPi); +} + +function sinInOut(t) { + return (1 - Math.cos(pi * t)) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/exp.js +function expIn(t) { + return Math.pow(2, 10 * t - 10); +} + +function expOut(t) { + return 1 - Math.pow(2, -10 * t); +} + +function expInOut(t) { + return ((t *= 2) <= 1 ? Math.pow(2, 10 * t - 10) : 2 - Math.pow(2, 10 - 10 * t)) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/circle.js +function circleIn(t) { + return 1 - Math.sqrt(1 - t * t); +} + +function circleOut(t) { + return Math.sqrt(1 - --t * t); +} + +function circleInOut(t) { + return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/bounce.js +var b1 = 4 / 11, + b2 = 6 / 11, + b3 = 8 / 11, + b4 = 3 / 4, + b5 = 9 / 11, + b6 = 10 / 11, + b7 = 15 / 16, + b8 = 21 / 22, + b9 = 63 / 64, + b0 = 1 / b1 / b1; + +function bounceIn(t) { + return 1 - bounceOut(1 - t); +} + +function bounceOut(t) { + return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; +} + +function bounceInOut(t) { + return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; +} + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/back.js +var overshoot = 1.70158; + +var backIn = (function custom(s) { + s = +s; + + function backIn(t) { + return t * t * ((s + 1) * t - s); + } + + backIn.overshoot = custom; + + return backIn; +})(overshoot); + +var backOut = (function custom(s) { + s = +s; + + function backOut(t) { + return --t * t * ((s + 1) * t + s) + 1; + } + + backOut.overshoot = custom; + + return backOut; +})(overshoot); + +var backInOut = (function custom(s) { + s = +s; + + function backInOut(t) { + return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; + } + + backInOut.overshoot = custom; + + return backInOut; +})(overshoot); + +// CONCATENATED MODULE: ./node_modules/d3-ease/src/elastic.js +var tau = 2 * Math.PI, + amplitude = 1, + period = 0.3; + +var elasticIn = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticIn(t) { + return a * Math.pow(2, 10 * --t) * Math.sin((s - t) / p); + } + + elasticIn.amplitude = function(a) { return custom(a, p * tau); }; + elasticIn.period = function(p) { return custom(a, p); }; + + return elasticIn; +})(amplitude, period); + +var elasticOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticOut(t) { + return 1 - a * Math.pow(2, -10 * (t = +t)) * Math.sin((t + s) / p); + } + + elasticOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticOut.period = function(p) { return custom(a, p); }; + + return elasticOut; +})(amplitude, period); + +var elasticInOut = (function custom(a, p) { + var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); + + function elasticInOut(t) { + return ((t = t * 2 - 1) < 0 + ? a * Math.pow(2, 10 * t) * Math.sin((s - t) / p) + : 2 - a * Math.pow(2, -10 * t) * Math.sin((s + t) / p)) / 2; + } + + elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; + elasticInOut.period = function(p) { return custom(a, p); }; + + return elasticInOut; +})(amplitude, period); + +// CONCATENATED MODULE: ./node_modules/d3-ease/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeLinear", function() { return linear; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeQuad", function() { return quadInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeQuadIn", function() { return quadIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeQuadOut", function() { return quadOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeQuadInOut", function() { return quadInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCubic", function() { return cubicInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCubicIn", function() { return cubicIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCubicOut", function() { return cubicOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCubicInOut", function() { return cubicInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easePoly", function() { return polyInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easePolyIn", function() { return polyIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easePolyOut", function() { return polyOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easePolyInOut", function() { return polyInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeSin", function() { return sinInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeSinIn", function() { return sinIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeSinOut", function() { return sinOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeSinInOut", function() { return sinInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeExp", function() { return expInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeExpIn", function() { return expIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeExpOut", function() { return expOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeExpInOut", function() { return expInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCircle", function() { return circleInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCircleIn", function() { return circleIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCircleOut", function() { return circleOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeCircleInOut", function() { return circleInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBounce", function() { return bounceOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBounceIn", function() { return bounceIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBounceOut", function() { return bounceOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBounceInOut", function() { return bounceInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBack", function() { return backInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBackIn", function() { return backIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBackOut", function() { return backOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeBackInOut", function() { return backInOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeElastic", function() { return elasticOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeElasticIn", function() { return elasticIn; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeElasticOut", function() { return elasticOut; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "easeElasticInOut", function() { return elasticInOut; }); + + + + + + + + + + + + + + + + + + + + + +/***/ }), +/* 71 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/map.js +var prefix = "$"; + +function Map() {} + +Map.prototype = map.prototype = { + constructor: Map, + has: function(key) { + return (prefix + key) in this; + }, + get: function(key) { + return this[prefix + key]; + }, + set: function(key, value) { + this[prefix + key] = value; + return this; + }, + remove: function(key) { + var property = prefix + key; + return property in this && delete this[property]; + }, + clear: function() { + for (var property in this) if (property[0] === prefix) delete this[property]; + }, + keys: function() { + var keys = []; + for (var property in this) if (property[0] === prefix) keys.push(property.slice(1)); + return keys; + }, + values: function() { + var values = []; + for (var property in this) if (property[0] === prefix) values.push(this[property]); + return values; + }, + entries: function() { + var entries = []; + for (var property in this) if (property[0] === prefix) entries.push({key: property.slice(1), value: this[property]}); + return entries; + }, + size: function() { + var size = 0; + for (var property in this) if (property[0] === prefix) ++size; + return size; + }, + empty: function() { + for (var property in this) if (property[0] === prefix) return false; + return true; + }, + each: function(f) { + for (var property in this) if (property[0] === prefix) f(this[property], property.slice(1), this); + } +}; + +function map(object, f) { + var map = new Map; + + // Copy constructor. + if (object instanceof Map) object.each(function(value, key) { map.set(key, value); }); + + // Index array by numeric index or specified key function. + else if (Array.isArray(object)) { + var i = -1, + n = object.length, + o; + + if (f == null) while (++i < n) map.set(i, object[i]); + else while (++i < n) map.set(f(o = object[i], i, object), o); + } + + // Convert object to map. + else if (object) for (var key in object) map.set(key, object[key]); + + return map; +} + +/* harmony default export */ var src_map = (map); + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/nest.js + + +/* harmony default export */ var src_nest = (function() { + var keys = [], + sortKeys = [], + sortValues, + rollup, + nest; + + function apply(array, depth, createResult, setResult) { + if (depth >= keys.length) { + if (sortValues != null) array.sort(sortValues); + return rollup != null ? rollup(array) : array; + } + + var i = -1, + n = array.length, + key = keys[depth++], + keyValue, + value, + valuesByKey = src_map(), + values, + result = createResult(); + + while (++i < n) { + if (values = valuesByKey.get(keyValue = key(value = array[i]) + "")) { + values.push(value); + } else { + valuesByKey.set(keyValue, [value]); + } + } + + valuesByKey.each(function(values, key) { + setResult(result, key, apply(values, depth, createResult, setResult)); + }); + + return result; + } + + function entries(map, depth) { + if (++depth > keys.length) return map; + var array, sortKey = sortKeys[depth - 1]; + if (rollup != null && depth >= keys.length) array = map.entries(); + else array = [], map.each(function(v, k) { array.push({key: k, values: entries(v, depth)}); }); + return sortKey != null ? array.sort(function(a, b) { return sortKey(a.key, b.key); }) : array; + } + + return nest = { + object: function(array) { return apply(array, 0, createObject, setObject); }, + map: function(array) { return apply(array, 0, createMap, setMap); }, + entries: function(array) { return entries(apply(array, 0, createMap, setMap), 0); }, + key: function(d) { keys.push(d); return nest; }, + sortKeys: function(order) { sortKeys[keys.length - 1] = order; return nest; }, + sortValues: function(order) { sortValues = order; return nest; }, + rollup: function(f) { rollup = f; return nest; } + }; +}); + +function createObject() { + return {}; +} + +function setObject(object, key, value) { + object[key] = value; +} + +function createMap() { + return src_map(); +} + +function setMap(map, key, value) { + map.set(key, value); +} + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/set.js + + +function Set() {} + +var proto = src_map.prototype; + +Set.prototype = set.prototype = { + constructor: Set, + has: proto.has, + add: function(value) { + value += ""; + this[prefix + value] = value; + return this; + }, + remove: proto.remove, + clear: proto.clear, + values: proto.keys, + size: proto.size, + empty: proto.empty, + each: proto.each +}; + +function set(object, f) { + var set = new Set; + + // Copy constructor. + if (object instanceof Set) object.each(function(value) { set.add(value); }); + + // Otherwise, assume it’s an array. + else if (object) { + var i = -1, n = object.length; + if (f == null) while (++i < n) set.add(object[i]); + else while (++i < n) set.add(f(object[i], i, object)); + } + + return set; +} + +/* harmony default export */ var src_set = (set); + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/keys.js +/* harmony default export */ var src_keys = (function(map) { + var keys = []; + for (var key in map) keys.push(key); + return keys; +}); + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/values.js +/* harmony default export */ var src_values = (function(map) { + var values = []; + for (var key in map) values.push(map[key]); + return values; +}); + +// CONCATENATED MODULE: ./node_modules/d3-collection/src/entries.js +/* harmony default export */ var src_entries = (function(map) { + var entries = []; + for (var key in map) entries.push({key: key, value: map[key]}); + return entries; +}); + +// CONCATENATED MODULE: ./node_modules/d3-collection/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "nest", function() { return src_nest; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "set", function() { return src_set; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "map", function() { return src_map; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "keys", function() { return src_keys; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "values", function() { return src_values; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "entries", function() { return src_entries; }); + + + + + + + + +/***/ }), +/* 72 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-dispatch/index.js + 1 modules +var d3_dispatch = __webpack_require__(78); + +// EXTERNAL MODULE: ./node_modules/d3-selection/index.js + 49 modules +var d3_selection = __webpack_require__(64); + +// CONCATENATED MODULE: ./node_modules/d3-drag/src/noevent.js + + +function nopropagation() { + d3_selection["event"].stopImmediatePropagation(); +} + +/* harmony default export */ var noevent = (function() { + d3_selection["event"].preventDefault(); + d3_selection["event"].stopImmediatePropagation(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-drag/src/nodrag.js + + + +/* harmony default export */ var nodrag = (function(view) { + var root = view.document.documentElement, + selection = Object(d3_selection["select"])(view).on("dragstart.drag", noevent, true); + if ("onselectstart" in root) { + selection.on("selectstart.drag", noevent, true); + } else { + root.__noselect = root.style.MozUserSelect; + root.style.MozUserSelect = "none"; + } +}); + +function yesdrag(view, noclick) { + var root = view.document.documentElement, + selection = Object(d3_selection["select"])(view).on("dragstart.drag", null); + if (noclick) { + selection.on("click.drag", noevent, true); + setTimeout(function() { selection.on("click.drag", null); }, 0); + } + if ("onselectstart" in root) { + selection.on("selectstart.drag", null); + } else { + root.style.MozUserSelect = root.__noselect; + delete root.__noselect; + } +} + +// CONCATENATED MODULE: ./node_modules/d3-drag/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-drag/src/event.js +function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) { + this.target = target; + this.type = type; + this.subject = subject; + this.identifier = id; + this.active = active; + this.x = x; + this.y = y; + this.dx = dx; + this.dy = dy; + this._ = dispatch; +} + +DragEvent.prototype.on = function() { + var value = this._.on.apply(this._, arguments); + return value === this._ ? this : value; +}; + +// CONCATENATED MODULE: ./node_modules/d3-drag/src/drag.js + + + + + + + +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection["event"].button; +} + +function defaultContainer() { + return this.parentNode; +} + +function defaultSubject(d) { + return d == null ? {x: d3_selection["event"].x, y: d3_selection["event"].y} : d; +} + +function defaultTouchable() { + return "ontouchstart" in this; +} + +/* harmony default export */ var src_drag = (function() { + var filter = defaultFilter, + container = defaultContainer, + subject = defaultSubject, + touchable = defaultTouchable, + gestures = {}, + listeners = Object(d3_dispatch["dispatch"])("start", "drag", "end"), + active = 0, + mousedownx, + mousedowny, + mousemoving, + touchending, + clickDistance2 = 0; + + function drag(selection) { + selection + .on("mousedown.drag", mousedowned) + .filter(touchable) + .on("touchstart.drag", touchstarted) + .on("touchmove.drag", touchmoved) + .on("touchend.drag touchcancel.drag", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var gesture = beforestart("mouse", container.apply(this, arguments), d3_selection["mouse"], this, arguments); + if (!gesture) return; + Object(d3_selection["select"])(d3_selection["event"].view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); + nodrag(d3_selection["event"].view); + nopropagation(); + mousemoving = false; + mousedownx = d3_selection["event"].clientX; + mousedowny = d3_selection["event"].clientY; + gesture("start"); + } + + function mousemoved() { + noevent(); + if (!mousemoving) { + var dx = d3_selection["event"].clientX - mousedownx, dy = d3_selection["event"].clientY - mousedowny; + mousemoving = dx * dx + dy * dy > clickDistance2; + } + gestures.mouse("drag"); + } + + function mouseupped() { + Object(d3_selection["select"])(d3_selection["event"].view).on("mousemove.drag mouseup.drag", null); + yesdrag(d3_selection["event"].view, mousemoving); + noevent(); + gestures.mouse("end"); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var touches = d3_selection["event"].changedTouches, + c = container.apply(this, arguments), + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = beforestart(touches[i].identifier, c, d3_selection["touch"], this, arguments)) { + nopropagation(); + gesture("start"); + } + } + } + + function touchmoved() { + var touches = d3_selection["event"].changedTouches, + n = touches.length, i, gesture; + + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + noevent(); + gesture("drag"); + } + } + } + + function touchended() { + var touches = d3_selection["event"].changedTouches, + n = touches.length, i, gesture; + + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + for (i = 0; i < n; ++i) { + if (gesture = gestures[touches[i].identifier]) { + nopropagation(); + gesture("end"); + } + } + } + + function beforestart(id, container, point, that, args) { + var p = point(container, id), s, dx, dy, + sublisteners = listeners.copy(); + + if (!Object(d3_selection["customEvent"])(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() { + if ((d3_selection["event"].subject = s = subject.apply(that, args)) == null) return false; + dx = s.x - p[0] || 0; + dy = s.y - p[1] || 0; + return true; + })) return; + + return function gesture(type) { + var p0 = p, n; + switch (type) { + case "start": gestures[id] = gesture, n = active++; break; + case "end": delete gestures[id], --active; // nobreak + case "drag": p = point(container, id), n = active; break; + } + Object(d3_selection["customEvent"])(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]); + }; + } + + drag.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), drag) : filter; + }; + + drag.container = function(_) { + return arguments.length ? (container = typeof _ === "function" ? _ : constant(_), drag) : container; + }; + + drag.subject = function(_) { + return arguments.length ? (subject = typeof _ === "function" ? _ : constant(_), drag) : subject; + }; + + drag.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), drag) : touchable; + }; + + drag.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? drag : value; + }; + + drag.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); + }; + + return drag; +}); + +// CONCATENATED MODULE: ./node_modules/d3-drag/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "drag", function() { return src_drag; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dragDisable", function() { return nodrag; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dragEnable", function() { return yesdrag; }); + + + + +/***/ }), +/* 73 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-color/src/define.js +/* harmony default export */ var define = (function(constructor, factory, prototype) { + constructor.prototype = factory.prototype = prototype; + prototype.constructor = constructor; +}); + +function extend(parent, definition) { + var prototype = Object.create(parent.prototype); + for (var key in definition) prototype[key] = definition[key]; + return prototype; +} + +// CONCATENATED MODULE: ./node_modules/d3-color/src/color.js + + +function Color() {} + +var darker = 0.7; +var brighter = 1 / darker; + +var reI = "\\s*([+-]?\\d+)\\s*", + reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", + reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", + reHex3 = /^#([0-9a-f]{3})$/, + reHex6 = /^#([0-9a-f]{6})$/, + reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), + reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), + reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), + reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), + reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), + reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); + +var named = { + aliceblue: 0xf0f8ff, + antiquewhite: 0xfaebd7, + aqua: 0x00ffff, + aquamarine: 0x7fffd4, + azure: 0xf0ffff, + beige: 0xf5f5dc, + bisque: 0xffe4c4, + black: 0x000000, + blanchedalmond: 0xffebcd, + blue: 0x0000ff, + blueviolet: 0x8a2be2, + brown: 0xa52a2a, + burlywood: 0xdeb887, + cadetblue: 0x5f9ea0, + chartreuse: 0x7fff00, + chocolate: 0xd2691e, + coral: 0xff7f50, + cornflowerblue: 0x6495ed, + cornsilk: 0xfff8dc, + crimson: 0xdc143c, + cyan: 0x00ffff, + darkblue: 0x00008b, + darkcyan: 0x008b8b, + darkgoldenrod: 0xb8860b, + darkgray: 0xa9a9a9, + darkgreen: 0x006400, + darkgrey: 0xa9a9a9, + darkkhaki: 0xbdb76b, + darkmagenta: 0x8b008b, + darkolivegreen: 0x556b2f, + darkorange: 0xff8c00, + darkorchid: 0x9932cc, + darkred: 0x8b0000, + darksalmon: 0xe9967a, + darkseagreen: 0x8fbc8f, + darkslateblue: 0x483d8b, + darkslategray: 0x2f4f4f, + darkslategrey: 0x2f4f4f, + darkturquoise: 0x00ced1, + darkviolet: 0x9400d3, + deeppink: 0xff1493, + deepskyblue: 0x00bfff, + dimgray: 0x696969, + dimgrey: 0x696969, + dodgerblue: 0x1e90ff, + firebrick: 0xb22222, + floralwhite: 0xfffaf0, + forestgreen: 0x228b22, + fuchsia: 0xff00ff, + gainsboro: 0xdcdcdc, + ghostwhite: 0xf8f8ff, + gold: 0xffd700, + goldenrod: 0xdaa520, + gray: 0x808080, + green: 0x008000, + greenyellow: 0xadff2f, + grey: 0x808080, + honeydew: 0xf0fff0, + hotpink: 0xff69b4, + indianred: 0xcd5c5c, + indigo: 0x4b0082, + ivory: 0xfffff0, + khaki: 0xf0e68c, + lavender: 0xe6e6fa, + lavenderblush: 0xfff0f5, + lawngreen: 0x7cfc00, + lemonchiffon: 0xfffacd, + lightblue: 0xadd8e6, + lightcoral: 0xf08080, + lightcyan: 0xe0ffff, + lightgoldenrodyellow: 0xfafad2, + lightgray: 0xd3d3d3, + lightgreen: 0x90ee90, + lightgrey: 0xd3d3d3, + lightpink: 0xffb6c1, + lightsalmon: 0xffa07a, + lightseagreen: 0x20b2aa, + lightskyblue: 0x87cefa, + lightslategray: 0x778899, + lightslategrey: 0x778899, + lightsteelblue: 0xb0c4de, + lightyellow: 0xffffe0, + lime: 0x00ff00, + limegreen: 0x32cd32, + linen: 0xfaf0e6, + magenta: 0xff00ff, + maroon: 0x800000, + mediumaquamarine: 0x66cdaa, + mediumblue: 0x0000cd, + mediumorchid: 0xba55d3, + mediumpurple: 0x9370db, + mediumseagreen: 0x3cb371, + mediumslateblue: 0x7b68ee, + mediumspringgreen: 0x00fa9a, + mediumturquoise: 0x48d1cc, + mediumvioletred: 0xc71585, + midnightblue: 0x191970, + mintcream: 0xf5fffa, + mistyrose: 0xffe4e1, + moccasin: 0xffe4b5, + navajowhite: 0xffdead, + navy: 0x000080, + oldlace: 0xfdf5e6, + olive: 0x808000, + olivedrab: 0x6b8e23, + orange: 0xffa500, + orangered: 0xff4500, + orchid: 0xda70d6, + palegoldenrod: 0xeee8aa, + palegreen: 0x98fb98, + paleturquoise: 0xafeeee, + palevioletred: 0xdb7093, + papayawhip: 0xffefd5, + peachpuff: 0xffdab9, + peru: 0xcd853f, + pink: 0xffc0cb, + plum: 0xdda0dd, + powderblue: 0xb0e0e6, + purple: 0x800080, + rebeccapurple: 0x663399, + red: 0xff0000, + rosybrown: 0xbc8f8f, + royalblue: 0x4169e1, + saddlebrown: 0x8b4513, + salmon: 0xfa8072, + sandybrown: 0xf4a460, + seagreen: 0x2e8b57, + seashell: 0xfff5ee, + sienna: 0xa0522d, + silver: 0xc0c0c0, + skyblue: 0x87ceeb, + slateblue: 0x6a5acd, + slategray: 0x708090, + slategrey: 0x708090, + snow: 0xfffafa, + springgreen: 0x00ff7f, + steelblue: 0x4682b4, + tan: 0xd2b48c, + teal: 0x008080, + thistle: 0xd8bfd8, + tomato: 0xff6347, + turquoise: 0x40e0d0, + violet: 0xee82ee, + wheat: 0xf5deb3, + white: 0xffffff, + whitesmoke: 0xf5f5f5, + yellow: 0xffff00, + yellowgreen: 0x9acd32 +}; + +define(Color, color, { + displayable: function() { + return this.rgb().displayable(); + }, + hex: function() { + return this.rgb().hex(); + }, + toString: function() { + return this.rgb() + ""; + } +}); + +function color(format) { + var m; + format = (format + "").trim().toLowerCase(); + return (m = reHex3.exec(format)) ? (m = parseInt(m[1], 16), new Rgb((m >> 8 & 0xf) | (m >> 4 & 0x0f0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1)) // #f00 + : (m = reHex6.exec(format)) ? rgbn(parseInt(m[1], 16)) // #ff0000 + : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) + : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) + : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) + : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) + : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) + : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) + : named.hasOwnProperty(format) ? rgbn(named[format]) + : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) + : null; +} + +function rgbn(n) { + return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); +} + +function rgba(r, g, b, a) { + if (a <= 0) r = g = b = NaN; + return new Rgb(r, g, b, a); +} + +function rgbConvert(o) { + if (!(o instanceof Color)) o = color(o); + if (!o) return new Rgb; + o = o.rgb(); + return new Rgb(o.r, o.g, o.b, o.opacity); +} + +function rgb(r, g, b, opacity) { + return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); +} + +function Rgb(r, g, b, opacity) { + this.r = +r; + this.g = +g; + this.b = +b; + this.opacity = +opacity; +} + +define(Rgb, rgb, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); + }, + rgb: function() { + return this; + }, + displayable: function() { + return (0 <= this.r && this.r <= 255) + && (0 <= this.g && this.g <= 255) + && (0 <= this.b && this.b <= 255) + && (0 <= this.opacity && this.opacity <= 1); + }, + hex: function() { + return "#" + hex(this.r) + hex(this.g) + hex(this.b); + }, + toString: function() { + var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); + return (a === 1 ? "rgb(" : "rgba(") + + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " + + Math.max(0, Math.min(255, Math.round(this.b) || 0)) + + (a === 1 ? ")" : ", " + a + ")"); + } +})); + +function hex(value) { + value = Math.max(0, Math.min(255, Math.round(value) || 0)); + return (value < 16 ? "0" : "") + value.toString(16); +} + +function hsla(h, s, l, a) { + if (a <= 0) h = s = l = NaN; + else if (l <= 0 || l >= 1) h = s = NaN; + else if (s <= 0) h = NaN; + return new Hsl(h, s, l, a); +} + +function hslConvert(o) { + if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Color)) o = color(o); + if (!o) return new Hsl; + if (o instanceof Hsl) return o; + o = o.rgb(); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + min = Math.min(r, g, b), + max = Math.max(r, g, b), + h = NaN, + s = max - min, + l = (max + min) / 2; + if (s) { + if (r === max) h = (g - b) / s + (g < b) * 6; + else if (g === max) h = (b - r) / s + 2; + else h = (r - g) / s + 4; + s /= l < 0.5 ? max + min : 2 - max - min; + h *= 60; + } else { + s = l > 0 && l < 1 ? 0 : h; + } + return new Hsl(h, s, l, o.opacity); +} + +function hsl(h, s, l, opacity) { + return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); +} + +function Hsl(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Hsl, hsl, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Hsl(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = this.h % 360 + (this.h < 0) * 360, + s = isNaN(h) || isNaN(this.s) ? 0 : this.s, + l = this.l, + m2 = l + (l < 0.5 ? l : 1 - l) * s, + m1 = 2 * l - m2; + return new Rgb( + hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), + hsl2rgb(h, m1, m2), + hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), + this.opacity + ); + }, + displayable: function() { + return (0 <= this.s && this.s <= 1 || isNaN(this.s)) + && (0 <= this.l && this.l <= 1) + && (0 <= this.opacity && this.opacity <= 1); + } +})); + +/* From FvD 13.37, CSS Color Module Level 3 */ +function hsl2rgb(h, m1, m2) { + return (h < 60 ? m1 + (m2 - m1) * h / 60 + : h < 180 ? m2 + : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 + : m1) * 255; +} + +// CONCATENATED MODULE: ./node_modules/d3-color/src/math.js +var deg2rad = Math.PI / 180; +var rad2deg = 180 / Math.PI; + +// CONCATENATED MODULE: ./node_modules/d3-color/src/lab.js + + + + +// https://beta.observablehq.com/@mbostock/lab-and-rgb +var K = 18, + Xn = 0.96422, + Yn = 1, + Zn = 0.82521, + t0 = 4 / 29, + t1 = 6 / 29, + t2 = 3 * t1 * t1, + t3 = t1 * t1 * t1; + +function labConvert(o) { + if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); + if (o instanceof Hcl) { + if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); + var h = o.h * deg2rad; + return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); + } + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = rgb2lrgb(o.r), + g = rgb2lrgb(o.g), + b = rgb2lrgb(o.b), + y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; + if (r === g && g === b) x = z = y; else { + x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); + z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); + } + return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); +} + +function gray(l, opacity) { + return new Lab(l, 0, 0, opacity == null ? 1 : opacity); +} + +function lab(l, a, b, opacity) { + return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); +} + +function Lab(l, a, b, opacity) { + this.l = +l; + this.a = +a; + this.b = +b; + this.opacity = +opacity; +} + +define(Lab, lab, extend(Color, { + brighter: function(k) { + return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + darker: function(k) { + return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); + }, + rgb: function() { + var y = (this.l + 16) / 116, + x = isNaN(this.a) ? y : y + this.a / 500, + z = isNaN(this.b) ? y : y - this.b / 200; + x = Xn * lab2xyz(x); + y = Yn * lab2xyz(y); + z = Zn * lab2xyz(z); + return new Rgb( + lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), + lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), + lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), + this.opacity + ); + } +})); + +function xyz2lab(t) { + return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; +} + +function lab2xyz(t) { + return t > t1 ? t * t * t : t2 * (t - t0); +} + +function lrgb2rgb(x) { + return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); +} + +function rgb2lrgb(x) { + return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); +} + +function hclConvert(o) { + if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); + if (!(o instanceof Lab)) o = labConvert(o); + if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity); + var h = Math.atan2(o.b, o.a) * rad2deg; + return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); +} + +function lch(l, c, h, opacity) { + return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function hcl(h, c, l, opacity) { + return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); +} + +function Hcl(h, c, l, opacity) { + this.h = +h; + this.c = +c; + this.l = +l; + this.opacity = +opacity; +} + +define(Hcl, hcl, extend(Color, { + brighter: function(k) { + return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); + }, + darker: function(k) { + return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); + }, + rgb: function() { + return labConvert(this).rgb(); + } +})); + +// CONCATENATED MODULE: ./node_modules/d3-color/src/cubehelix.js + + + + +var A = -0.14861, + B = +1.78277, + C = -0.29227, + D = -0.90649, + E = +1.97294, + ED = E * D, + EB = E * B, + BC_DA = B * C - D * A; + +function cubehelixConvert(o) { + if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); + if (!(o instanceof Rgb)) o = rgbConvert(o); + var r = o.r / 255, + g = o.g / 255, + b = o.b / 255, + l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), + bl = b - l, + k = (E * (g - l) - C * bl) / D, + s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 + h = s ? Math.atan2(k, bl) * rad2deg - 120 : NaN; + return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); +} + +function cubehelix(h, s, l, opacity) { + return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); +} + +function Cubehelix(h, s, l, opacity) { + this.h = +h; + this.s = +s; + this.l = +l; + this.opacity = +opacity; +} + +define(Cubehelix, cubehelix, extend(Color, { + brighter: function(k) { + k = k == null ? brighter : Math.pow(brighter, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + darker: function(k) { + k = k == null ? darker : Math.pow(darker, k); + return new Cubehelix(this.h, this.s, this.l * k, this.opacity); + }, + rgb: function() { + var h = isNaN(this.h) ? 0 : (this.h + 120) * deg2rad, + l = +this.l, + a = isNaN(this.s) ? 0 : this.s * l * (1 - l), + cosh = Math.cos(h), + sinh = Math.sin(h); + return new Rgb( + 255 * (l + a * (A * cosh + B * sinh)), + 255 * (l + a * (C * cosh + D * sinh)), + 255 * (l + a * (E * cosh)), + this.opacity + ); + } +})); + +// CONCATENATED MODULE: ./node_modules/d3-color/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "color", function() { return color; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "rgb", function() { return rgb; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "hsl", function() { return hsl; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "lab", function() { return lab; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "hcl", function() { return hcl; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "lch", function() { return lch; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "gray", function() { return gray; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "cubehelix", function() { return cubehelix; }); + + + + + +/***/ }), +/* 74 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-dispatch/index.js + 1 modules +var d3_dispatch = __webpack_require__(78); + +// EXTERNAL MODULE: ./node_modules/d3-drag/index.js + 5 modules +var d3_drag = __webpack_require__(72); + +// EXTERNAL MODULE: ./node_modules/d3-interpolate/index.js + 22 modules +var d3_interpolate = __webpack_require__(68); + +// EXTERNAL MODULE: ./node_modules/d3-selection/index.js + 49 modules +var d3_selection = __webpack_require__(64); + +// EXTERNAL MODULE: ./node_modules/d3-transition/index.js + 29 modules +var d3_transition = __webpack_require__(67); + +// CONCATENATED MODULE: ./node_modules/d3-zoom/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-zoom/src/event.js +function ZoomEvent(target, type, transform) { + this.target = target; + this.type = type; + this.transform = transform; +} + +// CONCATENATED MODULE: ./node_modules/d3-zoom/src/transform.js +function Transform(k, x, y) { + this.k = k; + this.x = x; + this.y = y; +} + +Transform.prototype = { + constructor: Transform, + scale: function(k) { + return k === 1 ? this : new Transform(this.k * k, this.x, this.y); + }, + translate: function(x, y) { + return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); + }, + apply: function(point) { + return [point[0] * this.k + this.x, point[1] * this.k + this.y]; + }, + applyX: function(x) { + return x * this.k + this.x; + }, + applyY: function(y) { + return y * this.k + this.y; + }, + invert: function(location) { + return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; + }, + invertX: function(x) { + return (x - this.x) / this.k; + }, + invertY: function(y) { + return (y - this.y) / this.k; + }, + rescaleX: function(x) { + return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); + }, + rescaleY: function(y) { + return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); + }, + toString: function() { + return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; + } +}; + +var identity = new Transform(1, 0, 0); + +transform_transform.prototype = Transform.prototype; + +function transform_transform(node) { + return node.__zoom || identity; +} + +// CONCATENATED MODULE: ./node_modules/d3-zoom/src/noevent.js + + +function nopropagation() { + d3_selection["event"].stopImmediatePropagation(); +} + +/* harmony default export */ var noevent = (function() { + d3_selection["event"].preventDefault(); + d3_selection["event"].stopImmediatePropagation(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-zoom/src/zoom.js + + + + + + + + + + +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection["event"].button; +} + +function defaultExtent() { + var e = this, w, h; + if (e instanceof SVGElement) { + e = e.ownerSVGElement || e; + w = e.width.baseVal.value; + h = e.height.baseVal.value; + } else { + w = e.clientWidth; + h = e.clientHeight; + } + return [[0, 0], [w, h]]; +} + +function defaultTransform() { + return this.__zoom || identity; +} + +function defaultWheelDelta() { + return -d3_selection["event"].deltaY * (d3_selection["event"].deltaMode ? 120 : 1) / 500; +} + +function defaultTouchable() { + return "ontouchstart" in this; +} + +function defaultConstrain(transform, extent, translateExtent) { + var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], + dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], + dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], + dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; + return transform.translate( + dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), + dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) + ); +} + +/* harmony default export */ var src_zoom = (function() { + var filter = defaultFilter, + extent = defaultExtent, + constrain = defaultConstrain, + wheelDelta = defaultWheelDelta, + touchable = defaultTouchable, + scaleExtent = [0, Infinity], + translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], + duration = 250, + interpolate = d3_interpolate["interpolateZoom"], + gestures = [], + listeners = Object(d3_dispatch["dispatch"])("start", "zoom", "end"), + touchstarting, + touchending, + touchDelay = 500, + wheelDelay = 150, + clickDistance2 = 0; + + function zoom(selection) { + selection + .property("__zoom", defaultTransform) + .on("wheel.zoom", wheeled) + .on("mousedown.zoom", mousedowned) + .on("dblclick.zoom", dblclicked) + .filter(touchable) + .on("touchstart.zoom", touchstarted) + .on("touchmove.zoom", touchmoved) + .on("touchend.zoom touchcancel.zoom", touchended) + .style("touch-action", "none") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); + } + + zoom.transform = function(collection, transform) { + var selection = collection.selection ? collection.selection() : collection; + selection.property("__zoom", defaultTransform); + if (collection !== selection) { + schedule(collection, transform); + } else { + selection.interrupt().each(function() { + gesture(this, arguments) + .start() + .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) + .end(); + }); + } + }; + + zoom.scaleBy = function(selection, k) { + zoom.scaleTo(selection, function() { + var k0 = this.__zoom.k, + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return k0 * k1; + }); + }; + + zoom.scaleTo = function(selection, k) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t0 = this.__zoom, + p0 = centroid(e), + p1 = t0.invert(p0), + k1 = typeof k === "function" ? k.apply(this, arguments) : k; + return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); + }); + }; + + zoom.translateBy = function(selection, x, y) { + zoom.transform(selection, function() { + return constrain(this.__zoom.translate( + typeof x === "function" ? x.apply(this, arguments) : x, + typeof y === "function" ? y.apply(this, arguments) : y + ), extent.apply(this, arguments), translateExtent); + }); + }; + + zoom.translateTo = function(selection, x, y) { + zoom.transform(selection, function() { + var e = extent.apply(this, arguments), + t = this.__zoom, + p = centroid(e); + return constrain(identity.translate(p[0], p[1]).scale(t.k).translate( + typeof x === "function" ? -x.apply(this, arguments) : -x, + typeof y === "function" ? -y.apply(this, arguments) : -y + ), e, translateExtent); + }); + }; + + function scale(transform, k) { + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); + return k === transform.k ? transform : new Transform(k, transform.x, transform.y); + } + + function translate(transform, p0, p1) { + var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; + return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); + } + + function centroid(extent) { + return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; + } + + function schedule(transition, transform, center) { + transition + .on("start.zoom", function() { gesture(this, arguments).start(); }) + .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); }) + .tween("zoom", function() { + var that = this, + args = arguments, + g = gesture(that, args), + e = extent.apply(that, args), + p = center || centroid(e), + w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), + a = that.__zoom, + b = typeof transform === "function" ? transform.apply(that, args) : transform, + i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); + return function(t) { + if (t === 1) t = b; // Avoid rounding error on end. + else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); } + g.zoom(null, t); + }; + }); + } + + function gesture(that, args) { + for (var i = 0, n = gestures.length, g; i < n; ++i) { + if ((g = gestures[i]).that === that) { + return g; + } + } + return new Gesture(that, args); + } + + function Gesture(that, args) { + this.that = that; + this.args = args; + this.index = -1; + this.active = 0; + this.extent = extent.apply(that, args); + } + + Gesture.prototype = { + start: function() { + if (++this.active === 1) { + this.index = gestures.push(this) - 1; + this.emit("start"); + } + return this; + }, + zoom: function(key, transform) { + if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); + if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); + if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); + this.that.__zoom = transform; + this.emit("zoom"); + return this; + }, + end: function() { + if (--this.active === 0) { + gestures.splice(this.index, 1); + this.index = -1; + this.emit("end"); + } + return this; + }, + emit: function(type) { + Object(d3_selection["customEvent"])(new ZoomEvent(zoom, type, this.that.__zoom), listeners.apply, listeners, [type, this.that, this.args]); + } + }; + + function wheeled() { + if (!filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + t = this.__zoom, + k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), + p = Object(d3_selection["mouse"])(this); + + // If the mouse is in the same location as before, reuse it. + // If there were recent wheel events, reset the wheel idle timeout. + if (g.wheel) { + if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { + g.mouse[1] = t.invert(g.mouse[0] = p); + } + clearTimeout(g.wheel); + } + + // If this wheel event won’t trigger a transform change, ignore it. + else if (t.k === k) return; + + // Otherwise, capture the mouse point and location at the start. + else { + g.mouse = [p, t.invert(p)]; + Object(d3_transition["interrupt"])(this); + g.start(); + } + + noevent(); + g.wheel = setTimeout(wheelidled, wheelDelay); + g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); + + function wheelidled() { + g.wheel = null; + g.end(); + } + } + + function mousedowned() { + if (touchending || !filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + v = Object(d3_selection["select"])(d3_selection["event"].view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), + p = Object(d3_selection["mouse"])(this), + x0 = d3_selection["event"].clientX, + y0 = d3_selection["event"].clientY; + + Object(d3_drag["dragDisable"])(d3_selection["event"].view); + nopropagation(); + g.mouse = [p, this.__zoom.invert(p)]; + Object(d3_transition["interrupt"])(this); + g.start(); + + function mousemoved() { + noevent(); + if (!g.moved) { + var dx = d3_selection["event"].clientX - x0, dy = d3_selection["event"].clientY - y0; + g.moved = dx * dx + dy * dy > clickDistance2; + } + g.zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = Object(d3_selection["mouse"])(g.that), g.mouse[1]), g.extent, translateExtent)); + } + + function mouseupped() { + v.on("mousemove.zoom mouseup.zoom", null); + Object(d3_drag["dragEnable"])(d3_selection["event"].view, g.moved); + noevent(); + g.end(); + } + } + + function dblclicked() { + if (!filter.apply(this, arguments)) return; + var t0 = this.__zoom, + p0 = Object(d3_selection["mouse"])(this), + p1 = t0.invert(p0), + k1 = t0.k * (d3_selection["event"].shiftKey ? 0.5 : 2), + t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, arguments), translateExtent); + + noevent(); + if (duration > 0) Object(d3_selection["select"])(this).transition().duration(duration).call(schedule, t1, p0); + else Object(d3_selection["select"])(this).call(zoom.transform, t1); + } + + function touchstarted() { + if (!filter.apply(this, arguments)) return; + var g = gesture(this, arguments), + touches = d3_selection["event"].changedTouches, + started, + n = touches.length, i, t, p; + + nopropagation(); + for (i = 0; i < n; ++i) { + t = touches[i], p = Object(d3_selection["touch"])(this, touches, t.identifier); + p = [p, this.__zoom.invert(p), t.identifier]; + if (!g.touch0) g.touch0 = p, started = true; + else if (!g.touch1) g.touch1 = p; + } + + // If this is a dbltap, reroute to the (optional) dblclick.zoom handler. + if (touchstarting) { + touchstarting = clearTimeout(touchstarting); + if (!g.touch1) { + g.end(); + p = Object(d3_selection["select"])(this).on("dblclick.zoom"); + if (p) p.apply(this, arguments); + return; + } + } + + if (started) { + touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); + Object(d3_transition["interrupt"])(this); + g.start(); + } + } + + function touchmoved() { + var g = gesture(this, arguments), + touches = d3_selection["event"].changedTouches, + n = touches.length, i, t, p, l; + + noevent(); + if (touchstarting) touchstarting = clearTimeout(touchstarting); + for (i = 0; i < n; ++i) { + t = touches[i], p = Object(d3_selection["touch"])(this, touches, t.identifier); + if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; + else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; + } + t = g.that.__zoom; + if (g.touch1) { + var p0 = g.touch0[0], l0 = g.touch0[1], + p1 = g.touch1[0], l1 = g.touch1[1], + dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, + dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; + t = scale(t, Math.sqrt(dp / dl)); + p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; + l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; + } + else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; + else return; + g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); + } + + function touchended() { + var g = gesture(this, arguments), + touches = d3_selection["event"].changedTouches, + n = touches.length, i, t; + + nopropagation(); + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, touchDelay); + for (i = 0; i < n; ++i) { + t = touches[i]; + if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; + else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; + } + if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; + if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); + else g.end(); + } + + zoom.wheelDelta = function(_) { + return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant(+_), zoom) : wheelDelta; + }; + + zoom.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), zoom) : filter; + }; + + zoom.touchable = function(_) { + return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable; + }; + + zoom.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; + }; + + zoom.scaleExtent = function(_) { + return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; + }; + + zoom.translateExtent = function(_) { + return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; + }; + + zoom.constrain = function(_) { + return arguments.length ? (constrain = _, zoom) : constrain; + }; + + zoom.duration = function(_) { + return arguments.length ? (duration = +_, zoom) : duration; + }; + + zoom.interpolate = function(_) { + return arguments.length ? (interpolate = _, zoom) : interpolate; + }; + + zoom.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? zoom : value; + }; + + zoom.clickDistance = function(_) { + return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); + }; + + return zoom; +}); + +// CONCATENATED MODULE: ./node_modules/d3-zoom/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zoom", function() { return src_zoom; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zoomTransform", function() { return transform_transform; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "zoomIdentity", function() { return identity; }); + + + + +/***/ }), +/* 75 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-time/index.js + 16 modules +var d3_time = __webpack_require__(69); + +// CONCATENATED MODULE: ./node_modules/d3-time-format/src/locale.js + + +function localDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); + date.setFullYear(d.y); + return date; + } + return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); +} + +function utcDate(d) { + if (0 <= d.y && d.y < 100) { + var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); + date.setUTCFullYear(d.y); + return date; + } + return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); +} + +function newYear(y) { + return {y: y, m: 0, d: 1, H: 0, M: 0, S: 0, L: 0}; +} + +function formatLocale(locale) { + var locale_dateTime = locale.dateTime, + locale_date = locale.date, + locale_time = locale.time, + locale_periods = locale.periods, + locale_weekdays = locale.days, + locale_shortWeekdays = locale.shortDays, + locale_months = locale.months, + locale_shortMonths = locale.shortMonths; + + var periodRe = formatRe(locale_periods), + periodLookup = formatLookup(locale_periods), + weekdayRe = formatRe(locale_weekdays), + weekdayLookup = formatLookup(locale_weekdays), + shortWeekdayRe = formatRe(locale_shortWeekdays), + shortWeekdayLookup = formatLookup(locale_shortWeekdays), + monthRe = formatRe(locale_months), + monthLookup = formatLookup(locale_months), + shortMonthRe = formatRe(locale_shortMonths), + shortMonthLookup = formatLookup(locale_shortMonths); + + var formats = { + "a": formatShortWeekday, + "A": formatWeekday, + "b": formatShortMonth, + "B": formatMonth, + "c": null, + "d": formatDayOfMonth, + "e": formatDayOfMonth, + "f": formatMicroseconds, + "H": formatHour24, + "I": formatHour12, + "j": formatDayOfYear, + "L": formatMilliseconds, + "m": formatMonthNumber, + "M": formatMinutes, + "p": formatPeriod, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatSeconds, + "u": formatWeekdayNumberMonday, + "U": formatWeekNumberSunday, + "V": formatWeekNumberISO, + "w": formatWeekdayNumberSunday, + "W": formatWeekNumberMonday, + "x": null, + "X": null, + "y": formatYear, + "Y": formatFullYear, + "Z": formatZone, + "%": formatLiteralPercent + }; + + var utcFormats = { + "a": formatUTCShortWeekday, + "A": formatUTCWeekday, + "b": formatUTCShortMonth, + "B": formatUTCMonth, + "c": null, + "d": formatUTCDayOfMonth, + "e": formatUTCDayOfMonth, + "f": formatUTCMicroseconds, + "H": formatUTCHour24, + "I": formatUTCHour12, + "j": formatUTCDayOfYear, + "L": formatUTCMilliseconds, + "m": formatUTCMonthNumber, + "M": formatUTCMinutes, + "p": formatUTCPeriod, + "Q": formatUnixTimestamp, + "s": formatUnixTimestampSeconds, + "S": formatUTCSeconds, + "u": formatUTCWeekdayNumberMonday, + "U": formatUTCWeekNumberSunday, + "V": formatUTCWeekNumberISO, + "w": formatUTCWeekdayNumberSunday, + "W": formatUTCWeekNumberMonday, + "x": null, + "X": null, + "y": formatUTCYear, + "Y": formatUTCFullYear, + "Z": formatUTCZone, + "%": formatLiteralPercent + }; + + var parses = { + "a": parseShortWeekday, + "A": parseWeekday, + "b": parseShortMonth, + "B": parseMonth, + "c": parseLocaleDateTime, + "d": parseDayOfMonth, + "e": parseDayOfMonth, + "f": parseMicroseconds, + "H": parseHour24, + "I": parseHour24, + "j": parseDayOfYear, + "L": parseMilliseconds, + "m": parseMonthNumber, + "M": parseMinutes, + "p": parsePeriod, + "Q": parseUnixTimestamp, + "s": parseUnixTimestampSeconds, + "S": parseSeconds, + "u": parseWeekdayNumberMonday, + "U": parseWeekNumberSunday, + "V": parseWeekNumberISO, + "w": parseWeekdayNumberSunday, + "W": parseWeekNumberMonday, + "x": parseLocaleDate, + "X": parseLocaleTime, + "y": parseYear, + "Y": parseFullYear, + "Z": parseZone, + "%": parseLiteralPercent + }; + + // These recursive directive definitions must be deferred. + formats.x = newFormat(locale_date, formats); + formats.X = newFormat(locale_time, formats); + formats.c = newFormat(locale_dateTime, formats); + utcFormats.x = newFormat(locale_date, utcFormats); + utcFormats.X = newFormat(locale_time, utcFormats); + utcFormats.c = newFormat(locale_dateTime, utcFormats); + + function newFormat(specifier, formats) { + return function(date) { + var string = [], + i = -1, + j = 0, + n = specifier.length, + c, + pad, + format; + + if (!(date instanceof Date)) date = new Date(+date); + + while (++i < n) { + if (specifier.charCodeAt(i) === 37) { + string.push(specifier.slice(j, i)); + if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); + else pad = c === "e" ? " " : "0"; + if (format = formats[c]) c = format(date, pad); + string.push(c); + j = i + 1; + } + } + + string.push(specifier.slice(j, i)); + return string.join(""); + }; + } + + function newParse(specifier, newDate) { + return function(string) { + var d = newYear(1900), + i = parseSpecifier(d, specifier, string += "", 0), + week, day; + if (i != string.length) return null; + + // If a UNIX timestamp is specified, return it. + if ("Q" in d) return new Date(d.Q); + + // The am-pm flag is 0 for AM, and 1 for PM. + if ("p" in d) d.H = d.H % 12 + d.p * 12; + + // Convert day-of-week and week-of-year to day-of-year. + if ("V" in d) { + if (d.V < 1 || d.V > 53) return null; + if (!("w" in d)) d.w = 1; + if ("Z" in d) { + week = utcDate(newYear(d.y)), day = week.getUTCDay(); + week = day > 4 || day === 0 ? d3_time["utcMonday"].ceil(week) : Object(d3_time["utcMonday"])(week); + week = d3_time["utcDay"].offset(week, (d.V - 1) * 7); + d.y = week.getUTCFullYear(); + d.m = week.getUTCMonth(); + d.d = week.getUTCDate() + (d.w + 6) % 7; + } else { + week = newDate(newYear(d.y)), day = week.getDay(); + week = day > 4 || day === 0 ? d3_time["timeMonday"].ceil(week) : Object(d3_time["timeMonday"])(week); + week = d3_time["timeDay"].offset(week, (d.V - 1) * 7); + d.y = week.getFullYear(); + d.m = week.getMonth(); + d.d = week.getDate() + (d.w + 6) % 7; + } + } else if ("W" in d || "U" in d) { + if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; + day = "Z" in d ? utcDate(newYear(d.y)).getUTCDay() : newDate(newYear(d.y)).getDay(); + d.m = 0; + d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; + } + + // If a time zone is specified, all fields are interpreted as UTC and then + // offset according to the specified time zone. + if ("Z" in d) { + d.H += d.Z / 100 | 0; + d.M += d.Z % 100; + return utcDate(d); + } + + // Otherwise, all fields are in local time. + return newDate(d); + }; + } + + function parseSpecifier(d, specifier, string, j) { + var i = 0, + n = specifier.length, + m = string.length, + c, + parse; + + while (i < n) { + if (j >= m) return -1; + c = specifier.charCodeAt(i++); + if (c === 37) { + c = specifier.charAt(i++); + parse = parses[c in pads ? specifier.charAt(i++) : c]; + if (!parse || ((j = parse(d, string, j)) < 0)) return -1; + } else if (c != string.charCodeAt(j++)) { + return -1; + } + } + + return j; + } + + function parsePeriod(d, string, i) { + var n = periodRe.exec(string.slice(i)); + return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortWeekday(d, string, i) { + var n = shortWeekdayRe.exec(string.slice(i)); + return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseWeekday(d, string, i) { + var n = weekdayRe.exec(string.slice(i)); + return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseShortMonth(d, string, i) { + var n = shortMonthRe.exec(string.slice(i)); + return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseMonth(d, string, i) { + var n = monthRe.exec(string.slice(i)); + return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1; + } + + function parseLocaleDateTime(d, string, i) { + return parseSpecifier(d, locale_dateTime, string, i); + } + + function parseLocaleDate(d, string, i) { + return parseSpecifier(d, locale_date, string, i); + } + + function parseLocaleTime(d, string, i) { + return parseSpecifier(d, locale_time, string, i); + } + + function formatShortWeekday(d) { + return locale_shortWeekdays[d.getDay()]; + } + + function formatWeekday(d) { + return locale_weekdays[d.getDay()]; + } + + function formatShortMonth(d) { + return locale_shortMonths[d.getMonth()]; + } + + function formatMonth(d) { + return locale_months[d.getMonth()]; + } + + function formatPeriod(d) { + return locale_periods[+(d.getHours() >= 12)]; + } + + function formatUTCShortWeekday(d) { + return locale_shortWeekdays[d.getUTCDay()]; + } + + function formatUTCWeekday(d) { + return locale_weekdays[d.getUTCDay()]; + } + + function formatUTCShortMonth(d) { + return locale_shortMonths[d.getUTCMonth()]; + } + + function formatUTCMonth(d) { + return locale_months[d.getUTCMonth()]; + } + + function formatUTCPeriod(d) { + return locale_periods[+(d.getUTCHours() >= 12)]; + } + + return { + format: function(specifier) { + var f = newFormat(specifier += "", formats); + f.toString = function() { return specifier; }; + return f; + }, + parse: function(specifier) { + var p = newParse(specifier += "", localDate); + p.toString = function() { return specifier; }; + return p; + }, + utcFormat: function(specifier) { + var f = newFormat(specifier += "", utcFormats); + f.toString = function() { return specifier; }; + return f; + }, + utcParse: function(specifier) { + var p = newParse(specifier, utcDate); + p.toString = function() { return specifier; }; + return p; + } + }; +} + +var pads = {"-": "", "_": " ", "0": "0"}, + numberRe = /^\s*\d+/, // note: ignores next directive + percentRe = /^%/, + requoteRe = /[\\^$*+?|[\]().{}]/g; + +function pad(value, fill, width) { + var sign = value < 0 ? "-" : "", + string = (sign ? -value : value) + "", + length = string.length; + return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); +} + +function requote(s) { + return s.replace(requoteRe, "\\$&"); +} + +function formatRe(names) { + return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); +} + +function formatLookup(names) { + var map = {}, i = -1, n = names.length; + while (++i < n) map[names[i].toLowerCase()] = i; + return map; +} + +function parseWeekdayNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.w = +n[0], i + n[0].length) : -1; +} + +function parseWeekdayNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 1)); + return n ? (d.u = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberSunday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.U = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberISO(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.V = +n[0], i + n[0].length) : -1; +} + +function parseWeekNumberMonday(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.W = +n[0], i + n[0].length) : -1; +} + +function parseFullYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 4)); + return n ? (d.y = +n[0], i + n[0].length) : -1; +} + +function parseYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; +} + +function parseZone(d, string, i) { + var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); + return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; +} + +function parseMonthNumber(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.m = n[0] - 1, i + n[0].length) : -1; +} + +function parseDayOfMonth(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.d = +n[0], i + n[0].length) : -1; +} + +function parseDayOfYear(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; +} + +function parseHour24(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.H = +n[0], i + n[0].length) : -1; +} + +function parseMinutes(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.M = +n[0], i + n[0].length) : -1; +} + +function parseSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 2)); + return n ? (d.S = +n[0], i + n[0].length) : -1; +} + +function parseMilliseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 3)); + return n ? (d.L = +n[0], i + n[0].length) : -1; +} + +function parseMicroseconds(d, string, i) { + var n = numberRe.exec(string.slice(i, i + 6)); + return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; +} + +function parseLiteralPercent(d, string, i) { + var n = percentRe.exec(string.slice(i, i + 1)); + return n ? i + n[0].length : -1; +} + +function parseUnixTimestamp(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = +n[0], i + n[0].length) : -1; +} + +function parseUnixTimestampSeconds(d, string, i) { + var n = numberRe.exec(string.slice(i)); + return n ? (d.Q = (+n[0]) * 1000, i + n[0].length) : -1; +} + +function formatDayOfMonth(d, p) { + return pad(d.getDate(), p, 2); +} + +function formatHour24(d, p) { + return pad(d.getHours(), p, 2); +} + +function formatHour12(d, p) { + return pad(d.getHours() % 12 || 12, p, 2); +} + +function formatDayOfYear(d, p) { + return pad(1 + d3_time["timeDay"].count(Object(d3_time["timeYear"])(d), d), p, 3); +} + +function formatMilliseconds(d, p) { + return pad(d.getMilliseconds(), p, 3); +} + +function formatMicroseconds(d, p) { + return formatMilliseconds(d, p) + "000"; +} + +function formatMonthNumber(d, p) { + return pad(d.getMonth() + 1, p, 2); +} + +function formatMinutes(d, p) { + return pad(d.getMinutes(), p, 2); +} + +function formatSeconds(d, p) { + return pad(d.getSeconds(), p, 2); +} + +function formatWeekdayNumberMonday(d) { + var day = d.getDay(); + return day === 0 ? 7 : day; +} + +function formatWeekNumberSunday(d, p) { + return pad(d3_time["timeSunday"].count(Object(d3_time["timeYear"])(d), d), p, 2); +} + +function formatWeekNumberISO(d, p) { + var day = d.getDay(); + d = (day >= 4 || day === 0) ? Object(d3_time["timeThursday"])(d) : d3_time["timeThursday"].ceil(d); + return pad(d3_time["timeThursday"].count(Object(d3_time["timeYear"])(d), d) + (Object(d3_time["timeYear"])(d).getDay() === 4), p, 2); +} + +function formatWeekdayNumberSunday(d) { + return d.getDay(); +} + +function formatWeekNumberMonday(d, p) { + return pad(d3_time["timeMonday"].count(Object(d3_time["timeYear"])(d), d), p, 2); +} + +function formatYear(d, p) { + return pad(d.getFullYear() % 100, p, 2); +} + +function formatFullYear(d, p) { + return pad(d.getFullYear() % 10000, p, 4); +} + +function formatZone(d) { + var z = d.getTimezoneOffset(); + return (z > 0 ? "-" : (z *= -1, "+")) + + pad(z / 60 | 0, "0", 2) + + pad(z % 60, "0", 2); +} + +function formatUTCDayOfMonth(d, p) { + return pad(d.getUTCDate(), p, 2); +} + +function formatUTCHour24(d, p) { + return pad(d.getUTCHours(), p, 2); +} + +function formatUTCHour12(d, p) { + return pad(d.getUTCHours() % 12 || 12, p, 2); +} + +function formatUTCDayOfYear(d, p) { + return pad(1 + d3_time["utcDay"].count(Object(d3_time["utcYear"])(d), d), p, 3); +} + +function formatUTCMilliseconds(d, p) { + return pad(d.getUTCMilliseconds(), p, 3); +} + +function formatUTCMicroseconds(d, p) { + return formatUTCMilliseconds(d, p) + "000"; +} + +function formatUTCMonthNumber(d, p) { + return pad(d.getUTCMonth() + 1, p, 2); +} + +function formatUTCMinutes(d, p) { + return pad(d.getUTCMinutes(), p, 2); +} + +function formatUTCSeconds(d, p) { + return pad(d.getUTCSeconds(), p, 2); +} + +function formatUTCWeekdayNumberMonday(d) { + var dow = d.getUTCDay(); + return dow === 0 ? 7 : dow; +} + +function formatUTCWeekNumberSunday(d, p) { + return pad(d3_time["utcSunday"].count(Object(d3_time["utcYear"])(d), d), p, 2); +} + +function formatUTCWeekNumberISO(d, p) { + var day = d.getUTCDay(); + d = (day >= 4 || day === 0) ? Object(d3_time["utcThursday"])(d) : d3_time["utcThursday"].ceil(d); + return pad(d3_time["utcThursday"].count(Object(d3_time["utcYear"])(d), d) + (Object(d3_time["utcYear"])(d).getUTCDay() === 4), p, 2); +} + +function formatUTCWeekdayNumberSunday(d) { + return d.getUTCDay(); +} + +function formatUTCWeekNumberMonday(d, p) { + return pad(d3_time["utcMonday"].count(Object(d3_time["utcYear"])(d), d), p, 2); +} + +function formatUTCYear(d, p) { + return pad(d.getUTCFullYear() % 100, p, 2); +} + +function formatUTCFullYear(d, p) { + return pad(d.getUTCFullYear() % 10000, p, 4); +} + +function formatUTCZone() { + return "+0000"; +} + +function formatLiteralPercent() { + return "%"; +} + +function formatUnixTimestamp(d) { + return +d; +} + +function formatUnixTimestampSeconds(d) { + return Math.floor(+d / 1000); +} + +// CONCATENATED MODULE: ./node_modules/d3-time-format/src/defaultLocale.js + + +var defaultLocale_locale; +var timeFormat; +var timeParse; +var utcFormat; +var utcParse; + +defaultLocale({ + dateTime: "%x, %X", + date: "%-m/%-d/%Y", + time: "%-I:%M:%S %p", + periods: ["AM", "PM"], + days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], + shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], + months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], + shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] +}); + +function defaultLocale(definition) { + defaultLocale_locale = formatLocale(definition); + timeFormat = defaultLocale_locale.format; + timeParse = defaultLocale_locale.parse; + utcFormat = defaultLocale_locale.utcFormat; + utcParse = defaultLocale_locale.utcParse; + return defaultLocale_locale; +} + +// CONCATENATED MODULE: ./node_modules/d3-time-format/src/isoFormat.js + + +var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; + +function formatIsoNative(date) { + return date.toISOString(); +} + +var formatIso = Date.prototype.toISOString + ? formatIsoNative + : utcFormat(isoSpecifier); + +/* harmony default export */ var isoFormat = (formatIso); + +// CONCATENATED MODULE: ./node_modules/d3-time-format/src/isoParse.js + + + +function parseIsoNative(string) { + var date = new Date(string); + return isNaN(date) ? null : date; +} + +var parseIso = +new Date("2000-01-01T00:00:00.000Z") + ? parseIsoNative + : utcParse(isoSpecifier); + +/* harmony default export */ var isoParse = (parseIso); + +// CONCATENATED MODULE: ./node_modules/d3-time-format/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeFormatDefaultLocale", function() { return defaultLocale; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeFormat", function() { return timeFormat; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeParse", function() { return timeParse; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcFormat", function() { return utcFormat; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "utcParse", function() { return utcParse; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "timeFormatLocale", function() { return formatLocale; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isoFormat", function() { return isoFormat; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "isoParse", function() { return isoParse; }); + + + + + + +/***/ }), +/* 76 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXTERNAL MODULE: ./node_modules/d3-dispatch/index.js + 1 modules +var d3_dispatch = __webpack_require__(78); + +// EXTERNAL MODULE: ./node_modules/d3-drag/index.js + 5 modules +var d3_drag = __webpack_require__(72); + +// EXTERNAL MODULE: ./node_modules/d3-interpolate/index.js + 22 modules +var d3_interpolate = __webpack_require__(68); + +// EXTERNAL MODULE: ./node_modules/d3-selection/index.js + 49 modules +var d3_selection = __webpack_require__(64); + +// EXTERNAL MODULE: ./node_modules/d3-transition/index.js + 29 modules +var d3_transition = __webpack_require__(67); + +// CONCATENATED MODULE: ./node_modules/d3-brush/src/constant.js +/* harmony default export */ var constant = (function(x) { + return function() { + return x; + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-brush/src/event.js +/* harmony default export */ var src_event = (function(target, type, selection) { + this.target = target; + this.type = type; + this.selection = selection; +}); + +// CONCATENATED MODULE: ./node_modules/d3-brush/src/noevent.js + + +function nopropagation() { + d3_selection["event"].stopImmediatePropagation(); +} + +/* harmony default export */ var noevent = (function() { + d3_selection["event"].preventDefault(); + d3_selection["event"].stopImmediatePropagation(); +}); + +// CONCATENATED MODULE: ./node_modules/d3-brush/src/brush.js + + + + + + + + + +var MODE_DRAG = {name: "drag"}, + MODE_SPACE = {name: "space"}, + MODE_HANDLE = {name: "handle"}, + MODE_CENTER = {name: "center"}; + +var X = { + name: "x", + handles: ["e", "w"].map(brush_type), + input: function(x, e) { return x && [[x[0], e[0][1]], [x[1], e[1][1]]]; }, + output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } +}; + +var Y = { + name: "y", + handles: ["n", "s"].map(brush_type), + input: function(y, e) { return y && [[e[0][0], y[0]], [e[1][0], y[1]]]; }, + output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } +}; + +var XY = { + name: "xy", + handles: ["n", "e", "s", "w", "nw", "ne", "se", "sw"].map(brush_type), + input: function(xy) { return xy; }, + output: function(xy) { return xy; } +}; + +var cursors = { + overlay: "crosshair", + selection: "move", + n: "ns-resize", + e: "ew-resize", + s: "ns-resize", + w: "ew-resize", + nw: "nwse-resize", + ne: "nesw-resize", + se: "nwse-resize", + sw: "nesw-resize" +}; + +var flipX = { + e: "w", + w: "e", + nw: "ne", + ne: "nw", + se: "sw", + sw: "se" +}; + +var flipY = { + n: "s", + s: "n", + nw: "sw", + ne: "se", + se: "ne", + sw: "nw" +}; + +var signsX = { + overlay: +1, + selection: +1, + n: null, + e: +1, + s: null, + w: -1, + nw: -1, + ne: +1, + se: +1, + sw: -1 +}; + +var signsY = { + overlay: +1, + selection: +1, + n: -1, + e: null, + s: +1, + w: null, + nw: -1, + ne: -1, + se: +1, + sw: +1 +}; + +function brush_type(t) { + return {type: t}; +} + +// Ignore right-click, since that should open the context menu. +function defaultFilter() { + return !d3_selection["event"].button; +} + +function defaultExtent() { + var svg = this.ownerSVGElement || this; + return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; +} + +// Like d3.local, but with the name “__brush” rather than auto-generated. +function local(node) { + while (!node.__brush) if (!(node = node.parentNode)) return; + return node.__brush; +} + +function empty(extent) { + return extent[0][0] === extent[1][0] + || extent[0][1] === extent[1][1]; +} + +function brushSelection(node) { + var state = node.__brush; + return state ? state.dim.output(state.selection) : null; +} + +function brushX() { + return brush_brush(X); +} + +function brushY() { + return brush_brush(Y); +} + +/* harmony default export */ var src_brush = (function() { + return brush_brush(XY); +}); + +function brush_brush(dim) { + var extent = defaultExtent, + filter = defaultFilter, + listeners = Object(d3_dispatch["dispatch"])(brush, "start", "brush", "end"), + handleSize = 6, + touchending; + + function brush(group) { + var overlay = group + .property("__brush", initialize) + .selectAll(".overlay") + .data([brush_type("overlay")]); + + overlay.enter().append("rect") + .attr("class", "overlay") + .attr("pointer-events", "all") + .attr("cursor", cursors.overlay) + .merge(overlay) + .each(function() { + var extent = local(this).extent; + Object(d3_selection["select"])(this) + .attr("x", extent[0][0]) + .attr("y", extent[0][1]) + .attr("width", extent[1][0] - extent[0][0]) + .attr("height", extent[1][1] - extent[0][1]); + }); + + group.selectAll(".selection") + .data([brush_type("selection")]) + .enter().append("rect") + .attr("class", "selection") + .attr("cursor", cursors.selection) + .attr("fill", "#777") + .attr("fill-opacity", 0.3) + .attr("stroke", "#fff") + .attr("shape-rendering", "crispEdges"); + + var handle = group.selectAll(".handle") + .data(dim.handles, function(d) { return d.type; }); + + handle.exit().remove(); + + handle.enter().append("rect") + .attr("class", function(d) { return "handle handle--" + d.type; }) + .attr("cursor", function(d) { return cursors[d.type]; }); + + group + .each(redraw) + .attr("fill", "none") + .attr("pointer-events", "all") + .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)") + .on("mousedown.brush touchstart.brush", started); + } + + brush.move = function(group, selection) { + if (group.selection) { + group + .on("start.brush", function() { emitter(this, arguments).beforestart().start(); }) + .on("interrupt.brush end.brush", function() { emitter(this, arguments).end(); }) + .tween("brush", function() { + var that = this, + state = that.__brush, + emit = emitter(that, arguments), + selection0 = state.selection, + selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), + i = Object(d3_interpolate["interpolate"])(selection0, selection1); + + function tween(t) { + state.selection = t === 1 && empty(selection1) ? null : i(t); + redraw.call(that); + emit.brush(); + } + + return selection0 && selection1 ? tween : tween(1); + }); + } else { + group + .each(function() { + var that = this, + args = arguments, + state = that.__brush, + selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), + emit = emitter(that, args).beforestart(); + + Object(d3_transition["interrupt"])(that); + state.selection = selection1 == null || empty(selection1) ? null : selection1; + redraw.call(that); + emit.start().brush().end(); + }); + } + }; + + function redraw() { + var group = Object(d3_selection["select"])(this), + selection = local(this).selection; + + if (selection) { + group.selectAll(".selection") + .style("display", null) + .attr("x", selection[0][0]) + .attr("y", selection[0][1]) + .attr("width", selection[1][0] - selection[0][0]) + .attr("height", selection[1][1] - selection[0][1]); + + group.selectAll(".handle") + .style("display", null) + .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) + .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) + .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) + .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); + } + + else { + group.selectAll(".selection,.handle") + .style("display", "none") + .attr("x", null) + .attr("y", null) + .attr("width", null) + .attr("height", null); + } + } + + function emitter(that, args) { + return that.__brush.emitter || new Emitter(that, args); + } + + function Emitter(that, args) { + this.that = that; + this.args = args; + this.state = that.__brush; + this.active = 0; + } + + Emitter.prototype = { + beforestart: function() { + if (++this.active === 1) this.state.emitter = this, this.starting = true; + return this; + }, + start: function() { + if (this.starting) this.starting = false, this.emit("start"); + return this; + }, + brush: function() { + this.emit("brush"); + return this; + }, + end: function() { + if (--this.active === 0) delete this.state.emitter, this.emit("end"); + return this; + }, + emit: function(type) { + Object(d3_selection["customEvent"])(new src_event(brush, type, dim.output(this.state.selection)), listeners.apply, listeners, [type, this.that, this.args]); + } + }; + + function started() { + if (d3_selection["event"].touches) { if (d3_selection["event"].changedTouches.length < d3_selection["event"].touches.length) return noevent(); } + else if (touchending) return; + if (!filter.apply(this, arguments)) return; + + var that = this, + type = d3_selection["event"].target.__data__.type, + mode = (d3_selection["event"].metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (d3_selection["event"].altKey ? MODE_CENTER : MODE_HANDLE), + signX = dim === Y ? null : signsX[type], + signY = dim === X ? null : signsY[type], + state = local(that), + extent = state.extent, + selection = state.selection, + W = extent[0][0], w0, w1, + N = extent[0][1], n0, n1, + E = extent[1][0], e0, e1, + S = extent[1][1], s0, s1, + dx, + dy, + moving, + shifting = signX && signY && d3_selection["event"].shiftKey, + lockX, + lockY, + point0 = Object(d3_selection["mouse"])(that), + point = point0, + emit = emitter(that, arguments).beforestart(); + + if (type === "overlay") { + state.selection = selection = [ + [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]], + [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0] + ]; + } else { + w0 = selection[0][0]; + n0 = selection[0][1]; + e0 = selection[1][0]; + s0 = selection[1][1]; + } + + w1 = w0; + n1 = n0; + e1 = e0; + s1 = s0; + + var group = Object(d3_selection["select"])(that) + .attr("pointer-events", "none"); + + var overlay = group.selectAll(".overlay") + .attr("cursor", cursors[type]); + + if (d3_selection["event"].touches) { + group + .on("touchmove.brush", moved, true) + .on("touchend.brush touchcancel.brush", ended, true); + } else { + var view = Object(d3_selection["select"])(d3_selection["event"].view) + .on("keydown.brush", keydowned, true) + .on("keyup.brush", keyupped, true) + .on("mousemove.brush", moved, true) + .on("mouseup.brush", ended, true); + + Object(d3_drag["dragDisable"])(d3_selection["event"].view); + } + + nopropagation(); + Object(d3_transition["interrupt"])(that); + redraw.call(that); + emit.start(); + + function moved() { + var point1 = Object(d3_selection["mouse"])(that); + if (shifting && !lockX && !lockY) { + if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true; + else lockX = true; + } + point = point1; + moving = true; + noevent(); + move(); + } + + function move() { + var t; + + dx = point[0] - point0[0]; + dy = point[1] - point0[1]; + + switch (mode) { + case MODE_SPACE: + case MODE_DRAG: { + if (signX) dx = Math.max(W - w0, Math.min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; + if (signY) dy = Math.max(N - n0, Math.min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; + break; + } + case MODE_HANDLE: { + if (signX < 0) dx = Math.max(W - w0, Math.min(E - w0, dx)), w1 = w0 + dx, e1 = e0; + else if (signX > 0) dx = Math.max(W - e0, Math.min(E - e0, dx)), w1 = w0, e1 = e0 + dx; + if (signY < 0) dy = Math.max(N - n0, Math.min(S - n0, dy)), n1 = n0 + dy, s1 = s0; + else if (signY > 0) dy = Math.max(N - s0, Math.min(S - s0, dy)), n1 = n0, s1 = s0 + dy; + break; + } + case MODE_CENTER: { + if (signX) w1 = Math.max(W, Math.min(E, w0 - dx * signX)), e1 = Math.max(W, Math.min(E, e0 + dx * signX)); + if (signY) n1 = Math.max(N, Math.min(S, n0 - dy * signY)), s1 = Math.max(N, Math.min(S, s0 + dy * signY)); + break; + } + } + + if (e1 < w1) { + signX *= -1; + t = w0, w0 = e0, e0 = t; + t = w1, w1 = e1, e1 = t; + if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); + } + + if (s1 < n1) { + signY *= -1; + t = n0, n0 = s0, s0 = t; + t = n1, n1 = s1, s1 = t; + if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); + } + + if (state.selection) selection = state.selection; // May be set by brush.move! + if (lockX) w1 = selection[0][0], e1 = selection[1][0]; + if (lockY) n1 = selection[0][1], s1 = selection[1][1]; + + if (selection[0][0] !== w1 + || selection[0][1] !== n1 + || selection[1][0] !== e1 + || selection[1][1] !== s1) { + state.selection = [[w1, n1], [e1, s1]]; + redraw.call(that); + emit.brush(); + } + } + + function ended() { + nopropagation(); + if (d3_selection["event"].touches) { + if (d3_selection["event"].touches.length) return; + if (touchending) clearTimeout(touchending); + touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! + group.on("touchmove.brush touchend.brush touchcancel.brush", null); + } else { + Object(d3_drag["dragEnable"])(d3_selection["event"].view, moving); + view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); + } + group.attr("pointer-events", "all"); + overlay.attr("cursor", cursors.overlay); + if (state.selection) selection = state.selection; // May be set by brush.move (on start)! + if (empty(selection)) state.selection = null, redraw.call(that); + emit.end(); + } + + function keydowned() { + switch (d3_selection["event"].keyCode) { + case 16: { // SHIFT + shifting = signX && signY; + break; + } + case 18: { // ALT + if (mode === MODE_HANDLE) { + if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; + if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; + mode = MODE_CENTER; + move(); + } + break; + } + case 32: { // SPACE; takes priority over ALT + if (mode === MODE_HANDLE || mode === MODE_CENTER) { + if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; + if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; + mode = MODE_SPACE; + overlay.attr("cursor", cursors.selection); + move(); + } + break; + } + default: return; + } + noevent(); + } + + function keyupped() { + switch (d3_selection["event"].keyCode) { + case 16: { // SHIFT + if (shifting) { + lockX = lockY = shifting = false; + move(); + } + break; + } + case 18: { // ALT + if (mode === MODE_CENTER) { + if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; + if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; + mode = MODE_HANDLE; + move(); + } + break; + } + case 32: { // SPACE + if (mode === MODE_SPACE) { + if (d3_selection["event"].altKey) { + if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; + if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; + mode = MODE_CENTER; + } else { + if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; + if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; + mode = MODE_HANDLE; + } + overlay.attr("cursor", cursors[type]); + move(); + } + break; + } + default: return; + } + noevent(); + } + } + + function initialize() { + var state = this.__brush || {selection: null}; + state.extent = extent.apply(this, arguments); + state.dim = dim; + return state; + } + + brush.extent = function(_) { + return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), brush) : extent; + }; + + brush.filter = function(_) { + return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), brush) : filter; + }; + + brush.handleSize = function(_) { + return arguments.length ? (handleSize = +_, brush) : handleSize; + }; + + brush.on = function() { + var value = listeners.on.apply(listeners, arguments); + return value === listeners ? brush : value; + }; + + return brush; +} + +// CONCATENATED MODULE: ./node_modules/d3-brush/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "brush", function() { return src_brush; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "brushX", function() { return brushX; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "brushY", function() { return brushY; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "brushSelection", function() { return brushSelection; }); + + + +/***/ }), +/* 77 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-dsv/src/dsv.js +var EOL = {}, + EOF = {}, + QUOTE = 34, + NEWLINE = 10, + RETURN = 13; + +function objectConverter(columns) { + return new Function("d", "return {" + columns.map(function(name, i) { + return JSON.stringify(name) + ": d[" + i + "]"; + }).join(",") + "}"); +} + +function customConverter(columns, f) { + var object = objectConverter(columns); + return function(row, i) { + return f(object(row), i, columns); + }; +} + +// Compute unique columns in order of discovery. +function inferColumns(rows) { + var columnSet = Object.create(null), + columns = []; + + rows.forEach(function(row) { + for (var column in row) { + if (!(column in columnSet)) { + columns.push(columnSet[column] = column); + } + } + }); + + return columns; +} + +/* harmony default export */ var dsv = (function(delimiter) { + var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), + DELIMITER = delimiter.charCodeAt(0); + + function parse(text, f) { + var convert, columns, rows = parseRows(text, function(row, i) { + if (convert) return convert(row, i - 1); + columns = row, convert = f ? customConverter(row, f) : objectConverter(row); + }); + rows.columns = columns || []; + return rows; + } + + function parseRows(text, f) { + var rows = [], // output rows + N = text.length, + I = 0, // current character index + n = 0, // current line number + t, // current token + eof = N <= 0, // current token followed by EOF? + eol = false; // current token followed by EOL? + + // Strip the trailing newline. + if (text.charCodeAt(N - 1) === NEWLINE) --N; + if (text.charCodeAt(N - 1) === RETURN) --N; + + function token() { + if (eof) return EOF; + if (eol) return eol = false, EOL; + + // Unescape quotes. + var i, j = I, c; + if (text.charCodeAt(j) === QUOTE) { + while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); + if ((i = I) >= N) eof = true; + else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + return text.slice(j + 1, i - 1).replace(/""/g, "\""); + } + + // Find next delimiter or newline. + while (I < N) { + if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; + else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } + else if (c !== DELIMITER) continue; + return text.slice(j, i); + } + + // Return last token before EOF. + return eof = true, text.slice(j, N); + } + + while ((t = token()) !== EOF) { + var row = []; + while (t !== EOL && t !== EOF) row.push(t), t = token(); + if (f && (row = f(row, n++)) == null) continue; + rows.push(row); + } + + return rows; + } + + function format(rows, columns) { + if (columns == null) columns = inferColumns(rows); + return [columns.map(formatValue).join(delimiter)].concat(rows.map(function(row) { + return columns.map(function(column) { + return formatValue(row[column]); + }).join(delimiter); + })).join("\n"); + } + + function formatRows(rows) { + return rows.map(formatRow).join("\n"); + } + + function formatRow(row) { + return row.map(formatValue).join(delimiter); + } + + function formatValue(text) { + return text == null ? "" + : reFormat.test(text += "") ? "\"" + text.replace(/"/g, "\"\"") + "\"" + : text; + } + + return { + parse: parse, + parseRows: parseRows, + format: format, + formatRows: formatRows + }; +}); + +// CONCATENATED MODULE: ./node_modules/d3-dsv/src/csv.js + + +var csv = dsv(","); + +var csvParse = csv.parse; +var csvParseRows = csv.parseRows; +var csvFormat = csv.format; +var csvFormatRows = csv.formatRows; + +// CONCATENATED MODULE: ./node_modules/d3-dsv/src/tsv.js + + +var tsv = dsv("\t"); + +var tsvParse = tsv.parse; +var tsvParseRows = tsv.parseRows; +var tsvFormat = tsv.format; +var tsvFormatRows = tsv.formatRows; + +// CONCATENATED MODULE: ./node_modules/d3-dsv/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dsvFormat", function() { return dsv; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "csvParse", function() { return csvParse; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "csvParseRows", function() { return csvParseRows; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "csvFormat", function() { return csvFormat; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "csvFormatRows", function() { return csvFormatRows; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tsvParse", function() { return tsvParse; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tsvParseRows", function() { return tsvParseRows; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tsvFormat", function() { return tsvFormat; }); +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "tsvFormatRows", function() { return tsvFormatRows; }); + + + + + +/***/ }), +/* 78 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// CONCATENATED MODULE: ./node_modules/d3-dispatch/src/dispatch.js +var noop = {value: function() {}}; + +function dispatch() { + for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { + if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t); + _[t] = []; + } + return new Dispatch(_); +} + +function Dispatch(_) { + this._ = _; +} + +function parseTypenames(typenames, types) { + return typenames.trim().split(/^|\s+/).map(function(t) { + var name = "", i = t.indexOf("."); + if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); + if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); + return {type: t, name: name}; + }); +} + +Dispatch.prototype = dispatch.prototype = { + constructor: Dispatch, + on: function(typename, callback) { + var _ = this._, + T = parseTypenames(typename + "", _), + t, + i = -1, + n = T.length; + + // If no callback was specified, return the callback of the given type and name. + if (arguments.length < 2) { + while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; + return; + } + + // If a type was specified, set the callback for the given type and name. + // Otherwise, if a null callback was specified, remove callbacks of the given name. + if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); + while (++i < n) { + if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); + else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); + } + + return this; + }, + copy: function() { + var copy = {}, _ = this._; + for (var t in _) copy[t] = _[t].slice(); + return new Dispatch(copy); + }, + call: function(type, that) { + if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + }, + apply: function(type, that, args) { + if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); + for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); + } +}; + +function get(type, name) { + for (var i = 0, n = type.length, c; i < n; ++i) { + if ((c = type[i]).name === name) { + return c.value; + } + } +} + +function set(type, name, callback) { + for (var i = 0, n = type.length; i < n; ++i) { + if (type[i].name === name) { + type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); + break; + } + } + if (callback != null) type.push({name: name, value: callback}); + return type; +} + +/* harmony default export */ var src_dispatch = (dispatch); + +// CONCATENATED MODULE: ./node_modules/d3-dispatch/index.js +/* concated harmony reexport */__webpack_require__.d(__webpack_exports__, "dispatch", function() { return src_dispatch; }); + + + +/***/ }) +/******/ ]); +}); \ No newline at end of file diff --git a/dist/billboard.pkgd.min.js b/dist/billboard.pkgd.min.js new file mode 100644 index 000000000..ef0fdb035 --- /dev/null +++ b/dist/billboard.pkgd.min.js @@ -0,0 +1,13 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + * + * All-in-one packaged file for ease use of 'billboard.js' with below dependency. + * - d3 ^5.5.0 + */ +!function webpackUniversalModuleDefinition(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,function(){return function(t){var e={};function __webpack_require__(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,__webpack_require__),i.l=!0,i.exports}return __webpack_require__.m=t,__webpack_require__.c=e,__webpack_require__.d=function(t,e,n){__webpack_require__.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,e){if(1&e&&(t=__webpack_require__(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(__webpack_require__.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)__webpack_require__.d(n,i,function(e){return t[e]}.bind(null,i));return n},__webpack_require__.n=function(t){var e=t&&t.__esModule?function getDefault(){return t["default"]}:function getModuleExports(){return t};return __webpack_require__.d(e,"a",e),e},__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,e,n){"use strict";e.__esModule=!0,e.bb=undefined;var i=_interopRequireDefault(n(1)),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(4));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var o={version:"1.6.0",generate:function generate(t){var e=new i["default"](t);return e.internal.charts=this.instance,this.instance.push(e),e},instance:[],chart:{fn:i["default"].prototype,internal:{fn:r["default"].prototype,axis:{fn:a["default"].prototype}}}};n(9),n(11),n(12),n(13),n(14),n(15),n(16),n(17),n(18),n(19),n(20),n(21),n(22),n(23),n(24),n(25),n(26),n(27),n(28),n(29),n(30),n(31),n(32),n(33),n(34),n(35),n(36),n(37),n(38),n(39),n(40),n(41),n(42),n(43),n(44),n(45),n(46),n(47),n(48),n(49),n(50),n(51),n(52),n(53),n(54),n(55),n(56),n(57),n(58),n(60),n(5),n(61),n(62),e.bb=o,e["default"]=o},function(t,e,n){"use strict";e.__esModule=!0;var i=_interopRequireDefault(n(2)),r=_interopRequireDefault(n(3));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}e["default"]=function Chart(t){(0,i["default"])(this,Chart);var e=new r["default"](this);this.internal=e,e.loadConfig(t),e.beforeInit(t),e.init(),this.$=e.getChartElements(),e.afterInit(t),function bindThis(t,e,n){Object.keys(t).forEach(function(i){e[i]=t[i].bind(n),Object.keys(t[i]).length&&bindThis(t[i],e[i],n)})}(Chart.prototype,this,this)},t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var i=_interopRequireDefault(n(2)),r=n(75),a=n(64),o=n(66),s=n(67),u=_interopRequireDefault(n(4)),l=_interopRequireDefault(n(8)),c=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var d=function(){function ChartInternal(t){(0,i["default"])(this,ChartInternal);var e=this;e.api=t,e.config=e.getOptions(),e.data={},e.cache={},e.axes={}}return ChartInternal.prototype.beforeInit=function beforeInit(){var t=this.config;(0,c.callFn)(t.onbeforeinit,this)},ChartInternal.prototype.afterInit=function afterInit(){var t=this.config;(0,c.callFn)(t.onafterinit,this)},ChartInternal.prototype.init=function init(){var t=this,e=t.config,n=void 0;if(t.initParams(),e.data_url)t.convertUrlToData(e.data_url,e.data_mimeType,e.data_headers,e.data_keys,t.initWithData);else if(e.data_json)n=t.convertJsonToData(e.data_json,e.data_keys);else if(e.data_rows)n=t.convertRowsToData(e.data_rows);else{if(!e.data_columns)throw Error("url or json or rows or columns is required.");n=t.convertColumnsToData(e.data_columns)}n&&t.initWithData(n)},ChartInternal.prototype.initParams=function initParams(){var t=this,e=t.config,n=e.axis_rotated;t.datetimeId="bb-"+ +new Date,t.clipId=t.datetimeId+"-clip",t.clipIdForXAxis=t.clipId+"-xaxis",t.clipIdForYAxis=t.clipId+"-yaxis",t.clipIdForGrid=t.clipId+"-grid",t.clipIdForSubchart=t.clipId+"-subchart",t.clipPath=t.getClipPath(t.clipId),t.clipPathForXAxis=t.getClipPath(t.clipIdForXAxis),t.clipPathForYAxis=t.getClipPath(t.clipIdForYAxis),t.clipPathForGrid=t.getClipPath(t.clipIdForGrid),t.clipPathForSubchart=t.getClipPath(t.clipIdForSubchart),t.dragStart=null,t.dragging=!1,t.flowing=!1,t.cancelClick=!1,t.mouseover=!1,t.transiting=!1,t.color=t.generateColor(),t.levelColor=t.generateLevelColor(),t.point=t.generatePoint(),t.extraLineClasses=t.generateExtraLineClass(),t.dataTimeFormat=e.data_xLocaltime?r.timeParse:r.utcParse,t.axisTimeFormat=e.axis_x_localtime?r.timeFormat:r.utcFormat,t.defaultAxisTimeFormat=function(e){var n=(e.getMilliseconds()?".%L":e.getSeconds()&&".:%S")||e.getMinutes()&&"%I:%M"||e.getHours()&&"%I %p"||e.getDay()&&1!==e.getDate()&&"%-m/%-d"||1!==e.getDate()&&"%b %d"||e.getMonth()&&"%-m/%-d"||"%Y/%-m/%-d";return t.axisTimeFormat(n)(e)},t.hiddenTargetIds=[],t.hiddenLegendIds=[],t.focusedTargetIds=[],t.defocusedTargetIds=[],t.xOrient=n?"left":"bottom",t.yOrient=n?e.axis_y_inner?"top":"bottom":e.axis_y_inner?"right":"left",t.y2Orient=n?e.axis_y2_inner?"bottom":"top":e.axis_y2_inner?"left":"right",t.subXOrient=n?"left":"bottom",t.isLegendRight="right"===e.legend_position,t.isLegendInset="inset"===e.legend_position,t.isLegendTop="top-left"===e.legend_inset_anchor||"top-right"===e.legend_inset_anchor,t.isLegendLeft="top-left"===e.legend_inset_anchor||"bottom-left"===e.legend_inset_anchor,t.legendStep=0,t.legendItemWidth=0,t.legendItemHeight=0,t.currentMaxTickWidths={x:0,y:0,y2:0},t.rotated_padding_left=30,t.rotated_padding_right=n&&!e.axis_x_show?0:30,t.rotated_padding_top=5,t.withoutFadeIn={},t.inputType=t.convertInputType(),t.axes.subx=(0,a.selectAll)([])},ChartInternal.prototype.initWithData=function initWithData(t){var e=this,n=e.config;e.axis=new u["default"](e),n.subchart_show&&e.initBrush(),n.zoom_enabled&&(e.initZoom(),e.initZoomBehaviour());var i={element:n.bindto,classname:"bb"};if((0,c.isObject)(n.bindto)&&(i.element=n.bindto.element||"#chart",i.classname=n.bindto.classname||i.classname),e.selectChart=(0,c.isFunction)(i.element.node)?n.bindto.element:(0,a.select)(i.element?i.element:[]),e.selectChart.html("").classed(i.classname,!0),e.data.xs={},e.data.targets=e.convertDataToTargets(t),n.data_filter&&(e.data.targets=e.data.targets.filter(n.data_filter)),n.data_hide&&e.addHiddenTargetIds(!0===n.data_hide?e.mapToIds(e.data.targets):n.data_hide),n.legend_hide&&e.addHiddenLegendIds(!0===n.legend_hide?e.mapToIds(e.data.targets):n.legend_hide),e.hasType("gauge")&&(n.legend_show=!1),e.updateSizes(),e.updateScales(),e.x.domain((0,o.extent)(e.getXDomain(e.data.targets))),e.y.domain(e.getYDomain(e.data.targets,"y")),e.y2.domain(e.getYDomain(e.data.targets,"y2")),e.subX.domain(e.x.domain()),e.subY.domain(e.y.domain()),e.subY2.domain(e.y2.domain()),e.orgXDomain=e.x.domain(),e.svg=e.selectChart.append("svg").style("overflow","hidden").style("display","block"),n.interaction_enabled&&e.inputType){var r="touch"===e.inputType;e.svg.on(r?"touchstart":"mouseenter",function(){return(0,c.callFn)(n.onover,e)}).on(r?"touchend":"mouseleave",function(){return(0,c.callFn)(n.onout,e)})}n.svg_classname&&e.svg.attr("class",n.svg_classname),e.defs=e.svg.append("defs"),e.clipChart=e.appendClip(e.defs,e.clipId),e.clipXAxis=e.appendClip(e.defs,e.clipIdForXAxis),e.clipYAxis=e.appendClip(e.defs,e.clipIdForYAxis),e.clipGrid=e.appendClip(e.defs,e.clipIdForGrid),e.clipSubchart=e.appendClip(e.defs,e.clipIdForSubchart),(0,c.isFunction)(n.color_tiles)&&e.patterns&&e.patterns.forEach(function(t){return e.defs.append(function(){return t.node})}),e.updateSvgSize();var s=e.svg.append("g").attr("transform",e.getTranslate("main"));if(e.main=s,n.subchart_show&&e.initSubchart&&e.initSubchart(),e.initTooltip&&e.initTooltip(),e.initLegend&&e.initLegend(),e.initTitle&&e.initTitle(),s.append("text").attr("class",l["default"].text+" "+l["default"].empty).attr("text-anchor","middle").attr("dominant-baseline","middle"),e.initRegion(),e.initGrid(),n.clipPath||e.axis.init(),s.append("g").attr("class",l["default"].chart).attr("clip-path",e.clipPath),n.grid_lines_front&&e.initGridLines(),n.grid_front&&e.initXYFocusGrid(),e.initEventRect(),e.initChartElements(),s.insert("rect",n.zoom_privileged?null:"g."+l["default"].regions).attr("class",l["default"].zoomRect).attr("width",e.width).attr("height",e.height).style("opacity","0").on("dblclick.zoom",null),n.axis_x_extent&&e.brush.scale(e.getDefaultExtent()),n.clipPath&&e.axis.init(),e.updateTargets(e.data.targets),e.updateDimension(),n.oninit.call(e),e.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),n.data_onmin||n.data_onmax){var d=e.getMinMaxData();(0,c.callFn)(n.data_onmin,e,d.min),(0,c.callFn)(n.data_onmax,e,d.max)}e.bindResize(),e.api.element=e.selectChart.node()},ChartInternal.prototype.initChartElements=function initChartElements(){var t=this;["Pie","Bar","Line","Arc","Gauge","Bubble","Radar","Text"].forEach(function(e){var n="init"+e;t[n]&&t[n]()})},ChartInternal.prototype.getChartElements=function getChartElements(){var t=this;return{chart:t.selectChart,svg:t.svg,defs:t.defs,main:t.main,tooltip:t.tooltip,legend:t.legend,title:t.title,grid:t.grid,arc:t.arcs,bar:{bars:t.mainBar},line:{lines:t.mainLine,areas:t.mainArea,circles:t.mainCircle},text:{texts:t.texts}}},ChartInternal.prototype.smoothLines=function smoothLines(t,e){"grid"===e&&t.each(function(){var t=(0,a.select)(this),e=["x1","x2","y1","y2"].map(function(e){return Math.ceil(t.attr(e))}),n=e[0],i=e[1],r=e[2],o=e[3];t.attr({x1:n,x2:i,y1:r,y2:o})})},ChartInternal.prototype.updateSizes=function updateSizes(){var t=this,e=t.config,n=e.axis_rotated,i=t.hasArcType(),r=t.legend?t.getLegendHeight():0,a=t.legend?t.getLegendWidth():0,o=t.isLegendRight||t.isLegendInset?0:r,s=n||i?0:t.getHorizontalAxisHeight("x"),u=e.subchart_show&&!i?e.subchart_size_height+s:0;t.currentWidth=t.getCurrentWidth(),t.currentHeight=t.getCurrentHeight(),t.margin=n?{top:t.getHorizontalAxisHeight("y2")+t.getCurrentPaddingTop(),right:i?0:t.getCurrentPaddingRight(),bottom:t.getHorizontalAxisHeight("y")+o+t.getCurrentPaddingBottom(),left:u+(i?0:t.getCurrentPaddingLeft())}:{top:4+t.getCurrentPaddingTop(),right:i?0:t.getCurrentPaddingRight(),bottom:s+u+o+t.getCurrentPaddingBottom(),left:i?0:t.getCurrentPaddingLeft()},t.margin2=n?{top:t.margin.top,right:NaN,bottom:20+o,left:t.rotated_padding_left}:{top:t.currentHeight-u-o,right:NaN,bottom:s+o,left:t.margin.left},t.margin3={top:0,right:NaN,bottom:0,left:0},t.updateSizeForLegend&&t.updateSizeForLegend(r,a),t.width=t.currentWidth-t.margin.left-t.margin.right,t.height=t.currentHeight-t.margin.top-t.margin.bottom,t.width<0&&(t.width=0),t.height<0&&(t.height=0),t.width2=n?t.margin.left-t.rotated_padding_left-t.rotated_padding_right:t.width,t.height2=n?t.height:t.currentHeight-t.margin2.top-t.margin2.bottom,t.width2<0&&(t.width2=0),t.height2<0&&(t.height2=0),t.arcWidth=t.width-(t.isLegendRight?a+10:0),t.arcHeight=t.height-(t.isLegendRight?0:10),t.hasType("gauge")&&!e.gauge_fullCircle&&(t.arcHeight+=t.height-t.getGaugeLabelHeight()),t.updateRadius&&t.updateRadius(),t.isLegendRight&&i&&(t.margin3.left=t.arcWidth/2+1.1*t.radiusExpanded)},ChartInternal.prototype.updateTargets=function updateTargets(t){var e=this;e.updateTargetsForText(t),e.updateTargetsForBar(t),e.updateTargetsForLine(t),e.hasArcType(t)&&(e.hasType("radar")?e.updateTargetsForRadar(t):e.updateTargetsForArc(t)),e.updateTargetsForSubchart&&e.updateTargetsForSubchart(t),e.showTargets()},ChartInternal.prototype.showTargets=function showTargets(){var t=this;t.svg.selectAll("."+l["default"].target).filter(function(e){return t.isTargetToShow(e.id)}).transition().duration(t.config.transition_duration).style("opacity","1")},ChartInternal.prototype.getWithOption=function getWithOption(t){var e={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};return Object.keys(e).forEach(function(n){var i=e[n];(0,c.isString)(i)&&(i=e[i]),e[n]=(0,c.getOption)(t,"with"+n,i)}),e},ChartInternal.prototype.redraw=function redraw(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments[1],n=this,i=n.main,r=n.config,o=r.axis_rotated,u=n.hasType("radar"),d=n.getShapeIndices(n.isAreaType),f=n.getShapeIndices(n.isBarType),h=n.getShapeIndices(n.isLineType),g=n.hasArcType(),p=n.filterTargetsToShow(n.data.targets),_=n.xv.bind(n),m=void 0,x=void 0,v=void 0,y=n.getWithOption(t),b=y.Transition?r.transition_duration:0,T=y.TransitionForExit?b:0,w=y.TransitionForAxis?b:0,A=e||n.axis.generateTransitions(w);if(t.initializing&&r.tooltip_init_show||"touch"!==n.inputType||n.hideTooltip(),y.Legend&&r.legend_show&&!r.legend_contents_bindto?n.updateLegend(n.mapToIds(n.data.targets),t,A):y.Dimension&&n.updateDimension(!0),n.isCategorized()&&0===p.length&&n.x.domain([0,n.axes.x.selectAll(".tick").size()]),p.length?(n.updateXDomain(p,y.UpdateXDomain,y.UpdateOrgXDomain,y.TrimXDomain),!r.axis_x_tick_values&&(m=n.axis.updateXAxisTickValues(p))):(n.xAxis.tickValues([]),n.subXAxis.tickValues([])),r.zoom_rescale&&!t.flow&&(v=n.x.orgDomain()),["y","y2"].forEach(function(t){var e=n[t],i=r["axis_"+t+"_tick_values"],a=r["axis_"+t+"_tick_count"];if(e.domain(n.getYDomain(p,t,v)),!i&&a){var o=e.domain();n[t+"Axis"].tickValues(n.axis.generateTickValues(o,o.every(function(t){return 0===t})?1:a,n.isTimeSeriesY()))}}),n.axis.redraw(A,g),n.axis.updateLabels(y.Transition),(y.UpdateXDomain||y.UpdateXAxis)&&p.length)if(r.axis_x_tick_culling&&m){for(var M=1;M<m.length;M++)if(m.length/M<r.axis_x_tick_culling_max){x=M;break}n.svg.selectAll("."+l["default"].axisX+" .tick text").each(function(t){var e=m.indexOf(t);e>=0&&(0,a.select)(this).style("display",e%x?"none":"block")})}else n.svg.selectAll("."+l["default"].axisX+" .tick text").style("display","block");var C=n.generateDrawArea?n.generateDrawArea(d,!1):undefined,S=n.generateDrawBar?n.generateDrawBar(f):undefined,D=n.generateDrawLine?n.generateDrawLine(h,!1):undefined,k=n.generateXYForText(d,f,h,!0),L=n.generateXYForText(d,f,h,!1);y.Y&&(n.subY.domain(n.getYDomain(p,"y")),n.subY2.domain(n.getYDomain(p,"y2"))),n.updateXgridFocus(),i.select("text."+l["default"].text+"."+l["default"].empty).attr("x",n.width/2).attr("y",n.height/2).text(r.data_empty_label_text).transition().style("opacity",p.length?0:1),n.updateGrid(b),n.updateRegion(b),n.updateBar(T),n.updateLine(T),n.updateArea(T),n.updateCircle(),n.hasDataLabel()&&n.updateText(T),n.redrawTitle&&n.redrawTitle(),n.redrawArc&&n.redrawArc(b,T,y.Transform),u&&n.redrawRadar(b,T),r.subchart_show&&n.redrawSubchart&&n.redrawSubchart(y.Subchart,A,b,T,d,f,h),i.selectAll("."+l["default"].selectedCircles).filter(n.isBarType.bind(n)).selectAll("circle").remove(),r.interaction_enabled&&!t.flow&&y.EventRect&&(n.redrawEventRect(),n.bindZoomEvent()),n.updateCircleY();var R=(u?n.radarCircleX:o?n.circleY:n.circleX).bind(n),F=(u?n.radarCircleY:o?n.circleX:n.circleY).bind(n),O=t.flow&&n.generateFlow({targets:p,flow:t.flow,duration:t.flow.duration,drawBar:S,drawLine:D,drawArea:C,cx:R,cy:F,xv:_,xForText:k,yForText:L}),I=(b||O)&&n.isTabVisible(),E=[n.redrawBar(S,I),n.redrawLine(D,I),n.redrawArea(C,I),n.redrawCircle(R,F,I,O),n.redrawText(k,L,t.flow,I),n.redrawRegion(I),n.redrawGrid(I)],X=O||r.onrendered?function(){O&&O(),(0,c.callFn)(r.onrendered,n)}:null;if(X)if(I){var z=n.generateWait();(0,s.transition)().duration(b).each(function(){E.reduce(function(t,e){return t.concat(e)},[]).forEach(function(t){return z.add(t)})}).call(z,X)}else X();n.mapToIds(n.data.targets).forEach(function(t){n.withoutFadeIn[t]=!0})},ChartInternal.prototype.updateAndRedraw=function updateAndRedraw(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=this,n=e.config,i=void 0;t.withTransition=(0,c.getOption)(t,"withTransition",!0),t.withTransform=(0,c.getOption)(t,"withTransform",!1),t.withLegend=(0,c.getOption)(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=(0,c.getOption)(t,"withTransitionForTransform",t.withTransition),e.updateSizes(),t.withLegend&&n.legend_show||(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t,i)},ChartInternal.prototype.redrawWithoutRescale=function redrawWithoutRescale(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})},ChartInternal.prototype.isTimeSeries=function isTimeSeries(){return"timeseries"===this.config.axis_x_type},ChartInternal.prototype.isCategorized=function isCategorized(){return this.config.axis_x_type.indexOf("category")>=0||this.hasType("radar")},ChartInternal.prototype.isCustomX=function isCustomX(){var t=this.config;return!this.isTimeSeries()&&(t.data_x||(0,c.notEmpty)(t.data_xs))},ChartInternal.prototype.isTimeSeriesY=function isTimeSeriesY(){return"timeseries"===this.config.axis_y_type},ChartInternal.prototype.getTranslate=function getTranslate(t){var e=this,n=e.config.axis_rotated,i=void 0,r=void 0;if("main"===t)i=(0,c.asHalfPixel)(e.margin.left),r=(0,c.asHalfPixel)(e.margin.top);else if("context"===t)i=(0,c.asHalfPixel)(e.margin2.left),r=(0,c.asHalfPixel)(e.margin2.top);else if("legend"===t)i=e.margin3.left,r=e.margin3.top;else if("x"===t)i=0,r=n?0:e.height;else if("y"===t)i=0,r=n?e.height:0;else if("y2"===t)i=n?0:e.width,r=n?1:0;else if("subx"===t)i=0,r=n?0:e.height2;else if("arc"===t)i=e.arcWidth/2,r=e.arcHeight/2;else if("radar"===t){var a=(e.arcWidth-e.arcHeight)/2;i=Math.max(a,0)+4,r=a<0?Math.abs(a):(0,c.asHalfPixel)(e.margin.top)}return"translate("+i+", "+r+")"},ChartInternal.prototype.initialOpacity=function initialOpacity(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?"1":"0"},ChartInternal.prototype.initialOpacityForCircle=function initialOpacityForCircle(t){return null!==this.getBaseValue(t)&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):"0"},ChartInternal.prototype.opacityForCircle=function opacityForCircle(t){var e=this.config.point_show?"1":"0";return(0,c.isValue)(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":e:"0"},ChartInternal.prototype.opacityForText=function opacityForText(){return this.hasDataLabel()?"1":"0"},ChartInternal.prototype.xx=function xx(t){var e=this.config.zoom_enabled&&this.zoomScale?this.zoomScale:this.x;return t?e(t.x):null},ChartInternal.prototype.xv=function xv(t){var e=this,n=e.getBaseValue(t);return e.isTimeSeries()?n=e.parseDate(n):e.isCategorized()&&(0,c.isString)(n)&&(n=e.config.axis_x_categories.indexOf(n)),Math.ceil(e.x(n))},ChartInternal.prototype.yv=function yv(t){var e=t.axis&&"y2"===t.axis?this.y2:this.y;return Math.ceil(e(this.getBaseValue(t)))},ChartInternal.prototype.subxx=function subxx(t){return t?this.subX(t.x):null},ChartInternal.prototype.transformMain=function transformMain(t,e){var n=this,i=void 0,r=void 0,a=void 0;e&&e.axisX?i=e.axisX:(i=n.main.select("."+l["default"].axisX),t&&(i=i.transition())),e&&e.axisY?r=e.axisY:(r=n.main.select("."+l["default"].axisY),t&&(r=r.transition())),e&&e.axisY2?a=e.axisY2:(a=n.main.select("."+l["default"].axisY2),t&&(a=a.transition())),(t?n.main.transition():n.main).attr("transform",n.getTranslate("main")),i.attr("transform",n.getTranslate("x")),r.attr("transform",n.getTranslate("y")),a.attr("transform",n.getTranslate("y2")),n.main.select("."+l["default"].chartArcs).attr("transform",n.getTranslate("arc"))},ChartInternal.prototype.transformAll=function transformAll(t,e){var n=this;n.transformMain(t,e),n.config.subchart_show&&n.transformContext(t,e),n.legend&&n.transformLegend(t)},ChartInternal.prototype.updateSvgSize=function updateSvgSize(){var t=this,e=t.svg.select("."+l["default"].brush+" .overlay"),n=e.size()?e.attr("height"):0;t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#"+t.clipId,"#"+t.clipIdForGrid]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#"+t.clipIdForXAxis).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForYAxis).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#"+t.clipIdForSubchart).select("rect").attr("width",t.width).attr("height",n),t.svg.select("."+l["default"].zoomRect).attr("width",t.width).attr("height",t.height),t.brush&&t.brush.scale(t.subX,n)},ChartInternal.prototype.updateDimension=function updateDimension(t){var e=this;t||(e.config.axis_rotated?(e.axes.x.call(e.xAxis),e.axes.subx.call(e.subXAxis)):(e.axes.y.call(e.yAxis),e.axes.y2.call(e.y2Axis))),e.updateSizes(),e.updateScales(t),e.updateSvgSize(),e.transformAll(!1)},ChartInternal.prototype.bindResize=function bindResize(){var t=this,e=t.config;t.resizeFunction=t.generateResize(),t.resizeFunction.add(function(){return e.onresize.call(t)}),e.resize_auto&&t.resizeFunction.add(function(){(0,c.isDefined)(t.resizeTimeout)&&window.clearTimeout(t.resizeTimeout),t.resizeTimeout=window.setTimeout(function(){delete t.resizeTimeout,t.api.flush()},100)}),t.resizeFunction.add(function(){return e.onresized.call(t)});var n=(0,a.select)(window).on("resize.bb");n&&t.resizeFunction.add(n),(0,a.select)(window).on("resize.bb",t.resizeFunction)},ChartInternal.prototype.generateResize=function generateResize(){function callResizeFunctions(){t.forEach(function(t){return t()})}var t=[];return callResizeFunctions.add=function(e){t.push(e)},callResizeFunctions.remove=function(e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e){t.splice(n,1);break}},callResizeFunctions},ChartInternal.prototype.endall=function endall(t,e){var n=0;t.each(function(){return++n}).on("end",function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];--n||e.apply.apply(e,[this].concat(i))})},ChartInternal.prototype.generateWait=function generateWait(){var t=[],e=function(e,n){var i=void 0;!function loop(){var e=0;t.forEach(function(t){if(t.empty())e++;else try{t.transition()}catch(n){e++}}),i&&clearTimeout(i),e===t.length?n&&n():i=setTimeout(loop,50)}()};return e.add=function(e){(0,c.isArray)(e)?t=t.concat(e):t.push(e)},e},ChartInternal.prototype.parseDate=function parseDate(t){var e=void 0;return t instanceof Date?e=t:(0,c.isString)(t)?e=this.dataTimeFormat(this.config.data_xFormat)(t):(0,c.isNumber)(t)&&!isNaN(t)&&(e=new Date(+t)),(!e||isNaN(+e))&&console&&console.error&&console.error("Failed to parse x '"+t+"' to Date object"),e},ChartInternal.prototype.isTabVisible=function isTabVisible(){return!document[["hidden","mozHidden","msHidden","webkitHidden"].filter(function(t){return t in document})[0]]},ChartInternal.prototype.convertInputType=function convertInputType(){var t=this.config,e=this.isMobile(),n=t.interaction_inputType_mouse&&!e&&"onmouseover"in window,i=!1;return t.interaction_inputType_touch&&(i="ontouchmove"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),(n?"mouse":i&&"touch")||null},ChartInternal}();e["default"]=d,t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0;var i=_interopRequireDefault(n(2)),r=_interopRequireDefault(n(5)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t,e){var n=t.config.axis_rotated;return e?n:!n},u=function(){function Axis(t){(0,i["default"])(this,Axis),this.owner=t}return Axis.prototype.init=function init(){var t=this,e=this.owner,n=e.config,i=n.axis_rotated,r=e.main;["x","y","y2"].forEach(function(s){var u="axis"+(0,o.capitalize)(s),l=a["default"].axis+" "+a["default"][u],c=a["default"][u+"Label"];e.axes[s]=r.append("g").attr("class",l).attr("clip-path",function(){var t=null;return"x"===s?t=e.clipPathForXAxis:"y"===s&&n.axis_y_inner&&(t=e.clipPathForYAxis),t}).attr("transform",e.getTranslate(s)).style("visibility",n["axis_"+s+"_show"]?"visible":"hidden"),e.axes[s].append("text").attr("class",c).attr("transform",["rotate(-90)",null]["x"===s?+!i:+i]).style("text-anchor",t.textAnchorForXAxisLabel.bind(t))})},Axis.prototype.getXAxis=function getXAxis(t,e,n,i,a,s,u,l){var c=this.owner,d=c.config,f=c.isCategorized(),h={isCategory:f,withOuterTick:s,withoutTransition:u,config:d,axisName:t,tickMultiline:d.axis_x_tick_multiline,tickWidth:d.axis_x_tick_width,tickTextRotate:l?0:d.axis_x_tick_rotate,tickTitle:f&&d.axis_x_tick_tooltip&&c.api.categories(),orgXScale:c.x},g=(0,r["default"])(h).scale(c.zoomScale||e).orient(n),p=a;return c.isTimeSeries()&&a&&!(0,o.isFunction)(a)&&(p=a.map(function(t){return c.parseDate(t)})),g.tickFormat(i).tickValues(p),f&&(g.tickCentered(d.axis_x_tick_centered),(0,o.isEmpty)(d.axis_x_tick_culling)&&(d.axis_x_tick_culling=!1)),g},Axis.prototype.getYAxis=function getYAxis(t,e,n,i,a,o,s,u){var l=this.owner,c=l.config,d={withOuterTick:o,withoutTransition:s,config:c,axisName:t,tickTextRotate:u?0:c.axis_y_tick_rotate},f=(0,r["default"])(d).scale(e).orient(n).tickFormat(i);return l.isTimeSeriesY()?f.ticks(c.axis_y_tick_time_value):f.tickValues(a),f},Axis.prototype.updateXAxisTickValues=function updateXAxisTickValues(t,e){var n=this.owner,i=n.config,r=i.axis_x_tick_count,a=void 0;return(i.axis_x_tick_fit||r)&&(a=this.generateTickValues(n.mapTargetsToUniqueXs(t),r,n.isTimeSeries())),e?e.tickValues(a):(n.xAxis.tickValues(a),n.subXAxis.tickValues(a)),a},Axis.prototype.getId=function getId(t){var e=this.owner.config;return t in e.data_axes?e.data_axes[t]:"y"},Axis.prototype.getXAxisTickFormat=function getXAxisTickFormat(){var t=this.owner,e=t.config.axis_x_tick_format,n=t.isTimeSeries(),i=t.isCategorized(),r=void 0;return e?(0,o.isFunction)(e)?r=e:n&&(r=function(n){return n?t.axisTimeFormat(e)(n):""}):r=n?t.defaultAxisTimeFormat:i?t.categoryName:function(t){return t<0?t.toFixed(0):t},(0,o.isFunction)(r)?function(e){return r.apply(t,i?[e,t.categoryName(e)]:[e])}:r},Axis.prototype.getTickValues=function getTickValues(t){var e=this.owner,n=e.config["axis_"+t+"_tick_values"],i=e[t+"Axis"];return n||(i?i.tickValues():undefined)},Axis.prototype.getXAxisTickValues=function getXAxisTickValues(){return this.getTickValues("x")},Axis.prototype.getYAxisTickValues=function getYAxisTickValues(){return this.getTickValues("y")},Axis.prototype.getY2AxisTickValues=function getY2AxisTickValues(){return this.getTickValues("y2")},Axis.prototype.getLabelOptionByAxisId=function getLabelOptionByAxisId(t){return this.owner.config["axis_"+t+"_label"]},Axis.prototype.getLabelText=function getLabelText(t){var e=this.getLabelOptionByAxisId(t);return(0,o.isString)(e)?e:e?e.text:null},Axis.prototype.setLabelText=function setLabelText(t,e){var n=this.owner.config,i=this.getLabelOptionByAxisId(t);(0,o.isString)(i)?n["axis_"+t+"_label"]=e:i&&(i.text=e)},Axis.prototype.getLabelPosition=function getLabelPosition(t,e){var n=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(t),r=(0,o.isObjectType)(i)&&i.position?i.position:e[+!n],a=function(t){return!!~r.indexOf(t)};return{isInner:a("inner"),isOuter:a("outer"),isLeft:a("left"),isCenter:a("center"),isRight:a("right"),isTop:a("top"),isMiddle:a("middle"),isBottom:a("bottom")}},Axis.prototype.getXAxisLabelPosition=function getXAxisLabelPosition(){return this.getLabelPosition("x",["inner-top","inner-right"])},Axis.prototype.getYAxisLabelPosition=function getYAxisLabelPosition(){return this.getLabelPosition("y",["inner-right","inner-top"])},Axis.prototype.getY2AxisLabelPosition=function getY2AxisLabelPosition(){return this.getLabelPosition("y2",["inner-right","inner-top"])},Axis.prototype.getLabelPositionById=function getLabelPositionById(t){return this["get"+t.toUpperCase()+"AxisLabelPosition"]()},Axis.prototype.textForXAxisLabel=function textForXAxisLabel(){return this.getLabelText("x")},Axis.prototype.textForYAxisLabel=function textForYAxisLabel(){return this.getLabelText("y")},Axis.prototype.textForY2AxisLabel=function textForY2AxisLabel(){return this.getLabelText("y2")},Axis.prototype.xForAxisLabel=function xForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],n=this.owner,i=t.isMiddle?-n.height/2:0;return s(n,e)?i=t.isLeft?0:t.isCenter?n.width/2:n.width:t.isBottom&&(i=-n.height),i},Axis.prototype.dxForAxisLabel=function dxForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],n=this.owner,i=t.isBottom?"0.5em":"0";return s(n,e)?i=t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop&&(i="-0.5em"),i},Axis.prototype.textAnchorForAxisLabel=function textAnchorForAxisLabel(t){var e=!(arguments.length>1&&arguments[1]!==undefined)||arguments[1],n=this.owner,i=t.isMiddle?"middle":"end";return s(n,e)?i=t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom&&(i="start"),i},Axis.prototype.xForXAxisLabel=function xForXAxisLabel(){return this.xForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.xForYAxisLabel=function xForYAxisLabel(){return this.xForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.xForY2AxisLabel=function xForY2AxisLabel(){return this.xForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.dxForXAxisLabel=function dxForXAxisLabel(){return this.dxForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.dxForYAxisLabel=function dxForYAxisLabel(){return this.dxForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.dxForY2AxisLabel=function dxForY2AxisLabel(){return this.dxForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.dyForXAxisLabel=function dyForXAxisLabel(){var t=this.owner.config,e=this.getXAxisLabelPosition().isInner,n=t.axis_x_height;return t.axis_rotated?e?"1.2em":-25-this.getMaxTickWidth("x"):e?"-0.5em":n?n-10:"3em"},Axis.prototype.dyForYAxisLabel=function dyForYAxisLabel(){var t=this.owner,e=this.getYAxisLabelPosition().isInner;return t.config.axis_rotated?e?"-0.5em":"3em":e?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)},Axis.prototype.dyForY2AxisLabel=function dyForY2AxisLabel(){var t=this.owner,e=this.getY2AxisLabelPosition().isInner;return t.config.axis_rotated?e?"1.2em":"-2.2em":e?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)},Axis.prototype.textAnchorForXAxisLabel=function textAnchorForXAxisLabel(){return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(),!1)},Axis.prototype.textAnchorForYAxisLabel=function textAnchorForYAxisLabel(){return this.textAnchorForAxisLabel(this.getYAxisLabelPosition())},Axis.prototype.textAnchorForY2AxisLabel=function textAnchorForY2AxisLabel(){return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition())},Axis.prototype.getMaxTickWidth=function getMaxTickWidth(t,e){var n=this.owner,i=n.config,r=n.currentMaxTickWidths,a=0;if(e&&r[t])return r[t];if(n.svg){var o=/^y2?$/.test(t),s=n.filterTargetsToShow(n.data.targets),u=o?"getY":"getX",l=n[t].copy().domain(n[u+"Domain"](s,t)),c=this[u+"Axis"](t,l,n[t+"Orient"],o?i["axis_"+t+"_tick_format"]:n.xAxisTickFormat,null,!1,!0,!0);o||this.updateXAxisTickValues(s,c);var d=n.selectChart.append("svg").style("visibility","hidden");d.call(c).selectAll("text").each(function(){a=Math.max(a,this.getBoundingClientRect().width)}),d.remove()}return a>0&&(r[t]=a),r[t]},Axis.prototype.updateLabels=function updateLabels(t){var e=this,n=this.owner,i={X:n.main.select("."+a["default"].axisX+" ."+a["default"].axisXLabel),Y:n.main.select("."+a["default"].axisY+" ."+a["default"].axisYLabel),Y2:n.main.select("."+a["default"].axisY2+" ."+a["default"].axisY2Label)};Object.keys(i).forEach(function(n){var r=i[n],a=n+"AxisLabel";(t?r.transition():r).attr("x",e["xFor"+a].bind(e)).attr("dx",e["dxFor"+a].bind(e)).attr("dy",e["dyFor"+a].bind(e)).text(e["textFor"+a].bind(e))})},Axis.prototype.getPadding=function getPadding(t,e,n,i){var r=(0,o.isNumber)(t)?t:t[e];return(0,o.isValue)(r)?"ratio"===t.unit?t[e]*i:this.convertPixelsToAxisPadding(r,i):n},Axis.prototype.convertPixelsToAxisPadding=function convertPixelsToAxisPadding(t,e){var n=this.owner;return e*(t/(n.config.axis_rotated?n.width:n.height))},Axis.prototype.generateTickValues=function generateTickValues(t,e,n){var i=t,r=void 0,a=void 0,s=void 0,u=void 0,l=void 0,c=void 0;if(e){var d=(0,o.isFunction)(e)?e():e;if(1===d)i=[t[0]];else if(2===d)i=[t[0],t[t.length-1]];else if(d>2){for(s=d-2,r=t[0],u=((a=t[t.length-1])-r)/(s+1),i=[r],l=0;l<s;l++)c=+r+u*(l+1),i.push(n?new Date(c):c);i.push(a)}}return n||(i=i.sort(function(t,e){return t-e})),i},Axis.prototype.generateTransitions=function generateTransitions(t){var e=this.owner.axes,n=["x","y","y2","subx"].map(function(n){return t?e[n].transition().duration(t):e[n]});return{axisX:n[0],axisY:n[1],axisY2:n[2],axisSubX:n[3]}},Axis.prototype.redraw=function redraw(t,e){var n=this.owner,i=e?"0":"1";["x","y","y2","subx"].forEach(function(t){n.axes[t].style("opacity",i)}),t.axisX.call(n.xAxis),t.axisY.call(n.yAxis),t.axisY2.call(n.y2Axis),t.axisSubX.call(n.subXAxis)},Axis}();e["default"]=u,t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0,e["default"]=function(){function axisX(t,e){t.attr("transform",function(t){return"translate("+Math.ceil(e(t)+d)+", 0)"})}function axisY(t,e){t.attr("transform",function(t){return"translate(0,"+Math.ceil(e(t))+")"})}function textFormatted(t){var e=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,n=l?l(e):e;return(0,a.isDefined)(n)?n:""}function transitionise(e){return t.withoutTransition?e.interrupt():e.transition(g)}function axis(i){i.each(function(){var i=(0,r.select)(this);axis.g=i;var l=this.__chart__||e,f=function copyScale(){var t=e.copy();return t.domain().length||t.domain(e.domain()),t}();this.__chart__=f;var g=u||function generateTicks(t){var e=[];if(t.ticks)return t.ticks.apply(t,c?(0,a.toArray)(c):[]).map(function(t){return(0,a.isString)(t)&&(0,a.isNumber)(t)&&!isNaN(t)&&Math.round(10*t)/10||t});for(var n=t.domain(),i=Math.ceil(n[0]);i<n[1];i++)e.push(i);return e.length>0&&e[0]>0&&e.unshift(e[0]-(e[1]-e[0])),e}(f),p=i.selectAll(".tick").data(g,f),_=p.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),m=p.exit().remove(),x=transitionise(p=_.merge(p)).style("opacity","1"),v=void 0,y=void 0,b=e.rangeExtent?e.rangeExtent():function scaleExtent(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}((t.orgXScale||e).range()),T=i.selectAll(".domain").data([0]),w=T.enter().append("path").attr("class","domain").merge(transitionise(T));_.append("line"),_.append("text");var A=_.select("line"),M=x.select("line"),C=_.select("text"),S=x.select("text");t.isCategory?(d=Math.ceil((f(1)-f(0))/2),v=h?0:d,y=h?d:0):d=v=0;var D=o.size||o(i.select(".tick")),k=[],L=(Math.max(6,0),/^(left|right)$/.test(n)),R=/^(top|bottom)$/.test(n),F=p.select("text").selectAll("tspan").data(function(e,n){var i=t.tickMultiline?function splitTickText(e,n){var i=textFormatted(e),r=(0,a.isString)(i)&&i.indexOf("\n")>-1?i.split("\n"):[];if(r.length)return r;var o=n,s=void 0,u=void 0,l=void 0;return(0,a.isArray)(i)?i:((!o||o<=0)&&(o=L?95:t.isCategory?Math.ceil(f(g[1])-f(g[0]))-12:110),function split(t,e){u=undefined;for(var n=1;n<e.length;n++)if(" "===e.charAt(n)&&(u=n),s=e.substr(0,n+1),l=D.w*s.length,o<l)return split(t.concat(e.substr(0,u||n)),e.slice(u?u+1:n));return t.concat(e)}(r,i+""))}(e,t.tickWidth):(0,a.isArray)(textFormatted(e))?textFormatted(e).concat():[textFormatted(e)];return k[n]=i.length,i.map(function(t){return{index:n,splitted:t}})});F.exit().remove(),F=F.enter().append("tspan").merge(F).text(function(t){return t.splitted});var O=R?axisX:axisY,I=/^(top|left)$/.test(n)?-1:1,E=O===axisX?"y":"x";A.attr(E+"2",6*I),C.attr(""+E,9*I),w.attr("d",function(){var t=s*I;return R?"M"+b[0]+","+t+"V0H"+b[1]+"V"+t:"M"+t+","+b[0]+"H0V"+b[1]+"H"+t});var X=t.tickTextRotate,z=t.axisName&&/^(x|y|y2)$/.test(t.axisName)?t.config["axis_"+t.axisName+"_tick_text_position"]:{x:0,y:0};if(F.attr("x",R?0:9*I).attr("dx",function(){var t=0;return"bottom"===n&&X&&(t=8*Math.sin(Math.PI*(X/180))),t+(z.x||0)}()).attr("dy",function(t,e){var i=0;return"top"!==n&&(i=0===e?L?-((k[t.index]-1)*(D.h/2)-3):0===z.y?".71em":0:D.h),(0,a.isNumber)(i)&&z.y?i+z.y:i||".71em"}),"bottom"===n?(M.attr("x1",v).attr("x2",v).attr("y2",function tickSize(t){var n=e(t)+(h?0:d);return b[0]<n&&n<b[1]?6:0}),S.attr("x",0).attr("y",function yForText(t){return t?11.5-t/15*2.5*(t>0?1:-1):9}(X)).style("text-anchor",function textAnchorForText(t){return t?t>0?"start":"end":"middle"}(X)).attr("transform",function textTransform(t){return t?"rotate("+t+")":null}(X))):"top"===n?(M.attr("x2",0).attr("y2",-6),S.attr("x",0).attr("y",-9).style("text-anchor","middle")):"left"===n?(M.attr("x2",-6).attr("y1",y).attr("y2",y),S.attr("x",-9).attr("y",d).style("text-anchor","end")):"right"===n&&(M.attr("x2",6).attr("y2",0),S.attr("x",9).attr("y",0).style("text-anchor","start")),t.tickTitle&&S.append&&S.append("title").each(function(e){(0,r.select)(this).text(t.tickTitle[e])}),f.bandwidth){var N=f,P=N.bandwidth()/2;f=l=function scale0(t){return N(t)+P}}else l.bandwidth?l=f:m.call(O,f);_.call(O,l),x.call(O,f)})}var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=(0,i.scaleLinear)(),n="bottom",s=t.withOuterTick?6:0,u=null,l=void 0,c=void 0,d=0,f=!0,h=void 0,g=void 0;return axis.scale=function(t){return arguments.length?(e=t,axis):e},axis.orient=function(t){return arguments.length?(n=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",axis):n},axis.tickFormat=function(t){return arguments.length?(l=t,axis):l},axis.tickCentered=function(t){return arguments.length?(h=t,axis):h},axis.tickOffset=function(){return d},axis.tickInterval=function(e){var n=void 0;t.isCategory?n=2*d:n=(axis.g.select("path.domain").node().getTotalLength()-2*s)/(e||axis.g.selectAll("line").size());return n===Infinity?0:n},axis.ticks=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length?(c=(0,a.toArray)(e),axis):c},axis.tickCulling=function(t){return arguments.length?(f=t,axis):f},axis.tickValues=function(t){if((0,a.isFunction)(t))u=function tickValues(){return t(e.domain())};else{if(!arguments.length)return u;u=t}return axis},axis.setTransition=function(t){return g=t,axis},axis};var i=n(65),r=n(64),a=n(6),o=function getSizeFor1Char(t){var e={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(t){try{var n=t.node().getBBox(),i=n.height,r=n.width;i&&r&&(e.h=i,e.w=r),t.text("")}catch(a){}}),getSizeFor1Char.size=e};t.exports=e["default"]},function(t,e,n){"use strict";e.__esModule=!0,e.toArray=e.sanitise=e.merge=e.notEmpty=e.isValue=e.isUndefined=e.isString=e.isObjectType=e.isObject=e.isNumber=e.isFunction=e.isEmpty=e.isDefined=e.isBoolean=e.isArray=e.hasValue=e.getRectSegList=e.getPathBox=e.getOption=e.getCssRules=e.getBrushSelection=e.extend=e.emulateEvent=e.diffDomain=e.ceil10=e.capitalize=e.callFn=e.brushEmpty=e.asHalfPixel=undefined;var i=_interopRequireDefault(n(7)),r=n(64),a=n(76),o=_interopRequireDefault(n(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t){return"function"==typeof t},u=function(t){return"string"==typeof t},l=function(t){return void 0===t},c=function(t){return void 0!==t},d=function(t){return"object"===(void 0===t?"undefined":(0,i["default"])(t))},f=function(t){return l(t)||null===t||u(t)&&0===t.length||d(t)&&0===Object.keys(t).length},h=function(t){return t&&t.constructor===Array},g=function(t){return t&&!t.nodeType&&d(t)&&!h(t)},p=function(t){var e=t.getBBox(),n=[e.x,e.y,e.width,e.height],i=n[0],r=n[1],a=n[2],o=n[3];return[{x:i,y:r+o},{x:i,y:r},{x:i+a,y:r},{x:i+a,y:r+o}]},_=function(t){var e=null,n=r.event,i=t.context||t.main;return n&&"BrushEvent"===n.constructor.name?e=n.selection:i&&(e=i.select("."+o["default"].brush).node())&&(e=(0,a.brushSelection)(e)),e},m=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=arguments[1];for(var n in e)t[n]=e[n];return t},x=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(!n.length||1===n.length&&!n[0])return t;var r=n.shift();return g(t)&&g(r)&&Object.keys(r).forEach(function(e){var n=r[e];g(n)?(!t[e]&&(t[e]={}),t[e]=x(t[e],n)):t[e]=h(n)?n.concat():n}),m.apply(undefined,[t].concat(n))},v=function(t){return[].slice.call(t)},y={mouse:function(){try{return new MouseEvent("t"),function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0};t.dispatchEvent(new MouseEvent(e,n))}}catch(t){return function(t,e){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0},i=document.createEvent("MouseEvent");i.initMouseEvent(e,n.bubbles,n.cancelable,window,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}}(),touch:function touch(t,e,n){var i=new Touch(Object.assign({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[i],targetTouches:[],changedTouches:[i]}))}};e.asHalfPixel=function(t){return Math.ceil(t)+.5},e.brushEmpty=function(t){var e=_(t);return!e||e[0]===e[1]},e.callFn=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=s(t);return r&&t.call.apply(t,n),r},e.capitalize=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},e.ceil10=function(t){return 10*Math.ceil(t/10)},e.diffDomain=function(t){return t[1]-t[0]},e.emulateEvent=y,e.extend=m,e.getBrushSelection=_,e.getCssRules=function(t){var e=[];return t.forEach(function(t){try{t.cssRules&&t.cssRules.length&&(e=e.concat(v(t.cssRules)))}catch(n){console.error("Error while reading rules from "+t.href+": "+n.toString())}}),e},e.getOption=function(t,e,n){return c(t[e])?t[e]:n},e.getPathBox=function(t){var e=t.getBoundingClientRect(),n=[e.width,e.height],i=n[0],r=n[1],a=p(t);return{x:a[0].x,y:Math.min(a[0].y,a[1].y),width:i,height:r}},e.getRectSegList=p,e.hasValue=function(t,e){var n=!1;return Object.keys(t).forEach(function(i){return t[i]===e&&(n=!0)}),n},e.isArray=h,e.isBoolean=function(t){return"boolean"==typeof t},e.isDefined=c,e.isEmpty=f,e.isFunction=s,e.isNumber=function(t){return"number"==typeof t},e.isObject=g,e.isObjectType=d,e.isString=u,e.isUndefined=l,e.isValue=function(t){return t||0===t},e.notEmpty=function(t){return!f(t)},e.merge=x,e.sanitise=function(t){return u(t)?t.replace(/</g,"<").replace(/>/g,">"):t},e.toArray=v},function(t,e,n){"use strict";e.__esModule=!0,e["default"]=function(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":void 0===t?"undefined":function _typeof(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}(t)}},function(t,e,n){"use strict";e.__esModule=!0,e["default"]={arc:"bb-arc",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",buttonZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",zoomRect:"bb-zoom-rect",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},t.exports=e["default"]},function(t,e,n){"use strict";var i=_interopRequireDefault(n(10)),r=_interopRequireDefault(n(3)),a=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,a.extend)(r["default"].prototype,{getOptions:function getOptions(){var t=new i["default"];return(0,a.merge)(t.value,this.additionalConfig)},additionalConfig:{},loadConfig:function loadConfig(t){var e=this.config,n=void 0,i=void 0,r=void 0,o=function(){var t=i.shift();return t&&n&&(0,a.isObjectType)(n)&&t in n?(n=n[t],o()):t?undefined:n};Object.keys(e).forEach(function(s){n=t,i=s.split("_"),r=o(),(0,a.isDefined)(r)&&(e[s]=r)})}})},function(t,e,n){"use strict";e.__esModule=!0;var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(2));e["default"]=function Options(){(0,i["default"])(this,Options),this.value={bindto:"#chart",clipPath:!0,svg_classname:undefined,size_width:undefined,size_height:undefined,padding_left:undefined,padding_right:undefined,padding_top:undefined,padding_bottom:undefined,resize_auto:!0,zoom_enabled:undefined,zoom_extent:undefined,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:undefined,zoom_onzoomstart:undefined,zoom_onzoomend:undefined,zoom_resetButton:!0,zoom_x_min:undefined,zoom_x_max:undefined,interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},onover:function onover(){},onout:function onout(){},onresize:function onresize(){},onresized:function onresized(){},onbeforeinit:undefined,oninit:function oninit(){},onafterinit:undefined,onrendered:undefined,transition_duration:350,data_x:undefined,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function data_idConverter(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:undefined,data_types:{},data_labels:{},data_labels_position:{},data_order:"desc",data_regions:{},data_color:undefined,data_colors:{},data_hide:!1,data_filter:undefined,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function data_selection_isselectable(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function data_onclick(){},data_onover:function data_onover(){},data_onout:function data_onout(){},data_onselected:function data_onselected(){},data_onunselected:function data_onunselected(){},data_onmin:undefined,data_onmax:undefined,data_url:undefined,data_headers:undefined,data_json:undefined,data_rows:undefined,data_columns:undefined,data_mimeType:undefined,data_keys:undefined,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_onbrush:function subchart_onbrush(){},color_pattern:[],color_tiles:undefined,color_threshold:{},legend_show:!0,legend_hide:!1,legend_contents_bindto:undefined,legend_contents_template:undefined,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:undefined,legend_item_onclick:undefined,legend_item_onover:undefined,legend_item_onout:undefined,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1,axis_rotated:!1,axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:undefined,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:undefined,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:undefined,axis_x_min:undefined,axis_x_padding:{},axis_x_height:undefined,axis_x_extent:undefined,axis_x_label:{},axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:undefined,axis_y_max:undefined,axis_y_min:undefined,axis_y_inverted:!1,axis_y_center:undefined,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:undefined,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:undefined,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:undefined,axis_y_padding:{},axis_y_default:undefined,axis_y2_show:!1,axis_y2_max:undefined,axis_y2_min:undefined,axis_y2_inverted:!1,axis_y2_center:undefined,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:undefined,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:undefined,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:undefined,grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_front:!1,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:undefined,point_pattern:[],point_select_r:undefined,point_type:"circle",line_connectNull:!1,line_step_type:"step",line_classes:undefined,line_point:!0,bar_padding:0,bar_radius:undefined,bar_radius_ratio:undefined,bar_width:undefined,bar_width_ratio:.6,bar_width_max:undefined,bar_zerobased:!0,bubble_maxR:35,area_zerobased:!0,area_above:!1,pie_label_show:!0,pie_label_format:undefined,pie_label_threshold:.05,pie_label_ratio:undefined,pie_expand:{},pie_expand_duration:50,pie_innerRadius:0,pie_padAngle:0,pie_padding:0,gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:undefined,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:undefined,gauge_units:undefined,gauge_width:undefined,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:undefined,donut_label_threshold:.05,donut_label_ratio:undefined,donut_width:undefined,donut_title:"",donut_expand:{},donut_expand_duration:50,donut_padAngle:0,spline_interpolation_type:"cardinal",radar_axis_max:undefined,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function radar_level_text_format(t){return t%1==0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1,regions:[],tooltip_show:!0,tooltip_grouped:!0,tooltip_format_title:undefined,tooltip_format_name:undefined,tooltip_format_value:undefined,tooltip_position:undefined,tooltip_contents:function tooltip_contents(t,e,n,i){return this.getTooltipContent?this.getTooltipContent(t,e,n,i):""},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function tooltip_onshow(){},tooltip_onhide:function tooltip_onhide(){},tooltip_onshown:function tooltip_onshown(){},tooltip_onhidden:function tooltip_onhidden(){},tooltip_order:null,title_text:undefined,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"top-center"}},t.exports=e["default"]},function(t,e,n){"use strict";var i=n(65),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3));(0,n(6).extend)(r["default"].prototype,{getScale:function getScale(t,e,n){return(n?(0,i.scaleTime)():(0,i.scaleLinear)()).range([t,e])},getX:function getX(t,e,n,i){var r=this.zoomScale||this.getScale(t,e,this.isTimeSeries());return this.getCustomizedScale(n?r.domain(n):r,i)},getY:function getY(t,e,n){var i=this.getScale(t,e,this.isTimeSeriesY());return n&&i.domain(n),i},getCustomizedScale:function getCustomizedScale(t,e){var n=this,i=e||function(){return n.xAxis.tickOffset()},r=function(e,n){var r=t(e)+i();return n?r:Math.ceil(r)};for(var a in t)r[a]=t[a];return r.orgDomain=function(){return t.domain()},r.orgScale=function(){return t},n.isCategorized()&&(r.domain=function(e){var n=e;return arguments.length?(t.domain(n),r):[(n=this.orgDomain())[0],n[1]+1]}),r},getYScale:function getYScale(t){return"y2"===this.axis.getId(t)?this.y2:this.y},getSubYScale:function getSubYScale(t){return"y2"===this.axis.getId(t)?this.subY2:this.subY},updateScales:function updateScales(t){var e=this,n=e.config,i=n.axis_rotated,r=!e.x;e.xMin=i?1:0,e.xMax=i?e.height:e.width,e.yMin=i?0:e.height,e.yMax=i?e.width:1,e.subXMin=e.xMin,e.subXMax=e.xMax,e.subYMin=i?0:e.height2,e.subYMax=i?e.width2:1,e.x=e.getX(e.xMin,e.xMax,r?undefined:e.x.orgDomain(),function(){return e.xAxis.tickOffset()}),e.y=e.getY(e.yMin,e.yMax,r?n.axis_y_default:e.y.domain()),e.y2=e.getY(e.yMin,e.yMax,r?n.axis_y2_default:e.y2.domain()),e.subX=e.getX(e.xMin,e.xMax,e.orgXDomain,function(t){return t%1?0:e.subXAxis.tickOffset()}),e.subY=e.getY(e.subYMin,e.subYMax,r?n.axis_y_default:e.subY.domain()),e.subY2=e.getY(e.subYMin,e.subYMax,r?n.axis_y2_default:e.subY2.domain()),e.xAxisTickFormat=e.axis.getXAxisTickFormat(),e.xAxisTickValues=e.axis.getXAxisTickValues(),e.yAxisTickValues=e.axis.getYAxisTickValues(),e.y2AxisTickValues=e.axis.getY2AxisTickValues(),e.xAxis=e.axis.getXAxis("x",e.x,e.xOrient,e.xAxisTickFormat,e.xAxisTickValues,n.axis_x_tick_outer,t),e.subXAxis=e.axis.getXAxis("subx",e.subX,e.subXOrient,e.xAxisTickFormat,e.xAxisTickValues,n.axis_x_tick_outer),e.yAxis=e.axis.getYAxis("y",e.y,e.yOrient,n.axis_y_tick_format,e.yAxisTickValues,n.axis_y_tick_outer),e.y2Axis=e.axis.getYAxis("y2",e.y2,e.y2Orient,n.axis_y2_tick_format,e.y2AxisTickValues,n.axis_y2_tick_outer),e.updateArc&&e.updateArc()}})},function(t,e,n){"use strict";var i=n(66),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),a=n(6);(0,a.extend)(r["default"].prototype,{getYDomainMinMax:function getYDomainMinMax(t,e){var n=this,r="min"===e,a=n.config.data_groups,o=n.mapToIds(t),s=n.getValuesAsIdKeyed(t),u=r?i.min:i.max;return a.length>0&&function(){for(var e=n["has"+(r?"Negative":"Positive")+"ValueInTargets"](t),i=void 0,u=void 0,l=0;u=a[l];l++)if(0!==(u=u.filter(function(t){return o.indexOf(t)>=0})).length){if(i=u[0],e&&s[i]){var c=r?function(t,e){s[i][e]=t<0?t:0}:function(t,e){s[i][e]=t>0?t:0};s[i].forEach(c)}for(var d,f=function(t,a){return s[a]?void s[a].forEach(function(t,o){var u=+t,l=r?u>0:u<0;n.axis.getId(a)===n.axis.getId(i)&&s[i]&&(!e||!l)&&(s[i][o]+=u)}):"continue"},h=1;d=u[h];h++)f(0,d)}}(),u(Object.keys(s).map(function(t){return u(s[t])}))},getYDomainMin:function getYDomainMin(t){return this.getYDomainMinMax(t,"min")},getYDomainMax:function getYDomainMax(t){return this.getYDomainMinMax(t,"max")},getYDomain:function getYDomain(t,e,n){var i=this,r=i.config,o=t.filter(function(t){return i.axis.getId(t.id)===e}),s=n?i.filterByXDomain(o,n):o,u="y2"===e?r.axis_y2_min:r.axis_y_min,l="y2"===e?r.axis_y2_max:r.axis_y_max,c=i.getYDomainMin(s),d=i.getYDomainMax(s),f="y2"===e?r.axis_y2_center:r.axis_y_center,h=i.hasType("bar",s)&&r.bar_zerobased||i.hasType("area",s)&&r.area_zerobased,g="y2"===e?r.axis_y2_inverted:r.axis_y_inverted,p=i.hasDataLabel()&&r.axis_rotated,_=i.hasDataLabel()&&!r.axis_rotated,m=void 0;if(c=(0,a.isValue)(u)?u:(0,a.isValue)(l)?c<l?c:l-10:c,d=(0,a.isValue)(l)?l:(0,a.isValue)(u)?u<d?d:u+10:d,0===s.length)return"y2"===e?i.y2.domain():i.y.domain();isNaN(c)&&(c=0),isNaN(d)&&(d=c),c===d&&(c<0?d=0:c=0);var x=c>=0&&d>=0,v=c<=0&&d<=0;((0,a.isValue)(u)&&x||(0,a.isValue)(l)&&v)&&(h=!1),h&&(x&&(c=0),v&&(d=0));var y=Math.abs(d-c),b=.1*y,T=.1*y;if((0,a.isDefined)(f)){var w=Math.max(Math.abs(c),Math.abs(d));d=f+w,c=f-w}if(p){m=i.getDataLabelLength(c,d,"width");var A=(0,a.diffDomain)(i.y.range()),M=[m[0]/A,m[1]/A];b+=y*(M[1]/(1-M[0]-M[1])),T+=y*(M[0]/(1-M[0]-M[1]))}else _&&(m=i.getDataLabelLength(c,d,"height"),b+=i.axis.convertPixelsToAxisPadding(m[1],y),T+=i.axis.convertPixelsToAxisPadding(m[0],y));"y"===e&&(0,a.notEmpty)(r.axis_y_padding)&&(b=i.axis.getPadding(r.axis_y_padding,"top",b,y),T=i.axis.getPadding(r.axis_y_padding,"bottom",T,y)),"y2"===e&&(0,a.notEmpty)(r.axis_y2_padding)&&(b=i.axis.getPadding(r.axis_y2_padding,"top",b,y),T=i.axis.getPadding(r.axis_y2_padding,"bottom",T,y)),h&&(x&&(T=c),v&&(b=-d));var C=[c-T,d+b];return g?C.reverse():C},getXDomainMinMax:function getXDomainMinMax(t,e){var n=this.config["axis_x_"+e],r="min"===e?i.min:i.max;return(0,a.isDefined)(n)?this.isTimeSeries()?this.parseDate(n):n:r(t,function(t){return r(t.values,function(t){return t.x})})},getXDomainMin:function getXDomainMin(t){return this.getXDomainMinMax(t,"min")},getXDomainMax:function getXDomainMax(t){return this.getXDomainMinMax(t,"max")},getXDomainPadding:function getXDomainPadding(t){var e=this.config,n=t[1]-t[0],i=e.axis_x_padding,r=void 0,o=void 0;this.isCategorized()?o=0:this.hasType("bar")?o=(r=this.getMaxDataCount())>1?n/(r-1)/2:.5:o=.01*n;var s=o,u=o;return(0,a.isObject)(i)&&(0,a.notEmpty)(i)?(s=(0,a.isValue)(i.left)?i.left:o,u=(0,a.isValue)(i.right)?i.right:o):(0,a.isNumber)(e.axis_x_padding)&&(s=i,u=i),{left:s,right:u}},getXDomain:function getXDomain(t){var e=this,n=[e.getXDomainMin(t),e.getXDomainMax(t)],i=n[0],r=n[1],a=e.getXDomainPadding(n),o=0,s=0;return i-r!=0||e.isCategorized()||(e.isTimeSeries()?(i=new Date(.5*i.getTime()),r=new Date(1.5*r.getTime())):(i=0===i?1:.5*i,r=0===r?-1:1.5*r)),(i||0===i)&&(o=e.isTimeSeries()?new Date(i.getTime()-a.left):i-a.left),(r||0===r)&&(s=e.isTimeSeries()?new Date(r.getTime()+a.right):r+a.right),[o,s]},updateXDomain:function updateXDomain(t,e,n,r,o){var s=this,u=s.config.zoom_enabled;if(n&&(s.x.domain(o||(0,i.extent)(s.getXDomain(t))),s.orgXDomain=s.x.domain(),u&&s.zoom.updateScaleExtent(),s.subX.domain(s.x.domain()),s.brush&&s.brush.scale(s.subX)),e){var l=o||!s.brush||(0,a.brushEmpty)(s)?s.orgXDomain:(0,a.getBrushSelection)(s).map(s.subX.invert);s.x.domain(l),u&&s.zoom.updateScaleExtent()}return r&&s.x.domain(s.trimXDomain(s.x.orgDomain())),s.x.domain()},trimXDomain:function trimXDomain(t){var e=this.getZoomDomain(),n=e[0],i=e[1];return t[0]<=n&&(t[1]=+t[1]+(n-t[0]),t[0]=n),i<=t[1]&&(t[0]=+t[0]-(t[1]-i),t[1]=i),t}})},function(t,e,n){"use strict";var i=n(66),r=n(71),a=_interopRequireDefault(n(8)),o=_interopRequireDefault(n(3)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{isX:function isX(t){var e=this.config,n=e.data_x&&t===e.data_x,i=(0,s.notEmpty)(e.data_xs)&&(0,s.hasValue)(e.data_xs,t);return n||i},isNotX:function isNotX(t){return!this.isX(t)},getXKey:function getXKey(t){var e=this.config;return e.data_x?e.data_x:(0,s.notEmpty)(e.data_xs)?e.data_xs[t]:null},getXValuesOfXKey:function getXValuesOfXKey(t,e){var n=this,i=void 0;return(e&&(0,s.notEmpty)(e)?n.mapToIds(e):[]).forEach(function(e){n.getXKey(e)===t&&(i=n.data.xs[e])}),i},getIndexByX:function getIndexByX(t){var e=this.filterByX(this.data.targets,t);return e.length?e[0].index:null},getXValue:function getXValue(t,e){return t in this.data.xs&&this.data.xs[t]&&(0,s.isValue)(this.data.xs[t][e])?this.data.xs[t][e]:e},getOtherTargetXs:function getOtherTargetXs(){var t=Object.keys(this.data.xs);return t.length?this.data.xs[t[0]]:null},getOtherTargetX:function getOtherTargetX(t){var e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs:function addXs(t){var e=this;Object.keys(t).forEach(function(n){e.config.data_xs[n]=t[n]})},hasMultipleX:function hasMultipleX(t){return(0,r.set)(Object.keys(t).map(function(e){return t[e]})).size()>1},isMultipleX:function isMultipleX(){return(0,s.notEmpty)(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function addName(t){var e=void 0;return t&&(e=this.config.data_names[t.id],t.name=e===undefined?t.id:e),t},getAllValuesOnIndex:function getAllValuesOnIndex(t){var e=this;return e.filterTargetsToShow(e.data.targets).map(function(n){return e.addName(e.getValueOnIndex(n.values,t))})},getValueOnIndex:function getValueOnIndex(t,e){var n=t.filter(function(t){return t.index===e});return n.length?n[0]:null},updateTargetX:function updateTargetX(t,e){var n=this;t.forEach(function(t){t.values.forEach(function(i,r){i.x=n.generateTargetX(e[r],t.id,r)}),n.data.xs[t.id]=e})},updateTargetXs:function updateTargetXs(t,e){var n=this;t.forEach(function(t){e[t.id]&&n.updateTargetX([t],e[t.id])})},generateTargetX:function generateTargetX(t,e,n){var i=this,r=n;return i.isTimeSeries()?r=t?i.parseDate(t):i.parseDate(i.getXValue(e,n)):i.isCustomX()&&!i.isCategorized()&&(r=(0,s.isValue)(t)?+t:i.getXValue(e,n)),r},cloneTarget:function cloneTarget(t){return{id:t.id,id_org:t.id_org,values:t.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},updateXs:function updateXs(){var t=this;t.data.targets.length&&(t.xs=[],t.data.targets[0].values.forEach(function(e){t.xs[e.index]=e.x}))},getPrevX:function getPrevX(t){var e=this.xs[t-1];return(0,s.isDefined)(e)?e:null},getNextX:function getNextX(t){var e=this.xs[t+1];return(0,s.isDefined)(e)?e:null},getBaseValue:function getBaseValue(t){var e=t.value;return e&&this.isAreaRangeType(t)&&(e=this.getAreaRangeData(t,"mid")),e},getMinMaxValue:function getMinMaxValue(t){var e=this.getBaseValue.bind(this),n=void 0,r=void 0;return(t||this.data.targets.map(function(t){return t.values})).forEach(function(t){n=(0,i.min)([n,(0,i.min)(t,e)]),r=(0,i.max)([r,(0,i.max)(t,e)])}),{min:n,max:r}},getMinMaxData:function getMinMaxData(){var t=this,e=t.getCache("$minMaxData");if(!e){var n=t.data.targets.map(function(t){return t.values}),i=t.getMinMaxValue(n),r=[],a=[];n.forEach(function(e){var n=t.getFilteredDataByValue(e,i.min),o=t.getFilteredDataByValue(e,i.max);n.length&&(r=r.concat(n)),o.length&&(a=a.concat(o))}),t.addCache("$minMaxData",e={min:r,max:a})}return e},getTotalDataSum:function getTotalDataSum(){var t=this.getCache("$totalDataSum");if(!t){var e=0;this.data.targets.map(function(t){return t.values}).forEach(function(t){e+=(0,i.sum)(t,function(t){return t.value})}),this.addCache("$totalDataSum",t=e)}return t},getFilteredDataByValue:function getFilteredDataByValue(t,e){var n=this;return t.filter(function(t){return n.getBaseValue(t)===e})},getMaxDataCount:function getMaxDataCount(){return(0,i.max)(this.data.targets,function(t){return t.values.length})},getMaxDataCountTarget:function getMaxDataCountTarget(t){var e=t.length,n=0,i=void 0;return e>1?t.forEach(function(t){t.values.length>n&&(i=t,n=t.values.length)}):i=e?t[0]:null,i},mapToIds:function mapToIds(t){return t.map(function(t){return t.id})},mapToTargetIds:function mapToTargetIds(t){return t?(0,s.isArray)(t)?t.concat():[t]:this.mapToIds(this.data.targets)},hasTarget:function hasTarget(t,e){for(var n,i=this.mapToIds(t),r=0;n=i[r];r++)if(n===e)return!0;return!1},isTargetToShow:function isTargetToShow(t){return this.hiddenTargetIds.indexOf(t)<0},isLegendToShow:function isLegendToShow(t){return this.hiddenLegendIds.indexOf(t)<0},filterTargetsToShow:function filterTargetsToShow(t){var e=this;return t.filter(function(t){return e.isTargetToShow(t.id)})},mapTargetsToUniqueXs:function mapTargetsToUniqueXs(t){var e=(0,r.set)((0,i.merge)(t.map(function(t){return t.values.map(function(t){return+t.x})}))).values();return(e=this.isTimeSeries()?e.map(function(t){return new Date(+t)}):e.map(function(t){return+t})).sort(function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN})},addHiddenTargetIds:function addHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.concat(t)},removeHiddenTargetIds:function removeHiddenTargetIds(t){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(e){return t.indexOf(e)<0})},addHiddenLegendIds:function addHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.concat(t)},removeHiddenLegendIds:function removeHiddenLegendIds(t){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(e){return t.indexOf(e)<0})},getValuesAsIdKeyed:function getValuesAsIdKeyed(t){var e={};return t.forEach(function(t){var n=[];t.values.forEach(function(t){var e=t.value;(0,s.isArray)(e)?n.push.apply(n,e):(0,s.isObject)(e)&&"high"in e?n.push.apply(n,Object.values(e)):n.push(e)}),e[t.id]=n}),e},checkValueInTargets:function checkValueInTargets(t,e){for(var n=Object.keys(t),i=void 0,r=0;r<n.length;r++){i=t[n[r]].values;for(var a=0;a<i.length;a++)if(e(i[a].value))return!0}return!1},hasNegativeValueInTargets:function hasNegativeValueInTargets(t){return this.checkValueInTargets(t,function(t){return t<0})},hasPositiveValueInTargets:function hasPositiveValueInTargets(t){return this.checkValueInTargets(t,function(t){return t>0})},_checkOrder:function _checkOrder(t){var e=this.config;return(0,s.isString)(e.data_order)&&e.data_order.toLowerCase()===t},isOrderDesc:function isOrderDesc(){return this._checkOrder("desc")},isOrderAsc:function isOrderAsc(){return this._checkOrder("asc")},orderTargets:function orderTargets(t){var e=this.config,n=[].concat(t),i=this.isOrderAsc(),r=this.isOrderDesc();return i||r?n.sort(function(t,e){var n=function(t,e){return t+Math.abs(e.value)},r=t.values.reduce(n,0),a=e.values.reduce(n,0);return i?a-r:r-a}):(0,s.isFunction)(e.data_order)&&n.sort(e.data_order),n},filterByX:function filterByX(t,e){return(0,i.merge)(t.map(function(t){return t.values})).filter(function(t){return t.x-e==0})},filterRemoveNull:function filterRemoveNull(t){var e=this;return t.filter(function(t){return(0,s.isValue)(e.getBaseValue(t))})},filterByXDomain:function filterByXDomain(t,e){return t.map(function(t){return{id:t.id,id_org:t.id_org,values:t.values.filter(function(t){return e[0]<=t.x&&t.x<=e[1]})}})},hasDataLabel:function hasDataLabel(){var t=this.config.data_labels;return(0,s.isBoolean)(t)&&t||(0,s.isObjectType)(t)&&(0,s.notEmpty)(t)},getDataLabelLength:function getDataLabelLength(t,e,n){var i=this,r=[0,0];return i.selectChart.select("svg").selectAll(".dummy").data([t,e]).enter().append("text").text(function(t){return i.dataLabelFormat(t.id)(t)}).each(function(t,e){r[e]=1.3*this.getBoundingClientRect()[n]}).remove(),r},isNoneArc:function isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc:function isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues:function findSameXOfValues(t,e){var n=t[e].x,i=[],r=void 0;for(r=e-1;r>=0&&n===t[r].x;r--)i.push(t[r]);for(r=e;r<t.length&&n===t[r].x;r++)i.push(t[r]);return i},findClosestFromTargets:function findClosestFromTargets(t,e){var n=this,i=t.map(function(t){return n.findClosest(t.values,e)});return n.findClosest(i,e)},findClosest:function findClosest(t,e){var n=this,i=n.config.point_sensitivity,r=void 0;return t.filter(function(t){return t&&n.isBarType(t.id)}).forEach(function(t){var e=n.main.select("."+a["default"].bars+n.getTargetSelectorSuffix(t.id)+" ."+a["default"].bar+"-"+t.index).node();!r&&n.isWithinBar(e)&&(r=t)}),t.filter(function(t){return t&&!n.isBarType(t.id)}).forEach(function(t){var a=n.dist(t,e);a<i&&(i=a,r=t)}),r},dist:function dist(t,e){var n=this.config.axis_rotated,i=n?1:0,r=n?0:1,a=this.circleY(t,t.index),o=this.x(t.x);return Math.sqrt(Math.pow(o-e[i],2)+Math.pow(a-e[r],2))},convertValuesToStep:function convertValuesToStep(t){var e=this.config,n=e.axis_rotated,i=e.line_step_type,r=this.isCategorized(),a=(0,s.isArray)(t)?t.concat():[t];if(!n&&!r)return t;var o=a[0].id,u=a[0].x-1,l=a[0].value;return r&&a.unshift({x:u,value:l,id:o}),"step-after"===i&&a.unshift({x:u-1,value:l,id:o}),l=a[(u=a.length)-1].value,r&&a.push({x:u,value:l,id:o}),"step-before"===i&&a.push({x:u+1,value:l,id:o}),a},convertValuesToRange:function convertValuesToRange(t){var e=[];return((0,s.isArray)(t)?t.concat():[t]).forEach(function(t){var n=t.x,i=t.id;e.push({x:n,id:i,value:t.value[0]}),e.push({x:n,id:i,value:t.value[2]})}),e},updateDataAttributes:function updateDataAttributes(t,e){var n=this.config["data_"+t];return(0,s.isUndefined)(e)?n:(Object.keys(e).forEach(function(t){n[t]=e[t]}),this.redraw({withLegend:!0}),n)},getAreaRangeData:function getAreaRangeData(t,e){var n=t.value;if((0,s.isArray)(n)){var i=["high","mid","low"].indexOf(e);return-1===i?null:n[i]}return n[e]}})},function(t,e,n){"use strict";var i=n(77),r=n(71),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),o=n(6);(0,o.extend)(a["default"].prototype,{convertUrlToData:function convertUrlToData(t){var e=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"csv",i=arguments[2],r=arguments[3],a=arguments[4],s=new XMLHttpRequest;if(i){var u=Object.keys(i),l=Array.isArray(u),c=0;for(u=l?u:u[Symbol.iterator]();;){var d;if(l){if(c>=u.length)break;d=u[c++]}else{if((c=u.next()).done)break;d=c.value}var f=d;s.setRequestHeader(f,i[f])}}s.open("GET",t),s.onreadystatechange=function(){if(4===s.readyState){if(200!==s.status)throw new Error(t+": Something went wrong loading!");var i=s.responseText;i&&a.call(e,e["convert"+(0,o.capitalize)(n)+"ToData"]("json"===n?JSON.parse(i):i,r))}},s.send()},_convertCsvTsvToData:function _convertCsvTsvToData(t,e){var n=t.rows(e),i=void 0;return 1===n.length?(i=[{}],n[0].forEach(function(t){i[0][t]=null})):i=t.parse(e),i},convertCsvToData:function convertCsvToData(t){return this._convertCsvTsvToData({rows:i.csvParseRows,parse:i.csvParse},t)},convertTsvToData:function convertTsvToData(t){return this._convertCsvTsvToData({rows:i.tsvParseRows,parse:i.tsvParse},t)},convertJsonToData:function convertJsonToData(t,e){var n=this,i=this.config,r=[],a=void 0,s=void 0;if((0,o.isArray)(t)){var u=e||i.data_keys;u.x?(a=u.value.concat(u.x),i.data_x=u.x):a=u.value,r.push(a),t.forEach(function(t){var e=[],i=a,s=Array.isArray(i),u=0;for(i=s?i:i[Symbol.iterator]();;){var l;if(s){if(u>=i.length)break;l=i[u++]}else{if((u=i.next()).done)break;l=u.value}var c=l,d=n.findValueInJson(t,c);(0,o.isUndefined)(d)&&(d=null),e.push(d)}r.push(e)}),s=this.convertRowsToData(r)}else Object.keys(t).forEach(function(e){var n=t[e].concat();n.unshift(e),r.push(n)}),s=this.convertColumnsToData(r);return s},findValueInJson:function findValueInJson(t,e){if(t[e]!==undefined)return t[e];var n=t,i=e.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split("."),r=Array.isArray(i),a=0;for(i=r?i:i[Symbol.iterator]();;){var o;if(r){if(a>=i.length)break;o=i[a++]}else{if((a=i.next()).done)break;o=a.value}if(!(o in n)){n=undefined;break}n=n[o]}return n},convertRowsToData:function convertRowsToData(t){for(var e=t[0],n=[],i=1,r=t.length;i<r;i++){for(var a={},s=0,u=t[i].length;s<u;s++){if((0,o.isUndefined)(t[i][s]))throw new Error("Source data is missing a component at ("+i+", "+s+")!");a[e[s]]=t[i][s]}n.push(a)}return n},convertColumnsToData:function convertColumnsToData(t){for(var e=[],n=0,i=t.length;n<i;n++)for(var r=t[n][0],a=1,s=t[n].length;a<s;a++){if((0,o.isUndefined)(e[a-1])&&(e[a-1]={}),(0,o.isUndefined)(t[n][a]))throw new Error("Source data is missing a component at ("+n+", "+a+")!");e[a-1][r]=t[n][a]}return e},convertDataToTargets:function convertDataToTargets(t,e){var n=this,i=this,a=i.config,s=(0,r.keys)(t[0]).filter(i.isNotX,i),u=(0,r.keys)(t[0]).filter(i.isX,i),l=void 0;s.forEach(function(r){var s=n.getXKey(r);n.isCustomX()||n.isTimeSeries()?u.indexOf(s)>=0?l=(e&&i.data.xs[r]||[]).concat(t.map(function(t){return t[s]}).filter(o.isValue).map(function(t,e){return i.generateTargetX(t,r,e)})):a.data_x?l=n.getOtherTargetXs():(0,o.notEmpty)(a.data_xs)&&(l=i.getXValuesOfXKey(s,i.data.targets)):l=t.map(function(t,e){return e}),l&&(n.data.xs[r]=l)}),s.forEach(function(t){if(!l)throw new Error('x is not defined for id = "'+t+'".')});var c=s.map(function(e,n){var r=a.data_idConverter(e),s=i.getXKey(e),u=i.isCustomX()&&i.isCategorized(),l=u&&t.map(function(t){return t.x}).every(function(t){return a.axis_x_categories.indexOf(t)>-1});return{id:r,id_org:e,values:t.map(function(t,c){var d=t[s],f=t[e],h=void 0;return f=null===f||isNaN(f)?(0,o.isArray)(f)||(0,o.isObject)(f)&&f.high?f:null:+t[e],u&&0===n&&!(0,o.isUndefined)(d)?(!l&&0===n&&0===c&&(a.axis_x_categories=[]),-1===(h=a.axis_x_categories.indexOf(d))&&(h=a.axis_x_categories.length,a.axis_x_categories.push(d))):h=i.generateTargetX(d,e,c),((0,o.isUndefined)(t[e])||i.data.xs[e].length<=c)&&(h=undefined),{x:h,value:f,id:r}}).filter(function(t){return(0,o.isDefined)(t.x)})}});return c.forEach(function(t){a.data_xSort&&(t.values=t.values.sort(function(t,e){return(t.x||0===t.x?t.x:Infinity)-(e.x||0===e.x?e.x:Infinity)})),t.values.forEach(function(t,e){var n=i.data.targets?i.getIndexByX(t.x):null;t.index=null===n?e:n}),i.data.xs[t.id].sort(function(t,e){return t-e})}),i.hasNegativeValue=i.hasNegativeValueInTargets(c),i.hasPositiveValue=i.hasPositiveValueInTargets(c),a.data_type&&i.setTargetType(i.mapToIds(c).filter(function(t){return!(t in a.data_types)}),a.data_type),c.forEach(function(t){return i.addCache(t.id_org,t,!0)}),c}})},function(t,e,n){"use strict";var i=_interopRequireDefault(n(8)),r=_interopRequireDefault(n(3));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,n(6).extend)(r["default"].prototype,{load:function load(t,e){var n=this,i=t;i&&(e.filter&&(i=i.filter(e.filter)),(e.type||e.types)&&i.forEach(function(t){var i=e.types&&e.types[t.id]||e.type;n.setTargetType(t.id,i)}),n.data.targets.forEach(function(t){for(var e=0;e<i.length;e++)if(t.id===i[e].id){t.values=i[e].values,i.splice(e,1);break}}),n.data.targets=n.data.targets.concat(i)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.done&&e.done()},loadFromArgs:function loadFromArgs(t){var e=this,n=void 0;e.resetCache(),t.data?n=t.data:t.url?e.convertUrlToData(t.url,t.mimeType,t.headers,t.keys,function(n){e.load(e.convertDataToTargets(n),t)}):t.json?n=e.convertJsonToData(t.json,t.keys):t.rows?n=e.convertRowsToData(t.rows):t.columns&&(n=e.convertColumnsToData(t.columns)),e.load(n?e.convertDataToTargets(n):null,t)},unload:function unload(t,e){var n=this,r=e,a=t;return n.resetCache(),r||(r=function(){}),(a=a.filter(function(t){return n.hasTarget(n.data.targets,t)}))&&0!==a.length?(n.svg.selectAll(a.map(function(t){return n.selectorTarget(t)})).transition().style("opacity","0").remove().call(n.endall,r),void a.forEach(function(t){n.withoutFadeIn[t]=!1,n.legend&&n.legend.selectAll("."+i["default"].legendItem+n.getTargetSelectorSuffix(t)).remove(),n.data.targets=n.data.targets.filter(function(e){return e.id!==t})})):void r()}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3));(0,n(6).extend)(i["default"].prototype,{categoryName:function categoryName(t){var e=this.config;return t<e.axis_x_categories.length?e.axis_x_categories[t]:t}})},function(t,e,n){"use strict";var i=n(64),r=n(72),a=_interopRequireDefault(n(3)),o=_interopRequireDefault(n(8)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(a["default"].prototype,{initEventRect:function initEventRect(){this.main.select("."+o["default"].chart).append("g").attr("class",o["default"].eventRects).style("fill-opacity","0")},redrawEventRect:function redrawEventRect(){var t=this,e=t.config,n=e.zoom_enabled,i=t.isMultipleX(),r=void 0,a=t.main.select("."+o["default"].eventRects).style("cursor",!n||!0!==n&&"wheel"!==n.type?null:e.axis_rotate?"ns-resize":"ew-resize").classed(o["default"].eventRectsMultiple,i).classed(o["default"].eventRectsSingle,!i);if(a.selectAll("."+o["default"].eventRect).remove(),t.eventRect=a.selectAll("."+o["default"].eventRect),i)r=t.eventRect.data([0]),r=t.generateEventRectsForMultipleXs(r.enter()).merge(r);else{var s=t.getMaxDataCountTarget(t.data.targets);a.datum(s?s.values:[]),t.eventRect=a.selectAll("."+o["default"].eventRect),(r=t.eventRect.data(function(t){return t})).exit().remove(),r=t.generateEventRectsForSingleX(r.enter()).merge(r)}t.updateEventRect(r),"touch"!==t.inputType||t.svg.on("touchstart.eventRect")||t.hasArcType()||t.bindTouchOnEventRect(i)},bindTouchOnEventRect:function bindTouchOnEventRect(t){var e=this,n=e.config,r=function(){var t=i.event.changedTouches[0];return(0,i.select)(document.elementFromPoint(t.clientX,t.clientY))},a=function(t){var e=t&&t.attr("class")&&1*t.attr("class").replace(new RegExp("("+o["default"].eventRect+"-?|s)","g"),"");return(isNaN(e)||null===e)&&(e=-1),e},u=n.interaction_inputType_touch.preventDefault,l=(0,s.isBoolean)(u)&&u||!1,c=!isNaN(u)&&u||null,d=void 0;e.svg.on("touchstart.eventRect touchmove.eventRect",function(){var s=r();if(!s.empty()&&s.classed(o["default"].eventRect)){if(e.dragging||e.flowing||e.hasArcType())return;(function(t){var e=t.type,i=t.changedTouches[0]["client"+(n.axis_rotated?"Y":"X")];"touchstart"===e?l?t.preventDefault():null!==c&&(d=i):"touchmove"===e&&(l||!0===d||null!==c&&Math.abs(d-i)>=c)&&(d=!0,t.preventDefault())})(i.event),function(n){if(t)e.selectRectForMultipleXs(n);else{var i=r(),o=a(i);e.setOver(o),-1===o?e.unselectRect():e.selectRectForSingle(n,i,o)}}(this)}else e.unselectRect()}).on("touchend.eventRect",function(){var i=r();if(!i.empty()&&i.classed(o["default"].eventRect)){if(e.hasArcType()||!e.toggleShape||e.cancelClick)return void(e.cancelClick&&(e.cancelClick=!1));var s=a(i);t||-1===s||e.main.selectAll("."+o["default"].shape+"-"+s).each(function(t){return n.data_onout.call(e.api,t)})}})},updateEventRect:function updateEventRect(t){var e=this,n=e.config,i=e.zoomScale||e.x,r=t||e.eventRect.data(),a=n.axis_rotated,o=void 0,s=void 0,u=void 0,l=void 0;if(e.isMultipleX())o=0,s=0,u=e.width,l=e.height;else{var c=void 0,d=void 0;if(e.isCategorized())c=e.getEventRectWidth(),d=function(t){return i(t.x)-c/2};else{e.updateXs();var f=function(t){var n=t.index;return{prev:e.getPrevX(n),next:e.getNextX(n)}};c=function(t){var n=f(t);return null===n.prev&&null===n.next?a?e.height:e.width:(null===n.prev&&(n.prev=i.domain()[0]),null===n.next&&(n.next=i.domain()[1]),Math.max(0,(i(n.next)-i(n.prev))/2))},d=function(t){var n=f(t),r=e.data.xs[t.id][t.index];return null===n.prev&&null===n.next?0:(null===n.prev&&(n.prev=i.domain()[0]),(i(r)+i(n.prev))/2)}}o=a?0:d,s=a?d:0,u=a?e.width:c,l=a?c:e.height}r.attr("class",e.classEvent.bind(e)).attr("x",o).attr("y",s).attr("width",u).attr("height",l)},selectRectForSingle:function selectRectForSingle(t,e,n){var r=this,a=r.config,s=a.data_selection_enabled,u=a.data_selection_grouped,l=a.tooltip_grouped,c=r.getAllValuesOnIndex(n);l&&(r.showTooltip(c,t),r.showXGridFocus(c),!s||u)||r.main.selectAll("."+o["default"].shape+"-"+n).each(function(){(0,i.select)(this).classed(o["default"].EXPANDED,!0),s&&e.style("cursor",u?"pointer":null),l||(r.hideXGridFocus(),r.hideTooltip(),!u&&r.expandCirclesBars(n))}).filter(function(t){return r.isWithinShape(this,t)}).call(function(i){var o=i.data();s&&(u||a.data_selection_isselectable(o))&&e.style("cursor","pointer"),l||(r.showTooltip(o,t),r.showXGridFocus(o),r.unexpandCircles(),i.each(function(t){return r.expandCirclesBars(n,t.id)}))})},expandCirclesBars:function expandCirclesBars(t,e,n){this.config.point_focus_expand_enabled&&this.expandCircles(t,e,n),this.expandBars(t,e,n)},selectRectForMultipleXs:function selectRectForMultipleXs(t){var e=this,n=e.config,r=e.filterTargetsToShow(e.data.targets);if(!e.dragging&&!e.hasArcType(r)){var a=(0,i.mouse)(t),s=e.findClosestFromTargets(r,a);if(e.mouseover&&(!s||s.id!==e.mouseover.id)&&(n.data_onout.call(e.api,e.mouseover),e.mouseover=undefined),!s)return void e.unselectRect();var u=(e.isBubbleType(s)||e.isScatterType(s)||!n.tooltip_grouped?[s]:e.filterByX(r,s.x)).map(function(t){return e.addName(t)});e.showTooltip(u,t),e.expandCirclesBars(s.index,s.id,!0),e.showXGridFocus(u),(e.isBarType(s.id)||e.dist(s,a)<n.point_sensitivity)&&(e.svg.select("."+o["default"].eventRect).style("cursor","pointer"),!e.mouseover&&(n.data_onover.call(e.api,s),e.mouseover=s))}},unselectRect:function unselectRect(){var t=this;t.svg.select("."+o["default"].eventRect).style("cursor",null),t.hideXGridFocus(),t.hideTooltip(),t.unexpandCircles(),t.unexpandBars()},setOver:function setOver(t){var e=this,n=e.config;e.expandCirclesBars(t,null,!0),-1!==t&&e.main.selectAll("."+o["default"].shape+"-"+t).each(function(t){return n.data_onover.call(e.api,t)})},getDraggableSelection:function getDraggableSelection(){var t=this,e=t.config;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?(0,r.drag)().on("drag",function(){t.drag((0,i.mouse)(this))}).on("start",function(){t.dragstart((0,i.mouse)(this))}).on("end",function(){t.dragend()}):function(){}},generateEventRectsForSingleX:function generateEventRectsForSingleX(t){var e=this,n=e.config,r=t.append("rect").attr("class",e.classEvent.bind(e)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(t){if(e.hasArcType()||!e.toggleShape||e.cancelClick)e.cancelClick&&(e.cancelClick=!1);else{var i=t.index;e.main.selectAll("."+o["default"].shape+"-"+i).each(function(t){(n.data_selection_grouped||e.isWithinShape(this,t))&&(e.toggleShape(this,t,i),e.config.data_onclick.call(e.api,t,this))})}}).call(e.getDraggableSelection());return"mouse"===e.inputType&&r.on("mouseover",function(t){e.dragging||e.flowing||e.hasArcType()||e.setOver(t.index)}).on("mousemove",function(t){if(!(e.dragging||e.flowing||e.hasArcType())){var n=t.index,r=e.svg.select("."+o["default"].eventRect+"-"+n);e.isStepType(t)&&"step-after"===e.config.line_step_type&&(0,i.mouse)(this)[0]<e.x(e.getXValue(t.id,n))&&(n-=1),-1===n?e.unselectRect():e.selectRectForSingle(this,r,n)}}).on("mouseout",function(t){if(e.config&&!e.hasArcType()){var i=t.index;e.unselectRect(),e.main.selectAll("."+o["default"].shape+"-"+i).each(function(t){return n.data_onout.call(e.api,t)})}}),r},generateEventRectsForMultipleXs:function generateEventRectsForMultipleXs(t){var e=this,n=e.config,r=t.append("rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height).attr("class",o["default"].eventRect).on("click",function(){var t=e.filterTargetsToShow(e.data.targets);if(!e.hasArcType(t)){var r=(0,i.mouse)(this),a=e.findClosestFromTargets(t,r);!a||(e.isBarType(a.id)||e.dist(a,r)<n.point_sensitivity)&&e.main.selectAll("."+o["default"].shapes+e.getTargetSelectorSuffix(a.id)).selectAll("."+o["default"].shape+"-"+a.index).each(function(){(n.data_selection_grouped||e.isWithinShape(this,a))&&(e.toggleShape(this,a,a.index),e.config.data_onclick.call(e.api,a,this))})}}).call(e.getDraggableSelection());return"mouse"===e.inputType&&r.on("mouseover mousemove",function(){e.selectRectForMultipleXs(this)}).on("mouseout",function(){!e.config||e.hasArcType()||e.unselectRect()}),r},dispatchEvent:function dispatchEvent(t,e,n){var i="."+(this.isMultipleX()?o["default"].eventRect:o["default"].eventRect+"-"+e),r=this.main.select(i).node(),a=r.getBoundingClientRect(),u=a.left+(n?n[0]:0)+a.width/2,l=a.top+(n?n[1]:0);s.emulateEvent[/^mouse/.test(t)?"mouse":"touch"](r,t,{screenX:u,screenY:l,clientX:u,clientY:l})}})},function(t,e,n){"use strict";var i=_interopRequireDefault(n(3)),r=_interopRequireDefault(n(8)),a=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,a.extend)(i["default"].prototype,{getCurrentWidth:function getCurrentWidth(){return this.config.size_width||this.getParentWidth()},getCurrentHeight:function getCurrentHeight(){var t=this.config,e=t.size_height||this.getParentHeight();return e>0?e:320/(this.hasType("gauge")&&!t.gauge_fullCircle?2:1)},getCurrentPaddingTop:function getCurrentPaddingTop(){var t=this.config,e=(0,a.isValue)(t.padding_top)?t.padding_top:0;return this.title&&this.title.node()&&(e+=this.getTitlePadding()),e},getCurrentPaddingBottom:function getCurrentPaddingBottom(){var t=this.config;return(0,a.isValue)(t.padding_bottom)?t.padding_bottom:0},getCurrentPaddingLeft:function getCurrentPaddingLeft(t){var e=this.config;return(0,a.isValue)(e.padding_left)?e.padding_left:e.axis_rotated?e.axis_x_show?Math.max((0,a.ceil10)(this.getAxisWidthByAxisId("x",t)),40):1:!e.axis_y_show||e.axis_y_inner?this.axis.getYAxisLabelPosition().isOuter?30:1:(0,a.ceil10)(this.getAxisWidthByAxisId("y",t))},getCurrentPaddingRight:function getCurrentPaddingRight(){var t=this,e=t.config,n=t.isLegendRight?t.getLegendWidth()+20:0;return(0,a.isValue)(e.padding_right)?e.padding_right+1:e.axis_rotated?10+n:!e.axis_y2_show||e.axis_y2_inner?2+n+(t.axis.getY2AxisLabelPosition().isOuter?20:0):(0,a.ceil10)(t.getAxisWidthByAxisId("y2"))+n},getParentRectValue:function getParentRectValue(t){for(var e="offset"+(0,a.capitalize)(t),n=this.selectChart.node(),i=void 0;!i&&n&&"BODY"!==n.tagName;){try{i=n.getBoundingClientRect()[t]}catch(o){e in n&&(i=n[e])}n=n.parentNode}if("width"===t){var r=document.body.offsetWidth;i>r&&(i=r)}return i},getParentWidth:function getParentWidth(){return this.getParentRectValue("width")},getParentHeight:function getParentHeight(){var t=this.selectChart.style("height");return t.indexOf("px")>0?+t.replace("px",""):0},getSvgLeft:function getSvgLeft(t){var e=this,n=e.config,i=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,a=n.axis_rotated?r["default"].axisX:r["default"].axisY,o=e.main.select("."+a).node(),s=o&&i?o.getBoundingClientRect():{right:0},u=e.selectChart.node().getBoundingClientRect(),l=e.hasArcType(),c=s.right-u.left-(l?0:e.getCurrentPaddingLeft(t));return c>0?c:0},getAxisWidthByAxisId:function getAxisWidthByAxisId(t,e){var n=this.axis.getLabelPositionById(t);return this.axis.getMaxTickWidth(t,e)+(n.isInner?20:40)},getHorizontalAxisHeight:function getHorizontalAxisHeight(t){var e=this,n=e.config,i=30;return"x"!==t||n.axis_x_show?"x"===t&&n.axis_x_height?n.axis_x_height:"y"!==t||n.axis_y_show?"y2"!==t||n.axis_y2_show?("x"===t&&!n.axis_rotated&&n.axis_x_tick_rotate&&(i=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_x_tick_rotate)/180)),"y"===t&&n.axis_rotated&&n.axis_y_tick_rotate&&(i=30+e.axis.getMaxTickWidth(t)*Math.cos(Math.PI*(90-n.axis_y_tick_rotate)/180)),i+(e.axis.getLabelPositionById(t).isInner?0:10)+("y2"===t?-10:0)):e.rotated_padding_top:!n.legend_show||e.isLegendRight||e.isLegendInset?1:10:8},getEventRectWidth:function getEventRectWidth(){return Math.max(0,this.xAxis.tickInterval())}})},function(t,e,n){"use strict";var i=n(63),r=n(64),a=_interopRequireDefault(n(8)),o=_interopRequireDefault(n(3)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{getShapeIndices:function getShapeIndices(t){var e=this.config,n={},i=0;return this.filterTargetsToShow(this.data.targets.filter(t,this)).forEach(function(t){for(var r,a=0;r=e.data_groups[a];a++)if(!(r.indexOf(t.id)<0))for(var o,u=0;o=r[u];u++)if(o in n){n[t.id]=n[o];break}(0,s.isUndefined)(n[t.id])&&(n[t.id]=i++)}),n.__max__=i-1,n},getShapeX:function getShapeX(t,e,n,i){var r=i?this.subX:this.zoomScale||this.x,a=this.config.bar_padding;return function(i){var o=i.id in n?n[i.id]:0,s=i.x||0===i.x?r(i.x)-t*(e/2-o):0;return t&&s&&e>1&&a&&(o&&(s+=a*o),e>2?s-=(e-1)*a/2:2===e&&(s-=a/2)),s}},getShapeY:function getShapeY(t){var e=this;return function(n){return(t?e.getSubYScale(n.id):e.getYScale(n.id))(n.value)}},getShapeOffset:function getShapeOffset(t,e,n){var i=this,r=i.orderTargets(i.filterTargetsToShow(i.data.targets.filter(t,i))),a=r.map(function(t){return t.id});return function(t,o){var u=n?i.getSubYScale(t.id):i.getYScale(t.id),l=u(0),c=l,d=o;return r.forEach(function(n){var r=i.isStepType(t)?i.convertValuesToStep(n.values):n.values;n.id===t.id||e[n.id]!==e[t.id]||a.indexOf(n.id)<a.indexOf(t.id)&&(((0,s.isUndefined)(r[d])||+r[d].x!=+t.x)&&(d=-1,r.forEach(function(e,n){(e.x.constructor===Date?+e.x:e.x)===(t.x.constructor===Date?+t.x:t.x)&&(d=n)})),d in r&&r[d].value*t.value>=0&&(c+=u(r[d].value)-l))}),c}},isWithinShape:function isWithinShape(t,e){var n=this,i=(0,r.select)(t),o=void 0;return n.isTargetToShow(e.id)?n.hasValidPointType(t.nodeName)?o=n.isStepType(e)?n.isWithinStep(t,n.getYScale(e.id)(e.value)):n.isWithinCircle(t,1.5*n.pointSelectR(e)):"path"===t.nodeName&&(o=!i.classed(a["default"].bar)||n.isWithinBar(t)):o=!1,o},getInterpolate:function getInterpolate(t){var e=this.getInterpolateType(t);return{basis:i.curveBasis,"basis-closed":i.curveBasisClosed,"basis-open":i.curveBasisOpen,bundle:i.curveBundle,cardinal:i.curveCardinal,"cardinal-closed":i.curveCardinalClosed,"cardinal-open":i.curveCardinalOpen,"catmull-rom":i.curveCatmullRom,"catmull-rom-closed":i.curveCatmullRomClosed,"catmull-rom-open":i.curveCatmullRomOpen,"monotone-x":i.curveMonotoneX,"monotone-y":i.curveMonotoneY,natural:i.curveNatural,"linear-closed":i.curveLinearClosed,linear:i.curveLinear,step:i.curveStep,"step-after":i.curveStepAfter,"step-before":i.curveStepBefore}[e]},getInterpolateType:function getInterpolateType(t){var e=this,n=e.config.spline_interpolation_type,i=e.isInterpolationType(n)?n:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?e.config.line_step_type:"linear"}})},function(t,e,n){"use strict";var i=n(64),r=n(63),a=n(66),o=n(68),s=_interopRequireDefault(n(3)),u=_interopRequireDefault(n(8)),l=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,l.extend)(s["default"].prototype,{initPie:function initPie(){var t=this.config,e=t.pie_padding,n=this.hasType("pie")&&e?.01*e:t[t.data_type+"_padAngle"]?t[t.data_type+"_padAngle"]:0;this.pie=(0,r.pie)().padAngle(n).value(function(t){return t.values.reduce(function(t,e){return t+e.value},0)}),t.data_order||this.pie.sort(null)},updateRadius:function updateRadius(){var t=this,e=t.config,n=e.pie_innerRadius,i=e.pie_padding,r=e.gauge_width||e.donut_width;t.radiusExpanded=Math.min(t.arcWidth,t.arcHeight)/2,t.radius=.95*t.radiusExpanded,t.innerRadiusRatio=r?(t.radius-r)/t.radius:.6;var a=n||(i?i*(t.innerRadiusRatio+.1):0);t.innerRadius=t.hasType("donut")||t.hasType("gauge")?t.radius*t.innerRadiusRatio:a},updateArc:function updateArc(){var t=this;t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded(),t.svgArcExpandedSub=t.getSvgArcExpanded(.98)},updateAngle:function updateAngle(t){var e=this,n=e.config,i=t,r=!1,a=0,o=void 0,s=void 0,u=void 0,l=void 0;return n?(e.pie(e.filterTargetsToShow(e.data.targets)).forEach(function(t){r||t.data.id!==i.data.id||(r=!0,(i=t).index=a),a++}),isNaN(i.startAngle)&&(i.startAngle=0),isNaN(i.endAngle)&&(i.endAngle=i.startAngle),e.isGaugeType(i.data)&&(o=n.gauge_min,s=n.gauge_max,u=Math.PI*(n.gauge_fullCircle?2:1)/(s-o),l=i.value<o?0:i.value<s?i.value-o:s-o,i.startAngle=n.gauge_startingAngle,i.endAngle=i.startAngle+u*l),r?i:null):null},getSvgArc:function getSvgArc(){var t=this,e=(0,r.arc)().outerRadius(t.radius).innerRadius(t.innerRadius),n=function(n,i){if(i)return e(n);var r=t.updateAngle(n);return r?e(r):"M 0 0"};return n.centroid=e.centroid,n},getSvgArcExpanded:function getSvgArcExpanded(t){var e=this,n=(0,r.arc)().outerRadius(e.radiusExpanded*(t||1)).innerRadius(e.innerRadius);return function(t){var i=e.updateAngle(t);return i?n(i):"M 0 0"}},getArc:function getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},transformForArcLabel:function transformForArcLabel(t){var e=this,n=e.config,i=e.updateAngle(t),r="";if(i&&!e.hasType("gauge")){var a=this.svgArc.centroid(i),o=isNaN(a[0])?0:a[0],s=isNaN(a[1])?0:a[1],u=Math.sqrt(o*o+s*s),c=e.hasType("donut")&&n.donut_label_ratio||e.hasType("pie")&&n.pie_label_ratio;r="translate("+o*(c=c?(0,l.isFunction)(c)?c(t,e.radius,u):c:e.radius&&(u?(36/e.radius>.375?1.175-36/e.radius:.8)*e.radius/u:0))+","+s*c+")"}return r},getArcRatio:function getArcRatio(t){var e=this,n=e.config,i=null;if(t)if(e.pie.padAngle()()){var r=e.getTotalDataSum();e.hiddenTargetIds.length&&(r-=(0,a.sum)(e.api.data.values.call(e.api,e.hiddenTargetIds))),i=t.value/r}else i=(t.endAngle-t.startAngle)/(Math.PI*(e.hasType("gauge")&&!n.gauge_fullCircle?1:2));return i},convertToArcData:function convertToArcData(t){return this.addName({id:t.data.id,value:t.value,ratio:this.getArcRatio(t),index:t.index})},textForArcLabel:function textForArcLabel(t){var e=this,n=t.node?t.datum():t;if(!e.shouldShowArcLabel())return"";var i=e.updateAngle(n),r=i?i.value:null,a=e.getArcRatio(i),o=n.data.id;if(!e.hasType("gauge")&&!e.meetsArcLabelThreshold(a))return"";var s=(e.getArcLabelFormat()||e.defaultArcValueFormat)(r,a,o).toString();if(t.node)if(-1===s.indexOf("\n"))t.text(s);else{var u=s.split("\n"),l=u.length-1;u.forEach(function(e,n){t.append("tspan").attr("x",0).attr("dy",(0===n?-l:1)+"em").text(e)})}return s},textForGaugeMinMax:function textForGaugeMinMax(t,e){var n=this.getGaugeLabelExtents();return n?n(t,e):t},expandArc:function expandArc(t){var e=this,n=void 0;if(e.transiting)n=window.setInterval(function(){e.transiting||(window.clearInterval(n),e.legend.selectAll("."+u["default"].legendItemFocused).size()>0&&e.expandArc(t))},10);else{var r=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(r,"."+u["default"].chartArc)).each(function(t){e.shouldExpand(t.data.id)&&(0,i.select)(this).selectAll("path").transition().duration(e.expandDuration(t.data.id)).attr("d",e.svgArcExpanded).transition().duration(2*e.expandDuration(t.data.id)).attr("d",e.svgArcExpandedSub)})}},unexpandArc:function unexpandArc(t){var e=this;if(!e.transiting){var n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n,"."+u["default"].chartArc)).selectAll("path").transition().duration(function(t){return e.expandDuration(t.data.id)}).attr("d",e.svgArc),e.svg.selectAll(""+u["default"].arc).style("opacity","1")}},expandDuration:function expandDuration(t){var e=this.config;return this.isDonutType(t)?e.donut_expand_duration:this.isGaugeType(t)?e.gauge_expand_duration:this.isPieType(t)?e.pie_expand_duration:50},shouldExpand:function shouldExpand(t){var e=this.config;return this.isDonutType(t)&&e.donut_expand||this.isGaugeType(t)&&e.gauge_expand||this.isPieType(t)&&e.pie_expand},shouldShowArcLabel:function shouldShowArcLabel(){var t=this.config,e=!0;return this.hasType("donut")?e=t.donut_label_show:this.hasType("pie")&&(e=t.pie_label_show),e},meetsArcLabelThreshold:function meetsArcLabelThreshold(t){var e=this.config;return t>=(this.hasType("donut")?e.donut_label_threshold:e.pie_label_threshold)},getArcLabelFormat:function getArcLabelFormat(){var t=this.config,e=t.pie_label_format;return this.hasType("gauge")?e=t.gauge_label_format:this.hasType("donut")&&(e=t.donut_label_format),e},getGaugeLabelExtents:function getGaugeLabelExtents(){return this.config.gauge_label_extents},getArcTitle:function getArcTitle(){return this.hasType("donut")?this.config.donut_title:""},updateTargetsForArc:function updateTargetsForArc(t){var e=this,n=e.main,i=e.classChartArc.bind(e),r=e.classArcs.bind(e),a=e.classFocus.bind(e),o=n.select("."+u["default"].chartArcs).selectAll("."+u["default"].chartArc).data(e.pie(t)).attr("class",function(t){return i(t)+a(t.data)}),s=o.enter().append("g").attr("class",i);s.append("g").attr("class",r).merge(o),s.append("text").attr("dy",e.hasType("gauge")?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none")},initArc:function initArc(){this.arcs=this.main.select("."+u["default"].chart).append("g").attr("class",u["default"].chartArcs).attr("transform",this.getTranslate("arc")),this.setArcTitle()},setArcTitle:function setArcTitle(){var t=this.getArcTitle();if(t){var e=t.split("\n"),n=this.arcs.append("text").attr("class",u["default"].chartArcsTitle).style("text-anchor","middle");if(e.length>1){var i=+n.style("font-size").replace("px",""),r=Math.floor(n.text(".").node().getBBox().height,n.text(""));e.forEach(function(t,e){return n.insert("tspan").text(t).attr("x",0).attr("dy",e?r:0)}),n.attr("y","-"+(i*(e.length-2)||i/2))}else n.text(t)}},redrawArc:function redrawArc(t,e,n){function selectArc(t,e,n){r.expandArc(n),r.api.focus(n),r.toggleFocusLegend(n,!0),r.showTooltip([e],t)}function unselectArc(t){var e=t&&t.id||undefined;r.unexpandArc(e),r.api.revert(),r.revertLegend(),r.hideTooltip()}var r=this,a=r.config,s=r.main,l="touch"===r.inputType,c="mouse"===r.inputType,d=s.selectAll("."+u["default"].arcs).selectAll("."+u["default"].arc).data(r.arcData.bind(r));if(d.exit().transition().duration(e).style("opacity","0").remove(),(d=d.enter().append("path").attr("class",r.classArc.bind(r)).style("fill",function(t){return r.color(t.data)}).style("cursor",function(t){return a.interaction_enabled&&(a.data_selection_isselectable(t)?"pointer":null)}).style("opacity","0").each(function(t){r.isGaugeType(t.data)&&(t.startAngle=a.gauge_startingAngle,t.endAngle=a.gauge_startingAngle),this._current=t}).merge(d)).attr("transform",function(t){return!r.isGaugeType(t.data)&&n?"scale(0)":""}).style("opacity",function(t){return t===this._current?"0":"1"}).each(function(){r.transiting=!0}).transition().duration(t).attrTween("d",function(t){var e=r.updateAngle(t);if(!e)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var n=(0,o.interpolate)(this._current,e);return this._current=n(0),function(e){var i=n(e);return i.data=t.data,r.getArc(i,!0)}}).attr("transform",n?"scale(1)":"").style("fill",function(t){return r.levelColor?r.levelColor(t.data.values[0].value):r.color(t.data.id)}).style("opacity","1").call(r.endall,function(){r.transiting=!1}),a.interaction_enabled&&(d.on("click",function(t,e){var n=r.updateAngle(t),i=void 0;n&&(i=r.convertToArcData(n),r.toggleShape&&r.toggleShape(this,i,e),r.config.data_onclick.call(r.api,i,this))}),c&&d.on("mouseover",function(t){if(!r.transiting){var e=r.updateAngle(t),n=e?r.convertToArcData(e):null;selectArc(this,n,n&&n.id||undefined),r.config.data_onover(n,this)}}).on("mouseout",function(t){if(!r.transiting){var e=r.updateAngle(t),n=e?r.convertToArcData(e):null;unselectArc(),r.config.data_onout(n,this)}}).on("mousemove",function(t){var e=r.updateAngle(t),n=e?r.convertToArcData(e):null;r.showTooltip([n],this)}),l&&r.hasArcType())){var f=function(){var t=i.event.changedTouches[0];return(0,i.select)(document.elementFromPoint(t.clientX,t.clientY))};r.svg.on("touchstart",function(){if(!r.transiting){var t=f().datum(),e=t&&t.data&&t.data.id?r.updateAngle(t):null,n=e?r.convertToArcData(e):null,i=n&&n.id||undefined;i===undefined?unselectArc():selectArc(this,n,i),r.config.data_onover(n,this)}}).on("touchend",function(){if(!r.transiting){var t=f().datum(),e=t&&t.data&&t.data.id?r.updateAngle(t):null,n=e?r.convertToArcData(e):null,i=n&&n.id||undefined;i===undefined?unselectArc():selectArc(this,n,i),r.config.data_onout(n,this)}}).on("touchmove",function(){var t=f().datum(),e=t&&t.data&&t.data.id?r.updateAngle(t):null,n=e?r.convertToArcData(e):null,i=n&&n.id||undefined;i===undefined?unselectArc():selectArc(this,n,i)})}var h=s.selectAll("."+u["default"].chartArc).select("text").style("opacity","0").attr("class",function(t){return r.isGaugeType(t.data)?u["default"].gaugeValue:""});if(a.gauge_fullCircle&&h.attr("dy",""+Math.round(r.radius/14)),h[!h.empty()&&h.classed(u["default"].gaugeValue)?"call":"text"](r.textForArcLabel.bind(r)).attr("transform",r.transformForArcLabel.bind(r)).style("font-size",function(t){return r.isGaugeType(t.data)?Math.round(r.radius/5)+"px":""}).transition().duration(t).style("opacity",function(t){return r.isTargetToShow(t.data.id)&&r.isArcType(t.data)?"1":"0"}),s.select("."+u["default"].chartArcsTitle).style("opacity",r.hasType("donut")||r.hasType("gauge")?"1":"0"),r.hasType("gauge")){var g=(a.gauge_fullCircle?-4:-1)*a.gauge_startingAngle;r.arcs.select("."+u["default"].chartArcsBackground).attr("d",function(){var t={data:[{value:a.gauge_max}],startAngle:a.gauge_startingAngle,endAngle:g};return r.getArc(t,!0,!0)}),r.arcs.select("."+u["default"].chartArcsGaugeUnit).attr("dy",".75em").text(a.gauge_label_show?a.gauge_units:""),a.gauge_label_show&&(r.arcs.select("."+u["default"].chartArcsGaugeMin).attr("dx",-1*(r.innerRadius+(r.radius-r.innerRadius)/(a.gauge_fullCircle?1:2))+"px").attr("dy","1.2em").text(r.textForGaugeMinMax(a.gauge_min,!1)),!a.gauge_fullCircle&&r.arcs.select("."+u["default"].chartArcsGaugeMax).attr("dx",r.innerRadius+(r.radius-r.innerRadius)/2+"px").attr("dy","1.2em").text(r.textForGaugeMinMax(a.gauge_max,!0)))}},initGauge:function initGauge(){var t=this.config,e=this.arcs;this.hasType("gauge")&&(e.append("path").attr("class",u["default"].chartArcsBackground),e.append("text").attr("class",u["default"].chartArcsGaugeUnit).style("text-anchor","middle").style("pointer-events","none"),t.gauge_label_show&&(e.append("text").attr("class",u["default"].chartArcsGaugeMin).style("text-anchor","middle").style("pointer-events","none"),!t.gauge_fullCircle&&e.append("text").attr("class",u["default"].chartArcsGaugeMax).style("text-anchor","middle").style("pointer-events","none")))},getGaugeLabelHeight:function getGaugeLabelHeight(){return this.config.gauge_label_show?20:0}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(8)),a=_interopRequireDefault(n(3)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(a["default"].prototype,{initBar:function initBar(){this.main.select("."+r["default"].chart).append("g").attr("class",r["default"].chartBars)},updateTargetsForBar:function updateTargetsForBar(t){var e=this,n=e.config,i=e.classChartBar.bind(e),a=e.classBars.bind(e),o=e.classFocus.bind(e);e.main.select("."+r["default"].chartBars).selectAll("."+r["default"].chartBar).data(t).attr("class",function(t){return i(t)+o(t)}).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none").append("g").attr("class",a).style("cursor",function(t){return n.data_selection_isselectable(t)?"pointer":null})},updateBar:function updateBar(t){var e=this,n=e.barData.bind(e),i=e.classBar.bind(e),a=e.initialOpacity.bind(e),o=function(t){return e.color(t.id)};e.mainBar=e.main.selectAll("."+r["default"].bars).selectAll("."+r["default"].bar).data(n),e.mainBar.exit().transition().duration(t).style("opacity","0").remove(),e.mainBar=e.mainBar.enter().append("path").attr("class",i).style("stroke",o).style("fill",o).merge(e.mainBar).style("opacity",a)},redrawBar:function redrawBar(t,e){return[(e?this.mainBar.transition(Math.random().toString()):this.mainBar).attr("d",t).style("fill",this.color).style("opacity","1")]},getBarW:function getBarW(t,e){var n=this.config,i=(0,o.isNumber)(n.bar_width)?n.bar_width:e?t.tickInterval(this.getMaxDataCount())*n.bar_width_ratio/e:0;return n.bar_width_max&&i>n.bar_width_max?n.bar_width_max:i},getBars:function getBars(t,e){var n=(0,o.isValue)(t)?"-"+t:"";return(e?this.main.selectAll("."+r["default"].bars+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+r["default"].bar+n)},expandBars:function expandBars(t,e,n){n&&this.unexpandBars(),this.getBars(t,e).classed(r["default"].EXPANDED,!0)},unexpandBars:function unexpandBars(t){this.getBars(t).classed(r["default"].EXPANDED,!1)},generateDrawBar:function generateDrawBar(t,e){var n=this.config,i=this.generateGetBarPoints(t,e),r=n.axis_rotated,a=n.data_groups.length,s=n.bar_radius,u=n.bar_radius_ratio,l=(0,o.isNumber)(s)&&s>0?function(){return s}:(0,o.isNumber)(u)?function(t){return t*u}:null;return function(t,e){var n=i(t,e),o=+r,s=+!o,u=t.value<0,c=["",""],d=0;if(l&&!a){var f=r?s:o,h=n[2][f]-n[0][f],g="a"+(d=l(h))+","+d+" "+(u?"1 0 0":"0 0 1")+" ";c[+!r]=""+g+d+","+d,c[+r]=""+g+[-d,d][r?"sort":"reverse"](),u&&c.reverse()}var p=r?"H"+(n[1][o]-d)+" "+c[0]+"V"+(n[2][s]-d)+" "+c[1]+"H"+n[3][o]:"V"+(n[1][s]+(u?-d:d))+" "+c[0]+"H"+(n[2][o]-d)+" "+c[1]+"V"+n[3][s];return"M"+n[0][o]+","+n[0][s]+p+"z"}},generateGetBarPoints:function generateGetBarPoints(t,e){var n=this,i=e?n.subXAxis:n.xAxis,r=t.__max__+1,a=n.getBarW(i,r),o=n.getShapeX(a,r,t,!!e),s=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),l=e?n.getSubYScale:n.getYScale;return function(t,e){var i=l.call(n,t.id)(0),r=u(t,e)||i,c=o(t),d=s(t);return n.config.axis_rotated&&(t.value>0&&d<i||t.value<0&&i<d)&&(d=i),[[c,r],[c,d-(i-r)],[c+a,d-(i-r)],[c+a,r]]}},isWithinBar:function isWithinBar(t){var e=(0,i.mouse)(t),n=(0,o.getRectSegList)(t),r=t.getBBox(),a=n[0],s=n[1],u=Math.min(a.x,s.x),l=Math.min(a.y,s.y),c=r.width,d=r.height;return u-2<e[0]&&e[0]<u+c+2&&l-2<e[1]&&e[1]<l+d+2}})},function(t,e,n){"use strict";var i=n(66),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),a=n(6);(0,a.extend)(r["default"].prototype,{initBubble:function initBubble(){var t=this.config;this.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)},getBaseLength:function getBaseLength(){var t=this.getCache("$baseLength");return t||this.addCache("$baseLength",t=(0,i.min)([this.axes.x.select("path").node().getTotalLength(),this.axes.y.select("path").node().getTotalLength()])),t},getBubbleR:function getBubbleR(t){var e=this.config.bubble_maxR;(0,a.isFunction)(e)?e=e(t):!(0,a.isNumber)(e)&&(e=this.getBaseLength()/(2*this.getMaxDataCount())+12);var n=(0,i.max)(this.getMinMaxData().max.map(function(t){return(0,a.isObject)(t.value)?t.value.mid:t.value})),r=e*e*Math.PI,o=t.value*(r/n);return Math.sqrt(o/Math.PI)}})},function(t,e,n){"use strict";var i=n(63),r=n(64),a=_interopRequireDefault(n(8)),o=_interopRequireDefault(n(3)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(o["default"].prototype,{initLine:function initLine(){this.main.select("."+a["default"].chart).append("g").attr("class",a["default"].chartLines)},updateTargetsForLine:function updateTargetsForLine(t){var e=this,n=e.config,i=e.classChartLine.bind(e),r=e.classLines.bind(e),o=e.classAreas.bind(e),s=e.classCircles.bind(e),u=e.classFocus.bind(e),l=e.main.select("."+a["default"].chartLines).selectAll("."+a["default"].chartLine).data(t).attr("class",function(t){return i(t)+u(t)}).enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none");l.append("g").attr("class",r),l.append("g").attr("class",o),n.point_show&&(n.data_selection_enabled&&l.append("g").attr("class",function(t){return e.generateClass(a["default"].selectedCircles,t.id)}),l.append("g").attr("class",s).style("cursor",function(t){return n.data_selection_isselectable(t)?"pointer":null})),t.forEach(function(t){e.main.selectAll("."+a["default"].selectedCircles+e.getTargetSelectorSuffix(t.id)).selectAll(""+a["default"].selectedCircle).each(function(e){e.value=t.values[e.index].value})})},updateLine:function updateLine(t){var e=this;e.mainLine=e.main.selectAll("."+a["default"].lines).selectAll("."+a["default"].line).data(e.lineData.bind(e)),e.mainLine.exit().transition().duration(t).style("opacity","0").remove(),e.mainLine=e.mainLine.enter().append("path").attr("class",function(t){return e.classLine.bind(e)(t)+" "+(e.extraLineClasses(t)||"")}).style("stroke",e.color).merge(e.mainLine).style("opacity",e.initialOpacity.bind(e)).style("shape-rendering",function(t){return e.isStepType(t)?"crispEdges":""}).attr("transform",null)},redrawLine:function redrawLine(t,e){return[(e?this.mainLine.transition(Math.random().toString()):this.mainLine).attr("d",t).style("stroke",this.color).style("opacity","1")]},getCurve:function getCurve(t){var e=this;return e.config.axis_rotated&&e.isStepType(t)?function(n){var i=e.getInterpolate(t)(n);return i.orgPoint=i.point,i.pointRotated=function(t,e){1===this._point&&(this._point=2);var n=this._y*(1-this._t)+e*this._t;this._context.lineTo(this._x,n),this._context.lineTo(t,n),this._x=t,this._y=e},i.point=function(t,e){0===this._point?this.orgPoint(t,e):this.pointRotated(t,e)},i}:e.getInterpolate(t)},generateDrawLine:function generateDrawLine(t,e){var n=this,r=n.config,a=r.line_connectNull,o=r.axis_rotated,s=n.generateGetLinePoints(t,e),u=e?n.getSubYScale:n.getYScale,l=function(t){return(e?n.subxx:n.xx).call(n,t)},c=function(t,e){return r.data_groups.length>0?s(t,e)[0][1]:u.call(n,t.id)(n.getBaseValue(t))},d=(0,i.line)();return d=o?d.x(c).y(l):d.x(l).y(c),a||(d=d.defined(function(t){return null!==n.getBaseValue(t)})),function(t){var i=e?n.x:n.subX,s=u.call(n,t.id),l=a?n.filterRemoveNull(t.values):t.values,c=0,f=0,h=void 0;return n.isLineType(t)?r.data_regions[t.id]?h=n.lineWithRegions(l,i,s,r.data_regions[t.id]):(n.isStepType(t)&&(l=n.convertValuesToStep(l)),h=d.curve(n.getCurve(t))(l)):(l[0]&&(c=i(l[0].x),f=s(l[0].value)),h=o?"M "+f+" "+c:"M "+c+" "+f),h||"M 0 0"}},generateGetLinePoints:function generateGetLinePoints(t,e){var n=this,i=n.config,r=t.__max__+1,a=!!e,o=n.getShapeX(0,r,t,a),s=n.getShapeY(a),u=n.getShapeOffset(n.isLineType,t,a),l=a?n.getSubYScale:n.getYScale;return function(t,e){var r=l.call(n,t.id)(0),a=u(t,e)||r,c=o(t),d=s(t);i.axis_rotated&&(t.value>0&&d<r||t.value<0&&r<d)&&(d=r);var f=[c,d-(r-a)];return[f,f,f,f]}},lineWithRegions:function lineWithRegions(t,e,n,i){var r=this,a=r.config.axis_rotated,o=r.isTimeSeries(),u=r.isCategorized()?.5:0,l=[],c=void 0,d=void 0,f=void 0,h=void 0,g=function(t,e){for(var n,i=0;n=e[i];i++)if(n.start<t&&t<=n.end)return n.style;return!1};if((0,s.isDefined)(i))for(var p,_=function(t,e){return(0,s.isUndefined)(t)?e:o?r.parseDate(t):t},m=0;p=i[m];m++){var x=_(p.start,t[0].x),v=_(p.end,t[t.length-1].x),y=p.style||{dasharray:"2 2"};l[m]={start:x,end:v,style:y}}for(var b,T=a?function(t){return n(t.value)}:function(t){return e(t.x)},w=a?function(t){return e(t.x)}:function(t){return n(t.value)},A=function(t){return"M"+t[0][0]+","+t[0][1]+"L"+t[1][0]+","+t[1][1]},M=o?function(t,i,r,o){var s=t.x.getTime(),u=i.x-t.x,l=new Date(s+u*r),c=new Date(s+u*(r+o)),h=a?[[n(d(r)),e(l)],[n(d(r+f)),e(c)]]:[[e(l),n(d(r))],[e(c),n(d(r+f))]];return A(h)}:function(t,i,r,o){var s=a?[[n(d(r),!0),e(c(r))],[n(d(r+o),!0),e(c(r+o))]]:[[e(c(r),!0),n(d(r))],[e(c(r+o),!0),n(d(r+o))]];return A(s)},C="M",S=0;b=t[S];S++){var D=t[S-1];y=g(b.x,l);if((0,s.isUndefined)(l)||!y)C+=(S?"L":"")+T(b)+","+w(b);else{try{y=y.dasharray.split(" ")}catch(O){y="2 2".split(" ")}c=r.getScale(D.x+u,b.x+u,o),d=r.getScale(D.value,b.value);var k=e(b.x)-e(D.x),L=n(b.value)-n(D.value),R=Math.sqrt(Math.pow(k,2)+Math.pow(L,2));h=(f=y[0]/R)*y[1];for(var F=f;F<=1;F+=h)C+=M(D,b,F,f),F+h>=1&&(C+=M(D,b,1,0))}}return C},updateArea:function updateArea(t){var e=this;e.mainArea=e.main.selectAll("."+a["default"].areas).selectAll("."+a["default"].area).data(e.lineData.bind(e)),e.mainArea.exit().transition().duration(t).style("opacity","0").remove(),e.mainArea=e.mainArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=(0,r.select)(this).style("opacity"),"0"}).merge(e.mainArea),e.mainArea.style("opacity",e.orgAreaOpacity)},redrawArea:function redrawArea(t,e){var n=this;return[(e?this.mainArea.transition(Math.random().toString()):this.mainArea).attr("d",t).style("fill",this.color).style("opacity",function(t){return n.isAreaRangeType(t)?n.orgAreaOpacity/1.75:n.orgAreaOpacity})]},generateDrawArea:function generateDrawArea(t,e){var n=this,r=n.config,a=r.line_connectNull,o=r.axis_rotated,s=r.data_groups.length>0,u=n.generateGetAreaPoints(t,e),l=e?n.getSubYScale:n.getYScale,c=function(t){return(e?n.subxx:n.xx).call(n,t)},d=function(t,e){return s?u(t,e)[0][1]:l.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"high"):n.getAreaBaseValue(t.id))},f=function(t,e){return s?u(t,e)[1][1]:l.call(n,t.id)(n.isAreaRangeType(t)?n.getAreaRangeData(t,"low"):t.value)};return function(t){var e=a?n.filterRemoveNull(t.values):t.values,s=0,u=0,l=void 0;if(n.isAreaType(t)){var h=(0,i.area)();h=o?h.y(c).x0(d).x1(f):h.x(c).y0(r.area_above?0:d).y1(f),a||(h=h.defined(function(t){return null!==n.getBaseValue(t)})),n.isStepType(t)&&(e=n.convertValuesToStep(e)),l=h.curve(n.getCurve(t))(e)}else e[0]&&(s=n.x(e[0].x),u=n.getYScale(t.id)(e[0].value)),l=o?"M "+u+" "+s:"M "+s+" "+u;return l||"M 0 0"}},getAreaBaseValue:function getAreaBaseValue(){return 0},generateGetAreaPoints:function generateGetAreaPoints(t,e){var n=this,i=n.config,r=t.__max__+1,a=n.getShapeX(0,r,t,!!e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,!!e),u=e?n.getSubYScale:n.getYScale;return function(t,e){var r=u.call(n,t.id)(0),l=s(t,e)||r,c=a(t),d=o(t);return i.axis_rotated&&(t.value>0&&d<r||t.value<0&&r<d)&&(d=r),[[c,l],[c,d-(r-l)],[c,d-(r-l)],[c,l]]}},updateCircle:function updateCircle(){var t=this;t.config.point_show&&(t.mainCircle=t.main.selectAll("."+a["default"].circles).selectAll("."+a["default"].circle).data(function(e){return!t.isBarType(e)&&(!t.isLineType(e)||t.shouldDrawPointsForLine(e))&&t.labelishData(e)}),t.mainCircle.exit().remove(),t.mainCircle=t.mainCircle.enter().append(t.point("create",this,t.classCircle.bind(t),t.pointR.bind(t),t.color)).merge(t.mainCircle).style("stroke",t.color).style("opacity",t.initialOpacityForCircle.bind(t)))},redrawCircle:function redrawCircle(t,e,n,i){var r=this,o=r.main.selectAll("."+a["default"].selectedCircle);if(!r.config.point_show)return[];var s=[];r.mainCircle.each(function(a){var u=r.point("update",r,t,e,r.opacityForCircle.bind(r),r.color,n,i,o).bind(this)(a);s.push(u)});var u=r.isCirclePoint()?"c":"";return[s,o.attr(u+"x",t).attr(u+"y",e)]},circleX:function circleX(t){var e=(0,s.isValue)(t.x);return this.config.zoom_enabled&&this.zoomScale?e?this.zoomScale(t.x):null:e?this.x(t.x):null},updateCircleY:function updateCircleY(){var t=this,e=void 0,n=void 0;t.config.data_groups.length>0?(e=t.getShapeIndices(t.isLineType),n=t.generateGetLinePoints(e),t.circleY=function(t,e){return n(t,e)[0][1]}):t.circleY=function(e){return t.getYScale(e.id)(t.getBaseValue(e))}},getCircles:function getCircles(t,e){var n=(0,s.isValue)(t)?"-"+t:"";return(e?this.main.selectAll("."+a["default"].circles+this.getTargetSelectorSuffix(e)):this.main).selectAll("."+a["default"].circle+n)},expandCircles:function expandCircles(t,e,n){var i=this,o=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var s=i.getCircles(t,e).classed(a["default"].EXPANDED,!0),u=o(s)/i.config.point_r;i.isCirclePoint()?s.attr("r",o):s.each(function(){var t=(0,r.select)(this),e=this.getBBox(),n=e.x+.5*e.width,i=e.y+.5*e.height;"circle"===this.tagName?t.attr("r",o):t.style("transform","translate("+(1-u)*n+"px, "+(1-u)*i+"px) scale("+u+")")})},unexpandCircles:function unexpandCircles(t){var e=this,n=e.pointR.bind(e),i=e.getCircles(t).filter(function(){return(0,r.select)(this).classed(a["default"].EXPANDED)}).classed(a["default"].EXPANDED,!1);i.attr("r",n),e.isCirclePoint()||i.style("transform","scale("+n(i)/e.config.point_r+")")},pointR:function(t){var e=this.config.point_r,n=e;return this.isStepType(t)?n=0:this.isBubbleType(t)?n=this.getBubbleR(t):(0,s.isFunction)(e)&&(n=e(t)),n},pointExpandedR:function pointExpandedR(t){var e=this.config,n=this.isBubbleType(t)?1.15:1.75;return e.point_focus_expand_enabled?e.point_focus_expand_r||this.pointR(t)*n:this.pointR(t)},pointSelectR:function pointSelectR(t){var e=this.config.point_select_r;return(0,s.isFunction)(e)?e(t):e||4*this.pointR(t)},isWithinCircle:function isWithinCircle(t,e){var n=(0,r.mouse)(t),i=(0,r.select)(t),a=this.isCirclePoint()?"c":"",o=+i.attr(a+"x"),s=+i.attr(a+"y");if(!o&&!s&&1===t.nodeType){var u=t.getBBox?t.getBBox():t.getBoundingClientRect();o=u.x,s=u.y}return Math.sqrt(Math.pow(o-n[0],2)+Math.pow(s-n[1],2))<e},isWithinStep:function isWithinStep(t,e){return Math.abs(e-(0,r.mouse)(t)[1])<30},shouldDrawPointsForLine:function shouldDrawPointsForLine(t){var e=this.config.line_point;return!0===e||(0,s.isArray)(e)&&-1!==e.indexOf(t.id)}})},function(t,e,n){"use strict";var i=n(64),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),a=n(6);(0,a.extend)(r["default"].prototype,{hasValidPointType:function hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasValidPointDrawMethods:function hasValidPointDrawMethods(t){var e=t||this.config.point_type;return(0,a.isObjectType)(e)&&(0,a.isFunction)(e.create)&&(0,a.isFunction)(e.update)},insertPointInfoDefs:function insertPointInfoDefs(t,e){for(var n,r=(new DOMParser).parseFromString(t,"image/svg+xml").firstChild,o=document.createElementNS(i.namespaces.svg,r.nodeName.toLowerCase()),s=r.attributes,u=0;n=s[u];u++)n=n.name,o.setAttribute(n,r.getAttribute(n));o.id=e,o.style.fill="inherit",o.style.stroke="inherit",r.children.length&&(o.innerHTML=(0,a.toArray)(r.children).map(function(t){return t.outerHTML}).join("")),this.defs.node().appendChild(o)},pointFromDefs:function pointFromDefs(t){return this.defs.select("#"+t)},generatePoint:function generatePoint(){var t=this,e=t.config,n=[],r=(0,a.notEmpty)(e.point_pattern)?e.point_pattern:[e.point_type];return function(e,a){for(var o=arguments.length,s=Array(o>2?o-2:0),u=2;u<o;u++)s[u-2]=arguments[u];return function(o){var u=o.id||o.data&&o.data.id||o,l=(0,i.select)(this),c=void 0;if(n.indexOf(u)<0&&n.push(u),c=r[n.indexOf(u)%r.length],t.hasValidPointType(c))c=t[c];else if(!t.hasValidPointDrawMethods(c)){var d=t.datetimeId+"-point-"+u;if(t.pointFromDefs(d).size()<1&&t.insertPointInfoDefs(c,d),"create"===e)return t.custom.create.bind(a).apply(undefined,[l,d].concat(s));if("update"===e)return t.custom.update.bind(a).apply(undefined,[l].concat(s))}return c[e].bind(a).apply(undefined,[l].concat(s))}}},getTransitionName:function getTransitionName(){return Math.random().toString()},custom:{create:function create(t,e,n,i,r){return t.append("use").attr("xlink:href","#"+e).attr("class",n).style("fill",r).node()},update:function update(t,e,n,i,r,a,o,s){var u=t.node().getBBox();u.width/=2,u.height/=2;var l=function(t){return e(t)-u.width},c=function(t){return n(t)-u.height},d=t;if(a){var f=this.getTransitionName();o&&(d=t.attr("x",l)),d=t.transition(f).attr("x",l).attr("y",c).transition(f),s.transition(this.getTransitionName())}else d=t.attr("x",l).attr("y",c);return d.style("opacity",i).style("fill",r)}},circle:{create:function create(t,e,n,i){return t.append("circle").attr("class",e).attr("r",n).style("fill",i).node()},update:function update(t,e,n,i,r,a,o,s){var u=this,l=t;if(u.hasType("bubble")&&(l=l.attr("r",u.pointR.bind(u))),a){var c=u.getTransitionName();o&&(l=l.attr("cx",e)),l=l.transition(c).attr("cx",e).attr("cy",n).transition(c),s.transition(u.getTransitionName())}else l=l.attr("cx",e).attr("cy",n);return l.style("opacity",i).style("fill",r)}},rectangle:{create:function create(t,e,n,i){var r=function(t){return 2*n(t)};return t.append("rect").attr("class",e).attr("width",r).attr("height",r).style("fill",i).node()},update:function update(t,e,n,i,r,a,o,s){var u=this.config.point_r,l=function(t){return e(t)-u},c=function(t){return n(t)-u},d=t;if(a){var f=this.getTransitionName();o&&(d=d.attr("x",l)),d=d.transition(f).attr("x",l).attr("y",c).transition(f),s.transition(this.getTransitionName())}else d=d.attr("x",l).attr("y",c);return d.style("opacity",i).style("fill",r)}}})},function(t,e,n){"use strict";var i=n(64),r=n(66),a=_interopRequireDefault(n(3)),o=_interopRequireDefault(n(8)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var u="$radarPoints";(0,s.extend)(a["default"].prototype,{initRadar:function initRadar(){var t=this,e=t.config;t.hasType("radar")&&(t.radars=t.main.select("."+o["default"].chart).append("g").attr("class",o["default"].chartRadars),t.radars.levels=t.radars.append("g").attr("class",o["default"].levels),t.radars.axes=t.radars.append("g").attr("class",o["default"].axis),t.radars.shapes=t.radars.append("g").attr("class",o["default"].shapes),t.maxValue=e.radar_axis_max||t.getMinMaxData().max[0].value)},getRadarSize:function getRadarSize(){var t=this.config.axis_x_categories.length<4?-20:10,e=(Math.min(this.arcWidth,this.arcHeight)-t)/2;return[e,e]},updateTargetsForRadar:function updateTargetsForRadar(t){var e=this.config;(0,s.isEmpty)(e.axis_x_categories)&&(e.axis_x_categories=(0,r.range)(0,(0,r.max)(t).values.length)),this.generateRadarPoints()},getRadarPosition:function getRadarPosition(t,e,n,i){var r=this.config,a=this.getRadarSize(),o=a[0],u=a[1],l=r.axis_x_categories.length,c=r.radar_direction_clockwise,d=(0,s.toArray)(t).map(function(a){return function getPosition(t,e,n,i,r,a){var o=t&&i>0?n-i:i,s=2*Math.PI;return r*(1-a*("x"===e?Math.sin:Math.cos)(o*s/n))}(c,a,l,e,(0,s.isDefined)(n)?n:"x"===t?o:u,i||r.radar_size_ratio)});return 1===d.length?d[0]:d},generateRadarPoints:function generateRadarPoints(){var t=this,e=t.config,n=t.data.targets,i=t.getRadarSize(),r=i[0],a=i[1],o=t.getCache(u)||{},s=o._size;if(!s||s.width!==r&&s.height!==a){n.forEach(function(n){o[n.id]=n.values.map(function(n,i){return t.getRadarPosition(["x","y"],i,undefined,function(n){return parseFloat(Math.max(n,0))/t.maxValue*e.radar_size_ratio}(n.value))})}),o._size={width:r,height:a},t.addCache(u,o)}},redrawRadar:function redrawRadar(t,e){var n=this,i=n.getTranslate("radar");i&&(n.radars.attr("transform",i),n.main.selectAll("."+o["default"].circles).attr("transform",i),n.main.select("."+o["default"].chartTexts).attr("transform",i),n.generateRadarPoints(),n.updateRadarLevel(),n.updateRadarAxes(),n.updateRadarShape(t,e))},generateGetRadarPoints:function generateGetRadarPoints(){var t=this.getCache(u);return function(e,n){var i=t[e.id][n];return[i,i,i,i]}},updateRadarLevel:function updateRadarLevel(){var t=this,e=t.config,n=t.getRadarSize(),i=n[0],a=n[1],u=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,d=t.radars.levels,f=(0,r.range)(0,u),h=e.radar_size_ratio*Math.min(i,a),g=f.map(function(t){return h*((t+1)/u)}),p=e.radar_level_text_format,_=f.map(function(e){var n=g[e];return(0,r.range)(0,l).map(function(e){return t.getRadarPosition(["x","y"],e,n,1).join(",")}).join(" ")}),m=d.selectAll("."+o["default"].level).data(f);m.exit().remove();var x=m.enter().append("g").attr("class",function(t,e){return o["default"].level+" "+o["default"].level+"-"+e});x.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(d.select("text").empty()&&d.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return p(0)}),x.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(e){return p(t.maxValue/f.length*(e+1))})),x.merge(m).attr("transform",function(t){return"translate("+(i-g[t])+", "+(a-g[t])+")"}).selectAll("polygon").attr("points",function(t){return _[t]}),c&&d.selectAll("text").attr("x",function(t){return(0,s.isUndefined)(t)?i:_[t].split(",")[0]}).attr("y",function(t){return(0,s.isUndefined)(t)?a:0})},updateRadarAxes:function updateRadarAxes(){var t=this,e=t.config,n=t.getRadarSize(),i=n[0],r=n[1],a=e.axis_x_categories,s=t.radars.axes.selectAll("g").data(a);s.exit().remove();var u=s.enter().append("g").attr("class",function(t,e){return o["default"].axis+"-"+e});e.radar_axis_line_show&&u.append("line"),e.radar_axis_text_show&&u.append("text"),s=u.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",i).attr("y1",r).attr("x2",function(e,n){return t.getRadarPosition("x",n)}).attr("y2",function(e,n){return t.getRadarPosition("y",n)}),e.radar_axis_text_show&&s.select("text").style("text-anchor","middle").attr("dy",".5em").text(function(t){return t}).datum(function(t,e){return{index:e}}).attr("x",function(e,n){return t.getRadarPosition("x",n,undefined,1)}).attr("y",function(e,n){return t.getRadarPosition("y",n,undefined,1)}),t.bindEvent()},bindEvent:function bindEvent(){var t=this,e=this;if(e.config.interaction_enabled){var n="mouse"===e.inputType;e.radars.select("."+o["default"].axis).on((n?"mouseover ":"")+"click",function(){if(!e.transiting){var t=(0,i.select)(i.event.target).datum().index;e.selectRectForSingle(e.svg.node(),null,t),e.setOver(t)}}).on("mouseout",n?function(){t.hideTooltip(),t.unexpandCircles()}:null)}},updateRadarShape:function updateRadarShape(t,e){var n=this,i=n.data.targets,r=n.getCache(u),a=n.radars.shapes.selectAll("polygon").data(i),o=a.enter().append("g").attr("class",n.classChartRadar.bind(n));a.exit().transition().duration(e).remove(),o.append("polygon").merge(a).transition().duration(t).style("fill",function(t){return n.color(t)}).style("stroke",function(t){return n.color(t)}).attr("points",function(t){return r[t.id].join(" ")})},radarCircleX:function radarCircleX(t){return this.getCache(u)[t.id][t.index][0]},radarCircleY:function radarCircleY(t){return this.getCache(u)[t.id][t.index][1]}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{initText:function initText(){this.main.select("."+a["default"].chart).append("g").attr("class",a["default"].chartTexts),this.mainText=(0,i.selectAll)([])},updateTargetsForText:function updateTargetsForText(t){var e=this,n=e.classChartText.bind(e),i=e.classTexts.bind(e),r=e.classFocus.bind(e);e.main.select("."+a["default"].chartTexts).selectAll("."+a["default"].chartText).data(t).attr("class",function(t){return n(t)+r(t)}).enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none").append("g").attr("class",i)},updateText:function updateText(t){var e=this,n=this,i=n.config,r=n.labelishData.bind(n),o=n.classText.bind(n);n.mainText=n.main.selectAll("."+a["default"].texts).selectAll("."+a["default"].text).data(function(t){return e.isRadarType(t)?t.values:r(t)}),n.mainText.exit().transition().duration(t).style("fill-opacity","0").remove(),n.mainText=n.mainText.enter().append("text").merge(n.mainText).attr("class",o).attr("text-anchor",function(t){return i.axis_rotated?t.value<0?"end":"start":"middle"}).style("stroke","none").style("fill",function(t){return n.color(t)}).style("fill-opacity","0").text(function(t,e,i){return n.dataLabelFormat(t.id)(t.value,t.id,e,i)})},redrawText:function redrawText(t,e,n,i){return[(i?this.mainText.transition():this.mainText).attr("x",t).attr("y",e).style("fill",this.color).style("fill-opacity",n?0:this.opacityForText.bind(this))]},getTextRect:function getTextRect(t,e,n){var r=(t.node?t.node():t).textContent,a=n.node?n.node():n,o=(0,i.select)("body").append("div").classed("bb",!0),s=o.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px"),u=(0,i.select)(a).style("font"),l=void 0;return s.selectAll(".dummy").data([r]).enter().append("text").classed(e,!!e).style("font",u).text(r).each(function(){l=this.getBoundingClientRect()}),o.remove(),l},generateXYForText:function generateXYForText(t,e,n,i){var r=this,a=r.generateGetAreaPoints(t,!1),o=r.generateGetBarPoints(e,!1),s=r.generateGetLinePoints(n,!1),u=r.generateGetRadarPoints(),l=i?r.getXForText:r.getYForText;return function(t,e){var n=r.isAreaType(t)&&a||r.isBarType(t)&&o||r.isRadarType(t)&&u||s;return l.call(r,n(t,e),t,this)}},getXForText:function getXForText(t,e,n){var i=this,r=i.config,a=void 0,o=void 0;return r.axis_rotated?(o=i.isBarType(e)?4:6,a=t[2][1]+o*(e.value<0?-1:1)):a=i.hasType("bar")?(t[2][0]+t[0][0])/2:t[0][0],null===e.value&&(a>i.width?a=i.width-n.getBoundingClientRect().width:a<0&&(a=4)),a+(r.data_labels_position.x||0)},getYForText:function getYForText(t,e,n){var i=this,r=i.config,a=r.point_r,s=3,u=void 0;if(r.axis_rotated)u=(t[0][0]+t[2][0]+.6*n.getBoundingClientRect().height)/2;else if(u=t[2][1],(0,o.isNumber)(a)&&a>5&&(i.isLineType(e)||i.isScatterType(e))&&(s+=r.point_r/2.3),e.value<0||0===e.value&&!i.hasPositiveValue)u+=n.getBoundingClientRect().height,i.isBarType(e)&&i.isSafari()?u-=s:!i.isBarType(e)&&i.isChrome()&&(u+=s);else{var l=2*-s;i.isBarType(e)?l=-s:i.isBubbleType(e)&&(l=s),u+=l}if(null===e.value&&!r.axis_rotated){var c=n.getBoundingClientRect().height;u<c?u=c:u>this.height&&(u=this.height-4)}return u+(r.data_labels_position.y||0)}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),r=n(6);(0,r.extend)(i["default"].prototype,{setTargetType:function setTargetType(t,e){var n=this,i=n.config;n.mapToTargetIds(t).forEach(function(t){n.withoutFadeIn[t]=e===i.data_types[t],i.data_types[t]=e}),t||(i.data_type=e)},hasType:function hasType(t,e){var n=this.config.data_types,i=e||this.data.targets,r=!1;return i&&i.length?i.forEach(function(e){var i=n[e.id];(i&&i.indexOf(t)>=0||!i&&"line"===t)&&(r=!0)}):Object.keys(n).length?Object.keys(n).forEach(function(e){n[e]===t&&(r=!0)}):r=this.config.data_type===t,r},hasArcType:function hasArcType(t){var e=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return!["pie","donut","gauge","radar"].filter(function(t){return-1===n.indexOf(t)}).every(function(n){return!e.hasType(n,t)})},isLineType:function isLineType(t){var e=(0,r.isString)(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"])},isTypeOf:function isTypeOf(t,e){var n=(0,r.isString)(t)?t:t.id,i=this.config.data_types[n];return(0,r.isArray)(e)?e.indexOf(i)>=0:i===e},isStepType:function isStepType(t){return this.isTypeOf(t,["step","area-step"])},isSplineType:function isSplineType(t){return this.isTypeOf(t,["spline","area-spline","area-spline-range"])},isAreaType:function isAreaType(t){return this.isTypeOf(t,["area","area-spline","area-spline-range","area-line-range","area-step"])},isAreaRangeType:function isAreaRangeType(t){return this.isTypeOf(t,["area-spline-range","area-line-range"])},isBarType:function isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType:function isBubbleType(t){return this.isTypeOf(t,"bubble")},isScatterType:function isScatterType(t){return this.isTypeOf(t,"scatter")},isPieType:function isPieType(t){return this.isTypeOf(t,"pie")},isGaugeType:function isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType:function isDonutType(t){return this.isTypeOf(t,"donut")},isRadarType:function isRadarType(t){return this.isTypeOf(t,"radar")},isArcType:function isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isRadarType(t)},isCirclePoint:function isCirclePoint(){var t=this.config,e=t.point_pattern;return"circle"===t.point_type&&(!e||(0,r.isArray)(e)&&0===e.length)},lineData:function lineData(t){return this.isLineType(t)?[t]:[]},arcData:function arcData(t){return this.isArcType(t.data)?[t]:[]},barData:function barData(t){return this.isBarType(t)?t.values:[]},labelishData:function labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isRadarType(t)?t.values:[]},barLineBubbleData:function barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType:function isInterpolationType(t){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(t)>=0}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var s=function(t){return(0,o.isValue)(t.position)||"end"},u=function(t){return"start"===t.position?4:"middle"===t.position?0:-4},l=function(t,e,n){return function(i){var r=t?0:e;return"start"===i.position?r=t?-n:0:"middle"===i.position&&(r=(t?-n:e)/2),r}};(0,o.extend)(r["default"].prototype,{initGrid:function initGrid(){var t=this.config;this.xgrid=(0,i.selectAll)([]),t.grid_lines_front||this.initGridLines(),t.grid_front||this.initXYFocusGrid()},initGridLines:function initGridLines(){var t=this;t.gridLines=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",a["default"].grid+" "+a["default"].gridLines),t.gridLines.append("g").attr("class",a["default"].xgridLines),t.gridLines.append("g").attr("class",a["default"].ygridLines),t.xgridLines=(0,i.selectAll)([])},updateXGrid:function updateXGrid(t){var e=this,n=e.config,r=n.axis_rotated,o=e.generateGridData(n.grid_x_type,e.x),s=e.isCategorized()?e.xAxis.tickOffset():0;e.xgridAttr=r?{x1:0,x2:e.width,y1:function y1(t){return e.x(t)-s},y2:function y2(t){return e.x(t)-s}}:{x1:function x1(t){return e.x(t)+s},x2:function x2(t){return e.x(t)+s},y1:0,y2:e.height},e.xgrid=e.main.select("."+a["default"].xgrids).selectAll("."+a["default"].xgrid).data(o),e.xgrid.exit().remove(),e.xgrid=e.xgrid.enter().append("line").attr("class",a["default"].xgrid).merge(e.xgrid),t||e.xgrid.each(function(){var t=(0,i.select)(this);Object.keys(e.xgridAttr).forEach(function(n){t.attr(n,e.xgridAttr[n]).style("opacity",function(){return t.attr(r?"y1":"x1")===(r?e.height:0)?"0":"1"})})})},updateYGrid:function updateYGrid(){var t=this,e=t.config,n=e.axis_rotated,i=t.yAxis.tickValues()||t.y.ticks(e.grid_y_ticks);t.ygrid=t.main.select("."+a["default"].ygrids).selectAll("."+a["default"].ygrid).data(i),t.ygrid.exit().remove(),t.ygrid=t.ygrid.enter().append("line").attr("class",a["default"].ygrid).merge(t.ygrid),t.ygrid.attr("x1",n?t.y:0).attr("x2",n?t.y:t.width).attr("y1",n?0:t.y).attr("y2",n?t.height:t.y),t.smoothLines(t.ygrid,"grid")},updateGrid:function updateGrid(t){var e=this;e.grid.style("visibility",e.hasArcType()?"hidden":"visible"),e.main.select("line."+a["default"].xgridFocus).style("visibility","hidden"),e.updateXGridLines(t),e.updateYGridLines(t)},updateXGridLines:function updateXGridLines(t){var e=this,n=e.main,i=e.config,r=i.axis_rotated;i.grid_x_show&&e.updateXGrid(),e.xgridLines=n.select("."+a["default"].xgridLines).selectAll("."+a["default"].xgridLine).data(i.grid_x_lines),e.xgridLines.exit().transition().duration(t).style("opacity","0").remove();var o=e.xgridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",r?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),e.xgridLines=o.merge(e.xgridLines),e.xgridLines.attr("class",function(t){return(a["default"].xgridLine+" "+(t["class"]||"")).trim()}).select("text").attr("text-anchor",s).attr("dx",u).transition().duration(t).text(function(t){return t.text}).transition().style("opacity","1")},updateYGridLines:function updateYGridLines(t){var e=this,n=e.main,i=e.config,r=i.axis_rotated;i.grid_y_show&&e.updateYGrid(),e.ygridLines=n.select("."+a["default"].ygridLines).selectAll("."+a["default"].ygridLine).data(i.grid_y_lines),e.ygridLines.exit().transition().duration(t).style("opacity","0").remove();var o=e.ygridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",r?"rotate(-90)":"").style("opacity","0"),e.ygridLines=o.merge(e.ygridLines);var c=e.yv.bind(e);e.ygridLines.attr("class",function(t){return(a["default"].ygridLine+" "+(t["class"]||"")).trim()}).select("line").transition().duration(t).attr("x1",r?c:0).attr("x2",r?c:e.width).attr("y1",r?0:c).attr("y2",r?e.height:c).transition().style("opacity","1"),e.ygridLines.select("text").attr("text-anchor",s).attr("dx",u).transition().duration(t).attr("dy",-5).attr("x",l(r,e.width,e.height)).attr("y",c).text(function(t){return t.text}).transition().style("opacity","1")},redrawGrid:function redrawGrid(t){var e=this,n=e.config.axis_rotated,i=e.xv.bind(e),r=e.xgridLines.select("line"),a=e.xgridLines.select("text");return r=(t?r.transition():r).attr("x1",n?0:i).attr("x2",n?e.width:i).attr("y1",n?i:0).attr("y2",n?i:e.height),a=(t?a.transition():a).attr("x",l(!n,e.width,e.height)).attr("y",i).text(function(t){return t.text}),[(t?r.transition():r).style("opacity","1"),(t?a.transition():a).style("opacity","1")]},initXYFocusGrid:function initXYFocusGrid(){var t=this,e=t.config;t.grid=t.main.append("g").attr("clip-path",t.clipPathForGrid).attr("class",a["default"].grid),e.grid_x_show&&t.grid.append("g").attr("class",a["default"].xgrids),e.grid_y_show&&t.grid.append("g").attr("class",a["default"].ygrids),e.grid_focus_show&&t.grid.append("g").attr("class",a["default"].xgridFocus).append("line").attr("class",a["default"].xgridFocus)},showXGridFocus:function showXGridFocus(t){var e=this,n=e.config,i=n.axis_rotated,r=t.filter(function(t){return t&&(0,o.isValue)(e.getBaseValue(t))}),s=e.main.selectAll("line."+a["default"].xgridFocus),u=e.xx.bind(e);!n.tooltip_show||e.hasType("bubble")||e.hasType("scatter")||e.hasArcType()||(s.style("visibility","visible").data([r[0]]).attr(i?"y1":"x1",u).attr(i?"y2":"x2",u),e.smoothLines(s,"grid"))},hideXGridFocus:function hideXGridFocus(){this.main.select("line."+a["default"].xgridFocus).style("visibility","hidden")},updateXgridFocus:function updateXgridFocus(){var t=this.config.axis_rotated;this.main.select("line."+a["default"].xgridFocus).attr("x1",t?0:-10).attr("x2",t?this.width:-10).attr("y1",t?-10:0).attr("y2",t?-10:this.height)},generateGridData:function generateGridData(t,e){var n=this.main.select("."+a["default"].axisX).selectAll(".tick").size(),i=[];if("year"===t)for(var r=this.getXDomain(),o=r[0].getFullYear(),s=r[1].getFullYear(),u=o;u<=s;u++)i.push(new Date(u+"-01-01 00:00:00"));else(i=e.ticks(10)).length>n&&(i=i.filter(function(t){return(t+"").indexOf(".")<0}));return i},getGridFilterToRemove:function getGridFilterToRemove(t){return t?function(e){var n=!1;return((0,o.isArray)(t)?t.concat():[t]).forEach(function(t){("value"in t&&e.value===t.value||"class"in t&&e["class"]===t["class"])&&(n=!0)}),n}:function(){return!0}},removeGridLines:function removeGridLines(t,e){var n=this.config,i=this.getGridFilterToRemove(t),r=e?a["default"].xgridLines:a["default"].ygridLines,o=e?a["default"].xgridLine:a["default"].ygridLine;this.main.select("."+r).selectAll("."+o).filter(i).transition().duration(n.transition_duration).style("opacity","0").remove();var s="grid_"+(e?"x":"y")+"_lines";n[s]=n[s].filter(function toShow(t){return!i(t)})}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{initTooltip:function initTooltip(){var t=this,e=t.config;if(t.tooltip=t.selectChart.style("position","relative").append("div").attr("class",a["default"].tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none"),e.tooltip_init_show){if(t.isTimeSeries()&&(0,o.isString)(e.tooltip_init_x)){var n=t.data.targets[0],i=void 0,r=void 0;for(e.tooltip_init_x=t.parseDate(e.tooltip_init_x),i=0;(r=n.values[i])&&r.x-e.tooltip_init_x!=0;i++);e.tooltip_init_x=i}t.tooltip.html(e.tooltip_contents.call(t,t.data.targets.map(function(n){return t.addName(n.values[e.tooltip_init_x])}),t.axis.getXAxisTickFormat(),t.getYFormat(t.hasArcType(null,["radar"])),t.color)),t.tooltip.style("top",e.tooltip_init_position.top).style("left",e.tooltip_init_position.left).style("display","block")}},getTooltipContent:function getTooltipContent(t,e,n,i){var r=this,a=r.config,s=a.tooltip_format_title||e,u=a.tooltip_format_name||function(t){return t},l=a.tooltip_format_value||n,c=a.tooltip_order,d=function(t){return r.getBaseValue(t)},f=r.levelColor?function(t){return r.levelColor(t.value)}:function(t){return i(t.id)};if(null===c&&a.data_groups.length){var h=r.orderTargets(r.data.targets).map(function(t){return t.id}).reverse();t.sort(function(t,e){var n=t?t.value:null,i=e?e.value:null;return n>0&&i>0&&(n=t.id?h.indexOf(t.id):null,i=e.id?h.indexOf(e.id):null),n-i})}else/^(asc|desc)$/.test(c)?t.sort(function(t,e){var n=t?d(t):null,i=e?d(e):null;return"asc"===c?n-i:i-n}):(0,o.isFunction)(c)&&t.sort(c);for(var g=void 0,p=void 0,_=void 0,m=void 0,x=0,v=t.length;x<v;x++)if((p=t[x])&&(d(p)||0===d(p))){if(!g){var y=(0,o.sanitise)(s?s(p.x):p.x);g='<table class="'+r.CLASS.tooltip+'">'+((0,o.isValue)(y)?'<tr><th colspan="2">'+y+"</th></tr>":"")}if(_=[p.ratio,p.id,p.index,t],r.isAreaRangeType(p)?m="<b>Mid:</b> "+(m=["high","low"].map(function(t){return(0,o.sanitise)(l.apply(undefined,[r.getAreaRangeData(p,t)].concat(_)))}))+" <b>High:</b> "+m[0]+" <b>Low:</b> "+m[1]:m=(0,o.sanitise)(l.apply(undefined,[d(p)].concat(_))),m!==undefined){if(null===p.name)continue;var b=(0,o.sanitise)(u.apply(undefined,[p.name].concat(_))),T=f(p);g+='<tr class="'+r.CLASS.tooltipName+r.getTargetSelectorSuffix(p.id)+'"><td class="name">',g+=r.patterns?'<svg><rect style="fill:'+T+'" width="10" height="10"></rect></svg>':'<span style="background-color:'+T+'"></span>',g+=b+'</td><td class="value">'+m+"</td></tr>"}}return g+"</table>"},tooltipPosition:function tooltipPosition(t,e,n,r){var a=this,o=a.config,s=(0,i.mouse)(r),u=s[0],l=s[1],c=a.getSvgLeft(!0),d=c+a.currentWidth-a.getCurrentPaddingRight();if(l+=20,a.hasArcType()){"touch"===a.inputType||a.hasType("radar")||(l+=a.height/2,u+=(a.width-(a.isLegendRight?a.getLegendWidth():0))/2)}else{var f=a.x(t[0].x);o.axis_rotated?(l=f+20,u+=c+100,d-=c):(l-=5,u=c+a.getCurrentPaddingLeft(!0)+20+(a.zoomScale?u:f))}var h=u+e;return h>d&&(u-=h-d+20),l+n>a.currentHeight&&(l-=n+30),l<0&&(l=0),{top:l,left:u}},showTooltip:function showTooltip(t,e){var n=this,i=n.config,r=n.hasArcType(null,["radar"]),a=t.filter(function(t){return t&&(0,o.isValue)(n.getBaseValue(t))}),s=i.tooltip_position||n.tooltipPosition;if(0!==a.length&&i.tooltip_show){var u=n.tooltip.datum(),l=u&&u.width||0,c=u&&u.height||0;if(!u||u.current!==JSON.stringify(t)){var d=i.tooltip_contents.call(n,t,n.axis.getXAxisTickFormat(),n.getYFormat(r),n.color);(0,o.callFn)(i.tooltip_onshow,n),n.tooltip.html(d).style("display","block").datum({current:JSON.stringify(t),width:l=n.tooltip.property("offsetWidth"),height:c=n.tooltip.property("offsetHeight")}),(0,o.callFn)(i.tooltip_onshown,n),n._handleLinkedCharts(!0,t[0].index)}var f=s.call(this,a,l,c,e);n.tooltip.style("top",f.top+"px").style("left",f.left+"px")}},hideTooltip:function hideTooltip(){var t=this.config;(0,o.callFn)(t.tooltip_onhide,this),this.tooltip.style("display","none").datum(null),(0,o.callFn)(t.tooltip_onhidden,this),this._handleLinkedCharts(!1)},_handleLinkedCharts:function _handleLinkedCharts(t,e){var n=this;if(n.config.tooltip_linked){var i=n.config.tooltip_linked_name;n.api.internal.charts.forEach(function(r){if(r!==n.api){var a=r.internal,o=a.config.tooltip_linked,s=a.config.tooltip_linked_name,u=document.body.contains(r.element);if(o&&i===s&&u){var l="block"===a.tooltip.style("display");try{l^t&&r.tooltip[l?"hide":"show"]({index:e})}catch(c){}}}})}}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{initLegend:function initLegend(){var t=this,e=t.config;t.legendItemTextBox={},t.legendHasRendered=!1,t.legend=t.svg.append("g"),e.legend_show?e.legend_contents_bindto&&e.legend_contents_template?t.updateLegendTemplate():(t.legend.attr("transform",t.getTranslate("legend")),t.updateLegendWithDefaults()):(t.legend.style("visibility","hidden"),t.hiddenLegendIds=t.mapToIds(t.data.targets))},updateLegendTemplate:function updateLegendTemplate(){var t=this,e=t.config,n=(0,i.select)(e.legend_contents_bindto),r=e.legend_contents_template;if(!n.empty()){var a=t.data.targets,s=[],u="";t.mapToIds(a).forEach(function(e){var n=(0,o.isFunction)(r)?r.call(t,e,t.color(e),t.api.data(e)[0].values):r.replace(/{=COLOR}/g,t.color(e)).replace(/{=TITLE}/g,e);n&&(s.push(e),u+=n)});var l=n.html(u).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(l)}},updateLegendWithDefaults:function updateLegendWithDefaults(){this.updateLegend(this.mapToIds(this.data.targets),{withTransform:!1,withTransitionForTransform:!1,withTransition:!1})},updateSizeForLegend:function updateSizeForLegend(t,e){var n=this,i=n.config,r={top:n.isLegendTop?n.getCurrentPaddingTop()+i.legend_inset_y+5.5:n.currentHeight-t-n.getCurrentPaddingBottom()-i.legend_inset_y,left:n.isLegendLeft?n.getCurrentPaddingLeft()+i.legend_inset_x+.5:n.currentWidth-e-n.getCurrentPaddingRight()-i.legend_inset_x+.5};n.margin3={top:n.isLegendRight?0:n.isLegendInset?r.top:n.currentHeight-t,right:NaN,bottom:0,left:n.isLegendRight?n.currentWidth-e:n.isLegendInset?r.left:0}},transformLegend:function transformLegend(t){(t?this.legend.transition():this.legend).attr("transform",this.getTranslate("legend"))},updateLegendStep:function updateLegendStep(t){this.legendStep=t},updateLegendItemWidth:function updateLegendItemWidth(t){this.legendItemWidth=t},updateLegendItemHeight:function updateLegendItemHeight(t){this.legendItemHeight=t},getLegendWidth:function getLegendWidth(){var t=this;return t.config.legend_show?t.isLegendRight||t.isLegendInset?t.legendItemWidth*(t.legendStep+1):t.currentWidth:0},getLegendHeight:function getLegendHeight(){var t=this,e=0;return t.config.legend_show&&(e=t.isLegendRight?t.currentHeight:Math.max(20,t.legendItemHeight)*(t.legendStep+1)),e},opacityForLegend:function opacityForLegend(t){return t.classed(a["default"].legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function opacityForUnfocusedLegend(t){return t.classed(a["default"].legendItemHidden)?null:"0.3"},toggleFocusLegend:function toggleFocusLegend(t,e){var n=this,r=n.mapToTargetIds(t);n.legend.selectAll("."+a["default"].legendItem).filter(function(t){return r.indexOf(t)>=0}).classed(a["default"].legendItemFocused,e).transition().duration(100).style("opacity",function(){return(e?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,(0,i.select)(this))})},revertLegend:function revertLegend(){var t=this;t.legend.selectAll("."+a["default"].legendItem).classed(a["default"].legendItemFocused,!1).transition().duration(100).style("opacity",function(){return t.opacityForLegend((0,i.select)(this))})},showLegend:function showLegend(t){var e=this,n=e.config;n.legend_show||(n.legend_show=!0,e.legend.style("visibility","visible"),!e.legendHasRendered&&e.updateLegendWithDefaults()),e.removeHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("visibility","visible").transition().style("opacity",function(){return e.opacityForLegend((0,i.select)(this))})},hideLegend:function hideLegend(t){var e=this,n=e.config;n.legend_show&&(0,o.isEmpty)(t)&&(n.legend_show=!1,e.legend.style("visibility","hidden")),e.addHiddenLegendIds(t),e.legend.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function clearLegendItemTextBoxCache(){this.legendItemTextBox={}},setLegendItem:function setLegendItem(t){var e=this,n=e.config,r="touch"===e.inputType;t.attr("class",function(t){var n=(0,i.select)(this);return(!n.empty()&&n.attr("class")||"")+e.generateClass(a["default"].legendItem,t)}).style("visibility",function(t){return e.isLegendToShow(t)?"visible":"hidden"}).style("cursor","pointer").on("click",function(t){(0,o.callFn)(n.legend_item_onclick,e,t)||(i.event.altKey?(e.api.hide(),e.api.show(t)):(e.api.toggle(t),!r&&e.isTargetToShow(t)?e.api.focus(t):e.api.revert())),r&&e.hideTooltip()}),r||t.on("mouseout",function(t){(0,o.callFn)(n.legend_item_onout,e,t)||((0,i.select)(this).classed(a["default"].legendItemFocused,!1),e.api.revert())}).on("mouseover",function(t){(0,o.callFn)(n.legend_item_onover,e,t)||((0,i.select)(this).classed(a["default"].legendItemFocused,!0),!e.transiting&&e.isTargetToShow(t)&&e.api.focus(t))})},updateLegend:function updateLegend(t,e,n){var r=this,s=r.config,u=s.legend_item_tile_width+5,l=0,c=0,d=void 0,f=void 0,h=0,g={},p={},_={},m=[0],x={},v=0,y=void 0,b=r.isLegendRight||r.isLegendInset,T=t.filter(function(t){return!(0,o.isDefined)(s.data_names[t])||null!==s.data_names[t]}),w=e||{},A=(0,o.getOption)(w,"withTransition",!0),M=(0,o.getOption)(w,"withTransitionForTransform",!0),C=function(t,e,n){var i=n===T.length-1,o=function(t,e){return r.legendItemTextBox[e]||(r.legendItemTextBox[e]=r.getTextRect(t,a["default"].legendItem,t)),r.legendItemTextBox[e]}(t,e),d=o.width+u+(i&&!b?0:10)+s.legend_padding,f=o.height+4,y=b?f:d,w=b?r.getLegendHeight():r.getLegendWidth(),A=void 0,M=function(t,e){e||(A=(w-h-y)/2)<10&&(A=(w-y)/2,h=0,v++),x[t]=v,m[v]=r.isLegendInset?10:A,g[t]=h,h+=y};if(0===n&&(h=0,v=0,l=0,c=0),s.legend_show&&!r.isLegendToShow(e))return p[e]=0,_[e]=0,x[e]=0,void(g[e]=0);p[e]=d,_[e]=f,(!l||d>=l)&&(l=d),(!c||f>=c)&&(c=f);var C=b?c:l;s.legend_equally?(Object.keys(p).forEach(function(t){return p[t]=l}),Object.keys(_).forEach(function(t){return _[t]=c}),(A=(w-C*T.length)/2)<10?(h=0,v=0,T.forEach(function(t){return M(t)})):M(e,!0)):M(e)};r.isLegendInset&&(v=s.legend_inset_step?s.legend_inset_step:T.length,r.updateLegendStep(v)),r.isLegendRight?(d=function(t){return l*x[t]},f=function(t){return m[x[t]]+g[t]}):r.isLegendInset?(d=function(t){return l*x[t]+10},f=function(t){return m[x[t]]+g[t]}):(d=function(t){return m[x[t]]+g[t]},f=function(t){return c*x[t]});var S=function(t,e){return d(t,e)+4+s.legend_item_tile_width},D=function(t,e){return d(t,e)},k=function(t,e){return d(t,e)-2},L=function(t,e){return d(t,e)-2+s.legend_item_tile_width},R=function(t,e){return f(t,e)+9},F=function(t,e){return f(t,e)-5},O=function(t,e){return f(t,e)+4},I=r.legend.selectAll("."+a["default"].legendItem).data(T).enter().append("g");r.setLegendItem(I),I.append("text").text(function(t){return(0,o.isDefined)(s.data_names[t])?s.data_names[t]:t}).each(function(t,e){C(this,t,e)}).style("pointer-events","none").attr("x",b?S:-200).attr("y",b?-200:R),I.append("rect").attr("class",a["default"].legendItemEvent).style("fill-opacity","0").attr("x",b?D:-200).attr("y",b?-200:F);var E=r.config.legend_usePoint;if(E){var X=[];I.append(function(t){var e=(0,o.notEmpty)(s.point_pattern)?s.point_pattern:[s.point_type];-1===X.indexOf(t)&&X.push(t);var n=e[X.indexOf(t)%e.length];return"rectangle"===n&&(n="rect"),document.createElementNS(i.namespaces.svg,r.hasValidPointType(n)?n:"use")}).attr("class",a["default"].legendItemPoint).style("fill",function(t){return r.color(t)}).style("pointer-events","none").attr("href",function(t,e,n){return"use"===n[e].nodeName.toLowerCase()?"#"+r.datetimeId+"-point-"+t:undefined})}else I.append("line").attr("class",a["default"].legendItemTile).style("stroke",r.color).style("pointer-events","none").attr("x1",b?k:-200).attr("y1",b?-200:O).attr("x2",b?L:-200).attr("y2",b?-200:O).attr("stroke-width",s.legend_item_tile_height);y=r.legend.select("."+a["default"].legendBackground+" rect"),r.isLegendInset&&l>0&&0===y.size()&&(y=r.legend.insert("g","."+a["default"].legendItem).attr("class",a["default"].legendBackground).append("rect"));var z=r.legend.selectAll("text").data(T).text(function(t){return(0,o.isDefined)(s.data_names[t])?s.data_names[t]:t}).each(function(t,e){C(this,t,e)});(A?z.transition():z).attr("x",S).attr("y",R);var N=r.legend.selectAll("rect."+a["default"].legendItemEvent).data(T);if((A?N.transition():N).attr("width",function(t){return p[t]}).attr("height",function(t){return _[t]}).attr("x",D).attr("y",F),E){var P=r.legend.selectAll("."+a["default"].legendItemPoint).data(T);(A?P.transition():P).each(function(){var t=this.nodeName.toLowerCase(),e=r.config.point_r,n="x",a="y",o=2,s=2.5,u=void 0,l=void 0,c=void 0;if("circle"===t){var d=.2*e;n="cx",a="cy",u=e+d,o=2*e,s=-d}else if("rect"===t){var f=2.5*e;l=f,c=f,s=3}(0,i.select)(this).attr(n,function(t){return k(t)+o}).attr(a,function(t){return O(t)-s}).attr("r",u).attr("width",l).attr("height",c)})}else{var Y=r.legend.selectAll("line."+a["default"].legendItemTile).data(T);(A?Y.transition():Y).style("stroke",r.color).attr("x1",k).attr("y1",O).attr("x2",L).attr("y2",O)}y&&(A?y.transition():y).attr("height",r.getLegendHeight()-12).attr("width",l*(v+1)+10),r.legend.selectAll("."+a["default"].legendItem).classed(a["default"].legendItemHidden,function(t){return!r.isTargetToShow(t)}),r.updateLegendItemWidth(l),r.updateLegendItemHeight(c),r.updateLegendStep(v),r.updateSizes(),r.updateScales(!A),r.updateSvgSize(),r.transformAll(M,n),r.legendHasRendered=!0}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3));(0,n(6).extend)(i["default"].prototype,{initTitle:function initTitle(){this.title=this.svg.append("text").text(this.config.title_text).attr("class",this.CLASS.title)},redrawTitle:function redrawTitle(){var t=this;t.title.attr("x",t.xForTitle.bind(t)).attr("y",t.yForTitle.bind(t))},xForTitle:function xForTitle(){var t=this,e=t.config,n=e.title_position||"left";return n.indexOf("right")>=0?t.currentWidth-t.getTextRect(t.title,t.CLASS.title,t.title).width-e.title_padding.right:n.indexOf("center")>=0?(t.currentWidth-t.getTextRect(t.title,t.CLASS.title,t.title).width)/2:e.title_padding.left},yForTitle:function yForTitle(){var t=this;return t.config.title_padding.top+t.getTextRect(t.title,t.CLASS.title,t.title).height},getTitlePadding:function getTitlePadding(){return this.yForTitle()+this.config.title_padding.bottom}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3));(0,n(6).extend)(i["default"].prototype,{getClipPath:function getClipPath(t){var e=this.config;return!e.clipPath&&/-clip$/.test(t)||!e.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!e.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:"url("+(window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0?"":document.URL.split("#")[0])+"#"+t+")"},appendClip:function appendClip(t,e){return t.append("clipPath").attr("id",e).append("rect")},getAxisClipX:function getAxisClipX(t){var e=Math.max(30,this.margin.left);return t?-(1+e):-(e-1)},getAxisClipY:function getAxisClipY(t){return t?-20:-this.margin.top},getXAxisClipX:function getXAxisClipX(){return this.getAxisClipX(!this.config.axis_rotated)},getXAxisClipY:function getXAxisClipY(){return this.getAxisClipY(!this.config.axis_rotated)},getYAxisClipX:function getYAxisClipX(){return this.config.axis_y_inner?-1:this.getAxisClipX(this.config.axis_rotated)},getYAxisClipY:function getYAxisClipY(){return this.getAxisClipY(this.config.axis_rotated)},getAxisClipWidth:function getAxisClipWidth(t){var e=Math.max(30,this.margin.left),n=Math.max(30,this.margin.right);return t?this.width+2+e+n:this.margin.left+20},getAxisClipHeight:function getAxisClipHeight(t){return(t?this.margin.bottom:this.margin.top+this.height)+20},getXAxisClipWidth:function getXAxisClipWidth(){return this.getAxisClipWidth(!this.config.axis_rotated)},getXAxisClipHeight:function getXAxisClipHeight(){return this.getAxisClipHeight(!this.config.axis_rotated)},getYAxisClipWidth:function getYAxisClipWidth(){return this.getAxisClipWidth(this.config.axis_rotated)+(this.config.axis_y_inner?20:0)},getYAxisClipHeight:function getYAxisClipHeight(){return this.getAxisClipHeight(this.config.axis_rotated)}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{initRegion:function initRegion(){this.region=this.main.append("g").attr("clip-path",this.clipPath).attr("class",a["default"].regions)},updateRegion:function updateRegion(t){var e=this,n=e.config;e.region.style("visibility",e.hasArcType()?"hidden":"visible"),e.mainRegion=e.main.select("."+a["default"].regions).selectAll("."+a["default"].region).data(n.regions),e.mainRegion.exit().transition().duration(t).style("opacity","0").remove(),e.mainRegion=e.mainRegion.enter().append("g").merge(e.mainRegion).attr("class",e.classRegion.bind(e)),e.mainRegion.append("rect").style("fill-opacity","0")},redrawRegion:function redrawRegion(t){var e=this,n=e.mainRegion.select("rect");return n=(t?n.transition():n).attr("x",e.regionX.bind(e)).attr("y",e.regionY.bind(e)).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),[(t?n.transition():n).style("fill-opacity",function(t){return(0,o.isValue)(t.opacity)?t.opacity:"0.1"}).on("end",function(){(0,i.select)(this.parentNode).selectAll("rect:not([x])").remove()})]},getRegionXY:function getRegionXY(t,e){var n=this,i=n.config.axis_rotated,r="x"===t,a="start",o=0;return"y"===e.axis||"y2"===e.axis?(!r&&(a="end"),(r?i:!i)&&a in e&&(o=(0,n[e.axis])(e[a]))):(r?!i:i)&&a in e&&(o=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[a]):e[a])),o},regionX:function regionX(t){return this.getRegionXY("x",t)},regionY:function regionY(t){return this.getRegionXY("y",t)},getRegionSize:function getRegionSize(t,e){var n=this,i=n.config.axis_rotated,r="width"===t,a=n[r?"regionX":"regionY"](e),o="end",s=n[t];return"y"===e.axis||"y2"===e.axis?(!r&&(o="start"),(r?i:!i)&&o in e&&(s=(0,n[e.axis])(e[o]))):(r?!i:i)&&o in e&&(s=(n.zoomScale||n.x)(n.isTimeSeries()?n.parseDate(e[o]):e[o])),s<a?0:s-a},regionWidth:function regionWidth(t){return this.getRegionSize("width",t)},regionHeight:function regionHeight(t){return this.getRegionSize("height",t)},isRegionOnX:function isRegionOnX(t){return!t.axis||"x"===t.axis}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(3)),a=_interopRequireDefault(n(8)),o=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,o.extend)(r["default"].prototype,{drag:function drag(t){var e=this,n=e.config,r=e.main;if(!e.hasArcType()&&n.data_selection_enabled&&(!n.zoom_enabled||e.zoom.altDomain)&&n.data_selection_multiple){var s=e.dragStart,u=s[0],l=s[1],c=t[0],d=t[1],f=Math.min(u,c),h=Math.max(u,c),g=n.data_selection_grouped?e.margin.top:Math.min(l,d),p=n.data_selection_grouped?e.height:Math.max(l,d);r.select("."+a["default"].dragarea).attr("x",f).attr("y",g).attr("width",h-f).attr("height",p-g),r.selectAll("."+a["default"].shapes).selectAll("."+a["default"].shape).filter(function(t){return n.data_selection_isselectable(t)}).each(function(t,n){var r=(0,i.select)(this),s=r.classed(a["default"].SELECTED),u=r.classed(a["default"].INCLUDED),l=void 0,c=void 0,d=void 0,_=void 0,m=void 0,x=!1,v=void 0;if(r.classed(a["default"].circle))l=1*r.attr("cx"),c=1*r.attr("cy"),m=e.togglePoint,x=f<l&&l<h&&g<c&&c<p;else{if(!r.classed(a["default"].bar))return;l=(v=(0,o.getPathBox)(this)).x,c=v.y,d=v.width,_=v.height,m=e.togglePath,x=!(h<l||l+d<f||p<c||c+_<g)}x^u&&(r.classed(a["default"].INCLUDED,!u),r.classed(a["default"].SELECTED,!s),m.call(e,!s,r,t,n))})}},dragstart:function dragstart(t){var e=this,n=e.config;e.hasArcType()||!n.data_selection_enabled||(e.dragStart=t,e.main.select("."+a["default"].chart).append("rect").attr("class",a["default"].dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend:function dragend(){var t=this,e=t.config;t.hasArcType()||!e.data_selection_enabled||(t.main.select("."+a["default"].dragarea).transition().duration(100).style("opacity","0").remove(),t.main.selectAll("."+a["default"].shape).classed(a["default"].INCLUDED,!1),t.setDragStatus(!1))},setDragStatus:function setDragStatus(t){this.dragging=t}})},function(t,e,n){"use strict";var i=n(64),r=n(73),a=_interopRequireDefault(n(3)),o=_interopRequireDefault(n(8)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(a["default"].prototype,{selectPoint:function selectPoint(t,e,n){var i=this,r=i.config,a=r.axis_rotated,u=(a?i.circleY:i.circleX).bind(i),l=(a?i.circleX:i.circleY).bind(i),c=i.pointSelectR.bind(i);(0,s.callFn)(r.data_onselected,i.api,e,t.node()),i.main.select("."+o["default"].selectedCircles+i.getTargetSelectorSuffix(e.id)).selectAll("."+o["default"].selectedCircle+"-"+n).data([e]).enter().append("circle").attr("class",function(){return i.generateClass(o["default"].selectedCircle,n)}).attr("cx",u).attr("cy",l).attr("stroke",function(){return i.color(e)}).attr("r",function(t){return 1.4*i.pointSelectR(t)}).transition().duration(100).attr("r",c)},unselectPoint:function unselectPoint(t,e,n){(0,s.callFn)(this.config.data_onunselected,this.api,e,t.node()),this.main.select("."+o["default"].selectedCircles+this.getTargetSelectorSuffix(e.id)).selectAll("."+o["default"].selectedCircle+"-"+n).transition().duration(100).attr("r",0).remove()},togglePoint:function togglePoint(t,e,n,i){this[(t?"":"un")+"selectPoint"](e,n,i)},selectPath:function selectPath(t,e){var n=this,i=n.config;(0,s.callFn)(i.data_onselected,n,e,t.node()),i.interaction_brighten&&t.transition().duration(100).style("fill",function(){return(0,r.rgb)(n.color(e)).brighter(.75)})},unselectPath:function unselectPath(t,e){var n=this,i=n.config;(0,s.callFn)(i.data_onunselected,n,e,t.node()),i.interaction_brighten&&t.transition().duration(100).style("fill",function(){return n.color(e)})},togglePath:function togglePath(t,e,n,i){this[(t?"":"un")+"selectPath"](e,n,i)},getToggle:function getToggle(t,e){return"path"===t.nodeName?this.togglePath:this.isStepType(e)?function(){}:this.togglePoint},toggleShape:function toggleShape(t,e,n){var r=this,a=r.config,s=(0,i.select)(t),u=s.classed(o["default"].SELECTED),l=r.getToggle(t,e).bind(r),c=void 0;if(a.data_selection_enabled&&a.data_selection_isselectable(e)){if(!a.data_selection_multiple){var d="."+o["default"].shapes;a.data_selection_grouped&&(d+=r.getTargetSelectorSuffix(e.id)),r.main.selectAll(d).selectAll("."+o["default"].shape).each(function(t,e){var n=(0,i.select)(this);n.classed(o["default"].SELECTED)&&(c=n,l(!1,n.classed(o["default"].SELECTED,!1),t,e))})}c&&c.node()===s.node()||(s.classed(o["default"].SELECTED,!u),l(!u,s,e,n))}}})},function(t,e,n){"use strict";var i=n(64),r=n(76),a=_interopRequireDefault(n(3)),o=_interopRequireDefault(n(8)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,s.extend)(a["default"].prototype,{initBrush:function initBrush(){var t=this;t.brush=t.config.axis_rotated?(0,r.brushY)():(0,r.brushX)();var e=function(){t.redrawForBrush()};t.brush.on("start",function(){"touch"===t.inputType&&t.hideTooltip(),e()}).on("brush",e),t.brush.update=function(){return 0===this.extent()()[1].filter(function(t){return isNaN(t)}).length&&t.context&&t.context.select("."+o["default"].brush).call(this),this},t.brush.scale=function(e,n){var i=t.svg.select(".bb-brush .overlay"),r=[[0,0]];e.range?r.push([e.range()[1],(n||!i.empty())&&~~i.attr("height")||60]):e.constructor===Array&&r.push(e),t.config.axis_rotated&&r.reverse(),this.extent(t.config.axis_x_extent||r),this.update()},t.brush.getSelection=function(){return t.context?t.context.select("."+o["default"].brush):(0,i.select)([])}},initSubchart:function initSubchart(){var t=this,e=t.config,n=e.subchart_show?"visible":"hidden";t.context=t.svg.append("g").attr("transform",t.getTranslate("context"));var i=t.context;i.style("visibility",n),i.append("g").attr("clip-path",t.clipPathForSubchart).attr("class",o["default"].chart),i.select("."+o["default"].chart).append("g").attr("class",o["default"].chartBars),i.select("."+o["default"].chart).append("g").attr("class",o["default"].chartLines),i.append("g").attr("clip-path",t.clipPath).attr("class",o["default"].brush).call(t.brush),t.axes.subx=i.append("g").attr("class",o["default"].axisX).attr("transform",t.getTranslate("subx")).attr("clip-path",e.axis_rotated?"":t.clipPathForXAxis).style("visibility",e.subchart_axis_x_show?n:"hidden")},updateTargetsForSubchart:function updateTargetsForSubchart(t){var e=this,n=e.context,i=e.config,r=e.classChartBar.bind(e),a=e.classBars.bind(e),s=e.classChartLine.bind(e),u=e.classLines.bind(e),l=e.classAreas.bind(e);if(i.subchart_show){var c=n.select("."+o["default"].chartBars).selectAll("."+o["default"].chartBar).data(t).attr("class",r);c.enter().append("g").style("opacity","0").attr("class",r).merge(c).append("g").attr("class",a);var d=n.select("."+o["default"].chartLines).selectAll("."+o["default"].chartLine).data(t).attr("class",s),f=d.enter().append("g").style("opacity","0").attr("class",s).merge(d);f.append("g").attr("class",u),f.append("g").attr("class",l),n.selectAll("."+o["default"].brush+" rect").attr(i.axis_rotated?"width":"height",i.axis_rotated?e.width2:e.height2)}},updateBarForSubchart:function updateBarForSubchart(t){var e=this;e.contextBar=e.context.selectAll("."+o["default"].bars).selectAll("."+o["default"].bar).data(e.barData.bind(e)),e.contextBar.exit().transition().duration(t).style("opacity","0").remove(),e.contextBar=e.contextBar.enter().append("path").attr("class",e.classBar.bind(e)).style("stroke","none").style("fill",e.color).merge(e.contextBar).style("opacity",e.initialOpacity.bind(e))},redrawBarForSubchart:function redrawBarForSubchart(t,e,n){(e?this.contextBar.transition(Math.random().toString()).duration(n):this.contextBar).attr("d",t).style("opacity","1")},updateLineForSubchart:function updateLineForSubchart(t){var e=this;e.contextLine=e.context.selectAll("."+o["default"].lines).selectAll("."+o["default"].line).data(e.lineData.bind(e)),e.contextLine.exit().transition().duration(t).style("opacity","0").remove(),e.contextLine=e.contextLine.enter().append("path").attr("class",e.classLine.bind(e)).style("stroke",e.color).merge(e.contextLine).style("opacity",e.initialOpacity.bind(e))},redrawLineForSubchart:function redrawLineForSubchart(t,e,n){(e?this.contextLine.transition(Math.random().toString()).duration(n):this.contextLine).attr("d",t).style("opacity","1")},updateAreaForSubchart:function updateAreaForSubchart(t){var e=this;e.contextArea=e.context.selectAll("."+o["default"].areas).selectAll("."+o["default"].area).data(e.lineData.bind(e)),e.contextArea.exit().transition().duration(t).style("opacity","0").remove(),e.contextArea=e.contextArea.enter().append("path").attr("class",e.classArea.bind(e)).style("fill",e.color).style("opacity",function(){return e.orgAreaOpacity=(0,i.select)(this).style("opacity"),"0"}).merge(e.contextArea).style("opacity","0")},redrawAreaForSubchart:function redrawAreaForSubchart(t,e,n){(e?this.contextArea.transition(Math.random().toString()).duration(n):this.contextArea).attr("d",t).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function redrawSubchart(t,e,n,r,a,o,u){var l=this,c=l.config;if(l.context.style("visibility",c.subchart_show?"visible":"hidden"),c.subchart_show&&(i.event&&"zoom"===i.event.type&&l.brush.update(),t)){(0,s.brushEmpty)(l)||l.brush.update();var d=l.generateDrawArea(a,!0),f=l.generateDrawBar(o,!0),h=l.generateDrawLine(u,!0);l.updateBarForSubchart(n),l.updateLineForSubchart(n),l.updateAreaForSubchart(n),l.redrawBarForSubchart(f,n,n),l.redrawLineForSubchart(h,n,n),l.redrawAreaForSubchart(d,n,n)}},redrawForBrush:function redrawForBrush(){var t=this,e=t.x;t.redraw({withTransition:!1,withY:t.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t.config.subchart_onbrush.call(t.api,e.orgDomain())},transformContext:function transformContext(t,e){var n=void 0;e&&e.axisSubX?n=e.axisSubX:(n=this.context.select("."+o["default"].axisX),t&&(n=n.transition())),this.context.attr("transform",this.getTranslate("context")),n.attr("transform",this.getTranslate("subx"))},getDefaultExtent:function getDefaultExtent(){var t=this,e=t.config,n=(0,s.isFunction)(e.axis_x_extent)?e.axis_x_extent(t.getXDomain(t.data.targets)):e.axis_x_extent;return t.isTimeSeries()&&(n=[t.parseDate(n[0]),t.parseDate(n[1])]),n}})},function(t,e,n){"use strict";var i=n(66),r=n(64),a=n(72),o=n(74),s=_interopRequireDefault(n(3)),u=_interopRequireDefault(n(8)),l=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,l.extend)(s["default"].prototype,{initZoom:function initZoom(){this.zoomScale=null,this.generateZoom()},bindZoomEvent:function bindZoomEvent(){var t=!(arguments.length>0&&arguments[0]!==undefined)||arguments[0],e=this,n=e.config.zoom_enabled;e.redrawEventRect(),n&&t?!0===n||"wheel"===n.type?e.bindZoomOnEventRect():"drag"===n.type&&e.bindZoomOnDrag():!1===t&&(e.api.unzoom(),e.main.select("."+u["default"].eventRects).on(".zoom",null).on(".drag",null))},generateZoom:function generateZoom(){var t=this,e=t.config,n=(0,o.zoom)().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));n.orgScaleExtent=function(){var n=e.zoom_extent||[1,10];return[n[0],Math.max(t.getMaxDataCount()/n[1],n[1])]},n.updateScaleExtent=function(){var e=(0,l.diffDomain)(t.x.orgDomain())/(0,l.diffDomain)(t.getZoomDomain()),n=this.orgScaleExtent();return this.scaleExtent([n[0]*e,n[1]*e]),this},n.updateTransformScale=function(n){var i=n.rescaleX(t.subX.orgScale()),r=t.trimXDomain(i.domain()),a=e.zoom_rescale;i.domain(r,t.orgXDomain),t.zoomScale=t.getCustomizedScale(i),t.xAxis.scale(t.zoomScale),a&&t.x.domain(t.zoomScale.orgDomain())},t.zoom=n},onZoomStart:function onZoomStart(){var t=this,e=r.event.sourceEvent;t.zoom.altDomain=e.altKey?t.x.orgDomain():null,t.zoom.startEvent=e,(0,l.callFn)(t.config.zoom_onzoomstart,t.api,e)},onZoom:function onZoom(){var t=this,e=t.config,n=r.event;if(e.zoom_enabled){var i="mousemove"===n.sourceEvent.type,a=n.transform;return t.zoom.updateTransformScale(a),0===t.filterTargetsToShow(t.data.targets).length?void 0:i&&t.zoom.altDomain?(t.x.domain(t.zoom.altDomain),void a.scale(t.zoomScale).updateScaleExtent()):(t.isCategorized()&&t.x.orgDomain()[0]===t.orgXDomain[0]&&t.x.domain([t.orgXDomain[0]-1e-10,t.x.orgDomain()[1]]),t.redraw({withTransition:!1,withY:e.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),t.cancelClick=i,void(0,l.callFn)(e.zoom_onzoom,t.api,t.x.orgDomain()))}},onZoomEnd:function onZoomEnd(){var t=this,e=t.zoom.startEvent;event&&e.clientX===event.clientX&&e.clientY===event.clientY||(t.redrawEventRect(),t.updateZoom(),(0,l.callFn)(t.config.zoom_onzoomend,t.api,t.x.orgDomain()))},getZoomDomain:function getZoomDomain(){var t=this.config;return[(0,i.min)([this.orgXDomain[0],t.zoom_x_min]),(0,i.max)([this.orgXDomain[1],t.zoom_x_max])]},updateZoom:function updateZoom(){var t=this;if(t.zoomScale){var e=t.zoomScale.domain(),n=t.x.domain();(e[0]<=n[0]||e[0]-.015<=n[0])&&(n[1]<=e[1]||n[1]<=e[1]-.015)&&(t.xAxis.scale(t.x),t.zoomScale=null)}},bindZoomOnEventRect:function bindZoomOnEventRect(){this.main.select("."+u["default"].eventRects).call(this.zoom).on("dblclick.zoom",null)},initZoomBehaviour:function initZoomBehaviour(){var t=this,e=t.config.axis_rotated,n=0,i=0,o=null;t.zoomBehaviour=(0,a.drag)().on("start",function(){t.setDragStatus(!0),o||(o=t.main.append("rect").attr("clip-path",t.clipPath).attr("class",u["default"].zoomBrush).attr("width",e?t.width:0).attr("height",e?0:t.height)),n=(0,r.mouse)(this)[0],i=n,o.attr("x",n).attr("width",0)}).on("drag",function(){i=(0,r.mouse)(this)[0],o.attr("x",Math.min(n,i)).attr("width",Math.abs(i-n))}).on("end",function(){var e,r=t.zoomScale||t.x;t.setDragStatus(!1),o.attr("x",0).attr("width",0),n>i&&(n=(e=[i,n])[0],i=e[1]),n!==i&&t.api.zoom([n,i].map(function(t){return r.invert(t)}))})},bindZoomOnDrag:function bindZoomOnDrag(){this.main.select("."+u["default"].eventRects).call(this.zoomBehaviour)},setZoomResetButton:function setZoomResetButton(){var t=this,e=t.config,n=e.zoom_resetButton;n&&"drag"===e.zoom_enabled.type&&(t.zoom.resetBtn?t.zoom.resetBtn.style("display",null):t.zoom.resetBtn=t.selectChart.append("div").classed(u["default"].button,!0).append("span").on("click",t.api.unzoom.bind(t)).classed(u["default"].buttonZoomReset,!0).text(n.text||"Reset Zoom"))}})},function(t,e,n){"use strict";var i=n(64),r=n(65),a=_interopRequireDefault(n(3)),o=_interopRequireDefault(n(8)),s=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var u=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];(0,s.extend)(a["default"].prototype,{getColorFromCss:function getColorFromCss(){var t=document.body,e=t.__colorPattern__;if(!e){var n=document.createElement("span");n.className=o["default"].colorPattern,n.style.display="none",t.appendChild(n);var i=window.getComputedStyle(n).backgroundImage;n.parentNode.removeChild(n),i.indexOf(";")>-1&&(e=i.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(t){return t.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),t.__colorPattern__=e)}return e},generateColor:function generateColor(){var t=this,e=t.config,n=e.data_colors,a=e.data_color,o=[],l=(0,s.notEmpty)(e.color_pattern)?e.color_pattern:(0,r.scaleOrdinal)(t.getColorFromCss()||u).range(),c=l;if((0,s.isFunction)(e.color_tiles)){var d=e.color_tiles(),f=l.map(function(e,n){var r=e.replace(/[#\(\)\s,]/g,""),a=t.datetimeId+"-pattern-"+r+"-"+n;return function(t,e,n){var r=(0,i.select)(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}}(d[n%d.length],e,a)});l=f.map(function(t){return"url(#"+t.id+")"}),t.patterns=f}return function(e){var i=e.id||e.data&&e.data.id||e,r=t.isTypeOf(i,["line","spline","step"])||!t.config.data_types[i],u=void 0;return(0,s.isFunction)(n[i])?u=n[i](e):n[i]?u=n[i]:(o.indexOf(i)<0&&o.push(i),u=r?c[o.indexOf(i)%c.length]:l[o.indexOf(i)%l.length],n[i]=u),(0,s.isFunction)(a)?a(u,e):u}},generateLevelColor:function generateLevelColor(){var t=this.config,e=t.color_pattern,n=t.color_threshold,i="value"===n.unit,r=n.max||100,a=n.values&&n.values.length?n.values:[];return(0,s.notEmpty)(n)?function(t){for(var n=e[e.length-1],o=0;o<a.length;o++)if((i?t:100*t/r)<a[o]){n=e[o];break}return n}:null}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),r=n(6);var a=function(t,e,n){var i=t.config,r="axis_"+e+"_tick_format";return(i[r]?i[r]:t.defaultValueFormat)(n)};(0,r.extend)(i["default"].prototype,{getYFormat:function getYFormat(t){var e=this,n=e.yFormat,i=e.y2Format;return t&&!e.hasType("gauge")&&(n=e.defaultArcValueFormat,i=e.defaultArcValueFormat),function(t,r,a){return("y2"===e.axis.getId(a)?i:n).call(e,t,r)}},yFormat:function yFormat(t){return a(this,"y",t)},y2Format:function y2Format(t){return a(this,"y2",t)},defaultValueFormat:function defaultValueFormat(t){return(0,r.isValue)(t)?+t:""},defaultArcValueFormat:function defaultArcValueFormat(t,e){return(100*e).toFixed(1)+"%"},dataLabelFormat:function dataLabelFormat(t){var e=this.config.data_labels,n=function(t){return(0,r.isValue)(t)?+t:""},i=n;return(0,r.isFunction)(e.format)?i=e.format:(0,r.isObjectType)(e.format)&&(i=e.format[t]?!0===e.format[t]?n:e.format[t]:function(){return""}),i}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3));(0,n(6).extend)(i["default"].prototype,{hasCaches:function hasCaches(t){if(!!(arguments.length>1&&arguments[1]!==undefined)&&arguments[1]){for(var e=0,n=t.length;e<n;e++)if(!(t[e]in this.cache))return!1;return!0}return t in this.cache},addCache:function addCache(t,e){var n=!!(arguments.length>2&&arguments[2]!==undefined)&&arguments[2];this.cache[t]=n?this.cloneTarget(e):e},getCache:function getCache(t){if(!!(arguments.length>1&&arguments[1]!==undefined)&&arguments[1]){for(var e,n=[],i=0;e=t[i];i++)e in this.cache&&n.push(this.cloneTarget(this.cache[e]));return n}return this.cache[t]||null},resetCache:function resetCache(t){for(var e in this.cache)(t||/^\$/.test(e))&&(this.cache[e]=null)}})},function(t,e,n){"use strict";var i=_interopRequireDefault(n(3)),r=_interopRequireDefault(n(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,n(6).extend)(i["default"].prototype,{CLASS:r["default"],generateClass:function generateClass(t,e){return" "+t+" "+(t+this.getTargetSelectorSuffix(e))},classText:function classText(t){return this.generateClass(r["default"].text,t.index)},classTexts:function classTexts(t){return this.generateClass(r["default"].texts,t.id)},classShape:function classShape(t){return this.generateClass(r["default"].shape,t.index)},classShapes:function classShapes(t){return this.generateClass(r["default"].shapes,t.id)},generateExtraLineClass:function generateExtraLineClass(){var t=this.config.line_classes||[],e=[];return function(n){var i=n.id||n.data&&n.data.id||n;return e.indexOf(i)<0&&e.push(i),t[e.indexOf(i)%t.length]}},classLine:function classLine(t){return this.classShape(t)+this.generateClass(r["default"].line,t.id)},classLines:function classLines(t){return this.classShapes(t)+this.generateClass(r["default"].lines,t.id)},classCircle:function classCircle(t){return this.classShape(t)+this.generateClass(r["default"].circle,t.index)},classCircles:function classCircles(t){return this.classShapes(t)+this.generateClass(r["default"].circles,t.id)},classBar:function classBar(t){return this.classShape(t)+this.generateClass(r["default"].bar,t.index)},classBars:function classBars(t){return this.classShapes(t)+this.generateClass(r["default"].bars,t.id)},classArc:function classArc(t){return this.classShape(t.data)+this.generateClass(r["default"].arc,t.data.id)},classArcs:function classArcs(t){return this.classShapes(t.data)+this.generateClass(r["default"].arcs,t.data.id)},classArea:function classArea(t){return this.classShape(t)+this.generateClass(r["default"].area,t.id)},classAreas:function classAreas(t){return this.classShapes(t)+this.generateClass(r["default"].areas,t.id)},classRegion:function classRegion(t,e){return this.generateClass(r["default"].region,e)+" "+("class"in t?t["class"]:"")},classEvent:function classEvent(t){return this.generateClass(r["default"].eventRect,t.index)},classTarget:function classTarget(t){var e=this.config.data_classes[t],n="";return e&&(n=" "+r["default"].target+"-"+e),this.generateClass(r["default"].target,t)+n},classFocus:function classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused:function classFocused(t){return" "+(this.focusedTargetIds.indexOf(t.id)>=0?r["default"].focused:"")},classDefocused:function classDefocused(t){return" "+(this.defocusedTargetIds.indexOf(t.id)>=0?r["default"].defocused:"")},classChartText:function classChartText(t){return r["default"].chartText+this.classTarget(t.id)},classChartLine:function classChartLine(t){return r["default"].chartLine+this.classTarget(t.id)},classChartBar:function classChartBar(t){return r["default"].chartBar+this.classTarget(t.id)},classChartArc:function classChartArc(t){return r["default"].chartArc+this.classTarget(t.data.id)},classChartRadar:function classChartRadar(t){return r["default"].chartRadar+this.classTarget(t.id)},getTargetSelectorSuffix:function getTargetSelectorSuffix(t){return t||0===t?("-"+t).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function selectorTarget(t,e){return(e||"")+"."+(r["default"].target+this.getTargetSelectorSuffix(t))},selectorTargets:function selectorTargets(t,e){var n=this,i=t||[];return i.length?i.map(function(t){return n.selectorTarget(t,e)}):null},selectorLegend:function selectorLegend(t){return"."+(r["default"].legendItem+this.getTargetSelectorSuffix(t))},selectorLegends:function selectorLegends(t){var e=this;return t&&t.length?t.map(function(t){return e.selectorLegend(t)}):null}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(1)),a=_interopRequireDefault(n(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,n(6).extend)(r["default"].prototype,{focus:function focus(t){var e=this.internal,n=e.mapToTargetIds(t),i=e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e)));this.revert(),this.defocus(),i.classed(a["default"].focused,!0).classed(a["default"].defocused,!1),e.hasArcType()&&e.expandArc(n),e.toggleFocusLegend(n,!0),e.focusedTargetIds=n,e.defocusedTargetIds=e.defocusedTargetIds.filter(function(t){return n.indexOf(t)<0})},defocus:function defocus(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n.filter(e.isTargetToShow,e))).classed(a["default"].focused,!1).classed(a["default"].defocused,!0),e.hasArcType()&&e.unexpandArc(n),e.toggleFocusLegend(n,!1),e.focusedTargetIds=e.focusedTargetIds.filter(function(t){return n.indexOf(t)<0}),e.defocusedTargetIds=n},revert:function revert(t){var e=this.internal,n=e.mapToTargetIds(t);e.svg.selectAll(e.selectorTargets(n)).classed(a["default"].focused,!1).classed(a["default"].defocused,!1),e.hasArcType()&&e.unexpandArc(n),e.config.legend_show&&(e.showLegend(n.filter(e.isLegendToShow.bind(e))),e.legend.selectAll(e.selectorLegends(n)).filter(function(){return(0,i.select)(this).classed(a["default"].legendItemFocused)}).classed(a["default"].legendItemFocused,!1)),e.focusedTargetIds=[],e.defocusedTargetIds=[]}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1));(0,n(6).extend)(i["default"].prototype,{show:function show(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this.internal,i=n.mapToTargetIds(t);n.removeHiddenTargetIds(i);var r=n.svg.selectAll(n.selectorTargets(i));r.transition().style("opacity","1","important").call(n.endall,function(){r.style("opacity",null).style("opacity","1")}),e.withLegend&&n.showLegend(i),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},hide:function hide(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},n=this.internal,i=n.mapToTargetIds(t);n.addHiddenTargetIds(i);var r=n.svg.selectAll(n.selectorTargets(i));r.transition().style("opacity","0","important").call(n.endall,function(){r.style("opacity",null).style("opacity","0")}),e.withLegend&&n.hideLegend(i),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},toggle:function toggle(t){var e=this,n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(t).forEach(function(t){return r[i.isTargetToShow(t)?"hide":"show"].push(t)}),r.show.length&&this.show(r.show,n),r.hide.length&&setTimeout(function(){return e.hide(r.hide,n)},0)}})},function(t,e,n){"use strict";var i=n(66),r=n(74),a=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),o=n(6);var s=function(t){var e=this.internal,n=t,i=void 0;if(e.config.zoom_enabled&&n){var a=e.isTimeSeries();if(a&&(n=n.map(function(t){return e.parseDate(t)})),e.config.subchart_show){var s=e.zoomScale||e.x;e.brush.getSelection().call(e.brush.move,[s(n[0]),s(n[1])]),i=n}else{var u=e.subX.domain(),l=(u[1]-u[0])/(n[1]-n[0]),c=e.isCategorized()?e.xAxis.tickOffset():0,d=a?0-l*e.x(n[0].getTime()):n[0]-l*(e.x(n[0])-c);e.zoom.updateTransformScale(r.zoomIdentity.translate(d,0).scale(l)),i=e.zoomScale.domain()}e.redraw({withTransition:!0,withY:e.config.zoom_rescale,withDimension:!1}),e.setZoomResetButton(),(0,o.callFn)(e.config.zoom_onzoom,this,e.x.orgDomain())}else i=e.zoomScale?e.zoomScale.domain():e.x.orgDomain();return i};(0,o.extend)(s,{enable:function enable(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"wheel",e=this.internal,n=e.config,i=t;t&&(i=(0,o.isString)(t)&&/^(drag|wheel)$/.test(t)?{type:t}:t),n.zoom_enabled=i,e.zoom?!1===t&&e.bindZoomEvent(!1):(e.initZoom(),e.initZoomBehaviour(),e.bindZoomEvent()),e.updateAndRedraw()},max:function max(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_max=(0,i.max)([e.orgXDomain[1],t])),n.zoom_x_max},min:function min(t){var e=this.internal,n=e.config;return(0===t||t)&&(n.zoom_x_min=(0,i.min)([e.orgXDomain[0],t])),n.zoom_x_min},range:function range(t){var e=this.zoom;return(0,o.isObject)(t)&&((0,o.isDefined)(t.min)&&e.min(t.min),(0,o.isDefined)(t.max)&&e.max(t.max)),{min:e.min(),max:e.max()}}}),(0,o.extend)(a["default"].prototype,{zoom:s,unzoom:function unzoom(){var t=this.internal,e=t.config;t.zoomScale&&(e.subchart_show?t.brush.getSelection().call(t.brush.move,null):t.zoom.updateTransformScale(r.zoomIdentity),t.updateZoom(),t.zoom.resetBtn&&t.zoom.resetBtn.style("display","none"),t.redraw({withTransition:!0,withY:e.zoom_rescale}))}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);(0,r.extend)(i["default"].prototype,{load:function load(t){var e=this.internal,n=e.config;return t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(function(e){n.data_classes[e]=t.classes[e]}),"categories"in t&&e.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(function(e){n.data_axes[e]=t.axes[e]}),"colors"in t&&Object.keys(t.colors).forEach(function(e){n.data_colors[e]=t.colors[e]}),"cacheIds"in t&&e.hasCaches(t.cacheIds,!0)?void e.load(e.getCache(t.cacheIds,!0),t.done):void("unload"in t&&!1!==t.unload?e.unload(e.mapToTargetIds(!0===t.unload?null:t.unload),function(){return e.loadFromArgs(t)}):e.loadFromArgs(t))},unload:function unload(t){var e=this.internal,n=t||{};(0,r.isArray)(n)?n={ids:n}:(0,r.isString)(n)&&(n={ids:[n]}),e.unload(e.mapToTargetIds(n.ids),function(){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.done&&n.done()})}})},function(t,e,n){"use strict";var i=n(64),r=n(70),a=n(67),o=_interopRequireDefault(n(1)),s=_interopRequireDefault(n(3)),u=n(6),l=_interopRequireDefault(n(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,u.extend)(o["default"].prototype,{flow:function flow(t){var e=this.internal,n=[],i=e.getMaxDataCount(),r=void 0,a=void 0,o=0,s=0,l=void 0,c=void 0;if(t.json)r=e.convertJsonToData(t.json,t.keys);else if(t.rows)r=e.convertRowsToData(t.rows);else{if(!t.columns)return;r=e.convertColumnsToData(t.columns)}var d=e.convertDataToTargets(r,!0);e.data.targets.forEach(function(t){for(var i=!1,r=0;r<d.length;r++)if(t.id===d[r].id){i=!0,t.values[t.values.length-1]&&(s=t.values[t.values.length-1].index+1),o=d[r].values.length;for(var a=0;a<o;a++)d[r].values[a].index=s+a,e.isTimeSeries()||(d[r].values[a].x=s+a);t.values=t.values.concat(d[r].values),d.splice(r,1);break}i||n.push(t.id)}),e.data.targets.forEach(function(t){for(var i=0;i<n.length;i++)if(t.id===n[i]){s=t.values[t.values.length-1].index+1;for(var r=0;r<o;r++)t.values.push({id:t.id,index:s+r,x:e.isTimeSeries()?e.getOtherTargetX(s+r):s+r,value:null})}}),e.data.targets.length&&d.forEach(function(t){for(var n=[],i=e.data.targets[0].values[0].index;i<s;i++)n.push({id:t.id,index:i,x:e.isTimeSeries()?e.getOtherTargetX(i):i,value:null});t.values.forEach(function(t){t.index+=s,e.isTimeSeries()||(t.x+=s)}),t.values=n.concat(t.values)}),e.data.targets=e.data.targets.concat(d);var f=e.data.targets[0],h=f.values[0];(0,u.isDefined)(t.to)?(o=0,c=e.isTimeSeries()?e.parseDate(t.to):t.to,f.values.forEach(function(t){t.x<c&&o++})):(0,u.isDefined)(t.length)&&(o=t.length),i?1===i&&e.isTimeSeries()&&(l=(f.values[f.values.length-1].x-h.x)/2,a=[new Date(+h.x-l),new Date(+h.x+l)],e.updateXDomain(null,!0,!0,!1,a)):(l=e.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-h.x:h.x-e.getXDomain(e.data.targets)[0]:1,a=[h.x-l,h.x],e.updateXDomain(null,!0,!0,!1,a)),e.updateTargets(e.data.targets),e.redraw({flow:{index:h.index,length:o,duration:(0,u.isValue)(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:i},withLegend:!0,withTransition:i>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}),(0,u.extend)(s["default"].prototype,{generateFlow:function generateFlow(t){var e=this,n=e.config;return function(){var o=t.targets,s=t.flow,c=t.drawBar,d=t.drawLine,f=t.drawArea,h=t.cx,g=t.cy,p=t.xv,_=t.xForText,m=t.yForText,x=t.duration,v=void 0,y=s.index,b=s.length,T=e.getValueOnIndex(e.data.targets[0].values,y),w=e.getValueOnIndex(e.data.targets[0].values,y+b),A=e.x.domain(),M=s.duration||x,C=s.done||function(){},S=e.generateWait(),D=e.xgrid||(0,i.selectAll)([]),k=e.xgridLines||(0,i.selectAll)([]),L=e.mainRegion||(0,i.selectAll)([]),R=e.mainText||(0,i.selectAll)([]),F=e.mainBar||(0,i.selectAll)([]),O=e.mainLine||(0,i.selectAll)([]),I=e.mainArea||(0,i.selectAll)([]),E=e.mainCircle||(0,i.selectAll)([]);e.flowing=!0,e.data.targets.forEach(function(t){t.values.splice(0,b)});var X=e.updateXDomain(o,!0,!0);e.updateXGrid&&e.updateXGrid(!0),s.orgDataCount?v=1===s.orgDataCount||(T&&T.x)===(w&&w.x)?e.x(A[0])-e.x(X[0]):e.isTimeSeries()?e.x(A[0])-e.x(X[0]):e.x(T.x)-e.x(w.x):1===e.data.targets[0].values.length?e.isTimeSeries()?(T=e.getValueOnIndex(e.data.targets[0].values,0),w=e.getValueOnIndex(e.data.targets[0].values,e.data.targets[0].values.length-1),v=e.x(T.x)-e.x(w.x)):v=(0,u.diffDomain)(X)/2:v=e.x(A[0])-e.x(X[0]);var z="translate("+v+",0) scale("+(0,u.diffDomain)(A)/(0,u.diffDomain)(X)+",1)";e.hideXGridFocus();var N=(0,a.transition)().ease(r.easeLinear).duration(M);S.add([e.axes.x.transition(N).call(e.xAxis.setTransition(N)),F.transition(N).attr("transform",z),O.transition(N).attr("transform",z),I.transition(N).attr("transform",z),E.transition(N).attr("transform",z),R.transition(N).attr("transform",z),L.filter(e.isRegionOnX).transition(N).attr("transform",z),D.transition(N).attr("transform",z),k.transition(N).attr("transform",z)]),N.call(S,function(){var t=[],i=[],r=[];if(b){for(var a,o=0;o<b;o++)a=y+o,t.push("."+l["default"].shape+"-"+a),i.push("."+l["default"].text+"-"+a),r.push("."+l["default"].eventRect+"-"+a);e.svg.selectAll("."+l["default"].shapes).selectAll(t).remove(),e.svg.selectAll("."+l["default"].texts).selectAll(i).remove(),e.svg.selectAll("."+l["default"].eventRects).selectAll(r).remove(),e.svg.select("."+l["default"].xgrid).remove()}if(D.size()&&D.attr("transform",null).attr(e.xgridAttr),k.attr("transform",null),k.select("line").attr("x1",n.axis_rotated?0:p).attr("x2",n.axis_rotated?e.width:p),k.select("text").attr("x",n.axis_rotated?e.width:0).attr("y",p),F.attr("transform",null).attr("d",c),O.attr("transform",null).attr("d",d),I.attr("transform",null).attr("d",f),E.attr("transform",null),e.isCirclePoint())E.attr("cx",h).attr("cy",g);else{E.attr("x",function(t){return h(t)-n.point_r}).attr("y",function(t){return g(t)-n.point_r}).attr("cx",h).attr("cy",g)}R.attr("transform",null).attr("x",_).attr("y",m).style("fill-opacity",e.opacityForText.bind(e)),L.attr("transform",null),L.select("rect").filter(e.isRegionOnX).attr("x",e.regionX.bind(e)).attr("width",e.regionWidth.bind(e)),n.interaction_enabled&&e.redrawEventRect(),C(),e.flowing=!1})}}})},function(t,e,n){"use strict";var i=n(64),r=_interopRequireDefault(n(1)),a=n(6),o=_interopRequireDefault(n(8));function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,a.extend)(r["default"].prototype,{selected:function selected(t){var e=this.internal,n=[];return e.main.selectAll("."+(o["default"].shapes+e.getTargetSelectorSuffix(t))).selectAll("."+o["default"].shape).filter(function(){return(0,i.select)(this).classed(o["default"].SELECTED)}).each(function(t){return n.push(t)}),n},select:function select(t,e,n){var r=this.internal,s=r.config;s.data_selection_enabled&&r.main.selectAll("."+o["default"].shapes).selectAll("."+o["default"].shape).each(function(u,l){var c=(0,i.select)(this),d=u.data?u.data.id:u.id,f=r.getToggle(this,u).bind(r),h=s.data_selection_grouped||!t||t.indexOf(d)>=0,g=!e||e.indexOf(l)>=0,p=c.classed(o["default"].SELECTED);c.classed(o["default"].line)||c.classed(o["default"].area)||(h&&g?s.data_selection_isselectable(u)&&!p&&f(!0,c.classed(o["default"].SELECTED,!0),u,l):(0,a.isDefined)(n)&&n&&p&&f(!1,c.classed(o["default"].SELECTED,!1),u,l))})},unselect:function unselect(t,e){var n=this.internal,r=n.config;r.data_selection_enabled&&n.main.selectAll("."+o["default"].shapes).selectAll("."+o["default"].shape).each(function(a,s){var u=(0,i.select)(this),l=a.data?a.data.id:a.id,c=n.getToggle(this,a).bind(n),d=r.data_selection_grouped||!t||t.indexOf(l)>=0,f=!e||e.indexOf(s)>=0,h=u.classed(o["default"].SELECTED);u.classed(o["default"].line)||u.classed(o["default"].area)||d&&f&&r.data_selection_isselectable(a)&&h&&c(!1,u.classed(o["default"].SELECTED,!1),a,s)})}})},function(t,e,n){"use strict";var i=_interopRequireDefault(n(1)),r=_interopRequireDefault(n(3)),a=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(0,a.extend)(i["default"].prototype,{transform:function transform(t,e){var n=this.internal,i=["pie","donut"].indexOf(t)>=0?{withTransform:!0}:null;n.transformTo(e,t,i)}}),(0,a.extend)(r["default"].prototype,{transformTo:function transformTo(t,e,n){var i=this,r=!i.hasArcType(),a=n||{withTransitionForAxis:r};a.withTransitionForTransform=!1,i.transiting=!1,i.setTargetType(t,e),i.updateTargets(i.data.targets),i.updateAndRedraw(a)}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);(0,r.extend)(i["default"].prototype,{groups:function groups(t){var e=this.internal,n=e.config;return(0,r.isUndefined)(t)?n.data_groups:(n.data_groups=t,e.redraw(),n.data_groups)}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);var a=function(t){var e=this.internal,n=e.config;return t?(n.grid_x_lines=t,e.redrawWithoutRescale(),n.grid_x_lines):n.grid_x_lines};(0,r.extend)(a,{add:function add(t){return this.xgrids(this.internal.config.grid_x_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!0)}});var o=function(t){var e=this.internal,n=e.config;return t?(n.grid_y_lines=t,e.redrawWithoutRescale(),n.grid_y_lines):n.grid_y_lines};(0,r.extend)(o,{add:function add(t){return this.ygrids(this.internal.config.grid_y_lines.concat(t||[]))},remove:function remove(t){this.internal.removeGridLines(t,!1)}}),(0,r.extend)(i["default"].prototype,{xgrids:a,ygrids:o})},function(t,e,n){"use strict";var i=_interopRequireDefault(n(1)),r=_interopRequireDefault(n(8)),a=n(6);function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}var o=function(t){var e=this.internal,n=e.config;return t?(n.regions=t,e.redrawWithoutRescale(),n.regions):n.regions};(0,a.extend)(o,{add:function add(t){var e=this.internal,n=e.config;return t?(n.regions=n.regions.concat(t),e.redrawWithoutRescale(),n.regions):n.regions},remove:function remove(t){var e=this.internal,n=e.config,i=t||{},a=e.getOption(i,"duration",n.transition_duration),o=e.getOption(i,"classes",[r["default"].region]),s=e.main.select("."+r["default"].regions).selectAll(o.map(function(t){return"."+t}));return(a?s.transition().duration(a):s).style("opacity","0").remove(),n.regions=n.regions.filter(function(t){var e=!1;return!t["class"]||(t["class"].split(" ").forEach(function(t){o.indexOf(t)>=0&&(e=!0)}),!e)}),n.regions}}),(0,a.extend)(i["default"].prototype,{regions:o})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);var a=function(t){var e=this.internal.data.targets;return(0,r.isUndefined)(t)?e:e.filter(function(e){return t.indexOf(e.id)>=0})};(0,r.extend)(a,{shown:function shown(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t){var e=null;if(t){var n=this.data(t);n&&(0,r.isArray)(n)&&(e=[],n.forEach(function(t){e=e.concat(t.values.map(function(t){return t.value}))}))}return e},names:function names(t){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",t)},colors:function colors(t){return this.internal.updateDataAttributes("colors",t)},axes:function axes(t){return this.internal.updateDataAttributes("axes",t)}}),(0,r.extend)(i["default"].prototype,{data:a})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1));(0,n(6).extend)(i["default"].prototype,{category:function category(t,e){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[t]=e,n.redraw()),i.axis_x_categories[t]},categories:function categories(t){var e=this.internal,n=e.config;return arguments.length?(n.axis_x_categories=t,e.redraw(),n.axis_x_categories):n.axis_x_categories}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1));(0,n(6).extend)(i["default"].prototype,{color:function color(t){return this.internal.color(t)}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1));(0,n(6).extend)(i["default"].prototype,{x:function x(t){var e=this.internal;return arguments.length&&(e.updateTargetX(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs},xs:function xs(t){var e=this.internal;return arguments.length&&(e.updateTargetXs(e.data.targets,t),e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);var a=function(t,e,n){var i=t.config,a="axis_y_"+e,o="axis_y2_"+e;return(0,r.isDefined)(n)&&((0,r.isObjectType)(n)?((0,r.isValue)(n.x)&&(i["axis_x_"+e]=n.x),(0,r.isValue)(n.y)&&(i[a]=n.y),(0,r.isValue)(n.y2)&&(i[o]=n.y2)):(i[a]=n,i[o]=n),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),undefined},o=function(t,e){var n=t.config;return{x:n["axis_x_"+e],y:n["axis_y_"+e],y2:n["axis_y2_"+e]}},s=(0,r.extend)(function(){},{labels:function labels(t){var e=this.internal;arguments.length&&(Object.keys(t).forEach(function(n){e.axis.setLabelText(n,t[n])}),e.axis.updateLabels())},min:function min(t){var e=this.internal;return arguments.length?a(e,"min",t):o(e,"min")},max:function max(t){var e=this.internal;return arguments.length?a(e,"max",t):o(e,"max")},range:function range(t){var e=this.axis;return arguments.length?((0,r.isDefined)(t.max)&&e.max(t.max),(0,r.isDefined)(t.min)&&e.min(t.min),undefined):{max:e.max(),min:e.min()}}});(0,r.extend)(i["default"].prototype,{axis:s})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);var a=(0,r.extend)(function(){},{show:function show(t){var e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function hide(t){var e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}});(0,r.extend)(i["default"].prototype,{legend:a})},function(t,e,n){"use strict";var i=n(64),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),a=n(59),o=n(6);(0,o.extend)(r["default"].prototype,{resize:function resize(t){var e=this.internal.config;e.size_width=t?t.width:null,e.size_height=t?t.height:null,this.flush()},flush:function flush(t){var e=this.internal;e.zoomScale=null,t?e.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):e.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},destroy:function destroy(){var t=this,e=this.internal;return(0,o.notEmpty)(e)&&(e.charts.splice(e.charts.indexOf(this),1),(0,o.isDefined)(e.resizeTimeout)&&a.window.clearTimeout(e.resizeTimeout),(0,i.select)(a.window).on("resize.bb",null),e.selectChart.classed("bb",!1).html(""),Object.keys(this).forEach(function(n){"internal"===n&&Object.keys(e).forEach(function(t){e[t]=null}),t[n]=null,delete t[n]})),null},config:function config(t,e,n){var i=this.internal,r=t&&t.replace(/\./g,"_"),a=void 0;return r in i.config&&((0,o.isDefined)(e)?(i.config[r]=e,a=e,n&&this.flush(!0)):a=i.config[r]),a}})},function(t,e,n){"use strict";e.__esModule=!0,e.document=e.window=undefined;var i=n(6),r=(0,i.isDefined)(window)&&window.Math===Math?window:(0,i.isDefined)(self)&&(self.Math===Math?self:Function("return this")()),a=r.document;e.window=r,e.document=a},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),r=n(6);var a=(0,r.extend)(function(){},{show:function show(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},e=this.internal,n=void 0,i=void 0;t.mouse&&(i=t.mouse),t.data?e.isMultipleX()?(i=[e.x(t.data.x),e.getYScale(t.data.id)(t.data.value)],n=null):n=(0,r.isValue)(t.data.index)?t.data.index:e.getIndexByX(t.data.x):(0,r.isDefined)(t.x)?n=e.getIndexByX(t.x):(0,r.isDefined)(t.index)&&(n=t.index),("mouse"===e.inputType?["mouseover","mousemove"]:["touchstart"]).forEach(function(t){e.dispatchEvent(t,n,i)})},hide:function hide(){var t=this.internal;t.hideTooltip(),t.hideXGridFocus(),t.unexpandCircles(),t.unexpandBars()}});(0,r.extend)(i["default"].prototype,{tooltip:a})},function(t,e,n){"use strict";var i=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(3)),r=n(6);var a=window.navigator.userAgent;(0,r.extend)(i["default"].prototype,{isSafari:function isSafari(){return a.indexOf("Safari")>-1&&!this.isChrome()},isChrome:function isChrome(){return a.indexOf("Chrome")>-1},isMobile:function isMobile(){return a.indexOf("Mobi")>-1}})},function(t,e,n){"use strict";var i=n(64),r=function _interopRequireDefault(t){return t&&t.__esModule?t:{"default":t}}(n(1)),a=n(6);var o=function(t){var e=t.getBoundingClientRect(),n=t.cloneNode(!0),r=(0,a.toArray)(document.styleSheets),o=(0,a.getCssRules)(r).filter(function(t){return t.cssText}).map(function(t){return t.cssText});n.setAttribute("xmlns",i.namespaces.xhtml);var s=(new XMLSerializer).serializeToString(n);return"data:image/svg+xml;base64,"+function(t){return btoa(encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode("0x"+e)}))}(('<svg xmlns="'+i.namespaces.svg+'" width="'+e.width+'" height="'+e.height+'">\n\t\t\t<foreignObject width="100%" height="100%">\n\t\t\t\t<style>'+o.join("\n")+"</style>\n\t\t\t\t"+s+"\n\t\t\t</foreignObject></svg>").replace(/#/g,"%23").replace("/\n/g","%0A"))};(0,a.extend)(r["default"].prototype,{"export":function _export(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"image/png",e=arguments[1],n=o(this.element);if((0,a.isFunction)(e)){var i=new Image;i.crosssOrigin="Anonymous",i.onload=function(){var n=document.createElement("canvas"),r=n.getContext("2d");n.width=i.width,n.height=i.height,r.drawImage(i,0,0),n.toBlob(function(t){e(window.URL.createObjectURL(t))},t)},i.src=n}return n}})},function(t,e,n){"use strict";var i=Math.PI,r=2*i,a=r-1e-6;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+a)},arcTo:function(t,e,n,r,a){t=+t,e=+e,n=+n,r=+r,a=+a;var o=this._x1,s=this._y1,u=n-t,l=r-e,c=o-t,d=s-e,f=c*c+d*d;if(a<0)throw new Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(d*u-l*c)>1e-6&&a){var h=n-o,g=r-s,p=u*u+l*l,_=h*h+g*g,m=Math.sqrt(p),x=Math.sqrt(f),v=a*Math.tan((i-Math.acos((p+f-_)/(2*m*x)))/2),y=v/x,b=v/m;Math.abs(y-1)>1e-6&&(this._+="L"+(t+y*c)+","+(e+y*d)),this._+="A"+a+","+a+",0,0,"+ +(d*h>c*g)+","+(this._x1=t+b*u)+","+(this._y1=e+b*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,o,s,u){t=+t,e=+e;var l=(n=+n)*Math.cos(o),c=n*Math.sin(o),d=t+l,f=e+c,h=1^u,g=u?o-s:s-o;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+d+","+f:(Math.abs(this._x1-d)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+d+","+f),n&&(g<0&&(g=g%r+r),g>a?this._+="A"+n+","+n+",0,1,"+h+","+(t-l)+","+(e-c)+"A"+n+","+n+",0,1,"+h+","+(this._x1=d)+","+(this._y1=f):g>1e-6&&(this._+="A"+n+","+n+",0,"+ +(g>=i)+","+h+","+(this._x1=t+n*Math.cos(s))+","+(this._y1=e+n*Math.sin(s))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var o=path,s=function(t){return function constant(){return t}},u=Math.abs,l=Math.atan2,c=Math.cos,d=Math.max,f=Math.min,h=Math.sin,g=Math.sqrt,p=1e-12,_=Math.PI,m=_/2,x=2*_;function asin(t){return t>=1?m:t<=-1?-m:Math.asin(t)}function arcInnerRadius(t){return t.innerRadius}function arcOuterRadius(t){return t.outerRadius}function arcStartAngle(t){return t.startAngle}function arcEndAngle(t){return t.endAngle}function arcPadAngle(t){return t&&t.padAngle}function cornerTangents(t,e,n,i,r,a,o){var s=t-n,u=e-i,l=(o?a:-a)/g(s*s+u*u),c=l*u,f=-l*s,h=t+c,p=e+f,_=n+c,m=i+f,x=(h+_)/2,v=(p+m)/2,y=_-h,b=m-p,T=y*y+b*b,w=r-a,A=h*m-_*p,M=(b<0?-1:1)*g(d(0,w*w*T-A*A)),C=(A*b-y*M)/T,S=(-A*y-b*M)/T,D=(A*b+y*M)/T,k=(-A*y+b*M)/T,L=C-x,R=S-v,F=D-x,O=k-v;return L*L+R*R>F*F+O*O&&(C=D,S=k),{cx:C,cy:S,x01:-c,y01:-f,x11:C*(r/w-1),y11:S*(r/w-1)}}var v=function(){var t=arcInnerRadius,e=arcOuterRadius,n=s(0),i=null,r=arcStartAngle,a=arcEndAngle,d=arcPadAngle,v=null;function arc(){var s,y,b=+t.apply(this,arguments),T=+e.apply(this,arguments),w=r.apply(this,arguments)-m,A=a.apply(this,arguments)-m,M=u(A-w),C=A>w;if(v||(v=s=o()),T<b&&(y=T,T=b,b=y),T>p)if(M>x-p)v.moveTo(T*c(w),T*h(w)),v.arc(0,0,T,w,A,!C),b>p&&(v.moveTo(b*c(A),b*h(A)),v.arc(0,0,b,A,w,C));else{var S,D,k=w,L=A,R=w,F=A,O=M,I=M,E=d.apply(this,arguments)/2,X=E>p&&(i?+i.apply(this,arguments):g(b*b+T*T)),z=f(u(T-b)/2,+n.apply(this,arguments)),N=z,P=z;if(X>p){var Y=asin(X/b*h(E)),B=asin(X/T*h(E));(O-=2*Y)>p?(R+=Y*=C?1:-1,F-=Y):(O=0,R=F=(w+A)/2),(I-=2*B)>p?(k+=B*=C?1:-1,L-=B):(I=0,k=L=(w+A)/2)}var q=T*c(k),V=T*h(k),j=b*c(F),U=b*h(F);if(z>p){var H=T*c(L),W=T*h(L),G=b*c(R),Z=b*h(R);if(M<_){var $=O>p?function intersect(t,e,n,i,r,a,o,s){var u=n-t,l=i-e,c=o-r,d=s-a,f=(c*(e-a)-d*(t-r))/(d*u-c*l);return[t+f*u,e+f*l]}(q,V,G,Z,H,W,j,U):[j,U],K=q-$[0],J=V-$[1],Q=H-$[0],tt=W-$[1],et=1/h(function acos(t){return t>1?0:t<-1?_:Math.acos(t)}((K*Q+J*tt)/(g(K*K+J*J)*g(Q*Q+tt*tt)))/2),nt=g($[0]*$[0]+$[1]*$[1]);N=f(z,(b-nt)/(et-1)),P=f(z,(T-nt)/(et+1))}}I>p?P>p?(S=cornerTangents(G,Z,q,V,T,P,C),D=cornerTangents(H,W,j,U,T,P,C),v.moveTo(S.cx+S.x01,S.cy+S.y01),P<z?v.arc(S.cx,S.cy,P,l(S.y01,S.x01),l(D.y01,D.x01),!C):(v.arc(S.cx,S.cy,P,l(S.y01,S.x01),l(S.y11,S.x11),!C),v.arc(0,0,T,l(S.cy+S.y11,S.cx+S.x11),l(D.cy+D.y11,D.cx+D.x11),!C),v.arc(D.cx,D.cy,P,l(D.y11,D.x11),l(D.y01,D.x01),!C))):(v.moveTo(q,V),v.arc(0,0,T,k,L,!C)):v.moveTo(q,V),b>p&&O>p?N>p?(S=cornerTangents(j,U,H,W,b,-N,C),D=cornerTangents(q,V,G,Z,b,-N,C),v.lineTo(S.cx+S.x01,S.cy+S.y01),N<z?v.arc(S.cx,S.cy,N,l(S.y01,S.x01),l(D.y01,D.x01),!C):(v.arc(S.cx,S.cy,N,l(S.y01,S.x01),l(S.y11,S.x11),!C),v.arc(0,0,b,l(S.cy+S.y11,S.cx+S.x11),l(D.cy+D.y11,D.cx+D.x11),C),v.arc(D.cx,D.cy,N,l(D.y11,D.x11),l(D.y01,D.x01),!C))):v.arc(0,0,b,F,R,C):v.lineTo(j,U)}else v.moveTo(0,0);if(v.closePath(),s)return v=null,s+""||null}return arc.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +a.apply(this,arguments))/2-_/2;return[c(i)*n,h(i)*n]},arc.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),arc):t},arc.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),arc):e},arc.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),arc):n},arc.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:s(+t),arc):i},arc.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),arc):r},arc.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:s(+t),arc):a},arc.padAngle=function(t){return arguments.length?(d="function"==typeof t?t:s(+t),arc):d},arc.context=function(t){return arguments.length?(v=null==t?null:t,arc):v},arc};function Linear(t){this._context=t}Linear.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var y=function(t){return new Linear(t)};function point_x(t){return t[0]}function point_y(t){return t[1]}var b=function(){var t=point_x,e=point_y,n=s(!0),i=null,r=y,a=null;function line(s){var u,l,c,d=s.length,f=!1;for(null==i&&(a=r(c=o())),u=0;u<=d;++u)!(u<d&&n(l=s[u],u,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(l,u,s),+e(l,u,s));if(c)return a=null,c+""||null}return line.x=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),line):t},line.y=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),line):e},line.defined=function(t){return arguments.length?(n="function"==typeof t?t:s(!!t),line):n},line.curve=function(t){return arguments.length?(r=t,null!=i&&(a=r(i)),line):r},line.context=function(t){return arguments.length?(null==t?i=a=null:a=r(i=t),line):i},line},T=function(){var t=point_x,e=null,n=s(0),i=point_y,r=s(!0),a=null,u=y,l=null;function area(s){var c,d,f,h,g,p=s.length,_=!1,m=new Array(p),x=new Array(p);for(null==a&&(l=u(g=o())),c=0;c<=p;++c){if(!(c<p&&r(h=s[c],c,s))===_)if(_=!_)d=c,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=c-1;f>=d;--f)l.point(m[f],x[f]);l.lineEnd(),l.areaEnd()}_&&(m[c]=+t(h,c,s),x[c]=+n(h,c,s),l.point(e?+e(h,c,s):m[c],i?+i(h,c,s):x[c]))}if(g)return l=null,g+""||null}function arealine(){return b().defined(r).curve(u).context(a)}return area.x=function(n){return arguments.length?(t="function"==typeof n?n:s(+n),e=null,area):t},area.x0=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),area):t},area.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:s(+t),area):e},area.y=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),i=null,area):n},area.y0=function(t){return arguments.length?(n="function"==typeof t?t:s(+t),area):n},area.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:s(+t),area):i},area.lineX0=area.lineY0=function(){return arealine().x(t).y(n)},area.lineY1=function(){return arealine().x(t).y(i)},area.lineX1=function(){return arealine().x(e).y(n)},area.defined=function(t){return arguments.length?(r="function"==typeof t?t:s(!!t),area):r},area.curve=function(t){return arguments.length?(u=t,null!=a&&(l=u(a)),area):u},area.context=function(t){return arguments.length?(null==t?a=l=null:l=u(a=t),area):a},area},w=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},A=function(t){return t},M=function(){var t=A,e=w,n=null,i=s(0),r=s(x),a=s(0);function pie(o){var s,u,l,c,d,f=o.length,h=0,g=new Array(f),p=new Array(f),_=+i.apply(this,arguments),m=Math.min(x,Math.max(-x,r.apply(this,arguments)-_)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),y=v*(m<0?-1:1);for(s=0;s<f;++s)(d=p[g[s]=s]=+t(o[s],s,o))>0&&(h+=d);for(null!=e?g.sort(function(t,n){return e(p[t],p[n])}):null!=n&&g.sort(function(t,e){return n(o[t],o[e])}),s=0,l=h?(m-f*y)/h:0;s<f;++s,_=c)u=g[s],c=_+((d=p[u])>0?d*l:0)+y,p[u]={data:o[u],index:s,value:d,startAngle:_,endAngle:c,padAngle:v};return p}return pie.value=function(e){return arguments.length?(t="function"==typeof e?e:s(+e),pie):t},pie.sortValues=function(t){return arguments.length?(e=t,n=null,pie):e},pie.sort=function(t){return arguments.length?(n=t,e=null,pie):n},pie.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),pie):i},pie.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),pie):r},pie.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:s(+t),pie):a},pie},C=curveRadial(y);function Radial(t){this._curve=t}function curveRadial(t){function radial(e){return new Radial(t(e))}return radial._curve=t,radial}function lineRadial(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(curveRadial(t)):e()._curve},t}Radial.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var S=function(){return lineRadial(b().curve(C))},D=function(){var t=T().curve(C),e=t.curve,n=t.lineX0,i=t.lineX1,r=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return lineRadial(n())},delete t.lineX0,t.lineEndAngle=function(){return lineRadial(i())},delete t.lineX1,t.lineInnerRadius=function(){return lineRadial(r())},delete t.lineY0,t.lineOuterRadius=function(){return lineRadial(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(curveRadial(t)):e()._curve},t},k=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},L=Array.prototype.slice;function linkSource(t){return t.source}function linkTarget(t){return t.target}function link_link(t){var e=linkSource,n=linkTarget,i=point_x,r=point_y,a=null;function link(){var s,u=L.call(arguments),l=e.apply(this,u),c=n.apply(this,u);if(a||(a=s=o()),t(a,+i.apply(this,(u[0]=l,u)),+r.apply(this,u),+i.apply(this,(u[0]=c,u)),+r.apply(this,u)),s)return a=null,s+""||null}return link.source=function(t){return arguments.length?(e=t,link):e},link.target=function(t){return arguments.length?(n=t,link):n},link.x=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),link):i},link.y=function(t){return arguments.length?(r="function"==typeof t?t:s(+t),link):r},link.context=function(t){return arguments.length?(a=null==t?null:t,link):a},link}function curveHorizontal(t,e,n,i,r){t.moveTo(e,n),t.bezierCurveTo(e=(e+i)/2,n,e,r,i,r)}function curveVertical(t,e,n,i,r){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+r)/2,i,n,i,r)}function link_curveRadial(t,e,n,i,r){var a=k(e,n),o=k(e,n=(n+r)/2),s=k(i,n),u=k(i,r);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],u[0],u[1])}function linkHorizontal(){return link_link(curveHorizontal)}function linkVertical(){return link_link(curveVertical)}function linkRadial(){var t=link_link(link_curveRadial);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var R={draw:function(t,e){var n=Math.sqrt(e/_);t.moveTo(n,0),t.arc(0,0,n,0,x)}},F={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},O=Math.sqrt(1/3),I=2*O,E={draw:function(t,e){var n=Math.sqrt(e/I),i=n*O;t.moveTo(0,-n),t.lineTo(i,0),t.lineTo(0,n),t.lineTo(-i,0),t.closePath()}},X=Math.sin(_/10)/Math.sin(7*_/10),z=Math.sin(x/10)*X,N=-Math.cos(x/10)*X,P={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),i=z*n,r=N*n;t.moveTo(0,-n),t.lineTo(i,r);for(var a=1;a<5;++a){var o=x*a/5,s=Math.cos(o),u=Math.sin(o);t.lineTo(u*n,-s*n),t.lineTo(s*i-u*r,u*i+s*r)}t.closePath()}},Y={draw:function(t,e){var n=Math.sqrt(e),i=-n/2;t.rect(i,i,n,n)}},B=Math.sqrt(3),q={draw:function(t,e){var n=-Math.sqrt(e/(3*B));t.moveTo(0,2*n),t.lineTo(-B*n,-n),t.lineTo(B*n,-n),t.closePath()}},V=Math.sqrt(3)/2,j=1/Math.sqrt(12),U=3*(j/2+1),H={draw:function(t,e){var n=Math.sqrt(e/U),i=n/2,r=n*j,a=i,o=n*j+n,s=-a,u=o;t.moveTo(i,r),t.lineTo(a,o),t.lineTo(s,u),t.lineTo(-.5*i-V*r,V*i+-.5*r),t.lineTo(-.5*a-V*o,V*a+-.5*o),t.lineTo(-.5*s-V*u,V*s+-.5*u),t.lineTo(-.5*i+V*r,-.5*r-V*i),t.lineTo(-.5*a+V*o,-.5*o-V*a),t.lineTo(-.5*s+V*u,-.5*u-V*s),t.closePath()}},W=[R,F,E,Y,P,q,H],G=function(){var t=s(R),e=s(64),n=null;function symbol(){var i;if(n||(n=i=o()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return symbol.type=function(e){return arguments.length?(t="function"==typeof e?e:s(e),symbol):t},symbol.size=function(t){return arguments.length?(e="function"==typeof t?t:s(+t),symbol):e},symbol.context=function(t){return arguments.length?(n=null==t?null:t,symbol):n},symbol},Z=function(){};function point(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Basis(t){this._context=t}Basis.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:point(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var $=function(t){return new Basis(t)};function BasisClosed(t){this._context=t}BasisClosed.prototype={areaStart:Z,areaEnd:Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var K=function(t){return new BasisClosed(t)};function BasisOpen(t){this._context=t}BasisOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:point(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var J=function(t){return new BasisOpen(t)};function Bundle(t,e){this._basis=new Basis(t),this._beta=e}Bundle.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],a=e[0],o=t[n]-r,s=e[n]-a,u=-1;++u<=n;)i=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+i*o),this._beta*e[u]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Q=function custom(t){function bundle(e){return 1===t?new Basis(e):new Bundle(e,t)}return bundle.beta=function(t){return custom(+t)},bundle}(.85);function cardinal_point(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Cardinal(t,e){this._context=t,this._k=(1-e)/6}Cardinal.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:cardinal_point(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var tt=function custom(t){function cardinal(e){return new Cardinal(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function CardinalClosed(t,e){this._context=t,this._k=(1-e)/6}CardinalClosed.prototype={areaStart:Z,areaEnd:Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var et=function custom(t){function cardinal(e){return new CardinalClosed(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function CardinalOpen(t,e){this._context=t,this._k=(1-e)/6}CardinalOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cardinal_point(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var nt=function custom(t){function cardinal(e){return new CardinalOpen(e,t)}return cardinal.tension=function(t){return custom(+t)},cardinal}(0);function catmullRom_point(t,e,n){var i=t._x1,r=t._y1,a=t._x2,o=t._y2;if(t._l01_a>p){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>p){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/c,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(i,r,a,o,t._x2,t._y2)}function CatmullRom(t,e){this._context=t,this._alpha=e}CatmullRom.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var it=function custom(t){function catmullRom(e){return t?new CatmullRom(e,t):new Cardinal(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function CatmullRomClosed(t,e){this._context=t,this._alpha=e}CatmullRomClosed.prototype={areaStart:Z,areaEnd:Z,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var rt=function custom(t){function catmullRom(e){return t?new CatmullRomClosed(e,t):new CardinalClosed(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function CatmullRomOpen(t,e){this._context=t,this._alpha=e}CatmullRomOpen.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:catmullRom_point(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var at=function custom(t){function catmullRom(e){return t?new CatmullRomOpen(e,t):new CardinalOpen(e,0)}return catmullRom.alpha=function(t){return custom(+t)},catmullRom}(.5);function LinearClosed(t){this._context=t}LinearClosed.prototype={areaStart:Z,areaEnd:Z,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var ot=function(t){return new LinearClosed(t)};function sign(t){return t<0?-1:1}function slope3(t,e,n){var i=t._x1-t._x0,r=e-t._x1,a=(t._y1-t._y0)/(i||r<0&&-0),o=(n-t._y1)/(r||i<0&&-0),s=(a*r+o*i)/(i+r);return(sign(a)+sign(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function slope2(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function monotone_point(t,e,n){var i=t._x0,r=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,r+s*e,a-s,o-s*n,a,o)}function MonotoneX(t){this._context=t}function MonotoneY(t){this._context=new ReflectContext(t)}function ReflectContext(t){this._context=t}function monotoneX(t){return new MonotoneX(t)}function monotoneY(t){return new MonotoneY(t)}function Natural(t){this._context=t}function controlPoints(t){var e,n,i=t.length-1,r=new Array(i),a=new Array(i),o=new Array(i);for(r[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,a[i-1]=7,o[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(r[i-1]=o[i-1]/a[i-1],e=i-2;e>=0;--e)r[e]=(o[e]-r[e+1])/a[e];for(a[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)a[e]=2*t[e+1]-r[e+1];return[r,a]}MonotoneX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:monotone_point(this,this._t0,slope2(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,monotone_point(this,slope2(this,n=slope3(this,t,e)),n);break;default:monotone_point(this,this._t0,n=slope3(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(MonotoneY.prototype=Object.create(MonotoneX.prototype)).point=function(t,e){MonotoneX.prototype.point.call(this,e,t)},ReflectContext.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,a){this._context.bezierCurveTo(e,t,i,n,a,r)}},Natural.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=controlPoints(t),r=controlPoints(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(i[0][a],r[0][a],i[1][a],r[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var st=function(t){return new Natural(t)};function Step(t,e){this._context=t,this._t=e}Step.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var ut=function(t){return new Step(t,.5)};function stepBefore(t){return new Step(t,0)}function stepAfter(t){return new Step(t,1)}var lt=function(t,e){if((r=t.length)>1)for(var n,i,r,a=1,o=t[e[0]],s=o.length;a<r;++a)for(i=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]},ct=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function stackValue(t,e){return t[e]}var dt=function(){var t=s([]),e=ct,n=lt,i=stackValue;function stack(r){var a,o,s=t.apply(this,arguments),u=r.length,l=s.length,c=new Array(l);for(a=0;a<l;++a){for(var d,f=s[a],h=c[a]=new Array(u),g=0;g<u;++g)h[g]=d=[0,+i(r[g],f,g,r)],d.data=r[g];h.key=f}for(a=0,o=e(c);a<l;++a)c[o[a]].index=a;return n(c,o),c}return stack.keys=function(e){return arguments.length?(t="function"==typeof e?e:s(L.call(e)),stack):t},stack.value=function(t){return arguments.length?(i="function"==typeof t?t:s(+t),stack):i},stack.order=function(t){return arguments.length?(e=null==t?ct:"function"==typeof t?t:s(L.call(t)),stack):e},stack.offset=function(t){return arguments.length?(n=null==t?lt:t,stack):n},stack},ft=function(t,e){if((i=t.length)>0){for(var n,i,r,a=0,o=t[0].length;a<o;++a){for(r=n=0;n<i;++n)r+=t[n][a][1]||0;if(r)for(n=0;n<i;++n)t[n][a][1]/=r}lt(t,e)}},ht=function(t,e){if((s=t.length)>1)for(var n,i,r,a,o,s,u=0,l=t[e[0]].length;u<l;++u)for(a=o=0,n=0;n<s;++n)(r=(i=t[e[n]][u])[1]-i[0])>=0?(i[0]=a,i[1]=a+=r):r<0?(i[1]=o,i[0]=o+=r):i[0]=a},gt=function(t,e){if((n=t.length)>0){for(var n,i=0,r=t[e[0]],a=r.length;i<a;++i){for(var o=0,s=0;o<n;++o)s+=t[o][i][1]||0;r[i][1]+=r[i][0]=-s/2}lt(t,e)}},pt=function(t,e){if((r=t.length)>0&&(i=(n=t[e[0]]).length)>0){for(var n,i,r,a=0,o=1;o<i;++o){for(var s=0,u=0,l=0;s<r;++s){for(var c=t[e[s]],d=c[o][1]||0,f=(d-(c[o-1][1]||0))/2,h=0;h<s;++h){var g=t[e[h]];f+=(g[o][1]||0)-(g[o-1][1]||0)}u+=d,l+=f*d}n[o-1][1]+=n[o-1][0]=a,u&&(a-=l/u)}n[o-1][1]+=n[o-1][0]=a,lt(t,e)}},_t=function(t){var e=t.map(ascending_sum);return ct(t).sort(function(t,n){return e[t]-e[n]})};function ascending_sum(t){for(var e,n=0,i=-1,r=t.length;++i<r;)(e=+t[i][1])&&(n+=e);return n}var mt=function(t){return _t(t).reverse()},xt=function(t){var e,n,i=t.length,r=t.map(ascending_sum),a=ct(t).sort(function(t,e){return r[e]-r[t]}),o=0,s=0,u=[],l=[];for(e=0;e<i;++e)n=a[e],o<s?(o+=r[n],u.push(n)):(s+=r[n],l.push(n));return l.reverse().concat(u)},vt=function(t){return ct(t).reverse()};n.d(e,"arc",function(){return v}),n.d(e,"area",function(){return T}),n.d(e,"line",function(){return b}),n.d(e,"pie",function(){return M}),n.d(e,"areaRadial",function(){return D}),n.d(e,"radialArea",function(){return D}),n.d(e,"lineRadial",function(){return S}),n.d(e,"radialLine",function(){return S}),n.d(e,"pointRadial",function(){return k}),n.d(e,"linkHorizontal",function(){return linkHorizontal}),n.d(e,"linkVertical",function(){return linkVertical}),n.d(e,"linkRadial",function(){return linkRadial}),n.d(e,"symbol",function(){return G}),n.d(e,"symbols",function(){return W}),n.d(e,"symbolCircle",function(){return R}),n.d(e,"symbolCross",function(){return F}),n.d(e,"symbolDiamond",function(){return E}),n.d(e,"symbolSquare",function(){return Y}),n.d(e,"symbolStar",function(){return P}),n.d(e,"symbolTriangle",function(){return q}),n.d(e,"symbolWye",function(){return H}),n.d(e,"curveBasisClosed",function(){return K}),n.d(e,"curveBasisOpen",function(){return J}),n.d(e,"curveBasis",function(){return $}),n.d(e,"curveBundle",function(){return Q}),n.d(e,"curveCardinalClosed",function(){return et}),n.d(e,"curveCardinalOpen",function(){return nt}),n.d(e,"curveCardinal",function(){return tt}),n.d(e,"curveCatmullRomClosed",function(){return rt}),n.d(e,"curveCatmullRomOpen",function(){return at}),n.d(e,"curveCatmullRom",function(){return it}),n.d(e,"curveLinearClosed",function(){return ot}),n.d(e,"curveLinear",function(){return y}),n.d(e,"curveMonotoneX",function(){return monotoneX}),n.d(e,"curveMonotoneY",function(){return monotoneY}),n.d(e,"curveNatural",function(){return st}),n.d(e,"curveStep",function(){return ut}),n.d(e,"curveStepAfter",function(){return stepAfter}),n.d(e,"curveStepBefore",function(){return stepBefore}),n.d(e,"stack",function(){return dt}),n.d(e,"stackOffsetExpand",function(){return ft}),n.d(e,"stackOffsetDiverging",function(){return ht}),n.d(e,"stackOffsetNone",function(){return lt}),n.d(e,"stackOffsetSilhouette",function(){return gt}),n.d(e,"stackOffsetWiggle",function(){return pt}),n.d(e,"stackOrderAscending",function(){return _t}),n.d(e,"stackOrderDescending",function(){return mt}),n.d(e,"stackOrderInsideOut",function(){return xt}),n.d(e,"stackOrderNone",function(){return ct}),n.d(e,"stackOrderReverse",function(){return vt})},function(t,e,n){"use strict";var i="http://www.w3.org/1999/xhtml",r={svg:"http://www.w3.org/2000/svg",xhtml:i,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},a=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.hasOwnProperty(e)?{space:r[e],local:t}:t};var o=function(t){var e=a(t);return(e.local?function creatorFixed(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function creatorInherit(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i&&e.documentElement.namespaceURI===i?e.createElement(t):e.createElementNS(n,t)}})(e)};function none(){}var s=function(t){return null==t?none:function(){return this.querySelector(t)}};function empty(){return[]}var u=function(t){return null==t?empty:function(){return this.querySelectorAll(t)}},l=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var c=document.documentElement;if(!c.matches){var d=c.webkitMatchesSelector||c.msMatchesSelector||c.mozMatchesSelector||c.oMatchesSelector;l=function(t){return function(){return d.call(this,t)}}}}var f=l,h=function(t){return new Array(t.length)};function EnterNode(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}EnterNode.prototype={constructor:EnterNode,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var g="$";function bindIndex(t,e,n,i,r,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],i[s]=o):n[s]=new EnterNode(t,a[s]);for(;s<u;++s)(o=e[s])&&(r[s]=o)}function bindKey(t,e,n,i,r,a,o){var s,u,l,c={},d=e.length,f=a.length,h=new Array(d);for(s=0;s<d;++s)(u=e[s])&&(h[s]=l=g+o.call(u,u.__data__,s,e),l in c?r[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l=g+o.call(t,a[s],s,a)])?(i[s]=u,u.__data__=a[s],c[l]=null):n[s]=new EnterNode(t,a[s]);for(s=0;s<d;++s)(u=e[s])&&c[h[s]]===u&&(r[s]=u)}function ascending(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var p=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function styleValue(t,e){return t.style.getPropertyValue(e)||p(t).getComputedStyle(t,null).getPropertyValue(e)}function classArray(t){return t.trim().split(/^|\s+/)}function classList(t){return t.classList||new ClassList(t)}function ClassList(t){this._node=t,this._names=classArray(t.getAttribute("class")||"")}function classedAdd(t,e){for(var n=classList(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function classedRemove(t,e){for(var n=classList(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}ClassList.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function textRemove(){this.textContent=""}function htmlRemove(){this.innerHTML=""}function raise(){this.nextSibling&&this.parentNode.appendChild(this)}function lower(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function constantNull(){return null}function remove(){var t=this.parentNode;t&&t.removeChild(this)}function selection_cloneShallow(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function selection_cloneDeep(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}var _={},m=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(_={mouseenter:"mouseover",mouseleave:"mouseout"}));function filterContextListener(t,e,n){return t=contextListener(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function contextListener(t,e,n){return function(i){var r=m;m=i;try{t.call(this,this.__data__,e,n)}finally{m=r}}}function onRemove(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,a=e.length;i<a;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.capture);++r?e.length=r:delete this.__on}}}function onAdd(t,e,n){var i=_.hasOwnProperty(t.type)?filterContextListener:contextListener;return function(r,a,o){var s,u=this.__on,l=i(e,a,o);if(u)for(var c=0,d=u.length;c<d;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function customEvent(t,e,n,i){var r=m;t.sourceEvent=m,m=t;try{return e.apply(n,i)}finally{m=r}}function dispatchEvent(t,e,n){var i=p(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}var x=[null];function Selection(t,e){this._groups=t,this._parents=e}function selection_selection(){return new Selection([[document.documentElement]],x)}Selection.prototype=selection_selection.prototype={constructor:Selection,select:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o,u=e[r],l=u.length,c=i[r]=new Array(l),d=0;d<l;++d)(a=u[d])&&(o=t.call(a,a.__data__,d,u))&&("__data__"in a&&(o.__data__=a.__data__),c[d]=o);return new Selection(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,i=[],r=[],a=0;a<n;++a)for(var o,s=e[a],l=s.length,c=0;c<l;++c)(o=s[c])&&(i.push(t.call(o,o.__data__,c,s)),r.push(o));return new Selection(i,r)},filter:function(t){"function"!=typeof t&&(t=f(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var a,o=e[r],s=o.length,u=i[r]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Selection(i,this._parents)},data:function(t,e){if(!t)return h=new Array(this.size()),l=-1,this.each(function(t){h[++l]=t}),h;var n=e?bindKey:bindIndex,i=this._parents,r=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=r.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++l){var c=i[l],d=r[l],f=d.length,h=t.call(c,c&&c.__data__,l,i),g=h.length,p=s[l]=new Array(g),_=o[l]=new Array(g);n(c,d,p,_,u[l]=new Array(f),h,e);for(var m,x,v=0,y=0;v<g;++v)if(m=p[v]){for(v>=y&&(y=v+1);!(x=_[y])&&++y<g;);m._next=x||null}}return(o=new Selection(o,i))._enter=s,o._exit=u,o},enter:function(){return new Selection(this._enter||this._groups.map(h),this._parents)},exit:function(){return new Selection(this._exit||this._groups.map(h),this._parents)},merge:function(t){for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var u,l=e[s],c=n[s],d=l.length,f=o[s]=new Array(d),h=0;h<d;++h)(u=l[h]||c[h])&&(f[h]=u);for(;s<i;++s)o[s]=e[s];return new Selection(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],a=r.length-1,o=r[a];--a>=0;)(i=r[a])&&(o&&o!==i.nextSibling&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function compareNode(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ascending);for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r){for(var a,o=e[r],s=o.length,u=i[r]=new Array(s),l=0;l<s;++l)(a=o[l])&&(u[l]=a);u.sort(compareNode)}return new Selection(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each(function(){t[++e]=this}),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,a=i.length;r<a;++r){var o=i[r];if(o)return o}return null},size:function(){var t=0;return this.each(function(){++t}),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,a=e[n],o=0,s=a.length;o<s;++o)(r=a[o])&&t.call(r,r.__data__,o,a);return this},attr:function(t,e){var n=a(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function attrRemove(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function attrFunctionNS(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function attrFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function attrConstantNS(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function attrConstant(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function styleRemove(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function styleFunction(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}:function styleConstant(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):styleValue(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function propertyRemove(t){return function(){delete this[t]}}:"function"==typeof e?function propertyFunction(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function propertyConstant(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=classArray(t+"");if(arguments.length<2){for(var i=classList(this.node()),r=-1,a=n.length;++r<a;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?function classedFunction(t,e){return function(){(e.apply(this,arguments)?classedAdd:classedRemove)(this,t)}}:e?function classedTrue(t){return function(){classedAdd(this,t)}}:function classedFalse(t){return function(){classedRemove(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?textRemove:("function"==typeof t?function textFunction(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function textConstant(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?htmlRemove:("function"==typeof t?function htmlFunction(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function htmlConstant(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(raise)},lower:function(){return this.each(lower)},append:function(t){var e="function"==typeof t?t:o(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:o(t),i=null==e?constantNull:"function"==typeof e?e:s(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(remove)},clone:function(t){return this.select(t?selection_cloneDeep:selection_cloneShallow)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,a=function parseTypenames(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?onAdd:onRemove,null==n&&(n=!1),i=0;i<o;++i)this.each(s(a[i],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(i=0,u=s[l];i<o;++i)if((r=a[i]).type===u.type&&r.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?function dispatchFunction(t,e){return function(){return dispatchEvent(this,t,e.apply(this,arguments))}}:function dispatchConstant(t,e){return function(){return dispatchEvent(this,t,e)}})(t,e))}};var v=selection_selection,y=function(t){return"string"==typeof t?new Selection([[document.querySelector(t)]],[document.documentElement]):new Selection([[t]],x)},b=function(t){return y(o(t).call(document.documentElement))},T=0;function local(){return new Local}function Local(){this._="@"+(++T).toString(36)}Local.prototype=local.prototype={constructor:Local,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var w=function(){for(var t,e=m;t=e.sourceEvent;)e=t;return e},A=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,[(i=i.matrixTransform(t.getScreenCTM().inverse())).x,i.y]}var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]},M=function(t){var e=w();return e.changedTouches&&(e=e.changedTouches[0]),A(t,e)},C=function(t){return"string"==typeof t?new Selection([document.querySelectorAll(t)],[document.documentElement]):new Selection([null==t?[]:t],x)},S=function(t,e,n){arguments.length<3&&(n=e,e=w().changedTouches);for(var i,r=0,a=e?e.length:0;r<a;++r)if((i=e[r]).identifier===n)return A(t,i);return null},D=function(t,e){null==e&&(e=w().touches);for(var n=0,i=e?e.length:0,r=new Array(i);n<i;++n)r[n]=A(t,e[n]);return r};n.d(e,"create",function(){return b}),n.d(e,"creator",function(){return o}),n.d(e,"local",function(){return local}),n.d(e,"matcher",function(){return f}),n.d(e,"mouse",function(){return M}),n.d(e,"namespace",function(){return a}),n.d(e,"namespaces",function(){return r}),n.d(e,"clientPoint",function(){return A}),n.d(e,"select",function(){return y}),n.d(e,"selectAll",function(){return C}),n.d(e,"selection",function(){return v}),n.d(e,"selector",function(){return s}),n.d(e,"selectorAll",function(){return u}),n.d(e,"style",function(){return styleValue}),n.d(e,"touch",function(){return S}),n.d(e,"touches",function(){return D}),n.d(e,"window",function(){return p}),n.d(e,"event",function(){return m}),n.d(e,"customEvent",function(){return customEvent})},function(t,e,n){"use strict";var i=n(66),r=n(71),a=Array.prototype,o=a.map,s=a.slice,u={name:"implicit"};function ordinal(t){var e=Object(r.map)(),n=[],i=u;function scale(r){var a=r+"",o=e.get(a);if(!o){if(i!==u)return i;e.set(a,o=n.push(r))}return t[(o-1)%t.length]}return t=null==t?[]:s.call(t),scale.domain=function(t){if(!arguments.length)return n.slice();n=[],e=Object(r.map)();for(var i,a,o=-1,s=t.length;++o<s;)e.has(a=(i=t[o])+"")||e.set(a,n.push(i));return scale},scale.range=function(e){return arguments.length?(t=s.call(e),scale):t.slice()},scale.unknown=function(t){return arguments.length?(i=t,scale):i},scale.copy=function(){return ordinal().domain(n).range(t).unknown(i)},scale}function band(){var t,e,n=ordinal().unknown(undefined),r=n.domain,a=n.range,o=[0,1],s=!1,u=0,l=0,c=.5;function rescale(){var n=r().length,d=o[1]<o[0],f=o[d-0],h=o[1-d];t=(h-f)/Math.max(1,n-u+2*l),s&&(t=Math.floor(t)),f+=(h-f-t*(n-u))*c,e=t*(1-u),s&&(f=Math.round(f),e=Math.round(e));var g=Object(i.range)(n).map(function(e){return f+t*e});return a(d?g.reverse():g)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),rescale()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],rescale()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],s=!0,rescale()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,rescale()):s},n.padding=function(t){return arguments.length?(u=l=Math.max(0,Math.min(1,t)),rescale()):u},n.paddingInner=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),rescale()):u},n.paddingOuter=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),rescale()):l},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),rescale()):c},n.copy=function(){return band().domain(r()).range(o).round(s).paddingInner(u).paddingOuter(l).align(c)},rescale()}function point(){return function pointish(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pointish(e())},t}(band().paddingInner(1))}var l=n(68),c=function(t){return function(){return t}},d=function(t){return+t},f=[0,1];function deinterpolateLinear(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:c(e)}function bimap(t,e,n,i){var r=t[0],a=t[1],o=e[0],s=e[1];return a<r?(r=n(a,r),o=i(s,o)):(r=n(r,a),o=i(o,s)),function(t){return o(r(t))}}function polymap(t,e,n,r){var a=Math.min(t.length,e.length)-1,o=new Array(a),s=new Array(a),u=-1;for(t[a]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++u<a;)o[u]=n(t[u],t[u+1]),s[u]=r(e[u],e[u+1]);return function(e){var n=Object(i.bisect)(t,e,1,a)-1;return s[n](o[n](e))}}function copy(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function continuous(t,e){var n,i,r,a=f,u=f,c=l.interpolate,h=!1;function rescale(){return n=Math.min(a.length,u.length)>2?polymap:bimap,i=r=null,scale}function scale(e){return(i||(i=n(a,u,h?function deinterpolateClamp(t){return function(e,n){var i=t(e=+e,n=+n);return function(t){return t<=e?0:t>=n?1:i(t)}}}(t):t,c)))(+e)}return scale.invert=function(t){return(r||(r=n(u,a,deinterpolateLinear,h?function reinterpolateClamp(t){return function(e,n){var i=t(e=+e,n=+n);return function(t){return t<=0?e:t>=1?n:i(t)}}}(e):e)))(+t)},scale.domain=function(t){return arguments.length?(a=o.call(t,d),rescale()):a.slice()},scale.range=function(t){return arguments.length?(u=s.call(t),rescale()):u.slice()},scale.rangeRound=function(t){return u=s.call(t),c=l.interpolateRound,rescale()},scale.clamp=function(t){return arguments.length?(h=!!t,rescale()):h},scale.interpolate=function(t){return arguments.length?(c=t,rescale()):c},rescale()}var h=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]},g=function(t){return(t=h(Math.abs(t)))?t[1]:NaN},p=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function formatSpecifier(t){return new FormatSpecifier(t)}function FormatSpecifier(t){if(!(e=p.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}formatSpecifier.prototype=FormatSpecifier.prototype,FormatSpecifier.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var _,m,x,v,y=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(r>0){if(!+t[i])break t;r=0}}return r>0?t.slice(0,r)+t.slice(e+1):t},b=function(t,e){var n=h(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},T={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return b(100*t,e)},r:b,s:function(t,e){var n=h(t,e);if(!n)return t+"";var i=n[0],r=n[1],a=r-(_=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+h(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},w=function(t){return t},A=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],M=function(t){var e=t.grouping&&t.thousands?function(t,e){return function(n,i){for(var r=n.length,a=[],o=0,s=t[0],u=0;r>0&&s>0&&(u+s+1>i&&(s=Math.max(1,i-u)),a.push(n.substring(r-=s,r+s)),!((u+=s+1)>i));)s=t[o=(o+1)%t.length];return a.reverse().join(e)}}(t.grouping,t.thousands):w,n=t.currency,i=t.decimal,r=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):w,a=t.percent||"%";function newFormat(t){var o=(t=formatSpecifier(t)).fill,s=t.align,u=t.sign,l=t.symbol,c=t.zero,d=t.width,f=t.comma,h=t.precision,g=t.trim,p=t.type;"n"===p?(f=!0,p="g"):T[p]||(null==h&&(h=12),g=!0,p="g"),(c||"0"===o&&"="===s)&&(c=!0,o="0",s="=");var m="$"===l?n[0]:"#"===l&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",x="$"===l?n[1]:/[%p]/.test(p)?a:"",v=T[p],b=/[defgprs%]/.test(p);function format(t){var n,a,l,T=m,w=x;if("c"===p)w=v(t)+w,t="";else{var M=(t=+t)<0;if(t=v(Math.abs(t),h),g&&(t=y(t)),M&&0==+t&&(M=!1),T=(M?"("===u?u:"-":"-"===u||"("===u?"":u)+T,w=("s"===p?A[8+_/3]:"")+w+(M&&"("===u?")":""),b)for(n=-1,a=t.length;++n<a;)if(48>(l=t.charCodeAt(n))||l>57){w=(46===l?i+t.slice(n+1):t.slice(n))+w,t=t.slice(0,n);break}}f&&!c&&(t=e(t,Infinity));var C=T.length+t.length+w.length,S=C<d?new Array(d-C+1).join(o):"";switch(f&&c&&(t=e(S+t,S.length?d-w.length:Infinity),S=""),s){case"<":t=T+t+w+S;break;case"=":t=T+S+t+w;break;case"^":t=S.slice(0,C=S.length>>1)+T+t+w+S.slice(C);break;default:t=S+T+t+w}return r(t)}return h=null==h?6:/[gprs]/.test(p)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),format.toString=function(){return t+""},format}return{format:newFormat,formatPrefix:function formatPrefix(t,e){var n=newFormat(((t=formatSpecifier(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(g(e)/3))),r=Math.pow(10,-i),a=A[8+i/3];return function(t){return n(r*t)+a}}}};!function defaultLocale(t){return m=M(t),x=m.format,v=m.formatPrefix,m}({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var C=function(t,e,n){var r,a=t[0],o=t[t.length-1],s=Object(i.tickStep)(a,o,null==e?10:e);switch((n=formatSpecifier(null==n?",f":n)).type){case"s":var u=Math.max(Math.abs(a),Math.abs(o));return null!=n.precision||isNaN(r=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(g(e)/3)))-g(Math.abs(t)))}(s,u))||(n.precision=r),v(n,u);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(r=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,g(e)-g(t))+1}(s,Math.max(Math.abs(a),Math.abs(o))))||(n.precision=r-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(r=function(t){return Math.max(0,-g(Math.abs(t)))}(s))||(n.precision=r-2*("%"===n.type))}return x(n)};function linearish(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(i.ticks)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){return C(e(),t,n)},t.nice=function(n){null==n&&(n=10);var r,a=e(),o=0,s=a.length-1,u=a[o],l=a[s];return l<u&&(r=u,u=l,l=r,r=o,o=s,s=r),(r=Object(i.tickIncrement)(u,l,n))>0?(u=Math.floor(u/r)*r,l=Math.ceil(l/r)*r,r=Object(i.tickIncrement)(u,l,n)):r<0&&(u=Math.ceil(u*r)/r,l=Math.floor(l*r)/r,r=Object(i.tickIncrement)(u,l,n)),r>0?(a[o]=Math.floor(u/r)*r,a[s]=Math.ceil(l/r)*r,e(a)):r<0&&(a[o]=Math.ceil(u*r)/r,a[s]=Math.floor(l*r)/r,e(a)),t},t}function linear(){var t=continuous(deinterpolateLinear,l.interpolateNumber);return t.copy=function(){return copy(t,linear())},linearish(t)}function identity_identity(){var t=[0,1];function scale(t){return+t}return scale.invert=scale,scale.domain=scale.range=function(e){return arguments.length?(t=o.call(e,d),scale):t.slice()},scale.copy=function(){return identity_identity().domain(t)},linearish(scale)}var S=function(t,e){var n,i=0,r=(t=t.slice()).length-1,a=t[i],o=t[r];return o<a&&(n=i,i=r,r=n,n=a,a=o,o=n),t[i]=e.floor(a),t[r]=e.ceil(o),t};function log_deinterpolate(t,e){return(e=Math.log(e/t))?function(n){return Math.log(n/t)/e}:c(e)}function log_reinterpolate(t,e){return t<0?function(n){return-Math.pow(-e,n)*Math.pow(-t,1-n)}:function(n){return Math.pow(e,n)*Math.pow(t,1-n)}}function pow10(t){return isFinite(t)?+("1e"+t):t<0?0:t}function powp(t){return 10===t?pow10:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}function logp(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}function reflect(t){return function(e){return-t(-e)}}function log(){var t=continuous(log_deinterpolate,log_reinterpolate).domain([1,10]),e=t.domain,n=10,r=logp(10),a=powp(10);function rescale(){return r=logp(n),a=powp(n),e()[0]<0&&(r=reflect(r),a=reflect(a)),t}return t.base=function(t){return arguments.length?(n=+t,rescale()):n},t.domain=function(t){return arguments.length?(e(t),rescale()):e()},t.ticks=function(t){var o,s=e(),u=s[0],l=s[s.length-1];(o=l<u)&&(h=u,u=l,l=h);var c,d,f,h=r(u),g=r(l),p=null==t?10:+t,_=[];if(!(n%1)&&g-h<p){if(h=Math.round(h)-1,g=Math.round(g)+1,u>0){for(;h<g;++h)for(d=1,c=a(h);d<n;++d)if(!((f=c*d)<u)){if(f>l)break;_.push(f)}}else for(;h<g;++h)for(d=n-1,c=a(h);d>=1;--d)if(!((f=c*d)<u)){if(f>l)break;_.push(f)}}else _=Object(i.ticks)(h,g,Math.min(g-h,p)).map(a);return o?_.reverse():_},t.tickFormat=function(e,i){if(null==i&&(i=10===n?".0e":","),"function"!=typeof i&&(i=x(i)),e===Infinity)return i;null==e&&(e=10);var o=Math.max(1,n*e/t.ticks().length);return function(t){var e=t/a(Math.round(r(t)));return e*n<n-.5&&(e*=n),e<=o?i(t):""}},t.nice=function(){return e(S(e(),{floor:function(t){return a(Math.floor(r(t)))},ceil:function(t){return a(Math.ceil(r(t)))}}))},t.copy=function(){return copy(t,log().base(n))},t}function raise(t,e){return t<0?-Math.pow(-t,e):Math.pow(t,e)}function pow(){var t=1,e=continuous(function deinterpolate(e,n){return(n=raise(n,t)-(e=raise(e,t)))?function(i){return(raise(i,t)-e)/n}:c(n)},function reinterpolate(e,n){return n=raise(n,t)-(e=raise(e,t)),function(i){return raise(e+n*i,1/t)}}),n=e.domain;return e.exponent=function(e){return arguments.length?(t=+e,n(n())):t},e.copy=function(){return copy(e,pow().exponent(t))},linearish(e)}function sqrt(){return pow().exponent(.5)}function quantile(){var t=[],e=[],n=[];function rescale(){var r=0,a=Math.max(1,e.length);for(n=new Array(a-1);++r<a;)n[r-1]=Object(i.quantile)(t,r/a);return scale}function scale(t){if(!isNaN(t=+t))return e[Object(i.bisect)(n,t)]}return scale.invertExtent=function(i){var r=e.indexOf(i);return r<0?[NaN,NaN]:[r>0?n[r-1]:t[0],r<n.length?n[r]:t[t.length-1]]},scale.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var n,r=0,a=e.length;r<a;++r)null==(n=e[r])||isNaN(n=+n)||t.push(n);return t.sort(i.ascending),rescale()},scale.range=function(t){return arguments.length?(e=s.call(t),rescale()):e.slice()},scale.quantiles=function(){return n.slice()},scale.copy=function(){return quantile().domain(t).range(e)},scale}function quantize(){var t=0,e=1,n=1,r=[.5],a=[0,1];function scale(t){if(t<=t)return a[Object(i.bisect)(r,t,0,n)]}function rescale(){var i=-1;for(r=new Array(n);++i<n;)r[i]=((i+1)*e-(i-n)*t)/(n+1);return scale}return scale.domain=function(n){return arguments.length?(t=+n[0],e=+n[1],rescale()):[t,e]},scale.range=function(t){return arguments.length?(n=(a=s.call(t)).length-1,rescale()):a.slice()},scale.invertExtent=function(i){var o=a.indexOf(i);return o<0?[NaN,NaN]:o<1?[t,r[0]]:o>=n?[r[n-1],e]:[r[o-1],r[o]]},scale.copy=function(){return quantize().domain([t,e]).range(a)},linearish(scale)}function threshold(){var t=[.5],e=[0,1],n=1;function scale(r){if(r<=r)return e[Object(i.bisect)(t,r,0,n)]}return scale.domain=function(i){return arguments.length?(t=s.call(i),n=Math.min(t.length,e.length-1),scale):t.slice()},scale.range=function(i){return arguments.length?(e=s.call(i),n=Math.min(t.length,e.length-1),scale):e.slice()},scale.invertExtent=function(n){var i=e.indexOf(n);return[t[i-1],t[i]]},scale.copy=function(){return threshold().domain(t).range(e)},scale}var D=n(69),k=n(75),L=1e3,R=60*L,F=60*R,O=24*F,I=7*O,E=30*O,X=365*O;function date(t){return new Date(t)}function time_number(t){return t instanceof Date?+t:+new Date(+t)}function calendar(t,e,n,r,a,s,u,c,d){var f=continuous(deinterpolateLinear,l.interpolateNumber),h=f.invert,g=f.domain,p=d(".%L"),_=d(":%S"),m=d("%I:%M"),x=d("%I %p"),v=d("%a %d"),y=d("%b %d"),b=d("%B"),T=d("%Y"),w=[[u,1,L],[u,5,5*L],[u,15,15*L],[u,30,30*L],[s,1,R],[s,5,5*R],[s,15,15*R],[s,30,30*R],[a,1,F],[a,3,3*F],[a,6,6*F],[a,12,12*F],[r,1,O],[r,2,2*O],[n,1,I],[e,1,E],[e,3,3*E],[t,1,X]];function tickFormat(i){return(u(i)<i?p:s(i)<i?_:a(i)<i?m:r(i)<i?x:e(i)<i?n(i)<i?v:y:t(i)<i?b:T)(i)}function tickInterval(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=Object(i.bisector)(function(t){return t[2]}).right(w,o);s===w.length?(a=Object(i.tickStep)(n/X,r/X,e),e=t):s?(a=(s=w[o/w[s-1][2]<w[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(Object(i.tickStep)(n,r,e),1),e=c)}return null==a?e:e.every(a)}return f.invert=function(t){return new Date(h(t))},f.domain=function(t){return arguments.length?g(o.call(t,time_number)):g().map(date)},f.ticks=function(t,e){var n,i=g(),r=i[0],a=i[i.length-1],o=a<r;return o&&(n=r,r=a,a=n),n=(n=tickInterval(t,r,a,e))?n.range(r,a+1):[],o?n.reverse():n},f.tickFormat=function(t,e){return null==e?tickFormat:d(e)},f.nice=function(t,e){var n=g();return(t=tickInterval(t,n[0],n[n.length-1],e))?g(S(n,t)):f},f.copy=function(){return copy(f,calendar(t,e,n,r,a,s,u,c,d))},f}var z=function(){return calendar(D.timeYear,D.timeMonth,D.timeWeek,D.timeDay,D.timeHour,D.timeMinute,D.timeSecond,D.timeMillisecond,k.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},N=function(){return calendar(D.utcYear,D.utcMonth,D.utcWeek,D.utcDay,D.utcHour,D.utcMinute,D.utcSecond,D.utcMillisecond,k.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])};function sequential(t){var e=0,n=1,i=1,r=!1;function scale(n){var a=(n-e)*i;return t(r?Math.max(0,Math.min(1,a)):a)}return scale.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],i=e===n?0:1/(n-e),scale):[e,n]},scale.clamp=function(t){return arguments.length?(r=!!t,scale):r},scale.interpolator=function(e){return arguments.length?(t=e,scale):t},scale.copy=function(){return sequential(t).domain([e,n]).clamp(r)},linearish(scale)}function diverging(t){var e=0,n=.5,i=1,r=1,a=1,o=!1;function scale(e){var i=.5+((e=+e)-n)*(e<n?r:a);return t(o?Math.max(0,Math.min(1,i)):i)}return scale.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],i=+t[2],r=e===n?0:.5/(n-e),a=n===i?0:.5/(i-n),scale):[e,n,i]},scale.clamp=function(t){return arguments.length?(o=!!t,scale):o},scale.interpolator=function(e){return arguments.length?(t=e,scale):t},scale.copy=function(){return diverging(t).domain([e,n,i]).clamp(o)},linearish(scale)}n.d(e,"scaleBand",function(){return band}),n.d(e,"scalePoint",function(){return point}),n.d(e,"scaleIdentity",function(){return identity_identity}),n.d(e,"scaleLinear",function(){return linear}),n.d(e,"scaleLog",function(){return log}),n.d(e,"scaleOrdinal",function(){return ordinal}),n.d(e,"scaleImplicit",function(){return u}),n.d(e,"scalePow",function(){return pow}),n.d(e,"scaleSqrt",function(){return sqrt}),n.d(e,"scaleQuantile",function(){return quantile}),n.d(e,"scaleQuantize",function(){return quantize}),n.d(e,"scaleThreshold",function(){return threshold}),n.d(e,"scaleTime",function(){return z}),n.d(e,"scaleUtc",function(){return N}),n.d(e,"scaleSequential",function(){return sequential}),n.d(e,"scaleDiverging",function(){return diverging})},function(t,e,n){"use strict";var i=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},r=function(t){return 1===t.length&&(t=function ascendingComparator(t){return function(e,n){return i(t(e),n)}}(t)),{left:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)<0?i=a+1:r=a}return i},right:function(e,n,i,r){for(null==i&&(i=0),null==r&&(r=e.length);i<r;){var a=i+r>>>1;t(e[a],n)>0?r=a:i=a+1}return i}}};var a=r(i),o=a.right,s=a.left,u=o,l=function(t,e){null==e&&(e=pair);for(var n=0,i=t.length-1,r=t[0],a=new Array(i<0?0:i);n<i;)a[n]=e(r,r=t[++n]);return a};function pair(t,e){return[t,e]}var c=function(t,e,n){var i,r,a,o,s=t.length,u=e.length,l=new Array(s*u);for(null==n&&(n=pair),i=a=0;i<s;++i)for(o=t[i],r=0;r<u;++r,++a)l[a]=n(o,e[r]);return l},d=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},f=function(t){return null===t?NaN:+t},h=function(t,e){var n,i,r=t.length,a=0,o=-1,s=0,u=0;if(null==e)for(;++o<r;)isNaN(n=f(t[o]))||(u+=(i=n-s)*(n-(s+=i/++a)));else for(;++o<r;)isNaN(n=f(e(t[o],o,t)))||(u+=(i=n-s)*(n-(s+=i/++a)));if(a>1)return u/(a-1)},g=function(t,e){var n=h(t,e);return n?Math.sqrt(n):n},p=function(t,e){var n,i,r,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(i=r=n;++o<a;)null!=(n=t[o])&&(i>n&&(i=n),r<n&&(r=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(i=r=n;++o<a;)null!=(n=e(t[o],o,t))&&(i>n&&(i=n),r<n&&(r=n));return[i,r]},_=Array.prototype,m=_.slice,x=_.map,v=function(t){return function(){return t}},y=function(t){return t},b=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(r);++i<r;)a[i]=t+i*n;return a},T=Math.sqrt(50),w=Math.sqrt(10),A=Math.sqrt(2),M=function(t,e,n){var i,r,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((i=e<t)&&(r=t,t=e,e=r),0===(o=tickIncrement(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(r=Math.ceil(e-t+1));++s<r;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(r=Math.ceil(t-e+1));++s<r;)a[s]=(t-s)/o;return i&&a.reverse(),a};function tickIncrement(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),a=i/Math.pow(10,r);return r>=0?(a>=T?10:a>=w?5:a>=A?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(a>=T?10:a>=w?5:a>=A?2:1)}function tickStep(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/r;return a>=T?r*=10:a>=w?r*=5:a>=A&&(r*=2),e<t?-r:r}var C=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},S=function(){var t=y,e=p,n=C;function histogram(i){var r,a,o=i.length,s=new Array(o);for(r=0;r<o;++r)s[r]=t(i[r],r,i);var l=e(s),c=l[0],d=l[1],f=n(s,c,d);Array.isArray(f)||(f=tickStep(c,d,f),f=b(Math.ceil(c/f)*f,Math.floor(d/f)*f,f));for(var h=f.length;f[0]<=c;)f.shift(),--h;for(;f[h-1]>d;)f.pop(),--h;var g,p=new Array(h+1);for(r=0;r<=h;++r)(g=p[r]=[]).x0=r>0?f[r-1]:c,g.x1=r<h?f[r]:d;for(r=0;r<o;++r)c<=(a=s[r])&&a<=d&&p[u(f,a,0,h)].push(i[r]);return p}return histogram.value=function(e){return arguments.length?(t="function"==typeof e?e:v(e),histogram):t},histogram.domain=function(t){return arguments.length?(e="function"==typeof t?t:v([t[0],t[1]]),histogram):e},histogram.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?v(m.call(t)):v(t),histogram):n},histogram},D=function(t,e,n){if(null==n&&(n=f),i=t.length){if((e=+e)<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,a=Math.floor(r),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(r-a)}},k=function(t,e,n){return t=x.call(t,f).sort(i),Math.ceil((n-e)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},L=function(t,e,n){return Math.ceil((n-e)/(3.5*g(t)*Math.pow(t.length,-1/3)))},R=function(t,e){var n,i,r=t.length,a=-1;if(null==e){for(;++a<r;)if(null!=(n=t[a])&&n>=n)for(i=n;++a<r;)null!=(n=t[a])&&n>i&&(i=n)}else for(;++a<r;)if(null!=(n=e(t[a],a,t))&&n>=n)for(i=n;++a<r;)null!=(n=e(t[a],a,t))&&n>i&&(i=n);return i},F=function(t,e){var n,i=t.length,r=i,a=-1,o=0;if(null==e)for(;++a<i;)isNaN(n=f(t[a]))?--r:o+=n;else for(;++a<i;)isNaN(n=f(e(t[a],a,t)))?--r:o+=n;if(r)return o/r},O=function(t,e){var n,r=t.length,a=-1,o=[];if(null==e)for(;++a<r;)isNaN(n=f(t[a]))||o.push(n);else for(;++a<r;)isNaN(n=f(e(t[a],a,t)))||o.push(n);return D(o.sort(i),.5)},I=function(t){for(var e,n,i,r=t.length,a=-1,o=0;++a<r;)o+=t[a].length;for(n=new Array(o);--r>=0;)for(e=(i=t[r]).length;--e>=0;)n[--o]=i[e];return n},E=function(t,e){var n,i,r=t.length,a=-1;if(null==e){for(;++a<r;)if(null!=(n=t[a])&&n>=n)for(i=n;++a<r;)null!=(n=t[a])&&i>n&&(i=n)}else for(;++a<r;)if(null!=(n=e(t[a],a,t))&&n>=n)for(i=n;++a<r;)null!=(n=e(t[a],a,t))&&i>n&&(i=n);return i},X=function(t,e){for(var n=e.length,i=new Array(n);n--;)i[n]=t[e[n]];return i},z=function(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a<n;)(e(r=t[a],s)<0||0!==e(s,s))&&(s=r,o=a);return 0===e(s,s)?o:void 0}},N=function(t,e,n){for(var i,r,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)r=Math.random()*a--|0,i=t[a+e],t[a+e]=t[r+e],t[r+e]=i;return t},P=function(t,e){var n,i=t.length,r=-1,a=0;if(null==e)for(;++r<i;)(n=+t[r])&&(a+=n);else for(;++r<i;)(n=+e(t[r],r,t))&&(a+=n);return a},Y=function(t){if(!(r=t.length))return[];for(var e=-1,n=E(t,transpose_length),i=new Array(n);++e<n;)for(var r,a=-1,o=i[e]=new Array(r);++a<r;)o[a]=t[a][e];return i};function transpose_length(t){return t.length}var B=function(){return Y(arguments)};n.d(e,"bisect",function(){return u}),n.d(e,"bisectRight",function(){return o}),n.d(e,"bisectLeft",function(){return s}),n.d(e,"ascending",function(){return i}),n.d(e,"bisector",function(){return r}),n.d(e,"cross",function(){return c}),n.d(e,"descending",function(){return d}),n.d(e,"deviation",function(){return g}),n.d(e,"extent",function(){return p}),n.d(e,"histogram",function(){return S}),n.d(e,"thresholdFreedmanDiaconis",function(){return k}),n.d(e,"thresholdScott",function(){return L}),n.d(e,"thresholdSturges",function(){return C}),n.d(e,"max",function(){return R}),n.d(e,"mean",function(){return F}),n.d(e,"median",function(){return O}),n.d(e,"merge",function(){return I}),n.d(e,"min",function(){return E}),n.d(e,"pairs",function(){return l}),n.d(e,"permute",function(){return X}),n.d(e,"quantile",function(){return D}),n.d(e,"range",function(){return b}),n.d(e,"scan",function(){return z}),n.d(e,"shuffle",function(){return N}),n.d(e,"sum",function(){return P}),n.d(e,"ticks",function(){return M}),n.d(e,"tickIncrement",function(){return tickIncrement}),n.d(e,"tickStep",function(){return tickStep}),n.d(e,"transpose",function(){return Y}),n.d(e,"variance",function(){return h}),n.d(e,"zip",function(){return B})},function(t,e,n){"use strict";var i,r,a=n(64),o=n(78),s=0,u=0,l=0,c=1e3,d=0,f=0,h=0,g="object"==typeof performance&&performance.now?performance:Date,p="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function now(){return f||(p(clearNow),f=g.now()+h)}function clearNow(){f=0}function Timer(){this._call=this._time=this._next=null}function timer(t,e,n){var i=new Timer;return i.restart(t,e,n),i}function wake(){f=(d=g.now())+h,s=u=0;try{!function timerFlush(){now(),++s;for(var t,e=i;e;)(t=f-e._time)>=0&&e._call.call(null,t),e=e._next;--s}()}finally{s=0,function nap(){var t,e,n=i,a=Infinity;for(;n;)n._call?(a>n._time&&(a=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:i=e);r=t,sleep(a)}(),f=0}}function poke(){var t=g.now(),e=t-d;e>c&&(h-=e,d=t)}function sleep(t){s||(u&&(u=clearTimeout(u)),t-f>24?(t<Infinity&&(u=setTimeout(wake,t-g.now()-h)),l&&(l=clearInterval(l))):(l||(d=g.now(),l=setInterval(poke,c)),s=1,p(wake)))}Timer.prototype=timer.prototype={constructor:Timer,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?now():+n)+(null==e?0:+e),this._next||r===this||(r?r._next=this:i=this,r=this),this._call=t,this._time=n,sleep()},stop:function(){this._call&&(this._call=null,this._time=Infinity,sleep())}};var _=function(t,e,n){var i=new Timer;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i},m=Object(o.dispatch)("start","end","interrupt"),x=[],v=0,y=1,b=2,T=3,w=4,A=5,M=6,C=function(t,e,n,i,r,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function create(t,e,n){var i,r=t.__transition;function start(a){var o,s,u,l;if(n.state!==y)return stop();for(o in r)if((l=r[o]).name===n.name){if(l.state===T)return _(start);l.state===w?(l.state=M,l.timer.stop(),l.on.call("interrupt",t,t.__data__,l.index,l.group),delete r[o]):+o<e&&(l.state=M,l.timer.stop(),delete r[o])}if(_(function(){n.state===T&&(n.state=w,n.timer.restart(tick,n.delay,n.time),tick(a))}),n.state=b,n.on.call("start",t,t.__data__,n.index,n.group),n.state===b){for(n.state=T,i=new Array(u=n.tween.length),o=0,s=-1;o<u;++o)(l=n.tween[o].value.call(t,t.__data__,n.index,n.group))&&(i[++s]=l);i.length=s+1}}function tick(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(stop),n.state=A,1),a=-1,o=i.length;++a<o;)i[a].call(null,r);n.state===A&&(n.on.call("end",t,t.__data__,n.index,n.group),stop())}function stop(){for(var i in n.state=M,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=timer(function schedule(t){n.state=y,n.timer.restart(start,n.delay,n.time),n.delay<=t&&start(t-n.delay)},0,n.time)}(t,n,{name:e,index:i,group:r,on:m,tween:x,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:v})};function init(t,e){var n=get(t,e);if(n.state>v)throw new Error("too late; already scheduled");return n}function set(t,e){var n=get(t,e);if(n.state>b)throw new Error("too late; already started");return n}function get(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var S=function(t,e){var n,i,r,a=t.__transition,o=!0;if(a){for(r in e=null==e?null:e+"",a)(n=a[r]).name===e?(i=n.state>b&&n.state<A,n.state=M,n.timer.stop(),i&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete a[r]):o=!1;o&&delete t.__transition}},D=n(68);function tweenValue(t,e,n){var i=t._id;return t.each(function(){var t=set(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return get(t,i).value[e]}}var k=n(73),L=function(t,e){var n;return("number"==typeof e?D.interpolateNumber:e instanceof k.color?D.interpolateRgb:(n=Object(k.color)(e))?(e=n,D.interpolateRgb):D.interpolateString)(t,e)};var R=a.selection.prototype.constructor;var F=0;function Transition(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function src_transition_transition(t){return Object(a.selection)().transition(t)}function newId(){return++F}var O=a.selection.prototype;Transition.prototype=src_transition_transition.prototype={constructor:Transition,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(a.selector)(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var u,l,c=i[s],d=c.length,f=o[s]=new Array(d),h=0;h<d;++h)(u=c[h])&&(l=t.call(u,u.__data__,h,c))&&("__data__"in u&&(l.__data__=u.__data__),f[h]=l,C(f[h],e,n,h,f,get(u,n)));return new Transition(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(a.selectorAll)(t));for(var i=this._groups,r=i.length,o=[],s=[],u=0;u<r;++u)for(var l,c=i[u],d=c.length,f=0;f<d;++f)if(l=c[f]){for(var h,g=t.call(l,l.__data__,f,c),p=get(l,n),_=0,m=g.length;_<m;++_)(h=g[_])&&C(h,e,n,_,g,p);o.push(g),s.push(l)}return new Transition(o,s,e,n)},filter:function(t){"function"!=typeof t&&(t=Object(a.matcher)(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o,s=e[r],u=s.length,l=i[r]=[],c=0;c<u;++c)(o=s[c])&&t.call(o,o.__data__,c,s)&&l.push(o);return new Transition(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,a=Math.min(i,r),o=new Array(i),s=0;s<a;++s)for(var u,l=e[s],c=n[s],d=l.length,f=o[s]=new Array(d),h=0;h<d;++h)(u=l[h]||c[h])&&(f[h]=u);for(;s<i;++s)o[s]=e[s];return new Transition(o,this._parents,this._name,this._id)},selection:function(){return new R(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=newId(),i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var c=get(o,e);C(o,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Transition(i,this._parents,t,n)},call:O.call,nodes:O.nodes,node:O.node,size:O.size,empty:O.empty,each:O.each,on:function(t,e){var n=this._id;return arguments.length<2?get(this.node(),n).on.on(t):this.each(function onFunction(t,e,n){var i,r,a=function on_start(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?init:set;return function(){var o=a(this,t),s=o.on;s!==i&&(r=(i=s).copy()).on(e,n),o.on=r}}(n,t,e))},attr:function(t,e){var n=Object(a.namespace)(t),i="transform"===n?D.interpolateTransformSvg:L;return this.attrTween(t,"function"==typeof e?(n.local?function attrFunctionNS(t,e,n){var i,r,a;return function(){var o,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===s?null:o===i&&s===r?a:a=e(i=o,r=s);this.removeAttributeNS(t.space,t.local)}}:function attrFunction(t,e,n){var i,r,a;return function(){var o,s=n(this);if(null!=s)return(o=this.getAttribute(t))===s?null:o===i&&s===r?a:a=e(i=o,r=s);this.removeAttribute(t)}})(n,i,tweenValue(this,"attr."+t,e)):null==e?(n.local?function attrRemoveNS(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function attrRemove(t){return function(){this.removeAttribute(t)}})(n):(n.local?function attrConstantNS(t,e,n){var i,r;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?r:r=e(i=a,n)}}:function attrConstant(t,e,n){var i,r;return function(){var a=this.getAttribute(t);return a===n?null:a===i?r:r=e(i=a,n)}})(n,i,e+""))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var i=Object(a.namespace)(t);return this.tween(n,(i.local?function attrTweenNS(t,e){function tween(){var n=this,i=e.apply(n,arguments);return i&&function(e){n.setAttributeNS(t.space,t.local,i(e))}}return tween._value=e,tween}:function attrTween(t,e){function tween(){var n=this,i=e.apply(n,arguments);return i&&function(e){n.setAttribute(t,i(e))}}return tween._value=e,tween})(i,e))},style:function(t,e,n){var i="transform"==(t+="")?D.interpolateTransformCss:L;return null==e?this.styleTween(t,function styleRemove(t,e){var n,i,r;return function(){var o=Object(a.style)(this,t),s=(this.style.removeProperty(t),Object(a.style)(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}(t,i)).on("end.style."+t,function styleRemoveEnd(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof e?function styleFunction(t,e,n){var i,r,o;return function(){var s=Object(a.style)(this,t),u=n(this);return null==u&&(this.style.removeProperty(t),u=Object(a.style)(this,t)),s===u?null:s===i&&u===r?o:o=e(i=s,r=u)}}(t,i,tweenValue(this,"style."+t,e)):function styleConstant(t,e,n){var i,r;return function(){var o=Object(a.style)(this,t);return o===n?null:o===i?r:r=e(i=o,n)}}(t,i,e+""),n)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function styleTween(t,e,n){function tween(){var i=this,r=e.apply(i,arguments);return r&&function(e){i.style.setProperty(t,r(e),n)}}return tween._value=e,tween}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function textFunction(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(tweenValue(this,"text",t)):function textConstant(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function removeFunction(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=get(this.node(),n).tween,a=0,o=r.length;a<o;++a)if((i=r[a]).name===t)return i.value;return null}return this.each((null==e?function tweenRemove(t,e){var n,i;return function(){var r=set(this,t),a=r.tween;if(a!==n)for(var o=0,s=(i=n=a).length;o<s;++o)if(i[o].name===e){(i=i.slice()).splice(o,1);break}r.tween=i}}:function tweenFunction(t,e,n){var i,r;if("function"!=typeof n)throw new Error;return function(){var a=set(this,t),o=a.tween;if(o!==i){r=(i=o).slice();for(var s={name:e,value:n},u=0,l=r.length;u<l;++u)if(r[u].name===e){r[u]=s;break}u===l&&r.push(s)}a.tween=r}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function delayFunction(t,e){return function(){init(this,t).delay=+e.apply(this,arguments)}}:function delayConstant(t,e){return e=+e,function(){init(this,t).delay=e}})(e,t)):get(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function durationFunction(t,e){return function(){set(this,t).duration=+e.apply(this,arguments)}}:function durationConstant(t,e){return e=+e,function(){set(this,t).duration=e}})(e,t)):get(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function easeConstant(t,e){if("function"!=typeof e)throw new Error;return function(){set(this,t).ease=e}}(e,t)):get(this.node(),e).ease}};var I={time:null,delay:0,duration:250,ease:n(70).easeCubicInOut};function transition_inherit(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return I.time=now(),I;return n}a.selection.prototype.interrupt=function(t){return this.each(function(){S(this,t)})},a.selection.prototype.transition=function(t){var e,n;t instanceof Transition?(e=t._id,t=t._name):(e=newId(),(n=I).time=now(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,a=0;a<r;++a)for(var o,s=i[a],u=s.length,l=0;l<u;++l)(o=s[l])&&C(o,t,e,l,s,n||transition_inherit(o,e));return new Transition(i,this._parents,t,e)};var E=[null],X=function(t,e){var n,i,r=t.__transition;if(r)for(i in e=null==e?null:e+"",r)if((n=r[i]).state>y&&n.name===e)return new Transition([[t]],E,e,+i);return null};n.d(e,"transition",function(){return src_transition_transition}),n.d(e,"active",function(){return X}),n.d(e,"interrupt",function(){return S})},function(t,e,n){"use strict";var i=n(73);function basis(t,e,n,i,r){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*i+o*r)/6}var r=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),r=t[i],a=t[i+1],o=i>0?t[i-1]:2*r-a,s=i<e-1?t[i+2]:2*a-r;return basis((n-i/e)*e,o,r,a,s)}},a=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],a=t[i%e],o=t[(i+1)%e],s=t[(i+2)%e];return basis((n-i/e)*e,r,a,o,s)}},o=function(t){return function(){return t}};function linear(t,e){return function(n){return t+n*e}}function color_hue(t,e){var n=e-t;return n?linear(t,n>180||n<-180?n-360*Math.round(n/360):n):o(isNaN(t)?e:t)}function gamma(t){return 1==(t=+t)?nogamma:function(e,n){return n-e?function exponential(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):o(isNaN(e)?n:e)}}function nogamma(t,e){var n=e-t;return n?linear(t,n):o(isNaN(t)?e:t)}var s=function rgbGamma(t){var e=gamma(t);function rgb(t,n){var r=e((t=Object(i.rgb)(t)).r,(n=Object(i.rgb)(n)).r),a=e(t.g,n.g),o=e(t.b,n.b),s=nogamma(t.opacity,n.opacity);return function(e){return t.r=r(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+""}}return rgb.gamma=rgbGamma,rgb}(1);function rgbSpline(t){return function(e){var n,r,a=e.length,o=new Array(a),s=new Array(a),u=new Array(a);for(n=0;n<a;++n)r=Object(i.rgb)(e[n]),o[n]=r.r||0,s[n]=r.g||0,u[n]=r.b||0;return o=t(o),s=t(s),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=s(t),r.b=u(t),r+""}}}var u=rgbSpline(r),l=rgbSpline(a),c=function(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,a=new Array(r),o=new Array(i);for(n=0;n<r;++n)a[n]=b(t[n],e[n]);for(;n<i;++n)o[n]=e[n];return function(t){for(n=0;n<r;++n)o[n]=a[n](t);return o}},d=function(t,e){var n=new Date;return e-=t=+t,function(i){return n.setTime(t+e*i),n}},f=function(t,e){return e-=t=+t,function(n){return t+e*n}},h=function(t,e){var n,i={},r={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=b(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}},g=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,p=new RegExp(g.source,"g");var _,m,x,v,y=function(t,e){var n,i,r,a=g.lastIndex=p.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=g.exec(t))&&(i=p.exec(e));)(r=i.index)>a&&(r=e.slice(a,r),s[o]?s[o]+=r:s[++o]=r),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:f(n,i)})),a=p.lastIndex;return a<e.length&&(r=e.slice(a),s[o]?s[o]+=r:s[++o]=r),s.length<2?u[0]?function one(t){return function(e){return t(e)+""}}(u[0].x):function zero(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,i=0;i<e;++i)s[(n=u[i]).i]=n.x(t);return s.join("")})},b=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?o(e):("number"===r?f:"string"===r?(n=Object(i.color)(e))?(e=n,s):y:e instanceof i.color?s:e instanceof Date?d:Array.isArray(e)?c:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?h:f)(t,e)},T=function(t,e){return e-=t=+t,function(n){return Math.round(t+e*n)}},w=180/Math.PI,A={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},M=function(t,e,n,i,r,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*i)&&(n-=t*u,i-=e*u),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,u/=s),t*i<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:r,translateY:a,rotate:Math.atan2(e,t)*w,skewX:Math.atan(u)*w,scaleX:o,scaleY:s}};function interpolateTransform(t,e,n,i){function pop(t){return t.length?t.pop()+" ":""}return function(r,a){var o=[],s=[];return r=t(r),a=t(a),function translate(t,i,r,a,o,s){if(t!==r||i!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:f(t,r)},{i:u-2,x:f(i,a)})}else(r||a)&&o.push("translate("+r+e+a+n)}(r.translateX,r.translateY,a.translateX,a.translateY,o,s),function rotate(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(pop(n)+"rotate(",null,i)-2,x:f(t,e)})):e&&n.push(pop(n)+"rotate("+e+i)}(r.rotate,a.rotate,o,s),function skewX(t,e,n,r){t!==e?r.push({i:n.push(pop(n)+"skewX(",null,i)-2,x:f(t,e)}):e&&n.push(pop(n)+"skewX("+e+i)}(r.skewX,a.skewX,o,s),function scale(t,e,n,i,r,a){if(t!==n||e!==i){var o=r.push(pop(r)+"scale(",null,",",null,")");a.push({i:o-4,x:f(t,n)},{i:o-2,x:f(e,i)})}else 1===n&&1===i||r.push(pop(r)+"scale("+n+","+i+")")}(r.scaleX,r.scaleY,a.scaleX,a.scaleY,o,s),r=a=null,function(t){for(var e,n=-1,i=s.length;++n<i;)o[(e=s[n]).i]=e.x(t);return o.join("")}}}var C=interpolateTransform(function parseCss(t){return"none"===t?A:(_||(_=document.createElement("DIV"),m=document.documentElement,x=document.defaultView),_.style.transform=t,t=x.getComputedStyle(m.appendChild(_),null).getPropertyValue("transform"),m.removeChild(_),t=t.slice(7,-1).split(","),M(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),S=interpolateTransform(function parseSvg(t){return null==t?A:(v||(v=document.createElementNS("http://www.w3.org/2000/svg","g")),v.setAttribute("transform",t),(t=v.transform.baseVal.consolidate())?(t=t.matrix,M(t.a,t.b,t.c,t.d,t.e,t.f)):A)},", ",")",")"),D=Math.SQRT2;function cosh(t){return((t=Math.exp(t))+1/t)/2}var k=function(t,e){var n,i,r=t[0],a=t[1],o=t[2],s=e[0],u=e[1],l=e[2],c=s-r,d=u-a,f=c*c+d*d;if(f<1e-12)i=Math.log(l/o)/D,n=function(t){return[r+t*c,a+t*d,o*Math.exp(D*t*i)]};else{var h=Math.sqrt(f),g=(l*l-o*o+4*f)/(2*o*2*h),p=(l*l-o*o-4*f)/(2*l*2*h),_=Math.log(Math.sqrt(g*g+1)-g),m=Math.log(Math.sqrt(p*p+1)-p);i=(m-_)/D,n=function(t){var e=t*i,n=cosh(_),s=o/(2*h)*(n*function tanh(t){return((t=Math.exp(2*t))-1)/(t+1)}(D*e+_)-function sinh(t){return((t=Math.exp(t))-1/t)/2}(_));return[r+s*c,a+s*d,o*n/cosh(D*e+_)]}}return n.duration=1e3*i,n};function hsl(t){return function(e,n){var r=t((e=Object(i.hsl)(e)).h,(n=Object(i.hsl)(n)).h),a=nogamma(e.s,n.s),o=nogamma(e.l,n.l),s=nogamma(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=a(t),e.l=o(t),e.opacity=s(t),e+""}}}var L=hsl(color_hue),R=hsl(nogamma);function lab(t,e){var n=nogamma((t=Object(i.lab)(t)).l,(e=Object(i.lab)(e)).l),r=nogamma(t.a,e.a),a=nogamma(t.b,e.b),o=nogamma(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=a(e),t.opacity=o(e),t+""}}function hcl(t){return function(e,n){var r=t((e=Object(i.hcl)(e)).h,(n=Object(i.hcl)(n)).h),a=nogamma(e.c,n.c),o=nogamma(e.l,n.l),s=nogamma(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=a(t),e.l=o(t),e.opacity=s(t),e+""}}}var F=hcl(color_hue),O=hcl(nogamma);function cubehelix_cubehelix(t){return function cubehelixGamma(e){function cubehelix(n,r){var a=t((n=Object(i.cubehelix)(n)).h,(r=Object(i.cubehelix)(r)).h),o=nogamma(n.s,r.s),s=nogamma(n.l,r.l),u=nogamma(n.opacity,r.opacity);return function(t){return n.h=a(t),n.s=o(t),n.l=s(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,cubehelix.gamma=cubehelixGamma,cubehelix}(1)}var I=cubehelix_cubehelix(color_hue),E=cubehelix_cubehelix(nogamma);function piecewise(t,e){for(var n=0,i=e.length-1,r=e[0],a=new Array(i<0?0:i);n<i;)a[n]=t(r,r=e[++n]);return function(t){var e=Math.max(0,Math.min(i-1,Math.floor(t*=i)));return a[e](t-e)}}var X=function(t,e){for(var n=new Array(e),i=0;i<e;++i)n[i]=t(i/(e-1));return n};n.d(e,"interpolate",function(){return b}),n.d(e,"interpolateArray",function(){return c}),n.d(e,"interpolateBasis",function(){return r}),n.d(e,"interpolateBasisClosed",function(){return a}),n.d(e,"interpolateDate",function(){return d}),n.d(e,"interpolateNumber",function(){return f}),n.d(e,"interpolateObject",function(){return h}),n.d(e,"interpolateRound",function(){return T}),n.d(e,"interpolateString",function(){return y}),n.d(e,"interpolateTransformCss",function(){return C}),n.d(e,"interpolateTransformSvg",function(){return S}),n.d(e,"interpolateZoom",function(){return k}),n.d(e,"interpolateRgb",function(){return s}),n.d(e,"interpolateRgbBasis",function(){return u}),n.d(e,"interpolateRgbBasisClosed",function(){return l}),n.d(e,"interpolateHsl",function(){return L}),n.d(e,"interpolateHslLong",function(){return R}),n.d(e,"interpolateLab",function(){return lab}),n.d(e,"interpolateHcl",function(){return F}),n.d(e,"interpolateHclLong",function(){return O}),n.d(e,"interpolateCubehelix",function(){return I}),n.d(e,"interpolateCubehelixLong",function(){return E}),n.d(e,"piecewise",function(){return piecewise}),n.d(e,"quantize",function(){return X})},function(t,e,n){"use strict";var i=new Date,r=new Date;function newInterval(t,e,n,a){function interval(e){return t(e=new Date(+e)),e}return interval.floor=interval,interval.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},interval.round=function(t){var e=interval(t),n=interval.ceil(t);return t-e<n-t?e:n},interval.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},interval.range=function(n,i,r){var a,o=[];if(n=interval.ceil(n),r=null==r?1:Math.floor(r),!(n<i&&r>0))return o;do{o.push(a=new Date(+n)),e(n,r),t(n)}while(a<n&&n<i);return o},interval.filter=function(n){return newInterval(function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})},n&&(interval.count=function(e,a){return i.setTime(+e),r.setTime(+a),t(i),t(r),Math.floor(n(i,r))},interval.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?interval.filter(a?function(e){return a(e)%t==0}:function(e){return interval.count(0,e)%t==0}):interval:null}),interval}var a=newInterval(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?newInterval(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):a:null};var o=a,s=a.range,u=6e4,l=6048e5,c=newInterval(function(t){t.setTime(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(+t+1e3*e)},function(t,e){return(e-t)/1e3},function(t){return t.getUTCSeconds()}),d=c,f=c.range,h=newInterval(function(t){t.setTime(Math.floor(t/u)*u)},function(t,e){t.setTime(+t+e*u)},function(t,e){return(e-t)/u},function(t){return t.getMinutes()}),g=h,p=h.range,_=newInterval(function(t){var e=t.getTimezoneOffset()*u%36e5;e<0&&(e+=36e5),t.setTime(36e5*Math.floor((+t-e)/36e5)+e)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getHours()}),m=_,x=_.range,v=newInterval(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/864e5},function(t){return t.getDate()-1}),y=v,b=v.range;function weekday(t){return newInterval(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/l})}var T=weekday(0),w=weekday(1),A=weekday(2),M=weekday(3),C=weekday(4),S=weekday(5),D=weekday(6),k=T.range,L=w.range,R=A.range,F=M.range,O=C.range,I=S.range,E=D.range,X=newInterval(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),z=X,N=X.range,P=newInterval(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?newInterval(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var Y=P,B=P.range,q=newInterval(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*u)},function(t,e){return(e-t)/u},function(t){return t.getUTCMinutes()}),V=q,j=q.range,U=newInterval(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+36e5*e)},function(t,e){return(e-t)/36e5},function(t){return t.getUTCHours()}),H=U,W=U.range,G=newInterval(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/864e5},function(t){return t.getUTCDate()-1}),Z=G,$=G.range;function utcWeekday(t){return newInterval(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/l})}var K=utcWeekday(0),J=utcWeekday(1),Q=utcWeekday(2),tt=utcWeekday(3),et=utcWeekday(4),nt=utcWeekday(5),it=utcWeekday(6),rt=K.range,at=J.range,ot=Q.range,st=tt.range,ut=et.range,lt=nt.range,ct=it.range,dt=newInterval(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),ft=dt,ht=dt.range,gt=newInterval(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});gt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?newInterval(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var pt=gt,_t=gt.range;n.d(e,"timeInterval",function(){return newInterval}),n.d(e,"timeMillisecond",function(){return o}),n.d(e,"timeMilliseconds",function(){return s}),n.d(e,"utcMillisecond",function(){return o}),n.d(e,"utcMilliseconds",function(){return s}),n.d(e,"timeSecond",function(){return d}),n.d(e,"timeSeconds",function(){return f}),n.d(e,"utcSecond",function(){return d}),n.d(e,"utcSeconds",function(){return f}),n.d(e,"timeMinute",function(){return g}),n.d(e,"timeMinutes",function(){return p}),n.d(e,"timeHour",function(){return m}),n.d(e,"timeHours",function(){return x}),n.d(e,"timeDay",function(){return y}),n.d(e,"timeDays",function(){return b}),n.d(e,"timeWeek",function(){return T}),n.d(e,"timeWeeks",function(){return k}),n.d(e,"timeSunday",function(){return T}),n.d(e,"timeSundays",function(){return k}),n.d(e,"timeMonday",function(){return w}),n.d(e,"timeMondays",function(){return L}),n.d(e,"timeTuesday",function(){return A}),n.d(e,"timeTuesdays",function(){return R}),n.d(e,"timeWednesday",function(){return M}),n.d(e,"timeWednesdays",function(){return F}),n.d(e,"timeThursday",function(){return C}),n.d(e,"timeThursdays",function(){return O}),n.d(e,"timeFriday",function(){return S}),n.d(e,"timeFridays",function(){return I}),n.d(e,"timeSaturday",function(){return D}),n.d(e,"timeSaturdays",function(){return E}),n.d(e,"timeMonth",function(){return z}),n.d(e,"timeMonths",function(){return N}),n.d(e,"timeYear",function(){return Y}),n.d(e,"timeYears",function(){return B}),n.d(e,"utcMinute",function(){return V}),n.d(e,"utcMinutes",function(){return j}),n.d(e,"utcHour",function(){return H}),n.d(e,"utcHours",function(){return W}),n.d(e,"utcDay",function(){return Z}),n.d(e,"utcDays",function(){return $}),n.d(e,"utcWeek",function(){return K}),n.d(e,"utcWeeks",function(){return rt}),n.d(e,"utcSunday",function(){return K}),n.d(e,"utcSundays",function(){return rt}),n.d(e,"utcMonday",function(){return J}),n.d(e,"utcMondays",function(){return at}),n.d(e,"utcTuesday",function(){return Q}),n.d(e,"utcTuesdays",function(){return ot}),n.d(e,"utcWednesday",function(){return tt}),n.d(e,"utcWednesdays",function(){return st}),n.d(e,"utcThursday",function(){return et}),n.d(e,"utcThursdays",function(){return ut}),n.d(e,"utcFriday",function(){return nt}),n.d(e,"utcFridays",function(){return lt}),n.d(e,"utcSaturday",function(){return it}),n.d(e,"utcSaturdays",function(){return ct}),n.d(e,"utcMonth",function(){return ft}),n.d(e,"utcMonths",function(){return ht}),n.d(e,"utcYear",function(){return pt}),n.d(e,"utcYears",function(){return _t})},function(t,e,n){"use strict";function linear(t){return+t}function quadIn(t){return t*t}function quadOut(t){return t*(2-t)}function quadInOut(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function cubicIn(t){return t*t*t}function cubicOut(t){return--t*t*t+1}function cubicInOut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var i=function custom(t){function polyIn(e){return Math.pow(e,t)}return t=+t,polyIn.exponent=custom,polyIn}(3),r=function custom(t){function polyOut(e){return 1-Math.pow(1-e,t)}return t=+t,polyOut.exponent=custom,polyOut}(3),a=function custom(t){function polyInOut(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,polyInOut.exponent=custom,polyInOut}(3),o=Math.PI,s=o/2;function sinIn(t){return 1-Math.cos(t*s)}function sinOut(t){return Math.sin(t*s)}function sinInOut(t){return(1-Math.cos(o*t))/2}function expIn(t){return Math.pow(2,10*t-10)}function expOut(t){return 1-Math.pow(2,-10*t)}function expInOut(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function circleIn(t){return 1-Math.sqrt(1-t*t)}function circleOut(t){return Math.sqrt(1- --t*t)}function circleInOut(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var u=4/11,l=6/11,c=8/11,d=.75,f=9/11,h=10/11,g=.9375,p=21/22,_=63/64,m=1/u/u;function bounceIn(t){return 1-bounceOut(1-t)}function bounceOut(t){return(t=+t)<u?m*t*t:t<c?m*(t-=l)*t+d:t<h?m*(t-=f)*t+g:m*(t-=p)*t+_}function bounceInOut(t){return((t*=2)<=1?1-bounceOut(1-t):bounceOut(t-1)+1)/2}var x=function custom(t){function backIn(e){return e*e*((t+1)*e-t)}return t=+t,backIn.overshoot=custom,backIn}(1.70158),v=function custom(t){function backOut(e){return--e*e*((t+1)*e+t)+1}return t=+t,backOut.overshoot=custom,backOut}(1.70158),y=function custom(t){function backInOut(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return t=+t,backInOut.overshoot=custom,backInOut}(1.70158),b=2*Math.PI,T=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=b);function elasticIn(i){return t*Math.pow(2,10*--i)*Math.sin((n-i)/e)}return elasticIn.amplitude=function(t){return custom(t,e*b)},elasticIn.period=function(e){return custom(t,e)},elasticIn}(1,.3),w=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=b);function elasticOut(i){return 1-t*Math.pow(2,-10*(i=+i))*Math.sin((i+n)/e)}return elasticOut.amplitude=function(t){return custom(t,e*b)},elasticOut.period=function(e){return custom(t,e)},elasticOut}(1,.3),A=function custom(t,e){var n=Math.asin(1/(t=Math.max(1,t)))*(e/=b);function elasticInOut(i){return((i=2*i-1)<0?t*Math.pow(2,10*i)*Math.sin((n-i)/e):2-t*Math.pow(2,-10*i)*Math.sin((n+i)/e))/2}return elasticInOut.amplitude=function(t){return custom(t,e*b)},elasticInOut.period=function(e){return custom(t,e)},elasticInOut}(1,.3);n.d(e,"easeLinear",function(){return linear}),n.d(e,"easeQuad",function(){return quadInOut}),n.d(e,"easeQuadIn",function(){return quadIn}),n.d(e,"easeQuadOut",function(){return quadOut}),n.d(e,"easeQuadInOut",function(){return quadInOut}),n.d(e,"easeCubic",function(){return cubicInOut}),n.d(e,"easeCubicIn",function(){return cubicIn}),n.d(e,"easeCubicOut",function(){return cubicOut}),n.d(e,"easeCubicInOut",function(){return cubicInOut}),n.d(e,"easePoly",function(){return a}),n.d(e,"easePolyIn",function(){return i}),n.d(e,"easePolyOut",function(){return r}),n.d(e,"easePolyInOut",function(){return a}),n.d(e,"easeSin",function(){return sinInOut}),n.d(e,"easeSinIn",function(){return sinIn}),n.d(e,"easeSinOut",function(){return sinOut}),n.d(e,"easeSinInOut",function(){return sinInOut}),n.d(e,"easeExp",function(){return expInOut}),n.d(e,"easeExpIn",function(){return expIn}),n.d(e,"easeExpOut",function(){return expOut}),n.d(e,"easeExpInOut",function(){return expInOut}),n.d(e,"easeCircle",function(){return circleInOut}),n.d(e,"easeCircleIn",function(){return circleIn}),n.d(e,"easeCircleOut",function(){return circleOut}),n.d(e,"easeCircleInOut",function(){return circleInOut}),n.d(e,"easeBounce",function(){return bounceOut}),n.d(e,"easeBounceIn",function(){return bounceIn}),n.d(e,"easeBounceOut",function(){return bounceOut}),n.d(e,"easeBounceInOut",function(){return bounceInOut}),n.d(e,"easeBack",function(){return y}),n.d(e,"easeBackIn",function(){return x}),n.d(e,"easeBackOut",function(){return v}),n.d(e,"easeBackInOut",function(){return y}),n.d(e,"easeElastic",function(){return w}),n.d(e,"easeElasticIn",function(){return T}),n.d(e,"easeElasticOut",function(){return w}),n.d(e,"easeElasticInOut",function(){return A})},function(t,e,n){"use strict";function Map(){}function map(t,e){var n=new Map;if(t instanceof Map)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var i,r=-1,a=t.length;if(null==e)for(;++r<a;)n.set(r,t[r]);else for(;++r<a;)n.set(e(i=t[r],r,t),i)}else if(t)for(var o in t)n.set(o,t[o]);return n}Map.prototype=map.prototype={constructor:Map,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var i=map,r=function(){var t,e,n,r=[],a=[];function apply(n,a,o,s){if(a>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,l,c,d=-1,f=n.length,h=r[a++],g=i(),p=o();++d<f;)(c=g.get(u=h(l=n[d])+""))?c.push(l):g.set(u,[l]);return g.each(function(t,e){s(p,e,apply(t,a,o,s))}),p}return n={object:function(t){return apply(t,0,createObject,setObject)},map:function(t){return apply(t,0,createMap,setMap)},entries:function(t){return function entries(t,n){if(++n>r.length)return t;var i,o=a[n-1];return null!=e&&n>=r.length?i=t.entries():(i=[],t.each(function(t,e){i.push({key:e,values:entries(t,n)})})),null!=o?i.sort(function(t,e){return o(t.key,e.key)}):i}(apply(t,0,createMap,setMap),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return a[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function createObject(){return{}}function setObject(t,e,n){t[e]=n}function createMap(){return i()}function setMap(t,e,n){t.set(e,n)}function Set(){}var a=i.prototype;function set(t,e){var n=new Set;if(t instanceof Set)t.each(function(t){n.add(t)});else if(t){var i=-1,r=t.length;if(null==e)for(;++i<r;)n.add(t[i]);else for(;++i<r;)n.add(e(t[i],i,t))}return n}Set.prototype=set.prototype={constructor:Set,has:a.has,add:function(t){return this["$"+(t+="")]=t,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each};var o=set,s=function(t){var e=[];for(var n in t)e.push(n);return e},u=function(t){var e=[];for(var n in t)e.push(t[n]);return e},l=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e};n.d(e,"nest",function(){return r}),n.d(e,"set",function(){return o}),n.d(e,"map",function(){return i}),n.d(e,"keys",function(){return s}),n.d(e,"values",function(){return u}),n.d(e,"entries",function(){return l})},function(t,e,n){"use strict";var i=n(78),r=n(64);function nopropagation(){r.event.stopImmediatePropagation()}var a=function(){r.event.preventDefault(),r.event.stopImmediatePropagation()},o=function(t){var e=t.document.documentElement,n=Object(r.select)(t).on("dragstart.drag",a,!0);"onselectstart"in e?n.on("selectstart.drag",a,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function yesdrag(t,e){var n=t.document.documentElement,i=Object(r.select)(t).on("dragstart.drag",null);e&&(i.on("click.drag",a,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var s=function(t){return function(){return t}};function DragEvent(t,e,n,i,r,a,o,s,u,l){this.target=t,this.type=e,this.subject=n,this.identifier=i,this.active=r,this.x=a,this.y=o,this.dx=s,this.dy=u,this._=l}function defaultFilter(){return!r.event.button}function defaultContainer(){return this.parentNode}function defaultSubject(t){return null==t?{x:r.event.x,y:r.event.y}:t}function defaultTouchable(){return"ontouchstart"in this}DragEvent.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var u=function(){var t,e,n,u,l=defaultFilter,c=defaultContainer,d=defaultSubject,f=defaultTouchable,h={},g=Object(i.dispatch)("start","drag","end"),p=0,_=0;function drag(t){t.on("mousedown.drag",mousedowned).filter(f).on("touchstart.drag",touchstarted).on("touchmove.drag",touchmoved).on("touchend.drag touchcancel.drag",touchended).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function mousedowned(){if(!u&&l.apply(this,arguments)){var i=beforestart("mouse",c.apply(this,arguments),r.mouse,this,arguments);i&&(Object(r.select)(r.event.view).on("mousemove.drag",mousemoved,!0).on("mouseup.drag",mouseupped,!0),o(r.event.view),nopropagation(),n=!1,t=r.event.clientX,e=r.event.clientY,i("start"))}}function mousemoved(){if(a(),!n){var i=r.event.clientX-t,o=r.event.clientY-e;n=i*i+o*o>_}h.mouse("drag")}function mouseupped(){Object(r.select)(r.event.view).on("mousemove.drag mouseup.drag",null),yesdrag(r.event.view,n),a(),h.mouse("end")}function touchstarted(){if(l.apply(this,arguments)){var t,e,n=r.event.changedTouches,i=c.apply(this,arguments),a=n.length;for(t=0;t<a;++t)(e=beforestart(n[t].identifier,i,r.touch,this,arguments))&&(nopropagation(),e("start"))}}function touchmoved(){var t,e,n=r.event.changedTouches,i=n.length;for(t=0;t<i;++t)(e=h[n[t].identifier])&&(a(),e("drag"))}function touchended(){var t,e,n=r.event.changedTouches,i=n.length;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),t=0;t<i;++t)(e=h[n[t].identifier])&&(nopropagation(),e("end"))}function beforestart(t,e,n,i,a){var o,s,u,l=n(e,t),c=g.copy();if(Object(r.customEvent)(new DragEvent(drag,"beforestart",o,t,p,l[0],l[1],0,0,c),function(){return null!=(r.event.subject=o=d.apply(i,a))&&(s=o.x-l[0]||0,u=o.y-l[1]||0,!0)}))return function gesture(d){var f,g=l;switch(d){case"start":h[t]=gesture,f=p++;break;case"end":delete h[t],--p;case"drag":l=n(e,t),f=p}Object(r.customEvent)(new DragEvent(drag,d,o,t,f,l[0]+s,l[1]+u,l[0]-g[0],l[1]-g[1],c),c.apply,c,[d,i,a])}}return drag.filter=function(t){return arguments.length?(l="function"==typeof t?t:s(!!t),drag):l},drag.container=function(t){return arguments.length?(c="function"==typeof t?t:s(t),drag):c},drag.subject=function(t){return arguments.length?(d="function"==typeof t?t:s(t),drag):d},drag.touchable=function(t){return arguments.length?(f="function"==typeof t?t:s(!!t),drag):f},drag.on=function(){var t=g.on.apply(g,arguments);return t===g?drag:t},drag.clickDistance=function(t){return arguments.length?(_=(t=+t)*t,drag):Math.sqrt(_)},drag};n.d(e,"drag",function(){return u}),n.d(e,"dragDisable",function(){return o}),n.d(e,"dragEnable",function(){return yesdrag})},function(t,e,n){"use strict";var i=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function extend(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Color(){}var r="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3})$/,u=/^#([0-9a-f]{6})$/,l=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),c=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),d=new RegExp("^rgba\\("+[r,r,r,a]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,a]+"\\)$"),h=new RegExp("^hsl\\("+[a,o,o]+"\\)$"),g=new RegExp("^hsla\\("+[a,o,o,a]+"\\)$"),p={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function color(t){var e;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?new Rgb((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=u.exec(t))?rgbn(parseInt(e[1],16)):(e=l.exec(t))?new Rgb(e[1],e[2],e[3],1):(e=c.exec(t))?new Rgb(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=d.exec(t))?rgba(e[1],e[2],e[3],e[4]):(e=f.exec(t))?rgba(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?hsla(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?hsla(e[1],e[2]/100,e[3]/100,e[4]):p.hasOwnProperty(t)?rgbn(p[t]):"transparent"===t?new Rgb(NaN,NaN,NaN,0):null}function rgbn(t){return new Rgb(t>>16&255,t>>8&255,255&t,1)}function rgba(t,e,n,i){return i<=0&&(t=e=n=NaN),new Rgb(t,e,n,i)}function rgbConvert(t){return t instanceof Color||(t=color(t)),t?new Rgb((t=t.rgb()).r,t.g,t.b,t.opacity):new Rgb}function rgb(t,e,n,i){return 1===arguments.length?rgbConvert(t):new Rgb(t,e,n,null==i?1:i)}function Rgb(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function hex(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hsla(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Hsl(t,e,n,i)}function hsl(t,e,n,i){return 1===arguments.length?function hslConvert(t){if(t instanceof Hsl)return new Hsl(t.h,t.s,t.l,t.opacity);if(t instanceof Color||(t=color(t)),!t)return new Hsl;if(t instanceof Hsl)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),a=Math.max(e,n,i),o=NaN,s=a-r,u=(a+r)/2;return s?(o=e===a?(n-i)/s+6*(n<i):n===a?(i-e)/s+2:(e-n)/s+4,s/=u<.5?a+r:2-a-r,o*=60):s=u>0&&u<1?0:o,new Hsl(o,s,u,t.opacity)}(t):new Hsl(t,e,n,null==i?1:i)}function Hsl(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function hsl2rgb(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}i(Color,color,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),i(Rgb,rgb,extend(Color,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rgb(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+hex(this.r)+hex(this.g)+hex(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),i(Hsl,hsl,extend(Color,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hsl(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Rgb(hsl2rgb(t>=240?t-240:t+120,r,i),hsl2rgb(t,r,i),hsl2rgb(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var _=Math.PI/180,m=180/Math.PI,x=.96422,v=1,y=.82521,b=4/29,T=6/29,w=3*T*T,A=T*T*T;function labConvert(t){if(t instanceof Lab)return new Lab(t.l,t.a,t.b,t.opacity);if(t instanceof Hcl){if(isNaN(t.h))return new Lab(t.l,0,0,t.opacity);var e=t.h*_;return new Lab(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof Rgb||(t=rgbConvert(t));var n,i,r=rgb2lrgb(t.r),a=rgb2lrgb(t.g),o=rgb2lrgb(t.b),s=xyz2lab((.2225045*r+.7168786*a+.0606169*o)/v);return r===a&&a===o?n=i=s:(n=xyz2lab((.4360747*r+.3850649*a+.1430804*o)/x),i=xyz2lab((.0139322*r+.0971045*a+.7141733*o)/y)),new Lab(116*s-16,500*(n-s),200*(s-i),t.opacity)}function gray(t,e){return new Lab(t,0,0,null==e?1:e)}function lab(t,e,n,i){return 1===arguments.length?labConvert(t):new Lab(t,e,n,null==i?1:i)}function Lab(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function xyz2lab(t){return t>A?Math.pow(t,1/3):t/w+b}function lab2xyz(t){return t>T?t*t*t:w*(t-b)}function lrgb2rgb(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function rgb2lrgb(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function hclConvert(t){if(t instanceof Hcl)return new Hcl(t.h,t.c,t.l,t.opacity);if(t instanceof Lab||(t=labConvert(t)),0===t.a&&0===t.b)return new Hcl(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*m;return new Hcl(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function lch(t,e,n,i){return 1===arguments.length?hclConvert(t):new Hcl(n,e,t,null==i?1:i)}function hcl(t,e,n,i){return 1===arguments.length?hclConvert(t):new Hcl(t,e,n,null==i?1:i)}function Hcl(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}i(Lab,lab,extend(Color,{brighter:function(t){return new Lab(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Lab(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Rgb(lrgb2rgb(3.1338561*(e=x*lab2xyz(e))-1.6168667*(t=v*lab2xyz(t))-.4906146*(n=y*lab2xyz(n))),lrgb2rgb(-.9787684*e+1.9161415*t+.033454*n),lrgb2rgb(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),i(Hcl,hcl,extend(Color,{brighter:function(t){return new Hcl(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Hcl(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return labConvert(this).rgb()}}));var M=-.14861,C=1.78277,S=-.29227,D=-.90649,k=1.97294,L=k*D,R=k*C,F=C*S-D*M;function cubehelix(t,e,n,i){return 1===arguments.length?function cubehelixConvert(t){if(t instanceof Cubehelix)return new Cubehelix(t.h,t.s,t.l,t.opacity);t instanceof Rgb||(t=rgbConvert(t));var e=t.r/255,n=t.g/255,i=t.b/255,r=(F*i+L*e-R*n)/(F+L-R),a=i-r,o=(k*(n-r)-S*a)/D,s=Math.sqrt(o*o+a*a)/(k*r*(1-r)),u=s?Math.atan2(o,a)*m-120:NaN;return new Cubehelix(u<0?u+360:u,s,r,t.opacity)}(t):new Cubehelix(t,e,n,null==i?1:i)}function Cubehelix(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}i(Cubehelix,cubehelix,extend(Color,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Cubehelix(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Cubehelix(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new Rgb(255*(e+n*(M*i+C*r)),255*(e+n*(S*i+D*r)),255*(e+n*(k*i)),this.opacity)}})),n.d(e,"color",function(){return color}),n.d(e,"rgb",function(){return rgb}),n.d(e,"hsl",function(){return hsl}),n.d(e,"lab",function(){return lab}),n.d(e,"hcl",function(){return hcl}),n.d(e,"lch",function(){return lch}),n.d(e,"gray",function(){return gray}),n.d(e,"cubehelix",function(){return cubehelix})},function(t,e,n){"use strict";var i=n(78),r=n(72),a=n(68),o=n(64),s=n(67),u=function(t){return function(){return t}};function Transform(t,e,n){this.k=t,this.x=e,this.y=n}Transform.prototype={constructor:Transform,scale:function(t){return 1===t?this:new Transform(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Transform(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var l=new Transform(1,0,0);function transform_transform(t){return t.__zoom||l}function nopropagation(){o.event.stopImmediatePropagation()}transform_transform.prototype=Transform.prototype;var c=function(){o.event.preventDefault(),o.event.stopImmediatePropagation()};function defaultFilter(){return!o.event.button}function defaultExtent(){var t,e,n=this;return n instanceof SVGElement?(t=(n=n.ownerSVGElement||n).width.baseVal.value,e=n.height.baseVal.value):(t=n.clientWidth,e=n.clientHeight),[[0,0],[t,e]]}function defaultTransform(){return this.__zoom||l}function defaultWheelDelta(){return-o.event.deltaY*(o.event.deltaMode?120:1)/500}function defaultTouchable(){return"ontouchstart"in this}function defaultConstrain(t,e,n){var i=t.invertX(e[0][0])-n[0][0],r=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(r>i?(i+r)/2:Math.min(0,i)||Math.max(0,r),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var d=function(){var t,e,n=defaultFilter,d=defaultExtent,f=defaultConstrain,h=defaultWheelDelta,g=defaultTouchable,p=[0,Infinity],_=[[-Infinity,-Infinity],[Infinity,Infinity]],m=250,x=a.interpolateZoom,v=[],y=Object(i.dispatch)("start","zoom","end"),b=500,T=150,w=0;function zoom(t){t.property("__zoom",defaultTransform).on("wheel.zoom",wheeled).on("mousedown.zoom",mousedowned).on("dblclick.zoom",dblclicked).filter(g).on("touchstart.zoom",touchstarted).on("touchmove.zoom",touchmoved).on("touchend.zoom touchcancel.zoom",touchended).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function scale(t,e){return(e=Math.max(p[0],Math.min(p[1],e)))===t.k?t:new Transform(e,t.x,t.y)}function translate(t,e,n){var i=e[0]-n[0]*t.k,r=e[1]-n[1]*t.k;return i===t.x&&r===t.y?t:new Transform(t.k,i,r)}function centroid(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function schedule(t,e,n){t.on("start.zoom",function(){gesture(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){gesture(this,arguments).end()}).tween("zoom",function(){var t=arguments,i=gesture(this,t),r=d.apply(this,t),a=n||centroid(r),o=Math.max(r[1][0]-r[0][0],r[1][1]-r[0][1]),s=this.__zoom,u="function"==typeof e?e.apply(this,t):e,l=x(s.invert(a).concat(o/s.k),u.invert(a).concat(o/u.k));return function(t){if(1===t)t=u;else{var e=l(t),n=o/e[2];t=new Transform(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}})}function gesture(t,e){for(var n,i=0,r=v.length;i<r;++i)if((n=v[i]).that===t)return n;return new Gesture(t,e)}function Gesture(t,e){this.that=t,this.args=e,this.index=-1,this.active=0,this.extent=d.apply(t,e)}function wheeled(){if(n.apply(this,arguments)){var t=gesture(this,arguments),e=this.__zoom,i=Math.max(p[0],Math.min(p[1],e.k*Math.pow(2,h.apply(this,arguments)))),r=Object(o.mouse)(this);if(t.wheel)t.mouse[0][0]===r[0]&&t.mouse[0][1]===r[1]||(t.mouse[1]=e.invert(t.mouse[0]=r)),clearTimeout(t.wheel);else{if(e.k===i)return;t.mouse=[r,e.invert(r)],Object(s.interrupt)(this),t.start()}c(),t.wheel=setTimeout(function wheelidled(){t.wheel=null,t.end()},T),t.zoom("mouse",f(translate(scale(e,i),t.mouse[0],t.mouse[1]),t.extent,_))}}function mousedowned(){if(!e&&n.apply(this,arguments)){var t=gesture(this,arguments),i=Object(o.select)(o.event.view).on("mousemove.zoom",function mousemoved(){if(c(),!t.moved){var e=o.event.clientX-u,n=o.event.clientY-l;t.moved=e*e+n*n>w}t.zoom("mouse",f(translate(t.that.__zoom,t.mouse[0]=Object(o.mouse)(t.that),t.mouse[1]),t.extent,_))},!0).on("mouseup.zoom",function mouseupped(){i.on("mousemove.zoom mouseup.zoom",null),Object(r.dragEnable)(o.event.view,t.moved),c(),t.end()},!0),a=Object(o.mouse)(this),u=o.event.clientX,l=o.event.clientY;Object(r.dragDisable)(o.event.view),nopropagation(),t.mouse=[a,this.__zoom.invert(a)],Object(s.interrupt)(this),t.start()}}function dblclicked(){if(n.apply(this,arguments)){var t=this.__zoom,e=Object(o.mouse)(this),i=t.invert(e),r=t.k*(o.event.shiftKey?.5:2),a=f(translate(scale(t,r),e,i),d.apply(this,arguments),_);c(),m>0?Object(o.select)(this).transition().duration(m).call(schedule,a,e):Object(o.select)(this).call(zoom.transform,a)}}function touchstarted(){if(n.apply(this,arguments)){var e,i,r,a,u=gesture(this,arguments),l=o.event.changedTouches,c=l.length;for(nopropagation(),i=0;i<c;++i)r=l[i],a=[a=Object(o.touch)(this,l,r.identifier),this.__zoom.invert(a),r.identifier],u.touch0?u.touch1||(u.touch1=a):(u.touch0=a,e=!0);if(t&&(t=clearTimeout(t),!u.touch1))return u.end(),void((a=Object(o.select)(this).on("dblclick.zoom"))&&a.apply(this,arguments));e&&(t=setTimeout(function(){t=null},b),Object(s.interrupt)(this),u.start())}}function touchmoved(){var e,n,i,r,a=gesture(this,arguments),s=o.event.changedTouches,u=s.length;for(c(),t&&(t=clearTimeout(t)),e=0;e<u;++e)n=s[e],i=Object(o.touch)(this,s,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=i:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=i);if(n=a.that.__zoom,a.touch1){var l=a.touch0[0],d=a.touch0[1],h=a.touch1[0],g=a.touch1[1],p=(p=h[0]-l[0])*p+(p=h[1]-l[1])*p,m=(m=g[0]-d[0])*m+(m=g[1]-d[1])*m;n=scale(n,Math.sqrt(p/m)),i=[(l[0]+h[0])/2,(l[1]+h[1])/2],r=[(d[0]+g[0])/2,(d[1]+g[1])/2]}else{if(!a.touch0)return;i=a.touch0[0],r=a.touch0[1]}a.zoom("touch",f(translate(n,i,r),a.extent,_))}function touchended(){var t,n,i=gesture(this,arguments),r=o.event.changedTouches,a=r.length;for(nopropagation(),e&&clearTimeout(e),e=setTimeout(function(){e=null},b),t=0;t<a;++t)n=r[t],i.touch0&&i.touch0[2]===n.identifier?delete i.touch0:i.touch1&&i.touch1[2]===n.identifier&&delete i.touch1;i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0?i.touch0[1]=this.__zoom.invert(i.touch0[0]):i.end()}return zoom.transform=function(t,e){var n=t.selection?t.selection():t;n.property("__zoom",defaultTransform),t!==n?schedule(t,e):n.interrupt().each(function(){gesture(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},zoom.scaleBy=function(t,e){zoom.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)})},zoom.scaleTo=function(t,e){zoom.transform(t,function(){var t=d.apply(this,arguments),n=this.__zoom,i=centroid(t),r=n.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return f(translate(scale(n,a),i,r),t,_)})},zoom.translateBy=function(t,e,n){zoom.transform(t,function(){return f(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),d.apply(this,arguments),_)})},zoom.translateTo=function(t,e,n){zoom.transform(t,function(){var t=d.apply(this,arguments),i=this.__zoom,r=centroid(t);return f(l.translate(r[0],r[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,_)})},Gesture.prototype={start:function(){return 1==++this.active&&(this.index=v.push(this)-1,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(v.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){Object(o.customEvent)(new function ZoomEvent(t,e,n){this.target=t,this.type=e,this.transform=n}(zoom,t,this.that.__zoom),y.apply,y,[t,this.that,this.args])}},zoom.wheelDelta=function(t){return arguments.length?(h="function"==typeof t?t:u(+t),zoom):h},zoom.filter=function(t){return arguments.length?(n="function"==typeof t?t:u(!!t),zoom):n},zoom.touchable=function(t){return arguments.length?(g="function"==typeof t?t:u(!!t),zoom):g},zoom.extent=function(t){return arguments.length?(d="function"==typeof t?t:u([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),zoom):d},zoom.scaleExtent=function(t){return arguments.length?(p[0]=+t[0],p[1]=+t[1],zoom):[p[0],p[1]]},zoom.translateExtent=function(t){return arguments.length?(_[0][0]=+t[0][0],_[1][0]=+t[1][0],_[0][1]=+t[0][1],_[1][1]=+t[1][1],zoom):[[_[0][0],_[0][1]],[_[1][0],_[1][1]]]},zoom.constrain=function(t){return arguments.length?(f=t,zoom):f},zoom.duration=function(t){return arguments.length?(m=+t,zoom):m},zoom.interpolate=function(t){return arguments.length?(x=t,zoom):x},zoom.on=function(){var t=y.on.apply(y,arguments);return t===y?zoom:t},zoom.clickDistance=function(t){return arguments.length?(w=(t=+t)*t,zoom):Math.sqrt(w)},zoom};n.d(e,"zoom",function(){return d}),n.d(e,"zoomTransform",function(){return transform_transform}),n.d(e,"zoomIdentity",function(){return l})},function(t,e,n){"use strict";var i=n(69);function localDate(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function utcDate(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function newYear(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function formatLocale(t){var e=t.dateTime,n=t.date,r=t.time,a=t.periods,o=t.days,s=t.shortDays,u=t.months,c=t.shortMonths,d=formatRe(a),f=formatLookup(a),h=formatRe(o),g=formatLookup(o),p=formatRe(s),_=formatLookup(s),m=formatRe(u),x=formatLookup(u),v=formatRe(c),y=formatLookup(c),b={a:function formatShortWeekday(t){return s[t.getDay()]},A:function formatWeekday(t){return o[t.getDay()]},b:function formatShortMonth(t){return c[t.getMonth()]},B:function formatMonth(t){return u[t.getMonth()]},c:null,d:formatDayOfMonth,e:formatDayOfMonth,f:formatMicroseconds,H:formatHour24,I:formatHour12,j:formatDayOfYear,L:formatMilliseconds,m:formatMonthNumber,M:formatMinutes,p:function formatPeriod(t){return a[+(t.getHours()>=12)]},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatSeconds,u:formatWeekdayNumberMonday,U:formatWeekNumberSunday,V:formatWeekNumberISO,w:formatWeekdayNumberSunday,W:formatWeekNumberMonday,x:null,X:null,y:formatYear,Y:formatFullYear,Z:formatZone,"%":formatLiteralPercent},T={a:function formatUTCShortWeekday(t){return s[t.getUTCDay()]},A:function formatUTCWeekday(t){return o[t.getUTCDay()]},b:function formatUTCShortMonth(t){return c[t.getUTCMonth()]},B:function formatUTCMonth(t){return u[t.getUTCMonth()]},c:null,d:formatUTCDayOfMonth,e:formatUTCDayOfMonth,f:formatUTCMicroseconds,H:formatUTCHour24,I:formatUTCHour12,j:formatUTCDayOfYear,L:formatUTCMilliseconds,m:formatUTCMonthNumber,M:formatUTCMinutes,p:function formatUTCPeriod(t){return a[+(t.getUTCHours()>=12)]},Q:formatUnixTimestamp,s:formatUnixTimestampSeconds,S:formatUTCSeconds,u:formatUTCWeekdayNumberMonday,U:formatUTCWeekNumberSunday,V:formatUTCWeekNumberISO,w:formatUTCWeekdayNumberSunday,W:formatUTCWeekNumberMonday,x:null,X:null,y:formatUTCYear,Y:formatUTCFullYear,Z:formatUTCZone,"%":formatLiteralPercent},w={a:function parseShortWeekday(t,e,n){var i=p.exec(e.slice(n));return i?(t.w=_[i[0].toLowerCase()],n+i[0].length):-1},A:function parseWeekday(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=g[i[0].toLowerCase()],n+i[0].length):-1},b:function parseShortMonth(t,e,n){var i=v.exec(e.slice(n));return i?(t.m=y[i[0].toLowerCase()],n+i[0].length):-1},B:function parseMonth(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=x[i[0].toLowerCase()],n+i[0].length):-1},c:function parseLocaleDateTime(t,n,i){return parseSpecifier(t,e,n,i)},d:parseDayOfMonth,e:parseDayOfMonth,f:parseMicroseconds,H:parseHour24,I:parseHour24,j:parseDayOfYear,L:parseMilliseconds,m:parseMonthNumber,M:parseMinutes,p:function parsePeriod(t,e,n){var i=d.exec(e.slice(n));return i?(t.p=f[i[0].toLowerCase()],n+i[0].length):-1},Q:parseUnixTimestamp,s:parseUnixTimestampSeconds,S:parseSeconds,u:parseWeekdayNumberMonday,U:parseWeekNumberSunday,V:parseWeekNumberISO,w:parseWeekdayNumberSunday,W:parseWeekNumberMonday,x:function parseLocaleDate(t,e,i){return parseSpecifier(t,n,e,i)},X:function parseLocaleTime(t,e,n){return parseSpecifier(t,r,e,n)},y:parseYear,Y:parseFullYear,Z:parseZone,"%":parseLiteralPercent};function newFormat(t,e){return function(n){var i,r,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(r=l[i=t.charAt(++s)])?i=t.charAt(++s):r="e"===i?" ":"0",(a=e[i])&&(i=a(n,r)),o.push(i),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function newParse(t,e){return function(n){var r,a,o=newYear(1900);if(parseSpecifier(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(r=(a=(r=utcDate(newYear(o.y))).getUTCDay())>4||0===a?i.utcMonday.ceil(r):Object(i.utcMonday)(r),r=i.utcDay.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(a=(r=e(newYear(o.y))).getDay())>4||0===a?i.timeMonday.ceil(r):Object(i.timeMonday)(r),r=i.timeDay.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?utcDate(newYear(o.y)).getUTCDay():e(newYear(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,utcDate(o)):e(o)}}function parseSpecifier(t,e,n,i){for(var r,a,o=0,s=e.length,u=n.length;o<s;){if(i>=u)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(a=w[r in l?e.charAt(o++):r])||(i=a(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return b.x=newFormat(n,b),b.X=newFormat(r,b),b.c=newFormat(e,b),T.x=newFormat(n,T),T.X=newFormat(r,T),T.c=newFormat(e,T),{format:function(t){var e=newFormat(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=newParse(t+="",localDate);return e.toString=function(){return t},e},utcFormat:function(t){var e=newFormat(t+="",T);return e.toString=function(){return t},e},utcParse:function(t){var e=newParse(t,utcDate);return e.toString=function(){return t},e}}}var r,a,o,s,u,l={"-":"",_:" ",0:"0"},c=/^\s*\d+/,d=/^%/,f=/[\\^$*+?|[\]().{}]/g;function pad(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",a=r.length;return i+(a<n?new Array(n-a+1).join(e)+r:r)}function requote(t){return t.replace(f,"\\$&")}function formatRe(t){return new RegExp("^(?:"+t.map(requote).join("|")+")","i")}function formatLookup(t){for(var e={},n=-1,i=t.length;++n<i;)e[t[n].toLowerCase()]=n;return e}function parseWeekdayNumberSunday(t,e,n){var i=c.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function parseWeekdayNumberMonday(t,e,n){var i=c.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function parseWeekNumberSunday(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function parseWeekNumberISO(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function parseWeekNumberMonday(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function parseFullYear(t,e,n){var i=c.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function parseYear(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function parseZone(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function parseMonthNumber(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function parseDayOfMonth(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function parseDayOfYear(t,e,n){var i=c.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function parseHour24(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function parseMinutes(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function parseSeconds(t,e,n){var i=c.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function parseMilliseconds(t,e,n){var i=c.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function parseMicroseconds(t,e,n){var i=c.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function parseLiteralPercent(t,e,n){var i=d.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function parseUnixTimestamp(t,e,n){var i=c.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function parseUnixTimestampSeconds(t,e,n){var i=c.exec(e.slice(n));return i?(t.Q=1e3*+i[0],n+i[0].length):-1}function formatDayOfMonth(t,e){return pad(t.getDate(),e,2)}function formatHour24(t,e){return pad(t.getHours(),e,2)}function formatHour12(t,e){return pad(t.getHours()%12||12,e,2)}function formatDayOfYear(t,e){return pad(1+i.timeDay.count(Object(i.timeYear)(t),t),e,3)}function formatMilliseconds(t,e){return pad(t.getMilliseconds(),e,3)}function formatMicroseconds(t,e){return formatMilliseconds(t,e)+"000"}function formatMonthNumber(t,e){return pad(t.getMonth()+1,e,2)}function formatMinutes(t,e){return pad(t.getMinutes(),e,2)}function formatSeconds(t,e){return pad(t.getSeconds(),e,2)}function formatWeekdayNumberMonday(t){var e=t.getDay();return 0===e?7:e}function formatWeekNumberSunday(t,e){return pad(i.timeSunday.count(Object(i.timeYear)(t),t),e,2)}function formatWeekNumberISO(t,e){var n=t.getDay();return t=n>=4||0===n?Object(i.timeThursday)(t):i.timeThursday.ceil(t),pad(i.timeThursday.count(Object(i.timeYear)(t),t)+(4===Object(i.timeYear)(t).getDay()),e,2)}function formatWeekdayNumberSunday(t){return t.getDay()}function formatWeekNumberMonday(t,e){return pad(i.timeMonday.count(Object(i.timeYear)(t),t),e,2)}function formatYear(t,e){return pad(t.getFullYear()%100,e,2)}function formatFullYear(t,e){return pad(t.getFullYear()%1e4,e,4)}function formatZone(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+pad(e/60|0,"0",2)+pad(e%60,"0",2)}function formatUTCDayOfMonth(t,e){return pad(t.getUTCDate(),e,2)}function formatUTCHour24(t,e){return pad(t.getUTCHours(),e,2)}function formatUTCHour12(t,e){return pad(t.getUTCHours()%12||12,e,2)}function formatUTCDayOfYear(t,e){return pad(1+i.utcDay.count(Object(i.utcYear)(t),t),e,3)}function formatUTCMilliseconds(t,e){return pad(t.getUTCMilliseconds(),e,3)}function formatUTCMicroseconds(t,e){return formatUTCMilliseconds(t,e)+"000"}function formatUTCMonthNumber(t,e){return pad(t.getUTCMonth()+1,e,2)}function formatUTCMinutes(t,e){return pad(t.getUTCMinutes(),e,2)}function formatUTCSeconds(t,e){return pad(t.getUTCSeconds(),e,2)}function formatUTCWeekdayNumberMonday(t){var e=t.getUTCDay();return 0===e?7:e}function formatUTCWeekNumberSunday(t,e){return pad(i.utcSunday.count(Object(i.utcYear)(t),t),e,2)}function formatUTCWeekNumberISO(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Object(i.utcThursday)(t):i.utcThursday.ceil(t),pad(i.utcThursday.count(Object(i.utcYear)(t),t)+(4===Object(i.utcYear)(t).getUTCDay()),e,2)}function formatUTCWeekdayNumberSunday(t){return t.getUTCDay()}function formatUTCWeekNumberMonday(t,e){return pad(i.utcMonday.count(Object(i.utcYear)(t),t),e,2)}function formatUTCYear(t,e){return pad(t.getUTCFullYear()%100,e,2)}function formatUTCFullYear(t,e){return pad(t.getUTCFullYear()%1e4,e,4)}function formatUTCZone(){return"+0000"}function formatLiteralPercent(){return"%"}function formatUnixTimestamp(t){return+t}function formatUnixTimestampSeconds(t){return Math.floor(+t/1e3)}function defaultLocale(t){return r=formatLocale(t),a=r.format,o=r.parse,s=r.utcFormat,u=r.utcParse,r}defaultLocale({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var h=Date.prototype.toISOString?function formatIsoNative(t){return t.toISOString()}:s("%Y-%m-%dT%H:%M:%S.%LZ");var g=+new Date("2000-01-01T00:00:00.000Z")?function parseIsoNative(t){var e=new Date(t);return isNaN(e)?null:e}:u("%Y-%m-%dT%H:%M:%S.%LZ");n.d(e,"timeFormatDefaultLocale",function(){return defaultLocale}),n.d(e,"timeFormat",function(){return a}),n.d(e,"timeParse",function(){return o}),n.d(e,"utcFormat",function(){return s}),n.d(e,"utcParse",function(){return u}),n.d(e,"timeFormatLocale",function(){return formatLocale}),n.d(e,"isoFormat",function(){return h}),n.d(e,"isoParse",function(){return g})},function(t,e,n){"use strict";var i=n(78),r=n(72),a=n(68),o=n(64),s=n(67),u=function(t){return function(){return t}},l=function(t,e,n){this.target=t,this.type=e,this.selection=n};function nopropagation(){o.event.stopImmediatePropagation()}var c=function(){o.event.preventDefault(),o.event.stopImmediatePropagation()},d={name:"drag"},f={name:"space"},h={name:"handle"},g={name:"center"},p={name:"x",handles:["e","w"].map(brush_type),input:function(t,e){return t&&[[t[0],e[0][1]],[t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},_={name:"y",handles:["n","s"].map(brush_type),input:function(t,e){return t&&[[e[0][0],t[0]],[e[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},m={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(brush_type),input:function(t){return t},output:function(t){return t}},x={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},v={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},y={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},b={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},T={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function brush_type(t){return{type:t}}function defaultFilter(){return!o.event.button}function defaultExtent(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function local(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function empty(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function brushSelection(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function brushX(){return brush_brush(p)}function brushY(){return brush_brush(_)}var w=function(){return brush_brush(m)};function brush_brush(t){var e,n=defaultExtent,m=defaultFilter,w=Object(i.dispatch)(brush,"start","brush","end"),A=6;function brush(e){var n=e.property("__brush",initialize).selectAll(".overlay").data([brush_type("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",x.overlay).merge(n).each(function(){var t=local(this).extent;Object(o.select)(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([brush_type("selection")]).enter().append("rect").attr("class","selection").attr("cursor",x.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return x[t.type]}),e.each(redraw).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",started)}function redraw(){var t=Object(o.select)(this),e=local(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-A/2:e[0][0]-A/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-A/2:e[0][1]-A/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+A:A}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+A:A})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function emitter(t,e){return t.__brush.emitter||new Emitter(t,e)}function Emitter(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function started(){if(o.event.touches){if(o.event.changedTouches.length<o.event.touches.length)return c()}else if(e)return;if(m.apply(this,arguments)){var n,i,a,u,l,w,A,M,C,S,D,k,L,R=this,F=o.event.target.__data__.type,O="selection"===(o.event.metaKey?F="overlay":F)?d:o.event.altKey?g:h,I=t===_?null:b[F],E=t===p?null:T[F],X=local(R),z=X.extent,N=X.selection,P=z[0][0],Y=z[0][1],B=z[1][0],q=z[1][1],V=I&&E&&o.event.shiftKey,j=Object(o.mouse)(R),U=j,H=emitter(R,arguments).beforestart();"overlay"===F?X.selection=N=[[n=t===_?P:j[0],a=t===p?Y:j[1]],[l=t===_?B:n,A=t===p?q:a]]:(n=N[0][0],a=N[0][1],l=N[1][0],A=N[1][1]),i=n,u=a,w=l,M=A;var W=Object(o.select)(R).attr("pointer-events","none"),G=W.selectAll(".overlay").attr("cursor",x[F]);if(o.event.touches)W.on("touchmove.brush",moved,!0).on("touchend.brush touchcancel.brush",ended,!0);else{var Z=Object(o.select)(o.event.view).on("keydown.brush",function keydowned(){switch(o.event.keyCode){case 16:V=I&&E;break;case 18:O===h&&(I&&(l=w-C*I,n=i+C*I),E&&(A=M-S*E,a=u+S*E),O=g,move());break;case 32:O!==h&&O!==g||(I<0?l=w-C:I>0&&(n=i-C),E<0?A=M-S:E>0&&(a=u-S),O=f,G.attr("cursor",x.selection),move());break;default:return}c()},!0).on("keyup.brush",function keyupped(){switch(o.event.keyCode){case 16:V&&(k=L=V=!1,move());break;case 18:O===g&&(I<0?l=w:I>0&&(n=i),E<0?A=M:E>0&&(a=u),O=h,move());break;case 32:O===f&&(o.event.altKey?(I&&(l=w-C*I,n=i+C*I),E&&(A=M-S*E,a=u+S*E),O=g):(I<0?l=w:I>0&&(n=i),E<0?A=M:E>0&&(a=u),O=h),G.attr("cursor",x[F]),move());break;default:return}c()},!0).on("mousemove.brush",moved,!0).on("mouseup.brush",ended,!0);Object(r.dragDisable)(o.event.view)}nopropagation(),Object(s.interrupt)(R),redraw.call(R),H.start()}function moved(){var t=Object(o.mouse)(R);!V||k||L||(Math.abs(t[0]-U[0])>Math.abs(t[1]-U[1])?L=!0:k=!0),U=t,D=!0,c(),move()}function move(){var t;switch(C=U[0]-j[0],S=U[1]-j[1],O){case f:case d:I&&(C=Math.max(P-n,Math.min(B-l,C)),i=n+C,w=l+C),E&&(S=Math.max(Y-a,Math.min(q-A,S)),u=a+S,M=A+S);break;case h:I<0?(C=Math.max(P-n,Math.min(B-n,C)),i=n+C,w=l):I>0&&(C=Math.max(P-l,Math.min(B-l,C)),i=n,w=l+C),E<0?(S=Math.max(Y-a,Math.min(q-a,S)),u=a+S,M=A):E>0&&(S=Math.max(Y-A,Math.min(q-A,S)),u=a,M=A+S);break;case g:I&&(i=Math.max(P,Math.min(B,n-C*I)),w=Math.max(P,Math.min(B,l+C*I))),E&&(u=Math.max(Y,Math.min(q,a-S*E)),M=Math.max(Y,Math.min(q,A+S*E)))}w<i&&(I*=-1,t=n,n=l,l=t,t=i,i=w,w=t,F in v&&G.attr("cursor",x[F=v[F]])),M<u&&(E*=-1,t=a,a=A,A=t,t=u,u=M,M=t,F in y&&G.attr("cursor",x[F=y[F]])),X.selection&&(N=X.selection),k&&(i=N[0][0],w=N[1][0]),L&&(u=N[0][1],M=N[1][1]),N[0][0]===i&&N[0][1]===u&&N[1][0]===w&&N[1][1]===M||(X.selection=[[i,u],[w,M]],redraw.call(R),H.brush())}function ended(){if(nopropagation(),o.event.touches){if(o.event.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500),W.on("touchmove.brush touchend.brush touchcancel.brush",null)}else Object(r.dragEnable)(o.event.view,D),Z.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);W.attr("pointer-events","all"),G.attr("cursor",x.overlay),X.selection&&(N=X.selection),empty(N)&&(X.selection=null,redraw.call(R)),H.end()}}function initialize(){var e=this.__brush||{selection:null};return e.extent=n.apply(this,arguments),e.dim=t,e}return brush.move=function(e,n){e.selection?e.on("start.brush",function(){emitter(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){emitter(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,r=emitter(e,arguments),o=i.selection,s=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),u=Object(a.interpolate)(o,s);function tween(t){i.selection=1===t&&empty(s)?null:u(t),redraw.call(e),r.brush()}return o&&s?tween:tween(1)}):e.each(function(){var e=arguments,i=this.__brush,r=t.input("function"==typeof n?n.apply(this,e):n,i.extent),a=emitter(this,e).beforestart();Object(s.interrupt)(this),i.selection=null==r||empty(r)?null:r,redraw.call(this),a.start().brush().end()})},Emitter.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){Object(o.customEvent)(new l(brush,e,t.output(this.state.selection)),w.apply,w,[e,this.that,this.args])}},brush.extent=function(t){return arguments.length?(n="function"==typeof t?t:u([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),brush):n},brush.filter=function(t){return arguments.length?(m="function"==typeof t?t:u(!!t),brush):m},brush.handleSize=function(t){return arguments.length?(A=+t,brush):A},brush.on=function(){var t=w.on.apply(w,arguments);return t===w?brush:t},brush}n.d(e,"brush",function(){return w}),n.d(e,"brushX",function(){return brushX}),n.d(e,"brushY",function(){return brushY}),n.d(e,"brushSelection",function(){return brushSelection})},function(t,e,n){"use strict";var i={},r={},a=34,o=10,s=13;function objectConverter(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}")}var u=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function parseRows(t,e){var u,l=[],c=t.length,d=0,f=0,h=c<=0,g=!1;function token(){if(h)return r;if(g)return g=!1,i;var e,u,l=d;if(t.charCodeAt(l)===a){for(;d++<c&&t.charCodeAt(d)!==a||t.charCodeAt(++d)===a;);return(e=d)>=c?h=!0:(u=t.charCodeAt(d++))===o?g=!0:u===s&&(g=!0,t.charCodeAt(d)===o&&++d),t.slice(l+1,e-1).replace(/""/g,'"')}for(;d<c;){if((u=t.charCodeAt(e=d++))===o)g=!0;else if(u===s)g=!0,t.charCodeAt(d)===o&&++d;else if(u!==n)continue;return t.slice(l,e)}return h=!0,t.slice(l,c)}for(t.charCodeAt(c-1)===o&&--c,t.charCodeAt(c-1)===s&&--c;(u=token())!==r;){for(var p=[];u!==i&&u!==r;)p.push(u),u=token();e&&null==(p=e(p,f++))||l.push(p)}return l}function formatRow(e){return e.map(formatValue).join(t)}function formatValue(t){return null==t?"":e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function parse(t,e){var n,i,r=parseRows(t,function(t,r){if(n)return n(t,r-1);i=t,n=e?function customConverter(t,e){var n=objectConverter(t);return function(i,r){return e(n(i),r,t)}}(t,e):objectConverter(t)});return r.columns=i||[],r},parseRows:parseRows,format:function format(e,n){return null==n&&(n=function inferColumns(t){var e=Object.create(null),n=[];return t.forEach(function(t){for(var i in t)i in e||n.push(e[i]=i)}),n}(e)),[n.map(formatValue).join(t)].concat(e.map(function(e){return n.map(function(t){return formatValue(e[t])}).join(t)})).join("\n")},formatRows:function formatRows(t){return t.map(formatRow).join("\n")}}},l=u(","),c=l.parse,d=l.parseRows,f=l.format,h=l.formatRows,g=u("\t"),p=g.parse,_=g.parseRows,m=g.format,x=g.formatRows;n.d(e,"dsvFormat",function(){return u}),n.d(e,"csvParse",function(){return c}),n.d(e,"csvParseRows",function(){return d}),n.d(e,"csvFormat",function(){return f}),n.d(e,"csvFormatRows",function(){return h}),n.d(e,"tsvParse",function(){return p}),n.d(e,"tsvParseRows",function(){return _}),n.d(e,"tsvFormat",function(){return m}),n.d(e,"tsvFormatRows",function(){return x})},function(t,e,n){"use strict";var i={value:function(){}};function dispatch(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i)throw new Error("illegal type: "+t);i[t]=[]}return new Dispatch(i)}function Dispatch(t){this._=t}function get(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}function set(t,e,n){for(var r=0,a=t.length;r<a;++r)if(t[r].name===e){t[r]=i,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Dispatch.prototype=dispatch.prototype={constructor:Dispatch,on:function(t,e){var n,i=this._,r=function parseTypenames(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}(t+"",i),a=-1,o=r.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=r[a]).type)i[n]=set(i[n],t.name,e);else if(null==e)for(n in i)i[n]=set(i[n],t.name,null);return this}for(;++a<o;)if((n=(t=r[a]).type)&&(n=get(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Dispatch(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=new Array(n),a=0;a<n;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(i=this._[t]).length;a<n;++a)i[a].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,a=i.length;r<a;++r)i[r].value.apply(e,n)}};var r=dispatch;n.d(e,"dispatch",function(){return r})}])}); \ No newline at end of file diff --git a/dist/theme/insight.css b/dist/theme/insight.css new file mode 100644 index 000000000..7f78a7327 --- /dev/null +++ b/dist/theme/insight.css @@ -0,0 +1,256 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +/*-- Insight Theme --*/ +/*-- Default color pattern --*/ +.bb-color-pattern { + background-image: url("#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;"); } + +/*-- Chart --*/ +.bb svg { + font-size: 12px; + font-family: "Meiryo", sans-serif, Arial, "nanumgothic", "Dotum"; + line-height: 1; } + +.bb path, .bb line { + fill: none; + stroke: #c4c4c4; } + +.bb text, .bb .bb-button { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + fill: #555; + font-size: 11px; } + +.bb-legend-item-title, +.bb-xgrid-focus, +.bb-ygrid, +.bb-event-rect, +.bb-bars path { + shape-rendering: crispEdges; } + +/*-- Axis --*/ +.bb-axis-y text, .bb-axis-y2 text { + fill: #737373; } + +.bb-event-rects { + fill-opacity: 1 !important; } + .bb-event-rects .bb-event-rect { + fill: transparent; } + .bb-event-rects .bb-event-rect._active_ { + fill: rgba(39, 201, 3, 0.05); } + +.tick._active_ text { + fill: #00c83c !important; } + +/*-- Grid --*/ +.bb-grid line { + stroke: #f1f1f1; } + +.bb-grid .bb-ygrid:last-child { + stroke: #e9e9e9; } + +.bb-xgrid-focus line { + stroke: #ddd; } + +/*-- Text on Chart --*/ +.bb-text.bb-empty { + fill: #767676; } + +/*-- Line --*/ +.bb-line { + stroke-width: 1px; } + +/*-- Point --*/ +.bb-circle._expanded_ { + fill: #fff !important; + stroke-width: 2px; + stroke: red; } + +rect.bb-circle._expanded_, use.bb-circle._expanded_ { + stroke-width: 1px; } + +.bb-selected-circle { + fill: white; + stroke-width: 2px; } + +/*-- Bar --*/ +.bb-bar { + stroke-width: 0; } + .bb-bar._expanded_ { + fill-opacity: 0.75; } + +/*-- Focus --*/ +.bb-target.bb-focused { + opacity: 1; } + .bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step { + stroke-width: 2px; } + +.bb-target.bb-defocused { + opacity: 0.3 !important; } + +/*-- Region --*/ +.bb-region { + fill: steelblue; + fill-opacity: 0.1; } + .bb-region.selected rect { + fill: #27c903; } + +/*-- Zoom region --*/ +.bb-zoom-brush { + fill-opacity: .1; } + +/*-- Brush --*/ +.bb-brush .extent { + fill-opacity: 0.1; } + +/*-- Select - Drag --*/ +/*-- Legend --*/ +.bb-legend-item-hidden { + opacity: 0.15; } + +.bb-legend-background { + opacity: 0.75; + fill: white; + stroke: lightgray; + stroke-width: 1; } + +/*-- Title --*/ +.bb-title { + font-size: 14px; } + +/*-- Tooltip --*/ +.bb-tooltip-container { + z-index: 10; + font-family: "Meiryo", sans-serif, Arial, "nanumgothic", "Dotum"; + position: absolute; } + +.bb-tooltip { + border-collapse: separate; + border-spacing: 0; + empty-cells: show; + border: 1px solid #999; + background-color: #fff; + text-align: left; + font-size: 11px; } + .bb-tooltip th { + font-size: 12px; + padding: 4px 8px; + text-align: left; + border-bottom: solid 1px #eee; } + .bb-tooltip td { + padding: 4px 6px; + background-color: #fff; } + .bb-tooltip td:first-child { + padding-left: 8px; } + .bb-tooltip td:last-child { + padding-right: 8px; } + .bb-tooltip td > span, .bb-tooltip td > svg { + display: inline-block; + width: 10px; + height: 10px; + margin-right: 6px; + border-radius: 5px; + vertical-align: middle; } + .bb-tooltip td.value { + border-left: 1px solid transparent; } + .bb-tooltip .bb-tooltip-title { + display: inline-block; + color: #aaa; + line-height: 20px; } + .bb-tooltip .bb-tooltip-detail table { + border-collapse: collapse; + border-spacing: 0; } + .bb-tooltip .bb-tooltip-detail .bb-tooltip-name, .bb-tooltip .bb-tooltip-detail .bb-tooltip-value { + font-size: 11px; + line-height: 13px; + padding: 4px 0 3px; + color: #444; + text-align: left; + font-weight: normal; } + .bb-tooltip .bb-tooltip-detail .bb-tooltip-value { + padding-left: 5px; + font-weight: 800; + font-size: 12px; } + +/*-- Area --*/ +.bb-area { + stroke-width: 0; + opacity: 0.2; } + +/*-- Arc --*/ +.bb-chart-arcs-title { + dominant-baseline: middle; + font-size: 1.3em; } + +.bb-chart-arcs .bb-chart-arcs-background { + fill: #e0e0e0; + stroke: none; } + +.bb-chart-arcs .bb-chart-arcs-gauge-unit { + fill: #000; + font-size: 16px; } + +.bb-chart-arcs .bb-chart-arcs-gauge-min, .bb-chart-arcs .bb-chart-arcs-gauge-max { + fill: #777; } + +.bb-chart-arcs .bb-chart-arcs-title { + font-size: 16px !important; + fill: #000; + font-weight: 600; } + +.bb-chart-arcs path.empty { + fill: #eaeaea; + stroke-width: 0; } + +.bb-chart-arc .bb-gauge-value { + fill: #000; } + +.bb-chart-arc path { + stroke: #fff; } + +.bb-chart-arc text { + fill: #fff; + font-size: 13px; } + +/*-- Radar --*/ +.bb-chart-radars .bb-levels polygon { + fill: none; + stroke: #848282; + stroke-width: .5px; } + +.bb-chart-radars .bb-levels text { + fill: #848282; } + +.bb-chart-radars .bb-axis line { + stroke: #848282; + stroke-width: .5px; } + +.bb-chart-radars .bb-axis text { + font-size: 1.15em; + cursor: default; } + +.bb-chart-radars .bb-shapes polygon { + fill-opacity: .2; + stroke-width: 1px; } + +/*-- Button --*/ +.bb-button { + position: absolute; + top: 10px; + right: 10px; } + .bb-button .bb-zoom-reset { + border: solid 1px #ccc; + background-color: #fff; + padding: 5px; + border-radius: 5px; + cursor: pointer; } + diff --git a/dist/theme/insight.min.css b/dist/theme/insight.min.css new file mode 100644 index 000000000..8095bb55c --- /dev/null +++ b/dist/theme/insight.min.css @@ -0,0 +1,10 @@ +/*! + * Copyright (c) 2017 NAVER Corp. + * billboard.js project is licensed under the MIT license + * + * billboard.js, JavaScript chart library + * http://naver.github.io/billboard.js/ + * + * @version 1.6.0 + */ +.bb-color-pattern{background-image:url(#00c73c;#fa7171;#2ad0ff;#7294ce;#e3e448;#cc7e6e;#fb6ccf;#c98dff;#4aea99;#bbbbbb;)}.bb svg{font-family:Meiryo,sans-serif,Arial,nanumgothic,Dotum;font-size:12px;line-height:1}.bb line,.bb path{fill:none;stroke:#c4c4c4}.bb .bb-button,.bb text{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;fill:#555;font-size:11px;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-title,.bb-xgrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-axis-y2 text,.bb-axis-y text{fill:#737373}.bb-event-rects{fill-opacity:1!important}.bb-event-rects .bb-event-rect{fill:transparent}.bb-event-rects .bb-event-rect._active_{fill:rgba(39,201,3,.05)}.tick._active_ text{fill:#00c83c!important}.bb-grid line{stroke:#f1f1f1}.bb-grid .bb-ygrid:last-child{stroke:#e9e9e9}.bb-xgrid-focus line{stroke:#ddd}.bb-text.bb-empty{fill:#767676}.bb-line{stroke-width:1px}.bb-circle._expanded_{fill:#fff!important;stroke:red;stroke-width:2px}rect.bb-circle._expanded_,use.bb-circle._expanded_{stroke-width:1px}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-target.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused{opacity:.3!important}.bb-region{fill:#4682b4;fill-opacity:.1}.bb-region.selected rect{fill:#27c903}.bb-brush .extent,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;opacity:.75;stroke:#d3d3d3;stroke-width:1}.bb-title{font-size:14px}.bb-tooltip-container{font-family:Meiryo,sans-serif,Arial,nanumgothic,Dotum;position:absolute;z-index:10}.bb-tooltip{background-color:#fff;border:1px solid #999;border-collapse:separate;border-spacing:0;empty-cells:show;font-size:11px;text-align:left}.bb-tooltip th{border-bottom:1px solid #eee;font-size:12px;padding:4px 8px;text-align:left}.bb-tooltip td{background-color:#fff;padding:4px 6px}.bb-tooltip td:first-child{padding-left:8px}.bb-tooltip td:last-child{padding-right:8px}.bb-tooltip td>span,.bb-tooltip td>svg{border-radius:5px;display:inline-block;height:10px;margin-right:6px;vertical-align:middle;width:10px}.bb-tooltip td.value{border-left:1px solid transparent}.bb-tooltip .bb-tooltip-title{color:#aaa;display:inline-block;line-height:20px}.bb-tooltip .bb-tooltip-detail table{border-collapse:collapse;border-spacing:0}.bb-tooltip .bb-tooltip-detail .bb-tooltip-name,.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{color:#444;font-size:11px;font-weight:400;line-height:13px;padding:4px 0 3px;text-align:left}.bb-tooltip .bb-tooltip-detail .bb-tooltip-value{font-size:12px;font-weight:800;padding-left:5px}.bb-area{opacity:.2;stroke-width:0}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:none}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-arcs .bb-chart-arcs-title{fill:#000;font-size:16px!important;font-weight:600}.bb-chart-arcs path.empty{fill:#eaeaea;stroke-width:0}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;padding:5px} \ No newline at end of file diff --git a/doc/Chart.html b/doc/Chart.html new file mode 100644 index 000000000..7107a4740 --- /dev/null +++ b/doc/Chart.html @@ -0,0 +1,8760 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + + <meta charset="utf-8"> + <title>Chart - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    Chart

    + + + + + + + +
    + +
    + +

    + Chart +

    + + +
    + +
    + +
    + + + + + +

    new Chart()

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    See:
    +
    + +
    + + + +
    + + + + + +
    +

    Main chart class.

    +
      +
    • Note: Instantiated via bb.generate().
    • +
    +
    + + + + + + + + + +
    Example
    + +
    var chart = bb.generate({
    + data: {
    +   columns: [
    +	    ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"],
    +	    ["count1", 11, 8, 7, 6, 5 ],
    +	    ["count2", 9, 3, 6, 2, 8 ]
    +  ]}
    +}
    + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + +

    Methods

    + + + + + + +

    axis․labels(labels)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set axis labels.

    +
    + + + + + + + + + +
    Example
    + +
    // Update axis' label
    +chart.axis.labels({
    +  x: "New X Axis Label",
    +  y: "New Y Axis Label"
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    labels + + +Object + + + +

    specified axis' label to be updated.

    + + + + + + + + + + + + + + + + + + + + + +

    axis․max(max)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set axis max value.

    +
    + + + + + + + + + +
    Example
    + +
    // Update axis' label
    +chart.axis.max({
    +   x: 100,
    +   y: 1000,
    +   y2: 10000
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    max + + +Object + + + +

    If max is given, specified axis' max value will be updated.
    + If no argument is given, the max values set on generating option for each axis will be returned. + If not set any max values on generation, it will return undefined.

    + + + + + + + + + + + + + + + + + + + + + +

    axis․min(min)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set axis min value.

    +
    + + + + + + + + + +
    Example
    + +
    // Update axis' min
    +chart.axis.min({
    +  x: -10,
    +  y: 1000,
    +  y2: 100
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    min + + +Object + + + +

    If min is given, specified axis' min value will be updated.
    + If no argument is given, the min values set on generating option for each axis will be returned. + If not set any min values on generation, it will return undefined.

    + + + + + + + + + + + + + + + + + + + + + +

    axis․range(range)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set axis min and max value.

    +
    + + + + + + + + + +
    Example
    + +
    // Update axis' label
    +chart.axis.range({
    +  min: {
    +    x: -10,
    +    y: -1000,
    +    y2: -10000
    +  },
    +  max: {
    +    x: 100,
    +    y: 1000,
    +    y2: 10000
    +  },
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    range + + +Object + + + +

    If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.

    + + + + + + + + + + + + + + + + + + + + + +

    categories(categories)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set category names on category axis.

    +
    + + + + + + + + + +
    Example
    + +
    chart.categories([
    +     "Category 1", "Category 2", ...
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    categories + + +Array + + + +

    This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.

    + + + + + + + + + + + + + + + + + + + + + +

    category(i, category)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set specified category name on category axis.

    +
    + + + + + + + + + +
    Example
    + +
    chart.category(2, "Category 3");
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    i + + +Number + + + +

    index of category to be changed

    category + + +String + + + +

    category value to be changed

    + + + + + + + + + + + + + + + + + + + + + +

    color(id)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get the color

    +
    + + + + + + + + + +
    Example
    + +
    chart.color("data1");
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    id + + +String + + + +

    id to get the color

    + + + + + + + + + + + + + + + + + + + + + +

    config(name, valueopt, redrawopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get or set single config option value.

    +
    + + + + + + + + + +
    Example
    + +
    // Getter
    +chart.config("gauge.max");
    +
    +// Setter
    +chart.config("gauge.max", 100);
    +
    +// Setter & redraw with the new option
    +chart.config("gauge.max", 100, true);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    name + + +String + + + + + + + + + +

    The option key name.

    value + + +* + + + + + + <optional>
    + + + + + +

    The value accepted for indicated option.

    redraw + + +Boolean + + + + + + <optional>
    + + + + + +

    Set to redraw with the new option changes.

    +
      +
    • NOTE: Doesn't guarantee work in all circumstances. It can be applied for limited options only.
    • +
    + + + + + + + + + + + + + + + + + + + + + +

    data(targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get data loaded in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get only data1 data
    +chart.data("data1");
    +
    +// Get data1 and data2 data
    +chart.data(["data1", "data2"]);
    +
    +// Get all data
    +chart.data();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIds + + +String +| + +Array + + + +

    If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.

    + + + + + + + + + + + + + + + + + + + + + +

    data․axes(axes)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set axes of the data loaded in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get current axes
    +chart.data.axes();
    +
    +// Update axes
    +chart.data.axes({
    + data1: "y",
    + data2: "y2"
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    axes + + +Object + + + +

    If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as

    + + + + + + + + + + + + + + + + + + + + + +

    data․colors(colors)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set colors of the data loaded in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get current colors
    +chart.data.colors();
    +
    +// Update colors
    +chart.data.colors({
    + data1: "#FFFFFF",
    + data2: "#000000"
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    colors + + +Object + + + +

    If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as

    + + + + + + + + + + + + + + + + + + + + + +

    data․names(names)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set names of the data loaded in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get current names
    +chart.data.names();
    +
    +// Update names
    +chart.data.names({
    + data1: "New Name 1",
    + data2: "New Name 2"
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    names + + +Object + + + +

    If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as

    + + + + + + + + + + + + + + + + + + + + + +

    data․shown(targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get data shown in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get shown data by filtering to include only data1 data
    +chart.data.shown("data1");
    +
    +// Get shown data by filtering to include data1 and data2 data
    +chart.data.shown(["data1", "data2"]);
    +
    +// Get all shown data
    +chart.data.shown();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIds + + +String +| + +Array + + + +

    If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.

    + + + + + + + + + + + + + + + + + + + + + +

    data․values(targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get values of the data loaded in the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get data1 values
    +chart.data.values("data1");
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIds + + +String +| + +Array + + + +

    This API returns the values of specified target. If this argument is not given, null will be retruned

    + + + + + + + + + + + + + + + + + + + + + +

    defocus(Target)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    This API fades out specified targets and reverts the others.

    +You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.

    +
    + + + + + + + + + +
    Example
    + +
    // data1 will be faded out and the others will be reverted.
    +chart.defocus("data1");
    +
    +// data1 and data2 will be faded out and the others will be reverted.
    +chart.defocus(["data1", "data2"]);
    +
    +// all targets will be faded out.
    +chart.defocus();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    Target + + +String +| + +Array + + + +

    ids to be faded out.

    + + + + + + + + + + + + + + + + + + + + + +

    destroy()

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Reset the chart object and remove element and events completely.

    +
    + + + + + + + + + +
    Example
    + +
    chart.destroy();
    + + + + + + + + + + + + + + + + + + + + + + + +

    export(mimeTypeopt, callbackopt) → {String}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Export chart as an image.

    +
      +
    • NOTE:
        +
      • IE11 and below not work properly due to the lack of the feature(foreignObject) support
      • +
      • The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
      • +
      +
    • +
    +
    + + + + + + + + + +
    Example
    + +
    chart.export();
    + // --> "data:image/svg+xml;base64,PHN..."
    +
    + // Initialize the download automatically
    + chart.export("image/png", dataUrl => {
    +    const link = document.createElement("a");
    +
    +    link.download = `${Date.now()}.png`;
    +    link.href = dataUrl;
    +    link.innerHTML = "Download chart as image";
    +
    +    document.body.appendChild(link);
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    mimeType + + +String + + + + + + <optional>
    + + + + + +
    + + image/png + +

    The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)

    callback + + +function + + + + + + <optional>
    + + + + + +
    + +

    The callback to be invoked when export is ready.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    dataURI

    +
    + + + +
    +
    + Type +
    +
    + +String + + +
    +
    + + + + + + + + + +

    flow(args)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Flow data to the chart.

    +By this API, you can append new data points to the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // 2 data points will be apprended to the tail and popped from the head.
    +// After that, 4 data points will be appended and no data points will be poppoed.
    +chart.flow({
    + columns: [
    +   ["x", "2018-01-11", "2018-01-21"],
    +   ["data1", 500, 200],
    +   ["data2", 100, 300],
    +   ["data3", 200, 120]
    + ],
    + to: "2013-01-11",
    + done: function () {
    +   chart.flow({
    +     columns: [
    +       ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"],
    +       ["data1", 200, 300, 100, 250],
    +       ["data2", 100, 90, 40, 120],
    +       ["data3", 100, 100, 300, 500]
    +     ],
    +     length: 2,
    +     duration: 1500
    +   });
    + }
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    args + + +Object + + + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyTypeDescription
    jsonObjectData as JSON format (@see data․json)
    rowsArrayData in array as row format (@see data․rows)
    columnsArrayData in array as column format (@see data․columns)
    toStringThe lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points
    lengthNumberThe lower x edge will move by the number of this argument
    durationNumberThe duration of the transition will be specified value. If not given, transition.duration will be used as default
    doneFunctionThe specified function will be called when flow ends
    +
      +
    • NOTE: +If json, rows and columns given, the data will be loaded.
      +If data that has the same target id is given, the chart will be appended.
      +Otherwise, new target will be added. One of these is required when calling.
      +If json specified, keys is required as well as data.json.
    • +
    + + + + + + + + + + + + + + + + + + + + + +

    flush(softopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Force to redraw.

    +
    + + + + + + + + + +
    Example
    + +
    chart.flush();
    +
    +// for soft redraw
    +chart.flush(true);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    soft + + +Boolean + + + + + + <optional>
    + + + + + +

    For soft redraw.

    + + + + + + + + + + + + + + + + + + + + + +

    focus(targetIdsValue)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    This API highlights specified targets and fade out the others.

    +You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.

    +
    + + + + + + + + + +
    Example
    + +
    // data1 will be highlighted and the others will be faded out
    + chart.focus("data1");
    +
    +// data1 and data2 will be highlighted and the others will be faded out
    +chart.focus(["data1", "data2"]);
    +
    +// all targets will be highlighted
    +chart.focus();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIdsValue + + +String +| + +Array + + + +

    Target ids to be highlighted.

    + + + + + + + + + + + + + + + + + + + + + +

    groups(groups)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Update groups for the targets.

    +
    + + + + + + + + + +
    Example
    + +
    // data1 and data2 will be a new group.
    + chart.groups([
    +    ["data1", "data2"]
    + ]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    groups + + +Array + + + +

    This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.

    + + + + + + + + + + + + + + + + + + + + + +

    hide(targetIdsValueopt, optionsopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Hide data series from chart

    +
    + + + + + + + + + +
    Example
    + +
    // hide 'data1'
    +chart.hide("data1");
    +
    +// hide 'data1' and 'data3'
    +chart.hide(["data1", "data3"]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    targetIdsValue + + +String +| + +Array + + + + + + <optional>
    + + + + + +
    + + all + +

    The target id value.

    options + + +Object + + + + + + <optional>
    + + + + + +
    + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + +
    KeyTypedefaultDescription
    withLegendBooleanfalsewhether or not display legend
    + + + + + + + + + + + + + + + + + + + + + +

    legend․hide(targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Hide legend for each target.

    +
    + + + + + + + + + +
    Example
    + +
    // Hide legend for data1.
    +chart.legend.hide("data1");
    +
    +// Hide legend for data1 and data2.
    +chart.legend.hide(["data1", "data2"]);
    +
    +// Hide all legend.
    +chart.legend.hide();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIds + + +String +| + +Array + + + +
      +
    • If targetIds is given, specified target's legend will be hidden.
    • +
    • If only one target is the candidate, String can be passed.
    • +
    • If no argument is given, all of target's legend will be hidden.
    • +
    + + + + + + + + + + + + + + + + + + + + + +

    legend․show(targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Show legend for each target.

    +
    + + + + + + + + + +
    Example
    + +
    // Show legend for data1.
    +chart.legend.show("data1");
    +
    +// Show legend for data1 and data2.
    +chart.legend.show(["data1", "data2"]);
    +
    +// Show all legend.
    +chart.legend.show();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    targetIds + + +String +| + +Array + + + +
      +
    • If targetIds is given, specified target's legend will be shown.
    • +
    • If only one target is the candidate, String can be passed.
    • +
    • If no argument is given, all of target's legend will be shown.
    • +
    + + + + + + + + + + + + + + + + + + + + + +

    load(args)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Load data to the chart.

    +You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.

    +
      +
    • Note: +unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.
      +done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering
    • +
    +
    + + + + + + + + + +
    Example
    + +
    // Load data1 and unload data2 and data3
    + chart.load({
    +    columns: [
    +       ["data1", 100, 200, 150, ...],
    +       ...
    +   ],
    +   unload: ["data2", "data3"],
    +   url: "...",
    +   done: function() { ... }
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    args + + +Object + + + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyDescription
    - url
    - json
    - rows
    - columns
    The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added
    classesThe classes specified by data.classes will be updated. classes must be Object that has target id as keys.
    categoriesThe categories specified by axis.x.categories or data.x will be updated. categories must be Array.
    axesThe axes specified by data.axes will be updated. axes must be Object that has target id as keys.
    colorsThe colors specified by data.colors will be updated. colors must be Object that has target id as keys.
    - type
    - types
    The type of targets will be updated. type must be String and types must be Object.
    unloadSpecify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur.
    doneThe specified function will be called after data loaded.
    + + + + + + + + + + + + + + + + + + + + + +

    regions(regions) → {Array}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Update regions.

    +
    + + + + + + + + + +
    Example
    + +
    // Show 2 regions
    +chart.regions([
    +   {axis: "x", start: 5, class: "regionX"},
    +   {axis: "y", end: 50, class: "regionY"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    regions + + +Array + + + +

    Regions will be replaced with this argument. The format of this argument is the same as regions.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    regions

    +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + + + + + + +

    regions․add(regions) → {Array}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Add new region.

    +This API adds new region instead of replacing like regions.

    +
    + + + + + + + + + +
    Example
    + +
    // Add a new region
    +chart.regions.add(
    +   {axis: "x", start: 5, class: "regionX"}
    +);
    +
    +// Add new regions
    +chart.regions.add([
    +   {axis: "x", start: 5, class: "regionX"},
    +   {axis: "y", end: 50, class: "regionY"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    regions + + +Array +| + +Object + + + +

    New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    regions

    +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + + + + + + +

    regions․remove(regions) → {Array}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Remove regions.

    +This API removes regions.

    +
    + + + + + + + + + +
    Example
    + +
    // regions that have 'region-A' or 'region-B' will be removed.
    +chart.regions.remove({
    +  classes: [
    +    "region-A", "region-B"
    +  ]
    +});
    +
    +// all of regions will be removed.
    +chart.regions.remove();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    regions + + +Object + + + +

    This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    regions

    +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + + + + + + +

    resize(size)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Resize the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Resize to 640x480
    +chart.resize({
    +   width: 640,
    +   height: 480
    +});
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    size + + +Object + + + +

    This argument should include width and height in pixels.

    + + + + + + + + + + + + + + + + + + + + + +

    revert(Target)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    This API reverts specified targets.

    +You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.

    +
    + + + + + + + + + +
    Example
    + +
    // data1 will be reverted.
    +chart.revert("data1");
    +
    +// data1 and data2 will be reverted.
    +chart.revert(["data1", "data2"]);
    +
    +// all targets will be reverted.
    +chart.revert();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    Target + + +String +| + +Array + + + +

    ids to be reverted

    + + + + + + + + + + + + + + + + + + + + + +

    select(idsopt, indicesopt, resetOtheropt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set data points to be selected. ([data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)

    +
    + + + + + + + + + +
    Example
    + +
    // select all data points
    + chart.select();
    +
    + // select all from 'data2'
    + chart.select("data2");
    +
    + // select all from 'data1' and 'data2'
    + chart.select(["data1", "data2"]);
    +
    + // select from 'data1', indices 2 and unselect others selected
    + chart.select("data1", [2], true);
    +
    + // select from 'data1', indices 0, 3 and 5
    + chart.select("data1", [0, 3, 5]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    ids + + +String +| + +Array + + + + + + <optional>
    + + + + + +

    id value to get selected.

    indices + + +Array + + + + + + <optional>
    + + + + + +

    The index array of data points. If falsy value given, will select all data points.

    resetOther + + +Boolean + + + + + + <optional>
    + + + + + +

    Unselect already selected.

    + + + + + + + + + + + + + + + + + + + + + +

    selected(targetIdopt) → {Array}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get selected data points.

    +By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.

    +
    + + + + + + + + + +
    Example
    + +
    // all selected data points will be returned.
    + chart.selected();
    + // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ]
    +
    + // all selected data points of data1 will be returned.
    + chart.selected("data1");
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    targetId + + +String + + + + + + <optional>
    + + + + + +

    You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    dataPoint Array of the data points.
    ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]

    +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + + + + + + +

    show(targetIdsValueopt, optionsopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Show data series on chart

    +
    + + + + + + + + + +
    Example
    + +
    // show 'data1'
    +chart.show("data1");
    +
    +// show 'data1' and 'data3'
    +chart.show(["data1", "data3"]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    targetIdsValue + + +String +| + +Array + + + + + + <optional>
    + + + + + +
    + + all + +

    The target id value.

    options + + +Object + + + + + + <optional>
    + + + + + +
    + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + +
    KeyTypedefaultDescription
    withLegendBooleanfalsewhether or not display legend
    + + + + + + + + + + + + + + + + + + + + + +

    toggle(targetIdsValueopt, optionsopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.

    +
    + + + + + + + + + +
    Example
    + +
    // toggle 'data1'
    +chart.toggle("data1");
    +
    +// toggle 'data1' and 'data3'
    +chart.toggle(["data1", "data3"]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    targetIdsValue + + +String +| + +Array + + + + + + <optional>
    + + + + + +
    + + all + +

    The target id value.

    options + + +Object + + + + + + <optional>
    + + + + + +
    + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + +
    KeyTypedefaultDescription
    withLegendBooleanfalsewhether or not display legend
    + + + + + + + + + + + + + + + + + + + + + +

    tooltip․hide()

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Hide tooltip

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    tooltip․show(args)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Show tooltip

    +
    + + + + + + + + + +
    Example
    + +
    // show the 2nd x Axis coordinate tooltip
    + chart.tooltip.show({
    +   index: 1
    + });
    +
    + // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element.
    + chart.tooltip.show({
    +   data: {x: 2},
    +   mouse: [50, 100]
    + });
    +
    + // show tooltip for timeseries x axis
    + chart.tooltip.show({
    +   x: new Date("2018-01-02 00:00")
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    args + + +Object + + + +

    The object can consist with following members:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    KeyTypeDescription
    indexNumberDetermine focus by index
    xNumber | DateDetermine focus by x Axis index
    dataObjectDetermine focus data with following keys: x or index.
    When data.xs option is set, the target is determined by mouse position and needs specify x, id and value.
    mouseArrayDetermine x and y coordinate value relative the targeted x Axis element.
    It should be used along with data, index or x value. The default value is set as [0,0]
    + + + + + + + + + + + + + + + + + + + + + +

    transform(type, targetIds)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Change the type of the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // all targets will be bar chart.
    + chart.transform("bar");
    +
    + // only data1 will be bar chart.
    + chart.transform("bar", "data1");
    +
    + // only data1 and data2 will be bar chart.
    + chart.transform("bar", ["data1", "data2"]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    type + + +String + + + +

    Specify the type to be transformed. The types listed in data.type can be used.

    targetIds + + +String +| + +Array + + + +

    Specify targets to be transformed. If not given, all targets will be the candidate.

    + + + + + + + + + + + + + + + + + + + + + +

    unload(args)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Unload data to the chart.

    +You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.

    +
      +
    • Note: +If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.
      +done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
    • +
    +
    + + + + + + + + + +
    Example
    + +
    // Unload data2 and data3
    + chart.unload({
    +   ids: ["data2", "data3"]
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    args + + +Object + + + +
      +
    • If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded.
    • +
    • If done given, the specified function will be called after data loded.
    • +
    + + + + + + + + + + + + + + + + + + + + + +

    unselect(idsopt, indicesopt)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set data points to be un-selected.

    +
    + + + + + + + + + +
    Example
    + +
    // unselect all data points
    + chart.unselect();
    +
    + // unselect all from 'data1'
    + chart.unselect("data1");
    +
    + // unselect from 'data1', indices 2
    + chart.unselect("data1", [2]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    ids + + +String +| + +Array + + + + + + <optional>
    + + + + + +

    id value to be unselected.

    indices + + +Array + + + + + + <optional>
    + + + + + +

    The index array of data points. If falsy value given, will select all data points.

    + + + + + + + + + + + + + + + + + + + + + +

    unzoom()

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Unzoom zoomed area

    +
    + + + + + + + + + +
    Example
    + +
    chart.unzoom();
    + + + + + + + + + + + + + + + + + + + + + + + +

    x(x) → {Object}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set x values for the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get current x values
    + chart.x();
    +
    + // Update x values for all targets
    + chart.x([100, 200, 300, 400, ...]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    x + + +Array + + + +

    If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    xs

    +
    + + + +
    +
    + Type +
    +
    + +Object + + +
    +
    + + + + + + + + + +

    xgrids(grids)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Update x grid lines.

    +
    + + + + + + + + + +
    Example
    + +
    // Show 2 x grid lines
    +chart.xgrids([
    +   {value: 1, text: "Label 1"},
    +   {value: 4, text: "Label 4"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    grids + + +Array + + + +

    X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.

    + + + + + + + + + + + + + + + + + + + + + +

    xgrids․add(grids)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Add x grid lines.
    +This API adds new x grid lines instead of replacing like xgrids.

    +
    + + + + + + + + + +
    Example
    + +
    // Add a new x grid line
    +chart.xgrids.add(
    +  {value: 4, text: "Label 4"}
    +);
    +
    +// Add new x grid lines
    +chart.xgrids.add([
    +  {value: 2, text: "Label 2"},
    +  {value: 4, text: "Label 4"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    grids + + +Array +| + +Object + + + +

    New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.

    + + + + + + + + + + + + + + + + + + + + + +

    xgrids․remove(params)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Remove x grid lines.
    +This API removes x grid lines.

    +
    + + + + + + + + + +
    Example
    + +
    // x grid line on x = 2 will be removed
    +chart.xgrids.remove({value: 2});
    +
    +// x grid lines that have 'grid-A' will be removed
    +chart.xgrids.remove({
    +  class: "grid-A"
    +});
    +
    +// all of x grid lines will be removed
    +chart.xgrids.remove();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    params + + +Object + + + +

    This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.

    + + + + + + + + + + + + + + + + + + + + + +

    xs(xs) → {Object}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Get and set x values for the chart.

    +
    + + + + + + + + + +
    Example
    + +
    // Get current x values
    + chart.xs();
    +
    + // Update x values for all targets
    + chart.xs({
    +   data1: [10, 20, 30, 40, ...],
    +   data2: [100, 200, 300, 400, ...]
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    xs + + +Array + + + +

    If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    xs

    +
    + + + +
    +
    + Type +
    +
    + +Object + + +
    +
    + + + + + + + + + +

    ygrids(grids)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Update y grid lines.

    +
    + + + + + + + + + +
    Example
    + +
    // Show 2 y grid lines
    +chart.ygrids([
    +   {value: 100, text: "Label 1"},
    +   {value: 400, text: "Label 4"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    grids + + +Array + + + +

    Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.

    + + + + + + + + + + + + + + + + + + + + + +

    ygrids․add(grids)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Add y grid lines.
    +This API adds new y grid lines instead of replacing like ygrids.

    +
    + + + + + + + + + +
    Example
    + +
    // Add a new x grid line
    +chart.ygrids.add(
    +  {value: 400, text: "Label 4"}
    +);
    +
    +// Add new x grid lines
    +chart.ygrids.add([
    +  {value: 200, text: "Label 2"},
    +  {value: 400, text: "Label 4"}
    +]);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    grids + + +Array +| + +Object + + + +

    New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.

    + + + + + + + + + + + + + + + + + + + + + +

    ygrids․remove(params)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Remove y grid lines.
    +This API removes x grid lines.

    +
    + + + + + + + + + +
    Example
    + +
    // y grid line on y = 200 will be removed
    +chart.ygrids.remove({value: 200});
    +
    +// y grid lines that have 'grid-A' will be removed
    +chart.ygrids.remove({
    +  class: "grid-A"
    +});
    +
    +// all of y grid lines will be removed
    +chart.ygrids.remove();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    params + + +Object + + + +

    This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.

    + + + + + + + + + + + + + + + + + + + + + +

    zoom(domainValue) → {Array}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Zoom by giving x domain.

    +
    + + + + + + + + + +
    Example
    + +
    // Zoom to specified domain
    + chart.zoom([10, 20]);
    +
    + // Get the current zoomed domain
    + chart.zoom();
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    domainValue + + +Array + + + +

    If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    domain value in array

    +
    + + + +
    +
    + Type +
    +
    + +Array + + +
    +
    + + + + + + + + + +

    zoom․enable(enabled)

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Enable and disable zooming.

    +
    + + + + + + + + + +
    Example
    + +
    // Enable zooming using the mouse wheel
    + chart.zoom.enable(true);
    + // Or
    + chart.zoom.enable("wheel");
    +
    + // Enable zooming by dragging
    + chart.zoom.enable("drag");
    +
    + // Disable zooming
    + chart.zoom.enable(false);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    enabled + + +String +| + +Boolean + + + +

    Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.
    When set to false, the current zooming status will be reset.

    + + + + + + + + + + + + + + + + + + + + + +

    zoom․max(maxopt) → {Number}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set or get x Axis maximum zoom range value

    +
    + + + + + + + + + +
    Example
    + +
    // Set maximum range value
    + chart.zoom.max(20);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    max + + +Number + + + + + + <optional>
    + + + + + +

    maximum value to set for zoom

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    zoom max value

    +
    + + + +
    +
    + Type +
    +
    + +Number + + +
    +
    + + + + + + + + + +

    zoom․min(minopt) → {Number}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set or get x Axis minimum zoom range value

    +
    + + + + + + + + + +
    Example
    + +
    // Set minimum range value
    + chart.zoom.min(-1);
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    min + + +Number + + + + + + <optional>
    + + + + + +

    minimum value tp set for zoom

    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    zoom min value

    +
    + + + +
    +
    + Type +
    +
    + +Number + + +
    +
    + + + + + + + + + +

    zoom․range(rangeopt) → {Object}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Set zoom range

    +
    + + + + + + + + + +
    Example
    + +
    chart.zoom.range({
    +     min: 10,
    +     max: 100
    + });
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    range + + +Object + + + + + + <optional>
    + + + + + +
    + + + + + + + + + + + + + + +
    Returns:
    + + +
    +

    zoom range value +{ + min: 0, + max: 100 +}

    +
    + + + +
    +
    + Type +
    +
    + +Object + + +
    +
    + + + + + + + + + + +
    + +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/Options.html b/doc/Options.html new file mode 100644 index 000000000..9ff835a4b --- /dev/null +++ b/doc/Options.html @@ -0,0 +1,18112 @@ + + + + + + Options - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    Options

    + + + + + + + +
    + +
    + +

    + Options +

    + + +
    + +
    + +
    + + + + + +

    new Options()

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    See:
    +
    +
      +
    • bb.generate to use these options on generating the chart
    • +
    +
    + + + +
    + + + + + +
    +

    Class to set options on generating chart.

    +
      +
    • It's instantiated internally, not exposed for public.
    • +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + +

    Members

    + + + +

    (static) area :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    area.zerobased + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Set if min or max value will be 0 on area chart.

    area.above + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +
    + + + + + + +
    +

    Set area options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    area: {
    +     zerobased: false,
    +     above: true
    + }
    + + + + + +

    (static) axis․rotated :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Switch x and y axis position.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  rotated: true
    +}
    + + + + + +

    (static) axis․x․categories :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • []
    • +
    + + + + + + + +
    + + + + + +
    +

    Set category names on category axis. +This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    categories: ["Category 1", "Category 2", ...]
    +  }
    +}
    + + + + + +

    (static) axis․x․clipPath :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set clip-path attribute for x axis element

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    // don't set 'clip-path' attribute
    +clipPath: false
    + + + + + +

    (static) axis․x․extent :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set default extent for subchart and zoom. This can be an array or function that returns an array.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner
    +    // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521
    +    extent: [
    +        [0, 0], [200, 60]
    +    ]
    +  }
    +}
    + + + + + +

    (static) axis․x․height :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set height of x axis.

    +The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    height: 20
    +  }
    +}
    + + + + + +

    (static) axis․x․label :String|Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set label on x axis.

    + You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default.

    +
      +
    • If it's horizontal axis:
        +
      • inner-right [default]
      • +
      • inner-center
      • +
      • inner-left
      • +
      • outer-right
      • +
      • outer-center
      • +
      • outer-left
      • +
      +
    • +
    • If it's vertical axis:
        +
      • inner-top [default]
      • +
      • inner-middle
      • +
      • inner-bottom
      • +
      • outer-top
      • +
      • outer-middle
      • +
      • outer-bottom
      • +
      +
    • +
    +
    + + + +
    Type:
    +
      +
    • + +String +| + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    label: "Your X Axis"
    +  }
    +}
    +
    +axis: {
    +  x: {
    +    label: {
    +       text: "Your X Axis",
    +       position: "outer-center"
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․localtime :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set how to treat the timezone of x values.
    +If true, treat x value as localtime. If false, convert to UTC internally.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    localtime: false
    +  }
    +}
    + + + + + +

    (static) axis․x․max :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set max value of x axis range.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    max: 100
    +  }
    +}
    + + + + + +

    (static) axis․x․min :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set min value of x axis range.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    min: -100
    +  }
    +}
    + + + + + +

    (static) axis․x․padding :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set padding for x axis.

    +If this option is set, the range of x axis will increase/decrease according to the values. +If no padding is needed in the rage of x axis, 0 should be set.

    +
      +
    • NOTE: +The padding values aren't based on pixels. It differs according axis types
        +
      • category: The unit of tick value +ex. the given value 1, is same as the width of 1 tick width
      • +
      • timeseries: Numeric time value +ex. the given value 1000*60*60*24, which is numeric time equivalent of a day, is same as the width of 1 tick width
      • +
      +
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    padding: {
    +      // when axis type is 'category'
    +      left: 1,  // set left padding width of equivalent value of a tick's width
    +      right: 0.5  // set right padding width as half of equivalent value of tick's width
    +
    +      // when axis type is 'timeseries'
    +      left: 1000*60*60*24,  // set left padding width of equivalent value of a day tick's width
    +      right: 1000*60*60*12   // set right padding width as half of equivalent value of a day tick's width
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․show :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Show or hide x axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    show: false
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․centered :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Centerise ticks on category axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      centered: true
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․count :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    The number of x axis ticks to show.

    +This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      count: 5
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․culling :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • - true for indexed axis and timeseries axis +- false for category axis
    • +
    + + + + + + + +
    + + + + + +
    +

    Setting for culling ticks.

    +If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.

    +We can change the number of ticks to be shown by axis.x.tick.culling.max.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      culling: false
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․culling․max :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • 10
    • +
    + + + + + + + +
    + + + + + +
    +

    The number of tick texts will be adjusted to less than this value.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      culling: {
    +          max: 5
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․fit :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Fit x axis ticks.

    +If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      fit: false
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․format :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    A function to format tick value. Format string is also available for timeseries data.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +       // for timeseries, a 'datetime' object is given as parameter
    +      format: function(x) {
    +          return x.getFullYear();
    +      }
    +
    +      // for category, index(Number) and categoryName(String) are given as parameter
    +      format: function(index, categoryName) {
    +          return categoryName.substr(0, 10);
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․multiline :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set tick text to be multiline

    +
      +
    • NOTE:
      +

      When x tick text contains \n, it's used as line break and 'axis.x.tick.width' option is ignored.

      +
      +
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Examples
    + +
    axis: {
    +  x: {
    +    tick: {
    +      multiline: false
    +    }
    +  }
    +}
    + +
    // example of line break with '\n'
    +// In this case, 'axis.x.tick.width' is ignored
    +data: {
    +   x: "x",
    +   columns: [
    +       ["x", "long\ntext", "Another\nLong\nText"],
    +       ...
    +   ],
    +}
    + + + + + +

    (static) axis․x․tick․outer :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Show x axis outer tick.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      outer: false
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․rotate :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • 0
    • +
    + + + + + + + +
    + + + + + +
    +

    Rotate x axis tick text.
    +If you set negative value, it will rotate to opposite direction.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      rotate: 60
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․text․position :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {x: 0, y:0}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the x Axis tick text's position relatively its original position

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      text: {
    +        position: {
    +          x: 10,
    +          y: 10
    +        }
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․tooltip :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Set to display system tooltip for tick text

    +
      +
    • NOTE: Only available for category axis type (axis.x.type='category')
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      tooltip: true
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․values :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • null
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the x values of ticks manually.

    +If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      values: [1, 2, 4, 8, 16, 32, ...]
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․tick․width :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • null
    • +
    + + + + + + + +
    + + + + + +
    +

    Set tick width

    +
      +
    • NOTE:
      +

      When x tick text contains \n, this option is ignored.

      +
      +
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    tick: {
    +      width: 50
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․x․type :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • indexed
    • +
    + + + + + + + +
    + + + + + +
    +

    Set type of x axis.

    +Available Values:

    +
      +
    • timeseries
    • +
    • category
    • +
    • indexed
    • +
    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  x: {
    +    type: "timeseries"
    +  }
    +}
    + + + + + +

    (static) axis․y2․center :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set center value of y2 axis.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    center: 0
    +  }
    +}
    + + + + + +

    (static) axis․y2․default :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set default range of y2 axis.

    +This option set the default value for y2 axis when there is no data on init.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    default: [0, 1000]
    +  }
    +}
    + + + + + +

    (static) axis․y2․inner :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Show y2 axis inside of the chart.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    inner: true
    +  }
    +}
    + + + + + +

    (static) axis․y2․inverted :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Change the direction of y2 axis.

    +If true set, the direction will be from the top to the bottom.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    inverted: true
    +  }
    +}
    + + + + + +

    (static) axis․y2․label :String|Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set label on y2 axis.

    +You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label.

    +
    + + + +
    Type:
    +
      +
    • + +String +| + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    label: "Your Y2 Axis"
    +  }
    +}
    +
    +axis: {
    +  y2: {
    +    label: {
    +       text: "Your Y2 Axis",
    +       position: "outer-middle"
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․max :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set max value of y2 axis.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    max: 1000
    +  }
    +}
    + + + + + +

    (static) axis․y2․min :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set min value of y2 axis.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    min: -1000
    +  }
    +}
    + + + + + +

    (static) axis․y2․padding :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the number of y2 axis ticks.

    +
      +
    • NOTE: This works in the same way as axis.y.tick.count.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    padding: {
    +      top: 100,
    +      bottom: 100
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․show :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Show or hide y2 axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    show: true
    +  }
    +}
    + + + + + +

    (static) axis․y2․tick․count :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the number of y2 axis ticks.

    +
      +
    • NOTE: This works in the same way as axis.y.tick.count.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    tick: {
    +      count: 5
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․tick․format :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set formatter for y2 axis tick text.

    +This option works in the same way as axis.y.format.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    tick: {
    +      format: d3.format("$,")
    +      //or format: function(d) { return "$" + d; }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․tick․outer :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Show or hide y2 axis outer tick.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    tick: {
    +      outer: false
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․tick․text․position :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {x: 0, y:0}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the y2 Axis tick text's position relatively its original position

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    tick: {
    +      text: {
    +        position: {
    +          x: 10,
    +          y: 10
    +        }
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y2․tick․values :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • null
    • +
    + + + + + + + +
    + + + + + +
    +

    Set y2 axis tick values manually.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y2: {
    +    tick: {
    +      values: [100, 1000, 10000]
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․center :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set center value of y axis.

    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    center: 0
    +  }
    +}
    + + + + + +

    (static) axis․y․clipPath :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set clip-path attribute for y axis element

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    // don't set 'clip-path' attribute
    +clipPath: false
    + + + + + +

    (static) axis․y․default :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set default range of y axis.

    +This option set the default value for y axis when there is no data on init.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    default: [0, 1000]
    +  }
    +}
    + + + + + +

    (static) axis․y․inner :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Show y axis inside of the chart.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    inner: true
    +  }
    +}
    + + + + + +

    (static) axis․y․inverted :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Change the direction of y axis.

    +If true set, the direction will be from the top to the bottom.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    inverted: true
    +  }
    +}
    + + + + + +

    (static) axis․y․label :String|Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set label on y axis.

    +You can set y axis label and change its position by this option. This option works in the same way as axis.x.label.

    +
    + + + +
    Type:
    +
      +
    • + +String +| + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    label: "Your Y Axis"
    +  }
    +}
    +
    +axis: {
    +  y: {
    +    label: {
    +       text: "Your Y Axis",
    +       position: "outer-middle"
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․max :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set max value of y axis.

    +
      +
    • NOTE: Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    max: 1000
    +  }
    +}
    + + + + + +

    (static) axis․y․min :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set min value of y axis.

    +
      +
    • NOTE: +Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    min: 1000
    +  }
    +}
    + + + + + +

    (static) axis․y․padding :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set padding for y axis.

    +You can set padding for y axis to create more space on the edge of the axis. +This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.

    + +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    padding: {
    +      top: 0,
    +      bottom: 0
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․show :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Show or hide y axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    show: false
    +  }
    +}
    + + + + + +

    (static) axis․y․tick․count :Number

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the number of y axis ticks.

    +
      +
    • NOTE: The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Number + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    tick: {
    +      count: 5
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․tick․format :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set formatter for y axis tick text.

    +This option accepts d3.format object as well as a function you define.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    tick: {
    +      format: function(x) {
    +          return x.getFullYear();
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․tick․outer :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Show y axis outer tick.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    tick: {
    +      outer: false
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․tick․text․position :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {x: 0, y:0}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set the y Axis tick text's position relatively its original position

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    tick: {
    +      text: {
    +        position: {
    +          x: 10,
    +          y: 10
    +        }
    +      }
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․tick․values :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • null
    • +
    + + + + + + + +
    + + + + + +
    +

    Set y axis tick values manually.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    tick: {
    +      values: [100, 1000, 10000]
    +    }
    +  }
    +}
    + + + + + +

    (static) axis․y․type :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set type of y axis.

    +Available Values:

    +
      +
    • timeseries
    • +
    • category
    • +
    • indexed
    • +
    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    axis: {
    +  y: {
    +    type: "timeseries"
    +  }
    +}
    + + + + + +

    (static) bar :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    bar.padding + + +Boolean + + + + + + <optional>
    + + + +
    + + 0 + +

    The padding pixel value between each bar.

    bar.radius + + +Number + + + + + + <optional>
    + + + +
    + +

    Set the radius of bar edge in pixel.
    - NOTE: Only for non-stacking bars.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    ratio + + +Number + + + + + + <optional>
    + + + +

    Set the radius ratio of bar edge in relative the bar's width.

    + +
    bar.width + + +Number + + + + + + <optional>
    + + + +
    + +

    Change the width of bar chart.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    ratio + + +Number + + + + + + <optional>
    + + + +
    + + 0.6 + +

    Change the width of bar chart by ratio.

    max + + +Number + + + + + + <optional>
    + + + +
    + +

    The maximum width value for ratio.

    + +
    bar.zerobased + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Set if min or max value will be 0 on bar chart.

    + + + + + + +
    +

    Set bar options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    bar: {
    +     padding: 1,
    +
    +     // the 'radius' option can be used only for non-stacking bars
    +     radius: 10,
    +     // or
    +     radius: {
    +         ratio: 0.5
    +     }
    +
    +     width: 10,
    +     // or
    +     width: {
    +         ratio: 0.2,
    +         max: 20
    +     },
    +
    +     zerobased: false
    + }
    + + + + + +

    (static) bindto

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • #chart
    • +
    + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDefaultDescription
    bindto + + +String +| + +HTMLElement +| + +d3.selection + + + + + + #chart + +

    Specify the element where chart will be drawn.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    element + + +String +| + +HTMLElement +| + +d3.selection + + + + + + + + + + #chart + +

    Specify the element where chart will be drawn.

    classname + + +String + + + + + + <optional>
    + + + +
    + + bb + +

    Specify the class name of bind element.
    + NOTE: When class name isn't bb, then you also need to update the default CSS to be rendered correctly.

    + +
    + + + + + + +
    +

    Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also. +If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).

    +If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.

    +
    + + + + + + + +
    Example
    + +
    bindto: "#myContainer"
    +
    +// or HTMLElement
    +bindto: document.getElementById("myContainer")
    +
    +// or D3 selection object
    +bindto: d3.select("#myContainer")
    +
    +// or to change default classname
    +bindto: {
    +   element: "#chart",
    +   classname: "bill-board"  // ex) <div id='chart' class='bill-board'>
    +}
    + + + + + +

    (static) bubble :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    bubble.maxR + + +Number +| + +function + + + + + + <optional>
    + + + +
    + + 35 + +

    Set the max bubble radius value

    + + + + + + +
    +

    Set bubble options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    bubble: {
    +     // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.
    +     // And the lesser will have radius relatively from tha max value.
    +     maxR: 50,
    +
    +     // or set radius callback
    +     maxR: function(d) {
    +         // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5}
    +         ...
    +         return Math.sqrt(d.value * 2);
    +     }
    + }
    + + + + + +

    (static) clipPath :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set 'clip-path' attribute for chart element

    +
      +
    • NOTE:
      +

      When is false, chart node element is positioned after the axis node in DOM tree hierarchy. +Is to make chart element positioned over axis element.

      +
      +
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    // don't set 'clip-path' attribute
    +clipPath: false
    + + + + + +

    (static) color :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    color.pattern + + +Array + + + + + + <optional>
    + + + +

    custom color pattern

    color.tiles + + +function + + + + + + <optional>
    + + + +

    if defined, allows use svg's patterns to fill data area. It should return an array of SVGPatternElement.

    +
      +
    • NOTE: The pattern element's id will be defined as bb-colorize-pattern-$COLOR-VALUE.
      +ex. When color pattern value is ['red', '#fff'] and defined 2 patterns,then ids for pattern elements are:
        +
      • bb-colorize-pattern-red
      • +
      • bb-colorize-pattern-fff
      • +
      +
    • +
    color.threshold + + +Object + + + + + + <optional>
    + + + +

    color threshold

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    unit + + +String + + + + + + <optional>
    + + + +
    + +

    unit

    value + + +Array + + + + + + <optional>
    + + + +
    + +

    value

    max + + +Array + + + + + + <optional>
    + + + +
    + + 100 + +

    max value

    + +
    + + + + + + +
    +

    Set color of the data values

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    color: {
    +     pattern: ["#1f77b4", "#aec7e8", ...],
    +
    +     // Set colors' patterns
    +     // it should return an array of SVGPatternElement
    +     tiles: function() {
    +        var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    +        var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
    +        var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    +
    +        pattern.setAttribute("patternUnits", "userSpaceOnUse");
    +        pattern.setAttribute("width", "32");
    +        pattern.setAttribute("height", "32");
    +
    +        g.style.fill = "#000";
    +        g.style.opacity = "0.2";
    +
    +        circle1.setAttribute("cx", "3");
    +        circle1.setAttribute("cy", "3");
    +        circle1.setAttribute("r", "3");
    +
    +        g.appendChild(circle1);
    +        pattern.appendChild(g);
    +
    +        return [pattern];
    +     }
    + }
    + + + + + +

    (static) data․axes :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set y axis the data related to. y and y2 can be used.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  axes: {
    +    data1: "y",
    +    data2: "y2"
    +  }
    +}
    + + + + + +

    (static) data․classes :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set custom data class.

    +If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  classes: {
    +    data1: "additional-data1-class",
    +    data2: "additional-data2-class"
    +  }
    +}
    + + + + + +

    (static) data․color :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set color converter function.

    +This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  color: function(color, d) { ... }
    +}
    + + + + + +

    (static) data․colors :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set color for each data.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  colors: {
    +    data1: "#ff0000",
    +    ...
    +  }
    +}
    + + + + + +

    (static) data․columns :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  columns: [
    +     ["data1", 30, 20, 50, 40, 60, 50],
    +     ["data2", 200, 130, 90, 240, 130, 220],
    +     ["data3", 300, 200, 160, 400, 250, 250]
    +  ]
    +}
    +
    +// for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +// - an array of [high, mid, low] data following the order
    +// - or an object with 'high', 'mid' and 'low' key value
    +data: {
    +  columns: [
    +     ["data1",
    +         [150, 140, 110],  // or {high:150, mid: 140, low: 110}
    +         [150, 140, 110],
    +         [150, 140, 110]
    +     ]
    +  ],
    +  type: "area-line-range"
    +}
    + + + + + +

    (static) data․empty․label․text :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • ""
    • +
    + + + + + + + +
    + + + + + +
    +

    Set text displayed when empty data.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  empty: {
    +    label: {
    +      text: "No Data"
    +    }
    +  }
    +}
    + + + + + +

    (static) data․groups :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • []
    • +
    + + + + + + + +
    + + + + + +
    +

    Set groups for the data for stacking.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  groups: [
    +    ["data1", "data2"],
    +    ["data3"]
    +  ]
    +}
    + + + + + +

    (static) data․hide :Boolean|Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Hide each data when the chart appears.

    +If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean +| + +Array + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  // all of data will be hidden
    +  hide: true
    +
    +  // specified data will be hidden
    +  hide: ["data1", ...]
    +}
    + + + + + +

    (static) data․json :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + +
    See:
    +
    +
      +
    • data․keys
    • +
    +
    + + + +
    + + + + + +
    +

    Parse a JSON object for data. See also data.keys.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    json: [
    +      {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +      {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +      {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +      {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +    ],
    +    keys: {
    +      // x: "name", // it's possible to specify 'x' when category axis
    +      value: ["upload", "download"]
    +    }
    +}
    + + + + + +

    (static) data․keys :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Choose which JSON object keys correspond to desired data.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    json: [
    +      {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +      {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +      {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +      {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +    ],
    +    keys: {
    +      // x: "name", // it's possible to specify 'x' when category axis
    +      value: ["upload", "download"]
    +    }
    +}
    + + + + + +

    (static) data․labels :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    data.labels + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show or hide labels on each data points

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    format + + +function + + + + + + <optional>
    + + + +
    + + {} + +

    Set formatter function for data labels.
    +The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:

    +
      +
    • v is the value of the data point where the label is shown.
    • +
    • id is the id of the data where the label is shown.
    • +
    • i is the index of the data point where the label is shown.
    • +
    • j is the sub index of the data point where the label is shown.

      +Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
    • +
    position.x + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    x coordinate position, relative the original.

    position.y + + +NUmber + + + + + + <optional>
    + + + +
    + + 0 + +

    y coordinate position, relative the original.

    + +
    + + + + + + +
    +

    Set labels options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  labels: true,
    +
    +  // or set specific options
    +  labels: {
    +    format: function(v, id, i, j) { ... },
    +
    +    // it's possible to set for each data
    +    format: {
    +        data1: function(v, id, i, j) { ... },
    +        ...
    +    },
    +    position: {
    +       x: -10,
    +       y: 10
    +    }
    +  }
    +}
    + + + + + +

    (static) data․mimeType :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Used if loading JSON via data.url.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    mimeType: "json"
    +}
    + + + + + +

    (static) data․names :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set custom data name.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  names: {
    +    data1: "Data Name 1",
    +    data2: "Data Name 2"
    +  }
    +}
    + + + + + +

    (static) data․onclick :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for click event on each data point.

    +This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    onclick: function(d, element) { ... }
    +}
    + + + + + +

    (static) data․onmax :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for maximum data

    +
      +
    • NOTE: For 'area-line-range' and 'area-spline-range', mid data will be taken for the comparison
    • +
    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onmax: function(data) {
    +   // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +   ...
    + }
    + + + + + +

    (static) data․onmin :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for minimum data

    +
      +
    • NOTE: For 'area-line-range' and 'area-spline-range', mid data will be taken for the comparison
    • +
    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onmin: function(data) {
    +   // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +   ...
    + }
    + + + + + +

    (static) data․onout :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for mouse/touch out event on each data point.

    +This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    onout: function(d) { ... }
    +}
    + + + + + +

    (static) data․onover :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for mouse/touch over event on each data point.

    +This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    onover: function(d) { ... }
    +}
    + + + + + +

    (static) data․onselected :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for on data selection.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    onselected: function(d, element) {
    +       // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +       // element - <circle>
    +       ...
    +   }
    +}
    + + + + + +

    (static) data․onunselected :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for on data un-selection.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    onunselected: function(d, element) {
    +       // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +       // element - <circle>
    +       ...
    +   }
    +}
    + + + + + +

    (static) data․order :String|function|null

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • desc
    • +
    + + + + + + + +
    + + + + + +
    +

    This option changes the order of stacking data and pieces of pie/donut.

    +
      +
    • If null specified, it will be the order the data loaded.
    • +
    • If function specified, it will be used as Array.sort compareFunction

      +

      Available Values:

      +
    • +
    • desc: In descending order
    • +
    • asc: In ascending order
    • +
    • null: It keeps the data load order
    • +
    • function(data1, data2) { ... }: Array.sort compareFunction
    • +
    +
    + + + +
    Type:
    +
      +
    • + +String +| + +function +| + +null + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  // in descending order (default)
    +  order: "desc"
    +
    +  // in ascending order
    +  order: "asc"
    +
    +  // keeps data input order
    +  order: null
    +
    +  // specifying sort function
    +  order: function(a, b) {
    +      // param data passed format
    +      {
    +         id: "data1", id_org: "data1", values: [
    +             {x: 5, value: 250, id: "data1", index: 5, name: "data1"},
    +             ...
    +         ]
    +      }
    +  }
    +}
    + + + + + +

    (static) data․regions :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Define regions for each data.
    +The values must be an array for each data and it should include an object that has start, end and style.

    +
      +
    • The object type should be as:
        +
      • start {Number}: Start data point number. If not set, the start will be the first data point.
      • +
      • [end] {Number}: End data point number. If not set, the end will be the last data point.
      • +
      • [style.dasharray="2 2"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
      • +
      +
    • +
    • NOTE: Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  regions: {
    +    data1: [{
    +        start: 1,
    +        end: 2,
    +        style: {
    +            dasharray: "5 2"
    +        }
    +    }, {
    +        start: 3
    +    }],
    +    ...
    +  }
    +}
    + + + + + +

    (static) data․rows :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  rows: [
    +    ["A", "B", "C"],
    +    [90, 120, 300],
    +    [40, 160, 240],
    +    [50, 200, 290],
    +    [120, 160, 230],
    +    [80, 130, 300],
    +    [90, 220, 320]
    +  ]
    +}
    +
    +// for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +// - an array of [high, mid, low] data following the order
    +// - or an object with 'high', 'mid' and 'low' key value
    +data: {
    +  rows: [
    +     ["data1", "data2"],
    +     [
    +       // or {high:150, mid: 140, low: 110}, 120
    +       [150, 140, 110], 120
    +     ],
    +     [[155, 130, 115], 55],
    +     [[160, 135, 120], 60]
    +  ],
    +  types: {
    +      data1: "area-line-range",
    +      data2: "line"
    +  }
    +}
    + + + + + +

    (static) data․selection․draggable :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Enable to select data points by dragging. +If this option set true, data points can be selected by dragging.

    +
      +
    • NOTE: If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   selection: {
    +      draggable: true
    +  }
    +}
    + + + + + +

    (static) data․selection․enabled :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Set data selection enabled.

    +If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   selection: {
    +      enabled: true
    +   }
    +}
    + + + + + +

    (static) data․selection․grouped :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • false
    • +
    + + + + + + + +
    + + + + + +
    +

    Set grouped selection enabled.

    +If this option set true, multiple data points that have same x value will be selected by one selection.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   selection: {
    +      grouped: true
    +   }
    +}
    + + + + + +

    (static) data․selection․isselectable :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function() { return true; }
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback for each data point to determine if it's selectable or not.

    +The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   selection: {
    +      isselectable: function(d) { ... }
    +   }
    +}
    + + + + + +

    (static) data․selection․multiple :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set multiple data points selection enabled.

    +If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   selection: {
    +      multiple: false
    +   }
    +}
    + + + + + +

    (static) data․type :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • line
    • +
    + + + + + + + +
    + + + + + +
    +

    Set chart type at once.

    +If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.

    +Available Values:

    +
      +
    • area
    • +
    • area-line-range
    • +
    • area-spline
    • +
    • area-spline-range
    • +
    • area-step
    • +
    • bar
    • +
    • bubble
    • +
    • donut
    • +
    • gauge
    • +
    • line
    • +
    • pie
    • +
    • radar
    • +
    • scatter
    • +
    • spline
    • +
    • step
    • +
    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +   type: "bar"
    +}
    + + + + + +

    (static) data․types :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set chart type for each data.
    +This setting overwrites data.type setting.

    +
      +
    • NOTE: radar type can't be combined with other types.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  types: {
    +    data1: "bar",
    +    data2: "spline"
    +  }
    +}
    + + + + + +

    (static) data․url :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +    url: "/data/test.csv"
    +}
    + + + + + +

    (static) data․x :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Specify the key of x values in the data.

    +We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  x: "date"
    +}
    + + + + + +

    (static) data․xFormat :String

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • %Y-%m-%d
    • +
    + + + + + +
    See:
    +
    + +
    + + + +
    + + + + + +
    +

    Set a format to parse string specifed as x.

    +
    + + + +
    Type:
    +
      +
    • + +String + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  xFormat: "%Y-%m-%d %H:%M:%S"
    +}
    + + + + + +

    (static) data․xLocaltime :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Set localtime format to parse x axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  xLocaltime: false
    +}
    + + + + + +

    (static) data․xs :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • {}
    • +
    + + + + + + + +
    + + + + + +
    +

    Specify the keys of the x values for each data.

    +This option can be used if we want to show the data that has different x values.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  xs: {
    +     data1: "x1",
    +     data2: "x2"
    +  }
    +}
    + + + + + +

    (static) data․xSort :Boolean

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • true
    • +
    + + + + + + + +
    + + + + + +
    +

    Sort on x axis.

    +
    + + + +
    Type:
    +
      +
    • + +Boolean + + +
    • +
    + + + + + +
    Example
    + +
    data: {
    +  xSort: false
    +}
    + + + + + +

    (static) donut :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    donut.label.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide label on each donut piece.

    donut.label.format + + +function + + + + + + <optional>
    + + + +
    + +

    Set formatter for the label on each donut piece.

    donut.label.threshold + + +Number + + + + + + <optional>
    + + + +
    + + 0.05 + +

    Set threshold to show/hide labels.

    donut.label.ratio + + +Number +| + +function + + + + + + <optional>
    + + + +
    + +

    Set ratio of labels position.

    donut.expand + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Enable or disable expanding donut pieces.

    donut.width + + +Number + + + + + + <optional>
    + + + +
    + +

    Set width of donut chart.

    donut.title + + +String + + + + + + <optional>
    + + + +
    + + "" + +

    Set title of donut chart. Use \n character to enter line break.

    donut.padAngle + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Set padding between data.

    + + + + + + +
    +

    Set donut options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    donut: {
    +     label: {
    +         show: false,
    +         format: function(value, ratio, id) {
    +             return d3.format("$")(value);
    +         },
    +         threshold: 0.1,
    +
    +         // set ratio callback. Should return ratio value
    +         ratio: function(d, radius, h) {
    +         	...
    +         	return ratio;
    +         },
    +         // or set ratio number
    +         ratio: 0.5
    +     },
    +     expand: false,
    +     width: 10,
    +     padAngle: 0.2,
    +     title: "Donut Title"
    +
    +     // title with line break
    +     title: "Title1\nTitle2"
    + }
    + + + + + +

    (static) gauge :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    gauge.fullCircle + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.

    gauge.label.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide label on gauge.

    gauge.label.format + + +function + + + + + + <optional>
    + + + +
    + +

    Set formatter for the label on gauge. Label text can be multilined with \n character.

    gauge.label.extents + + +function + + + + + + <optional>
    + + + +
    + +

    Set customized min/max label text.

    gauge.expand + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Enable or disable expanding gauge.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    duration + + +Number + + + + + + <optional>
    + + + +
    + + 50 + +

    Set the expand transition time in milliseconds.

    + +
    gauge.min + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Set min value of the gauge.

    gauge.max + + +Number + + + + + + <optional>
    + + + +
    + + 100 + +

    Set max value of the gauge.

    gauge.startingAngle + + +Number + + + + + + <optional>
    + + + +
    + + -1 * Math.PI / 2 + +
    gauge.units + + +String + + + + + + <optional>
    + + + +
    + +

    Set units of the gauge.

    gauge.width + + +Number + + + + + + <optional>
    + + + +
    + +

    Set width of gauge chart.

    + + + + + + +
    +

    Set gauge options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    gauge: {
    +     fullCircle: false,
    +     label: {
    +         show: false,
    +         format: function(value, ratio) {
    +             return value;
    +
    +             // to multiline, return with '\n' character
    +             // return value +"%\nLine1\n2Line2";
    +         },
    +         extents: function(value, isMax) {
    +             return (isMax ? "Max:" : "Min:") + value;
    +         }
    +     },
    +     expand: false,
    +
    +     // or set duration
    +     expand: {
    +         duration: 20
    +     },
    +     min: -100,
    +     max: 200,
    +     units: "%",
    +     width: 10
    + }
    + + + + + +

    (static) grid :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    front + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Set 'grid & focus lines' to be positioned over grid lines and chart elements.

    x.show + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show grids along x axis.

    x.lines + + +Boolean + + + + + + <optional>
    + + + +
    + + [] + +

    Show additional grid lines along x axis.
    + This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available. + If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.

    y.show + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show grids along x axis.

    y.lines + + +Boolean + + + + + + <optional>
    + + + +
    + + [] + +

    Show additional grid lines along y axis.
    + This option accepts array including object that has value, text, position and class.

    y.ticks + + +Boolean + + + + + + <optional>
    + + + +
    + + 10 + +

    Number of y grids to be shown.

    focus.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show grids when focus.

    lines.front + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Set grid lines to be positioned over chart elements.

    + + + + + + +
    +

    Set related options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    grid: {
    +  x: {
    +    show: true,
    +    lines: [
    +      {value: 2, text: "Label on 2"},
    +      {value: 5, text: "Label on 5", class: "label-5"}
    +      {value: 6, text: "Label on 6", position: "start"}
    +    ]
    +  },
    +  y: {
    +    show: true,
    +    lines: [
    +      {value: 100, text: "Label on 100"},
    +      {value: 200, text: "Label on 200", class: "label-200"}
    +      {value: 300, text: "Label on 300", position: 'middle'}
    +    ],
    +    ticks: 5
    +  },
    +  front: true,
    +  focus: {
    +     show: false
    +  },
    +  lines: {
    +     front: false
    +  }
    +}
    + + + + + +

    (static) interaction :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    interaction.enabled + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Indicate if the chart should have interactions.
    + If false is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.

    interaction.brighten + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Make brighter for the selected area (ex. 'pie' type data selected area)

    interaction.inputType.mouse + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    enable or disable mouse interaction

    interaction.inputType.touch + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    enable or disable touch interaction

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    preventDefault + + +Boolean +| + +Number + + + + + + <optional>
    + + + +
    + + false + +

    enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.

    + +
    + + + + + + +
    +

    Interaction options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    interaction: {
    +   enabled: false,
    +   inputType: {
    +       mouse: true,
    +       touch: false
    +
    +       // or declare preventDefault explicitly.
    +       // In this case touch inputType is enabled by default
    +       touch: {
    +           preventDefault: true
    +
    +           // or threshold pixel value (pixel moved from touchstart to touchmove)
    +           preventDefault: 5
    +       }
    +   }
    +}
    + + + + + +

    (static) legend :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    legend.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide legend.

    legend.hide + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Hide legend + If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.

    legend.contents.bindto + + +String +| + +HTMLElement + + + + + + <optional>
    + + + +
    + +

    Set CSS selector or element reference to bind legend items.

    legend.contents.template + + +String +| + +function + + + + + + <optional>
    + + + +
    + +

    Set item's template.

    +
      +
    • If set string value, within template the 'color' and 'title' can be replaced using template-like syntax string:
        +
      • {=COLOR}: data color value
      • +
      • {=TITLE}: data title value
      • +
      +
    • +
    • If set function value, will pass following arguments to the given function:
        +
      • title {String}: data's id value
      • +
      • color {String}: color string
      • +
      • data {Array}: data array
      • +
      +
    • +
    legend.position + + +String + + + + + + <optional>
    + + + +
    + + bottom + +

    Change the position of legend.
    + Available values are: bottom, right and inset are supported.

    legend.inset + + +Object + + + + + + <optional>
    + + + +
    + + {anchor: 'top-left',x: 10,y: 0,step: undefined} + +

    Change inset legend attributes.
    + This option accepts object that has the keys anchor, x, y and step.

    +
      +
    • anchor decides the position of the legend:
        +
      • top-left
      • +
      • top-right
      • +
      • bottom-left
      • +
      • bottom-right
      • +
      +
    • +
    • x and y:
        +
      • set the position of the legend based on the anchor.
      • +
      +
    • +
    • step:
        +
      • defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
      • +
      +
    • +
    legend.equally + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Set to all items have same width size.

    legend.padding + + +Boolean + + + + + + <optional>
    + + + +
    + + 0 + +

    Set padding value

    legend.item.onclick + + +function + + + + + + <optional>
    + + + +
    + +

    Set click event handler to the legend item.

    legend.item.onover + + +function + + + + + + <optional>
    + + + +
    + +

    Set mouse/touch over event handler to the legend item.

    legend.item.onout + + +function + + + + + + <optional>
    + + + +
    + +

    Set mouse/touch out event handler to the legend item.

    legend.item.tile.width + + +Number + + + + + + <optional>
    + + + +
    + + 10 + +

    Set width of item tile element

    legend.item.tile.height + + +Number + + + + + + <optional>
    + + + +
    + + 10 + +

    Set height of item tile element

    legend.usePoint + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Whether to use custom points in legend.

    + + + + + + +
    +

    Legend options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    legend: {
    +     show: true,
    +     hide: true,
    +     //or hide: "data1"
    +     //or hide: ["data1", "data2"]
    +     contents: {
    +         bindto: "#legend",   // <ul id='legend'></ul>
    +
    +         // will be as: <li style='background-color:#1f77b4'>data1</li>
    +         template: "<li style='background-color:{=COLOR}'>{=TITLE}</li>"
    +
    +         // or using function
    +         template: function(id, color, data) {
    +              // if you want omit some legend, return falsy value
    +              if (title !== "data1") {
    +                   return "<li style='background-color:"+ color +">"+ title +"</li>";
    +              }
    +         }
    +     },
    +     position: "bottom",  // bottom, right, inset
    +     inset: {
    +         anchor: "top-right"  // top-left, top-right, bottom-left, bottom-right
    +         x: 20,
    +         y: 10,
    +         step: 2
    +     },
    +     equally: false,
    +     padding: 10,
    +     item: {
    +         onclick: function(id) { ... },
    +         onover: function(id) { ... },
    +         onout: function(id) { ... },
    +
    +         // set tile's size
    +         tile: {
    +             width: 20,
    +             height: 15
    +         }
    +     },
    +     usePoint: true
    + }
    + + + + + +

    (static) line :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    line.connectNull + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Set if null data point will be connected or not.
    + If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.

    line.classes + + +Array + + + + + + <optional>
    + + + +
    + +

    If set, used to set a css class on each line.

    line.step.type + + +Boolean + + + + + + <optional>
    + + + +
    + + step + +

    Change step type for step chart.
    +Available values:

    +
      +
    • step
    • +
    • step-before
    • +
    • step-after
    • +
    line.point + + +Boolean +| + +Array + + + + + + <optional>
    + + + +
    + + true + +

    Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.

    + + + + + + +
    +

    Set line options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    line: {
    +     connectNull: true,
    +     classes: [
    +         "line-class1",
    +         "line-class2"
    +     ],
    +     step: {
    +         type: "step-after"
    +     },
    +
    +     // hide all data points ('point.show=false' also has similar effect)
    +     point: false,
    +
    +     // show data points for only indicated datas
    +     point: [
    +         "data1", "data3"
    +     ]
    + }
    + + + + + +

    (static) onafterinit :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute after the chart is initialized

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onafterinit: function() {
    +  ...
    +}
    + + + + + +

    (static) onbeforeinit :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute before the chart is initialized

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onbeforeinit: function() {
    +  ...
    +}
    + + + + + +

    (static) oninit :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute when the chart is initialized.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    oninit: function() {
    +  ...
    +}
    + + + + + +

    (static) onout :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute when mouse/touch leaves the chart.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onout: function() {
    +  ...
    +}
    + + + + + +

    (static) onover :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute when mouse/touch enters the chart.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onover: function() {
    +  ...
    +}
    + + + + + +

    (static) onrendered :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • undefined
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onrendered: function() {
    +  ...
    +}
    + + + + + +

    (static) onresize :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    Set a callback to execute when user resizes the screen.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onresize: function() {
    +  ...
    +}
    + + + + + +

    (static) onresized :function

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • function(){}
    • +
    + + + + + + + +
    + + + + + +
    +

    SSet a callback to execute when screen resize finished.

    +
    + + + +
    Type:
    +
      +
    • + +function + + +
    • +
    + + + + + +
    Example
    + +
    onresized: function() {
    +  ...
    +}
    + + + + + +

    (static) padding :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    padding.top + + +Number + + + + + + <optional>
    + + + +

    padding on the top of chart

    padding.right + + +Number + + + + + + <optional>
    + + + +

    padding on the right of chart

    padding.bottom + + +Number + + + + + + <optional>
    + + + +

    padding on the bottom of chart

    padding.left + + +Number + + + + + + <optional>
    + + + +

    padding on the left of chart

    + + + + + + +
    +

    The padding of the chart element.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    padding: {
    +  top: 20,
    +  right: 20,
    +  bottom: 20,
    +  left: 20
    +}
    + + + + + +

    (static) pie :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    pie.label.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide label on each pie piece.

    pie.label.format + + +function + + + + + + <optional>
    + + + +
    + +

    Set formatter for the label on each pie piece.

    pie.label.threshold + + +Number + + + + + + <optional>
    + + + +
    + + 0.05 + +

    Set threshold to show/hide labels.

    pie.label.ratio + + +Number +| + +function + + + + + + <optional>
    + + + +
    + +

    Set ratio of labels position.

    pie.expand + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Enable or disable expanding pie pieces.

    pie.innerRadius + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Sets the inner radius of pie arc.

    pie.padAngle + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Set padding between data.

    pie.padding + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Sets the gap between pie arcs.

    + + + + + + +
    +

    Set pie options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    pie: {
    +     label: {
    +         show: false,
    +         format: function(value, ratio, id) {
    +             return d3.format("$")(value);
    +         },
    +         threshold: 0.1,
    +
    +         // set ratio callback. Should return ratio value
    +         ratio: function(d, radius, h) {
    +             ...
    +             return ratio;
    +         },
    +         // or set ratio number
    +         ratio: 0.5
    +     },
    +     expand: false,
    +     innerRadius: 0,
    +     padAngle: 0.1,
    +     padding: 0
    + }
    + + + + + +

    (static) point :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    point.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Whether to show each point in line.

    point.r + + +Number +| + +function + + + + + + <optional>
    + + + +
    + + 2.5 + +

    The radius size of each point.

    +
      +
    • NOTE: Disabled for 'bubble' type
    • +
    point.focus.expand.enabled + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Whether to expand each point on focus.

    point.focus.expand.r + + +Boolean + + + + + + <optional>
    + + + +
    + + point.r*1.75 + +

    The radius size of each point on focus.

    +
      +
    • NOTE: For 'bubble' type, the default is bubbleSize*1.15
    • +
    point.select.r + + +Number + + + + + + <optional>
    + + + +
    + + point.r*4 + +

    The radius size of each point on selected.

    point.type + + +String + + + + + + <optional>
    + + + +
    + + "circle" + +

    The type of point to be drawn

    +
      +
    • NOTE:
        +
      • If chart has 'bubble' type, only circle can be used.
      • +
      • For IE, non circle point expansions are not supported due to lack of transform support.
      • +
      +
    • +
    • Available Values:
        +
      • circle
      • +
      • rectangle
      • +
      +
    • +
    point.pattern + + +Array + + + + + + <optional>
    + + + +
    + + [] + +

    The type of point or svg shape as string, to be drawn for each line

    +
      +
    • NOTE:
        +
      • This is an experimental feature and can have some unexpected behaviors.
      • +
      • If chart has 'bubble' type, only circle can be used.
      • +
      • For IE, non circle point expansions are not supported due to lack of transform support.
      • +
      +
    • +
    • Available Values:
        +
      • circle
      • +
      • rectangle
      • +
      • svg shape tag interpreted as string
        +(ex. <polygon points='2.5 0 0 5 5 5'></polygon>)
      • +
      +
    • +
    + + + + + + +
    +

    Set point options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    point: {
    +     show: false,
    +     r: 5,
    +
    +     // or customize the radius
    +     r: function(d) {
    +         ...
    +         return r;
    +     },
    +
    +     focus: {
    +         expand: {
    +             enabled: true,
    +             r: 1
    +         }
    +     },
    +     select: {
    +         r: 3
    +     },
    +
    +     // valid values are "circle" or "rectangle"
    +     type: "rectangle",
    +
    +     // or indicate as pattern
    +     pattern: [
    +       "circle",
    +       "rectangle",
    +       "<polygon points='0 6 4 0 -4 0'></polygon>"
    +    ],
    + }
    + + + + + +

    (static) radar :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    radar.axis.max + + +Number + + + + + + <optional>
    + + + +
    + +

    The max value of axis. If not given, it'll take the max value from the given data.

    radar.axis.line.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide axis line.

    radar.axis.text.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide axis text.

    radar.direction.clockwise + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Set the direction to be drawn.

    radar.level.depth + + +Number + + + + + + <optional>
    + + + +
    + + 3 + +

    Set the level depth.

    radar.level.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide level.

    radar.level.text.format + + +function + + + + + + <optional>
    + + + +
    + + (x) => (x % 1 === 0 ? x : x.toFixed(2)) + +

    Set format function for the level value.

    radar.level.text.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide level text.

    radar.size.ratio + + +Number + + + + + + <optional>
    + + + +
    + + 0.87 + +

    Set size ratio.

    + + + + + + +
    +

    Set radar options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    radar: {
    +     axis: {
    +         max: 50,
    +         line: {
    +             show: false
    +         },
    +         text: {
    +             show: false
    +         }
    +     },
    +     direction: {
    +         clockwise: true
    +     },
    +     level: {
    +         show: false,
    +         text: {
    +             format: function(x) {
    +                 return x + "%";
    +             },
    +             show: true
    +         }
    +     },
    +     size: {
    +         ratio: 0.7
    +     }
    + }
    + + + + + +

    (static) regions :Array

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Default Value:
    +
      +
    • []
    • +
    + + + + + + + +
    + + + + + +
    +

    Show rectangles inside the chart.

    +This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional. +axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class.

    +
    + + + +
    Type:
    +
      +
    • + +Array + + +
    • +
    + + + + + +
    Example
    + +
    regions: [
    +   {
    +     axis: "x",
    +     start: 1,
    +     end: 4,
    +     class: "region-1-4"
    +   }
    + ]
    + + + + + +

    (static) resize :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    resize.auto + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Set chart resize automatically on viewport changes.

    + + + + + + +
    +

    Set chart resize options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    resize: {
    +     auto: false
    + }
    + + + + + +

    (static) size :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    size.width + + +Number + + + + + + <optional>
    + + + +

    width of the chart element

    size.height + + +Number + + + + + + <optional>
    + + + +

    height of the chart element

    + + + + + + +
    +

    The desired size of the chart element. +If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    size: {
    +  width: 640,
    +  height: 480
    +}
    + + + + + +

    (static) spline :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    spline.interpolation.type + + +String + + + + + + <optional>
    + + + +
    + + cardinal + +
    + + + + + + +
    +

    Set spline options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    spline: {
    +     interpolation: {
    +         type: "cardinal"
    +     }
    + }
    + + + + + +

    (static) subchart :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    subchart.show + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show sub chart on the bottom of the chart.

    subchart.size.height + + +Boolean + + + + + + <optional>
    + + + +
    + +

    Change the height of the subchart.

    subchart.onbrush + + +Boolean + + + + + + <optional>
    + + + +
    + +

    Set callback for brush event.
    + Specified function receives the current zoomed x domain.

    + + + + + + +
    +

    Set subchart options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    subchart: {
    +     show: true,
    +     size: {
    +         height: 20
    +     },
    +     onbrush: function(domain) { ... }
    + }
    + + + + + +

    (static) svg :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDescription
    svg.classname + + +String + + + + + + <optional>
    + + + +

    class name for svg element

    + + + + + + +
    +

    Set svg element's class name

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    svg: {
    +  classname: "test_class"
    +}
    + + + + + +

    (static) title :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    title.text + + +String + + + + + + <optional>
    + + + +
    + +
    title.padding.top + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +
    title.padding.right + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +
    title.padding.bottom + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +
    title.padding.left + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +
    title.position + + +String + + + + + + <optional>
    + + + +
    + + top-center + +
    + + + + + + +
    +

    Set title options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    title: {
    +     text: "Title Text",
    +     padding: {
    +         top: 10,
    +         right: 10,
    +         bottom: 10,
    +         left: 10
    +     },
    +     position: "top-center"
    + }
    + + + + + +

    (static) tooltip :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    tooltip.show + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Show or hide tooltip.

    tooltip.grouped + + +Boolean + + + + + + <optional>
    + + + +
    + + true + +

    Set if tooltip is grouped or not for the data points.

    +
      +
    • NOTE: The overlapped data points will be displayed as grouped even if set false.
    • +
    tooltip.linked + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Set if tooltips on all visible charts with like x points are shown together when one is shown.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    name + + +String + + + + + + <optional>
    + + + +
    + + "" + +

    Groping name for linked tooltip.
    If specified, linked tooltip will be groped interacting to be worked only with the same name.

    + +
    tooltip.format.title + + +function + + + + + + <optional>
    + + + +
    + +

    Set format for the title of tooltip.
    + Specified function receives x of the data point to show.

    tooltip.format.name + + +function + + + + + + <optional>
    + + + +
    + +

    Set format for the name of each data in tooltip.
    + Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.

    tooltip.format.value + + +function + + + + + + <optional>
    + + + +
    + +

    Set format for the value of each data in tooltip.
    + Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge. + If undefined returned, the row of that value will be skipped.

    tooltip.position + + +function + + + + + + <optional>
    + + + +
    + +

    Set custom position for the tooltip.
    + This option can be used to modify the tooltip position by returning object that has top and left.

    tooltip.contents + + +function + + + + + + <optional>
    + + + +
    + +

    Set custom HTML for the tooltip.
    + Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.

    tooltip.init.show + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Show tooltip at the initialization.

    tooltip.init.x + + +Number + + + + + + <optional>
    + + + +
    + + 0 + +

    Set x Axis index to be shown at the initialization.

    tooltip.init.position + + +Object + + + + + + <optional>
    + + + +
    + + {top: "0px",left: "50px"} + +

    Set the position of tooltip at the initialization.

    tooltip.onshow + + +function + + + + + + <optional>
    + + + +
    + +

    Set a callback that will be invoked before the tooltip is shown.

    tooltip.onhide + + +function + + + + + + <optional>
    + + + +
    + +

    Set a callback that will be invoked before the tooltip is hidden.

    tooltip.onshown + + +function + + + + + + <optional>
    + + + +
    + +

    Set a callback that will be invoked after the tooltip is shown

    tooltip.onhidden + + +function + + + + + + <optional>
    + + + +
    + +

    Set a callback that will be invoked after the tooltip is hidden.

    tooltip.order + + +String +| + +function +| + +null + + + + + + <optional>
    + + + +
    + + null + +

    Set tooltip data display order.

    + Available Values:

    +
      +
    • desc: In descending data value order
    • +
    • asc: In ascending data value order
    • +
    • null: It keeps the data display order
      + NOTE: When data.groups is set, the order will follow as the stacked graph order.
      + If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "")
    • +
    • function(data1, data2) { ... }: Array.sort compareFunction
    • +
    + + + + + + +
    +

    Tooltip options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    tooltip: {
    +     show: true,
    +     grouped: false,
    +     format: {
    +         title: function(x) { return "Data " + x; },
    +         name: function(name, ratio, id, index) { return name; },
    +         value: function(value, ratio, id, index) { return ratio; }
    +     },
    +     position: function(data, width, height, element) {
    +         return {top: 0, left: 0}
    +     },
    +     contents: function(d, defaultTitleFormat, defaultValueFormat, color) {
    +         return ... // formatted html as you want
    +     },
    +
    +     // sort tooltip data value display in ascending order
    +     order: "asc",
    +
    +     // specifying sort function
    +     order: function(a, b) {
    +        // param data passed format
    +        {x: 5, value: 250, id: "data1", index: 5, name: "data1"}
    +          ...
    +     },
    +
    +     // show at the initialization
    +     init: {
    +         show: true,
    +         x: 2,
    +         position: {
    +             top: "150px",
    +             left: "250px"
    +         }
    +     },
    +
    +     // fires prior tooltip is shown
    +     onshow: function() { ...},
    +     // fires prior tooltip is hidden
    +     onhide: function() { ... },
    +     // fires after tooltip is shown
    +     onshown: function() { ... },
    +     // fires after tooltip is hidden
    +     onhidden: function() { ... },
    +
    +     // Link any tooltips when multiple charts are on the screen where same x coordinates are available
    +     // Useful for timeseries correlation
    +     linked: true,
    +
    +     // Specify name to interact those with the same name only.
    +     linked: {
    +         name: "some-group"
    +     }
    + }
    + + + + + +

    (static) transition :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    transition.duration + + +Number + + + + + + <optional>
    + + + +
    + + 350 + +

    duration in milliseconds

    + + + + + + +
    +

    Set duration of transition (in milliseconds) for chart animation.

    +
      +
    • NOTE: If 0or null set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.
    • +
    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    transition: {
    +   duration: 500
    +}
    + + + + + +

    (static) zoom :Object

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    zoom.enabled + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Enable zooming.

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    type + + +String + + + + + + <optional>
    + + + +
    + + 'wheel' + +

    Set zoom interaction type.

    +
      +
    • Available types:
        +
      • wheel
      • +
      • drag
      • +
      +
    • +
    + +
    zoom.rescale + + +Boolean + + + + + + <optional>
    + + + +
    + + false + +

    Enable to rescale after zooming.
    + If true set, y domain will be updated according to the zoomed region.

    zoom.extent + + +Array + + + + + + <optional>
    + + + +
    + + [1, 10] + +

    Change zoom extent.

    zoom.x.min + + +Number + + + + + + <optional>
    + + + +
    + +

    Set x Axis minimum zoom range

    zoom.x.max + + +Number + + + + + + <optional>
    + + + +
    + +

    Set x Axis maximum zoom range

    zoom.onzoomstart + + +function + + + + + + <optional>
    + + + +
    + +

    Set callback that is called when zooming starts.
    + Specified function receives the zoom event.

    zoom.onzoom + + +function + + + + + + <optional>
    + + + +
    + +

    Set callback that is called when the chart is zooming.
    + Specified function receives the zoomed domain.

    zoom.onzoomend + + +function + + + + + + <optional>
    + + + +
    + +

    Set callback that is called when zooming ends.
    + Specified function receives the zoomed domain.

    zoom.resetButton + + +Boolean +| + +Object + + + + + + <optional>
    + + + +
    + + true + +

    Set to display zoom reset button for 'drag' type zoom

    +
    Properties
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributesDefaultDescription
    text + + +String + + + + + + <optional>
    + + + +
    + + 'Reset Zoom' + +

    Text value for zoom reset button.

    + +
    + + + + + + +
    +

    Set zoom options

    +
    + + + +
    Type:
    +
      +
    • + +Object + + +
    • +
    + + + + + +
    Example
    + +
    zoom: {
    +     enabled: {
    +         type: "drag"
    +     },
    +     rescale: true,
    +     extent: [1, 100]  // enable more zooming
    +     x: {
    +         min: -1,  // set min range
    +         max: 10  // set max range
    +     },
    +     onzoomstart: function(event) { ... },
    +     onzoom: function(domain) { ... },
    +     onzoomend: function(domain) { ... },
    +
    +     // show reset button when is zoomed-in
    +     resetButton: true,
    +
    +     // customized text value for reset zoom button
    +     resetButton: {
    +         text: "Unzoom"
    +     }
    + }
    + + + + + + + + + + + +
    + +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/api_api.axis.js.html b/doc/api_api.axis.js.html new file mode 100644 index 000000000..6ba1be81e --- /dev/null +++ b/doc/api_api.axis.js.html @@ -0,0 +1,257 @@ + + + + + + api/api.axis.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.axis.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {isValue, isDefined, isObjectType, extend} from "../internals/util";
    +
    +/**
    + * Set the min/max value
    + * @param {Chart} $$
    + * @param {String} type
    + * @param {Object} value
    + * @return {undefined}
    + * @private
    + */
    +const setMinMax = ($$, type, value) => {
    +	const config = $$.config;
    +	const axisX = `axis_x_${type}`;
    +	const axisY = `axis_y_${type}`;
    +	const axisY2 = `axis_y2_${type}`;
    +
    +	if (isDefined(value)) {
    +		if (isObjectType(value)) {
    +			isValue(value.x) && (config[axisX] = value.x);
    +			isValue(value.y) && (config[axisY] = value.y);
    +			isValue(value.y2) && (config[axisY2] = value.y2);
    +		} else {
    +			config[axisY] = value;
    +			config[axisY2] = value;
    +		}
    +
    +		$$.redraw({
    +			withUpdateOrgXDomain: true,
    +			withUpdateXDomain: true
    +		});
    +	}
    +
    +	return undefined;
    +};
    +
    +/**
    + * Get the min/max value
    + * @param {Chart} $$
    + * @param {String} type
    + * @return {{x, y, y2}}
    + * @private
    + */
    +const getMinMax = ($$, type) => {
    +	const config = $$.config;
    +	const axisX = `axis_x_${type}`;
    +	const axisY = `axis_y_${type}`;
    +	const axisY2 = `axis_y2_${type}`;
    +
    +	return {
    +		x: config[axisX],
    +		y: config[axisY],
    +		y2: config[axisY2]
    +	};
    +};
    +
    +/**
    + * Define axis
    + * @ignore
    + */
    +const axis = extend(() => {}, {
    +	/**
    +	 * Get and set axis labels.
    +	 * @method axis․labels
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} labels specified axis' label to be updated.
    +	 * @example
    +	 * // Update axis' label
    +	 * chart.axis.labels({
    +	 *   x: "New X Axis Label",
    +	 *   y: "New Y Axis Label"
    +	 * });
    +	 */
    +	labels: function(labels) {
    +		const $$ = this.internal;
    +
    +		if (arguments.length) {
    +			Object.keys(labels).forEach(axisId => {
    +				$$.axis.setLabelText(axisId, labels[axisId]);
    +			});
    +
    +			$$.axis.updateLabels();
    +		}
    +	},
    +
    +	/**
    +	 * Get and set axis min value.
    +	 * @method axis․min
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} min If min is given, specified axis' min value will be updated.<br>
    +	 *     If no argument is given, the min values set on generating option for each axis will be returned.
    +	 *     If not set any min values on generation, it will return `undefined`.
    +	 * @example
    +	 * // Update axis' min
    +	 * chart.axis.min({
    +	 *   x: -10,
    +	 *   y: 1000,
    +	 *   y2: 100
    +	 * });
    +	 */
    +	min: function(min) {
    +		const $$ = this.internal;
    +
    +		return arguments.length ?
    +			setMinMax($$, "min", min) :
    +			getMinMax($$, "min");
    +	},
    +
    +	/**
    +	 * Get and set axis max value.
    +	 * @method axis․max
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} max If max is given, specified axis' max value will be updated.<br>
    +	 *     If no argument is given, the max values set on generating option for each axis will be returned.
    +	 *     If not set any max values on generation, it will return `undefined`.
    +	 * @example
    +	 * // Update axis' label
    +	 * chart.axis.max({
    +	 *    x: 100,
    +	 *    y: 1000,
    +	 *    y2: 10000
    +	 * });
    +	 */
    +	max: function(max) {
    +		const $$ = this.internal;
    +
    +		return arguments.length ?
    +			setMinMax($$, "max", max) :
    +			getMinMax($$, "max");
    +	},
    +
    +	/**
    +	 * Get and set axis min and max value.
    +	 * @method axis․range
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.
    +	 * @example
    +	 * // Update axis' label
    +	 * chart.axis.range({
    +	 *   min: {
    +	 *     x: -10,
    +	 *     y: -1000,
    +	 *     y2: -10000
    +	 *   },
    +	 *   max: {
    +	 *     x: 100,
    +	 *     y: 1000,
    +	 *     y2: 10000
    +	 *   },
    +	 * });
    +	 */
    +	range: function(range) {
    +		const axis = this.axis;
    +
    +		if (arguments.length) {
    +			isDefined(range.max) && axis.max(range.max);
    +			isDefined(range.min) && axis.min(range.min);
    +		} else {
    +			return {
    +				max: axis.max(),
    +				min: axis.min()
    +			};
    +		}
    +
    +		return undefined;
    +	}
    +});
    +
    +extend(Chart.prototype, {axis});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.category.js.html b/doc/api_api.category.js.html new file mode 100644 index 000000000..afcbc13e5 --- /dev/null +++ b/doc/api_api.category.js.html @@ -0,0 +1,135 @@ + + + + + + api/api.category.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.category.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Set specified category name on category axis.
    +	 * @method category
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Number} i index of category to be changed
    +	 * @param {String} category category value to be changed
    +	 * @example
    +	 * chart.category(2, "Category 3");
    +	 */
    +	category(i, category) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (arguments.length > 1) {
    +			config.axis_x_categories[i] = category;
    +			$$.redraw();
    +		}
    +
    +		return config.axis_x_categories[i];
    +	},
    +
    +	/**
    +	 * Set category names on category axis.
    +	 * @method categories
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
    +	 * @example
    +	 * chart.categories([
    +	 *      "Category 1", "Category 2", ...
    +	 * ]);
    +	 */
    +	categories(categories) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (!arguments.length) {
    +			return config.axis_x_categories;
    +		}
    +
    +		config.axis_x_categories = categories;
    +		$$.redraw();
    +
    +		return config.axis_x_categories;
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.chart.js.html b/doc/api_api.chart.js.html new file mode 100644 index 000000000..6cbd1c978 --- /dev/null +++ b/doc/api_api.chart.js.html @@ -0,0 +1,214 @@ + + + + + + api/api.chart.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.chart.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {select as d3Select} from "d3-selection";
    +import Chart from "../internals/Chart";
    +import {window} from "../internals/browser";
    +import {notEmpty, isDefined, extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Resize the chart.
    +	 * @method resize
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} size This argument should include width and height in pixels.
    +	 * @example
    +	 * // Resize to 640x480
    +	 * chart.resize({
    +	 *    width: 640,
    +	 *    height: 480
    +	 * });
    +	 */
    +	resize(size) {
    +		const config = this.internal.config;
    +
    +		config.size_width = size ? size.width : null;
    +		config.size_height = size ? size.height : null;
    +
    +		this.flush();
    +	},
    +
    +	/**
    +	 * Force to redraw.
    +	 * @method flush
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Boolean} [soft] For soft redraw.
    +	 * @example
    +	 * chart.flush();
    +	 *
    +	 * // for soft redraw
    +	 * chart.flush(true);
    +	 */
    +	flush(soft) {
    +		const $$ = this.internal;
    +
    +		// reset possible zoom scale
    +		$$.zoomScale = null;
    +
    +		soft ? $$.redraw({
    +			withTransform: true,
    +			withUpdateXDomain: true,
    +			withUpdateOrgXDomain: true,
    +			withLegend: true
    +		}) : $$.updateAndRedraw({
    +			withLegend: true,
    +			withTransition: false,
    +			withTransitionForTransform: false,
    +		});
    +	},
    +
    +	/**
    +	 * Reset the chart object and remove element and events completely.
    +	 * @method destroy
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @example
    +	 * chart.destroy();
    +	 */
    +	destroy() {
    +		const $$ = this.internal;
    +
    +		if (notEmpty($$)) {
    +			$$.charts.splice($$.charts.indexOf(this), 1);
    +
    +			// clear timers
    +			isDefined($$.resizeTimeout) && window.clearTimeout($$.resizeTimeout);
    +
    +			d3Select(window).on("resize.bb", null);
    +			$$.selectChart.classed("bb", false).html("");
    +
    +			// releasing references
    +			Object.keys(this).forEach(key => {
    +				key === "internal" && Object.keys($$).forEach(k => {
    +					$$[k] = null;
    +				});
    +
    +				this[key] = null;
    +				delete this[key];
    +			});
    +		}
    +
    +		return null;
    +	},
    +
    +	/**
    +	 * Get or set single config option value.
    +	 * @method config
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String} name The option key name.
    +	 * @param {*} [value] The value accepted for indicated option.
    +	 * @param {Boolean} [redraw] Set to redraw with the new option changes.
    +	 * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.
    +	 * @example
    +	 * // Getter
    +	 * chart.config("gauge.max");
    +	 *
    +	 * // Setter
    +	 * chart.config("gauge.max", 100);
    +	 *
    +	 * // Setter & redraw with the new option
    +	 * chart.config("gauge.max", 100, true);
    +	 */
    +	config(name, value, redraw) {
    +		const $$ = this.internal;
    +		const key = name && name.replace(/\./g, "_");
    +		let res;
    +
    +		if (key in $$.config) {
    +			if (isDefined(value)) {
    +				$$.config[key] = value;
    +				res = value;
    +
    +				redraw && this.flush(true);
    +			} else {
    +				res = $$.config[key];
    +			}
    +		}
    +
    +		return res;
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.color.js.html b/doc/api_api.color.js.html new file mode 100644 index 000000000..ed1be84f5 --- /dev/null +++ b/doc/api_api.color.js.html @@ -0,0 +1,101 @@ + + + + + + api/api.color.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.color.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Get the color
    +	 * @method color
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String} id id to get the color
    +	 * @example
    +	 * chart.color("data1");
    +	 */
    +	color(id) {
    +		return this.internal.color(id); // more patterns
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.data.js.html b/doc/api_api.data.js.html new file mode 100644 index 000000000..fba025854 --- /dev/null +++ b/doc/api_api.data.js.html @@ -0,0 +1,223 @@ + + + + + + api/api.data.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.data.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend, isUndefined, isArray} from "../internals/util";
    +
    +/**
    + * Get data loaded in the chart.
    + * @method data
    + * @instance
    + * @memberOf Chart
    + * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.
    + * @example
    + * // Get only data1 data
    + * chart.data("data1");
    + *
    + * // Get data1 and data2 data
    + * chart.data(["data1", "data2"]);
    + *
    + * // Get all data
    + * chart.data();
    + */
    +const data = function(targetIds) {
    +	const targets = this.internal.data.targets;
    +
    +	return isUndefined(targetIds) ?
    +		targets : targets.filter(t => targetIds.indexOf(t.id) >= 0);
    +};
    +
    +extend(data, {
    +	/**
    +	 * Get data shown in the chart.
    +	 * @method data․shown
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.
    +	 * @example
    +	 * // Get shown data by filtering to include only data1 data
    +	 * chart.data.shown("data1");
    +	 *
    +	 * // Get shown data by filtering to include data1 and data2 data
    +	 * chart.data.shown(["data1", "data2"]);
    +	 *
    +	 * // Get all shown data
    +	 * chart.data.shown();
    +	 */
    +	shown: function(targetIds) {
    +		return this.internal.filterTargetsToShow(this.data(targetIds));
    +	},
    +
    +	/**
    +	 * Get values of the data loaded in the chart.
    +	 * @method data․values
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned
    +	 * @example
    +	 * // Get data1 values
    +	 * chart.data.values("data1");
    +	 */
    +	values: function(targetId) {
    +		let values = null;
    +
    +		if (targetId) {
    +			const targets = this.data(targetId);
    +
    +			if (targets && isArray(targets)) {
    +				values = [];
    +
    +				targets.forEach(v => {
    +					values = values.concat(v.values.map(d => d.value));
    +				});
    +			}
    +		}
    +
    +		return values;
    +	},
    +
    +	/**
    +	 * Get and set names of the data loaded in the chart.
    +	 * @method data․names
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as
    +	 * @example
    +	 * // Get current names
    +	 * chart.data.names();
    +	 *
    +	 * // Update names
    +	 * chart.data.names({
    +	 *  data1: "New Name 1",
    +	 *  data2: "New Name 2"
    +	 *});
    +	 */
    +	names: function(names) {
    +		this.internal.clearLegendItemTextBoxCache();
    +
    +		return this.internal.updateDataAttributes("names", names);
    +	},
    +
    +	/**
    +	 * Get and set colors of the data loaded in the chart.
    +	 * @method data․colors
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as
    +	 * @example
    +	 * // Get current colors
    +	 * chart.data.colors();
    +	 *
    +	 * // Update colors
    +	 * chart.data.colors({
    +	 *  data1: "#FFFFFF",
    +	 *  data2: "#000000"
    +	 * });
    +	 */
    +	colors: function(colors) {
    +		return this.internal.updateDataAttributes("colors", colors);
    +	},
    +
    +	/**
    +	 * Get and set axes of the data loaded in the chart.
    +	 * @method data․axes
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as
    +	 * @example
    +	 * // Get current axes
    +	 * chart.data.axes();
    +	 *
    +	 * // Update axes
    +	 * chart.data.axes({
    +	 *  data1: "y",
    +	 *  data2: "y2"
    +	 * });
    +	 */
    +	axes: function(axes) {
    +		return this.internal.updateDataAttributes("axes", axes);
    +	}
    +});
    +
    +extend(Chart.prototype, {data});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.export.js.html b/doc/api_api.export.js.html new file mode 100644 index 000000000..8dbd156b6 --- /dev/null +++ b/doc/api_api.export.js.html @@ -0,0 +1,183 @@ + + + + + + api/api.export.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.export.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {namespaces as d3Namespaces} from "d3-selection";
    +import Chart from "../internals/Chart";
    +import {extend, isFunction, toArray, getCssRules} from "../internals/util";
    +
    +/**
    + * Encode to base64
    + * @param {String} str
    + * @return {String}
    + * @private
    + * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
    + */
    +const b64EncodeUnicode = str => btoa(
    +	encodeURIComponent(str)
    +		.replace(/%([0-9A-F]{2})/g, (match, p) => String.fromCharCode(`0x${p}`))
    +);
    +
    +/**
    + * Convert svg node to data url
    + * @param {HTMLElement} node
    + * @return {String}
    + * @private
    + */
    +const nodeToSvgDataUrl = node => {
    +	const bounds = node.getBoundingClientRect();
    +	const clone = node.cloneNode(true);
    +	const styleSheets = toArray(document.styleSheets);
    +	const cssRules = getCssRules(styleSheets);
    +	const cssText = cssRules.filter(r => r.cssText).map(r => r.cssText);
    +
    +	clone.setAttribute("xmlns", d3Namespaces.xhtml);
    +
    +	const nodeXml = new XMLSerializer().serializeToString(clone);
    +
    +	// foreignObject not supported in IE11 and below
    +	// https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
    +	const dataStr = `<svg xmlns="${d3Namespaces.svg}" width="${bounds.width}" height="${bounds.height}">
    +			<foreignObject width="100%" height="100%">
    +				<style>${cssText.join("\n")}</style>
    +				${nodeXml}
    +			</foreignObject></svg>`
    +		.replace(/#/g, "%23")
    +		.replace("/\n/g", "%0A");
    +
    +	return `data:image/svg+xml;base64,${b64EncodeUnicode(dataStr)}`;
    +};
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Export chart as an image.
    +	 * - **NOTE:**
    +	 *   - IE11 and below not work properly due to the lack of the feature(<a href="https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx">foreignObject</a>) support
    +	 *   - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
    +	 * @method export
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)
    +	 * @param {Function} [callback] The callback to be invoked when export is ready.
    +	 * @return {String} dataURI
    +	 * @example
    +	 *  chart.export();
    +	 *  // --> "data:image/svg+xml;base64,PHN..."
    +	 *
    +	 *  // Initialize the download automatically
    +	 *  chart.export("image/png", dataUrl => {
    +	 *     const link = document.createElement("a");
    +	 *
    +	 *     link.download = `${Date.now()}.png`;
    +	 *     link.href = dataUrl;
    +	 *     link.innerHTML = "Download chart as image";
    +	 *
    +	 *     document.body.appendChild(link);
    +	 *  });
    +	 */
    +	export(mimeType = "image/png", callback) {
    +		const svgDataUrl = nodeToSvgDataUrl(this.element);
    +
    +		if (isFunction(callback)) {
    +			const img = new Image();
    +
    +			img.crosssOrigin = "Anonymous";
    +			img.onload = () => {
    +				const canvas = document.createElement("canvas");
    +				const ctx = canvas.getContext("2d");
    +
    +				canvas.width = img.width;
    +				canvas.height = img.height;
    +				ctx.drawImage(img, 0, 0);
    +
    +				canvas.toBlob(blob => {
    +					callback(window.URL.createObjectURL(blob));
    +				}, mimeType);
    +			};
    +
    +			img.src = svgDataUrl;
    +		}
    +
    +		return svgDataUrl;
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.flow.js.html b/doc/api_api.flow.js.html new file mode 100644 index 000000000..96a8dd8d6 --- /dev/null +++ b/doc/api_api.flow.js.html @@ -0,0 +1,527 @@ + + + + + + api/api.flow.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.flow.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {selectAll as d3SelectAll} from "d3-selection";
    +import {easeLinear as d3EaseLinear} from "d3-ease";
    +import {transition as d3Transition} from "d3-transition";
    +import Chart from "../internals/Chart";
    +import ChartInternal from "../internals/ChartInternal";
    +import {isDefined, isValue, diffDomain, extend} from "../internals/util";
    +import CLASS from "../config/classes";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Flow data to the chart.<br><br>
    +	 * By this API, you can append new data points to the chart.
    +	 * @method flow
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} args The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Type | Description |
    +	 *    | --- | --- | --- |
    +	 *    | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) |
    +	 *    | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) |
    +	 *    | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) |
    +	 *    | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points |
    +	 *    | length | Number | The lower x edge will move by the number of this argument |
    +	 *    | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default |
    +	 *    | done | Function | The specified function will be called when flow ends |
    +	 *
    +	 * - **NOTE:**
    +	 *   If json, rows and columns given, the data will be loaded.<br>
    +	 *   If data that has the same target id is given, the chart will be appended.<br>
    +	 *   Otherwise, new target will be added. One of these is required when calling.<br>
    +	 *   If json specified, keys is required as well as data.json.
    +	 * @example
    +	 * // 2 data points will be apprended to the tail and popped from the head.
    +	 * // After that, 4 data points will be appended and no data points will be poppoed.
    +	 * chart.flow({
    +	 *  columns: [
    +	 *    ["x", "2018-01-11", "2018-01-21"],
    +	 *    ["data1", 500, 200],
    +	 *    ["data2", 100, 300],
    +	 *    ["data3", 200, 120]
    +	 *  ],
    +	 *  to: "2013-01-11",
    +	 *  done: function () {
    +	 *    chart.flow({
    +	 *      columns: [
    +	 *        ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"],
    +	 *        ["data1", 200, 300, 100, 250],
    +	 *        ["data2", 100, 90, 40, 120],
    +	 *        ["data3", 100, 100, 300, 500]
    +	 *      ],
    +	 *      length: 2,
    +     *      duration: 1500
    +	 *    });
    +	 *  }
    +	 * });
    +	 */
    +	flow(args) {
    +		const $$ = this.internal;
    +		const notfoundIds = [];
    +		const orgDataCount = $$.getMaxDataCount();
    +
    +		let data;
    +		let domain;
    +		let length = 0;
    +		let tail = 0;
    +		let diff;
    +		let to;
    +
    +		if (args.json) {
    +			data = $$.convertJsonToData(args.json, args.keys);
    +		} else if (args.rows) {
    +			data = $$.convertRowsToData(args.rows);
    +		} else if (args.columns) {
    +			data = $$.convertColumnsToData(args.columns);
    +		} else {
    +			return;
    +		}
    +
    +		const targets = $$.convertDataToTargets(data, true);
    +
    +		// Update/Add data
    +		$$.data.targets.forEach(t => {
    +			let found = false;
    +
    +			for (let i = 0; i < targets.length; i++) {
    +				if (t.id === targets[i].id) {
    +					found = true;
    +
    +					if (t.values[t.values.length - 1]) {
    +						tail = t.values[t.values.length - 1].index + 1;
    +					}
    +
    +					length = targets[i].values.length;
    +
    +					for (let j = 0; j < length; j++) {
    +						targets[i].values[j].index = tail + j;
    +
    +						if (!$$.isTimeSeries()) {
    +							targets[i].values[j].x = tail + j;
    +						}
    +					}
    +
    +					t.values = t.values.concat(targets[i].values);
    +					targets.splice(i, 1);
    +					break;
    +				}
    +			}
    +
    +			!found && notfoundIds.push(t.id);
    +		});
    +
    +		// Append null for not found targets
    +		$$.data.targets.forEach(t => {
    +			for (let i = 0; i < notfoundIds.length; i++) {
    +				if (t.id === notfoundIds[i]) {
    +					tail = t.values[t.values.length - 1].index + 1;
    +
    +					for (let j = 0; j < length; j++) {
    +						t.values.push({
    +							id: t.id,
    +							index: tail + j,
    +							x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + j) : tail + j,
    +							value: null
    +						});
    +					}
    +				}
    +			}
    +		});
    +
    +		// Generate null values for new target
    +		if ($$.data.targets.length) {
    +			targets.forEach(t => {
    +				const missing = [];
    +
    +				for (let i = $$.data.targets[0].values[0].index; i < tail; i++) {
    +					missing.push({
    +						id: t.id,
    +						index: i,
    +						x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,
    +						value: null
    +					});
    +				}
    +
    +				t.values.forEach(v => {
    +					v.index += tail;
    +
    +					if (!$$.isTimeSeries()) {
    +						v.x += tail;
    +					}
    +				});
    +
    +				t.values = missing.concat(t.values);
    +			});
    +		}
    +
    +		$$.data.targets = $$.data.targets.concat(targets); // add remained
    +
    +		// check data count because behavior needs to change when it"s only one
    +		// const dataCount = $$.getMaxDataCount();
    +		const baseTarget = $$.data.targets[0];
    +		const baseValue = baseTarget.values[0];
    +
    +		// Update length to flow if needed
    +		if (isDefined(args.to)) {
    +			length = 0;
    +			to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to;
    +			baseTarget.values.forEach(v => {
    +				v.x < to && length++;
    +			});
    +		} else if (isDefined(args.length)) {
    +			length = args.length;
    +		}
    +
    +		// If only one data, update the domain to flow from left edge of the chart
    +		if (!orgDataCount) {
    +			if ($$.isTimeSeries()) {
    +				diff = baseTarget.values.length > 1 ?
    +					baseTarget.values[baseTarget.values.length - 1].x - baseValue.x :
    +					baseValue.x - $$.getXDomain($$.data.targets)[0];
    +			} else {
    +				diff = 1;
    +			}
    +
    +			domain = [baseValue.x - diff, baseValue.x];
    +			$$.updateXDomain(null, true, true, false, domain);
    +		} else if (orgDataCount === 1) {
    +			if ($$.isTimeSeries()) {
    +				diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;
    +				domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];
    +				$$.updateXDomain(null, true, true, false, domain);
    +			}
    +		}
    +
    +		// Set targets
    +		$$.updateTargets($$.data.targets);
    +
    +		// Redraw with new targets
    +		$$.redraw({
    +			flow: {
    +				index: baseValue.index,
    +				length: length,
    +				duration: isValue(args.duration) ? args.duration : $$.config.transition_duration,
    +				done: args.done,
    +				orgDataCount: orgDataCount,
    +			},
    +			withLegend: true,
    +			withTransition: orgDataCount > 1,
    +			withTrimXDomain: false,
    +			withUpdateXAxis: true
    +		});
    +	}
    +});
    +
    +extend(ChartInternal.prototype, {
    +	/**
    +	 * Generate flow
    +	 * @memberOf ChartInternal
    +	 * @private
    +	 * @param {Object} args
    +	 * @return {Function}
    +	 */
    +	generateFlow(args) {
    +		const $$ = this;
    +		const config = $$.config;
    +
    +		return function() {
    +			const targets = args.targets;
    +			const flow = args.flow;
    +			const drawBar = args.drawBar;
    +			const drawLine = args.drawLine;
    +			const drawArea = args.drawArea;
    +			const cx = args.cx;
    +			const cy = args.cy;
    +			const xv = args.xv;
    +			const xForText = args.xForText;
    +			const yForText = args.yForText;
    +			const duration = args.duration;
    +
    +			let translateX;
    +			let scaleX = 1;
    +			const flowIndex = flow.index;
    +			const flowLength = flow.length;
    +			let flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex);
    +			let flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength);
    +			const orgDomain = $$.x.domain();
    +			const durationForFlow = flow.duration || duration;
    +			const done = flow.done || function() {};
    +			const wait = $$.generateWait();
    +
    +			const xgrid = $$.xgrid || d3SelectAll([]);
    +			const xgridLines = $$.xgridLines || d3SelectAll([]);
    +			const mainRegion = $$.mainRegion || d3SelectAll([]);
    +			const mainText = $$.mainText || d3SelectAll([]);
    +			const mainBar = $$.mainBar || d3SelectAll([]);
    +			const mainLine = $$.mainLine || d3SelectAll([]);
    +			const mainArea = $$.mainArea || d3SelectAll([]);
    +			const mainCircle = $$.mainCircle || d3SelectAll([]);
    +
    +			// set flag
    +			$$.flowing = true;
    +
    +			// remove head data after rendered
    +			$$.data.targets.forEach(d => {
    +				d.values.splice(0, flowLength);
    +			});
    +
    +			// update x domain to generate axis elements for flow
    +			const domain = $$.updateXDomain(targets, true, true);
    +
    +			// update elements related to x scale
    +			if ($$.updateXGrid) { $$.updateXGrid(true); }
    +
    +			// generate transform to flow
    +			if (!flow.orgDataCount) { // if empty
    +				if ($$.data.targets[0].values.length !== 1) {
    +					translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);
    +				} else {
    +					if ($$.isTimeSeries()) {
    +						flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0);
    +						flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1);
    +						translateX = $$.x(flowStart.x) - $$.x(flowEnd.x);
    +					} else {
    +						translateX = diffDomain(domain) / 2;
    +					}
    +				}
    +			} else if (flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x)) {
    +				translateX = $$.x(orgDomain[0]) - $$.x(domain[0]);
    +			} else {
    +				if ($$.isTimeSeries()) {
    +					translateX = ($$.x(orgDomain[0]) - $$.x(domain[0]));
    +				} else {
    +					translateX = ($$.x(flowStart.x) - $$.x(flowEnd.x));
    +				}
    +			}
    +
    +			scaleX = (diffDomain(orgDomain) / diffDomain(domain));
    +			const transform = `translate(${translateX},0) scale(${scaleX},1)`;
    +
    +			$$.hideXGridFocus();
    +
    +			const gt = d3Transition().ease(d3EaseLinear)
    +				.duration(durationForFlow);
    +
    +			wait.add([
    +				$$.axes.x
    +					.transition(gt)
    +					.call($$.xAxis.setTransition(gt)),
    +
    +				mainBar
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				mainLine
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				mainArea
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				mainCircle
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				mainText
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				mainRegion
    +					.filter($$.isRegionOnX)
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				xgrid
    +					.transition(gt)
    +					.attr("transform", transform),
    +
    +				xgridLines
    +					.transition(gt)
    +					.attr("transform", transform),
    +			]);
    +
    +			gt.call(wait, () => {
    +				const shapes = [];
    +				const texts = [];
    +				const eventRects = [];
    +
    +				// remove flowed elements
    +				if (flowLength) {
    +					for (let i = 0; i < flowLength; i++) {
    +						const index = flowIndex + i;
    +
    +						shapes.push(`.${CLASS.shape}-${index}`);
    +						texts.push(`.${CLASS.text}-${index}`);
    +						eventRects.push(`.${CLASS.eventRect}-${index}`);
    +					}
    +
    +					$$.svg.selectAll(`.${CLASS.shapes}`)
    +						.selectAll(shapes)
    +						.remove();
    +
    +					$$.svg.selectAll(`.${CLASS.texts}`)
    +						.selectAll(texts)
    +						.remove();
    +
    +					$$.svg.selectAll(`.${CLASS.eventRects}`)
    +						.selectAll(eventRects)
    +						.remove();
    +
    +					$$.svg.select(`.${CLASS.xgrid}`)
    +						.remove();
    +				}
    +
    +				// draw again for removing flowed elements and reverting attr
    +				xgrid.size() && xgrid
    +					.attr("transform", null)
    +					.attr($$.xgridAttr);
    +
    +				xgridLines
    +					.attr("transform", null);
    +
    +				xgridLines.select("line")
    +					.attr("x1", config.axis_rotated ? 0 : xv)
    +					.attr("x2", config.axis_rotated ? $$.width : xv);
    +
    +				xgridLines.select("text")
    +					.attr("x", config.axis_rotated ? $$.width : 0)
    +					.attr("y", xv);
    +
    +				mainBar
    +					.attr("transform", null)
    +					.attr("d", drawBar);
    +
    +				mainLine
    +					.attr("transform", null)
    +					.attr("d", drawLine);
    +
    +				mainArea
    +					.attr("transform", null)
    +					.attr("d", drawArea);
    +
    +				mainCircle
    +					.attr("transform", null);
    +
    +				if ($$.isCirclePoint()) {
    +					mainCircle
    +						.attr("cx", cx)
    +						.attr("cy", cy);
    +				} else {
    +					const xFunc = d => cx(d) - config.point_r;
    +					const yFunc = d => cy(d) - config.point_r;
    +
    +					mainCircle
    +						.attr("x", xFunc)
    +						.attr("y", yFunc)
    +						.attr("cx", cx) // when pattern is used, it possibly contain 'circle' also.
    +						.attr("cy", cy);
    +				}
    +
    +				mainText
    +					.attr("transform", null)
    +					.attr("x", xForText)
    +					.attr("y", yForText)
    +					.style("fill-opacity", $$.opacityForText.bind($$));
    +
    +				mainRegion
    +					.attr("transform", null);
    +
    +				mainRegion.select("rect").filter($$.isRegionOnX)
    +					.attr("x", $$.regionX.bind($$))
    +					.attr("width", $$.regionWidth.bind($$));
    +
    +				config.interaction_enabled && $$.redrawEventRect();
    +
    +				// callback for end of flow
    +				done();
    +
    +				$$.flowing = false;
    +			});
    +		};
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.focus.js.html b/doc/api_api.focus.js.html new file mode 100644 index 000000000..fa1800cc9 --- /dev/null +++ b/doc/api_api.focus.js.html @@ -0,0 +1,198 @@ + + + + + + api/api.focus.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.focus.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {select as d3Select} from "d3-selection";
    +import Chart from "../internals/Chart";
    +import CLASS from "../config/classes";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * This API highlights specified targets and fade out the others.<br><br>
    +	 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.
    +	 * @method focus
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} targetIdsValue Target ids to be highlighted.
    +	 * @example
    +	 *  // data1 will be highlighted and the others will be faded out
    +	 *  chart.focus("data1");
    +	 *
    +	 * // data1 and data2 will be highlighted and the others will be faded out
    +	 * chart.focus(["data1", "data2"]);
    +	 *
    +	 * // all targets will be highlighted
    +	 * chart.focus();
    +	 */
    +	focus(targetIdsValue) {
    +		const $$ = this.internal;
    +		const targetIds = $$.mapToTargetIds(targetIdsValue);
    +		const candidates = $$.svg.selectAll(
    +			$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))
    +		);
    +
    +		this.revert();
    +		this.defocus();
    +
    +		candidates.classed(CLASS.focused, true).classed(CLASS.defocused, false);
    +
    +		$$.hasArcType() &&
    +		$$.expandArc(targetIds);
    +
    +		$$.toggleFocusLegend(targetIds, true);
    +
    +		$$.focusedTargetIds = targetIds;
    +		$$.defocusedTargetIds = $$.defocusedTargetIds.filter(id => targetIds.indexOf(id) < 0);
    +	},
    +
    +	/**
    +	 * This API fades out specified targets and reverts the others.<br><br>
    +	 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.
    +	 * @method defocus
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} Target ids to be faded out.
    +	 * @example
    +	 * // data1 will be faded out and the others will be reverted.
    +	 * chart.defocus("data1");
    +	 *
    +	 * // data1 and data2 will be faded out and the others will be reverted.
    +	 * chart.defocus(["data1", "data2"]);
    +	 *
    +	 * // all targets will be faded out.
    +	 * chart.defocus();
    +	 */
    +	defocus(targetIdsValue) {
    +		const $$ = this.internal;
    +		const targetIds = $$.mapToTargetIds(targetIdsValue);
    +		const candidates = $$.svg.selectAll(
    +			$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))
    +		);
    +
    +		candidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);
    +		$$.hasArcType() && $$.unexpandArc(targetIds);
    +		$$.toggleFocusLegend(targetIds, false);
    +
    +		$$.focusedTargetIds = $$.focusedTargetIds.filter(id => targetIds.indexOf(id) < 0);
    +		$$.defocusedTargetIds = targetIds;
    +	},
    +
    +	/**
    +	 * This API reverts specified targets.<br><br>
    +	 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.
    +	 * @method revert
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} Target ids to be reverted
    +	 * @example
    +	 * // data1 will be reverted.
    +	 * chart.revert("data1");
    +	 *
    +	 * // data1 and data2 will be reverted.
    +	 * chart.revert(["data1", "data2"]);
    +	 *
    +	 * // all targets will be reverted.
    +	 * chart.revert();
    +	 */
    +	revert(targetIdsValue) {
    +		const $$ = this.internal;
    +		const targetIds = $$.mapToTargetIds(targetIdsValue);
    +		const candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets
    +
    +		candidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);
    +		$$.hasArcType() && $$.unexpandArc(targetIds);
    +
    +		if ($$.config.legend_show) {
    +			$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
    +			$$.legend.selectAll($$.selectorLegends(targetIds))
    +				.filter(function() {
    +					return d3Select(this).classed(CLASS.legendItemFocused);
    +				})
    +				.classed(CLASS.legendItemFocused, false);
    +		}
    +
    +		$$.focusedTargetIds = [];
    +		$$.defocusedTargetIds = [];
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.grid.js.html b/doc/api_api.grid.js.html new file mode 100644 index 000000000..34a0f1d0c --- /dev/null +++ b/doc/api_api.grid.js.html @@ -0,0 +1,248 @@ + + + + + + api/api.grid.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.grid.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +/**
    + * Update x grid lines.
    + * @method xgrids
    + * @instance
    + * @memberOf Chart
    + * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.
    + * @example
    + *  // Show 2 x grid lines
    + * chart.xgrids([
    + *    {value: 1, text: "Label 1"},
    + *    {value: 4, text: "Label 4"}
    + * ]);
    + */
    +const xgrids = function(grids) {
    +	const $$ = this.internal;
    +	const config = $$.config;
    +
    +	if (!grids) {
    +		return config.grid_x_lines;
    +	}
    +
    +	config.grid_x_lines = grids;
    +	$$.redrawWithoutRescale();
    +
    +	return config.grid_x_lines;
    +};
    +
    +extend(xgrids, {
    +	/**
    +	 * Add x grid lines.<br>
    +	 * This API adds new x grid lines instead of replacing like xgrids.
    +	 * @method xgrids․add
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.
    +	 * @example
    +	 *  // Add a new x grid line
    +	 * chart.xgrids.add(
    +	 *   {value: 4, text: "Label 4"}
    +	 * );
    +	 *
    +	 * // Add new x grid lines
    +	 * chart.xgrids.add([
    +	 *   {value: 2, text: "Label 2"},
    +	 *   {value: 4, text: "Label 4"}
    +	 * ]);
    +	 */
    +	add: function(grids) {
    +		return this.xgrids(
    +			this.internal.config.grid_x_lines
    +				.concat(grids || [])
    +		);
    +	},
    +
    +	/**
    +	 * Remove x grid lines.<br>
    +	 * This API removes x grid lines.
    +	 * @method xgrids․remove
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.
    +	 * @example
    +	 * // x grid line on x = 2 will be removed
    +	 * chart.xgrids.remove({value: 2});
    +	 *
    +	 * // x grid lines that have 'grid-A' will be removed
    +	 * chart.xgrids.remove({
    +	 *   class: "grid-A"
    +	 * });
    +	 *
    +	 * // all of x grid lines will be removed
    +	 * chart.xgrids.remove();
    +	 */
    +	remove: function(params) { // TODO: multiple
    +		this.internal.removeGridLines(params, true);
    +	}
    +});
    +
    +
    +/**
    + * Update y grid lines.
    + * @method ygrids
    + * @instance
    + * @memberOf Chart
    + * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.
    + * @example
    + *  // Show 2 y grid lines
    + * chart.ygrids([
    + *    {value: 100, text: "Label 1"},
    + *    {value: 400, text: "Label 4"}
    + * ]);
    + */
    +const ygrids = function(grids) {
    +	const $$ = this.internal;
    +	const config = $$.config;
    +
    +	if (!grids) {
    +		return config.grid_y_lines;
    +	}
    +
    +	config.grid_y_lines = grids;
    +	$$.redrawWithoutRescale();
    +
    +	return config.grid_y_lines;
    +};
    +
    +extend(ygrids, {
    +	/**
    +	 * Add y grid lines.<br>
    +	 * This API adds new y grid lines instead of replacing like ygrids.
    +	 * @method ygrids․add
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.
    +	 * @example
    +	 *  // Add a new x grid line
    +	 * chart.ygrids.add(
    +	 *   {value: 400, text: "Label 4"}
    +	 * );
    +	 *
    +	 * // Add new x grid lines
    +	 * chart.ygrids.add([
    +	 *   {value: 200, text: "Label 2"},
    +	 *   {value: 400, text: "Label 4"}
    +	 * ]);
    +	 */
    +	add: function(grids) {
    +		return this.ygrids(
    +			this.internal.config.grid_y_lines
    +				.concat(grids || [])
    +		);
    +	},
    +
    +	/**
    +	 * Remove y grid lines.<br>
    +	 * This API removes x grid lines.
    +	 * @method ygrids․remove
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.
    +	 * @example
    +	 * // y grid line on y = 200 will be removed
    +	 * chart.ygrids.remove({value: 200});
    +	 *
    +	 * // y grid lines that have 'grid-A' will be removed
    +	 * chart.ygrids.remove({
    +	 *   class: "grid-A"
    +	 * });
    +	 *
    +	 * // all of y grid lines will be removed
    +	 * chart.ygrids.remove();
    +	 */
    +	remove: function(params) { // TODO: multiple
    +		this.internal.removeGridLines(params, false);
    +	}
    +});
    +
    +extend(Chart.prototype, {
    +	xgrids,
    +	ygrids
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.group.js.html b/doc/api_api.group.js.html new file mode 100644 index 000000000..59e5d187a --- /dev/null +++ b/doc/api_api.group.js.html @@ -0,0 +1,114 @@ + + + + + + api/api.group.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.group.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {isUndefined, extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Update groups for the targets.
    +	 * @method groups
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.
    +	 * @example
    +	 *  // data1 and data2 will be a new group.
    +	 *  chart.groups([
    +	 *     ["data1", "data2"]
    +	 *  ]);
    +	 */
    +	groups(groups) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (isUndefined(groups)) {
    +			return config.data_groups;
    +		}
    +
    +		config.data_groups = groups;
    +		$$.redraw();
    +
    +		return config.data_groups;
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.legend.js.html b/doc/api_api.legend.js.html new file mode 100644 index 000000000..8cae5e745 --- /dev/null +++ b/doc/api_api.legend.js.html @@ -0,0 +1,146 @@ + + + + + + api/api.legend.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.legend.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +/**
    + * Define legend
    + * @ignore
    + */
    +const legend = extend(() => {}, {
    +	/**
    +	 * Show legend for each target.
    +	 * @method legend․show
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} targetIds
    +	 * - If targetIds is given, specified target's legend will be shown.
    +	 * - If only one target is the candidate, String can be passed.
    +	 * - If no argument is given, all of target's legend will be shown.
    +	 * @example
    +	 * // Show legend for data1.
    +	 * chart.legend.show("data1");
    +	 *
    +	 * // Show legend for data1 and data2.
    +	 * chart.legend.show(["data1", "data2"]);
    +	 *
    +	 * // Show all legend.
    +	 * chart.legend.show();
    +	 */
    +	show: function(targetIds) {
    +		const $$ = this.internal;
    +
    +		$$.showLegend($$.mapToTargetIds(targetIds));
    +		$$.updateAndRedraw({withLegend: true});
    +	},
    +
    +	/**
    +	 * Hide legend for each target.
    +	 * @method legend․hide
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} targetIds
    +	 * - If targetIds is given, specified target's legend will be hidden.
    +	 * - If only one target is the candidate, String can be passed.
    +	 * - If no argument is given, all of target's legend will be hidden.
    +	 * @example
    +	 * // Hide legend for data1.
    +	 * chart.legend.hide("data1");
    +	 *
    +	 * // Hide legend for data1 and data2.
    +	 * chart.legend.hide(["data1", "data2"]);
    +	 *
    +	 * // Hide all legend.
    +	 * chart.legend.hide();
    +	 */
    +	hide: function(targetIds) {
    +		const $$ = this.internal;
    +
    +		$$.hideLegend($$.mapToTargetIds(targetIds));
    +		$$.updateAndRedraw({withLegend: true});
    +	}
    +});
    +
    +extend(Chart.prototype, {legend});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.load.js.html b/doc/api_api.load.js.html new file mode 100644 index 000000000..69d24233f --- /dev/null +++ b/doc/api_api.load.js.html @@ -0,0 +1,209 @@ + + + + + + api/api.load.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.load.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend, isString, isArray} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Load data to the chart.<br><br>
    +	 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
    +	 * - <b>Note:</b>
    +	 * unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>
    +	 * done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering
    +	 * @method load
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} args The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Description |
    +	 *    | --- | --- |
    +	 *    | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |
    +	 *    | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |
    +	 *    | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |
    +	 *    | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |
    +	 *    | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |
    +	 *    | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. |
    +	 *    | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |
    +	 *    | done | The specified function will be called after data loaded.|
    +	 *
    +	 * @example
    +	 *  // Load data1 and unload data2 and data3
    +	 *  chart.load({
    +	 *     columns: [
    +	 *        ["data1", 100, 200, 150, ...],
    +	 *        ...
    +	 *    ],
    +	 *    unload: ["data2", "data3"],
    +	 *    url: "...",
    +	 *    done: function() { ... }
    +	 *  });
    +	 */
    +	load(args) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		// update xs if specified
    +		args.xs && $$.addXs(args.xs);
    +
    +		// update names if exists
    +		"names" in args && this.data.names(args.names);
    +
    +		// update classes if exists
    +		"classes" in args && Object.keys(args.classes).forEach(id => {
    +			config.data_classes[id] = args.classes[id];
    +		});
    +
    +		// update categories if exists
    +		if ("categories" in args && $$.isCategorized()) {
    +			config.axis_x_categories = args.categories;
    +		}
    +
    +		// update axes if exists
    +		"axes" in args && Object.keys(args.axes).forEach(id => {
    +			config.data_axes[id] = args.axes[id];
    +		});
    +
    +
    +		// update colors if exists
    +		"colors" in args && Object.keys(args.colors).forEach(id => {
    +			config.data_colors[id] = args.colors[id];
    +		});
    +
    +		// use cache if exists
    +		if ("cacheIds" in args && $$.hasCaches(args.cacheIds, true)) {
    +			$$.load($$.getCache(args.cacheIds, true), args.done);
    +			return;
    +		}
    +
    +		// unload if needed
    +		if ("unload" in args && args.unload !== false) {
    +			// TODO: do not unload if target will load (included in url/rows/columns)
    +			$$.unload($$.mapToTargetIds(args.unload === true ? null : args.unload), () =>
    +				$$.loadFromArgs(args)
    +			);
    +		} else {
    +			$$.loadFromArgs(args);
    +		}
    +	},
    +
    +	/**
    +	 * Unload data to the chart.<br><br>
    +	 * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
    +	 * - <b>Note:</b>
    +	 * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>
    +	 * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
    +	 * @method unload
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} args
    +	 * - If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded.
    +	 * - If done given, the specified function will be called after data loded.
    +	 * @example
    +	 *  // Unload data2 and data3
    +	 *  chart.unload({
    +	 *    ids: ["data2", "data3"]
    +	 *  });
    +	 */
    +	unload(argsValue) {
    +		const $$ = this.internal;
    +		let args = argsValue || {};
    +
    +		if (isArray(args)) {
    +			args = {ids: args};
    +		} else if (isString(args)) {
    +			args = {ids: [args]};
    +		}
    +
    +		$$.unload($$.mapToTargetIds(args.ids), () => {
    +			$$.redraw({
    +				withUpdateOrgXDomain: true,
    +				withUpdateXDomain: true,
    +				withLegend: true
    +			});
    +
    +			args.done && args.done();
    +		});
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.region.js.html b/doc/api_api.region.js.html new file mode 100644 index 000000000..195c6540a --- /dev/null +++ b/doc/api_api.region.js.html @@ -0,0 +1,205 @@ + + + + + + api/api.region.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.region.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import CLASS from "../config/classes";
    +import {extend} from "../internals/util";
    +
    +/**
    + * Update regions.
    + * @method regions
    + * @instance
    + * @memberOf Chart
    + * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.
    + * @return {Array} regions
    + * @example
    + * // Show 2 regions
    + * chart.regions([
    + *    {axis: "x", start: 5, class: "regionX"},
    + *    {axis: "y", end: 50, class: "regionY"}
    + * ]);
    + */
    +const regions = function(regions) {
    +	const $$ = this.internal;
    +	const config = $$.config;
    +
    +	if (!regions) {
    +		return config.regions;
    +	}
    +
    +	config.regions = regions;
    +	$$.redrawWithoutRescale();
    +
    +	return config.regions;
    +};
    +
    +extend(regions, {
    +	/**
    +	 * Add new region.<br><br>
    +	 * This API adds new region instead of replacing like regions.
    +	 * @method regions․add
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.
    +	 * @return {Array} regions
    +	 * @example
    +	 * // Add a new region
    +	 * chart.regions.add(
    +	 *    {axis: "x", start: 5, class: "regionX"}
    +	 * );
    +	 *
    +	 * // Add new regions
    +	 * chart.regions.add([
    +	 *    {axis: "x", start: 5, class: "regionX"},
    +	 *    {axis: "y", end: 50, class: "regionY"}
    +	 *]);
    +	 */
    +	add: function(regions) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (!regions) {
    +			return config.regions;
    +		}
    +
    +		config.regions = config.regions.concat(regions);
    +		$$.redrawWithoutRescale();
    +
    +		return config.regions;
    +	},
    +
    +	/**
    +	 * Remove regions.<br><br>
    +	 * This API removes regions.
    +	 * @method regions․remove
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.
    +	 * @return {Array} regions
    +	 * @example
    +	 * // regions that have 'region-A' or 'region-B' will be removed.
    +	 * chart.regions.remove({
    +	 *   classes: [
    +	 *     "region-A", "region-B"
    +	 *   ]
    +	 * });
    +	 *
    +	 * // all of regions will be removed.
    +	 * chart.regions.remove();
    +	 */
    +	remove: function(optionsValue) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		const options = optionsValue || {};
    +		const duration = $$.getOption(options, "duration", config.transition_duration);
    +		const classes = $$.getOption(options, "classes", [CLASS.region]);
    +		const regions = $$.main.select(`.${CLASS.regions}`)
    +			.selectAll(classes.map(c => `.${c}`));
    +
    +		(duration ? regions.transition().duration(duration) : regions)
    +			.style("opacity", "0")
    +			.remove();
    +
    +		config.regions = config.regions.filter(region => {
    +			let found = false;
    +
    +			if (!region.class) {
    +				return true;
    +			}
    +
    +			region.class.split(" ").forEach(c => {
    +				if (classes.indexOf(c) >= 0) {
    +					found = true;
    +				}
    +			});
    +
    +			return !found;
    +		});
    +
    +		return config.regions;
    +	}
    +});
    +
    +extend(Chart.prototype, {regions});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.selection.js.html b/doc/api_api.selection.js.html new file mode 100644 index 000000000..29c222d1c --- /dev/null +++ b/doc/api_api.selection.js.html @@ -0,0 +1,223 @@ + + + + + + api/api.selection.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.selection.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {select as d3Select} from "d3-selection";
    +import Chart from "../internals/Chart";
    +import {isDefined, extend} from "../internals/util";
    +import CLASS from "../config/classes";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Get selected data points.<br><br>
    +	 * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.
    +	 * @method selected
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.
    +	 * @return {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]`
    +	 * @example
    +	 *  // all selected data points will be returned.
    +	 *  chart.selected();
    +	 *  // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ]
    +	 *
    +	 *  // all selected data points of data1 will be returned.
    +	 *  chart.selected("data1");
    +	 */
    +	selected(targetId) {
    +		const $$ = this.internal;
    +		const dataPoint = [];
    +
    +		$$.main.selectAll(`.${CLASS.shapes + $$.getTargetSelectorSuffix(targetId)}`)
    +			.selectAll(`.${CLASS.shape}`)
    +			.filter(function() {
    +				return d3Select(this).classed(CLASS.SELECTED);
    +			})
    +			.each(d => dataPoint.push(d));
    +
    +		return dataPoint;
    +	},
    +
    +	/**
    +	 * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)`
    +	 * @method select
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} [ids] id value to get selected.
    +	 * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
    +	 * @param {Boolean} [resetOther] Unselect already selected.
    +	 * @example
    +	 *  // select all data points
    +	 *  chart.select();
    +	 *
    +	 *  // select all from 'data2'
    +	 *  chart.select("data2");
    +	 *
    +	 *  // select all from 'data1' and 'data2'
    +	 *  chart.select(["data1", "data2"]);
    +	 *
    +	 *  // select from 'data1', indices 2 and unselect others selected
    +	 *  chart.select("data1", [2], true);
    +	 *
    +	 *  // select from 'data1', indices 0, 3 and 5
    +	 *  chart.select("data1", [0, 3, 5]);
    +	 */
    +	select(ids, indices, resetOther) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (!config.data_selection_enabled) {
    +			return;
    +		}
    +
    +		$$.main.selectAll(`.${CLASS.shapes}`)
    +			.selectAll(`.${CLASS.shape}`)
    +			.each(function(d, i) {
    +				const shape = d3Select(this);
    +				const id = d.data ? d.data.id : d.id;
    +				const toggle = $$.getToggle(this, d).bind($$);
    +				const isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
    +				const isTargetIndex = !indices || indices.indexOf(i) >= 0;
    +				const isSelected = shape.classed(CLASS.SELECTED);
    +
    +				// line/area selection not supported yet
    +				if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {
    +					return;
    +				}
    +
    +				if (isTargetId && isTargetIndex) {
    +					if (config.data_selection_isselectable(d) && !isSelected) {
    +						toggle(true, shape.classed(CLASS.SELECTED, true), d, i);
    +					}
    +				} else if (isDefined(resetOther) && resetOther && isSelected) {
    +					toggle(false, shape.classed(CLASS.SELECTED, false), d, i);
    +				}
    +			});
    +	},
    +
    +	/**
    +	 * Set data points to be un-selected.
    +	 * @method unselect
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} [ids] id value to be unselected.
    +	 * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
    +	 * @example
    +	 *  // unselect all data points
    +	 *  chart.unselect();
    +	 *
    +	 *  // unselect all from 'data1'
    +	 *  chart.unselect("data1");
    +	 *
    +	 *  // unselect from 'data1', indices 2
    +	 *  chart.unselect("data1", [2]);
    +	 */
    +	unselect(ids, indices) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (!config.data_selection_enabled) {
    +			return;
    +		}
    +
    +		$$.main.selectAll(`.${CLASS.shapes}`)
    +			.selectAll(`.${CLASS.shape}`)
    +			.each(function(d, i) {
    +				const shape = d3Select(this);
    +				const id = d.data ? d.data.id : d.id;
    +				const toggle = $$.getToggle(this, d).bind($$);
    +				const isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;
    +				const isTargetIndex = !indices || indices.indexOf(i) >= 0;
    +				const isSelected = shape.classed(CLASS.SELECTED);
    +
    +				// line/area selection not supported yet
    +				if (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {
    +					return;
    +				}
    +
    +				if (isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected) {
    +					toggle(false, shape.classed(CLASS.SELECTED, false), d, i);
    +				}
    +			});
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.show.js.html b/doc/api_api.show.js.html new file mode 100644 index 000000000..474b18af4 --- /dev/null +++ b/doc/api_api.show.js.html @@ -0,0 +1,204 @@ + + + + + + api/api.show.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.show.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Show data series on chart
    +	 * @method show
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} [targetIdsValue=all] The target id value.
    +	 * @param {Object} [options] The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Type | default | Description |
    +	 *    | --- | --- | --- | --- |
    +	 *    | withLegend | Boolean | false | whether or not display legend |
    +	 *
    +	 * @example
    +	 * // show 'data1'
    +	 * chart.show("data1");
    +	 *
    +	 * // show 'data1' and 'data3'
    +	 * chart.show(["data1", "data3"]);
    +	 */
    +	show(targetIdsValue, options = {}) {
    +		const $$ = this.internal;
    +		const targetIds = $$.mapToTargetIds(targetIdsValue);
    +
    +		$$.removeHiddenTargetIds(targetIds);
    +		const targets = $$.svg.selectAll($$.selectorTargets(targetIds));
    +
    +		targets.transition()
    +			.style("opacity", "1", "important")
    +			.call($$.endall, () => {
    +				targets.style("opacity", null).style("opacity", "1");
    +			});
    +
    +		options.withLegend && $$.showLegend(targetIds);
    +
    +		$$.redraw({
    +			withUpdateOrgXDomain: true,
    +			withUpdateXDomain: true,
    +			withLegend: true
    +		});
    +	},
    +
    +	/**
    +	 * Hide data series from chart
    +	 * @method hide
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} [targetIdsValue=all] The target id value.
    +	 * @param {Object} [options] The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Type | default | Description |
    +	 *    | --- | --- | --- | --- |
    +	 *    | withLegend | Boolean | false | whether or not display legend |
    +	 *
    +	 * @example
    +	 * // hide 'data1'
    +	 * chart.hide("data1");
    +	 *
    +	 * // hide 'data1' and 'data3'
    +	 * chart.hide(["data1", "data3"]);
    +	 */
    +	hide(targetIdsValue, options = {}) {
    +		const $$ = this.internal;
    +		const targetIds = $$.mapToTargetIds(targetIdsValue);
    +
    +		$$.addHiddenTargetIds(targetIds);
    +		const targets = $$.svg.selectAll($$.selectorTargets(targetIds));
    +
    +		targets.transition()
    +			.style("opacity", "0", "important")
    +			.call($$.endall, () => {
    +				targets.style("opacity", null).style("opacity", "0");
    +			});
    +
    +		options.withLegend && $$.hideLegend(targetIds);
    +
    +		$$.redraw({
    +			withUpdateOrgXDomain: true,
    +			withUpdateXDomain: true,
    +			withLegend: true
    +		});
    +	},
    +
    +	/**
    +	 * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.
    +	 * @method toggle
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Array} [targetIdsValue=all] The target id value.
    +	 * @param {Object} [options] The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Type | default | Description |
    +	 *    | --- | --- | --- | --- |
    +	 *    | withLegend | Boolean | false | whether or not display legend |
    +	 *
    +	 * @example
    +	 * // toggle 'data1'
    +	 * chart.toggle("data1");
    +	 *
    +	 * // toggle 'data1' and 'data3'
    +	 * chart.toggle(["data1", "data3"]);
    +	 */
    +	toggle(targetIds, options = {}) {
    +		const $$ = this.internal;
    +		const targets = {show: [], hide: []};
    +
    +		// sort show & hide target ids
    +		$$.mapToTargetIds(targetIds)
    +			.forEach(id => targets[$$.isTargetToShow(id) ? "hide" : "show"].push(id));
    +
    +		// perform show & hide task separately
    +		// https://github.com/naver/billboard.js/issues/454
    +		targets.show.length && this.show(targets.show, options);
    +		targets.hide.length && setTimeout(() => this.hide(targets.hide, options), 0);
    +	}
    +});
    +
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.tooltip.js.html b/doc/api_api.tooltip.js.html new file mode 100644 index 000000000..5bf51ac8d --- /dev/null +++ b/doc/api_api.tooltip.js.html @@ -0,0 +1,178 @@ + + + + + + api/api.tooltip.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.tooltip.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {isValue, isDefined, extend} from "../internals/util";
    +
    +/**
    + * Define tooltip
    + * @ignore
    + */
    +const tooltip = extend(() => {}, {
    +	/**
    +	 * Show tooltip
    +	 * @method tooltip․show
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} args The object can consist with following members:<br>
    +	 *
    +	 *    | Key | Type | Description |
    +	 *    | --- | --- | --- |
    +	 *    | index | Number | Determine focus by index |
    +	 *    | x | Number &vert; Date | Determine focus by x Axis index |
    +	 *    | data | Object | Determine focus data with following keys: `x` or `index`.<br>When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is set, the target is determined by mouse position and needs specify `x`, `id` and `value`. |
    +	 *    | mouse | Array | Determine x and y coordinate value relative the targeted x Axis element.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |
    +	 *
    +	 * @example
    +	 *  // show the 2nd x Axis coordinate tooltip
    +	 *  chart.tooltip.show({
    +	 *    index: 1
    +	 *  });
    +	 *
    +	 *  // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element.
    +	 *  chart.tooltip.show({
    +	 *    data: {x: 2},
    +	 *    mouse: [50, 100]
    +	 *  });
    +	 *
    +	 *  // show tooltip for timeseries x axis
    +	 *  chart.tooltip.show({
    +	 *    x: new Date("2018-01-02 00:00")
    +	 *  });
    +	 */
    +	show: function(args = {}) {
    +		const $$ = this.internal;
    +		let index;
    +		let mouse;
    +
    +		// determine mouse position on the chart
    +		if (args.mouse) {
    +			mouse = args.mouse;
    +		}
    +
    +		// determine focus data
    +		if (args.data) {
    +			if ($$.isMultipleX()) {
    +				// if multiple xs, target point will be determined by mouse
    +				mouse = [
    +					$$.x(args.data.x),
    +					$$.getYScale(args.data.id)(args.data.value)
    +				];
    +
    +				index = null;
    +			} else {
    +				// TODO: when tooltip_grouped = false
    +				index = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);
    +			}
    +		} else if (isDefined(args.x)) {
    +			index = $$.getIndexByX(args.x);
    +		} else if (isDefined(args.index)) {
    +			index = args.index;
    +		}
    +
    +		// emulate events to show
    +		($$.inputType === "mouse" ?
    +			["mouseover", "mousemove"] : ["touchstart"]
    +		).forEach(eventName => {
    +			$$.dispatchEvent(eventName, index, mouse);
    +		});
    +	},
    +
    +	/**
    +	 * Hide tooltip
    +	 * @method tooltip․hide
    +	 * @instance
    +	 * @memberOf Chart
    +	 */
    +	hide: function() {
    +		const $$ = this.internal;
    +
    +		$$.hideTooltip();
    +		$$.hideXGridFocus();
    +		$$.unexpandCircles();
    +		$$.unexpandBars();
    +	}
    +});
    +
    +extend(Chart.prototype, {tooltip});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.transform.js.html b/doc/api_api.transform.js.html new file mode 100644 index 000000000..267bc60ba --- /dev/null +++ b/doc/api_api.transform.js.html @@ -0,0 +1,136 @@ + + + + + + api/api.transform.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.transform.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import ChartInternal from "../internals/ChartInternal";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Change the type of the chart.
    +	 * @method transform
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String} type Specify the type to be transformed. The types listed in data.type can be used.
    +	 * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate.
    +	 * @example
    +	 *  // all targets will be bar chart.
    +	 *  chart.transform("bar");
    +	 *
    +	 *  // only data1 will be bar chart.
    +	 *  chart.transform("bar", "data1");
    +	 *
    +	 *  // only data1 and data2 will be bar chart.
    +	 *  chart.transform("bar", ["data1", "data2"]);
    +	 */
    +	transform(type, targetIds) {
    +		const $$ = this.internal;
    +		const options = ["pie", "donut"]
    +			.indexOf(type) >= 0 ? {withTransform: true} : null;
    +
    +		$$.transformTo(targetIds, type, options);
    +	}
    +});
    +
    +extend(ChartInternal.prototype, {
    +	/**
    +	 * Change the type of the chart.
    +	 * @private
    +	 * @param {String|Array} targetIds
    +	 * @param {String} type
    +	 * @param {Object} optionsForRedraw
    +	 */
    +	transformTo(targetIds, type, optionsForRedraw) {
    +		const $$ = this;
    +		const withTransitionForAxis = !$$.hasArcType();
    +		const options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};
    +
    +		options.withTransitionForTransform = false;
    +		$$.transiting = false;
    +
    +		$$.setTargetType(targetIds, type);
    +		$$.updateTargets($$.data.targets); // this is needed when transforming to arc
    +		$$.updateAndRedraw(options);
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.x.js.html b/doc/api_api.x.js.html new file mode 100644 index 000000000..688444a79 --- /dev/null +++ b/doc/api_api.x.js.html @@ -0,0 +1,149 @@ + + + + + + api/api.x.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.x.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "../internals/Chart";
    +import {extend} from "../internals/util";
    +
    +extend(Chart.prototype, {
    +	/**
    +	 * Get and set x values for the chart.
    +	 * @method x
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
    +	 * @return {Object} xs
    +	 * @example
    +	 *  // Get current x values
    +	 *  chart.x();
    +	 *
    +	 *  // Update x values for all targets
    +	 *  chart.x([100, 200, 300, 400, ...]);
    +	 */
    +	x(x) {
    +		const $$ = this.internal;
    +
    +		if (arguments.length) {
    +			$$.updateTargetX($$.data.targets, x);
    +
    +			$$.redraw({
    +				withUpdateOrgXDomain: true,
    +				withUpdateXDomain: true
    +			});
    +		}
    +
    +		return $$.data.xs;
    +	},
    +
    +	/**
    +	 * Get and set x values for the chart.
    +	 * @method xs
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
    +	 * @return {Object} xs
    +	 * @example
    +	 *  // Get current x values
    +	 *  chart.xs();
    +	 *
    +	 *  // Update x values for all targets
    +	 *  chart.xs({
    +	 *    data1: [10, 20, 30, 40, ...],
    +	 *    data2: [100, 200, 300, 400, ...]
    +	 *  });
    +	 */
    +	xs(xs) {
    +		const $$ = this.internal;
    +
    +		if (arguments.length) {
    +			$$.updateTargetXs($$.data.targets, xs);
    +
    +			$$.redraw({
    +				withUpdateOrgXDomain: true,
    +				withUpdateXDomain: true
    +			});
    +		}
    +
    +		return $$.data.xs;
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/api_api.zoom.js.html b/doc/api_api.zoom.js.html new file mode 100644 index 000000000..750f83552 --- /dev/null +++ b/doc/api_api.zoom.js.html @@ -0,0 +1,301 @@ + + + + + + api/api.zoom.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    api/api.zoom.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import {
    +	min as d3Min,
    +	max as d3Max
    +} from "d3-array";
    +import {zoomIdentity as d3ZoomIdentity} from "d3-zoom";
    +import Chart from "../internals/Chart";
    +import {callFn, isDefined, isObject, isString, extend} from "../internals/util";
    +
    +/**
    + * Zoom by giving x domain.
    + * @method zoom
    + * @instance
    + * @memberOf Chart
    + * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.
    + * @return {Array} domain value in array
    + * @example
    + *  // Zoom to specified domain
    + *  chart.zoom([10, 20]);
    + *
    + *  // Get the current zoomed domain
    + *  chart.zoom();
    + */
    +const zoom = function(domainValue) {
    +	const $$ = this.internal;
    +	let domain = domainValue;
    +	let resultDomain;
    +
    +	if ($$.config.zoom_enabled && domain) {
    +		const isTimeSeries = $$.isTimeSeries();
    +
    +		if (isTimeSeries) {
    +			domain = domain.map(x => $$.parseDate(x));
    +		}
    +
    +		if ($$.config.subchart_show) {
    +			const xScale = $$.zoomScale || $$.x;
    +
    +			$$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]);
    +			resultDomain = domain;
    +		} else {
    +			const orgDomain = $$.subX.domain();
    +			const k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]);
    +			const gap = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;
    +			const tx = isTimeSeries ?
    +				(0 - k * $$.x(domain[0].getTime())) : domain[0] - k * ($$.x(domain[0]) - gap);
    +
    +			$$.zoom.updateTransformScale(
    +				d3ZoomIdentity.translate(tx, 0).scale(k)
    +			);
    +
    +			resultDomain = $$.zoomScale.domain();
    +		}
    +
    +		$$.redraw({
    +			withTransition: true,
    +			withY: $$.config.zoom_rescale,
    +			withDimension: false
    +		});
    +
    +		$$.setZoomResetButton();
    +		callFn($$.config.zoom_onzoom, this, $$.x.orgDomain());
    +	} else {
    +		resultDomain = $$.zoomScale ?
    +			$$.zoomScale.domain() : $$.x.orgDomain();
    +	}
    +
    +	return resultDomain;
    +};
    +
    +extend(zoom, {
    +	/**
    +	 * Enable and disable zooming.
    +	 * @method zoom․enable
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {String|Boolean} enabled Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset.
    +	 * @example
    +	 *  // Enable zooming using the mouse wheel
    +	 *  chart.zoom.enable(true);
    +	 *  // Or
    +	 *  chart.zoom.enable("wheel");
    +	 *
    +	 *  // Enable zooming by dragging
    +	 *  chart.zoom.enable("drag");
    +	 *
    +	 *  // Disable zooming
    +	 *  chart.zoom.enable(false);
    +	 */
    +	enable: function(enabled = "wheel") {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +		let enableType = enabled;
    +
    +		if (enabled) {
    +			enableType = isString(enabled) && /^(drag|wheel)$/.test(enabled) ?
    +				{type: enabled} : enabled;
    +		}
    +
    +		config.zoom_enabled = enableType;
    +
    +		if (!$$.zoom) {
    +			$$.initZoom();
    +			$$.initZoomBehaviour();
    +			$$.bindZoomEvent();
    +		} else if (enabled === false) {
    +			$$.bindZoomEvent(false);
    +		}
    +
    +		$$.updateAndRedraw();
    +	},
    +
    +	/**
    +	 * Set or get x Axis maximum zoom range value
    +	 * @method zoom․max
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Number} [max] maximum value to set for zoom
    +	 * @return {Number} zoom max value
    +	 * @example
    +	 *  // Set maximum range value
    +	 *  chart.zoom.max(20);
    +	 */
    +	max: function(max) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (max === 0 || max) {
    +			config.zoom_x_max = d3Max([$$.orgXDomain[1], max]);
    +		}
    +
    +		return config.zoom_x_max;
    +	},
    +
    +	/**
    +	 * Set or get x Axis minimum zoom range value
    +	 * @method zoom․min
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Number} [min] minimum value tp set for zoom
    +	 * @return {Number} zoom min value
    +	 * @example
    +	 *  // Set minimum range value
    +	 *  chart.zoom.min(-1);
    +	 */
    +	min: function(min) {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if (min === 0 || min) {
    +			config.zoom_x_min = d3Min([$$.orgXDomain[0], min]);
    +		}
    +
    +		return config.zoom_x_min;
    +	},
    +
    +	/**
    +	 * Set zoom range
    +	 * @method zoom․range
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @param {Object} [range]
    +	 * @return {Object} zoom range value
    +	 * {
    +	 *   min: 0,
    +	 *   max: 100
    +	 * }
    +	 * @example
    +	 *  chart.zoom.range({
    +	 *      min: 10,
    +	 *      max: 100
    +	 *  });
    +	 */
    +	range: function(range) {
    +		const zoom = this.zoom;
    +
    +		if (isObject(range)) {
    +			isDefined(range.min) && zoom.min(range.min);
    +			isDefined(range.max) && zoom.max(range.max);
    +		}
    +
    +		return {
    +			min: zoom.min(),
    +			max: zoom.max()
    +		};
    +	}
    +});
    +
    +extend(Chart.prototype, {
    +	zoom,
    +
    +	/**
    +	 * Unzoom zoomed area
    +	 * @method unzoom
    +	 * @instance
    +	 * @memberOf Chart
    +	 * @example
    +	 *  chart.unzoom();
    +	 */
    +	unzoom() {
    +		const $$ = this.internal;
    +		const config = $$.config;
    +
    +		if ($$.zoomScale) {
    +			config.subchart_show ?
    +				$$.brush.getSelection().call($$.brush.move, null) :
    +				$$.zoom.updateTransformScale(d3ZoomIdentity);
    +
    +			$$.updateZoom();
    +			$$.zoom.resetBtn && $$.zoom.resetBtn.style("display", "none");
    +
    +			$$.redraw({
    +				withTransition: true,
    +				withY: config.zoom_rescale
    +			});
    +		}
    +	}
    +});
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/bb.html b/doc/bb.html new file mode 100644 index 000000000..4c50be6db --- /dev/null +++ b/doc/bb.html @@ -0,0 +1,598 @@ + + + + + + bb - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    bb

    + + + + + + + +
    + +
    + +

    + bb +

    + + +
    + +
    + +
    + + + +
    + + +
    Source:
    +
    + + + +
    Version:
    +
    • 1.6.0
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + +

    Members

    + + + +

    (static) instance

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    instance + + +Array + + + +

    instance array

    + + + + + + +
    +

    An array containing instance created

    +
    + + + + + + + +
    Example
    + +
    // generate charts
    + var chart1 = bb.generate(...);
    + var chart2 = bb.generate(...);
    +
    + bb.instance;  // [ chart1, chart2, ... ]
    + + + + + +

    (static) version

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    Properties:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    version + + +String + + + +

    version

    + + + + + + +
    +

    Version information

    +
    + + + + + + + +
    Example
    + +
    bb.version;  // "1.0.0"
    + + + + + + + +

    Methods

    + + + + + + +

    (static) generate(options) → {Chart}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    See:
    +
    +
      +
    • Options for different generation options
    • + +
    • Chart for different methods API
    • +
    +
    + + + +
    + + + + + +
    +

    Generate chart

    +
    + + + + + + + + + +
    Examples
    + +
    <!-- chart holder -->
    +<div id="LineChart"></div>
    + +
    // generate chart with options
    + var chart = bb.generate({
    +     "bindto": "#LineChart"
    +     "data": {
    +         "columns": [
    +             ["data1", 30, 200, 100, 400, 150, 250],
    +             ["data2", 50, 20, 10, 40, 15, 25]
    +          ]
    +     }
    + });
    +
    + // call some API
    + // ex) get the data of 'data1'
    + chart.data("data1");
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    options + + +Options + + + +

    chart options

    + + + + + + + + + + + + + + +
    Returns:
    + + + + +
    +
    + Type +
    +
    + +Chart + + +
    +
    + + + + + + + + + + +
    + +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/billboard.js.html b/doc/billboard.js.html new file mode 100644 index 000000000..50962f247 --- /dev/null +++ b/doc/billboard.js.html @@ -0,0 +1,13290 @@ + + + + + + billboard.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    billboard.js

    + + + + + + + +
    +
    +
    /*!
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + * 
    + * billboard.js, JavaScript chart library
    + * http://naver.github.io/billboard.js/
    + * 
    + * @version 1.6.0
    + */
    +(function webpackUniversalModuleDefinition(root, factory) {
    +	if(typeof exports === 'object' && typeof module === 'object')
    +		module.exports = factory(require("d3-time-format"), require("d3-selection"), require("d3-array"), require("d3-transition"), require("d3-scale"), require("d3-brush"), require("d3-collection"), require("d3-dsv"), require("d3-drag"), require("d3-shape"), require("d3-interpolate"), require("d3-color"), require("d3-zoom"), require("d3-ease"));
    +	else if(typeof define === 'function' && define.amd)
    +		define(["d3-time-format", "d3-selection", "d3-array", "d3-transition", "d3-scale", "d3-brush", "d3-collection", "d3-dsv", "d3-drag", "d3-shape", "d3-interpolate", "d3-color", "d3-zoom", "d3-ease"], factory);
    +	else {
    +		var a = typeof exports === 'object' ? factory(require("d3-time-format"), require("d3-selection"), require("d3-array"), require("d3-transition"), require("d3-scale"), require("d3-brush"), require("d3-collection"), require("d3-dsv"), require("d3-drag"), require("d3-shape"), require("d3-interpolate"), require("d3-color"), require("d3-zoom"), require("d3-ease")) : factory(root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"], root["d3"]);
    +		for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
    +	}
    +})(window, function(__WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__10__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__22__, __WEBPACK_EXTERNAL_MODULE__24__, __WEBPACK_EXTERNAL_MODULE__28__, __WEBPACK_EXTERNAL_MODULE__31__, __WEBPACK_EXTERNAL_MODULE__33__, __WEBPACK_EXTERNAL_MODULE__49__, __WEBPACK_EXTERNAL_MODULE__52__, __WEBPACK_EXTERNAL_MODULE__62__) {
    +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] = {
    +/******/ 			i: moduleId,
    +/******/ 			l: false,
    +/******/ 			exports: {}
    +/******/ 		};
    +/******/
    +/******/ 		// Execute the module function
    +/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
    +/******/
    +/******/ 		// Flag the module as loaded
    +/******/ 		module.l = 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;
    +/******/
    +/******/ 	// define getter function for harmony exports
    +/******/ 	__webpack_require__.d = function(exports, name, getter) {
    +/******/ 		if(!__webpack_require__.o(exports, name)) {
    +/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
    +/******/ 		}
    +/******/ 	};
    +/******/
    +/******/ 	// define __esModule on exports
    +/******/ 	__webpack_require__.r = function(exports) {
    +/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
    +/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
    +/******/ 		}
    +/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
    +/******/ 	};
    +/******/
    +/******/ 	// create a fake namespace object
    +/******/ 	// mode & 1: value is a module id, require it
    +/******/ 	// mode & 2: merge all properties of value into the ns
    +/******/ 	// mode & 4: return value when already ns object
    +/******/ 	// mode & 8|1: behave like require
    +/******/ 	__webpack_require__.t = function(value, mode) {
    +/******/ 		if(mode & 1) value = __webpack_require__(value);
    +/******/ 		if(mode & 8) return value;
    +/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
    +/******/ 		var ns = Object.create(null);
    +/******/ 		__webpack_require__.r(ns);
    +/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
    +/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
    +/******/ 		return ns;
    +/******/ 	};
    +/******/
    +/******/ 	// getDefaultExport function for compatibility with non-harmony modules
    +/******/ 	__webpack_require__.n = function(module) {
    +/******/ 		var getter = module && module.__esModule ?
    +/******/ 			function getDefault() { return module['default']; } :
    +/******/ 			function getModuleExports() { return module; };
    +/******/ 		__webpack_require__.d(getter, 'a', getter);
    +/******/ 		return getter;
    +/******/ 	};
    +/******/
    +/******/ 	// Object.prototype.hasOwnProperty.call
    +/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
    +/******/
    +/******/ 	// __webpack_public_path__
    +/******/ 	__webpack_require__.p = "";
    +/******/
    +/******/
    +/******/ 	// Load entry module and return exports
    +/******/ 	return __webpack_require__(__webpack_require__.s = 0);
    +/******/ })
    +/************************************************************************/
    +/******/ ([
    +/* 0 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +exports.bb = undefined;
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _Axis = __webpack_require__(8),
    +    _Axis2 = _interopRequireDefault(_Axis);
    +
    +__webpack_require__(15);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * @namespace bb
    + * @version 1.6.0
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var bb = {
    +	/**
    +  * Version information
    +  * @property {String} version version
    +  * @example
    +  *    bb.version;  // "1.0.0"
    +  * @memberOf bb
    +  */
    +	version: "1.6.0",
    +
    +	/**
    +  * Generate chart
    +  * @param {Options} options chart options
    +  * @memberOf bb
    +  * @return {Chart}
    +  * @see {@link Options} for different generation options
    +  * @see {@link Chart} for different methods API
    +  * @example
    +  *  <!-- chart holder -->
    +  * <div id="LineChart"></div>
    +  * @example
    +  *   // generate chart with options
    +  *  var chart = bb.generate({
    +  *      "bindto": "#LineChart"
    +  *      "data": {
    +  *          "columns": [
    +  *              ["data1", 30, 200, 100, 400, 150, 250],
    +  *              ["data2", 50, 20, 10, 40, 15, 25]
    +  *           ]
    +  *      }
    +  *  });
    +  *
    +  *  // call some API
    +  *  // ex) get the data of 'data1'
    +  *  chart.data("data1");
    +  */
    +	generate: function generate(config) {
    +		var inst = new _Chart2.default(config);
    +
    +		return inst.internal.charts = this.instance, this.instance.push(inst), inst;
    +	},
    +
    +
    +	/**
    +  * An array containing instance created
    +  * @property {Array} instance instance array
    +  * @example
    +  *  // generate charts
    +  *  var chart1 = bb.generate(...);
    +  *  var chart2 = bb.generate(...);
    +  *
    +  *  bb.instance;  // [ chart1, chart2, ... ]
    +  * @memberOf bb
    +  */
    +	instance: [],
    +
    +	/**
    +  * Internal chart object
    +  * @private
    +  */
    +	chart: {
    +		fn: _Chart2.default.prototype,
    +		internal: {
    +			fn: _ChartInternal2.default.prototype,
    +			axis: {
    +				fn: _Axis2.default.prototype
    +			}
    +		}
    +	}
    +};
    +
    +__webpack_require__(17), __webpack_require__(19), __webpack_require__(20), __webpack_require__(21), __webpack_require__(23), __webpack_require__(25), __webpack_require__(26), __webpack_require__(27), __webpack_require__(29), __webpack_require__(30), __webpack_require__(32), __webpack_require__(34), __webpack_require__(35), __webpack_require__(36), __webpack_require__(37), __webpack_require__(38), __webpack_require__(39), __webpack_require__(40), __webpack_require__(41), __webpack_require__(42), __webpack_require__(43), __webpack_require__(44), __webpack_require__(45), __webpack_require__(46), __webpack_require__(47), __webpack_require__(48), __webpack_require__(50), __webpack_require__(51), __webpack_require__(53), __webpack_require__(54), __webpack_require__(55), __webpack_require__(56), __webpack_require__(57), __webpack_require__(58), __webpack_require__(59), __webpack_require__(60), __webpack_require__(61), __webpack_require__(63), __webpack_require__(64), __webpack_require__(65), __webpack_require__(66), __webpack_require__(67), __webpack_require__(68), __webpack_require__(69), __webpack_require__(70), __webpack_require__(71), __webpack_require__(72), __webpack_require__(73), __webpack_require__(74), __webpack_require__(76), __webpack_require__(9), __webpack_require__(77), __webpack_require__(78);
    +exports.bb = bb;
    +exports.default = bb;
    +
    +/***/ }),
    +/* 1 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +
    +var _classCallCheck2 = __webpack_require__(2),
    +    _classCallCheck3 = _interopRequireDefault(_classCallCheck2),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Main chart class.
    + * - Note: Instantiated via `bb.generate()`.
    + * @class Chart
    + * @example
    + * var chart = bb.generate({
    + *  data: {
    + *    columns: [
    + *	    ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"],
    + * 	    ["count1", 11, 8, 7, 6, 5 ],
    + *	    ["count2", 9, 3, 6, 2, 8 ]
    + *   ]}
    + * }
    + * @see {@link bb.generate} for the initialization.
    +*/
    +var Chart = function Chart(config) {
    +	(0, _classCallCheck3.default)(this, Chart);
    +
    +	var $$ = new _ChartInternal2.default(this);
    +
    +	this.internal = $$, $$.loadConfig(config), $$.beforeInit(config), $$.init(), this.$ = $$.getChartElements(), $$.afterInit(config), function bindThis(fn, target, argThis) {
    +		Object.keys(fn).forEach(function (key) {
    +			target[key] = fn[key].bind(argThis), Object.keys(fn[key]).length && bindThis(fn[key], target[key], argThis);
    +		});
    +	}(Chart.prototype, this, this);
    +}; /**
    +    * Copyright (c) 2017 NAVER Corp.
    +    * billboard.js project is licensed under the MIT license
    +    * @license MIT
    +    * @ignore
    +    */
    +
    +
    +exports.default = Chart;
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 2 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = true;
    +
    +exports.default = function (instance, Constructor) {
    +  if (!(instance instanceof Constructor)) {
    +    throw new TypeError("Cannot call a class as a function");
    +  }
    +};
    +
    +/***/ }),
    +/* 3 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +
    +var _classCallCheck2 = __webpack_require__(2),
    +    _classCallCheck3 = _interopRequireDefault(_classCallCheck2),
    +    _d3TimeFormat = __webpack_require__(4),
    +    _d3Selection = __webpack_require__(5),
    +    _d3Array = __webpack_require__(6),
    +    _d3Transition = __webpack_require__(7),
    +    _Axis = __webpack_require__(8),
    +    _Axis2 = _interopRequireDefault(_Axis),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Internal chart class.
    + * - Note: Instantiated internally, not exposed for public.
    + * @class ChartInternal
    + * @ignore
    + * @private
    +*/
    +var ChartInternal = function () {
    +	function ChartInternal(api) {
    +		(0, _classCallCheck3.default)(this, ChartInternal);
    +
    +		var $$ = this;
    +
    +		$$.api = api, $$.config = $$.getOptions(), $$.data = {}, $$.cache = {}, $$.axes = {};
    +	}
    +
    +	return ChartInternal.prototype.beforeInit = function beforeInit() {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.callFn)(config.onbeforeinit, $$);
    +	}, ChartInternal.prototype.afterInit = function afterInit() {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.callFn)(config.onafterinit, $$);
    +	}, ChartInternal.prototype.init = function init() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    convertedData = void 0;
    +
    +
    +		if ($$.initParams(), config.data_url) $$.convertUrlToData(config.data_url, config.data_mimeType, config.data_headers, config.data_keys, $$.initWithData);else if (config.data_json) convertedData = $$.convertJsonToData(config.data_json, config.data_keys);else if (config.data_rows) convertedData = $$.convertRowsToData(config.data_rows);else if (config.data_columns) convertedData = $$.convertColumnsToData(config.data_columns);else throw Error("url or json or rows or columns is required.");
    +
    +		convertedData && $$.initWithData(convertedData);
    +	}, ChartInternal.prototype.initParams = function initParams() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated;
    +		$$.datetimeId = "bb-" + +new Date(), $$.clipId = $$.datetimeId + "-clip", $$.clipIdForXAxis = $$.clipId + "-xaxis", $$.clipIdForYAxis = $$.clipId + "-yaxis", $$.clipIdForGrid = $$.clipId + "-grid", $$.clipIdForSubchart = $$.clipId + "-subchart", $$.clipPath = $$.getClipPath($$.clipId), $$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis), $$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis), $$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid), $$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart), $$.dragStart = null, $$.dragging = !1, $$.flowing = !1, $$.cancelClick = !1, $$.mouseover = !1, $$.transiting = !1, $$.color = $$.generateColor(), $$.levelColor = $$.generateLevelColor(), $$.point = $$.generatePoint(), $$.extraLineClasses = $$.generateExtraLineClass(), $$.dataTimeFormat = config.data_xLocaltime ? _d3TimeFormat.timeParse : _d3TimeFormat.utcParse, $$.axisTimeFormat = config.axis_x_localtime ? _d3TimeFormat.timeFormat : _d3TimeFormat.utcFormat, $$.defaultAxisTimeFormat = function (d) {
    +			var specifier = d.getMilliseconds() && ".%L" || d.getSeconds() && ".:%S" || d.getMinutes() && "%I:%M" || d.getHours() && "%I %p" || d.getDay() && d.getDate() !== 1 && "%-m/%-d" || d.getDate() !== 1 && "%b %d" || d.getMonth() && "%-m/%-d" || "%Y/%-m/%-d";
    +
    +			return $$.axisTimeFormat(specifier)(d);
    +		}, $$.hiddenTargetIds = [], $$.hiddenLegendIds = [], $$.focusedTargetIds = [], $$.defocusedTargetIds = [], $$.xOrient = isRotated ? "left" : "bottom", $$.yOrient = isRotated ? config.axis_y_inner ? "top" : "bottom" : config.axis_y_inner ? "right" : "left", $$.y2Orient = isRotated ? config.axis_y2_inner ? "bottom" : "top" : config.axis_y2_inner ? "left" : "right", $$.subXOrient = isRotated ? "left" : "bottom", $$.isLegendRight = config.legend_position === "right", $$.isLegendInset = config.legend_position === "inset", $$.isLegendTop = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "top-right", $$.isLegendLeft = config.legend_inset_anchor === "top-left" || config.legend_inset_anchor === "bottom-left", $$.legendStep = 0, $$.legendItemWidth = 0, $$.legendItemHeight = 0, $$.currentMaxTickWidths = {
    +			x: 0, y: 0, y2: 0
    +		}, $$.rotated_padding_left = 30, $$.rotated_padding_right = isRotated && !config.axis_x_show ? 0 : 30, $$.rotated_padding_top = 5, $$.withoutFadeIn = {}, $$.inputType = $$.convertInputType(), $$.axes.subx = (0, _d3Selection.selectAll)([]);
    +	}, ChartInternal.prototype.initWithData = function initWithData(data) {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.axis = new _Axis2.default($$), config.subchart_show && $$.initBrush(), config.zoom_enabled && ($$.initZoom(), $$.initZoomBehaviour());
    +
    +
    +		var bindto = {
    +			element: config.bindto,
    +			classname: "bb"
    +		};
    +
    +		if ((0, _util.isObject)(config.bindto) && (bindto.element = config.bindto.element || "#chart", bindto.classname = config.bindto.classname || bindto.classname), $$.selectChart = (0, _util.isFunction)(bindto.element.node) ? config.bindto.element : (0, _d3Selection.select)(bindto.element ? bindto.element : []), $$.selectChart.html("").classed(bindto.classname, !0), $$.data.xs = {}, $$.data.targets = $$.convertDataToTargets(data), config.data_filter && ($$.data.targets = $$.data.targets.filter(config.data_filter)), config.data_hide && $$.addHiddenTargetIds(config.data_hide === !0 ? $$.mapToIds($$.data.targets) : config.data_hide), config.legend_hide && $$.addHiddenLegendIds(config.legend_hide === !0 ? $$.mapToIds($$.data.targets) : config.legend_hide), $$.hasType("gauge") && (config.legend_show = !1), $$.updateSizes(), $$.updateScales(), $$.x.domain((0, _d3Array.extent)($$.getXDomain($$.data.targets))), $$.y.domain($$.getYDomain($$.data.targets, "y")), $$.y2.domain($$.getYDomain($$.data.targets, "y2")), $$.subX.domain($$.x.domain()), $$.subY.domain($$.y.domain()), $$.subY2.domain($$.y2.domain()), $$.orgXDomain = $$.x.domain(), $$.svg = $$.selectChart.append("svg").style("overflow", "hidden").style("display", "block"), config.interaction_enabled && $$.inputType) {
    +			var isTouch = $$.inputType === "touch";
    +
    +			$$.svg.on(isTouch ? "touchstart" : "mouseenter", function () {
    +				return (0, _util.callFn)(config.onover, $$);
    +			}).on(isTouch ? "touchend" : "mouseleave", function () {
    +				return (0, _util.callFn)(config.onout, $$);
    +			});
    +		}
    +
    +		config.svg_classname && $$.svg.attr("class", config.svg_classname), $$.defs = $$.svg.append("defs"), $$.clipChart = $$.appendClip($$.defs, $$.clipId), $$.clipXAxis = $$.appendClip($$.defs, $$.clipIdForXAxis), $$.clipYAxis = $$.appendClip($$.defs, $$.clipIdForYAxis), $$.clipGrid = $$.appendClip($$.defs, $$.clipIdForGrid), $$.clipSubchart = $$.appendClip($$.defs, $$.clipIdForSubchart), (0, _util.isFunction)(config.color_tiles) && $$.patterns && $$.patterns.forEach(function (p) {
    +			return $$.defs.append(function () {
    +				return p.node;
    +			});
    +		}), $$.updateSvgSize();
    +
    +
    +		// Define regions
    +		var main = $$.svg.append("g").attr("transform", $$.getTranslate("main"));
    +
    +		// data.onmin/max callback
    +		if ($$.main = main, config.subchart_show && $$.initSubchart && $$.initSubchart(), $$.initTooltip && $$.initTooltip(), $$.initLegend && $$.initLegend(), $$.initTitle && $$.initTitle(), main.append("text").attr("class", _classes2.default.text + " " + _classes2.default.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
    +		.attr("dominant-baseline", "middle"), $$.initRegion(), $$.initGrid(), config.clipPath || $$.axis.init(), main.append("g").attr("class", _classes2.default.chart).attr("clip-path", $$.clipPath), config.grid_lines_front && $$.initGridLines(), config.grid_front && $$.initXYFocusGrid(), $$.initEventRect(), $$.initChartElements(), main.insert("rect", config.zoom_privileged ? null : "g." + _classes2.default.regions).attr("class", _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height).style("opacity", "0").on("dblclick.zoom", null), config.axis_x_extent && $$.brush.scale($$.getDefaultExtent()), config.clipPath && $$.axis.init(), $$.updateTargets($$.data.targets), $$.updateDimension(), config.oninit.call($$), $$.redraw({
    +			withTransition: !1,
    +			withTransform: !0,
    +			withUpdateXDomain: !0,
    +			withUpdateOrgXDomain: !0,
    +			withTransitionForAxis: !1,
    +			initializing: !0
    +		}), config.data_onmin || config.data_onmax) {
    +			var minMax = $$.getMinMaxData();
    +
    +			(0, _util.callFn)(config.data_onmin, $$, minMax.min), (0, _util.callFn)(config.data_onmax, $$, minMax.max);
    +		}
    +
    +		// Bind resize event
    +		$$.bindResize(), $$.api.element = $$.selectChart.node();
    +	}, ChartInternal.prototype.initChartElements = function initChartElements() {
    +		var _this = this;
    +
    +		["Pie", "Bar", "Line", "Arc", "Gauge", "Bubble", "Radar", "Text"].forEach(function (v) {
    +			var method = "init" + v;
    +
    +			_this[method] && _this[method]();
    +		});
    +	}, ChartInternal.prototype.getChartElements = function getChartElements() {
    +		var $$ = this;
    +
    +		return {
    +			chart: $$.selectChart,
    +			svg: $$.svg,
    +			defs: $$.defs,
    +			main: $$.main,
    +			tooltip: $$.tooltip,
    +			legend: $$.legend,
    +			title: $$.title,
    +			grid: $$.grid,
    +			arc: $$.arcs,
    +			bar: {
    +				bars: $$.mainBar
    +			},
    +			line: {
    +				lines: $$.mainLine,
    +				areas: $$.mainArea,
    +				circles: $$.mainCircle
    +			},
    +			text: {
    +				texts: $$.texts
    +			}
    +		};
    +	}, ChartInternal.prototype.smoothLines = function smoothLines(el, type) {
    +		type === "grid" && el.each(function () {
    +			var g = (0, _d3Selection.select)(this),
    +			    _map = ["x1", "x2", "y1", "y2"].map(function (v) {
    +				return Math.ceil(g.attr(v));
    +			}),
    +			    x1 = _map[0],
    +			    x2 = _map[1],
    +			    y1 = _map[2],
    +			    y2 = _map[3];g.attr({ x1: x1, x2: x2, y1: y1, y2: y2 });
    +		});
    +	}, ChartInternal.prototype.updateSizes = function updateSizes() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    hasArc = $$.hasArcType(),
    +		    legendHeight = $$.legend ? $$.getLegendHeight() : 0,
    +		    legendWidth = $$.legend ? $$.getLegendWidth() : 0,
    +		    legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight,
    +		    xAxisHeight = isRotated || hasArc ? 0 : $$.getHorizontalAxisHeight("x"),
    +		    subchartHeight = config.subchart_show && !hasArc ? config.subchart_size_height + xAxisHeight : 0;
    +		$$.currentWidth = $$.getCurrentWidth(), $$.currentHeight = $$.getCurrentHeight(), $$.margin = isRotated ? {
    +			top: $$.getHorizontalAxisHeight("y2") + $$.getCurrentPaddingTop(),
    +			right: hasArc ? 0 : $$.getCurrentPaddingRight(),
    +			bottom: $$.getHorizontalAxisHeight("y") + legendHeightForBottom + $$.getCurrentPaddingBottom(),
    +			left: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())
    +		} : {
    +			top: 4 + $$.getCurrentPaddingTop(), // for top tick text
    +			right: hasArc ? 0 : $$.getCurrentPaddingRight(),
    +			bottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),
    +			left: hasArc ? 0 : $$.getCurrentPaddingLeft()
    +		}, $$.margin2 = isRotated ? {
    +			top: $$.margin.top,
    +			right: NaN,
    +			bottom: 20 + legendHeightForBottom,
    +			left: $$.rotated_padding_left
    +		} : {
    +			top: $$.currentHeight - subchartHeight - legendHeightForBottom,
    +			right: NaN,
    +			bottom: xAxisHeight + legendHeightForBottom,
    +			left: $$.margin.left
    +		}, $$.margin3 = {
    +			top: 0,
    +			right: NaN,
    +			bottom: 0,
    +			left: 0
    +		}, $$.updateSizeForLegend && $$.updateSizeForLegend(legendHeight, legendWidth), $$.width = $$.currentWidth - $$.margin.left - $$.margin.right, $$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom, $$.width < 0 && ($$.width = 0), $$.height < 0 && ($$.height = 0), $$.width2 = isRotated ? $$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width, $$.height2 = isRotated ? $$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom, $$.width2 < 0 && ($$.width2 = 0), $$.height2 < 0 && ($$.height2 = 0), $$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0), $$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10), $$.hasType("gauge") && !config.gauge_fullCircle && ($$.arcHeight += $$.height - $$.getGaugeLabelHeight()), $$.updateRadius && $$.updateRadius(), $$.isLegendRight && hasArc && ($$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1);
    +	}, ChartInternal.prototype.updateTargets = function updateTargets(targets) {
    +		var $$ = this;
    +
    +		// Text
    +		$$.updateTargetsForText(targets), $$.updateTargetsForBar(targets), $$.updateTargetsForLine(targets), $$.hasArcType(targets) && ($$.hasType("radar") ? $$.updateTargetsForRadar(targets) : $$.updateTargetsForArc(targets)), $$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets), $$.showTargets();
    +	}, ChartInternal.prototype.showTargets = function showTargets() {
    +		var $$ = this;
    +
    +		$$.svg.selectAll("." + _classes2.default.target).filter(function (d) {
    +			return $$.isTargetToShow(d.id);
    +		}).transition().duration($$.config.transition_duration).style("opacity", "1");
    +	}, ChartInternal.prototype.getWithOption = function getWithOption(options) {
    +		var withOptions = {
    +			Y: !0,
    +			Subchart: !0,
    +			Transition: !0,
    +			EventRect: !0,
    +			Dimension: !0,
    +			TrimXDomain: !0,
    +			Transform: !1,
    +			UpdateXDomain: !1,
    +			UpdateOrgXDomain: !1,
    +			Legend: !1,
    +			UpdateXAxis: "UpdateXDomain",
    +			TransitionForExit: "Transition",
    +			TransitionForAxis: "Transition"
    +		};
    +
    +		return Object.keys(withOptions).forEach(function (key) {
    +			var defVal = withOptions[key];
    +
    +			(0, _util.isString)(defVal) && (defVal = withOptions[defVal]), withOptions[key] = (0, _util.getOption)(options, "with" + key, defVal);
    +		}), withOptions;
    +	}, ChartInternal.prototype.redraw = function redraw() {
    +		var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    +		    transitionsValue = arguments[1],
    +		    $$ = this,
    +		    main = $$.main,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    hasRadar = $$.hasType("radar"),
    +		    areaIndices = $$.getShapeIndices($$.isAreaType),
    +		    barIndices = $$.getShapeIndices($$.isBarType),
    +		    lineIndices = $$.getShapeIndices($$.isLineType),
    +		    hideAxis = $$.hasArcType(),
    +		    targetsToShow = $$.filterTargetsToShow($$.data.targets),
    +		    xv = $$.xv.bind($$),
    +		    tickValues = void 0,
    +		    intervalForCulling = void 0,
    +		    xDomainForZoom = void 0,
    +		    wth = $$.getWithOption(options),
    +		    duration = wth.Transition ? config.transition_duration : 0,
    +		    durationForExit = wth.TransitionForExit ? duration : 0,
    +		    durationForAxis = wth.TransitionForAxis ? duration : 0,
    +		    transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis);
    +
    +
    +		// show/hide if manual culling needed
    +		if (options.initializing && config.tooltip_init_show || $$.inputType !== "touch" || $$.hideTooltip(), wth.Legend && config.legend_show && !config.legend_contents_bindto ? $$.updateLegend($$.mapToIds($$.data.targets), options, transitions) : wth.Dimension && $$.updateDimension(!0), $$.isCategorized() && targetsToShow.length === 0 && $$.x.domain([0, $$.axes.x.selectAll(".tick").size()]), targetsToShow.length ? ($$.updateXDomain(targetsToShow, wth.UpdateXDomain, wth.UpdateOrgXDomain, wth.TrimXDomain), !config.axis_x_tick_values && (tickValues = $$.axis.updateXAxisTickValues(targetsToShow))) : ($$.xAxis.tickValues([]), $$.subXAxis.tickValues([])), config.zoom_rescale && !options.flow && (xDomainForZoom = $$.x.orgDomain()), ["y", "y2"].forEach(function (key) {
    +			var axis = $$[key],
    +			    tickValues = config["axis_" + key + "_tick_values"],
    +			    tickCount = config["axis_" + key + "_tick_count"];
    +
    +
    +			if (axis.domain($$.getYDomain(targetsToShow, key, xDomainForZoom)), !tickValues && tickCount) {
    +				var domain = axis.domain();
    +
    +				$$[key + "Axis"].tickValues($$.axis.generateTickValues(domain, domain.every(function (v) {
    +					return v === 0;
    +				}) ? 1 : tickCount, $$.isTimeSeriesY()));
    +			}
    +		}), $$.axis.redraw(transitions, hideAxis), $$.axis.updateLabels(wth.Transition), (wth.UpdateXDomain || wth.UpdateXAxis) && targetsToShow.length) if (config.axis_x_tick_culling && tickValues) {
    +				for (var _i = 1; _i < tickValues.length; _i++) if (tickValues.length / _i < config.axis_x_tick_culling_max) {
    +					intervalForCulling = _i;
    +
    +					break;
    +				}
    +
    +				$$.svg.selectAll("." + _classes2.default.axisX + " .tick text").each(function (e) {
    +					var index = tickValues.indexOf(e);
    +
    +					index >= 0 && (0, _d3Selection.select)(this).style("display", index % intervalForCulling ? "none" : "block");
    +				});
    +			} else $$.svg.selectAll("." + _classes2.default.axisX + " .tick text").style("display", "block");
    +
    +		// setup drawer - MEMO: these must be called after axis updated
    +		var drawArea = $$.generateDrawArea ? $$.generateDrawArea(areaIndices, !1) : undefined,
    +		    drawBar = $$.generateDrawBar ? $$.generateDrawBar(barIndices) : undefined,
    +		    drawLine = $$.generateDrawLine ? $$.generateDrawLine(lineIndices, !1) : undefined,
    +		    xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !0),
    +		    yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, !1);
    +		wth.Y && ($$.subY.domain($$.getYDomain(targetsToShow, "y")), $$.subY2.domain($$.getYDomain(targetsToShow, "y2"))), $$.updateXgridFocus(), main.select("text." + _classes2.default.text + "." + _classes2.default.empty).attr("x", $$.width / 2).attr("y", $$.height / 2).text(config.data_empty_label_text).transition().style("opacity", targetsToShow.length ? 0 : 1), $$.updateGrid(duration), $$.updateRegion(duration), $$.updateBar(durationForExit), $$.updateLine(durationForExit), $$.updateArea(durationForExit), $$.updateCircle(), $$.hasDataLabel() && $$.updateText(durationForExit), $$.redrawTitle && $$.redrawTitle(), $$.redrawArc && $$.redrawArc(duration, durationForExit, wth.Transform), hasRadar && $$.redrawRadar(duration, durationForExit), config.subchart_show && $$.redrawSubchart && $$.redrawSubchart(wth.Subchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices), main.selectAll("." + _classes2.default.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(), config.interaction_enabled && !options.flow && wth.EventRect && ($$.redrawEventRect(), $$.bindZoomEvent()), $$.updateCircleY();
    +
    +
    +		// generate circle x/y functions depending on updated params
    +		var cx = (hasRadar ? $$.radarCircleX : isRotated ? $$.circleY : $$.circleX).bind($$),
    +		    cy = (hasRadar ? $$.radarCircleY : isRotated ? $$.circleX : $$.circleY).bind($$),
    +		    flow = options.flow && $$.generateFlow({
    +			targets: targetsToShow,
    +			flow: options.flow,
    +			duration: options.flow.duration,
    +			drawBar: drawBar,
    +			drawLine: drawLine,
    +			drawArea: drawArea,
    +			cx: cx,
    +			cy: cy,
    +			xv: xv,
    +			xForText: xForText,
    +			yForText: yForText
    +		}),
    +		    isTransition = (duration || flow) && $$.isTabVisible(),
    +		    redrawList = [$$.redrawBar(drawBar, isTransition), $$.redrawLine(drawLine, isTransition), $$.redrawArea(drawArea, isTransition), $$.redrawCircle(cx, cy, isTransition, flow), $$.redrawText(xForText, yForText, options.flow, isTransition), $$.redrawRegion(isTransition), $$.redrawGrid(isTransition)],
    +		    afterRedraw = flow || config.onrendered ? function () {
    +			flow && flow(), (0, _util.callFn)(config.onrendered, $$);
    +		} : null;
    +
    +		// generate flow
    +
    +
    +		// redraw list
    +
    +
    +		// callback function after redraw ends
    +
    +		if (afterRedraw)
    +			// Only use transition when current tab is visible.
    +			if (isTransition) {
    +				// Wait for end of transitions for callback
    +				var waitForDraw = $$.generateWait();
    +
    +				// transition should be derived from one transition
    +				(0, _d3Transition.transition)().duration(duration).each(function () {
    +					redrawList.reduce(function (acc, t1) {
    +						return acc.concat(t1);
    +					}, []).forEach(function (t) {
    +						return waitForDraw.add(t);
    +					});
    +				}).call(waitForDraw, afterRedraw);
    +			} else afterRedraw();
    +
    +		// update fadein condition
    +		$$.mapToIds($$.data.targets).forEach(function (id) {
    +			$$.withoutFadeIn[id] = !0;
    +		});
    +	}, ChartInternal.prototype.updateAndRedraw = function updateAndRedraw() {
    +		var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    +		    $$ = this,
    +		    config = $$.config,
    +		    transitions = void 0;
    +		options.withTransition = (0, _util.getOption)(options, "withTransition", !0), options.withTransform = (0, _util.getOption)(options, "withTransform", !1), options.withLegend = (0, _util.getOption)(options, "withLegend", !1), options.withUpdateXDomain = !0, options.withUpdateOrgXDomain = !0, options.withTransitionForExit = !1, options.withTransitionForTransform = (0, _util.getOption)(options, "withTransitionForTransform", options.withTransition), $$.updateSizes(), options.withLegend && config.legend_show || (transitions = $$.axis.generateTransitions(options.withTransitionForAxis ? config.transition_duration : 0), $$.updateScales(), $$.updateSvgSize(), $$.transformAll(options.withTransitionForTransform, transitions)), $$.redraw(options, transitions);
    +	}, ChartInternal.prototype.redrawWithoutRescale = function redrawWithoutRescale() {
    +		this.redraw({
    +			withY: !1,
    +			withSubchart: !1,
    +			withEventRect: !1,
    +			withTransitionForAxis: !1
    +		});
    +	}, ChartInternal.prototype.isTimeSeries = function isTimeSeries() {
    +		return this.config.axis_x_type === "timeseries";
    +	}, ChartInternal.prototype.isCategorized = function isCategorized() {
    +		return this.config.axis_x_type.indexOf("category") >= 0 || this.hasType("radar");
    +	}, ChartInternal.prototype.isCustomX = function isCustomX() {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		return !$$.isTimeSeries() && (config.data_x || (0, _util.notEmpty)(config.data_xs));
    +	}, ChartInternal.prototype.isTimeSeriesY = function isTimeSeriesY() {
    +		return this.config.axis_y_type === "timeseries";
    +	}, ChartInternal.prototype.getTranslate = function getTranslate(target) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    x = void 0,
    +		    y = void 0;
    +
    +
    +		if (target === "main") x = (0, _util.asHalfPixel)($$.margin.left), y = (0, _util.asHalfPixel)($$.margin.top);else if (target === "context") x = (0, _util.asHalfPixel)($$.margin2.left), y = (0, _util.asHalfPixel)($$.margin2.top);else if (target === "legend") x = $$.margin3.left, y = $$.margin3.top;else if (target === "x") x = 0, y = isRotated ? 0 : $$.height;else if (target === "y") x = 0, y = isRotated ? $$.height : 0;else if (target === "y2") x = isRotated ? 0 : $$.width, y = isRotated ? 1 : 0;else if (target === "subx") x = 0, y = isRotated ? 0 : $$.height2;else if (target === "arc") x = $$.arcWidth / 2, y = $$.arcHeight / 2;else if (target === "radar") {
    +			var diff = ($$.arcWidth - $$.arcHeight) / 2;
    +
    +			x = Math.max(diff, 0) + 4, y = diff < 0 ? Math.abs(diff) : (0, _util.asHalfPixel)($$.margin.top);
    +		}
    +
    +		return "translate(" + x + ", " + y + ")";
    +	}, ChartInternal.prototype.initialOpacity = function initialOpacity(d) {
    +		return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? "1" : "0";
    +	}, ChartInternal.prototype.initialOpacityForCircle = function initialOpacityForCircle(d) {
    +		return this.getBaseValue(d) !== null && this.withoutFadeIn[d.id] ? this.opacityForCircle(d) : "0";
    +	}, ChartInternal.prototype.opacityForCircle = function opacityForCircle(d) {
    +		var opacity = this.config.point_show ? "1" : "0";
    +
    +		return (0, _util.isValue)(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity : "0";
    +	}, ChartInternal.prototype.opacityForText = function opacityForText() {
    +		return this.hasDataLabel() ? "1" : "0";
    +	}, ChartInternal.prototype.xx = function xx(d) {
    +		var fn = this.config.zoom_enabled && this.zoomScale ? this.zoomScale : this.x;
    +
    +		return d ? fn(d.x) : null;
    +	}, ChartInternal.prototype.xv = function xv(d) {
    +		var $$ = this,
    +		    value = $$.getBaseValue(d);
    +
    +
    +		return $$.isTimeSeries() ? value = $$.parseDate(value) : $$.isCategorized() && (0, _util.isString)(value) && (value = $$.config.axis_x_categories.indexOf(value)), Math.ceil($$.x(value));
    +	}, ChartInternal.prototype.yv = function yv(d) {
    +		var $$ = this,
    +		    yScale = d.axis && d.axis === "y2" ? $$.y2 : $$.y;
    +
    +
    +		return Math.ceil(yScale($$.getBaseValue(d)));
    +	}, ChartInternal.prototype.subxx = function subxx(d) {
    +		return d ? this.subX(d.x) : null;
    +	}, ChartInternal.prototype.transformMain = function transformMain(withTransition, transitions) {
    +		var $$ = this,
    +		    xAxis = void 0,
    +		    yAxis = void 0,
    +		    y2Axis = void 0;
    +		transitions && transitions.axisX ? xAxis = transitions.axisX : (xAxis = $$.main.select("." + _classes2.default.axisX), withTransition && (xAxis = xAxis.transition())), transitions && transitions.axisY ? yAxis = transitions.axisY : (yAxis = $$.main.select("." + _classes2.default.axisY), withTransition && (yAxis = yAxis.transition())), transitions && transitions.axisY2 ? y2Axis = transitions.axisY2 : (y2Axis = $$.main.select("." + _classes2.default.axisY2), withTransition && (y2Axis = y2Axis.transition())), (withTransition ? $$.main.transition() : $$.main).attr("transform", $$.getTranslate("main")), xAxis.attr("transform", $$.getTranslate("x")), yAxis.attr("transform", $$.getTranslate("y")), y2Axis.attr("transform", $$.getTranslate("y2")), $$.main.select("." + _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc"));
    +	}, ChartInternal.prototype.transformAll = function transformAll(withTransition, transitions) {
    +		var $$ = this;
    +
    +		$$.transformMain(withTransition, transitions), $$.config.subchart_show && $$.transformContext(withTransition, transitions), $$.legend && $$.transformLegend(withTransition);
    +	}, ChartInternal.prototype.updateSvgSize = function updateSvgSize() {
    +		var $$ = this,
    +		    brush = $$.svg.select("." + _classes2.default.brush + " .overlay"),
    +		    brushHeight = brush.size() ? brush.attr("height") : 0;
    +		$$.svg.attr("width", $$.currentWidth).attr("height", $$.currentHeight), $$.svg.selectAll(["#" + $$.clipId, "#" + $$.clipIdForGrid]).select("rect").attr("width", $$.width).attr("height", $$.height), $$.svg.select("#" + $$.clipIdForXAxis).select("rect").attr("x", $$.getXAxisClipX.bind($$)).attr("y", $$.getXAxisClipY.bind($$)).attr("width", $$.getXAxisClipWidth.bind($$)).attr("height", $$.getXAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForYAxis).select("rect").attr("x", $$.getYAxisClipX.bind($$)).attr("y", $$.getYAxisClipY.bind($$)).attr("width", $$.getYAxisClipWidth.bind($$)).attr("height", $$.getYAxisClipHeight.bind($$)), $$.svg.select("#" + $$.clipIdForSubchart).select("rect").attr("width", $$.width).attr("height", brushHeight), $$.svg.select("." + _classes2.default.zoomRect).attr("width", $$.width).attr("height", $$.height), $$.brush && $$.brush.scale($$.subX, brushHeight);
    +	}, ChartInternal.prototype.updateDimension = function updateDimension(withoutAxis) {
    +		var $$ = this;
    +
    +		withoutAxis || ($$.config.axis_rotated ? ($$.axes.x.call($$.xAxis), $$.axes.subx.call($$.subXAxis)) : ($$.axes.y.call($$.yAxis), $$.axes.y2.call($$.y2Axis))), $$.updateSizes(), $$.updateScales(withoutAxis), $$.updateSvgSize(), $$.transformAll(!1);
    +	}, ChartInternal.prototype.bindResize = function bindResize() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.resizeFunction = $$.generateResize(), $$.resizeFunction.add(function () {
    +			return config.onresize.call($$);
    +		}), config.resize_auto && $$.resizeFunction.add(function () {
    +			(0, _util.isDefined)($$.resizeTimeout) && window.clearTimeout($$.resizeTimeout), $$.resizeTimeout = window.setTimeout(function () {
    +				delete $$.resizeTimeout, $$.api.flush();
    +			}, 100);
    +		}), $$.resizeFunction.add(function () {
    +			return config.onresized.call($$);
    +		});
    +
    +
    +		// attach resize event
    +		// get the possible previous attached
    +		var resizeEvents = (0, _d3Selection.select)(window).on("resize.bb");
    +
    +		resizeEvents && $$.resizeFunction.add(resizeEvents), (0, _d3Selection.select)(window).on("resize.bb", $$.resizeFunction);
    +	}, ChartInternal.prototype.generateResize = function generateResize() {
    +
    +		function callResizeFunctions() {
    +			resizeFunctions.forEach(function (f) {
    +				return f();
    +			});
    +		}
    +
    +		var resizeFunctions = [];
    +
    +		return callResizeFunctions.add = function (f) {
    +			resizeFunctions.push(f);
    +		}, callResizeFunctions.remove = function (f) {
    +			for (var i = 0, len = resizeFunctions.length; i < len; i++) if (resizeFunctions[i] === f) {
    +				resizeFunctions.splice(i, 1);
    +
    +				break;
    +			}
    +		}, callResizeFunctions;
    +	}, ChartInternal.prototype.endall = function endall(transition, callback) {
    +		var n = 0;
    +
    +		transition.each(function () {
    +			return ++n;
    +		}).on("end", function () {
    +			for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
    +
    +			--n || callback.apply.apply(callback, [this].concat(args));
    +		});
    +	}, ChartInternal.prototype.generateWait = function generateWait() {
    +		var transitionsToWait = [],
    +		    f = function (transition, callback) {
    +
    +			function loop() {
    +				var done = 0;
    +
    +				transitionsToWait.forEach(function (t) {
    +					if (t.empty()) return void done++;
    +
    +					try {
    +						t.transition();
    +					} catch (e) {
    +						done++;
    +					}
    +				}), timer && clearTimeout(timer), done === transitionsToWait.length ? callback && callback() : timer = setTimeout(loop, 50);
    +			}
    +
    +			var timer = void 0;loop();
    +		};
    +
    +		return f.add = function (transition) {
    +			(0, _util.isArray)(transition) ? transitionsToWait = transitionsToWait.concat(transition) : transitionsToWait.push(transition);
    +		}, f;
    +	}, ChartInternal.prototype.parseDate = function parseDate(date) {
    +		var $$ = this,
    +		    parsedDate = void 0;
    +
    +
    +		return date instanceof Date ? parsedDate = date : (0, _util.isString)(date) ? parsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date) : (0, _util.isNumber)(date) && !isNaN(date) && (parsedDate = new Date(+date)), (!parsedDate || isNaN(+parsedDate)) && console && console.error && console.error("Failed to parse x '" + date + "' to Date object"), parsedDate;
    +	}, ChartInternal.prototype.isTabVisible = function isTabVisible() {
    +		return !document[["hidden", "mozHidden", "msHidden", "webkitHidden"].filter(function (v) {
    +			return v in document;
    +		})[0]];
    +	}, ChartInternal.prototype.convertInputType = function convertInputType() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isMobile = $$.isMobile(),
    +		    hasMouse = config.interaction_inputType_mouse && !isMobile && "onmouseover" in window,
    +		    hasTouch = !1;
    +
    +
    +		return config.interaction_inputType_touch && (hasTouch = "ontouchmove" in window || window.DocumentTouch && document instanceof window.DocumentTouch), hasMouse && "mouse" || hasTouch && "touch" || null;
    +	}, ChartInternal;
    +}(); /**
    +      * Copyright (c) 2017 NAVER Corp.
    +      * billboard.js project is licensed under the MIT license
    +      * @ignore
    +      */
    +
    +
    +exports.default = ChartInternal;
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 4 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
    +
    +/***/ }),
    +/* 5 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
    +
    +/***/ }),
    +/* 6 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
    +
    +/***/ }),
    +/* 7 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
    +
    +/***/ }),
    +/* 8 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +
    +var _classCallCheck2 = __webpack_require__(2),
    +    _classCallCheck3 = _interopRequireDefault(_classCallCheck2),
    +    _bb = __webpack_require__(9),
    +    _bb2 = _interopRequireDefault(_bb),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +var isHorizontal = function ($$, forHorizontal) {
    +	var isRotated = $$.config.axis_rotated;
    +
    +	return forHorizontal ? isRotated : !isRotated;
    +}; /**
    +    * Copyright (c) 2017 NAVER Corp.
    +    * billboard.js project is licensed under the MIT license
    +    */
    +
    +var Axis = function () {
    +	function Axis(owner) {
    +		(0, _classCallCheck3.default)(this, Axis), this.owner = owner;
    +	}
    +
    +	return Axis.prototype.init = function init() {
    +		var _this = this,
    +		    $$ = this.owner,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    main = $$.main;
    +
    +		["x", "y", "y2"].forEach(function (v) {
    +			var axisStr = "axis" + (0, _util.capitalize)(v),
    +			    classAxis = _classes2.default.axis + " " + _classes2.default[axisStr],
    +			    classLabel = _classes2.default[axisStr + "Label"];
    +			$$.axes[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () {
    +				var res = null;
    +
    +				return v === "x" ? res = $$.clipPathForXAxis : v === "y" && config.axis_y_inner && (res = $$.clipPathForYAxis), res;
    +			}).attr("transform", $$.getTranslate(v)).style("visibility", config["axis_" + v + "_show"] ? "visible" : "hidden"), $$.axes[v].append("text").attr("class", classLabel).attr("transform", ["rotate(-90)", null][v === "x" ? +!isRotated : +isRotated]).style("text-anchor", _this.textAnchorForXAxisLabel.bind(_this));
    +		});
    +	}, Axis.prototype.getXAxis = function getXAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    isCategory = $$.isCategorized(),
    +		    axisParams = {
    +			isCategory: isCategory,
    +			withOuterTick: withOuterTick,
    +			withoutTransition: withoutTransition,
    +			config: config,
    +			axisName: axisName,
    +			tickMultiline: config.axis_x_tick_multiline,
    +			tickWidth: config.axis_x_tick_width,
    +			tickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,
    +			tickTitle: isCategory && config.axis_x_tick_tooltip && $$.api.categories(),
    +			orgXScale: $$.x
    +		},
    +		    axis = (0, _bb2.default)(axisParams).scale($$.zoomScale || scale).orient(orient),
    +		    newTickValues = tickValues;
    +
    +
    +		return $$.isTimeSeries() && tickValues && !(0, _util.isFunction)(tickValues) && (newTickValues = tickValues.map(function (v) {
    +			return $$.parseDate(v);
    +		})), axis.tickFormat(tickFormat).tickValues(newTickValues), isCategory && (axis.tickCentered(config.axis_x_tick_centered), (0, _util.isEmpty)(config.axis_x_tick_culling) && (config.axis_x_tick_culling = !1)), axis;
    +	}, Axis.prototype.getYAxis = function getYAxis(axisName, scale, orient, tickFormat, tickValues, withOuterTick, withoutTransition, withoutRotateTickText) {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    axisParams = {
    +			withOuterTick: withOuterTick,
    +			withoutTransition: withoutTransition,
    +			config: config,
    +			axisName: axisName,
    +			tickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate
    +		},
    +		    axis = (0, _bb2.default)(axisParams).scale(scale).orient(orient).tickFormat(tickFormat);
    +
    +
    +		return $$.isTimeSeriesY() ?
    +		// https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time
    +		axis.ticks(config.axis_y_tick_time_value) : axis.tickValues(tickValues), axis;
    +	}, Axis.prototype.updateXAxisTickValues = function updateXAxisTickValues(targets, axis) {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    xTickCount = config.axis_x_tick_count,
    +		    tickValues = void 0;
    +
    +
    +		return (config.axis_x_tick_fit || xTickCount) && (tickValues = this.generateTickValues($$.mapTargetsToUniqueXs(targets), xTickCount, $$.isTimeSeries())), axis ? axis.tickValues(tickValues) : ($$.xAxis.tickValues(tickValues), $$.subXAxis.tickValues(tickValues)), tickValues;
    +	}, Axis.prototype.getId = function getId(id) {
    +		var config = this.owner.config;
    +
    +		return id in config.data_axes ? config.data_axes[id] : "y";
    +	}, Axis.prototype.getXAxisTickFormat = function getXAxisTickFormat() {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    tickFormat = config.axis_x_tick_format,
    +		    isTimeSeries = $$.isTimeSeries(),
    +		    isCategorized = $$.isCategorized(),
    +		    format = void 0;
    +
    +
    +		return tickFormat ? (0, _util.isFunction)(tickFormat) ? format = tickFormat : isTimeSeries && (format = function (date) {
    +			return date ? $$.axisTimeFormat(tickFormat)(date) : "";
    +		}) : format = isTimeSeries ? $$.defaultAxisTimeFormat : isCategorized ? $$.categoryName : function (v) {
    +			return v < 0 ? v.toFixed(0) : v;
    +		}, (0, _util.isFunction)(format) ? function (v) {
    +			return format.apply($$, isCategorized ? [v, $$.categoryName(v)] : [v]);
    +		} : format;
    +	}, Axis.prototype.getTickValues = function getTickValues(type) {
    +		var $$ = this.owner,
    +		    tickValues = $$.config["axis_" + type + "_tick_values"],
    +		    axis = $$[type + "Axis"];
    +
    +
    +		return tickValues || (axis ? axis.tickValues() : undefined);
    +	}, Axis.prototype.getXAxisTickValues = function getXAxisTickValues() {
    +		return this.getTickValues("x");
    +	}, Axis.prototype.getYAxisTickValues = function getYAxisTickValues() {
    +		return this.getTickValues("y");
    +	}, Axis.prototype.getY2AxisTickValues = function getY2AxisTickValues() {
    +		return this.getTickValues("y2");
    +	}, Axis.prototype.getLabelOptionByAxisId = function getLabelOptionByAxisId(axisId) {
    +		return this.owner.config["axis_" + axisId + "_label"];
    +	}, Axis.prototype.getLabelText = function getLabelText(axisId) {
    +		var option = this.getLabelOptionByAxisId(axisId);
    +
    +		return (0, _util.isString)(option) ? option : option ? option.text : null;
    +	}, Axis.prototype.setLabelText = function setLabelText(axisId, text) {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    option = this.getLabelOptionByAxisId(axisId);
    +		(0, _util.isString)(option) ? config["axis_" + axisId + "_label"] = text : option && (option.text = text);
    +	}, Axis.prototype.getLabelPosition = function getLabelPosition(axisId, defaultPosition) {
    +		var isRotated = this.owner.config.axis_rotated,
    +		    option = this.getLabelOptionByAxisId(axisId),
    +		    position = (0, _util.isObjectType)(option) && option.position ? option.position : defaultPosition[+!isRotated],
    +		    has = function (v) {
    +			return !!~position.indexOf(v);
    +		};
    +
    +		return {
    +			isInner: has("inner"),
    +			isOuter: has("outer"),
    +			isLeft: has("left"),
    +			isCenter: has("center"),
    +			isRight: has("right"),
    +			isTop: has("top"),
    +			isMiddle: has("middle"),
    +			isBottom: has("bottom")
    +		};
    +	}, Axis.prototype.getXAxisLabelPosition = function getXAxisLabelPosition() {
    +		return this.getLabelPosition("x", ["inner-top", "inner-right"]);
    +	}, Axis.prototype.getYAxisLabelPosition = function getYAxisLabelPosition() {
    +		return this.getLabelPosition("y", ["inner-right", "inner-top"]);
    +	}, Axis.prototype.getY2AxisLabelPosition = function getY2AxisLabelPosition() {
    +		return this.getLabelPosition("y2", ["inner-right", "inner-top"]);
    +	}, Axis.prototype.getLabelPositionById = function getLabelPositionById(id) {
    +		return this["get" + id.toUpperCase() + "AxisLabelPosition"]();
    +	}, Axis.prototype.textForXAxisLabel = function textForXAxisLabel() {
    +		return this.getLabelText("x");
    +	}, Axis.prototype.textForYAxisLabel = function textForYAxisLabel() {
    +		return this.getLabelText("y");
    +	}, Axis.prototype.textForY2AxisLabel = function textForY2AxisLabel() {
    +		return this.getLabelText("y2");
    +	}, Axis.prototype.xForAxisLabel = function xForAxisLabel(position) {
    +		var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1],
    +		    $$ = this.owner,
    +		    x = position.isMiddle ? -$$.height / 2 : 0;
    +
    +
    +		return isHorizontal($$, forHorizontal) ? x = position.isLeft ? 0 : position.isCenter ? $$.width / 2 : $$.width : position.isBottom && (x = -$$.height), x;
    +	}, Axis.prototype.dxForAxisLabel = function dxForAxisLabel(position) {
    +		var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1],
    +		    $$ = this.owner,
    +		    dx = position.isBottom ? "0.5em" : "0";
    +
    +
    +		return isHorizontal($$, forHorizontal) ? dx = position.isLeft ? "0.5em" : position.isRight ? "-0.5em" : "0" : position.isTop && (dx = "-0.5em"), dx;
    +	}, Axis.prototype.textAnchorForAxisLabel = function textAnchorForAxisLabel(position) {
    +		var forHorizontal = !(arguments.length > 1 && arguments[1] !== undefined) || arguments[1],
    +		    $$ = this.owner,
    +		    anchor = position.isMiddle ? "middle" : "end";
    +
    +
    +		return isHorizontal($$, forHorizontal) ? anchor = position.isLeft ? "start" : position.isCenter ? "middle" : "end" : position.isBottom && (anchor = "start"), anchor;
    +	}, Axis.prototype.xForXAxisLabel = function xForXAxisLabel() {
    +		return this.xForAxisLabel(this.getXAxisLabelPosition(), !1);
    +	}, Axis.prototype.xForYAxisLabel = function xForYAxisLabel() {
    +		return this.xForAxisLabel(this.getYAxisLabelPosition());
    +	}, Axis.prototype.xForY2AxisLabel = function xForY2AxisLabel() {
    +		return this.xForAxisLabel(this.getY2AxisLabelPosition());
    +	}, Axis.prototype.dxForXAxisLabel = function dxForXAxisLabel() {
    +		return this.dxForAxisLabel(this.getXAxisLabelPosition(), !1);
    +	}, Axis.prototype.dxForYAxisLabel = function dxForYAxisLabel() {
    +		return this.dxForAxisLabel(this.getYAxisLabelPosition());
    +	}, Axis.prototype.dxForY2AxisLabel = function dxForY2AxisLabel() {
    +		return this.dxForAxisLabel(this.getY2AxisLabelPosition());
    +	}, Axis.prototype.dyForXAxisLabel = function dyForXAxisLabel() {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    isInner = this.getXAxisLabelPosition().isInner,
    +		    xHeight = config.axis_x_height;
    +		return config.axis_rotated ? isInner ? "1.2em" : -25 - this.getMaxTickWidth("x") : isInner ? "-0.5em" : xHeight ? xHeight - 10 : "3em";
    +	}, Axis.prototype.dyForYAxisLabel = function dyForYAxisLabel() {
    +		var $$ = this.owner,
    +		    isInner = this.getYAxisLabelPosition().isInner;
    +		return $$.config.axis_rotated ? isInner ? "-0.5em" : "3em" : isInner ? "1.2em" : -10 - ($$.config.axis_y_inner ? 0 : this.getMaxTickWidth("y") + 10);
    +	}, Axis.prototype.dyForY2AxisLabel = function dyForY2AxisLabel() {
    +		var $$ = this.owner,
    +		    isInner = this.getY2AxisLabelPosition().isInner;
    +		return $$.config.axis_rotated ? isInner ? "1.2em" : "-2.2em" : isInner ? "-0.5em" : 15 + ($$.config.axis_y2_inner ? 0 : this.getMaxTickWidth("y2") + 15);
    +	}, Axis.prototype.textAnchorForXAxisLabel = function textAnchorForXAxisLabel() {
    +		return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(), !1);
    +	}, Axis.prototype.textAnchorForYAxisLabel = function textAnchorForYAxisLabel() {
    +		return this.textAnchorForAxisLabel(this.getYAxisLabelPosition());
    +	}, Axis.prototype.textAnchorForY2AxisLabel = function textAnchorForY2AxisLabel() {
    +		return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition());
    +	}, Axis.prototype.getMaxTickWidth = function getMaxTickWidth(id, withoutRecompute) {
    +		var $$ = this.owner,
    +		    config = $$.config,
    +		    currentTickMax = $$.currentMaxTickWidths,
    +		    maxWidth = 0;
    +
    +
    +		if (withoutRecompute && currentTickMax[id]) return currentTickMax[id];
    +
    +		if ($$.svg) {
    +			var isYAxis = /^y2?$/.test(id),
    +			    targetsToShow = $$.filterTargetsToShow($$.data.targets),
    +			    getFrom = isYAxis ? "getY" : "getX",
    +			    scale = $$[id].copy().domain($$[getFrom + "Domain"](targetsToShow, id)),
    +			    axis = this[getFrom + "Axis"](id, scale, $$[id + "Orient"], isYAxis ? config["axis_" + id + "_tick_format"] : $$.xAxisTickFormat, null, !1, !0, !0);
    +			isYAxis || this.updateXAxisTickValues(targetsToShow, axis);
    +
    +
    +			var dummy = $$.selectChart.append("svg").style("visibility", "hidden");
    +
    +			dummy.call(axis).selectAll("text").each(function () {
    +				maxWidth = Math.max(maxWidth, this.getBoundingClientRect().width);
    +			}), dummy.remove();
    +		}
    +
    +		return maxWidth > 0 && (currentTickMax[id] = maxWidth), currentTickMax[id];
    +	}, Axis.prototype.updateLabels = function updateLabels(withTransition) {
    +		var _this2 = this,
    +		    $$ = this.owner,
    +		    labels = {
    +			X: $$.main.select("." + _classes2.default.axisX + " ." + _classes2.default.axisXLabel),
    +			Y: $$.main.select("." + _classes2.default.axisY + " ." + _classes2.default.axisYLabel),
    +			Y2: $$.main.select("." + _classes2.default.axisY2 + " ." + _classes2.default.axisY2Label)
    +		};
    +
    +		Object.keys(labels).forEach(function (v) {
    +			var node = labels[v],
    +			    axisLabel = v + "AxisLabel";
    +			(withTransition ? node.transition() : node).attr("x", _this2["xFor" + axisLabel].bind(_this2)).attr("dx", _this2["dxFor" + axisLabel].bind(_this2)).attr("dy", _this2["dyFor" + axisLabel].bind(_this2)).text(_this2["textFor" + axisLabel].bind(_this2));
    +		});
    +	}, Axis.prototype.getPadding = function getPadding(padding, key, defaultValue, domainLength) {
    +		var p = (0, _util.isNumber)(padding) ? padding : padding[key];
    +
    +		// assume padding is pixels if unit is not specified
    +		return (0, _util.isValue)(p) ? padding.unit === "ratio" ? padding[key] * domainLength : this.convertPixelsToAxisPadding(p, domainLength) : defaultValue;
    +	}, Axis.prototype.convertPixelsToAxisPadding = function convertPixelsToAxisPadding(pixels, domainLength) {
    +		var $$ = this.owner,
    +		    length = $$.config.axis_rotated ? $$.width : $$.height;
    +
    +
    +		return domainLength * (pixels / length);
    +	}, Axis.prototype.generateTickValues = function generateTickValues(values, tickCount, forTimeSeries) {
    +		var tickValues = values,
    +		    start = void 0,
    +		    end = void 0,
    +		    count = void 0,
    +		    interval = void 0,
    +		    i = void 0,
    +		    tickValue = void 0;
    +
    +
    +		if (tickCount) {
    +			var targetCount = (0, _util.isFunction)(tickCount) ? tickCount() : tickCount;
    +
    +			// compute ticks according to tickCount
    +			if (targetCount === 1) tickValues = [values[0]];else if (targetCount === 2) tickValues = [values[0], values[values.length - 1]];else if (targetCount > 2) {
    +
    +				for (count = targetCount - 2, start = values[0], end = values[values.length - 1], interval = (end - start) / (count + 1), tickValues = [start], i = 0; i < count; i++) tickValue = +start + interval * (i + 1), tickValues.push(forTimeSeries ? new Date(tickValue) : tickValue);
    +
    +				tickValues.push(end);
    +			}
    +		}
    +
    +		return forTimeSeries || (tickValues = tickValues.sort(function (a, b) {
    +			return a - b;
    +		})), tickValues;
    +	}, Axis.prototype.generateTransitions = function generateTransitions(duration) {
    +		var $$ = this.owner,
    +		    axes = $$.axes,
    +		    _map = ["x", "y", "y2", "subx"].map(function (v) {
    +			return duration ? axes[v].transition().duration(duration) : axes[v];
    +		}),
    +		    axisX = _map[0],
    +		    axisY = _map[1],
    +		    axisY2 = _map[2],
    +		    axisSubX = _map[3];
    +
    +		return { axisX: axisX, axisY: axisY, axisY2: axisY2, axisSubX: axisSubX };
    +	}, Axis.prototype.redraw = function redraw(transitions, isHidden) {
    +		var $$ = this.owner,
    +		    opacity = isHidden ? "0" : "1";
    +		["x", "y", "y2", "subx"].forEach(function (v) {
    +			$$.axes[v].style("opacity", opacity);
    +		}), transitions.axisX.call($$.xAxis), transitions.axisY.call($$.yAxis), transitions.axisY2.call($$.y2Axis), transitions.axisSubX.call($$.subXAxis);
    +	}, Axis;
    +}();
    +
    +exports.default = Axis;
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 9 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +
    +exports.default = function () {
    +
    +	function axisX(selection, x) {
    +		selection.attr("transform", function (d) {
    +			return "translate(" + Math.ceil(x(d) + tickOffset) + ", 0)";
    +		});
    +	}
    +
    +	function axisY(selection, y) {
    +		selection.attr("transform", function (d) {
    +			return "translate(0," + Math.ceil(y(d)) + ")";
    +		});
    +	}
    +
    +	function scaleExtent(domain) {
    +		var start = domain[0],
    +		    stop = domain[domain.length - 1];
    +
    +
    +		return start < stop ? [start, stop] : [stop, start];
    +	}
    +
    +	function generateTicks(scale) {
    +		var ticks = [];
    +
    +		if (scale.ticks) return scale.ticks.apply(scale, tickArguments ? (0, _util.toArray)(tickArguments) : []).map(function (v) {
    +				return (
    +					// round the tick value if is number
    +					(0, _util.isString)(v) && (0, _util.isNumber)(v) && !isNaN(v) && Math.round(v * 10) / 10 || v
    +				);
    +			});
    +
    +		for (var domain = scale.domain(), i = Math.ceil(domain[0]); i < domain[1]; i++) ticks.push(i);
    +
    +		return ticks.length > 0 && ticks[0] > 0 && ticks.unshift(ticks[0] - (ticks[1] - ticks[0])), ticks;
    +	}
    +
    +	function copyScale() {
    +		var newScale = scale.copy();
    +
    +		return newScale.domain().length || newScale.domain(scale.domain()), newScale;
    +	}
    +
    +	function textFormatted(v) {
    +		// to round float numbers from 'binary floating point'
    +		// https://en.wikipedia.org/wiki/Double-precision_floating-point_format
    +		// https://stackoverflow.com/questions/17849101/laymans-explanation-for-why-javascript-has-weird-floating-math-ieee-754-stand
    +		var value = /\d+\.\d+0{5,}\d$/.test(v) ? +(v + "").replace(/0+\d$/, "") : v,
    +		    formatted = tickFormat ? tickFormat(value) : value;
    +
    +
    +		return (0, _util.isDefined)(formatted) ? formatted : "";
    +	}
    +
    +	function transitionise(selection) {
    +		return params.withoutTransition ? selection.interrupt() : selection.transition(transition);
    +	}
    +
    +	function axis(g) {
    +		g.each(function () {
    +
    +			// this should be called only when category axis
    +			function splitTickText(d, maxWidthValue) {
    +
    +				function split(splitted, text) {
    +					spaceIndex = undefined;
    +
    +
    +					for (var i = 1; i < text.length; i++)
    +
    +					// if text width gets over tick width, split by space index or current index
    +					if (text.charAt(i) === " " && (spaceIndex = i), subtext = text.substr(0, i + 1), textWidth = sizeFor1Char.w * subtext.length, maxWidth < textWidth) return split(splitted.concat(text.substr(0, spaceIndex || i)), text.slice(spaceIndex ? spaceIndex + 1 : i));
    +
    +					return splitted.concat(text);
    +				}
    +
    +				var tickText = textFormatted(d),
    +				    splitted = (0, _util.isString)(tickText) && tickText.indexOf("\n") > -1 ? tickText.split("\n") : [];
    +
    +
    +				if (splitted.length) return splitted;
    +
    +				var maxWidth = maxWidthValue,
    +				    subtext = void 0,
    +				    spaceIndex = void 0,
    +				    textWidth = void 0;
    +				return (0, _util.isArray)(tickText) ? tickText : ((!maxWidth || maxWidth <= 0) && (maxWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12 : 110), split(splitted, tickText + ""));
    +			}
    +
    +			var g = (0, _d3Selection.select)(this);
    +
    +			axis.g = g;
    +			var scale0 = this.__chart__ || scale,
    +			    scale1 = copyScale();
    +			this.__chart__ = scale1;
    +
    +
    +			// count of tick data in array
    +			var ticks = tickValues || generateTicks(scale1),
    +			    tick = g.selectAll(".tick").data(ticks, scale1),
    +			    tickEnter = tick.enter().insert("g", ".domain").attr("class", "tick").style("opacity", "1"),
    +			    tickExit = tick.exit().remove();
    +
    +			// update selection
    +
    +
    +			// enter selection
    +
    +
    +			// MEMO: No exit transition. The reason is this transition affects max tick width calculation because old tick will be included in the ticks.
    +
    +			tick = tickEnter.merge(tick);
    +			var tickUpdate = transitionise(tick).style("opacity", "1"),
    +			    tickX = void 0,
    +			    tickY = void 0,
    +			    range = scale.rangeExtent ? scale.rangeExtent() : scaleExtent((params.orgXScale || scale).range()),
    +			    path = g.selectAll(".domain").data([0]),
    +			    pathUpdate = path.enter().append("path").attr("class", "domain").merge(transitionise(path));
    +
    +			// update selection - data join
    +
    +
    +			// enter + update selection
    +
    +			tickEnter.append("line"), tickEnter.append("text");
    +			var lineEnter = tickEnter.select("line"),
    +			    lineUpdate = tickUpdate.select("line"),
    +			    textEnter = tickEnter.select("text"),
    +			    textUpdate = tickUpdate.select("text");
    +			params.isCategory ? (tickOffset = Math.ceil((scale1(1) - scale1(0)) / 2), tickX = tickCentered ? 0 : tickOffset, tickY = tickCentered ? tickOffset : 0) : (tickX = 0, tickOffset = tickX);
    +			var sizeFor1Char = getSizeFor1Char.size || getSizeFor1Char(g.select(".tick")),
    +			    counts = [],
    +			    tickLength = Math.max(6, 0) + 3,
    +			    isLeftRight = /^(left|right)$/.test(orient),
    +			    isTopBottom = /^(top|bottom)$/.test(orient),
    +			    tspan = tick.select("text").selectAll("tspan").data(function (d, index) {
    +				var split = params.tickMultiline ? splitTickText(d, params.tickWidth) : (0, _util.isArray)(textFormatted(d)) ? textFormatted(d).concat() : [textFormatted(d)];
    +
    +				return counts[index] = split.length, split.map(function (splitted) {
    +					return { index: index, splitted: splitted };
    +				});
    +			});
    +			tspan.exit().remove(), tspan = tspan.enter().append("tspan").merge(tspan).text(function (d) {
    +				return d.splitted;
    +			});
    +
    +
    +			// line/text enter and path update
    +			var tickTransform = isTopBottom ? axisX : axisY,
    +			    sign = /^(top|left)$/.test(orient) ? -1 : 1,
    +			    axisPx = tickTransform === axisX ? "y" : "x";
    +			lineEnter.attr(axisPx + "2", 6 * sign), textEnter.attr("" + axisPx, 9 * sign), pathUpdate.attr("d", function () {
    +				var outerTickSized = outerTickSize * sign;
    +
    +				return isTopBottom ? "M" + range[0] + "," + outerTickSized + "V0H" + range[1] + "V" + outerTickSized : "M" + outerTickSized + "," + range[0] + "H0V" + range[1] + "H" + outerTickSized;
    +			});
    +
    +			// tick text helpers
    +			var rotate = params.tickTextRotate,
    +			    tickSize = function tickSize(d) {
    +				var tickPosition = scale(d) + (tickCentered ? 0 : tickOffset);
    +
    +				return range[0] < tickPosition && tickPosition < range[1] ? 6 : 0;
    +			},
    +			    tickTextPos = params.axisName && /^(x|y|y2)$/.test(params.axisName) ? params.config["axis_" + params.axisName + "_tick_text_position"] : { x: 0, y: 0 };
    +
    +			// get the axis' tick position configuration
    +
    +
    +			if (tspan.attr("x", isTopBottom ? 0 : 9 * sign).attr("dx", function () {
    +				var dx = 0;
    +
    +				return orient === "bottom" && rotate && (dx = 8 * Math.sin(Math.PI * (rotate / 180))), dx + (tickTextPos.x || 0);
    +			}()).attr("dy", function (d, i) {
    +				var dy = 0;
    +
    +
    +				return orient !== "top" && (i === 0 ? dy = isLeftRight ? -((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) : tickTextPos.y === 0 ? ".71em" : 0 : dy = sizeFor1Char.h), (0, _util.isNumber)(dy) && tickTextPos.y ? dy + tickTextPos.y : dy || ".71em";
    +			}), orient === "bottom" ? (lineUpdate.attr("x1", tickX).attr("x2", tickX).attr("y2", tickSize), textUpdate.attr("x", 0).attr("y", function yForText(r) {
    +				return r ? 11.5 - 2.5 * (r / 15) * (r > 0 ? 1 : -1) : 9;
    +			}(rotate)).style("text-anchor", function textAnchorForText(r) {
    +				return r ? r > 0 ? "start" : "end" : "middle";
    +			}(rotate)).attr("transform", function textTransform(r) {
    +				return r ? "rotate(" + r + ")" : null;
    +			}(rotate))) : orient === "top" ? (lineUpdate.attr("x2", 0).attr("y2", -6), textUpdate.attr("x", 0).attr("y", -9).style("text-anchor", "middle")) : orient === "left" ? (lineUpdate.attr("x2", -6).attr("y1", tickY).attr("y2", tickY), textUpdate.attr("x", -9).attr("y", tickOffset).style("text-anchor", "end")) : orient === "right" ? (lineUpdate.attr("x2", 6).attr("y2", 0), textUpdate.attr("x", 9).attr("y", 0).style("text-anchor", "start")) : void 0, (params.tickTitle && textUpdate.append && textUpdate.append("title").each(function (index) {
    +				(0, _d3Selection.select)(this).text(params.tickTitle[index]);
    +			}), scale1.bandwidth)) {
    +				var x = scale1,
    +				    dx = x.bandwidth() / 2;
    +				scale0 = function scale0(d) {
    +					return x(d) + dx;
    +				}, scale1 = scale0;
    +			} else scale0.bandwidth ? scale0 = scale1 : tickExit.call(tickTransform, scale1);
    +
    +			tickEnter.call(tickTransform, scale0), tickUpdate.call(tickTransform, scale1);
    +		});
    +	}
    +
    +	var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    +	    scale = (0, _d3Scale.scaleLinear)(),
    +	    orient = "bottom",
    +	    outerTickSize = params.withOuterTick ? 6 : 0,
    +	    tickValues = null,
    +	    tickFormat = void 0,
    +	    tickArguments = void 0,
    +	    tickOffset = 0,
    +	    tickCulling = !0,
    +	    tickCentered = void 0,
    +	    transition = void 0;
    +
    +
    +	return axis.scale = function (x) {
    +		return arguments.length ? (scale = x, axis) : scale;
    +	}, axis.orient = function (x) {
    +		return arguments.length ? (orient = x in {
    +			top: 1,
    +			right: 1,
    +			bottom: 1,
    +			left: 1
    +		} ? x + "" : "bottom", axis) : orient;
    +	}, axis.tickFormat = function (format) {
    +		return arguments.length ? (tickFormat = format, axis) : tickFormat;
    +	}, axis.tickCentered = function (isCentered) {
    +		return arguments.length ? (tickCentered = isCentered, axis) : tickCentered;
    +	}, axis.tickOffset = function () {
    +		return tickOffset;
    +	}, axis.tickInterval = function (size) {
    +		var interval = void 0;
    +
    +		if (params.isCategory) interval = tickOffset * 2;else {
    +			var length = axis.g.select("path.domain").node().getTotalLength() - outerTickSize * 2;
    +
    +			interval = length / (size || axis.g.selectAll("line").size());
    +		}
    +
    +		return interval === Infinity ? 0 : interval;
    +	}, axis.ticks = function () {
    +		for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
    +
    +		return args.length ? (tickArguments = (0, _util.toArray)(args), axis) : tickArguments;
    +	}, axis.tickCulling = function (culling) {
    +		return arguments.length ? (tickCulling = culling, axis) : tickCulling;
    +	}, axis.tickValues = function (x) {
    +		if ((0, _util.isFunction)(x)) tickValues = function tickValues() {
    +				return x(scale.domain());
    +			};else {
    +			if (!arguments.length) return tickValues;
    +
    +			tickValues = x;
    +		}
    +
    +		return axis;
    +	}, axis.setTransition = function (t) {
    +
    +		return transition = t, axis;
    +	}, axis;
    +};
    +
    +var _d3Scale = __webpack_require__(10),
    +    _d3Selection = __webpack_require__(5),
    +    _util = __webpack_require__(11),
    +    getSizeFor1Char = function getSizeFor1Char(node) {
    +	// default size for one character
    +	var size = {
    +		w: 5.5,
    +		h: 11.5
    +	};
    +
    +	return node.empty() || node.select("text").text("0").call(function (el) {
    +		try {
    +			var box = el.node().getBBox(),
    +			    h = box.height,
    +			    w = box.width;
    +			h && w && (size.h = h, size.w = w), el.text("");
    +		} catch (e) {}
    +	}), getSizeFor1Char.size = size;
    +};
    +
    +// Features:
    +// 1. category axis
    +// 2. ceil values of translate/x/y to int for half pixel anti-aliasing
    +// 3. multiline tick text
    +
    +/**
    + * Compute a character dimension
    + * @param {d3.selection} node
    + * @return {{w: number, h: number}}
    + * @private
    + */
    +
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + * @ignore
    + */
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 10 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__10__;
    +
    +/***/ }),
    +/* 11 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +exports.toArray = exports.sanitise = exports.merge = exports.notEmpty = exports.isValue = exports.isUndefined = exports.isString = exports.isObjectType = exports.isObject = exports.isNumber = exports.isFunction = exports.isEmpty = exports.isDefined = exports.isBoolean = exports.isArray = exports.hasValue = exports.getRectSegList = exports.getPathBox = exports.getOption = exports.getCssRules = exports.getBrushSelection = exports.extend = exports.emulateEvent = exports.diffDomain = exports.ceil10 = exports.capitalize = exports.callFn = exports.brushEmpty = exports.asHalfPixel = undefined;
    +
    +var _typeof2 = __webpack_require__(12),
    +    _typeof3 = _interopRequireDefault(_typeof2),
    +    _d3Selection = __webpack_require__(5),
    +    _d3Brush = __webpack_require__(13),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +var isValue = function (v) {
    +	return v || v === 0;
    +},
    +    isFunction = function (v) {
    +	return typeof v === "function";
    +},
    +    isString = function (v) {
    +	return typeof v === "string";
    +},
    +    isNumber = function (v) {
    +	return typeof v === "number";
    +},
    +    isUndefined = function (v) {
    +	return typeof v === "undefined";
    +},
    +    isDefined = function (v) {
    +	return typeof v !== "undefined";
    +},
    +    isBoolean = function (v) {
    +	return typeof v === "boolean";
    +},
    +    ceil10 = function (v) {
    +	return Math.ceil(v / 10) * 10;
    +},
    +    asHalfPixel = function (n) {
    +	return Math.ceil(n) + .5;
    +},
    +    diffDomain = function (d) {
    +	return d[1] - d[0];
    +},
    +    isObjectType = function (v) {
    +	return (typeof v === "undefined" ? "undefined" : (0, _typeof3.default)(v)) === "object";
    +},
    +    isEmpty = function (o) {
    +	return isUndefined(o) || o === null || isString(o) && o.length === 0 || isObjectType(o) && Object.keys(o).length === 0;
    +},
    +    notEmpty = function (o) {
    +	return !isEmpty(o);
    +},
    +    isArray = function (arr) {
    +	return arr && arr.constructor === Array;
    +},
    +    isObject = function (obj) {
    +	return obj && !obj.nodeType && isObjectType(obj) && !isArray(obj);
    +},
    +    getOption = function (options, key, defaultValue) {
    +	return isDefined(options[key]) ? options[key] : defaultValue;
    +},
    +    hasValue = function (dict, value) {
    +	var found = !1;
    +
    +	return Object.keys(dict).forEach(function (key) {
    +		return dict[key] === value && (found = !0);
    +	}), found;
    +},
    +    callFn = function (fn) {
    +	for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) args[_key - 1] = arguments[_key];
    +
    +	var isFn = isFunction(fn);
    +
    +	return isFn && fn.call.apply(fn, args), isFn;
    +},
    +    sanitise = function (str) {
    +	return isString(str) ? str.replace(/</g, "&lt;").replace(/>/g, "&gt;") : str;
    +},
    +    getRectSegList = function (path) {
    +	/*
    +  * seg1 ---------- seg2
    +  *   |               |
    +  *   |               |
    +  *   |               |
    +  * seg0 ---------- seg3
    +  * */
    +	var bbox = path.getBBox(),
    +	    _ref = [bbox.x, bbox.y, bbox.width, bbox.height],
    +	    x = _ref[0],
    +	    y = _ref[1],
    +	    width = _ref[2],
    +	    height = _ref[3];
    +
    +	return [{ x: x, y: y + height }, // seg0
    +	{ x: x, y: y }, // seg1
    +	{ x: x + width, y: y }, // seg2
    +	{ x: x + width, y: y + height // seg3
    +	}];
    +},
    +    getPathBox = function (path) {
    +	var box = path.getBoundingClientRect(),
    +	    _ref2 = [box.width, box.height],
    +	    width = _ref2[0],
    +	    height = _ref2[1],
    +	    items = getRectSegList(path),
    +	    x = items[0].x,
    +	    y = Math.min(items[0].y, items[1].y);
    +
    +	return {
    +		x: x, y: y, width: width, height: height
    +	};
    +},
    +    getBrushSelection = function (ctx) {
    +	var selection = null,
    +	    event = _d3Selection.event,
    +	    main = ctx.context || ctx.main;
    +
    +	// check from event
    +
    +	return event && event.constructor.name === "BrushEvent" ? selection = event.selection : main && (selection = main.select("." + _classes2.default.brush).node()) && (selection = (0, _d3Brush.brushSelection)(selection)), selection;
    +},
    +    brushEmpty = function (ctx) {
    +	var selection = getBrushSelection(ctx);
    +
    +	return !selection || selection[0] === selection[1];
    +},
    +    extend = function () {
    +	var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    +	    source = arguments[1];
    +
    +	for (var p in source) target[p] = source[p];
    +
    +	return target;
    +},
    +    capitalize = function (str) {
    +	return str.charAt(0).toUpperCase() + str.slice(1);
    +},
    +    merge = function (target) {
    +	for (var _len2 = arguments.length, objectN = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) objectN[_key2 - 1] = arguments[_key2];
    +
    +	if (!objectN.length || objectN.length === 1 && !objectN[0]) return target;
    +
    +	var source = objectN.shift();
    +
    +	return isObject(target) && isObject(source) && Object.keys(source).forEach(function (key) {
    +		var value = source[key];
    +
    +		isObject(value) ? (!target[key] && (target[key] = {}), target[key] = merge(target[key], value)) : target[key] = isArray(value) ? value.concat() : value;
    +	}), extend.apply(undefined, [target].concat(objectN));
    +},
    +    toArray = function (v) {
    +	return [].slice.call(v);
    +},
    +    getCssRules = function (styleSheets) {
    +	var rules = [];
    +
    +	return styleSheets.forEach(function (sheet) {
    +		try {
    +			sheet.cssRules && sheet.cssRules.length && (rules = rules.concat(toArray(sheet.cssRules)));
    +		} catch (e) {
    +			console.error("Error while reading rules from " + sheet.href + ": " + e.toString());
    +		}
    +	}), rules;
    +},
    +    emulateEvent = {
    +	mouse: function () {
    +		var getParams = function () {
    +			return {
    +				bubbles: !1, cancelable: !1, screenX: 0, screenY: 0, clientX: 0, clientY: 0
    +			};
    +		};
    +
    +		try {
    +
    +			return new MouseEvent("t"), function (el, eventType) {
    +				var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams();
    +				el.dispatchEvent(new MouseEvent(eventType, params));
    +			};
    +		} catch (e) {
    +			// Polyfills DOM4 MouseEvent
    +			return function (el, eventType) {
    +				var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : getParams(),
    +				    mouseEvent = document.createEvent("MouseEvent");
    +				mouseEvent.initMouseEvent(eventType, params.bubbles, params.cancelable, window, 0, // the event's mouse click count
    +				params.screenX, params.screenY, params.clientX, params.clientY, !1, !1, !1, !1, 0, null), el.dispatchEvent(mouseEvent);
    +			};
    +		}
    +	}(),
    +	touch: function touch(el, eventType, params) {
    +		var touchObj = new Touch(Object.assign({
    +			identifier: Date.now(),
    +			target: el,
    +			radiusX: 2.5,
    +			radiusY: 2.5,
    +			rotationAngle: 10,
    +			force: .5
    +		}, params));
    +
    +		el.dispatchEvent(new TouchEvent(eventType, {
    +			cancelable: !0,
    +			bubbles: !0,
    +			shiftKey: !0,
    +			touches: [touchObj],
    +			targetTouches: [],
    +			changedTouches: [touchObj]
    +		}));
    +	}
    +};
    +
    +/**
    + * Check if is array
    + * @param {Array} arr
    + * @returns {Boolean}
    + * @private
    + */
    +
    +
    +/**
    + * Check if is object
    + * @param {Object} obj
    + * @returns {Boolean}
    + * @private
    + */
    +
    +
    +/**
    + * Call function with arguments
    + * @param {Function} fn Function to be called
    + * @param {*} args Arguments
    + * @return {Boolean} true: fn is function, false: fn is not function
    + * @private
    + */
    +
    +
    +/**
    + * Replace tag sign to html entity
    + * @param {String} str
    + * @return {String}
    + * @private
    + */
    +
    +
    +// substitution of SVGPathSeg API polyfill
    +
    +
    +// return brush selection array
    +
    +
    +/**
    + * Return first letter capitalized
    + * @param {String} str
    + * @return {String} capitalized string
    + * @private
    + */
    +
    +
    +/**
    + * Merge object returning new object
    + * @param {Object} target
    + * @param {Object} objectN
    + * @returns {Object} merged target object
    + * @private
    + * @example
    + *  var target = { a: 1 };
    + *  utils.extend(target, { b: 2, c: 3 });
    + *  target;  // { a: 1, b: 2, c: 3 };
    + */
    +
    +
    +/**
    + * Convert to array
    + * @param {Object} v
    + * @returns {Array}
    + * @private
    + */
    +
    +
    +/**
    + * Get css rules for specified stylesheets
    + * @param {Array} styleSheets The stylesheets to get the rules from
    + * @returns {Array}
    + * @private
    + */
    +
    +
    +// emulate event
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +
    +
    +exports.asHalfPixel = asHalfPixel;
    +exports.brushEmpty = brushEmpty;
    +exports.callFn = callFn;
    +exports.capitalize = capitalize;
    +exports.ceil10 = ceil10;
    +exports.diffDomain = diffDomain;
    +exports.emulateEvent = emulateEvent;
    +exports.extend = extend;
    +exports.getBrushSelection = getBrushSelection;
    +exports.getCssRules = getCssRules;
    +exports.getOption = getOption;
    +exports.getPathBox = getPathBox;
    +exports.getRectSegList = getRectSegList;
    +exports.hasValue = hasValue;
    +exports.isArray = isArray;
    +exports.isBoolean = isBoolean;
    +exports.isDefined = isDefined;
    +exports.isEmpty = isEmpty;
    +exports.isFunction = isFunction;
    +exports.isNumber = isNumber;
    +exports.isObject = isObject;
    +exports.isObjectType = isObjectType;
    +exports.isString = isString;
    +exports.isUndefined = isUndefined;
    +exports.isValue = isValue;
    +exports.notEmpty = notEmpty;
    +exports.merge = merge;
    +exports.sanitise = sanitise;
    +exports.toArray = toArray;
    +
    +/***/ }),
    +/* 12 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = true;
    +
    +function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
    +
    +exports.default = function (obj) {
    +  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
    +};
    +
    +/***/ }),
    +/* 13 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
    +
    +/***/ }),
    +/* 14 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +/**
    + * CSS class names definition
    + * @private
    + */
    +exports.default = {
    +	arc: "bb-arc",
    +	arcs: "bb-arcs",
    +	area: "bb-area",
    +	areas: "bb-areas",
    +	axis: "bb-axis",
    +	axisX: "bb-axis-x",
    +	axisXLabel: "bb-axis-x-label",
    +	axisY: "bb-axis-y",
    +	axisY2: "bb-axis-y2",
    +	axisY2Label: "bb-axis-y2-label",
    +	axisYLabel: "bb-axis-y-label",
    +	bar: "bb-bar",
    +	bars: "bb-bars",
    +	brush: "bb-brush",
    +	button: "bb-button",
    +	buttonZoomReset: "bb-zoom-reset",
    +	chart: "bb-chart",
    +	chartArc: "bb-chart-arc",
    +	chartArcs: "bb-chart-arcs",
    +	chartArcsBackground: "bb-chart-arcs-background",
    +	chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
    +	chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
    +	chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
    +	chartArcsTitle: "bb-chart-arcs-title",
    +	chartBar: "bb-chart-bar",
    +	chartBars: "bb-chart-bars",
    +	chartLine: "bb-chart-line",
    +	chartLines: "bb-chart-lines",
    +	chartRadar: "bb-chart-radar",
    +	chartRadars: "bb-chart-radars",
    +	chartText: "bb-chart-text",
    +	chartTexts: "bb-chart-texts",
    +	circle: "bb-circle",
    +	circles: "bb-circles",
    +	colorPattern: "bb-color-pattern",
    +	defocused: "bb-defocused",
    +	dragarea: "bb-dragarea",
    +	empty: "bb-empty",
    +	eventRect: "bb-event-rect",
    +	eventRects: "bb-event-rects",
    +	eventRectsMultiple: "bb-event-rects-multiple",
    +	eventRectsSingle: "bb-event-rects-single",
    +	focused: "bb-focused",
    +	gaugeValue: "bb-gauge-value",
    +	grid: "bb-grid",
    +	gridLines: "bb-grid-lines",
    +	legendBackground: "bb-legend-background",
    +	legendItem: "bb-legend-item",
    +	legendItemEvent: "bb-legend-item-event",
    +	legendItemFocused: "bb-legend-item-focused",
    +	legendItemHidden: "bb-legend-item-hidden",
    +	legendItemPoint: "bb-legend-item-point",
    +	legendItemTile: "bb-legend-item-tile",
    +	level: "bb-level",
    +	levels: "bb-levels",
    +	line: "bb-line",
    +	lines: "bb-lines",
    +	region: "bb-region",
    +	regions: "bb-regions",
    +	selectedCircle: "bb-selected-circle",
    +	selectedCircles: "bb-selected-circles",
    +	shape: "bb-shape",
    +	shapes: "bb-shapes",
    +	target: "bb-target",
    +	text: "bb-text",
    +	texts: "bb-texts",
    +	title: "bb-title",
    +	tooltip: "bb-tooltip",
    +	tooltipContainer: "bb-tooltip-container",
    +	tooltipName: "bb-tooltip-name",
    +	xgrid: "bb-xgrid",
    +	xgridFocus: "bb-xgrid-focus",
    +	xgridLine: "bb-xgrid-line",
    +	xgridLines: "bb-xgrid-lines",
    +	xgrids: "bb-xgrids",
    +	ygrid: "bb-ygrid",
    +	ygridLine: "bb-ygrid-line",
    +	ygridLines: "bb-ygrid-lines",
    +	ygrids: "bb-ygrids",
    +	zoomBrush: "bb-zoom-brush",
    +	zoomRect: "bb-zoom-rect",
    +	EXPANDED: "_expanded_",
    +	SELECTED: "_selected_",
    +	INCLUDED: "_included_"
    +};
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 15 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +// extracted by mini-css-extract-plugin
    +
    +/***/ }),
    +/* 16 */,
    +/* 17 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Options = __webpack_require__(18),
    +    _Options2 = _interopRequireDefault(_Options),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getOptions: function getOptions() {
    +		var config = new _Options2.default();
    +
    +		return (0, _util.merge)(config.value, this.additionalConfig);
    +	},
    +
    +
    +	additionalConfig: {},
    +
    +	/**
    +  * Load configuration option
    +  * @param {Object} config User's generation config value
    +  * @private
    +  */
    +	loadConfig: function loadConfig(config) {
    +		var thisConfig = this.config,
    +		    target = void 0,
    +		    keys = void 0,
    +		    read = void 0,
    +		    find = function () {
    +			var key = keys.shift();
    +
    +			return key && target && (0, _util.isObjectType)(target) && key in target ? (target = target[key], find()) : key ? undefined : target;
    +		};
    +
    +		Object.keys(thisConfig).forEach(function (key) {
    +			target = config, keys = key.split("_"), read = find(), (0, _util.isDefined)(read) && (thisConfig[key] = read);
    +		});
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 18 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +
    +var _classCallCheck2 = __webpack_require__(2),
    +    _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +/**
    + * Class to set options on generating chart.
    + * - It's instantiated internally, not exposed for public.
    + * @class Options
    + * @see {@link bb.generate} to use these options on generating the chart
    + */
    +var Options = function Options() {
    +										(0, _classCallCheck3.default)(this, Options), this.value = {
    +																				/**
    +                     * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.
    +                     * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).<br><br>
    +                     * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.<br>
    +                     * @name bindto
    +                     * @memberOf Options
    +                     * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn.
    +                     * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn.
    +                     * @property {String} [bindto.classname=bb] Specify the class name of bind element.<br>
    +                     *     **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.
    +                     * @default #chart
    +                     * @example
    +                     * bindto: "#myContainer"
    +                     *
    +                     * // or HTMLElement
    +                     * bindto: document.getElementById("myContainer")
    +                     *
    +                     * // or D3 selection object
    +                     * bindto: d3.select("#myContainer")
    +                     *
    +                     * // or to change default classname
    +                     * bindto: {
    +                     *    element: "#chart",
    +                     *    classname: "bill-board"  // ex) <div id='chart' class='bill-board'>
    +                     * }
    +                     */
    +																				bindto: "#chart",
    +
    +																				/**
    +                     * Set 'clip-path' attribute for chart element
    +                     * - **NOTE:**
    +                     *  > When is false, chart node element is positioned after the axis node in DOM tree hierarchy.
    +                     *  > Is to make chart element positioned over axis element.
    +                     * @name clipPath
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * // don't set 'clip-path' attribute
    +                     * clipPath: false
    +                     */
    +																				clipPath: !0,
    +
    +																				/**
    +                     * Set svg element's class name
    +                     * @name svg
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {String} [svg.classname] class name for svg element
    +                     * @example
    +                     * svg: {
    +                              *   classname: "test_class"
    +                     * }
    +                     */
    +																				svg_classname: undefined,
    +
    +																				/**
    +                     * The desired size of the chart element.
    +                     * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.
    +                     * @name size
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Number} [size.width] width of the chart element
    +                     * @property {Number} [size.height] height of the chart element
    +                     * @example
    +                     * size: {
    +                              *   width: 640,
    +                              *   height: 480
    +                     * }
    +                     */
    +																				size_width: undefined,
    +																				size_height: undefined,
    +
    +																				/**
    +                     * The padding of the chart element.
    +                     * @name padding
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Number} [padding.top] padding on the top of chart
    +                     * @property {Number} [padding.right] padding on the right of chart
    +                     * @property {Number} [padding.bottom] padding on the bottom of chart
    +                     * @property {Number} [padding.left] padding on the left of chart
    +                     * @example
    +                     * padding: {
    +                              *   top: 20,
    +                              *   right: 20,
    +                              *   bottom: 20,
    +                              *   left: 20
    +                     * }
    +                     */
    +																				padding_left: undefined,
    +																				padding_right: undefined,
    +																				padding_top: undefined,
    +																				padding_bottom: undefined,
    +
    +																				/**
    +                     * Set chart resize options
    +                     * @name resize
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes.
    +                     * @example
    +                     *  resize: {
    +                     *      auto: false
    +                     *  }
    +                     */
    +																				resize_auto: !0,
    +
    +																				/**
    +                     * Set zoom options
    +                     * @name zoom
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [zoom.enabled=false] Enable zooming.
    +                     * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type.
    +                     *  - **Available types:**
    +                     *    - wheel
    +                     *    - drag
    +                     * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.<br>
    +                     *  If true set, y domain will be updated according to the zoomed region.
    +                     * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.
    +                     * @property {Number} [zoom.x.min] Set x Axis minimum zoom range
    +                     * @property {Number} [zoom.x.max] Set x Axis maximum zoom range
    +                     * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br>
    +                     *  Specified function receives the zoom event.
    +                     * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br>
    +                     *  Specified function receives the zoomed domain.
    +                     * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br>
    +                     *  Specified function receives the zoomed domain.
    +                     * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom
    +                     * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button.
    +                     * @example
    +                     *  zoom: {
    +                     *      enabled: {
    +                              *          type: "drag"
    +                              *      },
    +                     *      rescale: true,
    +                     *      extent: [1, 100]  // enable more zooming
    +                     *      x: {
    +                     *          min: -1,  // set min range
    +                     *          max: 10  // set max range
    +                     *      },
    +                     *      onzoomstart: function(event) { ... },
    +                     *      onzoom: function(domain) { ... },
    +                     *      onzoomend: function(domain) { ... },
    +                     *
    +                     *      // show reset button when is zoomed-in
    +                     *      resetButton: true,
    +                     *
    +                     *      // customized text value for reset zoom button
    +                     *      resetButton: {
    +                     *          text: "Unzoom"
    +                     *      }
    +                     *  }
    +                     */
    +																				zoom_enabled: undefined,
    +																				zoom_extent: undefined,
    +																				zoom_privileged: !1,
    +																				zoom_rescale: !1,
    +																				zoom_onzoom: undefined,
    +																				zoom_onzoomstart: undefined,
    +																				zoom_onzoomend: undefined,
    +																				zoom_resetButton: !0,
    +																				zoom_x_min: undefined,
    +																				zoom_x_max: undefined,
    +
    +																				/**
    +                     * Interaction options
    +                     * @name interaction
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>
    +                     *     If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.
    +                     * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)
    +                     * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction
    +                     * @property {Boolean} [interaction.inputType.touch=true] enable or disable  touch interaction
    +                     * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.
    +                     * @example
    +                     * interaction: {
    +                              *    enabled: false,
    +                              *    inputType: {
    +                              *        mouse: true,
    +                              *        touch: false
    +                              *
    +                              *        // or declare preventDefault explicitly.
    +                              *        // In this case touch inputType is enabled by default
    +                              *        touch: {
    +                              *            preventDefault: true
    +                              *
    +                              *            // or threshold pixel value (pixel moved from touchstart to touchmove)
    +                              *            preventDefault: 5
    +                              *        }
    +                              *    }
    +                     * }
    +                     */
    +																				interaction_enabled: !0,
    +																				interaction_brighten: !0,
    +																				interaction_inputType_mouse: !0,
    +																				interaction_inputType_touch: {},
    +
    +																				/**
    +                     * Set a callback to execute when mouse/touch enters the chart.
    +                     * @name onover
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onover: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onover: function onover() {},
    +
    +																				/**
    +                     * Set a callback to execute when mouse/touch leaves the chart.
    +                     * @name onout
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onout: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onout: function onout() {},
    +
    +																				/**
    +                     * Set a callback to execute when user resizes the screen.
    +                     * @name onresize
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onresize: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onresize: function onresize() {},
    +
    +																				/**
    +                     * SSet a callback to execute when screen resize finished.
    +                     * @name onresized
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onresized: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onresized: function onresized() {},
    +
    +																				/**
    +                     * Set a callback to execute before the chart is initialized
    +                     * @name onbeforeinit
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onbeforeinit: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onbeforeinit: undefined,
    +
    +																				/**
    +                     * Set a callback to execute when the chart is initialized.
    +                     * @name oninit
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * oninit: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				oninit: function oninit() {},
    +
    +																				/**
    +                     * Set a callback to execute after the chart is initialized
    +                     * @name onafterinit
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function(){}
    +                     * @example
    +                     * onafterinit: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onafterinit: undefined,
    +
    +																				/**
    +                     * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.
    +                     * @name onrendered
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     * onrendered: function() {
    +                     *   ...
    +                     * }
    +                     */
    +																				onrendered: undefined,
    +
    +																				/**
    +                     * Set duration of transition (in milliseconds) for chart animation.<br><br>
    +                     * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.
    +                     * @name transition
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Number} [transition.duration=350] duration in milliseconds
    +                     * @example
    +                     * transition: {
    +                     *    duration: 500
    +                     * }
    +                     */
    +																				transition_duration: 350,
    +
    +																				/**
    +                     * Specify the key of x values in the data.<br><br>
    +                     * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.
    +                     * @name data․x
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                              *   x: "date"
    +                     * }
    +                     */
    +																				data_x: undefined,
    +
    +																				/**
    +                     * Specify the keys of the x values for each data.<br><br>
    +                     * This option can be used if we want to show the data that has different x values.
    +                     * @name data․xs
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                              *   xs: {
    +                              *      data1: "x1",
    +                              *      data2: "x2"
    +                              *   }
    +                     * }
    +                     */
    +																				data_xs: {},
    +
    +																				/**
    +                     * Set a format to parse string specifed as x.
    +                     * @name data․xFormat
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default %Y-%m-%d
    +                     * @example
    +                     * data: {
    +                              *   xFormat: "%Y-%m-%d %H:%M:%S"
    +                     * }
    +                     * @see [D3's time specifier](https://npm.runkit.com/d3-time-format)
    +                     */
    +																				data_xFormat: "%Y-%m-%d",
    +
    +																				/**
    +                     * Set localtime format to parse x axis.
    +                     * @name data․xLocaltime
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * data: {
    +                              *   xLocaltime: false
    +                     * }
    +                     */
    +																				data_xLocaltime: !0,
    +
    +																				/**
    +                     * Sort on x axis.
    +                     * @name data․xSort
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * data: {
    +                              *   xSort: false
    +                     * }
    +                     */
    +																				data_xSort: !0,
    +																				data_idConverter: function data_idConverter(id) {
    +																														return id;
    +																				},
    +
    +																				/**
    +                     * Set custom data name.
    +                     * @name data․names
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                              *   names: {
    +                              *     data1: "Data Name 1",
    +                              *     data2: "Data Name 2"
    +                              *   }
    +                     * }
    +                     */
    +																				data_names: {},
    +
    +																				/**
    +                     * Set custom data class.<br><br>
    +                     * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).
    +                     * @name data․classes
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                              *   classes: {
    +                              *     data1: "additional-data1-class",
    +                              *     data2: "additional-data2-class"
    +                              *   }
    +                     * }
    +                     */
    +																				data_classes: {},
    +
    +																				/**
    +                     * Set groups for the data for stacking.
    +                     * @name data․groups
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default []
    +                     * @example
    +                     * data: {
    +                              *   groups: [
    +                              *     ["data1", "data2"],
    +                              *     ["data3"]
    +                              *   ]
    +                     * }
    +                     */
    +																				data_groups: [],
    +
    +																				/**
    +                     * Set y axis the data related to. y and y2 can be used.
    +                     * @name data․axes
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                     *   axes: {
    +                     *     data1: "y",
    +                     *     data2: "y2"
    +                     *   }
    +                     * }
    +                     */
    +																				data_axes: {},
    +
    +																				/**
    +                     * Set chart type at once.<br><br>
    +                     * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>
    +                     * **Available Values:**
    +                     * - area
    +                     * - area-line-range
    +                     * - area-spline
    +                     * - area-spline-range
    +                     * - area-step
    +                     * - bar
    +                     * - bubble
    +                     * - donut
    +                     * - gauge
    +                     * - line
    +                     * - pie
    +                     * - radar
    +                     * - scatter
    +                     * - spline
    +                     * - step
    +                     * @name data․type
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default line
    +                     * @example
    +                     * data: {
    +                     *    type: "bar"
    +                     * }
    +                     */
    +																				data_type: undefined,
    +
    +																				/**
    +                     * Set chart type for each data.<br>
    +                     * This setting overwrites data.type setting.
    +                     * - **NOTE:** `radar` type can't be combined with other types.
    +                     * @name data․types
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                     *   types: {
    +                     *     data1: "bar",
    +                     *     data2: "spline"
    +                     *   }
    +                     * }
    +                     */
    +																				data_types: {},
    +
    +																				/**
    +                     * Set labels options
    +                     * @name data․labels
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [data.labels=false] Show or hide labels on each data points
    +                     * @property {Function} [data.labels.format={}] Set formatter function for data labels.<br>
    +                     * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:<br>
    +                     *  - `v` is the value of the data point where the label is shown.
    +                     *  - `id` is the id of the data where the label is shown.
    +                     *  - `i` is the index of the data point where the label is shown.
    +                     *  - `j` is the sub index of the data point where the label is shown.<br><br>
    +                     * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
    +                     * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original.
    +                     * @property {NUmber} [data.labels.position.y=0] y coordinate position, relative the original.
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                     *   labels: true,
    +                     *
    +                     *   // or set specific options
    +                     *   labels: {
    +                     *     format: function(v, id, i, j) { ... },
    +                     *
    +                     *     // it's possible to set for each data
    +                     *     format: {
    +                     *         data1: function(v, id, i, j) { ... },
    +                     *         ...
    +                     *     },
    +                     *     position: {
    +                     *        x: -10,
    +                     *        y: 10
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				data_labels: {},
    +																				data_labels_position: {},
    +
    +																				/**
    +                     *  This option changes the order of stacking data and pieces of pie/donut.
    +                     *  - If `null` specified, it will be the order the data loaded.
    +                     *  - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>
    +                     *
    +                     *  **Available Values:**
    +                     *  - `desc`: In descending order
    +                     *  - `asc`: In ascending order
    +                     *  - `null`: It keeps the data load order
    +                     *  - `function(data1, data2) { ... }`: Array.sort compareFunction
    +                     * @name data․order
    +                     * @memberOf Options
    +                     * @type {String|Function|null}
    +                     * @default desc
    +                     * @example
    +                     * data: {
    +                     *   // in descending order (default)
    +                     *   order: "desc"
    +                     *
    +                     *   // in ascending order
    +                     *   order: "asc"
    +                     *
    +                     *   // keeps data input order
    +                     *   order: null
    +                     *
    +                     *   // specifying sort function
    +                     *   order: function(a, b) {
    +                     *       // param data passed format
    +                     *       {
    +                     *          id: "data1", id_org: "data1", values: [
    +                     *              {x: 5, value: 250, id: "data1", index: 5, name: "data1"},
    +                     *              ...
    +                     *          ]
    +                     *       }
    +                     *   }
    +                     * }
    +                     */
    +																				data_order: "desc",
    +
    +																				/**
    +                     * Define regions for each data.<br>
    +                     * The values must be an array for each data and it should include an object that has `start`, `end` and `style`.
    +                     * - The object type should be as:
    +                     *   - start {Number}: Start data point number. If not set, the start will be the first data point.
    +                     *   - [end] {Number}: End data point number. If not set, the end will be the last data point.
    +                     *   - [style.dasharray="2 2"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
    +                     * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
    +                     * @name data․regions
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                     *   regions: {
    +                     *     data1: [{
    +                     *         start: 1,
    +                     *         end: 2,
    +                     *         style: {
    +                     *             dasharray: "5 2"
    +                     *         }
    +                     *     }, {
    +                     *         start: 3
    +                     *     }],
    +                     *     ...
    +                     *   }
    +                     * }
    +                     */
    +																				data_regions: {},
    +
    +																				/**
    +                     * Set color converter function.<br><br>
    +                     * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
    +                     * @name data․color
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *   color: function(color, d) { ... }
    +                     * }
    +                     */
    +																				data_color: undefined,
    +
    +																				/**
    +                     * Set color for each data.
    +                     * @name data․colors
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * data: {
    +                     *   colors: {
    +                     *     data1: "#ff0000",
    +                     *     ...
    +                     *   }
    +                     * }
    +                     */
    +																				data_colors: {},
    +
    +																				/**
    +                     * Hide each data when the chart appears.<br><br>
    +                     * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.
    +                     * @name data․hide
    +                     * @memberOf Options
    +                     * @type {Boolean|Array}
    +                     * @default false
    +                     * @example
    +                     * data: {
    +                     *   // all of data will be hidden
    +                     *   hide: true
    +                     *
    +                     *   // specified data will be hidden
    +                     *   hide: ["data1", ...]
    +                     * }
    +                     */
    +																				data_hide: !1,
    +																				data_filter: undefined,
    +
    +																				/**
    +                     * Set data selection enabled.<br><br>
    +                     * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).
    +                     * @name data․selection․enabled
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * data: {
    +                     *    selection: {
    +                     *       enabled: true
    +                     *    }
    +                     * }
    +                     */
    +																				data_selection_enabled: !1,
    +
    +																				/**
    +                     * Set grouped selection enabled.<br><br>
    +                     * If this option set true, multiple data points that have same x value will be selected by one selection.
    +                     * @name data․selection․grouped
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * data: {
    +                     *    selection: {
    +                     *       grouped: true
    +                     *    }
    +                     * }
    +                     */
    +																				data_selection_grouped: !1,
    +
    +																				/**
    +                     * Set a callback for each data point to determine if it's selectable or not.<br><br>
    +                     * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.
    +                     * @name data․selection․isselectable
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() { return true; }
    +                     * @example
    +                     * data: {
    +                     *    selection: {
    +                     *       isselectable: function(d) { ... }
    +                     *    }
    +                     * }
    +                     */
    +																				data_selection_isselectable: function data_selection_isselectable() {
    +																														return !0;
    +																				},
    +
    +																				/**
    +                     * Set multiple data points selection enabled.<br><br>
    +                     * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.
    +                     * @name data․selection․multiple
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * data: {
    +                     *    selection: {
    +                     *       multiple: false
    +                     *    }
    +                     * }
    +                     */
    +																				data_selection_multiple: !0,
    +
    +																				/**
    +                     * Enable to select data points by dragging.
    +                     * If this option set true, data points can be selected by dragging.
    +                     * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.
    +                     * @name data․selection․draggable
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * data: {
    +                     *    selection: {
    +                     *       draggable: true
    +                     *   }
    +                     * }
    +                     */
    +																				data_selection_draggable: !1,
    +
    +																				/**
    +                     * Set a callback for click event on each data point.<br><br>
    +                     * This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object.
    +                     * @name data․onclick
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() {}
    +                     * @example
    +                     * data: {
    +                     *     onclick: function(d, element) { ... }
    +                     * }
    +                     */
    +																				data_onclick: function data_onclick() {},
    +
    +																				/**
    +                     * Set a callback for mouse/touch over event on each data point.<br><br>
    +                     * This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object.
    +                     * @name data․onover
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() {}
    +                     * @example
    +                     * data: {
    +                     *     onover: function(d) { ... }
    +                     * }
    +                     */
    +																				data_onover: function data_onover() {},
    +
    +																				/**
    +                     * Set a callback for mouse/touch out event on each data point.<br><br>
    +                     * This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object.
    +                     * @name data․onout
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() {}
    +                     * @example
    +                     * data: {
    +                     *     onout: function(d) { ... }
    +                     * }
    +                     */
    +																				data_onout: function data_onout() {},
    +
    +																				/**
    +                     * Set a callback for on data selection.
    +                     * @name data․onselected
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() {}
    +                     * @example
    +                     * data: {
    +                     *     onselected: function(d, element) {
    +                     *        // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +                     *        // element - <circle>
    +                     *        ...
    +                     *    }
    +                     * }
    +                     */
    +																				data_onselected: function data_onselected() {},
    +
    +																				/**
    +                     * Set a callback for on data un-selection.
    +                     * @name data․onunselected
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default function() {}
    +                     * @example
    +                     * data: {
    +                     *     onunselected: function(d, element) {
    +                     *        // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +                     *        // element - <circle>
    +                     *        ...
    +                     *    }
    +                     * }
    +                     */
    +																				data_onunselected: function data_onunselected() {},
    +
    +																				/**
    +                     * Set a callback for minimum data
    +                     * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
    +                     * @name data․onmin
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     *  onmin: function(data) {
    +                     *    // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +                        *    ...
    +                     *  }
    +                     */
    +																				data_onmin: undefined,
    +
    +																				/**
    +                     * Set a callback for maximum data
    +                     * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
    +                     * @name data․onmax
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     *  onmax: function(data) {
    +                     *    // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +                        *    ...
    +                     *  }
    +                     */
    +																				data_onmax: undefined,
    +
    +																				/**
    +                     * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.
    +                     * @name data․url
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *     url: "/data/test.csv"
    +                     * }
    +                     */
    +																				data_url: undefined,
    +																				data_headers: undefined,
    +
    +																				/**
    +                     * Parse a JSON object for data. See also data.keys.
    +                     * @name data․json
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default undefined
    +                     * @see data․keys
    +                     * @example
    +                     * data: {
    +                     *     json: [
    +                     *       {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +                     *       {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +                     *       {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +                     *       {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +                     *     ],
    +                     *     keys: {
    +                     *       // x: "name", // it's possible to specify 'x' when category axis
    +                     *       value: ["upload", "download"]
    +                     *     }
    +                     * }
    +                     */
    +																				data_json: undefined,
    +
    +																				/**
    +                     * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
    +                     * @name data․rows
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *   rows: [
    +                     *     ["A", "B", "C"],
    +                     *     [90, 120, 300],
    +                     *     [40, 160, 240],
    +                     *     [50, 200, 290],
    +                     *     [120, 160, 230],
    +                     *     [80, 130, 300],
    +                     *     [90, 220, 320]
    +                     *   ]
    +                     * }
    +                     *
    +                     * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +                     * // - an array of [high, mid, low] data following the order
    +                     * // - or an object with 'high', 'mid' and 'low' key value
    +                     * data: {
    +                     *   rows: [
    +                     *      ["data1", "data2"],
    +                     *      [
    +                     *        // or {high:150, mid: 140, low: 110}, 120
    +                     *        [150, 140, 110], 120
    +                     *      ],
    +                     *      [[155, 130, 115], 55],
    +                     *      [[160, 135, 120], 60]
    +                     *   ],
    +                     *   types: {
    +                     *       data1: "area-line-range",
    +                     *       data2: "line"
    +                     *   }
    +                     * }
    +                     */
    +																				data_rows: undefined,
    +
    +																				/**
    +                     * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
    +                     * @name data․columns
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *   columns: [
    +                     *      ["data1", 30, 20, 50, 40, 60, 50],
    +                     *      ["data2", 200, 130, 90, 240, 130, 220],
    +                     *      ["data3", 300, 200, 160, 400, 250, 250]
    +                     *   ]
    +                     * }
    +                     *
    +                     * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +                     * // - an array of [high, mid, low] data following the order
    +                     * // - or an object with 'high', 'mid' and 'low' key value
    +                     * data: {
    +                     *   columns: [
    +                     *      ["data1",
    +                     *          [150, 140, 110],  // or {high:150, mid: 140, low: 110}
    +                     *          [150, 140, 110],
    +                     *          [150, 140, 110]
    +                     *      ]
    +                     *   ],
    +                     *   type: "area-line-range"
    +                     * }
    +                     */
    +																				data_columns: undefined,
    +
    +																				/**
    +                     * Used if loading JSON via data.url.
    +                     * @name data․mimeType
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *     mimeType: "json"
    +                     * }
    +                     */
    +																				data_mimeType: undefined,
    +
    +																				/**
    +                     * Choose which JSON object keys correspond to desired data.
    +                     * @name data․keys
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default undefined
    +                     * @example
    +                     * data: {
    +                     *     json: [
    +                     *       {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +                     *       {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +                     *       {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +                     *       {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +                     *     ],
    +                     *     keys: {
    +                     *       // x: "name", // it's possible to specify 'x' when category axis
    +                     *       value: ["upload", "download"]
    +                     *     }
    +                     * }
    +                     */
    +																				data_keys: undefined,
    +
    +																				/**
    +                     * Set text displayed when empty data.
    +                     * @name data․empty․label․text
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default ""
    +                     * @example
    +                     * data: {
    +                     *   empty: {
    +                     *     label: {
    +                     *       text: "No Data"
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				data_empty_label_text: "",
    +
    +																				/**
    +                     * Set subchart options
    +                     * @name subchart
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart.
    +                     * @property {Boolean} [subchart.size.height] Change the height of the subchart.
    +                     * @property {Boolean} [subchart.onbrush] Set callback for brush event.<br>
    +                     *  Specified function receives the current zoomed x domain.
    +                     * @example
    +                     *  subchart: {
    +                     *      show: true,
    +                     *      size: {
    +                     *          height: 20
    +                     *      },
    +                     *      onbrush: function(domain) { ... }
    +                     *  }
    +                     */
    +																				subchart_show: !1,
    +																				subchart_size_height: 60,
    +																				subchart_axis_x_show: !0,
    +																				subchart_onbrush: function subchart_onbrush() {},
    +
    +																				/**
    +                     * Set color of the data values
    +                     * @name color
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Array} [color.pattern] custom color pattern
    +                     * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).
    +                     *  - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>
    +                     *    ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>
    +                     *    - `bb-colorize-pattern-red`
    +                     *    - `bb-colorize-pattern-fff`
    +                     * @property {Object} [color.threshold] color threshold
    +                     * @property {String} [color.threshold.unit] unit
    +                     * @property {Array} [color.threshold.value] value
    +                     * @property {Array} [color.threshold.max=100] max value
    +                     * @example
    +                     *  color: {
    +                     *      pattern: ["#1f77b4", "#aec7e8", ...],
    +                     *
    +                     *      // Set colors' patterns
    +                     *      // it should return an array of SVGPatternElement
    +                     *      tiles: function() {
    +                     *         var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    +                     *         var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
    +                     *         var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    +                     *
    +                     *         pattern.setAttribute("patternUnits", "userSpaceOnUse");
    +                     *         pattern.setAttribute("width", "32");
    +                     *         pattern.setAttribute("height", "32");
    +                     *
    +                     *         g.style.fill = "#000";
    +                     *         g.style.opacity = "0.2";
    +                              *
    +                     *         circle1.setAttribute("cx", "3");
    +                     *         circle1.setAttribute("cy", "3");
    +                     *         circle1.setAttribute("r", "3");
    +                              *
    +                     *         g.appendChild(circle1);
    +                     *         pattern.appendChild(g);
    +                     *
    +                     *         return [pattern];
    +                     *      }
    +                     *  }
    +                     */
    +																				color_pattern: [],
    +																				color_tiles: undefined,
    +																				color_threshold: {},
    +
    +																				/**
    +                     * Legend options
    +                     * @name legend
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [legend.show=true] Show or hide legend.
    +                     * @property {Boolean} [legend.hide=false] Hide legend
    +                     *  If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.
    +                     * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.
    +                     * @property {String|Function} [legend.contents.template=undefined] Set item's template.<br>
    +                     *  - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:
    +                     *    - {=COLOR}: data color value
    +                     *    - {=TITLE}: data title value
    +                     *  - If set `function` value, will pass following arguments to the given function:
    +                     *   - title {String}: data's id value
    +                     *   - color {String}: color string
    +                     *   - data {Array}: data array
    +                     * @property {String} [legend.position=bottom] Change the position of legend.<br>
    +                     *  Available values are: `bottom`, `right` and `inset` are supported.
    +                     * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>
    +                     *  This option accepts object that has the keys `anchor`, `x`, `y` and `step`.
    +                     *  - **anchor** decides the position of the legend:
    +                     *   - top-left
    +                     *   - top-right
    +                     *   - bottom-left
    +                     *   - bottom-right
    +                     *  - **x** and **y**:
    +                     *   - set the position of the legend based on the anchor.
    +                     *  - **step**:
    +                     *   - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
    +                     * @property {Boolean} [legend.equally=false] Set to all items have same width size.
    +                     * @property {Boolean} [legend.padding=0] Set padding value
    +                     * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
    +                     * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
    +                     * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
    +                     * @property {Number} [legend.item.tile.width=10] Set width of item tile element
    +                     * @property {Number} [legend.item.tile.height=10] Set height of item tile element
    +                     * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend.
    +                     * @example
    +                     *  legend: {
    +                     *      show: true,
    +                     *      hide: true,
    +                     *      //or hide: "data1"
    +                              *      //or hide: ["data1", "data2"]
    +                     *      contents: {
    +                     *          bindto: "#legend",   // <ul id='legend'></ul>
    +                     *
    +                     *          // will be as: <li style='background-color:#1f77b4'>data1</li>
    +                     *          template: "<li style='background-color:{=COLOR}'>{=TITLE}</li>"
    +                     *
    +                     *          // or using function
    +                     *          template: function(id, color, data) {
    +                     *               // if you want omit some legend, return falsy value
    +                     *               if (title !== "data1") {
    +                     *                    return "<li style='background-color:"+ color +">"+ title +"</li>";
    +                     *               }
    +                     *          }
    +                     *      },
    +                              *      position: "bottom",  // bottom, right, inset
    +                     *      inset: {
    +                     *          anchor: "top-right"  // top-left, top-right, bottom-left, bottom-right
    +                     *          x: 20,
    +                     *          y: 10,
    +                     *          step: 2
    +                     *      },
    +                              *      equally: false,
    +                              *      padding: 10,
    +                              *      item: {
    +                     *          onclick: function(id) { ... },
    +                     *          onover: function(id) { ... },
    +                     *          onout: function(id) { ... },
    +                     *
    +                     *          // set tile's size
    +                     *          tile: {
    +                     *              width: 20,
    +                     *              height: 15
    +                     *          }
    +                     *      },
    +                     *      usePoint: true
    +                     *  }
    +                     */
    +																				legend_show: !0,
    +																				legend_hide: !1,
    +																				legend_contents_bindto: undefined,
    +																				legend_contents_template: undefined,
    +																				legend_position: "bottom",
    +																				legend_inset_anchor: "top-left",
    +																				legend_inset_x: 10,
    +																				legend_inset_y: 0,
    +																				legend_inset_step: undefined,
    +																				legend_item_onclick: undefined,
    +																				legend_item_onover: undefined,
    +																				legend_item_onout: undefined,
    +																				legend_equally: !1,
    +																				legend_padding: 0,
    +																				legend_item_tile_width: 10,
    +																				legend_item_tile_height: 10,
    +																				legend_usePoint: !1,
    +
    +																				/**
    +                     * Switch x and y axis position.
    +                     * @name axis․rotated
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   rotated: true
    +                     * }
    +                     */
    +																				axis_rotated: !1,
    +
    +																				/**
    +                     * Set clip-path attribute for x axis element
    +                     * @name axis․x․clipPath
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * // don't set 'clip-path' attribute
    +                     * clipPath: false
    +                     */
    +																				axis_x_clipPath: !0,
    +
    +																				/**
    +                     * Show or hide x axis.
    +                     * @name axis․x․show
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     show: false
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_show: !0,
    +
    +																				/**
    +                     * Set type of x axis.<br><br>
    +                     * **Available Values:**
    +                     * - timeseries
    +                     * - category
    +                     * - indexed
    +                     * @name axis․x․type
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default indexed
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     type: "timeseries"
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_type: "indexed",
    +
    +																				/**
    +                     * Set how to treat the timezone of x values.<br>
    +                     * If true, treat x value as localtime. If false, convert to UTC internally.
    +                     * @name axis․x․localtime
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     localtime: false
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_localtime: !0,
    +
    +																				/**
    +                     * Set category names on category axis.
    +                     * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
    +                     * @name axis․x․categories
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default []
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     categories: ["Category 1", "Category 2", ...]
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_categories: [],
    +
    +																				/**
    +                     * Centerise ticks on category axis.
    +                     * @name axis․x․tick․centered
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       centered: true
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_centered: !1,
    +
    +																				/**
    +                     * A function to format tick value. Format string is also available for timeseries data.
    +                     * @name axis․x․tick․format
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *        // for timeseries, a 'datetime' object is given as parameter
    +                     *       format: function(x) {
    +                     *           return x.getFullYear();
    +                     *       }
    +                     *
    +                     *       // for category, index(Number) and categoryName(String) are given as parameter
    +                     *       format: function(index, categoryName) {
    +                     *           return categoryName.substr(0, 10);
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_format: undefined,
    +
    +																				/**
    +                     * Setting for culling ticks.<br><br>
    +                     * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
    +                     * We can change the number of ticks to be shown by axis.x.tick.culling.max.
    +                     * @name axis․x․tick․culling
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default
    +                     * - true for indexed axis and timeseries axis
    +                     * - false for category axis
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       culling: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_culling: {},
    +
    +																				/**
    +                     * The number of tick texts will be adjusted to less than this value.
    +                     * @name axis․x․tick․culling․max
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default 10
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       culling: {
    +                     *           max: 5
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_culling_max: 10,
    +
    +																				/**
    +                     * The number of x axis ticks to show.<br><br>
    +                     * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
    +                     * @name axis․x․tick․count
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       count: 5
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_count: undefined,
    +
    +																				/**
    +                     * Set the x Axis tick text's position relatively its original position
    +                     * @name axis․x․tick․text․position
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {x: 0, y:0}
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       text: {
    +                     *         position: {
    +                     *           x: 10,
    +                     *           y: 10
    +                     *         }
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_text_position: { x: 0, y: 0 },
    +
    +																				/**
    +                     * Fit x axis ticks.<br><br>
    +                     * If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points.
    +                     * @name axis․x․tick․fit
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       fit: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_fit: !0,
    +
    +																				/**
    +                     * Set the x values of ticks manually.<br><br>
    +                     * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option.
    +                     * @name axis․x․tick․values
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default null
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       values: [1, 2, 4, 8, 16, 32, ...]
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_values: null,
    +
    +																				/**
    +                     * Rotate x axis tick text.<br>
    +                     * If you set negative value, it will rotate to opposite direction.
    +                     * @name axis․x․tick․rotate
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default 0
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       rotate: 60
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_rotate: 0,
    +
    +																				/**
    +                     * Show x axis outer tick.
    +                     * @name axis․x․tick․outer
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       outer: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_outer: !0,
    +
    +																				/**
    +                     * Set tick text to be multiline
    +                     * - **NOTE:**
    +                     *  > When x tick text contains `\n`, it's used as line break and 'axis.x.tick.width' option is ignored.
    +                     * @name axis․x․tick․multiline
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       multiline: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     * @example
    +                     * // example of line break with '\n'
    +                     * // In this case, 'axis.x.tick.width' is ignored
    +                     * data: {
    +                     *    x: "x",
    +                     *    columns: [
    +                     *        ["x", "long\ntext", "Another\nLong\nText"],
    +                     *        ...
    +                     *    ],
    +                     * }
    +                     */
    +																				axis_x_tick_multiline: !0,
    +
    +																				/**
    +                     * Set tick width
    +                     * - **NOTE:**
    +                     *  > When x tick text contains `\n`, this option is ignored.
    +                     * @name axis․x․tick․width
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default null
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       width: 50
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_width: null,
    +
    +																				/**
    +                     * Set to display system tooltip for tick text
    +                     * - **NOTE:** Only available for category axis type (`axis.x.type='category'`)
    +                     * @name axis․x․tick․tooltip
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     tick: {
    +                     *       tooltip: true
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_tick_tooltip: !1,
    +
    +																				/**
    +                     * Set max value of x axis range.
    +                     * @name axis․x․max
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     max: 100
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_max: undefined,
    +
    +																				/**
    +                     * Set min value of x axis range.
    +                     * @name axis․x․min
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     min: -100
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_min: undefined,
    +
    +																				/**
    +                     * Set padding for x axis.<br><br>
    +                     * If this option is set, the range of x axis will increase/decrease according to the values.
    +                     * If no padding is needed in the rage of x axis, 0 should be set.
    +                     * - **NOTE:**
    +                     *   The padding values aren't based on pixels. It differs according axis types<br>
    +                     *   - **category:** The unit of tick value
    +                     *     ex. the given value `1`, is same as the width of 1 tick width
    +                     *   - **timeseries:** Numeric time value
    +                     *     ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width
    +                     * @name axis․x․padding
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     padding: {
    +                     *       // when axis type is 'category'
    +                     *       left: 1,  // set left padding width of equivalent value of a tick's width
    +                     *       right: 0.5  // set right padding width as half of equivalent value of tick's width
    +                     *
    +                     *       // when axis type is 'timeseries'
    +                     *       left: 1000*60*60*24,  // set left padding width of equivalent value of a day tick's width
    +                     *       right: 1000*60*60*12   // set right padding width as half of equivalent value of a day tick's width
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_padding: {},
    +
    +																				/**
    +                     * Set height of x axis.<br><br>
    +                     * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.
    +                     * @name axis․x․height
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     height: 20
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_height: undefined,
    +
    +																				/**
    +                     * Set default extent for subchart and zoom. This can be an array or function that returns an array.
    +                     * @name axis․x․extent
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner
    +                     *     // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521
    +                     *     extent: [
    +                     *         [0, 0], [200, 60]
    +                     *     ]
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_extent: undefined,
    +
    +																				/**
    +                     * Set label on x axis.<br><br>
    +                     *  You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default.
    +                     *  - **If it's horizontal axis:**
    +                     *    - inner-right [default]
    +                     *    - inner-center
    +                     *    - inner-left
    +                     *    - outer-right
    +                     *    - outer-center
    +                     *    - outer-left
    +                     *  - **If it's vertical axis:**
    +                     *    - inner-top [default]
    +                     *    - inner-middle
    +                     *    - inner-bottom
    +                     *    - outer-top
    +                     *    - outer-middle
    +                     *    - outer-bottom
    +                     * @name axis․x․label
    +                     * @memberOf Options
    +                     * @type {String|Object}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   x: {
    +                     *     label: "Your X Axis"
    +                     *   }
    +                     * }
    +                     *
    +                     * axis: {
    +                     *   x: {
    +                     *     label: {
    +                     *        text: "Your X Axis",
    +                     *        position: "outer-center"
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_x_label: {},
    +
    +																				/**
    +                     * Set clip-path attribute for y axis element
    +                     * @name axis․y․clipPath
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * // don't set 'clip-path' attribute
    +                     * clipPath: false
    +                     */
    +																				axis_y_clipPath: !0,
    +
    +																				/**
    +                     * Show or hide y axis.
    +                     * @name axis․y․show
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     show: false
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_show: !0,
    +
    +																				/**
    +                     * Set type of y axis.<br><br>
    +                     * **Available Values:**
    +                     *   - timeseries
    +                     *   - category
    +                     *   - indexed
    +                     * @name axis․y․type
    +                     * @memberOf Options
    +                     * @type {String}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     type: "timeseries"
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_type: undefined,
    +
    +																				/**
    +                     * Set max value of y axis.
    +                     * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    +                     * @name axis․y․max
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     max: 1000
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_max: undefined,
    +
    +																				/**
    +                     * Set min value of y axis.
    +                     * - **NOTE:**
    +                     *   Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    +                     * @name axis․y․min
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     min: 1000
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_min: undefined,
    +
    +																				/**
    +                     * Change the direction of y axis.<br><br>
    +                     * If true set, the direction will be from the top to the bottom.
    +                     * @name axis․y․inverted
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     inverted: true
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_inverted: !1,
    +
    +																				/**
    +                     * Set center value of y axis.
    +                     * @name axis․y․center
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     center: 0
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_center: undefined,
    +
    +																				/**
    +                     * Show y axis inside of the chart.
    +                     * @name axis․y․inner
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     inner: true
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_inner: !1,
    +
    +																				/**
    +                     * Set label on y axis.<br><br>
    +                     * You can set y axis label and change its position by this option. This option works in the same way as axis.x.label.
    +                     * @name axis․y․label
    +                     * @memberOf Options
    +                     * @type {String|Object}
    +                     * @default {}
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     label: "Your Y Axis"
    +                     *   }
    +                     * }
    +                     *
    +                     * axis: {
    +                     *   y: {
    +                     *     label: {
    +                     *        text: "Your Y Axis",
    +                     *        position: "outer-middle"
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_label: {},
    +
    +																				/**
    +                     * Set formatter for y axis tick text.<br><br>
    +                     * This option accepts d3.format object as well as a function you define.
    +                     * @name axis․y․tick․format
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       format: function(x) {
    +                     *           return x.getFullYear();
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_tick_format: undefined,
    +
    +																				/**
    +                     * Show y axis outer tick.
    +                     * @name axis․y․tick․outer
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       outer: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_tick_outer: !0,
    +
    +																				/**
    +                     * Set y axis tick values manually.
    +                     * @name axis․y․tick․values
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default null
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       values: [100, 1000, 10000]
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_tick_values: null,
    +																				axis_y_tick_rotate: 0,
    +
    +																				/**
    +                     * Set the number of y axis ticks.<br><br>
    +                     * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
    +                     * @name axis․y․tick․count
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       count: 5
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_tick_count: undefined,
    +
    +																				/**
    +                     * Set the y Axis tick text's position relatively its original position
    +                     * @name axis․y․tick․text․position
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {x: 0, y:0}
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       text: {
    +                     *         position: {
    +                     *           x: 10,
    +                     *           y: 10
    +                     *         }
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_tick_text_position: { x: 0, y: 0 },
    +
    +																				/**
    +                     * Set the number of y axis ticks.<br><br>
    +                     * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
    +                     * @name axis․y․tick․time
    +                     * @memberOf Options
    +                     * @private
    +                     * @type {Object}
    +                     * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     tick: {
    +                     *       time: {
    +                     *          // ticks at 15-minute intervals
    +                     *          // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks
    +                     *          value: d3.timeMinute.every(15)
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				// @TODO: not fully implemented yet
    +																				axis_y_tick_time_value: undefined,
    +
    +																				/**
    +                     * Set padding for y axis.<br><br>
    +                     * You can set padding for y axis to create more space on the edge of the axis.
    +                     * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.
    +                     *
    +                     * - **NOTE:** For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.
    +                     * @name axis․y․padding
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     padding: {
    +                     *       top: 0,
    +                     *       bottom: 0
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_padding: {},
    +
    +																				/**
    +                     * Set default range of y axis.<br><br>
    +                     * This option set the default value for y axis when there is no data on init.
    +                     * @name axis․y․default
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y: {
    +                     *     default: [0, 1000]
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y_default: undefined,
    +
    +																				/**
    +                     * Show or hide y2 axis.
    +                     * @name axis․y2․show
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     show: true
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_show: !1,
    +
    +																				/**
    +                     * Set max value of y2 axis.
    +                     * @name axis․y2․max
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     max: 1000
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_max: undefined,
    +
    +																				/**
    +                     * Set min value of y2 axis.
    +                     * @name axis․y2․min
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     min: -1000
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_min: undefined,
    +
    +																				/**
    +                     * Change the direction of y2 axis.<br><br>
    +                     * If true set, the direction will be from the top to the bottom.
    +                     * @name axis․y2․inverted
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     inverted: true
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_inverted: !1,
    +
    +																				/**
    +                     * Set center value of y2 axis.
    +                     * @name axis․y2․center
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     center: 0
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_center: undefined,
    +
    +																				/**
    +                     * Show y2 axis inside of the chart.
    +                     * @name axis․y2․inner
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default false
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     inner: true
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_inner: !1,
    +
    +																				/**
    +                     * Set label on y2 axis.<br><br>
    +                     * You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label.
    +                     * @name axis․y2․label
    +                     * @memberOf Options
    +                     * @type {String|Object}
    +                     * @default {}
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     label: "Your Y2 Axis"
    +                     *   }
    +                     * }
    +                     *
    +                     * axis: {
    +                     *   y2: {
    +                     *     label: {
    +                     *        text: "Your Y2 Axis",
    +                     *        position: "outer-middle"
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_label: {},
    +
    +																				/**
    +                     * Set formatter for y2 axis tick text.<br><br>
    +                     * This option works in the same way as axis.y.format.
    +                     * @name axis․y2․tick․format
    +                     * @memberOf Options
    +                     * @type {Function}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     tick: {
    +                     *       format: d3.format("$,")
    +                     *       //or format: function(d) { return "$" + d; }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_tick_format: undefined,
    +
    +																				/**
    +                     * Show or hide y2 axis outer tick.
    +                     * @name axis․y2․tick․outer
    +                     * @memberOf Options
    +                     * @type {Boolean}
    +                     * @default true
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     tick: {
    +                     *       outer: false
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_tick_outer: !0,
    +
    +																				/**
    +                     * Set y2 axis tick values manually.
    +                     * @name axis․y2․tick․values
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default null
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     tick: {
    +                     *       values: [100, 1000, 10000]
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_tick_values: null,
    +
    +																				/**
    +                     * Set the number of y2 axis ticks.
    +                     * - **NOTE:** This works in the same way as axis.y.tick.count.
    +                     * @name axis․y2․tick․count
    +                     * @memberOf Options
    +                     * @type {Number}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     tick: {
    +                     *       count: 5
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_tick_count: undefined,
    +
    +																				/**
    +                     * Set the y2 Axis tick text's position relatively its original position
    +                     * @name axis․y2․tick․text․position
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {x: 0, y:0}
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     tick: {
    +                     *       text: {
    +                     *         position: {
    +                     *           x: 10,
    +                     *           y: 10
    +                     *         }
    +                     *       }
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_tick_text_position: { x: 0, y: 0 },
    +
    +																				/**
    +                     * Set the number of y2 axis ticks.
    +                     * - **NOTE:** This works in the same way as axis.y.tick.count.
    +                     * @name axis․y2․padding
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @default {}
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     padding: {
    +                     *       top: 100,
    +                     *       bottom: 100
    +                     *     }
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_padding: {},
    +
    +																				/**
    +                     * Set default range of y2 axis.<br><br>
    +                     * This option set the default value for y2 axis when there is no data on init.
    +                     * @name axis․y2․default
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default undefined
    +                     * @example
    +                     * axis: {
    +                     *   y2: {
    +                     *     default: [0, 1000]
    +                     *   }
    +                     * }
    +                     */
    +																				axis_y2_default: undefined,
    +
    +																				/**
    +                     * Set related options
    +                     * @name grid
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.
    +                     * @property {Boolean} [x.show=false] Show grids along x axis.
    +                     * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.<br>
    +                     *  This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.
    +                     *  If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.
    +                     * @property {Boolean} [y.show=false] Show grids along x axis.
    +                     * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.<br>
    +                     *  This option accepts array including object that has value, text, position and class.
    +                     * @property {Boolean} [y.ticks=10] Number of y grids to be shown.
    +                     * @property {Boolean} [focus.show=true] Show grids when focus.
    +                     * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements.
    +                     * @default undefined
    +                     * @example
    +                     * grid: {
    +                     *   x: {
    +                     *     show: true,
    +                     *     lines: [
    +                     *       {value: 2, text: "Label on 2"},
    +                     *       {value: 5, text: "Label on 5", class: "label-5"}
    +                     *       {value: 6, text: "Label on 6", position: "start"}
    +                     *     ]
    +                     *   },
    +                     *   y: {
    +                     *     show: true,
    +                     *     lines: [
    +                     *       {value: 100, text: "Label on 100"},
    +                     *       {value: 200, text: "Label on 200", class: "label-200"}
    +                     *       {value: 300, text: "Label on 300", position: 'middle'}
    +                     *     ],
    +                     *     ticks: 5
    +                     *   },
    +                     *   front: true,
    +                     *   focus: {
    +                     *      show: false
    +                     *   },
    +                     *   lines: {
    +                     *      front: false
    +                     *   }
    +                     * }
    +                     */
    +																				grid_x_show: !1,
    +																				grid_x_type: "tick",
    +																				grid_x_lines: [],
    +																				grid_y_show: !1,
    +																				grid_y_lines: [],
    +																				grid_y_ticks: 10,
    +																				grid_focus_show: !0,
    +																				grid_front: !1,
    +																				grid_lines_front: !0,
    +
    +																				/**
    +                     * Set point options
    +                     * @name point
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [point.show=true] Whether to show each point in line.
    +                     * @property {Number|Function} [point.r=2.5] The radius size of each point.<br>
    +                     *  - **NOTE:** Disabled for 'bubble' type
    +                     * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.
    +                     * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.<br>
    +                     *  - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`
    +                     * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected.
    +                     * @property {String} [point.type="circle"] The type of point to be drawn<br>
    +                     * - **NOTE:**
    +                     *  - If chart has 'bubble' type, only circle can be used.
    +                     *  - For IE, non circle point expansions are not supported due to lack of transform support.
    +                     * - **Available Values:**
    +                     *  - circle
    +                     *  - rectangle
    +                     * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line<br>
    +                     * - **NOTE:**
    +                     *  - This is an `experimental` feature and can have some unexpected behaviors.
    +                     *  - If chart has 'bubble' type, only circle can be used.
    +                     *  - For IE, non circle point expansions are not supported due to lack of transform support.
    +                     * - **Available Values:**
    +                     *  - circle
    +                     *  - rectangle
    +                     *  - svg shape tag interpreted as string<br>
    +                     *    (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)
    +                     * @example
    +                     *  point: {
    +                     *      show: false,
    +                     *      r: 5,
    +                     *
    +                     *      // or customize the radius
    +                     *      r: function(d) {
    +                     *          ...
    +                     *          return r;
    +                     *      },
    +                     *
    +                     *      focus: {
    +                     *          expand: {
    +                     *              enabled: true,
    +                     *              r: 1
    +                     *          }
    +                     *      },
    +                     *      select: {
    +                     *          r: 3
    +                     *      },
    +                     *
    +                     *      // valid values are "circle" or "rectangle"
    +                     *      type: "rectangle",
    +                     *
    +                     *      // or indicate as pattern
    +                    	 *      pattern: [
    +                    	 *        "circle",
    +                    	 *        "rectangle",
    +                    	 *        "<polygon points='0 6 4 0 -4 0'></polygon>"
    +                    	 *     ],
    +                     *  }
    +                     */
    +																				point_show: !0,
    +																				point_r: 2.5,
    +																				point_sensitivity: 10,
    +																				point_focus_expand_enabled: !0,
    +																				point_focus_expand_r: undefined,
    +																				point_pattern: [],
    +																				point_select_r: undefined,
    +																				point_type: "circle",
    +
    +																				/**
    +                     * Set line options
    +                     * @name line
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.<br>
    +                     *  If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.
    +                     * @property {Array}   [line.classes=undefined] If set, used to set a css class on each line.
    +                     * @property {Boolean} [line.step.type=step] Change step type for step chart.<br>
    +                     * **Available values:**
    +                     * - step
    +                     * - step-before
    +                     * - step-after
    +                     * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.
    +                     * @example
    +                     *  line: {
    +                     *      connectNull: true,
    +                     *      classes: [
    +                     *          "line-class1",
    +                     *          "line-class2"
    +                     *      ],
    +                     *      step: {
    +                     *          type: "step-after"
    +                     *      },
    +                     *
    +                     *      // hide all data points ('point.show=false' also has similar effect)
    +                     *      point: false,
    +                     *
    +                     *      // show data points for only indicated datas
    +                     *      point: [
    +                     *          "data1", "data3"
    +                     *      ]
    +                     *  }
    +                     */
    +																				line_connectNull: !1,
    +																				line_step_type: "step",
    +																				line_classes: undefined,
    +																				line_point: !0,
    +
    +																				/**
    +                     * Set bar options
    +                     * @name bar
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [bar.padding=0] The padding pixel value between each bar.
    +                     * @property {Number} [bar.radius] Set the radius of bar edge in pixel.<br>- **NOTE:** Only for non-stacking bars.
    +                     * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
    +                     * @property {Number} [bar.width] Change the width of bar chart.
    +                     * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.
    +                     * @property {Number} [bar.width.max] The maximum width value for ratio.
    +                     * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
    +                     * @example
    +                     *  bar: {
    +                     *      padding: 1,
    +                     *
    +                     *      // the 'radius' option can be used only for non-stacking bars
    +                     *      radius: 10,
    +                     *      // or
    +                     *      radius: {
    +                     *          ratio: 0.5
    +                     *      }
    +                     *
    +                     *      width: 10,
    +                     *      // or
    +                     *      width: {
    +                     *          ratio: 0.2,
    +                     *          max: 20
    +                     *      },
    +                     *
    +                     *      zerobased: false
    +                     *  }
    +                     */
    +																				bar_padding: 0,
    +																				bar_radius: undefined,
    +																				bar_radius_ratio: undefined,
    +																				bar_width: undefined,
    +																				bar_width_ratio: .6,
    +																				bar_width_max: undefined,
    +																				bar_zerobased: !0,
    +
    +																				/**
    +                     * Set bubble options
    +                     * @name bubble
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value
    +                     * @example
    +                     *  bubble: {
    +                     *      // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.
    +                     *      // And the lesser will have radius relatively from tha max value.
    +                     *      maxR: 50,
    +                     *
    +                     *      // or set radius callback
    +                     *      maxR: function(d) {
    +                     *          // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5}
    +                     *          ...
    +                     *          return Math.sqrt(d.value * 2);
    +                     *      }
    +                     *  }
    +                     */
    +																				bubble_maxR: 35,
    +
    +																				/**
    +                     * Set area options
    +                     * @name area
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.
    +                     * @property {Boolean} [area.above=false]
    +                     * @example
    +                     *  area: {
    +                     *      zerobased: false,
    +                     *      above: true
    +                     *  }
    +                     */
    +																				area_zerobased: !0,
    +																				area_above: !1,
    +
    +																				/**
    +                     * Set pie options
    +                     * @name pie
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece.
    +                     * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.
    +                     * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels.
    +                     * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position.
    +                     * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces.
    +                     * @property {Number} [pie.innerRadius=0] Sets the inner radius of pie arc.
    +                     * @property {Number} [pie.padAngle=0] Set padding between data.
    +                     * @property {Number} [pie.padding=0] Sets the gap between pie arcs.
    +                     * @example
    +                     *  pie: {
    +                     *      label: {
    +                     *          show: false,
    +                     *          format: function(value, ratio, id) {
    +                     *              return d3.format("$")(value);
    +                     *          },
    +                     *          threshold: 0.1,
    +                     *
    +                     *          // set ratio callback. Should return ratio value
    +                     *          ratio: function(d, radius, h) {
    +                     *              ...
    +                     *              return ratio;
    +                     *          },
    +                     *          // or set ratio number
    +                     *          ratio: 0.5
    +                     *      },
    +                     *      expand: false,
    +                     *      innerRadius: 0,
    +                     *      padAngle: 0.1,
    +                     *      padding: 0
    +                     *  }
    +                     */
    +																				pie_label_show: !0,
    +																				pie_label_format: undefined,
    +																				pie_label_threshold: .05,
    +																				pie_label_ratio: undefined,
    +																				pie_expand: {},
    +																				pie_expand_duration: 50,
    +																				pie_innerRadius: 0,
    +																				pie_padAngle: 0,
    +																				pie_padding: 0,
    +
    +																				/**
    +                     * Set gauge options
    +                     * @name gauge
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.
    +                     * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge.
    +                     * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\n` character.
    +                     * @property {Function} [gauge.label.extents] Set customized min/max label text.
    +                     * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge.
    +                     * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
    +                     * @property {Number} [gauge.min=0] Set min value of the gauge.
    +                     * @property {Number} [gauge.max=100] Set max value of the gauge.
    +                     * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2]
    +                     * @property {String} [gauge.units] Set units of the gauge.
    +                     * @property {Number} [gauge.width] Set width of gauge chart.
    +                     * @example
    +                     *  gauge: {
    +                     *      fullCircle: false,
    +                     *      label: {
    +                     *          show: false,
    +                     *          format: function(value, ratio) {
    +                     *              return value;
    +                     *
    +                     *              // to multiline, return with '\n' character
    +                     *              // return value +"%\nLine1\n2Line2";
    +                     *          },
    +                     *          extents: function(value, isMax) {
    +                    	 *              return (isMax ? "Max:" : "Min:") + value;
    +                     *          }
    +                     *      },
    +                     *      expand: false,
    +                     *
    +                     *      // or set duration
    +                     *      expand: {
    +                     *          duration: 20
    +                     *      },
    +                     *      min: -100,
    +                     *      max: 200,
    +                     *      units: "%",
    +                     *      width: 10
    +                     *  }
    +                     */
    +																				gauge_fullCircle: !1,
    +																				gauge_label_show: !0,
    +																				gauge_label_format: undefined,
    +																				gauge_min: 0,
    +																				gauge_max: 100,
    +																				gauge_startingAngle: -1 * Math.PI / 2,
    +																				gauge_label_extents: undefined,
    +																				gauge_units: undefined,
    +																				gauge_width: undefined,
    +																				gauge_expand: {},
    +																				gauge_expand_duration: 50,
    +
    +																				/**
    +                     * Set donut options
    +                     * @name donut
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece.
    +                     * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.
    +                     * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels.
    +                     * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position.
    +                     * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces.
    +                     * @property {Number} [donut.width] Set width of donut chart.
    +                     * @property {String} [donut.title=""] Set title of donut chart. Use `\n` character to enter line break.
    +                     * @property {Number} [donut.padAngle=0] Set padding between data.
    +                     * @example
    +                     *  donut: {
    +                     *      label: {
    +                     *          show: false,
    +                     *          format: function(value, ratio, id) {
    +                     *              return d3.format("$")(value);
    +                     *          },
    +                     *          threshold: 0.1,
    +                     *
    +                     *          // set ratio callback. Should return ratio value
    +                     *          ratio: function(d, radius, h) {
    +                     *          	...
    +                     *          	return ratio;
    +                     *          },
    +                     *          // or set ratio number
    +                     *          ratio: 0.5
    +                     *      },
    +                     *      expand: false,
    +                     *      width: 10,
    +                     *      padAngle: 0.2,
    +                     *      title: "Donut Title"
    +                     *
    +                     *      // title with line break
    +                     *      title: "Title1\nTitle2"
    +                     *  }
    +                     */
    +																				donut_label_show: !0,
    +																				donut_label_format: undefined,
    +																				donut_label_threshold: .05,
    +																				donut_label_ratio: undefined,
    +																				donut_width: undefined,
    +																				donut_title: "",
    +																				donut_expand: {},
    +																				donut_expand_duration: 50,
    +																				donut_padAngle: 0,
    +
    +																				/**
    +                     * Set spline options
    +                     * @name spline
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {String} [spline.interpolation.type=cardinal]
    +                     * @example
    +                     *  spline: {
    +                     *      interpolation: {
    +                     *          type: "cardinal"
    +                     *      }
    +                     *  }
    +                     */
    +																				spline_interpolation_type: "cardinal",
    +
    +																				/**
    +                     * Set radar options
    +                     * @name radar
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data.
    +                     * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line.
    +                     * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text.
    +                     * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn.
    +                     * @property {Number} [radar.level.depth=3] Set the level depth.
    +                     * @property {Boolean} [radar.level.show=true] Show or hide level.
    +                     * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value.
    +                     * @property {Boolean} [radar.level.text.show=true] Show or hide level text.
    +                     * @property {Number} [radar.size.ratio=0.87] Set size ratio.
    +                     * @example
    +                     *  radar: {
    +                     *      axis: {
    +                     *          max: 50,
    +                     *          line: {
    +                     *              show: false
    +                     *          },
    +                     *          text: {
    +                     *              show: false
    +                     *          }
    +                     *      },
    +                     *      direction: {
    +                     *          clockwise: true
    +                     *      },
    +                     *      level: {
    +                     *          show: false,
    +                     *          text: {
    +                     *              format: function(x) {
    +                     *                  return x + "%";
    +                     *              },
    +                     *              show: true
    +                     *          }
    +                     *      },
    +                     *      size: {
    +                     *          ratio: 0.7
    +                     *      }
    +                     *  }
    +                     */
    +																				radar_axis_max: undefined,
    +																				radar_axis_line_show: !0,
    +																				radar_axis_text_show: !0,
    +																				radar_level_depth: 3,
    +																				radar_level_show: !0,
    +																				radar_level_text_format: function radar_level_text_format(x) {
    +																														return x % 1 === 0 ? x : x.toFixed(2);
    +																				},
    +																				radar_level_text_show: !0,
    +																				radar_size_ratio: .87,
    +																				radar_direction_clockwise: !1,
    +
    +																				/**
    +                     * Show rectangles inside the chart.<br><br>
    +                     * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional.
    +                     * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class.
    +                     * @name regions
    +                     * @memberOf Options
    +                     * @type {Array}
    +                     * @default []
    +                     * @example
    +                     *  regions: [
    +                     *    {
    +                     *      axis: "x",
    +                     *      start: 1,
    +                     *      end: 4,
    +                     *      class: "region-1-4"
    +                     *    }
    +                     *  ]
    +                     */
    +																				regions: [],
    +
    +																				/**
    +                     * Tooltip options
    +                     * @name tooltip
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {Boolean} [tooltip.show=true] Show or hide tooltip.<br>
    +                     * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.
    +                     *   - **NOTE:** The overlapped data points will be displayed as grouped even if set false.
    +                     * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.
    +                     * @property {String} [tooltip.linked.name=""] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.
    +                     * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br>
    +                     *  Specified function receives x of the data point to show.
    +                     * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>
    +                     *  Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
    +                     * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>
    +                     *  Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
    +                     *  If undefined returned, the row of that value will be skipped.
    +                     * @property {Function} [tooltip.position] Set custom position for the tooltip.<br>
    +                     *  This option can be used to modify the tooltip position by returning object that has top and left.
    +                     * @property {Function} [tooltip.contents] Set custom HTML for the tooltip.<br>
    +                     *  Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.
    +                     * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization.
    +                     * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization.
    +                     * @property {Object} [tooltip.init.position={top: "0px",left: "50px"}] Set the position of tooltip at the initialization.
    +                     * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.
    +                     * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.
    +                     * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown
    +                     * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.
    +                     * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br>
    +                     *  **Available Values:**
    +                     *  - `desc`: In descending data value order
    +                     *  - `asc`: In ascending data value order
    +                     *  - `null`: It keeps the data display order<br>
    +                     *     **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>
    +                     *      If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "")
    +                     *  - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)
    +                     * @example
    +                     *  tooltip: {
    +                     *      show: true,
    +                     *      grouped: false,
    +                     *      format: {
    +                     *          title: function(x) { return "Data " + x; },
    +                     *          name: function(name, ratio, id, index) { return name; },
    +                     *          value: function(value, ratio, id, index) { return ratio; }
    +                     *      },
    +                     *      position: function(data, width, height, element) {
    +                     *          return {top: 0, left: 0}
    +                    		 *      },
    +                    		 *      contents: function(d, defaultTitleFormat, defaultValueFormat, color) {
    +                    		 *          return ... // formatted html as you want
    +                     		 *      },
    +                     		 *
    +                     		 *      // sort tooltip data value display in ascending order
    +                     		 *      order: "asc",
    +                     		 *
    +                     *      // specifying sort function
    +                     *      order: function(a, b) {
    +                     *         // param data passed format
    +                     *         {x: 5, value: 250, id: "data1", index: 5, name: "data1"}
    +                     *           ...
    +                     *      },
    +                     *
    +                     *      // show at the initialization
    +                     *      init: {
    +                     *          show: true,
    +                     *          x: 2,
    +                     *          position: {
    +                     *              top: "150px",
    +                     *              left: "250px"
    +                     *          }
    +                     *      },
    +                     *
    +                     *      // fires prior tooltip is shown
    +                     *      onshow: function() { ...},
    +                     *      // fires prior tooltip is hidden
    +                     *      onhide: function() { ... },
    +                     *      // fires after tooltip is shown
    +                     *      onshown: function() { ... },
    +                     *      // fires after tooltip is hidden
    +                     *      onhidden: function() { ... },
    +                     *
    +                     *      // Link any tooltips when multiple charts are on the screen where same x coordinates are available
    +                     *      // Useful for timeseries correlation
    +                     *      linked: true,
    +                     *
    +                     *      // Specify name to interact those with the same name only.
    +                     *      linked: {
    +                     *          name: "some-group"
    +                     *      }
    +                     *  }
    +                     */
    +																				tooltip_show: !0,
    +																				tooltip_grouped: !0,
    +																				tooltip_format_title: undefined,
    +																				tooltip_format_name: undefined,
    +																				tooltip_format_value: undefined,
    +																				tooltip_position: undefined,
    +																				tooltip_contents: function tooltip_contents(d, defaultTitleFormat, defaultValueFormat, color) {
    +																														return this.getTooltipContent ? this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : "";
    +																				},
    +																				tooltip_init_show: !1,
    +																				tooltip_init_x: 0,
    +																				tooltip_init_position: {
    +																														top: "0px",
    +																														left: "50px"
    +																				},
    +																				tooltip_linked: !1,
    +																				tooltip_linked_name: "",
    +																				tooltip_onshow: function tooltip_onshow() {},
    +																				tooltip_onhide: function tooltip_onhide() {},
    +																				tooltip_onshown: function tooltip_onshown() {},
    +																				tooltip_onhidden: function tooltip_onhidden() {},
    +																				tooltip_order: null,
    +
    +																				/**
    +                     * Set title options
    +                     * @name title
    +                     * @memberOf Options
    +                     * @type {Object}
    +                     * @property {String} [title.text]
    +                     * @property {Number} [title.padding.top=0]
    +                     * @property {Number} [title.padding.right=0]
    +                     * @property {Number} [title.padding.bottom=0]
    +                     * @property {Number} [title.padding.left=0]
    +                     * @property {String} [title.position=top-center]
    +                     * @example
    +                     *  title: {
    +                     *      text: "Title Text",
    +                     *      padding: {
    +                     *          top: 10,
    +                     *          right: 10,
    +                     *          bottom: 10,
    +                     *          left: 10
    +                     *      },
    +                     *      position: "top-center"
    +                     *  }
    +                     */
    +																				title_text: undefined,
    +																				title_padding: {
    +																														top: 0,
    +																														right: 0,
    +																														bottom: 0,
    +																														left: 0
    +																				},
    +																				title_position: "top-center"
    +										};
    +};
    +
    +exports.default = Options;
    +module.exports = exports["default"];
    +
    +/***/ }),
    +/* 19 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Scale = __webpack_require__(10),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getScale: function getScale(min, max, forTimeseries) {
    +		return (forTimeseries ? (0, _d3Scale.scaleTime)() : (0, _d3Scale.scaleLinear)()).range([min, max]);
    +	},
    +
    +
    +	/**
    +  * Get x Axis scale function
    +  * @param {Number} min
    +  * @param {Number} max
    +  * @param {Number} domain
    +  * @param {Function} offset The offset getter to be sum
    +  * @return {Function} scale
    +  * @private
    +  */
    +	getX: function getX(min, max, domain, offset) {
    +		var $$ = this,
    +		    scale = $$.zoomScale || $$.getScale(min, max, $$.isTimeSeries());
    +
    +
    +		return $$.getCustomizedScale(domain ? scale.domain(domain) : scale, offset);
    +	},
    +	getY: function getY(min, max, domain) {
    +		var scale = this.getScale(min, max, this.isTimeSeriesY());
    +
    +		return domain && scale.domain(domain), scale;
    +	},
    +
    +
    +	/**
    +  * Get customized scale
    +  * @param {d3.scaleLinear|d3.scaleTime} scaleValue
    +  * @param {Function} offsetValue Offset getter to be sum
    +  * @return {} scale
    +  * @private
    +  */
    +	getCustomizedScale: function getCustomizedScale(scaleValue, offsetValue) {
    +		var $$ = this,
    +		    offset = offsetValue || function () {
    +			return $$.xAxis.tickOffset();
    +		},
    +		    scale = function (d, raw) {
    +			var v = scaleValue(d) + offset();
    +
    +			return raw ? v : Math.ceil(v);
    +		};
    +
    +		// copy original scale methods
    +		for (var key in scaleValue) scale[key] = scaleValue[key];
    +
    +		return scale.orgDomain = function () {
    +			return scaleValue.domain();
    +		}, scale.orgScale = function () {
    +			return scaleValue;
    +		}, $$.isCategorized() && (scale.domain = function (domainValue) {
    +			var domain = domainValue;
    +
    +			return arguments.length ? (scaleValue.domain(domain), scale) : (domain = this.orgDomain(), [domain[0], domain[1] + 1]);
    +		}), scale;
    +	},
    +	getYScale: function getYScale(id) {
    +		return this.axis.getId(id) === "y2" ? this.y2 : this.y;
    +	},
    +	getSubYScale: function getSubYScale(id) {
    +		return this.axis.getId(id) === "y2" ? this.subY2 : this.subY;
    +	},
    +
    +
    +	/**
    +  * Update scale
    +  * @private
    +  * @param {Boolean} withoutTransitionAtInit - param is given at the init rendering
    +  */
    +	updateScales: function updateScales(withoutTransitionAtInit) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    isInit = !$$.x;
    +
    +
    +		// update edges
    +		$$.xMin = isRotated ? 1 : 0, $$.xMax = isRotated ? $$.height : $$.width, $$.yMin = isRotated ? 0 : $$.height, $$.yMax = isRotated ? $$.width : 1, $$.subXMin = $$.xMin, $$.subXMax = $$.xMax, $$.subYMin = isRotated ? 0 : $$.height2, $$.subYMax = isRotated ? $$.width2 : 1, $$.x = $$.getX($$.xMin, $$.xMax, isInit ? undefined : $$.x.orgDomain(), function () {
    +			return $$.xAxis.tickOffset();
    +		}), $$.y = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y_default : $$.y.domain()), $$.y2 = $$.getY($$.yMin, $$.yMax, isInit ? config.axis_y2_default : $$.y2.domain()), $$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, function (d) {
    +			return d % 1 ? 0 : $$.subXAxis.tickOffset();
    +		}), $$.subY = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y_default : $$.subY.domain()), $$.subY2 = $$.getY($$.subYMin, $$.subYMax, isInit ? config.axis_y2_default : $$.subY2.domain()), $$.xAxisTickFormat = $$.axis.getXAxisTickFormat(), $$.xAxisTickValues = $$.axis.getXAxisTickValues(), $$.yAxisTickValues = $$.axis.getYAxisTickValues(), $$.y2AxisTickValues = $$.axis.getY2AxisTickValues(), $$.xAxis = $$.axis.getXAxis("x", $$.x, $$.xOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer, withoutTransitionAtInit), $$.subXAxis = $$.axis.getXAxis("subx", $$.subX, $$.subXOrient, $$.xAxisTickFormat, $$.xAxisTickValues, config.axis_x_tick_outer), $$.yAxis = $$.axis.getYAxis("y", $$.y, $$.yOrient, config.axis_y_tick_format, $$.yAxisTickValues, config.axis_y_tick_outer), $$.y2Axis = $$.axis.getYAxis("y2", $$.y2, $$.y2Orient, config.axis_y2_tick_format, $$.y2AxisTickValues, config.axis_y2_tick_outer), $$.updateArc && $$.updateArc();
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 20 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Array = __webpack_require__(6),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +// selection
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getYDomainMinMax: function getYDomainMinMax(targets, type) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isMin = type === "min",
    +		    dataGroups = config.data_groups,
    +		    ids = $$.mapToIds(targets),
    +		    ys = $$.getValuesAsIdKeyed(targets),
    +		    f = isMin ? _d3Array.min : _d3Array.max;
    +
    +
    +		return dataGroups.length > 0 && function () {
    +
    +			for (var hasValue = $$["has" + (isMin ? "Negative" : "Positive") + "ValueInTargets"](targets), baseId = void 0, idsInGroup = void 0, j = 0; idsInGroup = dataGroups[j]; j++) if (idsInGroup = idsInGroup.filter(function (v) {
    +				return ids.indexOf(v) >= 0;
    +			}), idsInGroup.length !== 0) {
    +
    +					// Consider values
    +					if (baseId = idsInGroup[0], hasValue && ys[baseId]) {
    +						var setter = isMin ? function (v, i) {
    +							ys[baseId][i] = v < 0 ? v : 0;
    +						} : function (v, i) {
    +							ys[baseId][i] = v > 0 ? v : 0;
    +						};
    +
    +						ys[baseId].forEach(setter);
    +					}
    +
    +					// Compute min
    +					for (var id, _ret2, _loop = function (k, id) {
    +						return ys[id] ? void ys[id].forEach(function (v, i) {
    +							var val = +v,
    +							    meetCondition = isMin ? val > 0 : val < 0;
    +							$$.axis.getId(id) === $$.axis.getId(baseId) && ys[baseId] && !(hasValue && meetCondition) && (ys[baseId][i] += val);
    +						}) : "continue";
    +					}, k = 1; id = idsInGroup[k]; k++) _ret2 = _loop(k, id), _ret2 === "continue";
    +				}
    +		}(), f(Object.keys(ys).map(function (key) {
    +			return f(ys[key]);
    +		}));
    +	},
    +	getYDomainMin: function getYDomainMin(targets) {
    +		return this.getYDomainMinMax(targets, "min");
    +	},
    +	getYDomainMax: function getYDomainMax(targets) {
    +		return this.getYDomainMinMax(targets, "max");
    +	},
    +	getYDomain: function getYDomain(targets, axisId, xDomain) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    targetsByAxisId = targets.filter(function (t) {
    +			return $$.axis.getId(t.id) === axisId;
    +		}),
    +		    yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId,
    +		    yMin = axisId === "y2" ? config.axis_y2_min : config.axis_y_min,
    +		    yMax = axisId === "y2" ? config.axis_y2_max : config.axis_y_max,
    +		    yDomainMin = $$.getYDomainMin(yTargets),
    +		    yDomainMax = $$.getYDomainMax(yTargets),
    +		    center = axisId === "y2" ? config.axis_y2_center : config.axis_y_center,
    +		    isZeroBased = $$.hasType("bar", yTargets) && config.bar_zerobased || $$.hasType("area", yTargets) && config.area_zerobased,
    +		    isInverted = axisId === "y2" ? config.axis_y2_inverted : config.axis_y_inverted,
    +		    showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated,
    +		    showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated,
    +		    lengths = void 0;
    +
    +		// MEMO: avoid inverting domain unexpectedly
    +
    +		if (yDomainMin = (0, _util.isValue)(yMin) ? yMin : (0, _util.isValue)(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin, yDomainMax = (0, _util.isValue)(yMax) ? yMax : (0, _util.isValue)(yMin) ? yMin < yDomainMax ? yDomainMax : yMin + 10 : yDomainMax, yTargets.length === 0) // use current domain if target of axisId is none
    +			return axisId === "y2" ? $$.y2.domain() : $$.y.domain();
    +
    +		isNaN(yDomainMin) && (yDomainMin = 0), isNaN(yDomainMax) && (yDomainMax = yDomainMin), yDomainMin === yDomainMax && (yDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0);
    +		var isAllPositive = yDomainMin >= 0 && yDomainMax >= 0,
    +		    isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;
    +		((0, _util.isValue)(yMin) && isAllPositive || (0, _util.isValue)(yMax) && isAllNegative) && (isZeroBased = !1), isZeroBased && (isAllPositive && (yDomainMin = 0), isAllNegative && (yDomainMax = 0));
    +		var domainLength = Math.abs(yDomainMax - yDomainMin),
    +		    paddingTop = domainLength * .1,
    +		    paddingBottom = domainLength * .1;
    +
    +
    +		if ((0, _util.isDefined)(center)) {
    +			var yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));
    +
    +			yDomainMax = center + yDomainAbs, yDomainMin = center - yDomainAbs;
    +		}
    +
    +		// add padding for data label
    +		if (showHorizontalDataLabel) {
    +			lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "width");
    +			var diff = (0, _util.diffDomain)($$.y.range()),
    +			    ratio = [lengths[0] / diff, lengths[1] / diff];
    +			paddingTop += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1])), paddingBottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));
    +		} else showVerticalDataLabel && (lengths = $$.getDataLabelLength(yDomainMin, yDomainMax, "height"), paddingTop += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength), paddingBottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength));
    +
    +		axisId === "y" && (0, _util.notEmpty)(config.axis_y_padding) && (paddingTop = $$.axis.getPadding(config.axis_y_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y_padding, "bottom", paddingBottom, domainLength)), axisId === "y2" && (0, _util.notEmpty)(config.axis_y2_padding) && (paddingTop = $$.axis.getPadding(config.axis_y2_padding, "top", paddingTop, domainLength), paddingBottom = $$.axis.getPadding(config.axis_y2_padding, "bottom", paddingBottom, domainLength)), isZeroBased && (isAllPositive && (paddingBottom = yDomainMin), isAllNegative && (paddingTop = -yDomainMax));
    +
    +
    +		var domain = [yDomainMin - paddingBottom, yDomainMax + paddingTop];
    +
    +		return isInverted ? domain.reverse() : domain;
    +	},
    +	getXDomainMinMax: function getXDomainMinMax(targets, type) {
    +		var $$ = this,
    +		    value = $$.config["axis_x_" + type],
    +		    f = type === "min" ? _d3Array.min : _d3Array.max;
    +
    +
    +		return (0, _util.isDefined)(value) ? $$.isTimeSeries() ? $$.parseDate(value) : value : f(targets, function (t) {
    +			return f(t.values, function (v) {
    +				return v.x;
    +			});
    +		});
    +	},
    +	getXDomainMin: function getXDomainMin(targets) {
    +		return this.getXDomainMinMax(targets, "min");
    +	},
    +	getXDomainMax: function getXDomainMax(targets) {
    +		return this.getXDomainMinMax(targets, "max");
    +	},
    +	getXDomainPadding: function getXDomainPadding(domain) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    diff = domain[1] - domain[0],
    +		    xPadding = config.axis_x_padding,
    +		    maxDataCount = void 0,
    +		    padding = void 0;
    +		$$.isCategorized() ? padding = 0 : $$.hasType("bar") ? (maxDataCount = $$.getMaxDataCount(), padding = maxDataCount > 1 ? diff / (maxDataCount - 1) / 2 : .5) : padding = diff * .01;
    +		var left = padding,
    +		    right = padding;
    +
    +
    +		return (0, _util.isObject)(xPadding) && (0, _util.notEmpty)(xPadding) ? (left = (0, _util.isValue)(xPadding.left) ? xPadding.left : padding, right = (0, _util.isValue)(xPadding.right) ? xPadding.right : padding) : (0, _util.isNumber)(config.axis_x_padding) && (left = xPadding, right = xPadding), { left: left, right: right };
    +	},
    +	getXDomain: function getXDomain(targets) {
    +		var $$ = this,
    +		    xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)],
    +		    firstX = xDomain[0],
    +		    lastX = xDomain[1],
    +		    padding = $$.getXDomainPadding(xDomain),
    +		    min = 0,
    +		    max = 0;
    +		// show center of x domain if min and max are the same
    +
    +		return firstX - lastX !== 0 || $$.isCategorized() || ($$.isTimeSeries() ? (firstX = new Date(firstX.getTime() * .5), lastX = new Date(lastX.getTime() * 1.5)) : (firstX = firstX === 0 ? 1 : firstX * .5, lastX = lastX === 0 ? -1 : lastX * 1.5)), (firstX || firstX === 0) && (min = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left), (lastX || lastX === 0) && (max = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right), [min, max];
    +	},
    +	updateXDomain: function updateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    zoomEnabled = config.zoom_enabled;
    +
    +
    +		if (withUpdateOrgXDomain && ($$.x.domain(domain || (0, _d3Array.extent)($$.getXDomain(targets))), $$.orgXDomain = $$.x.domain(), zoomEnabled && $$.zoom.updateScaleExtent(), $$.subX.domain($$.x.domain()), $$.brush && $$.brush.scale($$.subX)), withUpdateXDomain) {
    +			var domainValue = domain || !$$.brush || (0, _util.brushEmpty)($$) ? $$.orgXDomain : (0, _util.getBrushSelection)($$).map($$.subX.invert);
    +
    +			$$.x.domain(domainValue), zoomEnabled && $$.zoom.updateScaleExtent();
    +		}
    +
    +		// Trim domain when too big by zoom mousemove event
    +
    +
    +		return withTrim && $$.x.domain($$.trimXDomain($$.x.orgDomain())), $$.x.domain();
    +	},
    +	trimXDomain: function trimXDomain(domain) {
    +		var zoomDomain = this.getZoomDomain(),
    +		    min = zoomDomain[0],
    +		    max = zoomDomain[1];
    +
    +
    +		return domain[0] <= min && (domain[1] = +domain[1] + (min - domain[0]), domain[0] = min), max <= domain[1] && (domain[0] = +domain[0] - (domain[1] - max), domain[1] = max), domain;
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 21 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Array = __webpack_require__(6),
    +    _d3Collection = __webpack_require__(22),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	isX: function isX(key) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    dataKey = config.data_x && key === config.data_x,
    +		    existValue = (0, _util.notEmpty)(config.data_xs) && (0, _util.hasValue)(config.data_xs, key);
    +
    +
    +		return dataKey || existValue;
    +	},
    +	isNotX: function isNotX(key) {
    +		return !this.isX(key);
    +	},
    +	getXKey: function getXKey(id) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		return config.data_x ? config.data_x : (0, _util.notEmpty)(config.data_xs) ? config.data_xs[id] : null;
    +	},
    +	getXValuesOfXKey: function getXValuesOfXKey(key, targets) {
    +		var $$ = this,
    +		    ids = targets && (0, _util.notEmpty)(targets) ? $$.mapToIds(targets) : [],
    +		    xValues = void 0;
    +
    +
    +		return ids.forEach(function (id) {
    +			$$.getXKey(id) === key && (xValues = $$.data.xs[id]);
    +		}), xValues;
    +	},
    +	getIndexByX: function getIndexByX(x) {
    +		var $$ = this,
    +		    data = $$.filterByX($$.data.targets, x);
    +
    +
    +		return data.length ? data[0].index : null;
    +	},
    +	getXValue: function getXValue(id, i) {
    +		var $$ = this;
    +
    +		return id in $$.data.xs && $$.data.xs[id] && (0, _util.isValue)($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;
    +	},
    +	getOtherTargetXs: function getOtherTargetXs() {
    +		var $$ = this,
    +		    idsForX = Object.keys($$.data.xs);
    +
    +
    +		return idsForX.length ? $$.data.xs[idsForX[0]] : null;
    +	},
    +	getOtherTargetX: function getOtherTargetX(index) {
    +		var xs = this.getOtherTargetXs();
    +
    +		return xs && index < xs.length ? xs[index] : null;
    +	},
    +	addXs: function addXs(xs) {
    +		var $$ = this;
    +
    +		Object.keys(xs).forEach(function (id) {
    +			$$.config.data_xs[id] = xs[id];
    +		});
    +	},
    +	hasMultipleX: function hasMultipleX(xs) {
    +		// https://github.com/d3/d3-collection
    +		return (0, _d3Collection.set)(Object.keys(xs).map(function (id) {
    +			return xs[id];
    +		})).size() > 1;
    +	},
    +	isMultipleX: function isMultipleX() {
    +		return (0, _util.notEmpty)(this.config.data_xs) || !this.config.data_xSort || this.hasType("bubble") || this.hasType("scatter");
    +	},
    +	addName: function addName(data) {
    +		var $$ = this,
    +		    name = void 0;
    +
    +
    +		return data && (name = $$.config.data_names[data.id], data.name = name === undefined ? data.id : name), data;
    +	},
    +	getAllValuesOnIndex: function getAllValuesOnIndex(index) {
    +		var $$ = this;
    +
    +		return $$.filterTargetsToShow($$.data.targets).map(function (t) {
    +			return $$.addName($$.getValueOnIndex(t.values, index));
    +		});
    +	},
    +	getValueOnIndex: function getValueOnIndex(values, index) {
    +		var valueOnIndex = values.filter(function (v) {
    +			return v.index === index;
    +		});
    +
    +		return valueOnIndex.length ? valueOnIndex[0] : null;
    +	},
    +	updateTargetX: function updateTargetX(targets, x) {
    +		var $$ = this;
    +
    +		targets.forEach(function (t) {
    +			t.values.forEach(function (v, i) {
    +				v.x = $$.generateTargetX(x[i], t.id, i);
    +			}), $$.data.xs[t.id] = x;
    +		});
    +	},
    +	updateTargetXs: function updateTargetXs(targets, xs) {
    +		var $$ = this;
    +
    +		targets.forEach(function (t) {
    +			xs[t.id] && $$.updateTargetX([t], xs[t.id]);
    +		});
    +	},
    +	generateTargetX: function generateTargetX(rawX, id, index) {
    +		var $$ = this,
    +		    x = index;
    +
    +
    +		return $$.isTimeSeries() ? x = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index)) : $$.isCustomX() && !$$.isCategorized() && (x = (0, _util.isValue)(rawX) ? +rawX : $$.getXValue(id, index)), x;
    +	},
    +	cloneTarget: function cloneTarget(target) {
    +		return {
    +			id: target.id,
    +			id_org: target.id_org,
    +			values: target.values.map(function (d) {
    +				return { x: d.x, value: d.value, id: d.id };
    +			})
    +		};
    +	},
    +	updateXs: function updateXs() {
    +		var $$ = this;
    +
    +		$$.data.targets.length && ($$.xs = [], $$.data.targets[0].values.forEach(function (v) {
    +			$$.xs[v.index] = v.x;
    +		}));
    +	},
    +	getPrevX: function getPrevX(i) {
    +		var x = this.xs[i - 1];
    +
    +		return (0, _util.isDefined)(x) ? x : null;
    +	},
    +	getNextX: function getNextX(i) {
    +		var x = this.xs[i + 1];
    +
    +		return (0, _util.isDefined)(x) ? x : null;
    +	},
    +
    +
    +	/**
    +  * Get base value isAreaRangeType
    +  * @param data Data object
    +  * @return {Number}
    +  * @private
    +  */
    +	getBaseValue: function getBaseValue(data) {
    +		var $$ = this,
    +		    value = data.value;
    +
    +		// In case of area-range, data is given as: [low, mid, high] or {low, mid, high}
    +		// will take the 'mid' as the base value
    +
    +		return value && $$.isAreaRangeType(data) && (value = $$.getAreaRangeData(data, "mid")), value;
    +	},
    +
    +
    +	/**
    +  * Get min/max value from the data
    +  * @private
    +  * @param {Array} data array data to be evaluated
    +  * @return {{min: {Number}, max: {Number}}}
    +  */
    +	getMinMaxValue: function getMinMaxValue(data) {
    +		var getBaseValue = this.getBaseValue.bind(this),
    +		    min = void 0,
    +		    max = void 0;
    +
    +
    +		return (data || this.data.targets.map(function (t) {
    +			return t.values;
    +		})).forEach(function (v) {
    +			min = (0, _d3Array.min)([min, (0, _d3Array.min)(v, getBaseValue)]), max = (0, _d3Array.max)([max, (0, _d3Array.max)(v, getBaseValue)]);
    +		}), { min: min, max: max };
    +	},
    +
    +
    +	/**
    +  * Get the min/max data
    +  * @private
    +  * @return {{min: Array, max: Array}}
    +  */
    +	getMinMaxData: function getMinMaxData() {
    +		var $$ = this,
    +		    minMaxData = $$.getCache("$minMaxData");
    +
    +
    +		if (!minMaxData) {
    +			var data = $$.data.targets.map(function (t) {
    +				return t.values;
    +			}),
    +			    minMax = $$.getMinMaxValue(data),
    +			    min = [],
    +			    max = [];
    +			data.forEach(function (v) {
    +				var minData = $$.getFilteredDataByValue(v, minMax.min),
    +				    maxData = $$.getFilteredDataByValue(v, minMax.max);
    +				minData.length && (min = min.concat(minData)), maxData.length && (max = max.concat(maxData));
    +			}), $$.addCache("$minMaxData", minMaxData = { min: min, max: max });
    +		}
    +
    +		return minMaxData;
    +	},
    +
    +
    +	/**
    +  * Get total data sum
    +  * @private
    +  * @return {Number}
    +  */
    +	getTotalDataSum: function getTotalDataSum() {
    +		var $$ = this,
    +		    totalDataSum = $$.getCache("$totalDataSum");
    +
    +
    +		if (!totalDataSum) {
    +			var total = 0;
    +
    +			$$.data.targets.map(function (t) {
    +				return t.values;
    +			}).forEach(function (v) {
    +				total += (0, _d3Array.sum)(v, function (t) {
    +					return t.value;
    +				});
    +			}), $$.addCache("$totalDataSum", totalDataSum = total);
    +		}
    +
    +		return totalDataSum;
    +	},
    +
    +
    +	/**
    +  * Get filtered data by value
    +  * @param {Object} data
    +  * @param {Number} value
    +  * @return {Array} filtered array data
    +  * @private
    +  */
    +	getFilteredDataByValue: function getFilteredDataByValue(data, value) {
    +		var _this = this;
    +
    +		return data.filter(function (t) {
    +			return _this.getBaseValue(t) === value;
    +		});
    +	},
    +
    +
    +	/**
    +  * Return the max length of the data
    +  * @return {Number} max data length
    +  * @private
    +  */
    +	getMaxDataCount: function getMaxDataCount() {
    +		return (0, _d3Array.max)(this.data.targets, function (t) {
    +			return t.values.length;
    +		});
    +	},
    +	getMaxDataCountTarget: function getMaxDataCountTarget(targets) {
    +		var length = targets.length,
    +		    max = 0,
    +		    maxTarget = void 0;
    +
    +
    +		return length > 1 ? targets.forEach(function (t) {
    +			t.values.length > max && (maxTarget = t, max = t.values.length);
    +		}) : maxTarget = length ? targets[0] : null, maxTarget;
    +	},
    +	mapToIds: function mapToIds(targets) {
    +		return targets.map(function (d) {
    +			return d.id;
    +		});
    +	},
    +	mapToTargetIds: function mapToTargetIds(ids) {
    +		var $$ = this;
    +
    +		return ids ? (0, _util.isArray)(ids) ? ids.concat() : [ids] : $$.mapToIds($$.data.targets);
    +	},
    +	hasTarget: function hasTarget(targets, id) {
    +		var ids = this.mapToIds(targets);
    +
    +		for (var val, i = 0; val = ids[i]; i++) if (val === id) return !0;
    +
    +		return !1;
    +	},
    +	isTargetToShow: function isTargetToShow(targetId) {
    +		return this.hiddenTargetIds.indexOf(targetId) < 0;
    +	},
    +	isLegendToShow: function isLegendToShow(targetId) {
    +		return this.hiddenLegendIds.indexOf(targetId) < 0;
    +	},
    +	filterTargetsToShow: function filterTargetsToShow(targets) {
    +		var $$ = this;
    +
    +		return targets.filter(function (t) {
    +			return $$.isTargetToShow(t.id);
    +		});
    +	},
    +	mapTargetsToUniqueXs: function mapTargetsToUniqueXs(targets) {
    +		var $$ = this,
    +		    xs = (0, _d3Collection.set)((0, _d3Array.merge)(targets.map(function (t) {
    +			return t.values.map(function (v) {
    +				return +v.x;
    +			});
    +		}))).values();
    +
    +
    +		return xs = $$.isTimeSeries() ? xs.map(function (x) {
    +			return new Date(+x);
    +		}) : xs.map(function (x) {
    +			return +x;
    +		}), xs.sort(function (a, b) {
    +			return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
    +		});
    +	},
    +	addHiddenTargetIds: function addHiddenTargetIds(targetIds) {
    +		this.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds);
    +	},
    +	removeHiddenTargetIds: function removeHiddenTargetIds(targetIds) {
    +		this.hiddenTargetIds = this.hiddenTargetIds.filter(function (id) {
    +			return targetIds.indexOf(id) < 0;
    +		});
    +	},
    +	addHiddenLegendIds: function addHiddenLegendIds(targetIds) {
    +		this.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds);
    +	},
    +	removeHiddenLegendIds: function removeHiddenLegendIds(targetIds) {
    +		this.hiddenLegendIds = this.hiddenLegendIds.filter(function (id) {
    +			return targetIds.indexOf(id) < 0;
    +		});
    +	},
    +	getValuesAsIdKeyed: function getValuesAsIdKeyed(targets) {
    +		var ys = {};
    +
    +		return targets.forEach(function (t) {
    +			var data = [];
    +
    +			t.values.forEach(function (v) {
    +				var value = v.value;
    +
    +				(0, _util.isArray)(value) ? data.push.apply(data, value) : (0, _util.isObject)(value) && "high" in value ? data.push.apply(data, Object.values(value)) : data.push(value);
    +			}), ys[t.id] = data;
    +		}), ys;
    +	},
    +	checkValueInTargets: function checkValueInTargets(targets, checker) {
    +		var ids = Object.keys(targets),
    +		    values = void 0;
    +
    +
    +		for (var i = 0; i < ids.length; i++) {
    +			values = targets[ids[i]].values;
    +
    +
    +			for (var j = 0; j < values.length; j++) if (checker(values[j].value)) return !0;
    +		}
    +
    +		return !1;
    +	},
    +	hasNegativeValueInTargets: function hasNegativeValueInTargets(targets) {
    +		return this.checkValueInTargets(targets, function (v) {
    +			return v < 0;
    +		});
    +	},
    +	hasPositiveValueInTargets: function hasPositiveValueInTargets(targets) {
    +		return this.checkValueInTargets(targets, function (v) {
    +			return v > 0;
    +		});
    +	},
    +	_checkOrder: function _checkOrder(type) {
    +		var config = this.config;
    +
    +		return (0, _util.isString)(config.data_order) && config.data_order.toLowerCase() === type;
    +	},
    +	isOrderDesc: function isOrderDesc() {
    +		return this._checkOrder("desc");
    +	},
    +	isOrderAsc: function isOrderAsc() {
    +		return this._checkOrder("asc");
    +	},
    +
    +
    +	/**
    +  * Sort targets data
    +  * @param {Array} targetsValue
    +  * @return {Array}
    +  * @private
    +  */
    +	orderTargets: function orderTargets(targetsValue) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    targets = [].concat(targetsValue),
    +		    orderAsc = $$.isOrderAsc(),
    +		    orderDesc = $$.isOrderDesc();
    +		// TODO: accept name array for order
    +
    +		return orderAsc || orderDesc ? targets.sort(function (t1, t2) {
    +			var reducer = function (p, c) {
    +				return p + Math.abs(c.value);
    +			},
    +			    t1Sum = t1.values.reduce(reducer, 0),
    +			    t2Sum = t2.values.reduce(reducer, 0);
    +
    +			return orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;
    +		}) : (0, _util.isFunction)(config.data_order) && targets.sort(config.data_order), targets;
    +	},
    +	filterByX: function filterByX(targets, x) {
    +		return (0, _d3Array.merge)(targets.map(function (t) {
    +			return t.values;
    +		})).filter(function (v) {
    +			return v.x - x === 0;
    +		});
    +	},
    +	filterRemoveNull: function filterRemoveNull(data) {
    +		var _this2 = this;
    +
    +		return data.filter(function (d) {
    +			return (0, _util.isValue)(_this2.getBaseValue(d));
    +		});
    +	},
    +	filterByXDomain: function filterByXDomain(targets, xDomain) {
    +		return targets.map(function (t) {
    +			return {
    +				id: t.id,
    +				id_org: t.id_org,
    +				values: t.values.filter(function (v) {
    +					return xDomain[0] <= v.x && v.x <= xDomain[1];
    +				})
    +			};
    +		});
    +	},
    +	hasDataLabel: function hasDataLabel() {
    +		var dataLabels = this.config.data_labels;
    +
    +		return (0, _util.isBoolean)(dataLabels) && dataLabels || (0, _util.isObjectType)(dataLabels) && (0, _util.notEmpty)(dataLabels);
    +	},
    +	getDataLabelLength: function getDataLabelLength(min, max, key) {
    +		var $$ = this,
    +		    lengths = [0, 0];
    +
    +
    +		return $$.selectChart.select("svg").selectAll(".dummy").data([min, max]).enter().append("text").text(function (d) {
    +			return $$.dataLabelFormat(d.id)(d);
    +		}).each(function (d, i) {
    +			lengths[i] = this.getBoundingClientRect()[key] * 1.3;
    +		}).remove(), lengths;
    +	},
    +	isNoneArc: function isNoneArc(d) {
    +		return this.hasTarget(this.data.targets, d.id);
    +	},
    +	isArc: function isArc(d) {
    +		return "data" in d && this.hasTarget(this.data.targets, d.data.id);
    +	},
    +	findSameXOfValues: function findSameXOfValues(values, index) {
    +		var targetX = values[index].x,
    +		    sames = [],
    +		    i = void 0;
    +
    +
    +		for (i = index - 1; i >= 0 && !(targetX !== values[i].x); i--) sames.push(values[i]);
    +
    +		for (i = index; i < values.length && !(targetX !== values[i].x); i++) sames.push(values[i]);
    +
    +		return sames;
    +	},
    +	findClosestFromTargets: function findClosestFromTargets(targets, pos) {
    +		var $$ = this,
    +		    candidates = targets.map(function (target) {
    +			return $$.findClosest(target.values, pos);
    +		});
    +		// map to array of closest points of each target
    +
    +		// decide closest point and return
    +		return $$.findClosest(candidates, pos);
    +	},
    +	findClosest: function findClosest(values, pos) {
    +		var $$ = this,
    +		    minDist = $$.config.point_sensitivity,
    +		    closest = void 0;
    +
    +		// find mouseovering bar
    +
    +		return values.filter(function (v) {
    +			return v && $$.isBarType(v.id);
    +		}).forEach(function (v) {
    +			var shape = $$.main.select("." + _classes2.default.bars + $$.getTargetSelectorSuffix(v.id) + " ." + _classes2.default.bar + "-" + v.index).node();
    +
    +			!closest && $$.isWithinBar(shape) && (closest = v);
    +		}), values.filter(function (v) {
    +			return v && !$$.isBarType(v.id);
    +		}).forEach(function (v) {
    +			var d = $$.dist(v, pos);
    +
    +			d < minDist && (minDist = d, closest = v);
    +		}), closest;
    +	},
    +	dist: function dist(data, pos) {
    +		var $$ = this,
    +		    isRotated = $$.config.axis_rotated,
    +		    xIndex = isRotated ? 1 : 0,
    +		    yIndex = isRotated ? 0 : 1,
    +		    y = $$.circleY(data, data.index),
    +		    x = $$.x(data.x);
    +
    +
    +		return Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));
    +	},
    +
    +
    +	/**
    +  * Convert data for step type
    +  * @param {Array} values Object data values
    +  * @return {Array}
    +  * @private
    +  */
    +	convertValuesToStep: function convertValuesToStep(values) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    stepType = config.line_step_type,
    +		    isCategorized = $$.isCategorized(),
    +		    converted = (0, _util.isArray)(values) ? values.concat() : [values];
    +
    +
    +		if (!isRotated && !isCategorized) return values;
    +
    +		// insert & append cloning first/last value to be fully rendered covering on each gap sides
    +		var id = converted[0].id,
    +		    x = converted[0].x - 1,
    +		    value = converted[0].value;
    +
    +		// insert
    +
    +		return isCategorized && converted.unshift({ x: x, value: value, id: id }), stepType === "step-after" && converted.unshift({ x: x - 1, value: value, id: id }), x = converted.length, value = converted[x - 1].value, isCategorized && converted.push({ x: x, value: value, id: id }), stepType === "step-before" && converted.push({ x: x + 1, value: value, id: id }), converted;
    +	},
    +	convertValuesToRange: function convertValuesToRange(values) {
    +		var converted = (0, _util.isArray)(values) ? values.concat() : [values],
    +		    ranges = [];
    +
    +
    +		return converted.forEach(function (range) {
    +			var x = range.x,
    +			    id = range.id;
    +			ranges.push({
    +				x: x,
    +				id: id,
    +				value: range.value[0]
    +			}), ranges.push({
    +				x: x,
    +				id: id,
    +				value: range.value[2]
    +			});
    +		}), ranges;
    +	},
    +	updateDataAttributes: function updateDataAttributes(name, attrs) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    current = config["data_" + name];
    +		return (0, _util.isUndefined)(attrs) ? current : (Object.keys(attrs).forEach(function (id) {
    +			current[id] = attrs[id];
    +		}), $$.redraw({ withLegend: !0 }), current);
    +	},
    +	getAreaRangeData: function getAreaRangeData(d, type) {
    +		var value = d.value;
    +
    +		if ((0, _util.isArray)(value)) {
    +			var index = ["high", "mid", "low"].indexOf(type);
    +
    +			return index === -1 ? null : value[index];
    +		}
    +
    +		return value[type];
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 22 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__22__;
    +
    +/***/ }),
    +/* 23 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Dsv = __webpack_require__(24),
    +    _d3Collection = __webpack_require__(22),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	convertUrlToData: function convertUrlToData(url) {
    +		var _this = this,
    +		    mimeType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "csv",
    +		    headers = arguments[2],
    +		    keys = arguments[3],
    +		    done = arguments[4],
    +		    req = new XMLHttpRequest();
    +
    +		if (headers) for (var _iterator = Object.keys(headers), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
    +				var _ref;
    +
    +				if (_isArray) {
    +					if (_i >= _iterator.length) break;
    +					_ref = _iterator[_i++];
    +				} else {
    +					if (_i = _iterator.next(), _i.done) break;
    +					_ref = _i.value;
    +				}
    +
    +				var header = _ref;
    +				req.setRequestHeader(header, headers[header]);
    +			}
    +
    +		req.open("GET", url), req.onreadystatechange = function () {
    +			if (req.readyState === 4) if (req.status === 200) {
    +					var response = req.responseText;
    +
    +					response && done.call(_this, _this["convert" + (0, _util.capitalize)(mimeType) + "ToData"](mimeType === "json" ? JSON.parse(response) : response, keys));
    +				} else throw new Error(url + ": Something went wrong loading!");
    +		}, req.send();
    +	},
    +	_convertCsvTsvToData: function _convertCsvTsvToData(parser, xsv) {
    +		var rows = parser.rows(xsv),
    +		    d = void 0;
    +
    +
    +		return rows.length === 1 ? (d = [{}], rows[0].forEach(function (id) {
    +			d[0][id] = null;
    +		})) : d = parser.parse(xsv), d;
    +	},
    +	convertCsvToData: function convertCsvToData(xsv) {
    +		return this._convertCsvTsvToData({
    +			rows: _d3Dsv.csvParseRows,
    +			parse: _d3Dsv.csvParse
    +		}, xsv);
    +	},
    +	convertTsvToData: function convertTsvToData(tsv) {
    +		return this._convertCsvTsvToData({
    +			rows: _d3Dsv.tsvParseRows,
    +			parse: _d3Dsv.tsvParse
    +		}, tsv);
    +	},
    +	convertJsonToData: function convertJsonToData(json, keysParam) {
    +		var _this2 = this,
    +		    config = this.config,
    +		    newRows = [],
    +		    targetKeys = void 0,
    +		    data = void 0;
    +
    +		if ((0, _util.isArray)(json)) {
    +			var keys = keysParam || config.data_keys;
    +
    +			keys.x ? (targetKeys = keys.value.concat(keys.x), config.data_x = keys.x) : targetKeys = keys.value, newRows.push(targetKeys), json.forEach(function (o) {
    +				var newRow = [];
    +
    +				for (var _iterator2 = targetKeys, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
    +					var _ref2;
    +
    +					if (_isArray2) {
    +						if (_i2 >= _iterator2.length) break;
    +						_ref2 = _iterator2[_i2++];
    +					} else {
    +						if (_i2 = _iterator2.next(), _i2.done) break;
    +						_ref2 = _i2.value;
    +					}
    +
    +					var key = _ref2;
    +
    +					// convert undefined to null because undefined data will be removed in convertDataToTargets()
    +					var v = _this2.findValueInJson(o, key);
    +
    +					(0, _util.isUndefined)(v) && (v = null), newRow.push(v);
    +				}
    +
    +				newRows.push(newRow);
    +			}), data = this.convertRowsToData(newRows);
    +		} else Object.keys(json).forEach(function (key) {
    +				var tmp = json[key].concat();
    +
    +				tmp.unshift(key), newRows.push(tmp);
    +			}), data = this.convertColumnsToData(newRows);
    +
    +		return data;
    +	},
    +	findValueInJson: function findValueInJson(object, path) {
    +		if (object[path] !== undefined) return object[path];
    +
    +		var convertedPath = path.replace(/\[(\w+)\]/g, ".$1"),
    +		    pathArray = convertedPath.replace(/^\./, "").split("."),
    +		    target = object; // convert indexes to properties (replace [] with .)
    +		// strip a leading dot
    +
    +		for (var _iterator3 = pathArray, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
    +			var _ref3;
    +
    +			if (_isArray3) {
    +				if (_i3 >= _iterator3.length) break;
    +				_ref3 = _iterator3[_i3++];
    +			} else {
    +				if (_i3 = _iterator3.next(), _i3.done) break;
    +				_ref3 = _i3.value;
    +			}
    +
    +			var k = _ref3;
    +
    +			if (k in target) target = target[k];else {
    +				target = undefined;
    +
    +				break;
    +			}
    +		}
    +
    +		return target;
    +	},
    +	convertRowsToData: function convertRowsToData(rows) {
    +		var keys = rows[0],
    +		    newRows = [];
    +
    +
    +		for (var i = 1, len1 = rows.length; i < len1; i++) {
    +			var newRow = {};
    +
    +			for (var j = 0, len2 = rows[i].length; j < len2; j++) {
    +				if ((0, _util.isUndefined)(rows[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
    +
    +				newRow[keys[j]] = rows[i][j];
    +			}
    +
    +			newRows.push(newRow);
    +		}
    +
    +		return newRows;
    +	},
    +	convertColumnsToData: function convertColumnsToData(columns) {
    +		var newRows = [];
    +
    +		for (var i = 0, len1 = columns.length; i < len1; i++) {
    +			var key = columns[i][0];
    +
    +			for (var j = 1, len2 = columns[i].length; j < len2; j++) {
    +
    +				if ((0, _util.isUndefined)(newRows[j - 1]) && (newRows[j - 1] = {}), (0, _util.isUndefined)(columns[i][j])) throw new Error("Source data is missing a component at (" + i + ", " + j + ")!");
    +
    +				newRows[j - 1][key] = columns[i][j];
    +			}
    +		}
    +
    +		return newRows;
    +	},
    +	convertDataToTargets: function convertDataToTargets(data, appendXs) {
    +		var _this3 = this,
    +		    $$ = this,
    +		    config = $$.config,
    +		    ids = (0, _d3Collection.keys)(data[0]).filter($$.isNotX, $$),
    +		    xs = (0, _d3Collection.keys)(data[0]).filter($$.isX, $$),
    +		    xsData = void 0;
    +
    +		ids.forEach(function (id) {
    +			var xKey = _this3.getXKey(id);
    +
    +			_this3.isCustomX() || _this3.isTimeSeries() ? xs.indexOf(xKey) >= 0 ? xsData = (appendXs && $$.data.xs[id] || []).concat(data.map(function (d) {
    +				return d[xKey];
    +			}).filter(_util.isValue).map(function (rawX, i) {
    +				return $$.generateTargetX(rawX, id, i);
    +			})) : config.data_x ? xsData = _this3.getOtherTargetXs() : (0, _util.notEmpty)(config.data_xs) && (xsData = $$.getXValuesOfXKey(xKey, $$.data.targets)) : xsData = data.map(function (d, i) {
    +				return i;
    +			}), xsData && (_this3.data.xs[id] = xsData);
    +		}), ids.forEach(function (id) {
    +			if (!xsData) throw new Error("x is not defined for id = \"" + id + "\".");
    +		});
    +
    +
    +		// convert to target
    +		var targets = ids.map(function (id, index) {
    +			var convertedId = config.data_idConverter(id),
    +			    xKey = $$.getXKey(id),
    +			    isCategorized = $$.isCustomX() && $$.isCategorized(),
    +			    hasCategory = isCategorized && data.map(function (v) {
    +				return v.x;
    +			}).every(function (v) {
    +				return config.axis_x_categories.indexOf(v) > -1;
    +			});
    +
    +
    +			return {
    +				id: convertedId,
    +				id_org: id,
    +				values: data.map(function (d, i) {
    +					var rawX = d[xKey],
    +					    value = d[id],
    +					    x = void 0;
    +
    +
    +					return value = value === null || isNaN(value) ? (0, _util.isArray)(value) || (0, _util.isObject)(value) && value.high ? value : null : +d[id], isCategorized && index === 0 && !(0, _util.isUndefined)(rawX) ? (!hasCategory && index === 0 && i === 0 && (config.axis_x_categories = []), x = config.axis_x_categories.indexOf(rawX), x === -1 && (x = config.axis_x_categories.length, config.axis_x_categories.push(rawX))) : x = $$.generateTargetX(rawX, id, i), ((0, _util.isUndefined)(d[id]) || $$.data.xs[id].length <= i) && (x = undefined), { x: x, value: value, id: convertedId };
    +				}).filter(function (v) {
    +					return (0, _util.isDefined)(v.x);
    +				})
    +			};
    +		});
    +
    +		// finish targets
    +
    +
    +		return targets.forEach(function (t) {
    +			config.data_xSort && (t.values = t.values.sort(function (v1, v2) {
    +				var x1 = v1.x || v1.x === 0 ? v1.x : Infinity,
    +				    x2 = v2.x || v2.x === 0 ? v2.x : Infinity;
    +
    +
    +				return x1 - x2;
    +			})), t.values.forEach(function (v, i) {
    +				var index = $$.data.targets ? $$.getIndexByX(v.x) : null;
    +
    +				v.index = index === null ? i : index;
    +			}), $$.data.xs[t.id].sort(function (v1, v2) {
    +				return v1 - v2;
    +			});
    +		}), $$.hasNegativeValue = $$.hasNegativeValueInTargets(targets), $$.hasPositiveValue = $$.hasPositiveValueInTargets(targets), config.data_type && $$.setTargetType($$.mapToIds(targets).filter(function (id) {
    +			return !(id in config.data_types);
    +		}), config.data_type), targets.forEach(function (d) {
    +			return $$.addCache(d.id_org, d, !0);
    +		}), targets;
    +	}
    +});
    +
    +/***/ }),
    +/* 24 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__24__;
    +
    +/***/ }),
    +/* 25 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	load: function load(rawTargets, args) {
    +		var $$ = this,
    +		    targets = rawTargets;
    +		targets && (args.filter && (targets = targets.filter(args.filter)), (args.type || args.types) && targets.forEach(function (t) {
    +			var type = args.types && args.types[t.id] || args.type;
    +
    +			$$.setTargetType(t.id, type);
    +		}), $$.data.targets.forEach(function (d) {
    +			for (var i = 0; i < targets.length; i++) if (d.id === targets[i].id) {
    +				d.values = targets[i].values, targets.splice(i, 1);
    +
    +				break;
    +			}
    +		}), $$.data.targets = $$.data.targets.concat(targets)), $$.updateTargets($$.data.targets), $$.redraw({
    +			withUpdateOrgXDomain: !0,
    +			withUpdateXDomain: !0,
    +			withLegend: !0
    +		}), args.done && args.done();
    +	},
    +	loadFromArgs: function loadFromArgs(args) {
    +		var $$ = this,
    +		    data = void 0;
    +
    +
    +		// reset internally cached data
    +		$$.resetCache(), args.data ? data = args.data : args.url ? $$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, function (d) {
    +			$$.load($$.convertDataToTargets(d), args);
    +		}) : args.json ? data = $$.convertJsonToData(args.json, args.keys) : args.rows ? data = $$.convertRowsToData(args.rows) : args.columns && (data = $$.convertColumnsToData(args.columns)), $$.load(data ? $$.convertDataToTargets(data) : null, args);
    +	},
    +	unload: function unload(rawTargetIds, customDoneCb) {
    +		var $$ = this,
    +		    done = customDoneCb,
    +		    targetIds = rawTargetIds;
    +
    +		// reset internally cached data
    +
    +		// If no target, call done and return
    +		return $$.resetCache(), done || (done = function () {}), targetIds = targetIds.filter(function (id) {
    +			return $$.hasTarget($$.data.targets, id);
    +		}), targetIds && targetIds.length !== 0 ? void ($$.svg.selectAll(targetIds.map(function (id) {
    +			return $$.selectorTarget(id);
    +		})).transition().style("opacity", "0").remove().call($$.endall, done), targetIds.forEach(function (id) {
    +			$$.withoutFadeIn[id] = !1, $$.legend && $$.legend.selectAll("." + _classes2.default.legendItem + $$.getTargetSelectorSuffix(id)).remove(), $$.data.targets = $$.data.targets.filter(function (t) {
    +				return t.id !== id;
    +			});
    +		})) : void done();
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 26 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Category Name
    +  * @private
    +  * @param {Number} index
    +  * @returns {String} gategory Name
    +  */
    +	categoryName: function categoryName(i) {
    +		var config = this.config;
    +
    +		return i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;
    +	}
    +});
    +
    +/***/ }),
    +/* 27 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Drag = __webpack_require__(28),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initialize the area that detects the event.
    +  * Add a container for the zone that detects the event.
    +  * @private
    +  */
    +	initEventRect: function initEventRect() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.eventRects).style("fill-opacity", "0");
    +	},
    +
    +
    +	/**
    +  * Redraws the area that detects the event.
    +  * @private
    +  */
    +	redrawEventRect: function redrawEventRect() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    zoomEnabled = config.zoom_enabled,
    +		    isMultipleX = $$.isMultipleX(),
    +		    eventRectUpdate = void 0,
    +		    eventRects = $$.main.select("." + _classes2.default.eventRects).style("cursor", zoomEnabled && (zoomEnabled === !0 || zoomEnabled.type === "wheel") ? config.axis_rotate ? "ns-resize" : "ew-resize" : null).classed(_classes2.default.eventRectsMultiple, isMultipleX).classed(_classes2.default.eventRectsSingle, !isMultipleX);
    +
    +		// clear old rects
    +
    +		if (eventRects.selectAll("." + _classes2.default.eventRect).remove(), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), isMultipleX) eventRectUpdate = $$.eventRect.data([0]), eventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter()).merge(eventRectUpdate);else {
    +			// Set data and update $$.eventRect
    +			var maxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets);
    +
    +			eventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []), $$.eventRect = eventRects.selectAll("." + _classes2.default.eventRect), eventRectUpdate = $$.eventRect.data(function (d) {
    +				return d;
    +			}), eventRectUpdate.exit().remove(), eventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter()).merge(eventRectUpdate);
    +		}
    +
    +		$$.updateEventRect(eventRectUpdate), $$.inputType !== "touch" || $$.svg.on("touchstart.eventRect") || $$.hasArcType() || $$.bindTouchOnEventRect(isMultipleX);
    +	},
    +	bindTouchOnEventRect: function bindTouchOnEventRect(isMultipleX) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    getEventRect = function () {
    +			var touch = _d3Selection.event.changedTouches[0];
    +
    +			return (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY));
    +		},
    +		    getIndex = function (eventRect) {
    +			var index = eventRect && eventRect.attr("class") && eventRect.attr("class").replace(new RegExp("(" + _classes2.default.eventRect + "-?|s)", "g"), "") * 1;
    +
    +			return (isNaN(index) || index === null) && (index = -1), index;
    +		},
    +		    selectRect = function (context) {
    +			if (isMultipleX) $$.selectRectForMultipleXs(context);else {
    +				var eventRect = getEventRect(),
    +				    index = getIndex(eventRect);
    +				$$.setOver(index), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(context, eventRect, index);
    +			}
    +		},
    +		    preventDefault = config.interaction_inputType_touch.preventDefault,
    +		    isPrevented = (0, _util.isBoolean)(preventDefault) && preventDefault || !1,
    +		    preventThreshold = !isNaN(preventDefault) && preventDefault || null,
    +		    startPx = void 0,
    +		    preventEvent = function (event) {
    +			var eventType = event.type,
    +			    touch = event.changedTouches[0],
    +			    currentXY = touch["client" + (config.axis_rotated ? "Y" : "X")];
    +
    +
    +			// prevent document scrolling
    +			eventType === "touchstart" ? isPrevented ? event.preventDefault() : preventThreshold !== null && (startPx = currentXY) : eventType === "touchmove" && (isPrevented || startPx === !0 || preventThreshold !== null && Math.abs(startPx - currentXY) >= preventThreshold) && (startPx = !0, event.preventDefault());
    +		};
    +
    +		// call event.preventDefault()
    +		// according 'interaction.inputType.touch.preventDefault' option
    +
    +
    +		// bind touch events
    +		$$.svg.on("touchstart.eventRect touchmove.eventRect", function () {
    +			var eventRect = getEventRect();
    +
    +			if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) {
    +				if ($$.dragging || $$.flowing || $$.hasArcType()) return;
    +
    +				preventEvent(_d3Selection.event), selectRect(this);
    +			} else $$.unselectRect();
    +		}).on("touchend.eventRect", function () {
    +			var eventRect = getEventRect();
    +
    +			if (!eventRect.empty() && eventRect.classed(_classes2.default.eventRect)) {
    +				if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1));
    +
    +				// Call event handler
    +				var index = getIndex(eventRect);
    +
    +				isMultipleX || index === -1 || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) {
    +					return config.data_onout.call($$.api, d2);
    +				});
    +			}
    +		});
    +	},
    +
    +
    +	/**
    +  * Updates the location and size of the eventRect.
    +  * @private
    +  * @param {Object} d3.select(CLASS.eventRects) object.
    +  */
    +	updateEventRect: function updateEventRect(eventRectUpdate) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    xScale = $$.zoomScale || $$.x,
    +		    eventRectData = eventRectUpdate || $$.eventRect.data(),
    +		    isRotated = config.axis_rotated,
    +		    x = void 0,
    +		    y = void 0,
    +		    w = void 0,
    +		    h = void 0; // set update selection if null
    +
    +		if ($$.isMultipleX()) x = 0, y = 0, w = $$.width, h = $$.height;else {
    +			var rectW = void 0,
    +			    rectX = void 0;
    +
    +
    +			if ($$.isCategorized()) rectW = $$.getEventRectWidth(), rectX = function (d) {
    +					return xScale(d.x) - rectW / 2;
    +				};else {
    +				$$.updateXs();
    +
    +
    +				var getPrevNextX = function (d) {
    +					var index = d.index;
    +
    +					return {
    +						prev: $$.getPrevX(index),
    +						next: $$.getNextX(index)
    +					};
    +				};
    +
    +				rectW = function (d) {
    +					var x = getPrevNextX(d);
    +
    +					// if there this is a single data point make the eventRect full width (or height)
    +					return x.prev === null && x.next === null ? isRotated ? $$.height : $$.width : (x.prev === null && (x.prev = xScale.domain()[0]), x.next === null && (x.next = xScale.domain()[1]), Math.max(0, (xScale(x.next) - xScale(x.prev)) / 2));
    +				}, rectX = function (d) {
    +					var x = getPrevNextX(d),
    +					    thisX = $$.data.xs[d.id][d.index];
    +
    +
    +					// if there this is a single data point position the eventRect at 0
    +					return x.prev === null && x.next === null ? 0 : (x.prev === null && (x.prev = xScale.domain()[0]), (xScale(thisX) + xScale(x.prev)) / 2);
    +				};
    +			}
    +
    +			x = isRotated ? 0 : rectX, y = isRotated ? rectX : 0, w = isRotated ? $$.width : rectW, h = isRotated ? rectW : $$.height;
    +		}
    +
    +		eventRectData.attr("class", $$.classEvent.bind($$)).attr("x", x).attr("y", y).attr("width", w).attr("height", h);
    +	},
    +	selectRectForSingle: function selectRectForSingle(context, eventRect, index) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isSelectionEnabled = config.data_selection_enabled,
    +		    isSelectionGrouped = config.data_selection_grouped,
    +		    isTooltipGrouped = config.tooltip_grouped,
    +		    selectedData = $$.getAllValuesOnIndex(index);
    +		isTooltipGrouped && ($$.showTooltip(selectedData, context), $$.showXGridFocus(selectedData), !isSelectionEnabled || isSelectionGrouped) || $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function () {
    +			(0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED, !0), isSelectionEnabled && eventRect.style("cursor", isSelectionGrouped ? "pointer" : null), isTooltipGrouped || ($$.hideXGridFocus(), $$.hideTooltip(), !isSelectionGrouped && $$.expandCirclesBars(index));
    +		}).filter(function (d) {
    +			return $$.isWithinShape(this, d);
    +		}).call(function (selected) {
    +			var d = selected.data();
    +
    +			isSelectionEnabled && (isSelectionGrouped || config.data_selection_isselectable(d)) && eventRect.style("cursor", "pointer"), isTooltipGrouped || ($$.showTooltip(d, context), $$.showXGridFocus(d), $$.unexpandCircles(), selected.each(function (d) {
    +				return $$.expandCirclesBars(index, d.id);
    +			}));
    +		});
    +	},
    +	expandCirclesBars: function expandCirclesBars(index, id, reset) {
    +		var $$ = this,
    +		    config = $$.config;
    +		config.point_focus_expand_enabled && $$.expandCircles(index, id, reset), $$.expandBars(index, id, reset);
    +	},
    +	selectRectForMultipleXs: function selectRectForMultipleXs(context) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    targetsToShow = $$.filterTargetsToShow($$.data.targets);
    +
    +
    +		// do nothing when dragging
    +		if (!($$.dragging || $$.hasArcType(targetsToShow))) {
    +				var mouse = (0, _d3Selection.mouse)(context),
    +				    closest = $$.findClosestFromTargets(targetsToShow, mouse);
    +
    +
    +				if ($$.mouseover && (!closest || closest.id !== $$.mouseover.id) && (config.data_onout.call($$.api, $$.mouseover), $$.mouseover = undefined), !closest) return void $$.unselectRect();
    +
    +				var sameXData = $$.isBubbleType(closest) || $$.isScatterType(closest) || !config.tooltip_grouped ? [closest] : $$.filterByX(targetsToShow, closest.x),
    +				    selectedData = sameXData.map(function (d) {
    +					return $$.addName(d);
    +				});
    +
    +				// show tooltip when cursor is close to some point
    +
    +				$$.showTooltip(selectedData, context), $$.expandCirclesBars(closest.index, closest.id, !0), $$.showXGridFocus(selectedData), ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && ($$.svg.select("." + _classes2.default.eventRect).style("cursor", "pointer"), !$$.mouseover && (config.data_onover.call($$.api, closest), $$.mouseover = closest));
    +			}
    +	},
    +
    +
    +	/**
    +  * Unselect EventRect.
    +  * @private
    +  */
    +	unselectRect: function unselectRect() {
    +		var $$ = this;
    +
    +		$$.svg.select("." + _classes2.default.eventRect).style("cursor", null), $$.hideXGridFocus(), $$.hideTooltip(), $$.unexpandCircles(), $$.unexpandBars();
    +	},
    +	setOver: function setOver(index) {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.expandCirclesBars(index, null, !0), index !== -1 && $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) {
    +			return config.data_onover.call($$.api, d2);
    +		});
    +	},
    +
    +
    +	/**
    +  * Return draggable selection function
    +  * @return {Function}
    +  * @private
    +  */
    +	getDraggableSelection: function getDraggableSelection() {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		return config.interaction_enabled && config.data_selection_draggable && $$.drag ? (0, _d3Drag.drag)().on("drag", function () {
    +			$$.drag((0, _d3Selection.mouse)(this));
    +		}).on("start", function () {
    +			$$.dragstart((0, _d3Selection.mouse)(this));
    +		}).on("end", function () {
    +			$$.dragend();
    +		}) : function () {};
    +	},
    +
    +
    +	/**
    +  * Create eventRect for each data on the x-axis.
    +  * Register touch and drag events.
    +  * @private
    +  * @param {Object} d3.select(CLASS.eventRects) object.
    +  * @returns {Object} d3.select(CLASS.eventRects) object.
    +  */
    +	generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    rect = eventRectEnter.append("rect").attr("class", $$.classEvent.bind($$)).style("cursor", config.data_selection_enabled && config.data_selection_grouped ? "pointer" : null).on("click", function (d) {
    +			if ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) return void ($$.cancelClick && ($$.cancelClick = !1));
    +
    +			var index = d.index;
    +
    +			$$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) {
    +				(config.data_selection_grouped || $$.isWithinShape(this, d2)) && ($$.toggleShape(this, d2, index), $$.config.data_onclick.call($$.api, d2, this));
    +			});
    +		}).call($$.getDraggableSelection());
    +
    +
    +		return $$.inputType === "mouse" && rect.on("mouseover", function (d) {
    +			$$.dragging || $$.flowing || $$.hasArcType() || $$.setOver(d.index);
    +		}).on("mousemove", function (d) {
    +			// do nothing while dragging/flowing
    +			if (!($$.dragging || $$.flowing || $$.hasArcType())) {
    +					var index = d.index,
    +					    eventRect = $$.svg.select("." + _classes2.default.eventRect + "-" + index);
    +					$$.isStepType(d) && $$.config.line_step_type === "step-after" && (0, _d3Selection.mouse)(this)[0] < $$.x($$.getXValue(d.id, index)) && (index -= 1), index === -1 ? $$.unselectRect() : $$.selectRectForSingle(this, eventRect, index);
    +				}
    +		}).on("mouseout", function (d) {
    +			// chart is destroyed
    +			if ($$.config && !$$.hasArcType()) {
    +
    +					var index = d.index;
    +
    +					$$.unselectRect(), $$.main.selectAll("." + _classes2.default.shape + "-" + index).each(function (d2) {
    +						return config.data_onout.call($$.api, d2);
    +					});
    +				}
    +		}), rect;
    +	},
    +
    +
    +	/**
    +  * Create an eventRect,
    +  * Register touch and drag events.
    +  * @private
    +  * @param {Object} d3.select(CLASS.eventRects) object.
    +  * @returns {Object} d3.select(CLASS.eventRects) object.
    +  */
    +	generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    rect = eventRectEnter.append("rect").attr("x", 0).attr("y", 0).attr("width", $$.width).attr("height", $$.height).attr("class", _classes2.default.eventRect).on("click", function () {
    +			var targetsToShow = $$.filterTargetsToShow($$.data.targets);
    +
    +			// select if selection enabled
    +			if (!$$.hasArcType(targetsToShow)) {
    +					var mouse = (0, _d3Selection.mouse)(this),
    +					    closest = $$.findClosestFromTargets(targetsToShow, mouse);
    +					!closest || ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) && $$.main.selectAll("." + _classes2.default.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + _classes2.default.shape + "-" + closest.index).each(function () {
    +						(config.data_selection_grouped || $$.isWithinShape(this, closest)) && ($$.toggleShape(this, closest, closest.index), $$.config.data_onclick.call($$.api, closest, this));
    +					});
    +				}
    +		}).call($$.getDraggableSelection());
    +
    +
    +		return $$.inputType === "mouse" && rect.on("mouseover mousemove", function () {
    +			$$.selectRectForMultipleXs(this);
    +		}).on("mouseout", function () {
    +			!$$.config || $$.hasArcType() || $$.unselectRect();
    +		}), rect;
    +	},
    +
    +
    +	/**
    +  * Dispatch a mouse event.
    +  * @private
    +  * @param {String} type event type
    +  * @param {Number} index Index of eventRect
    +  * @param {Array} mouse x and y coordinate value
    +  */
    +	dispatchEvent: function dispatchEvent(type, index, mouse) {
    +		var $$ = this,
    +		    selector = "." + ($$.isMultipleX() ? _classes2.default.eventRect : _classes2.default.eventRect + "-" + index),
    +		    eventRect = $$.main.select(selector).node(),
    +		    box = eventRect.getBoundingClientRect(),
    +		    x = box.left + (mouse ? mouse[0] : 0) + box.width / 2,
    +		    y = box.top + (mouse ? mouse[1] : 0);
    +
    +		_util.emulateEvent[/^mouse/.test(type) ? "mouse" : "touch"](eventRect, type, {
    +			screenX: x,
    +			screenY: y,
    +			clientX: x,
    +			clientY: y
    +		});
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 28 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__28__;
    +
    +/***/ }),
    +/* 29 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getCurrentWidth: function getCurrentWidth() {
    +		var $$ = this;
    +
    +		return $$.config.size_width || $$.getParentWidth();
    +	},
    +	getCurrentHeight: function getCurrentHeight() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    h = config.size_height || $$.getParentHeight();
    +
    +
    +		return h > 0 ? h : 320 / ($$.hasType("gauge") && !config.gauge_fullCircle ? 2 : 1);
    +	},
    +	getCurrentPaddingTop: function getCurrentPaddingTop() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    padding = (0, _util.isValue)(config.padding_top) ? config.padding_top : 0;
    +
    +
    +		return $$.title && $$.title.node() && (padding += $$.getTitlePadding()), padding;
    +	},
    +	getCurrentPaddingBottom: function getCurrentPaddingBottom() {
    +		var config = this.config;
    +
    +		return (0, _util.isValue)(config.padding_bottom) ? config.padding_bottom : 0;
    +	},
    +	getCurrentPaddingLeft: function getCurrentPaddingLeft(withoutRecompute) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    paddingLeft = void 0;
    +
    +
    +		return paddingLeft = (0, _util.isValue)(config.padding_left) ? config.padding_left : config.axis_rotated ? config.axis_x_show ? Math.max((0, _util.ceil10)($$.getAxisWidthByAxisId("x", withoutRecompute)), 40) : 1 : !config.axis_y_show || config.axis_y_inner ? $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1 : (0, _util.ceil10)($$.getAxisWidthByAxisId("y", withoutRecompute)), paddingLeft;
    +	},
    +	getCurrentPaddingRight: function getCurrentPaddingRight() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    legendWidthOnRight = $$.isLegendRight ? $$.getLegendWidth() + 20 : 0,
    +		    paddingRight = void 0;
    +
    +
    +		return paddingRight = (0, _util.isValue)(config.padding_right) ? config.padding_right + 1 : config.axis_rotated ? 10 + legendWidthOnRight : !config.axis_y2_show || config.axis_y2_inner ? 2 + legendWidthOnRight + ($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0) : (0, _util.ceil10)($$.getAxisWidthByAxisId("y2")) + legendWidthOnRight, paddingRight;
    +	},
    +
    +
    +	/**
    +  * Get the parent rect element's size
    +  * @param {String} key property/attribute name
    +  * @private
    +  */
    +	getParentRectValue: function getParentRectValue(key) {
    +		for (var offsetName = "offset" + (0, _util.capitalize)(key), parent = this.selectChart.node(), v = void 0; !v && parent && parent.tagName !== "BODY";) {
    +			try {
    +				v = parent.getBoundingClientRect()[key];
    +			} catch (e) {
    +				offsetName in parent && (v = parent[offsetName]);
    +			}
    +
    +			parent = parent.parentNode;
    +		}
    +
    +		if (key === "width") {
    +			// Sometimes element's width value is incorrect(ex. flex container)
    +			// In this case, use body's offsetWidth instead.
    +			var bodyWidth = document.body.offsetWidth;
    +
    +			v > bodyWidth && (v = bodyWidth);
    +		}
    +
    +		return v;
    +	},
    +	getParentWidth: function getParentWidth() {
    +		return this.getParentRectValue("width");
    +	},
    +	getParentHeight: function getParentHeight() {
    +		var h = this.selectChart.style("height");
    +
    +		return h.indexOf("px") > 0 ? +h.replace("px", "") : 0;
    +	},
    +	getSvgLeft: function getSvgLeft(withoutRecompute) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,
    +		    leftAxisClass = config.axis_rotated ? _classes2.default.axisX : _classes2.default.axisY,
    +		    leftAxis = $$.main.select("." + leftAxisClass).node(),
    +		    svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : { right: 0 },
    +		    chartRect = $$.selectChart.node().getBoundingClientRect(),
    +		    hasArc = $$.hasArcType(),
    +		    svgLeft = svgRect.right - chartRect.left - (hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));
    +
    +
    +		return svgLeft > 0 ? svgLeft : 0;
    +	},
    +	getAxisWidthByAxisId: function getAxisWidthByAxisId(id, withoutRecompute) {
    +		var $$ = this,
    +		    position = $$.axis.getLabelPositionById(id);
    +
    +
    +		return $$.axis.getMaxTickWidth(id, withoutRecompute) + (position.isInner ? 20 : 40);
    +	},
    +	getHorizontalAxisHeight: function getHorizontalAxisHeight(axisId) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    h = 30;
    +
    +
    +		// Calculate x axis height when tick rotated
    +		return axisId !== "x" || config.axis_x_show ? axisId === "x" && config.axis_x_height ? config.axis_x_height : axisId !== "y" || config.axis_y_show ? axisId !== "y2" || config.axis_y2_show ? (axisId === "x" && !config.axis_rotated && config.axis_x_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180)), axisId === "y" && config.axis_rotated && config.axis_y_tick_rotate && (h = 30 + $$.axis.getMaxTickWidth(axisId) * Math.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180)), h + ($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) + (axisId === "y2" ? -10 : 0)) : $$.rotated_padding_top : !config.legend_show || $$.isLegendRight || $$.isLegendInset ? 1 : 10 : 8;
    +	},
    +	getEventRectWidth: function getEventRectWidth() {
    +		return Math.max(0, this.xAxis.tickInterval());
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 30 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Shape = __webpack_require__(31),
    +    _d3Selection = __webpack_require__(5),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getShapeIndices: function getShapeIndices(typeFilter) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    indices = {},
    +		    i = 0;
    +
    +
    +		return $$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(function (d) {
    +			for (var groups, j = 0; groups = config.data_groups[j]; j++) if (!(groups.indexOf(d.id) < 0)) for (var _row5, _k5 = 0; _row5 = groups[_k5]; _k5++) if (_row5 in indices) {
    +					indices[d.id] = indices[_row5];
    +
    +					break;
    +				}
    +
    +			(0, _util.isUndefined)(indices[d.id]) && (indices[d.id] = i++);
    +		}), indices.__max__ = i - 1, indices;
    +	},
    +	getShapeX: function getShapeX(offset, targetsNum, indices, isSub) {
    +		var $$ = this,
    +		    scale = isSub ? $$.subX : $$.zoomScale || $$.x,
    +		    barPadding = $$.config.bar_padding;
    +
    +
    +		return function (d) {
    +			var index = d.id in indices ? indices[d.id] : 0,
    +			    x = d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0;
    +
    +			// adjust x position for bar.padding option
    +
    +			return offset && x && targetsNum > 1 && barPadding && (index && (x += barPadding * index), targetsNum > 2 ? x -= (targetsNum - 1) * barPadding / 2 : targetsNum === 2 && (x -= barPadding / 2)), x;
    +		};
    +	},
    +	getShapeY: function getShapeY(isSub) {
    +		var $$ = this;
    +
    +		return function (d) {
    +			var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);
    +
    +			return scale(d.value);
    +		};
    +	},
    +	getShapeOffset: function getShapeOffset(typeFilter, indices, isSub) {
    +		var $$ = this,
    +		    targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$))),
    +		    targetIds = targets.map(function (t) {
    +			return t.id;
    +		});
    +
    +
    +		return function (d, idx) {
    +			var scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id),
    +			    y0 = scale(0),
    +			    offset = y0,
    +			    i = idx;
    +
    +
    +			return targets.forEach(function (t) {
    +				var values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;
    +
    +				t.id === d.id || indices[t.id] !== indices[d.id] || targetIds.indexOf(t.id) < targetIds.indexOf(d.id) && (((0, _util.isUndefined)(values[i]) || +values[i].x !== +d.x) && (i = -1, values.forEach(function (v, j) {
    +					var x1 = v.x.constructor === Date ? +v.x : v.x,
    +					    x2 = d.x.constructor === Date ? +d.x : d.x;
    +					x1 === x2 && (i = j);
    +				})), i in values && values[i].value * d.value >= 0 && (offset += scale(values[i].value) - y0));
    +			}), offset;
    +		};
    +	},
    +	isWithinShape: function isWithinShape(that, d) {
    +		var $$ = this,
    +		    shape = (0, _d3Selection.select)(that),
    +		    isWithin = void 0;
    +
    +
    +		return $$.isTargetToShow(d.id) ? $$.hasValidPointType(that.nodeName) ? isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScale(d.id)(d.value)) : $$.isWithinCircle(that, $$.pointSelectR(d) * 1.5) : that.nodeName === "path" && (isWithin = !shape.classed(_classes2.default.bar) || $$.isWithinBar(that)) : isWithin = !1, isWithin;
    +	},
    +	getInterpolate: function getInterpolate(d) {
    +		var $$ = this,
    +		    interpolation = $$.getInterpolateType(d);
    +
    +
    +		return {
    +			"basis": _d3Shape.curveBasis,
    +			"basis-closed": _d3Shape.curveBasisClosed,
    +			"basis-open": _d3Shape.curveBasisOpen,
    +			"bundle": _d3Shape.curveBundle,
    +			"cardinal": _d3Shape.curveCardinal,
    +			"cardinal-closed": _d3Shape.curveCardinalClosed,
    +			"cardinal-open": _d3Shape.curveCardinalOpen,
    +			"catmull-rom": _d3Shape.curveCatmullRom,
    +			"catmull-rom-closed": _d3Shape.curveCatmullRomClosed,
    +			"catmull-rom-open": _d3Shape.curveCatmullRomOpen,
    +			"monotone-x": _d3Shape.curveMonotoneX,
    +			"monotone-y": _d3Shape.curveMonotoneY,
    +			"natural": _d3Shape.curveNatural,
    +			"linear-closed": _d3Shape.curveLinearClosed,
    +			"linear": _d3Shape.curveLinear,
    +			"step": _d3Shape.curveStep,
    +			"step-after": _d3Shape.curveStepAfter,
    +			"step-before": _d3Shape.curveStepBefore
    +		}[interpolation];
    +	},
    +	getInterpolateType: function getInterpolateType(d) {
    +		var $$ = this,
    +		    type = $$.config.spline_interpolation_type,
    +		    interpolation = $$.isInterpolationType(type) ? type : "cardinal";
    +
    +
    +		return $$.isSplineType(d) ? interpolation : $$.isStepType(d) ? $$.config.line_step_type : "linear";
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 31 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__31__;
    +
    +/***/ }),
    +/* 32 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Shape = __webpack_require__(31),
    +    _d3Array = __webpack_require__(6),
    +    _d3Interpolate = __webpack_require__(33),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initPie: function initPie() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    padding = config.pie_padding,
    +		    padAngle = $$.hasType("pie") && padding ? padding * .01 : config[config.data_type + "_padAngle"] ? config[config.data_type + "_padAngle"] : 0;
    +		$$.pie = (0, _d3Shape.pie)().padAngle(padAngle).value(function (d) {
    +			return d.values.reduce(function (a, b) {
    +				return a + b.value;
    +			}, 0);
    +		}), config.data_order || $$.pie.sort(null);
    +	},
    +	updateRadius: function updateRadius() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    radius = config.pie_innerRadius,
    +		    padding = config.pie_padding,
    +		    w = config.gauge_width || config.donut_width;
    +		$$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2, $$.radius = $$.radiusExpanded * .95, $$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : .6;
    +
    +
    +		var innerRadius = radius || (padding ? padding * ($$.innerRadiusRatio + .1) : 0);
    +
    +		$$.innerRadius = $$.hasType("donut") || $$.hasType("gauge") ? $$.radius * $$.innerRadiusRatio : innerRadius;
    +	},
    +	updateArc: function updateArc() {
    +		var $$ = this;
    +
    +		$$.svgArc = $$.getSvgArc(), $$.svgArcExpanded = $$.getSvgArcExpanded(), $$.svgArcExpandedSub = $$.getSvgArcExpanded(.98);
    +	},
    +	updateAngle: function updateAngle(dValue) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    d = dValue,
    +		    found = !1,
    +		    index = 0,
    +		    gMin = void 0,
    +		    gMax = void 0,
    +		    gTic = void 0,
    +		    gValue = void 0;
    +		return config ? ($$.pie($$.filterTargetsToShow($$.data.targets)).forEach(function (t) {
    +			found || t.data.id !== d.data.id || (found = !0, d = t, d.index = index), index++;
    +		}), isNaN(d.startAngle) && (d.startAngle = 0), isNaN(d.endAngle) && (d.endAngle = d.startAngle), $$.isGaugeType(d.data) && (gMin = config.gauge_min, gMax = config.gauge_max, gTic = Math.PI * (config.gauge_fullCircle ? 2 : 1) / (gMax - gMin), gValue = d.value < gMin ? 0 : d.value < gMax ? d.value - gMin : gMax - gMin, d.startAngle = config.gauge_startingAngle, d.endAngle = d.startAngle + gTic * gValue), found ? d : null) : null;
    +	},
    +	getSvgArc: function getSvgArc() {
    +		var $$ = this,
    +		    arc = (0, _d3Shape.arc)().outerRadius($$.radius).innerRadius($$.innerRadius),
    +		    newArc = function (d, withoutUpdate) {
    +			if (withoutUpdate) return arc(d); // for interpolate
    +
    +			var updated = $$.updateAngle(d);
    +
    +			return updated ? arc(updated) : "M 0 0";
    +		};
    +
    +		// TODO: extends all function
    +
    +
    +		return newArc.centroid = arc.centroid, newArc;
    +	},
    +	getSvgArcExpanded: function getSvgArcExpanded(rate) {
    +		var $$ = this,
    +		    arc = (0, _d3Shape.arc)().outerRadius($$.radiusExpanded * (rate || 1)).innerRadius($$.innerRadius);
    +
    +
    +		return function (d) {
    +			var updated = $$.updateAngle(d);
    +
    +			return updated ? arc(updated) : "M 0 0";
    +		};
    +	},
    +	getArc: function getArc(d, withoutUpdate, force) {
    +		return force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : "M 0 0";
    +	},
    +	transformForArcLabel: function transformForArcLabel(d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    updated = $$.updateAngle(d),
    +		    translate = "";
    +
    +
    +		if (updated && !$$.hasType("gauge")) {
    +			var c = this.svgArc.centroid(updated),
    +			    x = isNaN(c[0]) ? 0 : c[0],
    +			    y = isNaN(c[1]) ? 0 : c[1],
    +			    h = Math.sqrt(x * x + y * y),
    +			    ratio = $$.hasType("donut") && config.donut_label_ratio || $$.hasType("pie") && config.pie_label_ratio;
    +			ratio = ratio ? (0, _util.isFunction)(ratio) ? ratio(d, $$.radius, h) : ratio : $$.radius && (h ? (36 / $$.radius > .375 ? 1.175 - 36 / $$.radius : .8) * $$.radius / h : 0), translate = "translate(" + x * ratio + "," + y * ratio + ")";
    +		}
    +
    +		return translate;
    +	},
    +	getArcRatio: function getArcRatio(d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    val = null;
    +
    +
    +		if (d)
    +			// if has padAngle set, calculate rate based on value
    +			if ($$.pie.padAngle()()) {
    +				var total = $$.getTotalDataSum();
    +
    +				$$.hiddenTargetIds.length && (total -= (0, _d3Array.sum)($$.api.data.values.call($$.api, $$.hiddenTargetIds))), val = d.value / total;
    +			} else val = (d.endAngle - d.startAngle) / (Math.PI * ($$.hasType("gauge") && !config.gauge_fullCircle ? 1 : 2));
    +
    +		return val;
    +	},
    +	convertToArcData: function convertToArcData(d) {
    +		return this.addName({
    +			id: d.data.id,
    +			value: d.value,
    +			ratio: this.getArcRatio(d),
    +			index: d.index
    +		});
    +	},
    +	textForArcLabel: function textForArcLabel(val) {
    +		var $$ = this,
    +		    d = val.node ? val.datum() : val;
    +
    +
    +		if (!$$.shouldShowArcLabel()) return "";
    +
    +		var updated = $$.updateAngle(d),
    +		    value = updated ? updated.value : null,
    +		    ratio = $$.getArcRatio(updated),
    +		    id = d.data.id;
    +
    +
    +		if (!$$.hasType("gauge") && !$$.meetsArcLabelThreshold(ratio)) return "";
    +
    +		var text = ($$.getArcLabelFormat() || $$.defaultArcValueFormat)(value, ratio, id).toString();
    +
    +		if (val.node) if (text.indexOf("\n") === -1) val.text(text);else {
    +				var multiline = text.split("\n"),
    +				    len = multiline.length - 1;
    +				multiline.forEach(function (v, i) {
    +					val.append("tspan").attr("x", 0).attr("dy", (i === 0 ? -len : 1) + "em").text(v);
    +				});
    +			}
    +
    +		return text;
    +	},
    +	textForGaugeMinMax: function textForGaugeMinMax(value, isMax) {
    +		var format = this.getGaugeLabelExtents();
    +
    +		return format ? format(value, isMax) : value;
    +	},
    +	expandArc: function expandArc(targetIds) {
    +		var $$ = this,
    +		    interval = void 0;
    +
    +
    +		// MEMO: avoid to cancel transition
    +		if ($$.transiting) return void (interval = window.setInterval(function () {
    +				$$.transiting || (window.clearInterval(interval), $$.legend.selectAll("." + _classes2.default.legendItemFocused).size() > 0 && $$.expandArc(targetIds));
    +			}, 10));
    +
    +		var newTargetIds = $$.mapToTargetIds(targetIds);
    +
    +		$$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).each(function (d) {
    +			$$.shouldExpand(d.data.id) && (0, _d3Selection.select)(this).selectAll("path").transition().duration($$.expandDuration(d.data.id)).attr("d", $$.svgArcExpanded).transition().duration($$.expandDuration(d.data.id) * 2).attr("d", $$.svgArcExpandedSub);
    +		});
    +	},
    +	unexpandArc: function unexpandArc(targetIds) {
    +		var $$ = this;
    +
    +		if (!$$.transiting) {
    +
    +				var newTargetIds = $$.mapToTargetIds(targetIds);
    +
    +				$$.svg.selectAll($$.selectorTargets(newTargetIds, "." + _classes2.default.chartArc)).selectAll("path").transition().duration(function (d) {
    +					return $$.expandDuration(d.data.id);
    +				}).attr("d", $$.svgArc), $$.svg.selectAll("" + _classes2.default.arc).style("opacity", "1");
    +			}
    +	},
    +	expandDuration: function expandDuration(id) {
    +		var $$ = this,
    +		    config = $$.config;
    +		return $$.isDonutType(id) ? config.donut_expand_duration : $$.isGaugeType(id) ? config.gauge_expand_duration : $$.isPieType(id) ? config.pie_expand_duration : 50;
    +	},
    +	shouldExpand: function shouldExpand(id) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		return $$.isDonutType(id) && config.donut_expand || $$.isGaugeType(id) && config.gauge_expand || $$.isPieType(id) && config.pie_expand;
    +	},
    +	shouldShowArcLabel: function shouldShowArcLabel() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    shouldShow = !0;
    +
    +
    +		// when gauge, always true
    +		return $$.hasType("donut") ? shouldShow = config.donut_label_show : $$.hasType("pie") && (shouldShow = config.pie_label_show), shouldShow;
    +	},
    +	meetsArcLabelThreshold: function meetsArcLabelThreshold(ratio) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    threshold = $$.hasType("donut") ? config.donut_label_threshold : config.pie_label_threshold;
    +
    +
    +		return ratio >= threshold;
    +	},
    +	getArcLabelFormat: function getArcLabelFormat() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    format = config.pie_label_format;
    +
    +
    +		return $$.hasType("gauge") ? format = config.gauge_label_format : $$.hasType("donut") && (format = config.donut_label_format), format;
    +	},
    +	getGaugeLabelExtents: function getGaugeLabelExtents() {
    +		var config = this.config;
    +
    +		return config.gauge_label_extents;
    +	},
    +	getArcTitle: function getArcTitle() {
    +		var $$ = this;
    +
    +		return $$.hasType("donut") ? $$.config.donut_title : "";
    +	},
    +	updateTargetsForArc: function updateTargetsForArc(targets) {
    +		var $$ = this,
    +		    main = $$.main,
    +		    classChartArc = $$.classChartArc.bind($$),
    +		    classArcs = $$.classArcs.bind($$),
    +		    classFocus = $$.classFocus.bind($$),
    +		    mainPieUpdate = main.select("." + _classes2.default.chartArcs).selectAll("." + _classes2.default.chartArc).data($$.pie(targets)).attr("class", function (d) {
    +			return classChartArc(d) + classFocus(d.data);
    +		}),
    +		    mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc);
    +		mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate), mainPieEnter.append("text").attr("dy", $$.hasType("gauge") ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none");
    +	},
    +	initArc: function initArc() {
    +		var $$ = this;
    +
    +		$$.arcs = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartArcs).attr("transform", $$.getTranslate("arc")), $$.setArcTitle();
    +	},
    +
    +
    +	/**
    +  * Set arc title text
    +  * @private
    +  */
    +	setArcTitle: function setArcTitle() {
    +		var $$ = this,
    +		    title = $$.getArcTitle();
    +
    +
    +		if (title) {
    +			var multiline = title.split("\n"),
    +			    text = $$.arcs.append("text").attr("class", _classes2.default.chartArcsTitle).style("text-anchor", "middle");
    +
    +
    +			// if is multiline text
    +			if (multiline.length > 1) {
    +				var fontSize = +text.style("font-size").replace("px", ""),
    +				    height = Math.floor(text.text(".").node().getBBox().height, text.text(""));
    +				multiline.forEach(function (v, i) {
    +					return text.insert("tspan").text(v).attr("x", 0).attr("dy", i ? height : 0);
    +				}), text.attr("y", "-" + (fontSize * (multiline.length - 2) || fontSize / 2));
    +			} else text.text(title);
    +		}
    +	},
    +	redrawArc: function redrawArc(duration, durationForExit, withTransform) {
    +
    +		function selectArc(_this, arcData, id) {
    +			$$.expandArc(id), $$.api.focus(id), $$.toggleFocusLegend(id, !0), $$.showTooltip([arcData], _this);
    +		}
    +
    +		function unselectArc(arcData) {
    +			var id = arcData && arcData.id || undefined;
    +
    +			$$.unexpandArc(id), $$.api.revert(), $$.revertLegend(), $$.hideTooltip();
    +		}
    +
    +		var $$ = this,
    +		    config = $$.config,
    +		    main = $$.main,
    +		    isTouch = $$.inputType === "touch",
    +		    isMouse = $$.inputType === "mouse",
    +		    mainArc = main.selectAll("." + _classes2.default.arcs).selectAll("." + _classes2.default.arc).data($$.arcData.bind($$));
    +
    +
    +		if (mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove(), mainArc = mainArc.enter().append("path").attr("class", $$.classArc.bind($$)).style("fill", function (d) {
    +			return $$.color(d.data);
    +		}).style("cursor", function (d) {
    +			return config.interaction_enabled && (config.data_selection_isselectable(d) ? "pointer" : null);
    +		}).style("opacity", "0").each(function (d) {
    +			$$.isGaugeType(d.data) && (d.startAngle = config.gauge_startingAngle, d.endAngle = config.gauge_startingAngle), this._current = d;
    +		}).merge(mainArc), mainArc.attr("transform", function (d) {
    +			return !$$.isGaugeType(d.data) && withTransform ? "scale(0)" : "";
    +		}).style("opacity", function (d) {
    +			return d === this._current ? "0" : "1";
    +		}).each(function () {
    +			$$.transiting = !0;
    +		}).transition().duration(duration).attrTween("d", function (d) {
    +			var updated = $$.updateAngle(d);
    +
    +			if (!updated) return function () {
    +					return "M 0 0";
    +				};
    +
    +			isNaN(this._current.startAngle) && (this._current.startAngle = 0), isNaN(this._current.endAngle) && (this._current.endAngle = this._current.startAngle);
    +
    +
    +			var interpolate = (0, _d3Interpolate.interpolate)(this._current, updated);
    +
    +			return this._current = interpolate(0), function (t) {
    +				var interpolated = interpolate(t);
    +
    +				// data.id will be updated by interporator
    +				return interpolated.data = d.data, $$.getArc(interpolated, !0);
    +			};
    +		}).attr("transform", withTransform ? "scale(1)" : "").style("fill", function (d) {
    +			return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data.id);
    +		})
    +		// Where gauge reading color would receive customization.
    +		.style("opacity", "1").call($$.endall, function () {
    +			$$.transiting = !1;
    +		}), config.interaction_enabled && (mainArc.on("click", function (d, i) {
    +			var updated = $$.updateAngle(d),
    +			    arcData = void 0;
    +			updated && (arcData = $$.convertToArcData(updated), $$.toggleShape && $$.toggleShape(this, arcData, i), $$.config.data_onclick.call($$.api, arcData, this));
    +		}), isMouse && mainArc.on("mouseover", function (d) {
    +			if (!$$.transiting) // skip while transiting
    +				{
    +					var updated = $$.updateAngle(d),
    +					    arcData = updated ? $$.convertToArcData(updated) : null,
    +					    id = arcData && arcData.id || undefined;
    +					selectArc(this, arcData, id), $$.config.data_onover(arcData, this);
    +				}
    +		}).on("mouseout", function (d) {
    +			if (!$$.transiting) // skip while transiting
    +				{
    +					var updated = $$.updateAngle(d),
    +					    arcData = updated ? $$.convertToArcData(updated) : null;
    +					unselectArc(), $$.config.data_onout(arcData, this);
    +				}
    +		}).on("mousemove", function (d) {
    +			var updated = $$.updateAngle(d),
    +			    arcData = updated ? $$.convertToArcData(updated) : null;
    +			$$.showTooltip([arcData], this);
    +		}), isTouch && $$.hasArcType())) {
    +				var _getEventArc = function () {
    +					var touch = _d3Selection.event.changedTouches[0],
    +					    eventArc = (0, _d3Selection.select)(document.elementFromPoint(touch.clientX, touch.clientY));
    +
    +
    +					return eventArc;
    +				};
    +
    +				$$.svg.on("touchstart", function () {
    +					if (!$$.transiting) // skip while transiting
    +						{
    +							var eventArc = _getEventArc(),
    +							    datum = eventArc.datum(),
    +							    updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null,
    +							    arcData = updated ? $$.convertToArcData(updated) : null,
    +							    id = arcData && arcData.id || undefined;
    +
    +							id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onover(arcData, this);
    +						}
    +				}).on("touchend", function () {
    +					if (!$$.transiting) // skip while transiting
    +						{
    +							var eventArc = _getEventArc(),
    +							    datum = eventArc.datum(),
    +							    updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null,
    +							    arcData = updated ? $$.convertToArcData(updated) : null,
    +							    id = arcData && arcData.id || undefined;
    +
    +							id === undefined ? unselectArc() : selectArc(this, arcData, id), $$.config.data_onout(arcData, this);
    +						}
    +				}).on("touchmove", function () {
    +					var eventArc = _getEventArc(),
    +					    datum = eventArc.datum(),
    +					    updated = datum && datum.data && datum.data.id ? $$.updateAngle(datum) : null,
    +					    arcData = updated ? $$.convertToArcData(updated) : null,
    +					    id = arcData && arcData.id || undefined;
    +
    +					id === undefined ? unselectArc() : selectArc(this, arcData, id);
    +				});
    +			}
    +
    +		var gaugeTextValue = main.selectAll("." + _classes2.default.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
    +			return $$.isGaugeType(d.data) ? _classes2.default.gaugeValue : "";
    +		});
    +
    +		config.gauge_fullCircle && gaugeTextValue.attr("dy", "" + Math.round($$.radius / 14));
    +
    +
    +		// to handle multiline text for gauge type
    +		var textMethod = !gaugeTextValue.empty() && gaugeTextValue.classed(_classes2.default.gaugeValue) ? "call" : "text";
    +
    +		if (gaugeTextValue[textMethod]($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
    +			return $$.isGaugeType(d.data) ? Math.round($$.radius / 5) + "px" : "";
    +		}).transition().duration(duration).style("opacity", function (d) {
    +			return $$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? "1" : "0";
    +		}), main.select("." + _classes2.default.chartArcsTitle).style("opacity", $$.hasType("donut") || $$.hasType("gauge") ? "1" : "0"), $$.hasType("gauge")) {
    +			var endAngle = (config.gauge_fullCircle ? -4 : -1) * config.gauge_startingAngle;
    +
    +			$$.arcs.select("." + _classes2.default.chartArcsBackground).attr("d", function () {
    +				var d = {
    +					data: [{ value: config.gauge_max }],
    +					startAngle: config.gauge_startingAngle,
    +					endAngle: endAngle
    +				};
    +
    +				return $$.getArc(d, !0, !0);
    +			}), $$.arcs.select("." + _classes2.default.chartArcsGaugeUnit).attr("dy", ".75em").text(config.gauge_label_show ? config.gauge_units : ""), config.gauge_label_show && ($$.arcs.select("." + _classes2.default.chartArcsGaugeMin).attr("dx", -1 * ($$.innerRadius + ($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)), !config.gauge_fullCircle && $$.arcs.select("." + _classes2.default.chartArcsGaugeMax).attr("dx", $$.innerRadius + ($$.radius - $$.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0)));
    +		}
    +	},
    +	initGauge: function initGauge() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    arcs = $$.arcs;
    +		$$.hasType("gauge") && (arcs.append("path").attr("class", _classes2.default.chartArcsBackground), arcs.append("text").attr("class", _classes2.default.chartArcsGaugeUnit).style("text-anchor", "middle").style("pointer-events", "none"), config.gauge_label_show && (arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMin).style("text-anchor", "middle").style("pointer-events", "none"), !config.gauge_fullCircle && arcs.append("text").attr("class", _classes2.default.chartArcsGaugeMax).style("text-anchor", "middle").style("pointer-events", "none")));
    +	},
    +	getGaugeLabelHeight: function getGaugeLabelHeight() {
    +		return this.config.gauge_label_show ? 20 : 0;
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 33 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__33__;
    +
    +/***/ }),
    +/* 34 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initBar: function initBar() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars);
    +	},
    +	updateTargetsForBar: function updateTargetsForBar(targets) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    classChartBar = $$.classChartBar.bind($$),
    +		    classBars = $$.classBars.bind($$),
    +		    classFocus = $$.classFocus.bind($$),
    +		    mainBarUpdate = $$.main.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", function (d) {
    +			return classChartBar(d) + classFocus(d);
    +		}),
    +		    mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", "none");
    +
    +
    +		// Bars for each data
    +		mainBarEnter.append("g").attr("class", classBars).style("cursor", function (d) {
    +			return config.data_selection_isselectable(d) ? "pointer" : null;
    +		});
    +	},
    +	updateBar: function updateBar(durationForExit) {
    +		var $$ = this,
    +		    barData = $$.barData.bind($$),
    +		    classBar = $$.classBar.bind($$),
    +		    initialOpacity = $$.initialOpacity.bind($$),
    +		    color = function (d) {
    +			return $$.color(d.id);
    +		};
    +
    +		$$.mainBar = $$.main.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data(barData), $$.mainBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainBar = $$.mainBar.enter().append("path").attr("class", classBar).style("stroke", color).style("fill", color).merge($$.mainBar).style("opacity", initialOpacity);
    +	},
    +	redrawBar: function redrawBar(drawBar, withTransition) {
    +		return [(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar).attr("d", drawBar).style("fill", this.color).style("opacity", "1")];
    +	},
    +	getBarW: function getBarW(axis, barTargetsNum) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    w = (0, _util.isNumber)(config.bar_width) ? config.bar_width : barTargetsNum ? axis.tickInterval($$.getMaxDataCount()) * config.bar_width_ratio / barTargetsNum : 0;
    +
    +
    +		return config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w;
    +	},
    +	getBars: function getBars(i, id) {
    +		var $$ = this,
    +		    suffix = (0, _util.isValue)(i) ? "-" + i : "";
    +
    +
    +		return (id ? $$.main.selectAll("." + _classes2.default.bars + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.bar + suffix);
    +	},
    +	expandBars: function expandBars(i, id, reset) {
    +		var $$ = this;
    +
    +		reset && $$.unexpandBars(), $$.getBars(i, id).classed(_classes2.default.EXPANDED, !0);
    +	},
    +	unexpandBars: function unexpandBars(i) {
    +		this.getBars(i).classed(_classes2.default.EXPANDED, !1);
    +	},
    +	generateDrawBar: function generateDrawBar(barIndices, isSub) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    getPoints = $$.generateGetBarPoints(barIndices, isSub),
    +		    isRotated = config.axis_rotated,
    +		    isGrouped = config.data_groups.length,
    +		    barRadius = config.bar_radius,
    +		    barRadiusRatio = config.bar_radius_ratio,
    +		    getRadius = (0, _util.isNumber)(barRadius) && barRadius > 0 ? function () {
    +			return barRadius;
    +		} : (0, _util.isNumber)(barRadiusRatio) ? function (w) {
    +			return w * barRadiusRatio;
    +		} : null;
    +
    +		// get the bar radius
    +
    +		return function (d, i) {
    +			// 4 points that make a bar
    +			var points = getPoints(d, i),
    +			    indexX = +isRotated,
    +			    indexY = +!indexX,
    +			    isNegative = d.value < 0,
    +			    pathRadius = ["", ""],
    +			    radius = 0;
    +
    +			// switch points if axis is rotated, not applicable for sub chart
    +
    +			if (getRadius && !isGrouped) {
    +				var index = isRotated ? indexY : indexX,
    +				    barW = points[2][index] - points[0][index];
    +				radius = getRadius(barW);
    +
    +
    +				var arc = "a" + radius + "," + radius + " " + (isNegative ? "1 0 0" : "0 0 1") + " ";
    +
    +				pathRadius[+!isRotated] = "" + arc + radius + "," + radius, pathRadius[+isRotated] = "" + arc + [-radius, radius][isRotated ? "sort" : "reverse"](), isNegative && pathRadius.reverse();
    +			}
    +
    +			// path string data shouldn't be containing new line chars
    +			// https://github.com/naver/billboard.js/issues/530
    +			var path = isRotated ? "H" + (points[1][indexX] - radius) + " " + pathRadius[0] + "V" + (points[2][indexY] - radius) + " " + pathRadius[1] + "H" + points[3][indexX] : "V" + (points[1][indexY] + (isNegative ? -radius : radius)) + " " + pathRadius[0] + "H" + (points[2][indexX] - radius) + " " + pathRadius[1] + "V" + points[3][indexY];
    +
    +			return "M" + points[0][indexX] + "," + points[0][indexY] + path + "z";
    +		};
    +	},
    +	generateGetBarPoints: function generateGetBarPoints(barIndices, isSub) {
    +		var $$ = this,
    +		    axis = isSub ? $$.subXAxis : $$.xAxis,
    +		    barTargetsNum = barIndices.__max__ + 1,
    +		    barW = $$.getBarW(axis, barTargetsNum),
    +		    barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub),
    +		    barY = $$.getShapeY(!!isSub),
    +		    barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub),
    +		    yScale = isSub ? $$.getSubYScale : $$.getYScale;
    +
    +
    +		return function (d, i) {
    +			var y0 = yScale.call($$, d.id)(0),
    +			    offset = barOffset(d, i) || y0,
    +			    posX = barX(d),
    +			    posY = barY(d); // offset is for stacked bar chart
    +
    +
    +			// fix posY not to overflow opposite quadrant
    +
    +			// 4 points that make a bar
    +			return $$.config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX + barW, posY - (y0 - offset)], [posX + barW, offset]];
    +		};
    +	},
    +	isWithinBar: function isWithinBar(that) {
    +		var mouse = (0, _d3Selection.mouse)(that),
    +		    list = (0, _util.getRectSegList)(that),
    +		    box = that.getBBox(),
    +		    seg0 = list[0],
    +		    seg1 = list[1],
    +		    x = Math.min(seg0.x, seg1.x),
    +		    y = Math.min(seg0.y, seg1.y),
    +		    w = box.width,
    +		    h = box.height;
    +
    +
    +		return x - 2 < mouse[0] && mouse[0] < x + w + 2 && y - 2 < mouse[1] && mouse[1] < y + h + 2;
    +	}
    +});
    +
    +/***/ }),
    +/* 35 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Array = __webpack_require__(6),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initializer
    +  * @private
    +  */
    +	initBubble: function initBubble() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.hasType("bubble") && (config.point_show = !0, config.point_type = "circle", config.point_sensitivity = 25);
    +	},
    +
    +
    +	/**
    +  * Get user agent's computed value for the total length of the path in user units
    +  * https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength
    +  * @return {Number}
    +  * @private
    +  */
    +	getBaseLength: function getBaseLength() {
    +		var $$ = this,
    +		    baseLength = $$.getCache("$baseLength");
    +
    +
    +		return baseLength || $$.addCache("$baseLength", baseLength = (0, _d3Array.min)([$$.axes.x.select("path").node().getTotalLength(), $$.axes.y.select("path").node().getTotalLength()])), baseLength;
    +	},
    +
    +
    +	/**
    +  * Get the radius value for bubble circle
    +  * @param {Object} d
    +  * @return {Number}
    +  * @private
    + 	 */
    +	getBubbleR: function getBubbleR(d) {
    +		var $$ = this,
    +		    maxR = $$.config.bubble_maxR;
    +		(0, _util.isFunction)(maxR) ? maxR = maxR(d) : !(0, _util.isNumber)(maxR) && (maxR = $$.getBaseLength() / ($$.getMaxDataCount() * 2) + 12);
    +		var max = (0, _d3Array.max)($$.getMinMaxData().max.map(function (d) {
    +			return (0, _util.isObject)(d.value) ? d.value.mid : d.value;
    +		})),
    +		    maxArea = maxR * maxR * Math.PI,
    +		    area = d.value * (maxArea / max);
    +
    +
    +		return Math.sqrt(area / Math.PI);
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 36 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Shape = __webpack_require__(31),
    +    _d3Selection = __webpack_require__(5),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initLine: function initLine() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines);
    +	},
    +	updateTargetsForLine: function updateTargetsForLine(targets) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    classChartLine = $$.classChartLine.bind($$),
    +		    classLines = $$.classLines.bind($$),
    +		    classAreas = $$.classAreas.bind($$),
    +		    classCircles = $$.classCircles.bind($$),
    +		    classFocus = $$.classFocus.bind($$),
    +		    mainLineUpdate = $$.main.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", function (d) {
    +			return classChartLine(d) + classFocus(d);
    +		}),
    +		    mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none");
    +
    +
    +		// Lines for each data
    +		mainLineEnter.append("g").attr("class", classLines), mainLineEnter.append("g").attr("class", classAreas), config.point_show && (config.data_selection_enabled && mainLineEnter.append("g").attr("class", function (d) {
    +			return $$.generateClass(_classes2.default.selectedCircles, d.id);
    +		}), mainLineEnter.append("g").attr("class", classCircles).style("cursor", function (d) {
    +			return config.data_selection_isselectable(d) ? "pointer" : null;
    +		})), targets.forEach(function (t) {
    +			$$.main.selectAll("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + _classes2.default.selectedCircle).each(function (d) {
    +				d.value = t.values[d.index].value;
    +			});
    +		});
    +	},
    +	updateLine: function updateLine(durationForExit) {
    +		var $$ = this;
    +
    +		$$.mainLine = $$.main.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.mainLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainLine = $$.mainLine.enter().append("path").attr("class", function (d) {
    +			return $$.classLine.bind($$)(d) + " " + ($$.extraLineClasses(d) || "");
    +		}).style("stroke", $$.color).merge($$.mainLine).style("opacity", $$.initialOpacity.bind($$)).style("shape-rendering", function (d) {
    +			return $$.isStepType(d) ? "crispEdges" : "";
    +		}).attr("transform", null);
    +	},
    +	redrawLine: function redrawLine(drawLine, withTransition) {
    +		return [(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine).attr("d", drawLine).style("stroke", this.color).style("opacity", "1")];
    +	},
    +
    +
    +	/**
    +  * Get the curve interpolate
    +  * @param {Array} d Data object
    +  * @return {Function}
    +  * @private
    +  */
    +	getCurve: function getCurve(d) {
    +		var $$ = this,
    +		    isRotatedStepType = $$.config.axis_rotated && $$.isStepType(d);
    +
    +
    +		// when is step & rotated, should be computed in different way
    +		// https://github.com/naver/billboard.js/issues/471
    +		return isRotatedStepType ? function (context) {
    +			var step = $$.getInterpolate(d)(context);
    +
    +			// keep the original method
    +
    +
    +			return step.orgPoint = step.point, step.pointRotated = function (x, y) {
    +				this._point === 1 && (this._point = 2);
    +
    +
    +				var y1 = this._y * (1 - this._t) + y * this._t;
    +
    +				this._context.lineTo(this._x, y1), this._context.lineTo(x, y1), this._x = x, this._y = y;
    +			}, step.point = function (x, y) {
    +				this._point === 0 ? this.orgPoint(x, y) : this.pointRotated(x, y);
    +			}, step;
    +		} : $$.getInterpolate(d);
    +	},
    +	generateDrawLine: function generateDrawLine(lineIndices, isSub) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    lineConnectNull = config.line_connectNull,
    +		    isRotated = config.axis_rotated,
    +		    getPoints = $$.generateGetLinePoints(lineIndices, isSub),
    +		    yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,
    +		    xValue = function (d) {
    +			return (isSub ? $$.subxx : $$.xx).call($$, d);
    +		},
    +		    yValue = function (d, i) {
    +			return config.data_groups.length > 0 ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getBaseValue(d));
    +		},
    +		    line = (0, _d3Shape.line)();
    +
    +		return line = isRotated ? line.x(yValue).y(xValue) : line.x(xValue).y(yValue), lineConnectNull || (line = line.defined(function (d) {
    +			return $$.getBaseValue(d) !== null;
    +		})), function (d) {
    +			var x = isSub ? $$.x : $$.subX,
    +			    y = yScaleGetter.call($$, d.id),
    +			    values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,
    +			    x0 = 0,
    +			    y0 = 0,
    +			    path = void 0;
    +
    +
    +			return $$.isLineType(d) ? config.data_regions[d.id] ? path = $$.lineWithRegions(values, x, y, config.data_regions[d.id]) : ($$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = line.curve($$.getCurve(d))(values)) : (values[0] && (x0 = x(values[0].x), y0 = y(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0), path || "M 0 0";
    +		};
    +	},
    +	generateGetLinePoints: function generateGetLinePoints(lineIndices, isSubValue) {
    +		// partial duplication of generateGetBarPoints
    +		var $$ = this,
    +		    config = $$.config,
    +		    lineTargetsNum = lineIndices.__max__ + 1,
    +		    isSub = !!isSubValue,
    +		    x = $$.getShapeX(0, lineTargetsNum, lineIndices, isSub),
    +		    y = $$.getShapeY(isSub),
    +		    lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, isSub),
    +		    yScale = isSub ? $$.getSubYScale : $$.getYScale;
    +
    +
    +		return function (d, i) {
    +			var y0 = yScale.call($$, d.id)(0),
    +			    offset = lineOffset(d, i) || y0,
    +			    posX = x(d),
    +			    posY = y(d); // offset is for stacked area chart
    +
    +			// fix posY not to overflow opposite quadrant
    +			config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0);
    +
    +
    +			// 1 point that marks the line position
    +			var point = [posX, posY - (y0 - offset)];
    +
    +			return [point, point, // from here and below, needed for compatibility
    +			point, point];
    +		};
    +	},
    +	lineWithRegions: function lineWithRegions(d, x, y, _regions) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    isTimeSeries = $$.isTimeSeries(),
    +		    xOffset = $$.isCategorized() ? .5 : 0,
    +		    regions = [],
    +		    xp = void 0,
    +		    yp = void 0,
    +		    diff = void 0,
    +		    diffx2 = void 0,
    +		    isWithinRegions = function (withinX, withinRegions) {
    +			for (var reg, i = 0; reg = withinRegions[i]; i++) if (reg.start < withinX && withinX <= reg.end) return reg.style;
    +
    +			return !1;
    +		}; // default value
    +
    +		// check weather data is within region
    +
    +
    +		// Check start/end of regions
    +		if ((0, _util.isDefined)(_regions)) {
    +			var getValue = function (v, def) {
    +				return (0, _util.isUndefined)(v) ? def : isTimeSeries ? $$.parseDate(v) : v;
    +			};
    +
    +			for (var reg, i = 0; reg = _regions[i]; i++) {
    +				var start = getValue(reg.start, d[0].x),
    +				    end = getValue(reg.end, d[d.length - 1].x),
    +				    style = reg.style || { dasharray: "2 2" };
    +				regions[i] = { start: start, end: end, style: style };
    +			}
    +		}
    +
    +		// Set scales
    +
    +		var xValue = isRotated ? function (dt) {
    +			return y(dt.value);
    +		} : function (dt) {
    +			return x(dt.x);
    +		},
    +		    yValue = isRotated ? function (dt) {
    +			return x(dt.x);
    +		} : function (dt) {
    +			return y(dt.value);
    +		},
    +		    generateM = function (points) {
    +			return "M" + points[0][0] + "," + points[0][1] + "L" + points[1][0] + "," + points[1][1];
    +		},
    +		    sWithRegion = isTimeSeries ? function (d0, d1, k, timeseriesDiff) {
    +			var x0 = d0.x.getTime(),
    +			    xDiff = d1.x - d0.x,
    +			    xv0 = new Date(x0 + xDiff * k),
    +			    xv1 = new Date(x0 + xDiff * (k + timeseriesDiff)),
    +			    points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];
    +
    +
    +			return generateM(points);
    +		} : function (d0, d1, k, otherDiff) {
    +			var points = isRotated ? [[y(yp(k), !0), x(xp(k))], [y(yp(k + otherDiff), !0), x(xp(k + otherDiff))]] : [[x(xp(k), !0), y(yp(k))], [x(xp(k + otherDiff), !0), y(yp(k + otherDiff))]];
    +
    +			return generateM(points);
    +		},
    +		    path = "M";
    +
    +		// Define svg generator function for region
    +
    +
    +		// Generate
    +
    +
    +		for (var data, _i = 0; data = d[_i]; _i++) {
    +			var prevData = d[_i - 1],
    +			    style = isWithinRegions(data.x, regions);
    +
    +
    +			// Draw as normal
    +			if ((0, _util.isUndefined)(regions) || !style) path += "" + (_i ? "L" : "") + xValue(data) + "," + yValue(data);else {
    +				try {
    +					style = style.dasharray.split(" ");
    +				} catch (e) {
    +					style = "2 2".split(" ");
    +				}
    +
    +				// Draw with region // TODO: Fix for horizotal charts
    +				xp = $$.getScale(prevData.x + xOffset, data.x + xOffset, isTimeSeries), yp = $$.getScale(prevData.value, data.value);
    +				var dx = x(data.x) - x(prevData.x),
    +				    dy = y(data.value) - y(prevData.value),
    +				    dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
    +				diff = style[0] / dd, diffx2 = diff * style[1];
    +
    +
    +				for (var j = diff; j <= 1; j += diffx2) path += sWithRegion(prevData, data, j, diff), j + diffx2 >= 1 && (path += sWithRegion(prevData, data, 1, 0));
    +			}
    +		}
    +
    +		return path;
    +	},
    +	updateArea: function updateArea(durationForExit) {
    +		var $$ = this;
    +
    +		$$.mainArea = $$.main.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.mainArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.mainArea = $$.mainArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () {
    +			return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0";
    +		}).merge($$.mainArea), $$.mainArea.style("opacity", $$.orgAreaOpacity);
    +	},
    +	redrawArea: function redrawArea(drawArea, withTransition) {
    +		var $$ = this;
    +
    +		return [(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea).attr("d", drawArea).style("fill", this.color).style("opacity", function (d) {
    +			return $$.isAreaRangeType(d) ? $$.orgAreaOpacity / 1.75 : $$.orgAreaOpacity;
    +		})];
    +	},
    +
    +
    +	/**
    +  * Generate area path data
    +  * @param areaIndices
    +  * @param isSub
    +  * @return {function(*=): (*|string)}
    +  * @private
    +  */
    +	generateDrawArea: function generateDrawArea(areaIndices, isSub) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    lineConnectNull = config.line_connectNull,
    +		    isRotated = config.axis_rotated,
    +		    isGrouped = config.data_groups.length > 0,
    +		    getPoints = $$.generateGetAreaPoints(areaIndices, isSub),
    +		    yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale,
    +		    xValue = function (d) {
    +			return (isSub ? $$.subxx : $$.xx).call($$, d);
    +		},
    +		    value0 = function (d, i) {
    +			return isGrouped ? getPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "high") : $$.getAreaBaseValue(d.id));
    +		},
    +		    value1 = function (d, i) {
    +			return isGrouped ? getPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)($$.isAreaRangeType(d) ? $$.getAreaRangeData(d, "low") : d.value);
    +		};
    +
    +		return function (d) {
    +			var values = lineConnectNull ? $$.filterRemoveNull(d.values) : d.values,
    +			    x0 = 0,
    +			    y0 = 0,
    +			    path = void 0;
    +
    +
    +			if ($$.isAreaType(d)) {
    +				var area = (0, _d3Shape.area)();
    +
    +				area = isRotated ? area.y(xValue).x0(value0).x1(value1) : area.x(xValue).y0(config.area_above ? 0 : value0).y1(value1), lineConnectNull || (area = area.defined(function (d) {
    +					return $$.getBaseValue(d) !== null;
    +				})), $$.isStepType(d) && (values = $$.convertValuesToStep(values)), path = area.curve($$.getCurve(d))(values);
    +			} else values[0] && (x0 = $$.x(values[0].x), y0 = $$.getYScale(d.id)(values[0].value)), path = isRotated ? "M " + y0 + " " + x0 : "M " + x0 + " " + y0;
    +
    +			return path || "M 0 0";
    +		};
    +	},
    +	getAreaBaseValue: function getAreaBaseValue() {
    +		return 0;
    +	},
    +	generateGetAreaPoints: function generateGetAreaPoints(areaIndices, isSub) {
    +		// partial duplication of generateGetBarPoints
    +		var $$ = this,
    +		    config = $$.config,
    +		    areaTargetsNum = areaIndices.__max__ + 1,
    +		    x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub),
    +		    y = $$.getShapeY(!!isSub),
    +		    areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub),
    +		    yScale = isSub ? $$.getSubYScale : $$.getYScale;
    +
    +
    +		return function (d, i) {
    +			var y0 = yScale.call($$, d.id)(0),
    +			    offset = areaOffset(d, i) || y0,
    +			    posX = x(d),
    +			    posY = y(d); // offset is for stacked area chart
    +
    +
    +			// fix posY not to overflow opposite quadrant
    +
    +			// 1 point that marks the area position
    +			return config.axis_rotated && (d.value > 0 && posY < y0 || d.value < 0 && y0 < posY) && (posY = y0), [[posX, offset], [posX, posY - (y0 - offset)], [posX, posY - (y0 - offset)], // needed for compatibility
    +			[posX, offset] // needed for compatibility
    +			];
    +		};
    +	},
    +	updateCircle: function updateCircle() {
    +		var $$ = this;
    +
    +		$$.config.point_show && ($$.mainCircle = $$.main.selectAll("." + _classes2.default.circles).selectAll("." + _classes2.default.circle).data(function (d) {
    +			return !$$.isBarType(d) && (!$$.isLineType(d) || $$.shouldDrawPointsForLine(d)) && $$.labelishData(d);
    +		}), $$.mainCircle.exit().remove(), $$.mainCircle = $$.mainCircle.enter().append($$.point("create", this, $$.classCircle.bind($$), $$.pointR.bind($$), $$.color)).merge($$.mainCircle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$)));
    +	},
    +	redrawCircle: function redrawCircle(cx, cy, withTransition, flow) {
    +		var $$ = this,
    +		    selectedCircles = $$.main.selectAll("." + _classes2.default.selectedCircle);
    +
    +
    +		if (!$$.config.point_show) return [];
    +
    +		var mainCircles = [];
    +
    +		$$.mainCircle.each(function (d) {
    +			var fn = $$.point("update", $$, cx, cy, $$.opacityForCircle.bind($$), $$.color, withTransition, flow, selectedCircles).bind(this),
    +			    result = fn(d);
    +			mainCircles.push(result);
    +		});
    +
    +
    +		var posAttr = $$.isCirclePoint() ? "c" : "";
    +
    +		return [mainCircles, selectedCircles.attr(posAttr + "x", cx).attr(posAttr + "y", cy)];
    +	},
    +	circleX: function circleX(d) {
    +		var $$ = this,
    +		    hasValue = (0, _util.isValue)(d.x);
    +
    +
    +		return $$.config.zoom_enabled && $$.zoomScale ? hasValue ? $$.zoomScale(d.x) : null : hasValue ? $$.x(d.x) : null;
    +	},
    +	updateCircleY: function updateCircleY() {
    +		var $$ = this,
    +		    lineIndices = void 0,
    +		    getPoints = void 0;
    +		$$.config.data_groups.length > 0 ? (lineIndices = $$.getShapeIndices($$.isLineType), getPoints = $$.generateGetLinePoints(lineIndices), $$.circleY = function (d, i) {
    +			return getPoints(d, i)[0][1];
    +		}) : $$.circleY = function (d) {
    +			return $$.getYScale(d.id)($$.getBaseValue(d));
    +		};
    +	},
    +	getCircles: function getCircles(i, id) {
    +		var $$ = this,
    +		    suffix = (0, _util.isValue)(i) ? "-" + i : "";
    +
    +
    +		return (id ? $$.main.selectAll("." + _classes2.default.circles + $$.getTargetSelectorSuffix(id)) : $$.main).selectAll("." + _classes2.default.circle + suffix);
    +	},
    +	expandCircles: function expandCircles(i, id, reset) {
    +		var $$ = this,
    +		    r = $$.pointExpandedR.bind($$);
    +		reset && $$.unexpandCircles();
    +		var circles = $$.getCircles(i, id).classed(_classes2.default.EXPANDED, !0),
    +		    scale = r(circles) / $$.config.point_r;
    +		$$.isCirclePoint() ? circles.attr("r", r) : circles.each(function () {
    +			var point = (0, _d3Selection.select)(this),
    +			    box = this.getBBox(),
    +			    x1 = box.x + box.width * .5,
    +			    y1 = box.y + box.height * .5;
    +			this.tagName === "circle" ? point.attr("r", r) : point.style("transform", "translate(" + (1 - scale) * x1 + "px, " + (1 - scale) * y1 + "px) scale(" + scale + ")");
    +		});
    +	},
    +	unexpandCircles: function unexpandCircles(i) {
    +		var $$ = this,
    +		    r = $$.pointR.bind($$),
    +		    circles = $$.getCircles(i).filter(function () {
    +			return (0, _d3Selection.select)(this).classed(_classes2.default.EXPANDED);
    +		}).classed(_classes2.default.EXPANDED, !1);
    +		circles.attr("r", r), $$.isCirclePoint() || circles.style("transform", "scale(" + r(circles) / $$.config.point_r + ")");
    +	},
    +	pointR: function (d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    pointR = config.point_r,
    +		    r = pointR;
    +
    +
    +		return $$.isStepType(d) ? r = 0 : $$.isBubbleType(d) ? r = $$.getBubbleR(d) : (0, _util.isFunction)(pointR) && (r = pointR(d)), r;
    +	},
    +	pointExpandedR: function pointExpandedR(d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    scale = $$.isBubbleType(d) ? 1.15 : 1.75;
    +
    +
    +		return config.point_focus_expand_enabled ? config.point_focus_expand_r || $$.pointR(d) * scale : $$.pointR(d);
    +	},
    +	pointSelectR: function pointSelectR(d) {
    +		var $$ = this,
    +		    selectR = $$.config.point_select_r;
    +
    +
    +		return (0, _util.isFunction)(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4;
    +	},
    +	isWithinCircle: function isWithinCircle(node, r) {
    +		var mouse = (0, _d3Selection.mouse)(node),
    +		    element = (0, _d3Selection.select)(node),
    +		    prefix = this.isCirclePoint() ? "c" : "",
    +		    cx = +element.attr(prefix + "x"),
    +		    cy = +element.attr(prefix + "y");
    +
    +
    +		// if node don't have cx/y or x/y attribute value
    +		if (!(cx || cy) && node.nodeType === 1) {
    +			var domRect = node.getBBox ? node.getBBox() : node.getBoundingClientRect();
    +
    +			cx = domRect.x, cy = domRect.y;
    +		}
    +
    +		return Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r;
    +	},
    +	isWithinStep: function isWithinStep(that, y) {
    +		return Math.abs(y - (0, _d3Selection.mouse)(that)[1]) < 30;
    +	},
    +	shouldDrawPointsForLine: function shouldDrawPointsForLine(d) {
    +		var linePoint = this.config.line_point;
    +
    +		return linePoint === !0 || (0, _util.isArray)(linePoint) && linePoint.indexOf(d.id) !== -1;
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 37 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	hasValidPointType: function hasValidPointType(type) {
    +		return (/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(type || this.config.point_type)
    +		);
    +	},
    +	hasValidPointDrawMethods: function hasValidPointDrawMethods(type) {
    +		var pointType = type || this.config.point_type;
    +
    +		return (0, _util.isObjectType)(pointType) && (0, _util.isFunction)(pointType.create) && (0, _util.isFunction)(pointType.update);
    +	},
    +	insertPointInfoDefs: function insertPointInfoDefs(point, id) {
    +		var $$ = this,
    +		    parser = new DOMParser(),
    +		    doc = parser.parseFromString(point, "image/svg+xml"),
    +		    node = doc.firstChild,
    +		    clone = document.createElementNS(_d3Selection.namespaces.svg, node.nodeName.toLowerCase()),
    +		    attribs = node.attributes;
    +
    +
    +		for (var name, i = 0; name = attribs[i]; i++) name = name.name, clone.setAttribute(name, node.getAttribute(name));
    +
    +		clone.id = id, clone.style.fill = "inherit", clone.style.stroke = "inherit", node.children.length && (clone.innerHTML = (0, _util.toArray)(node.children).map(function (v) {
    +			return v.outerHTML;
    +		}).join("")), $$.defs.node().appendChild(clone);
    +	},
    +	pointFromDefs: function pointFromDefs(id) {
    +		return this.defs.select("#" + id);
    +	},
    +	generatePoint: function generatePoint() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    ids = [],
    +		    pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type];
    +
    +
    +		return function (method, context) {
    +			for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
    +
    +			return function (d) {
    +				var id = d.id || d.data && d.data.id || d,
    +				    element = (0, _d3Selection.select)(this),
    +				    point = void 0;
    +
    +
    +				if (ids.indexOf(id) < 0 && ids.push(id), point = pattern[ids.indexOf(id) % pattern.length], $$.hasValidPointType(point)) point = $$[point];else if (!$$.hasValidPointDrawMethods(point)) {
    +					var pointId = $$.datetimeId + "-point-" + id,
    +					    pointFromDefs = $$.pointFromDefs(pointId);
    +
    +
    +					if (pointFromDefs.size() < 1 && $$.insertPointInfoDefs(point, pointId), method === "create") return $$.custom.create.bind(context).apply(undefined, [element, pointId].concat(args));
    +					if (method === "update") return $$.custom.update.bind(context).apply(undefined, [element].concat(args));
    +				}
    +
    +				return point[method].bind(context).apply(undefined, [element].concat(args));
    +			};
    +		};
    +	},
    +	getTransitionName: function getTransitionName() {
    +		return Math.random().toString();
    +	},
    +
    +
    +	custom: {
    +		create: function create(element, id, cssClassFn, sizeFn, fillStyleFn) {
    +			return element.append("use").attr("xlink:href", "#" + id).attr("class", cssClassFn).style("fill", fillStyleFn).node();
    +		},
    +		update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {
    +			var $$ = this,
    +			    box = element.node().getBBox();
    +			box.width /= 2, box.height /= 2;
    +
    +			var xPosFn2 = function (d) {
    +				return xPosFn(d) - box.width;
    +			},
    +			    yPosFn2 = function (d) {
    +				return yPosFn(d) - box.height;
    +			},
    +			    mainCircles = element;
    +
    +			if (withTransition) {
    +				var transitionName = $$.getTransitionName();
    +
    +				flow && (mainCircles = element.attr("x", xPosFn2)), mainCircles = element.transition(transitionName).attr("x", xPosFn2).attr("y", yPosFn2).transition(transitionName), selectedCircles.transition($$.getTransitionName());
    +			} else mainCircles = element.attr("x", xPosFn2).attr("y", yPosFn2);
    +
    +			return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn);
    +		}
    +	},
    +
    +	// 'circle' data point
    +	circle: {
    +		create: function create(element, cssClassFn, sizeFn, fillStyleFn) {
    +			return element.append("circle").attr("class", cssClassFn).attr("r", sizeFn).style("fill", fillStyleFn).node();
    +		},
    +		update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {
    +			var $$ = this,
    +			    mainCircles = element;
    +
    +			// when '.load()' called, bubble size should be updated
    +
    +			if ($$.hasType("bubble") && (mainCircles = mainCircles.attr("r", $$.pointR.bind($$))), withTransition) {
    +				var transitionName = $$.getTransitionName();
    +
    +				flow && (mainCircles = mainCircles.attr("cx", xPosFn)), mainCircles = mainCircles.transition(transitionName).attr("cx", xPosFn).attr("cy", yPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName());
    +			} else mainCircles = mainCircles.attr("cx", xPosFn).attr("cy", yPosFn);
    +
    +			return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn);
    +		}
    +	},
    +
    +	// 'rectangle' data point
    +	rectangle: {
    +		create: function create(element, cssClassFn, sizeFn, fillStyleFn) {
    +			var rectSizeFn = function (d) {
    +				return sizeFn(d) * 2;
    +			};
    +
    +			return element.append("rect").attr("class", cssClassFn).attr("width", rectSizeFn).attr("height", rectSizeFn).style("fill", fillStyleFn).node();
    +		},
    +		update: function update(element, xPosFn, yPosFn, opacityStyleFn, fillStyleFn, withTransition, flow, selectedCircles) {
    +			var $$ = this,
    +			    r = $$.config.point_r,
    +			    rectXPosFn = function (d) {
    +				return xPosFn(d) - r;
    +			},
    +			    rectYPosFn = function (d) {
    +				return yPosFn(d) - r;
    +			},
    +			    mainCircles = element;
    +
    +			if (withTransition) {
    +				var transitionName = $$.getTransitionName();
    +
    +				flow && (mainCircles = mainCircles.attr("x", rectXPosFn)), mainCircles = mainCircles.transition(transitionName).attr("x", rectXPosFn).attr("y", rectYPosFn).transition(transitionName), selectedCircles.transition($$.getTransitionName());
    +			} else mainCircles = mainCircles.attr("x", rectXPosFn).attr("y", rectYPosFn);
    +
    +			return mainCircles.style("opacity", opacityStyleFn).style("fill", fillStyleFn);
    +		}
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 38 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Array = __webpack_require__(6),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Get the position value
    + * @param {Boolean} isClockwise If the direction is clockwise
    + * @param {String} type Coordinate type 'x' or 'y'
    + * @param {Number} edge Number of edge
    + * @param {Number} pos The indexed position
    + * @param {Number} range
    + * @param {Number} ratio
    + * @return {number}
    + * @private
    + */
    +function getPosition(isClockwise, type, edge, pos, range, ratio) {
    +	var index = isClockwise && pos > 0 ? edge - pos : pos,
    +	    r = 2 * Math.PI,
    +	    func = type === "x" ? Math.sin : Math.cos;
    +
    +
    +	return range * (1 - ratio * func(index * r / edge));
    +}
    +
    +// cache key
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var cacheKey = "$radarPoints";
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initRadar: function initRadar() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.hasType("radar") && ($$.radars = $$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartRadars), $$.radars.levels = $$.radars.append("g").attr("class", _classes2.default.levels), $$.radars.axes = $$.radars.append("g").attr("class", _classes2.default.axis), $$.radars.shapes = $$.radars.append("g").attr("class", _classes2.default.shapes), $$.maxValue = config.radar_axis_max || $$.getMinMaxData().max[0].value);
    +	},
    +	getRadarSize: function getRadarSize() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    padding = config.axis_x_categories.length < 4 ? -20 : 10,
    +		    size = (Math.min($$.arcWidth, $$.arcHeight) - padding) / 2;
    +
    +
    +		return [size, size];
    +	},
    +	updateTargetsForRadar: function updateTargetsForRadar(targets) {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.isEmpty)(config.axis_x_categories) && (config.axis_x_categories = (0, _d3Array.range)(0, (0, _d3Array.max)(targets).values.length)), $$.generateRadarPoints();
    +	},
    +	getRadarPosition: function getRadarPosition(type, index, range, ratio) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    _$$$getRadarSize = $$.getRadarSize(),
    +		    width = _$$$getRadarSize[0],
    +		    height = _$$$getRadarSize[1],
    +		    edge = config.axis_x_categories.length,
    +		    isClockwise = config.radar_direction_clockwise,
    +		    pos = (0, _util.toArray)(type).map(function (v) {
    +			return getPosition(isClockwise, v, edge, index, (0, _util.isDefined)(range) ? range : type === "x" ? width : height, ratio || config.radar_size_ratio);
    +		});
    +
    +		return pos.length === 1 ? pos[0] : pos;
    +	},
    +
    +
    +	/**
    +  * Generate data points
    +  * @private
    +  */
    +	generateRadarPoints: function generateRadarPoints() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    targets = $$.data.targets,
    +		    _$$$getRadarSize2 = $$.getRadarSize(),
    +		    width = _$$$getRadarSize2[0],
    +		    height = _$$$getRadarSize2[1],
    +		    points = $$.getCache(cacheKey) || {},
    +		    size = points._size;
    +
    +		// recalculate position only when the previous dimension has been changed
    +		if (!size || size.width !== width && size.height !== height) {
    +			var getRatio = function (v) {
    +				return parseFloat(Math.max(v, 0)) / $$.maxValue * config.radar_size_ratio;
    +			};
    +
    +			targets.forEach(function (d) {
    +				points[d.id] = d.values.map(function (v, i) {
    +					return $$.getRadarPosition(["x", "y"], i, undefined, getRatio(v.value));
    +				});
    +			}), points._size = { width: width, height: height }, $$.addCache(cacheKey, points);
    +		}
    +	},
    +	redrawRadar: function redrawRadar(duration, durationForExit) {
    +		var $$ = this,
    +		    translate = $$.getTranslate("radar");
    +
    +
    +		// Adjust radar, circles and texts' position
    +		translate && ($$.radars.attr("transform", translate), $$.main.selectAll("." + _classes2.default.circles).attr("transform", translate), $$.main.select("." + _classes2.default.chartTexts).attr("transform", translate), $$.generateRadarPoints(), $$.updateRadarLevel(), $$.updateRadarAxes(), $$.updateRadarShape(duration, durationForExit));
    +	},
    +	generateGetRadarPoints: function generateGetRadarPoints() {
    +		var $$ = this,
    +		    points = $$.getCache(cacheKey);
    +
    +
    +		return function (d, i) {
    +			var point = points[d.id][i];
    +
    +			return [point, point, point, point];
    +		};
    +	},
    +	updateRadarLevel: function updateRadarLevel() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    _$$$getRadarSize3 = $$.getRadarSize(),
    +		    width = _$$$getRadarSize3[0],
    +		    height = _$$$getRadarSize3[1],
    +		    depth = config.radar_level_depth,
    +		    edge = config.axis_x_categories.length,
    +		    showText = config.radar_level_text_show,
    +		    radarLevels = $$.radars.levels,
    +		    levelData = (0, _d3Array.range)(0, depth),
    +		    radius = config.radar_size_ratio * Math.min(width, height),
    +		    levelRatio = levelData.map(function (l) {
    +			return radius * ((l + 1) / depth);
    +		}),
    +		    levelTextFormat = config.radar_level_text_format,
    +		    points = levelData.map(function (v) {
    +			var range = levelRatio[v],
    +			    pos = (0, _d3Array.range)(0, edge).map(function (i) {
    +				return $$.getRadarPosition(["x", "y"], i, range, 1).join(",");
    +			});
    +
    +
    +			return pos.join(" ");
    +		}),
    +		    level = radarLevels.selectAll("." + _classes2.default.level).data(levelData);
    +
    +		// Generate points
    +		level.exit().remove();
    +
    +
    +		var levelEnter = level.enter().append("g").attr("class", function (d, i) {
    +			return _classes2.default.level + " " + _classes2.default.level + "-" + i;
    +		});
    +
    +		levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden"), showText && (radarLevels.select("text").empty() && radarLevels.append("text").attr("dx", "-.5em").attr("dy", "-.7em").style("text-anchor", "end").text(function () {
    +			return levelTextFormat(0);
    +		}), levelEnter.append("text").attr("dx", "-.5em").style("text-anchor", "end").text(function (d) {
    +			return levelTextFormat($$.maxValue / levelData.length * (d + 1));
    +		})), levelEnter.merge(level).attr("transform", function (d) {
    +			return "translate(" + (width - levelRatio[d]) + ", " + (height - levelRatio[d]) + ")";
    +		}).selectAll("polygon").attr("points", function (d) {
    +			return points[d];
    +		}), showText && radarLevels.selectAll("text").attr("x", function (d) {
    +			return (0, _util.isUndefined)(d) ? width : points[d].split(",")[0];
    +		}).attr("y", function (d) {
    +			return (0, _util.isUndefined)(d) ? height : 0;
    +		});
    +	},
    +	updateRadarAxes: function updateRadarAxes() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    _$$$getRadarSize4 = $$.getRadarSize(),
    +		    width = _$$$getRadarSize4[0],
    +		    height = _$$$getRadarSize4[1],
    +		    categories = config.axis_x_categories,
    +		    axis = $$.radars.axes.selectAll("g").data(categories);axis.exit().remove();
    +
    +
    +		var axisEnter = axis.enter().append("g").attr("class", function (d, i) {
    +			return _classes2.default.axis + "-" + i;
    +		});
    +
    +		config.radar_axis_line_show && axisEnter.append("line"), config.radar_axis_text_show && axisEnter.append("text"), axis = axisEnter.merge(axis), config.radar_axis_line_show && axis.select("line").attr("x1", width).attr("y1", height).attr("x2", function (d, i) {
    +			return $$.getRadarPosition("x", i);
    +		}).attr("y2", function (d, i) {
    +			return $$.getRadarPosition("y", i);
    +		}), config.radar_axis_text_show && axis.select("text").style("text-anchor", "middle").attr("dy", ".5em").text(function (d) {
    +			return d;
    +		}).datum(function (d, i) {
    +			return { index: i };
    +		}).attr("x", function (d, i) {
    +			return $$.getRadarPosition("x", i, undefined, 1);
    +		}).attr("y", function (d, i) {
    +			return $$.getRadarPosition("y", i, undefined, 1);
    +		}), $$.bindEvent();
    +	},
    +	bindEvent: function bindEvent() {
    +		var _this = this,
    +		    $$ = this,
    +		    config = $$.config;
    +
    +		if (config.interaction_enabled) {
    +			var isMouse = $$.inputType === "mouse";
    +
    +			$$.radars.select("." + _classes2.default.axis).on((isMouse ? "mouseover " : "") + "click", function () {
    +				if (!$$.transiting) // skip while transiting
    +					{
    +						var target = (0, _d3Selection.select)(_d3Selection.event.target),
    +						    index = target.datum().index;
    +						$$.selectRectForSingle($$.svg.node(), null, index), $$.setOver(index);
    +					}
    +			}).on("mouseout", isMouse ? function () {
    +				_this.hideTooltip(), _this.unexpandCircles();
    +			} : null);
    +		}
    +	},
    +	updateRadarShape: function updateRadarShape(duration, durationForExit) {
    +		var $$ = this,
    +		    targets = $$.data.targets,
    +		    points = $$.getCache(cacheKey),
    +		    areas = $$.radars.shapes.selectAll("polygon").data(targets),
    +		    areasEnter = areas.enter().append("g").attr("class", $$.classChartRadar.bind($$));
    +		areas.exit().transition().duration(durationForExit).remove(), areasEnter.append("polygon").merge(areas).transition().duration(duration).style("fill", function (d) {
    +			return $$.color(d);
    +		}).style("stroke", function (d) {
    +			return $$.color(d);
    +		}).attr("points", function (d) {
    +			return points[d.id].join(" ");
    +		});
    +	},
    +
    +
    +	/**
    +  * Get data point x coordinate
    +  * @param {Object} d Data object
    +  * @return {Number}
    +  * @private
    +  */
    +	radarCircleX: function radarCircleX(d) {
    +		return this.getCache(cacheKey)[d.id][d.index][0];
    +	},
    +
    +
    +	/**
    +  * Get data point y coordinate
    +  * @param {Object} d Data object
    +  * @return {Number}
    +  * @private
    +  */
    +	radarCircleY: function radarCircleY(d) {
    +		return this.getCache(cacheKey)[d.id][d.index][1];
    +	}
    +});
    +
    +/***/ }),
    +/* 39 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initializes the text
    +  * @private
    +  */
    +	initText: function initText() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartTexts), $$.mainText = (0, _d3Selection.selectAll)([]);
    +	},
    +
    +
    +	/**
    +  * Update chartText
    +  * @private
    +  * @param {Object} $$.data.targets
    +  */
    +	updateTargetsForText: function updateTargetsForText(targets) {
    +		var $$ = this,
    +		    classChartText = $$.classChartText.bind($$),
    +		    classTexts = $$.classTexts.bind($$),
    +		    classFocus = $$.classFocus.bind($$),
    +		    mainTextUpdate = $$.main.select("." + _classes2.default.chartTexts).selectAll("." + _classes2.default.chartText).data(targets).attr("class", function (d) {
    +			return classChartText(d) + classFocus(d);
    +		}),
    +		    mainTextEnter = mainTextUpdate.enter().append("g").attr("class", classChartText).style("opacity", "0").style("pointer-events", "none");
    +		mainTextEnter.append("g").attr("class", classTexts);
    +	},
    +
    +
    +	/**
    +  * Update text
    +  * @private
    +  * @param {Number} Fade-out transition duration
    +  */
    +	updateText: function updateText(durationForExit) {
    +		var _this = this,
    +		    $$ = this,
    +		    config = $$.config,
    +		    dataFn = $$.labelishData.bind($$),
    +		    classText = $$.classText.bind($$);
    +
    +		$$.mainText = $$.main.selectAll("." + _classes2.default.texts).selectAll("." + _classes2.default.text).data(function (d) {
    +			return _this.isRadarType(d) ? d.values : dataFn(d);
    +		}), $$.mainText.exit().transition().duration(durationForExit).style("fill-opacity", "0").remove(), $$.mainText = $$.mainText.enter().append("text").merge($$.mainText).attr("class", classText).attr("text-anchor", function (d) {
    +			return config.axis_rotated ? d.value < 0 ? "end" : "start" : "middle";
    +		}).style("stroke", "none").style("fill", function (d) {
    +			return $$.color(d);
    +		}).style("fill-opacity", "0").text(function (d, i, j) {
    +			return $$.dataLabelFormat(d.id)(d.value, d.id, i, j);
    +		});
    +	},
    +
    +
    +	/**
    +  * Redraw chartText
    +  * @private
    +  * @param {Number} x Attribute
    +  * @param {Number} y Attribute
    +  * @param {Object} options.flow
    +  * @param {Boolean} indicates transition is enabled
    +  * @returns {Object} $$.mainText
    +  */
    +	redrawText: function redrawText(xForText, yForText, forFlow, withTransition) {
    +		return [(withTransition ? this.mainText.transition() : this.mainText).attr("x", xForText).attr("y", yForText).style("fill", this.color).style("fill-opacity", forFlow ? 0 : this.opacityForText.bind(this))];
    +	},
    +
    +
    +	/**
    +  * Gets the getBoundingClientRect value of the element
    +  * @private
    +  * @param {HTMLElement|d3.selection} textVal
    +  * @param {String} className
    +  * @param {HTMLElement|d3.selection} elementVal
    +  * @returns {Object} value of element.getBoundingClientRect()
    +  */
    +	getTextRect: function getTextRect(textVal, className, elementVal) {
    +		var text = (textVal.node ? textVal.node() : textVal).textContent,
    +		    element = elementVal.node ? elementVal.node() : elementVal,
    +		    dummy = (0, _d3Selection.select)("body").append("div").classed("bb", !0),
    +		    svg = dummy.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "0px").style("left", "0px"),
    +		    font = (0, _d3Selection.select)(element).style("font"),
    +		    rect = void 0;
    +
    +
    +		return svg.selectAll(".dummy").data([text]).enter().append("text").classed(className, !!className).style("font", font).text(text).each(function () {
    +			rect = this.getBoundingClientRect();
    +		}), dummy.remove(), rect;
    +	},
    +
    +
    +	/**
    +  * Gets the x or y coordinate of the text
    +  * @private
    +  * @param {Object} area Indices
    +  * @param {Object} bar Indices
    +  * @param {Object} line Indices
    +  * @param {Boolean} whether or not to x
    +  * @returns {Number} coordinates
    +  */
    +	generateXYForText: function generateXYForText(areaIndices, barIndices, lineIndices, forX) {
    +		var $$ = this,
    +		    getAreaPoints = $$.generateGetAreaPoints(areaIndices, !1),
    +		    getBarPoints = $$.generateGetBarPoints(barIndices, !1),
    +		    getLinePoints = $$.generateGetLinePoints(lineIndices, !1),
    +		    getRadarPoints = $$.generateGetRadarPoints(),
    +		    getter = forX ? $$.getXForText : $$.getYForText;
    +
    +
    +		return function (d, i) {
    +			var getPoints = $$.isAreaType(d) && getAreaPoints || $$.isBarType(d) && getBarPoints || $$.isRadarType(d) && getRadarPoints || getLinePoints;
    +
    +			return getter.call($$, getPoints(d, i), d, this);
    +		};
    +	},
    +
    +
    +	/**
    +  * Gets the x coordinate of the text
    +  * @private
    +  * @param {Object} points
    +  * @param {Object} data
    +  * @param {HTMLElement} element
    +  * @returns {Number} x coordinate
    +  */
    +	getXForText: function getXForText(points, d, textElement) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    xPos = void 0,
    +		    padding = void 0;
    +
    +
    +		return config.axis_rotated ? (padding = $$.isBarType(d) ? 4 : 6, xPos = points[2][1] + padding * (d.value < 0 ? -1 : 1)) : xPos = $$.hasType("bar") ? (points[2][0] + points[0][0]) / 2 : points[0][0], d.value === null && (xPos > $$.width ? xPos = $$.width - textElement.getBoundingClientRect().width : xPos < 0 && (xPos = 4)), xPos + (config.data_labels_position.x || 0);
    +	},
    +
    +
    +	/**
    +  * Gets the y coordinate of the text
    +  * @private
    +  * @param {Object} points
    +  * @param {Object} data
    +  * @param {HTMLElement} element
    +  * @returns {Number} y coordinate
    +  */
    +	getYForText: function getYForText(points, d, textElement) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    r = config.point_r,
    +		    baseY = 3,
    +		    yPos = void 0;
    +
    +
    +		if (config.axis_rotated) yPos = (points[0][0] + points[2][0] + textElement.getBoundingClientRect().height * .6) / 2;else if (yPos = points[2][1], (0, _util.isNumber)(r) && r > 5 && ($$.isLineType(d) || $$.isScatterType(d)) && (baseY += config.point_r / 2.3), d.value < 0 || d.value === 0 && !$$.hasPositiveValue) yPos += textElement.getBoundingClientRect().height, $$.isBarType(d) && $$.isSafari() ? yPos -= baseY : !$$.isBarType(d) && $$.isChrome() && (yPos += baseY);else {
    +				var diff = -baseY * 2;
    +
    +				$$.isBarType(d) ? diff = -baseY : $$.isBubbleType(d) && (diff = baseY), yPos += diff;
    +			}
    +
    +		// show labels regardless of the domain if value is null
    +		if (d.value === null && !config.axis_rotated) {
    +			var boxHeight = textElement.getBoundingClientRect().height;
    +
    +			yPos < boxHeight ? yPos = boxHeight : yPos > this.height && (yPos = this.height - 4);
    +		}
    +
    +		return yPos + (config.data_labels_position.y || 0);
    +	}
    +});
    +
    +/***/ }),
    +/* 40 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	setTargetType: function setTargetType(targetIds, type) {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.mapToTargetIds(targetIds).forEach(function (id) {
    +			$$.withoutFadeIn[id] = type === config.data_types[id], config.data_types[id] = type;
    +		}), targetIds || (config.data_type = type);
    +	},
    +	hasType: function hasType(type, targetsValue) {
    +		var $$ = this,
    +		    types = $$.config.data_types,
    +		    targets = targetsValue || $$.data.targets,
    +		    has = !1;
    +
    +
    +		return targets && targets.length ? targets.forEach(function (target) {
    +			var t = types[target.id];
    +
    +			(t && t.indexOf(type) >= 0 || !t && type === "line") && (has = !0);
    +		}) : Object.keys(types).length ? Object.keys(types).forEach(function (id) {
    +			types[id] === type && (has = !0);
    +		}) : has = $$.config.data_type === type, has;
    +	},
    +
    +
    +	/**
    +  * Check if contains arc types chart
    +  * @param {Object} targets
    +  * @param {Array} exclude Excluded types
    +  * @return {boolean}
    +  * @private
    +  */
    +	hasArcType: function hasArcType(targets) {
    +		var _this = this,
    +		    exclude = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [],
    +		    types = ["pie", "donut", "gauge", "radar"].filter(function (v) {
    +			return exclude.indexOf(v) === -1;
    +		});
    +
    +		return !types.every(function (v) {
    +			return !_this.hasType(v, targets);
    +		});
    +	},
    +	isLineType: function isLineType(d) {
    +		var id = (0, _util.isString)(d) ? d : d.id;
    +
    +		return !this.config.data_types[id] || this.isTypeOf(id, ["line", "spline", "area", "area-spline", "area-spline-range", "area-line-range", "step", "area-step"]);
    +	},
    +	isTypeOf: function isTypeOf(d, type) {
    +		var id = (0, _util.isString)(d) ? d : d.id,
    +		    dataType = this.config.data_types[id];
    +
    +
    +		return (0, _util.isArray)(type) ? type.indexOf(dataType) >= 0 : dataType === type;
    +	},
    +	isStepType: function isStepType(d) {
    +		return this.isTypeOf(d, ["step", "area-step"]);
    +	},
    +	isSplineType: function isSplineType(d) {
    +		return this.isTypeOf(d, ["spline", "area-spline", "area-spline-range"]);
    +	},
    +	isAreaType: function isAreaType(d) {
    +		return this.isTypeOf(d, ["area", "area-spline", "area-spline-range", "area-line-range", "area-step"]);
    +	},
    +	isAreaRangeType: function isAreaRangeType(d) {
    +		return this.isTypeOf(d, ["area-spline-range", "area-line-range"]);
    +	},
    +	isBarType: function isBarType(d) {
    +		return this.isTypeOf(d, "bar");
    +	},
    +	isBubbleType: function isBubbleType(d) {
    +		return this.isTypeOf(d, "bubble");
    +	},
    +	isScatterType: function isScatterType(d) {
    +		return this.isTypeOf(d, "scatter");
    +	},
    +	isPieType: function isPieType(d) {
    +		return this.isTypeOf(d, "pie");
    +	},
    +	isGaugeType: function isGaugeType(d) {
    +		return this.isTypeOf(d, "gauge");
    +	},
    +	isDonutType: function isDonutType(d) {
    +		return this.isTypeOf(d, "donut");
    +	},
    +	isRadarType: function isRadarType(d) {
    +		return this.isTypeOf(d, "radar");
    +	},
    +	isArcType: function isArcType(d) {
    +		return this.isPieType(d) || this.isDonutType(d) || this.isGaugeType(d) || this.isRadarType(d);
    +	},
    +
    +
    +	// determine if is 'circle' data point
    +	isCirclePoint: function isCirclePoint() {
    +		var config = this.config,
    +		    pattern = config.point_pattern;
    +
    +
    +		return config.point_type === "circle" && (!pattern || (0, _util.isArray)(pattern) && pattern.length === 0);
    +	},
    +	lineData: function lineData(d) {
    +		return this.isLineType(d) ? [d] : [];
    +	},
    +	arcData: function arcData(d) {
    +		return this.isArcType(d.data) ? [d] : [];
    +	},
    +	barData: function barData(d) {
    +		return this.isBarType(d) ? d.values : [];
    +	},
    +
    +
    +	/**
    +  * Get data adapt for data label showing
    +  * @param {Object} d Data object
    +  * @return {Array}
    +  * @private
    +  */
    +	labelishData: function labelishData(d) {
    +		return this.isBarType(d) || this.isLineType(d) || this.isScatterType(d) || this.isBubbleType(d) || this.isRadarType(d) ? d.values : [];
    +	},
    +	barLineBubbleData: function barLineBubbleData(d) {
    +		return this.isBarType(d) || this.isLineType(d) || this.isBubbleType(d) ? d.values : [];
    +	},
    +
    +
    +	// https://github.com/d3/d3-shape#curves
    +	isInterpolationType: function isInterpolationType(type) {
    +		return ["basis", "basis-closed", "basis-open", "bundle", "cardinal", "cardinal-closed", "cardinal-open", "catmull-rom", "catmull-rom-closed", "catmull-rom-open", "linear", "linear-closed", "monotone-x", "monotone-y", "natural"].indexOf(type) >= 0;
    +	}
    +});
    +
    +/***/ }),
    +/* 41 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +// Grid position and text anchor helpers
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var getGridTextAnchor = function (d) {
    +	return (0, _util.isValue)(d.position) || "end";
    +},
    +    getGridTextDx = function (d) {
    +	return d.position === "start" ? 4 : d.position === "middle" ? 0 : -4;
    +},
    +    getGridTextX = function (isX, width, height) {
    +	return function (d) {
    +		var x = isX ? 0 : width;
    +
    +		return d.position === "start" ? x = isX ? -height : 0 : d.position === "middle" && (x = (isX ? -height : width) / 2), x;
    +	};
    +};
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initGrid: function initGrid() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.xgrid = (0, _d3Selection.selectAll)([]), config.grid_lines_front || $$.initGridLines(), config.grid_front || $$.initXYFocusGrid();
    +	},
    +	initGridLines: function initGridLines() {
    +		var $$ = this;
    +
    +		$$.gridLines = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid + " " + _classes2.default.gridLines), $$.gridLines.append("g").attr("class", _classes2.default.xgridLines), $$.gridLines.append("g").attr("class", _classes2.default.ygridLines), $$.xgridLines = (0, _d3Selection.selectAll)([]);
    +	},
    +	updateXGrid: function updateXGrid(withoutUpdate) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    xgridData = $$.generateGridData(config.grid_x_type, $$.x),
    +		    tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;
    +		$$.xgridAttr = isRotated ? {
    +			"x1": 0,
    +			"x2": $$.width,
    +			"y1": function y1(d) {
    +				return $$.x(d) - tickOffset;
    +			},
    +			"y2": function y2(d) {
    +				return $$.x(d) - tickOffset;
    +			}
    +		} : {
    +			"x1": function x1(d) {
    +				return $$.x(d) + tickOffset;
    +			},
    +			"x2": function x2(d) {
    +				return $$.x(d) + tickOffset;
    +			},
    +			"y1": 0,
    +			"y2": $$.height
    +		}, $$.xgrid = $$.main.select("." + _classes2.default.xgrids).selectAll("." + _classes2.default.xgrid).data(xgridData), $$.xgrid.exit().remove(), $$.xgrid = $$.xgrid.enter().append("line").attr("class", _classes2.default.xgrid).merge($$.xgrid), withoutUpdate || $$.xgrid.each(function () {
    +			var grid = (0, _d3Selection.select)(this);
    +
    +			Object.keys($$.xgridAttr).forEach(function (id) {
    +				grid.attr(id, $$.xgridAttr[id]).style("opacity", function () {
    +					return grid.attr(isRotated ? "y1" : "x1") === (isRotated ? $$.height : 0) ? "0" : "1";
    +				});
    +			});
    +		});
    +	},
    +	updateYGrid: function updateYGrid() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks);
    +		$$.ygrid = $$.main.select("." + _classes2.default.ygrids).selectAll("." + _classes2.default.ygrid).data(gridValues), $$.ygrid.exit().remove(), $$.ygrid = $$.ygrid.enter().append("line").attr("class", _classes2.default.ygrid).merge($$.ygrid), $$.ygrid.attr("x1", isRotated ? $$.y : 0).attr("x2", isRotated ? $$.y : $$.width).attr("y1", isRotated ? 0 : $$.y).attr("y2", isRotated ? $$.height : $$.y), $$.smoothLines($$.ygrid, "grid");
    +	},
    +	updateGrid: function updateGrid(duration) {
    +		var $$ = this;
    +
    +		// hide if arc type
    +		$$.grid.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden"), $$.updateXGridLines(duration), $$.updateYGridLines(duration);
    +	},
    +
    +
    +	/**
    +  * Update X Grid lines
    +  * @param {Number} duration
    +  * @private
    +  */
    +	updateXGridLines: function updateXGridLines(duration) {
    +		var $$ = this,
    +		    main = $$.main,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated;
    +		config.grid_x_show && $$.updateXGrid(), $$.xgridLines = main.select("." + _classes2.default.xgridLines).selectAll("." + _classes2.default.xgridLine).data(config.grid_x_lines), $$.xgridLines.exit().transition().duration(duration).style("opacity", "0").remove();
    +
    +
    +		// enter
    +		var xgridLine = $$.xgridLines.enter().append("g");
    +
    +		xgridLine.append("line").style("opacity", "0"), xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0"), $$.xgridLines = xgridLine.merge($$.xgridLines), $$.xgridLines.attr("class", function (d) {
    +			return (_classes2.default.xgridLine + " " + (d.class || "")).trim();
    +		}).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).text(function (d) {
    +			return d.text;
    +		}).transition().style("opacity", "1");
    +	},
    +
    +
    +	/**
    +  * Update Y Grid lines
    +  * @param {Number} duration
    +  * @private
    +  */
    +	updateYGridLines: function updateYGridLines(duration) {
    +		var $$ = this,
    +		    main = $$.main,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated;
    +		config.grid_y_show && $$.updateYGrid(), $$.ygridLines = main.select("." + _classes2.default.ygridLines).selectAll("." + _classes2.default.ygridLine).data(config.grid_y_lines), $$.ygridLines.exit().transition().duration(duration).style("opacity", "0").remove();
    +
    +
    +		// enter
    +		var ygridLine = $$.ygridLines.enter().append("g");
    +
    +		ygridLine.append("line").style("opacity", "0"), ygridLine.append("text").attr("transform", isRotated ? "rotate(-90)" : "").style("opacity", "0"), $$.ygridLines = ygridLine.merge($$.ygridLines);
    +
    +
    +		// update
    +		var yv = $$.yv.bind($$);
    +
    +		$$.ygridLines.attr("class", function (d) {
    +			return (_classes2.default.ygridLine + " " + (d.class || "")).trim();
    +		}).select("line").transition().duration(duration).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : $$.width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? $$.height : yv).transition().style("opacity", "1"), $$.ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx).transition().duration(duration).attr("dy", -5).attr("x", getGridTextX(isRotated, $$.width, $$.height)).attr("y", yv).text(function (d) {
    +			return d.text;
    +		}).transition().style("opacity", "1");
    +	},
    +	redrawGrid: function redrawGrid(withTransition) {
    +		var $$ = this,
    +		    isRotated = $$.config.axis_rotated,
    +		    xv = $$.xv.bind($$),
    +		    lines = $$.xgridLines.select("line"),
    +		    texts = $$.xgridLines.select("text");
    +
    +
    +		return lines = (withTransition ? lines.transition() : lines).attr("x1", isRotated ? 0 : xv).attr("x2", isRotated ? $$.width : xv).attr("y1", isRotated ? xv : 0).attr("y2", isRotated ? xv : $$.height), texts = (withTransition ? texts.transition() : texts).attr("x", getGridTextX(!isRotated, $$.width, $$.height)).attr("y", xv).text(function (d) {
    +			return d.text;
    +		}), [(withTransition ? lines.transition() : lines).style("opacity", "1"), (withTransition ? texts.transition() : texts).style("opacity", "1")];
    +	},
    +	initXYFocusGrid: function initXYFocusGrid() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.grid = $$.main.append("g").attr("clip-path", $$.clipPathForGrid).attr("class", _classes2.default.grid), config.grid_x_show && $$.grid.append("g").attr("class", _classes2.default.xgrids), config.grid_y_show && $$.grid.append("g").attr("class", _classes2.default.ygrids), config.grid_focus_show && $$.grid.append("g").attr("class", _classes2.default.xgridFocus).append("line").attr("class", _classes2.default.xgridFocus);
    +	},
    +	showXGridFocus: function showXGridFocus(selectedData) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    dataToShow = selectedData.filter(function (d) {
    +			return d && (0, _util.isValue)($$.getBaseValue(d));
    +		}),
    +		    focusEl = $$.main.selectAll("line." + _classes2.default.xgridFocus),
    +		    xx = $$.xx.bind($$);
    +		!config.tooltip_show || $$.hasType("bubble") || $$.hasType("scatter") || $$.hasArcType() || (focusEl.style("visibility", "visible").data([dataToShow[0]]).attr(isRotated ? "y1" : "x1", xx).attr(isRotated ? "y2" : "x2", xx), $$.smoothLines(focusEl, "grid"));
    +
    +		// Hide when bubble/scatter plot exists
    +	},
    +	hideXGridFocus: function hideXGridFocus() {
    +		this.main.select("line." + _classes2.default.xgridFocus).style("visibility", "hidden");
    +	},
    +	updateXgridFocus: function updateXgridFocus() {
    +		var $$ = this,
    +		    isRotated = $$.config.axis_rotated;
    +		$$.main.select("line." + _classes2.default.xgridFocus).attr("x1", isRotated ? 0 : -10).attr("x2", isRotated ? $$.width : -10).attr("y1", isRotated ? -10 : 0).attr("y2", isRotated ? -10 : $$.height);
    +	},
    +	generateGridData: function generateGridData(type, scale) {
    +		var $$ = this,
    +		    tickNum = $$.main.select("." + _classes2.default.axisX).selectAll(".tick").size(),
    +		    gridData = [];
    +
    +
    +		if (type === "year") {
    +			var xDomain = $$.getXDomain(),
    +			    firstYear = xDomain[0].getFullYear(),
    +			    lastYear = xDomain[1].getFullYear();
    +
    +
    +			for (var i = firstYear; i <= lastYear; i++) gridData.push(new Date(i + "-01-01 00:00:00"));
    +		} else gridData = scale.ticks(10), gridData.length > tickNum && (gridData = gridData.filter(function (d) {
    +				return (d + "").indexOf(".") < 0;
    +			}));
    +
    +		return gridData;
    +	},
    +	getGridFilterToRemove: function getGridFilterToRemove(params) {
    +		return params ? function (line) {
    +			var found = !1;
    +
    +			return ((0, _util.isArray)(params) ? params.concat() : [params]).forEach(function (param) {
    +				("value" in param && line.value === param.value || "class" in param && line.class === param.class) && (found = !0);
    +			}), found;
    +		} : function () {
    +			return !0;
    +		};
    +	},
    +	removeGridLines: function removeGridLines(params, forX) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    toRemove = $$.getGridFilterToRemove(params),
    +		    classLines = forX ? _classes2.default.xgridLines : _classes2.default.ygridLines,
    +		    classLine = forX ? _classes2.default.xgridLine : _classes2.default.ygridLine;
    +		$$.main.select("." + classLines).selectAll("." + classLine).filter(toRemove).transition().duration(config.transition_duration).style("opacity", "0").remove();
    +
    +
    +		var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
    +
    +		config[gridLines] = config[gridLines].filter(function toShow(line) {
    +			return !toRemove(line);
    +		});
    +	}
    +});
    +
    +/***/ }),
    +/* 42 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initializes the tooltip
    +  * @private
    +  */
    +	initTooltip: function initTooltip() {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		// Show tooltip if needed
    +		if ($$.tooltip = $$.selectChart.style("position", "relative").append("div").attr("class", _classes2.default.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none"), config.tooltip_init_show) {
    +			if ($$.isTimeSeries() && (0, _util.isString)(config.tooltip_init_x)) {
    +				var targets = $$.data.targets[0],
    +				    i = void 0,
    +				    val = void 0;
    +
    +
    +				for (config.tooltip_init_x = $$.parseDate(config.tooltip_init_x), i = 0; (val = targets.values[i]) && val.x - config.tooltip_init_x !== 0; i++);
    +
    +				config.tooltip_init_x = i;
    +			}
    +
    +			$$.tooltip.html(config.tooltip_contents.call($$, $$.data.targets.map(function (d) {
    +				return $$.addName(d.values[config.tooltip_init_x]);
    +			}), $$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType(null, ["radar"])), $$.color)), $$.tooltip.style("top", config.tooltip_init_position.top).style("left", config.tooltip_init_position.left).style("display", "block");
    +		}
    +	},
    +
    +
    +	/**
    +  * Returns the tooltip content(HTML string)
    +  * @param {Object} d data
    +  * @param {Function} defaultTitleFormat Default title format
    +  * @param {Function} defaultValueFormat Default format for each data value in the tooltip.
    +  * @param {Function} color Color function
    +  * @returns {String} html
    +  * @private
    +  */
    +	getTooltipContent: function getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    titleFormat = config.tooltip_format_title || defaultTitleFormat,
    +		    nameFormat = config.tooltip_format_name || function (name) {
    +			return name;
    +		},
    +		    valueFormat = config.tooltip_format_value || defaultValueFormat,
    +		    order = config.tooltip_order,
    +		    getRowValue = function (row) {
    +			return $$.getBaseValue(row);
    +		},
    +		    getBgColor = $$.levelColor ? function (row) {
    +			return $$.levelColor(row.value);
    +		} : function (row) {
    +			return color(row.id);
    +		};
    +
    +		if (order === null && config.data_groups.length) {
    +			// for stacked data, order should aligned with the visually displayed data
    +			var ids = $$.orderTargets($$.data.targets).map(function (i2) {
    +				return i2.id;
    +			}).reverse();
    +
    +			d.sort(function (a, b) {
    +				var v1 = a ? a.value : null,
    +				    v2 = b ? b.value : null;
    +
    +
    +				return v1 > 0 && v2 > 0 && (v1 = a.id ? ids.indexOf(a.id) : null, v2 = b.id ? ids.indexOf(b.id) : null), v1 - v2;
    +			});
    +		} else if (/^(asc|desc)$/.test(order)) {
    +			d.sort(function (a, b) {
    +				var v1 = a ? getRowValue(a) : null,
    +				    v2 = b ? getRowValue(b) : null;
    +
    +
    +				return order === "asc" ? v1 - v2 : v2 - v1;
    +			});
    +		} else (0, _util.isFunction)(order) && d.sort(order);
    +
    +		var text = void 0,
    +		    row = void 0,
    +		    param = void 0,
    +		    value = void 0;
    +
    +
    +		for (var i = 0, len = d.length; i < len; i++) if ((row = d[i]) && (getRowValue(row) || getRowValue(row) === 0)) {
    +
    +				if (!text) {
    +					var title = (0, _util.sanitise)(titleFormat ? titleFormat(row.x) : row.x);
    +
    +					text = "<table class=\"" + $$.CLASS.tooltip + "\">" + ((0, _util.isValue)(title) ? "<tr><th colspan=\"2\">" + title + "</th></tr>" : "");
    +				}
    +
    +				if (param = [row.ratio, row.id, row.index, d], $$.isAreaRangeType(row) ? (value = ["high", "low"].map(function (v) {
    +					return (0, _util.sanitise)(valueFormat.apply(undefined, [$$.getAreaRangeData(row, v)].concat(param)));
    +				}), value = "<b>Mid:</b> " + value + " <b>High:</b> " + value[0] + " <b>Low:</b> " + value[1]) : value = (0, _util.sanitise)(valueFormat.apply(undefined, [getRowValue(row)].concat(param))), value !== undefined) {
    +					// Skip elements when their name is set to null
    +					if (row.name === null) continue;
    +
    +					var name = (0, _util.sanitise)(nameFormat.apply(undefined, [row.name].concat(param))),
    +					    bgcolor = getBgColor(row);
    +					text += "<tr class=\"" + $$.CLASS.tooltipName + $$.getTargetSelectorSuffix(row.id) + "\"><td class=\"name\">", text += $$.patterns ? "<svg><rect style=\"fill:" + bgcolor + "\" width=\"10\" height=\"10\"></rect></svg>" : "<span style=\"background-color:" + bgcolor + "\"></span>", text += name + "</td><td class=\"value\">" + value + "</td></tr>";
    +				}
    +			}
    +
    +		return text + "</table>";
    +	},
    +
    +
    +	/**
    +  * Returns the position of the tooltip
    +  * @param {Object} dataToShow data
    +  * @param {String} tWidth Width value of tooltip element
    +  * @param {String} tHeight Height value of tooltip element
    +  * @param {HTMLElement} element
    +  * @returns {Object} top, left value
    +  * @private
    +  */
    +	tooltipPosition: function tooltipPosition(dataToShow, tWidth, tHeight, element) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    _d3Mouse = (0, _d3Selection.mouse)(element),
    +		    left = _d3Mouse[0],
    +		    top = _d3Mouse[1],
    +		    svgLeft = $$.getSvgLeft(!0),
    +		    chartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();
    +
    +		// Determine tooltip position
    +		if (top += 20, $$.hasArcType()) {
    +			var raw = $$.inputType === "touch" || $$.hasType("radar");
    +
    +			raw || (top += $$.height / 2, left += ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2);
    +		} else {
    +			var dataScale = $$.x(dataToShow[0].x);
    +
    +			config.axis_rotated ? (top = dataScale + 20, left += svgLeft + 100, chartRight -= svgLeft) : (top -= 5, left = svgLeft + $$.getCurrentPaddingLeft(!0) + 20 + ($$.zoomScale ? left : dataScale));
    +		}
    +
    +		var right = left + tWidth;
    +
    +		return right > chartRight && (left -= right - chartRight + 20), top + tHeight > $$.currentHeight && (top -= tHeight + 30), top < 0 && (top = 0), { top: top, left: left };
    +	},
    +
    +
    +	/**
    +  * Show the tooltip
    +  * @private
    +  * @param {Object} selectedData
    +  * @param {HTMLElement} element
    +  */
    +	showTooltip: function showTooltip(selectedData, element) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    forArc = $$.hasArcType(null, ["radar"]),
    +		    dataToShow = selectedData.filter(function (d) {
    +			return d && (0, _util.isValue)($$.getBaseValue(d));
    +		}),
    +		    positionFunction = config.tooltip_position || $$.tooltipPosition;
    +
    +
    +		if (dataToShow.length !== 0 && config.tooltip_show) {
    +				var datum = $$.tooltip.datum(),
    +				    width = datum && datum.width || 0,
    +				    height = datum && datum.height || 0;
    +
    +
    +				if (!datum || datum.current !== JSON.stringify(selectedData)) {
    +					var html = config.tooltip_contents.call($$, selectedData, $$.axis.getXAxisTickFormat(), $$.getYFormat(forArc), $$.color);
    +
    +					(0, _util.callFn)(config.tooltip_onshow, $$), $$.tooltip.html(html).style("display", "block").datum({
    +						current: JSON.stringify(selectedData),
    +						width: width = $$.tooltip.property("offsetWidth"),
    +						height: height = $$.tooltip.property("offsetHeight")
    +					}), (0, _util.callFn)(config.tooltip_onshown, $$), $$._handleLinkedCharts(!0, selectedData[0].index);
    +				}
    +
    +				// Get tooltip dimensions
    +				var position = positionFunction.call(this, dataToShow, width, height, element);
    +
    +				// Set tooltip position
    +				$$.tooltip.style("top", position.top + "px").style("left", position.left + "px");
    +			}
    +	},
    +
    +
    +	/**
    +  * Hide the tooltip
    +  * @private
    +  */
    +	hideTooltip: function hideTooltip() {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.callFn)(config.tooltip_onhide, $$), this.tooltip.style("display", "none").datum(null), (0, _util.callFn)(config.tooltip_onhidden, $$), $$._handleLinkedCharts(!1);
    +	},
    +
    +
    +	/**
    +  * Toggle display for linked chart instances
    +  * @param {Boolean} show true: show, false: hide
    +  * @param {Number} index x Axis index
    +  * @private
    +  */
    +	_handleLinkedCharts: function _handleLinkedCharts(show, index) {
    +		var $$ = this;
    +
    +		if ($$.config.tooltip_linked) {
    +			var linkedName = $$.config.tooltip_linked_name;
    +
    +			$$.api.internal.charts.forEach(function (c) {
    +				if (c !== $$.api) {
    +					var internal = c.internal,
    +					    isLinked = internal.config.tooltip_linked,
    +					    name = internal.config.tooltip_linked_name,
    +					    isInDom = document.body.contains(c.element);
    +
    +
    +					if (isLinked && linkedName === name && isInDom) {
    +						var isShowing = internal.tooltip.style("display") === "block";
    +
    +						// prevent throwing error for non-paired linked indexes
    +						try {
    +							isShowing ^ show && c.tooltip[isShowing ? "hide" : "show"]({ index: index });
    +						} catch (e) {}
    +					}
    +				}
    +			});
    +		}
    +	}
    +});
    +
    +/***/ }),
    +/* 43 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initialize the legend.
    +  * @private
    +  */
    +	initLegend: function initLegend() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.legendItemTextBox = {}, $$.legendHasRendered = !1, $$.legend = $$.svg.append("g"), config.legend_show ? config.legend_contents_bindto && config.legend_contents_template ? $$.updateLegendTemplate() : ($$.legend.attr("transform", $$.getTranslate("legend")), $$.updateLegendWithDefaults()) : ($$.legend.style("visibility", "hidden"), $$.hiddenLegendIds = $$.mapToIds($$.data.targets));
    +	},
    +
    +
    +	/**
    +  * Update legend using template option
    +  * @private
    +  */
    +	updateLegendTemplate: function updateLegendTemplate() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    wrapper = (0, _d3Selection.select)(config.legend_contents_bindto),
    +		    template = config.legend_contents_template;
    +
    +
    +		if (!wrapper.empty()) {
    +			var targets = $$.data.targets,
    +			    ids = [],
    +			    html = "";
    +			$$.mapToIds(targets).forEach(function (v) {
    +				var content = (0, _util.isFunction)(template) ? template.call($$, v, $$.color(v), $$.api.data(v)[0].values) : template.replace(/{=COLOR}/g, $$.color(v)).replace(/{=TITLE}/g, v);
    +
    +				content && (ids.push(v), html += content);
    +			});
    +
    +
    +			var legendItem = wrapper.html(html).selectAll(function () {
    +				return this.childNodes;
    +			}).data(ids);
    +
    +			$$.setLegendItem(legendItem);
    +		}
    +	},
    +
    +
    +	/**
    +  * Update the legend to its default value.
    +  * @private
    +  */
    +	updateLegendWithDefaults: function updateLegendWithDefaults() {
    +		var $$ = this;
    +
    +		$$.updateLegend($$.mapToIds($$.data.targets), {
    +			withTransform: !1,
    +			withTransitionForTransform: !1,
    +			withTransition: !1
    +		});
    +	},
    +
    +
    +	/**
    +  * Update the size of the legend.
    +  * @private
    +  * @param {Number} height
    +  * @param {Number} width
    +  */
    +	updateSizeForLegend: function updateSizeForLegend(legendHeight, legendWidth) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    insetLegendPosition = {
    +			top: $$.isLegendTop ? $$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 : $$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y,
    +			left: $$.isLegendLeft ? $$.getCurrentPaddingLeft() + config.legend_inset_x + .5 : $$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + .5
    +		};
    +		$$.margin3 = {
    +			top: $$.isLegendRight ? 0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight,
    +			right: NaN,
    +			bottom: 0,
    +			left: $$.isLegendRight ? $$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0
    +		};
    +	},
    +
    +
    +	/**
    +  * Transform Legend
    +  * @private
    +  * @param {Boolean} whether or not to transition.
    +  */
    +	transformLegend: function transformLegend(withTransition) {
    +		var $$ = this;
    +
    +		(withTransition ? $$.legend.transition() : $$.legend).attr("transform", $$.getTranslate("legend"));
    +	},
    +
    +
    +	/**
    +  * Update the legend step
    +  * @private
    +  * @param {Number} step
    +  */
    +	updateLegendStep: function updateLegendStep(step) {
    +		this.legendStep = step;
    +	},
    +
    +
    +	/**
    +  * Update legend item width
    +  * @private
    +  * @param {Number} width
    +  */
    +	updateLegendItemWidth: function updateLegendItemWidth(w) {
    +		this.legendItemWidth = w;
    +	},
    +
    +
    +	/**
    +  * Update legend item height
    +  * @private
    +  * @param {Number} height
    +  */
    +	updateLegendItemHeight: function updateLegendItemHeight(h) {
    +		this.legendItemHeight = h;
    +	},
    +
    +
    +	/**
    +  * Get the width of the legend
    +  * @private
    +  * @param {Number} width
    +  */
    +	getLegendWidth: function getLegendWidth() {
    +		var $$ = this;
    +
    +		return $$.config.legend_show ? $$.isLegendRight || $$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;
    +	},
    +
    +
    +	/**
    +  * Get the height of the legend
    +  * @private
    +  * @param {Number} height
    +  */
    +	getLegendHeight: function getLegendHeight() {
    +		var $$ = this,
    +		    h = 0;
    +
    +		return $$.config.legend_show && ($$.isLegendRight ? h = $$.currentHeight : h = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1)), h;
    +	},
    +
    +
    +	/**
    +  * Get the opacity of the legend
    +  * @private
    +  * @param {Object} d3.Select
    +  * @returns {Number} opacity
    +  */
    +	opacityForLegend: function opacityForLegend(legendItem) {
    +		return legendItem.classed(_classes2.default.legendItemHidden) ? null : "1";
    +	},
    +
    +
    +	/**
    +  * Get the opacity of the legend that is unfocused
    +  * @private
    +  * @param {Object} legendItem, d3.Select
    +  * @returns {Number} opacity
    +  */
    +	opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) {
    +		return legendItem.classed(_classes2.default.legendItemHidden) ? null : "0.3";
    +	},
    +
    +
    +	/**
    +  * Toggles the focus of the legend
    +  * @private
    +  * @param {Array} ID's of target
    +  * @param {Boolean} whether or not to focus.
    +  */
    +	toggleFocusLegend: function toggleFocusLegend(targetIds, focus) {
    +		var $$ = this,
    +		    targetIdz = $$.mapToTargetIds(targetIds);
    +		$$.legend.selectAll("." + _classes2.default.legendItem).filter(function (id) {
    +			return targetIdz.indexOf(id) >= 0;
    +		}).classed(_classes2.default.legendItemFocused, focus).transition().duration(100).style("opacity", function () {
    +			var opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend;
    +
    +			return opacity.call($$, (0, _d3Selection.select)(this));
    +		});
    +	},
    +
    +
    +	/**
    +  * Revert the legend to its default state
    +  * @private
    +  */
    +	revertLegend: function revertLegend() {
    +		var $$ = this;
    +
    +		$$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemFocused, !1).transition().duration(100).style("opacity", function () {
    +			return $$.opacityForLegend((0, _d3Selection.select)(this));
    +		});
    +	},
    +
    +
    +	/**
    +  * Shows the legend
    +  * @private
    +  * @param {Array} ID's of target
    +  */
    +	showLegend: function showLegend(targetIds) {
    +		var $$ = this,
    +		    config = $$.config;
    +		config.legend_show || (config.legend_show = !0, $$.legend.style("visibility", "visible"), !$$.legendHasRendered && $$.updateLegendWithDefaults()), $$.removeHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("visibility", "visible").transition().style("opacity", function () {
    +			return $$.opacityForLegend((0, _d3Selection.select)(this));
    +		});
    +	},
    +
    +
    +	/**
    +  * Hide the legend
    +  * @private
    +  * @param {Array} ID's of target
    +  */
    +	hideLegend: function hideLegend(targetIds) {
    +		var $$ = this,
    +		    config = $$.config;
    +		config.legend_show && (0, _util.isEmpty)(targetIds) && (config.legend_show = !1, $$.legend.style("visibility", "hidden")), $$.addHiddenLegendIds(targetIds), $$.legend.selectAll($$.selectorLegends(targetIds)).style("opacity", "0").style("visibility", "hidden");
    +	},
    +
    +
    +	/**
    +  * Clear the LegendItemTextBox cache.
    +  * @private
    +  */
    +	clearLegendItemTextBoxCache: function clearLegendItemTextBoxCache() {
    +		this.legendItemTextBox = {};
    +	},
    +
    +
    +	/**
    +  * Set legend item style & bind events
    +  * @private
    +  * @param {d3.selection} item
    +  */
    +	setLegendItem: function setLegendItem(item) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isTouch = $$.inputType === "touch";
    +		item.attr("class", function (id) {
    +			var node = (0, _d3Selection.select)(this),
    +			    itemClass = !node.empty() && node.attr("class") || "";
    +
    +
    +			return itemClass + $$.generateClass(_classes2.default.legendItem, id);
    +		}).style("visibility", function (id) {
    +			return $$.isLegendToShow(id) ? "visible" : "hidden";
    +		}).style("cursor", "pointer").on("click", function (id) {
    +			(0, _util.callFn)(config.legend_item_onclick, $$, id) || (_d3Selection.event.altKey ? ($$.api.hide(), $$.api.show(id)) : ($$.api.toggle(id), !isTouch && $$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert())), isTouch && $$.hideTooltip();
    +		}), isTouch || item.on("mouseout", function (id) {
    +			(0, _util.callFn)(config.legend_item_onout, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !1), $$.api.revert());
    +		}).on("mouseover", function (id) {
    +			(0, _util.callFn)(config.legend_item_onover, $$, id) || ((0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused, !0), !$$.transiting && $$.isTargetToShow(id) && $$.api.focus(id));
    +		});
    +	},
    +
    +
    +	/**
    +  * Update the legend
    +  * @private
    +  * @param {Array} ID's of target
    +  * @param {Object} withTransform : Whether to use the transform property / withTransitionForTransform: Whether transition is used when using the transform property / withTransition : whether or not to transition.
    +  * @param {Object} the return value of the generateTransitions
    +  */
    +	updateLegend: function updateLegend(targetIds, options, transitions) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    tileWidth = config.legend_item_tile_width + 5,
    +		    maxWidth = 0,
    +		    maxHeight = 0,
    +		    xForLegend = void 0,
    +		    yForLegend = void 0,
    +		    totalLength = 0,
    +		    offsets = {},
    +		    widths = {},
    +		    heights = {},
    +		    margins = [0],
    +		    steps = {},
    +		    step = 0,
    +		    background = void 0,
    +		    isLegendRightOrInset = $$.isLegendRight || $$.isLegendInset,
    +		    targetIdz = targetIds.filter(function (id) {
    +			return !(0, _util.isDefined)(config.data_names[id]) || config.data_names[id] !== null;
    +		}),
    +		    optionz = options || {},
    +		    withTransition = (0, _util.getOption)(optionz, "withTransition", !0),
    +		    withTransitionForTransform = (0, _util.getOption)(optionz, "withTransitionForTransform", !0),
    +		    getTextBox = function (textElement, id) {
    +
    +			return $$.legendItemTextBox[id] || ($$.legendItemTextBox[id] = $$.getTextRect(textElement, _classes2.default.legendItem, textElement)), $$.legendItemTextBox[id];
    +		},
    +		    updatePositions = function (textElement, id, index) {
    +			var isLast = index === targetIdz.length - 1,
    +			    box = getTextBox(textElement, id),
    +			    itemWidth = box.width + tileWidth + (isLast && !isLegendRightOrInset ? 0 : 10) + config.legend_padding,
    +			    itemHeight = box.height + 4,
    +			    itemLength = isLegendRightOrInset ? itemHeight : itemWidth,
    +			    areaLength = isLegendRightOrInset ? $$.getLegendHeight() : $$.getLegendWidth(),
    +			    margin = void 0,
    +			    updateValues = function (id2, withoutStep) {
    +				withoutStep || (margin = (areaLength - totalLength - itemLength) / 2, margin < 10 && (margin = (areaLength - itemLength) / 2, totalLength = 0, step++)), steps[id2] = step, margins[step] = $$.isLegendInset ? 10 : margin, offsets[id2] = totalLength, totalLength += itemLength;
    +			};
    +
    +			// MEMO: care about condifion of step, totalLength
    +
    +
    +			if (index === 0 && (totalLength = 0, step = 0, maxWidth = 0, maxHeight = 0), config.legend_show && !$$.isLegendToShow(id)) return widths[id] = 0, heights[id] = 0, steps[id] = 0, void (offsets[id] = 0);
    +
    +			widths[id] = itemWidth, heights[id] = itemHeight, (!maxWidth || itemWidth >= maxWidth) && (maxWidth = itemWidth), (!maxHeight || itemHeight >= maxHeight) && (maxHeight = itemHeight);
    +
    +
    +			var maxLength = isLegendRightOrInset ? maxHeight : maxWidth;
    +
    +			config.legend_equally ? (Object.keys(widths).forEach(function (id2) {
    +				return widths[id2] = maxWidth;
    +			}), Object.keys(heights).forEach(function (id2) {
    +				return heights[id2] = maxHeight;
    +			}), margin = (areaLength - maxLength * targetIdz.length) / 2, margin < 10 ? (totalLength = 0, step = 0, targetIdz.forEach(function (id2) {
    +				return updateValues(id2);
    +			})) : updateValues(id, !0)) : updateValues(id);
    +		};
    +
    +		// Skip elements when their name is set to null
    +
    +
    +		$$.isLegendInset && (step = config.legend_inset_step ? config.legend_inset_step : targetIdz.length, $$.updateLegendStep(step)), $$.isLegendRight ? (xForLegend = function (id) {
    +			return maxWidth * steps[id];
    +		}, yForLegend = function (id) {
    +			return margins[steps[id]] + offsets[id];
    +		}) : $$.isLegendInset ? (xForLegend = function (id) {
    +			return maxWidth * steps[id] + 10;
    +		}, yForLegend = function (id) {
    +			return margins[steps[id]] + offsets[id];
    +		}) : (xForLegend = function (id) {
    +			return margins[steps[id]] + offsets[id];
    +		}, yForLegend = function (id) {
    +			return maxHeight * steps[id];
    +		});
    +
    +		var xForLegendText = function (id, i) {
    +			return xForLegend(id, i) + 4 + config.legend_item_tile_width;
    +		},
    +		    xForLegendRect = function (id, i) {
    +			return xForLegend(id, i);
    +		},
    +		    x1ForLegendTile = function (id, i) {
    +			return xForLegend(id, i) - 2;
    +		},
    +		    x2ForLegendTile = function (id, i) {
    +			return xForLegend(id, i) - 2 + config.legend_item_tile_width;
    +		},
    +		    yForLegendText = function (id, i) {
    +			return yForLegend(id, i) + 9;
    +		},
    +		    yForLegendRect = function (id, i) {
    +			return yForLegend(id, i) - 5;
    +		},
    +		    yForLegendTile = function (id, i) {
    +			return yForLegend(id, i) + 4;
    +		},
    +		    l = $$.legend.selectAll("." + _classes2.default.legendItem).data(targetIdz).enter().append("g");
    +
    +		// Define g for legend area
    +
    +
    +		$$.setLegendItem(l), l.append("text").text(function (id) {
    +			return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id;
    +		}).each(function (id, i) {
    +			updatePositions(this, id, i);
    +		}).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendText), l.append("rect").attr("class", _classes2.default.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : -200).attr("y", isLegendRightOrInset ? -200 : yForLegendRect);
    +
    +
    +		var usePoint = $$.config.legend_usePoint;
    +
    +		if (usePoint) {
    +			var ids = [];
    +
    +			l.append(function (d) {
    +				var pattern = (0, _util.notEmpty)(config.point_pattern) ? config.point_pattern : [config.point_type];
    +
    +				ids.indexOf(d) === -1 && ids.push(d);
    +
    +
    +				var point = pattern[ids.indexOf(d) % pattern.length];
    +
    +				return point === "rectangle" && (point = "rect"), document.createElementNS(_d3Selection.namespaces.svg, $$.hasValidPointType(point) ? point : "use");
    +			}).attr("class", _classes2.default.legendItemPoint).style("fill", function (d) {
    +				return $$.color(d);
    +			}).style("pointer-events", "none").attr("href", function (data, idx, selection) {
    +				var node = selection[idx],
    +				    nodeName = node.nodeName.toLowerCase();
    +
    +
    +				return nodeName === "use" ? "#" + $$.datetimeId + "-point-" + data : undefined;
    +			});
    +		} else l.append("line").attr("class", _classes2.default.legendItemTile).style("stroke", $$.color).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : -200).attr("y1", isLegendRightOrInset ? -200 : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : -200).attr("y2", isLegendRightOrInset ? -200 : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
    +
    +		// Set background for inset legend
    +		background = $$.legend.select("." + _classes2.default.legendBackground + " rect"), $$.isLegendInset && maxWidth > 0 && background.size() === 0 && (background = $$.legend.insert("g", "." + _classes2.default.legendItem).attr("class", _classes2.default.legendBackground).append("rect"));
    +
    +
    +		var texts = $$.legend.selectAll("text").data(targetIdz).text(function (id) {
    +			return (0, _util.isDefined)(config.data_names[id]) ? config.data_names[id] : id;
    +		}) // MEMO: needed for update
    +		.each(function (id, i) {
    +			updatePositions(this, id, i);
    +		});
    +
    +		(withTransition ? texts.transition() : texts).attr("x", xForLegendText).attr("y", yForLegendText);
    +
    +
    +		var rects = $$.legend.selectAll("rect." + _classes2.default.legendItemEvent).data(targetIdz);
    +
    +		if ((withTransition ? rects.transition() : rects).attr("width", function (id) {
    +			return widths[id];
    +		}).attr("height", function (id) {
    +			return heights[id];
    +		}).attr("x", xForLegendRect).attr("y", yForLegendRect), usePoint) {
    +			var tiles = $$.legend.selectAll("." + _classes2.default.legendItemPoint).data(targetIdz);
    +
    +			(withTransition ? tiles.transition() : tiles).each(function () {
    +				var nodeName = this.nodeName.toLowerCase(),
    +				    pointR = $$.config.point_r,
    +				    x = "x",
    +				    y = "y",
    +				    xOffset = 2,
    +				    yOffset = 2.5,
    +				    radius = void 0,
    +				    width = void 0,
    +				    height = void 0;
    +
    +
    +				if (nodeName === "circle") {
    +					var size = pointR * .2;
    +
    +					x = "cx", y = "cy", radius = pointR + size, xOffset = pointR * 2, yOffset = -size;
    +				} else if (nodeName === "rect") {
    +					var _size = pointR * 2.5;
    +
    +					width = _size, height = _size, yOffset = 3;
    +				}
    +
    +				(0, _d3Selection.select)(this).attr(x, function (d) {
    +					return x1ForLegendTile(d) + xOffset;
    +				}).attr(y, function (d) {
    +					return yForLegendTile(d) - yOffset;
    +				}).attr("r", radius).attr("width", width).attr("height", height);
    +			});
    +		} else {
    +			var _tiles = $$.legend.selectAll("line." + _classes2.default.legendItemTile).data(targetIdz);
    +
    +			(withTransition ? _tiles.transition() : _tiles).style("stroke", $$.color).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile);
    +		}
    +
    +		background && (withTransition ? background.transition() : background).attr("height", $$.getLegendHeight() - 12).attr("width", maxWidth * (step + 1) + 10), $$.legend.selectAll("." + _classes2.default.legendItem).classed(_classes2.default.legendItemHidden, function (id) {
    +			return !$$.isTargetToShow(id);
    +		}), $$.updateLegendItemWidth(maxWidth), $$.updateLegendItemHeight(maxHeight), $$.updateLegendStep(step), $$.updateSizes(), $$.updateScales(!withTransition), $$.updateSvgSize(), $$.transformAll(withTransitionForTransform, transitions), $$.legendHasRendered = !0;
    +	}
    +});
    +
    +/***/ }),
    +/* 44 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initializes the title
    +  * @private
    +  */
    +	initTitle: function initTitle() {
    +		var $$ = this;
    +
    +		$$.title = $$.svg.append("text").text($$.config.title_text).attr("class", $$.CLASS.title);
    +	},
    +
    +
    +	/**
    +  * Redraw title
    +  * @private
    +  */
    +	redrawTitle: function redrawTitle() {
    +		var $$ = this;
    +
    +		$$.title.attr("x", $$.xForTitle.bind($$)).attr("y", $$.yForTitle.bind($$));
    +	},
    +
    +
    +	/**
    +  * Returns the x attribute value of the title
    +  * @private
    +  * @returns {Number} x attribute value
    +  */
    +	xForTitle: function xForTitle() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    position = config.title_position || "left",
    +		    x = void 0;
    +
    +
    +		return x = position.indexOf("right") >= 0 ? $$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width - config.title_padding.right : position.indexOf("center") >= 0 ? ($$.currentWidth - $$.getTextRect($$.title, $$.CLASS.title, $$.title).width) / 2 : config.title_padding.left, x;
    +	},
    +
    +
    +	/**
    +  * Returns the y attribute value of the title
    +  * @private
    +  * @returns {Number} y attribute value
    +  */
    +	yForTitle: function yForTitle() {
    +		var $$ = this;
    +
    +		return $$.config.title_padding.top + $$.getTextRect($$.title, $$.CLASS.title, $$.title).height;
    +	},
    +
    +
    +	/**
    +  * Get title padding
    +  * @private
    +  * @returns {Number} padding value
    +  */
    +	getTitlePadding: function getTitlePadding() {
    +		var $$ = this;
    +
    +		return $$.yForTitle() + $$.config.title_padding.bottom;
    +	}
    +});
    +
    +/***/ }),
    +/* 45 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getClipPath: function getClipPath(id) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		if (!config.clipPath && /-clip$/.test(id) || !config.axis_x_clipPath && /-clip-xaxis$/.test(id) || !config.axis_y_clipPath && /-clip-yaxis$/.test(id)) return null;
    +
    +		var isIE9 = window.navigator.appVersion.toLowerCase().indexOf("msie 9.") >= 0;
    +
    +		return "url(" + (isIE9 ? "" : document.URL.split("#")[0]) + "#" + id + ")";
    +	},
    +	appendClip: function appendClip(parent, id) {
    +		return parent.append("clipPath").attr("id", id).append("rect");
    +	},
    +	getAxisClipX: function getAxisClipX(forHorizontal) {
    +		// axis line width + padding for left
    +		var left = Math.max(30, this.margin.left);
    +
    +		return forHorizontal ? -(1 + left) : -(left - 1);
    +	},
    +	getAxisClipY: function getAxisClipY(forHorizontal) {
    +		return forHorizontal ? -20 : -this.margin.top;
    +	},
    +	getXAxisClipX: function getXAxisClipX() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipX(!$$.config.axis_rotated);
    +	},
    +	getXAxisClipY: function getXAxisClipY() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipY(!$$.config.axis_rotated);
    +	},
    +	getYAxisClipX: function getYAxisClipX() {
    +		var $$ = this;
    +
    +		return $$.config.axis_y_inner ? -1 : $$.getAxisClipX($$.config.axis_rotated);
    +	},
    +	getYAxisClipY: function getYAxisClipY() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipY($$.config.axis_rotated);
    +	},
    +	getAxisClipWidth: function getAxisClipWidth(forHorizontal) {
    +		var $$ = this,
    +		    left = Math.max(30, $$.margin.left),
    +		    right = Math.max(30, $$.margin.right);
    +
    +
    +		// width + axis line width + padding for left/right
    +		return forHorizontal ? $$.width + 2 + left + right : $$.margin.left + 20;
    +	},
    +	getAxisClipHeight: function getAxisClipHeight(forHorizontal) {
    +		// less than 20 is not enough to show the axis label 'outer' without legend
    +		return (forHorizontal ? this.margin.bottom : this.margin.top + this.height) + 20;
    +	},
    +	getXAxisClipWidth: function getXAxisClipWidth() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipWidth(!$$.config.axis_rotated);
    +	},
    +	getXAxisClipHeight: function getXAxisClipHeight() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipHeight(!$$.config.axis_rotated);
    +	},
    +	getYAxisClipWidth: function getYAxisClipWidth() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);
    +	},
    +	getYAxisClipHeight: function getYAxisClipHeight() {
    +		var $$ = this;
    +
    +		return $$.getAxisClipHeight($$.config.axis_rotated);
    +	}
    +});
    +
    +/***/ }),
    +/* 46 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	initRegion: function initRegion() {
    +		var $$ = this;
    +
    +		$$.region = $$.main.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.regions);
    +	},
    +	updateRegion: function updateRegion(duration) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		// hide if arc type
    +		$$.region.style("visibility", $$.hasArcType() ? "hidden" : "visible"), $$.mainRegion = $$.main.select("." + _classes2.default.regions).selectAll("." + _classes2.default.region).data(config.regions), $$.mainRegion.exit().transition().duration(duration).style("opacity", "0").remove(), $$.mainRegion = $$.mainRegion.enter().append("g").merge($$.mainRegion).attr("class", $$.classRegion.bind($$)), $$.mainRegion.append("rect").style("fill-opacity", "0");
    +	},
    +	redrawRegion: function redrawRegion(withTransition) {
    +		var $$ = this,
    +		    regions = $$.mainRegion.select("rect");
    +
    +
    +		return regions = (withTransition ? regions.transition() : regions).attr("x", $$.regionX.bind($$)).attr("y", $$.regionY.bind($$)).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$)), [(withTransition ? regions.transition() : regions).style("fill-opacity", function (d) {
    +			return (0, _util.isValue)(d.opacity) ? d.opacity : "0.1";
    +		}).on("end", function () {
    +			(0, _d3Selection.select)(this.parentNode).selectAll("rect:not([x])").remove();
    +		})];
    +	},
    +	getRegionXY: function getRegionXY(type, d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    isX = type === "x",
    +		    key = "start",
    +		    scale = void 0,
    +		    pos = 0;
    +
    +
    +		return d.axis === "y" || d.axis === "y2" ? (!isX && (key = "end"), (isX ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], pos = scale(d[key]))) : (isX ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, pos = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), pos;
    +	},
    +	regionX: function regionX(d) {
    +		return this.getRegionXY("x", d);
    +	},
    +	regionY: function regionY(d) {
    +		return this.getRegionXY("y", d);
    +	},
    +	getRegionSize: function getRegionSize(type, d) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    isWidth = type === "width",
    +		    start = $$[isWidth ? "regionX" : "regionY"](d),
    +		    scale = void 0,
    +		    key = "end",
    +		    end = $$[type];
    +
    +
    +		return d.axis === "y" || d.axis === "y2" ? (!isWidth && (key = "start"), (isWidth ? isRotated : !isRotated) && key in d && (scale = $$[d.axis], end = scale(d[key]))) : (isWidth ? !isRotated : isRotated) && key in d && (scale = $$.zoomScale || $$.x, end = scale($$.isTimeSeries() ? $$.parseDate(d[key]) : d[key])), end < start ? 0 : end - start;
    +	},
    +	regionWidth: function regionWidth(d) {
    +		return this.getRegionSize("width", d);
    +	},
    +	regionHeight: function regionHeight(d) {
    +		return this.getRegionSize("height", d);
    +	},
    +	isRegionOnX: function isRegionOnX(d) {
    +		return !d.axis || d.axis === "x";
    +	}
    +}); // selection
    +
    +/***/ }),
    +/* 47 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Called when dragging.
    +  * Data points can be selected.
    +  * @private
    +  * @param {Object} mouse Object
    +  */
    +	drag: function drag(mouse) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    main = $$.main;
    +
    +
    +		if (!$$.hasArcType() && config.data_selection_enabled && ( // do nothing if not selectable
    +		!config.zoom_enabled || $$.zoom.altDomain) && config.data_selection_multiple // skip when single selection because drag is used for multiple selection
    +		) {
    +				var _$$$dragStart = $$.dragStart,
    +				    sx = _$$$dragStart[0],
    +				    sy = _$$$dragStart[1],
    +				    mx = mouse[0],
    +				    my = mouse[1],
    +				    minX = Math.min(sx, mx),
    +				    maxX = Math.max(sx, mx),
    +				    minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my),
    +				    maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my);
    +				main.select("." + _classes2.default.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY), main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).filter(function (d) {
    +					return config.data_selection_isselectable(d);
    +				}).each(function (d, i) {
    +					var shape = (0, _d3Selection.select)(this),
    +					    isSelected = shape.classed(_classes2.default.SELECTED),
    +					    isIncluded = shape.classed(_classes2.default.INCLUDED),
    +					    _x = void 0,
    +					    _y = void 0,
    +					    _w = void 0,
    +					    _h = void 0,
    +					    toggle = void 0,
    +					    isWithin = !1,
    +					    box = void 0;
    +
    +					if (shape.classed(_classes2.default.circle)) _x = shape.attr("cx") * 1, _y = shape.attr("cy") * 1, toggle = $$.togglePoint, isWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;else if (shape.classed(_classes2.default.bar)) box = (0, _util.getPathBox)(this), _x = box.x, _y = box.y, _w = box.width, _h = box.height, toggle = $$.togglePath, isWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);else
    +						// line/area selection not supported yet
    +						return;
    +
    +					isWithin ^ isIncluded && (shape.classed(_classes2.default.INCLUDED, !isIncluded), shape.classed(_classes2.default.SELECTED, !isSelected), toggle.call($$, !isSelected, shape, d, i));
    +				});
    +			}
    +	},
    +
    +
    +	/**
    +  * Called when the drag starts.
    +  * Adds and Shows the drag area.
    +  * @private
    +  * @param {Object} mouse Object
    +  */
    +	dragstart: function dragstart(mouse) {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.hasArcType() || !config.data_selection_enabled || ($$.dragStart = mouse, $$.main.select("." + _classes2.default.chart).append("rect").attr("class", _classes2.default.dragarea).style("opacity", "0.1"), $$.setDragStatus(!0));
    +	},
    +
    +
    +	/**
    +  * Called when the drag finishes.
    +  * Removes the drag area.
    +  * @private
    +  */
    +	dragend: function dragend() {
    +		var $$ = this,
    +		    config = $$.config;
    +		$$.hasArcType() || !config.data_selection_enabled || ($$.main.select("." + _classes2.default.dragarea).transition().duration(100).style("opacity", "0").remove(), $$.main.selectAll("." + _classes2.default.shape).classed(_classes2.default.INCLUDED, !1), $$.setDragStatus(!1));
    +	},
    +	setDragStatus: function setDragStatus(isDragging) {
    +		this.dragging = isDragging;
    +	}
    +});
    +
    +/***/ }),
    +/* 48 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Color = __webpack_require__(49),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Select a point
    +  * @private
    +  * @param {Object} target point
    +  * @param {Object} data
    +  * @param {Number} index
    +  */
    +	selectPoint: function selectPoint(target, d, i) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    cx = (isRotated ? $$.circleY : $$.circleX).bind($$),
    +		    cy = (isRotated ? $$.circleX : $$.circleY).bind($$),
    +		    r = $$.pointSelectR.bind($$);
    +		(0, _util.callFn)(config.data_onselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () {
    +			return $$.generateClass(_classes2.default.selectedCircle, i);
    +		}).attr("cx", cx).attr("cy", cy).attr("stroke", function () {
    +			return $$.color(d);
    +		}).attr("r", function (d2) {
    +			return $$.pointSelectR(d2) * 1.4;
    +		}).transition().duration(100).attr("r", r);
    +	},
    +
    +
    +	/**
    +  * Unelect a point
    +  * @private
    +  * @param {Object} target point
    +  * @param {Object} data
    +  * @param {Number} index
    +  */
    +	unselectPoint: function unselectPoint(target, d, i) {
    +		var $$ = this;
    +
    +		(0, _util.callFn)($$.config.data_onunselected, $$.api, d, target.node()), $$.main.select("." + _classes2.default.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + _classes2.default.selectedCircle + "-" + i).transition().duration(100).attr("r", 0).remove();
    +	},
    +
    +
    +	/**
    +  * Toggles the selection of points
    +  * @private
    +  * @param {Boolean} whether or not to select.
    +  * @param {Object} target point
    +  * @param {Object} data
    +  * @param {Number} index
    +  */
    +	togglePoint: function togglePoint(selected, target, d, i) {
    +		var method = (selected ? "" : "un") + "selectPoint";
    +
    +		this[method](target, d, i);
    +	},
    +
    +
    +	/**
    +  * Select a path
    +  * @private
    +  * @param {Object} target path
    +  * @param {Object} data
    +  */
    +	selectPath: function selectPath(target, d) {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.callFn)(config.data_onselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () {
    +			return (0, _d3Color.rgb)($$.color(d)).brighter(.75);
    +		});
    +	},
    +
    +
    +	/**
    +  * Unelect a path
    +  * @private
    +  * @param {Object} target path
    +  * @param {Object} data
    +  */
    +	unselectPath: function unselectPath(target, d) {
    +		var $$ = this,
    +		    config = $$.config;
    +		(0, _util.callFn)(config.data_onunselected, $$, d, target.node()), config.interaction_brighten && target.transition().duration(100).style("fill", function () {
    +			return $$.color(d);
    +		});
    +	},
    +
    +
    +	/**
    +  * Toggles the selection of lines
    +  * @private
    +  * @param {Boolean} whether or not to select.
    +  * @param {Object} target shape
    +  * @param {Object} data
    +  * @param {Number} index
    +  */
    +	togglePath: function togglePath(selected, target, d, i) {
    +		this[(selected ? "" : "un") + "selectPath"](target, d, i);
    +	},
    +
    +
    +	/**
    +  * Returns the toggle method of the target
    +  * @private
    +  * @param {Object} target shape
    +  * @param {Object} data
    +  * @returns {Function} toggle method
    +  */
    +	getToggle: function getToggle(that, d) {
    +		var $$ = this;
    +
    +		return that.nodeName === "path" ? $$.togglePath : $$.isStepType(d) ? function () {} : // circle is hidden in step chart, so treat as within the click area
    +		$$.togglePoint;
    +	},
    +
    +
    +	/**
    +  * Toggles the selection of shapes
    +  * @private
    +  * @param {Object} target shape
    +  * @param {Object} data
    +  * @param {Number} index
    +  */
    +	toggleShape: function toggleShape(that, d, i) {
    +		var $$ = this,
    +		    config = $$.config,
    +		    shape = (0, _d3Selection.select)(that),
    +		    isSelected = shape.classed(_classes2.default.SELECTED),
    +		    toggle = $$.getToggle(that, d).bind($$),
    +		    toggledShape = void 0;
    +
    +
    +		if (config.data_selection_enabled && config.data_selection_isselectable(d)) {
    +			if (!config.data_selection_multiple) {
    +				var selector = "." + _classes2.default.shapes;
    +
    +				config.data_selection_grouped && (selector += $$.getTargetSelectorSuffix(d.id)), $$.main.selectAll(selector).selectAll("." + _classes2.default.shape).each(function (d, i) {
    +					var shape = (0, _d3Selection.select)(this);
    +
    +					shape.classed(_classes2.default.SELECTED) && (toggledShape = shape, toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i));
    +				});
    +			}
    +
    +			toggledShape && toggledShape.node() === shape.node() || (shape.classed(_classes2.default.SELECTED, !isSelected), toggle(!isSelected, shape, d, i));
    +		}
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 49 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__49__;
    +
    +/***/ }),
    +/* 50 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Brush = __webpack_require__(13),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initialize the brush.
    +  * @private
    +  */
    +	initBrush: function initBrush() {
    +		var $$ = this;
    +
    +		// set the brush
    +		$$.brush = $$.config.axis_rotated ? (0, _d3Brush.brushY)() : (0, _d3Brush.brushX)();
    +
    +
    +		// set "brush" event
    +		var brushHandler = function () {
    +			$$.redrawForBrush();
    +		};
    +
    +		$$.brush.on("start", function () {
    +			$$.inputType === "touch" && $$.hideTooltip(), brushHandler();
    +		}).on("brush", brushHandler), $$.brush.update = function () {
    +			var extent = this.extent()();
    +
    +			return extent[1].filter(function (v) {
    +				return isNaN(v);
    +			}).length === 0 && $$.context && $$.context.select("." + _classes2.default.brush).call(this), this;
    +		}, $$.brush.scale = function (scale, height) {
    +			var overlay = $$.svg.select(".bb-brush .overlay"),
    +			    extent = [[0, 0]];
    +			scale.range ? extent.push([scale.range()[1], (height || !overlay.empty()) && ~~overlay.attr("height") || 60]) : scale.constructor === Array && extent.push(scale), $$.config.axis_rotated && extent.reverse(), this.extent($$.config.axis_x_extent || extent), this.update();
    +		}, $$.brush.getSelection = function () {
    +			return $$.context ? $$.context.select("." + _classes2.default.brush) : (0, _d3Selection.select)([]);
    +		};
    +	},
    +
    +
    +	/**
    +  * Initialize the subchart.
    +  * @private
    +  */
    +	initSubchart: function initSubchart() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    visibility = config.subchart_show ? "visible" : "hidden";
    +		$$.context = $$.svg.append("g").attr("transform", $$.getTranslate("context"));
    +
    +
    +		var context = $$.context;
    +
    +		context.style("visibility", visibility), context.append("g").attr("clip-path", $$.clipPathForSubchart).attr("class", _classes2.default.chart), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartBars), context.select("." + _classes2.default.chart).append("g").attr("class", _classes2.default.chartLines), context.append("g").attr("clip-path", $$.clipPath).attr("class", _classes2.default.brush).call($$.brush), $$.axes.subx = context.append("g").attr("class", _classes2.default.axisX).attr("transform", $$.getTranslate("subx")).attr("clip-path", config.axis_rotated ? "" : $$.clipPathForXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden");
    +	},
    +
    +
    +	/**
    +  * Update sub chart
    +  * @private
    +  * @param {Object} $$.data.targets
    +  */
    +	updateTargetsForSubchart: function updateTargetsForSubchart(targets) {
    +		var $$ = this,
    +		    context = $$.context,
    +		    config = $$.config,
    +		    classChartBar = $$.classChartBar.bind($$),
    +		    classBars = $$.classBars.bind($$),
    +		    classChartLine = $$.classChartLine.bind($$),
    +		    classLines = $$.classLines.bind($$),
    +		    classAreas = $$.classAreas.bind($$);
    +
    +
    +		if (config.subchart_show) {
    +			// -- Bar --//
    +			var contextBarUpdate = context.select("." + _classes2.default.chartBars).selectAll("." + _classes2.default.chartBar).data(targets).attr("class", classChartBar),
    +			    contextBarEnter = contextBarUpdate.enter().append("g").style("opacity", "0").attr("class", classChartBar).merge(contextBarUpdate);
    +
    +
    +			// Bars for each data
    +			contextBarEnter.append("g").attr("class", classBars);
    +
    +
    +			// -- Line --//
    +			var contextLineUpdate = context.select("." + _classes2.default.chartLines).selectAll("." + _classes2.default.chartLine).data(targets).attr("class", classChartLine),
    +			    contextLineEnter = contextLineUpdate.enter().append("g").style("opacity", "0").attr("class", classChartLine).merge(contextLineUpdate);
    +
    +
    +			// Lines for each data
    +			contextLineEnter.append("g").attr("class", classLines), contextLineEnter.append("g").attr("class", classAreas), context.selectAll("." + _classes2.default.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? $$.width2 : $$.height2);
    +		}
    +	},
    +
    +
    +	/**
    +  * Update the bar of the sub chart
    +  * @private
    +  * @param {Object} durationForExit
    +  */
    +	updateBarForSubchart: function updateBarForSubchart(durationForExit) {
    +		var $$ = this;
    +
    +		$$.contextBar = $$.context.selectAll("." + _classes2.default.bars).selectAll("." + _classes2.default.bar).data($$.barData.bind($$)), $$.contextBar.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextBar = $$.contextBar.enter().append("path").attr("class", $$.classBar.bind($$)).style("stroke", "none").style("fill", $$.color).merge($$.contextBar).style("opacity", $$.initialOpacity.bind($$));
    +	},
    +
    +
    +	/**
    +  * Redraw the bar of the subchart
    +  * @private
    +  * @param {String} path in subchart bar
    +  * @param {Boolean} whether or not to transition.
    +  * @param {Number} transition duration
    +  */
    +	redrawBarForSubchart: function redrawBarForSubchart(drawBarOnSub, withTransition, duration) {
    +		var contextBar = void 0;
    +
    +		contextBar = withTransition ? this.contextBar.transition(Math.random().toString()).duration(duration) : this.contextBar, contextBar.attr("d", drawBarOnSub).style("opacity", "1");
    +	},
    +
    +
    +	/**
    +  * Update the line of the sub chart
    +  * @private
    +  * @param {Number} Fade-out transition duration
    +  */
    +	updateLineForSubchart: function updateLineForSubchart(durationForExit) {
    +		var $$ = this;
    +
    +		$$.contextLine = $$.context.selectAll("." + _classes2.default.lines).selectAll("." + _classes2.default.line).data($$.lineData.bind($$)), $$.contextLine.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextLine = $$.contextLine.enter().append("path").attr("class", $$.classLine.bind($$)).style("stroke", $$.color).merge($$.contextLine).style("opacity", $$.initialOpacity.bind($$));
    +	},
    +
    +
    +	/**
    +  * Redraw the line of the subchart
    +  * @private
    +  * @param {String} path in subchart line
    +  * @param {Boolean} whether or not to transition
    +  * @param {Number} transition duration
    +  */
    +	redrawLineForSubchart: function redrawLineForSubchart(drawLineOnSub, withTransition, duration) {
    +		var contextLine = void 0;
    +
    +		contextLine = withTransition ? this.contextLine.transition(Math.random().toString()).duration(duration) : this.contextLine, contextLine.attr("d", drawLineOnSub).style("opacity", "1");
    +	},
    +
    +
    +	/**
    +  * Update the area of the sub chart
    +  * @private
    +  * @param {Number} Fade-out transition duration
    +  */
    +	updateAreaForSubchart: function updateAreaForSubchart(durationForExit) {
    +		var $$ = this;
    +
    +		$$.contextArea = $$.context.selectAll("." + _classes2.default.areas).selectAll("." + _classes2.default.area).data($$.lineData.bind($$)), $$.contextArea.exit().transition().duration(durationForExit).style("opacity", "0").remove(), $$.contextArea = $$.contextArea.enter().append("path").attr("class", $$.classArea.bind($$)).style("fill", $$.color).style("opacity", function () {
    +			return $$.orgAreaOpacity = (0, _d3Selection.select)(this).style("opacity"), "0";
    +		}).merge($$.contextArea).style("opacity", "0");
    +	},
    +
    +	/**
    +  * Redraw the area of the subchart
    +  * @private
    +  * @param {String} path in subchart line
    +  * @param {Boolean} whether or not to transition
    +  * @param {Number} transition duration
    +  */
    +	redrawAreaForSubchart: function redrawAreaForSubchart(drawAreaOnSub, withTransition, duration) {
    +		var contextArea = void 0;
    +
    +		contextArea = withTransition ? this.contextArea.transition(Math.random().toString()).duration(duration) : this.contextArea, contextArea.attr("d", drawAreaOnSub).style("fill", this.color).style("opacity", this.orgAreaOpacity);
    +	},
    +
    +
    +	/**
    +  * Redraw subchart.
    +  * @private
    +  * @param {Boolean} whether or not to show subchart
    +  * @param Do not use.
    +  * @param {Number} transition duration
    +  * @param Do not use.
    +  * @param {Object} area Indices
    +  * @param {Object} bar Indices
    +  * @param {Object} line Indices
    +  */
    +	redrawSubchart: function redrawSubchart(withSubchart, transitions, duration, durationForExit, areaIndices, barIndices, lineIndices) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		// subchart
    +		if ($$.context.style("visibility", config.subchart_show ? "visible" : "hidden"), config.subchart_show && (_d3Selection.event && _d3Selection.event.type === "zoom" && $$.brush.update(), withSubchart))
    +
    +			// update subchart elements if needed
    +			{
    +				(0, _util.brushEmpty)($$) || $$.brush.update();
    +
    +
    +				// setup drawer - MEMO: this must be called after axis updated
    +				var drawAreaOnSub = $$.generateDrawArea(areaIndices, !0),
    +				    drawBarOnSub = $$.generateDrawBar(barIndices, !0),
    +				    drawLineOnSub = $$.generateDrawLine(lineIndices, !0);
    +				$$.updateBarForSubchart(duration), $$.updateLineForSubchart(duration), $$.updateAreaForSubchart(duration), $$.redrawBarForSubchart(drawBarOnSub, duration, duration), $$.redrawLineForSubchart(drawLineOnSub, duration, duration), $$.redrawAreaForSubchart(drawAreaOnSub, duration, duration);
    +			}
    +	},
    +
    +	/**
    +  * Redraw the brush.
    +  * @private
    +  */
    +	redrawForBrush: function redrawForBrush() {
    +		var $$ = this,
    +		    x = $$.x;
    +		$$.redraw({
    +			withTransition: !1,
    +			withY: $$.config.zoom_rescale,
    +			withSubchart: !1,
    +			withUpdateXDomain: !0,
    +			withDimension: !1
    +		}), $$.config.subchart_onbrush.call($$.api, x.orgDomain());
    +	},
    +
    +
    +	/**
    +  * Transform context
    +  * @private
    +  * @param {Boolean} indicates transition is enabled
    +  * @param {Object} The return value of the generateTransitions method of Axis.
    +  */
    +	transformContext: function transformContext(withTransition, transitions) {
    +		var $$ = this,
    +		    subXAxis = void 0;
    +		transitions && transitions.axisSubX ? subXAxis = transitions.axisSubX : (subXAxis = $$.context.select("." + _classes2.default.axisX), withTransition && (subXAxis = subXAxis.transition())), $$.context.attr("transform", $$.getTranslate("context")), subXAxis.attr("transform", $$.getTranslate("subx"));
    +	},
    +
    +
    +	/**
    +  * Get default extent
    +  * @private
    +  * @returns {Array} default extent
    +  */
    +	getDefaultExtent: function getDefaultExtent() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    extent = (0, _util.isFunction)(config.axis_x_extent) ? config.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent;
    +
    +
    +		return $$.isTimeSeries() && (extent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])]), extent;
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 51 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Array = __webpack_require__(6),
    +    _d3Selection = __webpack_require__(5),
    +    _d3Drag = __webpack_require__(28),
    +    _d3Zoom = __webpack_require__(52),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Initialize zoom.
    +  * @private
    +  */
    +	initZoom: function initZoom() {
    +		var $$ = this;
    +
    +		$$.zoomScale = null, $$.generateZoom();
    +	},
    +
    +
    +	/**
    +  * Bind zoom event
    +  * @param {Boolean} bind Weather bind or unbound
    +  * @private
    +  */
    +	bindZoomEvent: function bindZoomEvent() {
    +		var bind = !(arguments.length > 0 && arguments[0] !== undefined) || arguments[0],
    +		    $$ = this,
    +		    zoomEnabled = $$.config.zoom_enabled;
    +		$$.redrawEventRect(), zoomEnabled && bind ? zoomEnabled === !0 || zoomEnabled.type === "wheel" ? $$.bindZoomOnEventRect() : zoomEnabled.type === "drag" && $$.bindZoomOnDrag() : bind === !1 && ($$.api.unzoom(), $$.main.select("." + _classes2.default.eventRects).on(".zoom", null).on(".drag", null));
    +	},
    +
    +
    +	/**
    +  * Generate zoom
    +  * @private
    +  */
    +	generateZoom: function generateZoom() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    zoom = (0, _d3Zoom.zoom)().duration(0).on("start", $$.onZoomStart.bind($$)).on("zoom", $$.onZoom.bind($$)).on("end", $$.onZoomEnd.bind($$));
    +
    +
    +		// get zoom extent
    +		zoom.orgScaleExtent = function () {
    +			var extent = config.zoom_extent || [1, 10];
    +
    +			return [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];
    +		}, zoom.updateScaleExtent = function () {
    +			var ratio = (0, _util.diffDomain)($$.x.orgDomain()) / (0, _util.diffDomain)($$.getZoomDomain()),
    +			    extent = this.orgScaleExtent();
    +
    +
    +			return this.scaleExtent([extent[0] * ratio, extent[1] * ratio]), this;
    +		}, zoom.updateTransformScale = function (transform) {
    +			// rescale from the original scale
    +			var newScale = transform.rescaleX($$.subX.orgScale()),
    +			    domain = $$.trimXDomain(newScale.domain()),
    +			    rescale = config.zoom_rescale;
    +			newScale.domain(domain, $$.orgXDomain), $$.zoomScale = $$.getCustomizedScale(newScale), $$.xAxis.scale($$.zoomScale), rescale && $$.x.domain($$.zoomScale.orgDomain());
    +		}, $$.zoom = zoom;
    +	},
    +
    +
    +	/**
    +  * 'start' event listener
    +  * @private
    +  */
    +	onZoomStart: function onZoomStart() {
    +		var $$ = this,
    +		    event = _d3Selection.event.sourceEvent;
    +		$$.zoom.altDomain = event.altKey ? $$.x.orgDomain() : null, $$.zoom.startEvent = event, (0, _util.callFn)($$.config.zoom_onzoomstart, $$.api, event);
    +	},
    +
    +
    +	/**
    +  * 'zoom' event listener
    +  * @private
    +  */
    +	onZoom: function onZoom() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    event = _d3Selection.event;
    +
    +
    +		if (config.zoom_enabled) {
    +				var isMousemove = event.sourceEvent.type === "mousemove",
    +				    transform = event.transform;
    +				return $$.zoom.updateTransformScale(transform), $$.filterTargetsToShow($$.data.targets).length === 0 ? void 0 : isMousemove && $$.zoom.altDomain ? ($$.x.domain($$.zoom.altDomain), void transform.scale($$.zoomScale).updateScaleExtent()) : void ($$.isCategorized() && $$.x.orgDomain()[0] === $$.orgXDomain[0] && $$.x.domain([$$.orgXDomain[0] - 1e-10, $$.x.orgDomain()[1]]), $$.redraw({
    +					withTransition: !1,
    +					withY: config.zoom_rescale,
    +					withSubchart: !1,
    +					withEventRect: !1,
    +					withDimension: !1
    +				}), $$.cancelClick = isMousemove, (0, _util.callFn)(config.zoom_onzoom, $$.api, $$.x.orgDomain()));
    +			}
    +	},
    +
    +
    +	/**
    +  * 'end' event listener
    +  * @private
    +  */
    +	onZoomEnd: function onZoomEnd() {
    +		var $$ = this,
    +		    startEvent = $$.zoom.startEvent;
    +
    +
    +		// if click, do nothing. otherwise, click interaction will be canceled.
    +		event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY || ($$.redrawEventRect(), $$.updateZoom(), (0, _util.callFn)($$.config.zoom_onzoomend, $$.api, $$.x.orgDomain()));
    +	},
    +
    +
    +	/**
    +  * Get zoom domain
    +  * @private
    +  * @returns {Array} zoom domain
    +  */
    +	getZoomDomain: function getZoomDomain() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    min = (0, _d3Array.min)([$$.orgXDomain[0], config.zoom_x_min]),
    +		    max = (0, _d3Array.max)([$$.orgXDomain[1], config.zoom_x_max]);
    +
    +
    +		return [min, max];
    +	},
    +
    +
    +	/**
    +  * Update zoom
    +  * @private
    +  */
    +	updateZoom: function updateZoom() {
    +		var $$ = this;
    +
    +		if ($$.zoomScale) {
    +			var zoomDomain = $$.zoomScale.domain(),
    +			    xDomain = $$.x.domain(),
    +			    delta = .015;
    +			// arbitrary value
    +
    +			// check if the zoomed chart is fully shown, then reset scale when zoom is out as initial
    +			(zoomDomain[0] <= xDomain[0] || zoomDomain[0] - delta <= xDomain[0]) && (xDomain[1] <= zoomDomain[1] || xDomain[1] <= zoomDomain[1] - delta) && ($$.xAxis.scale($$.x), $$.zoomScale = null);
    +		}
    +	},
    +
    +
    +	/**
    +  * Attach zoom event on <rect>
    +  * @private
    +  */
    +	bindZoomOnEventRect: function bindZoomOnEventRect() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.eventRects).call($$.zoom).on("dblclick.zoom", null);
    +	},
    +
    +
    +	/**
    +  * Initialize the drag behaviour used for zooming.
    +  * @private
    +  */
    +	initZoomBehaviour: function initZoomBehaviour() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    isRotated = config.axis_rotated,
    +		    start = 0,
    +		    end = 0,
    +		    zoomRect = null;
    +		$$.zoomBehaviour = (0, _d3Drag.drag)().on("start", function () {
    +			$$.setDragStatus(!0), zoomRect || (zoomRect = $$.main.append("rect").attr("clip-path", $$.clipPath).attr("class", _classes2.default.zoomBrush).attr("width", isRotated ? $$.width : 0).attr("height", isRotated ? 0 : $$.height)), start = (0, _d3Selection.mouse)(this)[0], end = start, zoomRect.attr("x", start).attr("width", 0);
    +		}).on("drag", function () {
    +			end = (0, _d3Selection.mouse)(this)[0], zoomRect.attr("x", Math.min(start, end)).attr("width", Math.abs(end - start));
    +		}).on("end", function () {
    +			var _ref,
    +			    scale = $$.zoomScale || $$.x;
    +
    +			$$.setDragStatus(!1), zoomRect.attr("x", 0).attr("width", 0), start > end && (_ref = [end, start], start = _ref[0], end = _ref[1], _ref), start !== end && $$.api.zoom([start, end].map(function (v) {
    +				return scale.invert(v);
    +			}));
    +		});
    +	},
    +
    +
    +	/**
    +  * Enable zooming by dragging using the zoombehaviour.
    +  * @private
    +  */
    +	bindZoomOnDrag: function bindZoomOnDrag() {
    +		var $$ = this;
    +
    +		$$.main.select("." + _classes2.default.eventRects).call($$.zoomBehaviour);
    +	},
    +	setZoomResetButton: function setZoomResetButton() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    resetButton = config.zoom_resetButton;
    +		resetButton && config.zoom_enabled.type === "drag" && ($$.zoom.resetBtn ? $$.zoom.resetBtn.style("display", null) : $$.zoom.resetBtn = $$.selectChart.append("div").classed(_classes2.default.button, !0).append("span").on("click", $$.api.unzoom.bind($$)).classed(_classes2.default.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom"));
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 52 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__52__;
    +
    +/***/ }),
    +/* 53 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Scale = __webpack_require__(10),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Set pattern's background color
    + * (it adds a <rect> element to simulate bg-color)
    + * @param {SVGPatternElement} pattern SVG pattern element
    + * @param {String} color Color string
    + * @param {String} id ID to be set
    + * @return {{id: string, node: SVGPatternElement}}
    + * @private
    + */
    +var colorizePattern = function (pattern, color, id) {
    +	var node = (0, _d3Selection.select)(pattern.cloneNode(!0));
    +
    +	return node.attr("id", id).insert("rect", ":first-child").attr("width", node.attr("width")).attr("height", node.attr("height")).style("fill", color), {
    +		id: id,
    +		node: node.node()
    +	};
    +},
    +    schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"];
    +
    +// Replacement of d3.schemeCategory10.
    +// Contained differently depend on d3 version: v4(d3-scale), v5(d3-scale-chromatic)
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Get color pattern from CSS file
    +  * CSS should be defined as: background-image: url("#00c73c;#fa7171; ...");
    +  * @return {Array}
    +  * @private
    +  */
    +	getColorFromCss: function getColorFromCss() {
    +		var body = document.body,
    +		    pattern = body["__colorPattern__"];
    +
    +
    +		if (!pattern) {
    +			var span = document.createElement("span");
    +			span.className = _classes2.default.colorPattern, span.style.display = "none", body.appendChild(span);
    +
    +
    +			var content = window.getComputedStyle(span).backgroundImage;
    +
    +			span.parentNode.removeChild(span), content.indexOf(";") > -1 && (pattern = content.replace(/url[^#]*|["'()]|(\s|%20)/g, "").split(";").map(function (v) {
    +				return v.trim().replace(/[\"'\s]/g, "");
    +			}).filter(Boolean), body["__colorPattern__"] = pattern);
    +		}
    +
    +		return pattern;
    +	},
    +	generateColor: function generateColor() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    colors = config.data_colors,
    +		    callback = config.data_color,
    +		    ids = [],
    +		    pattern = (0, _util.notEmpty)(config.color_pattern) ? config.color_pattern : (0, _d3Scale.scaleOrdinal)($$.getColorFromCss() || schemeCategory10).range(),
    +		    originalColorPattern = pattern;
    +
    +
    +		if ((0, _util.isFunction)(config.color_tiles)) {
    +			var tiles = config.color_tiles(),
    +			    colorizedPatterns = pattern.map(function (p, index) {
    +				var color = p.replace(/[#\(\)\s,]/g, ""),
    +				    id = $$.datetimeId + "-pattern-" + color + "-" + index;
    +
    +
    +				return colorizePattern(tiles[index % tiles.length], p, id);
    +			});
    +
    +			// Add background color to patterns
    +
    +			pattern = colorizedPatterns.map(function (p) {
    +				return "url(#" + p.id + ")";
    +			}), $$.patterns = colorizedPatterns;
    +		}
    +
    +		return function (d) {
    +			var id = d.id || d.data && d.data.id || d,
    +			    isLine = $$.isTypeOf(id, ["line", "spline", "step"]) || !$$.config.data_types[id],
    +			    color = void 0;
    +
    +			// if callback function is provided
    +
    +			return (0, _util.isFunction)(colors[id]) ? color = colors[id](d) : colors[id] ? color = colors[id] : (ids.indexOf(id) < 0 && ids.push(id), color = isLine ? originalColorPattern[ids.indexOf(id) % originalColorPattern.length] : pattern[ids.indexOf(id) % pattern.length], colors[id] = color), (0, _util.isFunction)(callback) ? callback(color, d) : color;
    +		};
    +	},
    +	generateLevelColor: function generateLevelColor() {
    +		var $$ = this,
    +		    config = $$.config,
    +		    colors = config.color_pattern,
    +		    threshold = config.color_threshold,
    +		    asValue = threshold.unit === "value",
    +		    max = threshold.max || 100,
    +		    values = threshold.values && threshold.values.length ? threshold.values : [];
    +
    +
    +		return (0, _util.notEmpty)(threshold) ? function (value) {
    +			var color = colors[colors.length - 1];
    +
    +			for (var v, i = 0; i < values.length; i++) if (v = asValue ? value : value * 100 / max, v < values[i]) {
    +				color = colors[i];
    +
    +				break;
    +			}
    +
    +			return color;
    +		} : null;
    +	}
    +});
    +
    +/***/ }),
    +/* 54 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var getFormat = function ($$, typeValue, v) {
    +	var config = $$.config,
    +	    type = "axis_" + typeValue + "_tick_format",
    +	    format = config[type] ? config[type] : $$.defaultValueFormat;
    +
    +
    +	return format(v);
    +};
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	getYFormat: function getYFormat(forArc) {
    +		var $$ = this,
    +		    formatForY = $$.yFormat,
    +		    formatForY2 = $$.y2Format;
    +
    +
    +		return forArc && !$$.hasType("gauge") && (formatForY = $$.defaultArcValueFormat, formatForY2 = $$.defaultArcValueFormat), function (v, ratio, id) {
    +			var format = $$.axis.getId(id) === "y2" ? formatForY2 : formatForY;
    +
    +			return format.call($$, v, ratio);
    +		};
    +	},
    +	yFormat: function yFormat(v) {
    +		return getFormat(this, "y", v);
    +	},
    +	y2Format: function y2Format(v) {
    +		return getFormat(this, "y2", v);
    +	},
    +	defaultValueFormat: function defaultValueFormat(v) {
    +		return (0, _util.isValue)(v) ? +v : "";
    +	},
    +	defaultArcValueFormat: function defaultArcValueFormat(v, ratio) {
    +		return (ratio * 100).toFixed(1) + "%";
    +	},
    +	dataLabelFormat: function dataLabelFormat(targetId) {
    +		var $$ = this,
    +		    dataLabels = $$.config.data_labels,
    +		    defaultFormat = function (v) {
    +			return (0, _util.isValue)(v) ? +v : "";
    +		},
    +		    format = defaultFormat;
    +
    +		// find format according to axis id
    +
    +
    +		return (0, _util.isFunction)(dataLabels.format) ? format = dataLabels.format : (0, _util.isObjectType)(dataLabels.format) && (dataLabels.format[targetId] ? format = dataLabels.format[targetId] === !0 ? defaultFormat : dataLabels.format[targetId] : format = function () {
    +			return "";
    +		}), format;
    +	}
    +});
    +
    +/***/ }),
    +/* 55 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	hasCaches: function hasCaches(key) {
    +		var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1];
    +
    +		if (isDataType) {
    +			for (var i = 0, len = key.length; i < len; i++) if (!(key[i] in this.cache)) return !1;
    +
    +			return !0;
    +		}
    +
    +		return key in this.cache;
    +	},
    +	addCache: function addCache(key, value) {
    +		var isDataType = !!(arguments.length > 2 && arguments[2] !== undefined) && arguments[2];
    +		this.cache[key] = isDataType ? this.cloneTarget(value) : value;
    +	},
    +	getCache: function getCache(key) {
    +		var isDataType = !!(arguments.length > 1 && arguments[1] !== undefined) && arguments[1];
    +
    +		if (isDataType) {
    +			var targets = [];
    +
    +			for (var id, i = 0; id = key[i]; i++) id in this.cache && targets.push(this.cloneTarget(this.cache[id]));
    +
    +			return targets;
    +		}
    +
    +		return this.cache[key] || null;
    +	},
    +
    +
    +	/**
    +  * reset cached data
    +  * @param {Boolean} all true: reset all data, false: reset only '$' prefixed key data
    +  * @private
    + 	 */
    +	resetCache: function resetCache(all) {
    +		var $$ = this;
    +
    +		for (var x in $$.cache) (all || /^\$/.test(x)) && ($$.cache[x] = null);
    +	}
    +});
    +
    +/***/ }),
    +/* 56 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	CLASS: _classes2.default,
    +
    +	generateClass: function generateClass(prefix, targetId) {
    +		return " " + prefix + " " + (prefix + this.getTargetSelectorSuffix(targetId));
    +	},
    +	classText: function classText(d) {
    +		return this.generateClass(_classes2.default.text, d.index);
    +	},
    +	classTexts: function classTexts(d) {
    +		return this.generateClass(_classes2.default.texts, d.id);
    +	},
    +	classShape: function classShape(d) {
    +		return this.generateClass(_classes2.default.shape, d.index);
    +	},
    +	classShapes: function classShapes(d) {
    +		return this.generateClass(_classes2.default.shapes, d.id);
    +	},
    +	generateExtraLineClass: function generateExtraLineClass() {
    +		var $$ = this,
    +		    classes = $$.config.line_classes || [],
    +		    ids = [];
    +
    +
    +		return function (d) {
    +			var id = d.id || d.data && d.data.id || d;
    +
    +			return ids.indexOf(id) < 0 && ids.push(id), classes[ids.indexOf(id) % classes.length];
    +		};
    +	},
    +	classLine: function classLine(d) {
    +		return this.classShape(d) + this.generateClass(_classes2.default.line, d.id);
    +	},
    +	classLines: function classLines(d) {
    +		return this.classShapes(d) + this.generateClass(_classes2.default.lines, d.id);
    +	},
    +	classCircle: function classCircle(d) {
    +		return this.classShape(d) + this.generateClass(_classes2.default.circle, d.index);
    +	},
    +	classCircles: function classCircles(d) {
    +		return this.classShapes(d) + this.generateClass(_classes2.default.circles, d.id);
    +	},
    +	classBar: function classBar(d) {
    +		return this.classShape(d) + this.generateClass(_classes2.default.bar, d.index);
    +	},
    +	classBars: function classBars(d) {
    +		return this.classShapes(d) + this.generateClass(_classes2.default.bars, d.id);
    +	},
    +	classArc: function classArc(d) {
    +		return this.classShape(d.data) + this.generateClass(_classes2.default.arc, d.data.id);
    +	},
    +	classArcs: function classArcs(d) {
    +		return this.classShapes(d.data) + this.generateClass(_classes2.default.arcs, d.data.id);
    +	},
    +	classArea: function classArea(d) {
    +		return this.classShape(d) + this.generateClass(_classes2.default.area, d.id);
    +	},
    +	classAreas: function classAreas(d) {
    +		return this.classShapes(d) + this.generateClass(_classes2.default.areas, d.id);
    +	},
    +	classRegion: function classRegion(d, i) {
    +		return this.generateClass(_classes2.default.region, i) + " " + ("class" in d ? d.class : "");
    +	},
    +	classEvent: function classEvent(d) {
    +		return this.generateClass(_classes2.default.eventRect, d.index);
    +	},
    +	classTarget: function classTarget(id) {
    +		var additionalClassSuffix = this.config.data_classes[id],
    +		    additionalClass = "";
    +
    +
    +		return additionalClassSuffix && (additionalClass = " " + _classes2.default.target + "-" + additionalClassSuffix), this.generateClass(_classes2.default.target, id) + additionalClass;
    +	},
    +	classFocus: function classFocus(d) {
    +		return this.classFocused(d) + this.classDefocused(d);
    +	},
    +	classFocused: function classFocused(d) {
    +		return " " + (this.focusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.focused : "");
    +	},
    +	classDefocused: function classDefocused(d) {
    +		return " " + (this.defocusedTargetIds.indexOf(d.id) >= 0 ? _classes2.default.defocused : "");
    +	},
    +	classChartText: function classChartText(d) {
    +		return _classes2.default.chartText + this.classTarget(d.id);
    +	},
    +	classChartLine: function classChartLine(d) {
    +		return _classes2.default.chartLine + this.classTarget(d.id);
    +	},
    +	classChartBar: function classChartBar(d) {
    +		return _classes2.default.chartBar + this.classTarget(d.id);
    +	},
    +	classChartArc: function classChartArc(d) {
    +		return _classes2.default.chartArc + this.classTarget(d.data.id);
    +	},
    +	classChartRadar: function classChartRadar(d) {
    +		return _classes2.default.chartRadar + this.classTarget(d.id);
    +	},
    +	getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) {
    +		return targetId || targetId === 0 ? ("-" + targetId).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-") : "";
    +	},
    +	selectorTarget: function selectorTarget(id, prefix) {
    +		return (prefix || "") + "." + (_classes2.default.target + this.getTargetSelectorSuffix(id));
    +	},
    +	selectorTargets: function selectorTargets(idsValue, prefix) {
    +		var $$ = this,
    +		    ids = idsValue || [];
    +
    +
    +		return ids.length ? ids.map(function (id) {
    +			return $$.selectorTarget(id, prefix);
    +		}) : null;
    +	},
    +	selectorLegend: function selectorLegend(id) {
    +		return "." + (_classes2.default.legendItem + this.getTargetSelectorSuffix(id));
    +	},
    +	selectorLegends: function selectorLegends(ids) {
    +		var $$ = this;
    +
    +		return ids && ids.length ? ids.map(function (id) {
    +			return $$.selectorLegend(id);
    +		}) : null;
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 57 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * This API highlights specified targets and fade out the others.<br><br>
    +  * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be highlighted.
    +  * @method focus
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} targetIdsValue Target ids to be highlighted.
    +  * @example
    +  *  // data1 will be highlighted and the others will be faded out
    +  *  chart.focus("data1");
    +  *
    +  * // data1 and data2 will be highlighted and the others will be faded out
    +  * chart.focus(["data1", "data2"]);
    +  *
    +  * // all targets will be highlighted
    +  * chart.focus();
    +  */
    +	focus: function focus(targetIdsValue) {
    +		var $$ = this.internal,
    +		    targetIds = $$.mapToTargetIds(targetIdsValue),
    +		    candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
    +		this.revert(), this.defocus(), candidates.classed(_classes2.default.focused, !0).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.expandArc(targetIds), $$.toggleFocusLegend(targetIds, !0), $$.focusedTargetIds = targetIds, $$.defocusedTargetIds = $$.defocusedTargetIds.filter(function (id) {
    +			return targetIds.indexOf(id) < 0;
    +		});
    +	},
    +
    +
    +	/**
    +  * This API fades out specified targets and reverts the others.<br><br>
    +  * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be faded out.
    +  * @method defocus
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} Target ids to be faded out.
    +  * @example
    +  * // data1 will be faded out and the others will be reverted.
    +  * chart.defocus("data1");
    +  *
    +  * // data1 and data2 will be faded out and the others will be reverted.
    +  * chart.defocus(["data1", "data2"]);
    +  *
    +  * // all targets will be faded out.
    +  * chart.defocus();
    +  */
    +	defocus: function defocus(targetIdsValue) {
    +		var $$ = this.internal,
    +		    targetIds = $$.mapToTargetIds(targetIdsValue),
    +		    candidates = $$.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
    +		candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !0), $$.hasArcType() && $$.unexpandArc(targetIds), $$.toggleFocusLegend(targetIds, !1), $$.focusedTargetIds = $$.focusedTargetIds.filter(function (id) {
    +			return targetIds.indexOf(id) < 0;
    +		}), $$.defocusedTargetIds = targetIds;
    +	},
    +
    +
    +	/**
    +  * This API reverts specified targets.<br><br>
    +  * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be reverted.
    +  * @method revert
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} Target ids to be reverted
    +  * @example
    +  * // data1 will be reverted.
    +  * chart.revert("data1");
    +  *
    +  * // data1 and data2 will be reverted.
    +  * chart.revert(["data1", "data2"]);
    +  *
    +  * // all targets will be reverted.
    +  * chart.revert();
    +  */
    +	revert: function revert(targetIdsValue) {
    +		var $$ = this.internal,
    +		    targetIds = $$.mapToTargetIds(targetIdsValue),
    +		    candidates = $$.svg.selectAll($$.selectorTargets(targetIds));
    +		// should be for all targets
    +
    +		candidates.classed(_classes2.default.focused, !1).classed(_classes2.default.defocused, !1), $$.hasArcType() && $$.unexpandArc(targetIds), $$.config.legend_show && ($$.showLegend(targetIds.filter($$.isLegendToShow.bind($$))), $$.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {
    +			return (0, _d3Selection.select)(this).classed(_classes2.default.legendItemFocused);
    +		}).classed(_classes2.default.legendItemFocused, !1)), $$.focusedTargetIds = [], $$.defocusedTargetIds = [];
    +	}
    +});
    +
    +/***/ }),
    +/* 58 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Show data series on chart
    +  * @method show
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} [targetIdsValue=all] The target id value.
    +  * @param {Object} [options] The object can consist with following members:<br>
    +  *
    +  *    | Key | Type | default | Description |
    +  *    | --- | --- | --- | --- |
    +  *    | withLegend | Boolean | false | whether or not display legend |
    +  *
    +  * @example
    +  * // show 'data1'
    +  * chart.show("data1");
    +  *
    +  * // show 'data1' and 'data3'
    +  * chart.show(["data1", "data3"]);
    +  */
    +	show: function show(targetIdsValue) {
    +		var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
    +		    $$ = this.internal,
    +		    targetIds = $$.mapToTargetIds(targetIdsValue);
    +		$$.removeHiddenTargetIds(targetIds);
    +
    +		var targets = $$.svg.selectAll($$.selectorTargets(targetIds));
    +
    +		targets.transition().style("opacity", "1", "important").call($$.endall, function () {
    +			targets.style("opacity", null).style("opacity", "1");
    +		}), options.withLegend && $$.showLegend(targetIds), $$.redraw({
    +			withUpdateOrgXDomain: !0,
    +			withUpdateXDomain: !0,
    +			withLegend: !0
    +		});
    +	},
    +
    +
    +	/**
    +  * Hide data series from chart
    +  * @method hide
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} [targetIdsValue=all] The target id value.
    +  * @param {Object} [options] The object can consist with following members:<br>
    +  *
    +  *    | Key | Type | default | Description |
    +  *    | --- | --- | --- | --- |
    +  *    | withLegend | Boolean | false | whether or not display legend |
    +  *
    +  * @example
    +  * // hide 'data1'
    +  * chart.hide("data1");
    +  *
    +  * // hide 'data1' and 'data3'
    +  * chart.hide(["data1", "data3"]);
    +  */
    +	hide: function hide(targetIdsValue) {
    +		var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
    +		    $$ = this.internal,
    +		    targetIds = $$.mapToTargetIds(targetIdsValue);
    +		$$.addHiddenTargetIds(targetIds);
    +
    +		var targets = $$.svg.selectAll($$.selectorTargets(targetIds));
    +
    +		targets.transition().style("opacity", "0", "important").call($$.endall, function () {
    +			targets.style("opacity", null).style("opacity", "0");
    +		}), options.withLegend && $$.hideLegend(targetIds), $$.redraw({
    +			withUpdateOrgXDomain: !0,
    +			withUpdateXDomain: !0,
    +			withLegend: !0
    +		});
    +	},
    +
    +
    +	/**
    +  * Toggle data series on chart. When target data is hidden, it will show. If is shown, it will hide in vice versa.
    +  * @method toggle
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} [targetIdsValue=all] The target id value.
    +  * @param {Object} [options] The object can consist with following members:<br>
    +  *
    +  *    | Key | Type | default | Description |
    +  *    | --- | --- | --- | --- |
    +  *    | withLegend | Boolean | false | whether or not display legend |
    +  *
    +  * @example
    +  * // toggle 'data1'
    +  * chart.toggle("data1");
    +  *
    +  * // toggle 'data1' and 'data3'
    +  * chart.toggle(["data1", "data3"]);
    +  */
    +	toggle: function toggle(targetIds) {
    +		var _this = this,
    +		    options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
    +		    $$ = this.internal,
    +		    targets = { show: [], hide: [] };
    +
    +		// sort show & hide target ids
    +		$$.mapToTargetIds(targetIds).forEach(function (id) {
    +			return targets[$$.isTargetToShow(id) ? "hide" : "show"].push(id);
    +		}), targets.show.length && this.show(targets.show, options), targets.hide.length && setTimeout(function () {
    +			return _this.hide(targets.hide, options);
    +		}, 0);
    +	}
    +});
    +
    +/***/ }),
    +/* 59 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Array = __webpack_require__(6),
    +    _d3Zoom = __webpack_require__(52),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Zoom by giving x domain.
    + * @method zoom
    + * @instance
    + * @memberOf Chart
    + * @param {Array} domainValue If domain is given, the chart will be zoomed to the given domain. If no argument is given, the current zoomed domain will be returned.
    + * @return {Array} domain value in array
    + * @example
    + *  // Zoom to specified domain
    + *  chart.zoom([10, 20]);
    + *
    + *  // Get the current zoomed domain
    + *  chart.zoom();
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var zoom = function (domainValue) {
    +	var $$ = this.internal,
    +	    domain = domainValue,
    +	    resultDomain = void 0;
    +
    +
    +	if ($$.config.zoom_enabled && domain) {
    +		var isTimeSeries = $$.isTimeSeries();
    +
    +		if (isTimeSeries && (domain = domain.map(function (x) {
    +			return $$.parseDate(x);
    +		})), $$.config.subchart_show) {
    +			var xScale = $$.zoomScale || $$.x;
    +
    +			$$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]), resultDomain = domain;
    +		} else {
    +			var orgDomain = $$.subX.domain(),
    +			    k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]),
    +			    gap = $$.isCategorized() ? $$.xAxis.tickOffset() : 0,
    +			    tx = isTimeSeries ? 0 - k * $$.x(domain[0].getTime()) : domain[0] - k * ($$.x(domain[0]) - gap);
    +			$$.zoom.updateTransformScale(_d3Zoom.zoomIdentity.translate(tx, 0).scale(k)), resultDomain = $$.zoomScale.domain();
    +		}
    +
    +		$$.redraw({
    +			withTransition: !0,
    +			withY: $$.config.zoom_rescale,
    +			withDimension: !1
    +		}), $$.setZoomResetButton(), (0, _util.callFn)($$.config.zoom_onzoom, this, $$.x.orgDomain());
    +	} else resultDomain = $$.zoomScale ? $$.zoomScale.domain() : $$.x.orgDomain();
    +
    +	return resultDomain;
    +};
    +
    +(0, _util.extend)(zoom, {
    +	/**
    +  * Enable and disable zooming.
    +  * @method zoom․enable
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Boolean} enabled Possible string values are "wheel" or "drag". If enabled is true, "wheel" will be used. If false is given, zooming will be disabled.<br>When set to false, the current zooming status will be reset.
    +  * @example
    +  *  // Enable zooming using the mouse wheel
    +  *  chart.zoom.enable(true);
    +  *  // Or
    +  *  chart.zoom.enable("wheel");
    +  *
    +  *  // Enable zooming by dragging
    +  *  chart.zoom.enable("drag");
    +  *
    +  *  // Disable zooming
    +  *  chart.zoom.enable(false);
    +  */
    +	enable: function enable() {
    +		var enabled = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "wheel",
    +		    $$ = this.internal,
    +		    config = $$.config,
    +		    enableType = enabled;
    +		enabled && (enableType = (0, _util.isString)(enabled) && /^(drag|wheel)$/.test(enabled) ? { type: enabled } : enabled), config.zoom_enabled = enableType, $$.zoom ? enabled === !1 && $$.bindZoomEvent(!1) : ($$.initZoom(), $$.initZoomBehaviour(), $$.bindZoomEvent()), $$.updateAndRedraw();
    +	},
    +
    +	/**
    +  * Set or get x Axis maximum zoom range value
    +  * @method zoom․max
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Number} [max] maximum value to set for zoom
    +  * @return {Number} zoom max value
    +  * @example
    +  *  // Set maximum range value
    +  *  chart.zoom.max(20);
    +  */
    +	max: function max(_max) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +
    +
    +		return (_max === 0 || _max) && (config.zoom_x_max = (0, _d3Array.max)([$$.orgXDomain[1], _max])), config.zoom_x_max;
    +	},
    +
    +	/**
    +  * Set or get x Axis minimum zoom range value
    +  * @method zoom․min
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Number} [min] minimum value tp set for zoom
    +  * @return {Number} zoom min value
    +  * @example
    +  *  // Set minimum range value
    +  *  chart.zoom.min(-1);
    +  */
    +	min: function min(_min) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +
    +
    +		return (_min === 0 || _min) && (config.zoom_x_min = (0, _d3Array.min)([$$.orgXDomain[0], _min])), config.zoom_x_min;
    +	},
    +
    +	/**
    +  * Set zoom range
    +  * @method zoom․range
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} [range]
    +  * @return {Object} zoom range value
    +  * {
    +  *   min: 0,
    +  *   max: 100
    +  * }
    +  * @example
    +  *  chart.zoom.range({
    +  *      min: 10,
    +  *      max: 100
    +  *  });
    +  */
    +	range: function range(_range) {
    +		var zoom = this.zoom;
    +
    +		return (0, _util.isObject)(_range) && ((0, _util.isDefined)(_range.min) && zoom.min(_range.min), (0, _util.isDefined)(_range.max) && zoom.max(_range.max)), {
    +			min: zoom.min(),
    +			max: zoom.max()
    +		};
    +	}
    +}), (0, _util.extend)(_Chart2.default.prototype, {
    +	zoom: zoom,
    +
    +	/**
    +  * Unzoom zoomed area
    +  * @method unzoom
    +  * @instance
    +  * @memberOf Chart
    +  * @example
    +  *  chart.unzoom();
    +  */
    +	unzoom: function unzoom() {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		$$.zoomScale && (config.subchart_show ? $$.brush.getSelection().call($$.brush.move, null) : $$.zoom.updateTransformScale(_d3Zoom.zoomIdentity), $$.updateZoom(), $$.zoom.resetBtn && $$.zoom.resetBtn.style("display", "none"), $$.redraw({
    +			withTransition: !0,
    +			withY: config.zoom_rescale
    +		}));
    +	}
    +});
    +
    +/***/ }),
    +/* 60 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Load data to the chart.<br><br>
    +  * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
    +  * - <b>Note:</b>
    +  * unload should be used if some data needs to be unloaded simultaneously. If you call unload API soon after/before load instead of unload param, chart will not be rendered properly because of cancel of animation.<br>
    +  * done will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering
    +  * @method load
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} args The object can consist with following members:<br>
    +  *
    +  *    | Key | Description |
    +  *    | --- | --- |
    +  *    | - url<br>- json<br>- rows<br>- columns | The data will be loaded. If data that has the same target id is given, the chart will be updated. Otherwise, new target will be added |
    +  *    | classes | The classes specified by data.classes will be updated. classes must be Object that has target id as keys. |
    +  *    | categories | The categories specified by axis.x.categories or data.x will be updated. categories must be Array. |
    +  *    | axes | The axes specified by data.axes will be updated. axes must be Object that has target id as keys. |
    +  *    | colors | The colors specified by data.colors will be updated. colors must be Object that has target id as keys. |
    +  *    | - type<br>- types | The type of targets will be updated. type must be String and types must be Object. |
    +  *    | unload | Specify the data will be unloaded before loading new data. If true given, all of data will be unloaded. If target ids given as String or Array, specified targets will be unloaded. If absent or false given, unload will not occur. |
    +  *    | done | The specified function will be called after data loaded.|
    +  *
    +  * @example
    +  *  // Load data1 and unload data2 and data3
    +  *  chart.load({
    +  *     columns: [
    +  *        ["data1", 100, 200, 150, ...],
    +  *        ...
    +  *    ],
    +  *    unload: ["data2", "data3"],
    +  *    url: "...",
    +  *    done: function() { ... }
    +  *  });
    +  */
    +	load: function load(args) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +
    +		// update xs if specified
    +
    +		// use cache if exists
    +		return args.xs && $$.addXs(args.xs), "names" in args && this.data.names(args.names), "classes" in args && Object.keys(args.classes).forEach(function (id) {
    +			config.data_classes[id] = args.classes[id];
    +		}), "categories" in args && $$.isCategorized() && (config.axis_x_categories = args.categories), "axes" in args && Object.keys(args.axes).forEach(function (id) {
    +			config.data_axes[id] = args.axes[id];
    +		}), "colors" in args && Object.keys(args.colors).forEach(function (id) {
    +			config.data_colors[id] = args.colors[id];
    +		}), "cacheIds" in args && $$.hasCaches(args.cacheIds, !0) ? void $$.load($$.getCache(args.cacheIds, !0), args.done) : void ("unload" in args && args.unload !== !1 ? $$.unload($$.mapToTargetIds(args.unload === !0 ? null : args.unload), function () {
    +			return $$.loadFromArgs(args);
    +		}) : $$.loadFromArgs(args));
    +
    +		// unload if needed
    +	},
    +
    +
    +	/**
    +  * Unload data to the chart.<br><br>
    +  * You can specify multiple targets by giving an array that includes id as String. If no argument is given, all of targets will be toggles.
    +  * - <b>Note:</b>
    +  * If you call load API soon after/before unload, unload param of load should be used. Otherwise chart will not be rendered properly because of cancel of animation.<br>
    +  * `done` will be called after data loaded, but it's not after rendering. It's because rendering will finish after some transition and there is some time lag between loading and rendering.
    +  * @method unload
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} args
    +  * - If ids given, the data that has specified target id will be unloaded. ids should be String or Array. If ids is not specified, all data will be unloaded.
    +  * - If done given, the specified function will be called after data loded.
    +  * @example
    +  *  // Unload data2 and data3
    +  *  chart.unload({
    +  *    ids: ["data2", "data3"]
    +  *  });
    +  */
    +	unload: function unload(argsValue) {
    +		var $$ = this.internal,
    +		    args = argsValue || {};
    +		(0, _util.isArray)(args) ? args = { ids: args } : (0, _util.isString)(args) && (args = { ids: [args] }), $$.unload($$.mapToTargetIds(args.ids), function () {
    +			$$.redraw({
    +				withUpdateOrgXDomain: !0,
    +				withUpdateXDomain: !0,
    +				withLegend: !0
    +			}), args.done && args.done();
    +		});
    +	}
    +});
    +
    +/***/ }),
    +/* 61 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _d3Ease = __webpack_require__(62),
    +    _d3Transition = __webpack_require__(7),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Flow data to the chart.<br><br>
    +  * By this API, you can append new data points to the chart.
    +  * @method flow
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} args The object can consist with following members:<br>
    +  *
    +  *    | Key | Type | Description |
    +  *    | --- | --- | --- |
    +  *    | json | Object | Data as JSON format (@see [data․json](Options.html#.data%25E2%2580%25A4json)) |
    +  *    | rows | Array | Data in array as row format (@see [data․rows](Options.html#.data%25E2%2580%25A4json)) |
    +  *    | columns | Array | Data in array as column format (@see [data․columns](Options.html#.data%25E2%2580%25A4columns)) |
    +  *    | to | String | The lower x edge will move to that point. If not given, the lower x edge will move by the number of given data points |
    +  *    | length | Number | The lower x edge will move by the number of this argument |
    +  *    | duration | Number | The duration of the transition will be specified value. If not given, transition.duration will be used as default |
    +  *    | done | Function | The specified function will be called when flow ends |
    +  *
    +  * - **NOTE:**
    +  *   If json, rows and columns given, the data will be loaded.<br>
    +  *   If data that has the same target id is given, the chart will be appended.<br>
    +  *   Otherwise, new target will be added. One of these is required when calling.<br>
    +  *   If json specified, keys is required as well as data.json.
    +  * @example
    +  * // 2 data points will be apprended to the tail and popped from the head.
    +  * // After that, 4 data points will be appended and no data points will be poppoed.
    +  * chart.flow({
    +  *  columns: [
    +  *    ["x", "2018-01-11", "2018-01-21"],
    +  *    ["data1", 500, 200],
    +  *    ["data2", 100, 300],
    +  *    ["data3", 200, 120]
    +  *  ],
    +  *  to: "2013-01-11",
    +  *  done: function () {
    +  *    chart.flow({
    +  *      columns: [
    +  *        ["x", "2018-02-11", "2018-02-12", "2018-02-13", "2018-02-14"],
    +  *        ["data1", 200, 300, 100, 250],
    +  *        ["data2", 100, 90, 40, 120],
    +  *        ["data3", 100, 100, 300, 500]
    +  *      ],
    +  *      length: 2,
    +     *      duration: 1500
    +  *    });
    +  *  }
    +  * });
    +  */
    +	flow: function flow(args) {
    +		var $$ = this.internal,
    +		    notfoundIds = [],
    +		    orgDataCount = $$.getMaxDataCount(),
    +		    data = void 0,
    +		    domain = void 0,
    +		    length = 0,
    +		    tail = 0,
    +		    diff = void 0,
    +		    to = void 0;
    +
    +
    +		if (args.json) data = $$.convertJsonToData(args.json, args.keys);else if (args.rows) data = $$.convertRowsToData(args.rows);else if (args.columns) data = $$.convertColumnsToData(args.columns);else return;
    +
    +		var targets = $$.convertDataToTargets(data, !0);
    +
    +		// Update/Add data
    +		$$.data.targets.forEach(function (t) {
    +			var found = !1;
    +
    +			for (var i = 0; i < targets.length; i++) if (t.id === targets[i].id) {
    +				found = !0, t.values[t.values.length - 1] && (tail = t.values[t.values.length - 1].index + 1), length = targets[i].values.length;
    +
    +
    +				for (var _j = 0; _j < length; _j++) targets[i].values[_j].index = tail + _j, $$.isTimeSeries() || (targets[i].values[_j].x = tail + _j);
    +
    +				t.values = t.values.concat(targets[i].values), targets.splice(i, 1);
    +
    +				break;
    +			}
    +
    +			found || notfoundIds.push(t.id);
    +		}), $$.data.targets.forEach(function (t) {
    +			for (var i = 0; i < notfoundIds.length; i++) if (t.id === notfoundIds[i]) {
    +				tail = t.values[t.values.length - 1].index + 1;
    +
    +
    +				for (var _j2 = 0; _j2 < length; _j2++) t.values.push({
    +					id: t.id,
    +					index: tail + _j2,
    +					x: $$.isTimeSeries() ? $$.getOtherTargetX(tail + _j2) : tail + _j2,
    +					value: null
    +				});
    +			}
    +		}), $$.data.targets.length && targets.forEach(function (t) {
    +			var missing = [];
    +
    +			for (var i = $$.data.targets[0].values[0].index; i < tail; i++) missing.push({
    +				id: t.id,
    +				index: i,
    +				x: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,
    +				value: null
    +			});
    +
    +			t.values.forEach(function (v) {
    +				v.index += tail, $$.isTimeSeries() || (v.x += tail);
    +			}), t.values = missing.concat(t.values);
    +		}), $$.data.targets = $$.data.targets.concat(targets);
    +		// add remained
    +
    +		// check data count because behavior needs to change when it"s only one
    +		// const dataCount = $$.getMaxDataCount();
    +		var baseTarget = $$.data.targets[0],
    +		    baseValue = baseTarget.values[0];
    +
    +
    +		// Update length to flow if needed
    +		(0, _util.isDefined)(args.to) ? (length = 0, to = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to, baseTarget.values.forEach(function (v) {
    +			v.x < to && length++;
    +		})) : (0, _util.isDefined)(args.length) && (length = args.length), orgDataCount ? orgDataCount === 1 && $$.isTimeSeries() && (diff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2, domain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)], $$.updateXDomain(null, !0, !0, !1, domain)) : (diff = $$.isTimeSeries() ? baseTarget.values.length > 1 ? baseTarget.values[baseTarget.values.length - 1].x - baseValue.x : baseValue.x - $$.getXDomain($$.data.targets)[0] : 1, domain = [baseValue.x - diff, baseValue.x], $$.updateXDomain(null, !0, !0, !1, domain)), $$.updateTargets($$.data.targets), $$.redraw({
    +			flow: {
    +				index: baseValue.index,
    +				length: length,
    +				duration: (0, _util.isValue)(args.duration) ? args.duration : $$.config.transition_duration,
    +				done: args.done,
    +				orgDataCount: orgDataCount
    +			},
    +			withLegend: !0,
    +			withTransition: orgDataCount > 1,
    +			withTrimXDomain: !1,
    +			withUpdateXAxis: !0
    +		});
    +	}
    +}), (0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Generate flow
    +  * @memberOf ChartInternal
    +  * @private
    +  * @param {Object} args
    +  * @return {Function}
    +  */
    +	generateFlow: function generateFlow(args) {
    +		var $$ = this,
    +		    config = $$.config;
    +
    +
    +		return function () {
    +			var targets = args.targets,
    +			    flow = args.flow,
    +			    drawBar = args.drawBar,
    +			    drawLine = args.drawLine,
    +			    drawArea = args.drawArea,
    +			    cx = args.cx,
    +			    cy = args.cy,
    +			    xv = args.xv,
    +			    xForText = args.xForText,
    +			    yForText = args.yForText,
    +			    duration = args.duration,
    +			    translateX = void 0,
    +			    scaleX = 1,
    +			    flowIndex = flow.index,
    +			    flowLength = flow.length,
    +			    flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex),
    +			    flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength),
    +			    orgDomain = $$.x.domain(),
    +			    durationForFlow = flow.duration || duration,
    +			    done = flow.done || function () {},
    +			    wait = $$.generateWait(),
    +			    xgrid = $$.xgrid || (0, _d3Selection.selectAll)([]),
    +			    xgridLines = $$.xgridLines || (0, _d3Selection.selectAll)([]),
    +			    mainRegion = $$.mainRegion || (0, _d3Selection.selectAll)([]),
    +			    mainText = $$.mainText || (0, _d3Selection.selectAll)([]),
    +			    mainBar = $$.mainBar || (0, _d3Selection.selectAll)([]),
    +			    mainLine = $$.mainLine || (0, _d3Selection.selectAll)([]),
    +			    mainArea = $$.mainArea || (0, _d3Selection.selectAll)([]),
    +			    mainCircle = $$.mainCircle || (0, _d3Selection.selectAll)([]);
    +
    +			// set flag
    +			$$.flowing = !0, $$.data.targets.forEach(function (d) {
    +				d.values.splice(0, flowLength);
    +			});
    +
    +
    +			// update x domain to generate axis elements for flow
    +			var domain = $$.updateXDomain(targets, !0, !0);
    +
    +			// update elements related to x scale
    +			$$.updateXGrid && $$.updateXGrid(!0), flow.orgDataCount ? flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x) ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : $$.isTimeSeries() ? translateX = $$.x(orgDomain[0]) - $$.x(domain[0]) : translateX = $$.x(flowStart.x) - $$.x(flowEnd.x) : $$.data.targets[0].values.length === 1 ? $$.isTimeSeries() ? (flowStart = $$.getValueOnIndex($$.data.targets[0].values, 0), flowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1), translateX = $$.x(flowStart.x) - $$.x(flowEnd.x)) : translateX = (0, _util.diffDomain)(domain) / 2 : translateX = $$.x(orgDomain[0]) - $$.x(domain[0]), scaleX = (0, _util.diffDomain)(orgDomain) / (0, _util.diffDomain)(domain);
    +
    +			var transform = "translate(" + translateX + ",0) scale(" + scaleX + ",1)";
    +
    +			$$.hideXGridFocus();
    +
    +
    +			var gt = (0, _d3Transition.transition)().ease(_d3Ease.easeLinear).duration(durationForFlow);
    +
    +			wait.add([$$.axes.x.transition(gt).call($$.xAxis.setTransition(gt)), mainBar.transition(gt).attr("transform", transform), mainLine.transition(gt).attr("transform", transform), mainArea.transition(gt).attr("transform", transform), mainCircle.transition(gt).attr("transform", transform), mainText.transition(gt).attr("transform", transform), mainRegion.filter($$.isRegionOnX).transition(gt).attr("transform", transform), xgrid.transition(gt).attr("transform", transform), xgridLines.transition(gt).attr("transform", transform)]), gt.call(wait, function () {
    +				var shapes = [],
    +				    texts = [],
    +				    eventRects = [];
    +
    +
    +				// remove flowed elements
    +				if (flowLength) {
    +					for (var index, i = 0; i < flowLength; i++) index = flowIndex + i, shapes.push("." + _classes2.default.shape + "-" + index), texts.push("." + _classes2.default.text + "-" + index), eventRects.push("." + _classes2.default.eventRect + "-" + index);
    +
    +					$$.svg.selectAll("." + _classes2.default.shapes).selectAll(shapes).remove(), $$.svg.selectAll("." + _classes2.default.texts).selectAll(texts).remove(), $$.svg.selectAll("." + _classes2.default.eventRects).selectAll(eventRects).remove(), $$.svg.select("." + _classes2.default.xgrid).remove();
    +				}
    +
    +				// draw again for removing flowed elements and reverting attr
    +
    +
    +				if (xgrid.size() && xgrid.attr("transform", null).attr($$.xgridAttr), xgridLines.attr("transform", null), xgridLines.select("line").attr("x1", config.axis_rotated ? 0 : xv).attr("x2", config.axis_rotated ? $$.width : xv), xgridLines.select("text").attr("x", config.axis_rotated ? $$.width : 0).attr("y", xv), mainBar.attr("transform", null).attr("d", drawBar), mainLine.attr("transform", null).attr("d", drawLine), mainArea.attr("transform", null).attr("d", drawArea), mainCircle.attr("transform", null), $$.isCirclePoint()) mainCircle.attr("cx", cx).attr("cy", cy);else {
    +					var xFunc = function (d) {
    +						return cx(d) - config.point_r;
    +					},
    +					    yFunc = function (d) {
    +						return cy(d) - config.point_r;
    +					};
    +
    +					mainCircle.attr("x", xFunc).attr("y", yFunc).attr("cx", cx) // when pattern is used, it possibly contain 'circle' also.
    +					.attr("cy", cy);
    +				}
    +
    +				mainText.attr("transform", null).attr("x", xForText).attr("y", yForText).style("fill-opacity", $$.opacityForText.bind($$)), mainRegion.attr("transform", null), mainRegion.select("rect").filter($$.isRegionOnX).attr("x", $$.regionX.bind($$)).attr("width", $$.regionWidth.bind($$)), config.interaction_enabled && $$.redrawEventRect(), done(), $$.flowing = !1;
    +			});
    +		};
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 62 */
    +/***/ (function(module, exports) {
    +
    +module.exports = __WEBPACK_EXTERNAL_MODULE__62__;
    +
    +/***/ }),
    +/* 63 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Get selected data points.<br><br>
    +  * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.
    +  * @method selected
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String} [targetId] You can filter the result by giving target id that you want to get. If not given, all of data points will be returned.
    +  * @return {Array} dataPoint Array of the data points.<br>ex.) `[{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ...]`
    +  * @example
    +  *  // all selected data points will be returned.
    +  *  chart.selected();
    +  *  // --> ex.) [{x: 1, value: 200, id: "data1", index: 1, name: "data1"}, ... ]
    +  *
    +  *  // all selected data points of data1 will be returned.
    +  *  chart.selected("data1");
    +  */
    +	selected: function selected(targetId) {
    +		var $$ = this.internal,
    +		    dataPoint = [];
    +
    +
    +		return $$.main.selectAll("." + (_classes2.default.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + _classes2.default.shape).filter(function () {
    +			return (0, _d3Selection.select)(this).classed(_classes2.default.SELECTED);
    +		}).each(function (d) {
    +			return dataPoint.push(d);
    +		}), dataPoint;
    +	},
    +
    +
    +	/**
    +  * Set data points to be selected. (`[data.selection.enabled](Options.html#.data%25E2%2580%25A4selection%25E2%2580%25A4enabled) option should be set true to use this method)`
    +  * @method select
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} [ids] id value to get selected.
    +  * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
    +  * @param {Boolean} [resetOther] Unselect already selected.
    +  * @example
    +  *  // select all data points
    +  *  chart.select();
    +  *
    +  *  // select all from 'data2'
    +  *  chart.select("data2");
    +  *
    +  *  // select all from 'data1' and 'data2'
    +  *  chart.select(["data1", "data2"]);
    +  *
    +  *  // select from 'data1', indices 2 and unselect others selected
    +  *  chart.select("data1", [2], true);
    +  *
    +  *  // select from 'data1', indices 0, 3 and 5
    +  *  chart.select("data1", [0, 3, 5]);
    +  */
    +	select: function select(ids, indices, resetOther) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) {
    +			var shape = (0, _d3Selection.select)(this),
    +			    id = d.data ? d.data.id : d.id,
    +			    toggle = $$.getToggle(this, d).bind($$),
    +			    isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
    +			    isTargetIndex = !indices || indices.indexOf(i) >= 0,
    +			    isSelected = shape.classed(_classes2.default.SELECTED);
    +
    +
    +			// line/area selection not supported yet
    +			shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || (isTargetId && isTargetIndex ? config.data_selection_isselectable(d) && !isSelected && toggle(!0, shape.classed(_classes2.default.SELECTED, !0), d, i) : (0, _util.isDefined)(resetOther) && resetOther && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i));
    +		});
    +	},
    +
    +
    +	/**
    +  * Set data points to be un-selected.
    +  * @method unselect
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} [ids] id value to be unselected.
    +  * @param {Array} [indices] The index array of data points. If falsy value given, will select all data points.
    +  * @example
    +  *  // unselect all data points
    +  *  chart.unselect();
    +  *
    +  *  // unselect all from 'data1'
    +  *  chart.unselect("data1");
    +  *
    +  *  // unselect from 'data1', indices 2
    +  *  chart.unselect("data1", [2]);
    +  */
    +	unselect: function unselect(ids, indices) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		config.data_selection_enabled && $$.main.selectAll("." + _classes2.default.shapes).selectAll("." + _classes2.default.shape).each(function (d, i) {
    +			var shape = (0, _d3Selection.select)(this),
    +			    id = d.data ? d.data.id : d.id,
    +			    toggle = $$.getToggle(this, d).bind($$),
    +			    isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
    +			    isTargetIndex = !indices || indices.indexOf(i) >= 0,
    +			    isSelected = shape.classed(_classes2.default.SELECTED);
    +
    +
    +			// line/area selection not supported yet
    +			shape.classed(_classes2.default.line) || shape.classed(_classes2.default.area) || isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected && toggle(!1, shape.classed(_classes2.default.SELECTED, !1), d, i);
    +		});
    +	}
    +});
    +
    +/***/ }),
    +/* 64 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Change the type of the chart.
    +  * @method transform
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String} type Specify the type to be transformed. The types listed in data.type can be used.
    +  * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate.
    +  * @example
    +  *  // all targets will be bar chart.
    +  *  chart.transform("bar");
    +  *
    +  *  // only data1 will be bar chart.
    +  *  chart.transform("bar", "data1");
    +  *
    +  *  // only data1 and data2 will be bar chart.
    +  *  chart.transform("bar", ["data1", "data2"]);
    +  */
    +	transform: function transform(type, targetIds) {
    +		var $$ = this.internal,
    +		    options = ["pie", "donut"].indexOf(type) >= 0 ? { withTransform: !0 } : null;
    +		$$.transformTo(targetIds, type, options);
    +	}
    +}), (0, _util.extend)(_ChartInternal2.default.prototype, {
    +	/**
    +  * Change the type of the chart.
    +  * @private
    +  * @param {String|Array} targetIds
    +  * @param {String} type
    +  * @param {Object} optionsForRedraw
    +  */
    +	transformTo: function transformTo(targetIds, type, optionsForRedraw) {
    +		var $$ = this,
    +		    withTransitionForAxis = !$$.hasArcType(),
    +		    options = optionsForRedraw || { withTransitionForAxis: withTransitionForAxis };
    +		options.withTransitionForTransform = !1, $$.transiting = !1, $$.setTargetType(targetIds, type), $$.updateTargets($$.data.targets), $$.updateAndRedraw(options);
    +	}
    +}); /**
    +     * Copyright (c) 2017 NAVER Corp.
    +     * billboard.js project is licensed under the MIT license
    +     */
    +
    +/***/ }),
    +/* 65 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Update groups for the targets.
    +  * @method groups
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array} groups This argument needs to be an Array that includes one or more Array that includes target ids to be grouped.
    +  * @example
    +  *  // data1 and data2 will be a new group.
    +  *  chart.groups([
    +  *     ["data1", "data2"]
    +  *  ]);
    +  */
    +	groups: function groups(_groups) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		return (0, _util.isUndefined)(_groups) ? config.data_groups : (config.data_groups = _groups, $$.redraw(), config.data_groups);
    +	}
    +});
    +
    +/***/ }),
    +/* 66 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Update x grid lines.
    + * @method xgrids
    + * @instance
    + * @memberOf Chart
    + * @param {Array} grids X grid lines will be replaced with this argument. The format of this argument is the same as grid.x.lines.
    + * @example
    + *  // Show 2 x grid lines
    + * chart.xgrids([
    + *    {value: 1, text: "Label 1"},
    + *    {value: 4, text: "Label 4"}
    + * ]);
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var xgrids = function (grids) {
    +	var $$ = this.internal,
    +	    config = $$.config;
    +	return grids ? (config.grid_x_lines = grids, $$.redrawWithoutRescale(), config.grid_x_lines) : config.grid_x_lines;
    +};
    +
    +(0, _util.extend)(xgrids, {
    +	/**
    +  * Add x grid lines.<br>
    +  * This API adds new x grid lines instead of replacing like xgrids.
    +  * @method xgrids․add
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array|Object} grids New x grid lines will be added. The format of this argument is the same as grid.x.lines and it's possible to give an Object if only one line will be added.
    +  * @example
    +  *  // Add a new x grid line
    +  * chart.xgrids.add(
    +  *   {value: 4, text: "Label 4"}
    +  * );
    +  *
    +  * // Add new x grid lines
    +  * chart.xgrids.add([
    +  *   {value: 2, text: "Label 2"},
    +  *   {value: 4, text: "Label 4"}
    +  * ]);
    +  */
    +	add: function add(grids) {
    +		return this.xgrids(this.internal.config.grid_x_lines.concat(grids || []));
    +	},
    +
    +	/**
    +  * Remove x grid lines.<br>
    +  * This API removes x grid lines.
    +  * @method xgrids․remove
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} params This argument should include value or class. If value is given, the x grid lines that have specified x value will be removed. If class is given, the x grid lines that have specified class will be removed. If args is not given, all of x grid lines will be removed.
    +  * @example
    +  * // x grid line on x = 2 will be removed
    +  * chart.xgrids.remove({value: 2});
    +  *
    +  * // x grid lines that have 'grid-A' will be removed
    +  * chart.xgrids.remove({
    +  *   class: "grid-A"
    +  * });
    +  *
    +  * // all of x grid lines will be removed
    +  * chart.xgrids.remove();
    +  */
    +	remove: function remove(params) {
    +		this.internal.removeGridLines(params, !0);
    +	}
    +});
    +
    +
    +/**
    + * Update y grid lines.
    + * @method ygrids
    + * @instance
    + * @memberOf Chart
    + * @param {Array} grids Y grid lines will be replaced with this argument. The format of this argument is the same as grid.y.lines.
    + * @example
    + *  // Show 2 y grid lines
    + * chart.ygrids([
    + *    {value: 100, text: "Label 1"},
    + *    {value: 400, text: "Label 4"}
    + * ]);
    + */
    +var ygrids = function (grids) {
    +	var $$ = this.internal,
    +	    config = $$.config;
    +	return grids ? (config.grid_y_lines = grids, $$.redrawWithoutRescale(), config.grid_y_lines) : config.grid_y_lines;
    +};
    +
    +(0, _util.extend)(ygrids, {
    +	/**
    +  * Add y grid lines.<br>
    +  * This API adds new y grid lines instead of replacing like ygrids.
    +  * @method ygrids․add
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array|Object} grids New y grid lines will be added. The format of this argument is the same as grid.y.lines and it's possible to give an Object if only one line will be added.
    +  * @example
    +  *  // Add a new x grid line
    +  * chart.ygrids.add(
    +  *   {value: 400, text: "Label 4"}
    +  * );
    +  *
    +  * // Add new x grid lines
    +  * chart.ygrids.add([
    +  *   {value: 200, text: "Label 2"},
    +  *   {value: 400, text: "Label 4"}
    +  * ]);
    +  */
    +	add: function add(grids) {
    +		return this.ygrids(this.internal.config.grid_y_lines.concat(grids || []));
    +	},
    +
    +	/**
    +  * Remove y grid lines.<br>
    +  * This API removes x grid lines.
    +  * @method ygrids․remove
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} params This argument should include value or class. If value is given, the y grid lines that have specified y value will be removed. If class is given, the y grid lines that have specified class will be removed. If args is not given, all of y grid lines will be removed.
    +  * @example
    +  * // y grid line on y = 200 will be removed
    +  * chart.ygrids.remove({value: 200});
    +  *
    +  * // y grid lines that have 'grid-A' will be removed
    +  * chart.ygrids.remove({
    +  *   class: "grid-A"
    +  * });
    +  *
    +  * // all of y grid lines will be removed
    +  * chart.ygrids.remove();
    +  */
    +	remove: function remove(params) {
    +		this.internal.removeGridLines(params, !1);
    +	}
    +}), (0, _util.extend)(_Chart2.default.prototype, {
    +	xgrids: xgrids,
    +	ygrids: ygrids
    +});
    +
    +/***/ }),
    +/* 67 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _classes = __webpack_require__(14),
    +    _classes2 = _interopRequireDefault(_classes),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Update regions.
    + * @method regions
    + * @instance
    + * @memberOf Chart
    + * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.
    + * @return {Array} regions
    + * @example
    + * // Show 2 regions
    + * chart.regions([
    + *    {axis: "x", start: 5, class: "regionX"},
    + *    {axis: "y", end: 50, class: "regionY"}
    + * ]);
    + */
    +var regions = function (_regions) {
    +	var $$ = this.internal,
    +	    config = $$.config;
    +	return _regions ? (config.regions = _regions, $$.redrawWithoutRescale(), config.regions) : config.regions;
    +}; /**
    +    * Copyright (c) 2017 NAVER Corp.
    +    * billboard.js project is licensed under the MIT license
    +    */
    +(0, _util.extend)(regions, {
    +	/**
    +  * Add new region.<br><br>
    +  * This API adds new region instead of replacing like regions.
    +  * @method regions․add
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array|Object} regions New region will be added. The format of this argument is the same as regions and it's possible to give an Object if only one region will be added.
    +  * @return {Array} regions
    +  * @example
    +  * // Add a new region
    +  * chart.regions.add(
    +  *    {axis: "x", start: 5, class: "regionX"}
    +  * );
    +  *
    +  * // Add new regions
    +  * chart.regions.add([
    +  *    {axis: "x", start: 5, class: "regionX"},
    +  *    {axis: "y", end: 50, class: "regionY"}
    +  *]);
    +  */
    +	add: function add(regions) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		return regions ? (config.regions = config.regions.concat(regions), $$.redrawWithoutRescale(), config.regions) : config.regions;
    +	},
    +
    +	/**
    +  * Remove regions.<br><br>
    +  * This API removes regions.
    +  * @method regions․remove
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} regions This argument should include classes. If classes is given, the regions that have one of the specified classes will be removed. If args is not given, all of regions will be removed.
    +  * @return {Array} regions
    +  * @example
    +  * // regions that have 'region-A' or 'region-B' will be removed.
    +  * chart.regions.remove({
    +  *   classes: [
    +  *     "region-A", "region-B"
    +  *   ]
    +  * });
    +  *
    +  * // all of regions will be removed.
    +  * chart.regions.remove();
    +  */
    +	remove: function remove(optionsValue) {
    +		var $$ = this.internal,
    +		    config = $$.config,
    +		    options = optionsValue || {},
    +		    duration = $$.getOption(options, "duration", config.transition_duration),
    +		    classes = $$.getOption(options, "classes", [_classes2.default.region]),
    +		    regions = $$.main.select("." + _classes2.default.regions).selectAll(classes.map(function (c) {
    +			return "." + c;
    +		}));
    +
    +
    +		return (duration ? regions.transition().duration(duration) : regions).style("opacity", "0").remove(), config.regions = config.regions.filter(function (region) {
    +			var found = !1;
    +
    +			return !region.class || (region.class.split(" ").forEach(function (c) {
    +				classes.indexOf(c) >= 0 && (found = !0);
    +			}), !found);
    +		}), config.regions;
    +	}
    +}), (0, _util.extend)(_Chart2.default.prototype, { regions: regions });
    +
    +/***/ }),
    +/* 68 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Get data loaded in the chart.
    + * @method data
    + * @instance
    + * @memberOf Chart
    + * @param {String|Array} targetIds If this argument is given, this API returns the specified target data. If this argument is not given, all of data will be returned.
    + * @example
    + * // Get only data1 data
    + * chart.data("data1");
    + *
    + * // Get data1 and data2 data
    + * chart.data(["data1", "data2"]);
    + *
    + * // Get all data
    + * chart.data();
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var data = function (targetIds) {
    +	var targets = this.internal.data.targets;
    +
    +	return (0, _util.isUndefined)(targetIds) ? targets : targets.filter(function (t) {
    +		return targetIds.indexOf(t.id) >= 0;
    +	});
    +};
    +
    +(0, _util.extend)(data, {
    +	/**
    +  * Get data shown in the chart.
    +  * @method data․shown
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} targetIds If this argument is given, this API filters the data with specified target ids. If this argument is not given, all shown data will be returned.
    +  * @example
    +  * // Get shown data by filtering to include only data1 data
    +  * chart.data.shown("data1");
    +  *
    +  * // Get shown data by filtering to include data1 and data2 data
    +  * chart.data.shown(["data1", "data2"]);
    +  *
    +  * // Get all shown data
    +  * chart.data.shown();
    +  */
    +	shown: function shown(targetIds) {
    +		return this.internal.filterTargetsToShow(this.data(targetIds));
    +	},
    +
    +	/**
    +  * Get values of the data loaded in the chart.
    +  * @method data․values
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned
    +  * @example
    +  * // Get data1 values
    +  * chart.data.values("data1");
    +  */
    +	values: function (targetId) {
    +		var values = null;
    +
    +		if (targetId) {
    +			var targets = this.data(targetId);
    +
    +			targets && (0, _util.isArray)(targets) && (values = [], targets.forEach(function (v) {
    +				values = values.concat(v.values.map(function (d) {
    +					return d.value;
    +				}));
    +			}));
    +		}
    +
    +		return values;
    +	},
    +
    +	/**
    +  * Get and set names of the data loaded in the chart.
    +  * @method data․names
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} names If this argument is given, the names of data will be updated. If not given, the current names will be returned. The format of this argument is the same as
    +  * @example
    +  * // Get current names
    +  * chart.data.names();
    +  *
    +  * // Update names
    +  * chart.data.names({
    +  *  data1: "New Name 1",
    +  *  data2: "New Name 2"
    +  *});
    +  */
    +	names: function names(_names) {
    +
    +		return this.internal.clearLegendItemTextBoxCache(), this.internal.updateDataAttributes("names", _names);
    +	},
    +
    +	/**
    +  * Get and set colors of the data loaded in the chart.
    +  * @method data․colors
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} colors If this argument is given, the colors of data will be updated. If not given, the current colors will be returned. The format of this argument is the same as
    +  * @example
    +  * // Get current colors
    +  * chart.data.colors();
    +  *
    +  * // Update colors
    +  * chart.data.colors({
    +  *  data1: "#FFFFFF",
    +  *  data2: "#000000"
    +  * });
    +  */
    +	colors: function colors(_colors) {
    +		return this.internal.updateDataAttributes("colors", _colors);
    +	},
    +
    +	/**
    +  * Get and set axes of the data loaded in the chart.
    +  * @method data․axes
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} axes If this argument is given, the axes of data will be updated. If not given, the current axes will be returned. The format of this argument is the same as
    +  * @example
    +  * // Get current axes
    +  * chart.data.axes();
    +  *
    +  * // Update axes
    +  * chart.data.axes({
    +  *  data1: "y",
    +  *  data2: "y2"
    +  * });
    +  */
    +	axes: function axes(_axes) {
    +		return this.internal.updateDataAttributes("axes", _axes);
    +	}
    +}), (0, _util.extend)(_Chart2.default.prototype, { data: data });
    +
    +/***/ }),
    +/* 69 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Set specified category name on category axis.
    +  * @method category
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Number} i index of category to be changed
    +  * @param {String} category category value to be changed
    +  * @example
    +  * chart.category(2, "Category 3");
    +  */
    +	category: function category(i, _category) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +
    +
    +		return arguments.length > 1 && (config.axis_x_categories[i] = _category, $$.redraw()), config.axis_x_categories[i];
    +	},
    +
    +
    +	/**
    +  * Set category names on category axis.
    +  * @method categories
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array} categories This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
    +  * @example
    +  * chart.categories([
    +  *      "Category 1", "Category 2", ...
    +  * ]);
    +  */
    +	categories: function categories(_categories) {
    +		var $$ = this.internal,
    +		    config = $$.config;
    +		return arguments.length ? (config.axis_x_categories = _categories, $$.redraw(), config.axis_x_categories) : config.axis_x_categories;
    +	}
    +});
    +
    +/***/ }),
    +/* 70 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Get the color
    +  * @method color
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String} id id to get the color
    +  * @example
    +  * chart.color("data1");
    +  */
    +	color: function color(id) {
    +		return this.internal.color(id); // more patterns
    +	}
    +});
    +
    +/***/ }),
    +/* 71 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Get and set x values for the chart.
    +  * @method x
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array} x If x is given, x values of every target will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
    +  * @return {Object} xs
    +  * @example
    +  *  // Get current x values
    +  *  chart.x();
    +  *
    +  *  // Update x values for all targets
    +  *  chart.x([100, 200, 300, 400, ...]);
    +  */
    +	x: function x(_x) {
    +		var $$ = this.internal;
    +
    +		return arguments.length && ($$.updateTargetX($$.data.targets, _x), $$.redraw({
    +			withUpdateOrgXDomain: !0,
    +			withUpdateXDomain: !0
    +		})), $$.data.xs;
    +	},
    +
    +
    +	/**
    +  * Get and set x values for the chart.
    +  * @method xs
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Array} xs If xs is given, specified target's x values will be updated. If no argument is given, current x values will be returned as an Object whose keys are the target ids.
    +  * @return {Object} xs
    +  * @example
    +  *  // Get current x values
    +  *  chart.xs();
    +  *
    +  *  // Update x values for all targets
    +  *  chart.xs({
    +  *    data1: [10, 20, 30, 40, ...],
    +  *    data2: [100, 200, 300, 400, ...]
    +  *  });
    +  */
    +	xs: function xs(_xs) {
    +		var $$ = this.internal;
    +
    +		return arguments.length && ($$.updateTargetXs($$.data.targets, _xs), $$.redraw({
    +			withUpdateOrgXDomain: !0,
    +			withUpdateXDomain: !0
    +		})), $$.data.xs;
    +	}
    +});
    +
    +/***/ }),
    +/* 72 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Set the min/max value
    + * @param {Chart} $$
    + * @param {String} type
    + * @param {Object} value
    + * @return {undefined}
    + * @private
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var setMinMax = function ($$, type, value) {
    +	var config = $$.config,
    +	    axisY = "axis_y_" + type,
    +	    axisY2 = "axis_y2_" + type;
    +
    +
    +	return (0, _util.isDefined)(value) && ((0, _util.isObjectType)(value) ? ((0, _util.isValue)(value.x) && (config["axis_x_" + type] = value.x), (0, _util.isValue)(value.y) && (config[axisY] = value.y), (0, _util.isValue)(value.y2) && (config[axisY2] = value.y2)) : (config[axisY] = value, config[axisY2] = value), $$.redraw({
    +		withUpdateOrgXDomain: !0,
    +		withUpdateXDomain: !0
    +	})), undefined;
    +},
    +    getMinMax = function ($$, type) {
    +	var config = $$.config;
    +
    +
    +	return {
    +		x: config["axis_x_" + type],
    +		y: config["axis_y_" + type],
    +		y2: config["axis_y2_" + type]
    +	};
    +},
    +    axis = (0, _util.extend)(function () {}, {
    +	/**
    +  * Get and set axis labels.
    +  * @method axis․labels
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} labels specified axis' label to be updated.
    +  * @example
    +  * // Update axis' label
    +  * chart.axis.labels({
    +  *   x: "New X Axis Label",
    +  *   y: "New Y Axis Label"
    +  * });
    +  */
    +	labels: function labels(_labels) {
    +		var $$ = this.internal;
    +
    +		arguments.length && (Object.keys(_labels).forEach(function (axisId) {
    +			$$.axis.setLabelText(axisId, _labels[axisId]);
    +		}), $$.axis.updateLabels());
    +	},
    +
    +	/**
    +  * Get and set axis min value.
    +  * @method axis․min
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} min If min is given, specified axis' min value will be updated.<br>
    +  *     If no argument is given, the min values set on generating option for each axis will be returned.
    +  *     If not set any min values on generation, it will return `undefined`.
    +  * @example
    +  * // Update axis' min
    +  * chart.axis.min({
    +  *   x: -10,
    +  *   y: 1000,
    +  *   y2: 100
    +  * });
    +  */
    +	min: function min(_min) {
    +		var $$ = this.internal;
    +
    +		return arguments.length ? setMinMax($$, "min", _min) : getMinMax($$, "min");
    +	},
    +
    +	/**
    +  * Get and set axis max value.
    +  * @method axis․max
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} max If max is given, specified axis' max value will be updated.<br>
    +  *     If no argument is given, the max values set on generating option for each axis will be returned.
    +  *     If not set any max values on generation, it will return `undefined`.
    +  * @example
    +  * // Update axis' label
    +  * chart.axis.max({
    +  *    x: 100,
    +  *    y: 1000,
    +  *    y2: 10000
    +  * });
    +  */
    +	max: function max(_max) {
    +		var $$ = this.internal;
    +
    +		return arguments.length ? setMinMax($$, "max", _max) : getMinMax($$, "max");
    +	},
    +
    +	/**
    +  * Get and set axis min and max value.
    +  * @method axis․range
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} range If range is given, specified axis' min and max value will be updated. If no argument is given, the current min and max values for each axis will be returned.
    +  * @example
    +  * // Update axis' label
    +  * chart.axis.range({
    +  *   min: {
    +  *     x: -10,
    +  *     y: -1000,
    +  *     y2: -10000
    +  *   },
    +  *   max: {
    +  *     x: 100,
    +  *     y: 1000,
    +  *     y2: 10000
    +  *   },
    +  * });
    +  */
    +	range: function range(_range) {
    +		var axis = this.axis;
    +
    +		if (arguments.length) (0, _util.isDefined)(_range.max) && axis.max(_range.max), (0, _util.isDefined)(_range.min) && axis.min(_range.min);else return {
    +				max: axis.max(),
    +				min: axis.min()
    +			};
    +
    +		return undefined;
    +	}
    +});
    +
    +/**
    + * Get the min/max value
    + * @param {Chart} $$
    + * @param {String} type
    + * @return {{x, y, y2}}
    + * @private
    + */
    +
    +
    +/**
    + * Define axis
    + * @ignore
    + */
    +
    +
    +(0, _util.extend)(_Chart2.default.prototype, { axis: axis });
    +
    +/***/ }),
    +/* 73 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Define legend
    + * @ignore
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var legend = (0, _util.extend)(function () {}, {
    +	/**
    +  * Show legend for each target.
    +  * @method legend․show
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} targetIds
    +  * - If targetIds is given, specified target's legend will be shown.
    +  * - If only one target is the candidate, String can be passed.
    +  * - If no argument is given, all of target's legend will be shown.
    +  * @example
    +  * // Show legend for data1.
    +  * chart.legend.show("data1");
    +  *
    +  * // Show legend for data1 and data2.
    +  * chart.legend.show(["data1", "data2"]);
    +  *
    +  * // Show all legend.
    +  * chart.legend.show();
    +  */
    +	show: function show(targetIds) {
    +		var $$ = this.internal;
    +
    +		$$.showLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 });
    +	},
    +
    +	/**
    +  * Hide legend for each target.
    +  * @method legend․hide
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String|Array} targetIds
    +  * - If targetIds is given, specified target's legend will be hidden.
    +  * - If only one target is the candidate, String can be passed.
    +  * - If no argument is given, all of target's legend will be hidden.
    +  * @example
    +  * // Hide legend for data1.
    +  * chart.legend.hide("data1");
    +  *
    +  * // Hide legend for data1 and data2.
    +  * chart.legend.hide(["data1", "data2"]);
    +  *
    +  * // Hide all legend.
    +  * chart.legend.hide();
    +  */
    +	hide: function hide(targetIds) {
    +		var $$ = this.internal;
    +
    +		$$.hideLegend($$.mapToTargetIds(targetIds)), $$.updateAndRedraw({ withLegend: !0 });
    +	}
    +});
    +
    +(0, _util.extend)(_Chart2.default.prototype, { legend: legend });
    +
    +/***/ }),
    +/* 74 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _browser = __webpack_require__(75),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Resize the chart.
    +  * @method resize
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} size This argument should include width and height in pixels.
    +  * @example
    +  * // Resize to 640x480
    +  * chart.resize({
    +  *    width: 640,
    +  *    height: 480
    +  * });
    +  */
    +	resize: function resize(size) {
    +		var config = this.internal.config;
    +
    +		config.size_width = size ? size.width : null, config.size_height = size ? size.height : null, this.flush();
    +	},
    +
    +
    +	/**
    +  * Force to redraw.
    +  * @method flush
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Boolean} [soft] For soft redraw.
    +  * @example
    +  * chart.flush();
    +  *
    +  * // for soft redraw
    +  * chart.flush(true);
    +  */
    +	flush: function flush(soft) {
    +		var $$ = this.internal;
    +
    +		// reset possible zoom scale
    +		$$.zoomScale = null, soft ? $$.redraw({
    +			withTransform: !0,
    +			withUpdateXDomain: !0,
    +			withUpdateOrgXDomain: !0,
    +			withLegend: !0
    +		}) : $$.updateAndRedraw({
    +			withLegend: !0,
    +			withTransition: !1,
    +			withTransitionForTransform: !1
    +		});
    +	},
    +
    +
    +	/**
    +  * Reset the chart object and remove element and events completely.
    +  * @method destroy
    +  * @instance
    +  * @memberOf Chart
    +  * @example
    +  * chart.destroy();
    +  */
    +	destroy: function destroy() {
    +		var _this = this,
    +		    $$ = this.internal;
    +
    +		return (0, _util.notEmpty)($$) && ($$.charts.splice($$.charts.indexOf(this), 1), (0, _util.isDefined)($$.resizeTimeout) && _browser.window.clearTimeout($$.resizeTimeout), (0, _d3Selection.select)(_browser.window).on("resize.bb", null), $$.selectChart.classed("bb", !1).html(""), Object.keys(this).forEach(function (key) {
    +			key === "internal" && Object.keys($$).forEach(function (k) {
    +				$$[k] = null;
    +			}), _this[key] = null, delete _this[key];
    +		})), null;
    +	},
    +
    +
    +	/**
    +  * Get or set single config option value.
    +  * @method config
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String} name The option key name.
    +  * @param {*} [value] The value accepted for indicated option.
    +  * @param {Boolean} [redraw] Set to redraw with the new option changes.
    +  * - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.
    +  * @example
    +  * // Getter
    +  * chart.config("gauge.max");
    +  *
    +  * // Setter
    +  * chart.config("gauge.max", 100);
    +  *
    +  * // Setter & redraw with the new option
    +  * chart.config("gauge.max", 100, true);
    +  */
    +	config: function config(name, value, redraw) {
    +		var $$ = this.internal,
    +		    key = name && name.replace(/\./g, "_"),
    +		    res = void 0;
    +
    +
    +		return key in $$.config && ((0, _util.isDefined)(value) ? ($$.config[key] = value, res = value, redraw && this.flush(!0)) : res = $$.config[key]), res;
    +	}
    +});
    +
    +/***/ }),
    +/* 75 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +exports.__esModule = !0;
    +exports.document = exports.window = undefined;
    +
    +var _util = __webpack_require__(11),
    +    win = (0, _util.isDefined)(window) && window.Math === Math ? window : (0, _util.isDefined)(self) && (self.Math === Math ? self : Function("return this")()),
    +    doc = win.document;
    +
    +/**
    + * Window object
    + * @module
    + * @ignore
    + */
    +/* eslint-disable no-new-func */
    +
    +
    +/* eslint-enable no-new-func */
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +exports.window = win;
    +exports.document = doc;
    +
    +/***/ }),
    +/* 76 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Define tooltip
    + * @ignore
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var tooltip = (0, _util.extend)(function () {}, {
    +	/**
    +  * Show tooltip
    +  * @method tooltip․show
    +  * @instance
    +  * @memberOf Chart
    +  * @param {Object} args The object can consist with following members:<br>
    +  *
    +  *    | Key | Type | Description |
    +  *    | --- | --- | --- |
    +  *    | index | Number | Determine focus by index |
    +  *    | x | Number &vert; Date | Determine focus by x Axis index |
    +  *    | data | Object | Determine focus data with following keys: `x` or `index`.<br>When [data.xs](Options.html#.data%25E2%2580%25A4xs) option is set, the target is determined by mouse position and needs specify `x`, `id` and `value`. |
    +  *    | mouse | Array | Determine x and y coordinate value relative the targeted x Axis element.<br>It should be used along with `data`, `index` or `x` value. The default value is set as `[0,0]` |
    +  *
    +  * @example
    +  *  // show the 2nd x Axis coordinate tooltip
    +  *  chart.tooltip.show({
    +  *    index: 1
    +  *  });
    +  *
    +  *  // show tooltip for the 3rd x Axis in x:50 and y:100 coordinate relative the x Axis element.
    +  *  chart.tooltip.show({
    +  *    data: {x: 2},
    +  *    mouse: [50, 100]
    +  *  });
    +  *
    +  *  // show tooltip for timeseries x axis
    +  *  chart.tooltip.show({
    +  *    x: new Date("2018-01-02 00:00")
    +  *  });
    +  */
    +	show: function show() {
    +		var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
    +		    $$ = this.internal,
    +		    index = void 0,
    +		    mouse = void 0;
    +
    +
    +		// determine mouse position on the chart
    +		args.mouse && (mouse = args.mouse), args.data ? $$.isMultipleX() ? (mouse = [$$.x(args.data.x), $$.getYScale(args.data.id)(args.data.value)], index = null) : index = (0, _util.isValue)(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x) : (0, _util.isDefined)(args.x) ? index = $$.getIndexByX(args.x) : (0, _util.isDefined)(args.index) && (index = args.index), ($$.inputType === "mouse" ? ["mouseover", "mousemove"] : ["touchstart"]).forEach(function (eventName) {
    +			$$.dispatchEvent(eventName, index, mouse);
    +		});
    +	},
    +
    +	/**
    +  * Hide tooltip
    +  * @method tooltip․hide
    +  * @instance
    +  * @memberOf Chart
    +  */
    +	hide: function hide() {
    +		var $$ = this.internal;
    +
    +		$$.hideTooltip(), $$.hideXGridFocus(), $$.unexpandCircles(), $$.unexpandBars();
    +	}
    +});
    +
    +(0, _util.extend)(_Chart2.default.prototype, { tooltip: tooltip });
    +
    +/***/ }),
    +/* 77 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _ChartInternal = __webpack_require__(3),
    +    _ChartInternal2 = _interopRequireDefault(_ChartInternal),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +var ua = window.navigator.userAgent;
    +
    +(0, _util.extend)(_ChartInternal2.default.prototype, {
    +	isSafari: function isSafari() {
    +		return ua.indexOf("Safari") > -1 && !this.isChrome();
    +	},
    +	isChrome: function isChrome() {
    +		return ua.indexOf("Chrome") > -1;
    +	},
    +	isMobile: function isMobile() {
    +		// https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent
    +		return ua.indexOf("Mobi") > -1;
    +	}
    +});
    +
    +/***/ }),
    +/* 78 */
    +/***/ (function(module, exports, __webpack_require__) {
    +
    +"use strict";
    +
    +
    +var _d3Selection = __webpack_require__(5),
    +    _Chart = __webpack_require__(1),
    +    _Chart2 = _interopRequireDefault(_Chart),
    +    _util = __webpack_require__(11);
    +
    +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
    +
    +/**
    + * Encode to base64
    + * @param {String} str
    + * @return {String}
    + * @private
    + * @see https://developer.mozilla.org/ko/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
    + */
    +var b64EncodeUnicode = function (str) {
    +	return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p) {
    +		return String.fromCharCode("0x" + p);
    +	}));
    +},
    +    nodeToSvgDataUrl = function (node) {
    +	var bounds = node.getBoundingClientRect(),
    +	    clone = node.cloneNode(!0),
    +	    styleSheets = (0, _util.toArray)(document.styleSheets),
    +	    cssRules = (0, _util.getCssRules)(styleSheets),
    +	    cssText = cssRules.filter(function (r) {
    +		return r.cssText;
    +	}).map(function (r) {
    +		return r.cssText;
    +	});
    +	clone.setAttribute("xmlns", _d3Selection.namespaces.xhtml);
    +	var nodeXml = new XMLSerializer().serializeToString(clone),
    +	    dataStr = ("<svg xmlns=\"" + _d3Selection.namespaces.svg + "\" width=\"" + bounds.width + "\" height=\"" + bounds.height + "\">\n\t\t\t<foreignObject width=\"100%\" height=\"100%\">\n\t\t\t\t<style>" + cssText.join("\n") + "</style>\n\t\t\t\t" + nodeXml + "\n\t\t\t</foreignObject></svg>").replace(/#/g, "%23").replace("/\n/g", "%0A");
    +
    +	// foreignObject not supported in IE11 and below
    +	// https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx
    +
    +	return "data:image/svg+xml;base64," + b64EncodeUnicode(dataStr);
    +};
    +
    +/**
    + * Convert svg node to data url
    + * @param {HTMLElement} node
    + * @return {String}
    + * @private
    + */
    +/**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +
    +
    +(0, _util.extend)(_Chart2.default.prototype, {
    +	/**
    +  * Export chart as an image.
    +  * - **NOTE:**
    +  *   - IE11 and below not work properly due to the lack of the feature(<a href="https://msdn.microsoft.com/en-us/library/hh834675(v=vs.85).aspx">foreignObject</a>) support
    +  *   - The basic CSS file(ex. billboard.css) should be at same domain as API call context to get correct styled export image.
    +  * @method export
    +  * @instance
    +  * @memberOf Chart
    +  * @param {String} [mimeType=image/png] The desired output image format. (ex. 'image/png' for png, 'image/jpeg' for jpeg format)
    +  * @param {Function} [callback] The callback to be invoked when export is ready.
    +  * @return {String} dataURI
    +  * @example
    +  *  chart.export();
    +  *  // --> "data:image/svg+xml;base64,PHN..."
    +  *
    +  *  // Initialize the download automatically
    +  *  chart.export("image/png", dataUrl => {
    +  *     const link = document.createElement("a");
    +  *
    +  *     link.download = `${Date.now()}.png`;
    +  *     link.href = dataUrl;
    +  *     link.innerHTML = "Download chart as image";
    +  *
    +  *     document.body.appendChild(link);
    +  *  });
    +  */
    +	export: function _export() {
    +		var mimeType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "image/png",
    +		    callback = arguments[1],
    +		    svgDataUrl = nodeToSvgDataUrl(this.element);
    +
    +
    +		if ((0, _util.isFunction)(callback)) {
    +			var img = new Image();
    +
    +			img.crosssOrigin = "Anonymous", img.onload = function () {
    +				var canvas = document.createElement("canvas"),
    +				    ctx = canvas.getContext("2d");
    +				canvas.width = img.width, canvas.height = img.height, ctx.drawImage(img, 0, 0), canvas.toBlob(function (blob) {
    +					callback(window.URL.createObjectURL(blob));
    +				}, mimeType);
    +			}, img.src = svgDataUrl;
    +		}
    +
    +		return svgDataUrl;
    +	}
    +});
    +
    +/***/ })
    +/******/ ]);
    +});
    +//# sourceMappingURL=billboard.js.map
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/config_Options.js.html b/doc/config_Options.js.html new file mode 100644 index 000000000..3ab5b52f4 --- /dev/null +++ b/doc/config_Options.js.html @@ -0,0 +1,2939 @@ + + + + + + config/Options.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    config/Options.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +/**
    + * Class to set options on generating chart.
    + * - It's instantiated internally, not exposed for public.
    + * @class Options
    + * @see {@link bb.generate} to use these options on generating the chart
    + */
    +export default class Options {
    +	constructor() {
    +		this.value = {
    +			/**
    +			 * Specify the CSS selector or the element which the chart will be set to. D3 selection object can be specified also.
    +			 * If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).<br><br>
    +			 * If this option is not specified, the chart will be generated but not be set. Instead, we can access the element by chart.element and set it by ourselves.<br>
    +			 * @name bindto
    +			 * @memberOf Options
    +			 * @property {String|HTMLElement|d3.selection} bindto=#chart Specify the element where chart will be drawn.
    +			 * @property {String|HTMLElement|d3.selection} bindto.element=#chart Specify the element where chart will be drawn.
    +			 * @property {String} [bindto.classname=bb] Specify the class name of bind element.<br>
    +			 *     **NOTE:** When class name isn't `bb`, then you also need to update the default CSS to be rendered correctly.
    +			 * @default #chart
    +			 * @example
    +			 * bindto: "#myContainer"
    +			 *
    +			 * // or HTMLElement
    +			 * bindto: document.getElementById("myContainer")
    +			 *
    +			 * // or D3 selection object
    +			 * bindto: d3.select("#myContainer")
    +			 *
    +			 * // or to change default classname
    +			 * bindto: {
    +			 *    element: "#chart",
    +			 *    classname: "bill-board"  // ex) <div id='chart' class='bill-board'>
    +			 * }
    +			 */
    +			bindto: "#chart",
    +
    +			/**
    +			 * Set 'clip-path' attribute for chart element
    +			 * - **NOTE:**
    +			 *  > When is false, chart node element is positioned after the axis node in DOM tree hierarchy.
    +			 *  > Is to make chart element positioned over axis element.
    +			 * @name clipPath
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * // don't set 'clip-path' attribute
    +			 * clipPath: false
    +			 */
    +			clipPath: true,
    +
    +			/**
    +			 * Set svg element's class name
    +			 * @name svg
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {String} [svg.classname] class name for svg element
    +			 * @example
    +			 * svg: {
    +             *   classname: "test_class"
    +			 * }
    +			 */
    +			svg_classname: undefined,
    +
    +			/**
    +			 * The desired size of the chart element.
    +			 * If value is not specified, the width of the chart will be calculated by the size of the parent element it's appended to.
    +			 * @name size
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Number} [size.width] width of the chart element
    +			 * @property {Number} [size.height] height of the chart element
    +			 * @example
    +			 * size: {
    +             *   width: 640,
    +             *   height: 480
    +			 * }
    +			 */
    +			size_width: undefined,
    +			size_height: undefined,
    +
    +			/**
    +			 * The padding of the chart element.
    +			 * @name padding
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Number} [padding.top] padding on the top of chart
    +			 * @property {Number} [padding.right] padding on the right of chart
    +			 * @property {Number} [padding.bottom] padding on the bottom of chart
    +			 * @property {Number} [padding.left] padding on the left of chart
    +			 * @example
    +			 * padding: {
    +             *   top: 20,
    +             *   right: 20,
    +             *   bottom: 20,
    +             *   left: 20
    +			 * }
    +			 */
    +			padding_left: undefined,
    +			padding_right: undefined,
    +			padding_top: undefined,
    +			padding_bottom: undefined,
    +
    +			/**
    +			 * Set chart resize options
    +			 * @name resize
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes.
    +			 * @example
    +			 *  resize: {
    +			 *      auto: false
    +			 *  }
    +			 */
    +			resize_auto: true,
    +
    +			/**
    +			 * Set zoom options
    +			 * @name zoom
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [zoom.enabled=false] Enable zooming.
    +			 * @property {String} [zoom.enabled.type='wheel'] Set zoom interaction type.
    +			 *  - **Available types:**
    +			 *    - wheel
    +			 *    - drag
    +			 * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.<br>
    +			 *  If true set, y domain will be updated according to the zoomed region.
    +			 * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.
    +			 * @property {Number} [zoom.x.min] Set x Axis minimum zoom range
    +			 * @property {Number} [zoom.x.max] Set x Axis maximum zoom range
    +			 * @property {Function} [zoom.onzoomstart=undefined] Set callback that is called when zooming starts.<br>
    +			 *  Specified function receives the zoom event.
    +			 * @property {Function} [zoom.onzoom=undefined] Set callback that is called when the chart is zooming.<br>
    +			 *  Specified function receives the zoomed domain.
    +			 * @property {Function} [zoom.onzoomend=undefined] Set callback that is called when zooming ends.<br>
    +			 *  Specified function receives the zoomed domain.
    +			 * @property {Boolean|Object} [zoom.resetButton=true] Set to display zoom reset button for 'drag' type zoom
    +			 * @property {String} [zoom.resetButton.text='Reset Zoom'] Text value for zoom reset button.
    +			 * @example
    +			 *  zoom: {
    +			 *      enabled: {
    +             *          type: "drag"
    +             *      },
    +			 *      rescale: true,
    +			 *      extent: [1, 100]  // enable more zooming
    +			 *      x: {
    +			 *          min: -1,  // set min range
    +			 *          max: 10  // set max range
    +			 *      },
    +			 *      onzoomstart: function(event) { ... },
    +			 *      onzoom: function(domain) { ... },
    +			 *      onzoomend: function(domain) { ... },
    +			 *
    +			 *      // show reset button when is zoomed-in
    +			 *      resetButton: true,
    +			 *
    +			 *      // customized text value for reset zoom button
    +			 *      resetButton: {
    +			 *          text: "Unzoom"
    +			 *      }
    +			 *  }
    +			 */
    +			zoom_enabled: undefined,
    +			zoom_extent: undefined,
    +			zoom_privileged: false,
    +			zoom_rescale: false,
    +			zoom_onzoom: undefined,
    +			zoom_onzoomstart: undefined,
    +			zoom_onzoomend: undefined,
    +			zoom_resetButton: true,
    +			zoom_x_min: undefined,
    +			zoom_x_max: undefined,
    +
    +			/**
    +			 * Interaction options
    +			 * @name interaction
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.<br>
    +			 *     If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.
    +			 * @property {Boolean} [interaction.brighten=true] Make brighter for the selected area (ex. 'pie' type data selected area)
    +			 * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction
    +			 * @property {Boolean} [interaction.inputType.touch=true] enable or disable  touch interaction
    +			 * @property {Boolean|Number} [interaction.inputType.touch.preventDefault=false] enable or disable to call event.preventDefault on touchstart & touchmove event. It's usually used to prevent document scrolling.
    +			 * @example
    +			 * interaction: {
    +             *    enabled: false,
    +             *    inputType: {
    +             *        mouse: true,
    +             *        touch: false
    +             *
    +             *        // or declare preventDefault explicitly.
    +             *        // In this case touch inputType is enabled by default
    +             *        touch: {
    +             *            preventDefault: true
    +             *
    +             *            // or threshold pixel value (pixel moved from touchstart to touchmove)
    +             *            preventDefault: 5
    +             *        }
    +             *    }
    +			 * }
    +			 */
    +			interaction_enabled: true,
    +			interaction_brighten: true,
    +			interaction_inputType_mouse: true,
    +			interaction_inputType_touch: {},
    +
    +			/**
    +			 * Set a callback to execute when mouse/touch enters the chart.
    +			 * @name onover
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onover: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onover: () => {},
    +
    +			/**
    +			 * Set a callback to execute when mouse/touch leaves the chart.
    +			 * @name onout
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onout: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onout: () => {},
    +
    +			/**
    +			 * Set a callback to execute when user resizes the screen.
    +			 * @name onresize
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onresize: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onresize: () => {},
    +
    +			/**
    +			 * SSet a callback to execute when screen resize finished.
    +			 * @name onresized
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onresized: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onresized: () => {},
    +
    +			/**
    +			 * Set a callback to execute before the chart is initialized
    +			 * @name onbeforeinit
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onbeforeinit: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onbeforeinit: undefined,
    +
    +			/**
    +			 * Set a callback to execute when the chart is initialized.
    +			 * @name oninit
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * oninit: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			oninit: () => {},
    +
    +			/**
    +			 * Set a callback to execute after the chart is initialized
    +			 * @name onafterinit
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function(){}
    +			 * @example
    +			 * onafterinit: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onafterinit: undefined,
    +
    +			/**
    +			 * Set a callback which is executed when the chart is rendered. Basically, this callback will be called in each time when the chart is redrawed.
    +			 * @name onrendered
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 * onrendered: function() {
    +			 *   ...
    +			 * }
    +			 */
    +			onrendered: undefined,
    +
    +			/**
    +			 * Set duration of transition (in milliseconds) for chart animation.<br><br>
    +			 * - **NOTE:** If `0 `or `null` set, transition will be skipped. So, this makes initial rendering faster especially in case you have a lot of data.
    +			 * @name transition
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Number} [transition.duration=350] duration in milliseconds
    +			 * @example
    +			 * transition: {
    +			 *    duration: 500
    +			 * }
    +			 */
    +			transition_duration: 350,
    +
    +			/**
    +			 * Specify the key of x values in the data.<br><br>
    +			 * We can show the data with non-index x values by this option. This option is required when the type of x axis is timeseries. If this option is set on category axis, the values of the data on the key will be used for category names.
    +			 * @name data․x
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +             *   x: "date"
    +			 * }
    +			 */
    +			data_x: undefined,
    +
    +			/**
    +			 * Specify the keys of the x values for each data.<br><br>
    +			 * This option can be used if we want to show the data that has different x values.
    +			 * @name data․xs
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +             *   xs: {
    +             *      data1: "x1",
    +             *      data2: "x2"
    +             *   }
    +			 * }
    +			 */
    +			data_xs: {},
    +
    +			/**
    +			 * Set a format to parse string specifed as x.
    +			 * @name data․xFormat
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default %Y-%m-%d
    +			 * @example
    +			 * data: {
    +             *   xFormat: "%Y-%m-%d %H:%M:%S"
    +			 * }
    +			 * @see [D3's time specifier](https://npm.runkit.com/d3-time-format)
    +			 */
    +			data_xFormat: "%Y-%m-%d",
    +
    +			/**
    +			 * Set localtime format to parse x axis.
    +			 * @name data․xLocaltime
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * data: {
    +             *   xLocaltime: false
    +			 * }
    +			 */
    +			data_xLocaltime: true,
    +
    +			/**
    +			 * Sort on x axis.
    +			 * @name data․xSort
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * data: {
    +             *   xSort: false
    +			 * }
    +			 */
    +			data_xSort: true,
    +			data_idConverter: id => id,
    +
    +			/**
    +			 * Set custom data name.
    +			 * @name data․names
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +             *   names: {
    +             *     data1: "Data Name 1",
    +             *     data2: "Data Name 2"
    +             *   }
    +			 * }
    +			 */
    +			data_names: {},
    +
    +			/**
    +			 * Set custom data class.<br><br>
    +			 * If this option is specified, the element g for the data has an additional class that has the prefix 'bb-target-' (eg. bb-target-additional-data1-class).
    +			 * @name data․classes
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +             *   classes: {
    +             *     data1: "additional-data1-class",
    +             *     data2: "additional-data2-class"
    +             *   }
    +			 * }
    +			 */
    +			data_classes: {},
    +
    +			/**
    +			 * Set groups for the data for stacking.
    +			 * @name data․groups
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default []
    +			 * @example
    +			 * data: {
    +             *   groups: [
    +             *     ["data1", "data2"],
    +             *     ["data3"]
    +             *   ]
    +			 * }
    +			 */
    +			data_groups: [],
    +
    +			/**
    +			 * Set y axis the data related to. y and y2 can be used.
    +			 * @name data․axes
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +			 *   axes: {
    +			 *     data1: "y",
    +			 *     data2: "y2"
    +			 *   }
    +			 * }
    +			 */
    +			data_axes: {},
    +
    +			/**
    +			 * Set chart type at once.<br><br>
    +			 * If this option is specified, the type will be applied to every data. This setting can be overwritten by data.types.<br><br>
    +			 * **Available Values:**
    +			 * - area
    +			 * - area-line-range
    +			 * - area-spline
    +			 * - area-spline-range
    +			 * - area-step
    +			 * - bar
    +			 * - bubble
    +			 * - donut
    +			 * - gauge
    +			 * - line
    +			 * - pie
    +			 * - radar
    +			 * - scatter
    +			 * - spline
    +			 * - step
    +			 * @name data․type
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default line
    +			 * @example
    +			 * data: {
    +			 *    type: "bar"
    +			 * }
    +			 */
    +			data_type: undefined,
    +
    +			/**
    +			 * Set chart type for each data.<br>
    +			 * This setting overwrites data.type setting.
    +			 * - **NOTE:** `radar` type can't be combined with other types.
    +			 * @name data․types
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +			 *   types: {
    +			 *     data1: "bar",
    +			 *     data2: "spline"
    +			 *   }
    +			 * }
    +			 */
    +			data_types: {},
    +
    +			/**
    +			 * Set labels options
    +			 * @name data․labels
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [data.labels=false] Show or hide labels on each data points
    +			 * @property {Function} [data.labels.format={}] Set formatter function for data labels.<br>
    +			 * The formatter function receives 4 arguments such as v, id, i, j and it must return a string that will be shown as the label. The arguments are:<br>
    +			 *  - `v` is the value of the data point where the label is shown.
    +			 *  - `id` is the id of the data where the label is shown.
    +			 *  - `i` is the index of the data point where the label is shown.
    +			 *  - `j` is the sub index of the data point where the label is shown.<br><br>
    +			 * Formatter function can be defined for each data by specifying as an object and D3 formatter function can be set (ex. d3.format('$'))
    +			 * @property {Number} [data.labels.position.x=0] x coordinate position, relative the original.
    +			 * @property {NUmber} [data.labels.position.y=0] y coordinate position, relative the original.
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +			 *   labels: true,
    +			 *
    +			 *   // or set specific options
    +			 *   labels: {
    +			 *     format: function(v, id, i, j) { ... },
    +			 *
    +			 *     // it's possible to set for each data
    +			 *     format: {
    +			 *         data1: function(v, id, i, j) { ... },
    +			 *         ...
    +			 *     },
    +			 *     position: {
    +			 *        x: -10,
    +			 *        y: 10
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			data_labels: {},
    +			data_labels_position: {},
    +
    +			/**
    +			 *  This option changes the order of stacking data and pieces of pie/donut.
    +			 *  - If `null` specified, it will be the order the data loaded.
    +			 *  - If function specified, it will be used as [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)<br><br>
    +			 *
    +			 *  **Available Values:**
    +			 *  - `desc`: In descending order
    +			 *  - `asc`: In ascending order
    +			 *  - `null`: It keeps the data load order
    +			 *  - `function(data1, data2) { ... }`: Array.sort compareFunction
    +			 * @name data․order
    +			 * @memberOf Options
    +			 * @type {String|Function|null}
    +			 * @default desc
    +			 * @example
    +			 * data: {
    +			 *   // in descending order (default)
    +			 *   order: "desc"
    +			 *
    +			 *   // in ascending order
    +			 *   order: "asc"
    +			 *
    +			 *   // keeps data input order
    +			 *   order: null
    +			 *
    +			 *   // specifying sort function
    +			 *   order: function(a, b) {
    +			 *       // param data passed format
    +			 *       {
    +			 *          id: "data1", id_org: "data1", values: [
    +			 *              {x: 5, value: 250, id: "data1", index: 5, name: "data1"},
    +			 *              ...
    +			 *          ]
    +			 *       }
    +			 *   }
    +			 * }
    +			 */
    +			data_order: "desc",
    +
    +			/**
    +			 * Define regions for each data.<br>
    +			 * The values must be an array for each data and it should include an object that has `start`, `end` and `style`.
    +			 * - The object type should be as:
    +			 *   - start {Number}: Start data point number. If not set, the start will be the first data point.
    +			 *   - [end] {Number}: End data point number. If not set, the end will be the last data point.
    +			 *   - [style.dasharray="2 2"] {Object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
    +			 * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
    +			 * @name data․regions
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +			 *   regions: {
    +			 *     data1: [{
    +			 *         start: 1,
    +			 *         end: 2,
    +			 *         style: {
    +			 *             dasharray: "5 2"
    +			 *         }
    +			 *     }, {
    +			 *         start: 3
    +			 *     }],
    +			 *     ...
    +			 *   }
    +			 * }
    +			 */
    +			data_regions: {},
    +
    +			/**
    +			 * Set color converter function.<br><br>
    +			 * This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
    +			 * @name data․color
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *   color: function(color, d) { ... }
    +			 * }
    +			 */
    +			data_color: undefined,
    +
    +			/**
    +			 * Set color for each data.
    +			 * @name data․colors
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * data: {
    +			 *   colors: {
    +			 *     data1: "#ff0000",
    +			 *     ...
    +			 *   }
    +			 * }
    +			 */
    +			data_colors: {},
    +
    +			/**
    +			 * Hide each data when the chart appears.<br><br>
    +			 * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.
    +			 * @name data․hide
    +			 * @memberOf Options
    +			 * @type {Boolean|Array}
    +			 * @default false
    +			 * @example
    +			 * data: {
    +			 *   // all of data will be hidden
    +			 *   hide: true
    +			 *
    +			 *   // specified data will be hidden
    +			 *   hide: ["data1", ...]
    +			 * }
    +			 */
    +			data_hide: false,
    +			data_filter: undefined,
    +
    +			/**
    +			 * Set data selection enabled.<br><br>
    +			 * If this option is set true, we can select the data points and get/set its state of selection by API (e.g. select, unselect, selected).
    +			 * @name data․selection․enabled
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * data: {
    +			 *    selection: {
    +			 *       enabled: true
    +			 *    }
    +			 * }
    +			 */
    +			data_selection_enabled: false,
    +
    +			/**
    +			 * Set grouped selection enabled.<br><br>
    +			 * If this option set true, multiple data points that have same x value will be selected by one selection.
    +			 * @name data․selection․grouped
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * data: {
    +			 *    selection: {
    +			 *       grouped: true
    +			 *    }
    +			 * }
    +			 */
    +			data_selection_grouped: false,
    +
    +			/**
    +			 * Set a callback for each data point to determine if it's selectable or not.<br><br>
    +			 * The callback will receive d as an argument and it has some parameters like id, value, index. This callback should return boolean.
    +			 * @name data․selection․isselectable
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() { return true; }
    +			 * @example
    +			 * data: {
    +			 *    selection: {
    +			 *       isselectable: function(d) { ... }
    +			 *    }
    +			 * }
    +			 */
    +			data_selection_isselectable: () => true,
    +
    +			/**
    +			 * Set multiple data points selection enabled.<br><br>
    +			 * If this option set true, multile data points can have the selected state at the same time. If false set, only one data point can have the selected state and the others will be unselected when the new data point is selected.
    +			 * @name data․selection․multiple
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * data: {
    +			 *    selection: {
    +			 *       multiple: false
    +			 *    }
    +			 * }
    +			 */
    +			data_selection_multiple: true,
    +
    +			/**
    +			 * Enable to select data points by dragging.
    +			 * If this option set true, data points can be selected by dragging.
    +			 * - **NOTE:** If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.
    +			 * @name data․selection․draggable
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * data: {
    +			 *    selection: {
    +			 *       draggable: true
    +			 *   }
    +			 * }
    +			 */
    +			data_selection_draggable: false,
    +
    +			/**
    +			 * Set a callback for click event on each data point.<br><br>
    +			 * This callback will be called when each data point clicked and will receive d and element as the arguments. d is the data clicked and element is the element clicked. In this callback, this will be the Chart object.
    +			 * @name data․onclick
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() {}
    +			 * @example
    +			 * data: {
    +			 *     onclick: function(d, element) { ... }
    +			 * }
    +			 */
    +			data_onclick: () => {},
    +
    +			/**
    +			 * Set a callback for mouse/touch over event on each data point.<br><br>
    +			 * This callback will be called when mouse cursor or via touch moves onto each data point and will receive d as the argument. d is the data where mouse cursor moves onto. In this callback, this will be the Chart object.
    +			 * @name data․onover
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() {}
    +			 * @example
    +			 * data: {
    +			 *     onover: function(d) { ... }
    +			 * }
    +			 */
    +			data_onover: () => {},
    +
    +			/**
    +			 * Set a callback for mouse/touch out event on each data point.<br><br>
    +			 * This callback will be called when mouse cursor or via touch moves out each data point and will receive d as the argument. d is the data where mouse cursor moves out. In this callback, this will be the Chart object.
    +			 * @name data․onout
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() {}
    +			 * @example
    +			 * data: {
    +			 *     onout: function(d) { ... }
    +			 * }
    +			 */
    +			data_onout: () => {},
    +
    +			/**
    +			 * Set a callback for on data selection.
    +			 * @name data․onselected
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() {}
    +			 * @example
    +			 * data: {
    +			 *     onselected: function(d, element) {
    +			 *        // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +			 *        // element - <circle>
    +			 *        ...
    +			 *    }
    +			 * }
    +			 */
    +			data_onselected: () => {},
    +
    +			/**
    +			 * Set a callback for on data un-selection.
    +			 * @name data․onunselected
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default function() {}
    +			 * @example
    +			 * data: {
    +			 *     onunselected: function(d, element) {
    +			 *        // d - ex) {x: 4, value: 150, id: "data1", index: 4, name: "data1"}
    +			 *        // element - <circle>
    +			 *        ...
    +			 *    }
    +			 * }
    +			 */
    +			data_onunselected: () => {},
    +
    +			/**
    +			 * Set a callback for minimum data
    +			 * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
    +			 * @name data․onmin
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 *  onmin: function(data) {
    +			 *    // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +		     *    ...
    +			 *  }
    +			 */
    +			data_onmin: undefined,
    +
    +			/**
    +			 * Set a callback for maximum data
    +			 * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
    +			 * @name data․onmax
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 *  onmax: function(data) {
    +			 *    // data - ex) [{x: 3, value: 400, id: "data1", index: 3}, ... ]
    +		     *    ...
    +			 *  }
    +			 */
    +			data_onmax: undefined,
    +
    +			/**
    +			 * Load a CSV or JSON file from a URL. NOTE that this will not work if loading via the "file://" protocol as the most browsers will block XMLHTTPRequests.
    +			 * @name data․url
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *     url: "/data/test.csv"
    +			 * }
    +			 */
    +			data_url: undefined,
    +			data_headers: undefined,
    +
    +			/**
    +			 * Parse a JSON object for data. See also data.keys.
    +			 * @name data․json
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default undefined
    +			 * @see data․keys
    +			 * @example
    +			 * data: {
    +			 *     json: [
    +			 *       {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +			 *       {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +			 *       {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +			 *       {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +			 *     ],
    +			 *     keys: {
    +			 *       // x: "name", // it's possible to specify 'x' when category axis
    +			 *       value: ["upload", "download"]
    +			 *     }
    +			 * }
    +			 */
    +			data_json: undefined,
    +
    +			/**
    +			 * Load data from a multidimensional array, with the first element containing the data names, the following containing related data in that order.
    +			 * @name data․rows
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *   rows: [
    +			 *     ["A", "B", "C"],
    +			 *     [90, 120, 300],
    +			 *     [40, 160, 240],
    +			 *     [50, 200, 290],
    +			 *     [120, 160, 230],
    +			 *     [80, 130, 300],
    +			 *     [90, 220, 320]
    +			 *   ]
    +			 * }
    +			 *
    +			 * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +			 * // - an array of [high, mid, low] data following the order
    +			 * // - or an object with 'high', 'mid' and 'low' key value
    +			 * data: {
    +			 *   rows: [
    +			 *      ["data1", "data2"],
    +			 *      [
    +			 *        // or {high:150, mid: 140, low: 110}, 120
    +			 *        [150, 140, 110], 120
    +			 *      ],
    +			 *      [[155, 130, 115], 55],
    +			 *      [[160, 135, 120], 60]
    +			 *   ],
    +			 *   types: {
    +			 *       data1: "area-line-range",
    +			 *       data2: "line"
    +			 *   }
    +			 * }
    +			 */
    +			data_rows: undefined,
    +
    +			/**
    +			 * Load data from a multidimensional array, with each element containing an array consisting of a datum name and associated data values.
    +			 * @name data․columns
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *   columns: [
    +			 *      ["data1", 30, 20, 50, 40, 60, 50],
    +			 *      ["data2", 200, 130, 90, 240, 130, 220],
    +			 *      ["data3", 300, 200, 160, 400, 250, 250]
    +			 *   ]
    +			 * }
    +			 *
    +			 * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
    +			 * // - an array of [high, mid, low] data following the order
    +			 * // - or an object with 'high', 'mid' and 'low' key value
    +			 * data: {
    +			 *   columns: [
    +			 *      ["data1",
    +			 *          [150, 140, 110],  // or {high:150, mid: 140, low: 110}
    +			 *          [150, 140, 110],
    +			 *          [150, 140, 110]
    +			 *      ]
    +			 *   ],
    +			 *   type: "area-line-range"
    +			 * }
    +			 */
    +			data_columns: undefined,
    +
    +			/**
    +			 * Used if loading JSON via data.url.
    +			 * @name data․mimeType
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *     mimeType: "json"
    +			 * }
    +			 */
    +			data_mimeType: undefined,
    +
    +			/**
    +			 * Choose which JSON object keys correspond to desired data.
    +			 * @name data․keys
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default undefined
    +			 * @example
    +			 * data: {
    +			 *     json: [
    +			 *       {name: "www.site1.com", upload: 200, download: 200, total: 400},
    +			 *       {name: "www.site2.com", upload: 100, download: 300, total: 400},
    +			 *       {name: "www.site3.com", upload: 300, download: 200, total: 500},
    +			 *       {name: "www.site4.com", upload: 400, download: 100, total: 500}
    +			 *     ],
    +			 *     keys: {
    +			 *       // x: "name", // it's possible to specify 'x' when category axis
    +			 *       value: ["upload", "download"]
    +			 *     }
    +			 * }
    +			 */
    +			data_keys: undefined,
    +
    +			/**
    +			 * Set text displayed when empty data.
    +			 * @name data․empty․label․text
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default ""
    +			 * @example
    +			 * data: {
    +			 *   empty: {
    +			 *     label: {
    +			 *       text: "No Data"
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			data_empty_label_text: "",
    +
    +			/**
    +			 * Set subchart options
    +			 * @name subchart
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart.
    +			 * @property {Boolean} [subchart.size.height] Change the height of the subchart.
    +			 * @property {Boolean} [subchart.onbrush] Set callback for brush event.<br>
    +			 *  Specified function receives the current zoomed x domain.
    +			 * @example
    +			 *  subchart: {
    +			 *      show: true,
    +			 *      size: {
    +			 *          height: 20
    +			 *      },
    +			 *      onbrush: function(domain) { ... }
    +			 *  }
    +			 */
    +			subchart_show: false,
    +			subchart_size_height: 60,
    +			subchart_axis_x_show: true,
    +			subchart_onbrush: () => {},
    +
    +			/**
    +			 * Set color of the data values
    +			 * @name color
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Array} [color.pattern] custom color pattern
    +			 * @property {Function} [color.tiles] if defined, allows use svg's patterns to fill data area. It should return an array of [SVGPatternElement](https://developer.mozilla.org/en-US/docs/Web/API/SVGPatternElement).
    +			 *  - **NOTE:** The pattern element's id will be defined as `bb-colorize-pattern-$COLOR-VALUE`.<br>
    +			 *    ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are:<br>
    +			 *    - `bb-colorize-pattern-red`
    +			 *    - `bb-colorize-pattern-fff`
    +			 * @property {Object} [color.threshold] color threshold
    +			 * @property {String} [color.threshold.unit] unit
    +			 * @property {Array} [color.threshold.value] value
    +			 * @property {Array} [color.threshold.max=100] max value
    +			 * @example
    +			 *  color: {
    +			 *      pattern: ["#1f77b4", "#aec7e8", ...],
    +			 *
    +			 *      // Set colors' patterns
    +			 *      // it should return an array of SVGPatternElement
    +			 *      tiles: function() {
    +			 *         var pattern = document.createElementNS("http://www.w3.org/2000/svg", "pattern");
    +			 *         var g = document.createElementNS("http://www.w3.org/2000/svg", "g");
    +			 *         var circle1 = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    +			 *
    +			 *         pattern.setAttribute("patternUnits", "userSpaceOnUse");
    +			 *         pattern.setAttribute("width", "32");
    +			 *         pattern.setAttribute("height", "32");
    +			 *
    +			 *         g.style.fill = "#000";
    +			 *         g.style.opacity = "0.2";
    +             *
    +			 *         circle1.setAttribute("cx", "3");
    +			 *         circle1.setAttribute("cy", "3");
    +			 *         circle1.setAttribute("r", "3");
    +             *
    +			 *         g.appendChild(circle1);
    +			 *         pattern.appendChild(g);
    +			 *
    +			 *         return [pattern];
    +			 *      }
    +			 *  }
    +			 */
    +			color_pattern: [],
    +			color_tiles: undefined,
    +			color_threshold: {},
    +
    +			/**
    +			 * Legend options
    +			 * @name legend
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [legend.show=true] Show or hide legend.
    +			 * @property {Boolean} [legend.hide=false] Hide legend
    +			 *  If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.
    +			 * @property {String|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.
    +			 * @property {String|Function} [legend.contents.template=undefined] Set item's template.<br>
    +			 *  - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:
    +			 *    - {=COLOR}: data color value
    +			 *    - {=TITLE}: data title value
    +			 *  - If set `function` value, will pass following arguments to the given function:
    +			 *   - title {String}: data's id value
    +			 *   - color {String}: color string
    +			 *   - data {Array}: data array
    +			 * @property {String} [legend.position=bottom] Change the position of legend.<br>
    +			 *  Available values are: `bottom`, `right` and `inset` are supported.
    +			 * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.<br>
    +			 *  This option accepts object that has the keys `anchor`, `x`, `y` and `step`.
    +			 *  - **anchor** decides the position of the legend:
    +			 *   - top-left
    +			 *   - top-right
    +			 *   - bottom-left
    +			 *   - bottom-right
    +			 *  - **x** and **y**:
    +			 *   - set the position of the legend based on the anchor.
    +			 *  - **step**:
    +			 *   - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
    +			 * @property {Boolean} [legend.equally=false] Set to all items have same width size.
    +			 * @property {Boolean} [legend.padding=0] Set padding value
    +			 * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
    +			 * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
    +			 * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
    +			 * @property {Number} [legend.item.tile.width=10] Set width of item tile element
    +			 * @property {Number} [legend.item.tile.height=10] Set height of item tile element
    +			 * @property {Boolean} [legend.usePoint=false] Whether to use custom points in legend.
    +			 * @example
    +			 *  legend: {
    +			 *      show: true,
    +			 *      hide: true,
    +			 *      //or hide: "data1"
    +             *      //or hide: ["data1", "data2"]
    +			 *      contents: {
    +			 *          bindto: "#legend",   // <ul id='legend'></ul>
    +			 *
    +			 *          // will be as: <li style='background-color:#1f77b4'>data1</li>
    +			 *          template: "<li style='background-color:{=COLOR}'>{=TITLE}</li>"
    +			 *
    +			 *          // or using function
    +			 *          template: function(id, color, data) {
    +			 *               // if you want omit some legend, return falsy value
    +			 *               if (title !== "data1") {
    +			 *                    return "<li style='background-color:"+ color +">"+ title +"</li>";
    +			 *               }
    +			 *          }
    +			 *      },
    +             *      position: "bottom",  // bottom, right, inset
    +			 *      inset: {
    +			 *          anchor: "top-right"  // top-left, top-right, bottom-left, bottom-right
    +			 *          x: 20,
    +			 *          y: 10,
    +			 *          step: 2
    +			 *      },
    +             *      equally: false,
    +             *      padding: 10,
    +             *      item: {
    +			 *          onclick: function(id) { ... },
    +			 *          onover: function(id) { ... },
    +			 *          onout: function(id) { ... },
    +			 *
    +			 *          // set tile's size
    +			 *          tile: {
    +			 *              width: 20,
    +			 *              height: 15
    +			 *          }
    +			 *      },
    +			 *      usePoint: true
    +			 *  }
    +			 */
    +			legend_show: true,
    +			legend_hide: false,
    +			legend_contents_bindto: undefined,
    +			legend_contents_template: undefined,
    +			legend_position: "bottom",
    +			legend_inset_anchor: "top-left",
    +			legend_inset_x: 10,
    +			legend_inset_y: 0,
    +			legend_inset_step: undefined,
    +			legend_item_onclick: undefined,
    +			legend_item_onover: undefined,
    +			legend_item_onout: undefined,
    +			legend_equally: false,
    +			legend_padding: 0,
    +			legend_item_tile_width: 10,
    +			legend_item_tile_height: 10,
    +			legend_usePoint: false,
    +
    +			/**
    +			 * Switch x and y axis position.
    +			 * @name axis․rotated
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   rotated: true
    +			 * }
    +			 */
    +			axis_rotated: false,
    +
    +			/**
    +			 * Set clip-path attribute for x axis element
    +			 * @name axis․x․clipPath
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * // don't set 'clip-path' attribute
    +			 * clipPath: false
    +			 */
    +			axis_x_clipPath: true,
    +
    +			/**
    +			 * Show or hide x axis.
    +			 * @name axis․x․show
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     show: false
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_show: true,
    +
    +			/**
    +			 * Set type of x axis.<br><br>
    +			 * **Available Values:**
    +			 * - timeseries
    +			 * - category
    +			 * - indexed
    +			 * @name axis․x․type
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default indexed
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     type: "timeseries"
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_type: "indexed",
    +
    +			/**
    +			 * Set how to treat the timezone of x values.<br>
    +			 * If true, treat x value as localtime. If false, convert to UTC internally.
    +			 * @name axis․x․localtime
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     localtime: false
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_localtime: true,
    +
    +			/**
    +			 * Set category names on category axis.
    +			 * This must be an array that includes category names in string. If category names are included in the date by data.x option, this is not required.
    +			 * @name axis․x․categories
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default []
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     categories: ["Category 1", "Category 2", ...]
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_categories: [],
    +
    +			/**
    +			 * Centerise ticks on category axis.
    +			 * @name axis․x․tick․centered
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       centered: true
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_centered: false,
    +
    +			/**
    +			 * A function to format tick value. Format string is also available for timeseries data.
    +			 * @name axis․x․tick․format
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *        // for timeseries, a 'datetime' object is given as parameter
    +			 *       format: function(x) {
    +			 *           return x.getFullYear();
    +			 *       }
    +			 *
    +			 *       // for category, index(Number) and categoryName(String) are given as parameter
    +			 *       format: function(index, categoryName) {
    +			 *           return categoryName.substr(0, 10);
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_format: undefined,
    +
    +			/**
    +			 * Setting for culling ticks.<br><br>
    +			 * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
    +			 * We can change the number of ticks to be shown by axis.x.tick.culling.max.
    +			 * @name axis․x․tick․culling
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default
    +			 * - true for indexed axis and timeseries axis
    +			 * - false for category axis
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       culling: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_culling: {},
    +
    +			/**
    +			 * The number of tick texts will be adjusted to less than this value.
    +			 * @name axis․x․tick․culling․max
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default 10
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       culling: {
    +			 *           max: 5
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_culling_max: 10,
    +
    +			/**
    +			 * The number of x axis ticks to show.<br><br>
    +			 * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
    +			 * @name axis․x․tick․count
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       count: 5
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_count: undefined,
    +
    +			/**
    +			 * Set the x Axis tick text's position relatively its original position
    +			 * @name axis․x․tick․text․position
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {x: 0, y:0}
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       text: {
    +			 *         position: {
    +			 *           x: 10,
    +			 *           y: 10
    +			 *         }
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_text_position: {x: 0, y: 0},
    +
    +			/**
    +			 * Fit x axis ticks.<br><br>
    +			 * If true set, the ticks will be positioned nicely. If false set, the ticks will be positioned according to x value of the data points.
    +			 * @name axis․x․tick․fit
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       fit: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_fit: true,
    +
    +			/**
    +			 * Set the x values of ticks manually.<br><br>
    +			 * If this option is provided, the position of the ticks will be determined based on those values. This option works with timeseries data and the x values will be parsed accoding to the type of the value and data.xFormat option.
    +			 * @name axis․x․tick․values
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default null
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       values: [1, 2, 4, 8, 16, 32, ...]
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_values: null,
    +
    +			/**
    +			 * Rotate x axis tick text.<br>
    +			 * If you set negative value, it will rotate to opposite direction.
    +			 * @name axis․x․tick․rotate
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default 0
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       rotate: 60
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_rotate: 0,
    +
    +			/**
    +			 * Show x axis outer tick.
    +			 * @name axis․x․tick․outer
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       outer: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_outer: true,
    +
    +			/**
    +			 * Set tick text to be multiline
    +			 * - **NOTE:**
    +			 *  > When x tick text contains `\n`, it's used as line break and 'axis.x.tick.width' option is ignored.
    +			 * @name axis․x․tick․multiline
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       multiline: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 * @example
    +			 * // example of line break with '\n'
    +			 * // In this case, 'axis.x.tick.width' is ignored
    +			 * data: {
    +			 *    x: "x",
    +			 *    columns: [
    +			 *        ["x", "long\ntext", "Another\nLong\nText"],
    +			 *        ...
    +			 *    ],
    +			 * }
    +			 */
    +			axis_x_tick_multiline: true,
    +
    +
    +			/**
    +			 * Set tick width
    +			 * - **NOTE:**
    +			 *  > When x tick text contains `\n`, this option is ignored.
    +			 * @name axis․x․tick․width
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default null
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       width: 50
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_width: null,
    +
    +			/**
    +			 * Set to display system tooltip for tick text
    +			 * - **NOTE:** Only available for category axis type (`axis.x.type='category'`)
    +			 * @name axis․x․tick․tooltip
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     tick: {
    +			 *       tooltip: true
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_tick_tooltip: false,
    +
    +			/**
    +			 * Set max value of x axis range.
    +			 * @name axis․x․max
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     max: 100
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_max: undefined,
    +
    +			/**
    +			 * Set min value of x axis range.
    +			 * @name axis․x․min
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     min: -100
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_min: undefined,
    +
    +			/**
    +			 * Set padding for x axis.<br><br>
    +			 * If this option is set, the range of x axis will increase/decrease according to the values.
    +			 * If no padding is needed in the rage of x axis, 0 should be set.
    +			 * - **NOTE:**
    +			 *   The padding values aren't based on pixels. It differs according axis types<br>
    +			 *   - **category:** The unit of tick value
    +			 *     ex. the given value `1`, is same as the width of 1 tick width
    +			 *   - **timeseries:** Numeric time value
    +			 *     ex. the given value `1000*60*60*24`, which is numeric time equivalent of a day, is same as the width of 1 tick width
    +			 * @name axis․x․padding
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     padding: {
    +			 *       // when axis type is 'category'
    +			 *       left: 1,  // set left padding width of equivalent value of a tick's width
    +			 *       right: 0.5  // set right padding width as half of equivalent value of tick's width
    +			 *
    +			 *       // when axis type is 'timeseries'
    +			 *       left: 1000*60*60*24,  // set left padding width of equivalent value of a day tick's width
    +			 *       right: 1000*60*60*12   // set right padding width as half of equivalent value of a day tick's width
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_padding: {},
    +
    +			/**
    +			 * Set height of x axis.<br><br>
    +			 * The height of x axis can be set manually by this option. If you need more space for x axis, please use this option for that. The unit is pixel.
    +			 * @name axis․x․height
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     height: 20
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_height: undefined,
    +
    +			/**
    +			 * Set default extent for subchart and zoom. This can be an array or function that returns an array.
    +			 * @name axis․x․extent
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner
    +			 *     // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521
    +			 *     extent: [
    +			 *         [0, 0], [200, 60]
    +			 *     ]
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_extent: undefined,
    +
    +			/**
    +			 * Set label on x axis.<br><br>
    +			 *  You can set x axis label and change its position by this option. string and object can be passed and we can change the poisiton by passing object that has position key. Available position differs according to the axis direction (vertical or horizontal). If string set, the position will be the default.
    +			 *  - **If it's horizontal axis:**
    +			 *    - inner-right [default]
    +			 *    - inner-center
    +			 *    - inner-left
    +			 *    - outer-right
    +			 *    - outer-center
    +			 *    - outer-left
    +			 *  - **If it's vertical axis:**
    +			 *    - inner-top [default]
    +			 *    - inner-middle
    +			 *    - inner-bottom
    +			 *    - outer-top
    +			 *    - outer-middle
    +			 *    - outer-bottom
    +			 * @name axis․x․label
    +			 * @memberOf Options
    +			 * @type {String|Object}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   x: {
    +			 *     label: "Your X Axis"
    +			 *   }
    +			 * }
    +			 *
    +			 * axis: {
    +			 *   x: {
    +			 *     label: {
    +			 *        text: "Your X Axis",
    +			 *        position: "outer-center"
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_x_label: {},
    +
    +			/**
    +			 * Set clip-path attribute for y axis element
    +			 * @name axis․y․clipPath
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * // don't set 'clip-path' attribute
    +			 * clipPath: false
    +			 */
    +			axis_y_clipPath: true,
    +
    +			/**
    +			 * Show or hide y axis.
    +			 * @name axis․y․show
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     show: false
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_show: true,
    +
    +			/**
    +			 * Set type of y axis.<br><br>
    +			 * **Available Values:**
    +			 *   - timeseries
    +			 *   - category
    +			 *   - indexed
    +			 * @name axis․y․type
    +			 * @memberOf Options
    +			 * @type {String}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     type: "timeseries"
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_type: undefined,
    +
    +			/**
    +			 * Set max value of y axis.
    +			 * - **NOTE:** Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    +			 * @name axis․y․max
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     max: 1000
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_max: undefined,
    +
    +			/**
    +			 * Set min value of y axis.
    +			 * - **NOTE:**
    +			 *   Padding will be added based on this value, so if you don't need the padding, please set axis.y.padding to disable it (e.g. axis.y.padding = 0).
    +			 * @name axis․y․min
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     min: 1000
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_min: undefined,
    +
    +			/**
    +			 * Change the direction of y axis.<br><br>
    +			 * If true set, the direction will be from the top to the bottom.
    +			 * @name axis․y․inverted
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     inverted: true
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_inverted: false,
    +
    +			/**
    +			 * Set center value of y axis.
    +			 * @name axis․y․center
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     center: 0
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_center: undefined,
    +
    +			/**
    +			 * Show y axis inside of the chart.
    +			 * @name axis․y․inner
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     inner: true
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_inner: false,
    +
    +			/**
    +			 * Set label on y axis.<br><br>
    +			 * You can set y axis label and change its position by this option. This option works in the same way as axis.x.label.
    +			 * @name axis․y․label
    +			 * @memberOf Options
    +			 * @type {String|Object}
    +			 * @default {}
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     label: "Your Y Axis"
    +			 *   }
    +			 * }
    +			 *
    +			 * axis: {
    +			 *   y: {
    +			 *     label: {
    +			 *        text: "Your Y Axis",
    +			 *        position: "outer-middle"
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_label: {},
    +
    +			/**
    +			 * Set formatter for y axis tick text.<br><br>
    +			 * This option accepts d3.format object as well as a function you define.
    +			 * @name axis․y․tick․format
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       format: function(x) {
    +			 *           return x.getFullYear();
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_tick_format: undefined,
    +
    +			/**
    +			 * Show y axis outer tick.
    +			 * @name axis․y․tick․outer
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       outer: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_tick_outer: true,
    +
    +			/**
    +			 * Set y axis tick values manually.
    +			 * @name axis․y․tick․values
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default null
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       values: [100, 1000, 10000]
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_tick_values: null,
    +			axis_y_tick_rotate: 0,
    +
    +			/**
    +			 * Set the number of y axis ticks.<br><br>
    +			 * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
    +			 * @name axis․y․tick․count
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       count: 5
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_tick_count: undefined,
    +
    +			/**
    +			 * Set the y Axis tick text's position relatively its original position
    +			 * @name axis․y․tick․text․position
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {x: 0, y:0}
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       text: {
    +			 *         position: {
    +			 *           x: 10,
    +			 *           y: 10
    +			 *         }
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_tick_text_position: {x: 0, y: 0},
    +
    +			/**
    +			 * Set the number of y axis ticks.<br><br>
    +			 * - **NOTE:** The position of the ticks will be calculated precisely, so the values on the ticks will not be rounded nicely. In the case, axis.y.tick.format or axis.y.tick.values will be helpful.
    +			 * @name axis․y․tick․time
    +			 * @memberOf Options
    +			 * @private
    +			 * @type {Object}
    +			 * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     tick: {
    +			 *       time: {
    +			 *          // ticks at 15-minute intervals
    +			 *          // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks
    +			 *          value: d3.timeMinute.every(15)
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			// @TODO: not fully implemented yet
    +			axis_y_tick_time_value: undefined,
    +
    +			/**
    +			 * Set padding for y axis.<br><br>
    +			 * You can set padding for y axis to create more space on the edge of the axis.
    +			 * This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.
    +			 *
    +			 * - **NOTE:** For area and bar type charts, [area.zerobased](#.area) or [bar.zerobased](#.bar) options should be set to 'false` to get padded bottom.
    +			 * @name axis․y․padding
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     padding: {
    +			 *       top: 0,
    +			 *       bottom: 0
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_padding: {},
    +
    +			/**
    +			 * Set default range of y axis.<br><br>
    +			 * This option set the default value for y axis when there is no data on init.
    +			 * @name axis․y․default
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y: {
    +			 *     default: [0, 1000]
    +			 *   }
    +			 * }
    +			 */
    +			axis_y_default: undefined,
    +
    +			/**
    +			 * Show or hide y2 axis.
    +			 * @name axis․y2․show
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     show: true
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_show: false,
    +
    +			/**
    +			 * Set max value of y2 axis.
    +			 * @name axis․y2․max
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     max: 1000
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_max: undefined,
    +
    +			/**
    +			 * Set min value of y2 axis.
    +			 * @name axis․y2․min
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     min: -1000
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_min: undefined,
    +
    +			/**
    +			 * Change the direction of y2 axis.<br><br>
    +			 * If true set, the direction will be from the top to the bottom.
    +			 * @name axis․y2․inverted
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     inverted: true
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_inverted: false,
    +
    +			/**
    +			 * Set center value of y2 axis.
    +			 * @name axis․y2․center
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     center: 0
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_center: undefined,
    +
    +			/**
    +			 * Show y2 axis inside of the chart.
    +			 * @name axis․y2․inner
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default false
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     inner: true
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_inner: false,
    +
    +			/**
    +			 * Set label on y2 axis.<br><br>
    +			 * You can set y2 axis label and change its position by this option. This option works in the same way as axis.x.label.
    +			 * @name axis․y2․label
    +			 * @memberOf Options
    +			 * @type {String|Object}
    +			 * @default {}
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     label: "Your Y2 Axis"
    +			 *   }
    +			 * }
    +			 *
    +			 * axis: {
    +			 *   y2: {
    +			 *     label: {
    +			 *        text: "Your Y2 Axis",
    +			 *        position: "outer-middle"
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_label: {},
    +
    +			/**
    +			 * Set formatter for y2 axis tick text.<br><br>
    +			 * This option works in the same way as axis.y.format.
    +			 * @name axis․y2․tick․format
    +			 * @memberOf Options
    +			 * @type {Function}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     tick: {
    +			 *       format: d3.format("$,")
    +			 *       //or format: function(d) { return "$" + d; }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_tick_format: undefined,
    +
    +			/**
    +			 * Show or hide y2 axis outer tick.
    +			 * @name axis․y2․tick․outer
    +			 * @memberOf Options
    +			 * @type {Boolean}
    +			 * @default true
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     tick: {
    +			 *       outer: false
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_tick_outer: true,
    +
    +			/**
    +			 * Set y2 axis tick values manually.
    +			 * @name axis․y2․tick․values
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default null
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     tick: {
    +			 *       values: [100, 1000, 10000]
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_tick_values: null,
    +
    +			/**
    +			 * Set the number of y2 axis ticks.
    +			 * - **NOTE:** This works in the same way as axis.y.tick.count.
    +			 * @name axis․y2․tick․count
    +			 * @memberOf Options
    +			 * @type {Number}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     tick: {
    +			 *       count: 5
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_tick_count: undefined,
    +
    +			/**
    +			 * Set the y2 Axis tick text's position relatively its original position
    +			 * @name axis․y2․tick․text․position
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {x: 0, y:0}
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     tick: {
    +			 *       text: {
    +			 *         position: {
    +			 *           x: 10,
    +			 *           y: 10
    +			 *         }
    +			 *       }
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_tick_text_position: {x: 0, y: 0},
    +
    +			/**
    +			 * Set the number of y2 axis ticks.
    +			 * - **NOTE:** This works in the same way as axis.y.tick.count.
    +			 * @name axis․y2․padding
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @default {}
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     padding: {
    +			 *       top: 100,
    +			 *       bottom: 100
    +			 *     }
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_padding: {},
    +
    +			/**
    +			 * Set default range of y2 axis.<br><br>
    +			 * This option set the default value for y2 axis when there is no data on init.
    +			 * @name axis․y2․default
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default undefined
    +			 * @example
    +			 * axis: {
    +			 *   y2: {
    +			 *     default: [0, 1000]
    +			 *   }
    +			 * }
    +			 */
    +			axis_y2_default: undefined,
    +
    +			/**
    +			 * Set related options
    +			 * @name grid
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [front=false] Set 'grid & focus lines' to be positioned over grid lines and chart elements.
    +			 * @property {Boolean} [x.show=false] Show grids along x axis.
    +			 * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.<br>
    +			 *  This option accepts array including object that has value, text, position and class. text, position and class are optional. For position, start, middle and end (default) are available.
    +			 *  If x axis is category axis, value can be category name. If x axis is timeseries axis, value can be date string, Date object and unixtime integer.
    +			 * @property {Boolean} [y.show=false] Show grids along x axis.
    +			 * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.<br>
    +			 *  This option accepts array including object that has value, text, position and class.
    +			 * @property {Boolean} [y.ticks=10] Number of y grids to be shown.
    +			 * @property {Boolean} [focus.show=true] Show grids when focus.
    +			 * @property {Boolean} [lines.front=true] Set grid lines to be positioned over chart elements.
    +			 * @default undefined
    +			 * @example
    +			 * grid: {
    +			 *   x: {
    +			 *     show: true,
    +			 *     lines: [
    +			 *       {value: 2, text: "Label on 2"},
    +			 *       {value: 5, text: "Label on 5", class: "label-5"}
    +			 *       {value: 6, text: "Label on 6", position: "start"}
    +			 *     ]
    +			 *   },
    +			 *   y: {
    +			 *     show: true,
    +			 *     lines: [
    +			 *       {value: 100, text: "Label on 100"},
    +			 *       {value: 200, text: "Label on 200", class: "label-200"}
    +			 *       {value: 300, text: "Label on 300", position: 'middle'}
    +			 *     ],
    +			 *     ticks: 5
    +			 *   },
    +			 *   front: true,
    +			 *   focus: {
    +			 *      show: false
    +			 *   },
    +			 *   lines: {
    +			 *      front: false
    +			 *   }
    +			 * }
    +			 */
    +			grid_x_show: false,
    +			grid_x_type: "tick",
    +			grid_x_lines: [],
    +			grid_y_show: false,
    +			grid_y_lines: [],
    +			grid_y_ticks: 10,
    +			grid_focus_show: true,
    +			grid_front: false,
    +			grid_lines_front: true,
    +
    +			/**
    +			 * Set point options
    +			 * @name point
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [point.show=true] Whether to show each point in line.
    +			 * @property {Number|Function} [point.r=2.5] The radius size of each point.<br>
    +			 *  - **NOTE:** Disabled for 'bubble' type
    +			 * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.
    +			 * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.<br>
    +			 *  - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`
    +			 * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected.
    +			 * @property {String} [point.type="circle"] The type of point to be drawn<br>
    +			 * - **NOTE:**
    +			 *  - If chart has 'bubble' type, only circle can be used.
    +			 *  - For IE, non circle point expansions are not supported due to lack of transform support.
    +			 * - **Available Values:**
    +			 *  - circle
    +			 *  - rectangle
    +			 * @property {Array} [point.pattern=[]] The type of point or svg shape as string, to be drawn for each line<br>
    +			 * - **NOTE:**
    +			 *  - This is an `experimental` feature and can have some unexpected behaviors.
    +			 *  - If chart has 'bubble' type, only circle can be used.
    +			 *  - For IE, non circle point expansions are not supported due to lack of transform support.
    +			 * - **Available Values:**
    +			 *  - circle
    +			 *  - rectangle
    +			 *  - svg shape tag interpreted as string<br>
    +			 *    (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)
    +			 * @example
    +			 *  point: {
    +			 *      show: false,
    +			 *      r: 5,
    +			 *
    +			 *      // or customize the radius
    +			 *      r: function(d) {
    +			 *          ...
    +			 *          return r;
    +			 *      },
    +			 *
    +			 *      focus: {
    +			 *          expand: {
    +			 *              enabled: true,
    +			 *              r: 1
    +			 *          }
    +			 *      },
    +			 *      select: {
    +			 *          r: 3
    +			 *      },
    +			 *
    +			 *      // valid values are "circle" or "rectangle"
    +			 *      type: "rectangle",
    +			 *
    +			 *      // or indicate as pattern
    + 			 *      pattern: [
    + 			 *        "circle",
    + 			 *        "rectangle",
    + 			 *        "<polygon points='0 6 4 0 -4 0'></polygon>"
    + 			 *     ],
    +			 *  }
    +			 */
    +			point_show: true,
    +			point_r: 2.5,
    +			point_sensitivity: 10,
    +			point_focus_expand_enabled: true,
    +			point_focus_expand_r: undefined,
    +			point_pattern: [],
    +			point_select_r: undefined,
    +			point_type: "circle",
    +
    +			/**
    +			 * Set line options
    +			 * @name line
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.<br>
    +			 *  If true set, the region of null data will be connected without any data point. If false set, the region of null data will not be connected and get empty.
    +			 * @property {Array}   [line.classes=undefined] If set, used to set a css class on each line.
    +			 * @property {Boolean} [line.step.type=step] Change step type for step chart.<br>
    +			 * **Available values:**
    +			 * - step
    +			 * - step-before
    +			 * - step-after
    +			 * @property {Boolean|Array} [line.point=true] Set to false to not draw points on linecharts. Or pass an array of line ids to draw points for.
    +			 * @example
    +			 *  line: {
    +			 *      connectNull: true,
    +			 *      classes: [
    +			 *          "line-class1",
    +			 *          "line-class2"
    +			 *      ],
    +			 *      step: {
    +			 *          type: "step-after"
    +			 *      },
    +			 *
    +			 *      // hide all data points ('point.show=false' also has similar effect)
    +			 *      point: false,
    +			 *
    +			 *      // show data points for only indicated datas
    +			 *      point: [
    +			 *          "data1", "data3"
    +			 *      ]
    +			 *  }
    +			 */
    +			line_connectNull: false,
    +			line_step_type: "step",
    +			line_classes: undefined,
    +			line_point: true,
    +
    +			/**
    +			 * Set bar options
    +			 * @name bar
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [bar.padding=0] The padding pixel value between each bar.
    +			 * @property {Number} [bar.radius] Set the radius of bar edge in pixel.<br>- **NOTE:** Only for non-stacking bars.
    +			 * @property {Number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
    +			 * @property {Number} [bar.width] Change the width of bar chart.
    +			 * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.
    +			 * @property {Number} [bar.width.max] The maximum width value for ratio.
    +			 * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
    +			 * @example
    +			 *  bar: {
    +			 *      padding: 1,
    +			 *
    +			 *      // the 'radius' option can be used only for non-stacking bars
    +			 *      radius: 10,
    +			 *      // or
    +			 *      radius: {
    +			 *          ratio: 0.5
    +			 *      }
    +			 *
    +			 *      width: 10,
    +			 *      // or
    +			 *      width: {
    +			 *          ratio: 0.2,
    +			 *          max: 20
    +			 *      },
    +			 *
    +			 *      zerobased: false
    +			 *  }
    +			 */
    +			bar_padding: 0,
    +			bar_radius: undefined,
    +			bar_radius_ratio: undefined,
    +			bar_width: undefined,
    +			bar_width_ratio: 0.6,
    +			bar_width_max: undefined,
    +			bar_zerobased: true,
    +
    +			/**
    +			 * Set bubble options
    +			 * @name bubble
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Number|Function} [bubble.maxR=35] Set the max bubble radius value
    +			 * @example
    +			 *  bubble: {
    +			 *      // ex) If 100 is the highest value among data bound, the representation bubble of 100 will have radius of 50.
    +			 *      // And the lesser will have radius relatively from tha max value.
    +			 *      maxR: 50,
    +			 *
    +			 *      // or set radius callback
    +			 *      maxR: function(d) {
    +			 *          // ex. of d param - {x: Fri Oct 06 2017 00:00:00 GMT+0900, value: 80, id: "data2", index: 5}
    +			 *          ...
    +			 *          return Math.sqrt(d.value * 2);
    +			 *      }
    +			 *  }
    +			 */
    +			bubble_maxR: 35,
    +
    +			/**
    +			 * Set area options
    +			 * @name area
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.
    +			 * @property {Boolean} [area.above=false]
    +			 * @example
    +			 *  area: {
    +			 *      zerobased: false,
    +			 *      above: true
    +			 *  }
    +			 */
    +			area_zerobased: true,
    +			area_above: false,
    +
    +			/**
    +			 * Set pie options
    +			 * @name pie
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece.
    +			 * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.
    +			 * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels.
    +			 * @property {Number|Function} [pie.label.ratio=undefined] Set ratio of labels position.
    +			 * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces.
    +			 * @property {Number} [pie.innerRadius=0] Sets the inner radius of pie arc.
    +			 * @property {Number} [pie.padAngle=0] Set padding between data.
    +			 * @property {Number} [pie.padding=0] Sets the gap between pie arcs.
    +			 * @example
    +			 *  pie: {
    +			 *      label: {
    +			 *          show: false,
    +			 *          format: function(value, ratio, id) {
    +			 *              return d3.format("$")(value);
    +			 *          },
    +			 *          threshold: 0.1,
    +			 *
    +			 *          // set ratio callback. Should return ratio value
    +			 *          ratio: function(d, radius, h) {
    +			 *              ...
    +			 *              return ratio;
    +			 *          },
    +			 *          // or set ratio number
    +			 *          ratio: 0.5
    +			 *      },
    +			 *      expand: false,
    +			 *      innerRadius: 0,
    +			 *      padAngle: 0.1,
    +			 *      padding: 0
    +			 *  }
    +			 */
    +			pie_label_show: true,
    +			pie_label_format: undefined,
    +			pie_label_threshold: 0.05,
    +			pie_label_ratio: undefined,
    +			pie_expand: {},
    +			pie_expand_duration: 50,
    +			pie_innerRadius: 0,
    +			pie_padAngle: 0,
    +			pie_padding: 0,
    +
    +			/**
    +			 * Set gauge options
    +			 * @name gauge
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [gauge.fullCircle=false] Show full circle as donut. When set to 'true', the max label will not be showed due to start and end points are same location.
    +			 * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge.
    +			 * @property {Function} [gauge.label.format] Set formatter for the label on gauge. Label text can be multilined with `\n` character.
    +			 * @property {Function} [gauge.label.extents] Set customized min/max label text.
    +			 * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge.
    +			 * @property {Number} [gauge.expand.duration=50] Set the expand transition time in milliseconds.
    +			 * @property {Number} [gauge.min=0] Set min value of the gauge.
    +			 * @property {Number} [gauge.max=100] Set max value of the gauge.
    +			 * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2]
    +			 * @property {String} [gauge.units] Set units of the gauge.
    +			 * @property {Number} [gauge.width] Set width of gauge chart.
    +			 * @example
    +			 *  gauge: {
    +			 *      fullCircle: false,
    +			 *      label: {
    +			 *          show: false,
    +			 *          format: function(value, ratio) {
    +			 *              return value;
    +			 *
    +			 *              // to multiline, return with '\n' character
    +			 *              // return value +"%\nLine1\n2Line2";
    +			 *          },
    +			 *          extents: function(value, isMax) {
    +		 	 *              return (isMax ? "Max:" : "Min:") + value;
    +			 *          }
    +			 *      },
    +			 *      expand: false,
    +			 *
    +			 *      // or set duration
    +			 *      expand: {
    +			 *          duration: 20
    +			 *      },
    +			 *      min: -100,
    +			 *      max: 200,
    +			 *      units: "%",
    +			 *      width: 10
    +			 *  }
    +			 */
    +			gauge_fullCircle: false,
    +			gauge_label_show: true,
    +			gauge_label_format: undefined,
    +			gauge_min: 0,
    +			gauge_max: 100,
    +			gauge_startingAngle: -1 * Math.PI / 2,
    +			gauge_label_extents: undefined,
    +			gauge_units: undefined,
    +			gauge_width: undefined,
    +			gauge_expand: {},
    +			gauge_expand_duration: 50,
    +
    +
    +			/**
    +			 * Set donut options
    +			 * @name donut
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece.
    +			 * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.
    +			 * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels.
    +			 * @property {Number|Function} [donut.label.ratio=undefined] Set ratio of labels position.
    +			 * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces.
    +			 * @property {Number} [donut.width] Set width of donut chart.
    +			 * @property {String} [donut.title=""] Set title of donut chart. Use `\n` character to enter line break.
    +			 * @property {Number} [donut.padAngle=0] Set padding between data.
    +			 * @example
    +			 *  donut: {
    +			 *      label: {
    +			 *          show: false,
    +			 *          format: function(value, ratio, id) {
    +			 *              return d3.format("$")(value);
    +			 *          },
    +			 *          threshold: 0.1,
    +			 *
    +			 *          // set ratio callback. Should return ratio value
    +			 *          ratio: function(d, radius, h) {
    +			 *          	...
    +			 *          	return ratio;
    +			 *          },
    +			 *          // or set ratio number
    +			 *          ratio: 0.5
    +			 *      },
    +			 *      expand: false,
    +			 *      width: 10,
    +			 *      padAngle: 0.2,
    +			 *      title: "Donut Title"
    +			 *
    +			 *      // title with line break
    +			 *      title: "Title1\nTitle2"
    +			 *  }
    +			 */
    +			donut_label_show: true,
    +			donut_label_format: undefined,
    +			donut_label_threshold: 0.05,
    +			donut_label_ratio: undefined,
    +			donut_width: undefined,
    +			donut_title: "",
    +			donut_expand: {},
    +			donut_expand_duration: 50,
    +			donut_padAngle: 0,
    +
    +			/**
    +			 * Set spline options
    +			 * @name spline
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {String} [spline.interpolation.type=cardinal]
    +			 * @example
    +			 *  spline: {
    +			 *      interpolation: {
    +			 *          type: "cardinal"
    +			 *      }
    +			 *  }
    +			 */
    +			spline_interpolation_type: "cardinal",
    +
    +			/**
    +			 * Set radar options
    +			 * @name radar
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Number} [radar.axis.max=undefined] The max value of axis. If not given, it'll take the max value from the given data.
    +			 * @property {Boolean} [radar.axis.line.show=true] Show or hide axis line.
    +			 * @property {Boolean} [radar.axis.text.show=true] Show or hide axis text.
    +			 * @property {Boolean} [radar.direction.clockwise=false] Set the direction to be drawn.
    +			 * @property {Number} [radar.level.depth=3] Set the level depth.
    +			 * @property {Boolean} [radar.level.show=true] Show or hide level.
    +			 * @property {Function} [radar.level.text.format=(x) => (x % 1 === 0 ? x : x.toFixed(2))] Set format function for the level value.
    +			 * @property {Boolean} [radar.level.text.show=true] Show or hide level text.
    +			 * @property {Number} [radar.size.ratio=0.87] Set size ratio.
    +			 * @example
    +			 *  radar: {
    +			 *      axis: {
    +			 *          max: 50,
    +			 *          line: {
    +			 *              show: false
    +			 *          },
    +			 *          text: {
    +			 *              show: false
    +			 *          }
    +			 *      },
    +			 *      direction: {
    +			 *          clockwise: true
    +			 *      },
    +			 *      level: {
    +			 *          show: false,
    +			 *          text: {
    +			 *              format: function(x) {
    +			 *                  return x + "%";
    +			 *              },
    +			 *              show: true
    +			 *          }
    +			 *      },
    +			 *      size: {
    +			 *          ratio: 0.7
    +			 *      }
    +			 *  }
    +			 */
    +			radar_axis_max: undefined,
    +			radar_axis_line_show: true,
    +			radar_axis_text_show: true,
    +			radar_level_depth: 3,
    +			radar_level_show: true,
    +			radar_level_text_format: x => (x % 1 === 0 ? x : x.toFixed(2)),
    +			radar_level_text_show: true,
    +			radar_size_ratio: 0.87,
    +			radar_direction_clockwise: false,
    +
    +			/**
    +			 * Show rectangles inside the chart.<br><br>
    +			 * This option accepts array including object that has axis, start, end and class. The keys start, end and class are optional.
    +			 * axis must be x, y or y2. start and end should be the value where regions start and end. If not specified, the edge values will be used. If timeseries x axis, date string, Date object and unixtime integer can be used. If class is set, the region element will have it as class.
    +			 * @name regions
    +			 * @memberOf Options
    +			 * @type {Array}
    +			 * @default []
    +			 * @example
    +			 *  regions: [
    +			 *    {
    +			 *      axis: "x",
    +			 *      start: 1,
    +			 *      end: 4,
    +			 *      class: "region-1-4"
    +			 *    }
    +			 *  ]
    +			 */
    +			regions: [],
    +
    +			/**
    +			 * Tooltip options
    +			 * @name tooltip
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {Boolean} [tooltip.show=true] Show or hide tooltip.<br>
    +			 * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.
    +			 *   - **NOTE:** The overlapped data points will be displayed as grouped even if set false.
    +			 * @property {Boolean} [tooltip.linked=false] Set if tooltips on all visible charts with like x points are shown together when one is shown.
    +			 * @property {String} [tooltip.linked.name=""] Groping name for linked tooltip.<br>If specified, linked tooltip will be groped interacting to be worked only with the same name.
    +			 * @property {Function} [tooltip.format.title] Set format for the title of tooltip.<br>
    +			 *  Specified function receives x of the data point to show.
    +			 * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.<br>
    +			 *  Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
    +			 * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.<br>
    +			 *  Specified function receives name, ratio, id and index of the data point to show. ratio will be undefined if the chart is not donut/pie/gauge.
    +			 *  If undefined returned, the row of that value will be skipped.
    +			 * @property {Function} [tooltip.position] Set custom position for the tooltip.<br>
    +			 *  This option can be used to modify the tooltip position by returning object that has top and left.
    +			 * @property {Function} [tooltip.contents] Set custom HTML for the tooltip.<br>
    +			 *  Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.
    +			 * @property {Boolean} [tooltip.init.show=false] Show tooltip at the initialization.
    +			 * @property {Number} [tooltip.init.x=0] Set x Axis index to be shown at the initialization.
    +			 * @property {Object} [tooltip.init.position={top: "0px",left: "50px"}] Set the position of tooltip at the initialization.
    +			 * @property {Function} [tooltip.onshow] Set a callback that will be invoked before the tooltip is shown.
    +			 * @property {Function} [tooltip.onhide] Set a callback that will be invoked before the tooltip is hidden.
    +			 * @property {Function} [tooltip.onshown] Set a callback that will be invoked after the tooltip is shown
    +			 * @property {Function} [tooltip.onhidden] Set a callback that will be invoked after the tooltip is hidden.
    +			 * @property {String|Function|null} [tooltip.order=null] Set tooltip data display order.<br><br>
    +			 *  **Available Values:**
    +			 *  - `desc`: In descending data value order
    +			 *  - `asc`: In ascending data value order
    +			 *  - `null`: It keeps the data display order<br>
    +			 *     **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order.<br>
    +			 *      If want to order as data bound, set any value rather than asc, desc or null. (ex. empty string "")
    +			 *  - `function(data1, data2) { ... }`: [Array.sort compareFunction](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters)
    +			 * @example
    +			 *  tooltip: {
    +			 *      show: true,
    +			 *      grouped: false,
    +			 *      format: {
    +			 *          title: function(x) { return "Data " + x; },
    +			 *          name: function(name, ratio, id, index) { return name; },
    +			 *          value: function(value, ratio, id, index) { return ratio; }
    +			 *      },
    +			 *      position: function(data, width, height, element) {
    +			 *          return {top: 0, left: 0}
    +  			 *      },
    +  			 *      contents: function(d, defaultTitleFormat, defaultValueFormat, color) {
    +  			 *          return ... // formatted html as you want
    +    		 *      },
    +    		 *
    +    		 *      // sort tooltip data value display in ascending order
    +    		 *      order: "asc",
    +    		 *
    +			 *      // specifying sort function
    +			 *      order: function(a, b) {
    +			 *         // param data passed format
    +			 *         {x: 5, value: 250, id: "data1", index: 5, name: "data1"}
    +			 *           ...
    +			 *      },
    +			 *
    +			 *      // show at the initialization
    +			 *      init: {
    +			 *          show: true,
    +			 *          x: 2,
    +			 *          position: {
    +			 *              top: "150px",
    +			 *              left: "250px"
    +			 *          }
    +			 *      },
    +			 *
    +			 *      // fires prior tooltip is shown
    +			 *      onshow: function() { ...},
    +			 *      // fires prior tooltip is hidden
    +			 *      onhide: function() { ... },
    +			 *      // fires after tooltip is shown
    +			 *      onshown: function() { ... },
    +			 *      // fires after tooltip is hidden
    +			 *      onhidden: function() { ... },
    +			 *
    +			 *      // Link any tooltips when multiple charts are on the screen where same x coordinates are available
    +			 *      // Useful for timeseries correlation
    +			 *      linked: true,
    +			 *
    +			 *      // Specify name to interact those with the same name only.
    +			 *      linked: {
    +			 *          name: "some-group"
    +			 *      }
    +			 *  }
    +			 */
    +			tooltip_show: true,
    +			tooltip_grouped: true,
    +			tooltip_format_title: undefined,
    +			tooltip_format_name: undefined,
    +			tooltip_format_value: undefined,
    +			tooltip_position: undefined,
    +			tooltip_contents: function(d, defaultTitleFormat, defaultValueFormat, color) {
    +				return this.getTooltipContent ?
    +					this.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : "";
    +			},
    +			tooltip_init_show: false,
    +			tooltip_init_x: 0,
    +			tooltip_init_position: {
    +				top: "0px",
    +				left: "50px"
    +			},
    +			tooltip_linked: false,
    +			tooltip_linked_name: "",
    +			tooltip_onshow: () => {},
    +			tooltip_onhide: () => {},
    +			tooltip_onshown: () => {},
    +			tooltip_onhidden: () => {},
    +			tooltip_order: null,
    +
    +			/**
    +			 * Set title options
    +			 * @name title
    +			 * @memberOf Options
    +			 * @type {Object}
    +			 * @property {String} [title.text]
    +			 * @property {Number} [title.padding.top=0]
    +			 * @property {Number} [title.padding.right=0]
    +			 * @property {Number} [title.padding.bottom=0]
    +			 * @property {Number} [title.padding.left=0]
    +			 * @property {String} [title.position=top-center]
    +			 * @example
    +			 *  title: {
    +			 *      text: "Title Text",
    +			 *      padding: {
    +			 *          top: 10,
    +			 *          right: 10,
    +			 *          bottom: 10,
    +			 *          left: 10
    +			 *      },
    +			 *      position: "top-center"
    +			 *  }
    +			 */
    +			title_text: undefined,
    +			title_padding: {
    +				top: 0,
    +				right: 0,
    +				bottom: 0,
    +				left: 0
    +			},
    +			title_position: "top-center"
    +		};
    +	}
    +}
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/core.js.html b/doc/core.js.html new file mode 100644 index 000000000..1bcf20960 --- /dev/null +++ b/doc/core.js.html @@ -0,0 +1,222 @@ + + + + + + core.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    core.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + */
    +import Chart from "./internals/Chart";
    +import ChartInternal from "./internals/ChartInternal";
    +import Axis from "./axis/Axis";
    +import "./scss/billboard.scss";
    +
    +/**
    + * @namespace bb
    + * @version #__VERSION__#
    + */
    +const bb = {
    +	/**
    +	 * Version information
    +	 * @property {String} version version
    +	 * @example
    +	 *    bb.version;  // "1.0.0"
    +	 * @memberOf bb
    +	 */
    +	version: "#__VERSION__#",
    +
    +	/**
    +	 * Generate chart
    +	 * @param {Options} options chart options
    +	 * @memberOf bb
    +	 * @return {Chart}
    +	 * @see {@link Options} for different generation options
    +	 * @see {@link Chart} for different methods API
    +	 * @example
    +	 *  <!-- chart holder -->
    +	 * <div id="LineChart"></div>
    +	 * @example
    +	 *   // generate chart with options
    +	 *  var chart = bb.generate({
    +	 *      "bindto": "#LineChart"
    +	 *      "data": {
    +	 *          "columns": [
    +	 *              ["data1", 30, 200, 100, 400, 150, 250],
    +	 *              ["data2", 50, 20, 10, 40, 15, 25]
    +	 *           ]
    +	 *      }
    +	 *  });
    +	 *
    +	 *  // call some API
    +	 *  // ex) get the data of 'data1'
    +	 *  chart.data("data1");
    +	 */
    +	generate(config) {
    +		const inst = new Chart(config);
    +
    +		inst.internal.charts = this.instance;
    +		this.instance.push(inst);
    +
    +		return inst;
    +	},
    +
    +	/**
    +	 * An array containing instance created
    +	 * @property {Array} instance instance array
    +	 * @example
    +	 *  // generate charts
    +	 *  var chart1 = bb.generate(...);
    +	 *  var chart2 = bb.generate(...);
    +	 *
    +	 *  bb.instance;  // [ chart1, chart2, ... ]
    +	 * @memberOf bb
    +	 */
    +	instance: [],
    +
    +	/**
    +	 * Internal chart object
    +	 * @private
    +	 */
    +	chart: {
    +		fn: Chart.prototype,
    +		internal: {
    +			fn: ChartInternal.prototype,
    +			axis: {
    +				fn: Axis.prototype
    +			}
    +		}
    +	}
    +};
    +
    +require("./config/config.js");
    +require("./internals/scale.js");
    +require("./internals/domain.js");
    +require("./data/data.js");
    +require("./data/data.convert.js");
    +require("./data/data.load.js");
    +require("./internals/category.js");
    +require("./interactions/interaction.js");
    +require("./internals/size.js");
    +require("./shape/shape.js");
    +require("./shape/arc.js");
    +require("./shape/bar.js");
    +require("./shape/bubble.js");
    +require("./shape/line.js");
    +require("./shape/point.js");
    +require("./shape/radar.js");
    +require("./internals/text.js");
    +require("./internals/type.js");
    +require("./internals/grid.js");
    +require("./internals/tooltip.js");
    +require("./internals/legend.js");
    +require("./internals/title.js");
    +require("./internals/clip.js");
    +require("./internals/region.js");
    +require("./interactions/drag.js");
    +require("./internals/selection.js");
    +require("./interactions/subchart.js");
    +require("./interactions/zoom.js");
    +require("./internals/color.js");
    +require("./internals/format.js");
    +require("./internals/cache.js");
    +require("./internals/class.js");
    +require("./api/api.focus.js");
    +require("./api/api.show.js");
    +require("./api/api.zoom.js");
    +require("./api/api.load.js");
    +require("./api/api.flow.js");
    +require("./api/api.selection.js");
    +require("./api/api.transform.js");
    +require("./api/api.group.js");
    +require("./api/api.grid.js");
    +require("./api/api.region.js");
    +require("./api/api.data.js");
    +require("./api/api.category.js");
    +require("./api/api.color.js");
    +require("./api/api.x.js");
    +require("./api/api.axis.js");
    +require("./api/api.legend.js");
    +require("./api/api.chart.js");
    +require("./api/api.tooltip.js");
    +require("./axis/bb.axis.js");
    +require("./internals/ua.js");
    +require("./api/api.export.js");
    +
    +export {bb};
    +export default bb;
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/global.html b/doc/global.html new file mode 100644 index 000000000..8d39b57da --- /dev/null +++ b/doc/global.html @@ -0,0 +1,225 @@ + + + + + + Global - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    Global

    + + + + + + + +
    + +
    + +

    + +

    + + +
    + +
    + +
    + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + +
    + + + + + + + + + + + + + +

    Members

    + + + +

    asHalfPixel

    + + + + + +
    + + +
    Source:
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    +

    Copyright (c) 2017 NAVER Corp. +billboard.js project is licensed under the MIT license

    +
    + + + + + + + + + + + + + + + + +
    + +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 000000000..774cfca99 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,288 @@ + + + + + + Home - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + +
    +

    billboard.js

    +

    version Build Status Coverage Status download Greenkeeper

    +

    billboard.js is a re-usable, easy interface JavaScript chart library, based on D3 v4+.

    +
    +

    The name "billboard" comes from the famous billboard chart which everybody knows.

    +
    +
    +

    This project was forked from C3.js v0.4.11.

    + +
    +

    Documents

    +

    Playground

    Play with the diverse options generating on the fly!

    +
      +
    • https://naver.github.io/billboard.js/playground/
    • +
    +

    Questions?

    If you have any questions, checkout the previous posts or create a new one at:

    + +

    Supported chart types

    Chart Types

    +

    Download and Installation

    Download dist files from the repo directly or install it via npm.

    +

    For development (Uncompressed)

    You can download the uncompressed files for development

    +

    Latest

      +
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.js
    • +
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.css
    • +
    +

    Specific version

      +
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.js
    • +
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.css
    • +
    +

    For production (Compressed)

    You can download the compressed files for production

    +

    Latest

      +
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.min.js
    • +
    • https://naver.github.io/billboard.js/release/latest/dist/billboard.min.css
    • +
    +

    Specific version

      +
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.min.js
    • +
    • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.min.css
    • +
    +

    Packaged version (with D3.js inclusion)

    +

    Packaged version is not an official distribution. +It's to provide an easy way to load 'billboard.js' with dependency.

    +
    +
      +
    • Latest
        +
      • https://naver.github.io/billboard.js/release/latest/dist/billboard.pkgd.js
      • +
      • https://naver.github.io/billboard.js/release/latest/dist/billboard.pkgd.min.js
      • +
      +
    • +
    • Specific version
        +
      • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.pkgd.js
      • +
      • https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.pkgd.min.js
      • +
      +
    • +
    +

    Nightly version

    Nightly version is the latest build from the master branch. +With nightly, you can try upcoming changes prior the official release.

    +
      +
    • https://github.com/naver/billboard.js/tree/nightly/dist
    • +
    +
    +

    The version info will be given as the build datetime: x.x.x-nightly-yyyymmddhhmmss

    +
    +

    Installation with npm

    $ npm install billboard.js

    Using CDN

    If you want to use 'billboard.js' without installation, load files directly from one of the CDN providers.

    +
      +
    • cdnjs: https://cdnjs.com/libraries/billboard.js
    • +
    • jsDelivr: https://cdn.jsdelivr.net/npm/billboard.js/dist/
    • +
    • unpkg: https://unpkg.com/billboard.js/dist/
    • +
    +

    Supported Browsers

    +

    Basically will work on all SVG supported browsers.

    +
    + + + + + + + + + + + + + + + + + + + + + +
    Internet ExplorerChromeFirefoxSafariiOSAndroid
    9+LatestLatestLatest8+4+
    +

    Dependency

    + + + + + + + + + + +
    D3 (required)
    4+
    +

    Load billboard.js after D3.js.

    +
    <!-- 1) Load D3.js and billboard.js separately -->
    +    <!-- Load D3 -->
    +    <script src="https://d3js.org/d3.v4.min.js"></script>
    +
    +    <!-- Load billboard.js with base style -->
    +    <link rel="stylesheet" href="$YOUR_PATH/billboard.css">
    +    <script src="$YOUR_PATH/billboard.js"></script>
    +
    +<!-- 2) or Load billboard.js packaged with D3.js -->
    +    <link rel="stylesheet" href="$YOUR_PATH/billboard.css">
    +    <script src="$YOUR_PATH/billboard.pkgd.js"></script>

    or use importing ESM.

    +
    // as named import
    +import {bb} from "billboard.js";
    +
    +// or as importing default
    +import bb from "billboard.js";
    +

    Note
    For migration from C3.js, checkout the migration guide

    +
    +

    Basic usage example

    1) Create chart holder element

    <div id="chart"></div>

    2) Generate a chart with options

    // generate the chart
    +var chart = bb.generate({
    +    bindto: "#chart",
    +    data: {
    +      type: "line",
    +        columns: [
    +            ["data1", 30, 200, 100, 400, 150, 250]
    +        ]
    +    }
    +});
    +
    +// call some API
    +chart.load( ... );

    How to start developing billboard.js?

    For anyone interested in developing billboard.js, follow the instructions below.

    +

    Development Environment

    1. Clone the repository

    Clone the billboard.js repository and install the dependency modules.

    +
    # Create a folder and move.
    +$ mkdir billboard.js && cd billboard.js
    +
    +# Clone the repository.
    +$ git clone https://github.com/naver/billboard.js.git

    2. Install dependencies

    npm and Yarn are supported.

    +
    # Install the dependency modules.
    +$ npm install
    +
    +# or
    +$ yarn 

    3. Build

    Use npm script to build billboard.js

    +
    # Run webpack-dev-server for development
    +$ npm start
    +
    +# Build
    +$ npm run build
    +
    +# Generate jsdoc
    +$ npm run jsdoc

    Two folders will be created after the build is completed.

    +
      +
    • dist folder: Includes the billboard.js and billboard.min.js files.
    • +
    • doc folder: Includes API documentation. The home page for the documentation is doc/index.html.
    • +
    +

    Linting

    To maintain the same code style and quality, we adopted ESLint. The rules are based on the Airbnb JavaScript Style Guide with some modifications. +Setup your editor for check or run the below command for linting.

    +
    $ npm run lint

    Test

    Once you created a branch and finished the development, you must perform a test with npm test command before the push to a remote repository.

    +
    $ npm test

    Running the npm test command will start Mocha tests via Karma-runner.

    +

    Bug Report

    If you find a bug, please report to us by posting issues on GitHub.

    +

    License

    billboard.js is released under the MIT license.

    +
    Copyright (c) 2017 NAVER Corp.
    +
    +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.
    +
    +
    + + + + + + + + +
    + +
    + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/doc/internals_Chart.js.html b/doc/internals_Chart.js.html new file mode 100644 index 000000000..df957f700 --- /dev/null +++ b/doc/internals_Chart.js.html @@ -0,0 +1,158 @@ + + + + + + internals/Chart.js - billboard.js API doc + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    internals/Chart.js

    + + + + + + + +
    +
    +
    /**
    + * Copyright (c) 2017 NAVER Corp.
    + * billboard.js project is licensed under the MIT license
    + * @license MIT
    + * @ignore
    + */
    +import ChartInternal from "./ChartInternal";
    +
    +/**
    + * Main chart class.
    + * - Note: Instantiated via `bb.generate()`.
    + * @class Chart
    + * @example
    + * var chart = bb.generate({
    + *  data: {
    + *    columns: [
    + *	    ["x", "2015-11-02", "2015-12-01", "2016-01-01", "2016-02-01", "2016-03-01"],
    + * 	    ["count1", 11, 8, 7, 6, 5 ],
    + *	    ["count2", 9, 3, 6, 2, 8 ]
    + *   ]}
    + * }
    + * @see {@link bb.generate} for the initialization.
    +*/
    +export default class Chart {
    +	constructor(config) {
    +		const $$ = new ChartInternal(this);
    +
    +		this.internal = $$;
    +
    +		$$.loadConfig(config);
    +		$$.beforeInit(config);
    +		$$.init();
    +
    +		/**
    +		 * Access primary node elements
    +		 * @name Chart#$
    +		 * @type Object
    +		 * @property {Object} $
    +		 * @property {d3.selection} $.chart Wrapper element
    +		 * @property {d3.selection} $.svg Main svg element
    +		 * @property {d3.selection} $.defs Definition element
    +		 * @property {d3.selection} $.main Main grouping element
    +		 * @property {d3.selection} $.tooltip Tooltip element
    +		 * @property {d3.selection} $.legend Legend element
    +		 * @property {d3.selection} $.title Title element
    +		 * @property {d3.selection} $.grid Grid element
    +		 * @property {d3.selection} $.arc Arc element
    +		 * @property {Object} $.bar
    +		 * @property {d3.selection} $.bar.bars Bar elements
    +		 * @property {Object} $.line
    +		 * @property {d3.selection} $.line.lines Line elements
    +		 * @property {d3.selection} $.line.areas Areas elements
    +		 * @property {d3.selection} $.line.circles Data point circle elements
    +		 * @property {Object} $.text
    +		 * @property {d3.selection} $.text.texts Data label text elements
    +		 * @instance
    +		 * @memberOf Chart
    +		 * @example
    +		 * var chart = bb.generate({ ... });
    +		 *
    +		 * chart.$.chart; // wrapper element
    +		 * chart.$.line.circles;  // all data point circle elements
    +		 */
    +		this.$ = $$.getChartElements();
    +
    +		$$.afterInit(config);
    +
    +		// bind "this" to nested API
    +		(function bindThis(fn, target, argThis) {
    +			Object.keys(fn).forEach(key => {
    +				target[key] = fn[key].bind(argThis);
    +
    +				Object.keys(fn[key]).length &&
    +					bindThis(fn[key], target[key], argThis);
    +			});
    +		})(Chart.prototype, this, this);
    +	}
    +}
    +
    +
    +
    + + + + + + +
    + +
    + + + + + + + + + + + + + + + diff --git a/doc/scripts/collapse.js b/doc/scripts/collapse.js new file mode 100644 index 000000000..4525c1756 --- /dev/null +++ b/doc/scripts/collapse.js @@ -0,0 +1,11 @@ +function hideAllButCurrent(){ + //by default all submenut items are hidden + $("nav > ul > li > ul li").hide(); + + //only current page (if it exists) should be opened + var file = window.location.pathname.split("/").pop(); + $("nav > ul > li > a[href^='"+file+"']").parent().find("> ul li").show(); +} +$( document ).ready(function() { + hideAllButCurrent(); +}); \ No newline at end of file diff --git a/doc/scripts/jquery-3.1.1.min.js b/doc/scripts/jquery-3.1.1.min.js new file mode 100644 index 000000000..4c5be4c0f --- /dev/null +++ b/doc/scripts/jquery-3.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), +a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), +void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("