{"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 \"d3\"","webpack:///src/axis/Axis.js","webpack:///src/internals/util.js","webpack:///./node_modules/babel-helper-modules/lib/typeof.js","webpack:///src/config/classes.js","webpack:///src/axis/bb.axis.js","webpack:///./src/scss/main.scss?3261","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:///src/data/data.convert.js","webpack:///src/data/data.load.js","webpack:///src/internals/category.js","webpack:///src/interactions/interaction.js","webpack:///src/internals/size.js","webpack:///src/shape/shape.js","webpack:///src/shape/arc.js","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:///src/interactions/subchart.js","webpack:///src/interactions/zoom.js","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:///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\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse {\n\t\tvar a = typeof exports === 'object' ? factory(require(\"d3\")) : factory(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__) {\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 * as util from \"./internals/util\";\nimport \"./scss/main.scss\";\n\n/**\n * @namespace bb\n * @version 1.5.1\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.5.1\",\n\t/**\n\t * generate charts\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\n\t\tthis.instance.push(inst);\n\n\t\treturn inst;\n\t},\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\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\nfor (const p in util) {\n\t!/^__/.test(p) && (ChartInternal.prototype[p] = util[p]);\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\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, isUndefined, isString, isNumber, isObject} 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\n\t\tisFunction(config.onbeforeinit) && config.onbeforeinit.call($$);\n\t}\n\n\tafterInit() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\n\t\t// can do something\n\n\t\tisFunction(config.onafterinit) && config.onafterinit.call($$);\n\t}\n\n\tinit() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\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\t$$.initWithData($$.convertJsonToData(config.data_json, config.data_keys));\n\t\t} else if (config.data_rows) {\n\t\t\t$$.initWithData($$.convertRowsToData(config.data_rows));\n\t\t} else if (config.data_columns) {\n\t\t\t$$.initWithData($$.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\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 = function(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\n\t\t$$.yOrient = isRotated ?\n\t\t\t(config.axis_y_inner ? \"top\" : \"bottom\") : (config.axis_y_inner ? \"right\" : \"left\");\n\n\t\t$$.y2Orient = isRotated ?\n\t\t\t(config.axis_y2_inner ? \"bottom\" : \"top\") : (config.axis_y2_inner ? \"left\" : \"right\");\n\n\t\t$$.subXOrient = isRotated ? \"left\" : \"bottom\";\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\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,\n\t\t\ty: 0,\n\t\t\ty2: 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$$.intervalForObserveInserted = undefined;\n\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\t\tlet binding = true;\n\n\t\t$$.axis = new Axis($$);\n\n\t\t$$.initBrush && $$.initBrush();\n\t\t$$.initZoom && $$.initZoom();\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\tif ($$.selectChart.empty()) {\n\t\t\t$$.selectChart = d3Select(document.createElement(\"div\")).style(\"opacity\", \"0\");\n\t\t\t$$.observeInserted($$.selectChart);\n\t\t\tbinding = false;\n\t\t}\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\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\", () => config.onover.call($$))\n\t\t\t\t.on(isTouch ? \"touchend\" : \"mouseleave\", () => config.onout.call($$));\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// Set initialized scales to brush and zoom\n\t\t// if ($$.brush) { $$.brush.scale($$.subX); }\n\t\t// if (config.zoom_enabled) { $$.zoom.scale($$.x); }\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\tif (binding) {\n\t\t\t$$.updateDimension();\n\n\t\t\t// oninit callback\n\t\t\tconfig.oninit.call($$);\n\n\t\t\t$$.redraw({\n\t\t\t\twithTransition: false,\n\t\t\t\twithTransform: true,\n\t\t\t\twithUpdateXDomain: true,\n\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\twithTransitionForAxis: false,\n\t\t\t\tinitializing: true\n\t\t\t});\n\n\t\t\t// data.onmin/max callback\n\t\t\tif (config.data_onmin || config.data_onmax) {\n\t\t\t\tconst minMax = $$.getMinMaxData();\n\n\t\t\t\tisFunction(config.data_onmin) && config.data_onmin.call($$, minMax.min);\n\t\t\t\tisFunction(config.data_onmax) && config.data_onmax.call($$, minMax.max);\n\t\t\t}\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\tsmoothLines(el, type) {\n\t\tif (type === \"grid\") {\n\t\t\tel.each(function() {\n\t\t\t\tconst g = d3Select(this);\n\n\t\t\t\tg.attr({\n\t\t\t\t\t\"x1\": Math.ceil(g.attr(\"x1\")),\n\t\t\t\t\t\"x2\": Math.ceil(g.attr(\"x2\")),\n\t\t\t\t\t\"y1\": Math.ceil(g.attr(\"y1\")),\n\t\t\t\t\t\"y2\": Math.ceil(g.attr(\"y2\"))\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t}\n\n\tupdateSizes() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\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 hasArc = $$.hasArcType();\n\t\tconst xAxisHeight = config.axis_rotated || 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 = config.axis_rotated ? {\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 = config.axis_rotated ? {\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\tif ($$.updateSizeForLegend) {\n\t\t\t$$.updateSizeForLegend(legendHeight, legendWidth);\n\t\t}\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 = config.axis_rotated ?\n\t\t\t$$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width;\n\n\t\t$$.height2 = config.axis_rotated ?\n\t\t\t$$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom;\n\n\t\tif ($$.width2 < 0) { $$.width2 = 0; }\n\t\tif ($$.height2 < 0) { $$.height2 = 0; }\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\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 withY = getOption(options, \"withY\", true);\n\t\tconst withSubchart = getOption(options, \"withSubchart\", true);\n\t\tconst withTransition = getOption(options, \"withTransition\", true);\n\t\tconst withTransform = getOption(options, \"withTransform\", false);\n\t\tconst withUpdateXDomain = getOption(options, \"withUpdateXDomain\", false);\n\t\tconst withUpdateOrgXDomain = getOption(options, \"withUpdateOrgXDomain\", false);\n\t\tconst withTrimXDomain = getOption(options, \"withTrimXDomain\", true);\n\t\tconst withUpdateXAxis = getOption(options, \"withUpdateXAxis\", withUpdateXDomain);\n\t\tconst withLegend = getOption(options, \"withLegend\", false);\n\t\tconst withEventRect = getOption(options, \"withEventRect\", true);\n\t\tconst withDimension = getOption(options, \"withDimension\", true);\n\t\tconst withTransitionForExit = getOption(options, \"withTransitionForExit\", withTransition);\n\t\tconst withTransitionForAxis = getOption(options, \"withTransitionForAxis\", withTransition);\n\n\t\tconst duration = withTransition ? config.transition_duration : 0;\n\t\tconst durationForExit = withTransitionForExit ? duration : 0;\n\t\tconst durationForAxis = withTransitionForAxis ? 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 (withLegend && config.legend_show && !config.legend_contents_bindto) {\n\t\t\t$$.updateLegend($$.mapToIds($$.data.targets), options, transitions);\n\t\t} else if (withDimension) {\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, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);\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.domain($$.getYDomain(targetsToShow, \"y\", xDomainForZoom));\n\t\t$$.y2.domain($$.getYDomain(targetsToShow, \"y2\", xDomainForZoom));\n\n\t\tif (!config.axis_y_tick_values && config.axis_y_tick_count) {\n\t\t\t$$.yAxis.tickValues(\n\t\t\t\t$$.axis.generateTickValues(\n\t\t\t\t\t$$.y.domain(),\n\t\t\t\t\tconfig.axis_y_tick_count,\n\t\t\t\t\t$$.isTimeSeriesY()\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif (!config.axis_y2_tick_values && config.axis_y2_tick_count) {\n\t\t\t$$.y2Axis.tickValues(\n\t\t\t\t$$.axis.generateTickValues(\n\t\t\t\t\t$$.y2.domain(),\n\t\t\t\t\tconfig.axis_y2_tick_count\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(withTransition);\n\n\t\t// show/hide if manual culling needed\n\t\tif ((withUpdateXDomain || withUpdateXAxis) && 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 (withY) {\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, withTransform);\n\n\t\t// radar\n\t\thasRadar && $$.redrawRadar();\n\n\t\t// subchart\n\t\tconfig.subchart_show &&\n\t\t\t$$.redrawSubchart &&\n\t\t\t\t$$.redrawSubchart(\n\t\t\t\t\twithSubchart,\n\t\t\t\t\ttransitions,\n\t\t\t\t\tduration,\n\t\t\t\t\tdurationForExit,\n\t\t\t\t\tareaIndices,\n\t\t\t\t\tbarIndices,\n\t\t\t\t\tlineIndices\n\t\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 && withEventRect) {\n\t\t\t$$.redrawEventRect();\n\t\t\tconfig.zoom_enabled && $$.bindZoomOnEventRect();\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\tconfig.onrendered && config.onrendered.call($$);\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\tx = ($$.width / 2) - ($$.arcHeight / 2);\n\t\t\ty = asHalfPixel($$.margin.top);\n\t\t}\n\n\t\treturn `translate(${x}, ${y})`;\n\t}\n\n\tinitialOpacity(d) {\n\t\treturn d.value !== null &&\n\t\t\tthis.withoutFadeIn[d.id] ? \"1\" : \"0\";\n\t}\n\n\tinitialOpacityForCircle(d) {\n\t\treturn d.value !== 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(d.value) ? (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 = d.value;\n\n\t\tif ($$.isTimeSeries()) {\n\t\t\tvalue = $$.parseDate(d.value);\n\t\t} else if ($$.isCategorized() && isString(d.value)) {\n\t\t\tvalue = $$.config.axis_x_categories.indexOf(d.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(d.value));\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\tobserveInserted(selection) {\n\t\tconst $$ = this;\n\n\t\tif (isUndefined(MutationObserver)) {\n\t\t\tconsole && console.error &&\n\t\t\t\tconsole.error(\"MutationObserver not defined.\");\n\n\t\t\treturn;\n\t\t}\n\n\t\tconst observer = new MutationObserver(mutations => {\n\t\t\tmutations.forEach(mutation => {\n\t\t\t\tif (mutation.type === \"childList\" && mutation.previousSibling) {\n\t\t\t\t\tobserver.disconnect();\n\n\t\t\t\t\t// need to wait for completion of load because size calculation requires the actual sizes determined after that completion\n\t\t\t\t\t$$.intervalForObserveInserted = window.setInterval(() => {\n\t\t\t\t\t\t// parentNode will NOT be null when completed\n\t\t\t\t\t\tif (selection.node().parentNode) {\n\t\t\t\t\t\t\twindow.clearInterval($$.intervalForObserveInserted);\n\t\t\t\t\t\t\t$$.updateDimension();\n\n\t\t\t\t\t\t\t$$.brush && $$.brush.update();\n\t\t\t\t\t\t\t$$.config.oninit.call($$);\n\n\t\t\t\t\t\t\t$$.redraw({\n\t\t\t\t\t\t\t\twithTransform: true,\n\t\t\t\t\t\t\t\twithUpdateXDomain: true,\n\t\t\t\t\t\t\t\twithUpdateOrgXDomain: true,\n\t\t\t\t\t\t\t\twithTransition: false,\n\t\t\t\t\t\t\t\twithTransitionForTransform: false,\n\t\t\t\t\t\t\t\twithLegend: true\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tselection.transition().style(\"opacity\", \"1\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 10);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tobserver.observe(selection.node(), {\n\t\t\tattributes: true,\n\t\t\tchildList: true,\n\t\t\tcharacterData: true\n\t\t});\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__;","/**\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 {isFunction, isString, isValue, isEmpty, isNumber, isObjectType} from \"../internals/util\";\nimport bbAxis from \"./bb.axis\";\nimport CLASS from \"../config/classes\";\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$$.axes.x = main.append(\"g\")\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisX}`)\n\t\t\t.attr(\"clip-path\", $$.clipPathForXAxis)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"x\"))\n\t\t\t.style(\"visibility\", config.axis_x_show ? \"visible\" : \"hidden\");\n\n\t\t$$.axes.x.append(\"text\")\n\t\t\t.attr(\"class\", CLASS.axisXLabel)\n\t\t\t.attr(\"transform\", isRotated ? \"rotate(-90)\" : \"\")\n\t\t\t.style(\"text-anchor\", this.textAnchorForXAxisLabel.bind(this));\n\n\t\t$$.axes.y = main.append(\"g\")\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisY}`)\n\t\t\t.attr(\"clip-path\", config.axis_y_inner ? \"\" : $$.clipPathForYAxis)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"y\"))\n\t\t\t.style(\"visibility\", config.axis_y_show ? \"visible\" : \"hidden\");\n\n\t\t$$.axes.y.append(\"text\")\n\t\t\t.attr(\"class\", CLASS.axisYLabel)\n\t\t\t.attr(\"transform\", isRotated ? \"\" : \"rotate(-90)\")\n\t\t\t.style(\"text-anchor\", this.textAnchorForYAxisLabel.bind(this));\n\n\t\t$$.axes.y2 = main.append(\"g\")\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisY2}`)\n\t\t\t.attr(\"transform\", $$.getTranslate(\"y2\"))\n\t\t\t.style(\"visibility\", config.axis_y2_show ? \"visible\" : \"hidden\");\n\n\t\t$$.axes.y2.append(\"text\")\n\t\t\t.attr(\"class\", CLASS.axisY2Label)\n\t\t\t.attr(\"transform\", isRotated ? \"\" : \"rotate(-90)\")\n\t\t\t.style(\"text-anchor\", this.textAnchorForY2AxisLabel.bind(this));\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(tickValues, axis) {\n\t\treturn tickValues || (axis ? axis.tickValues() : undefined);\n\t}\n\n\tgetXAxisTickValues() {\n\t\treturn this.getTickValues(this.owner.config.axis_x_tick_values, this.owner.xAxis);\n\t}\n\n\tgetYAxisTickValues() {\n\t\treturn this.getTickValues(this.owner.config.axis_y_tick_values, this.owner.yAxis);\n\t}\n\n\tgetY2AxisTickValues() {\n\t\treturn this.getTickValues(this.owner.config.axis_y2_tick_values, this.owner.y2Axis);\n\t}\n\n\tgetLabelOptionByAxisId(axisId) {\n\t\tconst $$ = this.owner;\n\n\t\treturn $$.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 option = this.getLabelOptionByAxisId(axisId);\n\t\tconst position = (isObjectType(option) && option.position) ?\n\t\t\toption.position : defaultPosition;\n\n\t\treturn {\n\t\t\tisInner: !!~position.indexOf(\"inner\"),\n\t\t\tisOuter: !!~position.indexOf(\"outer\"),\n\t\t\tisLeft: !!~position.indexOf(\"left\"),\n\t\t\tisCenter: !!~position.indexOf(\"center\"),\n\t\t\tisRight: !!~position.indexOf(\"right\"),\n\t\t\tisTop: !!~position.indexOf(\"top\"),\n\t\t\tisMiddle: !!~position.indexOf(\"middle\"),\n\t\t\tisBottom: !!~position.indexOf(\"bottom\"),\n\t\t};\n\t}\n\n\tgetXAxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"x\", this.owner.config.axis_rotated ? \"inner-top\" : \"inner-right\");\n\t}\n\n\tgetYAxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"y\", this.owner.config.axis_rotated ? \"inner-right\" : \"inner-top\");\n\t}\n\n\tgetY2AxisLabelPosition() {\n\t\treturn this.getLabelPosition(\"y2\", this.owner.config.axis_rotated ? \"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(forHorizontal, position) {\n\t\tconst $$ = this.owner;\n\t\tlet x = position.isMiddle ? -$$.height / 2 : 0;\n\n\t\tif (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(forHorizontal, position) {\n\t\tlet dx = position.isBottom ? \"0.5em\" : \"0\";\n\n\t\tif (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(forHorizontal, position) {\n\t\tlet anchor = position.isMiddle ? \"middle\" : \"end\";\n\n\t\tif (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.owner.config.axis_rotated, this.getXAxisLabelPosition());\n\t}\n\n\txForYAxisLabel() {\n\t\treturn this.xForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\n\t}\n\n\txForY2AxisLabel() {\n\t\treturn this.xForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());\n\t}\n\n\tdxForXAxisLabel() {\n\t\treturn this.dxForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());\n\t}\n\n\tdxForYAxisLabel() {\n\t\treturn this.dxForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\n\t}\n\n\tdxForY2AxisLabel() {\n\t\treturn this.dxForAxisLabel(this.owner.config.axis_rotated, 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\tconst isRotated = this.owner.config.axis_rotated;\n\n\t\treturn this.textAnchorForAxisLabel(!isRotated, this.getXAxisLabelPosition());\n\t}\n\n\ttextAnchorForYAxisLabel() {\n\t\tconst isRotated = this.owner.config.axis_rotated;\n\n\t\treturn this.textAnchorForAxisLabel(isRotated, this.getYAxisLabelPosition());\n\t}\n\n\ttextAnchorForY2AxisLabel() {\n\t\tconst isRotated = this.owner.config.axis_rotated;\n\n\t\treturn this.textAnchorForAxisLabel(isRotated, this.getY2AxisLabelPosition());\n\t}\n\n\tgetMaxTickWidth(id, withoutRecompute) {\n\t\tconst $$ = this.owner;\n\t\tconst config = $$.config;\n\t\tlet maxWidth = 0;\n\t\tlet dummy;\n\t\tlet svg;\n\n\t\tif (withoutRecompute && $$.currentMaxTickWidths[id]) {\n\t\t\treturn $$.currentMaxTickWidths[id];\n\t\t}\n\n\t\tif ($$.svg) {\n\t\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\n\t\t\tlet scale;\n\t\t\tlet axis;\n\n\t\t\tif (/^y2?$/.test(id)) {\n\t\t\t\tscale = $$[id].copy().domain($$.getYDomain(targetsToShow, id));\n\t\t\t\taxis = this.getYAxis(\n\t\t\t\t\tid,\n\t\t\t\t\tscale,\n\t\t\t\t\t$$[`${id}Orient`],\n\t\t\t\t\tconfig[`axis_${id}_tick_format`],\n\t\t\t\t\t$$[`${id}AxisTickValues`],\n\t\t\t\t\tfalse,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tscale = $$.x.copy().domain($$.getXDomain(targetsToShow));\n\t\t\t\taxis = this.getXAxis(\n\t\t\t\t\t\"x\",\n\t\t\t\t\tscale,\n\t\t\t\t\t$$.xOrient,\n\t\t\t\t\t$$.xAxisTickFormat,\n\t\t\t\t\t$$.xAxisTickValues,\n\t\t\t\t\tfalse,\n\t\t\t\t\ttrue,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tthis.updateXAxisTickValues(targetsToShow, axis);\n\t\t\t}\n\n\t\t\tdummy = d3Select(\"body\")\n\t\t\t\t.append(\"div\")\n\t\t\t\t.classed(\"bb\", true);\n\n\t\t\tsvg = dummy.append(\"svg\")\n\t\t\t\t.style(\"visibility\", \"hidden\")\n\t\t\t\t.style(\"position\", \"fixed\")\n\t\t\t\t.style(\"top\", \"0px\")\n\t\t\t\t.style(\"left\", \"0px\");\n\n\t\t\tsvg.append(\"g\").call(axis)\n\t\t\t\t.each(function() {\n\t\t\t\t\td3Select(this).selectAll(\"text\")\n\t\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t\tconst boxWidth = this.getBoundingClientRect().width;\n\n\t\t\t\t\t\t\tmaxWidth < boxWidth && (maxWidth = boxWidth);\n\t\t\t\t\t\t});\n\n\t\t\t\t\tdummy.remove();\n\t\t\t\t});\n\t\t}\n\n\t\t$$.currentMaxTickWidths[id] = maxWidth <= 0 ?\n\t\t\t$$.currentMaxTickWidths[id] : maxWidth;\n\n\t\treturn $$.currentMaxTickWidths[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(axis => {\n\t\t\tconst node = labels[axis];\n\n\t\t\t(withTransition ? node.transition() : node)\n\t\t\t\t.attr(\"x\", this[`xFor${axis}AxisLabel`].bind(this))\n\t\t\t\t.attr(\"dx\", this[`dxFor${axis}AxisLabel`].bind(this))\n\t\t\t\t.attr(\"dy\", this[`dyFor${axis}AxisLabel`].bind(this))\n\t\t\t\t.text(this[`textFor${axis}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\treturn {\n\t\t\taxisX: duration ? axes.x.transition().duration(duration) : axes.x,\n\t\t\taxisY: duration ? axes.y.transition().duration(duration) : axes.y,\n\t\t\taxisY2: duration ? axes.y2.transition().duration(duration) : axes.y2,\n\t\t\taxisSubX: duration ? axes.subx.transition().duration(duration) : axes.subx,\n\t\t};\n\t}\n\n\tredraw(transitions, isHidden) {\n\t\tconst $$ = this.owner;\n\t\tconst opacity = isHidden ? \"0\" : \"1\";\n\n\t\t$$.axes.x.style(\"opacity\", opacity);\n\t\t$$.axes.y.style(\"opacity\", opacity);\n\t\t$$.axes.y2.style(\"opacity\", opacity);\n\t\t$$.axes.subx.style(\"opacity\", opacity);\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 */\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);\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 * Replace tag sign to html entity\n * @param {String} str\n * @return {String}\n * @private\n */\nconst sanitise = str => (isString(str) ? str.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 list = [];\n\n\t// seg0\n\tlist.push({\n\t\tx: bbox.x,\n\t\ty: bbox.y + bbox.height\n\t});\n\n\t// seg1\n\tlist.push({\n\t\tx: bbox.x,\n\t\ty: bbox.y\n\t});\n\n\t// seg2\n\tlist.push({\n\t\tx: bbox.x + bbox.width,\n\t\ty: bbox.y\n\t});\n\n\t// seg3\n\tlist.push({\n\t\tx: bbox.x + bbox.width,\n\t\ty: bbox.y + bbox.height\n\t});\n\n\treturn list;\n};\n\nconst getPathBox = path => {\n\tconst box = path.getBoundingClientRect();\n\tconst items = getRectSegList(path);\n\tconst minX = items[0].x;\n\tconst minY = Math.min(items[0].y, items[1].y);\n\n\treturn {\n\t\tx: minX,\n\t\ty: minY,\n\t\twidth: box.width,\n\t\theight: box.height,\n\t};\n};\n\n// return brush selection array\nconst getBrushSelection = function() {\n\tlet selection = null;\n\tconst event = d3Event;\n\n\t// check from event\n\tif (event && event.constructor.name === \"BrushEvent\") {\n\t\tselection = event.selection;\n\t\t// check from brush area selection\n\t} else if (this.context && (selection = this.context.select(`.${CLASS.brush}`).node())) {\n\t\tselection = d3BrushSelection(selection);\n\t}\n\n\treturn selection;\n};\n\nconst brushEmpty = function() {\n\tconst selection = this.getBrushSelection();\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\nfunction 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\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};","/**\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\ttarget: \"bb-target\",\n\tchart: \"bb-chart\",\n\tchartLine: \"bb-chart-line\",\n\tchartLines: \"bb-chart-lines\",\n\tchartBar: \"bb-chart-bar\",\n\tchartBars: \"bb-chart-bars\",\n\tchartText: \"bb-chart-text\",\n\tchartTexts: \"bb-chart-texts\",\n\tchartArc: \"bb-chart-arc\",\n\tchartArcs: \"bb-chart-arcs\",\n\tchartArcsTitle: \"bb-chart-arcs-title\",\n\tchartArcsBackground: \"bb-chart-arcs-background\",\n\tchartArcsGaugeUnit: \"bb-chart-arcs-gauge-unit\",\n\tchartArcsGaugeMax: \"bb-chart-arcs-gauge-max\",\n\tchartArcsGaugeMin: \"bb-chart-arcs-gauge-min\",\n\tchartRadar: \"bb-chart-radar\",\n\tchartRadars: \"bb-chart-radars\",\n\tselectedCircle: \"bb-selected-circle\",\n\tselectedCircles: \"bb-selected-circles\",\n\teventRect: \"bb-event-rect\",\n\teventRects: \"bb-event-rects\",\n\teventRectsSingle: \"bb-event-rects-single\",\n\teventRectsMultiple: \"bb-event-rects-multiple\",\n\tzoomRect: \"bb-zoom-rect\",\n\tbrush: \"bb-brush\",\n\tfocused: \"bb-focused\",\n\tdefocused: \"bb-defocused\",\n\tregion: \"bb-region\",\n\tregions: \"bb-regions\",\n\ttitle: \"bb-title\",\n\ttooltipContainer: \"bb-tooltip-container\",\n\ttooltip: \"bb-tooltip\",\n\ttooltipName: \"bb-tooltip-name\",\n\tshape: \"bb-shape\",\n\tshapes: \"bb-shapes\",\n\tline: \"bb-line\",\n\tlines: \"bb-lines\",\n\tbar: \"bb-bar\",\n\tbars: \"bb-bars\",\n\tcircle: \"bb-circle\",\n\tcircles: \"bb-circles\",\n\tarc: \"bb-arc\",\n\tarcs: \"bb-arcs\",\n\tarea: \"bb-area\",\n\tareas: \"bb-areas\",\n\tempty: \"bb-empty\",\n\ttext: \"bb-text\",\n\ttexts: \"bb-texts\",\n\tgaugeValue: \"bb-gauge-value\",\n\tgrid: \"bb-grid\",\n\tgridLines: \"bb-grid-lines\",\n\txgrid: \"bb-xgrid\",\n\txgrids: \"bb-xgrids\",\n\txgridLine: \"bb-xgrid-line\",\n\txgridLines: \"bb-xgrid-lines\",\n\txgridFocus: \"bb-xgrid-focus\",\n\tygrid: \"bb-ygrid\",\n\tygrids: \"bb-ygrids\",\n\tygridLine: \"bb-ygrid-line\",\n\tygridLines: \"bb-ygrid-lines\",\n\taxis: \"bb-axis\",\n\taxisX: \"bb-axis-x\",\n\taxisXLabel: \"bb-axis-x-label\",\n\taxisY: \"bb-axis-y\",\n\taxisYLabel: \"bb-axis-y-label\",\n\taxisY2: \"bb-axis-y2\",\n\taxisY2Label: \"bb-axis-y2-label\",\n\tlegendBackground: \"bb-legend-background\",\n\tlegendItem: \"bb-legend-item\",\n\tlegendItemEvent: \"bb-legend-item-event\",\n\tlegendItemTile: \"bb-legend-item-tile\",\n\tlegendItemPoint: \"bb-legend-item-point\",\n\tlegendItemHidden: \"bb-legend-item-hidden\",\n\tlegendItemFocused: \"bb-legend-item-focused\",\n\tlevel: \"bb-level\",\n\tlevels: \"bb-levels\",\n\tdragarea: \"bb-dragarea\",\n\tEXPANDED: \"_expanded_\",\n\tSELECTED: \"_selected_\",\n\tINCLUDED: \"_included_\"\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\tconst box = el.node().getBBox();\n\t\t\tconst h = box.height;\n\t\t\tconst w = box.width;\n\n\t\t\tif (h && w) {\n\t\t\t\tsize.h = h;\n\t\t\t\tsize.w = w;\n\t\t\t}\n\n\t\t\tel.text(\"\");\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 = function() {\n\t\t\t\treturn x(scale.domain());\n\t\t\t};\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","// 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).
\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. \n\t\t\t * - **NOTE:**\n\t\t\t * > When chart is not bound, it'll start observing if `chart.element` is bound by MutationObserver. \n\t\t\t * > In this case, polyfill is required in IE9 and IE10 because they do not support MutationObserver. \n\t\t\t * > On the other hand, if chart always will be bound, polyfill will not be required because MutationObserver will never be called.\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. \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)
\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 {Boolean} [zoom.rescale=false] Enable to rescale after zooming. \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. \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. \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. \n\t\t\t * Specified function receives the zoomed domain.\n\t\t\t * @example\n\t\t\t * zoom: {\n\t\t\t * enabled: true,\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 */\n\t\t\tzoom_enabled: false,\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_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. \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.
\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.
\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.
\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.
\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.
\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.
\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. \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. \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: \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.
\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)
\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.
\n\t\t\t * The values must be an array for each data and it should include an object that has start, end, style. If start is not set, the start will be the first data point. If end is not set, the end will be the last data point. \n\t\t\t * 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\": \"dashed\"\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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 - \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 - \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 * @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 * @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. \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`. \n\t\t\t * ex. When color pattern value is `['red', '#fff']` and defined 2 patterns,then ids for pattern elements are: \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. \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. \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. \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\", //
\n\t\t\t *\n\t\t\t * // will be as:
data1
\n\t\t\t * template: \"
{=TITLE}
\"\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 \"
\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. \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.
\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.
\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.
\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.
\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.
\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. \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.
\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 \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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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.
\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. \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. \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. \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. \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 \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 \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 \n\t\t\t * (ex. ``)\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 * \"\"\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. \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. \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 * @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 */\n\t\t\tline_connectNull: false,\n\t\t\tline_step_type: \"step\",\n\t\t\tline_classes: undefined,\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 {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 * @property {Boolean} [bar.padding=0] The padding pixel value between each bar.\n\t\t\t * @example\n\t\t\t * bar: {\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 * zerobased: false,\n\t\t\t * padding: 1\n\t\t\t * }\n\t\t\t */\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\t\t\tbar_padding: 0,\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.\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 * 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 {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 * 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\n\t\t\t/**\n\t\t\t * Show rectangles inside the chart.
\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. \n\t\t\t * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.\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. 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. \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. \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. \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. \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. \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.
\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 \n\t\t\t * **NOTE:** When `data.groups` is set, the order will follow as the stacked graph order. \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\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, 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(v => $$.subX.invert(v));\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\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\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;\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} else {\n\t\t\tx = 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 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\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, t => t.value)]);\n\t\t\t\tmax = d3Max([max, d3Max(v, t => t.value)]);\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 = $$.getCaches(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 = $$.getCaches(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 => t.value === 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 $$ = this;\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(d.value));\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\t\t\tsames.push(values[i]);\n\t\t}\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\t\t\tsames.push(values[i]);\n\t\t}\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 config = $$.config;\n\t\tconst xIndex = config.axis_rotated ? 1 : 0;\n\t\tconst yIndex = config.axis_rotated ? 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\tconvertValuesToStep(values) {\n\t\tconst converted = isArray(values) ? values.concat() : [values];\n\n\t\tif (!this.isCategorized()) {\n\t\t\treturn values;\n\t\t}\n\n\t\tfor (let i = values.length + 1; i > 0; i--) {\n\t\t\tconverted[i] = converted[i - 1];\n\t\t}\n\n\t\tconverted[0] = {\n\t\t\tx: converted[0].x - 1,\n\t\t\tvalue: converted[0].value,\n\t\t\tid: converted[0].id\n\t\t};\n\n\t\tconverted[values.length + 1] = {\n\t\t\tx: converted[values.length].x + 1,\n\t\t\tvalue: converted[values.length].value,\n\t\t\tid: converted[values.length].id\n\t\t};\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\tif (isArray(d.value)) {\n\t\t\tconst index = [\"high\", \"mid\", \"low\"].indexOf(type);\n\n\t\t\treturn index === -1 ? 0 : d.value[index];\n\t\t}\n\n\t\treturn d.value[type];\n\t}\n});\n\n","/**\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, 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\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\tthis.data.xs[id] =\n\t\t\t\t\t\t(appendXs && $$.data.xs[id] ? $$.data.xs[id] : [])\n\t\t\t\t\t\t\t.concat(\n\t\t\t\t\t\t\t\tdata.map(d => d[xKey])\n\t\t\t\t\t\t\t\t\t.filter(isValue)\n\t\t\t\t\t\t\t\t\t.map((rawX, i) => $$.generateTargetX(rawX, id, i))\n\t\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\tthis.data.xs[id] = 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\t$$.data.xs[id] = $$.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\t$$.data.xs[id] = data.map((d, i) => i);\n\t\t\t}\n\t\t});\n\n\t\t// check x is defined\n\t\tids.forEach(id => {\n\t\t\tif (!$$.data.xs[id]) {\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\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 xKey = $$.getXKey(id);\n\t\t\t\t\tconst rawX = d[xKey];\n\t\t\t\t\tconst value = d[id] !== null && !isNaN(d[id]) ?\n\t\t\t\t\t\t+d[id] : (isArray(d[id]) || ($$.isObject(d[id]) && d[id].high) ? d[id] : null);\n\n\t\t\t\t\tlet x;\n\n\t\t\t\t\t// use x as categories if custom x and categorized\n\t\t\t\t\tif ($$.isCustomX() && $$.isCategorized() && index === 0 && !isUndefined(rawX)) {\n\t\t\t\t\t\tif (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\tlet i;\n\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\ti = 0;\n\n\t\t\tt.values.forEach(v => {\n\t\t\t\tv.index = i++;\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","/**\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.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\n\t\t// reset internally cached data\n\t\t$$.resetCache();\n\n\t\tif (args.data) {\n\t\t\t$$.load($$.convertDataToTargets(args.data), args);\n\t\t} else if (args.url) {\n\t\t\t$$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, data => {\n\t\t\t\t$$.load($$.convertDataToTargets(data), args);\n\t\t\t});\n\t\t} else if (args.json) {\n\t\t\t$$.load($$.convertDataToTargets($$.convertJsonToData(args.json, args.keys)), args);\n\t\t} else if (args.rows) {\n\t\t\t$$.load($$.convertDataToTargets($$.convertRowsToData(args.rows)), args);\n\t\t} else if (args.columns) {\n\t\t\t$$.load($$.convertDataToTargets($$.convertColumnsToData(args.columns)), args);\n\t\t} else {\n\t\t\t$$.load(null, args);\n\t\t}\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 isMultipleX = $$.isMultipleX();\n\n\t\tlet eventRectUpdate;\n\t\tconst eventRects = $$.main.select(`.${CLASS.eventRects}`)\n\t\t\t.style(\"cursor\", config.zoom_enabled ? (\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 (($$.isCustomX() || $$.isTimeSeries()) && !$$.isCategorized()) {\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\trectW = d => {\n\t\t\t\t\tlet prevX = $$.getPrevX(d.index);\n\t\t\t\t\tlet nextX = $$.getNextX(d.index);\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 (prevX === null && nextX === null) {\n\t\t\t\t\t\treturn isRotated ? $$.height : $$.width;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (prevX === null) {\n\t\t\t\t\t\tprevX = xScale.domain()[0];\n\t\t\t\t\t}\n\n\t\t\t\t\tif (nextX === null) {\n\t\t\t\t\t\tnextX = xScale.domain()[1];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.max(0, (xScale(nextX) - xScale(prevX)) / 2);\n\t\t\t\t};\n\n\t\t\t\trectX = d => {\n\t\t\t\t\tconst nextX = $$.getNextX(d.index);\n\t\t\t\t\tconst thisX = $$.data.xs[d.id][d.index];\n\t\t\t\t\tlet prevX = $$.getPrevX(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 (prevX === null && nextX === null) {\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (prevX === null) {\n\t\t\t\t\t\tprevX = xScale.domain()[0];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn (xScale(thisX) + xScale(prevX)) / 2;\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\trectW = $$.getEventRectWidth();\n\t\t\t\trectX = d => xScale(d.x) - (rectW / 2);\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.each(function(d) {\n\t\t\t\tif (isSelectionEnabled) {\n\t\t\t\t\tif (isSelectionGrouped || config.data_selection_isselectable(d)) {\n\t\t\t\t\t\teventRect.style(\"cursor\", \"pointer\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!isTooltipGrouped) {\n\t\t\t\t\t$$.showTooltip([d], this);\n\t\t\t\t\t$$.showXGridFocus([d]);\n\t\t\t\t\t$$.expandCirclesBars(index, d.id, true);\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 * 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(\n\t\t\t\tconfig.data_selection_draggable && $$.drag ?\n\t\t\t\t\t(d3Drag()\n\t\t\t\t\t\t.origin(Object)\n\t\t\t\t\t\t.on(\"drag\", function() { $$.drag(d3Mouse(this)); })\n\t\t\t\t\t\t.on(\"dragstart\", function() { $$.dragstart(d3Mouse(this)); })\n\t\t\t\t\t\t.on(\"dragend\", () => { $$.dragend(); })\n\t\t\t\t\t) : () => {}\n\t\t\t);\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(\n\t\t\t\tconfig.data_selection_draggable && $$.drag ?\n\t\t\t\t\t(d3Drag().origin(Object)\n\t\t\t\t\t\t.on(\"drag\", function() { $$.drag(d3Mouse(this)); })\n\t\t\t\t\t\t.on(\"dragstart\", function() { $$.dragstart(d3Mouse(this)); })\n\t\t\t\t\t\t.on(\"dragend\", () => { $$.dragend(); })\n\t\t\t\t\t) : () => {}\n\t\t\t);\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","/**\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\t\tconst config = $$.config;\n\n\t\treturn config.size_width ? 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 ?\n\t\t\tconfig.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, $$)).forEach(d => {\n\t\t\tfor (let j = 0; j < config.data_groups.length; j++) {\n\t\t\t\tif (config.data_groups[j].indexOf(d.id) < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (let k = 0; k < config.data_groups[j].length; k++) {\n\t\t\t\t\tif (config.data_groups[j][k] in indices) {\n\t\t\t\t\t\tindices[d.id] = indices[config.data_groups[j][k]];\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\tif (isUndefined(indices[d.id])) {\n\t\t\t\tindices[d.id] = i++;\n\t\t\t}\n\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 ? $$.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","/**\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\n\t\tconst padAngle = $$.hasType(\"pie\") && config.pie_padding ?\n\t\t\tconfig.pie_padding * 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\tif (!config.data_order) {\n\t\t\t$$.pie.sort(null);\n\t\t}\n\t},\n\n\tupdateRadius() {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\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 = config.pie_innerRadius ?\n\t\t\tconfig.pie_innerRadius : (\n\t\t\t\tconfig.pie_padding ?\n\t\t\t\t\tconfig.pie_padding * ($$.innerRadiusRatio + 0.1) : 0\n\t\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 = function(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 c;\n\t\tlet x;\n\t\tlet y;\n\t\tlet h;\n\t\tlet ratio;\n\t\tlet translate = \"\";\n\n\t\tif (updated && !$$.hasType(\"gauge\")) {\n\t\t\tc = this.svgArc.centroid(updated);\n\t\t\tx = isNaN(c[0]) ? 0 : c[0];\n\t\t\ty = isNaN(c[1]) ? 0 : c[1];\n\t\t\th = Math.sqrt(x * x + y * y);\n\n\t\t\tif ($$.hasType(\"donut\") && config.donut_label_ratio) {\n\t\t\t\tratio = isFunction(config.donut_label_ratio) ?\n\t\t\t\t\tconfig.donut_label_ratio(d, $$.radius, h) : config.donut_label_ratio;\n\t\t\t} else if ($$.hasType(\"pie\") && config.pie_label_ratio) {\n\t\t\t\tratio = isFunction(config.pie_label_ratio) ?\n\t\t\t\t\tconfig.pie_label_ratio(d, $$.radius, h) : config.pie_label_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\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(d) {\n\t\tconst $$ = this;\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 format = $$.getArcLabelFormat();\n\n\t\treturn format ? format(value, ratio, id) : $$.defaultArcValueFormat(value, ratio);\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\tgaugeTextValue\n\t\t\t.text($$.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","/**\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\tif (reset) { $$.unexpandBars(); }\n\t\t$$.getBars(i, id).classed(CLASS.EXPANDED, true);\n\t},\n\n\tunexpandBars(i) {\n\t\tconst $$ = this;\n\n\t\t$$.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\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 = config.axis_rotated ? 1 : 0;\n\t\t\tconst indexY = +!indexX;\n\n\t\t\treturn `M ${points[0][indexX]},${points[0][indexY]}\n\t\t\t\tL ${points[1][indexX]},${points[1][indexY]}\n\t\t\t\tL ${points[2][indexX]},${points[2][indexY]}\n\t\t\t\tL ${points[3][indexX]},${points[3][indexY]} 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} 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 = $$.getCaches(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 => 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, 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\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)(\n\t\t\t\t$$.isAreaRangeType(d) ? $$.getAreaRangeData(d, \"mid\") : d.value\n\t\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 => d.value !== 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($$.getInterpolate(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 xOffset = $$.isCategorized() ? 0.5 : 0;\n\t\tconst regions = [];\n\n\t\tlet i;\n\t\tlet j;\n\t\tlet s = \"M\";\n\t\tlet sWithRegion;\n\t\tlet xp;\n\t\tlet yp;\n\t\tlet dx;\n\t\tlet dy;\n\t\tlet dd;\n\t\tlet diff;\n\t\tlet diffx2;\n\n\t\tfunction isWithinRegions(withinX, withinRegions) {\n\t\t\tlet idx;\n\n\t\t\tfor (idx = 0; idx < withinRegions.length; idx++) {\n\t\t\t\tif (withinRegions[idx].start < withinX && withinX <= withinRegions[idx].end) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\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\tfor (i = 0; i < _regions.length; i++) {\n\t\t\t\tregions[i] = {};\n\n\t\t\t\tif (isUndefined(_regions[i].start)) {\n\t\t\t\t\tregions[i].start = d[0].x;\n\t\t\t\t} else {\n\t\t\t\t\tregions[i].start = $$.isTimeSeries() ? $$.parseDate(_regions[i].start) : _regions[i].start;\n\t\t\t\t}\n\n\t\t\t\tif (isUndefined(_regions[i].end)) {\n\t\t\t\t\tregions[i].end = d[d.length - 1].x;\n\t\t\t\t} else {\n\t\t\t\t\tregions[i].end = $$.isTimeSeries() ? $$.parseDate(_regions[i].end) : _regions[i].end;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set scales\n\t\tconst xValue = config.axis_rotated ? dt => y(dt.value) : dt => x(dt.x);\n\t\tconst yValue = config.axis_rotated ? dt => x(dt.x) : dt => y(dt.value);\n\n\t\t// Define svg generator function for region\n\t\tfunction generateM(points) {\n\t\t\treturn `M${points[0][0]} ${points[0][1]} ${points[1][0]} ${points[1][1]}`;\n\t\t}\n\n\t\tif ($$.isTimeSeries()) {\n\t\t\tsWithRegion = (d0, d1, k, timeseriesDiff) => {\n\t\t\t\tconst x0 = d0.x.getTime();\n\t\t\t\tconst xDiff = d1.x - d0.x;\n\t\t\t\tconst xv0 = new Date(x0 + xDiff * k);\n\t\t\t\tconst xv1 = new Date(x0 + xDiff * (k + timeseriesDiff));\n\t\t\t\tlet points;\n\n\t\t\t\tif (config.axis_rotated) {\n\t\t\t\t\tpoints = [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]];\n\t\t\t\t} else {\n\t\t\t\t\tpoints = [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];\n\t\t\t\t}\n\t\t\t\treturn generateM(points);\n\t\t\t};\n\t\t} else {\n\t\t\tsWithRegion = function(d0, d1, k, otherDiff) {\n\t\t\t\tconst points = config.axis_rotated ?\n\t\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\t[[x(xp(k), true), y(yp(k))], [x(xp(k + otherDiff), true), y(yp(k + otherDiff))]];\n\n\t\t\t\treturn generateM(points);\n\t\t\t};\n\t\t}\n\n\t\t// Generate\n\t\tfor (i = 0; i < d.length; i++) {\n\t\t\t// Draw as normal\n\t\t\tif (isUndefined(regions) || !isWithinRegions(d[i].x, regions)) {\n\t\t\t\ts += ` ${xValue(d[i])} ${yValue(d[i])}`;\n\t\t\t} else {\n\t\t\t\t// Draw with region // TODO: Fix for horizotal charts\n\t\t\t\txp = $$.getScale(d[i - 1].x + xOffset, d[i].x + xOffset, $$.isTimeSeries());\n\t\t\t\typ = $$.getScale(d[i - 1].value, d[i].value);\n\n\t\t\t\tdx = x(d[i].x) - x(d[i - 1].x);\n\t\t\t\tdy = y(d[i].value) - y(d[i - 1].value);\n\t\t\t\tdd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\t\t\t\tdiff = 2 / dd;\n\t\t\t\tdiffx2 = diff * 2;\n\n\t\t\t\tfor (j = diff; j <= 1; j += diffx2) {\n\t\t\t\t\ts += sWithRegion(d[i - 1], d[i], j, diff);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn s;\n\t},\n\n\tupdateArea(durationForExit) {\n\t\tconst $$ = this;\n\n\t\t$$.mainArea = $$.main.selectAll(`.${CLASS.areas}`).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\tgenerateDrawArea(areaIndices, isSub) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst lineConnectNull = config.line_connectNull;\n\t\tconst axisRotated = config.axis_rotated;\n\t\tconst getPoints = $$.generateGetAreaPoints(areaIndices, isSub);\n\t\tconst yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale;\n\t\tconst xValue = d => (isSub ? $$.subxx : $$.xx).call($$, d);\n\t\tconst value0 = (d, i) => (config.data_groups.length > 0 ?\n\t\t\tgetPoints(d, i)[0][1] :\n\t\t\tyScaleGetter.call($$, d.id)($$.getAreaBaseValue(d.id)));\n\t\tconst value1 = (d, i) => (config.data_groups.length > 0 ?\n\t\t\tgetPoints(d, i)[1][1] :\n\t\t\tyScaleGetter.call($$, d.id)(d.value));\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\tconst isAreaRangeType = $$.isAreaRangeType(d);\n\t\t\t\tlet area = d3Area();\n\n\t\t\t\tif (axisRotated) {\n\t\t\t\t\tif (isAreaRangeType) {\n\t\t\t\t\t\tarea = area.x0(d => yScaleGetter.call($$, d.id)($$.getAreaRangeData(d, \"high\")))\n\t\t\t\t\t\t\t.x1(d => yScaleGetter.call($$, d.id)($$.getAreaRangeData(d, \"low\")))\n\t\t\t\t\t\t\t.y(xValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tarea = area.x0(value0)\n\t\t\t\t\t\t\t.x1(value1)\n\t\t\t\t\t\t\t.y(xValue);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isAreaRangeType) {\n\t\t\t\t\t\tarea = area.x(xValue)\n\t\t\t\t\t\t\t.y0(d => yScaleGetter.call($$, d.id)($$.getAreaRangeData(d, \"high\")))\n\t\t\t\t\t\t\t.y1(d => yScaleGetter.call($$, d.id)($$.getAreaRangeData(d, \"low\")));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tarea = area.x(xValue)\n\t\t\t\t\t\t\t.y0(config.area_above ? 0 : value0)\n\t\t\t\t\t\t\t.y1(value1);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!lineConnectNull) {\n\t\t\t\t\tarea = area.defined(d => d.value !== 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($$.getInterpolate(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 = axisRotated ? `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($$.lineScatterBubbleRadarData.bind($$));\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(\"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 = function(d, i) {\n\t\t\t\treturn getPoints(d, i)[0][1];\n\t\t\t};\n\t\t} else {\n\t\t\t$$.circleY = function(d) {\n\t\t\t\treturn $$.isAreaRangeType(d) ? $$.getYScale(d.id)($$.getAreaRangeData(d, \"mid\")) :\n\t\t\t\t\t$$.getYScale(d.id)(d.value);\n\t\t\t};\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(d) {\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\tconst scale = r(circles) / $$.config.point_r;\n\n\t\tcircles.attr(\"r\", r);\n\n\t\t!$$.isCirclePoint() &&\n\t\tcircles.style(\"transform\", `scale(${scale})`);\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","/**\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, extend, notEmpty} from \"../internals/util\";\n\nextend(ChartInternal.prototype, {\n\thasValidPointType(type) {\n\t\treturn /^(circle|rect(angle)?|polygon|ellipse)$/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, l = attribs.length; i < l; i++) {\n\t\t\tconst name = attribs[i].name;\n\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 = \"none\";\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\t\t\tconst xPosFn2 = d => xPosFn(d) - (box.width * 0.5);\n\t\t\tconst yPosFn2 = d => yPosFn(d) - (box.height * 0.5);\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, isEmpty} from \"../internals/util\";\n\n/**\n * Get the position value\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(type, edge, pos, range, ratio = 1) {\n\tconst r = 2 * Math.PI;\n\tconst func = type === \"x\" ? Math.sin : Math.cos;\n\n\treturn range * (1 - ratio * func(pos * 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$$.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 = (this.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\t$$.updateRadarLevel();\n\t\t$$.updateRadarAxes();\n\t\t$$.updateRadarShape();\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 edge = config.axis_x_categories.length;\n\t\tconst [width, height] = $$.getRadarSize();\n\n\t\tconst points = {};\n\t\tconst getRatio = v => (parseFloat(Math.max(v, 0)) / $$.maxValue) * config.radar_size_ratio;\n\n\t\ttargets.forEach(d => {\n\t\t\tconst point = [];\n\n\t\t\td.values.forEach((v, i) => {\n\t\t\t\tpoint.push([\n\t\t\t\t\tgetPosition(\"x\", edge, i, width, getRatio(v.value)),\n\t\t\t\t\tgetPosition(\"y\", edge, i, height, getRatio(v.value))\n\t\t\t\t]);\n\t\t\t});\n\n\t\t\tpoints[d.id] = point;\n\t\t});\n\n\t\t$$.addCache(cacheKey, points);\n\t},\n\n\tredrawRadar() {\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\t\t}\n\t},\n\n\tgenerateGetRadarPoints() {\n\t\tconst $$ = this;\n\t\tconst points = $$.getCaches(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\n\t\tconst levels = d3Range(0, depth);\n\n\t\tconst radius = config.radar_size_ratio * Math.min(width, height);\n\t\tconst levelRatio = levels.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 = levels.map(v => {\n\t\t\tconst pos = [];\n\n\t\t\td3Range(0, edge).forEach(i => {\n\t\t\t\tpos.push(`${getPosition(\"x\", edge, i, levelRatio[v])},${getPosition(\"y\", edge, i, levelRatio[v])}`);\n\t\t\t});\n\n\t\t\treturn pos.join(\" \");\n\t\t});\n\n\t\tconst radars = $$.radars.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.levels)\n\t\t\t.selectAll(`.${CLASS.level}`)\n\t\t\t.data(levels);\n\n\t\tconst radarsEnter = radars.enter().append(\"g\")\n\t\t\t.attr(\"class\", (d, i) => `${CLASS.level}-${i}`)\n\t\t\t.merge(radars)\n\t\t\t.attr(\"transform\", d => `translate(${width - levelRatio[d]}, ${height - levelRatio[d]})`);\n\n\t\tradarsEnter.append(\"polygon\")\n\t\t\t.attr(\"points\", d => points[d])\n\t\t\t.style(\"visibility\", config.radar_level_show ? null : \"hidden\");\n\n\t\t// level text\n\t\tif (config.radar_level_text_show) {\n\t\t\t$$.radars.select(`.${CLASS.levels}`)\n\t\t\t\t.append(\"text\")\n\t\t\t\t.attr(\"x\", width)\n\t\t\t\t.attr(\"y\", height)\n\t\t\t\t.attr(\"dx\", \"-.5em\")\n\t\t\t\t.attr(\"dy\", \"-.7em\")\n\t\t\t\t.style(\"text-anchor\", \"end\")\n\t\t\t\t.text(() => levelTextFormat(0));\n\n\t\t\tradarsEnter.append(\"text\")\n\t\t\t\t.attr(\"x\", d => points[d].split(\",\")[0])\n\t\t\t\t.attr(\"y\", 0)\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 / levels.length * (d + 1)\n\t\t\t\t));\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 ratio = config.radar_size_ratio;\n\t\tconst categories = config.axis_x_categories;\n\t\tconst edge = categories.length;\n\n\t\tlet axis = $$.radars.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.axis)\n\t\t\t.selectAll(\".axis\")\n\t\t\t.data(categories);\n\n\t\tconst newAxis = axis.enter().append(\"g\");\n\n\t\taxis.exit().remove();\n\n\t\tconfig.radar_axis_line_show && newAxis.append(\"line\");\n\t\tconfig.radar_axis_text_show && newAxis.append(\"text\");\n\n\t\taxis = axis.merge(newAxis)\n\t\t\t.attr(\"class\", (d, i) => `${CLASS.axis}-${i}`);\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) => getPosition(\"x\", edge, i, width, ratio))\n\t\t\t\t.attr(\"y2\", (d, i) => getPosition(\"y\", edge, i, height, ratio));\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) => getPosition(\"x\", edge, i, width))\n\t\t\t\t.attr(\"y\", (d, i) => getPosition(\"y\", edge, i, height));\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() {\n\t\tconst $$ = this;\n\t\tconst targets = $$.data.targets;\n\t\tconst points = $$.getCaches(cacheKey);\n\n\t\tconst areas = $$.radars.append(\"g\")\n\t\t\t.attr(\"class\", CLASS.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().remove();\n\n\t\tareasEnter\n\t\t\t.append(\"polygon\")\n\t\t\t.merge(areas)\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.getCaches(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.getCaches(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} 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 = $$.barLineBubbleData.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 {String} text\n\t * @param {String} class\n\t * @param {HTMLElement} element\n\t * @returns {Object} value of element.getBoundingClientRect()\n\t */\n\tgetTextRect(text, cls, element) {\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(!cls ? \"\" : cls, true)\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\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 (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 -= 3;\n\t\t\t\t} else if (!$$.isBarType(d) && $$.isChrome()) {\n\t\t\t\t\tyPos += 3;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlet diff = -6;\n\n\t\t\t\tif ($$.isBarType(d)) {\n\t\t\t\t\tdiff = -3;\n\t\t\t\t} else if ($$.isBubbleType(d)) {\n\t\t\t\t\tdiff = 3;\n\t\t\t\t}\n\n\t\t\t\tyPos += diff;\n\t\t\t}\n\t\t}\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// determine if data is line, scatter or bubble type\n\tlineScatterBubbleRadarData(d) {\n\t\treturn this.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\tif (config.grid_x_show) {\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.xgrids);\n\t\t}\n\n\t\tif (config.grid_y_show) {\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.ygrids);\n\t\t}\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 dataToShow = selectedData.filter(d => d && isValue(d.value));\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(config.axis_rotated ? \"y1\" : \"x1\", xx)\n\t\t\t.attr(config.axis_rotated ? \"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 ? function(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} : function() { return 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, 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\tconst len = targets.values.length;\n\t\t\t\tlet i;\n\n\t\t\t\tconfig.tooltip_init_x = $$.parseDate(config.tooltip_init_x);\n\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tif ((targets.values[i].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 * @private\n\t * @param {Object} data\n\t * @param {Function} default title format\n\t * @param {Function} default format for each data value in the tooltip.\n\t * @param {Object} $$.color(generateColor())\n\t * @returns {string} html\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\t\tlet text;\n\t\tlet title;\n\t\tlet hiValue;\n\t\tlet loValue;\n\t\tlet value;\n\t\tlet name;\n\t\tlet bgcolor;\n\n\t\tconst getRowValue = function(row) {\n\t\t\treturn $$.isAreaRangeType(row) ? $$.getAreaRangeData(row, \"mid\") : row.value;\n\t\t};\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\tfor (let i = 0, row, 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\tconst isAreaRangeType = $$.isAreaRangeType(row);\n\n\t\t\tif (!text) {\n\t\t\t\ttitle = sanitise(titleFormat ? titleFormat(row.x) : row.x);\n\t\t\t\ttext = (title || title === 0 ? `
${title}
` : \"\");\n\t\t\t\ttext = `
${text}`;\n\t\t\t}\n\n\t\t\tif (isAreaRangeType) {\n\t\t\t\thiValue = sanitise(valueFormat($$.getAreaRangeData(row, \"high\"), row.ratio, row.id, row.index, d));\n\t\t\t\tloValue = sanitise(valueFormat($$.getAreaRangeData(row, \"low\"), row.ratio, row.id, row.index, d));\n\t\t\t}\n\n\t\t\tvalue = sanitise(valueFormat(getRowValue(row), row.ratio, row.id, row.index, d));\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\tname = sanitise(nameFormat(row.name, row.ratio, row.id, row.index));\n\t\t\t\tbgcolor = $$.levelColor ? $$.levelColor(row.value) : color(row.id);\n\n\t\t\t\ttext += `
`;\n\t},\n\n\t/**\n\t * Returns the position of the tooltip\n\t * @private\n\t * @param {Object} data\n\t * @param {String} width\n\t * @param {String} hHeight\n\t * @param {HTMLElement} element\n\t * @returns {Object} top, left value\n\t */\n\ttooltipPosition(dataToShow, tWidth, tHeight, element) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst forArc = $$.hasArcType();\n\t\tconst isTouch = $$.inputType === \"touch\";\n\t\tconst mouse = d3Mouse(element);\n\n\t\tconst svgLeft = $$.getSvgLeft(true);\n\t\tlet chartRight;\n\n\t\tlet left;\n\t\tlet right;\n\t\tlet top;\n\n\t\t// Determine tooltip position\n\t\tif (forArc) {\n\t\t\tconst raw = isTouch || $$.hasType(\"radar\");\n\n\t\t\ttop = mouse[1] + (raw ? 0 : $$.height / 2) + 20;\n\t\t\tleft = mouse[0] + (raw ? 0 : ($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2);\n\n\t\t\tchartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();\n\t\t\tright = left + tWidth;\n\t\t} else {\n\t\t\tif (config.axis_rotated) {\n\t\t\t\tleft = svgLeft + mouse[0] + 100;\n\t\t\t\tright = left + tWidth;\n\t\t\t\tchartRight = $$.currentWidth - $$.getCurrentPaddingRight();\n\t\t\t\ttop = $$.x(dataToShow[0].x) + 20;\n\t\t\t} else {\n\t\t\t\tleft = svgLeft + $$.getCurrentPaddingLeft(true) + $$.x(dataToShow[0].x) + 20;\n\t\t\t\tright = left + tWidth;\n\t\t\t\tchartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();\n\t\t\t\ttop = mouse[1] + 15;\n\t\t\t}\n\t\t}\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(d.value));\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\tisFunction(config.tooltip_onshow) && config.tooltip_onshow.call($$);\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\tisFunction(config.tooltip_onshown) && config.tooltip_onshown.call($$);\n\t\t\t$$._handleLinkedCharts(true, selectedData[0].x);\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\tisFunction(config.tooltip_onhide) && config.tooltip_onhide.call($$);\n\n\t\t// hide tooltip\n\t\tthis.tooltip.style(\"display\", \"none\").datum(null);\n\n\t\tisFunction(config.tooltip_onhidden) && config.tooltip_onhidden.call($$);\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} x x Axis coordinate\n\t * @private\n\t */\n\t_handleLinkedCharts(show, x) {\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\tisShowing ^ show &&\n\t\t\t\t\t\t\tc.tooltip[isShowing ? \"hide\" : \"show\"]({x});\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, 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 (isFunction(config.legend_item_onclick)) {\n\t\t\t\t\tconfig.legend_item_onclick.call($$, id);\n\t\t\t\t} else {\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 (isFunction(config.legend_item_onout)) {\n\t\t\t\t\t\tconfig.legend_item_onout.call($$, id);\n\t\t\t\t\t} else {\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 (isFunction(config.legend_item_onover)) {\n\t\t\t\t\t\tconfig.legend_item_onover.call($$, id);\n\t\t\t\t\t} else {\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.textContent, 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 yForLegendText = (id, i) => yForLegend(id, i) + 9;\n\t\tconst xForLegendRect = (id, i) => xForLegend(id, i);\n\t\tconst yForLegendRect = (id, i) => yForLegend(id, i) - 5;\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\t\tconst yForLegendTile = (id, i) => yForLegend(id, i) + 4;\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.node().textContent, $$.CLASS.title, $$.title.node()).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.node().textContent, $$.CLASS.title, $$.title.node()).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.node().textContent, $$.CLASS.title, $$.title.node()).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 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\tconst x = $$.regionX.bind($$);\n\t\tconst y = $$.regionY.bind($$);\n\t\tconst w = $$.regionWidth.bind($$);\n\t\tconst h = $$.regionHeight.bind($$);\n\n\t\tlet regions = $$.mainRegion.select(\"rect\");\n\n\t\tregions = (withTransition ? regions.transition() : regions)\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\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\tregionX(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\n\t\tlet xPos;\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\txPos = config.axis_rotated ? (\n\t\t\t\t\"start\" in d ? yScale(d.start) : 0\n\t\t\t) : 0;\n\t\t} else {\n\t\t\txPos = config.axis_rotated ? 0 : (\n\t\t\t\t\"start\" in d ? $$.x(\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.start) : d.start\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\n\t\treturn xPos;\n\t},\n\n\tregionY(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\n\t\tlet yPos;\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\tyPos = config.axis_rotated ? 0 : (\n\t\t\t\t\"end\" in d ? yScale(d.end) : 0\n\t\t\t);\n\t\t} else {\n\t\t\tyPos = config.axis_rotated ? (\n\t\t\t\t\"start\" in d ? $$.x(\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.start) : d.start\n\t\t\t\t) : 0\n\t\t\t) : 0;\n\t\t}\n\n\t\treturn yPos;\n\t},\n\n\tregionWidth(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\n\t\tconst start = $$.regionX(d);\n\t\tlet end;\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\tend = config.axis_rotated ? (\n\t\t\t\t\"end\" in d ? yScale(d.end) : $$.width\n\t\t\t) : $$.width;\n\t\t} else {\n\t\t\tend = config.axis_rotated ?\n\t\t\t\t$$.width : \"end\" in d ?\n\t\t\t\t\t$$.x($$.isTimeSeries() ? $$.parseDate(d.end) : d.end) :\n\t\t\t\t\t$$.width;\n\t\t}\n\n\t\treturn end < start ? 0 : end - start;\n\t},\n\n\tregionHeight(d) {\n\t\tconst $$ = this;\n\t\tconst config = $$.config;\n\t\tconst start = this.regionY(d);\n\t\tlet end;\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\n\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\n\t\t\tend = config.axis_rotated ?\n\t\t\t\t$$.height : (\n\t\t\t\t\t\"start\" in d ? yScale(d.start) : $$.height\n\t\t\t\t);\n\t\t} else {\n\t\t\tend = config.axis_rotated ? (\n\t\t\t\t\"end\" in d ? $$.x(\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.end) : d.end\n\t\t\t\t) : $$.height\n\t\t\t) : $$.height;\n\t\t}\n\n\t\treturn end < start ? 0 : end - start;\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()) { return; }\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\n\t\tif (config.zoom_enabled && !$$.zoom.altDomain) { return; } // skip if zoomable because of conflict drag dehavior\n\t\tif (!config.data_selection_multiple) { return; } // skip when single selection because drag is used for multiple selection\n\n\t\tconst sx = $$.dragStart[0];\n\t\tconst sy = $$.dragStart[1];\n\t\tconst mx = mouse[0];\n\t\tconst my = mouse[1];\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}`).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\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\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()) { return; }\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\n\t\t$$.dragStart = mouse;\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\t\t$$.dragging = 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()) { return; }\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\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\t\t$$.main.selectAll(`.${CLASS.shape}`)\n\t\t\t.classed(CLASS.INCLUDED, false);\n\t\t$$.dragging = false;\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} 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 cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$);\n\t\tconst cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$);\n\t\tconst r = $$.pointSelectR.bind($$);\n\n\t\tconfig.data_onselected\n\t\t\t.call($$.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\t$$.config.data_onunselected.call($$.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\tconfig.data_onselected.call($$, 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\tconfig.data_onunselected.call($$, 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\tconst method = `${selected ? \"\" : \"un\"}selectPath`;\n\n\t\tthis[method](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\t\tlet toggle;\n\n\t\tif (that.nodeName !== \"path\") {\n\t\t\ttoggle = $$.isStepType(d) ?\n\t\t\t\t() => {} : // circle is hidden in step chart, so treat as within the click area\n\t\t\t\t$$.togglePoint;\n\t\t} else if (that.nodeName === \"path\") {\n\t\t\ttoggle = $$.togglePath;\n\t\t}\n\n\t\treturn toggle;\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","/**\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, 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 = function() {\n\t\t\treturn $$.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\tif (!$$.brushEmpty()) {\n\t\t\t\t\t$$.brush.update();\n\t\t\t\t}\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 {event as d3Event} from \"d3-selection\";\nimport {zoom as d3Zoom} from \"d3-zoom\";\nimport ChartInternal from \"../internals/ChartInternal\";\nimport CLASS from \"../config/classes\";\nimport {extend, diffDomain, isFunction} 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 * 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\", $$.onStart.bind($$))\n\t\t\t.on(\"zoom\", $$.onZoom.bind($$))\n\t\t\t.on(\"end\", $$.onEnd.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($$.x.orgScale());\n\n\t\t\tnewScale.domain($$.trimXDomain(newScale.domain()));\n\n\t\t\t$$.zoomScale = $$.getCustomizedScale(newScale);\n\t\t\t$$.xAxis.scale($$.zoomScale);\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\tonStart() {\n\t\tconst $$ = this;\n\t\tconst event = d3Event.sourceEvent;\n\t\tconst onzoomstart = $$.config.zoom_onzoomstart;\n\n\t\t$$.zoom.altDomain = event.altKey ?\n\t\t\t$$.x.orgDomain() : null;\n\n\t\t$$.zoom.startEvent = event;\n\t\tisFunction(onzoomstart) && onzoomstart.call($$.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\tisFunction(config.zoom_onzoom) && config.zoom_onzoom.call($$.api, $$.x.orgDomain());\n\t},\n\n\t/**\n\t * 'end' event listener\n\t * @private\n\t */\n\tonEnd() {\n\t\tconst $$ = this;\n\t\tconst event = d3Event.sourceEvent;\n\t\tconst onzoomend = $$.config.zoom_onzoomend;\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\tisFunction(onzoomend) && onzoomend.call($$.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 \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","/**\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 {notEmpty, extend, isFunction} from \"./util\";\n\n/**\n * Set pattern's background color\n * (it adds a 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\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\t\tlet pattern = notEmpty(config.color_pattern) ?\n\t\t\tconfig.color_pattern : d3ScaleOrdinal(schemeCategory10).range();\n\t\tconst originalColorPattern = pattern;\n\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 (colors[id] instanceof Function) {\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 callback instanceof Function ?\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\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, target, isDataType = false) {\n\t\tthis.cache[key] = isDataType ? this.cloneTarget(target) : target;\n\t},\n\n\tgetCaches(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\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.
\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.
\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.
\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: \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: \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: \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 {isDefined, isObject, isFunction, 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\tconst isTimeSeries = $$.isTimeSeries();\n\tlet domain = domainValue;\n\tlet resultDomain;\n\n\tif ($$.config.zoom_enabled && domain) {\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 = $$.x.orgDomain();\n\t\t\tconst k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]);\n\t\t\tconst tx = isTimeSeries ?\n\t\t\t\t(0 - k * $$.x(domain[0].getTime())) : domain[0] - k * ($$.x(domain[0]) - $$.xAxis.tickOffset());\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\tisFunction($$.config.zoom_onzoom) && $$.config.zoom_onzoom.call(this, $$.x.orgDomain());\n\t} else {\n\t\tresultDomain = ($$.zoomScale || $$.x).domain();\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 {Boolean} enabled If enabled is true, the feature of zooming will be enabled. If false is given, it will be disabled. When set to false, the current zooming status will be reset.\n\t * @example\n\t * // Enable zooming\n\t * chart.zoom.enable(true);\n\t *\n\t * // Disable zooming\n\t * chart.zoom.enable(false);\n\t */\n\tenable: function(enabled = false) {\n\t\tconst $$ = this.internal;\n\n\t\t$$.config.zoom_enabled = enabled;\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\n\t\t$$.config.subchart_show ?\n\t\t\t$$.brush.getSelection().call($$.brush.move, null) :\n\t\t\t$$.zoom.updateTransformScale(d3ZoomIdentity);\n\n\t\t$$.redraw({\n\t\t\twithTransition: true,\n\t\t\twithY: $$.config.zoom_rescale\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, isBoolean} from \"../internals/util\";\n\nextend(Chart.prototype, {\n\t/**\n\t * Load data to the chart.
\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 * - Note:\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. \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: \n\t *\n\t * | Key | Description |\n\t * | --- | --- |\n\t * | - 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 |\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 - 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($$.getCaches(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(isBoolean(args.unload) && args.unload ? 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.
\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 * - Note:\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. \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 (args instanceof Array) {\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.
\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: \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. \n\t * If data that has the same target id is given, the chart will be appended. \n\t * Otherwise, new target will be added. One of these is required when calling. \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","/**\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.
\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. 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. \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. \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. \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. \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.
\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.
\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 */\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. \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. \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 */\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 * @example\n\t * chart.flush();\n\t */\n\tflush() {\n\t\t// reset possible zoom scale\n\t\tthis.internal.zoomScale = null;\n\n\t\tthis.internal.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($$.intervalForObserveInserted) && window.clearInterval($$.intervalForObserveInserted);\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","/**\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 */\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: \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`. 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. 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 = ``\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(foreignObject) 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;AAAA;AACA;;;;;AACA;;;;AAIA;AACA;;;;;;;AAOA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;AACA;AACA;AAKA;AACA;AACA;AAAA;;;;;;;;;;;AAWA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AADA;AAFA;AAFA;AA5DA;;;;;;AAuEA;AACA;AAGA;AAsDA;AACA;;;;;;;;;;;;;;;;;;ACxIA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AAAA;AACA;AACA;AASA;AACA;AAIA;AACA;AACA;;;;;;;;AApBA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;ACcA;;;;;;;AAOA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAKA;AACA;AACA;AAAA;AAAA;AAMA;AACA;AAEA;AAAA;AAMA;AACA;AAEA;AAAA;AACA;AACA;AAIA;AAiBA;AAEA;AAAA;AAAA;AAMA;AAiCA;AACA;AAQA;AACA;AA8BA;AACA;AACA;AAHA;AAgBA;AAEA;AAAA;AAAA;AAKA;AACA;AACA;AAGA;AACA;AACA;AAFA;AACA;AAqEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AAcA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AA8DA;AACA;AAhDA;AAuDA;AACA;AACA;AACA;AACA;AACA;AANA;AACA;AAQA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAIA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA;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;AA4CA;AAQA;AACA;AACA;AACA;AAqBA;AAOA;AACA;AACA;AACA;AAAA;AAIA;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;AAAA;AAAA;AAAA;AACA;AACA;AAiGA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAIA;AAxHA;AAAA;AAAA;AAAA;AAAA;AAsIA;AACA;AACA;AAoEA;AA5MA;AAAA;AAAA;AAkNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAjNA;AAAA;AAAA;AA8OA;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;AAC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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;AAGA;AACA;AACA;AAGA;AAFA;AAAA;AAGA;AAQA;AAAA;AAAA;AAGA;AACA;;;;;;;AADA;AAAA;AACA;AAUA;AACA;AAuBA;AAtBA;AACA;AAFA;AAOA;AACA;AAFA;AAOA;AACA;AAFA;AAOA;AACA;AAFA;AAMA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAGA;AAAA;AAAA;AACA;AAGA;AACA;AAOA;AACA;AAEA;AACA;AACA;AAFA;AAWA;AACA;AApHA;;;;;;;;AAQA;;;;;;;;AAmBA;;;;;;;;AAQA;AACA;AACA;AAmDA;AAlHA;;;;;;AA+IA;AAAA;AAAA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;;;;;;;AAMA;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;AApEA;;;;;;;;;;;;;AAoCA;;;;;;;;AAQA;;;;;;;;AAsBA;AACA;AACA;AAuDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACrTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACRA;;;;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;AAhFA;;;;;;;;;;;;ACqCA;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;AAsdA;AArHA;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;AAEA;AACA;AAEA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAGA;AACA;;;;AAnfA;AACA;AACA;AACA;AACA;AAFA;AACA;AAmBA;AAbA;AAAA;AAAA;AAKA;AAMA;AAGA;AACA;AAnCA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAdA;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;;;AAcA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAWA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;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;;;;;;;;;;;;;;;;;;;;;;AAsBA;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;;;;;;;;;;;;AAYA;AACA;AACA;;;;;;;;;;;;AAYA;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;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AAsBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AAoBA;AACA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;AAkBA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0FA;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;AAtuFA;AAwuFA;AACA;AA3uFA;;;;;;;;;;;;;;;;;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;AAKA;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;AA7IA;;;;;;;;;;;;;;;;;;;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;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AACA;AACA;AAaA;AACA;AAlSA;;;;;;;;;;;;;;;;;;;;;;ACeA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AAAA;AACA;AACA;AAEA;AAEA;AAEA;AAAA;AAAA;AAAA;AACA;AASA;AAJA;AAGA;AAEA;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;AAUA;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;AACA;AAQA;AANA;AAAA;AAEA;AAAA;AAAA;AACA;AAAA;AACA;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;AACA;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;AAAA;AAAA;AACA;AACA;AAoBA;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;AACA;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;AAMA;AAMA;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;AAMA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AAeA;AAXA;AACA;AACA;AAHA;AAOA;AACA;AACA;AAHA;AAOA;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;AAroBA;;;;;;;;;;;;;;;;;;;;AC3BA;;;;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;AACA;AAMA;AACA;AACA;AACA;AAMA;AAAA;AAEA;AAAA;AAWA;AAAA;AAEA;AAIA;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAOA;AACA;AAoBA;AACA;AAAA;AAAA;AAjCA;AAmCA;AACA;AACA;AACA;AACA;AA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AAA;AArIA;AAsIA;AAAA;AAtIA;AACA;AAwIA;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;AAtpBA;;;;;;;;;;;;;;;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;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAaA;AAEA;AAAA;AAGA;AAGA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAgBA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAgBA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAgBA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAkBA;AACA;AAEA;AACA;AACA;AAxJA;;;;;;;;;;;;;;;;;;ACTA;;;;AASA;AACA;;;;;;AAMA;AAAA;AAAA;AAAA;AAMA;AAEA;AACA;AAJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcA;AAQA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAWA;AAcA;AACA;AAEA;AAMA;AA1DA;AA2DA;AACA;AACA;AAAA;;;;;;AAMA;AAAA;AAAA;AAKA;AADA;AAQA;AACA;AACA;AAAA;;;;;AAKA;AAAA;AAAA;AAKA;AADA;AAUA;AAhHA;;;;;;;;;;;;;;;;;;;ACCA;AACA;;;;;;;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA;AASA;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;AACA;AACA;AACA;AACA;AACA;AAAA;;;;;;;AAOA;AAAA;AAAA;AACA;AACA;AAUA;AALA;AAMA;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;AArLA;;;;;;;;;;;;;;;;;;;;;;ACMA;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;AAGA;AACA;AACA;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;AAEA;AANA;AAAA;AAAA;AAWA;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;AA1ZA;;;;;;;;;;;;;;;;;;;;;;;AChBA;;;;AAcA;AACA;;;;AAIA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AAIA;AACA;AAQA;AACA;AACA;AACA;AAIA;AAGA;AACA;AACA;AAAA;;;;AAIA;AAAA;AAAA;AAAA;AAKA;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;AAAA;AAAA;AACA;AACA;AAIA;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;AA3LA;;;;;;;;;;;;;;;;;ACLA;;;;;;;;;AATA;;;;AAkBA;AACA;AACA;AAQA;AACA;AACA;AAFA;AAIA;AAIA;AACA;AAHA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AASA;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;AAGA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAjFA;;;;;;;;;;;;;;;ACtCA;;;;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;AAIA;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;AA3JA;;;;;;;;;;;;;;;;;;;;;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;A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","sourceRoot":""}