diff --git a/asset/css/icinga-chart.less b/asset/css/icinga-chart.less
new file mode 100644
index 00000000..308d9019
--- /dev/null
+++ b/asset/css/icinga-chart.less
@@ -0,0 +1,23 @@
+.icinga-chart {
+ .icinga-chart-title {
+ text-align: center;
+ font-size: 1.5em;
+ margin: 2em 0 0.5em 0;
+ }
+}
+
+// default overwrite
+.icinga-chart {
+ text.bb-title {
+ font-size: 2em;
+ }
+
+ .bb-grid .threshold-mark {
+ line { // only for line chart
+ stroke: rgba(0, 0, 0, 0.2);
+ stroke-dasharray: 5;
+ }
+ }
+}
+
+
diff --git a/asset/css/vendor/billboard.modern-theme.css b/asset/css/vendor/billboard.modern-theme.css
new file mode 100644
index 00000000..c88f0251
--- /dev/null
+++ b/asset/css/vendor/billboard.modern-theme.css
@@ -0,0 +1,381 @@
+/*!
+ * Copyright (c) 2017 ~ present NAVER Corp.
+ * billboard.js project is licensed under the MIT license
+ *
+ * billboard.js, JavaScript chart library
+ * https://naver.github.io/billboard.js/
+ *
+ * @version 3.13.0
+ */
+@charset "UTF-8";
+/*-- Insight Theme --*/
+/*-- Default color pattern --*/
+.bb-color-pattern {
+ background-image: url("#7ea9fa;#ffcd1e;#d33043;#41c464;#c86b74;#006bc2;#2a7e41;#f27c00;#c159ff;#bed017;");
+}
+
+/*-- Chart --*/
+.bb svg {
+ font-size: 12px;
+ font-family: -apple-system, "system-ui", "Noto Sans", "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo", sans-serif;
+ line-height: 1;
+}
+.bb path, .bb line {
+ fill: none;
+ stroke: #cecece;
+}
+.bb text, .bb .bb-button {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ fill: #555;
+ font-size: 10.5px;
+}
+
+.bb-legend-item-title,
+.bb-xgrid-focus,
+.bb-ygrid-focus,
+.bb-ygrid {
+ shape-rendering: crispEdges;
+}
+
+.bb-chart-arcs .bb-needle {
+ fill: #000;
+}
+
+/*-- Funnel --*/
+.bb-chart-funnels path {
+ stroke-width: 0;
+}
+.bb-chart-funnels + .bb-chart-texts text {
+ fill: #fff;
+}
+
+/*-- Axis --*/
+.bb-axis {
+ shape-rendering: crispEdges;
+}
+.bb-axis .bb-axis-x-tooltip, .bb-axis .bb-axis-y-tooltip, .bb-axis .bb-axis-y2-tooltip {
+ font-size: 0.9em;
+ fill: #fff;
+ white-space: nowrap;
+}
+
+.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 {
+ pointer-events: none;
+}
+.bb-grid line {
+ stroke: #f1f1f1;
+}
+
+.bb-xgrid-focus line, .bb-ygrid-focus line {
+ stroke: #d2bad8;
+}
+
+/*-- Text on Chart --*/
+.bb-text.bb-empty {
+ fill: #767676;
+}
+
+/*-- Line --*/
+.bb-line {
+ stroke-width: 1px;
+}
+
+/*-- Point --*/
+.bb-circle._expanded_ {
+ 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;
+}
+
+/*-- Candlestick --*/
+.bb-candlestick {
+ stroke-width: 1px;
+}
+.bb-candlestick._expanded_ {
+ fill-opacity: 0.75;
+}
+
+/*-- Focus --*/
+.bb-target.bb-focused, .bb-circles.bb-focused {
+ opacity: 1;
+}
+.bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step, .bb-circles.bb-focused path.bb-line, .bb-circles.bb-focused path.bb-step {
+ stroke-width: 2px;
+}
+.bb-target.bb-defocused, .bb-circles.bb-defocused {
+ opacity: 0.3 !important;
+}
+.bb-target.bb-defocused .text-overlapping, .bb-circles.bb-defocused .text-overlapping {
+ opacity: 0.05 !important;
+}
+
+/*-- Region --*/
+.bb-region {
+ fill: #71808d;
+}
+.bb-region rect {
+ fill-opacity: 0.1;
+}
+.bb-region.selected rect {
+ fill: rgb(39, 201, 3);
+}
+
+/*-- Zoom region --*/
+.bb-zoom-brush {
+ fill-opacity: 0.1;
+ fill: #838181;
+}
+
+/*-- Brush --*/
+.bb-brush .extent {
+ fill-opacity: 0.1;
+}
+.bb-brush .selection {
+ fill: #838181;
+ fill-opacity: 0.2;
+}
+.bb-brush path {
+ stroke: #838181;
+}
+
+/*-- Select - Drag --*/
+/*-- Legend --*/
+.bb-legend-item {
+ user-select: none;
+}
+.bb-legend-item line.bb-legend-item-tile {
+ stroke-linecap: round;
+ transform: translate(7px, 1px);
+ stroke-dasharray: 1 20;
+}
+
+.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;
+}
+
+/*-- Treemap --*/
+.bb-chart-treemaps rect {
+ stroke: #000;
+ stroke-width: 0.5px;
+}
+
+/*-- Tooltip --*/
+.bb-tooltip-container {
+ z-index: 10;
+ font-family: -apple-system, "system-ui", "Noto Sans", "Malgun Gothic", "맑은 고딕", helvetica, "Apple SD Gothic Neo", sans-serif;
+ user-select: none;
+}
+
+.bb-tooltip {
+ border-collapse: separate;
+ border-spacing: 0;
+ empty-cells: show;
+ border: 1px solid #999;
+ color: #fff;
+ border-radius: 5px;
+ background-color: #404244;
+ text-align: left;
+ font-size: 11px;
+ white-space: nowrap;
+ opacity: 0.9;
+}
+.bb-tooltip th {
+ font-size: 11px;
+ padding: 3px 6px 0 6px;
+ text-align: left;
+}
+.bb-tooltip td {
+ padding: 3px;
+}
+.bb-tooltip td:first-child {
+ padding-left: 7px;
+}
+.bb-tooltip td:last-child {
+ padding-right: 8px;
+}
+.bb-tooltip td > span, .bb-tooltip td > svg {
+ display: inline-block;
+ width: 7px;
+ height: 7px;
+ margin-right: 6px;
+ border-radius: 5px;
+ vertical-align: middle;
+}
+.bb-tooltip td.value {
+ border-left: 1px solid transparent;
+ text-align: right;
+}
+.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;
+}
+
+text.bb-chart-arcs-gauge-title {
+ dominant-baseline: middle;
+ font-size: 2.7em;
+}
+
+.bb-chart-arcs {
+ /*-- Polar --*/
+}
+.bb-chart-arcs .bb-chart-arcs-background {
+ fill: #e0e0e0;
+ stroke: #ccc;
+}
+.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: 1.8em;
+ fill: #000;
+ font-weight: 600;
+}
+.bb-chart-arcs path.empty {
+ fill: #eaeaea;
+ stroke-width: 0;
+}
+.bb-chart-arcs .bb-levels circle {
+ fill: none;
+ stroke: #cecece;
+ stroke-width: 0.5px;
+}
+.bb-chart-arcs .bb-levels text {
+ fill: #848282;
+}
+
+.bb-chart-arc .bb-gauge-value {
+ fill: #000;
+}
+.bb-chart-arc path {
+ stroke: #fff;
+}
+.bb-chart-arc rect {
+ stroke: #fff;
+ stroke-width: 1;
+}
+.bb-chart-arc text {
+ fill: #fff;
+ font-size: 11px;
+}
+
+/*-- Radar --*/
+.bb-chart-radars .bb-levels polygon {
+ fill: none;
+ stroke: #cecece;
+ stroke-width: 0.5px;
+}
+.bb-chart-radars .bb-levels text {
+ fill: #848282;
+}
+.bb-chart-radars .bb-axis line {
+ stroke: #cecece;
+ stroke-width: 0.5px;
+}
+.bb-chart-radars .bb-axis text {
+ font-size: 1.15em;
+ cursor: default;
+}
+.bb-chart-radars .bb-shapes polygon {
+ fill-opacity: 0.2;
+ stroke-width: 1px;
+}
+
+/*-- Button --*/
+.bb-button {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+}
+.bb-button .bb-zoom-reset {
+ border: 1px solid #999;
+ background-color: #404244;
+ color: #fff;
+ opacity: 0.9;
+ padding: 5px;
+ border-radius: 5px;
+ cursor: pointer;
+}
\ No newline at end of file
diff --git a/asset/js/vendor/billboard-loader.js b/asset/js/vendor/billboard-loader.js
new file mode 100644
index 00000000..874eb8dc
--- /dev/null
+++ b/asset/js/vendor/billboard-loader.js
@@ -0,0 +1,13 @@
+define("d3-axis", ["d3"], d3 => d3);
+define("d3-brush", ["d3"], d3 => d3);
+define("d3-drag", ["d3"], d3 => d3);
+define("d3-dsv", ["d3"], d3 => d3);
+define("d3-ease", ["d3"], d3 => d3);
+define("d3-hierarchy", ["d3"], d3 => d3);
+define("d3-interpolate", ["d3"], d3 => d3);
+define("d3-scale", ["d3"], d3 => d3);
+define("d3-selection", ["d3"], d3 => d3);
+define("d3-shape", ["d3"], d3 => d3);
+define("d3-time-format", ["d3"], d3 => d3);
+define("d3-transition", ["d3"], d3 => d3);
+define("d3-zoom", ["d3"], d3 => d3);
\ No newline at end of file
diff --git a/asset/js/vendor/billboard.js b/asset/js/vendor/billboard.js
new file mode 100644
index 00000000..8668e49d
--- /dev/null
+++ b/asset/js/vendor/billboard.js
@@ -0,0 +1,21785 @@
+/*!
+ * Copyright (c) 2017 ~ present NAVER Corp.
+ * billboard.js project is licensed under the MIT license
+ *
+ * billboard.js, JavaScript chart library
+ * https://naver.github.io/billboard.js/
+ *
+ * @version 3.13.0
+ */
+(function webpackUniversalModuleDefinition(root, factory) {
+ if(typeof exports === 'object' && typeof module === 'object')
+ module.exports = factory(require("d3-axis"), require("d3-brush"), require("d3-drag"), require("d3-dsv"), require("d3-ease"), require("d3-hierarchy"), require("d3-interpolate"), require("d3-scale"), require("d3-selection"), require("d3-shape"), require("d3-time-format"), require("d3-transition"), require("d3-zoom"));
+ else if(typeof define === 'function' && define.icinga)
+ define(["d3-axis", "d3-brush", "d3-drag", "d3-dsv", "d3-ease", "d3-hierarchy", "d3-interpolate", "d3-scale", "d3-selection", "d3-shape", "d3-time-format", "d3-transition", "d3-zoom"], factory);
+ else {
+ var a = typeof exports === 'object' ? factory(require("d3-axis"), require("d3-brush"), require("d3-drag"), require("d3-dsv"), require("d3-ease"), require("d3-hierarchy"), require("d3-interpolate"), require("d3-scale"), require("d3-selection"), require("d3-shape"), require("d3-time-format"), require("d3-transition"), require("d3-zoom")) : 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"]);
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
+ }
+})(this, function(__WEBPACK_EXTERNAL_MODULE__11__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__6__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__12__, __WEBPACK_EXTERNAL_MODULE__14__, __WEBPACK_EXTERNAL_MODULE__13__, __WEBPACK_EXTERNAL_MODULE__7__, __WEBPACK_EXTERNAL_MODULE__2__, __WEBPACK_EXTERNAL_MODULE__9__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__8__, __WEBPACK_EXTERNAL_MODULE__10__) {
+ return /******/ (function() { // webpackBootstrap
+ /******/ "use strict";
+ /******/ var __webpack_modules__ = ([
+ /* 0 */,
+ /* 1 */,
+ /* 2 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
+
+ /***/ }),
+ /* 3 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
+
+ /***/ }),
+ /* 4 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
+
+ /***/ }),
+ /* 5 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__5__;
+
+ /***/ }),
+ /* 6 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__6__;
+
+ /***/ }),
+ /* 7 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__7__;
+
+ /***/ }),
+ /* 8 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__8__;
+
+ /***/ }),
+ /* 9 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__9__;
+
+ /***/ }),
+ /* 10 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__10__;
+
+ /***/ }),
+ /* 11 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__11__;
+
+ /***/ }),
+ /* 12 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__12__;
+
+ /***/ }),
+ /* 13 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__13__;
+
+ /***/ }),
+ /* 14 */
+ /***/ (function(module) {
+
+ module.exports = __WEBPACK_EXTERNAL_MODULE__14__;
+
+ /***/ })
+ /******/ ]);
+ /************************************************************************/
+ /******/ // The module cache
+ /******/ var __webpack_module_cache__ = {};
+ /******/
+ /******/ // The require function
+ /******/ function __webpack_require__(moduleId) {
+ /******/ // Check if module is in cache
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
+ /******/ if (cachedModule !== undefined) {
+ /******/ return cachedModule.exports;
+ /******/ }
+ /******/ // Create a new module (and put it into the cache)
+ /******/ var module = __webpack_module_cache__[moduleId] = {
+ /******/ // no module.id needed
+ /******/ // no module.loaded needed
+ /******/ exports: {}
+ /******/ };
+ /******/
+ /******/ // Execute the module function
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
+ /******/
+ /******/ // Return the exports of the module
+ /******/ return module.exports;
+ /******/ }
+ /******/
+ /************************************************************************/
+ /******/ /* webpack/runtime/define property getters */
+ /******/ !function() {
+ /******/ // define getter functions for harmony exports
+ /******/ __webpack_require__.d = function(exports, definition) {
+ /******/ for(var key in definition) {
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
+ /******/ }
+ /******/ }
+ /******/ };
+ /******/ }();
+ /******/
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
+ /******/ !function() {
+ /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
+ /******/ }();
+ /******/
+ /******/ /* webpack/runtime/make namespace object */
+ /******/ !function() {
+ /******/ // 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 });
+ /******/ };
+ /******/ }();
+ /******/
+ /************************************************************************/
+ var __webpack_exports__ = {};
+// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
+ !function() {
+// extracted by mini-css-extract-plugin
+
+ }();
+// This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
+ !function() {
+// ESM COMPAT FLAG
+ __webpack_require__.r(__webpack_exports__);
+
+// EXPORTS
+ __webpack_require__.d(__webpack_exports__, {
+ bb: function() { return /* reexport */ bb; },
+ "default": function() { return /* reexport */ bb; }
+ });
+
+// NAMESPACE OBJECT: ./src/config/resolver/interaction.ts
+ var resolver_interaction_namespaceObject = {};
+ __webpack_require__.r(resolver_interaction_namespaceObject);
+ __webpack_require__.d(resolver_interaction_namespaceObject, {
+ selection: function() { return selectionModule; },
+ subchart: function() { return subchartModule; },
+ zoom: function() { return zoomModule; }
+ });
+
+// NAMESPACE OBJECT: ./src/config/resolver/shape.ts
+ var resolver_shape_namespaceObject = {};
+ __webpack_require__.r(resolver_shape_namespaceObject);
+ __webpack_require__.d(resolver_shape_namespaceObject, {
+ area: function() { return resolver_shape_area; },
+ areaLineRange: function() { return areaLineRange; },
+ areaSpline: function() { return areaSpline; },
+ areaSplineRange: function() { return areaSplineRange; },
+ areaStep: function() { return areaStep; },
+ areaStepRange: function() { return areaStepRange; },
+ bar: function() { return resolver_shape_bar; },
+ bubble: function() { return resolver_shape_bubble; },
+ candlestick: function() { return resolver_shape_candlestick; },
+ donut: function() { return shape_donut; },
+ funnel: function() { return resolver_shape_funnel; },
+ gauge: function() { return resolver_shape_gauge; },
+ line: function() { return resolver_shape_line; },
+ pie: function() { return shape_pie; },
+ polar: function() { return resolver_shape_polar; },
+ radar: function() { return resolver_shape_radar; },
+ scatter: function() { return shape_scatter; },
+ spline: function() { return shape_spline; },
+ step: function() { return step; },
+ treemap: function() { return resolver_shape_treemap; }
+ });
+
+// EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
+ var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(2);
+// EXTERNAL MODULE: external {"commonjs":"d3-time-format","commonjs2":"d3-time-format","amd":"d3-time-format","root":"d3"}
+ var external_commonjs_d3_time_format_commonjs2_d3_time_format_amd_d3_time_format_root_d3_ = __webpack_require__(3);
+ ;// CONCATENATED MODULE: ./src/config/classes.ts
+ var __defProp = Object.defineProperty;
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
+ var __spreadValues = (a, b) => {
+ for (var prop in b || (b = {}))
+ if (__hasOwnProp.call(b, prop))
+ __defNormalProp(a, prop, b[prop]);
+ if (__getOwnPropSymbols)
+ for (var prop of __getOwnPropSymbols(b)) {
+ if (__propIsEnum.call(b, prop))
+ __defNormalProp(a, prop, b[prop]);
+ }
+ return a;
+ };
+ const $COMMON = {
+ button: "bb-button",
+ chart: "bb-chart",
+ empty: "bb-empty",
+ main: "bb-main",
+ target: "bb-target",
+ EXPANDED: "_expanded_"
+ };
+ const $ARC = {
+ arc: "bb-arc",
+ arcLabelLine: "bb-arc-label-line",
+ arcRange: "bb-arc-range",
+ arcs: "bb-arcs",
+ chartArc: "bb-chart-arc",
+ chartArcs: "bb-chart-arcs",
+ chartArcsBackground: "bb-chart-arcs-background",
+ chartArcsTitle: "bb-chart-arcs-title",
+ needle: "bb-needle"
+ };
+ const $AREA = {
+ area: "bb-area",
+ areas: "bb-areas"
+ };
+ const $AXIS = {
+ 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",
+ axisXTooltip: "bb-axis-x-tooltip",
+ axisYTooltip: "bb-axis-y-tooltip",
+ axisY2Tooltip: "bb-axis-y2-tooltip"
+ };
+ const $BAR = {
+ bar: "bb-bar",
+ bars: "bb-bars",
+ chartBar: "bb-chart-bar",
+ chartBars: "bb-chart-bars"
+ };
+ const $CANDLESTICK = {
+ candlestick: "bb-candlestick",
+ candlesticks: "bb-candlesticks",
+ chartCandlestick: "bb-chart-candlestick",
+ chartCandlesticks: "bb-chart-candlesticks",
+ valueDown: "bb-value-down",
+ valueUp: "bb-value-up"
+ };
+ const $CIRCLE = {
+ chartCircles: "bb-chart-circles",
+ circle: "bb-circle",
+ circles: "bb-circles"
+ };
+ const $COLOR = {
+ colorPattern: "bb-color-pattern",
+ colorScale: "bb-colorscale"
+ };
+ const $DRAG = {
+ dragarea: "bb-dragarea",
+ INCLUDED: "_included_"
+ };
+ const $FUNNEL = {
+ funnel: "bb-funnel",
+ chartFunnel: "bb-chart-funnel",
+ chartFunnels: "bb-chart-funnels",
+ funnelBackground: "bb-funnel-background"
+ };
+ const $GAUGE = {
+ chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
+ chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
+ chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
+ chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
+ gaugeValue: "bb-gauge-value"
+ };
+ const $LEGEND = {
+ legend: "bb-legend",
+ legendBackground: "bb-legend-background",
+ legendItem: "bb-legend-item",
+ legendItemEvent: "bb-legend-item-event",
+ legendItemHidden: "bb-legend-item-hidden",
+ legendItemPoint: "bb-legend-item-point",
+ legendItemTile: "bb-legend-item-tile"
+ };
+ const $LINE = {
+ chartLine: "bb-chart-line",
+ chartLines: "bb-chart-lines",
+ line: "bb-line",
+ lines: "bb-lines"
+ };
+ const $EVENT = {
+ eventRect: "bb-event-rect",
+ eventRects: "bb-event-rects",
+ eventRectsMultiple: "bb-event-rects-multiple",
+ eventRectsSingle: "bb-event-rects-single"
+ };
+ const $FOCUS = {
+ focused: "bb-focused",
+ defocused: "bb-defocused",
+ legendItemFocused: "bb-legend-item-focused",
+ xgridFocus: "bb-xgrid-focus",
+ ygridFocus: "bb-ygrid-focus"
+ };
+ const $GRID = {
+ grid: "bb-grid",
+ gridLines: "bb-grid-lines",
+ xgrid: "bb-xgrid",
+ 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"
+ };
+ const $LEVEL = {
+ level: "bb-level",
+ levels: "bb-levels"
+ };
+ const $RADAR = {
+ chartRadar: "bb-chart-radar",
+ chartRadars: "bb-chart-radars"
+ };
+ const $REGION = {
+ region: "bb-region",
+ regions: "bb-regions"
+ };
+ const $SELECT = {
+ selectedCircle: "bb-selected-circle",
+ selectedCircles: "bb-selected-circles",
+ SELECTED: "_selected_"
+ };
+ const $SHAPE = {
+ shape: "bb-shape",
+ shapes: "bb-shapes"
+ };
+ const $SUBCHART = {
+ brush: "bb-brush",
+ subchart: "bb-subchart"
+ };
+ const $TEXT = {
+ chartText: "bb-chart-text",
+ chartTexts: "bb-chart-texts",
+ text: "bb-text",
+ texts: "bb-texts",
+ title: "bb-title",
+ TextOverlapping: "text-overlapping"
+ };
+ const $TOOLTIP = {
+ tooltip: "bb-tooltip",
+ tooltipContainer: "bb-tooltip-container",
+ tooltipName: "bb-tooltip-name"
+ };
+ const $TREEMAP = {
+ treemap: "bb-treemap",
+ chartTreemap: "bb-chart-treemap",
+ chartTreemaps: "bb-chart-treemaps"
+ };
+ const $ZOOM = {
+ buttonZoomReset: "bb-zoom-reset",
+ zoomBrush: "bb-zoom-brush"
+ };
+ /* harmony default export */ var classes = (__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $FUNNEL), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $TREEMAP), $ZOOM));
+
+ ;// CONCATENATED MODULE: ./src/config/Options/common/boost.ts
+ /* harmony default export */ var boost = ({
+ /**
+ * Set boost options
+ * @name boost
+ * @memberof Options
+ * @type {object}
+ * @property {object} boost boost object
+ * @property {boolean} [boost.useCssRule=false] Avoid setting inline styles for each shape elements.
+ * - **NOTE:**
+ * - Will append <style> to the head tag and will add shpes' CSS rules dynamically.
+ * - For now, covers colors related properties (fill, stroke, etc.) only.
+ * @property {boolean} [boost.useWorker=false] Use Web Worker as possible for processing.
+ * - **NOTE:**
+ * - For now, only applies for data conversion at the initial time.
+ * - As of Web Worker's async nature, handling chart instance synchrously is not recommended.
+ * @example
+ * boost: {
+ * useCssRule: true,
+ * useWorker: false
+ * }
+ */
+ boost_useCssRule: false,
+ boost_useWorker: false
+ });
+
+ ;// CONCATENATED MODULE: ./src/config/Options/common/color.ts
+ /* harmony default export */ var color = ({
+ /**
+ * Set color of the data values
+ * @name color
+ * @memberof Options
+ * @type {object}
+ * @property {object} color color object
+ * @property {string|object|Function} [color.onover] Set the color value for each data point when mouse/touch onover event occurs.
+ * @property {Array|null} [color.pattern=[]] Set custom color pattern. Passing `null` will not set a color for these elements, which requires the usage of custom CSS-based theming to work.
+ * @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 for gauge and tooltip color
+ * @property {string} [color.threshold.unit] If set to `value`, the threshold will be based on the data value. Otherwise it'll be based on equation of the `threshold.max` option value.
+ * @property {Array} [color.threshold.values] Threshold values for each steps
+ * @property {number} [color.threshold.max=100] The base value to determine threshold step value condition. When the given value is 15 and max 10, then the value for threshold is `15*100/10`.
+ * @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];
+ * },
+ *
+ * // for threshold usage, pattern values should be set for each steps
+ * pattern: ["grey", "green", "yellow", "orange", "red"],
+ * threshold: {
+ * unit: "value",
+ *
+ * // when value is 20 => 'green', value is 40 => 'orange' will be set.
+ * values: [10, 20, 30, 40, 50],
+ *
+ * // the equation for max:
+ * // - unit == 'value': max => 30
+ * // - unit != 'value': max => value*100/30
+ * max: 30
+ * },
+ *
+ * // set all data to 'red'
+ * onover: "red",
+ *
+ * // set different color for data
+ * onover: {
+ * data1: "red",
+ * data2: "yellow"
+ * },
+ *
+ * // will pass data object to the callback
+ * onover: function(d) {
+ * return d.id === "data1" ? "red" : "green";
+ * }
+ * }
+ */
+ color_pattern: [],
+ color_tiles: void 0,
+ color_threshold: {},
+ color_onover: void 0
+ });
+
+ ;// CONCATENATED MODULE: ./src/config/Options/common/legend.ts
+ /* harmony default export */ var legend = ({
+ /**
+ * Legend options
+ * @name legend
+ * @memberof Options
+ * @type {object}
+ * @property {object} legend Legend 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.
+ * - **NOTE:** Should be used along with `legend.contents.template`.
+ * @property {string|Function} [legend.contents.template="{=TITLE}"] 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 {number} [legend.padding=0] Set padding value
+ * @property {boolean} [legend.item.interaction=true] Set legend item interaction.
+ * - **NOTE:**
+ * - This setting will not have effect on `.toggle()` method.
+ * - `legend.item.onXXX` listener options will work if set, regardless of this option value.
+ * @property {boolean} [legend.item.interaction.dblclick=false] Set legend item to interact on double click.
+ * - **NOTE:**
+ * - Double clicking will make focused clicked dataseries only, hiding all others.
+ * - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
+ * - To return initial state(which all dataseries are showing), double click current focused legend item again.
+ * - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
+ * - In this case, default `click` interaction will be disabled.
+ * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
+ * - **NOTE:**
+ * - When set, default `click` interaction will be disabled.
+ * - When `interaction.dblclick=true` is set, will be called on double click.
+ * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
+ * - **NOTE:** When set, default `mouseover` interaction will be disabled.
+ * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
+ * - **NOTE:** When set, default `mouseout` interaction will be disabled.
+ * @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.
+ * @property {number} [legend.item.tile.height=10] Set height for 'rectangle' legend item tile element.
+ * @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.
+ * @property {string} [legend.item.tile.type="rectangle"] Set legend item shape type.
+ * - **Available Values:**
+ * - circle
+ * - rectangle
+ * @property {boolean} [legend.format] Set formatter function for legend text.
+ * The argument:
+ * - `id`: Legend text value. When `data.names` is specified, will pass from it, otherwise will pass data id.
+ * - `dataId`: When `data.names` specified, will pass the original data id. Otherwise will be undefined.
+ * @property {boolean} [legend.tooltip=false] Show full legend text value using system tooltip(via `
${this.patterns ? `{=COLOR}` : ``}{=NAME} | +{=VALUE} | +
${this.patterns?"{=COLOR}":''}{=NAME} | +{=VALUE} | +
{const x=e[_];if(_!=="axis.x"&&x.attr("transform",null),_==="grid.x")x.attr(n.xgridAttr);else if(_==="gridLines.x")x.attr("x1",o?0:c).attr("x2",o?n.width:c),x.select("text").attr("x",o?n.width:0).attr("y",c);else if(/^(area|bar|line)$/.test(_))x.attr("d",l.type[_]);else if(_==="text")x.attr("x",h).attr("y",g).style("fill-opacity",s.opacityForText.bind(s));else if(_==="circle")if(s.isCirclePoint())x.attr("cx",u).attr("cy",d);else{const m=b=>u(b)-i.point_r,$=b=>d(b)-i.point_r;x.attr("x",m).attr("y",$)}else _==="region.list"&&x.select("rect").filter(s.isRegionOnX).attr("x",s.regionX.bind(s)).attr("width",s.regionWidth.bind(s))}),i.interaction_enabled&&s.redrawEventRect(),f.call(s.api),n.flowing=!1},getFlowTransform(e,t,s,i){const n=this,{data:a,scale:{x:o}}=n,r=a.targets[0].values;let l=n.getValueOnIndex(r,s),c=n.getValueOnIndex(r,s+i),u;const d=o.domain(),h=n.updateXDomain(e,!0,!0);t?t===1||(l==null?void 0:l.x)===(c==null?void 0:c.x)?u=o(d[0])-o(h[0]):u=n.axis.isTimeSeries()?o(d[0])-o(h[0]):o((l==null?void 0:l.x)||0)-o(c.x):r.length!==1?u=o(d[0])-o(h[0]):n.axis.isTimeSeries()?(l=n.getValueOnIndex(r,0),c=n.getValueOnIndex(r,r.length-1),u=o(l.x)-o(c.x)):u=Nt(h)/2;const g=Nt(d)/Nt(h);return`translate(${u},0) scale(${g},1)`}},lo={initClip(){const e=this,{clip:t,datetimeId:s}=e.state;t.id=`${s}-clip`,t.idXAxis=`${t.id}-xaxis`,t.idYAxis=`${t.id}-yaxis`,t.idGrid=`${t.id}-grid`,t.path=e.getClipPath(t.id),t.pathXAxis=e.getClipPath(t.idXAxis),t.pathYAxis=e.getClipPath(t.idYAxis),t.pathGrid=e.getClipPath(t.idGrid)},getClipPath(e){const t=this,{config:s}=t;return!s.clipPath&&/-clip$/.test(e)||!s.axis_x_clipPath&&/-clip-xaxis$/.test(e)||!s.axis_y_clipPath&&/-clip-yaxis$/.test(e)?null:`url(#${e})`},appendClip(e,t){t&&e.append("clipPath").attr("id",t).append("rect")},setXAxisClipPath(e){const t=this,{config:s,state:{margin:i,width:n,height:a}}=t,o=s.axis_rotated,r=Math.max(30,i.left)-(o?0:20),l=(o?i.top+a+10:i.bottom)+20,c=o?-(1+r):-(r-1),u=-15,d=o?i.left+20:n+10+r;e.attr("x",c).attr("y",u).attr("width",d).attr("height",l)},setYAxisClipPath(e){const t=this,{config:s,state:{margin:i,width:n,height:a}}=t,o=s.axis_rotated,r=Math.max(30,i.left)-(o?20:0),l=s.axis_y_inner,c=l&&!o?s.axis_y_label.text?-20:-1:o?-(1+r):-(r-1),u=-(o?20:i.top),d=(o?n+15+r:i.left+20)+(l?20:0),h=(o?i.bottom+10:i.top+a)+10;e.attr("x",c).attr("y",u).attr("width",d).attr("height",h)},updateXAxisTickClip(){const e=this,{config:t,state:{clip:s,xAxisHeight:i},$el:{defs:n}}=e,a=e.getHorizontalAxisHeight("x");if(n&&!s.idXAxisTickTexts){const o=`${s.id}-xaxisticktexts`;e.appendClip(n,o),s.pathXAxisTickTexts=e.getClipPath(s.idXAxisTickTexts),s.idXAxisTickTexts=o}!t.axis_x_tick_multiline&&e.getAxisTickRotate("x")&&a!==i&&(e.setXAxisTickClipWidth(),e.setXAxisTickTextClipPathWidth()),e.state.xAxisHeight=a},setXAxisTickClipWidth(){const e=this,{config:t,state:{current:{maxTickSize:s}}}=e,i=e.getAxisTickRotate("x");if(!t.axis_x_tick_multiline&&i){const n=Math.sin(Math.PI/180*Math.abs(i));s.x.clipPath=(e.getHorizontalAxisHeight("x")-20)/n}else s.x.clipPath=null},setXAxisTickTextClipPathWidth(){const e=this,{state:{clip:t,current:s},$el:{svg:i}}=e;i&&i.select(`#${t.idXAxisTickTexts} rect`).attr("width",s.maxTickSize.x.clipPath).attr("height",30)}};const co=e=>F(e.position)||"end",uo=e=>e.position==="start"?4:e.position==="middle"?0:-4;function js(e,t,s){return i=>{let n=e?0:t;return i.position==="start"?n=e?-s:0:i.position==="middle"&&(n=(e?-s:t)/2),n}}function Hs(e,t){t==="grid"&&e.each(function(){const s=(0,S.select)(this);["x1","x2","y1","y2"].forEach(i=>s.attr(i,Math.ceil(+s.attr(i))))})}var ho={hasGrid(){const{config:e}=this;return["x","y"].some(t=>e[`grid_${t}_show`]||e[`grid_${t}_lines`].length)},initGrid(){const e=this;e.hasGrid()&&e.initGridLines(),e.initFocusGrid()},initGridLines(){const e=this,{config:t,state:{clip:s},$el:i}=e;(t.grid_x_lines.length||t.grid_y_lines.length)&&(i.gridLines.main=i.main.insert("g",`.${z.chart}${t.grid_lines_front?" + *":""}`).attr("clip-path",s.pathGrid).attr("class",`${et.grid} ${et.gridLines}`),i.gridLines.main.append("g").attr("class",et.xgridLines),i.gridLines.main.append("g").attr("class",et.ygridLines),i.gridLines.x=(0,S.selectAll)([]))},updateXGrid(e){const t=this,{config:s,scale:i,state:n,$el:{main:a,grid:o}}=t,r=s.axis_rotated,l=t.generateGridData(s.grid_x_type,i.x),c=t.axis.isCategorized()?t.axis.x.tickOffset():0,u=d=>(i.zoom||i.x)(d)+c*(r?-1:1);n.xgridAttr=r?{x1:0,x2:n.width,y1:u,y2:u}:{x1:u,x2:u,y1:0,y2:n.height},o.x=a.select(`.${et.xgrids}`).selectAll(`.${et.xgrid}`).data(l),o.x.exit().remove(),o.x=o.x.enter().append("line").attr("class",et.xgrid).merge(o.x),e||o.x.each(function(){const d=(0,S.select)(this);Object.keys(n.xgridAttr).forEach(h=>{d.attr(h,n.xgridAttr[h]).style("opacity",()=>d.attr(r?"y1":"x1")===(r?n.height:0)?"0":null)})})},updateYGrid(){const e=this,{axis:t,config:s,scale:i,state:n,$el:{grid:a,main:o}}=e,r=s.axis_rotated,l=u=>Math.ceil(i.y(u)),c=t.y.getGeneratedTicks(s.grid_y_ticks)||e.scale.y.ticks(s.grid_y_ticks);a.y=o.select(`.${et.ygrids}`).selectAll(`.${et.ygrid}`).data(c),a.y.exit().remove(),a.y=a.y.enter().append("line").attr("class",et.ygrid).merge(a.y),a.y.attr("x1",r?l:0).attr("x2",r?l:n.width).attr("y1",r?0:l).attr("y2",r?n.height:l),Hs(a.y,"grid")},updateGrid(){const e=this,{$el:{grid:t,gridLines:s}}=e;!s.main&&e.initGridLines(),t.main.style("visibility",e.hasArcType()?"hidden":null),e.hideGridFocus(),e.updateGridLines("x"),e.updateGridLines("y")},updateGridLines(e){const t=this,{config:s,$el:{gridLines:i,main:n},$T:a}=t,o=s.axis_rotated,r=e==="x";s[`grid_${e}_show`]&&t[`update${e.toUpperCase()}Grid`]();let l=n.select(`.${et[`${e}gridLines`]}`).selectAll(`.${et[`${e}gridLine`]}`).data(s[`grid_${e}_lines`]);a(l.exit()).style("opacity","0").remove();const c=l.enter().append("g");c.append("line").style("opacity","0"),l=c.merge(l),l.each(function(u){const d=(0,S.select)(this);d.select("text").empty()&&u.text&&d.append("text").style("opacity","0")}),a(l.attr("class",u=>`${et[`${e}gridLine`]} ${u.class||""}`.trim()).select("text").attr("text-anchor",co).attr("transform",()=>r?o?null:"rotate(-90)":o?"rotate(-90)":null).attr("dx",uo).attr("dy",-5)).text(function(u){var d;return(d=u.text)!=null?d:this.remove()}),i[e]=l},redrawGrid(e){const t=this,{config:{axis_rotated:s},state:{width:i,height:n},$el:{gridLines:a},$T:o}=t,r=t.xv.bind(t),l=t.yv.bind(t);let c=a.x.select("line"),u=a.x.select("text"),d=a.y.select("line"),h=a.y.select("text");return c=o(c,e).attr("x1",s?0:r).attr("x2",s?i:r).attr("y1",s?r:0).attr("y2",s?r:n),u=o(u,e).attr("x",js(!s,i,n)).attr("y",r),d=o(d,e).attr("x1",s?l:0).attr("x2",s?l:i).attr("y1",s?0:l).attr("y2",s?n:l),h=o(h,e).attr("x",js(s,i,n)).attr("y",l),[c.style("opacity",null),u.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const e=this,{config:t,state:{clip:s},$el:i}=e,n=t.grid_front,a=`.${n&&i.gridLines.main?et.gridLines:z.chart}${n?" + *":""}`,o=i.main.insert("g",a).attr("clip-path",s.pathGrid).attr("class",et.grid);if(i.grid.main=o,t.grid_x_show&&o.append("g").attr("class",et.xgrids),t.grid_y_show&&o.append("g").attr("class",et.ygrids),t.axis_tooltip){const r=o.append("g").attr("class","bb-axis-tooltip");r.append("line").attr("class","bb-axis-tooltip-x"),r.append("line").attr("class","bb-axis-tooltip-y")}t.interaction_enabled&&t.grid_focus_show&&!t.axis_tooltip&&(o.append("g").attr("class",q.xgridFocus).append("line").attr("class",q.xgridFocus),t.grid_focus_y&&!t.tooltip_grouped&&o.append("g").attr("class",q.ygridFocus).append("line").attr("class",q.ygridFocus))},showAxisGridFocus(){var e,t;const s=this,{config:i,format:n,state:{event:a,width:o,height:r}}=s,l=i.axis_rotated,[c,u]=$t(a,(e=s.$el.eventRect)==null?void 0:e.node()),d={x:c,y:u};for(const[h,g]of Object.entries(s.$el.axisTooltip)){const f=h==="x"&&!l||h!=="x"&&l?"x":"y",p=d[f];let _=(t=s.scale[h])==null?void 0:t.invert(p);_&&(_=h==="x"&&s.axis.isTimeSeries()?n.xAxisTick(_):_==null?void 0:_.toFixed(2),g==null||g.attr(f,p).text(_))}s.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,g){const f=(0,S.select)(this);g===0?f.attr("x1",c).attr("x2",c).attr("y1",g?0:r).attr("y2",g?r:0):f.attr("x1",g?0:o).attr("x2",g?o:0).attr("y1",u).attr("y2",u)})},hideAxisGridFocus(){const e=this;e.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility","hidden"),Object.values(e.$el.axisTooltip).forEach(t=>t==null?void 0:t.style("display","none"))},showGridFocus(e){var t;const s=this,{config:i,state:{width:n,height:a}}=s,o=i.axis_rotated,r=s.$el.main.selectAll(`line.${q.xgridFocus}, line.${q.ygridFocus}`),l=(e||[r.datum()]).filter(d=>d&&F(s.getBaseValue(d)));if(!i.tooltip_show||l.length===0||!i.axis_x_forceAsSingle&&s.hasType("bubble")||s.hasArcType())return;const c=i.grid_focus_edge&&!i.tooltip_grouped,u=s.xx.bind(s);r.style("visibility",null).data(l.concat(l)).each(function(d){const h=(0,S.select)(this),g={x:u(d),y:s.getYScaleById(d.id)(d.value)};let f;if(h.classed(q.xgridFocus))f=o?[null,g.x,c?g.y:n,g.x]:[g.x,c?g.y:null,g.x,a];else{const p=s.axis.getId(d.id)==="y2";f=o?[g.y,c&&!p?g.x:null,g.y,c&&p?g.x:a]:[c&&p?g.x:null,g.y,c&&!p?g.x:n,g.y]}["x1","y1","x2","y2"].forEach((p,_)=>h.attr(p,f[_]))}),Hs(r,"grid"),(t=s.showCircleFocus)==null||t.call(s,e)},hideGridFocus(){var e;const t=this,{state:{inputType:s,resizing:i},$el:{main:n}}=t;(s==="mouse"||!i)&&(n.selectAll(`line.${q.xgridFocus}, line.${q.ygridFocus}`).style("visibility","hidden"),(e=t.hideCircleFocus)==null||e.call(t))},updateGridFocus(){var e;const t=this,{state:{inputType:s,width:i,height:n,resizing:a},$el:{grid:o}}=t,r=o.main.select(`line.${q.xgridFocus}`);if(s==="touch")r.empty()?a&&((e=t.showCircleFocus)==null||e.call(t)):t.showGridFocus();else{const l=t.config.axis_rotated;r.attr("x1",l?0:-10).attr("x2",l?i:-10).attr("y1",l?-10:0).attr("y2",l?-10:n)}return!0},generateGridData(e,t){const s=this,i=s.$el.main.select(`.${ot.axisX}`).selectAll(".tick").size();let n=[];if(e==="year"){const a=s.getXDomain(),[o,r]=a.map(l=>l.getFullYear());for(let l=o;l<=r;l++)n.push(new Date(`${l}-01-01 00:00:00`))}else n=t.ticks(10),n.length>i&&(n=n.filter(a=>String(a).indexOf(".")<0));return n},getGridFilterToRemove(e){return e?t=>{let s=!1;return(N(e)?e.concat():[e]).forEach(i=>{("value"in i&&t.value===i.value||"class"in i&&t.class===i.class)&&(s=!0)}),s}:()=>!0},removeGridLines(e,t){const s=this,{config:i,$T:n}=s,a=s.getGridFilterToRemove(e),o=u=>!a(u),r=t?et.xgridLines:et.ygridLines,l=t?et.xgridLine:et.ygridLine;n(s.$el.main.select(`.${r}`).selectAll(`.${l}`).filter(a)).style("opacity","0").remove();const c=`grid_${t?"x":"y"}_lines`;i[c]=i[c].filter(o)}},go={initRegion(){const e=this,{$el:t}=e;t.region.main=t.main.insert("g",":first-child").attr("clip-path",e.state.clip.path).attr("class",re.regions)},updateRegion(){const e=this,{config:t,$el:{region:s},$T:i}=e;s.main||e.initRegion(),s.main.style("visibility",e.hasArcType()?"hidden":null);const n=s.main.selectAll(`.${re.region}`).data(t.regions);i(n.exit()).style("opacity","0").remove();const a=n.enter().append("g");a.append("rect").style("fill-opacity","0"),s.list=a.merge(n).attr("class",e.classRegion.bind(e)),s.list.each(function(o){var r;(0,S.select)(this).select("text").empty()&&((r=o.label)!=null&&r.text)&&(0,S.select)(this).append("text").style("opacity","0")})},redrawRegion(e){const t=this,{$el:{region:s},$T:i}=t;let n=s.list.select("rect"),a=s.list.selectAll("text");return n=i(n,e).attr("x",t.regionX.bind(t)).attr("y",t.regionY.bind(t)).attr("width",t.regionWidth.bind(t)).attr("height",t.regionHeight.bind(t)),a=i(a,e).attr("transform",o=>{var r;const{x:l=0,y:c=0,rotated:u=!1}=(r=o.label)!=null?r:{};return`translate(${t.regionX.bind(t)(o)+l}, ${t.regionY.bind(t)(o)+c})${u?" rotate(-90)":""}`}).attr("text-anchor",o=>{var r;return(r=o.label)!=null&&r.rotated?"end":null}).attr("dy","1em").style("fill",o=>{var r,l;return(l=(r=o.label)==null?void 0:r.color)!=null?l:null}).text(o=>{var r;return(r=o.label)==null?void 0:r.text}),[n.style("fill-opacity",o=>F(o.opacity)?o.opacity:null).on("end",function(){(0,S.select)(this.parentNode).selectAll("rect:not([x])").remove()}),a.style("opacity",null)]},getRegionXY(e,t){const s=this,{config:i,scale:n}=s,a=i.axis_rotated,o=e==="x";let r="start",l,c=0;return t.axis==="y"||t.axis==="y2"?(o||(r="end"),(o?a:!a)&&r in t&&(l=n[t.axis],c=l(t[r]))):(o?!a:a)&&r in t&&(l=n.zoom||n.x,c=l(s.axis.isTimeSeries()?mt.call(s,t[r]):t[r])),c},regionX(e){return this.getRegionXY("x",e)},regionY(e){return this.getRegionXY("y",e)},getRegionSize(e,t){const s=this,{config:i,scale:n,state:a}=s,o=i.axis_rotated,r=e==="width",l=s[r?"regionX":"regionY"](t);let c,u="end",d=a[e];return t.axis==="y"||t.axis==="y2"?(r||(u="start"),(r?o:!o)&&u in t&&(c=n[t.axis],d=c(t[u]))):(r?!o:o)&&u in t&&(c=n.zoom||n.x,d=c(s.axis.isTimeSeries()?mt.call(s,t[u]):t[u])),d 0?d[i-1]:l,v.x1=i 0)for(i=0;i=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function tt(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e =0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=un);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o >1)+h+t+M+S.slice(A);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Jc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3))),i=Math.pow(10,-r),o=uf[8+r/3];return function(t){return e(i*t)+o}}}}function ff(n){return of=cf(n),t.format=of.format,t.formatPrefix=of.formatPrefix,of}function sf(t){return Math.max(0,-Zc(Math.abs(t)))}function lf(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Zc(n)/3)))-Zc(Math.abs(t)))}function hf(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Zc(n)-Zc(t))+1}t.format=void 0,t.formatPrefix=void 0,ff({thousands:",",grouping:[3],currency:["$",""]});var df=1e-6,pf=1e-12,gf=Math.PI,yf=gf/2,vf=gf/4,_f=2*gf,bf=180/gf,mf=gf/180,xf=Math.abs,wf=Math.atan,Mf=Math.atan2,Tf=Math.cos,Af=Math.ceil,Sf=Math.exp,Ef=Math.hypot,Nf=Math.log,kf=Math.pow,Cf=Math.sin,Pf=Math.sign||function(t){return t>0?1:t<0?-1:0},zf=Math.sqrt,$f=Math.tan;function Df(t){return t>1?0:t<-1?gf:Math.acos(t)}function Rf(t){return t>1?yf:t<-1?-yf:Math.asin(t)}function Ff(t){return(t=Cf(t/2))*t}function qf(){}function Uf(t,n){t&&Of.hasOwnProperty(t.type)&&Of[t.type](t,n)}var If={Feature:function(t,n){Uf(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=Tf(n=(n*=mf)/2+vf),a=Cf(n),u=Vf*a,c=Gf*o+u*Tf(i),f=u*r*Cf(i);as.add(Mf(f,c)),Xf=t,Gf=o,Vf=a}function ds(t){return[Mf(t[1],t[0]),Rf(t[2])]}function ps(t){var n=t[0],e=t[1],r=Tf(e);return[r*Tf(n),r*Cf(n),Cf(e)]}function gs(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function ys(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function vs(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function _s(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function bs(t){var n=zf(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ms,xs,ws,Ms,Ts,As,Ss,Es,Ns,ks,Cs,Ps,zs,$s,Ds,Rs,Fs={point:qs,lineStart:Is,lineEnd:Os,polygonStart:function(){Fs.point=Bs,Fs.lineStart=Ys,Fs.lineEnd=Ls,rs=new T,cs.polygonStart()},polygonEnd:function(){cs.polygonEnd(),Fs.point=qs,Fs.lineStart=Is,Fs.lineEnd=Os,as<0?(Wf=-(Kf=180),Zf=-(Qf=90)):rs>df?Qf=90:rs<-df&&(Zf=-90),os[0]=Wf,os[1]=Kf},sphere:function(){Wf=-(Kf=180),Zf=-(Qf=90)}};function qs(t,n){is.push(os=[Wf=t,Kf=t]),n t.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r1;)i-=2;for(let t=2;t0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)this.xmax?2:0)|(n9999?"+"+Ku(n,6):Ku(n,4))+"-"+Ku(t.getUTCMonth()+1,2)+"-"+Ku(t.getUTCDate(),2)+(o?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"."+Ku(o,3)+"Z":i?"T"+Ku(e,2)+":"+Ku(r,2)+":"+Ku(i,2)+"Z":r||e?"T"+Ku(e,2)+":"+Ku(r,2)+"Z":"")}function Ju(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Hu;if(f)return f=!1,ju;var n,r,i=a;if(t.charCodeAt(i)===Xu){for(;a++=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Uc(e))*l),0===h&&(p+=(h=Uc(e))*h),p(t=(Lc*t+jc)%Hc)/Hc}();function l(){h(),f.call("tick",n),e1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=qc(.1);function o(t){for(var i,o=0,a=n.length;o=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++ejs(r[0],r[1])&&(r[1]=i[1]),js(i[0],r[1])>js(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=js(r[1],i[0]))>a&&(a=u,Wf=i[0],Kf=r[1])}return is=os=null,Wf===1/0||Zf===1/0?[[NaN,NaN],[NaN,NaN]]:[[Wf,Zf],[Kf,Qf]]},t.geoCentroid=function(t){ms=xs=ws=Ms=Ts=As=Ss=Es=0,Ns=new T,ks=new T,Cs=new T,Lf(t,Gs);var n=+Ns,e=+ks,r=+Cs,i=Ef(n,e,r);return i