{"version":3,"file":"billboard.js","sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 0372f6e4fe02fc1a8238","webpack:///src/internals/util.js","webpack:///src/internals/ChartInternal.js","webpack:///external \"d3\"","webpack:///src/config/classes.js","webpack:///src/internals/Chart.js","webpack:///./~/babel-helper-modules/lib/typeof.js","webpack:///./~/babel-helper-modules/lib/classCallCheck.js","webpack:///src/axis/Axis.js","webpack:///src/axis/bb.axis.js","webpack:///src/api/api.axis.js","webpack:///src/api/api.category.js","webpack:///src/api/api.chart.js","webpack:///src/api/api.color.js","webpack:///src/api/api.data.js","webpack:///src/api/api.flow.js","webpack:///src/api/api.focus.js","webpack:///src/api/api.grid.js","webpack:///src/api/api.group.js","webpack:///src/api/api.legend.js","webpack:///src/api/api.load.js","webpack:///src/api/api.region.js","webpack:///src/api/api.selection.js","webpack:///src/api/api.show.js","webpack:///src/api/api.tooltip.js","webpack:///src/api/api.transform.js","webpack:///src/api/api.x.js","webpack:///src/api/api.zoom.js","webpack:///src/config/config.js","webpack:///src/data/data.convert.js","webpack:///src/data/data.js","webpack:///src/data/data.load.js","webpack:///src/interactions/drag.js","webpack:///src/interactions/interaction.js","webpack:///src/interactions/subchart.js","webpack:///src/interactions/zoom.js","webpack:///src/internals/arc.js","webpack:///src/internals/cache.js","webpack:///src/internals/category.js","webpack:///src/internals/class.js","webpack:///src/internals/clip.js","webpack:///src/internals/color.js","webpack:///src/internals/domain.js","webpack:///src/internals/format.js","webpack:///src/internals/grid.js","webpack:///src/internals/legend.js","webpack:///src/internals/region.js","webpack:///src/internals/scale.js","webpack:///src/internals/selection.js","webpack:///src/internals/shape.bar.js","webpack:///src/internals/shape.js","webpack:///src/internals/shape.line.js","webpack:///src/internals/size.js","webpack:///src/internals/text.js","webpack:///src/internals/title.js","webpack:///src/internals/tooltip.js","webpack:///src/internals/type.js","webpack:///src/internals/ua.js","webpack:///./src/scss/main.scss","webpack:///src/config/Options.js","webpack:///src/core.js","webpack:///src/internals/browser.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})(this, function(__WEBPACK_EXTERNAL_MODULE_2__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \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// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\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, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\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 \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 59);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0372f6e4fe02fc1a8238","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tevent as d3Event,\r\n\tbrushSelection as d3BrushSelection\r\n} from \"d3\";\r\nimport CLASS from \"../config/classes\";\r\n\r\nconst isValue = v => v || v === 0;\r\nconst isFunction = o => typeof o === \"function\";\r\nconst isString = o => typeof o === \"string\";\r\nconst isUndefined = v => typeof v === \"undefined\";\r\nconst isDefined = v => typeof v !== \"undefined\";\r\nconst ceil10 = v => Math.ceil(v / 10) * 10;\r\nconst asHalfPixel = n => Math.ceil(n) + 0.5;\r\nconst diffDomain = d => d[1] - d[0];\r\nconst isEmpty = o => (\r\n\ttypeof o === \"undefined\" || o === null ||\r\n\t\t(isString(o) && o.length === 0) ||\r\n\t\t(typeof o === \"object\" && Object.keys(o).length === 0)\r\n);\r\nconst notEmpty = o => !isEmpty(o);\r\nconst getOption = (options, key, defaultValue) => (\r\n\tisDefined(options[key]) ? options[key] : defaultValue\r\n);\r\nconst hasValue = (dict, value) => {\r\n\tlet found = false;\r\n\r\n\tObject.keys(dict).forEach(key => (dict[key] === value) && (found = true));\r\n\r\n\treturn found;\r\n};\r\nconst sanitise = str => (\r\n\ttypeof str === \"string\" ?\r\n\t\tstr.replace(//g, \">\") : str\r\n);\r\n\r\n// substitution of SVGPathSeg API polyfill\r\nconst getRectSegList = path => {\r\n\t/*\r\n\t * seg1 ---------- seg2\r\n\t * | |\r\n\t * | |\r\n\t * | |\r\n\t * seg0 ---------- seg3\r\n\t * */\r\n\tconst bbox = path.getBBox();\r\n\tconst list = [];\r\n\r\n\t// seg0\r\n\tlist.push({\r\n\t\tx: bbox.x,\r\n\t\ty: bbox.y + bbox.height\r\n\t});\r\n\r\n\t// seg1\r\n\tlist.push({\r\n\t\tx: bbox.x,\r\n\t\ty: bbox.y\r\n\t});\r\n\r\n\t// seg2\r\n\tlist.push({\r\n\t\tx: bbox.x + bbox.width,\r\n\t\ty: bbox.y\r\n\t});\r\n\r\n\t// seg3\r\n\tlist.push({\r\n\t\tx: bbox.x + bbox.width,\r\n\t\ty: bbox.y + bbox.height\r\n\t});\r\n\r\n\treturn list;\r\n};\r\n\r\nconst getPathBox = path => {\r\n\tconst box = path.getBoundingClientRect();\r\n\tconst items = getRectSegList(path);\r\n\tconst minX = items[0].x;\r\n\tconst minY = Math.min(items[0].y, items[1].y);\r\n\r\n\treturn {\r\n\t\tx: minX,\r\n\t\ty: minY,\r\n\t\twidth: box.width,\r\n\t\theight: box.height,\r\n\t};\r\n};\r\n\r\n// return brush selection array\r\nconst getBrushSelection = function() {\r\n\tlet selection = null;\r\n\tconst event = d3Event;\r\n\r\n\t// check from event\r\n\tif (event && event.constructor.name === \"BrushEvent\") {\r\n\t\tselection = event.selection;\r\n\t\t// check from brush area selection\r\n\t} else if (this.context && (selection = this.context.select(`.${CLASS.brush}`).node())) {\r\n\t\tselection = d3BrushSelection(selection);\r\n\t}\r\n\r\n\treturn selection;\r\n};\r\n\r\nconst brushEmpty = function() {\r\n\tconst selection = this.getBrushSelection();\r\n\r\n\tif (selection) {\r\n\t\t// brush selected area\r\n\t\t// two-dimensional: [[x0, y0], [x1, y1]]\r\n\t\t// one-dimensional: [x0, x1] or [y0, y1]\r\n\t\treturn selection[0] === selection[1];\r\n\t}\r\n\r\n\treturn true;\r\n};\r\n\r\nfunction extend(target = {}, source) {\r\n\tlet p;\r\n\r\n\tfor (p in source) {\r\n\t\ttarget[p] = source[p];\r\n\t}\r\n\treturn target;\r\n}\r\n\r\nconst SUPPORT_ADDEVENTLISTENER = !!(\"addEventListener\" in document);\r\nconst SUPPORT_PASSIVE = (() => {\r\n\tlet supportsPassiveOption = false;\r\n\r\n\ttry {\r\n\t\tif (SUPPORT_ADDEVENTLISTENER && Object.defineProperty) {\r\n\t\t\tdocument.addEventListener(\"test\", null, Object.defineProperty({}, \"passive\", {\r\n\t\t\t\tget() {\r\n\t\t\t\t\tsupportsPassiveOption = true;\r\n\t\t\t\t},\r\n\t\t\t}));\r\n\t\t}\r\n\t} catch (e) {}\r\n\treturn supportsPassiveOption;\r\n})();\r\n\r\nfunction addEvent(element, type, handler, eventListenerOptions) {\r\n\tif (SUPPORT_ADDEVENTLISTENER) {\r\n\t\tlet options = eventListenerOptions || false;\r\n\r\n\t\tif (typeof eventListenerOptions === \"object\") {\r\n\t\t\toptions = SUPPORT_PASSIVE ? eventListenerOptions : false;\r\n\t\t}\r\n\t\telement.addEventListener(type, handler, options);\r\n\t} else if (element.attachEvent) {\r\n\t\telement.attachEvent(`on${type}`, handler);\r\n\t} else {\r\n\t\telement[`on${type}`] = handler;\r\n\t}\r\n}\r\n\r\nfunction removeEvent(element, type, handler) {\r\n\tif (element.removeEventListener) {\r\n\t\telement.removeEventListener(type, handler, false);\r\n\t} else if (element.detachEvent) {\r\n\t\telement.detachEvent(`on${type}`, handler);\r\n\t} else {\r\n\t\telement[`on${type}`] = null;\r\n\t}\r\n}\r\n\r\n/**\r\n * Check if is array\r\n * @param arr *\r\n * @returns {Boolean}\r\n * @private\r\n */\r\nconst isArray = arr => arr && arr.constructor === Array;\r\n\r\n/**\r\n * Check if is object\r\n * @param {Object} obj\r\n * @returns {Boolean}\r\n * @private\r\n */\r\nconst isObject = obj => obj && !obj.nodeType && typeof obj === \"object\" && !isArray(obj);\r\n\r\n/**\r\n * Merge object returning new object\r\n * @param {Object} target\r\n * @param {Object} objectN\r\n * @returns {Object} merged target object\r\n * @private\r\n * @example\r\n * var target = { a: 1 };\r\n * utils.extend(target, { b: 2, c: 3 });\r\n * target; // { a: 1, b: 2, c: 3 };\r\n */\r\nconst merge = (target, ...objectN) => {\r\n\tif (!objectN.length || (objectN.length === 1 && !objectN[0])) {\r\n\t\treturn target;\r\n\t}\r\n\r\n\tconst source = objectN.shift();\r\n\r\n\tif (isObject(target) && isObject(source)) {\r\n\t\tObject.keys(source).forEach(key => {\r\n\t\t\tconst value = source[key];\r\n\r\n\t\t\tif (isObject(value)) {\r\n\t\t\t\t!target[key] && (target[key] = {});\r\n\r\n\t\t\t\ttarget[key] = merge(target[key], value);\r\n\t\t\t} else {\r\n\t\t\t\ttarget[key] = isArray(value) ?\r\n\t\t\t\t\tvalue.concat() : value;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n\r\n\treturn extend(target, ...objectN);\r\n};\r\n\r\nexport {\r\n\tisValue,\r\n\tisDefined,\r\n\tisUndefined,\r\n\tnotEmpty,\r\n\tceil10,\r\n\tisFunction,\r\n\tasHalfPixel,\r\n\tgetOption,\r\n\tisString,\r\n\thasValue,\r\n\tsanitise,\r\n\tgetPathBox,\r\n\tdiffDomain,\r\n\tisEmpty,\r\n\tgetBrushSelection,\r\n\tbrushEmpty,\r\n\textend,\r\n\taddEvent,\r\n\tremoveEvent,\r\n\tgetRectSegList,\r\n\tmerge,\r\n\tisArray,\r\n\tisObject\r\n};\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/util.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\ttimeParse as d3TimeParse,\r\n\ttimeFormat as d3TimeFormat,\r\n\tutcParse as d3UtcParse,\r\n\tutcFormat as d3UtcFormat,\r\n\tselect as d3Select,\r\n\tselectAll as d3SelectAll,\r\n\textent as d3Extent,\r\n\ttransition as d3Transition\r\n} from \"d3\";\r\nimport Axis from \"../axis/Axis\";\r\nimport CLASS from \"../config/classes\";\r\nimport {addEvent, notEmpty, asHalfPixel, isValue, getOption} from \"./util\";\r\n\r\n/**\r\n * Internal chart class.\r\n * - Note: Instantiated internally, not exposed for public.\r\n * @class ChartInternal\r\n * @ignore\r\n * @private\r\n*/\r\nexport default class ChartInternal {\r\n\tconstructor(api) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.api = api;\r\n\t\t$$.config = $$.getOptions();\r\n\t\t$$.data = {};\r\n\t\t$$.cache = {};\r\n\t\t$$.axes = {};\r\n\t}\r\n\r\n\tbeforeInit() {\r\n\t\t// can do something\r\n\t}\r\n\r\n\tafterInit() {\r\n\t\t// can do something\r\n\t}\r\n\r\n\tinit() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.initParams();\r\n\r\n\t\tif (config.data_url) {\r\n\t\t\t$$.convertUrlToData(\r\n\t\t\t\tconfig.data_url,\r\n\t\t\t\tconfig.data_mimeType,\r\n\t\t\t\tconfig.data_headers,\r\n\t\t\t\tconfig.data_keys,\r\n\t\t\t\t$$.initWithData\r\n\t\t\t);\r\n\t\t} else if (config.data_json) {\r\n\t\t\t$$.initWithData($$.convertJsonToData(config.data_json, config.data_keys));\r\n\t\t} else if (config.data_rows) {\r\n\t\t\t$$.initWithData($$.convertRowsToData(config.data_rows));\r\n\t\t} else if (config.data_columns) {\r\n\t\t\t$$.initWithData($$.convertColumnsToData(config.data_columns));\r\n\t\t} else {\r\n\t\t\tthrow Error(\"url or json or rows or columns is required.\");\r\n\t\t}\r\n\t}\r\n\r\n\tinitParams() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t// MEMO: clipId needs to be unique because it conflicts when multiple charts exist\r\n\t\t$$.clipId = `bb-${+new Date()}-clip`;\r\n\t\t$$.clipIdForXAxis = `${$$.clipId}-xaxis`;\r\n\t\t$$.clipIdForYAxis = `${$$.clipId}-yaxis`;\r\n\t\t$$.clipIdForGrid = `${$$.clipId}-grid`;\r\n\t\t$$.clipIdForSubchart = `${$$.clipId}-subchart`;\r\n\t\t$$.clipPath = $$.getClipPath($$.clipId);\r\n\t\t$$.clipPathForXAxis = $$.getClipPath($$.clipIdForXAxis);\r\n\t\t$$.clipPathForYAxis = $$.getClipPath($$.clipIdForYAxis);\r\n\t\t$$.clipPathForGrid = $$.getClipPath($$.clipIdForGrid);\r\n\t\t$$.clipPathForSubchart = $$.getClipPath($$.clipIdForSubchart);\r\n\t\t$$.dragStart = null;\r\n\t\t$$.dragging = false;\r\n\t\t$$.flowing = false;\r\n\t\t$$.cancelClick = false;\r\n\t\t$$.mouseover = false;\r\n\t\t$$.transiting = false;\r\n\r\n\t\t$$.color = $$.generateColor();\r\n\t\t$$.levelColor = $$.generateLevelColor();\r\n\r\n\t\t$$.dataTimeFormat = config.data_xLocaltime ? d3TimeParse : d3UtcParse;\r\n\t\t$$.axisTimeFormat = config.axis_x_localtime ? d3TimeFormat : d3UtcFormat;\r\n\r\n\t\t$$.defaultAxisTimeFormat = function(d) {\r\n\t\t\tconst specifier = (d.getMilliseconds() && \".%L\") ||\r\n\t\t\t\t(d.getSeconds() && \".:%S\") ||\r\n\t\t\t\t(d.getMinutes() && \"%I:%M\") ||\r\n\t\t\t\t(d.getHours() && \"%I %p\") ||\r\n\t\t\t\t((d.getDay() && d.getDate() !== 1) && \"%-m/%-d\") ||\r\n\t\t\t\t(d.getDate() !== 1 && \"%b %d\") ||\r\n\t\t\t\t(d.getMonth() && \"%-m/%-d\") ||\r\n\t\t\t\t\"%Y/%-m/%-d\";\r\n\r\n\t\t\treturn $$.axisTimeFormat(specifier)(d);\r\n\t\t};\r\n\r\n\t\t$$.hiddenTargetIds = [];\r\n\t\t$$.hiddenLegendIds = [];\r\n\t\t$$.focusedTargetIds = [];\r\n\t\t$$.defocusedTargetIds = [];\r\n\r\n\t\t$$.xOrient = config.axis_rotated ? \"left\" : \"bottom\";\r\n\r\n\t\t$$.yOrient = config.axis_rotated ?\r\n\t\t\t(config.axis_y_inner ? \"top\" : \"bottom\") : (config.axis_y_inner ? \"right\" : \"left\");\r\n\r\n\t\t$$.y2Orient = config.axis_rotated ?\r\n\t\t\t(config.axis_y2_inner ? \"bottom\" : \"top\") : (config.axis_y2_inner ? \"left\" : \"right\");\r\n\r\n\t\t$$.subXOrient = config.axis_rotated ? \"left\" : \"bottom\";\r\n\t\t$$.isLegendRight = config.legend_position === \"right\";\r\n\t\t$$.isLegendInset = config.legend_position === \"inset\";\r\n\r\n\t\t$$.isLegendTop = config.legend_inset_anchor === \"top-left\" ||\r\n\t\t\tconfig.legend_inset_anchor === \"top-right\";\r\n\r\n\t\t$$.isLegendLeft = config.legend_inset_anchor === \"top-left\" ||\r\n\t\t\tconfig.legend_inset_anchor === \"bottom-left\";\r\n\r\n\t\t$$.legendStep = 0;\r\n\t\t$$.legendItemWidth = 0;\r\n\t\t$$.legendItemHeight = 0;\r\n\r\n\t\t$$.currentMaxTickWidths = {\r\n\t\t\tx: 0,\r\n\t\t\ty: 0,\r\n\t\t\ty2: 0\r\n\t\t};\r\n\r\n\t\t$$.rotated_padding_left = 30;\r\n\t\t$$.rotated_padding_right = config.axis_rotated && !config.axis_x_show ? 0 : 30;\r\n\t\t$$.rotated_padding_top = 5;\r\n\r\n\t\t$$.withoutFadeIn = {};\r\n\t\t$$.intervalForObserveInserted = undefined;\r\n\r\n\t\t$$.inputType = $$.convertInputType();\r\n\r\n\t\t$$.axes.subx = d3SelectAll([]); // needs when excluding subchart.js\r\n\t}\r\n\r\n\tinitWithData(data) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet binding = true;\r\n\r\n\t\t$$.axis = new Axis($$);\r\n\r\n\t\t$$.initPie && $$.initPie();\r\n\r\n\t\t$$.initBrush && $$.initBrush();\r\n\r\n\t\t$$.initZoom && $$.initZoom();\r\n\r\n\t\tif (!config.bindto) {\r\n\t\t\t$$.selectChart = d3SelectAll([]);\r\n\t\t} else if (typeof config.bindto.node === \"function\") {\r\n\t\t\t$$.selectChart = config.bindto;\r\n\t\t} else {\r\n\t\t\t$$.selectChart = d3Select(config.bindto);\r\n\t\t}\r\n\r\n\t\tif ($$.selectChart.empty()) {\r\n\t\t\t$$.selectChart = d3Select(document.createElement(\"div\")).style(\"opacity\", \"0\");\r\n\t\t\t$$.observeInserted($$.selectChart);\r\n\t\t\tbinding = false;\r\n\t\t}\r\n\r\n\t\t$$.selectChart.html(\"\").classed(\"bb\", true);\r\n\r\n\t\t// Init data as targets\r\n\t\t$$.data.xs = {};\r\n\t\t$$.data.targets = $$.convertDataToTargets(data);\r\n\r\n\t\tif (config.data_filter) {\r\n\t\t\t$$.data.targets = $$.data.targets.filter(config.data_filter);\r\n\t\t}\r\n\r\n\t\t// Set targets to hide if needed\r\n\t\tif (config.data_hide) {\r\n\t\t\t$$.addHiddenTargetIds(\r\n\t\t\t\tconfig.data_hide === true ?\r\n\t\t\t\t\t$$.mapToIds($$.data.targets) : config.data_hide\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (config.legend_hide) {\r\n\t\t\t$$.addHiddenLegendIds(\r\n\t\t\t\tconfig.legend_hide === true ?\r\n\t\t\t\t\t$$.mapToIds($$.data.targets) : config.legend_hide\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// when gauge, hide legend // TODO: fix\r\n\t\tif ($$.hasType(\"gauge\")) {\r\n\t\t\tconfig.legend_show = false;\r\n\t\t}\r\n\r\n\t\t// Init sizes and scales\r\n\t\t$$.updateSizes();\r\n\t\t$$.updateScales();\r\n\r\n\t\t// Set domains for each scale\r\n\t\t$$.x.domain(d3Extent($$.getXDomain($$.data.targets)));\r\n\t\t$$.y.domain($$.getYDomain($$.data.targets, \"y\"));\r\n\t\t$$.y2.domain($$.getYDomain($$.data.targets, \"y2\"));\r\n\t\t$$.subX.domain($$.x.domain());\r\n\t\t$$.subY.domain($$.y.domain());\r\n\t\t$$.subY2.domain($$.y2.domain());\r\n\r\n\t\t// Save original x domain for zoom update\r\n\t\t$$.orgXDomain = $$.x.domain();\r\n\r\n\t\t// -- Basic Elements --\r\n\r\n\t\tconst isTouch = $$.inputType === \"touch\";\r\n\r\n\t\t// Define svg\r\n\t\t$$.svg = $$.selectChart.append(\"svg\")\r\n\t\t\t.style(\"overflow\", \"hidden\")\r\n\t\t\t.on(isTouch ? \"touchstart\" : \"mouseenter\", () => config.onover.call($$))\r\n\t\t\t.on(isTouch ? \"touchend\" : \"mouseleave\", () => config.onout.call($$));\r\n\r\n\t\t$$.config.svg_classname &&\r\n\t\t\t$$.svg.attr(\"class\", $$.config.svg_classname);\r\n\r\n\t\t// Define defs\r\n\t\tconst defs = $$.svg.append(\"defs\");\r\n\r\n\t\t$$.clipChart = $$.appendClip(defs, $$.clipId);\r\n\t\t$$.clipXAxis = $$.appendClip(defs, $$.clipIdForXAxis);\r\n\t\t$$.clipYAxis = $$.appendClip(defs, $$.clipIdForYAxis);\r\n\t\t$$.clipGrid = $$.appendClip(defs, $$.clipIdForGrid);\r\n\t\t$$.clipSubchart = $$.appendClip(defs, $$.clipIdForSubchart);\r\n\r\n\t\t$$.updateSvgSize();\r\n\r\n\t\t// Set initialized scales to brush and zoom\r\n\t\t// if ($$.brush) { $$.brush.scale($$.subX); }\r\n\t\t// if (config.zoom_enabled) { $$.zoom.scale($$.x); }\r\n\r\n\t\t// Define regions\r\n\t\tconst main = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"main\"));\r\n\r\n\t\t$$.main = main;\r\n\r\n\t\t// initialize subchart when subchart show option is set\r\n\t\tconfig.subchart_show &&\r\n\t\t\t$$.initSubchart &&\r\n\t\t\t\t$$.initSubchart();\r\n\r\n\t\t$$.initTooltip && $$.initTooltip();\r\n\t\t$$.initLegend && $$.initLegend();\r\n\t\t$$.initTitle && $$.initTitle();\r\n\r\n\t\t// -- Main Region --\r\n\r\n\t\t// text when empty\r\n\t\tmain.append(\"text\")\r\n\t\t\t.attr(\"class\", `${CLASS.text} ${CLASS.empty}`)\r\n\t\t\t.attr(\"text-anchor\", \"middle\") // horizontal centering of text at x position in all browsers.\r\n\t\t\t.attr(\"dominant-baseline\", \"middle\"); // vertical centering of text at y position in all browsers, except IE.\r\n\r\n\t\t// Regions\r\n\t\t$$.initRegion();\r\n\r\n\t\t// Grids\r\n\t\t$$.initGrid();\r\n\r\n\t\t// Define g for chart area\r\n\t\tmain.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPath)\r\n\t\t\t.attr(\"class\", CLASS.chart);\r\n\r\n\t\t// Grid lines\r\n\t\tconfig.grid_lines_front && $$.initGridLines();\r\n\r\n\t\t// Cover whole with rects for events\r\n\t\t$$.initEventRect();\r\n\r\n\t\t// Define g for chart\r\n\t\t$$.initChartElements();\r\n\r\n\t\t// if zoom privileged, insert rect to forefront\r\n\t\t// TODO: is this needed?\r\n\t\tmain.insert(\"rect\", config.zoom_privileged ? null : `g.${CLASS.regions}`)\r\n\t\t\t.attr(\"class\", CLASS.zoomRect)\r\n\t\t\t.attr(\"width\", $$.width)\r\n\t\t\t.attr(\"height\", $$.height)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.on(\"dblclick.zoom\", null);\r\n\r\n\t\t// Set default extent if defined\r\n\t\tconfig.axis_x_extent &&\r\n\t\t\t$$.brush.scale($$.getDefaultExtent());\r\n\r\n\t\t// Add Axis\r\n\t\t$$.axis.init();\r\n\r\n\t\t// Set targets\r\n\t\t$$.updateTargets($$.data.targets);\r\n\r\n\t\t// Draw with targets\r\n\t\tif (binding) {\r\n\t\t\t$$.updateDimension();\r\n\t\t\t$$.config.oninit.call($$);\r\n\r\n\t\t\t$$.redraw({\r\n\t\t\t\twithTransition: false,\r\n\t\t\t\twithTransform: true,\r\n\t\t\t\twithUpdateXDomain: true,\r\n\t\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\t\twithTransitionForAxis: false\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t// Bind resize event\r\n\t\t$$.bindResize();\r\n\r\n\t\t// export element of the chart\r\n\t\t$$.api.element = $$.selectChart.node();\r\n\t}\r\n\r\n\tinitChartElements() {\r\n\t\tthis.initBar && this.initBar();\r\n\t\tthis.initLine && this.initLine();\r\n\t\tthis.initArc && this.initArc();\r\n\t\tthis.initGauge && this.initGauge();\r\n\t\tthis.initText && this.initText();\r\n\t}\r\n\r\n\tsmoothLines(el, type) {\r\n\t\tif (type === \"grid\") {\r\n\t\t\tel.each(function() {\r\n\t\t\t\tconst g = d3Select(this);\r\n\t\t\t\tconst x1 = g.attr(\"x1\");\r\n\t\t\t\tconst x2 = g.attr(\"x2\");\r\n\t\t\t\tconst y1 = g.attr(\"y1\");\r\n\t\t\t\tconst y2 = g.attr(\"y2\");\r\n\r\n\t\t\t\tg.attr({\r\n\t\t\t\t\t\"x1\": Math.ceil(x1),\r\n\t\t\t\t\t\"x2\": Math.ceil(x2),\r\n\t\t\t\t\t\"y1\": Math.ceil(y1),\r\n\t\t\t\t\t\"y2\": Math.ceil(y2)\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\tupdateSizes() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst legendHeight = $$.legend ? $$.getLegendHeight() : 0;\r\n\t\tconst legendWidth = $$.legend ? $$.getLegendWidth() : 0;\r\n\t\tconst legendHeightForBottom = $$.isLegendRight || $$.isLegendInset ? 0 : legendHeight;\r\n\t\tconst hasArc = $$.hasArcType();\r\n\t\tconst xAxisHeight = config.axis_rotated || hasArc ? 0 : $$.getHorizontalAxisHeight(\"x\");\r\n\t\tconst subchartHeight = config.subchart_show && !hasArc ?\r\n\t\t\t(config.subchart_size_height + xAxisHeight) : 0;\r\n\r\n\t\t$$.currentWidth = $$.getCurrentWidth();\r\n\t\t$$.currentHeight = $$.getCurrentHeight();\r\n\r\n\t\t// for main\r\n\t\t$$.margin = config.axis_rotated ? {\r\n\t\t\ttop: $$.getHorizontalAxisHeight(\"y2\") + $$.getCurrentPaddingTop(),\r\n\t\t\tright: hasArc ? 0 : $$.getCurrentPaddingRight(),\r\n\t\t\tbottom: $$.getHorizontalAxisHeight(\"y\") + legendHeightForBottom + $$.getCurrentPaddingBottom(),\r\n\t\t\tleft: subchartHeight + (hasArc ? 0 : $$.getCurrentPaddingLeft())\r\n\t\t} : {\r\n\t\t\ttop: 4 + $$.getCurrentPaddingTop(), // for top tick text\r\n\t\t\tright: hasArc ? 0 : $$.getCurrentPaddingRight(),\r\n\t\t\tbottom: xAxisHeight + subchartHeight + legendHeightForBottom + $$.getCurrentPaddingBottom(),\r\n\t\t\tleft: hasArc ? 0 : $$.getCurrentPaddingLeft()\r\n\t\t};\r\n\r\n\t\t// for subchart\r\n\t\t$$.margin2 = config.axis_rotated ? {\r\n\t\t\ttop: $$.margin.top,\r\n\t\t\tright: NaN,\r\n\t\t\tbottom: 20 + legendHeightForBottom,\r\n\t\t\tleft: $$.rotated_padding_left\r\n\t\t} : {\r\n\t\t\ttop: $$.currentHeight - subchartHeight - legendHeightForBottom,\r\n\t\t\tright: NaN,\r\n\t\t\tbottom: xAxisHeight + legendHeightForBottom,\r\n\t\t\tleft: $$.margin.left\r\n\t\t};\r\n\r\n\t\t// for legend\r\n\t\t$$.margin3 = {\r\n\t\t\ttop: 0,\r\n\t\t\tright: NaN,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0\r\n\t\t};\r\n\r\n\t\tif ($$.updateSizeForLegend) {\r\n\t\t\t$$.updateSizeForLegend(legendHeight, legendWidth);\r\n\t\t}\r\n\r\n\t\t$$.width = $$.currentWidth - $$.margin.left - $$.margin.right;\r\n\t\t$$.height = $$.currentHeight - $$.margin.top - $$.margin.bottom;\r\n\r\n\t\tif ($$.width < 0) {\r\n\t\t\t$$.width = 0;\r\n\t\t}\r\n\r\n\t\tif ($$.height < 0) {\r\n\t\t\t$$.height = 0;\r\n\t\t}\r\n\r\n\t\t$$.width2 = config.axis_rotated ?\r\n\t\t\t$$.margin.left - $$.rotated_padding_left - $$.rotated_padding_right : $$.width;\r\n\r\n\t\t$$.height2 = config.axis_rotated ?\r\n\t\t\t$$.height : $$.currentHeight - $$.margin2.top - $$.margin2.bottom;\r\n\r\n\t\tif ($$.width2 < 0) { $$.width2 = 0; }\r\n\t\tif ($$.height2 < 0) { $$.height2 = 0; }\r\n\r\n\t\t// for arc\r\n\t\t$$.arcWidth = $$.width - ($$.isLegendRight ? legendWidth + 10 : 0);\r\n\t\t$$.arcHeight = $$.height - ($$.isLegendRight ? 0 : 10);\r\n\r\n\t\tif ($$.hasType(\"gauge\") && !config.gauge_fullCircle) {\r\n\t\t\t$$.arcHeight += $$.height - $$.getGaugeLabelHeight();\r\n\t\t}\r\n\r\n\t\t$$.updateRadius && $$.updateRadius();\r\n\r\n\t\tif ($$.isLegendRight && hasArc) {\r\n\t\t\t$$.margin3.left = $$.arcWidth / 2 + $$.radiusExpanded * 1.1;\r\n\t\t}\r\n\t}\r\n\r\n\tupdateTargets(targets) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t// -- Main --\r\n\r\n\t\t// -- Text -- //\r\n\t\t$$.updateTargetsForText(targets);\r\n\r\n\t\t// -- Bar -- //\r\n\t\t$$.updateTargetsForBar(targets);\r\n\r\n\t\t// -- Line -- //\r\n\t\t$$.updateTargetsForLine(targets);\r\n\r\n\t\t// -- Arc -- //\r\n\t\t$$.hasArcType() && $$.updateTargetsForArc &&\r\n\t\t\t$$.updateTargetsForArc(targets);\r\n\r\n\t\t// -- Sub --\r\n\t\t$$.updateTargetsForSubchart &&\r\n\t\t\t$$.updateTargetsForSubchart(targets);\r\n\r\n\t\t// Fade-in each chart\r\n\t\t$$.showTargets();\r\n\t}\r\n\r\n\tshowTargets() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.svg.selectAll(`.${CLASS.target}`)\r\n\t\t\t.filter(d => $$.isTargetToShow(d.id))\r\n\t\t\t.transition()\r\n\t\t\t.duration($$.config.transition_duration)\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\t}\r\n\r\n\tredraw(options = {}, transitionsValue) {\r\n\t\tconst $$ = this;\r\n\t\tconst main = $$.main;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tconst areaIndices = $$.getShapeIndices($$.isAreaType);\r\n\t\tconst barIndices = $$.getShapeIndices($$.isBarType);\r\n\t\tconst lineIndices = $$.getShapeIndices($$.isLineType);\r\n\r\n\t\tlet waitForDraw;\r\n\t\tlet flow;\r\n\r\n\t\tconst hideAxis = $$.hasArcType();\r\n\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\r\n\t\tconst xv = $$.xv.bind($$);\r\n\r\n\t\tlet tickValues;\r\n\t\tlet intervalForCulling;\r\n\t\tlet xDomainForZoom;\r\n\r\n\t\tconst withY = getOption(options, \"withY\", true);\r\n\t\tconst withSubchart = getOption(options, \"withSubchart\", true);\r\n\t\tconst withTransition = getOption(options, \"withTransition\", true);\r\n\t\tconst withTransform = getOption(options, \"withTransform\", false);\r\n\t\tconst withUpdateXDomain = getOption(options, \"withUpdateXDomain\", false);\r\n\t\tconst withUpdateOrgXDomain = getOption(options, \"withUpdateOrgXDomain\", false);\r\n\t\tconst withTrimXDomain = getOption(options, \"withTrimXDomain\", true);\r\n\t\tconst withUpdateXAxis = getOption(options, \"withUpdateXAxis\", withUpdateXDomain);\r\n\t\tconst withLegend = getOption(options, \"withLegend\", false);\r\n\t\tconst withEventRect = getOption(options, \"withEventRect\", true);\r\n\t\tconst withDimension = getOption(options, \"withDimension\", true);\r\n\t\tconst withTransitionForExit = getOption(options, \"withTransitionForExit\", withTransition);\r\n\t\tconst withTransitionForAxis = getOption(options, \"withTransitionForAxis\", withTransition);\r\n\r\n\t\tconst duration = withTransition ? config.transition_duration : 0;\r\n\t\tconst durationForExit = withTransitionForExit ? duration : 0;\r\n\t\tconst durationForAxis = withTransitionForAxis ? duration : 0;\r\n\r\n\t\tconst transitions = transitionsValue || $$.axis.generateTransitions(durationForAxis);\r\n\r\n\t\t$$.inputType === \"touch\" && $$.hideTooltip();\r\n\r\n\t\t// update legend and transform each g\r\n\t\tif (withLegend && config.legend_show) {\r\n\t\t\t$$.updateLegend($$.mapToIds($$.data.targets), options, transitions);\r\n\t\t} else if (withDimension) {\r\n\t\t\t// need to update dimension (e.g. axis.y.tick.values) because y tick values should change\r\n\t\t\t// no need to update axis in it because they will be updated in redraw()\r\n\t\t\t$$.updateDimension(true);\r\n\t\t}\r\n\r\n\t\t// MEMO: needed for grids calculation\r\n\t\tif ($$.isCategorized() && targetsToShow.length === 0) {\r\n\t\t\t$$.x.domain([0, $$.axes.x.selectAll(\".tick\").size()]);\r\n\t\t}\r\n\r\n\t\tif (targetsToShow.length) {\r\n\t\t\t$$.updateXDomain(targetsToShow, withUpdateXDomain, withUpdateOrgXDomain, withTrimXDomain);\r\n\t\t\tif (!config.axis_x_tick_values) {\r\n\t\t\t\ttickValues = $$.axis.updateXAxisTickValues(targetsToShow);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$$.xAxis.tickValues([]);\r\n\t\t\t$$.subXAxis.tickValues([]);\r\n\t\t}\r\n\r\n\t\tif (config.zoom_rescale && !options.flow) {\r\n\t\t\txDomainForZoom = $$.x.orgDomain();\r\n\t\t}\r\n\r\n\t\t$$.y.domain($$.getYDomain(targetsToShow, \"y\", xDomainForZoom));\r\n\t\t$$.y2.domain($$.getYDomain(targetsToShow, \"y2\", xDomainForZoom));\r\n\r\n\t\tif (!config.axis_y_tick_values && config.axis_y_tick_count) {\r\n\t\t\t$$.yAxis.tickValues(\r\n\t\t\t\t$$.axis.generateTickValues(\r\n\t\t\t\t\t$$.y.domain(),\r\n\t\t\t\t\tconfig.axis_y_tick_count,\r\n\t\t\t\t\t$$.isTimeSeriesY()\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tif (!config.axis_y2_tick_values && config.axis_y2_tick_count) {\r\n\t\t\t$$.y2Axis.tickValues(\r\n\t\t\t\t$$.axis.generateTickValues(\r\n\t\t\t\t\t$$.y2.domain(),\r\n\t\t\t\t\tconfig.axis_y2_tick_count\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// axes\r\n\t\t$$.axis.redraw(transitions, hideAxis);\r\n\r\n\t\t// Update axis label\r\n\t\t$$.axis.updateLabels(withTransition);\r\n\r\n\t\t// show/hide if manual culling needed\r\n\t\tif ((withUpdateXDomain || withUpdateXAxis) && targetsToShow.length) {\r\n\t\t\tif (config.axis_x_tick_culling && tickValues) {\r\n\t\t\t\tfor (let i = 1; i < tickValues.length; i++) {\r\n\t\t\t\t\tif (tickValues.length / i < config.axis_x_tick_culling_max) {\r\n\t\t\t\t\t\tintervalForCulling = i;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$$.svg.selectAll(`.${CLASS.axisX} .tick text`).each(function(e) {\r\n\t\t\t\t\tconst index = tickValues.indexOf(e);\r\n\r\n\t\t\t\t\tindex >= 0 &&\r\n\t\t\t\t\t\td3Select(this)\r\n\t\t\t\t\t\t\t.style(\"display\", index % intervalForCulling ? \"none\" : \"block\");\r\n\t\t\t\t});\r\n\t\t\t} else {\r\n\t\t\t\t$$.svg.selectAll(`.${CLASS.axisX} .tick text`)\r\n\t\t\t\t\t.style(\"display\", \"block\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// setup drawer - MEMO: these must be called after axis updated\r\n\t\tconst drawArea = $$.generateDrawArea ?\r\n\t\t\t$$.generateDrawArea(areaIndices, false) : undefined;\r\n\r\n\t\tconst drawBar = $$.generateDrawBar ?\r\n\t\t\t$$.generateDrawBar(barIndices) : undefined;\r\n\r\n\t\tconst drawLine = $$.generateDrawLine ?\r\n\t\t\t$$.generateDrawLine(lineIndices, false) : undefined;\r\n\r\n\t\tconst xForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, true);\r\n\t\tconst yForText = $$.generateXYForText(areaIndices, barIndices, lineIndices, false);\r\n\r\n\t\t// Update sub domain\r\n\t\tif (withY) {\r\n\t\t\t$$.subY.domain($$.getYDomain(targetsToShow, \"y\"));\r\n\t\t\t$$.subY2.domain($$.getYDomain(targetsToShow, \"y2\"));\r\n\t\t}\r\n\r\n\t\t// xgrid focus\r\n\t\t$$.updateXgridFocus();\r\n\r\n\t\t// Data empty label positioning and text.\r\n\t\tmain.select(`text.${CLASS.text}.${CLASS.empty}`)\r\n\t\t\t.attr(\"x\", $$.width / 2)\r\n\t\t\t.attr(\"y\", $$.height / 2)\r\n\t\t\t.text(config.data_empty_label_text)\r\n\t\t\t.transition()\r\n\t\t\t.style(\"opacity\", targetsToShow.length ? 0 : 1);\r\n\r\n\t\t// grid\r\n\t\t$$.updateGrid(duration);\r\n\r\n\t\t// rect for regions\r\n\t\t$$.updateRegion(duration);\r\n\r\n\t\t// bars\r\n\t\t$$.updateBar(durationForExit);\r\n\r\n\t\t// lines, areas and cricles\r\n\t\t$$.updateLine(durationForExit);\r\n\t\t$$.updateArea(durationForExit);\r\n\t\t$$.updateCircle();\r\n\r\n\t\t// text\r\n\t\t$$.hasDataLabel() &&\r\n\t\t\t$$.updateText(durationForExit);\r\n\r\n\t\t// title\r\n\t\t$$.redrawTitle && $$.redrawTitle();\r\n\r\n\t\t// arc\r\n\t\t$$.redrawArc &&\r\n\t\t\t$$.redrawArc(duration, durationForExit, withTransform);\r\n\r\n\t\t// subchart\r\n\t\tconfig.subchart_show &&\r\n\t\t\t$$.redrawSubchart &&\r\n\t\t\t\t$$.redrawSubchart(\r\n\t\t\t\t\twithSubchart,\r\n\t\t\t\t\ttransitions,\r\n\t\t\t\t\tduration,\r\n\t\t\t\t\tdurationForExit,\r\n\t\t\t\t\tareaIndices,\r\n\t\t\t\t\tbarIndices,\r\n\t\t\t\t\tlineIndices\r\n\t\t\t\t);\r\n\r\n\t\t// circles for select\r\n\t\tmain.selectAll(`.${CLASS.selectedCircles}`)\r\n\t\t\t.filter($$.isBarType.bind($$))\r\n\t\t\t.selectAll(\"circle\")\r\n\t\t\t.remove();\r\n\r\n\t\t// event rects will redrawn when flow called\r\n\t\tif (config.interaction_enabled && !options.flow && withEventRect) {\r\n\t\t\t$$.redrawEventRect();\r\n\t\t\t$$.updateZoom && $$.updateZoom();\r\n\t\t}\r\n\r\n\t\t// update circleY based on updated parameters\r\n\t\t$$.updateCircleY();\r\n\r\n\t\t// generate circle x/y functions depending on updated params\r\n\t\tconst cx = ($$.config.axis_rotated ? $$.circleY : $$.circleX).bind($$);\r\n\t\tconst cy = ($$.config.axis_rotated ? $$.circleX : $$.circleY).bind($$);\r\n\r\n\t\tif (options.flow) {\r\n\t\t\tflow = $$.generateFlow({\r\n\t\t\t\ttargets: targetsToShow,\r\n\t\t\t\tflow: options.flow,\r\n\t\t\t\tduration: options.flow.duration,\r\n\t\t\t\tdrawBar: drawBar,\r\n\t\t\t\tdrawLine: drawLine,\r\n\t\t\t\tdrawArea: drawArea,\r\n\t\t\t\tcx: cx,\r\n\t\t\t\tcy: cy,\r\n\t\t\t\txv: xv,\r\n\t\t\t\txForText: xForText,\r\n\t\t\t\tyForText: yForText\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tif ((duration || flow) && $$.isTabVisible()) { // Only use transition if tab visible. See #938.\r\n\t\t\t// transition should be derived from one transition\r\n\t\t\td3Transition().duration(duration)\r\n\t\t\t\t.each(() => {\r\n\t\t\t\t\t// Wait for end of transitions to call flow and onrendered callback\r\n\t\t\t\t\twaitForDraw = $$.generateWait();\r\n\r\n\t\t\t\t\t// redraw and gather transitions\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t$$.redrawBar(drawBar, true),\r\n\t\t\t\t\t\t$$.redrawLine(drawLine, true),\r\n\t\t\t\t\t\t$$.redrawArea(drawArea, true),\r\n\t\t\t\t\t\t$$.redrawCircle(cx, cy, true, flow),\r\n\t\t\t\t\t\t$$.redrawText(xForText, yForText, options.flow, true),\r\n\t\t\t\t\t\t$$.redrawRegion(true),\r\n\t\t\t\t\t\t$$.redrawGrid(true)\r\n\t\t\t\t\t].reduce((acc, t1) => {\r\n\t\t\t\t\t\tt1.forEach(t2 => {\r\n\t\t\t\t\t\t\tacc.push(t2);\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn acc;\r\n\t\t\t\t\t}, []).forEach(t => {\r\n\t\t\t\t\t\twaitForDraw.add(t);\r\n\t\t\t\t\t});\r\n\t\t\t\t})\r\n\t\t\t\t.call(waitForDraw, () => {\r\n\t\t\t\t\tflow && flow();\r\n\t\t\t\t\tconfig.onrendered && config.onrendered.call($$);\r\n\t\t\t\t});\r\n\t\t} else {\r\n\t\t\t$$.redrawBar(drawBar);\r\n\t\t\t$$.redrawLine(drawLine);\r\n\t\t\t$$.redrawArea(drawArea);\r\n\t\t\t$$.redrawCircle(cx, cy);\r\n\t\t\t$$.redrawText(xForText, yForText, options.flow);\r\n\t\t\t$$.redrawRegion();\r\n\t\t\t$$.redrawGrid();\r\n\r\n\t\t\tconfig.onrendered &&\r\n\t\t\t\tconfig.onrendered.call($$);\r\n\t\t}\r\n\r\n\t\t// update fadein condition\r\n\t\t$$.mapToIds($$.data.targets).forEach(id => {\r\n\t\t\t$$.withoutFadeIn[id] = true;\r\n\t\t});\r\n\t}\r\n\r\n\tupdateAndRedraw(options = {}) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet transitions;\r\n\r\n\t\t// same with redraw\r\n\t\toptions.withTransition = getOption(options, \"withTransition\", true);\r\n\t\toptions.withTransform = getOption(options, \"withTransform\", false);\r\n\t\toptions.withLegend = getOption(options, \"withLegend\", false);\r\n\r\n\t\t// NOT same with redraw\r\n\t\toptions.withUpdateXDomain = true;\r\n\t\toptions.withUpdateOrgXDomain = true;\r\n\t\toptions.withTransitionForExit = false;\r\n\t\toptions.withTransitionForTransform = getOption(options, \"withTransitionForTransform\", options.withTransition);\r\n\r\n\t\t// MEMO: this needs to be called before updateLegend and it means this ALWAYS needs to be called)\r\n\t\t$$.updateSizes();\r\n\r\n\t\t// MEMO: called in updateLegend in redraw if withLegend\r\n\t\tif (!(options.withLegend && config.legend_show)) {\r\n\t\t\ttransitions = $$.axis.generateTransitions(\r\n\t\t\t\toptions.withTransitionForAxis ? config.transition_duration : 0\r\n\t\t\t);\r\n\r\n\t\t\t// Update scales\r\n\t\t\t$$.updateScales();\r\n\t\t\t$$.updateSvgSize();\r\n\r\n\t\t\t// Update g positions\r\n\t\t\t$$.transformAll(options.withTransitionForTransform, transitions);\r\n\t\t}\r\n\r\n\t\t// Draw with new sizes & scales\r\n\t\t$$.redraw(options, transitions);\r\n\t}\r\n\r\n\tredrawWithoutRescale() {\r\n\t\tthis.redraw({\r\n\t\t\twithY: false,\r\n\t\t\twithSubchart: false,\r\n\t\t\twithEventRect: false,\r\n\t\t\twithTransitionForAxis: false\r\n\t\t});\r\n\t}\r\n\r\n\tisTimeSeries() {\r\n\t\treturn this.config.axis_x_type === \"timeseries\";\r\n\t}\r\n\r\n\tisCategorized() {\r\n\t\treturn this.config.axis_x_type.indexOf(\"categor\") >= 0;\r\n\t}\r\n\r\n\tisCustomX() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn !$$.isTimeSeries() && (config.data_x || notEmpty(config.data_xs));\r\n\t}\r\n\r\n\tisTimeSeriesY() {\r\n\t\treturn this.config.axis_y_type === \"timeseries\";\r\n\t}\r\n\r\n\tgetTranslate(target) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tlet x;\r\n\t\tlet y;\r\n\r\n\t\tif (target === \"main\") {\r\n\t\t\tx = asHalfPixel($$.margin.left);\r\n\t\t\ty = asHalfPixel($$.margin.top);\r\n\t\t} else if (target === \"context\") {\r\n\t\t\tx = asHalfPixel($$.margin2.left);\r\n\t\t\ty = asHalfPixel($$.margin2.top);\r\n\t\t} else if (target === \"legend\") {\r\n\t\t\tx = $$.margin3.left;\r\n\t\t\ty = $$.margin3.top;\r\n\t\t} else if (target === \"x\") {\r\n\t\t\tx = 0;\r\n\t\t\ty = config.axis_rotated ? 0 : $$.height;\r\n\t\t} else if (target === \"y\") {\r\n\t\t\tx = 0;\r\n\t\t\ty = config.axis_rotated ? $$.height : 0;\r\n\t\t} else if (target === \"y2\") {\r\n\t\t\tx = config.axis_rotated ? 0 : $$.width;\r\n\t\t\ty = config.axis_rotated ? 1 : 0;\r\n\t\t} else if (target === \"subx\") {\r\n\t\t\tx = 0;\r\n\t\t\ty = config.axis_rotated ? 0 : $$.height2;\r\n\t\t} else if (target === \"arc\") {\r\n\t\t\tx = $$.arcWidth / 2;\r\n\t\t\ty = $$.arcHeight / 2;\r\n\t\t}\r\n\r\n\t\treturn `translate(${x}, ${y})`;\r\n\t}\r\n\r\n\tinitialOpacity(d) {\r\n\t\treturn d.value !== null &&\r\n\t\t\tthis.withoutFadeIn[d.id] ? \"1\" : \"0\";\r\n\t}\r\n\r\n\tinitialOpacityForCircle(d) {\r\n\t\treturn d.value !== null &&\r\n\t\t\tthis.withoutFadeIn[d.id] ? this.opacityForCircle(d) : \"0\";\r\n\t}\r\n\r\n\topacityForCircle(d) {\r\n\t\tconst opacity = this.config.point_show ? \"1\" : \"0\";\r\n\r\n\t\treturn isValue(d.value) ? (this.isScatterType(d) ? \"0.5\" : opacity) : \"0\";\r\n\t}\r\n\r\n\topacityForText() {\r\n\t\treturn this.hasDataLabel() ? \"1\" : \"0\";\r\n\t}\r\n\r\n\txx(d) {\r\n\t\tif (this.config.zoom_enabled && this.zoomScale) {\r\n\t\t\treturn d ? this.zoomScale(d.x) : null;\r\n\t\t} else {\r\n\t\t\treturn d ? this.x(d.x) : null;\r\n\t\t}\r\n\t}\r\n\r\n\txv(d) {\r\n\t\tconst $$ = this;\r\n\t\tlet value = d.value;\r\n\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\tvalue = $$.parseDate(d.value);\r\n\t\t} else if ($$.isCategorized() && typeof d.value === \"string\") {\r\n\t\t\tvalue = $$.config.axis_x_categories.indexOf(d.value);\r\n\t\t}\r\n\r\n\t\treturn Math.ceil($$.x(value));\r\n\t}\r\n\r\n\tyv(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst yScale = d.axis && d.axis === \"y2\" ? $$.y2 : $$.y;\r\n\r\n\t\treturn Math.ceil(yScale(d.value));\r\n\t}\r\n\r\n\tsubxx(d) {\r\n\t\treturn d ? this.subX(d.x) : null;\r\n\t}\r\n\r\n\ttransformMain(withTransition, transitions) {\r\n\t\tconst $$ = this;\r\n\t\tlet xAxis;\r\n\t\tlet yAxis;\r\n\t\tlet y2Axis;\r\n\r\n\t\tif (transitions && transitions.axisX) {\r\n\t\t\txAxis = transitions.axisX;\r\n\t\t} else {\r\n\t\t\txAxis = $$.main.select(`.${CLASS.axisX}`);\r\n\r\n\t\t\tif (withTransition) {\r\n\t\t\t\txAxis = xAxis.transition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (transitions && transitions.axisY) {\r\n\t\t\tyAxis = transitions.axisY;\r\n\t\t} else {\r\n\t\t\tyAxis = $$.main.select(`.${CLASS.axisY}`);\r\n\r\n\t\t\tif (withTransition) {\r\n\t\t\t\tyAxis = yAxis.transition();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (transitions && transitions.axisY2) {\r\n\t\t\ty2Axis = transitions.axisY2;\r\n\t\t} else {\r\n\t\t\ty2Axis = $$.main.select(`.${CLASS.axisY2}`);\r\n\r\n\t\t\tif (withTransition) {\r\n\t\t\t\ty2Axis = y2Axis.transition();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t(withTransition ? $$.main.transition() : $$.main)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"main\"));\r\n\r\n\t\txAxis.attr(\"transform\", $$.getTranslate(\"x\"));\r\n\t\tyAxis.attr(\"transform\", $$.getTranslate(\"y\"));\r\n\t\ty2Axis.attr(\"transform\", $$.getTranslate(\"y2\"));\r\n\r\n\t\t$$.main.select(`.${CLASS.chartArcs}`)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"arc\"));\r\n\t}\r\n\r\n\ttransformAll(withTransition, transitions) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.transformMain(withTransition, transitions);\r\n\r\n\t\t$$.config.subchart_show &&\r\n\t\t\t$$.transformContext(withTransition, transitions);\r\n\r\n\t\t$$.legend &&\r\n\t\t\t$$.transformLegend(withTransition);\r\n\t}\r\n\r\n\tupdateSvgSize() {\r\n\t\tconst $$ = this;\r\n\t\tconst brush = $$.svg.select(`.${CLASS.brush} .overlay`);\r\n\t\tconst brushHeight = brush.size() ? brush.attr(\"height\") : 0;\r\n\r\n\t\t$$.svg\r\n\t\t\t.attr(\"width\", $$.currentWidth)\r\n\t\t\t.attr(\"height\", $$.currentHeight);\r\n\r\n\t\t$$.svg.selectAll([`#${$$.clipId}`, `#${$$.clipIdForGrid}`])\r\n\t\t\t.select(\"rect\")\r\n\t\t\t.attr(\"width\", $$.width)\r\n\t\t\t.attr(\"height\", $$.height);\r\n\r\n\t\t$$.svg.select(`#${$$.clipIdForXAxis}`)\r\n\t\t\t.select(\"rect\")\r\n\t\t\t.attr(\"x\", $$.getXAxisClipX.bind($$))\r\n\t\t\t.attr(\"y\", $$.getXAxisClipY.bind($$))\r\n\t\t\t.attr(\"width\", $$.getXAxisClipWidth.bind($$))\r\n\t\t\t.attr(\"height\", $$.getXAxisClipHeight.bind($$));\r\n\r\n\t\t$$.svg.select(`#${$$.clipIdForYAxis}`)\r\n\t\t\t.select(\"rect\")\r\n\t\t\t.attr(\"x\", $$.getYAxisClipX.bind($$))\r\n\t\t\t.attr(\"y\", $$.getYAxisClipY.bind($$))\r\n\t\t\t.attr(\"width\", $$.getYAxisClipWidth.bind($$))\r\n\t\t\t.attr(\"height\", $$.getYAxisClipHeight.bind($$));\r\n\r\n\t\t$$.svg.select(`#${$$.clipIdForSubchart}`)\r\n\t\t\t.select(\"rect\")\r\n\t\t\t.attr(\"width\", $$.width)\r\n\t\t\t.attr(\"height\", brushHeight);\r\n\r\n\t\t$$.svg.select(`.${CLASS.zoomRect}`)\r\n\t\t\t.attr(\"width\", $$.width)\r\n\t\t\t.attr(\"height\", $$.height);\r\n\r\n\t\t// MEMO: parent div\"s height will be bigger than svg when \r\n\t\t$$.selectChart.style(\"max-height\", `${$$.currentHeight}px`);\r\n\r\n\t\t$$.brush && $$.brush.scale($$.subX, brushHeight);\r\n\t}\r\n\r\n\tupdateDimension(withoutAxis) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif (!withoutAxis) {\r\n\t\t\tif ($$.config.axis_rotated) {\r\n\t\t\t\t$$.axes.x.call($$.xAxis);\r\n\t\t\t\t$$.axes.subx.call($$.subXAxis);\r\n\t\t\t} else {\r\n\t\t\t\t$$.axes.y.call($$.yAxis);\r\n\t\t\t\t$$.axes.y2.call($$.y2Axis);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$$.updateSizes();\r\n\r\n\t\t// pass 'withoutAxis' param to not animate at the init rendering\r\n\t\t$$.updateScales(withoutAxis);\r\n\r\n\t\t$$.updateSvgSize();\r\n\t\t$$.transformAll(false);\r\n\t}\r\n\r\n\tobserveInserted(selection) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif (typeof MutationObserver === \"undefined\") {\r\n\t\t\tconsole && console.error &&\r\n\t\t\t\tconsole.error(\"MutationObserver not defined.\");\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst observer = new MutationObserver(mutations => {\r\n\t\t\tmutations.forEach(mutation => {\r\n\t\t\t\tif (mutation.type === \"childList\" && mutation.previousSibling) {\r\n\t\t\t\t\tobserver.disconnect();\r\n\r\n\t\t\t\t\t// need to wait for completion of load because size calculation requires the actual sizes determined after that completion\r\n\t\t\t\t\t$$.intervalForObserveInserted = window.setInterval(() => {\r\n\t\t\t\t\t\t// parentNode will NOT be null when completed\r\n\t\t\t\t\t\tif (selection.node().parentNode) {\r\n\t\t\t\t\t\t\twindow.clearInterval($$.intervalForObserveInserted);\r\n\t\t\t\t\t\t\t$$.updateDimension();\r\n\r\n\t\t\t\t\t\t\t$$.brush && $$.brush.update();\r\n\t\t\t\t\t\t\t$$.config.oninit.call($$);\r\n\r\n\t\t\t\t\t\t\t$$.redraw({\r\n\t\t\t\t\t\t\t\twithTransform: true,\r\n\t\t\t\t\t\t\t\twithUpdateXDomain: true,\r\n\t\t\t\t\t\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\t\t\t\t\t\twithTransition: false,\r\n\t\t\t\t\t\t\t\twithTransitionForTransform: false,\r\n\t\t\t\t\t\t\t\twithLegend: true\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tselection.transition().style(\"opacity\", \"1\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}, 10);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\tobserver.observe(selection.node(), {\r\n\t\t\tattributes: true,\r\n\t\t\tchildList: true,\r\n\t\t\tcharacterData: true\r\n\t\t});\r\n\t}\r\n\r\n\tbindResize() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.resizeFunction = $$.generateResize();\r\n\r\n\t\t$$.resizeFunction.add(() => {\r\n\t\t\tconfig.onresize.call($$);\r\n\t\t});\r\n\r\n\t\tif (config.resize_auto) {\r\n\t\t\t$$.resizeFunction.add(() => {\r\n\t\t\t\tif ($$.resizeTimeout !== undefined) {\r\n\t\t\t\t\twindow.clearTimeout($$.resizeTimeout);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$$.resizeTimeout = window.setTimeout(() => {\r\n\t\t\t\t\tdelete $$.resizeTimeout;\r\n\t\t\t\t\t$$.api.flush();\r\n\t\t\t\t}, 100);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t$$.resizeFunction.add(() => {\r\n\t\t\tconfig.onresized.call($$);\r\n\t\t});\r\n\r\n\t\taddEvent(window, \"resize\", $$.resizeFunction);\r\n\r\n\t\t// if (window.attachEvent) {\r\n\t\t// \twindow.attachEvent(\"onresize\", $$.resizeFunction);\r\n\t\t// } else if (window.addEventListener) {\r\n\t\t// \twindow.addEventListener(\"resize\", $$.resizeFunction, false);\r\n\t\t// } else {\r\n\t\t// \t// fallback to this, if this is a very old browser\r\n\t\t// \tlet wrapper = window.onresize;\r\n\t\t// \tif (!wrapper) {\r\n\t\t// \t\t// create a wrapper that will call all charts\r\n\t\t// \t\twrapper = $$.generateResize();\r\n\t\t// \t} else if (!wrapper.add || !wrapper.remove) {\r\n\t\t// \t\t// there is already a handler registered, make sure we call it too\r\n\t\t// \t\twrapper = $$.generateResize();\r\n\t\t// \t\twrapper.add(window.onresize);\r\n\t\t// \t}\r\n\t\t// \t// add this graph to the wrapper, we will be removed if the user calls destroy\r\n\t\t// \twrapper.add($$.resizeFunction);\r\n\t\t// \twindow.onresize = wrapper;\r\n\t\t// }\r\n\t}\r\n\r\n\tgenerateResize() {\r\n\t\tconst resizeFunctions = [];\r\n\r\n\t\tfunction callResizeFunctions() {\r\n\t\t\tresizeFunctions.forEach(f => f());\r\n\t\t}\r\n\r\n\t\tcallResizeFunctions.add = function(f) {\r\n\t\t\tresizeFunctions.push(f);\r\n\t\t};\r\n\r\n\t\tcallResizeFunctions.remove = function(f) {\r\n\t\t\tfor (let i = 0; i < resizeFunctions.length; i++) {\r\n\t\t\t\tif (resizeFunctions[i] === f) {\r\n\t\t\t\t\tresizeFunctions.splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn callResizeFunctions;\r\n\t}\r\n\r\n\tendall(transition, callback) {\r\n\t\tlet n = 0;\r\n\r\n\t\ttransition\r\n\t\t\t.each(() => ++n)\r\n\t\t\t.on(\"end\", function(...args) {\r\n\t\t\t\t!--n && callback.apply(this, ...args);\r\n\t\t\t});\r\n\t}\r\n\r\n\tgenerateWait() {\r\n\t\tlet transitionsToWait = [];\r\n\t\tconst f = function(transition, callback) {\r\n\t\t\tlet timer;\r\n\r\n\t\t\tfunction loop() {\r\n\t\t\t\tlet done = 0;\r\n\r\n\t\t\t\ttransitionsToWait.forEach(t => {\r\n\t\t\t\t\tif (t.empty()) {\r\n\t\t\t\t\t\tdone += 1;\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tt.transition();\r\n\t\t\t\t\t} catch (e) {\r\n\t\t\t\t\t\tdone += 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tif (done === transitionsToWait.length) {\r\n\t\t\t\t\tclearTimeout(timer);\r\n\t\t\t\t\tcallback && callback();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttimer = setTimeout(loop, 20);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tloop();\r\n\t\t};\r\n\r\n\t\tf.add = function(transition) {\r\n\t\t\tif (Array.isArray(transition)) {\r\n\t\t\t\ttransitionsToWait = [...transitionsToWait, ...transition];\r\n\t\t\t} else {\r\n\t\t\t\ttransitionsToWait.push(transition);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn f;\r\n\t}\r\n\r\n\tparseDate(date) {\r\n\t\tconst $$ = this;\r\n\t\tlet parsedDate;\r\n\r\n\t\tif (date instanceof Date) {\r\n\t\t\tparsedDate = date;\r\n\t\t} else if (typeof date === \"string\") {\r\n\t\t\tparsedDate = $$.dataTimeFormat($$.config.data_xFormat)(date);\r\n\t\t} else if (typeof date === \"number\" && !isNaN(date)) {\r\n\t\t\tparsedDate = new Date(+date);\r\n\t\t}\r\n\t\tif (!parsedDate || isNaN(+parsedDate)) {\r\n\t\t\tconsole && console.error &&\r\n\t\t\t\tconsole.error(`Failed to parse x '${date}' to Date object`);\r\n\t\t}\r\n\r\n\t\treturn parsedDate;\r\n\t}\r\n\r\n\tisTabVisible() {\r\n\t\tlet hidden;\r\n\r\n\t\tif (typeof document.hidden !== \"undefined\") { // Opera 12.10 and Firefox 18 and later support\r\n\t\t\thidden = \"hidden\";\r\n\t\t} else if (typeof document.mozHidden !== \"undefined\") {\r\n\t\t\thidden = \"mozHidden\";\r\n\t\t} else if (typeof document.msHidden !== \"undefined\") {\r\n\t\t\thidden = \"msHidden\";\r\n\t\t} else if (typeof document.webkitHidden !== \"undefined\") {\r\n\t\t\thidden = \"webkitHidden\";\r\n\t\t}\r\n\r\n\t\treturn !document[hidden];\r\n\t}\r\n\r\n\tconvertInputType() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst hasMouse = config.interaction_inputType_mouse ? !!(\"onmouseover\" in window) : false;\r\n\t\tlet hasTouch;\r\n\r\n\t\tif (config.interaction_inputType_touch) {\r\n\t\t\t// Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js\r\n\t\t\thasTouch = (\"ontouchstart\" in window) || (window.DocumentTouch && document instanceof window.DocumentTouch);\r\n\r\n\t\t\t// https://github.com/ariya/phantomjs/issues/10375\r\n\t\t\tif (/PhantomJS/.test(window.navigator.userAgent)) {\r\n\t\t\t\thasTouch = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thasTouch = false;\r\n\t\t}\r\n\r\n\t\treturn (hasTouch && \"touch\") || (hasMouse && \"mouse\") || null;\r\n\t}\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/ChartInternal.js","module.exports = __WEBPACK_EXTERNAL_MODULE_2__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"d3\"\n// module id = 2\n// module chunks = 0 1","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nconst CLASS = {\r\n\ttarget: \"bb-target\",\r\n\tchart: \"bb-chart\",\r\n\tchartLine: \"bb-chart-line\",\r\n\tchartLines: \"bb-chart-lines\",\r\n\tchartBar: \"bb-chart-bar\",\r\n\tchartBars: \"bb-chart-bars\",\r\n\tchartText: \"bb-chart-text\",\r\n\tchartTexts: \"bb-chart-texts\",\r\n\tchartArc: \"bb-chart-arc\",\r\n\tchartArcs: \"bb-chart-arcs\",\r\n\tchartArcsTitle: \"bb-chart-arcs-title\",\r\n\tchartArcsBackground: \"bb-chart-arcs-background\",\r\n\tchartArcsGaugeUnit: \"bb-chart-arcs-gauge-unit\",\r\n\tchartArcsGaugeMax: \"bb-chart-arcs-gauge-max\",\r\n\tchartArcsGaugeMin: \"bb-chart-arcs-gauge-min\",\r\n\tselectedCircle: \"bb-selected-circle\",\r\n\tselectedCircles: \"bb-selected-circles\",\r\n\teventRect: \"bb-event-rect\",\r\n\teventRects: \"bb-event-rects\",\r\n\teventRectsSingle: \"bb-event-rects-single\",\r\n\teventRectsMultiple: \"bb-event-rects-multiple\",\r\n\tzoomRect: \"bb-zoom-rect\",\r\n\tbrush: \"bb-brush\",\r\n\tfocused: \"bb-focused\",\r\n\tdefocused: \"bb-defocused\",\r\n\tregion: \"bb-region\",\r\n\tregions: \"bb-regions\",\r\n\ttitle: \"bb-title\",\r\n\ttooltipContainer: \"bb-tooltip-container\",\r\n\ttooltip: \"bb-tooltip\",\r\n\ttooltipName: \"bb-tooltip-name\",\r\n\tshape: \"bb-shape\",\r\n\tshapes: \"bb-shapes\",\r\n\tline: \"bb-line\",\r\n\tlines: \"bb-lines\",\r\n\tbar: \"bb-bar\",\r\n\tbars: \"bb-bars\",\r\n\tcircle: \"bb-circle\",\r\n\tcircles: \"bb-circles\",\r\n\tarc: \"bb-arc\",\r\n\tarcs: \"bb-arcs\",\r\n\tarea: \"bb-area\",\r\n\tareas: \"bb-areas\",\r\n\tempty: \"bb-empty\",\r\n\ttext: \"bb-text\",\r\n\ttexts: \"bb-texts\",\r\n\tgaugeValue: \"bb-gauge-value\",\r\n\tgrid: \"bb-grid\",\r\n\tgridLines: \"bb-grid-lines\",\r\n\txgrid: \"bb-xgrid\",\r\n\txgrids: \"bb-xgrids\",\r\n\txgridLine: \"bb-xgrid-line\",\r\n\txgridLines: \"bb-xgrid-lines\",\r\n\txgridFocus: \"bb-xgrid-focus\",\r\n\tygrid: \"bb-ygrid\",\r\n\tygrids: \"bb-ygrids\",\r\n\tygridLine: \"bb-ygrid-line\",\r\n\tygridLines: \"bb-ygrid-lines\",\r\n\taxis: \"bb-axis\",\r\n\taxisX: \"bb-axis-x\",\r\n\taxisXLabel: \"bb-axis-x-label\",\r\n\taxisY: \"bb-axis-y\",\r\n\taxisYLabel: \"bb-axis-y-label\",\r\n\taxisY2: \"bb-axis-y2\",\r\n\taxisY2Label: \"bb-axis-y2-label\",\r\n\tlegendBackground: \"bb-legend-background\",\r\n\tlegendItem: \"bb-legend-item\",\r\n\tlegendItemEvent: \"bb-legend-item-event\",\r\n\tlegendItemTile: \"bb-legend-item-tile\",\r\n\tlegendItemHidden: \"bb-legend-item-hidden\",\r\n\tlegendItemFocused: \"bb-legend-item-focused\",\r\n\tdragarea: \"bb-dragarea\",\r\n\tEXPANDED: \"_expanded_\",\r\n\tSELECTED: \"_selected_\",\r\n\tINCLUDED: \"_included_\"\r\n};\r\n\r\nexport default CLASS;\r\n\n\n\n// WEBPACK FOOTER //\n// src/config/classes.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n * @license MIT\r\n * @ignore\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\n\r\n/**\r\n * Main chart class.\r\n * - Note: Instantiated via `bb.generate()`.\r\n * @class Chart\r\n * @example\r\n * var chart = bb.generate({\r\n * data: {\r\n * columns: [\r\n *\t [\"x\", \"2015-11-02\", \"2015-12-01\", \"2016-01-01\", \"2016-02-01\", \"2016-03-01\"],\r\n * \t [\"count1\", 11, 8, 7, 6, 5 ],\r\n *\t [\"count2\", 9, 3, 6, 2, 8 ]\r\n * ]}\r\n * }\r\n * @see {@link bb.generate} for the initialization.\r\n*/\r\nexport default class Chart {\r\n\tconstructor(config) {\r\n\t\tconst $$ = new ChartInternal(this);\r\n\r\n\t\tthis.internal = $$;\r\n\r\n\t\t$$.loadConfig(config);\r\n\t\t$$.beforeInit(config);\r\n\t\t$$.init();\r\n\t\t$$.afterInit(config);\r\n\r\n\t\t// bind \"this\" to nested API\r\n\t\t(function bindThis(fn, target, argThis) {\r\n\t\t\tObject.keys(fn).forEach(key => {\r\n\t\t\t\ttarget[key] = fn[key].bind(argThis);\r\n\r\n\t\t\t\tObject.keys(fn[key]).length &&\r\n\t\t\t\t\tbindThis(fn[key], target[key], argThis);\r\n\t\t\t});\r\n\t\t})(Chart.prototype, this, this);\r\n\t}\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/Chart.js","\"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\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-helper-modules/lib/typeof.js\n// module id = 5\n// module chunks = 0 1","\"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\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/babel-helper-modules/lib/classCallCheck.js\n// module id = 6\n// module chunks = 0 1","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {select as d3Select} from \"d3\";\r\nimport {\r\n\tisFunction,\r\n\tisString,\r\n\tisValue,\r\n\tisEmpty\r\n} from \"../internals/util\";\r\nimport bbAxis from \"./bb.axis\";\r\nimport CLASS from \"../config/classes\";\r\n\r\nexport default class Axis {\r\n\tconstructor(owner) {\r\n\t\tthis.owner = owner;\r\n\t}\r\n\r\n\tinit() {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tconst main = $$.main;\r\n\r\n\t\t$$.axes.x = main.append(\"g\")\r\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisX}`)\r\n\t\t\t.attr(\"clip-path\", $$.clipPathForXAxis)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"x\"))\r\n\t\t\t.style(\"visibility\", config.axis_x_show ? \"visible\" : \"hidden\");\r\n\r\n\t\t$$.axes.x.append(\"text\")\r\n\t\t\t.attr(\"class\", CLASS.axisXLabel)\r\n\t\t\t.attr(\"transform\", config.axis_rotated ? \"rotate(-90)\" : \"\")\r\n\t\t\t.style(\"text-anchor\", this.textAnchorForXAxisLabel.bind(this));\r\n\r\n\t\t$$.axes.y = main.append(\"g\")\r\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisY}`)\r\n\t\t\t.attr(\"clip-path\", config.axis_y_inner ? \"\" : $$.clipPathForYAxis)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"y\"))\r\n\t\t\t.style(\"visibility\", config.axis_y_show ? \"visible\" : \"hidden\");\r\n\r\n\t\t$$.axes.y.append(\"text\")\r\n\t\t\t.attr(\"class\", CLASS.axisYLabel)\r\n\t\t\t.attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\r\n\t\t\t.style(\"text-anchor\", this.textAnchorForYAxisLabel.bind(this));\r\n\r\n\t\t$$.axes.y2 = main.append(\"g\")\r\n\t\t\t.attr(\"class\", `${CLASS.axis} ${CLASS.axisY2}`)\r\n\t\t\t// clip-path?\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"y2\"))\r\n\t\t\t.style(\"visibility\", config.axis_y2_show ? \"visible\" : \"hidden\");\r\n\r\n\t\t$$.axes.y2.append(\"text\")\r\n\t\t\t.attr(\"class\", CLASS.axisY2Label)\r\n\t\t\t.attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\r\n\t\t\t.style(\"text-anchor\", this.textAnchorForY2AxisLabel.bind(this));\r\n\t}\r\n\r\n\tgetXAxis(scale, orient, tickFormat,\r\n\t\ttickValues, withOuterTick, withoutTransition, withoutRotateTickText) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tconst axisParams = {\r\n\t\t\tisCategory: $$.isCategorized(),\r\n\t\t\twithOuterTick,\r\n\t\t\ttickMultiline: config.axis_x_tick_multiline,\r\n\t\t\ttickWidth: config.axis_x_tick_width,\r\n\t\t\ttickTextRotate: withoutRotateTickText ? 0 : config.axis_x_tick_rotate,\r\n\t\t\twithoutTransition,\r\n\t\t};\r\n\r\n\t\tconst axis = bbAxis(axisParams)\r\n\t\t\t.scale(scale)\r\n\t\t\t.orient(orient);\r\n\r\n\t\tlet newTickValues = tickValues;\r\n\r\n\t\tif ($$.isTimeSeries() && tickValues && typeof tickValues !== \"function\") {\r\n\t\t\tnewTickValues = tickValues.map(v => $$.parseDate(v));\r\n\t\t}\r\n\r\n\t\t// Set tick\r\n\t\taxis.tickFormat(tickFormat).tickValues(newTickValues);\r\n\r\n\t\tif ($$.isCategorized()) {\r\n\t\t\taxis.tickCentered(config.axis_x_tick_centered);\r\n\t\t\tif (isEmpty(config.axis_x_tick_culling)) {\r\n\t\t\t\tconfig.axis_x_tick_culling = false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn axis;\r\n\t}\r\n\r\n\tupdateXAxisTickValues(targets, axis) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tlet tickValues;\r\n\r\n\t\tif (config.axis_x_tick_fit || config.axis_x_tick_count) {\r\n\t\t\ttickValues = this.generateTickValues(\r\n\t\t\t\t$$.mapTargetsToUniqueXs(targets),\r\n\t\t\t\tconfig.axis_x_tick_count,\r\n\t\t\t\t$$.isTimeSeries()\r\n\t\t\t);\r\n\t\t}\r\n\t\tif (axis) {\r\n\t\t\taxis.tickValues(tickValues);\r\n\t\t} else {\r\n\t\t\t$$.xAxis.tickValues(tickValues);\r\n\t\t\t$$.subXAxis.tickValues(tickValues);\r\n\t\t}\r\n\t\treturn tickValues;\r\n\t}\r\n\r\n\tgetYAxis(scale, orient, tickFormat, tickValues,\r\n\t\twithOuterTick, withoutTransition, withoutRotateTickText) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tconst axisParams = {\r\n\t\t\twithOuterTick,\r\n\t\t\twithoutTransition,\r\n\t\t\ttickTextRotate: withoutRotateTickText ? 0 : config.axis_y_tick_rotate,\r\n\t\t};\r\n\t\tconst axis = bbAxis(axisParams)\r\n\t\t\t.scale(scale)\r\n\t\t\t.orient(orient)\r\n\t\t\t.tickFormat(tickFormat);\r\n\r\n\t\tif ($$.isTimeSeriesY()) {\r\n\t\t\t// https://github.com/d3/d3/blob/master/CHANGES.md#time-intervals-d3-time\r\n\t\t\taxis.ticks(config.axis_y_tick_time_value);\r\n\t\t} else {\r\n\t\t\taxis.tickValues(tickValues);\r\n\t\t}\r\n\t\treturn axis;\r\n\t}\r\n\r\n\tgetId(id) {\r\n\t\tconst config = this.owner.config;\r\n\r\n\t\treturn id in config.data_axes ? config.data_axes[id] : \"y\";\r\n\t}\r\n\r\n\tgetXAxisTickFormat() {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tlet format;\r\n\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\tformat = $$.defaultAxisTimeFormat;\r\n\t\t} else {\r\n\t\t\tformat = $$.isCategorized() ?\r\n\t\t\t\t$$.categoryName : function(v) {\r\n\t\t\t\t\treturn v < 0 ? v.toFixed(0) : v;\r\n\t\t\t\t};\r\n\t\t}\r\n\r\n\t\tif (config.axis_x_tick_format) {\r\n\t\t\tif (isFunction(config.axis_x_tick_format)) {\r\n\t\t\t\tformat = config.axis_x_tick_format;\r\n\t\t\t} else if ($$.isTimeSeries()) {\r\n\t\t\t\tformat = date => (date ? $$.axisTimeFormat(config.axis_x_tick_format)(date) : \"\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn isFunction(format) ? function(v) {\r\n\t\t\treturn format.call($$, v);\r\n\t\t} : format;\r\n\t}\r\n\r\n\tgetTickValues(tickValues, axis) {\r\n\t\tlet values;\r\n\r\n\t\tif (tickValues) {\r\n\t\t\tvalues = tickValues;\r\n\t\t} else {\r\n\t\t\tvalues = axis ? axis.tickValues() : undefined;\r\n\t\t}\r\n\t\treturn values;\r\n\t}\r\n\r\n\tgetXAxisTickValues() {\r\n\t\treturn this.getTickValues(this.owner.config.axis_x_tick_values, this.owner.xAxis);\r\n\t}\r\n\r\n\tgetYAxisTickValues() {\r\n\t\treturn this.getTickValues(this.owner.config.axis_y_tick_values, this.owner.yAxis);\r\n\t}\r\n\r\n\tgetY2AxisTickValues() {\r\n\t\treturn this.getTickValues(this.owner.config.axis_y2_tick_values, this.owner.y2Axis);\r\n\t}\r\n\r\n\tgetLabelOptionByAxisId(axisId) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tlet option;\r\n\r\n\t\tif (axisId === \"y\") {\r\n\t\t\toption = config.axis_y_label;\r\n\t\t} else if (axisId === \"y2\") {\r\n\t\t\toption = config.axis_y2_label;\r\n\t\t} else if (axisId === \"x\") {\r\n\t\t\toption = config.axis_x_label;\r\n\t\t}\r\n\t\treturn option;\r\n\t}\r\n\r\n\tgetLabelText(axisId) {\r\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\r\n\t\tlet text;\r\n\r\n\t\tif (isString(option)) {\r\n\t\t\ttext = option;\r\n\t\t} else {\r\n\t\t\ttext = option ? option.text : null;\r\n\t\t}\r\n\t\treturn text;\r\n\t}\r\n\r\n\tsetLabelText(axisId, text) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\r\n\r\n\t\tif (isString(option)) {\r\n\t\t\tif (axisId === \"y\") {\r\n\t\t\t\tconfig.axis_y_label = text;\r\n\t\t\t} else if (axisId === \"y2\") {\r\n\t\t\t\tconfig.axis_y2_label = text;\r\n\t\t\t} else if (axisId === \"x\") {\r\n\t\t\t\tconfig.axis_x_label = text;\r\n\t\t\t}\r\n\t\t} else if (option) {\r\n\t\t\toption.text = text;\r\n\t\t}\r\n\t}\r\n\r\n\tgetLabelPosition(axisId, defaultPosition) {\r\n\t\tconst option = this.getLabelOptionByAxisId(axisId);\r\n\t\tconst position = (typeof option === \"object\" && option.position) ? option.position : defaultPosition;\r\n\r\n\t\treturn {\r\n\t\t\tisInner: !!~position.indexOf(\"inner\"),\r\n\t\t\tisOuter: !!~position.indexOf(\"outer\"),\r\n\t\t\tisLeft: !!~position.indexOf(\"left\"),\r\n\t\t\tisCenter: !!~position.indexOf(\"center\"),\r\n\t\t\tisRight: !!~position.indexOf(\"right\"),\r\n\t\t\tisTop: !!~position.indexOf(\"top\"),\r\n\t\t\tisMiddle: !!~position.indexOf(\"middle\"),\r\n\t\t\tisBottom: !!~position.indexOf(\"bottom\"),\r\n\t\t};\r\n\t}\r\n\r\n\tgetXAxisLabelPosition() {\r\n\t\treturn this.getLabelPosition(\"x\", this.owner.config.axis_rotated ? \"inner-top\" : \"inner-right\");\r\n\t}\r\n\r\n\tgetYAxisLabelPosition() {\r\n\t\treturn this.getLabelPosition(\"y\", this.owner.config.axis_rotated ? \"inner-right\" : \"inner-top\");\r\n\t}\r\n\r\n\tgetY2AxisLabelPosition() {\r\n\t\treturn this.getLabelPosition(\"y2\", this.owner.config.axis_rotated ? \"inner-right\" : \"inner-top\");\r\n\t}\r\n\r\n\tgetLabelPositionById(id) {\r\n\t\tlet label;\r\n\r\n\t\tif (id === \"y2\") {\r\n\t\t\tlabel = this.getY2AxisLabelPosition();\r\n\t\t} else {\r\n\t\t\tlabel = id === \"y\" ? this.getYAxisLabelPosition() : this.getXAxisLabelPosition();\r\n\t\t}\r\n\t\treturn label;\r\n\t}\r\n\r\n\ttextForXAxisLabel() {\r\n\t\treturn this.getLabelText(\"x\");\r\n\t}\r\n\r\n\ttextForYAxisLabel() {\r\n\t\treturn this.getLabelText(\"y\");\r\n\t}\r\n\r\n\ttextForY2AxisLabel() {\r\n\t\treturn this.getLabelText(\"y2\");\r\n\t}\r\n\r\n\txForAxisLabel(forHorizontal, position) {\r\n\t\tconst $$ = this.owner;\r\n\t\tlet x;\r\n\r\n\t\tif (forHorizontal) {\r\n\t\t\tif (position.isLeft) {\r\n\t\t\t\tx = 0;\r\n\t\t\t} else {\r\n\t\t\t\tx = position.isCenter ? $$.width / 2 : $$.width;\r\n\t\t\t}\r\n\t\t} else if (position.isBottom) {\r\n\t\t\tx = -$$.height;\r\n\t\t} else {\r\n\t\t\tx = position.isMiddle ? -$$.height / 2 : 0;\r\n\t\t}\r\n\t\treturn x;\r\n\t}\r\n\r\n\tdxForAxisLabel(forHorizontal, position) {\r\n\t\tlet dx;\r\n\r\n\t\tif (forHorizontal) {\r\n\t\t\tif (position.isLeft) {\r\n\t\t\t\tdx = \"0.5em\";\r\n\t\t\t} else {\r\n\t\t\t\tdx = position.isRight ? \"-0.5em\" : \"0\";\r\n\t\t\t}\r\n\t\t} else if (position.isTop) {\r\n\t\t\tdx = \"-0.5em\";\r\n\t\t} else {\r\n\t\t\tdx = position.isBottom ? \"0.5em\" : \"0\";\r\n\t\t}\r\n\t\treturn dx;\r\n\t}\r\n\r\n\ttextAnchorForAxisLabel(forHorizontal, position) {\r\n\t\tlet anchor;\r\n\r\n\t\tif (forHorizontal) {\r\n\t\t\tif (position.isLeft) {\r\n\t\t\t\tanchor = \"start\";\r\n\t\t\t} else {\r\n\t\t\t\tanchor = position.isCenter ? \"middle\" : \"end\";\r\n\t\t\t}\r\n\t\t} else if (position.isBottom) {\r\n\t\t\tanchor = \"start\";\r\n\t\t} else {\r\n\t\t\tanchor = position.isMiddle ? \"middle\" : \"end\";\r\n\t\t}\r\n\t\treturn anchor;\r\n\t}\r\n\r\n\txForXAxisLabel() {\r\n\t\treturn this.xForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());\r\n\t}\r\n\r\n\txForYAxisLabel() {\r\n\t\treturn this.xForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\r\n\t}\r\n\r\n\txForY2AxisLabel() {\r\n\t\treturn this.xForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());\r\n\t}\r\n\r\n\tdxForXAxisLabel() {\r\n\t\treturn this.dxForAxisLabel(!this.owner.config.axis_rotated, this.getXAxisLabelPosition());\r\n\t}\r\n\r\n\tdxForYAxisLabel() {\r\n\t\treturn this.dxForAxisLabel(this.owner.config.axis_rotated, this.getYAxisLabelPosition());\r\n\t}\r\n\r\n\tdxForY2AxisLabel() {\r\n\t\treturn this.dxForAxisLabel(this.owner.config.axis_rotated, this.getY2AxisLabelPosition());\r\n\t}\r\n\r\n\tdyForXAxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tconst position = this.getXAxisLabelPosition();\r\n\r\n\t\tif (config.axis_rotated) {\r\n\t\t\treturn position.isInner ? \"1.2em\" : -25 - this.getMaxTickWidth(\"x\");\r\n\t\t} else if (position.isInner) {\r\n\t\t\treturn \"-0.5em\";\r\n\t\t} else if (config.axis_x_height) {\r\n\t\t\treturn config.axis_x_height - 10;\r\n\t\t} else {\r\n\t\t\treturn \"3em\";\r\n\t\t}\r\n\t}\r\n\r\n\tdyForYAxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst position = this.getYAxisLabelPosition();\r\n\r\n\t\tif ($$.config.axis_rotated) {\r\n\t\t\treturn position.isInner ? \"-0.5em\" : \"3em\";\r\n\t\t} else {\r\n\t\t\treturn position.isInner ? \"1.2em\" : -10 - ($$.config.axis_y_inner ? 0 : (this.getMaxTickWidth(\"y\") + 10));\r\n\t\t}\r\n\t}\r\n\r\n\tdyForY2AxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst position = this.getY2AxisLabelPosition();\r\n\r\n\t\tif ($$.config.axis_rotated) {\r\n\t\t\treturn position.isInner ? \"1.2em\" : \"-2.2em\";\r\n\t\t} else {\r\n\t\t\treturn position.isInner ? \"-0.5em\" : 15 + ($$.config.axis_y2_inner ? 0 : (this.getMaxTickWidth(\"y2\") + 15));\r\n\t\t}\r\n\t}\r\n\r\n\ttextAnchorForXAxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\r\n\t\treturn this.textAnchorForAxisLabel(!$$.config.axis_rotated, this.getXAxisLabelPosition());\r\n\t}\r\n\r\n\ttextAnchorForYAxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\r\n\t\treturn this.textAnchorForAxisLabel($$.config.axis_rotated, this.getYAxisLabelPosition());\r\n\t}\r\n\r\n\ttextAnchorForY2AxisLabel() {\r\n\t\tconst $$ = this.owner;\r\n\r\n\t\treturn this.textAnchorForAxisLabel($$.config.axis_rotated, this.getY2AxisLabelPosition());\r\n\t}\r\n\r\n\tgetMaxTickWidth(id, withoutRecompute) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst config = $$.config;\r\n\t\tlet maxWidth = 0;\r\n\t\tlet dummy;\r\n\t\tlet svg;\r\n\r\n\t\tif (withoutRecompute && $$.currentMaxTickWidths[id]) {\r\n\t\t\treturn $$.currentMaxTickWidths[id];\r\n\t\t}\r\n\r\n\t\tif ($$.svg) {\r\n\t\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\r\n\t\t\tlet scale;\r\n\t\t\tlet axis;\r\n\r\n\t\t\tif (id === \"y\") {\r\n\t\t\t\tscale = $$.y.copy().domain($$.getYDomain(targetsToShow, \"y\"));\r\n\t\t\t\taxis = this.getYAxis(\r\n\t\t\t\t\tscale,\r\n\t\t\t\t\t$$.yOrient,\r\n\t\t\t\t\tconfig.axis_y_tick_format,\r\n\t\t\t\t\t$$.yAxisTickValues,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t} else if (id === \"y2\") {\r\n\t\t\t\tscale = $$.y2.copy().domain($$.getYDomain(targetsToShow, \"y2\"));\r\n\t\t\t\taxis = this.getYAxis(\r\n\t\t\t\t\tscale,\r\n\t\t\t\t\t$$.y2Orient,\r\n\t\t\t\t\tconfig.axis_y2_tick_format,\r\n\t\t\t\t\t$$.y2AxisTickValues,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\tscale = $$.x.copy().domain($$.getXDomain(targetsToShow));\r\n\t\t\t\taxis = this.getXAxis(\r\n\t\t\t\t\tscale,\r\n\t\t\t\t\t$$.xOrient,\r\n\t\t\t\t\t$$.xAxisTickFormat,\r\n\t\t\t\t\t$$.xAxisTickValues,\r\n\t\t\t\t\tfalse,\r\n\t\t\t\t\ttrue,\r\n\t\t\t\t\ttrue\r\n\t\t\t\t);\r\n\t\t\t\tthis.updateXAxisTickValues(targetsToShow, axis);\r\n\t\t\t}\r\n\r\n\t\t\tdummy = d3Select(\"body\")\r\n\t\t\t\t.append(\"div\")\r\n\t\t\t\t.classed(\"bb\", true);\r\n\r\n\t\t\tsvg = dummy.append(\"svg\")\r\n\t\t\t\t.style(\"visibility\", \"hidden\")\r\n\t\t\t\t.style(\"position\", \"fixed\")\r\n\t\t\t\t.style(\"top\", \"0px\")\r\n\t\t\t\t.style(\"left\", \"0px\");\r\n\r\n\r\n\t\t\tsvg.append(\"g\").call(axis)\r\n\t\t\t\t.each(function() {\r\n\t\t\t\t\td3Select(this).selectAll(\"text\")\r\n\t\t\t\t\t\t.each(function() {\r\n\t\t\t\t\t\t\tconst box = this.getBoundingClientRect();\r\n\r\n\t\t\t\t\t\t\tif (maxWidth < box.width) { maxWidth = box.width; }\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\tdummy.remove();\r\n\t\t\t\t});\r\n\t\t}\r\n\t\t$$.currentMaxTickWidths[id] = maxWidth <= 0 ? $$.currentMaxTickWidths[id] : maxWidth;\r\n\t\treturn $$.currentMaxTickWidths[id];\r\n\t}\r\n\r\n\tupdateLabels(withTransition) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst axisXLabel = $$.main.select(`.${CLASS.axisX} .${CLASS.axisXLabel}`);\r\n\t\tconst axisYLabel = $$.main.select(`.${CLASS.axisY} .${CLASS.axisYLabel}`);\r\n\t\tconst axisY2Label = $$.main.select(`.${CLASS.axisY2} .${CLASS.axisY2Label}`);\r\n\r\n\t\t(withTransition ? axisXLabel.transition() : axisXLabel)\r\n\t\t\t.attr(\"x\", this.xForXAxisLabel.bind(this))\r\n\t\t\t.attr(\"dx\", this.dxForXAxisLabel.bind(this))\r\n\t\t\t.attr(\"dy\", this.dyForXAxisLabel.bind(this))\r\n\t\t\t.text(this.textForXAxisLabel.bind(this));\r\n\r\n\t\t(withTransition ? axisYLabel.transition() : axisYLabel)\r\n\t\t\t.attr(\"x\", this.xForYAxisLabel.bind(this))\r\n\t\t\t.attr(\"dx\", this.dxForYAxisLabel.bind(this))\r\n\t\t\t.attr(\"dy\", this.dyForYAxisLabel.bind(this))\r\n\t\t\t.text(this.textForYAxisLabel.bind(this));\r\n\r\n\t\t(withTransition ? axisY2Label.transition() : axisY2Label)\r\n\t\t\t.attr(\"x\", this.xForY2AxisLabel.bind(this))\r\n\t\t\t.attr(\"dx\", this.dxForY2AxisLabel.bind(this))\r\n\t\t\t.attr(\"dy\", this.dyForY2AxisLabel.bind(this))\r\n\t\t\t.text(this.textForY2AxisLabel.bind(this));\r\n\t}\r\n\r\n\tgetPadding(padding, key, defaultValue, domainLength) {\r\n\t\tconst p = typeof padding === \"number\" ? padding : padding[key];\r\n\r\n\t\tif (!isValue(p)) {\r\n\t\t\treturn defaultValue;\r\n\t\t}\r\n\t\tif (padding.unit === \"ratio\") {\r\n\t\t\treturn padding[key] * domainLength;\r\n\t\t}\r\n\t\t// assume padding is pixels if unit is not specified\r\n\t\treturn this.convertPixelsToAxisPadding(p, domainLength);\r\n\t}\r\n\r\n\tconvertPixelsToAxisPadding(pixels, domainLength) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst length = $$.config.axis_rotated ? $$.width : $$.height;\r\n\r\n\t\treturn domainLength * (pixels / length);\r\n\t}\r\n\r\n\tgenerateTickValues(values, tickCount, forTimeSeries) {\r\n\t\tlet tickValues = values;\r\n\t\tlet start;\r\n\t\tlet end;\r\n\t\tlet count;\r\n\t\tlet interval;\r\n\t\tlet i;\r\n\t\tlet tickValue;\r\n\r\n\t\tif (tickCount) {\r\n\t\t\tconst targetCount = isFunction(tickCount) ? tickCount() : tickCount;\r\n\r\n\t\t\t// compute ticks according to tickCount\r\n\t\t\tif (targetCount === 1) {\r\n\t\t\t\ttickValues = [values[0]];\r\n\t\t\t} else if (targetCount === 2) {\r\n\t\t\t\ttickValues = [values[0], values[values.length - 1]];\r\n\t\t\t} else if (targetCount > 2) {\r\n\t\t\t\tcount = targetCount - 2;\r\n\t\t\t\tstart = values[0];\r\n\t\t\t\tend = values[values.length - 1];\r\n\t\t\t\tinterval = (end - start) / (count + 1);\r\n\t\t\t\t// re-construct unique values\r\n\t\t\t\ttickValues = [start];\r\n\r\n\t\t\t\tfor (i = 0; i < count; i++) {\r\n\t\t\t\t\ttickValue = +start + interval * (i + 1);\r\n\t\t\t\t\ttickValues.push(forTimeSeries ? new Date(tickValue) : tickValue);\r\n\t\t\t\t}\r\n\t\t\t\ttickValues.push(end);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!forTimeSeries) {\r\n\t\t\ttickValues = tickValues.sort((a, b) => a - b);\r\n\t\t}\r\n\r\n\t\treturn tickValues;\r\n\t}\r\n\r\n\tgenerateTransitions(duration) {\r\n\t\tconst $$ = this.owner;\r\n\t\tconst axes = $$.axes;\r\n\r\n\t\treturn {\r\n\t\t\taxisX: duration ? axes.x.transition().duration(duration) : axes.x,\r\n\t\t\taxisY: duration ? axes.y.transition().duration(duration) : axes.y,\r\n\t\t\taxisY2: duration ? axes.y2.transition().duration(duration) : axes.y2,\r\n\t\t\taxisSubX: duration ? axes.subx.transition().duration(duration) : axes.subx,\r\n\t\t};\r\n\t}\r\n\r\n\tredraw(transitions, isHidden) {\r\n\t\tconst $$ = this.owner;\r\n\r\n\t\t$$.axes.x.style(\"opacity\", isHidden ? \"0\" : \"1\");\r\n\t\t$$.axes.y.style(\"opacity\", isHidden ? \"0\" : \"1\");\r\n\t\t$$.axes.y2.style(\"opacity\", isHidden ? \"0\" : \"1\");\r\n\t\t$$.axes.subx.style(\"opacity\", isHidden ? \"0\" : \"1\");\r\n\r\n\t\ttransitions.axisX.call($$.xAxis);\r\n\t\ttransitions.axisY.call($$.yAxis);\r\n\t\ttransitions.axisY2.call($$.y2Axis);\r\n\t\ttransitions.axisSubX.call($$.subXAxis);\r\n\t}\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// src/axis/Axis.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tscaleLinear as d3ScaleLinear,\r\n\tselect as d3Select\r\n} from \"d3\";\r\n\r\n// Features:\r\n// 1. category axis\r\n// 2. ceil values of translate/x/y to int for half pixel antialiasing\r\n// 3. multiline tick text\r\nlet tickTextCharSize;\r\n\r\nexport default function(params = {}) {\r\n\tlet scale = d3ScaleLinear();\r\n\tlet orient = \"bottom\";\r\n\tconst innerTickSize = 6;\r\n\tconst outerTickSize = params.withOuterTick ? 6 : 0;\r\n\tconst tickPadding = 3;\r\n\tlet tickValues = null;\r\n\tlet tickFormat;\r\n\tlet tickArguments;\r\n\tlet tickOffset = 0;\r\n\tlet tickCulling = true;\r\n\tlet tickCentered;\r\n\tlet transition;\r\n\r\n\tfunction axisX(selection, x) {\r\n\t\tselection.attr(\"transform\", d => `translate(${Math.ceil(x(d) + tickOffset)}, 0)`);\r\n\t}\r\n\r\n\tfunction axisY(selection, y) {\r\n\t\tselection.attr(\"transform\", d => `translate(0,${Math.ceil(y(d))})`);\r\n\t}\r\n\r\n\tfunction scaleExtent(domain) {\r\n\t\tconst start = domain[0];\r\n\t\tconst stop = domain[domain.length - 1];\r\n\r\n\t\treturn start < stop ? [start, stop] : [stop, start];\r\n\t}\r\n\r\n\tfunction generateTicks(scale) {\r\n\t\tconst ticks = [];\r\n\r\n\t\tif (scale.ticks) {\r\n\t\t\treturn scale.ticks(\r\n\t\t\t\t...(tickArguments ? Array.prototype.slice.call(tickArguments) : [])\r\n\t\t\t).map(v => (\r\n\t\t\t\t// round the tick value if is number\r\n\t\t\t\t/(string|number)/.test(typeof v) && !isNaN(v) ?\r\n\t\t\t\t\tMath.round(v * 10) / 10 : v\r\n\t\t\t));\r\n\t\t}\r\n\r\n\t\tconst domain = scale.domain();\r\n\r\n\t\tfor (let i = Math.ceil(domain[0]); i < domain[1]; i++) {\r\n\t\t\tticks.push(i);\r\n\t\t}\r\n\r\n\t\tif (ticks.length > 0 && ticks[0] > 0) {\r\n\t\t\tticks.unshift(ticks[0] - (ticks[1] - ticks[0]));\r\n\t\t}\r\n\r\n\t\treturn ticks;\r\n\t}\r\n\r\n\tfunction copyScale() {\r\n\t\tconst newScale = scale.copy();\r\n\r\n\t\tif (params.isCategory || !newScale.domain().length) {\r\n\t\t\tconst domain = scale.domain();\r\n\r\n\t\t\tnewScale.domain([domain[0], domain[1] - 1]);\r\n\t\t}\r\n\r\n\t\treturn newScale;\r\n\t}\r\n\r\n\tfunction textFormatted(v) {\r\n\t\tconst formatted = tickFormat ? tickFormat(v) : v;\r\n\r\n\t\treturn typeof formatted !== \"undefined\" ? formatted : \"\";\r\n\t}\r\n\r\n\tfunction getSizeFor1Char(tick) {\r\n\t\tif (tickTextCharSize) {\r\n\t\t\treturn tickTextCharSize;\r\n\t\t}\r\n\t\tconst size = {\r\n\t\t\th: 11.5,\r\n\t\t\tw: 5.5,\r\n\t\t};\r\n\r\n\t\ttick.select(\"text\")\r\n\t\t\t.text(textFormatted)\r\n\t\t\t.each(function(d) {\r\n\t\t\t\tconst box = this.getBoundingClientRect();\r\n\t\t\t\tconst text = textFormatted(d);\r\n\t\t\t\tconst h = box.height;\r\n\t\t\t\tconst w = text ? (box.width / text.length) : undefined;\r\n\r\n\t\t\t\tif (h && w) {\r\n\t\t\t\t\tsize.h = h;\r\n\t\t\t\t\tsize.w = w;\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.text(\"\");\r\n\r\n\t\ttickTextCharSize = size;\r\n\r\n\t\treturn size;\r\n\t}\r\n\r\n\tfunction transitionise(selection) {\r\n\t\treturn params.withoutTransition ?\r\n\t\t\tselection : selection.transition(transition);\r\n\t}\r\n\r\n\tfunction axis(g) {\r\n\t\tg.each(function() {\r\n\t\t\tconst g = d3Select(this);\r\n\r\n\t\t\taxis.g = g;\r\n\r\n\t\t\tlet scale0 = this.__chart__ || scale;\r\n\t\t\tlet scale1 = copyScale();\r\n\r\n\t\t\tthis.__chart__ = scale1;\r\n\r\n\t\t\t// count of tick data in array\r\n\t\t\tconst ticks = tickValues || generateTicks(scale1);\r\n\r\n\t\t\t// update selection\r\n\t\t\tlet tick = g.selectAll(\".tick\")\r\n\t\t\t\t.data(ticks, scale1);\r\n\r\n\t\t\t// enter selection\r\n\t\t\tconst tickEnter = tick\r\n\t\t\t\t.enter()\r\n\t\t\t\t.insert(\"g\", \".domain\")\r\n\t\t\t\t.attr(\"class\", \"tick\")\r\n\t\t\t\t.style(\"opacity\", \"1\");\r\n\r\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.\r\n\t\t\tconst tickExit = tick.exit().remove();\r\n\r\n\t\t\t// enter + update selection\r\n\t\t\ttick = tickEnter.merge(tick);\r\n\r\n\t\t\tconst tickUpdate = transitionise(tick).style(\"opacity\", \"1\");\r\n\t\t\tlet tickTransform;\r\n\t\t\tlet tickX;\r\n\t\t\tlet tickY;\r\n\r\n\t\t\tconst range = scale.rangeExtent ? scale.rangeExtent() : scaleExtent(scale.range());\r\n\r\n\t\t\t// update selection - data join\r\n\t\t\tconst path = g.selectAll(\".domain\").data([0]);\r\n\r\n\t\t\t// enter + update selection\r\n\t\t\tconst pathUpdate = path.enter()\r\n\t\t\t\t.append(\"path\")\r\n\t\t\t\t.attr(\"class\", \"domain\")\r\n\t\t\t\t.merge(transitionise(path));\r\n\r\n\t\t\ttickEnter.append(\"line\");\r\n\t\t\ttickEnter.append(\"text\");\r\n\r\n\t\t\tconst lineEnter = tickEnter.select(\"line\");\r\n\t\t\tconst lineUpdate = tickUpdate.select(\"line\");\r\n\t\t\tconst textEnter = tickEnter.select(\"text\");\r\n\t\t\tconst textUpdate = tickUpdate.select(\"text\");\r\n\r\n\t\t\tif (params.isCategory) {\r\n\t\t\t\ttickOffset = Math.ceil((scale1(1) - scale1(0)) / 2);\r\n\t\t\t\ttickX = tickCentered ? 0 : tickOffset;\r\n\t\t\t\ttickY = tickCentered ? tickOffset : 0;\r\n\t\t\t} else {\r\n\t\t\t\ttickX = 0;\r\n\t\t\t\ttickOffset = tickX;\r\n\t\t\t}\r\n\r\n\t\t\tlet tspan;\r\n\t\t\tconst sizeFor1Char = getSizeFor1Char(g.select(\".tick\"));\r\n\t\t\tconst counts = [];\r\n\t\t\tconst tickLength = Math.max(innerTickSize, 0) + tickPadding;\r\n\t\t\tconst isVertical = orient === \"left\" || orient === \"right\";\r\n\r\n\t\t\t// this should be called only when category axis\r\n\t\t\tfunction splitTickText(d, maxWidthValue) {\r\n\t\t\t\tconst tickText = textFormatted(d);\r\n\t\t\t\tconst splitted = [];\r\n\t\t\t\tlet maxWidth = maxWidthValue;\r\n\t\t\t\tlet subtext;\r\n\t\t\t\tlet spaceIndex;\r\n\t\t\t\tlet textWidth;\r\n\r\n\t\t\t\tif (Object.prototype.toString.call(tickText) === \"[object Array]\") {\r\n\t\t\t\t\treturn tickText;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!maxWidth || maxWidth <= 0) {\r\n\t\t\t\t\tmaxWidth = isVertical ?\r\n\t\t\t\t\t\t95 : params.isCategory ?\r\n\t\t\t\t\t\t\t(Math.ceil(scale1(ticks[1]) - scale1(ticks[0])) - 12) : 110;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfunction split(splitted, text) {\r\n\t\t\t\t\tspaceIndex = undefined;\r\n\t\t\t\t\tfor (let i = 1; i < text.length; i++) {\r\n\t\t\t\t\t\tif (text.charAt(i) === \" \") {\r\n\t\t\t\t\t\t\tspaceIndex = i;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsubtext = text.substr(0, i + 1);\r\n\t\t\t\t\t\ttextWidth = sizeFor1Char.w * subtext.length;\r\n\r\n\t\t\t\t\t\t// if text width gets over tick width, split by space index or crrent index\r\n\t\t\t\t\t\tif (maxWidth < textWidth) {\r\n\t\t\t\t\t\t\treturn split(\r\n\t\t\t\t\t\t\t\tsplitted.concat(text.substr(0, spaceIndex || i)),\r\n\t\t\t\t\t\t\t\ttext.slice(spaceIndex ? spaceIndex + 1 : i)\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn splitted.concat(text);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn split(splitted, String(tickText));\r\n\t\t\t}\r\n\r\n\t\t\tfunction tspanDy(d, i) {\r\n\t\t\t\tlet dy = sizeFor1Char.h;\r\n\r\n\t\t\t\tif (i === 0) {\r\n\t\t\t\t\tdy = (orient === \"left\" || orient === \"right\") ?\r\n\t\t\t\t\t\t-((counts[d.index] - 1) * (sizeFor1Char.h / 2) - 3) :\r\n\t\t\t\t\t\t\".71em\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dy;\r\n\t\t\t}\r\n\r\n\t\t\tfunction tickSize(d) {\r\n\t\t\t\tconst tickPosition = scale(d) + (tickCentered ? 0 : tickOffset);\r\n\r\n\t\t\t\treturn range[0] < tickPosition && tickPosition < range[1] ?\r\n\t\t\t\t\tinnerTickSize : 0;\r\n\t\t\t}\r\n\r\n\t\t\tconst text = tick.select(\"text\");\r\n\r\n\t\t\ttspan = text.selectAll(\"tspan\")\r\n\t\t\t\t.data((d, i) => {\r\n\t\t\t\t\tconst splitted = params.tickMultiline ?\r\n\t\t\t\t\t\tsplitTickText(d, params.tickWidth) : [].concat(textFormatted(d));\r\n\r\n\t\t\t\t\tcounts[i] = splitted.length;\r\n\r\n\t\t\t\t\treturn splitted.map(s => ({\r\n\t\t\t\t\t\tindex: i,\r\n\t\t\t\t\t\tsplitted: s,\r\n\t\t\t\t\t}));\r\n\t\t\t\t});\r\n\r\n\t\t\ttspan.exit().remove();\r\n\r\n\t\t\ttspan = tspan\r\n\t\t\t\t.enter()\r\n\t\t\t\t.append(\"tspan\")\r\n\t\t\t\t.merge(tspan)\r\n\t\t\t\t.text(d => d.splitted);\r\n\r\n\t\t\tconst rotate = params.tickTextRotate;\r\n\r\n\t\t\tfunction textAnchorForText(r) {\r\n\t\t\t\tif (!r) {\r\n\t\t\t\t\treturn \"middle\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn r > 0 ? \"start\" : \"end\";\r\n\t\t\t}\r\n\r\n\t\t\tfunction textTransform(r) {\r\n\t\t\t\treturn r ? `rotate(${r})` : \"\";\r\n\t\t\t}\r\n\r\n\t\t\tfunction dxForText(r) {\r\n\t\t\t\tif (!r) {\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn 8 * Math.sin(Math.PI * (r / 180));\r\n\t\t\t}\r\n\r\n\t\t\tfunction yForText(r) {\r\n\t\t\t\tif (!r) {\r\n\t\t\t\t\treturn tickLength;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn 11.5 - 2.5 * (r / 15) * (r > 0 ? 1 : -1);\r\n\t\t\t}\r\n\r\n\t\t\tswitch (orient) {\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\ttickTransform = axisX;\r\n\t\t\t\t\tlineEnter.attr(\"y2\", innerTickSize);\r\n\t\t\t\t\ttextEnter.attr(\"y\", tickLength);\r\n\r\n\t\t\t\t\tlineUpdate.attr(\"x1\", tickX)\r\n\t\t\t\t\t\t.attr(\"x2\", tickX)\r\n\t\t\t\t\t\t.attr(\"y2\", tickSize);\r\n\r\n\t\t\t\t\ttextUpdate.attr(\"x\", 0)\r\n\t\t\t\t\t\t.attr(\"y\", yForText(rotate))\r\n\t\t\t\t\t\t.style(\"text-anchor\", textAnchorForText(rotate))\r\n\t\t\t\t\t\t.attr(\"transform\", textTransform(rotate));\r\n\r\n\t\t\t\t\ttspan.attr(\"x\", 0)\r\n\t\t\t\t\t\t.attr(\"dy\", tspanDy)\r\n\t\t\t\t\t\t.attr(\"dx\", dxForText(rotate));\r\n\r\n\t\t\t\t\tpathUpdate.attr(\"d\", `M${range[0]},${outerTickSize}V0H${range[1]}V${outerTickSize}`);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"top\":\r\n\t\t\t\t\t// @TODO: rotated tick text\r\n\t\t\t\t\ttickTransform = axisX;\r\n\t\t\t\t\tlineEnter.attr(\"y2\", -innerTickSize);\r\n\t\t\t\t\ttextEnter.attr(\"y\", -tickLength);\r\n\r\n\t\t\t\t\tlineUpdate\r\n\t\t\t\t\t\t.attr(\"x2\", 0)\r\n\t\t\t\t\t\t.attr(\"y2\", -innerTickSize);\r\n\r\n\t\t\t\t\ttextUpdate\r\n\t\t\t\t\t\t.attr(\"x\", 0)\r\n\t\t\t\t\t\t.attr(\"y\", -tickLength);\r\n\r\n\t\t\t\t\ttext.style(\"text-anchor\", \"middle\");\r\n\r\n\t\t\t\t\ttspan\r\n\t\t\t\t\t\t.attr(\"x\", 0)\r\n\t\t\t\t\t\t.attr(\"dy\", \"0em\");\r\n\r\n\t\t\t\t\tpathUpdate.attr(\"d\", `M${range[0]},${-outerTickSize}V0H${range[1]}V${-outerTickSize}`);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\ttickTransform = axisY;\r\n\t\t\t\t\tlineEnter.attr(\"x2\", -innerTickSize);\r\n\t\t\t\t\ttextEnter.attr(\"x\", -tickLength);\r\n\r\n\t\t\t\t\tlineUpdate.attr(\"x2\", -innerTickSize)\r\n\t\t\t\t\t\t.attr(\"y1\", tickY)\r\n\t\t\t\t\t\t.attr(\"y2\", tickY);\r\n\r\n\t\t\t\t\ttextUpdate\r\n\t\t\t\t\t\t.attr(\"x\", -tickLength)\r\n\t\t\t\t\t\t.attr(\"y\", tickOffset);\r\n\r\n\t\t\t\t\ttext.style(\"text-anchor\", \"end\");\r\n\r\n\t\t\t\t\ttspan\r\n\t\t\t\t\t\t.attr(\"x\", -tickLength)\r\n\t\t\t\t\t\t.attr(\"dy\", tspanDy);\r\n\r\n\t\t\t\t\tpathUpdate.attr(\"d\", `M${-outerTickSize},${range[0]}H0V${range[1]}H${-outerTickSize}`);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\t\ttickTransform = axisY;\r\n\t\t\t\t\tlineEnter.attr(\"x2\", innerTickSize);\r\n\t\t\t\t\ttextEnter.attr(\"x\", tickLength);\r\n\r\n\t\t\t\t\tlineUpdate\r\n\t\t\t\t\t\t.attr(\"x2\", innerTickSize)\r\n\t\t\t\t\t\t.attr(\"y2\", 0);\r\n\r\n\t\t\t\t\ttextUpdate\r\n\t\t\t\t\t\t.attr(\"x\", tickLength)\r\n\t\t\t\t\t\t.attr(\"y\", 0);\r\n\r\n\t\t\t\t\ttext.style(\"text-anchor\", \"start\");\r\n\r\n\t\t\t\t\ttspan\r\n\t\t\t\t\t\t.attr(\"x\", tickLength)\r\n\t\t\t\t\t\t.attr(\"dy\", tspanDy);\r\n\r\n\t\t\t\t\tpathUpdate.attr(\"d\", `M${outerTickSize},${range[0]}H0V${range[1]}H${outerTickSize}`);\r\n\t\t\t}\r\n\r\n\t\t\tif (scale1.bandwidth) {\r\n\t\t\t\tconst x = scale1;\r\n\t\t\t\tconst dx = x.bandwidth() / 2;\r\n\r\n\t\t\t\tscale0 = function(d) {\r\n\t\t\t\t\treturn x(d) + dx;\r\n\t\t\t\t};\r\n\t\t\t\tscale1 = scale0;\r\n\t\t\t} else if (scale0.bandwidth) {\r\n\t\t\t\tscale0 = scale1;\r\n\t\t\t} else {\r\n\t\t\t\ttickExit.call(tickTransform, scale1);\r\n\t\t\t}\r\n\r\n\t\t\ttickEnter.call(tickTransform, scale0);\r\n\t\t\ttickUpdate.call(tickTransform, scale1);\r\n\t\t});\r\n\t}\r\n\r\n\taxis.scale = function(x) {\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn scale;\r\n\t\t}\r\n\r\n\t\tscale = x;\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.orient = function(x) {\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn orient;\r\n\t\t}\r\n\r\n\t\torient = x in {\r\n\t\t\ttop: 1,\r\n\t\t\tright: 1,\r\n\t\t\tbottom: 1,\r\n\t\t\tleft: 1\r\n\t\t} ? String(x) : \"bottom\";\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.tickFormat = function(format) {\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn tickFormat;\r\n\t\t}\r\n\r\n\t\ttickFormat = format;\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.tickCentered = function(isCentered) {\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn tickCentered;\r\n\t\t}\r\n\r\n\t\ttickCentered = isCentered;\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.tickOffset = function() {\r\n\t\treturn tickOffset;\r\n\t};\r\n\r\n\taxis.tickInterval = function() {\r\n\t\tlet interval;\r\n\r\n\t\tif (params.isCategory) {\r\n\t\t\tinterval = tickOffset * 2;\r\n\t\t} else {\r\n\t\t\tconst length = axis.g.select(\"path.domain\")\r\n\t\t\t\t.node()\r\n\t\t\t\t.getTotalLength() - outerTickSize * 2;\r\n\r\n\t\t\tinterval = length / axis.g.selectAll(\"line\").size();\r\n\t\t}\r\n\r\n\t\treturn interval === Infinity ? 0 : interval;\r\n\t};\r\n\r\n\taxis.ticks = function(...args) {\r\n\t\tif (!args.length) {\r\n\t\t\treturn tickArguments;\r\n\t\t}\r\n\r\n\t\ttickArguments = Array.prototype.slice.call(args);\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.tickCulling = function(culling) {\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn tickCulling;\r\n\t\t}\r\n\r\n\t\ttickCulling = culling;\r\n\r\n\t\treturn axis;\r\n\t};\r\n\r\n\taxis.tickValues = function(x) {\r\n\t\tif (typeof x === \"function\") {\r\n\t\t\ttickValues = function() {\r\n\t\t\t\treturn x(scale.domain());\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tif (!arguments.length) {\r\n\t\t\t\treturn tickValues;\r\n\t\t\t}\r\n\r\n\t\t\ttickValues = x;\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t};\r\n\r\n\taxis.setTransition = function(t) {\r\n\t\ttransition = t;\r\n\t\treturn this;\r\n\t};\r\n\r\n\treturn axis;\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// src/axis/bb.axis.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {isValue, isDefined, extend} from \"../internals/util\";\r\n\r\n/**\r\n * Set the min/max value\r\n * @param $$\r\n * @param type\r\n * @param value\r\n * @return {undefined}\r\n */\r\nconst setMinMax = ($$, type, value) => {\r\n\tconst config = $$.config;\r\n\tconst axisX = `axis_x_${type}`;\r\n\tconst axisY = `axis_y_${type}`;\r\n\tconst axisY2 = `axis_y2_${type}`;\r\n\r\n\tif (typeof value !== \"undefined\") {\r\n\t\tif (typeof value === \"object\") {\r\n\t\t\tif (isValue(value.x)) { config[axisX] = value.x; }\r\n\t\t\tif (isValue(value.y)) { config[axisY] = value.y; }\r\n\t\t\tif (isValue(value.y2)) { config[axisY2] = value.y2; }\r\n\t\t} else {\r\n\t\t\tconfig[axisY] = value;\r\n\t\t\tconfig[axisY2] = value;\r\n\t\t}\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\twithUpdateXDomain: true\r\n\t\t});\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\n/**\r\n * Get the min/max value\r\n * @param $$\r\n * @param type\r\n * @return {{x, y, y2}}\r\n */\r\nconst getMinMax = ($$, type) => {\r\n\tconst config = $$.config;\r\n\tconst axisX = `axis_x_${type}`;\r\n\tconst axisY = `axis_y_${type}`;\r\n\tconst axisY2 = `axis_y2_${type}`;\r\n\r\n\treturn {\r\n\t\tx: config[axisX],\r\n\t\ty: config[axisY],\r\n\t\ty2: config[axisY2]\r\n\t};\r\n};\r\n\r\n/**\r\n * Define axis\r\n */\r\nconst axis = function() {};\r\n\r\n/**\r\n * Get and set axis labels.\r\n * @method axis:labels\r\n * @instance\r\n * @memberof Chart\r\n * @param {Object} labels specified axis' label to be updated.\r\n * @example\r\n * // Update axis' label\r\n * chart.axis.labels({\r\n * x: \"New X Axis Label\",\r\n * y: \"New Y Axis Label\"\r\n * });\r\n */\r\naxis.labels = function(labels) {\r\n\tconst $$ = this.internal;\r\n\r\n\tif (arguments.length) {\r\n\t\tObject.keys(labels).forEach(axisId => {\r\n\t\t\t$$.axis.setLabelText(axisId, labels[axisId]);\r\n\t\t});\r\n\r\n\t\t$$.axis.updateLabels();\r\n\t}\r\n};\r\n\r\n/**\r\n * Get and set axis min value.\r\n * @method axis:min\r\n * @instance\r\n * @memberof Chart\r\n * @param {Object} min If min is given, specified axis' min value will be updated. If no argument is given, the current min values for each axis will be returned.\r\n * @example\r\n * // Update axis' min\r\n * chart.axis.min({\r\n * x: -10,\r\n * y: 1000,\r\n * y2: 100\r\n * });\r\n */\r\naxis.min = function(min) {\r\n\tif (arguments.length) {\r\n\t\treturn setMinMax(this.internal, \"min\", min);\r\n\t} else {\r\n\t\treturn getMinMax(this.internal, \"min\");\r\n\t}\r\n};\r\n\r\n/**\r\n * Get and set axis max value.\r\n * @method axis:max\r\n * @instance\r\n * @memberof Chart\r\n * @param {Object} max If max is given, specified axis' max value will be updated. If no argument is given, the current max values for each axis will be returned.\r\n * @example\r\n * // Update axis' label\r\n * chart.axis.max({\r\n * x: 100,\r\n * y: 1000,\r\n * y2: 10000\r\n * });\r\n */\r\naxis.max = function(max) {\r\n\tif (arguments.length) {\r\n\t\treturn setMinMax(this.internal, \"max\", max);\r\n\t} else {\r\n\t\treturn getMinMax(this.internal, \"max\");\r\n\t}\r\n};\r\n\r\n/**\r\n * Get and set axis min and max value.\r\n * @method axis:range\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // Update axis' label\r\n * chart.axis.range({\r\n * min: {\r\n * x: -10,\r\n * y: -1000,\r\n * y2: -10000\r\n * },\r\n * max: {\r\n * x: 100,\r\n * y: 1000,\r\n * y2: 10000\r\n * },\r\n * });\r\n */\r\naxis.range = function(range) {\r\n\tif (arguments.length) {\r\n\t\tisDefined(range.max) && this.axis.max(range.max);\r\n\t\tisDefined(range.min) && this.axis.min(range.min);\r\n\t} else {\r\n\t\treturn {\r\n\t\t\tmax: this.axis.max(),\r\n\t\t\tmin: this.axis.min()\r\n\t\t};\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\nextend(Chart.prototype, {axis});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.axis.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Set specified category name on category axis.\r\n\t * @method category\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Number} i index of category to be changed\r\n\t * @param {String} category category value to be changed\r\n\t * @example\r\n\t * chart.category(2, \"Category 3\");\r\n\t */\r\n\tcategory(i, category) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (arguments.length > 1) {\r\n\t\t\tconfig.axis_x_categories[i] = category;\r\n\t\t\t$$.redraw();\r\n\t\t}\r\n\r\n\t\treturn config.axis_x_categories[i];\r\n\t},\r\n\r\n\t/**\r\n\t * Set category names on category axis.\r\n\t * @method categories\r\n\t * @instance\r\n\t * @memberof Chart\r\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.\r\n\t * @example\r\n\t * chart.categories([\r\n\t * \"Category 1\", \"Category 2\", ...\r\n\t * ]);\r\n\t */\r\n\tcategories(categories) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (!arguments.length) {\r\n\t\t\treturn config.axis_x_categories;\r\n\t\t}\r\n\r\n\t\tconfig.axis_x_categories = categories;\r\n\t\t$$.redraw();\r\n\r\n\t\treturn config.axis_x_categories;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.category.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {window} from \"../internals/browser\";\r\nimport {removeEvent, extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Resize the chart.\r\n\t * @method resize\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Object} size This argument should include width and height in pixels.\r\n\t * @example\r\n\t * // Resize to 640x480\r\n\t * chart.resize({\r\n\t * width: 640,\r\n\t * height: 480\r\n\t * });\r\n\t */\r\n\tresize(size) {\r\n\t\tconst config = this.internal.config;\r\n\r\n\t\tconfig.size_width = size ? size.width : null;\r\n\t\tconfig.size_height = size ? size.height : null;\r\n\r\n\t\tthis.flush();\r\n\t},\r\n\r\n\t/**\r\n\t * Force to redraw.\r\n\t * @method flush\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @example\r\n\t * chart.flush();\r\n\t */\r\n\tflush() {\r\n\t\tthis.internal.updateAndRedraw({\r\n\t\t\twithLegend: true,\r\n\t\t\twithTransition: false,\r\n\t\t\twithTransitionForTransform: false,\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Reset the chart object and remove element and events completely.\r\n\t * @method destroy\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @example\r\n\t * chart.destroy();\r\n\t */\r\n\tdestroy() {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\twindow.clearInterval($$.intervalForObserveInserted);\r\n\r\n\t\tif ($$.resizeTimeout !== undefined) {\r\n\t\t\twindow.clearTimeout($$.resizeTimeout);\r\n\t\t}\r\n\r\n\t\tremoveEvent(window, \"resize\", $$.resizeFunction);\r\n\t\t// if (window.detachEvent) {\r\n\t\t// window.detachEvent('onresize', $$.resizeFunction);\r\n\t\t// } else if (window.removeEventListener) {\r\n\t\t// window.removeEventListener('resize', $$.resizeFunction);\r\n\t\t// } else {\r\n\t\t// var wrapper = window.onresize;\r\n\t\t// // check if no one else removed our wrapper and remove our resizeFunction from it\r\n\t\t// if (wrapper && wrapper.add && wrapper.remove) {\r\n\t\t// wrapper.remove($$.resizeFunction);\r\n\t\t// }\r\n\t\t// }\r\n\r\n\t\t$$.selectChart.classed(\"bb\", false).html(\"\");\r\n\r\n\t\t// MEMO: this is needed because the reference of some elements will not be released, then memory leak will happen.\r\n\t\tObject.keys($$).forEach(key => {\r\n\t\t\t$$[key] = null;\r\n\t\t});\r\n\r\n\t\treturn null;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.chart.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Get the color\r\n\t * @method color\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String} id id to get the color\r\n\t * @example\r\n\t * chart.color(\"data1\");\r\n\t */\r\n\tcolor(id) {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\treturn $$.color(id); // more patterns\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.color.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\n/**\r\n * Get data loaded in the chart.\r\n * @method data\r\n * @instance\r\n * @memberof Chart\r\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.\r\n * @example\r\n * // Get only data1 data\r\n * chart.data(\"data1\");\r\n *\r\n * // Get data1 and data2 data\r\n * chart.data([\"data1\", \"data2\"]);\r\n *\r\n * // Get all data\r\n * chart.data();\r\n */\r\nconst data = function(targetIds) {\r\n\tconst targets = this.internal.data.targets;\r\n\r\n\treturn typeof targetIds === \"undefined\" ?\r\n\t\ttargets : targets.filter(t => [].concat(targetIds).indexOf(t.id) >= 0);\r\n};\r\n\r\n/**\r\n * Get data shown in the chart.\r\n * @method data:shown\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // Get shown data by filtering to include only data1 data\r\n * chart.data.shown(\"data1\");\r\n *\r\n * // Get shown data by filtering to include data1 and data2 data\r\n * chart.data.shown([\"data1\", \"data2\"]);\r\n *\r\n * // Get all shown data\r\n * chart.data.shown();\r\n */\r\ndata.shown = function(targetIds) {\r\n\treturn this.internal.filterTargetsToShow(this.data(targetIds));\r\n};\r\n\r\n/**\r\n * Get values of the data loaded in the chart.\r\n * @method data:values\r\n * @instance\r\n * @memberof Chart\r\n * @param {String|Array} targetIds This API returns the values of specified target. If this argument is not given, null will be retruned\r\n * @example\r\n * // Get data1 values\r\n * chart.data.values(\"data1\");\r\n */\r\ndata.values = function(targetId) {\r\n\tlet values = null;\r\n\r\n\tif (targetId) {\r\n\t\tconst targets = this.data(targetId);\r\n\r\n\t\tif (targets && targets[0]) {\r\n\t\t\tvalues = targets[0].values.map(d => d.value);\r\n\t\t}\r\n\t}\r\n\r\n\treturn values;\r\n};\r\n\r\n/**\r\n * Get and set names of the data loaded in the chart.\r\n * @method data:names\r\n * @instance\r\n * @memberof Chart\r\n * @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\r\n * @example\r\n * // Get current names\r\n * chart.data.names();\r\n *\r\n * // Update names\r\n * chart.data.names({\r\n * data1: \"New Name 1\",\r\n * data2: \"New Name 2\"\r\n *});\r\n */\r\ndata.names = function(names) {\r\n\tthis.internal.clearLegendItemTextBoxCache();\r\n\r\n\treturn this.internal.updateDataAttributes(\"names\", names);\r\n};\r\n\r\n/**\r\n * Get and set colors of the data loaded in the chart.\r\n * @method data:colors\r\n * @instance\r\n * @memberof Chart\r\n * @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\r\n * @example\r\n * // Get current colors\r\n * chart.data.colors();\r\n *\r\n * // Update colors\r\n * chart.data.colors({\r\n * data1: \"#FFFFFF\",\r\n * data2: \"#000000\"\r\n * });\r\n */\r\ndata.colors = function(colors) {\r\n\treturn this.internal.updateDataAttributes(\"colors\", colors);\r\n};\r\n\r\n/**\r\n * Get and set axes of the data loaded in the chart.\r\n * @method data:axes\r\n * @instance\r\n * @memberof Chart\r\n * @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\r\n * @example\r\n * // Get current axes\r\n * chart.data.axes();\r\n *\r\n * // Update axes\r\n * chart.data.axes({\r\n * data1: \"y\",\r\n * data2: \"y2\"\r\n * });\r\n */\r\ndata.axes = function(axes) {\r\n\treturn this.internal.updateDataAttributes(\"axes\", axes);\r\n};\r\n\r\nextend(Chart.prototype, {data});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.data.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\teaseLinear as d3EaseLinear,\r\n\ttransition as d3Transition,\r\n\tselectAll as d3SelectAll\r\n} from \"d3\";\r\nimport Chart from \"../internals/Chart\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {isDefined, isValue, diffDomain, extend} from \"../internals/util\";\r\nimport CLASS from \"../config/classes\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Flow data to the chart.
\r\n\t * By this API, you can append new data points to the chart.\r\n\t * @method flow\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Object} args\r\n\t * - If json, rows and columns given, the data will be loaded. If data that has the same target id is given, the chart will be appended. Otherwise, new target will be added. One of these is required when calling. If json specified, keys is required as well as data.json\r\n\t * - If to is given, 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.\r\n\t * - If length is given, the lower x edge will move by the number of this argument.\r\n\t * - If duration is given, the duration of the transition will be specified value. If not given, transition.duration will be used as default.\r\n\t * - If done is given, the specified function will be called when flow ends.\r\n\t * @example\r\n\t * // 2 data points will be apprended to the tail and popped from the head.\r\n\t * // After that, 4 data points will be appended and no data points will be poppoed.\r\n\t * chart.flow({\r\n\t * columns: [\r\n\t * [\"x\", \"2013-01-11\", \"2013-01-21\"],\r\n\t * [\"data1\", 500, 200],\r\n\t * [\"data2\", 100, 300],\r\n\t * [\"data3\", 200, 120]\r\n\t * ],\r\n\t * done: function () {\r\n\t * chart.flow({\r\n\t * columns: [\r\n\t * [\"x\", \"2013-02-11\", \"2013-02-12\", \"2013-02-13\", \"2013-02-14\"],\r\n\t * [\"data1\", 200, 300, 100, 250],\r\n\t * [\"data2\", 100, 90, 40, 120],\r\n\t * [\"data3\", 100, 100, 300, 500]\r\n\t * ],\r\n\t * length: 0\r\n\t * });\r\n\t * }\r\n\t * });\r\n\t */\r\n\tflow(args) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst notfoundIds = [];\r\n\t\tconst orgDataCount = $$.getMaxDataCount();\r\n\r\n\t\tlet data;\r\n\t\tlet domain;\r\n\t\tlet length = 0;\r\n\t\tlet tail = 0;\r\n\t\tlet diff;\r\n\t\tlet to;\r\n\r\n\t\tif (args.json) {\r\n\t\t\tdata = $$.convertJsonToData(args.json, args.keys);\r\n\t\t} else if (args.rows) {\r\n\t\t\tdata = $$.convertRowsToData(args.rows);\r\n\t\t} else if (args.columns) {\r\n\t\t\tdata = $$.convertColumnsToData(args.columns);\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst targets = $$.convertDataToTargets(data, true);\r\n\r\n\t\t// Update/Add data\r\n\t\t$$.data.targets.forEach(t => {\r\n\t\t\tlet found = false;\r\n\t\t\tlet i;\r\n\t\t\tlet j;\r\n\r\n\t\t\tfor (i = 0; i < targets.length; i++) {\r\n\t\t\t\tif (t.id === targets[i].id) {\r\n\t\t\t\t\tfound = true;\r\n\r\n\t\t\t\t\tif (t.values[t.values.length - 1]) {\r\n\t\t\t\t\t\ttail = t.values[t.values.length - 1].index + 1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlength = targets[i].values.length;\r\n\r\n\t\t\t\t\tfor (j = 0; j < length; j++) {\r\n\t\t\t\t\t\ttargets[i].values[j].index = tail + j;\r\n\t\t\t\t\t\tif (!$$.isTimeSeries()) {\r\n\t\t\t\t\t\t\ttargets[i].values[j].x = tail + j;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tt.values = t.values.concat(targets[i].values);\r\n\r\n\t\t\t\t\ttargets.splice(i, 1);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!found) { notfoundIds.push(t.id); }\r\n\t\t});\r\n\r\n\t\t// Append null for not found targets\r\n\t\t$$.data.targets.forEach(t => {\r\n\t\t\tlet i;\r\n\t\t\tlet j;\r\n\r\n\t\t\tfor (i = 0; i < notfoundIds.length; i++) {\r\n\t\t\t\tif (t.id === notfoundIds[i]) {\r\n\t\t\t\t\ttail = t.values[t.values.length - 1].index + 1;\r\n\r\n\t\t\t\t\tfor (j = 0; j < length; j++) {\r\n\t\t\t\t\t\tt.values.push({\r\n\t\t\t\t\t\t\tid: t.id,\r\n\t\t\t\t\t\t\tindex: tail + j,\r\n\t\t\t\t\t\t\tx: $$.isTimeSeries() ? $$.getOtherTargetX(tail + j) : tail + j,\r\n\t\t\t\t\t\t\tvalue: null\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// Generate null values for new target\r\n\t\tif ($$.data.targets.length) {\r\n\t\t\ttargets.forEach(t => {\r\n\t\t\t\tlet i;\r\n\t\t\t\tconst missing = [];\r\n\r\n\t\t\t\tfor (i = $$.data.targets[0].values[0].index; i < tail; i++) {\r\n\t\t\t\t\tmissing.push({\r\n\t\t\t\t\t\tid: t.id,\r\n\t\t\t\t\t\tindex: i,\r\n\t\t\t\t\t\tx: $$.isTimeSeries() ? $$.getOtherTargetX(i) : i,\r\n\t\t\t\t\t\tvalue: null\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tt.values.forEach(v => {\r\n\t\t\t\t\tv.index += tail;\r\n\r\n\t\t\t\t\tif (!$$.isTimeSeries()) {\r\n\t\t\t\t\t\tv.x += tail;\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\tt.values = missing.concat(t.values);\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t$$.data.targets = $$.data.targets.concat(targets); // add remained\r\n\r\n\t\t// check data count because behavior needs to change when it\"s only one\r\n\t\t// const dataCount = $$.getMaxDataCount();\r\n\t\tconst baseTarget = $$.data.targets[0];\r\n\t\tconst baseValue = baseTarget.values[0];\r\n\r\n\t\t// Update length to flow if needed\r\n\t\tif (isDefined(args.to)) {\r\n\t\t\tlength = 0;\r\n\t\t\tto = $$.isTimeSeries() ? $$.parseDate(args.to) : args.to;\r\n\t\t\tbaseTarget.values.forEach(v => {\r\n\t\t\t\tv.x < to && length++;\r\n\t\t\t});\r\n\t\t} else if (isDefined(args.length)) {\r\n\t\t\tlength = args.length;\r\n\t\t}\r\n\r\n\t\t// If only one data, update the domain to flow from left edge of the chart\r\n\t\tif (!orgDataCount) {\r\n\t\t\tif ($$.isTimeSeries()) {\r\n\t\t\t\tif (baseTarget.values.length > 1) {\r\n\t\t\t\t\tdiff = baseTarget.values[baseTarget.values.length - 1].x - baseValue.x;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdiff = baseValue.x - $$.getXDomain($$.data.targets)[0];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tdiff = 1;\r\n\t\t\t}\r\n\r\n\t\t\tdomain = [baseValue.x - diff, baseValue.x];\r\n\t\t\t$$.updateXDomain(null, true, true, false, domain);\r\n\t\t} else if (orgDataCount === 1) {\r\n\t\t\tif ($$.isTimeSeries()) {\r\n\t\t\t\tdiff = (baseTarget.values[baseTarget.values.length - 1].x - baseValue.x) / 2;\r\n\t\t\t\tdomain = [new Date(+baseValue.x - diff), new Date(+baseValue.x + diff)];\r\n\t\t\t\t$$.updateXDomain(null, true, true, false, domain);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set targets\r\n\t\t$$.updateTargets($$.data.targets);\r\n\r\n\t\t// Redraw with new targets\r\n\t\t$$.redraw({\r\n\t\t\tflow: {\r\n\t\t\t\tindex: baseValue.index,\r\n\t\t\t\tlength: length,\r\n\t\t\t\tduration: isValue(args.duration) ? args.duration : $$.config.transition_duration,\r\n\t\t\t\tdone: args.done,\r\n\t\t\t\torgDataCount: orgDataCount,\r\n\t\t\t},\r\n\t\t\twithLegend: true,\r\n\t\t\twithTransition: orgDataCount > 1,\r\n\t\t\twithTrimXDomain: false,\r\n\t\t\twithUpdateXAxis: true\r\n\t\t});\r\n\t}\r\n});\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Generate flow\r\n\t * @memberof ChartInternal\r\n\t * @private\r\n\t * @param {Object} args\r\n\t * @return {Function}\r\n\t */\r\n\tgenerateFlow(args) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn function() {\r\n\t\t\tconst targets = args.targets;\r\n\t\t\tconst flow = args.flow;\r\n\t\t\tconst drawBar = args.drawBar;\r\n\t\t\tconst drawLine = args.drawLine;\r\n\t\t\tconst drawArea = args.drawArea;\r\n\t\t\tconst cx = args.cx;\r\n\t\t\tconst cy = args.cy;\r\n\t\t\tconst xv = args.xv;\r\n\t\t\tconst xForText = args.xForText;\r\n\t\t\tconst yForText = args.yForText;\r\n\t\t\tconst duration = args.duration;\r\n\r\n\t\t\tlet translateX;\r\n\t\t\tlet scaleX = 1;\r\n\t\t\tconst flowIndex = flow.index;\r\n\t\t\tconst flowLength = flow.length;\r\n\t\t\tlet flowStart = $$.getValueOnIndex($$.data.targets[0].values, flowIndex);\r\n\t\t\tlet flowEnd = $$.getValueOnIndex($$.data.targets[0].values, flowIndex + flowLength);\r\n\t\t\tconst orgDomain = $$.x.domain();\r\n\t\t\tconst durationForFlow = flow.duration || duration;\r\n\t\t\tconst done = flow.done || function() {};\r\n\t\t\tconst wait = $$.generateWait();\r\n\r\n\t\t\tconst xgrid = $$.xgrid || d3SelectAll([]);\r\n\t\t\tconst xgridLines = $$.xgridLines || d3SelectAll([]);\r\n\t\t\tconst mainRegion = $$.mainRegion || d3SelectAll([]);\r\n\t\t\tconst mainText = $$.mainText || d3SelectAll([]);\r\n\t\t\tconst mainBar = $$.mainBar || d3SelectAll([]);\r\n\t\t\tconst mainLine = $$.mainLine || d3SelectAll([]);\r\n\t\t\tconst mainArea = $$.mainArea || d3SelectAll([]);\r\n\t\t\tconst mainCircle = $$.mainCircle || d3SelectAll([]);\r\n\r\n\t\t\t// set flag\r\n\t\t\t$$.flowing = true;\r\n\r\n\t\t\t// remove head data after rendered\r\n\t\t\t$$.data.targets.forEach(d => {\r\n\t\t\t\td.values.splice(0, flowLength);\r\n\t\t\t});\r\n\r\n\t\t\t// update x domain to generate axis elements for flow\r\n\t\t\tconst domain = $$.updateXDomain(targets, true, true);\r\n\r\n\t\t\t// update elements related to x scale\r\n\t\t\tif ($$.updateXGrid) { $$.updateXGrid(true); }\r\n\r\n\t\t\t// generate transform to flow\r\n\t\t\tif (!flow.orgDataCount) { // if empty\r\n\t\t\t\tif ($$.data.targets[0].values.length !== 1) {\r\n\t\t\t\t\ttranslateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($$.isTimeSeries()) {\r\n\t\t\t\t\t\tflowStart = $$.getValueOnIndex($$.data.targets[0].values, 0);\r\n\t\t\t\t\t\tflowEnd = $$.getValueOnIndex($$.data.targets[0].values, $$.data.targets[0].values.length - 1);\r\n\t\t\t\t\t\ttranslateX = $$.x(flowStart.x) - $$.x(flowEnd.x);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\ttranslateX = diffDomain(domain) / 2;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (flow.orgDataCount === 1 || (flowStart && flowStart.x) === (flowEnd && flowEnd.x)) {\r\n\t\t\t\ttranslateX = $$.x(orgDomain[0]) - $$.x(domain[0]);\r\n\t\t\t} else {\r\n\t\t\t\tif ($$.isTimeSeries()) {\r\n\t\t\t\t\ttranslateX = ($$.x(orgDomain[0]) - $$.x(domain[0]));\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttranslateX = ($$.x(flowStart.x) - $$.x(flowEnd.x));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tscaleX = (diffDomain(orgDomain) / diffDomain(domain));\r\n\t\t\tconst transform = `translate(${translateX},0) scale(${scaleX},1)`;\r\n\r\n\t\t\t$$.hideXGridFocus();\r\n\r\n\t\t\tconst gt = d3Transition().ease(d3EaseLinear)\r\n\t\t\t\t.duration(durationForFlow);\r\n\r\n\t\t\twait.add([\r\n\t\t\t\t$$.axes.x\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.call($$.xAxis.setTransition(gt)),\r\n\t\t\t\tmainBar\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\tmainLine\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\tmainArea\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\tmainCircle\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\tmainText\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\tmainRegion\r\n\t\t\t\t\t.filter($$.isRegionOnX)\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\txgrid\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t\txgridLines\r\n\t\t\t\t\t.transition(gt)\r\n\t\t\t\t\t.attr(\"transform\", transform),\r\n\t\t\t]);\r\n\r\n\t\t\tgt.call(wait, () => {\r\n\t\t\t\tlet i;\r\n\t\t\t\tconst shapes = [];\r\n\t\t\t\tconst texts = [];\r\n\t\t\t\tconst eventRects = [];\r\n\r\n\t\t\t\t// remove flowed elements\r\n\t\t\t\tif (flowLength) {\r\n\t\t\t\t\tfor (i = 0; i < flowLength; i++) {\r\n\t\t\t\t\t\tshapes.push(`.${CLASS.shape}-${flowIndex + i}`);\r\n\t\t\t\t\t\ttexts.push(`.${CLASS.text}-${flowIndex + i}`);\r\n\t\t\t\t\t\teventRects.push(`.${CLASS.eventRect}-${flowIndex + i}`);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.shapes}`)\r\n\t\t\t\t\t\t.selectAll(shapes)\r\n\t\t\t\t\t\t.remove();\r\n\r\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.texts}`)\r\n\t\t\t\t\t\t.selectAll(texts)\r\n\t\t\t\t\t\t.remove();\r\n\r\n\t\t\t\t\t$$.svg.selectAll(`.${CLASS.eventRects}`)\r\n\t\t\t\t\t\t.selectAll(eventRects)\r\n\t\t\t\t\t\t.remove();\r\n\r\n\t\t\t\t\t$$.svg.select(`.${CLASS.xgrid}`)\r\n\t\t\t\t\t\t.remove();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// draw again for removing flowed elements and reverting attr\r\n\t\t\t\txgrid.size() && xgrid\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr($$.xgridAttr);\r\n\r\n\t\t\t\txgridLines\r\n\t\t\t\t\t.attr(\"transform\", null);\r\n\r\n\t\t\t\txgridLines.select(\"line\")\r\n\t\t\t\t\t.attr(\"x1\", config.axis_rotated ? 0 : xv)\r\n\t\t\t\t\t.attr(\"x2\", config.axis_rotated ? $$.width : xv);\r\n\r\n\t\t\t\txgridLines.select(\"text\")\r\n\t\t\t\t\t.attr(\"x\", config.axis_rotated ? $$.width : 0)\r\n\t\t\t\t\t.attr(\"y\", xv);\r\n\r\n\t\t\t\tmainBar\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr(\"d\", drawBar);\r\n\r\n\t\t\t\tmainLine\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr(\"d\", drawLine);\r\n\r\n\t\t\t\tmainArea\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr(\"d\", drawArea);\r\n\r\n\t\t\t\tmainCircle\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t\t.attr(\"cy\", cy);\r\n\r\n\t\t\t\tmainText\r\n\t\t\t\t\t.attr(\"transform\", null)\r\n\t\t\t\t\t.attr(\"x\", xForText)\r\n\t\t\t\t\t.attr(\"y\", yForText)\r\n\t\t\t\t\t.style(\"fill-opacity\", $$.opacityForText.bind($$));\r\n\r\n\t\t\t\tmainRegion\r\n\t\t\t\t\t.attr(\"transform\", null);\r\n\r\n\t\t\t\tmainRegion.select(\"rect\").filter($$.isRegionOnX)\r\n\t\t\t\t\t.attr(\"x\", $$.regionX.bind($$))\r\n\t\t\t\t\t.attr(\"width\", $$.regionWidth.bind($$));\r\n\r\n\t\t\t\tconfig.interaction_enabled && $$.redrawEventRect();\r\n\r\n\t\t\t\t// callback for end of flow\r\n\t\t\t\tdone();\r\n\r\n\t\t\t\t$$.flowing = false;\r\n\t\t\t});\r\n\t\t};\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.flow.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {select as d3Select} from \"d3\";\r\nimport Chart from \"../internals/Chart\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * This API highlights specified targets and fade out the others.
\r\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.\r\n\t * @method focus\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String|Array} targetIdsValue Target ids to be highlighted.\r\n\t * @example\r\n\t * // data1 will be highlighted and the others will be faded out\r\n\t * chart.focus(\"data1\");\r\n\t *\r\n\t * // data1 and data2 will be highlighted and the others will be faded out\r\n\t * chart.focus([\"data1\", \"data2\"]);\r\n\t *\r\n\t * // all targets will be highlighted\r\n\t * chart.focus();\r\n\t */\r\n\tfocus(targetIdsValue) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\r\n\t\tconst candidates = $$.svg.selectAll(\r\n\t\t\t$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))\r\n\t\t);\r\n\r\n\t\tthis.revert();\r\n\t\tthis.defocus();\r\n\r\n\t\tcandidates.classed(CLASS.focused, true).classed(CLASS.defocused, false);\r\n\r\n\t\t$$.hasArcType() &&\r\n\t\t$$.expandArc(targetIds);\r\n\r\n\t\t$$.toggleFocusLegend(targetIds, true);\r\n\r\n\t\t$$.focusedTargetIds = targetIds;\r\n\t\t$$.defocusedTargetIds = $$.defocusedTargetIds.filter(id => targetIds.indexOf(id) < 0);\r\n\t},\r\n\r\n\t/**\r\n\t * This API fades out specified targets and reverts the others.
\r\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.\r\n\t * @method defocus\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String|Array} Target ids to be faded out.\r\n\t * @example\r\n\t * // data1 will be faded out and the others will be reverted.\r\n\t * chart.defocus(\"data1\");\r\n\t *\r\n\t * // data1 and data2 will be faded out and the others will be reverted.\r\n\t * chart.defocus([\"data1\", \"data2\"]);\r\n\t *\r\n\t * // all targets will be faded out.\r\n\t * chart.defocus();\r\n\t */\r\n\tdefocus(targetIdsValue) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\r\n\t\tconst candidates = $$.svg.selectAll(\r\n\t\t\t$$.selectorTargets(targetIds.filter($$.isTargetToShow, $$))\r\n\t\t);\r\n\r\n\t\tcandidates.classed(CLASS.focused, false).classed(CLASS.defocused, true);\r\n\r\n\t\t$$.hasArcType() &&\r\n\t\t$$.unexpandArc(targetIds);\r\n\r\n\t\t$$.toggleFocusLegend(targetIds, false);\r\n\r\n\t\t$$.focusedTargetIds = $$.focusedTargetIds.filter(id => targetIds.indexOf(id) < 0);\r\n\t\t$$.defocusedTargetIds = targetIds;\r\n\t},\r\n\r\n\t/**\r\n\t * This API reverts specified targets.
\r\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.\r\n\t * @method revert\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String|Array} Target ids to be reverted\r\n\t * @example\r\n\t * // data1 will be reverted.\r\n\t * chart.revert(\"data1\");\r\n\t *\r\n\t * // data1 and data2 will be reverted.\r\n\t * chart.revert([\"data1\", \"data2\"]);\r\n\t *\r\n\t * // all targets will be reverted.\r\n\t * chart.revert();\r\n\t */\r\n\trevert(targetIdsValue) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\r\n\t\tconst candidates = $$.svg.selectAll($$.selectorTargets(targetIds)); // should be for all targets\r\n\r\n\t\tcandidates.classed(CLASS.focused, false).classed(CLASS.defocused, false);\r\n\r\n\t\t$$.hasArcType() &&\r\n\t\t$$.unexpandArc(targetIds);\r\n\r\n\t\tif ($$.config.legend_show) {\r\n\t\t\t$$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));\r\n\t\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\r\n\t\t\t\t.filter(function() {\r\n\t\t\t\t\treturn d3Select(this).classed(CLASS.legendItemFocused);\r\n\t\t\t\t})\r\n\t\t\t\t.classed(CLASS.legendItemFocused, false);\r\n\t\t}\r\n\r\n\t\t$$.focusedTargetIds = [];\r\n\t\t$$.defocusedTargetIds = [];\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.focus.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\n/**\r\n * Update x grid lines.\r\n * @method xgrids\r\n * @instance\r\n * @memberof Chart\r\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.\r\n * @example\r\n * // Show 2 x grid lines\r\n * chart.xgrids([\r\n * {value: 1, text: \"Label 1\"},\r\n * {value: 4, text: \"Label 4\"}\r\n * ]);\r\n */\r\nconst xgrids = function(grids) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (!grids) {\r\n\t\treturn config.grid_x_lines;\r\n\t}\r\n\r\n\tconfig.grid_x_lines = grids;\r\n\t$$.redrawWithoutRescale();\r\n\r\n\treturn config.grid_x_lines;\r\n};\r\n\r\n/**\r\n * Add x grid lines.
\r\n * This API adds new x grid lines instead of replacing like xgrids.\r\n * @method xgrids:add\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // Add a new x grid line\r\n * chart.xgrids.add(\r\n * {value: 4, text: \"Label 4\"}\r\n * );\r\n *\r\n * // Add new x grid lines\r\n * chart.xgrids.add([\r\n * {value: 2, text: \"Label 2\"},\r\n * {value: 4, text: \"Label 4\"}\r\n * ]);\r\n */\r\nxgrids.add = function(grids) {\r\n\treturn this.xgrids(\r\n\t\tthis.internal.config.grid_x_lines\r\n\t\t\t.concat(grids || [])\r\n\t);\r\n};\r\n\r\n/**\r\n * Remove x grid lines.
\r\n * This API removes x grid lines.\r\n * @method xgrids:remove\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // x grid line on x = 2 will be removed\r\n * chart.xgrids.remove({value: 2});\r\n *\r\n * // x grid lines that have 'grid-A' will be removed\r\n * chart.xgrids.remove({\r\n * class: \"grid-A\"\r\n * });\r\n *\r\n * // all of x grid lines will be removed\r\n * chart.xgrids.remove();\r\n */\r\nxgrids.remove = function(params) { // TODO: multiple\r\n\tthis.internal.removeGridLines(params, true);\r\n};\r\n\r\n/**\r\n * Update y grid lines.\r\n * @method ygrids\r\n * @instance\r\n * @memberof Chart\r\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.\r\n * @example\r\n * // Show 2 y grid lines\r\n * chart.ygrids([\r\n * {value: 100, text: \"Label 1\"},\r\n * {value: 400, text: \"Label 4\"}\r\n * ]);\r\n */\r\nconst ygrids = function(grids) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (!grids) {\r\n\t\treturn config.grid_y_lines;\r\n\t}\r\n\r\n\tconfig.grid_y_lines = grids;\r\n\t$$.redrawWithoutRescale();\r\n\r\n\treturn config.grid_y_lines;\r\n};\r\n\r\n/**\r\n * Add y grid lines.
\r\n * This API adds new y grid lines instead of replacing like ygrids.\r\n * @method ygrids:add\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // Add a new x grid line\r\n * chart.ygrids.add(\r\n * {value: 400, text: \"Label 4\"}\r\n * );\r\n *\r\n * // Add new x grid lines\r\n * chart.ygrids.add([\r\n * {value: 200, text: \"Label 2\"},\r\n * {value: 400, text: \"Label 4\"}\r\n * ]);\r\n */\r\nygrids.add = function(grids) {\r\n\treturn this.ygrids(\r\n\t\tthis.internal.config.grid_y_lines\r\n\t\t\t.concat(grids || [])\r\n\t);\r\n};\r\n\r\n/**\r\n * Remove y grid lines.
\r\n * This API removes x grid lines.\r\n * @method ygrids:remove\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @example\r\n * // y grid line on y = 200 will be removed\r\n * chart.ygrids.remove({value: 200});\r\n *\r\n * // y grid lines that have 'grid-A' will be removed\r\n * chart.ygrids.remove({\r\n * class: \"grid-A\"\r\n * });\r\n *\r\n * // all of y grid lines will be removed\r\n * chart.ygrids.remove();\r\n */\r\nygrids.remove = function(params) { // TODO: multiple\r\n\tthis.internal.removeGridLines(params, false);\r\n};\r\n\r\nextend(Chart.prototype, {\r\n\txgrids,\r\n\tygrids\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.grid.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {isUndefined, extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Update groups for the targets.\r\n\t * @method groups\r\n\t * @instance\r\n\t * @memberof Chart\r\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.\r\n\t * @example\r\n\t * // data1 and data2 will be a new group.\r\n\t * chart.groups([\r\n\t * [\"data1\", \"data2\"]\r\n\t * ]);\r\n\t */\r\n\tgroups(groups) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (isUndefined(groups)) {\r\n\t\t\treturn config.data_groups;\r\n\t\t}\r\n\r\n\t\tconfig.data_groups = groups;\r\n\t\t$$.redraw();\r\n\r\n\t\treturn config.data_groups;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.group.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\n/**\r\n * Define legend\r\n */\r\nconst legend = function() {};\r\n\r\n/**\r\n * Show legend for each target.\r\n * @method legend:show\r\n * @instance\r\n * @memberof Chart\r\n * @param {String|Array} targetIds\r\n * - If targetIds is given, specified target's legend will be shown.\r\n * - If only one target is the candidate, String can be passed.\r\n * - If no argument is given, all of target's legend will be shown.\r\n * @example\r\n * // Show legend for data1.\r\n * chart.legend.show(\"data1\");\r\n *\r\n * // Show legend for data1 and data2.\r\n * chart.legend.show([\"data1\", \"data2\"]);\r\n *\r\n * // Show all legend.\r\n * chart.legend.show();\r\n */\r\nlegend.show = function(targetIds) {\r\n\tconst $$ = this.internal;\r\n\r\n\t$$.showLegend($$.mapToTargetIds(targetIds));\r\n\t$$.updateAndRedraw({withLegend: true});\r\n};\r\n\r\n/**\r\n * Hide legend for each target.\r\n * @method legend:hide\r\n * @instance\r\n * @memberof Chart\r\n * @param {String|Array} targetIds\r\n * - If targetIds is given, specified target's legend will be hidden.\r\n * - If only one target is the candidate, String can be passed.\r\n * - If no argument is given, all of target's legend will be hidden.\r\n * @example\r\n * // Hide legend for data1.\r\n * chart.legend.hide(\"data1\");\r\n *\r\n * // Hide legend for data1 and data2.\r\n * chart.legend.hide([\"data1\", \"data2\"]);\r\n *\r\n * // Hide all legend.\r\n * chart.legend.hide();\r\n */\r\nlegend.hide = function(targetIds) {\r\n\tconst $$ = this.internal;\r\n\r\n\t$$.hideLegend($$.mapToTargetIds(targetIds));\r\n\t$$.updateAndRedraw({withLegend: true});\r\n};\r\n\r\nextend(Chart.prototype, {legend});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.legend.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Load data to the chart.
\r\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.\r\n\t * - Note:\r\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.
\r\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\r\n\t * @method load\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Object} args\r\n\t * - If url, json, rows and columns given, 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.\r\n\t * - If classes given, the classes specifed by data.classes will be updated. classes must be Object that has target id as keys.\r\n\t * - If categories given, the categories specifed by axis.x.categories or data.x will be updated. categories must be Array.\r\n\t * - If axes given, the axes specifed by data.axes will be updated. axes must be Object that has target id as keys.\r\n\t * - If colors given, the colors specifed by data.colors will be updated. colors must be Object that has target id as keys.\r\n\t * - If type or types given, the type of targets will be updated. type must be String and types must be Object.\r\n\t * - If unload given, 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.\r\n\t * - If done given, the specified function will be called after data loded.\r\n\t * @example\r\n\t * // Load data1 and unload data2 and data3\r\n\t * chart.load({\r\n\t * columns: [\r\n\t * [\"data1\", 100, 200, 150, ...],\r\n\t * ...\r\n\t * ],\r\n\t * unload: [\"data2\", \"data3\"]\r\n\t * });\r\n\t */\r\n\tload(args) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t// update xs if specified\r\n\t\targs.xs && $$.addXs(args.xs);\r\n\r\n\t\t// update names if exists\r\n\t\t\"names\" in args &&\r\n\t\t\tthis.data.names(args.names);\r\n\r\n\t\t// update classes if exists\r\n\t\t\"classes\" in args &&\r\n\t\tObject.keys(args.classes).forEach(id => {\r\n\t\t\tconfig.data_classes[id] = args.classes[id];\r\n\t\t});\r\n\r\n\t\t// update categories if exists\r\n\t\tif (\"categories\" in args && $$.isCategorized()) {\r\n\t\t\tconfig.axis_x_categories = args.categories;\r\n\t\t}\r\n\r\n\t\t// update axes if exists\r\n\t\t\"axes\" in args &&\r\n\t\tObject.keys(args.axes).forEach(id => {\r\n\t\t\tconfig.data_axes[id] = args.axes[id];\r\n\t\t});\r\n\r\n\r\n\t\t// update colors if exists\r\n\t\t\"colors\" in args &&\r\n\t\tObject.keys(args.colors).forEach(id => {\r\n\t\t\tconfig.data_colors[id] = args.colors[id];\r\n\t\t});\r\n\r\n\t\t// use cache if exists\r\n\t\tif (\"cacheIds\" in args && $$.hasCaches(args.cacheIds)) {\r\n\t\t\t$$.load($$.getCaches(args.cacheIds), args.done);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// unload if needed\r\n\t\tif (\"unload\" in args) {\r\n\t\t\t// TODO: do not unload if target will load (included in url/rows/columns)\r\n\t\t\t$$.unload(\r\n\t\t\t\t$$.mapToTargetIds(\r\n\t\t\t\t\ttypeof args.unload === \"boolean\" && args.unload ?\r\n\t\t\t\t\t\tnull : args.unload), () => $$.loadFromArgs(args)\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\t$$.loadFromArgs(args);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Unload data to the chart.
\r\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.\r\n\t * - Note:\r\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.
\r\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.\r\n\t * @method unload\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Object} args\r\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.\r\n\t * - If done given, the specified function will be called after data loded.\r\n\t * @example\r\n\t * // Unload data2 and data3\r\n\t * chart.unload({\r\n\t * ids: [\"data2\", \"data3\"]\r\n\t * });\r\n\t */\r\n\tunload(argsValue) {\r\n\t\tconst $$ = this.internal;\r\n\t\tlet args = argsValue || {};\r\n\r\n\t\tif (args instanceof Array) {\r\n\t\t\targs = {ids: args};\r\n\t\t} else if (typeof args === \"string\") {\r\n\t\t\targs = {ids: [args]};\r\n\t\t}\r\n\r\n\t\t$$.unload($$.mapToTargetIds(args.ids), () => {\r\n\t\t\t$$.redraw({\r\n\t\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\t\twithUpdateXDomain: true,\r\n\t\t\t\twithLegend: true\r\n\t\t\t});\r\n\r\n\t\t\targs.done && args.done();\r\n\t\t});\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.load.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"../internals/util\";\r\n\r\n/**\r\n * Update regions.\r\n * @method regions\r\n * @instance\r\n * @memberof Chart\r\n * @param {Array} regions Regions will be replaced with this argument. The format of this argument is the same as regions.\r\n * @return {Array} regions\r\n * @example\r\n * // Show 2 regions\r\n * chart.regions([\r\n * {axis: \"x\", start: 5, class: \"regionX\"},\r\n * {axis: \"y\", end: 50, class: \"regionY\"}\r\n * ]);\r\n */\r\nconst regions = function(regions) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (!regions) {\r\n\t\treturn config.regions;\r\n\t}\r\n\r\n\tconfig.regions = regions;\r\n\t$$.redrawWithoutRescale();\r\n\r\n\treturn config.regions;\r\n};\r\n\r\n/**\r\n * Add new region.
\r\n * This API adds new region instead of replacing like regions.\r\n * @method regions:add\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @return {Array} regions\r\n * @example\r\n * // Add a new region\r\n * chart.regions.add(\r\n * {axis: \"x\", start: 5, class: \"regionX\"}\r\n * );\r\n *\r\n * // Add new regions\r\n * chart.regions.add([\r\n * {axis: \"x\", start: 5, class: \"regionX\"},\r\n * {axis: \"y\", end: 50, class: \"regionY\"}\r\n *]);\r\n */\r\nregions.add = function(regions) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (!regions) {\r\n\t\treturn config.regions;\r\n\t}\r\n\r\n\tconfig.regions = config.regions.concat(regions);\r\n\t$$.redrawWithoutRescale();\r\n\r\n\treturn config.regions;\r\n};\r\n\r\n/**\r\n * Remove regions.
\r\n * This API removes regions.\r\n * @method regions:remove\r\n * @instance\r\n * @memberof Chart\r\n * @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.\r\n * @return {Array} regions\r\n * @example\r\n * // regions that have 'region-A' or 'region-B' will be removed.\r\n * chart.regions.remove({\r\n * classes: [\r\n * \"region-A\", \"region-B\"\r\n * ]\r\n * });\r\n *\r\n * // all of regions will be removed.\r\n * chart.regions.remove();\r\n */\r\nregions.remove = function(optionsValue) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tconst options = optionsValue || {};\r\n\tconst duration = $$.getOption(options, \"duration\", config.transition_duration);\r\n\tconst classes = $$.getOption(options, \"classes\", [CLASS.region]);\r\n\tconst regions = $$.main.select(`.${CLASS.regions}`)\r\n\t\t.selectAll(classes.map(c => `.${c}`));\r\n\r\n\t(duration ? regions.transition().duration(duration) : regions)\r\n\t\t.style(\"opacity\", \"0\")\r\n\t\t.remove();\r\n\r\n\tconfig.regions = config.regions.filter(region => {\r\n\t\tlet found = false;\r\n\r\n\t\tif (!region.class) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tregion.class.split(\" \").forEach(c => {\r\n\t\t\tif (classes.indexOf(c) >= 0) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn !found;\r\n\t});\r\n\r\n\treturn config.regions;\r\n};\r\n\r\nextend(Chart.prototype, {regions});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.region.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {select as d3Select} from \"d3\";\r\nimport Chart from \"../internals/Chart\";\r\nimport {isDefined, extend} from \"../internals/util\";\r\nimport CLASS from \"../config/classes\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Get selected data points.
\r\n\t * By this API, you can get selected data points information. To use this API, data.selection.enabled needs to be set true.\r\n\t * @method selected\r\n\t * @instance\r\n\t * @memberof Chart\r\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.\r\n\t * @return {Array} dataPoint\r\n\t * @example\r\n\t * // all selected data points will be returned.\r\n\t * chart.selected();\r\n\t *\r\n\t * // all selected data points of data1 will be returned.\r\n\t * chart.selected(\"data1\");\r\n\t */\r\n\tselected(targetId) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst dataPoint = [];\r\n\r\n\t\t$$.main.selectAll(`.${CLASS.shapes + $$.getTargetSelectorSuffix(targetId)}`)\r\n\t\t\t.selectAll(`.${CLASS.shape}`)\r\n\t\t\t.filter(function() {\r\n\t\t\t\treturn d3Select(this).classed(CLASS.SELECTED);\r\n\t\t\t})\r\n\t\t\t.each(d => dataPoint.push(d));\r\n\r\n\t\treturn dataPoint;\r\n\t},\r\n\r\n\t/**\r\n\t * Set data points to be selected.\r\n\t * @method select\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String} ids\r\n\t * @param {Number} indices\r\n\t * @param {Boolean} resetOther\r\n\t * @example\r\n\t * // select from 'data1', indices 2 and unselect others selected\r\n\t * chart.select(\"data1\", 2, true);\r\n\t */\r\n\tselect(ids, indices, resetOther) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (!config.data_selection_enabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$$.main.selectAll(`.${CLASS.shapes}`)\r\n\t\t\t.selectAll(`.${CLASS.shape}`)\r\n\t\t\t.each(function(d, i) {\r\n\t\t\t\tconst shape = d3Select(this);\r\n\t\t\t\tconst id = d.data ? d.data.id : d.id;\r\n\t\t\t\tconst toggle = $$.getToggle(this, d).bind($$);\r\n\t\t\t\tconst isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;\r\n\t\t\t\tconst isTargetIndex = !indices || indices.indexOf(i) >= 0;\r\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\r\n\r\n\t\t\t\t// line/area selection not supported yet\r\n\t\t\t\tif (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isTargetId && isTargetIndex) {\r\n\t\t\t\t\tif (config.data_selection_isselectable(d) && !isSelected) {\r\n\t\t\t\t\t\ttoggle(true, shape.classed(CLASS.SELECTED, true), d, i);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (isDefined(resetOther) && resetOther && isSelected) {\r\n\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Set data points to be un-selected.\r\n\t * @method unselect\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String} ids\r\n\t * @param {Number} indices\r\n\t * @example\r\n\t * // unselect from 'data1', indices 2\r\n\t * chart.unselect(\"data1\", 2);\r\n\t */\r\n\tunselect(ids, indices) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (!config.data_selection_enabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$$.main.selectAll(`.${CLASS.shapes}`)\r\n\t\t\t.selectAll(`.${CLASS.shape}`)\r\n\t\t\t.each(function(d, i) {\r\n\t\t\t\tconst shape = d3Select(this);\r\n\t\t\t\tconst id = d.data ? d.data.id : d.id;\r\n\t\t\t\tconst toggle = $$.getToggle(this, d).bind($$);\r\n\t\t\t\tconst isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0;\r\n\t\t\t\tconst isTargetIndex = !indices || indices.indexOf(i) >= 0;\r\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\r\n\r\n\t\t\t\t// line/area selection not supported yet\r\n\t\t\t\tif (shape.classed(CLASS.line) || shape.classed(CLASS.area)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isTargetId && isTargetIndex && config.data_selection_isselectable(d) && isSelected) {\r\n\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.selection.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Show data points\r\n\t * @method show\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String|Array} targetIdsValue\r\n\t * @param {Object} options\r\n\t */\r\n\tshow(targetIdsValue, options = {}) {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\r\n\r\n\t\t$$.removeHiddenTargetIds(targetIds);\r\n\t\tconst targets = $$.svg.selectAll($$.selectorTargets(targetIds));\r\n\r\n\t\ttargets.transition()\r\n\t\t\t.style(\"opacity\", \"1\", \"important\")\r\n\t\t\t.call($$.endall, () => {\r\n\t\t\t\ttargets.style(\"opacity\", null).style(\"opacity\", \"1\");\r\n\t\t\t});\r\n\r\n\t\toptions.withLegend &&\r\n\t\t$$.showLegend(targetIds);\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\twithUpdateXDomain: true,\r\n\t\t\twithLegend: true\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Hide data points\r\n\t * @method hide\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String|Array} targetIdsValue\r\n\t * @param {Object} options\r\n\t */\r\n\thide(targetIdsValue, options = {}) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst targetIds = $$.mapToTargetIds(targetIdsValue);\r\n\r\n\t\t$$.addHiddenTargetIds(targetIds);\r\n\t\tconst targets = $$.svg.selectAll($$.selectorTargets(targetIds));\r\n\r\n\t\ttargets.transition()\r\n\t\t\t.style(\"opacity\", \"0\", \"important\")\r\n\t\t\t.call($$.endall, () => {\r\n\t\t\t\ttargets.style(\"opacity\", null).style(\"opacity\", \"0\");\r\n\t\t\t});\r\n\r\n\t\toptions.withLegend &&\r\n\t\t$$.hideLegend(targetIds);\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\twithUpdateXDomain: true,\r\n\t\t\twithLegend: true\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Toggle data points\r\n\t * @method toggle\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {Array} targetIds\r\n\t * @param {Object} options\r\n\t */\r\n\ttoggle(targetIds, options = {}) {\r\n\t\tconst that = this;\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\t$$.mapToTargetIds(targetIds).forEach(targetId => {\r\n\t\t\t$$.isTargetToShow(targetId) ?\r\n\t\t\t\tthat.hide(targetId, options) : that.show(targetId, options);\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.show.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {isValue, extend} from \"../internals/util\";\r\n\r\n/**\r\n * Define tooltip\r\n */\r\nconst tooltip = function() {};\r\n\r\n/**\r\n * Show tooltip\r\n * @method tooltip:show\r\n * @instance\r\n * @memberof Chart\r\n * @param {Array} args\r\n */\r\ntooltip.show = function(args) {\r\n\tconst $$ = this.internal;\r\n\tlet index;\r\n\tlet mouse;\r\n\r\n\t// determine mouse position on the chart\r\n\tif (args.mouse) {\r\n\t\tmouse = args.mouse;\r\n\t}\r\n\r\n\t// determine focus data\r\n\tif (args.data) {\r\n\t\tif ($$.isMultipleX()) {\r\n\t\t\t// if multiple xs, target point will be determined by mouse\r\n\t\t\tmouse = [\r\n\t\t\t\t$$.x(args.data.x),\r\n\t\t\t\t$$.getYScale(args.data.id)(args.data.value)\r\n\t\t\t];\r\n\r\n\t\t\tindex = null;\r\n\t\t} else {\r\n\t\t\t// TODO: when tooltip_grouped = false\r\n\t\t\tindex = isValue(args.data.index) ? args.data.index : $$.getIndexByX(args.data.x);\r\n\t\t}\r\n\t} else if (typeof args.x !== \"undefined\") {\r\n\t\tindex = $$.getIndexByX(args.x);\r\n\t} else if (typeof args.index !== \"undefined\") {\r\n\t\tindex = args.index;\r\n\t}\r\n\r\n\t// emulate mouse events to show\r\n\t$$.dispatchEvent(\"mouseover\", index, mouse);\r\n\t$$.dispatchEvent(\"mousemove\", index, mouse);\r\n\r\n\t$$.config.tooltip_onshow.call($$, args.data);\r\n};\r\n\r\n/**\r\n * Hide tooltip\r\n * @method tooltip:hide\r\n * @instance\r\n * @memberof Chart\r\n */\r\ntooltip.hide = function() {\r\n\t// TODO: get target data by checking the state of focus\r\n\tthis.internal.dispatchEvent(\"mouseout\", 0);\r\n\r\n\tthis.internal.config.tooltip_onhide.call(this);\r\n};\r\n\r\nextend(Chart.prototype, {tooltip});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.tooltip.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Change the type of the chart.\r\n\t * @method transform\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @param {String} type Specify the type to be transformed. The types listed in data.type can be used.\r\n\t * @param {String|Array} targetIds Specify targets to be transformed. If not given, all targets will be the candidate.\r\n\t * @example\r\n\t * // all targets will be bar chart.\r\n\t * chart.transform(\"bar\");\r\n\t *\r\n\t * // only data1 will be bar chart.\r\n\t * chart.transform(\"bar\", \"data1\");\r\n\t *\r\n\t * // only data1 and data2 will be bar chart.\r\n\t * chart.transform(\"bar\", [\"data1\", \"data2\"]);\r\n\t */\r\n\ttransform(type, targetIds) {\r\n\t\tconst $$ = this.internal;\r\n\t\tconst options = [\"pie\", \"donut\"]\r\n\t\t\t.indexOf(type) >= 0 ? {withTransform: true} : null;\r\n\r\n\t\t$$.transformTo(targetIds, type, options);\r\n\t}\r\n});\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Change the type of the chart.\r\n\t * @private\r\n\t * @param {String|Array} targetIds\r\n\t * @param {String} type\r\n\t * @param {Object} optionsForRedraw\r\n\t */\r\n\ttransformTo(targetIds, type, optionsForRedraw) {\r\n\t\tconst $$ = this;\r\n\t\tconst withTransitionForAxis = !$$.hasArcType();\r\n\t\tconst options = optionsForRedraw || {withTransitionForAxis: withTransitionForAxis};\r\n\r\n\t\toptions.withTransitionForTransform = false;\r\n\t\t$$.transiting = false;\r\n\r\n\t\t$$.setTargetType(targetIds, type);\r\n\t\t$$.updateTargets($$.data.targets); // this is needed when transforming to arc\r\n\t\t$$.updateAndRedraw(options);\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.transform.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Chart from \"../internals/Chart\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(Chart.prototype, {\r\n\t/**\r\n\t * Get and set x values for the chart.\r\n\t * @method x\r\n\t * @instance\r\n\t * @memberof Chart\r\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.\r\n\t * @return {Object} xs\r\n\t * @example\r\n\t * // Get current x values\r\n\t * chart.x();\r\n\t *\r\n\t * // Update x values for all targets\r\n\t * chart.x([100, 200, 300, 400, ...]);\r\n\t */\r\n\tx(x) {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\tif (arguments.length) {\r\n\t\t\t$$.updateTargetX($$.data.targets, x);\r\n\r\n\t\t\t$$.redraw({\r\n\t\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\t\twithUpdateXDomain: true\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn $$.data.xs;\r\n\t},\r\n\r\n\t/**\r\n\t * Get and set x values for the chart.\r\n\t * @method xs\r\n\t * @instance\r\n\t * @memberof Chart\r\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.\r\n\t * @return {Object} xs\r\n\t * @example\r\n\t * // Get current x values\r\n\t * chart.xs();\r\n\t *\r\n\t * // Update x values for all targets\r\n\t * chart.xs({\r\n\t * data1: [10, 20, 30, 40, ...],\r\n\t * data2: [100, 200, 300, 400, ...]\r\n\t * });\r\n\t */\r\n\txs(xs) {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\tif (arguments.length) {\r\n\t\t\t$$.updateTargetXs($$.data.targets, xs);\r\n\r\n\t\t\t$$.redraw({\r\n\t\t\t\twithUpdateOrgXDomain: true,\r\n\t\t\t\twithUpdateXDomain: true\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn $$.data.xs;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.x.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tmin as d3Min,\r\n\tmax as d3Max,\r\n\tzoomIdentity as d3ZoomIdentity,\r\n} from \"d3\";\r\nimport Chart from \"../internals/Chart\";\r\nimport {isDefined, extend} from \"../internals/util\";\r\n\r\n/**\r\n * Zoom by giving x domain.\r\n * @method zoom\r\n * @instance\r\n * @memberof Chart\r\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.\r\n * @example\r\n * // Zoom to specified domain\r\n * chart.zoom([10, 20]);\r\n *\r\n * // Get the current zoomed domain\r\n * chart.zoom();\r\n */\r\nconst zoom = function(domainValue) {\r\n\tconst $$ = this.internal;\r\n\tlet domain = domainValue;\r\n\tlet resultDomain;\r\n\r\n\tif (domain) {\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\tdomain = domain.map(x => $$.parseDate(x));\r\n\t\t}\r\n\r\n\t\tif ($$.config.subchart_show) {\r\n\t\t\tconst xScale = $$.zoomScale || $$.x;\r\n\r\n\t\t\t$$.brush.getSelection().call($$.brush.move, [xScale(domain[0]), xScale(domain[1])]);\r\n\t\t\tresultDomain = domain;\r\n\t\t} else {\r\n\t\t\tconst orgDomain = $$.x.orgDomain();\r\n\t\t\tconst k = (orgDomain[1] - orgDomain[0]) / (domain[1] - domain[0]);\r\n\t\t\tconst tx = $$.isTimeSeries() ?\r\n\t\t\t\t(0 - k * $$.x(domain[0].getTime())) : domain[0] - k * $$.x(domain[0]);\r\n\r\n\t\t\t$$.zoom.updateTransformScale(d3ZoomIdentity\r\n\t\t\t\t.translate(tx, 0)\r\n\t\t\t\t.scale(k));\r\n\t\t\tresultDomain = $$.zoomScale.domain();\r\n\t\t}\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithTransition: true,\r\n\t\t\twithY: $$.config.zoom_rescale\r\n\t\t});\r\n\r\n\t\t$$.config.zoom_onzoom.call(this, $$.x.orgDomain());\r\n\t} else {\r\n\t\tresultDomain = ($$.zoomScale || $$.x).domain();\r\n\t}\r\n\treturn resultDomain;\r\n};\r\n\r\n/**\r\n * Enable and disable zooming.\r\n * @method zoom:enable\r\n * @instance\r\n * @memberof Chart\r\n * @param {Boolean} enabled If enabled is true, the feature of zooming will be enabled. If false is given, it will be disabled.\r\n * @example\r\n * // Enable zooming\r\n * chart.zoom.enable(true);\r\n */\r\nzoom.enable = function(enabled) {\r\n\tconst $$ = this.internal;\r\n\r\n\t$$.config.zoom_enabled = enabled;\r\n\t$$.updateAndRedraw();\r\n};\r\n\r\n/**\r\n * Set zoom max\r\n * @method zoom:max\r\n * @instance\r\n * @memberof Chart\r\n * @param {Number} max\r\n */\r\nzoom.max = function(max) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (max === 0 || max) {\r\n\t\tconfig.zoom_x_max = d3Max([$$.orgXDomain[1], max]);\r\n\t} else {\r\n\t\treturn config.zoom_x_max;\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\n/**\r\n * Set zoom min\r\n * @method zoom:min\r\n * @instance\r\n * @memberof Chart\r\n * @param {Number} min\r\n */\r\nzoom.min = function(min) {\r\n\tconst $$ = this.internal;\r\n\tconst config = $$.config;\r\n\r\n\tif (min === 0 || min) {\r\n\t\tconfig.zoom_x_min = d3Min([$$.orgXDomain[0], min]);\r\n\t} else {\r\n\t\treturn config.zoom_x_min;\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\n/**\r\n * Set zoom range\r\n * @method zoom:range\r\n * @instance\r\n * @memberof Chart\r\n * @param {Object} range\r\n * @return {Object} range\r\n * {\r\n * min: 0,\r\n * max: 100\r\n * }\r\n * @example\r\n * chart.zoom.range({\r\n * min: 10,\r\n * max: 100\r\n * });\r\n */\r\nzoom.range = function(range) {\r\n\tif (arguments.length) {\r\n\t\tisDefined(range.max) && this.domain.max(range.max);\r\n\t\tisDefined(range.min) && this.domain.min(range.min);\r\n\t} else {\r\n\t\treturn {\r\n\t\t\tmax: this.domain.max(),\r\n\t\t\tmin: this.domain.min()\r\n\t\t};\r\n\t}\r\n\r\n\treturn undefined;\r\n};\r\n\r\nextend(Chart.prototype, {\r\n\tzoom,\r\n\t/**\r\n\t * Unzoom zoomed area\r\n\t * @method unzoom\r\n\t * @instance\r\n\t * @memberof Chart\r\n\t * @example\r\n\t * chart.unzoom();\r\n\t */\r\n\tunzoom() {\r\n\t\tconst $$ = this.internal;\r\n\r\n\t\tif ($$.config.subchart_show) {\r\n\t\t\t$$.brush.getSelection().call($$.brush.move, null);\r\n\t\t} else {\r\n\t\t\t$$.zoom.updateTransformScale(d3ZoomIdentity);\r\n\t\t}\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithTransition: true,\r\n\t\t\twithY: $$.config.zoom_rescale\r\n\t\t});\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/api/api.zoom.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport Options from \"./Options\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {isDefined, merge, extend} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetOptions() {\r\n\t\tconst config = new Options();\r\n\r\n\t\treturn merge(\r\n\t\t\tconfig.value,\r\n\t\t\tthis.additionalConfig\r\n\t\t);\r\n\t},\r\n\r\n\tadditionalConfig: {},\r\n\r\n\tloadConfig(config) {\r\n\t\tconst thisConfig = this.config;\r\n\t\tlet target;\r\n\t\tlet keys;\r\n\t\tlet read;\r\n\r\n\t\tfunction find() {\r\n\t\t\tconst key = keys.shift();\r\n\r\n\t\t\tif (key && target && typeof target === \"object\" && key in target) {\r\n\t\t\t\ttarget = target[key];\r\n\t\t\t\treturn find();\r\n\t\t\t} else if (!key) {\r\n\t\t\t\treturn target;\r\n\t\t\t} else {\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tObject.keys(thisConfig).forEach(key => {\r\n\t\t\ttarget = config;\r\n\t\t\tkeys = key.split(\"_\");\r\n\t\t\tread = find();\r\n\r\n\t\t\tif (isDefined(read)) {\r\n\t\t\t\tthisConfig[key] = read;\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/config/config.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\trequest as d3Request,\r\n\tkeys as d3Keys,\r\n\tcsvParse as d3CsvParse,\r\n\ttsvParse as d3TsvParse,\r\n\tcsvParseRows as d3CsvParseRows,\r\n\ttsvParseRows as d3TsvParseRows,\r\n} from \"d3\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {isUndefined, isDefined, isValue, notEmpty, extend} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tconvertUrlToData(url, mimeType = \"csv\", headers, keys, done) {\r\n\t\tconst type = mimeType;\r\n\t\tconst req = d3Request(url);\r\n\r\n\t\tif (headers) {\r\n\t\t\tfor (const header of Object.keys(headers)) {\r\n\t\t\t\treq.header(header, headers[header]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treq.get((error, data) => {\r\n\t\t\tlet d;\r\n\r\n\t\t\tif (!data) {\r\n\t\t\t\tthrow new Error(`${error.responseURL} ${error.status} (${error.statusText})`);\r\n\t\t\t}\r\n\r\n\t\t\tconst response = data.response || data.responseText;\r\n\r\n\t\t\tif (type === \"json\") {\r\n\t\t\t\td = this.convertJsonToData(JSON.parse(response), keys);\r\n\t\t\t} else if (type === \"tsv\") {\r\n\t\t\t\t// ref : https://github.com/d3/d3-dsv#dsv_parse\r\n\t\t\t\td = this.convertTsvToData(response);\r\n\t\t\t} else {\r\n\t\t\t\td = this.convertCsvToData(response);\r\n\t\t\t}\r\n\r\n\t\t\tdone.call(this, d);\r\n\t\t});\r\n\t},\r\n\r\n\tconvertCsvToData(xsv) {\r\n\t\tconst rows = d3CsvParseRows(xsv);\r\n\t\tlet d;\r\n\r\n\t\tif (rows.length === 1) {\r\n\t\t\td = [{}];\r\n\t\t\trows[0].forEach(id => {\r\n\t\t\t\td[0][id] = null;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\td = d3CsvParse(xsv);\r\n\t\t}\r\n\r\n\t\treturn d;\r\n\t},\r\n\r\n\tconvertTsvToData(xsv) {\r\n\t\tconst rows = d3TsvParseRows(xsv);\r\n\t\tlet d;\r\n\r\n\t\tif (rows.length === 1) {\r\n\t\t\td = [{}];\r\n\t\t\trows[0].forEach(id => {\r\n\t\t\t\td[0][id] = null;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\td = d3TsvParse(xsv);\r\n\t\t}\r\n\r\n\t\treturn d;\r\n\t},\r\n\r\n\tconvertJsonToData(json, keys) {\r\n\t\tconst newRows = [];\r\n\t\tlet targetKeys;\r\n\t\tlet data;\r\n\r\n\t\tif (keys) { // when keys specified, json would be an array that includes objects\r\n\t\t\tif (keys.x) {\r\n\t\t\t\ttargetKeys = keys.value.concat(keys.x);\r\n\t\t\t\tthis.config.data_x = keys.x;\r\n\t\t\t} else {\r\n\t\t\t\ttargetKeys = keys.value;\r\n\t\t\t}\r\n\t\t\tnewRows.push(targetKeys);\r\n\r\n\t\t\tjson.forEach(o => {\r\n\t\t\t\tconst newRow = [];\r\n\t\t\t\tlet v;\r\n\r\n\t\t\t\tfor (const key of targetKeys) {\r\n\t\t\t\t\t// convert undefined to null because undefined data will be removed in convertDataToTargets()\r\n\t\t\t\t\tv = this.findValueInJson(o, key);\r\n\t\t\t\t\tif (isUndefined(v)) {\r\n\t\t\t\t\t\tv = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tnewRow.push(v);\r\n\t\t\t\t}\r\n\t\t\t\tnewRows.push(newRow);\r\n\t\t\t});\r\n\t\t\tdata = this.convertRowsToData(newRows);\r\n\t\t} else {\r\n\t\t\tObject.keys(json).forEach(key => newRows.push([key].concat(json[key])));\r\n\t\t\tdata = this.convertColumnsToData(newRows);\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\r\n\tfindValueInJson(object, path) {\r\n\t\tconst convertedPath = path.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties (replace [] with .)\r\n\t\tconst pathArray = convertedPath.replace(/^\\./, \"\").split(\".\"); // strip a leading dot\r\n\t\tlet target = object;\r\n\r\n\t\tfor (const k of pathArray) {\r\n\t\t\tif (k in target) {\r\n\t\t\t\ttarget = target[k];\r\n\t\t\t} else {\r\n\t\t\t\ttarget = undefined;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn target;\r\n\t},\r\n\r\n\tconvertRowsToData(rows) {\r\n\t\tconst keys = rows[0];\r\n\t\tconst newRows = [];\r\n\t\tlet newRow = {};\r\n\t\tlet i;\r\n\t\tlet j;\r\n\r\n\t\tfor (i = 1; i < rows.length; i++) {\r\n\t\t\tnewRow = {};\r\n\t\t\tfor (j = 0; j < rows[i].length; j++) {\r\n\t\t\t\tif (isUndefined(rows[i][j])) {\r\n\t\t\t\t\tthrow new Error(`Source data is missing a component at (${i}, ${j})!`);\r\n\t\t\t\t}\r\n\t\t\t\tnewRow[keys[j]] = rows[i][j];\r\n\t\t\t}\r\n\t\t\tnewRows.push(newRow);\r\n\t\t}\r\n\r\n\t\treturn newRows;\r\n\t},\r\n\r\n\tconvertColumnsToData(columns) {\r\n\t\tconst newRows = [];\r\n\t\tlet i;\r\n\t\tlet j;\r\n\t\tlet key;\r\n\r\n\t\tfor (i = 0; i < columns.length; i++) {\r\n\t\t\tkey = columns[i][0];\r\n\t\t\tfor (j = 1; j < columns[i].length; j++) {\r\n\t\t\t\tif (isUndefined(newRows[j - 1])) {\r\n\t\t\t\t\tnewRows[j - 1] = {};\r\n\t\t\t\t}\r\n\t\t\t\tif (isUndefined(columns[i][j])) {\r\n\t\t\t\t\tthrow new Error(`Source data is missing a component at (${i}, ${j})!`);\r\n\t\t\t\t}\r\n\t\t\t\tnewRows[j - 1][key] = columns[i][j];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newRows;\r\n\t},\r\n\r\n\tconvertDataToTargets(data, appendXs) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst ids = d3Keys(data[0]).filter($$.isNotX, $$);\r\n\t\tconst xs = d3Keys(data[0]).filter($$.isX, $$);\r\n\r\n\t\t// save x for update data by load when custom x and bb.x API\r\n\t\tids.forEach(id => {\r\n\t\t\tconst xKey = this.getXKey(id);\r\n\r\n\t\t\tif (this.isCustomX() || this.isTimeSeries()) {\r\n\t\t\t\t// if included in input data\r\n\t\t\t\tif (xs.indexOf(xKey) >= 0) {\r\n\t\t\t\t\tthis.data.xs[id] =\r\n\t\t\t\t\t\t(appendXs && $$.data.xs[id] ? $$.data.xs[id] : [])\r\n\t\t\t\t\t\t\t.concat(\r\n\t\t\t\t\t\t\t\tdata.map(d => d[xKey])\r\n\t\t\t\t\t\t\t\t\t.filter(isValue)\r\n\t\t\t\t\t\t\t\t\t.map((rawX, i) => $$.generateTargetX(rawX, id, i)));\r\n\t\t\t\t} else if (config.data_x) {\r\n\t\t\t\t\t// if not included in input data, find from preloaded data of other id's x\r\n\t\t\t\t\tthis.data.xs[id] = this.getOtherTargetXs();\r\n\t\t\t\t} else if (notEmpty(config.data_xs)) {\r\n\t\t\t\t\t// if not included in input data, find from preloaded data\r\n\t\t\t\t\t$$.data.xs[id] = $$.getXValuesOfXKey(xKey, $$.data.targets);\r\n\t\t\t\t}\r\n\t\t\t\t// MEMO: if no x included, use same x of current will be used\r\n\t\t\t} else {\r\n\t\t\t\t$$.data.xs[id] = data.map((d, i) => i);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\r\n\t\t// check x is defined\r\n\t\tids.forEach(id => {\r\n\t\t\tif (!$$.data.xs[id]) {\r\n\t\t\t\tthrow new Error(`x is not defined for id = \"${id}\".`);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t// convert to target\r\n\t\tconst targets = ids.map((id, index) => {\r\n\t\t\tconst convertedId = config.data_idConverter(id);\r\n\r\n\t\t\treturn {\r\n\t\t\t\tid: convertedId,\r\n\t\t\t\tid_org: id,\r\n\t\t\t\tvalues: data.map((d, i) => {\r\n\t\t\t\t\tconst xKey = $$.getXKey(id);\r\n\t\t\t\t\tconst rawX = d[xKey];\r\n\t\t\t\t\tconst value = d[id] !== null && !isNaN(d[id]) ? +d[id] : null;\r\n\t\t\t\t\tlet x;\r\n\r\n\t\t\t\t\t// use x as categories if custom x and categorized\r\n\t\t\t\t\tif ($$.isCustomX() && $$.isCategorized() && index === 0 && !isUndefined(rawX)) {\r\n\t\t\t\t\t\tif (index === 0 && i === 0) {\r\n\t\t\t\t\t\t\tconfig.axis_x_categories = [];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tx = config.axis_x_categories.indexOf(rawX);\r\n\t\t\t\t\t\tif (x === -1) {\r\n\t\t\t\t\t\t\tx = config.axis_x_categories.length;\r\n\t\t\t\t\t\t\tconfig.axis_x_categories.push(rawX);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tx = $$.generateTargetX(rawX, id, i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// mark as x = undefined if value is undefined and filter to remove after mapped\r\n\t\t\t\t\tif (isUndefined(d[id]) || $$.data.xs[id].length <= i) {\r\n\t\t\t\t\t\tx = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn {x: x, value: value, id: convertedId};\r\n\t\t\t\t}).filter(v => isDefined(v.x))\r\n\t\t\t};\r\n\t\t});\r\n\r\n\t\t// finish targets\r\n\t\ttargets.forEach(t => {\r\n\t\t\tlet i;\r\n\r\n\t\t\t// sort values by its x\r\n\t\t\tif (config.data_xSort) {\r\n\t\t\t\tt.values = t.values.sort((v1, v2) => {\r\n\t\t\t\t\tconst x1 = v1.x || v1.x === 0 ? v1.x : Infinity;\r\n\t\t\t\t\tconst x2 = v2.x || v2.x === 0 ? v2.x : Infinity;\r\n\r\n\t\t\t\t\treturn x1 - x2;\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t// indexing each value\r\n\t\t\ti = 0;\r\n\t\t\tt.values.forEach(v => {\r\n\t\t\t\tv.index = i++;\r\n\t\t\t});\r\n\t\t\t// this needs to be sorted because its index and value.index is identical\r\n\t\t\t$$.data.xs[t.id].sort((v1, v2) => v1 - v2);\r\n\t\t});\r\n\r\n\t\t// cache information about values\r\n\t\t$$.hasNegativeValue = $$.hasNegativeValueInTargets(targets);\r\n\t\t$$.hasPositiveValue = $$.hasPositiveValueInTargets(targets);\r\n\r\n\t\t// set target types\r\n\t\tif (config.data_type) {\r\n\t\t\t$$.setTargetType($$.mapToIds(targets)\r\n\t\t\t\t.filter(id => !(id in config.data_types)), config.data_type);\r\n\t\t}\r\n\r\n\t\t// cache as original id keyed\r\n\t\ttargets.forEach(d => {\r\n\t\t\t$$.addCache(d.id_org, d);\r\n\t\t});\r\n\r\n\t\treturn targets;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/data/data.convert.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tset as d3Set,\r\n\tmax as d3Max,\r\n\tmin as d3Min,\r\n\tmerge as d3Merge\r\n} from \"d3\";\r\nimport CLASS from \"../config/classes\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {extend, hasValue, isValue, notEmpty, isFunction} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tisX(key) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst dataKey = config.data_x && key === config.data_x;\r\n\t\tconst existValue = notEmpty(config.data_xs) && hasValue(config.data_xs, key);\r\n\r\n\t\treturn (dataKey) || (existValue);\r\n\t},\r\n\r\n\tisNotX(key) {\r\n\t\treturn !this.isX(key);\r\n\t},\r\n\r\n\tgetXKey(id) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn config.data_x ? config.data_x : notEmpty(config.data_xs) ? config.data_xs[id] : null;\r\n\t},\r\n\r\n\tgetXValuesOfXKey(key, targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst ids = targets && notEmpty(targets) ? $$.mapToIds(targets) : [];\r\n\t\tlet xValues;\r\n\r\n\t\tids.forEach(id => {\r\n\t\t\tif ($$.getXKey(id) === key) {\r\n\t\t\t\txValues = $$.data.xs[id];\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn xValues;\r\n\t},\r\n\r\n\tgetIndexByX(x) {\r\n\t\tconst $$ = this;\r\n\t\tconst data = $$.filterByX($$.data.targets, x);\r\n\r\n\t\treturn data.length ? data[0].index : null;\r\n\t},\r\n\r\n\tgetXValue(id, i) {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn id in $$.data.xs && $$.data.xs[id] && isValue($$.data.xs[id][i]) ? $$.data.xs[id][i] : i;\r\n\t},\r\n\r\n\tgetOtherTargetXs() {\r\n\t\tconst $$ = this;\r\n\t\tconst idsForX = Object.keys($$.data.xs);\r\n\r\n\t\treturn idsForX.length ? $$.data.xs[idsForX[0]] : null;\r\n\t},\r\n\r\n\tgetOtherTargetX(index) {\r\n\t\tconst xs = this.getOtherTargetXs();\r\n\r\n\t\treturn xs && index < xs.length ? xs[index] : null;\r\n\t},\r\n\r\n\taddXs(xs) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tObject.keys(xs).forEach(id => {\r\n\t\t\t$$.config.data_xs[id] = xs[id];\r\n\t\t});\r\n\t},\r\n\r\n\thasMultipleX(xs) {\r\n\t\t// https://github.com/d3/d3-collection\r\n\t\treturn d3Set(Object.keys(xs).map(id => xs[id])).size() > 1;\r\n\t},\r\n\r\n\tisMultipleX() {\r\n\t\treturn notEmpty(this.config.data_xs) || !this.config.data_xSort || this.hasType(\"scatter\");\r\n\t},\r\n\r\n\taddName(data) {\r\n\t\tconst $$ = this;\r\n\t\tlet name;\r\n\r\n\t\tif (data) {\r\n\t\t\tname = $$.config.data_names[data.id];\r\n\t\t\tdata.name = name !== undefined ? name : data.id;\r\n\t\t}\r\n\t\treturn data;\r\n\t},\r\n\r\n\tgetValueOnIndex(values, index) {\r\n\t\tconst valueOnIndex = values.filter(v => v.index === index);\r\n\r\n\t\treturn valueOnIndex.length ? valueOnIndex[0] : null;\r\n\t},\r\n\r\n\tupdateTargetX(targets, x) {\r\n\t\tconst $$ = this;\r\n\r\n\t\ttargets.forEach(t => {\r\n\t\t\tt.values.forEach((v, i) => {\r\n\t\t\t\tv.x = $$.generateTargetX(x[i], t.id, i);\r\n\t\t\t});\r\n\t\t\t$$.data.xs[t.id] = x;\r\n\t\t});\r\n\t},\r\n\r\n\tupdateTargetXs(targets, xs) {\r\n\t\tconst $$ = this;\r\n\r\n\t\ttargets.forEach(t => {\r\n\t\t\tif (xs[t.id]) {\r\n\t\t\t\t$$.updateTargetX([t], xs[t.id]);\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\tgenerateTargetX(rawX, id, index) {\r\n\t\tconst $$ = this;\r\n\t\tlet x;\r\n\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\tx = rawX ? $$.parseDate(rawX) : $$.parseDate($$.getXValue(id, index));\r\n\t\t} else if ($$.isCustomX() && !$$.isCategorized()) {\r\n\t\t\tx = isValue(rawX) ? +rawX : $$.getXValue(id, index);\r\n\t\t} else {\r\n\t\t\tx = index;\r\n\t\t}\r\n\t\treturn x;\r\n\t},\r\n\r\n\tcloneTarget(target) {\r\n\t\treturn {\r\n\t\t\tid: target.id,\r\n\t\t\tid_org: target.id_org,\r\n\t\t\tvalues: target.values.map(d => ({x: d.x, value: d.value, id: d.id}))\r\n\t\t};\r\n\t},\r\n\r\n\tupdateXs() {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif ($$.data.targets.length) {\r\n\t\t\t$$.xs = [];\r\n\t\t\t$$.data.targets[0].values.forEach(v => {\r\n\t\t\t\t$$.xs[v.index] = v.x;\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tgetPrevX(i) {\r\n\t\tconst x = this.xs[i - 1];\r\n\r\n\t\treturn typeof x !== \"undefined\" ? x : null;\r\n\t},\r\n\r\n\tgetNextX(i) {\r\n\t\tconst x = this.xs[i + 1];\r\n\r\n\t\treturn typeof x !== \"undefined\" ? x : null;\r\n\t},\r\n\r\n\tgetMaxDataCount() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn d3Max($$.data.targets, t => t.values.length);\r\n\t},\r\n\r\n\tgetMaxDataCountTarget(targets) {\r\n\t\tconst length = targets.length;\r\n\t\tlet max = 0;\r\n\t\tlet maxTarget;\r\n\r\n\t\tif (length > 1) {\r\n\t\t\ttargets.forEach(t => {\r\n\t\t\t\tif (t.values.length > max) {\r\n\t\t\t\t\tmaxTarget = t;\r\n\t\t\t\t\tmax = t.values.length;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tmaxTarget = length ? targets[0] : null;\r\n\t\t}\r\n\t\treturn maxTarget;\r\n\t},\r\n\r\n\tgetEdgeX(targets) {\r\n\t\treturn !targets.length ? [0, 0] : [\r\n\t\t\td3Min(targets, t => t.values[0].x),\r\n\t\t\td3Max(targets, t => t.values[t.values.length - 1].x)\r\n\t\t];\r\n\t},\r\n\r\n\tmapToIds(targets) {\r\n\t\treturn targets.map(d => d.id);\r\n\t},\r\n\r\n\tmapToTargetIds(ids) {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn ids ? [].concat(ids) : $$.mapToIds($$.data.targets);\r\n\t},\r\n\r\n\thasTarget(targets, id) {\r\n\t\tconst ids = this.mapToIds(targets);\r\n\t\tlet i;\r\n\r\n\t\tfor (i = 0; i < ids.length; i++) {\r\n\t\t\tif (ids[i] === id) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tisTargetToShow(targetId) {\r\n\t\treturn this.hiddenTargetIds.indexOf(targetId) < 0;\r\n\t},\r\n\r\n\tisLegendToShow(targetId) {\r\n\t\treturn this.hiddenLegendIds.indexOf(targetId) < 0;\r\n\t},\r\n\r\n\tfilterTargetsToShow(targets) {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn targets.filter(t => $$.isTargetToShow(t.id));\r\n\t},\r\n\r\n\tmapTargetsToUniqueXs(targets) {\r\n\t\tconst $$ = this;\r\n\t\tlet xs = d3Set(d3Merge(\r\n\t\t\ttargets.map(t => t.values.map(v => +v.x))\r\n\t\t)).values();\r\n\r\n\t\txs = $$.isTimeSeries() ? xs.map(x => new Date(+x)) : xs.map(x => +x);\r\n\t\treturn xs.sort((a, b) => (a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN));\r\n\t},\r\n\r\n\taddHiddenTargetIds(targetIds) {\r\n\t\tthis.hiddenTargetIds = this.hiddenTargetIds.concat(targetIds);\r\n\t},\r\n\r\n\tremoveHiddenTargetIds(targetIds) {\r\n\t\tthis.hiddenTargetIds = this.hiddenTargetIds.filter(id => targetIds.indexOf(id) < 0);\r\n\t},\r\n\r\n\taddHiddenLegendIds(targetIds) {\r\n\t\tthis.hiddenLegendIds = this.hiddenLegendIds.concat(targetIds);\r\n\t},\r\n\r\n\tremoveHiddenLegendIds(targetIds) {\r\n\t\tthis.hiddenLegendIds = this.hiddenLegendIds.filter(id => targetIds.indexOf(id) < 0);\r\n\t},\r\n\r\n\tgetValuesAsIdKeyed(targets) {\r\n\t\tconst ys = {};\r\n\r\n\t\ttargets.forEach(t => {\r\n\t\t\tys[t.id] = [];\r\n\t\t\tt.values.forEach(v => {\r\n\t\t\t\tys[t.id].push(v.value);\r\n\t\t\t});\r\n\t\t});\r\n\t\treturn ys;\r\n\t},\r\n\r\n\tcheckValueInTargets(targets, checker) {\r\n\t\tconst ids = Object.keys(targets);\r\n\t\tlet i;\r\n\t\tlet j;\r\n\t\tlet values;\r\n\r\n\t\tfor (i = 0; i < ids.length; i++) {\r\n\t\t\tvalues = targets[ids[i]].values;\r\n\t\t\tfor (j = 0; j < values.length; j++) {\r\n\t\t\t\tif (checker(values[j].value)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\thasNegativeValueInTargets(targets) {\r\n\t\treturn this.checkValueInTargets(targets, v => v < 0);\r\n\t},\r\n\r\n\thasPositiveValueInTargets(targets) {\r\n\t\treturn this.checkValueInTargets(targets, v => v > 0);\r\n\t},\r\n\r\n\tisOrderDesc() {\r\n\t\tconst config = this.config;\r\n\r\n\t\treturn typeof(config.data_order) === \"string\" && config.data_order.toLowerCase() === \"desc\";\r\n\t},\r\n\r\n\tisOrderAsc() {\r\n\t\tconst config = this.config;\r\n\r\n\t\treturn typeof(config.data_order) === \"string\" && config.data_order.toLowerCase() === \"asc\";\r\n\t},\r\n\r\n\torderTargets(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst orderAsc = $$.isOrderAsc();\r\n\t\tconst orderDesc = $$.isOrderDesc();\r\n\r\n\t\tif (orderAsc || orderDesc) {\r\n\t\t\ttargets.sort((t1, t2) => {\r\n\t\t\t\tconst reducer = (p, c) => p + Math.abs(c.value);\r\n\t\t\t\tconst t1Sum = t1.values.reduce(reducer, 0);\r\n\t\t\t\tconst t2Sum = t2.values.reduce(reducer, 0);\r\n\r\n\t\t\t\treturn orderAsc ? t2Sum - t1Sum : t1Sum - t2Sum;\r\n\t\t\t});\r\n\t\t} else if (isFunction(config.data_order)) {\r\n\t\t\ttargets.sort(config.data_order);\r\n\t\t} // TODO: accept name array for order\r\n\t\treturn targets;\r\n\t},\r\n\r\n\tfilterByX(targets, x) {\r\n\t\treturn d3Merge(targets.map(t => t.values)).filter(v => v.x - x === 0);\r\n\t},\r\n\r\n\tfilterRemoveNull(data) {\r\n\t\treturn data.filter(d => isValue(d.value));\r\n\t},\r\n\r\n\tfilterByXDomain(targets, xDomain) {\r\n\t\treturn targets.map(t => ({\r\n\t\t\tid: t.id,\r\n\t\t\tid_org: t.id_org,\r\n\t\t\tvalues: t.values.filter(v => xDomain[0] <= v.x && v.x <= xDomain[1])\r\n\t\t}));\r\n\t},\r\n\r\n\thasDataLabel() {\r\n\t\tconst config = this.config;\r\n\r\n\t\tif (typeof config.data_labels === \"boolean\" && config.data_labels) {\r\n\t\t\treturn true;\r\n\t\t} else if (typeof config.data_labels === \"object\" && notEmpty(config.data_labels)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetDataLabelLength(min, max, key) {\r\n\t\tconst $$ = this;\r\n\t\tconst lengths = [0, 0];\r\n\t\tconst paddingCoef = 1.3;\r\n\r\n\t\t$$.selectChart.select(\"svg\").selectAll(\".dummy\")\r\n\t\t\t.data([min, max])\r\n\t\t\t.enter()\r\n\t\t\t.append(\"text\")\r\n\t\t\t.text(d => $$.dataLabelFormat(d.id)(d))\r\n\t\t\t.each(function(d, i) {\r\n\t\t\t\tlengths[i] = this.getBoundingClientRect()[key] * paddingCoef;\r\n\t\t\t})\r\n\t\t\t.remove();\r\n\t\treturn lengths;\r\n\t},\r\n\r\n\tisNoneArc(d) {\r\n\t\treturn this.hasTarget(this.data.targets, d.id);\r\n\t},\r\n\r\n\tisArc(d) {\r\n\t\treturn \"data\" in d && this.hasTarget(this.data.targets, d.data.id);\r\n\t},\r\n\r\n\tfindSameXOfValues(values, index) {\r\n\t\tconst targetX = values[index].x;\r\n\t\tconst sames = [];\r\n\t\tlet i;\r\n\r\n\t\tfor (i = index - 1; i >= 0; i--) {\r\n\t\t\tif (targetX !== values[i].x) { break; }\r\n\t\t\tsames.push(values[i]);\r\n\t\t}\r\n\t\tfor (i = index; i < values.length; i++) {\r\n\t\t\tif (targetX !== values[i].x) { break; }\r\n\t\t\tsames.push(values[i]);\r\n\t\t}\r\n\t\treturn sames;\r\n\t},\r\n\r\n\tfindClosestFromTargets(targets, pos) {\r\n\t\tconst $$ = this;\r\n\t\tconst candidates = targets.map(target => $$.findClosest(target.values, pos)); // map to array of closest points of each target\r\n\r\n\t\t// decide closest point and return\r\n\t\treturn $$.findClosest(candidates, pos);\r\n\t},\r\n\r\n\tfindClosest(values, pos) {\r\n\t\tconst $$ = this;\r\n\t\tlet minDist = $$.config.point_sensitivity;\r\n\t\tlet closest;\r\n\r\n\t\t// find mouseovering bar\r\n\t\tvalues\r\n\t\t\t.filter(v => v && $$.isBarType(v.id))\r\n\t\t\t.forEach(v => {\r\n\t\t\t\tconst shape = $$.main.select().node(`.${CLASS.bars}${$$.getTargetSelectorSuffix(v.id)}.${CLASS.bar}-${v.index}`);\r\n\r\n\t\t\t\tif (!closest && $$.isWithinBar(shape)) {\r\n\t\t\t\t\tclosest = v;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t// find closest point from non-bar\r\n\t\tvalues\r\n\t\t\t.filter(v => v && !$$.isBarType(v.id))\r\n\t\t\t.forEach(v => {\r\n\t\t\t\tconst d = $$.dist(v, pos);\r\n\r\n\t\t\t\tif (d < minDist) {\r\n\t\t\t\t\tminDist = d;\r\n\t\t\t\t\tclosest = v;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\treturn closest;\r\n\t},\r\n\r\n\tdist(data, pos) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst xIndex = config.axis_rotated ? 1 : 0;\r\n\t\tconst yIndex = config.axis_rotated ? 0 : 1;\r\n\t\tconst y = $$.circleY(data, data.index);\r\n\t\tconst x = $$.x(data.x);\r\n\r\n\t\treturn Math.sqrt(Math.pow(x - pos[xIndex], 2) + Math.pow(y - pos[yIndex], 2));\r\n\t},\r\n\r\n\tconvertValuesToStep(values) {\r\n\t\tconst converted = [].concat(values);\r\n\t\tlet i;\r\n\r\n\t\tif (!this.isCategorized()) {\r\n\t\t\treturn values;\r\n\t\t}\r\n\r\n\t\tfor (i = values.length + 1; i > 0; i--) {\r\n\t\t\tconverted[i] = converted[i - 1];\r\n\t\t}\r\n\r\n\t\tconverted[0] = {\r\n\t\t\tx: converted[0].x - 1,\r\n\t\t\tvalue: converted[0].value,\r\n\t\t\tid: converted[0].id\r\n\t\t};\r\n\t\tconverted[values.length + 1] = {\r\n\t\t\tx: converted[values.length].x + 1,\r\n\t\t\tvalue: converted[values.length].value,\r\n\t\t\tid: converted[values.length].id\r\n\t\t};\r\n\r\n\t\treturn converted;\r\n\t},\r\n\r\n\tupdateDataAttributes(name, attrs) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst current = config[`data_${name}`];\r\n\r\n\t\tif (typeof attrs === \"undefined\") {\r\n\t\t\treturn current;\r\n\t\t}\r\n\t\tObject.keys(attrs).forEach(id => {\r\n\t\t\tcurrent[id] = attrs[id];\r\n\t\t});\r\n\t\t$$.redraw({withLegend: true});\r\n\t\treturn current;\r\n\t}\r\n});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/data/data.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport CLASS from \"../config/classes\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tload(rawTargets, args) {\r\n\t\tconst $$ = this;\r\n\t\tlet targets = rawTargets;\r\n\r\n\t\tif (targets) {\r\n\t\t\t// filter loading targets if needed\r\n\t\t\tif (args.filter) {\r\n\t\t\t\ttargets = targets.filter(args.filter);\r\n\t\t\t}\r\n\t\t\t// set type if args.types || args.type specified\r\n\t\t\tif (args.type || args.types) {\r\n\t\t\t\ttargets.forEach(t => {\r\n\t\t\t\t\tconst type = args.types && args.types[t.id] ? args.types[t.id] : args.type;\r\n\r\n\t\t\t\t\t$$.setTargetType(t.id, type);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t\t// Update/Add data\r\n\t\t\t$$.data.targets.forEach(d => {\r\n\t\t\t\tfor (let i = 0; i < targets.length; i++) {\r\n\t\t\t\t\tif (d.id === targets[i].id) {\r\n\t\t\t\t\t\td.values = targets[i].values;\r\n\t\t\t\t\t\ttargets.splice(i, 1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\t$$.data.targets = $$.data.targets.concat(targets); // add remained\r\n\t\t}\r\n\r\n\t\t// Set targets\r\n\t\t$$.updateTargets($$.data.targets);\r\n\r\n\t\t// Redraw with new targets\r\n\t\t$$.redraw({withUpdateOrgXDomain: true, withUpdateXDomain: true, withLegend: true});\r\n\r\n\t\tif (args.done) { args.done(); }\r\n\t},\r\n\r\n\tloadFromArgs(args) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif (args.data) {\r\n\t\t\t$$.load($$.convertDataToTargets(args.data), args);\r\n\t\t} else if (args.url) {\r\n\t\t\t$$.convertUrlToData(args.url, args.mimeType, args.headers, args.keys, data => {\r\n\t\t\t\t$$.load($$.convertDataToTargets(data), args);\r\n\t\t\t});\r\n\t\t} else if (args.json) {\r\n\t\t\t$$.load($$.convertDataToTargets($$.convertJsonToData(args.json, args.keys)), args);\r\n\t\t} else if (args.rows) {\r\n\t\t\t$$.load($$.convertDataToTargets($$.convertRowsToData(args.rows)), args);\r\n\t\t} else if (args.columns) {\r\n\t\t\t$$.load($$.convertDataToTargets($$.convertColumnsToData(args.columns)), args);\r\n\t\t} else {\r\n\t\t\t$$.load(null, args);\r\n\t\t}\r\n\t},\r\n\r\n\tunload(rawTargetIds, customDoneCb) {\r\n\t\tconst $$ = this;\r\n\t\tlet done = customDoneCb;\r\n\t\tlet targetIds = rawTargetIds;\r\n\r\n\t\tif (!done) {\r\n\t\t\tdone = () => {};\r\n\t\t}\r\n\r\n\t\t// filter existing target\r\n\t\ttargetIds = targetIds.filter(id => $$.hasTarget($$.data.targets, id));\r\n\r\n\t\t// If no target, call done and return\r\n\t\tif (!targetIds || targetIds.length === 0) {\r\n\t\t\tdone();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$$.svg.selectAll(targetIds.map(id => $$.selectorTarget(id)))\r\n\t\t\t.transition()\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove()\r\n\t\t\t.call($$.endall, done);\r\n\r\n\t\ttargetIds.forEach(id => {\r\n\t\t\t// Reset fadein for future load\r\n\t\t\t$$.withoutFadeIn[id] = false;\r\n\t\t\t// Remove target's elements\r\n\t\t\tif ($$.legend) {\r\n\t\t\t\t$$.legend.selectAll(`.${CLASS.legendItem}${$$.getTargetSelectorSuffix(id)}`).remove();\r\n\t\t\t}\r\n\t\t\t// Remove target\r\n\t\t\t$$.data.targets = $$.data.targets.filter(t => t.id !== id);\r\n\t\t});\r\n\t}\r\n});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/data/data.load.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n} from \"d3\"; // interpolate\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, getPathBox} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Called when dragging.\r\n\t * Data points can be selected.\r\n\t * @private\r\n\t * @param {Object} mouse Object\r\n\t */\r\n\tdrag(mouse) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst main = $$.main;\r\n\r\n\t\tif ($$.hasArcType()) { return; }\r\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\r\n\t\tif (config.zoom_enabled && !$$.zoom.altDomain) { return; } // skip if zoomable because of conflict drag dehavior\r\n\t\tif (!config.data_selection_multiple) { return; } // skip when single selection because drag is used for multiple selection\r\n\r\n\t\tconst sx = $$.dragStart[0];\r\n\t\tconst sy = $$.dragStart[1];\r\n\t\tconst mx = mouse[0];\r\n\t\tconst my = mouse[1];\r\n\t\tconst minX = Math.min(sx, mx);\r\n\t\tconst maxX = Math.max(sx, mx);\r\n\t\tconst minY = config.data_selection_grouped ? $$.margin.top : Math.min(sy, my);\r\n\t\tconst maxY = config.data_selection_grouped ? $$.height : Math.max(sy, my);\r\n\r\n\t\tmain.select(`.${CLASS.dragarea}`)\r\n\t\t\t.attr(\"x\", minX)\r\n\t\t\t.attr(\"y\", minY)\r\n\t\t\t.attr(\"width\", maxX - minX)\r\n\t\t\t.attr(\"height\", maxY - minY);\r\n\r\n\t\t// TODO: binary search when multiple xs\r\n\t\tmain.selectAll(`.${CLASS.shapes}`).selectAll(`.${CLASS.shape}`)\r\n\t\t\t.filter(d => config.data_selection_isselectable(d))\r\n\t\t\t.each(function(d, i) {\r\n\t\t\t\tconst shape = d3Select(this);\r\n\t\t\t\tconst isSelected = shape.classed(CLASS.SELECTED);\r\n\t\t\t\tconst isIncluded = shape.classed(CLASS.INCLUDED);\r\n\t\t\t\tlet _x;\r\n\t\t\t\tlet\t_y;\r\n\t\t\t\tlet\t_w;\r\n\t\t\t\tlet _h;\r\n\t\t\t\tlet toggle;\r\n\t\t\t\tlet isWithin = false;\r\n\t\t\t\tlet box;\r\n\r\n\t\t\t\tif (shape.classed(CLASS.circle)) {\r\n\t\t\t\t\t_x = shape.attr(\"cx\") * 1;\r\n\t\t\t\t\t_y = shape.attr(\"cy\") * 1;\r\n\t\t\t\t\ttoggle = $$.togglePoint;\r\n\t\t\t\t\tisWithin = minX < _x && _x < maxX && minY < _y && _y < maxY;\r\n\t\t\t\t} else if (shape.classed(CLASS.bar)) {\r\n\t\t\t\t\tbox = getPathBox(this);\r\n\t\t\t\t\t_x = box.x;\r\n\t\t\t\t\t_y = box.y;\r\n\t\t\t\t\t_w = box.width;\r\n\t\t\t\t\t_h = box.height;\r\n\t\t\t\t\ttoggle = $$.togglePath;\r\n\t\t\t\t\tisWithin = !(maxX < _x || _x + _w < minX) && !(maxY < _y || _y + _h < minY);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// line/area selection not supported yet\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (isWithin ^ isIncluded) {\r\n\t\t\t\t\tshape.classed(CLASS.INCLUDED, !isIncluded);\r\n\t\t\t\t\t// TODO: included/unincluded callback here\r\n\t\t\t\t\tshape.classed(CLASS.SELECTED, !isSelected);\r\n\t\t\t\t\ttoggle.call($$, !isSelected, shape, d, i);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Called when the drag starts.\r\n\t * Adds and Shows the drag area.\r\n\t * @private\r\n\t * @param {Object} mouse Object\r\n\t */\r\n\tdragstart(mouse) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif ($$.hasArcType()) { return; }\r\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\r\n\t\t$$.dragStart = mouse;\r\n\t\t$$.main.select(`.${CLASS.chart}`)\r\n\t\t\t.append(\"rect\")\r\n\t\t\t.attr(\"class\", CLASS.dragarea)\r\n\t\t\t.style(\"opacity\", \"0.1\");\r\n\t\t$$.dragging = true;\r\n\t},\r\n\r\n\t/**\r\n\t * Called when the drag finishes.\r\n\t * Removes the drag area.\r\n\t * @private\r\n\t */\r\n\tdragend() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif ($$.hasArcType()) { return; }\r\n\t\tif (!config.data_selection_enabled) { return; } // do nothing if not selectable\r\n\t\t$$.main.select(`.${CLASS.dragarea}`)\r\n\t\t\t.transition()\r\n\t\t\t.duration(100)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\t\t$$.main.selectAll(`.${CLASS.shape}`)\r\n\t\t\t.classed(CLASS.INCLUDED, false);\r\n\t\t$$.dragging = false;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/interactions/drag.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tdrag as d3Drag,\r\n\tmouse as d3Mouse,\r\n\tselect as d3Select,\r\n\tevent as d3Event\r\n} from \"d3\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initialize the area that detects the event.\r\n\t * Add a container for the zone that detects the event.\r\n\t * @private\r\n\t */\r\n\tinitEventRect() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.main.select(`.${CLASS.chart}`)\r\n\t\t\t.append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.eventRects)\r\n\t\t\t.style(\"fill-opacity\", \"0\");\r\n\t},\r\n\r\n\t/**\r\n\t * Redraws the area that detects the event.\r\n\t * @private\r\n\t */\r\n\tredrawEventRect() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst isMultipleX = $$.isMultipleX();\r\n\t\tconst eventRects = $$.main.select(`.${CLASS.eventRects}`)\r\n\t\t\t.style(\"cursor\", config.zoom_enabled ? config.axis_rotated ? \"ns-resize\" : \"ew-resize\" : null)\r\n\t\t\t.classed(CLASS.eventRectsMultiple, isMultipleX)\r\n\t\t\t.classed(CLASS.eventRectsSingle, !isMultipleX);\r\n\r\n\t\t// rects for mouseover\r\n\t\tlet eventRectUpdate;\r\n\t\tlet maxDataCountTarget;\r\n\r\n\t\t// clear old rects\r\n\t\teventRects.selectAll(`.${CLASS.eventRect}`).remove();\r\n\r\n\t\t// open as public constiable\r\n\t\t$$.eventRect = eventRects.selectAll(`.${CLASS.eventRect}`);\r\n\r\n\t\tif (isMultipleX) {\r\n\t\t\teventRectUpdate = $$.eventRect.data([0]);\r\n\t\t\t// update\r\n\t\t\teventRectUpdate = $$.generateEventRectsForMultipleXs(eventRectUpdate.enter()) // enter : only one rect will be added\r\n\t\t\t\t.merge(eventRectUpdate);\r\n\t\t\t$$.updateEventRect(eventRectUpdate);\r\n\t\t\t// exit : not needed because always only one rect exists\r\n\t\t} else {\r\n\t\t\t// Set data and update $$.eventRect\r\n\t\t\tmaxDataCountTarget = $$.getMaxDataCountTarget($$.data.targets);\r\n\t\t\teventRects.datum(maxDataCountTarget ? maxDataCountTarget.values : []);\r\n\t\t\t$$.eventRect = eventRects.selectAll(`.${CLASS.eventRect}`);\r\n\t\t\teventRectUpdate = $$.eventRect.data(d => d);\r\n\r\n\t\t\t// exit\r\n\t\t\teventRectUpdate.exit().remove();\r\n\r\n\t\t\t// update\r\n\t\t\teventRectUpdate = $$.generateEventRectsForSingleX(eventRectUpdate.enter())\r\n\t\t\t\t.merge(eventRectUpdate);\r\n\r\n\t\t\t$$.updateEventRect(eventRectUpdate);\r\n\t\t}\r\n\r\n\t\tif ($$.inputType === \"touch\" && !$$.hasArcType()) {\r\n\t\t\tconst getEventRect = () => {\r\n\t\t\t\tconst touch = d3Event.changedTouches[0];\r\n\r\n\t\t\t\treturn d3Select(document.elementFromPoint(touch.clientX, touch.clientY));\r\n\t\t\t};\r\n\r\n\t\t\tconst getIndex = eventRect => {\r\n\t\t\t\tlet index = eventRect && eventRect.attr(\"class\") && eventRect.attr(\"class\")\r\n\t\t\t\t\t\t.replace(new RegExp(`(${CLASS.eventRect}-?|s)`, \"g\"), \"\") * 1;\r\n\r\n\t\t\t\tif (isNaN(index) || index === null) {\r\n\t\t\t\t\tindex = -1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn index;\r\n\t\t\t};\r\n\t\t\tlet startClientY;\r\n\r\n\t\t\tconst selectRect = context => {\r\n\t\t\t\tconst eventType = d3Event.type;\r\n\t\t\t\tconst touch = d3Event.changedTouches[0];\r\n\t\t\t\tconst axisRotated = $$.config.axis_rotated;\r\n\r\n\t\t\t\t// If movement is less than 5px, scrolling outside the chart is prevented from working.\r\n\t\t\t\tconst currentClientY = touch.clientY;\r\n\r\n\t\t\t\tif (eventType === \"touchstart\") {\r\n\t\t\t\t\tstartClientY = currentClientY;\r\n\t\t\t\t\taxisRotated && d3Event.preventDefault();\r\n\t\t\t\t} else if (eventType === \"touchmove\" && startClientY) {\r\n\t\t\t\t\tconst moveY = Math.abs(startClientY - currentClientY);\r\n\r\n\t\t\t\t\tif (!axisRotated && moveY < 5) {\r\n\t\t\t\t\t\td3Event.preventDefault();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isMultipleX) {\r\n\t\t\t\t\t$$.selectRectForMultipleXs(context);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconst eventRect = getEventRect();\r\n\t\t\t\t\tconst index = getIndex(eventRect);\r\n\r\n\t\t\t\t\tif (index === -1) {\r\n\t\t\t\t\t\t$$.unselectRect();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$$.selectRectForSingle(context, eventRect, index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\tconst touchHandler = function() {\r\n\t\t\t\tconst eventRect = getEventRect();\r\n\r\n\t\t\t\tif (eventRect.classed(CLASS.eventRect)) {\r\n\t\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tselectRect(this);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$$.unselectRect();\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t$$.svg.on(\"touchstart\", touchHandler)\r\n\t\t\t\t.on(\"touchmove\", touchHandler)\r\n\t\t\t\t.on(\"touchend\", () => {\r\n\t\t\t\t\tconst eventRect = getEventRect();\r\n\r\n\t\t\t\t\tif (eventRect.classed(CLASS.eventRect)) {\r\n\t\t\t\t\t\tif ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) {\r\n\t\t\t\t\t\t\t$$.cancelClick && ($$.cancelClick = false);\r\n\r\n\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Call event handler\r\n\t\t\t\t\t\tconst index = getIndex(eventRect);\r\n\r\n\t\t\t\t\t\t!isMultipleX && index !== -1 &&\r\n\t\t\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\r\n\t\t\t\t\t\t\t.each(d2 => config.data_onout.call($$.api, d2));\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Updates the location and size of the eventRect.\r\n\t * @private\r\n\t * @param {Object} D3.select(CLASS.eventRects) object.\r\n\t */\r\n\tupdateEventRect(eventRectUpdate) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst eventRectData = eventRectUpdate || $$.eventRect.data();// set update selection if null\r\n\t\tlet x;\r\n\t\tlet y;\r\n\t\tlet w;\r\n\t\tlet h;\r\n\r\n\t\tif ($$.isMultipleX()) {\r\n\t\t\t// TODO: rotated not supported yet\r\n\t\t\tx = 0;\r\n\t\t\ty = 0;\r\n\t\t\tw = $$.width;\r\n\t\t\th = $$.height;\r\n\t\t} else {\r\n\t\t\tlet rectW;\r\n\t\t\tlet rectX;\r\n\r\n\t\t\tif (($$.isCustomX() || $$.isTimeSeries()) && !$$.isCategorized()) {\r\n\t\t\t\t// update index for x that is used by prevX and nextX\r\n\t\t\t\t$$.updateXs();\r\n\r\n\t\t\t\trectW = d => {\r\n\t\t\t\t\tlet prevX = $$.getPrevX(d.index);\r\n\t\t\t\t\tlet nextX = $$.getNextX(d.index);\r\n\r\n\t\t\t\t\t// if there this is a single data point make the eventRect full width (or height)\r\n\t\t\t\t\tif (prevX === null && nextX === null) {\r\n\t\t\t\t\t\treturn config.axis_rotated ? $$.height : $$.width;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (prevX === null) { prevX = $$.x.domain()[0]; }\r\n\t\t\t\t\tif (nextX === null) { nextX = $$.x.domain()[1]; }\r\n\t\t\t\t\treturn Math.max(0, ($$.x(nextX) - $$.x(prevX)) / 2);\r\n\t\t\t\t};\r\n\r\n\t\t\t\trectX = d => {\r\n\t\t\t\t\tconst nextX = $$.getNextX(d.index);\r\n\t\t\t\t\tconst thisX = $$.data.xs[d.id][d.index];\r\n\t\t\t\t\tlet prevX = $$.getPrevX(d.index);\r\n\r\n\t\t\t\t\t// if there this is a single data point position the eventRect at 0\r\n\t\t\t\t\tif (prevX === null && nextX === null) {\r\n\t\t\t\t\t\treturn 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (prevX === null) {\r\n\t\t\t\t\t\tprevX = $$.x.domain()[0];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\treturn ($$.x(thisX) + $$.x(prevX)) / 2;\r\n\t\t\t\t};\r\n\t\t\t} else {\r\n\t\t\t\tconst edgs = $$.getEdgeX($$.data.targets);\r\n\r\n\t\t\t\trectW = ($$.x(edgs[1]) - $$.x(edgs[0])) / $$.getMaxDataCount();\r\n\t\t\t\trectX = d => $$.x(d.x) - (rectW / 2);\r\n\t\t\t}\r\n\r\n\t\t\tx = config.axis_rotated ? 0 : rectX;\r\n\t\t\ty = config.axis_rotated ? rectX : 0;\r\n\t\t\tw = config.axis_rotated ? $$.width : rectW;\r\n\t\t\th = config.axis_rotated ? rectW : $$.height;\r\n\t\t}\r\n\r\n\t\teventRectData.attr(\"class\", $$.classEvent.bind($$))\r\n\t\t\t.attr(\"x\", x)\r\n\t\t\t.attr(\"y\", y)\r\n\t\t\t.attr(\"width\", w)\r\n\t\t\t.attr(\"height\", h);\r\n\t},\r\n\r\n\tselectRectForSingle(context, eventRect, index) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\t// Show tooltip\r\n\t\tconst selectedData = $$.filterTargetsToShow($$.data.targets)\r\n\t\t\t.map(t => $$.addName($$.getValueOnIndex(t.values, index)));\r\n\r\n\t\tif (config.tooltip_grouped) {\r\n\t\t\t$$.showTooltip(selectedData, context);\r\n\t\t\t$$.showXGridFocus(selectedData);\r\n\r\n\t\t\tif (!config.data_selection_enabled || config.data_selection_grouped) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\r\n\t\t\t.each(function() {\r\n\t\t\t\td3Select(this).classed(CLASS.EXPANDED, true);\r\n\t\t\t\tif (config.data_selection_enabled) {\r\n\t\t\t\t\teventRect.style(\"cursor\", config.data_selection_grouped ? \"pointer\" : null);\r\n\t\t\t\t}\r\n\t\t\t\tif (!config.tooltip_grouped) {\r\n\t\t\t\t\t$$.hideXGridFocus();\r\n\t\t\t\t\t$$.hideTooltip();\r\n\t\t\t\t\tif (!config.data_selection_grouped) {\r\n\t\t\t\t\t\t$$.unexpandCircles(index);\r\n\t\t\t\t\t\t$$.unexpandBars(index);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.filter(function(d) { return $$.isWithinShape(this, d); })\r\n\t\t\t.each(function(d) {\r\n\t\t\t\tif (config.data_selection_enabled) {\r\n\t\t\t\t\tif (config.data_selection_grouped || config.data_selection_isselectable(d)) {\r\n\t\t\t\t\t\teventRect.style(\"cursor\", \"pointer\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!config.tooltip_grouped) {\r\n\t\t\t\t\t$$.showTooltip([d], this);\r\n\t\t\t\t\t$$.showXGridFocus([d]);\r\n\t\t\t\t\tif (config.point_focus_expand_enabled) { $$.expandCircles(index, d.id, true); }\r\n\t\t\t\t\t$$.expandBars(index, d.id, true);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t},\r\n\r\n\tselectRectForMultipleXs(context) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\r\n\r\n\t\tif ($$.dragging) { return; } // do nothing when dragging\r\n\t\tif ($$.hasArcType(targetsToShow)) { return; }\r\n\r\n\t\tconst mouse = d3Mouse($$.main.select(`.${CLASS.eventRects} .${CLASS.eventRect}`).node());\r\n\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\r\n\t\tlet sameXData;\r\n\r\n\t\tif ($$.mouseover && (!closest || closest.id !== $$.mouseover.id)) {\r\n\t\t\tconfig.data_onout.call($$.api, $$.mouseover);\r\n\t\t\t$$.mouseover = undefined;\r\n\t\t}\r\n\r\n\t\tif (!closest) {\r\n\t\t\t$$.unselectRect();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($$.isScatterType(closest) || !config.tooltip_grouped) {\r\n\t\t\tsameXData = [closest];\r\n\t\t} else {\r\n\t\t\tsameXData = $$.filterByX(targetsToShow, closest.x);\r\n\t\t}\r\n\t\t// show tooltip when cursor is close to some point\r\n\t\tconst selectedData = sameXData.map(d => $$.addName(d));\r\n\r\n\t\t$$.showTooltip(selectedData, context);\r\n\r\n\t\t// expand points\r\n\t\tif (config.point_focus_expand_enabled) {\r\n\t\t\t$$.expandCircles(closest.index, closest.id, true);\r\n\t\t}\r\n\t\t$$.expandBars(closest.index, closest.id, true);\r\n\r\n\t\t// Show xgrid focus line\r\n\t\t$$.showXGridFocus(selectedData);\r\n\r\n\t\t// Show cursor as pointer if point is close to mouse position\r\n\t\tif ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\r\n\t\t\t$$.svg.select(`${CLASS.eventRect}`).style(\"cursor\", \"pointer\");\r\n\t\t\tif (!$$.mouseover) {\r\n\t\t\t\tconfig.data_onover.call($$.api, closest);\r\n\t\t\t\t$$.mouseover = closest;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Unselect EventRect.\r\n\t * @private\r\n\t */\r\n\tunselectRect() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.svg.select(`.${CLASS.eventRect}`).style(\"cursor\", null);\r\n\t\t$$.hideXGridFocus();\r\n\t\t$$.hideTooltip();\r\n\t\t$$.unexpandCircles();\r\n\t\t$$.unexpandBars();\r\n\t},\r\n\r\n\t/**\r\n\t * Create eventRect for each data on the x-axis.\r\n\t * Register touch and drag events.\r\n\t * @private\r\n\t * @param {Object} D3.select(CLASS.eventRects) object.\r\n\t * @returns {Object} D3.select(CLASS.eventRects) object.\r\n\t */\r\n\tgenerateEventRectsForSingleX(eventRectEnter) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst isMouse = ($$.inputType === \"mouse\");\r\n\r\n\t\treturn eventRectEnter.append(\"rect\")\r\n\t\t\t.attr(\"class\", $$.classEvent.bind($$))\r\n\t\t\t.style(\"cursor\", config.data_selection_enabled && config.data_selection_grouped ? \"pointer\" : null)\r\n\t\t\t.on(isMouse ? \"mouseover\" : undefined, d => {\r\n\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} // do nothing while dragging/flowing\r\n\r\n\t\t\t\tconst index = d.index;\r\n\r\n\t\t\t\t// Expand shapes for selection\r\n\t\t\t\tif (config.point_focus_expand_enabled) {\r\n\t\t\t\t\t$$.expandCircles(index, null, true);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$$.expandBars(index, null, true);\r\n\r\n\t\t\t\t// Call event handler\r\n\t\t\t\tindex !== -1 && $$.main.selectAll(`.${CLASS.shape}-${index}`)\r\n\t\t\t\t\t.each(d2 => config.data_onover.call($$.api, d2));\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"mousemove\" : undefined, function(d) {\r\n\t\t\t\tif ($$.dragging || $$.flowing || $$.hasArcType()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} // do nothing while dragging/flowing\r\n\r\n\t\t\t\tlet index = d.index;\r\n\t\t\t\tconst eventRect = $$.svg.select(`.${CLASS.eventRect}-${index}`);\r\n\r\n\t\t\t\tif ($$.isStepType(d) &&\r\n\t\t\t\t\t$$.config.line_step_type === \"step-after\" &&\r\n\t\t\t\t\td3Mouse(this)[0] < $$.x($$.getXValue(d.id, index))\r\n\t\t\t\t) {\r\n\t\t\t\t\tindex -= 1;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tindex === -1 ?\r\n\t\t\t\t\t$$.unselectRect() : $$.selectRectForSingle(this, eventRect, index);\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"mouseout\" : undefined, d => {\r\n\t\t\t\tif (!$$.config || $$.hasArcType()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} // chart is destroyed\r\n\r\n\t\t\t\tconst index = d.index;\r\n\r\n\t\t\t\t$$.unselectRect();\r\n\t\t\t\t// Call event handler\r\n\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`)\r\n\t\t\t\t\t.each(d2 => config.data_onout.call($$.api, d2));\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"click\" : undefined, d => {\r\n\t\t\t\tif ($$.hasArcType() || !$$.toggleShape || $$.cancelClick) {\r\n\t\t\t\t\t$$.cancelClick && ($$.cancelClick = false);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst index = d.index;\r\n\r\n\t\t\t\t$$.main.selectAll(`.${CLASS.shape}-${index}`).each(function(d2) {\r\n\t\t\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, d2)) {\r\n\t\t\t\t\t\t$$.toggleShape(this, d2, index);\r\n\t\t\t\t\t\t$$.config.data_onclick.call($$.api, d2, this);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t})\r\n\t\t\t.call(\r\n\t\t\t\tconfig.data_selection_draggable && $$.drag ? (\r\n\t\t\t\t\td3Drag().origin(Object)\r\n\t\t\t\t\t\t.on(\"drag\", function() { $$.drag(d3Mouse(this)); })\r\n\t\t\t\t\t\t.on(\"dragstart\", function() { $$.dragstart(d3Mouse(this)); })\r\n\t\t\t\t\t\t.on(\"dragend\", () => { $$.dragend(); })\r\n\t\t\t\t) : () => {}\r\n\t\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Create an eventRect,\r\n\t * Register touch and drag events.\r\n\t * @private\r\n\t * @param {Object} D3.select(CLASS.eventRects) object.\r\n\t * @returns {Object} D3.select(CLASS.eventRects) object.\r\n\t */\r\n\tgenerateEventRectsForMultipleXs(eventRectEnter) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst isMouse = ($$.inputType === \"mouse\");\r\n\r\n\t\treturn eventRectEnter\r\n\t\t\t.append(\"rect\")\r\n\t\t\t.attr(\"x\", 0)\r\n\t\t\t.attr(\"y\", 0)\r\n\t\t\t.attr(\"width\", $$.width)\r\n\t\t\t.attr(\"height\", $$.height)\r\n\t\t\t.attr(\"class\", CLASS.eventRect)\r\n\t\t\t.on(isMouse ? \"mouseover\" : undefined, function() {\r\n\t\t\t\t$$.selectRectForMultipleXs(this);\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"mouseout\" : undefined, () => {\r\n\t\t\t\tif (!$$.config || $$.hasArcType()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} // chart is destroyed\r\n\r\n\t\t\t\t$$.unselectRect();\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"mousemove\" : undefined, function() {\r\n\t\t\t\t$$.selectRectForMultipleXs(this);\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"click\" : undefined, function() {\r\n\t\t\t\tconst targetsToShow = $$.filterTargetsToShow($$.data.targets);\r\n\r\n\t\t\t\tif ($$.hasArcType(targetsToShow)) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst mouse = d3Mouse(this);\r\n\t\t\t\tconst closest = $$.findClosestFromTargets(targetsToShow, mouse);\r\n\r\n\t\t\t\tif (!closest) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// select if selection enabled\r\n\t\t\t\tif ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {\r\n\t\t\t\t\t$$.main.selectAll(`.${CLASS.shapes}${$$.getTargetSelectorSuffix(closest.id)}`)\r\n\t\t\t\t\t\t.selectAll(`.${CLASS.shape}-${closest.index}`)\r\n\t\t\t\t\t\t.each(() => {\r\n\t\t\t\t\t\t\tif (config.data_selection_grouped || $$.isWithinShape(this, closest)) {\r\n\t\t\t\t\t\t\t\t$$.toggleShape(this, closest, closest.index);\r\n\t\t\t\t\t\t\t\t$$.config.data_onclick.call($$.api, closest, this);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.call(\r\n\t\t\t\tconfig.data_selection_draggable && $$.drag ? (\r\n\t\t\t\t\td3Drag().origin(Object)\r\n\t\t\t\t\t\t.on(\"drag\", function() { $$.drag(d3Mouse(this)); })\r\n\t\t\t\t\t\t.on(\"dragstart\", function() { $$.dragstart(d3Mouse(this)); })\r\n\t\t\t\t\t\t.on(\"dragend\", () => { $$.dragend(); })\r\n\t\t\t\t) : () => {}\r\n\t\t\t);\r\n\t},\r\n\r\n\t/**\r\n\t * Dispatch an event.\r\n\t * @private\r\n\t * @param {String} type event type\r\n\t * @param {Number} index Index of eventRect\r\n\t * @param {Object} mouse Object\r\n\t */\r\n\tdispatchEvent(type, index, mouse) {\r\n\t\tconst $$ = this;\r\n\t\tconst selector = $$.isMultipleX() ?\r\n\t\t\t`.${CLASS.eventRect}` : `${CLASS.eventRect}-${index}`;\r\n\r\n\t\tconst eventRect = $$.main.select(selector).node();\r\n\t\tconst box = eventRect.getBoundingClientRect();\r\n\t\tconst x = box.left + (mouse ? mouse[0] : 0);\r\n\t\tconst y = box.top + (mouse ? mouse[1] : 0);\r\n\r\n\t\tconst event = document.createEvent(\"MouseEvents\")\r\n\t\t\t.initMouseEvent(type, true, true, window, 0, x, y, x, y, false, false, false, false, 0, null);\r\n\r\n\t\teventRect.dispatchEvent(event);\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/interactions/interaction.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\tbrushX as d3BrushX,\r\n\tbrushY as d3BrushY,\r\n\tevent as d3Event\r\n} from \"d3\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, isFunction} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initialize the brush.\r\n\t * @private\r\n\t */\r\n\tinitBrush() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t// set the brush\r\n\t\t$$.brush = $$.config.axis_rotated ? d3BrushY() : d3BrushX();\r\n\r\n\t\t// set \"brush\" event\r\n\t\tconst brushHandler = () => {\r\n\t\t\t$$.redrawForBrush();\r\n\t\t};\r\n\r\n\t\t$$.brush\r\n\t\t\t.on(\"start\", () => {\r\n\t\t\t\t$$.inputType === \"touch\" && $$.hideTooltip();\r\n\t\t\t\tbrushHandler();\r\n\t\t\t})\r\n\t\t\t.on(\"brush\", brushHandler);\r\n\r\n\t\t$$.brush.update = function() {\r\n\t\t\tconst extent = this.extent()();\r\n\r\n\t\t\tif (extent[1].filter(v => isNaN(v)).length === 0) {\r\n\t\t\t\t$$.context && $$.context.select(`.${CLASS.brush}`).call(this);\r\n\t\t\t}\r\n\r\n\t\t\treturn this;\r\n\t\t};\r\n\r\n\t\t// set the brush extent\r\n\t\t$$.brush.scale = function(scale, height) {\r\n\t\t\tconst overlay = $$.svg.select(\".bb-brush .overlay\");\r\n\t\t\tconst extent = [[0, 0]];\r\n\r\n\t\t\tif (scale.range) {\r\n\t\t\t\textent.push([\r\n\t\t\t\t\tscale.range()[1],\r\n\t\t\t\t\t((height || !overlay.empty()) && ~~overlay.attr(\"height\")) || 60\r\n\t\t\t\t]);\r\n\t\t\t} else if (scale.constructor === Array) {\r\n\t\t\t\textent.push(scale);\r\n\t\t\t}\r\n\r\n\t\t\t$$.config.axis_rotated && extent.reverse();\r\n\t\t\tthis.extent($$.config.axis_x_extent || extent);\r\n\r\n\t\t\t// when extent updates, brush selection also be re-applied\r\n\t\t\t// https://github.com/d3/d3/issues/2918\r\n\t\t\tthis.update();\r\n\t\t};\r\n\r\n\t\t$$.brush.getSelection = function() {\r\n\t\t\treturn $$.context ? $$.context.select(`.${CLASS.brush}`) : d3Select([]);\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Initialize the subchart.\r\n\t * @private\r\n\t */\r\n\tinitSubchart() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst visibility = config.subchart_show ? \"visible\" : \"hidden\";\r\n\r\n\t\t$$.context = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"context\"));\r\n\r\n\t\tconst context = $$.context;\r\n\r\n\t\tcontext.style(\"visibility\", visibility);\r\n\r\n\t\t// Define g for chart area\r\n\t\tcontext.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPathForSubchart)\r\n\t\t\t.attr(\"class\", CLASS.chart);\r\n\r\n\t\t// Define g for bar chart area\r\n\t\tcontext.select(`.${CLASS.chart}`)\r\n\t\t\t.append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartBars);\r\n\r\n\t\t// Define g for line chart area\r\n\t\tcontext.select(`.${CLASS.chart}`)\r\n\t\t\t.append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartLines);\r\n\r\n\t\t// Add extent rect for Brush\r\n\t\tcontext.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPath)\r\n\t\t\t.attr(\"class\", CLASS.brush)\r\n\t\t\t.call($$.brush);\r\n\r\n\t\t// ATTENTION: This must be called AFTER chart added\r\n\t\t// Add Axis\r\n\t\t$$.axes.subx = context.append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.axisX)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"subx\"))\r\n\t\t\t.attr(\"clip-path\", config.axis_rotated ? \"\" : $$.clipPathForXAxis)\r\n\t\t\t.style(\"visibility\", config.subchart_axis_x_show ? visibility : \"hidden\");\r\n\t},\r\n\r\n\t/**\r\n\t * Update sub chart\r\n\t * @private\r\n\t * @param {Object} $$.data.targets\r\n\t */\r\n\tupdateTargetsForSubchart(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst context = $$.context;\r\n\t\tconst config = $$.config;\r\n\t\tconst classChartBar = $$.classChartBar.bind($$);\r\n\t\tconst classBars = $$.classBars.bind($$);\r\n\t\tconst classChartLine = $$.classChartLine.bind($$);\r\n\t\tconst classLines = $$.classLines.bind($$);\r\n\t\tconst classAreas = $$.classAreas.bind($$);\r\n\r\n\t\tif (config.subchart_show) {\r\n\t\t\t// -- Bar --//\r\n\t\t\tconst contextBarUpdate = context.select(`.${CLASS.chartBars}`)\r\n\t\t\t\t.selectAll(`.${CLASS.chartBar}`)\r\n\t\t\t\t.data(targets)\r\n\t\t\t\t.attr(\"class\", classChartBar);\r\n\t\t\tconst contextBarEnter = contextBarUpdate.enter()\r\n\t\t\t\t.append(\"g\")\r\n\t\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t\t.attr(\"class\", classChartBar)\r\n\t\t\t\t.merge(contextBarUpdate);\r\n\r\n\t\t\t// Bars for each data\r\n\t\t\tcontextBarEnter.append(\"g\")\r\n\t\t\t\t.attr(\"class\", classBars);\r\n\r\n\t\t\t// -- Line --//\r\n\t\t\tconst contextLineUpdate = context.select(`.${CLASS.chartLines}`)\r\n\t\t\t\t.selectAll(`.${CLASS.chartLine}`)\r\n\t\t\t\t.data(targets)\r\n\t\t\t\t.attr(\"class\", classChartLine);\r\n\t\t\tconst contextLineEnter = contextLineUpdate.enter().append(\"g\")\r\n\t\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t\t.attr(\"class\", classChartLine)\r\n\t\t\t\t.merge(contextLineUpdate);\r\n\r\n\t\t\t// Lines for each data\r\n\t\t\tcontextLineEnter.append(\"g\")\r\n\t\t\t\t.attr(\"class\", classLines);\r\n\r\n\t\t\t// Area\r\n\t\t\tcontextLineEnter.append(\"g\")\r\n\t\t\t\t.attr(\"class\", classAreas);\r\n\r\n\t\t\t// -- Brush --//\r\n\t\t\tcontext.selectAll(`.${CLASS.brush} rect`)\r\n\t\t\t\t.attr(config.axis_rotated ? \"width\" : \"height\", config.axis_rotated ? $$.width2 : $$.height2);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Update the bar of the sub chart\r\n\t * @private\r\n\t * @param {Object} durationForExit\r\n\t */\r\n\tupdateBarForSubchart(durationForExit) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.contextBar = $$.context.selectAll(`.${CLASS.bars}`).selectAll(`.${CLASS.bar}`)\r\n\t\t\t.data($$.barData.bind($$));\r\n\r\n\t\t$$.contextBar\r\n\t\t\t.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.contextBar = $$.contextBar\r\n\t\t\t.enter()\r\n\t\t\t.append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classBar.bind($$))\r\n\t\t\t.style(\"stroke\", \"none\")\r\n\t\t\t.style(\"fill\", $$.color)\r\n\t\t\t.merge($$.contextBar)\r\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$));\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw the bar of the subchart\r\n\t * @private\r\n\t * @param {String} path in subchart bar\r\n\t * @param {Boolean} whether or not to transition.\r\n\t * @param {Number} transition duration\r\n\t */\r\n\tredrawBarForSubchart(drawBarOnSub, withTransition, duration) {\r\n\t\tlet contextBar;\r\n\r\n\t\tif (withTransition) {\r\n\t\t\tcontextBar = this.contextBar.transition(Math.random().toString()).duration(duration);\r\n\t\t} else {\r\n\t\t\tcontextBar = this.contextBar;\r\n\t\t}\r\n\r\n\t\tcontextBar.attr(\"d\", drawBarOnSub)\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\t},\r\n\r\n\t/**\r\n\t * Update the line of the sub chart\r\n\t * @private\r\n\t * @param {Number} Fade-out transition duration\r\n\t */\r\n\tupdateLineForSubchart(durationForExit) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.contextLine = $$.context.selectAll(`.${CLASS.lines}`).selectAll(`.${CLASS.line}`)\r\n\t\t\t.data($$.lineData.bind($$));\r\n\r\n\t\t$$.contextLine\r\n\t\t\t.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.contextLine = $$.contextLine\r\n\t\t\t.enter()\r\n\t\t\t.append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classLine.bind($$))\r\n\t\t\t.style(\"stroke\", $$.color)\r\n\t\t\t.merge($$.contextLine)\r\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$));\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw the line of the subchart\r\n\t * @private\r\n\t * @param {String} path in subchart line\r\n\t * @param {Boolean} whether or not to transition\r\n\t * @param {Number} transition duration\r\n\t */\r\n\tredrawLineForSubchart(drawLineOnSub, withTransition, duration) {\r\n\t\tlet contextLine;\r\n\r\n\t\tif (withTransition) {\r\n\t\t\tcontextLine = this.contextLine.transition(Math.random().toString()).duration(duration);\r\n\t\t} else {\r\n\t\t\tcontextLine = this.contextLine;\r\n\t\t}\r\n\r\n\t\tcontextLine.attr(\"d\", drawLineOnSub)\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\t},\r\n\r\n\t/**\r\n\t * Update the area of the sub chart\r\n\t * @private\r\n\t * @param {Number} Fade-out transition duration\r\n\t */\r\n\tupdateAreaForSubchart(durationForExit) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.contextArea = $$.context.selectAll(`.${CLASS.areas}`)\r\n\t\t\t.selectAll(`.${CLASS.area}`)\r\n\t\t\t.data($$.lineData.bind($$));\r\n\r\n\t\t$$.contextArea\r\n\t\t\t.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.contextArea = $$.contextArea\r\n\t\t\t.enter()\r\n\t\t\t.append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classArea.bind($$))\r\n\t\t\t.style(\"fill\", $$.color)\r\n\t\t\t.style(\"opacity\", function() {\r\n\t\t\t\t$$.orgAreaOpacity = d3Select(this).style(\"opacity\");\r\n\t\t\t\treturn \"0\";\r\n\t\t\t})\r\n\t\t\t.merge($$.contextArea)\r\n\t\t\t.style(\"opacity\", \"0\");\r\n\t},\r\n\t/**\r\n\t * Redraw the area of the subchart\r\n\t * @private\r\n\t * @param {String} path in subchart line\r\n\t * @param {Boolean} whether or not to transition\r\n\t * @param {Number} transition duration\r\n\t */\r\n\tredrawAreaForSubchart(drawAreaOnSub, withTransition, duration) {\r\n\t\tlet contextArea;\r\n\r\n\t\tif (withTransition) {\r\n\t\t\tcontextArea = this.contextArea.transition(Math.random().toString()).duration(duration);\r\n\t\t} else {\r\n\t\t\tcontextArea = this.contextArea;\r\n\t\t}\r\n\r\n\t\tcontextArea.attr(\"d\", drawAreaOnSub)\r\n\t\t\t.style(\"fill\", this.color)\r\n\t\t\t.style(\"opacity\", this.orgAreaOpacity);\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw subchart.\r\n\t * @private\r\n\t * @param {Boolean} whether or not to show subchart\r\n\t * @param Do not use.\r\n\t * @param {Number} transition duration\r\n\t * @param Do not use.\r\n\t * @param {Object} area Indices\r\n\t * @param {Object} bar Indices\r\n\t * @param {Object} line Indices\r\n\t */\r\n\tredrawSubchart(withSubchart, transitions, duration,\r\n\t\tdurationForExit, areaIndices, barIndices, lineIndices) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.context.style(\"visibility\", config.subchart_show ? \"visible\" : \"hidden\");\r\n\r\n\t\t// subchart\r\n\t\tif (config.subchart_show) {\r\n\t\t\t// reflect main chart to extent on subchart if zoomed\r\n\t\t\tif (d3Event && d3Event.type === \"zoom\") {\r\n\t\t\t\t$$.brush.update();\r\n\t\t\t}\r\n\r\n\t\t\t// update subchart elements if needed\r\n\t\t\tif (withSubchart) {\r\n\t\t\t\t// extent rect\r\n\t\t\t\tif (!$$.brushEmpty()) {\r\n\t\t\t\t\t$$.brush.update();\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// setup drawer - MEMO: this must be called after axis updated\r\n\t\t\t\tconst drawAreaOnSub = $$.generateDrawArea(areaIndices, true);\r\n\t\t\t\tconst drawBarOnSub = $$.generateDrawBar(barIndices, true);\r\n\t\t\t\tconst drawLineOnSub = $$.generateDrawLine(lineIndices, true);\r\n\r\n\t\t\t\t$$.updateBarForSubchart(duration);\r\n\t\t\t\t$$.updateLineForSubchart(duration);\r\n\t\t\t\t$$.updateAreaForSubchart(duration);\r\n\r\n\t\t\t\t$$.redrawBarForSubchart(drawBarOnSub, duration, duration);\r\n\t\t\t\t$$.redrawLineForSubchart(drawLineOnSub, duration, duration);\r\n\t\t\t\t$$.redrawAreaForSubchart(drawAreaOnSub, duration, duration);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Redraw the brush.\r\n\t * @private\r\n\t */\r\n\tredrawForBrush() {\r\n\t\tconst $$ = this;\r\n\t\tconst x = $$.x;\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithTransition: false,\r\n\t\t\twithY: $$.config.zoom_rescale,\r\n\t\t\twithSubchart: false,\r\n\t\t\twithUpdateXDomain: true,\r\n\t\t\twithDimension: false\r\n\t\t});\r\n\r\n\t\t$$.config.subchart_onbrush.call($$.api, x.orgDomain());\r\n\t},\r\n\r\n\t/**\r\n\t * Transform context\r\n\t * @private\r\n\t * @param {Boolean} indicates transition is enabled\r\n\t * @param {Object} The return value of the generateTransitions method of Axis.\r\n\t */\r\n\ttransformContext(withTransition, transitions) {\r\n\t\tconst $$ = this;\r\n\t\tlet subXAxis;\r\n\r\n\t\tif (transitions && transitions.axisSubX) {\r\n\t\t\tsubXAxis = transitions.axisSubX;\r\n\t\t} else {\r\n\t\t\tsubXAxis = $$.context.select(`.${CLASS.axisX}`);\r\n\t\t\tif (withTransition) { subXAxis = subXAxis.transition(); }\r\n\t\t}\r\n\r\n\t\t$$.context.attr(\"transform\", $$.getTranslate(\"context\"));\r\n\t\tsubXAxis.attr(\"transform\", $$.getTranslate(\"subx\"));\r\n\t},\r\n\r\n\t/**\r\n\t * Get default extent\r\n\t * @private\r\n\t * @returns {Array} default extent\r\n\t */\r\n\tgetDefaultExtent() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet extent = isFunction(config.axis_x_extent) ?\r\n\t\t\tconfig.axis_x_extent($$.getXDomain($$.data.targets)) : config.axis_x_extent;\r\n\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\textent = [$$.parseDate(extent[0]), $$.parseDate(extent[1])];\r\n\t\t}\r\n\r\n\t\treturn extent;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/interactions/subchart.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tevent as d3Event,\r\n\tzoom as d3Zoom,\r\n\tmin as d3Min,\r\n\tmax as d3Max\r\n} from \"d3\";\r\nimport ChartInternal from \"../internals/ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, diffDomain} from \"../internals/util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initialize zoom.\r\n\t * @private\r\n\t */\r\n\tinitZoom() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet startEvent;\r\n\r\n\t\t$$.zoomScale = null;\r\n\t\t$$.zoom = d3Zoom()\r\n\t\t\t.duration(0)\r\n\t\t\t.on(\"start\", () => {\r\n\t\t\t\tstartEvent = d3Event.sourceEvent;\r\n\r\n\t\t\t\t$$.zoom.altDomain = d3Event.sourceEvent.altKey ?\r\n\t\t\t\t\t$$.x.orgDomain() : null;\r\n\r\n\t\t\t\tconfig.zoom_onzoomstart.call($$.api, d3Event.sourceEvent);\r\n\t\t\t})\r\n\t\t\t.on(\"zoom\", () => {\r\n\t\t\t\t$$.redrawForZoom.call($$);\r\n\t\t\t})\r\n\t\t\t.on(\"end\", () => {\r\n\t\t\t\tconst event = d3Event.sourceEvent;\r\n\r\n\t\t\t\t// if click, do nothing. otherwise, click interaction will be canceled.\r\n\t\t\t\tif (event && startEvent.clientX === event.clientX && startEvent.clientY === event.clientY) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$$.redrawEventRect();\r\n\t\t\t\t$$.updateZoom();\r\n\t\t\t\tconfig.zoom_onzoomend.call($$.api, $$.x.orgDomain());\r\n\t\t\t});\r\n\r\n\t\t$$.zoom.orgScaleExtent = () => {\r\n\t\t\tconst extent = config.zoom_extent ? config.zoom_extent : [1, 10];\r\n\r\n\t\t\treturn [extent[0], Math.max($$.getMaxDataCount() / extent[1], extent[1])];\r\n\t\t};\r\n\r\n\t\t$$.zoom.updateScaleExtent = function() {\r\n\t\t\tconst ratio = diffDomain($$.x.orgDomain()) / diffDomain($$.getZoomDomain());\r\n\t\t\tconst extent = this.orgScaleExtent();\r\n\r\n\t\t\tthis.scaleExtent([extent[0] * ratio, extent[1] * ratio]);\r\n\t\t\treturn this;\r\n\t\t};\r\n\r\n\t\t$$.zoom.updateTransformScale = function(transform) {\r\n\t\t\tconst newScale = transform.rescaleX($$.x);\r\n\r\n\t\t\tnewScale.domain($$.trimXDomain(newScale.domain()));\r\n\t\t\t$$.zoomScale = newScale;\r\n\t\t\t$$.xAxis.scale($$.zoomScale);\r\n\t\t\t$$.main.select(`.${CLASS.eventRects}`).node().__zoom = transform;\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Get zoom domain\r\n\t * @private\r\n\t * @returns {Array} zoom domain\r\n\t */\r\n\tgetZoomDomain() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst min = d3Min([$$.orgXDomain[0], config.zoom_x_min]);\r\n\t\tconst max = d3Max([$$.orgXDomain[1], config.zoom_x_max]);\r\n\r\n\t\treturn [min, max];\r\n\t},\r\n\r\n\t/**\r\n\t * Update zoom\r\n\t * @private\r\n\t */\r\n\tupdateZoom() {\r\n\t\tconst $$ = this;\r\n\t\tconst z = $$.config.zoom_enabled ? $$.zoom : () => {};\r\n\r\n\t\t// bind zoom module\r\n\t\t// $$.main.select(`.${CLASS.zoomRect}`)\r\n\t\t// \t.call(z)\r\n\t\t// \t.on(\"dblclick.zoom\", null);\r\n\r\n\t\t$$.main.select(`.${CLASS.eventRects}`)\r\n\t\t\t.call(z)\r\n\t\t\t.on(\"dblclick.zoom\", null);\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw the zoom.\r\n\t * @private\r\n\t */\r\n\tredrawForZoom() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (!config.zoom_enabled) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst zoom = $$.zoom;\r\n\t\tconst x = $$.x;\r\n\t\tconst event = d3Event;\r\n\t\tconst transform = event.transform;\r\n\r\n\t\t$$.zoom.updateTransformScale(transform);\r\n\r\n\t\tif ($$.filterTargetsToShow($$.data.targets).length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (event.sourceEvent.type === \"mousemove\" && zoom.altDomain) {\r\n\t\t\tx.domain(zoom.altDomain);\r\n\t\t\ttransform.scale($$.zoomScale).updateScaleExtent();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($$.isCategorized() && x.orgDomain()[0] === $$.orgXDomain[0]) {\r\n\t\t\tx.domain([$$.orgXDomain[0] - 1e-10, x.orgDomain()[1]]);\r\n\t\t}\r\n\r\n\t\t$$.redraw({\r\n\t\t\twithTransition: false,\r\n\t\t\twithY: config.zoom_rescale,\r\n\t\t\twithSubchart: false,\r\n\t\t\twithEventRect: false,\r\n\t\t\twithDimension: false\r\n\t\t});\r\n\r\n\t\tif (event.sourceEvent.type === \"mousemove\") {\r\n\t\t\t$$.cancelClick = true;\r\n\t\t}\r\n\r\n\t\tconfig.zoom_onzoom.call($$.api, x.orgDomain());\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/interactions/zoom.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\tarc as d3Arc,\r\n\tpie as d3Pie,\r\n\tevent as d3Event,\r\n\tinterpolate as d3Interpolate\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, isFunction} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tinitPie() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.pie = d3Pie()\r\n\t\t\t.padAngle(config[`${config.data_type}_padAngle`] || 0)\r\n\t\t\t.value(d => d.values.reduce((a, b) => a + b.value, 0));\r\n\r\n\t\tif (!config.data_order) {\r\n\t\t\t$$.pie.sort(null);\r\n\t\t}\r\n\t},\r\n\tupdateRadius() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst w = config.gauge_width || config.donut_width;\r\n\r\n\t\t$$.radiusExpanded = Math.min($$.arcWidth, $$.arcHeight) / 2;\r\n\t\t$$.radius = $$.radiusExpanded * 0.95;\r\n\t\t$$.innerRadiusRatio = w ? ($$.radius - w) / $$.radius : 0.6;\r\n\r\n\t\t$$.innerRadius = $$.hasType(\"donut\") || $$.hasType(\"gauge\") ?\r\n\t\t$$.radius * $$.innerRadiusRatio : 0;\r\n\t},\r\n\tupdateArc() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.svgArc = $$.getSvgArc();\r\n\t\t$$.svgArcExpanded = $$.getSvgArcExpanded();\r\n\t\t$$.svgArcExpandedSub = $$.getSvgArcExpanded(0.98);\r\n\t},\r\n\tupdateAngle(dValue) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet d = dValue;\r\n\t\tlet found = false;\r\n\t\tlet index = 0;\r\n\t\tlet gMin;\r\n\t\tlet gMax;\r\n\t\tlet gTic;\r\n\t\tlet gValue;\r\n\r\n\t\tif (!config) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\t$$.pie($$.filterTargetsToShow($$.data.targets)).forEach(t => {\r\n\t\t\tif (!found && t.data.id === d.data.id) {\r\n\t\t\t\tfound = true;\r\n\t\t\t\td = t;\r\n\t\t\t\td.index = index;\r\n\t\t\t}\r\n\r\n\t\t\tindex++;\r\n\t\t});\r\n\r\n\t\tif (isNaN(d.startAngle)) {\r\n\t\t\td.startAngle = 0;\r\n\t\t}\r\n\r\n\t\tif (isNaN(d.endAngle)) {\r\n\t\t\td.endAngle = d.startAngle;\r\n\t\t}\r\n\r\n\t\tif ($$.isGaugeType(d.data)) {\r\n\t\t\tgMin = config.gauge_min;\r\n\t\t\tgMax = config.gauge_max;\r\n\t\t\tgTic = (Math.PI * (config.gauge_fullCircle ? 2 : 1)) / (gMax - gMin);\r\n\r\n\t\t\tgValue = d.value < gMin ?\r\n\t\t\t\t0 : (d.value < gMax ? d.value - gMin : (gMax - gMin));\r\n\r\n\t\t\td.startAngle = config.gauge_startingAngle;\r\n\t\t\td.endAngle = d.startAngle + gTic * gValue;\r\n\t\t}\r\n\r\n\t\treturn found ? d : null;\r\n\t},\r\n\r\n\tgetSvgArc() {\r\n\t\tconst $$ = this;\r\n\t\tconst arc = d3Arc()\r\n\t\t\t.outerRadius($$.radius)\r\n\t\t\t.innerRadius($$.innerRadius);\r\n\r\n\t\tconst newArc = function(d, withoutUpdate) {\r\n\t\t\tif (withoutUpdate) {\r\n\t\t\t\treturn arc(d);\r\n\t\t\t} // for interpolate\r\n\r\n\t\t\tconst updated = $$.updateAngle(d);\r\n\r\n\t\t\treturn updated ? arc(updated) : \"M 0 0\";\r\n\t\t};\r\n\r\n\t\t// TODO: extends all function\r\n\t\tnewArc.centroid = arc.centroid;\r\n\r\n\t\treturn newArc;\r\n\t},\r\n\tgetSvgArcExpanded(rate) {\r\n\t\tconst $$ = this;\r\n\t\tconst arc = d3Arc()\r\n\t\t\t.outerRadius($$.radiusExpanded * (rate || 1))\r\n\t\t\t.innerRadius($$.innerRadius);\r\n\r\n\t\treturn function(d) {\r\n\t\t\tconst updated = $$.updateAngle(d);\r\n\r\n\t\t\treturn updated ? arc(updated) : \"M 0 0\";\r\n\t\t};\r\n\t},\r\n\tgetArc(d, withoutUpdate, force) {\r\n\t\treturn force || this.isArcType(d.data) ? this.svgArc(d, withoutUpdate) : \"M 0 0\";\r\n\t},\r\n\r\n\ttransformForArcLabel(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst updated = $$.updateAngle(d);\r\n\t\tlet c;\r\n\t\tlet x;\r\n\t\tlet y;\r\n\t\tlet h;\r\n\t\tlet ratio;\r\n\t\tlet translate = \"\";\r\n\r\n\t\tif (updated && !$$.hasType(\"gauge\")) {\r\n\t\t\tc = this.svgArc.centroid(updated);\r\n\t\t\tx = isNaN(c[0]) ? 0 : c[0];\r\n\t\t\ty = isNaN(c[1]) ? 0 : c[1];\r\n\t\t\th = Math.sqrt(x * x + y * y);\r\n\t\t\tif ($$.hasType(\"donut\") && config.donut_label_ratio) {\r\n\t\t\t\tratio = isFunction(config.donut_label_ratio) ?\r\n\t\t\t\t\tconfig.donut_label_ratio(d, $$.radius, h) : config.donut_label_ratio;\r\n\t\t\t} else if ($$.hasType(\"pie\") && config.pie_label_ratio) {\r\n\t\t\t\tratio = isFunction(config.pie_label_ratio) ?\r\n\t\t\t\t\tconfig.pie_label_ratio(d, $$.radius, h) : config.pie_label_ratio;\r\n\t\t\t} else {\r\n\t\t\t\tratio = $$.radius &&\r\n\t\t\t\t\t(h ? (36 / $$.radius > 0.375 ? 1.175 - 36 / $$.radius : 0.8) * $$.radius / h : 0);\r\n\t\t\t}\r\n\t\t\ttranslate = `translate(${x * ratio},${y * ratio})`;\r\n\t\t}\r\n\t\treturn translate;\r\n\t},\r\n\r\n\tgetArcRatio(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst whole = Math.PI * ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 1 : 2);\r\n\r\n\t\treturn d ? (d.endAngle - d.startAngle) / whole : null;\r\n\t},\r\n\r\n\tconvertToArcData(d) {\r\n\t\treturn this.addName({\r\n\t\t\tid: d.data.id,\r\n\t\t\tvalue: d.value,\r\n\t\t\tratio: this.getArcRatio(d),\r\n\t\t\tindex: d.index,\r\n\t\t});\r\n\t},\r\n\r\n\ttextForArcLabel(d) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif (!$$.shouldShowArcLabel()) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tconst updated = $$.updateAngle(d);\r\n\t\tconst value = updated ? updated.value : null;\r\n\t\tconst ratio = $$.getArcRatio(updated);\r\n\t\tconst id = d.data.id;\r\n\r\n\t\tif (!$$.hasType(\"gauge\") && !$$.meetsArcLabelThreshold(ratio)) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\tconst format = $$.getArcLabelFormat();\r\n\r\n\t\treturn format ? format(value, ratio, id) : $$.defaultArcValueFormat(value, ratio);\r\n\t},\r\n\r\n\ttextForGaugeMinMax(value, isMax) {\r\n\t\tconst format = this.getGaugeLabelExtents();\r\n\r\n\t\treturn format ? format(value, isMax) : value;\r\n\t},\r\n\r\n\texpandArc(targetIds) {\r\n\t\tconst $$ = this;\r\n\t\tlet interval;\r\n\r\n\t\t// MEMO: avoid to cancel transition\r\n\t\tif ($$.transiting) {\r\n\t\t\tinterval = window.setInterval(() => {\r\n\t\t\t\tif (!$$.transiting) {\r\n\t\t\t\t\twindow.clearInterval(interval);\r\n\t\t\t\t\tif ($$.legend.selectAll(\".bb-legend-item-focused\").size() > 0) {\r\n\t\t\t\t\t\t$$.expandArc(targetIds);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}, 10);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst newTargetIds = $$.mapToTargetIds(targetIds);\r\n\r\n\t\t$$.svg.selectAll($$.selectorTargets(newTargetIds, `.${CLASS.chartArc}`)).each(function(d) {\r\n\t\t\tif (!$$.shouldExpand(d.data.id)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\td3Select(this).selectAll(\"path\")\r\n\t\t\t\t.transition()\r\n\t\t\t\t.duration($$.expandDuration(d.data.id))\r\n\t\t\t\t.attr(\"d\", $$.svgArcExpanded)\r\n\t\t\t\t.transition()\r\n\t\t\t\t.duration($$.expandDuration(d.data.id) * 2)\r\n\t\t\t\t.attr(\"d\", $$.svgArcExpandedSub)\r\n\t\t\t\t.each(v => {\r\n\t\t\t\t\tif ($$.isDonutType(v.data)) {\r\n\t\t\t\t\t\t// callback here\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t});\r\n\t},\r\n\r\n\tunexpandArc(targetIds) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif ($$.transiting) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst newTargetIds = $$.mapToTargetIds(targetIds);\r\n\r\n\t\t$$.svg.selectAll($$.selectorTargets(newTargetIds, `.${CLASS.chartArc}`))\r\n\t\t\t.selectAll(\"path\")\r\n\t\t\t.transition()\r\n\t\t\t.duration(d => $$.expandDuration(d.data.id))\r\n\t\t\t.attr(\"d\", $$.svgArc);\r\n\t\t$$.svg.selectAll(`${CLASS.arc}`)\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\t},\r\n\r\n\texpandDuration(id) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif ($$.isDonutType(id)) {\r\n\t\t\treturn config.donut_expand_duration;\r\n\t\t} else if ($$.isGaugeType(id)) {\r\n\t\t\treturn config.gauge_expand_duration;\r\n\t\t} else if ($$.isPieType(id)) {\r\n\t\t\treturn config.pie_expand_duration;\r\n\t\t} else {\r\n\t\t\treturn 50;\r\n\t\t}\r\n\t},\r\n\r\n\tshouldExpand(id) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn ($$.isDonutType(id) && config.donut_expand) ||\r\n\t\t\t($$.isGaugeType(id) && config.gauge_expand) ||\r\n\t\t\t($$.isPieType(id) && config.pie_expand);\r\n\t},\r\n\r\n\tshouldShowArcLabel() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet shouldShow = true;\r\n\r\n\t\tif ($$.hasType(\"donut\")) {\r\n\t\t\tshouldShow = config.donut_label_show;\r\n\t\t} else if ($$.hasType(\"pie\")) {\r\n\t\t\tshouldShow = config.pie_label_show;\r\n\t\t}\r\n\t\t// when gauge, always true\r\n\t\treturn shouldShow;\r\n\t},\r\n\r\n\tmeetsArcLabelThreshold(ratio) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst threshold = $$.hasType(\"donut\") ? config.donut_label_threshold : config.pie_label_threshold;\r\n\r\n\t\treturn ratio >= threshold;\r\n\t},\r\n\r\n\tgetArcLabelFormat() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet format = config.pie_label_format;\r\n\r\n\t\tif ($$.hasType(\"gauge\")) {\r\n\t\t\tformat = config.gauge_label_format;\r\n\t\t} else if ($$.hasType(\"donut\")) {\r\n\t\t\tformat = config.donut_label_format;\r\n\t\t}\r\n\t\treturn format;\r\n\t},\r\n\r\n\tgetGaugeLabelExtents() {\r\n\t\tconst config = this.config;\r\n\r\n\t\treturn config.gauge_label_extents;\r\n\t},\r\n\r\n\tgetArcTitle() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.hasType(\"donut\") ? $$.config.donut_title : \"\";\r\n\t},\r\n\r\n\tupdateTargetsForArc(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst main = $$.main;\r\n\t\tconst classChartArc = $$.classChartArc.bind($$);\r\n\t\tconst classArcs = $$.classArcs.bind($$);\r\n\t\tconst classFocus = $$.classFocus.bind($$);\r\n\t\tconst mainPieUpdate = main.select(`.${CLASS.chartArcs}`)\r\n\t\t\t.selectAll(`.${CLASS.chartArc}`)\r\n\t\t\t.data($$.pie(targets))\r\n\t\t\t.attr(\"class\", d => classChartArc(d) + classFocus(d.data));\r\n\r\n\t\tconst mainPieEnter = mainPieUpdate.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", classChartArc);\r\n\r\n\t\tmainPieEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classArcs)\r\n\t\t\t.merge(mainPieUpdate);\r\n\r\n\t\tmainPieEnter.append(\"text\")\r\n\t\t\t.attr(\"dy\", $$.hasType(\"gauge\") ? \"-.1em\" : \".35em\")\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.style(\"text-anchor\", \"middle\")\r\n\t\t\t.style(\"pointer-events\", \"none\");\r\n\t\t// MEMO: can not keep same color..., but not bad to update color in redraw\r\n\t\t// mainPieUpdate.exit().remove();\r\n\t},\r\n\r\n\tinitArc() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.arcs = $$.main.select(`.${CLASS.chart}`)\r\n\t\t\t.append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartArcs)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"arc\"));\r\n\r\n\t\t$$.arcs.append(\"text\")\r\n\t\t\t.attr(\"class\", CLASS.chartArcsTitle)\r\n\t\t\t.style(\"text-anchor\", \"middle\")\r\n\t\t\t.text($$.getArcTitle());\r\n\t},\r\n\r\n\tredrawArc(duration, durationForExit, withTransform) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst main = $$.main;\r\n\t\tconst isTouch = ($$.inputType === \"touch\");\r\n\t\tconst isMouse = ($$.inputType === \"mouse\");\r\n\r\n\t\tfunction selectArc(_this, arcData, id) {\r\n\t\t\t// transitions\r\n\t\t\t$$.expandArc(id);\r\n\t\t\t$$.api.focus(id);\r\n\t\t\t$$.toggleFocusLegend(id, true);\r\n\t\t\t$$.showTooltip([arcData], _this);\r\n\t\t}\r\n\r\n\t\tfunction unselectArc(arcData) {\r\n\t\t\tconst id = (arcData && arcData.id) || undefined;\r\n\r\n\t\t\t$$.unexpandArc(id);\r\n\t\t\t$$.api.revert();\r\n\t\t\t$$.revertLegend();\r\n\t\t\t$$.hideTooltip();\r\n\t\t}\r\n\r\n\t\tlet mainArc = main.selectAll(`.${CLASS.arcs}`)\r\n\t\t\t.selectAll(`.${CLASS.arc}`)\r\n\t\t\t.data($$.arcData.bind($$));\r\n\r\n\t\tmainArc.exit().transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\tmainArc = mainArc.enter().append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classArc.bind($$))\r\n\t\t\t.style(\"fill\", d => $$.color(d.data))\r\n\t\t\t.style(\"cursor\", d => config.interaction_enabled &&\r\n\t\t\t(config.data_selection_isselectable(d) ? \"pointer\" : null))\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.each(function(d) {\r\n\t\t\t\tif ($$.isGaugeType(d.data)) {\r\n\t\t\t\t\td.startAngle = config.gauge_startingAngle;\r\n\t\t\t\t\td.endAngle = config.gauge_startingAngle;\r\n\t\t\t\t}\r\n\t\t\t\tthis._current = d;\r\n\t\t\t})\r\n\t\t\t.merge(mainArc);\r\n\r\n\t\tmainArc\r\n\t\t\t.attr(\"transform\", d => (!$$.isGaugeType(d.data) && withTransform ? \"scale(0)\" : \"\"))\r\n\t\t\t.style(\"opacity\", function(d) {\r\n\t\t\t\treturn d === this._current ? \"0\" : \"1\";\r\n\t\t\t})\r\n\t\t\t.on(isMouse ? \"mouseover\" : undefined, config.interaction_enabled ? function(d) {\r\n\t\t\t\tif ($$.transiting) { // skip while transiting\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst updated = $$.updateAngle(d);\r\n\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\t\t\t\tconst id = (arcData && arcData.id) || undefined;\r\n\r\n\t\t\t\tselectArc(this, arcData, id);\r\n\r\n\t\t\t\t$$.config.data_onover(arcData, this);\r\n\t\t\t} : null)\r\n\t\t\t.on(isMouse ? \"mouseout\" : undefined, config.interaction_enabled ? function(d) {\r\n\t\t\t\tif ($$.transiting) { // skip while transiting\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tconst updated = $$.updateAngle(d);\r\n\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\r\n\t\t\t\tunselectArc();\r\n\r\n\t\t\t\t$$.config.data_onout(arcData, this);\r\n\t\t\t} : null)\r\n\t\t\t.on(isMouse ? \"mousemove\" : undefined, config.interaction_enabled ? function(d) {\r\n\t\t\t\tconst updated = $$.updateAngle(d);\r\n\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\r\n\t\t\t\t$$.showTooltip([arcData], this);\r\n\t\t\t} : null)\r\n\t\t\t.on(isMouse ? \"click\" : undefined, config.interaction_enabled ? function(d, i) {\r\n\t\t\t\tconst updated = $$.updateAngle(d);\r\n\t\t\t\tlet arcData;\r\n\r\n\t\t\t\tif (updated) {\r\n\t\t\t\t\tarcData = $$.convertToArcData(updated);\r\n\t\t\t\t\tif ($$.toggleShape) {\r\n\t\t\t\t\t\t$$.toggleShape(this, arcData, i);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$$.config.data_onclick.call($$.api, arcData, this);\r\n\t\t\t\t}\r\n\t\t\t} : null)\r\n\t\t\t.each(() => {\r\n\t\t\t\t$$.transiting = true;\r\n\t\t\t})\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.attrTween(\"d\", function(d) {\r\n\t\t\t\tconst updated = $$.updateAngle(d);\r\n\r\n\t\t\t\tif (!updated) {\r\n\t\t\t\t\treturn function() {\r\n\t\t\t\t\t\treturn \"M 0 0\";\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isNaN(this._current.startAngle)) {\r\n\t\t\t\t\tthis._current.startAngle = 0;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isNaN(this._current.endAngle)) {\r\n\t\t\t\t\tthis._current.endAngle = this._current.startAngle;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst interpolate = d3Interpolate(this._current, updated);\r\n\r\n\t\t\t\tthis._current = interpolate(0);\r\n\r\n\t\t\t\treturn function(t) {\r\n\t\t\t\t\tconst interpolated = interpolate(t);\r\n\r\n\t\t\t\t\tinterpolated.data = d.data; // data.id will be updated by interporator\r\n\t\t\t\t\treturn $$.getArc(interpolated, true);\r\n\t\t\t\t};\r\n\t\t\t})\r\n\t\t\t.attr(\"transform\", withTransform ? \"scale(1)\" : \"\")\r\n\t\t\t.style(\"fill\", d => ($$.levelColor ?\r\n\t\t\t\t$$.levelColor(d.data.values[0].value) : $$.color(d.data.id))\r\n\t\t\t)\r\n\t\t\t// Where gauge reading color would receive customization.\r\n\t\t\t.style(\"opacity\", \"1\")\r\n\t\t\t.call($$.endall, () => {\r\n\t\t\t\t$$.transiting = false;\r\n\t\t\t});\r\n\r\n\t\tif (isTouch && config.interaction_enabled && $$.hasArcType()) {\r\n\t\t\tconst getEventArc = () => {\r\n\t\t\t\tconst touch = d3Event.changedTouches[0];\r\n\t\t\t\tconst eventArc = d3Select(document.elementFromPoint(touch.clientX, touch.clientY));\r\n\r\n\t\t\t\treturn eventArc;\r\n\t\t\t};\r\n\r\n\t\t\t$$.svg.on(\"touchstart\", function() {\r\n\t\t\t\tif ($$.transiting) { // skip while transiting\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst eventArc = getEventArc();\r\n\t\t\t\tconst datum = eventArc.datum();\r\n\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\r\n\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\t\t\t\tconst id = (arcData && arcData.id) || undefined;\r\n\r\n\t\t\t\t(id === undefined) ? unselectArc() : selectArc(this, arcData, id);\r\n\t\t\t\t$$.config.data_onover(arcData, this);\r\n\t\t\t})\r\n\t\t\t\t.on(\"touchend\", function() {\r\n\t\t\t\t\tif ($$.transiting) { // skip while transiting\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst eventArc = getEventArc();\r\n\t\t\t\t\tconst datum = eventArc.datum();\r\n\t\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\r\n\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\r\n\r\n\t\t\t\t\t(id === undefined) ? unselectArc() : selectArc(this, arcData, id);\r\n\t\t\t\t\t$$.config.data_onout(arcData, this);\r\n\t\t\t\t})\r\n\t\t\t\t.on(\"touchmove\", function() {\r\n\t\t\t\t\tconst eventArc = getEventArc();\r\n\t\t\t\t\tconst datum = eventArc.datum();\r\n\t\t\t\t\tconst updated = (datum && datum.data && datum.data.id) ? $$.updateAngle(datum) : null;\r\n\t\t\t\t\tconst arcData = updated ? $$.convertToArcData(updated) : null;\r\n\t\t\t\t\tconst id = (arcData && arcData.id) || undefined;\r\n\r\n\t\t\t\t\t(id === undefined) ? unselectArc() : selectArc(this, arcData, id);\r\n\t\t\t\t});\r\n\t\t}\r\n\r\n\t\tmain.selectAll(`.${CLASS.chartArc}`)\r\n\t\t\t.select(\"text\")\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.attr(\"class\", d => ($$.isGaugeType(d.data) ? CLASS.gaugeValue : \"\"))\r\n\t\t\t.text($$.textForArcLabel.bind($$))\r\n\t\t\t.attr(\"transform\", $$.transformForArcLabel.bind($$))\r\n\t\t\t.style(\"font-size\", d => ($$.isGaugeType(d.data) ? `${Math.round($$.radius / 5)}px` : \"\"))\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.style(\"opacity\", d => ($$.isTargetToShow(d.data.id) && $$.isArcType(d.data) ? \"1\" : \"0\"));\r\n\r\n\t\tmain.select(`.${CLASS.chartArcsTitle}`)\r\n\t\t\t.style(\"opacity\", $$.hasType(\"donut\") || $$.hasType(\"gauge\") ? \"1\" : \"0\");\r\n\r\n\t\tif ($$.hasType(\"gauge\")) {\r\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsBackground}`)\r\n\t\t\t\t.attr(\"d\", () => {\r\n\t\t\t\t\tconst d = {\r\n\t\t\t\t\t\tdata: [{value: config.gauge_max}],\r\n\t\t\t\t\t\tstartAngle: config.gauge_startingAngle,\r\n\t\t\t\t\t\tendAngle: -1 * config.gauge_startingAngle\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\treturn $$.getArc(d, true, true);\r\n\t\t\t\t});\r\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsGaugeUnit}`)\r\n\t\t\t\t.attr(\"dy\", \".75em\")\r\n\t\t\t\t.text(config.gauge_label_show ? config.gauge_units : \"\");\r\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsGaugeMin}`)\r\n\t\t\t\t.attr(\"dx\", `${-1 * ($$.innerRadius + (($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2)))}px`)\r\n\t\t\t\t.attr(\"dy\", \"1.2em\")\r\n\t\t\t\t.text(config.gauge_label_show ? $$.textForGaugeMinMax(config.gauge_min, false) : \"\");\r\n\t\t\t$$.arcs.select(`.${CLASS.chartArcsGaugeMax}`)\r\n\t\t\t\t.attr(\"dx\", `${$$.innerRadius + (($$.radius - $$.innerRadius) / (config.gauge_fullCircle ? 1 : 2))}px`)\r\n\t\t\t\t.attr(\"dy\", \"1.2em\")\r\n\t\t\t\t.text(config.gauge_label_show ? $$.textForGaugeMinMax(config.gauge_max, true) : \"\");\r\n\t\t}\r\n\t},\r\n\r\n\tinitGauge() {\r\n\t\tconst arcs = this.arcs;\r\n\r\n\t\tif (this.hasType(\"gauge\")) {\r\n\t\t\tarcs.append(\"path\")\r\n\t\t\t\t.attr(\"class\", CLASS.chartArcsBackground);\r\n\t\t\tarcs.append(\"text\")\r\n\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeUnit)\r\n\t\t\t\t.style(\"text-anchor\", \"middle\")\r\n\t\t\t\t.style(\"pointer-events\", \"none\");\r\n\t\t\tarcs.append(\"text\")\r\n\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeMin)\r\n\t\t\t\t.style(\"text-anchor\", \"middle\")\r\n\t\t\t\t.style(\"pointer-events\", \"none\");\r\n\t\t\tarcs.append(\"text\")\r\n\t\t\t\t.attr(\"class\", CLASS.chartArcsGaugeMax)\r\n\t\t\t\t.style(\"text-anchor\", \"middle\")\r\n\t\t\t\t.style(\"pointer-events\", \"none\");\r\n\t\t}\r\n\t},\r\n\r\n\tgetGaugeLabelHeight() {\r\n\t\treturn this.config.gauge_label_show ? 20 : 0;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/arc.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\thasCaches(ids) {\r\n\t\tfor (let i = 0; i < ids.length; i++) {\r\n\t\t\tif (!(ids[i] in this.cache)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\taddCache(id, target) {\r\n\t\tthis.cache[id] = this.cloneTarget(target);\r\n\t},\r\n\r\n\tgetCaches(ids) {\r\n\t\tconst targets = [];\r\n\r\n\t\tfor (let i = 0; i < ids.length; i++) {\r\n\t\t\tif (ids[i] in this.cache) {\r\n\t\t\t\ttargets.push(this.cloneTarget(this.cache[ids[i]]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn targets;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/cache.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Category Name\r\n\t * @private\r\n\t * @param {Number} index\r\n\t * @returns {String} gategory Name\r\n\t */\r\n\tcategoryName(i) {\r\n\t\tconst config = this.config;\r\n\r\n\t\treturn i < config.axis_x_categories.length ? config.axis_x_categories[i] : i;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/category.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"./util\";\r\n\r\n\r\nextend(ChartInternal.prototype, {\r\n\tCLASS,\r\n\r\n\tgenerateClass(prefix, targetId) {\r\n\t\treturn ` ${prefix} ${prefix + this.getTargetSelectorSuffix(targetId)}`;\r\n\t},\r\n\r\n\tclassText(d) {\r\n\t\treturn this.generateClass(CLASS.text, d.index);\r\n\t},\r\n\r\n\tclassTexts(d) {\r\n\t\treturn this.generateClass(CLASS.texts, d.id);\r\n\t},\r\n\r\n\tclassShape(d) {\r\n\t\treturn this.generateClass(CLASS.shape, d.index);\r\n\t},\r\n\r\n\tclassShapes(d) {\r\n\t\treturn this.generateClass(CLASS.shapes, d.id);\r\n\t},\r\n\r\n\tclassLine(d) {\r\n\t\treturn this.classShape(d) + this.generateClass(CLASS.line, d.id);\r\n\t},\r\n\r\n\tclassLines(d) {\r\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.lines, d.id);\r\n\t},\r\n\r\n\tclassCircle(d) {\r\n\t\treturn this.classShape(d) + this.generateClass(CLASS.circle, d.index);\r\n\t},\r\n\r\n\tclassCircles(d) {\r\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.circles, d.id);\r\n\t},\r\n\r\n\tclassBar(d) {\r\n\t\treturn this.classShape(d) + this.generateClass(CLASS.bar, d.index);\r\n\t},\r\n\r\n\tclassBars(d) {\r\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.bars, d.id);\r\n\t},\r\n\r\n\tclassArc(d) {\r\n\t\treturn this.classShape(d.data) + this.generateClass(CLASS.arc, d.data.id);\r\n\t},\r\n\r\n\tclassArcs(d) {\r\n\t\treturn this.classShapes(d.data) + this.generateClass(CLASS.arcs, d.data.id);\r\n\t},\r\n\r\n\tclassArea(d) {\r\n\t\treturn this.classShape(d) + this.generateClass(CLASS.area, d.id);\r\n\t},\r\n\r\n\tclassAreas(d) {\r\n\t\treturn this.classShapes(d) + this.generateClass(CLASS.areas, d.id);\r\n\t},\r\n\r\n\tclassRegion(d, i) {\r\n\t\treturn `${this.generateClass(CLASS.region, i)} ${\"class\" in d ? d.class : \"\"}`;\r\n\t},\r\n\r\n\tclassEvent(d) {\r\n\t\treturn this.generateClass(CLASS.eventRect, d.index);\r\n\t},\r\n\r\n\tclassTarget(id) {\r\n\t\tconst additionalClassSuffix = this.config.data_classes[id];\r\n\t\tlet additionalClass = \"\";\r\n\r\n\t\tif (additionalClassSuffix) {\r\n\t\t\tadditionalClass = ` ${CLASS.target}-${additionalClassSuffix}`;\r\n\t\t}\r\n\r\n\t\treturn this.generateClass(CLASS.target, id) + additionalClass;\r\n\t},\r\n\r\n\tclassFocus(d) {\r\n\t\treturn this.classFocused(d) + this.classDefocused(d);\r\n\t},\r\n\r\n\tclassFocused(d) {\r\n\t\treturn ` ${this.focusedTargetIds.indexOf(d.id) >= 0 ? CLASS.focused : \"\"}`;\r\n\t},\r\n\r\n\tclassDefocused(d) {\r\n\t\treturn ` ${this.defocusedTargetIds.indexOf(d.id) >= 0 ? CLASS.defocused : \"\"}`;\r\n\t},\r\n\r\n\tclassChartText(d) {\r\n\t\treturn CLASS.chartText + this.classTarget(d.id);\r\n\t},\r\n\r\n\tclassChartLine(d) {\r\n\t\treturn CLASS.chartLine + this.classTarget(d.id);\r\n\t},\r\n\r\n\tclassChartBar(d) {\r\n\t\treturn CLASS.chartBar + this.classTarget(d.id);\r\n\t},\r\n\r\n\tclassChartArc(d) {\r\n\t\treturn CLASS.chartArc + this.classTarget(d.data.id);\r\n\t},\r\n\r\n\tgetTargetSelectorSuffix(targetId) {\r\n\t\treturn targetId || targetId === 0 ?\r\n\t\t\t`-${targetId}`.replace(/[\\s?!@#$%^&*()_=+,.<>'\":;\\[\\]\\/|~`{}\\\\]/g, \"-\") : \"\";\r\n\t},\r\n\r\n\tselectorTarget(id, prefix) {\r\n\t\treturn `${prefix || \"\"}.${CLASS.target + this.getTargetSelectorSuffix(id)}`;\r\n\t},\r\n\r\n\tselectorTargets(idsValue, prefix) {\r\n\t\tconst $$ = this;\r\n\t\tconst ids = idsValue || [];\r\n\r\n\t\treturn ids.length ?\r\n\t\t\tids.map(id => $$.selectorTarget(id, prefix)) : null;\r\n\t},\r\n\r\n\tselectorLegend(id) {\r\n\t\treturn `.${CLASS.legendItem + this.getTargetSelectorSuffix(id)}`;\r\n\t},\r\n\r\n\tselectorLegends(ids) {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn ids && ids.length ?\r\n\t\t\tids.map(id => $$.selectorLegend(id)) : null;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/class.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetClipPath(id) {\r\n\t\tconst isIE9 = window.navigator.appVersion\r\n\t\t\t\t.toLowerCase().indexOf(\"msie 9.\") >= 0;\r\n\r\n\t\treturn `url(${(isIE9 ? \"\" : document.URL.split(\"#\")[0])}#${id})`;\r\n\t},\r\n\r\n\tappendClip(parent, id) {\r\n\t\treturn parent.append(\"clipPath\")\r\n\t\t\t.attr(\"id\", id)\r\n\t\t\t.append(\"rect\");\r\n\t},\r\n\r\n\tgetAxisClipX(forHorizontal) {\r\n\t\t// axis line width + padding for left\r\n\t\tconst left = Math.max(30, this.margin.left);\r\n\r\n\t\treturn forHorizontal ? -(1 + left) : -(left - 1);\r\n\t},\r\n\r\n\tgetAxisClipY(forHorizontal) {\r\n\t\treturn forHorizontal ? -20 : -this.margin.top;\r\n\t},\r\n\r\n\tgetXAxisClipX() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipX(!$$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetXAxisClipY() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipY(!$$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetYAxisClipX() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.config.axis_y_inner ?\r\n\t\t\t-1 : $$.getAxisClipX($$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetYAxisClipY() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipY($$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetAxisClipWidth(forHorizontal) {\r\n\t\tconst $$ = this;\r\n\t\tconst left = Math.max(30, $$.margin.left);\r\n\t\tconst right = Math.max(30, $$.margin.right);\r\n\r\n\t\t// width + axis line width + padding for left/right\r\n\t\treturn forHorizontal ?\r\n\t\t\t$$.width + 2 + left + right : $$.margin.left + 20;\r\n\t},\r\n\r\n\tgetAxisClipHeight(forHorizontal) {\r\n\t\t// less than 20 is not enough to show the axis label 'outer' without legend\r\n\t\treturn (forHorizontal ? this.margin.bottom : (this.margin.top + this.height)) + 20;\r\n\t},\r\n\r\n\tgetXAxisClipWidth() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipWidth(!$$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetXAxisClipHeight() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipHeight(!$$.config.axis_rotated);\r\n\t},\r\n\r\n\tgetYAxisClipWidth() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipWidth($$.config.axis_rotated) + ($$.config.axis_y_inner ? 20 : 0);\r\n\t},\r\n\r\n\tgetYAxisClipHeight() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.getAxisClipHeight($$.config.axis_rotated);\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/clip.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tscaleOrdinal as d3ScaleOrdinal,\r\n\tschemeCategory10 as d3SchemeCategory10\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {notEmpty, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgenerateColor() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst colors = config.data_colors;\r\n\t\tconst callback = config.data_color;\r\n\t\tconst ids = [];\r\n\t\tconst pattern = notEmpty(config.color_pattern) ?\r\n\t\t\tconfig.color_pattern : d3ScaleOrdinal(d3SchemeCategory10).range();\r\n\r\n\t\treturn function(d) {\r\n\t\t\tconst id = d.id || (d.data && d.data.id) || d;\r\n\t\t\tlet color;\r\n\r\n\t\t\t// if callback function is provided\r\n\t\t\tif (colors[id] instanceof Function) {\r\n\t\t\t\tcolor = colors[id](d);\r\n\r\n\t\t\t// if specified, choose that color\r\n\t\t\t} else if (colors[id]) {\r\n\t\t\t\tcolor = colors[id];\r\n\r\n\t\t\t// if not specified, choose from pattern\r\n\t\t\t} else {\r\n\t\t\t\tif (ids.indexOf(id) < 0) { ids.push(id); }\r\n\t\t\t\tcolor = pattern[ids.indexOf(id) % pattern.length];\r\n\t\t\t\tcolors[id] = color;\r\n\t\t\t}\r\n\r\n\t\t\treturn callback instanceof Function ?\r\n\t\t\t\tcallback(color, d) : color;\r\n\t\t};\r\n\t},\r\n\r\n\tgenerateLevelColor() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst colors = config.color_pattern;\r\n\t\tconst threshold = config.color_threshold;\r\n\r\n\t\tconst asValue = threshold.unit === \"value\";\r\n\t\tconst max = threshold.max || 100;\r\n\t\tconst values = threshold.values &&\r\n\t\t\tthreshold.values.length ? threshold.values : [];\r\n\r\n\t\treturn notEmpty(threshold) ? function(value) {\r\n\t\t\tlet color = colors[colors.length - 1];\r\n\r\n\t\t\tfor (let i = 0, v; i < values.length; i++) {\r\n\t\t\t\tv = asValue ? value : (value * 100 / max);\r\n\t\t\t\tif (v < values[i]) {\r\n\t\t\t\t\tcolor = colors[i];\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn color;\r\n\t\t} : null;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/color.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tmin as d3Min,\r\n\tmax as d3Max,\r\n\textent as d3Extent\r\n} from \"d3\"; // selection\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend, isDefined, notEmpty, isValue, diffDomain} from \"./util\";\r\n\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetYDomainMin(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst ids = $$.mapToIds(targets);\r\n\t\tconst ys = $$.getValuesAsIdKeyed(targets);\r\n\t\tlet j;\r\n\t\tlet k;\r\n\t\tlet baseId;\r\n\t\tlet idsInGroup;\r\n\t\tlet id;\r\n\t\tlet hasNegativeValue;\r\n\r\n\t\tif (config.data_groups.length > 0) {\r\n\t\t\thasNegativeValue = $$.hasNegativeValueInTargets(targets);\r\n\r\n\t\t\tfor (j = 0; j < config.data_groups.length; j++) {\r\n\t\t\t\t// Determine baseId\r\n\t\t\t\tidsInGroup = config.data_groups[j].filter(v => (ids.indexOf(v) >= 0));\r\n\r\n\t\t\t\tif (idsInGroup.length === 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbaseId = idsInGroup[0];\r\n\r\n\t\t\t\t// Consider negative values\r\n\t\t\t\tif (hasNegativeValue && ys[baseId]) {\r\n\t\t\t\t\tys[baseId].forEach((v, i) => {\r\n\t\t\t\t\t\tys[baseId][i] = v < 0 ? v : 0;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Compute min\r\n\t\t\t\tfor (k = 1; k < idsInGroup.length; k++) {\r\n\t\t\t\t\tid = idsInGroup[k];\r\n\r\n\t\t\t\t\tif (!ys[id]) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tys[id].forEach((v, i) => {\r\n\t\t\t\t\t\tif ($$.axis.getId(id) === $$.axis.getId(baseId) &&\r\n\t\t\t\t\t\t\tys[baseId] && !(hasNegativeValue && +v > 0)) {\r\n\t\t\t\t\t\t\tys[baseId][i] += +v;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn d3Min(Object.keys(ys).map(key => d3Min(ys[key])));\r\n\t},\r\n\tgetYDomainMax(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst ids = $$.mapToIds(targets);\r\n\t\tconst ys = $$.getValuesAsIdKeyed(targets);\r\n\t\tlet j;\r\n\t\tlet k;\r\n\t\tlet baseId;\r\n\t\tlet idsInGroup;\r\n\t\tlet id;\r\n\t\tlet hasPositiveValue;\r\n\r\n\t\tif (config.data_groups.length > 0) {\r\n\t\t\thasPositiveValue = $$.hasPositiveValueInTargets(targets);\r\n\t\t\tfor (j = 0; j < config.data_groups.length; j++) {\r\n\t\t\t\t// Determine baseId\r\n\t\t\t\tidsInGroup = config.data_groups[j].filter(v => (ids.indexOf(v) >= 0));\r\n\r\n\t\t\t\tif (idsInGroup.length === 0) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tbaseId = idsInGroup[0];\r\n\r\n\t\t\t\t// Consider positive values\r\n\t\t\t\tif (hasPositiveValue && ys[baseId]) {\r\n\t\t\t\t\tys[baseId].forEach((v, i) => {\r\n\t\t\t\t\t\tys[baseId][i] = v > 0 ? v : 0;\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\t// Compute max\r\n\t\t\t\tfor (k = 1; k < idsInGroup.length; k++) {\r\n\t\t\t\t\tid = idsInGroup[k];\r\n\r\n\t\t\t\t\tif (!ys[id]) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tys[id].forEach((v, i) => {\r\n\t\t\t\t\t\tif ($$.axis.getId(id) === $$.axis.getId(baseId) &&\r\n\t\t\t\t\t\t\tys[baseId] && !(hasPositiveValue && +v < 0)) {\r\n\t\t\t\t\t\t\tys[baseId][i] += +v;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn d3Max(Object.keys(ys).map(key => d3Max(ys[key])));\r\n\t},\r\n\tgetYDomain(targets, axisId, xDomain) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst targetsByAxisId = targets.filter(t => $$.axis.getId(t.id) === axisId);\r\n\t\tconst yTargets = xDomain ? $$.filterByXDomain(targetsByAxisId, xDomain) : targetsByAxisId;\r\n\t\tconst yMin = axisId === \"y2\" ? config.axis_y2_min : config.axis_y_min;\r\n\t\tconst yMax = axisId === \"y2\" ? config.axis_y2_max : config.axis_y_max;\r\n\t\tlet yDomainMin = $$.getYDomainMin(yTargets);\r\n\t\tlet yDomainMax = $$.getYDomainMax(yTargets);\r\n\t\tconst center = axisId === \"y2\" ? config.axis_y2_center : config.axis_y_center;\r\n\t\tlet isZeroBased = ($$.hasType(\"bar\", yTargets) && config.bar_zerobased) || ($$.hasType(\"area\", yTargets) && config.area_zerobased);\r\n\t\tconst isInverted = axisId === \"y2\" ? config.axis_y2_inverted : config.axis_y_inverted;\r\n\t\tconst showHorizontalDataLabel = $$.hasDataLabel() && config.axis_rotated;\r\n\t\tconst showVerticalDataLabel = $$.hasDataLabel() && !config.axis_rotated;\r\n\t\tlet lengths;\r\n\r\n\t\t// MEMO: avoid inverting domain unexpectedly\r\n\t\tyDomainMin = isValue(yMin) ? yMin :\r\n\t\t\t(isValue(yMax) ? (yDomainMin < yMax ? yDomainMin : yMax - 10) : yDomainMin);\r\n\t\tyDomainMax = isValue(yMax) ? yMax :\r\n\t\t\t(isValue(yMin) ? (yMin < yDomainMax ? yDomainMax : yMin + 10) : yDomainMax);\r\n\r\n\t\tif (yTargets.length === 0) { // use current domain if target of axisId is none\r\n\t\t\treturn axisId === \"y2\" ? $$.y2.domain() : $$.y.domain();\r\n\t\t}\r\n\r\n\t\tif (isNaN(yDomainMin)) { // set minimum to zero when not number\r\n\t\t\tyDomainMin = 0;\r\n\t\t}\r\n\r\n\t\tif (isNaN(yDomainMax)) { // set maximum to have same value as yDomainMin\r\n\t\t\tyDomainMax = yDomainMin;\r\n\t\t}\r\n\r\n\t\tif (yDomainMin === yDomainMax) {\r\n\t\t\tyDomainMin < 0 ? yDomainMax = 0 : yDomainMin = 0;\r\n\t\t}\r\n\r\n\t\tconst isAllPositive = yDomainMin >= 0 && yDomainMax >= 0;\r\n\t\tconst isAllNegative = yDomainMin <= 0 && yDomainMax <= 0;\r\n\r\n\t\t// Cancel zerobased if axis_*_min / axis_*_max specified\r\n\t\tif ((isValue(yMin) && isAllPositive) || (isValue(yMax) && isAllNegative)) {\r\n\t\t\tisZeroBased = false;\r\n\t\t}\r\n\r\n\t\t// Bar/Area chart should be 0-based if all positive|negative\r\n\t\tif (isZeroBased) {\r\n\t\t\tif (isAllPositive) { yDomainMin = 0; }\r\n\t\t\tif (isAllNegative) { yDomainMax = 0; }\r\n\t\t}\r\n\r\n\t\tconst domainLength = Math.abs(yDomainMax - yDomainMin);\r\n\t\tlet paddingTop = domainLength * 0.1;\r\n\t\tlet paddingBottom = domainLength * 0.1;\r\n\r\n\t\tif (typeof center !== \"undefined\") {\r\n\t\t\tconst yDomainAbs = Math.max(Math.abs(yDomainMin), Math.abs(yDomainMax));\r\n\r\n\t\t\tyDomainMax = center + yDomainAbs;\r\n\t\t\tyDomainMin = center - yDomainAbs;\r\n\t\t}\r\n\r\n\t\t// add padding for data label\r\n\t\tif (showHorizontalDataLabel) {\r\n\t\t\tlengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"width\");\r\n\t\t\tconst diff = diffDomain($$.y.range());\r\n\t\t\tconst ratio = [lengths[0] / diff, lengths[1] / diff];\r\n\r\n\t\t\tpaddingTop += domainLength * (ratio[1] / (1 - ratio[0] - ratio[1]));\r\n\t\t\tpaddingBottom += domainLength * (ratio[0] / (1 - ratio[0] - ratio[1]));\r\n\t\t} else if (showVerticalDataLabel) {\r\n\t\t\tlengths = $$.getDataLabelLength(yDomainMin, yDomainMax, \"height\");\r\n\t\t\tpaddingTop += $$.axis.convertPixelsToAxisPadding(lengths[1], domainLength);\r\n\t\t\tpaddingBottom += $$.axis.convertPixelsToAxisPadding(lengths[0], domainLength);\r\n\t\t}\r\n\r\n\t\tif (axisId === \"y\" && notEmpty(config.axis_y_padding)) {\r\n\t\t\tpaddingTop = $$.axis.getPadding(config.axis_y_padding, \"top\", paddingTop, domainLength);\r\n\t\t\tpaddingBottom = $$.axis.getPadding(config.axis_y_padding, \"bottom\", paddingBottom, domainLength);\r\n\t\t}\r\n\r\n\t\tif (axisId === \"y2\" && notEmpty(config.axis_y2_padding)) {\r\n\t\t\tpaddingTop = $$.axis.getPadding(config.axis_y2_padding, \"top\", paddingTop, domainLength);\r\n\t\t\tpaddingBottom = $$.axis.getPadding(config.axis_y2_padding, \"bottom\", paddingBottom, domainLength);\r\n\t\t}\r\n\r\n\t\t// Bar/Area chart should be 0-based if all positive|negative\r\n\t\tif (isZeroBased) {\r\n\t\t\tif (isAllPositive) {\r\n\t\t\t\tpaddingBottom = yDomainMin;\r\n\t\t\t}\r\n\t\t\tif (isAllNegative) {\r\n\t\t\t\tpaddingTop = -yDomainMax;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst domain = [yDomainMin - paddingBottom, yDomainMax + paddingTop];\r\n\r\n\t\treturn isInverted ? domain.reverse() : domain;\r\n\t},\r\n\r\n\tgetXDomainMin(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn isDefined(config.axis_x_min) ?\r\n\t\t\t($$.isTimeSeries() ? this.parseDate(config.axis_x_min) : config.axis_x_min) :\r\n\t\td3Min(targets, t => d3Min(t.values, v => v.x));\r\n\t},\r\n\r\n\tgetXDomainMax(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn isDefined(config.axis_x_max) ?\r\n\t\t\t($$.isTimeSeries() ? this.parseDate(config.axis_x_max) : config.axis_x_max) :\r\n\t\td3Max(targets, t => d3Max(t.values, v => v.x));\r\n\t},\r\n\r\n\tgetXDomainPadding(domain) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst diff = domain[1] - domain[0];\r\n\t\tlet maxDataCount;\r\n\t\tlet padding;\r\n\t\tlet paddingLeft;\r\n\t\tlet paddingRight;\r\n\r\n\t\tif ($$.isCategorized()) {\r\n\t\t\tpadding = 0;\r\n\t\t} else if ($$.hasType(\"bar\")) {\r\n\t\t\tmaxDataCount = $$.getMaxDataCount();\r\n\t\t\tpadding = maxDataCount > 1 ? (diff / (maxDataCount - 1)) / 2 : 0.5;\r\n\t\t} else {\r\n\t\t\tpadding = diff * 0.01;\r\n\t\t}\r\n\r\n\t\tif (typeof config.axis_x_padding === \"object\" && notEmpty(config.axis_x_padding)) {\r\n\t\t\tpaddingLeft = isValue(config.axis_x_padding.left) ? config.axis_x_padding.left : padding;\r\n\t\t\tpaddingRight = isValue(config.axis_x_padding.right) ? config.axis_x_padding.right : padding;\r\n\t\t} else if (typeof config.axis_x_padding === \"number\") {\r\n\t\t\tpaddingLeft = config.axis_x_padding;\r\n\t\t\tpaddingRight = config.axis_x_padding;\r\n\t\t} else {\r\n\t\t\tpaddingLeft = padding;\r\n\t\t\tpaddingRight = padding;\r\n\t\t}\r\n\t\treturn {left: paddingLeft, right: paddingRight};\r\n\t},\r\n\r\n\tgetXDomain(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst xDomain = [$$.getXDomainMin(targets), $$.getXDomainMax(targets)];\r\n\t\tlet firstX = xDomain[0];\r\n\t\tlet lastX = xDomain[1];\r\n\t\tconst padding = $$.getXDomainPadding(xDomain);\r\n\t\tlet min = 0;\r\n\t\tlet max = 0;\r\n\t\t// show center of x domain if min and max are the same\r\n\r\n\t\tif ((firstX - lastX) === 0 && !$$.isCategorized()) {\r\n\t\t\tif ($$.isTimeSeries()) {\r\n\t\t\t\tfirstX = new Date(firstX.getTime() * 0.5);\r\n\t\t\t\tlastX = new Date(lastX.getTime() * 1.5);\r\n\t\t\t} else {\r\n\t\t\t\tfirstX = firstX === 0 ? 1 : (firstX * 0.5);\r\n\t\t\t\tlastX = lastX === 0 ? -1 : (lastX * 1.5);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (firstX || firstX === 0) {\r\n\t\t\tmin = $$.isTimeSeries() ? new Date(firstX.getTime() - padding.left) : firstX - padding.left;\r\n\t\t}\r\n\r\n\t\tif (lastX || lastX === 0) {\r\n\t\t\tmax = $$.isTimeSeries() ? new Date(lastX.getTime() + padding.right) : lastX + padding.right;\r\n\t\t}\r\n\r\n\t\treturn [min, max];\r\n\t},\r\n\r\n\tupdateXDomain(targets, withUpdateXDomain, withUpdateOrgXDomain, withTrim, domain) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (withUpdateOrgXDomain) {\r\n\t\t\t$$.x.domain(domain || d3Extent($$.getXDomain(targets)));\r\n\t\t\t$$.orgXDomain = $$.x.domain();\r\n\r\n\t\t\tconfig.zoom_enabled &&\r\n\t\t\t\t$$.zoom.updateScaleExtent();\r\n\r\n\t\t\t$$.subX.domain($$.x.domain());\r\n\r\n\t\t\t$$.brush && $$.brush.scale($$.subX);\r\n\t\t}\r\n\r\n\t\tif (withUpdateXDomain) {\r\n\t\t\tconst domainValue = domain || (!$$.brush || $$.brushEmpty()) ?\r\n\t\t\t\t\t$$.orgXDomain : $$.getBrushSelection().map(v => $$.subX.invert(v));\r\n\r\n\t\t\t$$.x.domain(domainValue);\r\n\r\n\t\t\tconfig.zoom_enabled &&\r\n\t\t\t\t$$.zoom.updateScaleExtent();\r\n\t\t}\r\n\r\n\t\t// Trim domain when too big by zoom mousemove event\r\n\t\tif (withTrim) { $$.x.domain($$.trimXDomain($$.x.orgDomain())); }\r\n\r\n\t\treturn $$.x.domain();\r\n\t},\r\n\r\n\ttrimXDomain(domain) {\r\n\t\tconst zoomDomain = this.getZoomDomain();\r\n\t\tconst min = zoomDomain[0];\r\n\t\tconst max = zoomDomain[1];\r\n\r\n\t\tif (domain[0] <= min) {\r\n\t\t\tdomain[1] = +domain[1] + (min - domain[0]);\r\n\t\t\tdomain[0] = min;\r\n\t\t}\r\n\r\n\t\tif (max <= domain[1]) {\r\n\t\t\tdomain[0] = +domain[0] - (domain[1] - max);\r\n\t\t\tdomain[1] = max;\r\n\t\t}\r\n\r\n\t\treturn domain;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/domain.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {isValue, extend} from \"./util\";\r\n\r\nconst getFormat = ($$, typeValue, v) => {\r\n\tconst config = $$.config;\r\n\tconst type = `axis_${typeValue}_tick_format`;\r\n\tconst format = config[type] ?\r\n\t\tconfig[type] : $$.defaultValueFormat;\r\n\r\n\treturn format(v);\r\n};\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetYFormat(forArc) {\r\n\t\tconst $$ = this;\r\n\t\tlet formatForY = $$.yFormat;\r\n\t\tlet formatForY2 = $$.y2Format;\r\n\r\n\t\tif (forArc && !$$.hasType(\"gauge\")) {\r\n\t\t\tformatForY = $$.defaultArcValueFormat;\r\n\t\t\tformatForY2 = $$.defaultArcValueFormat;\r\n\t\t}\r\n\r\n\t\treturn function(v, ratio, id) {\r\n\t\t\tconst format = $$.axis.getId(id) === \"y2\" ?\r\n\t\t\t\tformatForY2 : formatForY;\r\n\r\n\t\t\treturn format.call($$, v, ratio);\r\n\t\t};\r\n\t},\r\n\r\n\tyFormat(v) {\r\n\t\treturn getFormat(this, \"y\", v);\r\n\t},\r\n\r\n\ty2Format(v) {\r\n\t\treturn getFormat(this, \"y2\", v);\r\n\t},\r\n\r\n\tdefaultValueFormat(v) {\r\n\t\treturn isValue(v) ? +v : \"\";\r\n\t},\r\n\r\n\tdefaultArcValueFormat(v, ratio) {\r\n\t\treturn `${(ratio * 100).toFixed(1)}%`;\r\n\t},\r\n\r\n\tdataLabelFormat(targetId) {\r\n\t\tconst $$ = this;\r\n\t\tconst dataLabels = $$.config.data_labels;\r\n\t\tconst defaultFormat = v => (isValue(v) ? +v : \"\");\r\n\t\tlet format;\r\n\r\n\t\t// find format according to axis id\r\n\t\tif (typeof dataLabels.format === \"function\") {\r\n\t\t\tformat = dataLabels.format;\r\n\t\t} else if (typeof dataLabels.format === \"object\") {\r\n\t\t\tif (dataLabels.format[targetId]) {\r\n\t\t\t\tformat = dataLabels.format[targetId] === true ? defaultFormat : dataLabels.format[targetId];\r\n\t\t\t} else {\r\n\t\t\t\tformat = () => \"\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tformat = defaultFormat;\r\n\t\t}\r\n\r\n\t\treturn format;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/format.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\tselectAll as d3SelectAll\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, isValue} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tinitGrid() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.grid = $$.main.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPathForGrid)\r\n\t\t\t.attr(\"class\", CLASS.grid);\r\n\r\n\t\tif (config.grid_x_show) {\r\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.xgrids);\r\n\t\t}\r\n\r\n\t\tif (config.grid_y_show) {\r\n\t\t\t$$.grid.append(\"g\").attr(\"class\", CLASS.ygrids);\r\n\t\t}\r\n\r\n\t\tif (config.grid_focus_show) {\r\n\t\t\t$$.grid.append(\"g\")\r\n\t\t\t\t.attr(\"class\", CLASS.xgridFocus)\r\n\t\t\t\t.append(\"line\")\r\n\t\t\t\t.attr(\"class\", CLASS.xgridFocus);\r\n\t\t}\r\n\r\n\t\t$$.xgrid = d3SelectAll([]);\r\n\r\n\t\tif (!config.grid_lines_front) {\r\n\t\t\t$$.initGridLines();\r\n\t\t}\r\n\t},\r\n\r\n\tinitGridLines() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.gridLines = $$.main.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPathForGrid)\r\n\t\t\t.attr(\"class\", `${CLASS.grid} ${CLASS.gridLines}`);\r\n\r\n\t\t$$.gridLines.append(\"g\").attr(\"class\", CLASS.xgridLines);\r\n\t\t$$.gridLines.append(\"g\").attr(\"class\", CLASS.ygridLines);\r\n\r\n\t\t$$.xgridLines = d3SelectAll([]);\r\n\t},\r\n\r\n\tupdateXGrid(withoutUpdate) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst xgridData = $$.generateGridData(config.grid_x_type, $$.x);\r\n\t\tconst tickOffset = $$.isCategorized() ? $$.xAxis.tickOffset() : 0;\r\n\r\n\t\t$$.xgridAttr = config.axis_rotated ? {\r\n\t\t\t\"x1\": 0,\r\n\t\t\t\"x2\": $$.width,\r\n\t\t\t\"y1\": d => $$.x(d) - tickOffset,\r\n\t\t\t\"y2\": d => $$.x(d) - tickOffset,\r\n\t\t} : {\r\n\t\t\t\"x1\": d => $$.x(d) + tickOffset,\r\n\t\t\t\"x2\": d => $$.x(d) + tickOffset,\r\n\t\t\t\"y1\": 0,\r\n\t\t\t\"y2\": $$.height,\r\n\t\t};\r\n\r\n\t\t$$.xgrid = $$.main.select(`.${CLASS.xgrids}`)\r\n\t\t\t.selectAll(`.${CLASS.xgrid}`)\r\n\t\t\t.data(xgridData);\r\n\r\n\t\t$$.xgrid.exit().remove();\r\n\r\n\t\t$$.xgrid = $$.xgrid.enter()\r\n\t\t\t.append(\"line\")\r\n\t\t\t.attr(\"class\", CLASS.xgrid)\r\n\t\t\t.merge($$.xgrid);\r\n\r\n\t\tif (!withoutUpdate) {\r\n\t\t\t$$.xgrid.each(function() {\r\n\t\t\t\tconst grid = d3Select(this);\r\n\r\n\t\t\t\tObject.keys($$.xgridAttr).forEach(id => {\r\n\t\t\t\t\tgrid.attr(id, $$.xgridAttr[id])\r\n\t\t\t\t\t\t.style(\"opacity\", () => (\r\n\t\t\t\t\t\t\tgrid.attr(config.axis_rotated ? \"y1\" : \"x1\") === (config.axis_rotated ? $$.height : 0) ?\r\n\t\t\t\t\t\t\t\t\"0\" : \"1\"\r\n\t\t\t\t\t\t));\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\tupdateYGrid() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst gridValues = $$.yAxis.tickValues() || $$.y.ticks(config.grid_y_ticks);\r\n\r\n\t\t$$.ygrid = $$.main.select(`.${CLASS.ygrids}`)\r\n\t\t\t.selectAll(`.${CLASS.ygrid}`)\r\n\t\t\t.data(gridValues);\r\n\r\n\t\t$$.ygrid.exit().remove();\r\n\r\n\t\t$$.ygrid = $$.ygrid\r\n\t\t\t.enter()\r\n\t\t\t.append(\"line\")\r\n\t\t\t.attr(\"class\", CLASS.ygrid)\r\n\t\t\t.merge($$.ygrid);\r\n\r\n\t\t$$.ygrid.attr(\"x1\", config.axis_rotated ? $$.y : 0)\r\n\t\t\t.attr(\"x2\", config.axis_rotated ? $$.y : $$.width)\r\n\t\t\t.attr(\"y1\", config.axis_rotated ? 0 : $$.y)\r\n\t\t\t.attr(\"y2\", config.axis_rotated ? $$.height : $$.y);\r\n\r\n\t\t$$.smoothLines($$.ygrid, \"grid\");\r\n\t},\r\n\r\n\tgridTextAnchor(d) {\r\n\t\treturn d.position ? d.position : \"end\";\r\n\t},\r\n\r\n\tgridTextDx(d) {\r\n\t\treturn d.position === \"start\" ? 4 : d.position === \"middle\" ? 0 : -4;\r\n\t},\r\n\r\n\txGridTextX(d) {\r\n\t\treturn d.position === \"start\" ? -this.height : d.position === \"middle\" ? -this.height / 2 : 0;\r\n\t},\r\n\r\n\tyGridTextX(d) {\r\n\t\treturn d.position === \"start\" ? 0 : d.position === \"middle\" ? this.width / 2 : this.width;\r\n\t},\r\n\r\n\tupdateGrid(duration) {\r\n\t\tconst $$ = this;\r\n\t\tconst main = $$.main;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t// hide if arc type\r\n\t\t$$.grid.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\");\r\n\r\n\t\tmain.select(`line.${CLASS.xgridFocus}`)\r\n\t\t\t.style(\"visibility\", \"hidden\");\r\n\r\n\t\tif (config.grid_x_show) {\r\n\t\t\t$$.updateXGrid();\r\n\t\t}\r\n\r\n\t\t$$.xgridLines = main.select(`.${CLASS.xgridLines}`)\r\n\t\t\t.selectAll(`.${CLASS.xgridLine}`)\r\n\t\t\t.data(config.grid_x_lines);\r\n\r\n\t\t// exit\r\n\t\t$$.xgridLines.exit().transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t// enter\r\n\t\tconst xgridLine = $$.xgridLines.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", d => CLASS.xgridLine + (d.class ? ` ${d.class}` : \"\"));\r\n\r\n\t\txgridLine.append(\"line\")\r\n\t\t\t.style(\"opacity\", \"0\");\r\n\r\n\t\txgridLine.append(\"text\")\r\n\t\t\t.attr(\"text-anchor\", $$.gridTextAnchor)\r\n\t\t\t.attr(\"transform\", config.axis_rotated ? \"\" : \"rotate(-90)\")\r\n\t\t\t.attr(\"dx\", $$.gridTextDx)\r\n\t\t\t.attr(\"dy\", -5)\r\n\t\t\t.style(\"opacity\", \"0\");\r\n\r\n\t\t$$.xgridLines = xgridLine.merge($$.xgridLines);\r\n\r\n\t\t// Y-Grid\r\n\t\tif (config.grid_y_show) {\r\n\t\t\t$$.updateYGrid();\r\n\t\t}\r\n\t\t$$.ygridLines = main.select(`.${CLASS.ygridLines}`)\r\n\t\t\t.selectAll(`.${CLASS.ygridLine}`)\r\n\t\t\t.data(config.grid_y_lines);\r\n\r\n\t\t// exit\r\n\t\t$$.ygridLines.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t// enter\r\n\t\tconst ygridLine = $$.ygridLines.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", d => CLASS.ygridLine + (d.class ? ` ${d.class}` : \"\"));\r\n\r\n\t\tygridLine.append(\"line\")\r\n\t\t\t.style(\"opacity\", \"0\");\r\n\r\n\t\tygridLine.append(\"text\")\r\n\t\t\t.attr(\"text-anchor\", $$.gridTextAnchor)\r\n\t\t\t.attr(\"transform\", config.axis_rotated ? \"rotate(-90)\" : \"\")\r\n\t\t\t.attr(\"dx\", $$.gridTextDx)\r\n\t\t\t.attr(\"dy\", -5)\r\n\t\t\t.style(\"opacity\", \"0\");\r\n\r\n\t\t$$.ygridLines = ygridLine.merge($$.ygridLines);\r\n\r\n\t\t// update\r\n\t\tconst yv = $$.yv.bind($$);\r\n\r\n\t\t$$.ygridLines.select(\"line\")\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.attr(\"x1\", config.axis_rotated ? yv : 0)\r\n\t\t\t.attr(\"x2\", config.axis_rotated ? yv : $$.width)\r\n\t\t\t.attr(\"y1\", config.axis_rotated ? 0 : yv)\r\n\t\t\t.attr(\"y2\", config.axis_rotated ? $$.height : yv)\r\n\t\t\t.transition()\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\r\n\t\t$$.ygridLines.select(\"text\")\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.attr(\"x\", config.axis_rotated ? $$.xGridTextX.bind($$) : $$.yGridTextX.bind($$))\r\n\t\t\t.attr(\"y\", yv)\r\n\t\t\t.text(d => d.text)\r\n\t\t\t.transition()\r\n\t\t\t.style(\"opacity\", \"1\");\r\n\t},\r\n\r\n\tredrawGrid(withTransition) {\r\n\t\tconst $$ = this;\r\n\t\tconst rotated = $$.config.axis_rotated;\r\n\t\tconst xv = $$.xv.bind($$);\r\n\r\n\t\tlet lines = $$.xgridLines.select(\"line\");\r\n\t\tlet texts = $$.xgridLines.select(\"text\");\r\n\r\n\t\tlines = (withTransition ? lines.transition() : lines)\r\n\t\t\t.attr(\"x1\", rotated ? 0 : xv)\r\n\t\t\t.attr(\"x2\", rotated ? $$.width : xv)\r\n\t\t\t.attr(\"y1\", rotated ? xv : 0)\r\n\t\t\t.attr(\"y2\", rotated ? xv : $$.height);\r\n\r\n\t\ttexts = (withTransition ? texts.transition() : texts)\r\n\t\t\t.attr(\"x\", rotated ? $$.yGridTextX.bind($$) : $$.xGridTextX.bind($$))\r\n\t\t\t.attr(\"y\", xv)\r\n\t\t\t.text(d => d.text);\r\n\r\n\t\treturn [\r\n\t\t\t(withTransition ? lines.transition() : lines).style(\"opacity\", \"1\"),\r\n\t\t\t(withTransition ? texts.transition() : texts).style(\"opacity\", \"1\")\r\n\t\t];\r\n\t},\r\n\r\n\tshowXGridFocus(selectedData) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst dataToShow = selectedData.filter(d => d && isValue(d.value));\r\n\t\tconst focusEl = $$.main.selectAll(`line.${CLASS.xgridFocus}`);\r\n\t\tconst xx = $$.xx.bind($$);\r\n\r\n\t\tif (!config.tooltip_show) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Hide when scatter plot exists\r\n\t\tif ($$.hasType(\"scatter\") || $$.hasArcType()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tfocusEl\r\n\t\t\t.style(\"visibility\", \"visible\")\r\n\t\t\t.data([dataToShow[0]])\r\n\t\t\t.attr(config.axis_rotated ? \"y1\" : \"x1\", xx)\r\n\t\t\t.attr(config.axis_rotated ? \"y2\" : \"x2\", xx);\r\n\r\n\t\t$$.smoothLines(focusEl, \"grid\");\r\n\t},\r\n\r\n\thideXGridFocus() {\r\n\t\tthis.main.select(`line.${CLASS.xgridFocus}`).style(\"visibility\", \"hidden\");\r\n\t},\r\n\r\n\tupdateXgridFocus() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.main.select(`line.${CLASS.xgridFocus}`)\r\n\t\t\t.attr(\"x1\", config.axis_rotated ? 0 : -10)\r\n\t\t\t.attr(\"x2\", config.axis_rotated ? $$.width : -10)\r\n\t\t\t.attr(\"y1\", config.axis_rotated ? -10 : 0)\r\n\t\t\t.attr(\"y2\", config.axis_rotated ? -10 : $$.height);\r\n\t},\r\n\r\n\tgenerateGridData(type, scale) {\r\n\t\tconst $$ = this;\r\n\t\tconst tickNum = $$.main.select(`.${CLASS.axisX}`)\r\n\t\t\t.selectAll(\".tick\")\r\n\t\t\t.size();\r\n\t\tlet gridData = [];\r\n\r\n\t\tif (type === \"year\") {\r\n\t\t\tconst xDomain = $$.getXDomain();\r\n\t\t\tconst firstYear = xDomain[0].getFullYear();\r\n\t\t\tconst lastYear = xDomain[1].getFullYear();\r\n\r\n\t\t\tfor (let i = firstYear; i <= lastYear; i++) {\r\n\t\t\t\tgridData.push(new Date(`${i}-01-01 00:00:00`));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tgridData = scale.ticks(10);\r\n\t\t\tif (gridData.length > tickNum) { // use only int\r\n\t\t\t\tgridData = gridData.filter(d => String(d).indexOf(\".\") < 0);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn gridData;\r\n\t},\r\n\r\n\tgetGridFilterToRemove(params) {\r\n\t\treturn params ? function(line) {\r\n\t\t\tlet found = false;\r\n\r\n\t\t\t[].concat(params).forEach(param => {\r\n\t\t\t\tif (((\"value\" in param && line.value === param.value) || (\"class\" in param && line.class === param.class))) {\r\n\t\t\t\t\tfound = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn found;\r\n\t\t} : function() { return true; };\r\n\t},\r\n\r\n\tremoveGridLines(params, forX) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst toRemove = $$.getGridFilterToRemove(params);\r\n\t\tconst toShow = function(line) {\r\n\t\t\treturn !toRemove(line);\r\n\t\t};\r\n\t\tconst classLines = forX ? CLASS.xgridLines : CLASS.ygridLines;\r\n\t\tconst classLine = forX ? CLASS.xgridLine : CLASS.ygridLine;\r\n\r\n\t\t$$.main.select(`.${classLines}`)\r\n\t\t\t.selectAll(`.${classLine}`)\r\n\t\t\t.filter(toRemove)\r\n\t\t\t.transition()\r\n\t\t\t.duration(config.transition_duration)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\tif (forX) {\r\n\t\t\tconfig.grid_x_lines = config.grid_x_lines.filter(toShow);\r\n\t\t} else {\r\n\t\t\tconfig.grid_y_lines = config.grid_y_lines.filter(toShow);\r\n\t\t}\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/grid.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\tevent as d3Event\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, isDefined, getOption, isEmpty} from \"./util\";\r\n\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initialize the legend.\r\n\t * @private\r\n\t */\r\n\tinitLegend() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.legendItemTextBox = {};\r\n\t\t$$.legendHasRendered = false;\r\n\t\t$$.legend = $$.svg.append(\"g\").attr(\"transform\", $$.getTranslate(\"legend\"));\r\n\t\tif (!$$.config.legend_show) {\r\n\t\t\t$$.legend.style(\"visibility\", \"hidden\");\r\n\t\t\t$$.hiddenLegendIds = $$.mapToIds($$.data.targets);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// MEMO: call here to update legend box and tranlate for all\r\n\t\t// MEMO: translate will be upated by this, so transform not needed in updateLegend()\r\n\t\t$$.updateLegendWithDefaults();\r\n\t},\r\n\r\n\t/**\r\n\t * Update the legend to its default value.\r\n\t * @private\r\n\t */\r\n\tupdateLegendWithDefaults() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.updateLegend($$.mapToIds($$.data.targets), {\r\n\t\t\twithTransform: false,\r\n\t\t\twithTransitionForTransform: false,\r\n\t\t\twithTransition: false\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Update the size of the legend.\r\n\t * @private\r\n\t * @param {Number} height\r\n\t * @param {Number} width\r\n\t */\r\n\tupdateSizeForLegend(legendHeight, legendWidth) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tconst insetLegendPosition = {\r\n\t\t\ttop: $$.isLegendTop ?\r\n\t\t\t\t$$.getCurrentPaddingTop() + config.legend_inset_y + 5.5 :\r\n\t\t\t\t$$.currentHeight - legendHeight - $$.getCurrentPaddingBottom() - config.legend_inset_y,\r\n\t\t\tleft: $$.isLegendLeft ?\r\n\t\t\t\t$$.getCurrentPaddingLeft() + config.legend_inset_x + 0.5 :\r\n\t\t\t\t$$.currentWidth - legendWidth - $$.getCurrentPaddingRight() - config.legend_inset_x + 0.5\r\n\t\t};\r\n\r\n\t\t$$.margin3 = {\r\n\t\t\ttop: $$.isLegendRight ?\r\n\t\t\t\t0 : $$.isLegendInset ? insetLegendPosition.top : $$.currentHeight - legendHeight,\r\n\t\t\tright: NaN,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: $$.isLegendRight ?\r\n\t\t\t\t$$.currentWidth - legendWidth : $$.isLegendInset ? insetLegendPosition.left : 0\r\n\t\t};\r\n\t},\r\n\t/**\r\n\t * Transform Legend\r\n\t * @private\r\n\t * @param {Boolean} whether or not to transition.\r\n\t */\r\n\ttransformLegend(withTransition) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t(withTransition ? $$.legend.transition() : $$.legend)\r\n\t\t\t.attr(\"transform\", $$.getTranslate(\"legend\"));\r\n\t},\r\n\r\n\t/**\r\n\t * Update the legend step\r\n\t * @private\r\n\t * @param {Number} step\r\n\t */\r\n\tupdateLegendStep(step) {\r\n\t\tthis.legendStep = step;\r\n\t},\r\n\r\n\t/**\r\n\t * Update legend item width\r\n\t * @private\r\n\t * @param {Number} width\r\n\t */\r\n\tupdateLegendItemWidth(w) {\r\n\t\tthis.legendItemWidth = w;\r\n\t},\r\n\r\n\t/**\r\n\t * Update legend item height\r\n\t * @private\r\n\t * @param {Number} height\r\n\t */\r\n\tupdateLegendItemHeight(h) {\r\n\t\tthis.legendItemHeight = h;\r\n\t},\r\n\r\n\t/**\r\n\t * Get the width of the legend\r\n\t * @private\r\n\t * @param {Number} width\r\n\t */\r\n\tgetLegendWidth() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.config.legend_show ?\r\n\t\t\t$$.isLegendRight ||\r\n\t\t\t$$.isLegendInset ? $$.legendItemWidth * ($$.legendStep + 1) : $$.currentWidth : 0;\r\n\t},\r\n\t/**\r\n\t * Get the height of the legend\r\n\t * @private\r\n\t * @param {Number} height\r\n\t */\r\n\tgetLegendHeight() {\r\n\t\tconst $$ = this;\r\n\t\tlet h = 0;\r\n\r\n\t\tif ($$.config.legend_show) {\r\n\t\t\tif ($$.isLegendRight) {\r\n\t\t\t\th = $$.currentHeight;\r\n\t\t\t} else {\r\n\t\t\t\th = Math.max(20, $$.legendItemHeight) * ($$.legendStep + 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn h;\r\n\t},\r\n\t/**\r\n\t * Get the opacity of the legend\r\n\t * @private\r\n\t * @param {Object} d3.Select\r\n\t * @returns {Number} opacity\r\n\t */\r\n\topacityForLegend(legendItem) {\r\n\t\treturn legendItem.classed(CLASS.legendItemHidden) ? null : \"1\";\r\n\t},\r\n\r\n\t/**\r\n\t * Get the opacity of the legend that is unfocused\r\n\t * @private\r\n\t * @param {Object} legendItem, d3.Select\r\n\t * @returns {Number} opacity\r\n\t */\r\n\topacityForUnfocusedLegend(legendItem) {\r\n\t\treturn legendItem.classed(CLASS.legendItemHidden) ? null : \"0.3\";\r\n\t},\r\n\t/**\r\n\t * Toggles the focus of the legend\r\n\t * @private\r\n\t * @param {Array} ID's of target\r\n\t * @param {Boolean} whether or not to focus.\r\n\t */\r\n\ttoggleFocusLegend(targetIds, focus) {\r\n\t\tconst $$ = this;\r\n\t\tconst targetIdz = $$.mapToTargetIds(targetIds);\r\n\r\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\r\n\t\t\t.filter(id => targetIdz.indexOf(id) >= 0)\r\n\t\t\t.classed(CLASS.legendItemFocused, focus)\r\n\t\t\t.transition()\r\n\t\t\t.duration(100)\r\n\t\t\t.style(\"opacity\", function() {\r\n\t\t\t\tconst opacity = focus ? $$.opacityForLegend : $$.opacityForUnfocusedLegend;\r\n\r\n\t\t\t\treturn opacity.call($$, d3Select(this));\r\n\t\t\t});\r\n\t},\r\n\t/**\r\n\t * Revert the legend to its default state\r\n\t * @private\r\n\t */\r\n\trevertLegend() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\r\n\t\t\t.classed(CLASS.legendItemFocused, false)\r\n\t\t\t.transition()\r\n\t\t\t.duration(100)\r\n\t\t\t.style(\"opacity\", function() {\r\n\t\t\t\treturn $$.opacityForLegend(d3Select(this));\r\n\t\t\t});\r\n\t},\r\n\t/**\r\n\t * Shows the legend\r\n\t * @private\r\n\t * @param {Array} ID's of target\r\n\t */\r\n\tshowLegend(targetIds) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (!config.legend_show) {\r\n\t\t\tconfig.legend_show = true;\r\n\t\t\t$$.legend.style(\"visibility\", \"visible\");\r\n\t\t\tif (!$$.legendHasRendered) {\r\n\t\t\t\t$$.updateLegendWithDefaults();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$$.removeHiddenLegendIds(targetIds);\r\n\r\n\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\r\n\t\t\t.style(\"visibility\", \"visible\")\r\n\t\t\t.transition()\r\n\t\t\t.style(\"opacity\", function() {\r\n\t\t\t\treturn $$.opacityForLegend(d3Select(this));\r\n\t\t\t});\r\n\t},\r\n\t/**\r\n\t * Hide the legend\r\n\t * @private\r\n\t * @param {Array} ID's of target\r\n\t */\r\n\thideLegend(targetIds) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\tif (config.legend_show && isEmpty(targetIds)) {\r\n\t\t\tconfig.legend_show = false;\r\n\t\t\t$$.legend.style(\"visibility\", \"hidden\");\r\n\t\t}\r\n\t\t$$.addHiddenLegendIds(targetIds);\r\n\t\t$$.legend.selectAll($$.selectorLegends(targetIds))\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.style(\"visibility\", \"hidden\");\r\n\t},\r\n\t/**\r\n\t * Clear the LegendItemTextBox cache.\r\n\t * @private\r\n\t */\r\n\tclearLegendItemTextBoxCache() {\r\n\t\tthis.legendItemTextBox = {};\r\n\t},\r\n\t/**\r\n\t * Update the legend\r\n\t * @private\r\n\t * @param {Array} ID's of target\r\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.\r\n\t * @param {Object} the return value of the generateTransitions\r\n\t */\r\n\tupdateLegend(targetIds, options, transitions) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst paddingTop = 4;\r\n\t\tconst paddingRight = 10;\r\n\t\tconst posMin = 10;\r\n\t\tconst tileWidth = config.legend_item_tile_width + 5;\r\n\t\tconst isTouch = ($$.inputType === \"touch\");\r\n\t\tlet maxWidth = 0;\r\n\t\tlet maxHeight = 0;\r\n\t\tlet xForLegend;\r\n\t\tlet yForLegend;\r\n\t\tlet totalLength = 0;\r\n\t\tconst offsets = {};\r\n\t\tconst widths = {};\r\n\t\tconst heights = {};\r\n\t\tconst margins = [0];\r\n\t\tconst steps = {};\r\n\t\tlet step = 0;\r\n\t\tlet background;\r\n\t\t// Skip elements when their name is set to null\r\n\t\tconst targetIdz = targetIds\r\n\t\t\t.filter(id => !isDefined(config.data_names[id]) || config.data_names[id] !== null);\r\n\t\tconst optionz = options || {};\r\n\t\tconst withTransition = getOption(optionz, \"withTransition\", true);\r\n\t\tconst withTransitionForTransform = getOption(optionz, \"withTransitionForTransform\", true);\r\n\t\tconst getTextBox = function(textElement, id) {\r\n\t\t\tif (!$$.legendItemTextBox[id]) {\r\n\t\t\t\t$$.legendItemTextBox[id] =\r\n\t\t\t\t\t$$.getTextRect(textElement.textContent, CLASS.legendItem, textElement);\r\n\t\t\t}\r\n\t\t\treturn $$.legendItemTextBox[id];\r\n\t\t};\r\n\t\tconst updatePositions = function(textElement, id, index) {\r\n\t\t\tconst reset = index === 0;\r\n\t\t\tconst isLast = index === targetIdz.length - 1;\r\n\t\t\tconst box = getTextBox(textElement, id);\r\n\t\t\tconst itemWidth = box.width + tileWidth +\r\n\t\t\t\t(isLast && !($$.isLegendRight || $$.isLegendInset) ? 0 : paddingRight) + config.legend_padding;\r\n\t\t\tconst itemHeight = box.height + paddingTop;\r\n\t\t\tconst itemLength = $$.isLegendRight ||\r\n\t\t\t\t$$.isLegendInset ? itemHeight : itemWidth;\r\n\t\t\tconst areaLength = $$.isLegendRight ||\r\n\t\t\t\t$$.isLegendInset ? $$.getLegendHeight() : $$.getLegendWidth();\r\n\t\t\tlet margin;\r\n\r\n\t\t\t// MEMO: care about condifion of step, totalLength\r\n\t\t\tconst updateValues = function(id2, withoutStep) {\r\n\t\t\t\tif (!withoutStep) {\r\n\t\t\t\t\tmargin = (areaLength - totalLength - itemLength) / 2;\r\n\t\t\t\t\tif (margin < posMin) {\r\n\t\t\t\t\t\tmargin = (areaLength - itemLength) / 2;\r\n\t\t\t\t\t\ttotalLength = 0;\r\n\t\t\t\t\t\tstep++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsteps[id2] = step;\r\n\t\t\t\tmargins[step] = $$.isLegendInset ? 10 : margin;\r\n\t\t\t\toffsets[id2] = totalLength;\r\n\t\t\t\ttotalLength += itemLength;\r\n\t\t\t};\r\n\r\n\t\t\tif (reset) {\r\n\t\t\t\ttotalLength = 0;\r\n\t\t\t\tstep = 0;\r\n\t\t\t\tmaxWidth = 0;\r\n\t\t\t\tmaxHeight = 0;\r\n\t\t\t}\r\n\r\n\t\t\tif (config.legend_show && !$$.isLegendToShow(id)) {\r\n\t\t\t\twidths[id] = 0;\r\n\t\t\t\theights[id] = 0;\r\n\t\t\t\tsteps[id] = 0;\r\n\t\t\t\toffsets[id] = 0;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\twidths[id] = itemWidth;\r\n\t\t\theights[id] = itemHeight;\r\n\r\n\t\t\tif (!maxWidth || itemWidth >= maxWidth) {\r\n\t\t\t\tmaxWidth = itemWidth;\r\n\t\t\t}\r\n\r\n\t\t\tif (!maxHeight || itemHeight >= maxHeight) {\r\n\t\t\t\tmaxHeight = itemHeight;\r\n\t\t\t}\r\n\r\n\t\t\tconst maxLength = $$.isLegendRight || $$.isLegendInset ? maxHeight : maxWidth;\r\n\r\n\t\t\tif (config.legend_equally) {\r\n\t\t\t\tObject.keys(widths).forEach(id2 => (widths[id2] = maxWidth));\r\n\t\t\t\tObject.keys(heights).forEach(id2 => (heights[id2] = maxHeight));\r\n\t\t\t\tmargin = (areaLength - maxLength * targetIdz.length) / 2;\r\n\t\t\t\tif (margin < posMin) {\r\n\t\t\t\t\ttotalLength = 0;\r\n\t\t\t\t\tstep = 0;\r\n\t\t\t\t\ttargetIdz.forEach(id2 => updateValues(id2));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tupdateValues(id, true);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tupdateValues(id);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tif ($$.isLegendInset) {\r\n\t\t\tstep = config.legend_inset_step ? config.legend_inset_step : targetIdz.length;\r\n\t\t\t$$.updateLegendStep(step);\r\n\t\t}\r\n\r\n\t\tif ($$.isLegendRight) {\r\n\t\t\txForLegend = id => maxWidth * steps[id];\r\n\t\t\tyForLegend = id => margins[steps[id]] + offsets[id];\r\n\t\t} else if ($$.isLegendInset) {\r\n\t\t\txForLegend = id => maxWidth * steps[id] + 10;\r\n\t\t\tyForLegend = id => margins[steps[id]] + offsets[id];\r\n\t\t} else {\r\n\t\t\txForLegend = id => margins[steps[id]] + offsets[id];\r\n\t\t\tyForLegend = id => maxHeight * steps[id];\r\n\t\t}\r\n\r\n\t\tconst xForLegendText = (id, i) => xForLegend(id, i) + 4 + config.legend_item_tile_width;\r\n\t\tconst yForLegendText = (id, i) => yForLegend(id, i) + 9;\r\n\t\tconst xForLegendRect = (id, i) => xForLegend(id, i);\r\n\t\tconst yForLegendRect = (id, i) => yForLegend(id, i) - 5;\r\n\t\tconst x1ForLegendTile = (id, i) => xForLegend(id, i) - 2;\r\n\t\tconst x2ForLegendTile = (id, i) => xForLegend(id, i) - 2 + config.legend_item_tile_width;\r\n\t\tconst yForLegendTile = (id, i) => yForLegend(id, i) + 4;\r\n\r\n\t\t// Define g for legend area\r\n\t\tconst l = $$.legend.selectAll(`.${CLASS.legendItem}`)\r\n\t\t\t.data(targetIdz)\r\n\t\t\t.enter()\r\n\t\t\t.append(\"g\")\r\n\t\t\t.attr(\"class\", id => $$.generateClass(CLASS.legendItem, id))\r\n\t\t\t.style(\"visibility\", id => ($$.isLegendToShow(id) ? \"visible\" : \"hidden\"))\r\n\t\t\t.style(\"cursor\", \"pointer\")\r\n\t\t\t.on(isTouch ? \"touchstart\" : \"click\", id => {\r\n\t\t\t\tif (config.legend_item_onclick) {\r\n\t\t\t\t\tconfig.legend_item_onclick.call($$, id);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (d3Event.altKey) {\r\n\t\t\t\t\t\t$$.api.hide();\r\n\t\t\t\t\t\t$$.api.show(id);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$$.api.toggle(id);\r\n\t\t\t\t\t\t$$.isTargetToShow(id) ? $$.api.focus(id) : $$.api.revert();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tisTouch && $$.hideTooltip();\r\n\t\t\t})\r\n\t\t\t.on(isTouch ? undefined : \"mouseover\", function(id) {\r\n\t\t\t\tif (config.legend_item_onover) {\r\n\t\t\t\t\tconfig.legend_item_onover.call($$, id);\r\n\t\t\t\t} else {\r\n\t\t\t\t\td3Select(this).classed(CLASS.legendItemFocused, true);\r\n\t\t\t\t\tif (!$$.transiting && $$.isTargetToShow(id)) {\r\n\t\t\t\t\t\t$$.api.focus(id);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\t\t.on(isTouch ? \"touchend\" : \"mouseout\", function(id) {\r\n\t\t\t\tif (config.legend_item_onout) {\r\n\t\t\t\t\tconfig.legend_item_onout.call($$, id);\r\n\t\t\t\t} else {\r\n\t\t\t\t\td3Select(this).classed(CLASS.legendItemFocused, false);\r\n\t\t\t\t\t$$.api.revert();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\tl.append(\"text\")\r\n\t\t\t.text(id => (isDefined(config.data_names[id]) ? config.data_names[id] : id))\r\n\t\t\t.each(function(id, i) {\r\n\t\t\t\tupdatePositions(this, id, i);\r\n\t\t\t})\r\n\t\t\t.style(\"pointer-events\", \"none\")\r\n\t\t\t.attr(\"x\", $$.isLegendRight || $$.isLegendInset ? xForLegendText : -200)\r\n\t\t\t.attr(\"y\", $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendText);\r\n\r\n\t\tl.append(\"rect\")\r\n\t\t\t.attr(\"class\", CLASS.legendItemEvent)\r\n\t\t\t.style(\"fill-opacity\", \"0\")\r\n\t\t\t.attr(\"x\", $$.isLegendRight || $$.isLegendInset ? xForLegendRect : -200)\r\n\t\t\t.attr(\"y\", $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendRect);\r\n\r\n\t\tl.append(\"line\")\r\n\t\t\t.attr(\"class\", CLASS.legendItemTile)\r\n\t\t\t.style(\"stroke\", $$.color)\r\n\t\t\t.style(\"pointer-events\", \"none\")\r\n\t\t\t.attr(\"x1\", $$.isLegendRight || $$.isLegendInset ? x1ForLegendTile : -200)\r\n\t\t\t.attr(\"y1\", $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile)\r\n\t\t\t.attr(\"x2\", $$.isLegendRight || $$.isLegendInset ? x2ForLegendTile : -200)\r\n\t\t\t.attr(\"y2\", $$.isLegendRight || $$.isLegendInset ? -200 : yForLegendTile)\r\n\t\t\t.attr(\"stroke-width\", config.legend_item_tile_height);\r\n\r\n\t\t// Set background for inset legend\r\n\t\tbackground = $$.legend.select(`.${CLASS.legendBackground} rect`);\r\n\r\n\t\tif ($$.isLegendInset && maxWidth > 0 && background.size() === 0) {\r\n\t\t\tbackground = $$.legend.insert(\"g\", `.${CLASS.legendItem}`)\r\n\t\t\t\t.attr(\"class\", CLASS.legendBackground)\r\n\t\t\t\t.append(\"rect\");\r\n\t\t}\r\n\r\n\t\tconst texts = $$.legend.selectAll(\"text\")\r\n\t\t\t.data(targetIdz)\r\n\t\t\t.text(id => (isDefined(config.data_names[id]) ? config.data_names[id] : id)) // MEMO: needed for update\r\n\t\t\t.each(function(id, i) {\r\n\t\t\t\tupdatePositions(this, id, i);\r\n\t\t\t});\r\n\r\n\t\t(withTransition ? texts.transition() : texts)\r\n\t\t\t.attr(\"x\", xForLegendText)\r\n\t\t\t.attr(\"y\", yForLegendText);\r\n\r\n\t\tconst rects = $$.legend.selectAll(`rect.${CLASS.legendItemEvent}`)\r\n\t\t\t.data(targetIdz);\r\n\r\n\t\t(withTransition ? rects.transition() : rects)\r\n\t\t\t.attr(\"width\", id => widths[id])\r\n\t\t\t.attr(\"height\", id => heights[id])\r\n\t\t\t.attr(\"x\", xForLegendRect)\r\n\t\t\t.attr(\"y\", yForLegendRect);\r\n\r\n\t\tconst tiles = $$.legend.selectAll(`line.${CLASS.legendItemTile}`)\r\n\t\t\t.data(targetIdz);\r\n\r\n\t\t(withTransition ? tiles.transition() : tiles)\r\n\t\t\t.style(\"stroke\", $$.color)\r\n\t\t\t.attr(\"x1\", x1ForLegendTile)\r\n\t\t\t.attr(\"y1\", yForLegendTile)\r\n\t\t\t.attr(\"x2\", x2ForLegendTile)\r\n\t\t\t.attr(\"y2\", yForLegendTile);\r\n\r\n\t\tif (background) {\r\n\t\t\t(withTransition ? background.transition() : background)\r\n\t\t\t\t.attr(\"height\", $$.getLegendHeight() - 12)\r\n\t\t\t\t.attr(\"width\", maxWidth * (step + 1) + 10);\r\n\t\t}\r\n\r\n\t\t// toggle legend state\r\n\t\t$$.legend.selectAll(`.${CLASS.legendItem}`)\r\n\t\t\t.classed(CLASS.legendItemHidden, id => !$$.isTargetToShow(id));\r\n\r\n\t\t// Update all to reflect change of legend\r\n\t\t$$.updateLegendItemWidth(maxWidth);\r\n\t\t$$.updateLegendItemHeight(maxHeight);\r\n\t\t$$.updateLegendStep(step);\r\n\t\t// Update size and scale\r\n\t\t$$.updateSizes();\r\n\t\t$$.updateScales();\r\n\t\t$$.updateSvgSize();\r\n\t\t// Update g positions\r\n\t\t$$.transformAll(withTransitionForTransform, transitions);\r\n\t\t$$.legendHasRendered = true;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/legend.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {select as d3Select} from \"d3\"; // selection\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {isValue, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tinitRegion() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.region = $$.main.append(\"g\")\r\n\t\t\t.attr(\"clip-path\", $$.clipPath)\r\n\t\t\t.attr(\"class\", CLASS.regions);\r\n\t},\r\n\r\n\tupdateRegion(duration) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t// hide if arc type\r\n\t\t$$.region.style(\"visibility\", $$.hasArcType() ? \"hidden\" : \"visible\");\r\n\r\n\t\t// select element\r\n\t\t$$.mainRegion = $$.main.select(`.${CLASS.regions}`)\r\n\t\t\t.selectAll(`.${CLASS.region}`)\r\n\t\t\t.data(config.regions);\r\n\r\n\t\t$$.mainRegion.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(duration)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.mainRegion = $$.mainRegion.enter()\r\n\t\t\t.append(\"g\")\r\n\t\t\t.merge($$.mainRegion)\r\n\t\t\t.attr(\"class\", $$.classRegion.bind($$));\r\n\r\n\t\t$$.mainRegion\r\n\t\t\t.append(\"rect\")\r\n\t\t\t.style(\"fill-opacity\", \"0\");\r\n\t},\r\n\r\n\tredrawRegion(withTransition) {\r\n\t\tconst $$ = this;\r\n\t\tconst x = $$.regionX.bind($$);\r\n\t\tconst y = $$.regionY.bind($$);\r\n\t\tconst w = $$.regionWidth.bind($$);\r\n\t\tconst h = $$.regionHeight.bind($$);\r\n\r\n\t\tlet regions = $$.mainRegion.select(\"rect\");\r\n\r\n\t\tregions = (withTransition ? regions.transition() : regions)\r\n\t\t\t.attr(\"x\", x)\r\n\t\t\t.attr(\"y\", y)\r\n\t\t\t.attr(\"width\", w)\r\n\t\t\t.attr(\"height\", h);\r\n\r\n\t\treturn [\r\n\t\t\t(withTransition ? regions.transition() : regions)\r\n\t\t\t\t.style(\"fill-opacity\", d => (isValue(d.opacity) ? d.opacity : \"0.1\"))\r\n\t\t\t\t.on(\"end\", function() {\r\n\t\t\t\t\t// remove unnecessary rect after transition\r\n\t\t\t\t\td3Select(this.parentNode)\r\n\t\t\t\t\t\t.selectAll(\"rect:not([x])\")\r\n\t\t\t\t\t\t.remove();\r\n\t\t\t\t})\r\n\t\t];\r\n\t},\r\n\r\n\tregionX(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\r\n\t\tlet xPos;\r\n\r\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\r\n\t\t\txPos = config.axis_rotated ? (\r\n\t\t\t\t\"start\" in d ? yScale(d.start) : 0\r\n\t\t\t) : 0;\r\n\t\t} else {\r\n\t\t\txPos = config.axis_rotated ? 0 : (\r\n\t\t\t\t\"start\" in d ? $$.x(\r\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.start) : d.start\r\n\t\t\t\t) : 0\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn xPos;\r\n\t},\r\n\r\n\tregionY(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\r\n\t\tlet yPos;\r\n\r\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\r\n\t\t\tyPos = config.axis_rotated ? 0 : (\r\n\t\t\t\t\"end\" in d ? yScale(d.end) : 0\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tyPos = config.axis_rotated ? (\r\n\t\t\t\t\"start\" in d ? $$.x(\r\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.start) : d.start\r\n\t\t\t\t) : 0\r\n\t\t\t) : 0;\r\n\t\t}\r\n\r\n\t\treturn yPos;\r\n\t},\r\n\r\n\tregionWidth(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\r\n\t\tconst start = $$.regionX(d);\r\n\t\tlet end;\r\n\r\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\r\n\t\t\tend = config.axis_rotated ? (\r\n\t\t\t\t\"end\" in d ? yScale(d.end) : $$.width\r\n\t\t\t) : $$.width;\r\n\t\t} else {\r\n\t\t\tend = config.axis_rotated ?\r\n\t\t\t\t$$.width : \"end\" in d ? $$.x(\r\n\t\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.end) : d.end\r\n\t\t\t\t\t) : $$.width;\r\n\t\t}\r\n\r\n\t\treturn end < start ? 0 : end - start;\r\n\t},\r\n\r\n\tregionHeight(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst start = this.regionY(d);\r\n\t\tlet end;\r\n\t\tconst yScale = d.axis === \"y\" ? $$.y : $$.y2;\r\n\r\n\t\tif (d.axis === \"y\" || d.axis === \"y2\") {\r\n\t\t\tend = config.axis_rotated ?\r\n\t\t\t\t$$.height : (\r\n\t\t\t\t\t\"start\" in d ? yScale(d.start) : $$.height\r\n\t\t\t\t);\r\n\t\t} else {\r\n\t\t\tend = config.axis_rotated ? (\r\n\t\t\t\t\"end\" in d ? $$.x(\r\n\t\t\t\t\t$$.isTimeSeries() ? $$.parseDate(d.end) : d.end\r\n\t\t\t\t) : $$.height\r\n\t\t\t) : $$.height;\r\n\t\t}\r\n\r\n\t\treturn end < start ? 0 : end - start;\r\n\t},\r\n\r\n\tisRegionOnX(d) {\r\n\t\treturn !d.axis || d.axis === \"x\";\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/region.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tscaleTime as d3ScaleTime,\r\n\tscaleLinear as d3ScaleLinear\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetScale(min, max, forTimeseries) {\r\n\t\treturn (forTimeseries ?\r\n\t\t\t\td3ScaleTime() : d3ScaleLinear()\r\n\t\t\t).range([min, max]);\r\n\t},\r\n\r\n\tgetX(min, max, domain, offsetValue) {\r\n\t\tconst $$ = this;\r\n\t\tlet scale = $$.getScale(min, max, $$.isTimeSeries());\r\n\t\tconst _scale = domain ? scale.domain(domain) : scale;\r\n\t\tlet key;\r\n\t\tlet offset;\r\n\r\n\t\t// Define customized scale if categorized axis\r\n\t\tif ($$.isCategorized()) {\r\n\t\t\toffset = offsetValue || function() { return 0; };\r\n\t\t\tscale = function(d, raw) {\r\n\t\t\t\tconst v = _scale(d) + offset(d);\r\n\r\n\t\t\t\treturn raw ? v : Math.ceil(v);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tscale = function(d, raw) {\r\n\t\t\t\tconst v = _scale(d);\r\n\r\n\t\t\t\treturn raw ? v : Math.ceil(v);\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t// define functions\r\n\t\tfor (key in _scale) {\r\n\t\t\tscale[key] = _scale[key];\r\n\t\t}\r\n\r\n\t\tscale.orgDomain = function() {\r\n\t\t\treturn _scale.domain();\r\n\t\t};\r\n\r\n\t\t// define custom domain() for categorized axis\r\n\t\tif ($$.isCategorized()) {\r\n\t\t\tscale.domain = function(domainValue) {\r\n\t\t\t\tlet domain = domainValue;\r\n\r\n\t\t\t\tif (!arguments.length) {\r\n\t\t\t\t\tdomain = this.orgDomain();\r\n\t\t\t\t\treturn [domain[0], domain[1] + 1];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t_scale.domain(domain);\r\n\r\n\t\t\t\treturn scale;\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\treturn scale;\r\n\t},\r\n\r\n\tgetY(min, max, domain) {\r\n\t\tconst scale = this.getScale(min, max, this.isTimeSeriesY());\r\n\r\n\t\tif (domain) {\r\n\t\t\tscale.domain(domain);\r\n\t\t}\r\n\r\n\t\treturn scale;\r\n\t},\r\n\r\n\tgetYScale(id) {\r\n\t\treturn this.axis.getId(id) === \"y2\" ? this.y2 : this.y;\r\n\t},\r\n\r\n\tgetSubYScale(id) {\r\n\t\treturn this.axis.getId(id) === \"y2\" ? this.subY2 : this.subY;\r\n\t},\r\n\r\n\t/**\r\n\t * Update scale\r\n\t * @private\r\n\t * @param {Boolean} withoutTransitionAtInit - param is given at the init rendering\r\n\t */\r\n\tupdateScales(withoutTransitionAtInit) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst forInit = !$$.x;\r\n\r\n\t\t// update edges\r\n\t\t$$.xMin = config.axis_rotated ? 1 : 0;\r\n\t\t$$.xMax = config.axis_rotated ? $$.height : $$.width;\r\n\t\t$$.yMin = config.axis_rotated ? 0 : $$.height;\r\n\t\t$$.yMax = config.axis_rotated ? $$.width : 1;\r\n\t\t$$.subXMin = $$.xMin;\r\n\t\t$$.subXMax = $$.xMax;\r\n\t\t$$.subYMin = config.axis_rotated ? 0 : $$.height2;\r\n\t\t$$.subYMax = config.axis_rotated ? $$.width2 : 1;\r\n\r\n\t\t// update scales\r\n\t\t$$.x = $$.getX($$.xMin, $$.xMax,\r\n\t\t\tforInit ? undefined : $$.x.orgDomain(), () => $$.xAxis.tickOffset());\r\n\r\n\t\t$$.y = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y_default : $$.y.domain());\r\n\t\t$$.y2 = $$.getY($$.yMin, $$.yMax, forInit ? config.axis_y2_default : $$.y2.domain());\r\n\t\t$$.subX = $$.getX($$.xMin, $$.xMax, $$.orgXDomain, d => (d % 1 ? 0 : $$.subXAxis.tickOffset()));\r\n\t\t$$.subY = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y_default : $$.subY.domain());\r\n\t\t$$.subY2 = $$.getY($$.subYMin, $$.subYMax, forInit ? config.axis_y2_default : $$.subY2.domain());\r\n\r\n\t\t// update axes\r\n\t\t$$.xAxisTickFormat = $$.axis.getXAxisTickFormat();\r\n\t\t$$.xAxisTickValues = $$.axis.getXAxisTickValues();\r\n\t\t$$.yAxisTickValues = $$.axis.getYAxisTickValues();\r\n\t\t$$.y2AxisTickValues = $$.axis.getY2AxisTickValues();\r\n\r\n\t\t$$.xAxis = $$.axis\r\n\t\t\t.getXAxis($$.x, $$.xOrient, $$.xAxisTickFormat,\r\n\t\t\t\t$$.xAxisTickValues, config.axis_x_tick_outer, withoutTransitionAtInit);\r\n\r\n\t\t$$.subXAxis = $$.axis\r\n\t\t\t.getXAxis($$.subX, $$.subXOrient, $$.xAxisTickFormat,\r\n\t\t\t\t$$.xAxisTickValues, config.axis_x_tick_outer);\r\n\r\n\t\t$$.yAxis = $$.axis\r\n\t\t\t.getYAxis($$.y, $$.yOrient, config.axis_y_tick_format,\r\n\t\t\t\t$$.yAxisTickValues, config.axis_y_tick_outer);\r\n\r\n\t\t$$.y2Axis = $$.axis\r\n\t\t\t.getYAxis($$.y2, $$.y2Orient, config.axis_y2_tick_format,\r\n\t\t\t\t$$.y2AxisTickValues, config.axis_y2_tick_outer);\r\n\r\n\t\t// update for arc\r\n\t\tif ($$.updateArc) { $$.updateArc(); }\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/scale.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\trgb as d3Rgb\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Select a point\r\n\t * @private\r\n\t * @param {Object} target point\r\n\t * @param {Object} data\r\n\t * @param {Number} index\r\n\t */\r\n\tselectPoint(target, d, i) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst cx = (config.axis_rotated ? $$.circleY : $$.circleX).bind($$);\r\n\t\tconst cy = (config.axis_rotated ? $$.circleX : $$.circleY).bind($$);\r\n\t\tconst r = $$.pointSelectR.bind($$);\r\n\r\n\t\tconfig.data_onselected\r\n\t\t\t.call($$.api, d, target.node());\r\n\r\n\t\t// add selected-circle on low layer g\r\n\t\t$$.main.select(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(d.id)}`).selectAll(`.${CLASS.selectedCircle}-${i}`)\r\n\t\t\t.data([d])\r\n\t\t\t.enter()\r\n\t\t\t.append(\"circle\")\r\n\t\t\t.attr(\"class\", () => $$.generateClass(CLASS.selectedCircle, i))\r\n\t\t\t.attr(\"cx\", cx)\r\n\t\t\t.attr(\"cy\", cy)\r\n\t\t\t.attr(\"stroke\", () => $$.color(d))\r\n\t\t\t.attr(\"r\", d2 => $$.pointSelectR(d2) * 1.4)\r\n\t\t\t.transition()\r\n\t\t\t.duration(100)\r\n\t\t\t.attr(\"r\", r);\r\n\t},\r\n\r\n\t/**\r\n\t * Unelect a point\r\n\t * @private\r\n\t * @param {Object} target point\r\n\t * @param {Object} data\r\n\t * @param {Number} index\r\n\t */\r\n\tunselectPoint(target, d, i) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.config.data_onunselected.call($$.api, d, target.node());\r\n\t\t// remove selected-circle from low layer g\r\n\t\t$$.main.select(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(d.id)}`).selectAll(`.${CLASS.selectedCircle}-${i}`)\r\n\t\t\t.transition()\r\n\t\t\t.duration(100)\r\n\t\t\t.attr(\"r\", 0)\r\n\t\t\t.remove();\r\n\t},\r\n\r\n\t/**\r\n\t * Toggles the selection of points\r\n\t * @private\r\n\t * @param {Boolean} whether or not to select.\r\n\t * @param {Object} target point\r\n\t * @param {Object} data\r\n\t * @param {Number} index\r\n\t */\r\n\ttogglePoint(selected, target, d, i) {\r\n\t\tselected ? this.selectPoint(target, d, i) : this.unselectPoint(target, d, i);\r\n\t},\r\n\r\n\t/**\r\n\t * Select a path\r\n\t * @private\r\n\t * @param {Object} target path\r\n\t * @param {Object} data\r\n\t */\r\n\tselectPath(target, d) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.config.data_onselected.call($$, d, target.node());\r\n\t\tif ($$.config.interaction_brighten) {\r\n\t\t\ttarget.transition().duration(100)\r\n\t\t\t\t.style(\"fill\", () => d3Rgb($$.color(d)).brighter(0.75));\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Unelect a path\r\n\t * @private\r\n\t * @param {Object} target path\r\n\t * @param {Object} data\r\n\t */\r\n\tunselectPath(target, d) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.config.data_onunselected.call($$, d, target.node());\r\n\t\tif ($$.config.interaction_brighten) {\r\n\t\t\ttarget.transition().duration(100)\r\n\t\t\t\t.style(\"fill\", () => $$.color(d));\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Toggles the selection of lines\r\n\t * @private\r\n\t * @param {Boolean} whether or not to select.\r\n\t * @param {Object} target shape\r\n\t * @param {Object} data\r\n\t * @param {Number} index\r\n\t */\r\n\ttogglePath(selected, target, d, i) {\r\n\t\tselected ? this.selectPath(target, d, i) : this.unselectPath(target, d, i);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the toggle method of the target\r\n\t * @private\r\n\t * @param {Object} target shape\r\n\t * @param {Object} data\r\n\t * @returns {Function} toggle method\r\n\t */\r\n\tgetToggle(that, d) {\r\n\t\tconst $$ = this;\r\n\t\tlet toggle;\r\n\r\n\t\tif (that.nodeName === \"circle\") {\r\n\t\t\tif ($$.isStepType(d)) {\r\n\t\t\t\t// circle is hidden in step chart, so treat as within the click area\r\n\t\t\t\ttoggle = () => {}; // TODO: how to select step chart?\r\n\t\t\t} else {\r\n\t\t\t\ttoggle = $$.togglePoint;\r\n\t\t\t}\r\n\t\t} else if (that.nodeName === \"path\") {\r\n\t\t\ttoggle = $$.togglePath;\r\n\t\t}\r\n\t\treturn toggle;\r\n\t},\r\n\r\n\t/**\r\n\t * Toggles the selection of shapes\r\n\t * @private\r\n\t * @param {Object} target shape\r\n\t * @param {Object} data\r\n\t * @param {Number} index\r\n\t */\r\n\ttoggleShape(that, d, i) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst shape = d3Select(that);\r\n\t\tconst isSelected = shape.classed(CLASS.SELECTED);\r\n\t\tconst toggle = $$.getToggle(that, d).bind($$);\r\n\r\n\t\tif (config.data_selection_enabled && config.data_selection_isselectable(d)) {\r\n\t\t\tif (!config.data_selection_multiple) {\r\n\t\t\t\tlet selecter = `.${CLASS.shapes}`;\r\n\r\n\t\t\t\tif (config.data_selection_grouped) {\r\n\t\t\t\t\tselecter = `.${selecter}${$$.getTargetSelectorSuffix(d.id)}`;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$$.main.selectAll(selecter)\r\n\t\t\t\t\t.selectAll(`.${CLASS.shape}`)\r\n\t\t\t\t\t.each((d, i) => {\r\n\t\t\t\t\t\tconst shape = d3Select(this);\r\n\r\n\t\t\t\t\t\tif (shape.classed(CLASS.SELECTED)) {\r\n\t\t\t\t\t\t\ttoggle(false, shape.classed(CLASS.SELECTED, false), d, i);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t}\r\n\t\t\tshape.classed(CLASS.SELECTED, !isSelected);\r\n\t\t\ttoggle(!isSelected, shape, d, i);\r\n\t\t}\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/selection.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tmouse as d3Mouse\r\n} from \"d3\";\r\nimport CLASS from \"../config/classes\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend, isValue, getRectSegList} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tinitBar() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartBars);\r\n\t},\r\n\r\n\tupdateTargetsForBar(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst classChartBar = $$.classChartBar.bind($$);\r\n\t\tconst classBars = $$.classBars.bind($$);\r\n\t\tconst classFocus = $$.classFocus.bind($$);\r\n\t\tconst mainBarUpdate = $$.main.select(`.${CLASS.chartBars}`)\r\n\t\t\t.selectAll(`.${CLASS.chartBar}`)\r\n\t\t\t.data(targets)\r\n\t\t\t.attr(\"class\", d => classChartBar(d) + classFocus(d));\r\n\t\tconst mainBarEnter = mainBarUpdate.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", classChartBar)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.style(\"pointer-events\", \"none\");\r\n\r\n\t\t// Bars for each data\r\n\t\tmainBarEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classBars)\r\n\t\t\t.style(\"cursor\", d => (config.data_selection_isselectable(d) ? \"pointer\" : null));\r\n\t},\r\n\r\n\tupdateBar(durationForExit) {\r\n\t\tconst $$ = this;\r\n\t\tconst barData = $$.barData.bind($$);\r\n\t\tconst classBar = $$.classBar.bind($$);\r\n\t\tconst initialOpacity = $$.initialOpacity.bind($$);\r\n\t\tconst color = d => $$.color(d.id);\r\n\r\n\t\t$$.mainBar = $$.main.selectAll(`.${CLASS.bars}`).selectAll(`.${CLASS.bar}`)\r\n\t\t\t.data(barData);\r\n\r\n\t\t$$.mainBar.exit().transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.mainBar = $$.mainBar.enter().append(\"path\")\r\n\t\t\t.attr(\"class\", classBar)\r\n\t\t\t.style(\"stroke\", color)\r\n\t\t\t.style(\"fill\", color)\r\n\t\t\t.merge($$.mainBar)\r\n\t\t\t.style(\"opacity\", initialOpacity);\r\n\t},\r\n\r\n\tredrawBar(drawBar, withTransition) {\r\n\t\treturn [\r\n\t\t\t(withTransition ? this.mainBar.transition(Math.random().toString()) : this.mainBar)\r\n\t\t\t\t.attr(\"d\", drawBar)\r\n\t\t\t\t.style(\"fill\", this.color)\r\n\t\t\t\t.style(\"opacity\", \"1\")\r\n\t\t];\r\n\t},\r\n\r\n\tgetBarW(axis, barTargetsNum) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst w = typeof config.bar_width === \"number\" ? config.bar_width : barTargetsNum ? (axis.tickInterval() * config.bar_width_ratio) / barTargetsNum : 0;\r\n\r\n\t\treturn config.bar_width_max && w > config.bar_width_max ? config.bar_width_max : w;\r\n\t},\r\n\r\n\tgetBars(i, id) {\r\n\t\tconst $$ = this;\r\n\t\tconst suffix = (isValue(i) ? `-${i}` : ``);\r\n\r\n\t\treturn (id ? $$.main\r\n\t\t\t.selectAll(`.${CLASS.bars}${$$.getTargetSelectorSuffix(id)}`) : $$.main)\r\n\t\t\t.selectAll(`.${CLASS.bar}${suffix}`);\r\n\t},\r\n\r\n\texpandBars(i, id, reset) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tif (reset) { $$.unexpandBars(); }\r\n\t\t$$.getBars(i, id).classed(CLASS.EXPANDED, true);\r\n\t},\r\n\r\n\tunexpandBars(i) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.getBars(i).classed(CLASS.EXPANDED, false);\r\n\t},\r\n\r\n\tgenerateDrawBar(barIndices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst getPoints = $$.generateGetBarPoints(barIndices, isSub);\r\n\r\n\t\treturn (d, i) => {\r\n\t\t\t// 4 points that make a bar\r\n\t\t\tconst points = getPoints(d, i);\r\n\r\n\t\t\t// switch points if axis is rotated, not applicable for sub chart\r\n\t\t\tconst indexX = config.axis_rotated ? 1 : 0;\r\n\t\t\tconst indexY = config.axis_rotated ? 0 : 1;\r\n\r\n\t\t\tconst path = `M ${points[0][indexX]},${points[0][indexY]}\r\n\t\t\tL ${points[1][indexX]},${points[1][indexY]}\r\n\t\t\tL ${points[2][indexX]},${points[2][indexY]}\r\n\t\t\tL ${points[3][indexX]},${points[3][indexY]} z`;\r\n\r\n\t\t\treturn path;\r\n\t\t};\r\n\t},\r\n\r\n\tgenerateGetBarPoints(barIndices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst axis = isSub ? $$.subXAxis : $$.xAxis;\r\n\t\tconst barTargetsNum = barIndices.__max__ + 1;\r\n\t\tconst barW = $$.getBarW(axis, barTargetsNum);\r\n\t\tconst barX = $$.getShapeX(barW, barTargetsNum, barIndices, !!isSub);\r\n\t\tconst barY = $$.getShapeY(!!isSub);\r\n\t\tconst barOffset = $$.getShapeOffset($$.isBarType, barIndices, !!isSub);\r\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\r\n\r\n\t\treturn (d, i) => {\r\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\r\n\t\t\tconst offset = barOffset(d, i) || y0; // offset is for stacked bar chart\r\n\t\t\tconst posX = barX(d);\r\n\t\t\tlet posY = barY(d);\r\n\r\n\t\t\t// fix posY not to overflow opposite quadrant\r\n\t\t\tif ($$.config.axis_rotated) {\r\n\t\t\t\tif ((d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\r\n\t\t\t}\r\n\t\t\t// 4 points that make a bar\r\n\t\t\treturn [\r\n\t\t\t\t[posX, offset],\r\n\t\t\t\t[posX, posY - (y0 - offset)],\r\n\t\t\t\t[posX + barW, posY - (y0 - offset)],\r\n\t\t\t\t[posX + barW, offset]\r\n\t\t\t];\r\n\t\t};\r\n\t},\r\n\r\n\tisWithinBar(that) {\r\n\t\tconst mouse = d3Mouse(that);\r\n\t\tconst list = getRectSegList(that);\r\n\t\tconst box = that.getBBox();\r\n\t\tconst seg0 = list[0];\r\n\t\tconst seg1 = list[1];\r\n\t\tconst x = Math.min(seg0.x, seg1.x);\r\n\t\tconst y = Math.min(seg0.y, seg1.y);\r\n\t\tconst w = box.width;\r\n\t\tconst h = box.height;\r\n\t\tconst offset = 2;\r\n\t\tconst sx = x - offset;\r\n\t\tconst ex = x + w + offset;\r\n\t\tconst sy = y + h + offset;\r\n\t\tconst ey = y - offset;\r\n\t\tconst isIn = sx < mouse[0] && mouse[0] < ex && ey < mouse[1] && mouse[1] < sy;\r\n\r\n\t\treturn isIn;\r\n\t}\r\n});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/shape.bar.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tcurveBasisClosed as d3CurveBasisClosed,\r\n\tcurveBasisOpen as d3CurveBasisOpen,\r\n\tcurveBasis as d3CurveBasis,\r\n\tcurveBundle as d3CurveBundle,\r\n\tcurveCardinalClosed as d3CurveCardinalClosed,\r\n\tcurveCardinalOpen as d3CurveCardinalOpen,\r\n\tcurveCardinal as d3CurveCardinal,\r\n\tcurveCatmullRomClosed as d3CurveCatmullRomClosed,\r\n\tcurveCatmullRomOpen as d3CurveCatmullRomOpen,\r\n\tcurveCatmullRom as d3CurveCatmullRom,\r\n\tcurveLinearClosed as d3CurveLinearClosed,\r\n\tcurveLinear as d3CurveLinear,\r\n\tcurveMonotoneX as d3CurveMonotoneX,\r\n\tcurveMonotoneY as d3CurveMonotoneY,\r\n\tcurveNatural as d3CurveNatural,\r\n\tcurveStep as d3CurveStep,\r\n\tselect as d3Select\r\n} from \"d3\";\r\n\r\nimport CLASS from \"../config/classes\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {isUndefined, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetShapeIndices(typeFilter) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst indices = {};\r\n\t\tlet i = 0;\r\n\t\tlet j;\r\n\t\tlet k;\r\n\r\n\t\t$$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)).forEach(d => {\r\n\t\t\tfor (j = 0; j < config.data_groups.length; j++) {\r\n\t\t\t\tif (config.data_groups[j].indexOf(d.id) < 0) { continue; }\r\n\t\t\t\tfor (k = 0; k < config.data_groups[j].length; k++) {\r\n\t\t\t\t\tif (config.data_groups[j][k] in indices) {\r\n\t\t\t\t\t\tindices[d.id] = indices[config.data_groups[j][k]];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (isUndefined(indices[d.id])) { indices[d.id] = i++; }\r\n\t\t});\r\n\t\tindices.__max__ = i - 1;\r\n\t\treturn indices;\r\n\t},\r\n\r\n\tgetShapeX(offset, targetsNum, indices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst scale = isSub ? $$.subX : $$.x;\r\n\r\n\t\treturn d => {\r\n\t\t\tconst index = d.id in indices ? indices[d.id] : 0;\r\n\r\n\t\t\treturn d.x || d.x === 0 ? scale(d.x) - offset * (targetsNum / 2 - index) : 0;\r\n\t\t};\r\n\t},\r\n\r\n\tgetShapeY(isSub) {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn d => {\r\n\t\t\tconst scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);\r\n\r\n\t\t\treturn scale(d.value);\r\n\t\t};\r\n\t},\r\n\r\n\tgetShapeOffset(typeFilter, indices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst targets = $$.orderTargets($$.filterTargetsToShow($$.data.targets.filter(typeFilter, $$)));\r\n\t\tconst targetIds = targets.map(t => t.id);\r\n\r\n\t\treturn (d, idx) => {\r\n\t\t\tconst scale = isSub ? $$.getSubYScale(d.id) : $$.getYScale(d.id);\r\n\t\t\tconst y0 = scale(0);\r\n\t\t\tlet offset = y0;\r\n\t\t\tlet i = idx;\r\n\r\n\t\t\ttargets.forEach(t => {\r\n\t\t\t\tconst values = $$.isStepType(d) ? $$.convertValuesToStep(t.values) : t.values;\r\n\r\n\t\t\t\tif (t.id === d.id || indices[t.id] !== indices[d.id]) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (targetIds.indexOf(t.id) < targetIds.indexOf(d.id)) {\r\n\t\t\t\t\t// check if the x values line up\r\n\t\t\t\t\tif (typeof values[i] === \"undefined\" || +values[i].x !== +d.x) { // \"+\" for timeseries\r\n\t\t\t\t\t\t// if not, try to find the value that does line up\r\n\t\t\t\t\t\ti = -1;\r\n\t\t\t\t\t\tvalues.forEach((v, j) => {\r\n\t\t\t\t\t\t\tif (v.x === d.x) {\r\n\t\t\t\t\t\t\t\ti = j;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i in values && values[i].value * d.value >= 0) {\r\n\t\t\t\t\t\toffset += scale(values[i].value) - y0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn offset;\r\n\t\t};\r\n\t},\r\n\r\n\tisWithinShape(that, d) {\r\n\t\tconst $$ = this;\r\n\t\tconst shape = d3Select(that);\r\n\t\tlet isWithin;\r\n\r\n\t\tif (!$$.isTargetToShow(d.id)) {\r\n\t\t\tisWithin = false;\r\n\t\t} else if (that.nodeName === \"circle\") {\r\n\t\t\tisWithin = $$.isStepType(d) ?\r\n\t\t\t\t$$.isWithinStep(that, $$.getYScale(d.id)(d.value)) :\r\n\t\t\t\t$$.isWithinCircle(that, $$.pointSelectR(d) * 1.5);\r\n\t\t} else if (that.nodeName === \"path\") {\r\n\t\t\tisWithin = shape.classed(CLASS.bar) ? $$.isWithinBar(that) : true;\r\n\t\t}\r\n\t\treturn isWithin;\r\n\t},\r\n\r\n\tgetInterpolate(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst interpolation = $$.getInterpolateType(d);\r\n\r\n\t\treturn {\r\n\t\t\t\"basis\": d3CurveBasis,\r\n\t\t\t\"basis-closed\": d3CurveBasisClosed,\r\n\t\t\t\"basis-open\": d3CurveBasisOpen,\r\n\t\t\t\"bundle\": d3CurveBundle,\r\n\t\t\t\"cardinal\": d3CurveCardinal,\r\n\t\t\t\"cardinal-closed\": d3CurveCardinalClosed,\r\n\t\t\t\"cardinal-open\": d3CurveCardinalOpen,\r\n\t\t\t\"catmull-rom\": d3CurveCatmullRom,\r\n\t\t\t\"catmull-rom-closed\": d3CurveCatmullRomClosed,\r\n\t\t\t\"catmull-rom-open\": d3CurveCatmullRomOpen,\r\n\t\t\t\"monotone-x\": d3CurveMonotoneX,\r\n\t\t\t\"monotone-y\": d3CurveMonotoneY,\r\n\t\t\t\"natural\": d3CurveNatural,\r\n\t\t\t\"linear-closed\": d3CurveLinearClosed,\r\n\t\t\t\"linear\": d3CurveLinear,\r\n\t\t\t\"step\": d3CurveStep\r\n\t\t}[interpolation];\r\n\t},\r\n\r\n\tgetInterpolateType(d) {\r\n\t\tconst $$ = this;\r\n\r\n\t\tlet interpolation = $$.isInterpolationType($$.config.spline_interpolation_type) ?\r\n\t\t\t$$.config.spline_interpolation_type : \"cardinal\";\r\n\r\n\t\tinterpolation = $$.isSplineType(d) ? interpolation : ($$.isStepType(d) ? $$.config.line_step_type : \"linear\");\r\n\t\treturn interpolation;\r\n\t}\r\n\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/shape.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tarea as d3Area,\r\n\tline as d3Line,\r\n\tselect as d3Select,\r\n\tmouse as d3Mouse,\r\n} from \"d3\";\r\nimport CLASS from \"../config/classes\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {isFunction, isValue, isDefined, isUndefined, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tinitLine() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartLines);\r\n\t},\r\n\r\n\tupdateTargetsForLine(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst classChartLine = $$.classChartLine.bind($$);\r\n\t\tconst classLines = $$.classLines.bind($$);\r\n\t\tconst classAreas = $$.classAreas.bind($$);\r\n\t\tconst classCircles = $$.classCircles.bind($$);\r\n\t\tconst classFocus = $$.classFocus.bind($$);\r\n\r\n\t\tconst mainLineUpdate = $$.main.select(`.${CLASS.chartLines}`)\r\n\t\t\t.selectAll(`.${CLASS.chartLine}`)\r\n\t\t\t.data(targets)\r\n\t\t\t.attr(\"class\", d => classChartLine(d) + classFocus(d));\r\n\r\n\t\tconst mainLineEnter = mainLineUpdate.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", classChartLine)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.style(\"pointer-events\", \"none\");\r\n\r\n\t\t// Lines for each data\r\n\t\tmainLineEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classLines);\r\n\r\n\t\t// Areas\r\n\t\tmainLineEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classAreas);\r\n\r\n\t\t// Circles for each data point on lines\r\n\t\tmainLineEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", d => $$.generateClass(CLASS.selectedCircles, d.id));\r\n\r\n\t\tmainLineEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classCircles)\r\n\t\t\t.style(\"cursor\", d => (config.data_selection_isselectable(d) ? \"pointer\" : null));\r\n\r\n\t\t// Update date for selected circles\r\n\t\ttargets.forEach(t => {\r\n\t\t\t$$.main.selectAll(`.${CLASS.selectedCircles}${$$.getTargetSelectorSuffix(t.id)}`)\r\n\t\t\t\t.selectAll(`${CLASS.selectedCircle}`)\r\n\t\t\t\t.each(d => {\r\n\t\t\t\t\td.value = t.values[d.index].value;\r\n\t\t\t\t});\r\n\t\t});\r\n\r\n\t\t// MEMO: can not keep same color...\r\n\t\t// mainLineUpdate.exit().remove();\r\n\t},\r\n\r\n\tupdateLine(durationForExit) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.mainLine = $$.main\r\n\t\t\t.selectAll(`.${CLASS.lines}`)\r\n\t\t\t.selectAll(`.${CLASS.line}`)\r\n\t\t\t.data($$.lineData.bind($$));\r\n\r\n\t\t$$.mainLine.exit().transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.mainLine = $$.mainLine.enter()\r\n\t\t\t.append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classLine.bind($$))\r\n\t\t\t.style(\"stroke\", $$.color)\r\n\t\t\t.merge($$.mainLine)\r\n\t\t\t.style(\"opacity\", $$.initialOpacity.bind($$))\r\n\t\t\t.style(\"shape-rendering\", d => ($$.isStepType(d) ? \"crispEdges\" : \"\"))\r\n\t\t\t.attr(\"transform\", null);\r\n\t},\r\n\r\n\tredrawLine(drawLine, withTransition) {\r\n\t\treturn [\r\n\t\t\t(withTransition ? this.mainLine.transition(Math.random().toString()) : this.mainLine)\r\n\t\t\t\t.attr(\"d\", drawLine)\r\n\t\t\t\t.style(\"stroke\", this.color)\r\n\t\t\t\t.style(\"opacity\", \"1\")\r\n\t\t];\r\n\t},\r\n\r\n\tgenerateDrawLine(lineIndices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst getPoints = $$.generateGetLinePoints(lineIndices, isSub);\r\n\t\tconst yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale;\r\n\t\tconst xValue = d => (isSub ? $$.subxx : $$.xx).call($$, d);\r\n\t\tconst yValue = (d, i) => (config.data_groups.length > 0 ?\r\n\t\t\tgetPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)(d.value));\r\n\t\tlet line = d3Line();\r\n\r\n\t\tline = config.axis_rotated ?\r\n\t\t\tline.x(yValue).y(xValue) : line.x(xValue).y(yValue);\r\n\r\n\t\tif (!config.line_connectNull) {\r\n\t\t\tline = line.defined(d => d.value !== null);\r\n\t\t}\r\n\r\n\t\treturn d => {\r\n\t\t\tconst x = isSub ? $$.x : $$.subX;\r\n\t\t\tconst y = yScaleGetter.call($$, d.id);\r\n\t\t\tlet values = config.line_connectNull ?\r\n\t\t\t\t$$.filterRemoveNull(d.values) : d.values;\r\n\t\t\tlet x0 = 0;\r\n\t\t\tlet y0 = 0;\r\n\t\t\tlet path;\r\n\r\n\t\t\tif ($$.isLineType(d)) {\r\n\t\t\t\tif (config.data_regions[d.id]) {\r\n\t\t\t\t\tpath = $$.lineWithRegions(values, x, y, config.data_regions[d.id]);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif ($$.isStepType(d)) { values = $$.convertValuesToStep(values); }\r\n\t\t\t\t\tpath = line.curve($$.getInterpolate(d))(values);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (values[0]) {\r\n\t\t\t\t\tx0 = x(values[0].x);\r\n\t\t\t\t\ty0 = y(values[0].value);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tpath = config.axis_rotated ? `M ${y0} ${x0}` : `M ${x0} ${y0}`;\r\n\t\t\t}\r\n\t\t\treturn path || \"M 0 0\";\r\n\t\t};\r\n\t},\r\n\r\n\tgenerateGetLinePoints(lineIndices, isSub) { // partial duplication of generateGetBarPoints\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst lineTargetsNum = lineIndices.__max__ + 1;\r\n\t\tconst x = $$.getShapeX(0, lineTargetsNum, lineIndices, !!isSub);\r\n\t\tconst y = $$.getShapeY(!!isSub);\r\n\t\tconst lineOffset = $$.getShapeOffset($$.isLineType, lineIndices, !!isSub);\r\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\r\n\r\n\t\treturn (d, i) => {\r\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\r\n\t\t\tconst offset = lineOffset(d, i) || y0; // offset is for stacked area chart\r\n\t\t\tconst posX = x(d);\r\n\t\t\tlet posY = y(d);\r\n\r\n\t\t\t// fix posY not to overflow opposite quadrant\r\n\t\t\tif (config.axis_rotated) {\r\n\t\t\t\tif ((d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\r\n\t\t\t}\r\n\t\t\t// 1 point that marks the line position\r\n\t\t\treturn [\r\n\t\t\t\t[posX, posY - (y0 - offset)],\r\n\t\t\t\t[posX, posY - (y0 - offset)], // needed for compatibility\r\n\t\t\t\t[posX, posY - (y0 - offset)], // needed for compatibility\r\n\t\t\t\t[posX, posY - (y0 - offset)] // needed for compatibility\r\n\t\t\t];\r\n\t\t};\r\n\t},\r\n\r\n\tlineWithRegions(d, x, y, _regions) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst xOffset = $$.isCategorized() ? 0.5 : 0;\r\n\t\tconst regions = [];\r\n\r\n\t\tlet i;\r\n\t\tlet j;\r\n\t\tlet s = \"M\";\r\n\t\tlet sWithRegion;\r\n\t\tlet xp;\r\n\t\tlet yp;\r\n\t\tlet dx;\r\n\t\tlet dy;\r\n\t\tlet dd;\r\n\t\tlet diff;\r\n\t\tlet diffx2;\r\n\r\n\t\tfunction isWithinRegions(withinX, withinRegions) {\r\n\t\t\tlet idx;\r\n\r\n\t\t\tfor (idx = 0; idx < withinRegions.length; idx++) {\r\n\t\t\t\tif (withinRegions[idx].start < withinX && withinX <= withinRegions[idx].end) { return true; }\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Check start/end of regions\r\n\t\tif (isDefined(_regions)) {\r\n\t\t\tfor (i = 0; i < _regions.length; i++) {\r\n\t\t\t\tregions[i] = {};\r\n\t\t\t\tif (isUndefined(_regions[i].start)) {\r\n\t\t\t\t\tregions[i].start = d[0].x;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tregions[i].start = $$.isTimeSeries() ? $$.parseDate(_regions[i].start) : _regions[i].start;\r\n\t\t\t\t}\r\n\t\t\t\tif (isUndefined(_regions[i].end)) {\r\n\t\t\t\t\tregions[i].end = d[d.length - 1].x;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tregions[i].end = $$.isTimeSeries() ? $$.parseDate(_regions[i].end) : _regions[i].end;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Set scales\r\n\t\tconst xValue = config.axis_rotated ? dt => y(dt.value) : dt => x(dt.x);\r\n\t\tconst yValue = config.axis_rotated ? dt => x(dt.x) : dt => y(dt.value);\r\n\r\n\t\t// Define svg generator function for region\r\n\t\tfunction generateM(points) {\r\n\t\t\treturn `M${points[0][0]} ${points[0][1]} ${points[1][0]} ${points[1][1]}`;\r\n\t\t}\r\n\r\n\t\tif ($$.isTimeSeries()) {\r\n\t\t\tsWithRegion = (d0, d1, k, timeseriesDiff) => {\r\n\t\t\t\tconst x0 = d0.x.getTime();\r\n\t\t\t\tconst xDiff = d1.x - d0.x;\r\n\t\t\t\tconst xv0 = new Date(x0 + xDiff * k);\r\n\t\t\t\tconst xv1 = new Date(x0 + xDiff * (k + timeseriesDiff));\r\n\t\t\t\tlet points;\r\n\r\n\t\t\t\tif (config.axis_rotated) {\r\n\t\t\t\t\tpoints = [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpoints = [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];\r\n\t\t\t\t}\r\n\t\t\t\treturn generateM(points);\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\tsWithRegion = function(d0, d1, k, otherDiff) {\r\n\t\t\t\tlet points;\r\n\r\n\t\t\t\tif (config.axis_rotated) {\r\n\t\t\t\t\tpoints = [[y(yp(k), true), x(xp(k))], [y(yp(k + otherDiff), true), x(xp(k + otherDiff))]];\r\n\t\t\t\t} else {\r\n\t\t\t\t\tpoints = [[x(xp(k), true), y(yp(k))], [x(xp(k + otherDiff), true), y(yp(k + otherDiff))]];\r\n\t\t\t\t}\r\n\t\t\t\treturn generateM(points);\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\t// Generate\r\n\t\tfor (i = 0; i < d.length; i++) {\r\n\t\t\t// Draw as normal\r\n\t\t\tif (isUndefined(regions) || !isWithinRegions(d[i].x, regions)) {\r\n\t\t\t\ts += ` ${xValue(d[i])} ${yValue(d[i])}`;\r\n\t\t\t} else {\r\n\t\t\t\t// Draw with region // TODO: Fix for horizotal charts\r\n\t\t\t\txp = $$.getScale(d[i - 1].x + xOffset, d[i].x + xOffset, $$.isTimeSeries());\r\n\t\t\t\typ = $$.getScale(d[i - 1].value, d[i].value);\r\n\r\n\t\t\t\tdx = x(d[i].x) - x(d[i - 1].x);\r\n\t\t\t\tdy = y(d[i].value) - y(d[i - 1].value);\r\n\t\t\t\tdd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\r\n\t\t\t\tdiff = 2 / dd;\r\n\t\t\t\tdiffx2 = diff * 2;\r\n\r\n\t\t\t\tfor (j = diff; j <= 1; j += diffx2) {\r\n\t\t\t\t\ts += sWithRegion(d[i - 1], d[i], j, diff);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn s;\r\n\t},\r\n\r\n\tupdateArea(durationForExit) {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.mainArea = $$.main.selectAll(`.${CLASS.areas}`).selectAll(`.${CLASS.area}`)\r\n\t\t\t.data($$.lineData.bind($$));\r\n\r\n\t\t$$.mainArea.exit().transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.mainArea = $$.mainArea.enter().append(\"path\")\r\n\t\t\t.attr(\"class\", $$.classArea.bind($$))\r\n\t\t\t.style(\"fill\", $$.color)\r\n\t\t\t.style(\"opacity\", function() {\r\n\t\t\t\t$$.orgAreaOpacity = d3Select(this).style(\"opacity\");\r\n\t\t\t\treturn \"0\";\r\n\t\t\t})\r\n\t\t\t.merge($$.mainArea);\r\n\r\n\t\t$$.mainArea\r\n\t\t\t.style(\"opacity\", $$.orgAreaOpacity);\r\n\t},\r\n\r\n\tredrawArea(drawArea, withTransition) {\r\n\t\treturn [\r\n\t\t\t(withTransition ? this.mainArea.transition(Math.random().toString()) : this.mainArea)\r\n\t\t\t\t.attr(\"d\", drawArea)\r\n\t\t\t\t.style(\"fill\", this.color)\r\n\t\t\t\t.style(\"opacity\", this.orgAreaOpacity)\r\n\t\t];\r\n\t},\r\n\r\n\tgenerateDrawArea(areaIndices, isSub) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst getPoints = $$.generateGetAreaPoints(areaIndices, isSub);\r\n\t\tconst yScaleGetter = isSub ? $$.getSubYScale : $$.getYScale;\r\n\t\tconst xValue = d => (isSub ? $$.subxx : $$.xx).call($$, d);\r\n\t\tconst value0 = (d, i) => (config.data_groups.length > 0 ?\r\n\t\t\tgetPoints(d, i)[0][1] : yScaleGetter.call($$, d.id)($$.getAreaBaseValue(d.id)));\r\n\t\tconst value1 = (d, i) => (config.data_groups.length > 0 ?\r\n\t\t\tgetPoints(d, i)[1][1] : yScaleGetter.call($$, d.id)(d.value));\r\n\t\tlet area = d3Area();\r\n\r\n\t\tarea = config.axis_rotated ?\r\n\t\t\tarea.x0(value0)\r\n\t\t\t\t.x1(value1)\r\n\t\t\t\t.y(xValue) :\r\n\t\t\tarea.x(xValue)\r\n\t\t\t\t.y0(config.area_above ? 0 : value0)\r\n\t\t\t\t.y1(value1);\r\n\r\n\t\tif (!config.line_connectNull) {\r\n\t\t\tarea = area.defined(d => d.value !== null);\r\n\t\t}\r\n\r\n\t\treturn d => {\r\n\t\t\tlet values = config.line_connectNull ? $$.filterRemoveNull(d.values) : d.values;\r\n\t\t\tlet x0 = 0;\r\n\t\t\tlet y0 = 0;\r\n\t\t\tlet path;\r\n\r\n\t\t\tif ($$.isAreaType(d)) {\r\n\t\t\t\tif ($$.isStepType(d)) {\r\n\t\t\t\t\tvalues = $$.convertValuesToStep(values);\r\n\t\t\t\t}\r\n\t\t\t\tpath = area.curve($$.getInterpolate(d))(values);\r\n\t\t\t} else {\r\n\t\t\t\tif (values[0]) {\r\n\t\t\t\t\tx0 = $$.x(values[0].x);\r\n\t\t\t\t\ty0 = $$.getYScale(d.id)(values[0].value);\r\n\t\t\t\t}\r\n\t\t\t\tpath = config.axis_rotated ? `M ${y0} ${x0}` : `M ${x0} ${y0}`;\r\n\t\t\t}\r\n\t\t\treturn path || \"M 0 0\";\r\n\t\t};\r\n\t},\r\n\r\n\tgetAreaBaseValue() {\r\n\t\treturn 0;\r\n\t},\r\n\r\n\tgenerateGetAreaPoints(areaIndices, isSub) { // partial duplication of generateGetBarPoints\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst areaTargetsNum = areaIndices.__max__ + 1;\r\n\t\tconst x = $$.getShapeX(0, areaTargetsNum, areaIndices, !!isSub);\r\n\t\tconst y = $$.getShapeY(!!isSub);\r\n\t\tconst areaOffset = $$.getShapeOffset($$.isAreaType, areaIndices, !!isSub);\r\n\t\tconst yScale = isSub ? $$.getSubYScale : $$.getYScale;\r\n\r\n\t\treturn function(d, i) {\r\n\t\t\tconst y0 = yScale.call($$, d.id)(0);\r\n\t\t\tconst offset = areaOffset(d, i) || y0; // offset is for stacked area chart\r\n\t\t\tconst posX = x(d);\r\n\t\t\tlet posY = y(d);\r\n\r\n\t\t\t// fix posY not to overflow opposite quadrant\r\n\t\t\tif (config.axis_rotated) {\r\n\t\t\t\tif ((d.value > 0 && posY < y0) || (d.value < 0 && y0 < posY)) { posY = y0; }\r\n\t\t\t}\r\n\r\n\t\t\t// 1 point that marks the area position\r\n\t\t\treturn [\r\n\t\t\t\t[posX, offset],\r\n\t\t\t\t[posX, posY - (y0 - offset)],\r\n\t\t\t\t[posX, posY - (y0 - offset)], // needed for compatibility\r\n\t\t\t\t[posX, offset] // needed for compatibility\r\n\t\t\t];\r\n\t\t};\r\n\t},\r\n\r\n\tupdateCircle() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.mainCircle = $$.main.selectAll(`.${CLASS.circles}`).selectAll(`.${CLASS.circle}`)\r\n\t\t\t.data($$.lineOrScatterData.bind($$));\r\n\r\n\t\t$$.mainCircle.exit().remove();\r\n\r\n\t\t$$.mainCircle = $$.mainCircle.enter().append(\"circle\")\r\n\t\t\t.attr(\"class\", $$.classCircle.bind($$))\r\n\t\t\t.attr(\"r\", $$.pointR.bind($$))\r\n\t\t\t.style(\"fill\", $$.color)\r\n\t\t\t.merge($$.mainCircle)\r\n\t\t\t.style(\"opacity\", $$.initialOpacityForCircle.bind($$));\r\n\t},\r\n\r\n\tredrawCircle(cx, cy, withTransition, flow) {\r\n\t\tlet selectedCircles = this.main.selectAll(`.${CLASS.selectedCircle}`);\r\n\t\tlet mainCircles;\r\n\r\n\t\tif (withTransition) {\r\n\t\t\tconst transitionName = Math.random().toString();\r\n\r\n\t\t\tif (flow) {\r\n\t\t\t\tmainCircles = this.mainCircle\r\n\t\t\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t\t.transition(transitionName)\r\n\t\t\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t\t\t.attr(\"cy\", cy)\r\n\t\t\t\t\t.transition(transitionName)\r\n\t\t\t\t\t\t.style(\"opacity\", this.opacityForCircle.bind(this))\r\n\t\t\t\t\t\t.style(\"fill\", this.color);\r\n\t\t\t} else {\r\n\t\t\t\tmainCircles = this.mainCircle\r\n\t\t\t\t\t.transition(transitionName)\r\n\t\t\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t\t\t.attr(\"cy\", cy)\r\n\t\t\t\t\t.transition(transitionName)\r\n\t\t\t\t\t\t.style(\"opacity\", this.opacityForCircle.bind(this))\r\n\t\t\t\t\t\t.style(\"fill\", this.color);\r\n\t\t\t}\r\n\r\n\t\t\tselectedCircles = selectedCircles.transition(Math.random().toString());\r\n\t\t} else {\r\n\t\t\tmainCircles = this.mainCircle\r\n\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t.attr(\"cy\", cy)\r\n\t\t\t\t.style(\"opacity\", this.opacityForCircle.bind(this))\r\n\t\t\t\t.style(\"fill\", this.color);\r\n\t\t}\r\n\r\n\t\treturn [\r\n\t\t\tmainCircles,\r\n\t\t\tselectedCircles\r\n\t\t\t\t.attr(\"cx\", cx)\r\n\t\t\t\t.attr(\"cy\", cy)\r\n\t\t];\r\n\t},\r\n\r\n\tcircleX(d) {\r\n\t\treturn this.config.zoom_enabled && this.zoomScale ?\r\n\t\t\t(d.x || d.x === 0 ? this.zoomScale(d.x) : null) :\r\n\t\t\t(d.x || d.x === 0 ? this.x(d.x) : null);\r\n\t},\r\n\r\n\tupdateCircleY() {\r\n\t\tconst $$ = this;\r\n\t\tlet lineIndices;\r\n\t\tlet getPoints;\r\n\r\n\t\tif ($$.config.data_groups.length > 0) {\r\n\t\t\tlineIndices = $$.getShapeIndices($$.isLineType);\r\n\t\t\tgetPoints = $$.generateGetLinePoints(lineIndices);\r\n\r\n\t\t\t$$.circleY = function(d, i) {\r\n\t\t\t\treturn getPoints(d, i)[0][1];\r\n\t\t\t};\r\n\t\t} else {\r\n\t\t\t$$.circleY = function(d) {\r\n\t\t\t\treturn $$.getYScale(d.id)(d.value);\r\n\t\t\t};\r\n\t\t}\r\n\t},\r\n\r\n\tgetCircles(i, id) {\r\n\t\tconst $$ = this;\r\n\t\tconst suffix = (isValue(i) ? `-${i}` : ``);\r\n\r\n\t\treturn (id ? $$.main.selectAll(`.${CLASS.circles}${$$.getTargetSelectorSuffix(id)}`) : $$.main)\r\n\t\t\t.selectAll(`.${CLASS.circle}${suffix}`);\r\n\t},\r\n\r\n\texpandCircles(i, id, reset) {\r\n\t\tconst $$ = this;\r\n\t\tconst r = $$.pointExpandedR.bind($$);\r\n\r\n\t\tif (reset) {\r\n\t\t\t$$.unexpandCircles();\r\n\t\t}\r\n\t\t$$.getCircles(i, id)\r\n\t\t\t.classed(CLASS.EXPANDED, true)\r\n\t\t\t.attr(\"r\", r);\r\n\t},\r\n\r\n\tunexpandCircles(i) {\r\n\t\tconst $$ = this;\r\n\t\tconst r = $$.pointR.bind($$);\r\n\r\n\t\t$$.getCircles(i)\r\n\t\t\t.filter(function() { return d3Select(this).classed(CLASS.EXPANDED); })\r\n\t\t\t.classed(CLASS.EXPANDED, false)\r\n\t\t\t.attr(\"r\", r);\r\n\t},\r\n\r\n\tpointR(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn $$.isStepType(d) ? 0 : (isFunction(config.point_r) ? config.point_r(d) : config.point_r);\r\n\t},\r\n\r\n\tpointExpandedR(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn config.point_focus_expand_enabled ?\r\n\t\t\t(config.point_focus_expand_r ? config.point_focus_expand_r : $$.pointR(d) * 1.75) : $$.pointR(d);\r\n\t},\r\n\r\n\tpointSelectR(d) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn isFunction(config.point_select_r) ?\r\n\t\t\tconfig.point_select_r(d) : ((config.point_select_r) ? config.point_select_r : $$.pointR(d) * 4);\r\n\t},\r\n\r\n\tisWithinCircle(that, r) {\r\n\t\tconst mouse = d3Mouse(that);\r\n\t\tconst d3This = d3Select(that);\r\n\t\tconst cx = +d3This.attr(\"cx\");\r\n\t\tconst cy = +d3This.attr(\"cy\");\r\n\r\n\t\treturn Math.sqrt(Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)) < r;\r\n\t},\r\n\r\n\tisWithinStep(that, y) {\r\n\t\treturn Math.abs(y - d3Mouse(that)[1]) < 30;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/shape.line.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {isValue, ceil10, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tgetCurrentWidth() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\treturn config.size_width ? config.size_width : $$.getParentWidth();\r\n\t},\r\n\r\n\tgetCurrentHeight() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst h = config.size_height ?\r\n\t\t\tconfig.size_height : $$.getParentHeight();\r\n\r\n\t\treturn h > 0 ? h : 320 / ($$.hasType(\"gauge\") && !config.gauge_fullCircle ? 2 : 1);\r\n\t},\r\n\r\n\tgetCurrentPaddingTop() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet padding = isValue(config.padding_top) ?\r\n\t\t\tconfig.padding_top : 0;\r\n\r\n\t\tif ($$.title && $$.title.node()) {\r\n\t\t\tpadding += $$.getTitlePadding();\r\n\t\t}\r\n\r\n\t\treturn padding;\r\n\t},\r\n\r\n\tgetCurrentPaddingBottom() {\r\n\t\tconst config = this.config;\r\n\r\n\t\treturn isValue(config.padding_bottom) ?\r\n\t\t\tconfig.padding_bottom : 0;\r\n\t},\r\n\r\n\tgetCurrentPaddingLeft(withoutRecompute) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet paddingLeft;\r\n\r\n\t\tif (isValue(config.padding_left)) {\r\n\t\t\tpaddingLeft = config.padding_left;\r\n\t\t} else if (config.axis_rotated) {\r\n\t\t\tpaddingLeft = !config.axis_x_show ?\r\n\t\t\t\t1 : Math.max(ceil10($$.getAxisWidthByAxisId(\"x\", withoutRecompute)), 40);\r\n\t\t} else if (!config.axis_y_show || config.axis_y_inner) { // && !config.axis_rotated\r\n\t\t\tpaddingLeft = $$.axis.getYAxisLabelPosition().isOuter ? 30 : 1;\r\n\t\t} else {\r\n\t\t\tpaddingLeft = ceil10($$.getAxisWidthByAxisId(\"y\", withoutRecompute));\r\n\t\t}\r\n\r\n\t\treturn paddingLeft;\r\n\t},\r\n\r\n\tgetCurrentPaddingRight() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst defaultPadding = 10;\r\n\t\tconst legendWidthOnRight = $$.isLegendRight ?\r\n\t\t\t$$.getLegendWidth() + 20 : 0;\r\n\t\tlet paddingRight;\r\n\r\n\t\tif (isValue(config.padding_right)) {\r\n\t\t\tpaddingRight = config.padding_right + 1; // 1 is needed not to hide tick line\r\n\t\t} else if (config.axis_rotated) {\r\n\t\t\tpaddingRight = defaultPadding + legendWidthOnRight;\r\n\t\t} else if (!config.axis_y2_show || config.axis_y2_inner) { // && !config.axis_rotated\r\n\t\t\tpaddingRight = 2 +\r\n\t\t\t\tlegendWidthOnRight +\r\n\t\t\t\t($$.axis.getY2AxisLabelPosition().isOuter ? 20 : 0);\r\n\t\t} else {\r\n\t\t\tpaddingRight = ceil10($$.getAxisWidthByAxisId(\"y2\")) + legendWidthOnRight;\r\n\t\t}\r\n\r\n\t\treturn paddingRight;\r\n\t},\r\n\r\n\tgetParentRectValue(key) {\r\n\t\tlet parent = this.selectChart.node();\r\n\t\tlet v;\r\n\r\n\t\twhile (parent && parent.tagName !== \"BODY\") {\r\n\t\t\ttry {\r\n\t\t\t\tv = parent.getBoundingClientRect()[key];\r\n\t\t\t} catch (e) {\r\n\t\t\t\tif (key === \"width\") {\r\n\t\t\t\t\t// In IE in certain cases getBoundingClientRect\r\n\t\t\t\t\t// will cause an \"unspecified error\"\r\n\t\t\t\t\tv = parent.offsetWidth;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (v) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tparent = parent.parentNode;\r\n\t\t}\r\n\r\n\t\treturn v;\r\n\t},\r\n\r\n\tgetParentWidth() {\r\n\t\treturn this.getParentRectValue(\"width\");\r\n\t},\r\n\r\n\tgetParentHeight() {\r\n\t\tconst h = this.selectChart.style(\"height\");\r\n\r\n\t\treturn h.indexOf(\"px\") > 0 ? +h.replace(\"px\", \"\") : 0;\r\n\t},\r\n\r\n\tgetSvgLeft(withoutRecompute) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst hasLeftAxisRect = config.axis_rotated || (!config.axis_rotated && !config.axis_y_inner);\r\n\t\tconst leftAxisClass = config.axis_rotated ? CLASS.axisX : CLASS.axisY;\r\n\t\tconst leftAxis = $$.main.select(`.${leftAxisClass}`).node();\r\n\t\tconst svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {right: 0};\r\n\t\tconst chartRect = $$.selectChart.node().getBoundingClientRect();\r\n\t\tconst hasArc = $$.hasArcType();\r\n\t\tconst svgLeft = svgRect.right -\r\n\t\t\tchartRect.left -\r\n\t\t\t(hasArc ? 0 : $$.getCurrentPaddingLeft(withoutRecompute));\r\n\r\n\t\treturn svgLeft > 0 ? svgLeft : 0;\r\n\t},\r\n\r\n\tgetAxisWidthByAxisId(id, withoutRecompute) {\r\n\t\tconst $$ = this;\r\n\t\tconst position = $$.axis.getLabelPositionById(id);\r\n\r\n\t\treturn $$.axis.getMaxTickWidth(id, withoutRecompute) +\r\n\t\t\t(position.isInner ? 20 : 40);\r\n\t},\r\n\r\n\tgetHorizontalAxisHeight(axisId) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet h = 30;\r\n\r\n\t\tif (axisId === \"x\" && !config.axis_x_show) {\r\n\t\t\treturn 8;\r\n\t\t}\r\n\r\n\t\tif (axisId === \"x\" && config.axis_x_height) {\r\n\t\t\treturn config.axis_x_height;\r\n\t\t}\r\n\r\n\t\tif (axisId === \"y\" && !config.axis_y_show) {\r\n\t\t\treturn config.legend_show &&\r\n\t\t\t\t!$$.isLegendRight &&\r\n\t\t\t\t!$$.isLegendInset ? 10 : 1;\r\n\t\t}\r\n\r\n\t\tif (axisId === \"y2\" && !config.axis_y2_show) {\r\n\t\t\treturn $$.rotated_padding_top;\r\n\t\t}\r\n\r\n\t\t// Calculate x axis height when tick rotated\r\n\t\tif (axisId === \"x\" && !config.axis_rotated && config.axis_x_tick_rotate) {\r\n\t\t\th = 30 +\r\n\t\t\t\t$$.axis.getMaxTickWidth(axisId) *\r\n\t\t\t\tMath.cos(Math.PI * (90 - config.axis_x_tick_rotate) / 180);\r\n\t\t}\r\n\r\n\t\t// Calculate y axis height when tick rotated\r\n\t\tif (axisId === \"y\" && config.axis_rotated && config.axis_y_tick_rotate) {\r\n\t\t\th = 30 +\r\n\t\t\t\t$$.axis.getMaxTickWidth(axisId) *\r\n\t\t\t\tMath.cos(Math.PI * (90 - config.axis_y_tick_rotate) / 180);\r\n\t\t}\r\n\r\n\t\treturn h +\r\n\t\t\t($$.axis.getLabelPositionById(axisId).isInner ? 0 : 10) +\r\n\t\t\t(axisId === \"y2\" ? -10 : 0);\r\n\t},\r\n\r\n\tgetEventRectWidth() {\r\n\t\treturn Math.max(0, this.xAxis.tickInterval());\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/size.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {\r\n\tselect as d3Select,\r\n\tselectAll as d3SelectAll\r\n} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initializes the text\r\n\t * @private\r\n\t */\r\n\tinitText() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.main.select(`.${CLASS.chart}`).append(\"g\")\r\n\t\t\t.attr(\"class\", CLASS.chartTexts);\r\n\t\t$$.mainText = d3SelectAll([]);\r\n\t},\r\n\r\n\t/**\r\n\t * Update chartText\r\n\t * @private\r\n\t * @param {Object} $$.data.targets\r\n\t */\r\n\tupdateTargetsForText(targets) {\r\n\t\tconst $$ = this;\r\n\t\tconst classChartText = $$.classChartText.bind($$);\r\n\t\tconst classTexts = $$.classTexts.bind($$);\r\n\t\tconst classFocus = $$.classFocus.bind($$);\r\n\t\tconst mainTextUpdate = $$.main.select(`.${CLASS.chartTexts}`).selectAll(`.${CLASS.chartText}`)\r\n\t\t\t.data(targets)\r\n\t\t\t.attr(\"class\", d => classChartText(d) + classFocus(d));\r\n\t\tconst mainTextEnter = mainTextUpdate.enter().append(\"g\")\r\n\t\t\t.attr(\"class\", classChartText)\r\n\t\t\t.style(\"opacity\", \"0\")\r\n\t\t\t.style(\"pointer-events\", \"none\");\r\n\r\n\t\tmainTextEnter.append(\"g\")\r\n\t\t\t.attr(\"class\", classTexts);\r\n\t},\r\n\r\n\t/**\r\n\t * Update text\r\n\t * @private\r\n\t * @param {Number} Fade-out transition duration\r\n\t */\r\n\tupdateText(durationForExit) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst barOrLineData = $$.barOrLineData.bind($$);\r\n\t\tconst classText = $$.classText.bind($$);\r\n\r\n\t\t$$.mainText = $$.main.selectAll(`.${CLASS.texts}`).selectAll(`.${CLASS.text}`)\r\n\t\t\t.data(barOrLineData);\r\n\r\n\t\t$$.mainText.exit()\r\n\t\t\t.transition()\r\n\t\t\t.duration(durationForExit)\r\n\t\t\t.style(\"fill-opacity\", \"0\")\r\n\t\t\t.remove();\r\n\r\n\t\t$$.mainText = $$.mainText.enter()\r\n\t\t\t.append(\"text\")\r\n\t\t\t.attr(\"class\", classText)\r\n\t\t\t.attr(\"text-anchor\", d => (config.axis_rotated ? (d.value < 0 ? \"end\" : \"start\") : \"middle\"))\r\n\t\t\t.style(\"stroke\", \"none\")\r\n\t\t\t.style(\"fill\", d => $$.color(d))\r\n\t\t\t.style(\"fill-opacity\", \"0\")\r\n\t\t\t.merge($$.mainText)\r\n\t\t\t.text((d, i, j) => $$.dataLabelFormat(d.id)(d.value, d.id, i, j));\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw chartText\r\n\t * @private\r\n\t * @param {Number} x Attribute\r\n\t * @param {Number} y Attribute\r\n\t * @param {Object} options.flow\r\n\t * @param {Boolean} indicates transition is enabled\r\n\t * @returns {Object} $$.mainText\r\n\t */\r\n\tredrawText(xForText, yForText, forFlow, withTransition) {\r\n\t\treturn [\r\n\t\t\t(withTransition ? this.mainText.transition() : this.mainText)\r\n\t\t\t\t.attr(\"x\", xForText)\r\n\t\t\t\t.attr(\"y\", yForText)\r\n\t\t\t\t.style(\"fill\", this.color)\r\n\t\t\t\t.style(\"fill-opacity\", forFlow ? 0 : this.opacityForText.bind(this))\r\n\t\t];\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the getBoundingClientRect value of the element\r\n\t * @private\r\n\t * @param {String} text\r\n\t * @param {String} class\r\n\t * @param {HTMLElement} element\r\n\t * @returns {Object} value of element.getBoundingClientRect()\r\n\t */\r\n\tgetTextRect(text, cls, element) {\r\n\t\tconst dummy = d3Select(\"body\").append(\"div\")\r\n\t\t\t.classed(\"bb\", true);\r\n\r\n\t\tconst svg = dummy.append(\"svg\")\r\n\t\t\t.style(\"visibility\", \"hidden\")\r\n\t\t\t.style(\"position\", \"fixed\")\r\n\t\t\t.style(\"top\", \"0px\")\r\n\t\t\t.style(\"left\", \"0px\");\r\n\r\n\t\tconst font = d3Select(element).style(\"font\");\r\n\t\tlet rect;\r\n\r\n\t\tsvg.selectAll(\".dummy\")\r\n\t\t\t.data([text])\r\n\t\t\t.enter()\r\n\t\t\t.append(\"text\")\r\n\t\t\t.classed(!cls ? \"\" : cls, true)\r\n\t\t\t.style(\"font\", font)\r\n\t\t\t.text(text)\r\n\t\t\t.each(function() {\r\n\t\t\t\trect = this.getBoundingClientRect();\r\n\t\t\t});\r\n\r\n\t\tdummy.remove();\r\n\r\n\t\treturn rect;\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the x or y coordinate of the text\r\n\t * @private\r\n\t * @param {Object} area Indices\r\n\t * @param {Object} bar Indices\r\n\t * @param {Object} line Indices\r\n\t * @param {Boolean} whether or not to x\r\n\t * @returns {Number} coordinates\r\n\t */\r\n\tgenerateXYForText(areaIndices, barIndices, lineIndices, forX) {\r\n\t\tconst $$ = this;\r\n\t\tconst getAreaPoints = $$.generateGetAreaPoints(areaIndices, false);\r\n\t\tconst getBarPoints = $$.generateGetBarPoints(barIndices, false);\r\n\t\tconst getLinePoints = $$.generateGetLinePoints(lineIndices, false);\r\n\t\tconst getter = forX ? $$.getXForText : $$.getYForText;\r\n\r\n\t\treturn function(d, i) {\r\n\t\t\tlet getPoints = $$.isBarType(d) ? getBarPoints : getLinePoints;\r\n\r\n\t\t\tgetPoints = $$.isAreaType(d) ? getAreaPoints : getPoints;\r\n\t\t\treturn getter.call($$, getPoints(d, i), d, this);\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the x coordinate of the text\r\n\t * @private\r\n\t * @param {Object} points\r\n\t * @param {Object} data\r\n\t * @param {HTMLElement} element\r\n\t * @returns {Number} x coordinate\r\n\t */\r\n\tgetXForText(points, d, textElement) {\r\n\t\tconst $$ = this;\r\n\t\tconst box = textElement.getBoundingClientRect();\r\n\t\tlet xPos;\r\n\t\tlet padding;\r\n\r\n\t\tif ($$.config.axis_rotated) {\r\n\t\t\tpadding = $$.isBarType(d) ? 4 : 6;\r\n\t\t\txPos = points[2][1] + padding * (d.value < 0 ? -1 : 1);\r\n\t\t} else {\r\n\t\t\txPos = $$.hasType(\"bar\") ? (points[2][0] + points[0][0]) / 2 : points[0][0];\r\n\t\t}\r\n\t\t// show labels regardless of the domain if value is null\r\n\t\tif (d.value === null) {\r\n\t\t\tif (xPos > $$.width) {\r\n\t\t\t\txPos = $$.width - box.width;\r\n\t\t\t} else if (xPos < 0) {\r\n\t\t\t\txPos = 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn xPos;\r\n\t},\r\n\r\n\t/**\r\n\t * Gets the y coordinate of the text\r\n\t * @private\r\n\t * @param {Object} points\r\n\t * @param {Object} data\r\n\t * @param {HTMLElement} element\r\n\t * @returns {Number} y coordinate\r\n\t */\r\n\tgetYForText(points, d, textElement) {\r\n\t\tconst $$ = this;\r\n\t\tconst box = textElement.getBoundingClientRect();\r\n\t\tlet yPos;\r\n\r\n\t\tif ($$.config.axis_rotated) {\r\n\t\t\tyPos = (points[0][0] + points[2][0] + box.height * 0.6) / 2;\r\n\t\t} else {\r\n\t\t\tyPos = points[2][1];\r\n\t\t\tif (d.value < 0 || (d.value === 0 && !$$.hasPositiveValue)) {\r\n\t\t\t\tyPos += box.height;\r\n\t\t\t\tif ($$.isBarType(d) && $$.isSafari()) {\r\n\t\t\t\t\tyPos -= 3;\r\n\t\t\t\t} else if (!$$.isBarType(d) && $$.isChrome()) {\r\n\t\t\t\t\tyPos += 3;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tyPos += $$.isBarType(d) ? -3 : -6;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// show labels regardless of the domain if value is null\r\n\t\tif (d.value === null && !$$.config.axis_rotated) {\r\n\t\t\tif (yPos < box.height) {\r\n\t\t\t\tyPos = box.height;\r\n\t\t\t} else if (yPos > this.height) {\r\n\t\t\t\tyPos = this.height - 4;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn yPos;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/text.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initializes the title\r\n\t * @private\r\n\t */\r\n\tinitTitle() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.title = $$.svg.append(\"text\")\r\n\t\t\t.text($$.config.title_text)\r\n\t\t\t.attr(\"class\", $$.CLASS.title);\r\n\t},\r\n\r\n\t/**\r\n\t * Redraw title\r\n\t * @private\r\n\t */\r\n\tredrawTitle() {\r\n\t\tconst $$ = this;\r\n\r\n\t\t$$.title.attr(\"x\", $$.xForTitle.bind($$))\r\n\t\t\t.attr(\"y\", $$.yForTitle.bind($$));\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the x attribute value of the title\r\n\t * @private\r\n\t * @returns {Number} x attribute value\r\n\t */\r\n\txForTitle() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst position = config.title_position || \"left\";\r\n\t\tlet x;\r\n\r\n\t\tif (position.indexOf(\"right\") >= 0) {\r\n\t\t\tx = $$.currentWidth -\r\n\t\t\t\t$$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width -\r\n\t\t\t\tconfig.title_padding.right;\r\n\t\t} else if (position.indexOf(\"center\") >= 0) {\r\n\t\t\tx = ($$.currentWidth -\r\n\t\t\t\t$$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).width) / 2;\r\n\t\t} else { // left\r\n\t\t\tx = config.title_padding.left;\r\n\t\t}\r\n\r\n\t\treturn x;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the y attribute value of the title\r\n\t * @private\r\n\t * @returns {Number} y attribute value\r\n\t */\r\n\tyForTitle() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.config.title_padding.top +\r\n\t\t\t$$.getTextRect($$.title.node().textContent, $$.CLASS.title, $$.title.node()).height;\r\n\t},\r\n\r\n\t/**\r\n\t * Get title padding\r\n\t * @private\r\n\t * @returns {Number} padding value\r\n\t */\r\n\tgetTitlePadding() {\r\n\t\tconst $$ = this;\r\n\r\n\t\treturn $$.yForTitle() + $$.config.title_padding.bottom;\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/title.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport {mouse as d3Mouse} from \"d3\";\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport CLASS from \"../config/classes\";\r\nimport {extend, isValue, sanitise, isString} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\t/**\r\n\t * Initializes the tooltip\r\n\t * @private\r\n\t */\r\n\tinitTooltip() {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tlet i;\r\n\r\n\t\t$$.tooltip = $$.selectChart\r\n\t\t\t.style(\"position\", \"relative\")\r\n\t\t\t.append(\"div\")\r\n\t\t\t.attr(\"class\", CLASS.tooltipContainer)\r\n\t\t\t.style(\"position\", \"absolute\")\r\n\t\t\t.style(\"pointer-events\", \"none\")\r\n\t\t\t.style(\"display\", \"none\");\r\n\r\n\t\t// Show tooltip if needed\r\n\t\tif (config.tooltip_init_show) {\r\n\t\t\tif ($$.isTimeSeries() && isString(config.tooltip_init_x)) {\r\n\t\t\t\tconfig.tooltip_init_x = $$.parseDate(config.tooltip_init_x);\r\n\r\n\t\t\t\tfor (i = 0; i < $$.data.targets[0].values.length; i++) {\r\n\t\t\t\t\tif (($$.data.targets[0].values[i].x - config.tooltip_init_x) === 0) { break; }\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconfig.tooltip_init_x = i;\r\n\t\t\t}\r\n\r\n\t\t\t$$.tooltip.html(config.tooltip_contents.call($$,\r\n\t\t\t\t$$.data.targets.map(d => $$.addName(d.values[config.tooltip_init_x])),\r\n\t\t\t\t\t$$.axis.getXAxisTickFormat(), $$.getYFormat($$.hasArcType()), $$.color));\r\n\r\n\t\t\t$$.tooltip.style(\"top\", config.tooltip_init_position.top)\r\n\t\t\t\t.style(\"left\", config.tooltip_init_position.left)\r\n\t\t\t\t.style(\"display\", \"block\");\r\n\t\t}\r\n\t},\r\n\t/**\r\n\t * Returns the tooltip content(HTML string)\r\n\t * @private\r\n\t * @param {Object} data\r\n\t * @param {Function} default title format\r\n\t * @param {Function} default format for each data value in the tooltip.\r\n\t * @param {Object} $$.color(generateColor())\r\n\t * @returns {string} html\r\n\t */\r\n\tgetTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst titleFormat = config.tooltip_format_title || defaultTitleFormat;\r\n\t\tconst nameFormat = config.tooltip_format_name || (name => name);\r\n\t\tconst valueFormat = config.tooltip_format_value || defaultValueFormat;\r\n\t\tconst orderAsc = $$.isOrderAsc();\r\n\t\tlet text;\r\n\t\tlet i;\r\n\t\tlet title;\r\n\t\tlet value;\r\n\t\tlet name;\r\n\t\tlet bgcolor;\r\n\r\n\t\tif (config.data_groups.length === 0) {\r\n\t\t\td.sort((a, b) => {\r\n\t\t\t\tconst v1 = a ? a.value : null;\r\n\t\t\t\tconst v2 = b ? b.value : null;\r\n\r\n\t\t\t\treturn orderAsc ? v1 - v2 : v2 - v1;\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\tconst ids = $$.orderTargets($$.data.targets).map(i2 => i2.id);\r\n\r\n\t\t\td.sort((a, b) => {\r\n\t\t\t\tlet v1 = a ? a.value : null;\r\n\t\t\t\tlet v2 = b ? b.value : null;\r\n\r\n\t\t\t\tif (v1 > 0 && v2 > 0) {\r\n\t\t\t\t\tv1 = a ? ids.indexOf(a.id) : null;\r\n\t\t\t\t\tv2 = b ? ids.indexOf(b.id) : null;\r\n\t\t\t\t}\r\n\t\t\t\treturn orderAsc ? v1 - v2 : v2 - v1;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfor (i = 0; i < d.length; i++) {\r\n\t\t\tif (!(d[i] && (d[i].value || d[i].value === 0))) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tif (!text) {\r\n\t\t\t\ttitle = sanitise(titleFormat ? titleFormat(d[i].x) : d[i].x);\r\n\t\t\t\ttext = (title || title === 0 ? `${title} |
` : \"\");\r\n\t\t\t\ttext = ``;\r\n\t},\r\n\t/**\r\n\t * Returns the position of the tooltip\r\n\t * @private\r\n\t * @param {Object} data\r\n\t * @param {String} width\r\n\t * @param {String} hHeight\r\n\t * @param {HTMLElement} element\r\n\t * @returns {Object} top, left value\r\n\t */\r\n\ttooltipPosition(dataToShow, tWidth, tHeight, element) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst forArc = $$.hasArcType();\r\n\t\tconst isTouch = ($$.inputType === \"touch\");\r\n\t\tconst mouse = d3Mouse(element);\r\n\t\tlet svgLeft;\r\n\t\tlet tooltipLeft;\r\n\t\tlet tooltipRight;\r\n\t\tlet tooltipTop;\r\n\t\tlet chartRight;\r\n\r\n\t\t// Determin tooltip position\r\n\t\tif (forArc) {\r\n\t\t\ttooltipLeft = isTouch ? mouse[0] :\r\n\t\t\t\t(($$.width - ($$.isLegendRight ? $$.getLegendWidth() : 0)) / 2) + mouse[0];\r\n\t\t\ttooltipTop = isTouch ? mouse[1] + 20 : ($$.height / 2) + mouse[1] + 20;\r\n\t\t} else {\r\n\t\t\tsvgLeft = $$.getSvgLeft(true);\r\n\r\n\t\t\tif (config.axis_rotated) {\r\n\t\t\t\ttooltipLeft = svgLeft + mouse[0] + 100;\r\n\t\t\t\ttooltipRight = tooltipLeft + tWidth;\r\n\t\t\t\tchartRight = $$.currentWidth - $$.getCurrentPaddingRight();\r\n\t\t\t\ttooltipTop = $$.x(dataToShow[0].x) + 20;\r\n\t\t\t} else {\r\n\t\t\t\ttooltipLeft = svgLeft + $$.getCurrentPaddingLeft(true) + $$.x(dataToShow[0].x) + 20;\r\n\t\t\t\ttooltipRight = tooltipLeft + tWidth;\r\n\t\t\t\tchartRight = svgLeft + $$.currentWidth - $$.getCurrentPaddingRight();\r\n\t\t\t\ttooltipTop = mouse[1] + 15;\r\n\t\t\t}\r\n\r\n\t\t\tif (tooltipRight > chartRight) {\r\n\t\t\t\t// 20 is needed for Firefox to keep tooltip width\r\n\t\t\t\ttooltipLeft -= tooltipRight - chartRight + 20;\r\n\t\t\t}\r\n\r\n\t\t\tif (tooltipTop + tHeight > $$.currentHeight) {\r\n\t\t\t\ttooltipTop -= tHeight + 30;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (tooltipTop < 0) {\r\n\t\t\ttooltipTop = 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttop: tooltipTop,\r\n\t\t\tleft: tooltipLeft\r\n\t\t};\r\n\t},\r\n\t/**\r\n\t * Show the tooltip\r\n\t * @private\r\n\t * @param {Object} data\r\n\t * @param {HTMLElement} element\r\n\t */\r\n\tshowTooltip(selectedData, element) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\t\tconst forArc = $$.hasArcType();\r\n\t\tconst dataToShow = selectedData.filter(d => d && isValue(d.value));\r\n\t\tconst positionFunction = config.tooltip_position || $$.tooltipPosition;\r\n\r\n\t\tif (dataToShow.length === 0 || !config.tooltip_show) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$$.tooltip.html(\r\n\t\t\tconfig.tooltip_contents.call(\r\n\t\t\t\t$$,\r\n\t\t\t\tselectedData,\r\n\t\t\t\t$$.axis.getXAxisTickFormat(),\r\n\t\t\t\t$$.getYFormat(forArc),\r\n\t\t\t\t$$.color\r\n\t\t\t))\r\n\t\t\t.style(\"display\", \"block\");\r\n\r\n\t\t// Get tooltip dimensions\r\n\t\tconst tWidth = $$.tooltip.property(\"offsetWidth\");\r\n\t\tconst tHeight = $$.tooltip.property(\"offsetHeight\");\r\n\t\tconst position = positionFunction.call(this, dataToShow, tWidth, tHeight, element);\r\n\r\n\t\t// Set tooltip\r\n\t\t$$.tooltip\r\n\t\t\t.style(\"top\", `${position.top}px`)\r\n\t\t\t.style(\"left\", `${position.left}px`);\r\n\t},\r\n\t/**\r\n\t * Hide the tooltip\r\n\t * @private\r\n\t */\r\n\thideTooltip() {\r\n\t\tthis.tooltip.style(\"display\", \"none\");\r\n\t},\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/tooltip.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {isString, extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tsetTargetType(targetIds, type) {\r\n\t\tconst $$ = this;\r\n\t\tconst config = $$.config;\r\n\r\n\t\t$$.mapToTargetIds(targetIds).forEach(id => {\r\n\t\t\t$$.withoutFadeIn[id] = (type === config.data_types[id]);\r\n\t\t\tconfig.data_types[id] = type;\r\n\t\t});\r\n\r\n\t\tif (!targetIds) {\r\n\t\t\tconfig.data_type = type;\r\n\t\t}\r\n\t},\r\n\r\n\thasType(type, targetsValue) {\r\n\t\tconst $$ = this;\r\n\t\tconst types = $$.config.data_types;\r\n\t\tconst targets = targetsValue || $$.data.targets;\r\n\t\tlet has = false;\r\n\r\n\t\tif (targets && targets.length) {\r\n\t\t\ttargets.forEach(target => {\r\n\t\t\t\tconst t = types[target.id];\r\n\r\n\t\t\t\tif ((t && t.indexOf(type) >= 0) || (!t && type === \"line\")) {\r\n\t\t\t\t\thas = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else if (Object.keys(types).length) {\r\n\t\t\tObject.keys(types).forEach(id => {\r\n\t\t\t\tif (types[id] === type) {\r\n\t\t\t\t\thas = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\thas = $$.config.data_type === type;\r\n\t\t}\r\n\r\n\t\treturn has;\r\n\t},\r\n\r\n\thasArcType(targets) {\r\n\t\treturn this.hasType(\"pie\", targets) ||\r\n\t\t\tthis.hasType(\"donut\", targets) ||\r\n\t\t\tthis.hasType(\"gauge\", targets);\r\n\t},\r\n\r\n\tisLineType(d) {\r\n\t\tconst config = this.config;\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn !config.data_types[id] ||\r\n\t\t\t[\"line\", \"spline\", \"area\", \"area-spline\", \"step\", \"area-step\"]\r\n\t\t\t\t.indexOf(config.data_types[id]) >= 0;\r\n\t},\r\n\r\n\tisStepType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn [\"step\", \"area-step\"]\r\n\t\t\t.indexOf(this.config.data_types[id]) >= 0;\r\n\t},\r\n\r\n\tisSplineType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn [\"spline\", \"area-spline\"]\r\n\t\t\t.indexOf(this.config.data_types[id]) >= 0;\r\n\t},\r\n\r\n\tisAreaType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn [\"area\", \"area-spline\", \"area-step\"]\r\n\t\t\t.indexOf(this.config.data_types[id]) >= 0;\r\n\t},\r\n\r\n\tisBarType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn this.config.data_types[id] === \"bar\";\r\n\t},\r\n\r\n\tisScatterType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn this.config.data_types[id] === \"scatter\";\r\n\t},\r\n\r\n\tisPieType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn this.config.data_types[id] === \"pie\";\r\n\t},\r\n\r\n\tisGaugeType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn this.config.data_types[id] === \"gauge\";\r\n\t},\r\n\r\n\tisDonutType(d) {\r\n\t\tconst id = isString(d) ? d : d.id;\r\n\r\n\t\treturn this.config.data_types[id] === \"donut\";\r\n\t},\r\n\r\n\tisArcType(d) {\r\n\t\treturn this.isPieType(d) ||\r\n\t\t\tthis.isDonutType(d) ||\r\n\t\t\tthis.isGaugeType(d);\r\n\t},\r\n\r\n\tlineData(d) {\r\n\t\treturn this.isLineType(d) ? [d] : [];\r\n\t},\r\n\r\n\tarcData(d) {\r\n\t\treturn this.isArcType(d.data) ? [d] : [];\r\n\t},\r\n\r\n\tbarData(d) {\r\n\t\treturn this.isBarType(d) ? d.values : [];\r\n\t},\r\n\r\n\tlineOrScatterData(d) {\r\n\t\treturn this.isLineType(d) ||\r\n\t\t\tthis.isScatterType(d) ? d.values : [];\r\n\t},\r\n\r\n\tbarOrLineData(d) {\r\n\t\treturn this.isBarType(d) ||\r\n\t\t\tthis.isLineType(d) ? d.values : [];\r\n\t},\r\n\r\n\t// https://github.com/d3/d3-shape#curves\r\n\tisInterpolationType(type) {\r\n\t\treturn [\r\n\t\t\t\"basis\",\r\n\t\t\t\"basis-closed\",\r\n\t\t\t\"basis-open\",\r\n\t\t\t\"bundle\",\r\n\t\t\t\"cardinal\",\r\n\t\t\t\"cardinal-closed\",\r\n\t\t\t\"cardinal-open\",\r\n\t\t\t\"catmull-rom\",\r\n\t\t\t\"catmull-rom-closed\",\r\n\t\t\t\"catmull-rom-open\",\r\n\t\t\t\"linear\",\r\n\t\t\t\"linear-closed\",\r\n\t\t\t\"monotone-x\",\r\n\t\t\t\"monotone-y\",\r\n\t\t\t\"natural\"\r\n\t\t].indexOf(type) >= 0;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/type.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport ChartInternal from \"./ChartInternal\";\r\nimport {extend} from \"./util\";\r\n\r\nextend(ChartInternal.prototype, {\r\n\tisSafari() {\r\n\t\tconst ua = window.navigator.userAgent;\r\n\r\n\t\treturn ua.indexOf(\"Safari\") >= 0 &&\r\n\t\t\tua.indexOf(\"Chrome\") < 0;\r\n\t},\r\n\r\n\tisChrome() {\r\n\t\treturn window.navigator.userAgent\r\n\t\t\t.indexOf(\"Chrome\") >= 0;\r\n\t}\r\n});\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/ua.js","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/scss/main.scss\n// module id = 57\n// module chunks = 0 1","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\n/**\r\n * Class to set options on generating chart.\r\n * - It's instantiated internally, not exposed for public.\r\n * @class Options\r\n * @see {@link bb.generate} to use these options on generating the chart\r\n */\r\nexport default class Options {\r\n\tconstructor() {\r\n\t\tthis.value = {\r\n\t\t\t/**\r\n\t\t\t * bindto The CSS selector or the element which the chart will be set to. D3 selection object can be specified. If other chart is set already, it will be replaced with the new one (only one chart can be set in one element).
\r\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.
\r\n\t\t\t * > NOTE: When chart is not binded, bb starts observing if chart.element is binded by MutationObserver. In this case, polyfill is required in IE9 and IE10 becuase they do not support MutationObserver. On the other hand, if chart always will be binded, polyfill will not be required because MutationObserver will never be called.\r\n\t\t\t * @name bindto\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default #chart\r\n\t\t\t * @example\r\n\t\t\t * bindto: \"#myContainer\"\r\n\t\t\t *\r\n\t\t\t * // or element\r\n\t\t\t * bindto: document.getElementById(\"myContainer\")\r\n\t\t\t *\r\n\t\t\t * // or D3 selection object\r\n\t\t\t * bindto: d3.select(\"#myContainer\")\r\n\t\t\t */\r\n\t\t\tbindto: \"#chart\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Set svg element's class name\r\n\t\t\t * @name svg\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {String} [svg.classname] class name for svg element\r\n\t\t\t * @example\r\n\t\t\t * svg: {\r\n * classname: \"test_class\"\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tsvg_classname: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * The desired size of the chart element.\r\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.\r\n\t\t\t * @name size\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Number} [size.width] width of the chart element\r\n\t\t\t * @property {Number} [size.height] height of the chart element\r\n\t\t\t * @example\r\n\t\t\t * size: {\r\n * width: 640,\r\n * height: 480\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tsize_width: undefined,\r\n\t\t\tsize_height: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * The padding of the chart element.\r\n\t\t\t * @name padding\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Number} [padding.top] padding on the top of chart\r\n\t\t\t * @property {Number} [padding.right] padding on the right of chart\r\n\t\t\t * @property {Number} [padding.bottom] padding on the bottom of chart\r\n\t\t\t * @property {Number} [padding.left] padding on the left of chart\r\n\t\t\t * @example\r\n\t\t\t * padding: {\r\n * top: 20,\r\n * right: 20,\r\n * bottom: 20,\r\n * left: 20\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tpadding_left: undefined,\r\n\t\t\tpadding_right: undefined,\r\n\t\t\tpadding_top: undefined,\r\n\t\t\tpadding_bottom: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set chart resize options\r\n\t\t\t * @name resize\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [resize.auto=true] Set chart resize automatically on viewport changes.\r\n\t\t\t * @example\r\n\t\t\t * resize: {\r\n\t\t\t * auto: false\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tresize_auto: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set zoom options\r\n\t\t\t * @name zoom\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [zoom.enabled=false] Enable zooming.\r\n\t\t\t * @property {Boolean} [zoom.rescale=false] Enable to rescale after zooming.
\r\n\t\t\t * If true set, y domain will be updated according to the zoomed region.\r\n\t\t\t * @property {Array} [zoom.extent=[1, 10]] Change zoom extent.\r\n\t\t\t * @property {Function} [zoom.onzoom=function(){}] Set callback that is called when the chart is zooming.
\r\n\t\t\t * Specified function receives the zoomed domain.\r\n\t\t\t * @property {Function} [zoom.onzoomstart=function(){}] Set callback that is called when zooming starts.
\r\n\t\t\t * Specified function receives the zoom event.\r\n\t\t\t * @property {Function} [zoom.onzoomend=function(){}] Set callback that is called when zooming ends.
\r\n\t\t\t * Specified function receives the zoomed domain.\r\n\t\t\t * @example\r\n\t\t\t * zoom: {\r\n\t\t\t * enabled: true,\r\n\t\t\t * rescale: true,\r\n\t\t\t * extent: [1, 100] // enable more zooming\r\n\t\t\t * onzoom: function(domain) { ... },\r\n\t\t\t * onzoomstart: function(event) { ... },\r\n\t\t\t * onzoomend: function(domain) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tzoom_enabled: false,\r\n\t\t\tzoom_extent: undefined,\r\n\t\t\tzoom_privileged: false,\r\n\t\t\tzoom_rescale: false,\r\n\t\t\tzoom_onzoom: () => {},\r\n\t\t\tzoom_onzoomstart: () => {},\r\n\t\t\tzoom_onzoomend: () => {},\r\n\t\t\tzoom_x_min: undefined,\r\n\t\t\tzoom_x_max: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Interaction options\r\n\t\t\t * @name interaction\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [interaction.enabled=true] Indicate if the chart should have interactions.
\r\n\t\t\t * If `false` is set, all of interactions (showing/hiding tooltip, selection, mouse events, etc) will be disabled.\r\n\t\t\t * @property {Boolean} [interaction.brighten=true]\r\n\t\t\t * @property {Boolean} [interaction.inputType.mouse=true] enable or disable mouse interaction\r\n\t\t\t * @property {Boolean} [interaction.inputType.touch=true] enable or disable touch interaction\r\n\t\t\t * @example\r\n\t\t\t * interaction: {\r\n * enabled: false,\r\n * inputType: {\r\n * mouse: true,\r\n * touch: false\r\n * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tinteraction_brighten: true,\r\n\t\t\tinteraction_enabled: true,\r\n\t\t\tinteraction_inputType_mouse: true,\r\n\t\t\tinteraction_inputType_touch: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback to execute when mouse/touch enters the chart.\r\n\t\t\t * @name onover\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * onover: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tonover: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback to execute when mouse/touch leaves the chart.\r\n\t\t\t * @name onout\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * onout: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tonout: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback to execute when user resizes the screen.\r\n\t\t\t * @name onresize\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * onresize: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tonresize: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * SSet a callback to execute when screen resize finished.\r\n\t\t\t * @name onresized\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * onresized: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tonresized: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback to execute when the chart is initialized.\r\n\t\t\t * @name oninit\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * oninit: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\toninit: () => {},\r\n\r\n\t\t\t/**\r\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.\r\n\t\t\t * @name onrendered\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function(){}\r\n\t\t\t * @example\r\n\t\t\t * onrendered: function() {\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tonrendered: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set duration of transition (in milliseconds) for chart animation.
\r\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.\r\n\t\t\t * @name transition\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Number} [transition.duration=350] duration in milliseconds\r\n\t\t\t * @example\r\n\t\t\t * transition: {\r\n\t\t\t * duration: 500\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\ttransition_duration: 350,\r\n\r\n\t\t\t/**\r\n\t\t\t * Specify the key of x values in the data.
\r\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.\r\n\t\t\t * @name data:x\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * x: \"date\"\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_x: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Specify the keys of the x values for each data.
\r\n\t\t\t * This option can be used if we want to show the data that has different x values.\r\n\t\t\t * @name data:xs\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * xs: {\r\n * data1: \"x1\",\r\n * data2: \"x2\"\r\n * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_xs: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a format to parse string specifed as x.\r\n\t\t\t * @name data:xFormat\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default %Y-%m-%d\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * xFormat: \"%Y-%m-%d %H:%M:%S\"\r\n\t\t\t * }\r\n\t\t\t * @see [D3's time specifier](https://npm.runkit.com/d3-time-format)\r\n\t\t\t */\r\n\t\t\tdata_xFormat: \"%Y-%m-%d\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Set localtime format to parse x axis.\r\n\t\t\t * @name data:xLocaltime\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * xLocaltime: false\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_xLocaltime: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Sort on x axis.\r\n\t\t\t * @name data:xSort\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * xSort: false\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_xSort: true,\r\n\t\t\tdata_idConverter: id => id,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set custom data name.\r\n\t\t\t * @name data:names\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * names: {\r\n * data1: \"Data Name 1\",\r\n * data2: \"Data Name 2\"\r\n * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_names: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set custom data class.
\r\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).\r\n\t\t\t * @name data:classes\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * classes: {\r\n * data1: \"additional-data1-class\",\r\n * data2: \"additional-data2-class\"\r\n * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_classes: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set groups for the data for stacking.\r\n\t\t\t * @name data:groups\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default []\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n * groups: [\r\n * [\"data1\", \"data2\"],\r\n * [\"data3\"]\r\n * ]\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_groups: [],\r\n\r\n\t\t\t/**\r\n\t\t\t * Set y axis the data related to. y and y2 can be used.\r\n\t\t\t * @name data:axes\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * axes: {\r\n\t\t\t * data1: \"y\",\r\n\t\t\t * data2: \"y2\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_axes: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set chart type at once.
\r\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.
\r\n\t\t\t * Available Values:\r\n\t\t\t * - line\r\n\t\t\t * - spline\r\n\t\t\t * - step\r\n\t\t\t * - area\r\n\t\t\t * - area-spline\r\n\t\t\t * - area-step\r\n\t\t\t * - bar\r\n\t\t\t * - scatter\r\n\t\t\t * - pie\r\n\t\t\t * - donut\r\n\t\t\t * - gauge\r\n\t\t\t * @name data:type\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default line\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * type: \"bar\"\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_type: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set chart type for each data.
\r\n\t\t\t * This setting overwrites data.type setting.\r\n\t\t\t * @name data:types\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * types: {\r\n\t\t\t * data1: \"bar\",\r\n\t\t\t * data2: \"spline\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_types: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Show labels on each data points.\r\n\t\t\t * @name data:labels\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * labels: true\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\t/**\r\n\t\t\t * Set formatter function for data labels.
\r\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:
\r\n\t\t\t * - `v` is the value of the data point where the label is shown.\r\n\t\t\t * - `id` is the id of the data where the label is shown.\r\n\t\t\t * - `i` is the index of the data point where the label is shown.\r\n\t\t\t * - `j` is the sub index of the data point where the label is shown.
\r\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('$'))\r\n\t\t\t * @name data:labels:format\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * labels: {\r\n\t\t\t * format: function(v, id, i, j) { ... }\r\n\t\t\t * // it's possible to set for each data\r\n\t\t\t * //format: {\r\n\t\t\t * // data1: function(v, id, i, j) { ... },\r\n\t\t\t * // ...\r\n\t\t\t * //}\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_labels: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * This option changes the order of stacking the data and pieces of pie/donut. If `null` specified, it will be the order the data loaded. If function specified, it will be used to sort the data and it will recieve the data as argument.
\r\n\t\t\t * Available Values:\r\n\t\t\t * - desc\r\n\t\t\t * - asc\r\n\t\t\t * - function(data1, data2) { ... }\r\n\t\t\t * - null\r\n\t\t\t * @name data:order\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String|Function}\r\n\t\t\t * @default desc\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * lorder: \"asc\"\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_order: \"desc\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Define regions for each data.
\r\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.
\r\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.\r\n\t\t\t * @name data:regions\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * regions: {\r\n\t\t\t * data1: [{\r\n\t\t\t * \"start\": 1,\r\n\t\t\t * \"end\": 2,\r\n\t\t\t * \"style\": \"dashed\"\r\n\t\t\t * }, {\r\n\t\t\t * \"start\":3\r\n\t\t\t * }],\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_regions: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set color converter function.
\r\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').\r\n\t\t\t * @name data:color\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * color: function(color, d) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_color: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set color for each data.\r\n\t\t\t * @name data:colors\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * colors: {\r\n\t\t\t * data1: \"#ff0000\",\r\n\t\t\t * ...\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_colors: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Hide each data when the chart appears.
\r\n\t\t\t * If true specified, all of data will be hidden. If multiple ids specified as an array, those will be hidden.\r\n\t\t\t * @name data:hide\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean|Array}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * // all of data will be hidden\r\n\t\t\t * hide: true\r\n\t\t\t * // specified data will be hidden\r\n\t\t\t * hide: [\"data1\", ...]\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_hide: false,\r\n\t\t\tdata_filter: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set data selection enabled.
\r\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).\r\n\t\t\t * @name data:selection:enabled\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * selection: {\r\n\t\t\t * enabled: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_selection_enabled: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set grouped selection enabled.
\r\n\t\t\t * If this option set true, multiple data points that have same x value will be selected by one selection.\r\n\t\t\t * @name data:selection:grouped\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * selection: {\r\n\t\t\t * grouped: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_selection_grouped: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for each data point to determine if it's selectable or not.
\r\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.\r\n\t\t\t * @name data:selection:isselectable\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() { return true; }\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * selection: {\r\n\t\t\t * isselectable: function(d) { ... }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_selection_isselectable: () => true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set multiple data points selection enabled.
\r\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.\r\n\t\t\t * @name data:selection:multiple\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * selection: {\r\n\t\t\t * multiple: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_selection_multiple: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Enable to select data points by dragging.
\r\n\t\t\t * If this option set true, data points can be selected by dragging.\r\n\t\t\t * Note: If this option set true, scrolling on the chart will be disabled because dragging event will handle the event.\r\n\t\t\t * @name data:selection:draggable\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * selection: {\r\n\t\t\t * draggable: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_selection_draggable: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for click event on each data point.
\r\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.\r\n\t\t\t * @name data:onclick\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * onclick: function(d, element) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_onclick: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for mouse/touch over event on each data point.
\r\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.\r\n\t\t\t * @name data:onover\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * onover: function(d) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_onover: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for mouse/touch out event on each data point.
\r\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.\r\n\t\t\t * @name data:onout\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * onout: function(d) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_onout: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for on data selection.\r\n\t\t\t * @name data:onselected\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * onselected: function(d) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_onselected: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set a callback for on data un-selection.\r\n\t\t\t * @name data:onunselected\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default function() {}\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * onunselected: function(d) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_onunselected: () => {},\r\n\t\t\tdata_url: undefined,\r\n\t\t\tdata_headers: undefined,\r\n\t\t\tdata_json: undefined,\r\n\t\t\tdata_rows: undefined,\r\n\t\t\tdata_columns: undefined,\r\n\t\t\tdata_mimeType: undefined,\r\n\t\t\tdata_keys: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set text displayed when empty data.\r\n\t\t\t * @name data:empty:label:text\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default \"\"\r\n\t\t\t * @example\r\n\t\t\t * data: {\r\n\t\t\t * empty: {\r\n\t\t\t * label: {\r\n\t\t\t * text: \"No Data\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdata_empty_label_text: \"\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Set subchart options\r\n\t\t\t * @name subchart\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [subchart.show=false] Show sub chart on the bottom of the chart.\r\n\t\t\t * @property {Boolean} [subchart.size.height] Change the height of the subchart.\r\n\t\t\t * @property {Boolean} [subchart.onbrush] Set callback for brush event.
\r\n\t\t\t * Specified function receives the current zoomed x domain.\r\n\t\t\t * @example\r\n\t\t\t * subchart: {\r\n\t\t\t * show: true,\r\n\t\t\t * size: {\r\n\t\t\t * height: 20\r\n\t\t\t * },\r\n\t\t\t * onbrush: function(domain) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tsubchart_show: false,\r\n\t\t\tsubchart_size_height: 60,\r\n\t\t\tsubchart_axis_x_show: true,\r\n\t\t\tsubchart_onbrush: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set color of the data values\r\n\t\t\t * @name color\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Array} [color.pattern] custom color pattern\r\n\t\t\t * @property {Object} [color.threshold] color threshold\r\n\t\t\t * @property {String} [color.threshold.unit] unit\r\n\t\t\t * @property {Array} [color.threshold.value] value\r\n\t\t\t * @property {Array} [color.threshold.max=100] max value\r\n\t\t\t * @example\r\n\t\t\t * color: {\r\n\t\t\t * pattern: [\"#1f77b4\", \"#aec7e8\", ...]\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tcolor_pattern: [],\r\n\t\t\tcolor_threshold: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Legend options\r\n\t\t\t * @name legend\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [legend.show=true] Show or hide legend.\r\n\t\t\t * @property {Boolean} [legend.hide=false] Hide legend\r\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.\r\n\t\t\t * @property {String} [legend.position=bottom] Change the position of legend.
\r\n\t\t\t * Available values are: `bottom`, `right` and `inset` are supported.\r\n\t\t\t * @property {Object} [legend.inset={anchor: 'top-left',x: 10,y: 0,step: undefined}] Change inset legend attributes.
\r\n\t\t\t * This option accepts object that has the keys anchor, x, y and step.\r\n\t\t\t * anchor decides the position of the legend. These anchors are available:\r\n\t\t\t * - top-left\r\n\t\t\t * - top-right\r\n\t\t\t * - bottom-left\r\n\t\t\t * - bottom-right\r\n\t\t\t * x and y set the position of the legend based on the anchor.
\r\n\t\t\t * step defines the max step the lagend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).\r\n\t\t\t * @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.\r\n\t\t\t * @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.\r\n\t\t\t * @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.\r\n\t\t\t * @example\r\n\t\t\t * legend: {\r\n\t\t\t * show: true,\r\n\t\t\t * hide: true,\r\n\t\t\t * //or hide: \"data1\"\r\n * //or hide: [\"data1\", \"data2\"]\r\n * position: \"bottom\", // bottom, right, inset\r\n\t\t\t * inset: {\r\n\t\t\t * anchor: \"top-right\" // top-left, top-right, bottom-left, bottom-right\r\n\t\t\t * x: 20,\r\n\t\t\t * y: 10,\r\n\t\t\t * step: 2\r\n\t\t\t * },\r\n\t\t\t * onclick: function(id) { ... },\r\n\t\t\t * onover: function(id) { ... },\r\n\t\t\t * onout: function(id) { ... }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tlegend_show: true,\r\n\t\t\tlegend_hide: false,\r\n\t\t\tlegend_position: \"bottom\",\r\n\t\t\tlegend_inset_anchor: \"top-left\",\r\n\t\t\tlegend_inset_x: 10,\r\n\t\t\tlegend_inset_y: 0,\r\n\t\t\tlegend_inset_step: undefined,\r\n\t\t\tlegend_item_onclick: undefined,\r\n\t\t\tlegend_item_onover: undefined,\r\n\t\t\tlegend_item_onout: undefined,\r\n\t\t\tlegend_equally: false,\r\n\t\t\tlegend_padding: 0,\r\n\t\t\tlegend_item_tile_width: 10,\r\n\t\t\tlegend_item_tile_height: 10,\r\n\r\n\t\t\t/**\r\n\t\t\t * Switch x and y axis position.\r\n\t\t\t * @name axis:rotated\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * rotated: true\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_rotated: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show or hide x axis.\r\n\t\t\t * @name axis:x:show\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * show: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_show: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set type of x axis.
\r\n\t\t\t * Available Values:\r\n\t\t\t * -timeseries\r\n\t\t\t * -category\r\n\t\t\t * -indexed\r\n\t\t\t * @name axis:x:type\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default indexed\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * type: \"timeseries\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_type: \"indexed\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Set how to treat the timezone of x values.
\r\n\t\t\t * If true, treat x value as localtime. If false, convert to UTC internally.\r\n\t\t\t * @name axis:x:localtime\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * localtime: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_localtime: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set category names on category axis.\r\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.\r\n\t\t\t * @name axis:x:categories\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default []\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * categories: [\"Category 1\", \"Category 2\", ...]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_categories: [],\r\n\r\n\t\t\t/**\r\n\t\t\t * Centerise ticks on category axis.\r\n\t\t\t * @name axis:x:tick:centered\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * centered: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_centered: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * A function to format tick value. Format string is also available for timeseries data.\r\n\t\t\t * @name axis:x:tick:format\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * format: function(x) {\r\n\t\t\t * return x.getFullYear();\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_format: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Setting for culling ticks.
\r\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.
\r\n\t\t\t * We can change the number of ticks to be shown by axis.x.tick.culling.max.\r\n\t\t\t * @name axis:x:tick:culling\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default\r\n\t\t\t * - true for indexed axis and timeseries axis\r\n\t\t\t * - false for category axis\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * culling: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_culling: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * The number of tick texts will be adjusted to less than this value.\r\n\t\t\t * @name axis:x:tick:culling:max\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default 10\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * culling: {\r\n\t\t\t * max: 5\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_culling_max: 10,\r\n\r\n\t\t\t/**\r\n\t\t\t * The number of x axis ticks to show.
\r\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).\r\n\t\t\t * @name axis:x:tick:count\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * count: 5\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_count: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Fit x axis ticks.
\r\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.\r\n\t\t\t * @name axis:x:tick:fit\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * fit: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_fit: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the x values of ticks manually.
\r\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.\r\n\t\t\t * @name axis:x:tick:values\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default null\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * values: [1, 2, 4, 8, 16, 32, ...]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_values: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Rotate x axis tick text.
\r\n\t\t\t * If you set negative value, it will rotate to opposite direction.\r\n\t\t\t * @name axis:x:tick:rotate\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default 0\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * rotate: 60\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_rotate: 0,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show x axis outer tick.\r\n\t\t\t * @name axis:x:tick:outer\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * outer: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_outer: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set tick text to be multiline\r\n\t\t\t * @name axis:x:tick:multiline\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * multiline: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_multiline: true,\r\n\r\n\r\n\t\t\t/**\r\n\t\t\t * Set tick width\r\n\t\t\t * @name axis:x:tick:width\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default null\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * width: 50\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_tick_width: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set max value of x axis range.\r\n\t\t\t * @name axis:x:max\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * max: 100\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_max: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set min value of x axis range.\r\n\t\t\t * @name axis:x:min\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * min: -100\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_min: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set padding for x axis.
\r\n\t\t\t * If this option is set, the range of x axis will increase/decrease according to the values. If no padding is needed in the ragen of x axis, 0 should be set. On category axis, this option will be ignored.\r\n\t\t\t * @name axis:x:padding\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * padding: {\r\n\t\t\t * left: 0,\r\n\t\t\t * right: 0\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_padding: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set height of x axis.
\r\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.\r\n\t\t\t * @name axis:x:height\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * height: 20\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_height: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set default extent for subchart and zoom. This can be an array or function that returns an array.\r\n\t\t\t * @name axis:x:extent\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * // [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner\r\n\t\t\t * // https://github.com/d3/d3-brush/blob/master/src/brush.js#L521\r\n\t\t\t * extent: [[0, 0], [200, 60]]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_extent: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set label on x axis.
\r\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.\r\n\t\t\t * - If it's horizontal axis:\r\n\t\t\t * - inner-right [default]\r\n\t\t\t * - inner-center\r\n\t\t\t * - inner-left\r\n\t\t\t * - outer-right\r\n\t\t\t * - outer-center\r\n\t\t\t * - outer-left\r\n\t\t\t * - If it's vertical axis:\r\n\t\t\t * - inner-top [default]\r\n\t\t\t * - inner-middle\r\n\t\t\t * - inner-bottom\r\n\t\t\t * - outer-top\r\n\t\t\t * - outer-middle\r\n\t\t\t * - outer-bottom\r\n\t\t\t * @name axis:x:label\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String|Object}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * label: \"Your X Axis\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t *\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * label: {\r\n\t\t\t * text: \"Your X Axis\",\r\n\t\t\t * position: \"outer-center\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_x_label: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Show or hide y axis.\r\n\t\t\t * @name axis:y:show\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * show: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_show: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set type of y axis.\r\n\t\t\t * Available Values:\r\n\t\t\t * -timeseries\r\n\t\t\t * -category\r\n\t\t\t * -indexed\r\n\t\t\t * @name axis:y:type\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * type: \"timeseries\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_type: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set max value of y axis.\r\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).\r\n\t\t\t * @name axis:y:max\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * max: 1000\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_max: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set min value of y axis.\r\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).\r\n\t\t\t * @name axis:y:min\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * min: 1000\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_min: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Change the direction of y axis.
\r\n\t\t\t * If true set, the direction will be from the top to the bottom.\r\n\t\t\t * @name axis:y:inverted\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * inverted: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_inverted: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set center value of y axis.\r\n\t\t\t * @name axis:y:center\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * center: 0\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_center: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show y axis inside of the chart.\r\n\t\t\t * @name axis:y:inner\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * inner: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_inner: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set label on y axis.
\r\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.\r\n\t\t\t * @name axis:y:label\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String|Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * label: \"Your Y Axis\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t *\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * label: {\r\n\t\t\t * text: \"Your Y Axis\",\r\n\t\t\t * position: \"outer-middle\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_label: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set formatter for y axis tick text.
\r\n\t\t\t * This option accepts d3.format object as well as a function you define.\r\n\t\t\t * @name axis:y:format\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * x: {\r\n\t\t\t * tick: {\r\n\t\t\t * format: function(x) {\r\n\t\t\t * return x.getFullYear();\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_tick_format: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show y axis outer tick.\r\n\t\t\t * @name axis:y:tick:outer\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * tick: {\r\n\t\t\t * outer: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_tick_outer: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set y axis tick values manually.\r\n\t\t\t * @name axis:y:tick:values\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default null\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * tick: {\r\n\t\t\t * values: [100, 1000, 10000]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_tick_values: null,\r\n\t\t\taxis_y_tick_rotate: 0,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the number of y axis ticks.
\r\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.\r\n\t\t\t * @name axis:y:tick:count\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * tick: {\r\n\t\t\t * count: 5\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_tick_count: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the number of y axis ticks.
\r\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.\r\n\t\t\t * @name axis:y:tick:time\r\n\t\t\t * @memberof Options\r\n\t\t\t * @private\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Function} [time.value] D3's time interval function (https://github.com/d3/d3-time#intervals)\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * tick: {\r\n\t\t\t * time: {\r\n\t\t\t * // ticks at 15-minute intervals\r\n\t\t\t * // https://github.com/d3/d3-scale/blob/master/README.md#time_ticks\r\n\t\t\t * value: d3.timeMinute.every(15)\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\t// @TODO: not fully implemented yet\r\n\t\t\taxis_y_tick_time_value: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set padding for y axis.
\r\n\t\t\t * You can set padding for y axis to create more space on the edge of the axis. This option accepts object and it can include top and bottom. top, bottom will be treated as pixels.\r\n\t\t\t * @name axis:y:padding\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * padding: {\r\n\t\t\t * top: 0,\r\n\t\t\t * bottom: 0\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_padding: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set default range of y axis.
\r\n\t\t\t * This option set the default value for y axis when there is no data on init.\r\n\t\t\t * @name axis:y:default\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y: {\r\n\t\t\t * default: [0, 1000]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y_default: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show or hide y2 axis.\r\n\t\t\t * @name axis:y2:show\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * show: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_show: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set max value of y2 axis.\r\n\t\t\t * @name axis:y2:max\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * max: 1000\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_max: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set min value of y2 axis.\r\n\t\t\t * @name axis:y2:min\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * min: -1000\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_min: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Change the direction of y2 axis.
\r\n\t\t\t * If true set, the direction will be from the top to the bottom.\r\n\t\t\t * @name axis:y2:inverted\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * inverted: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_inverted: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set center value of y2 axis.\r\n\t\t\t * @name axis:y2:center\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * center: 0\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_center: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show y2 axis inside of the chart.\r\n\t\t\t * @name axis:y2:inner\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default false\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * inner: true\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_inner: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set label on y2 axis.
\r\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.\r\n\t\t\t * @name axis:y2:label\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {String|Object}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * label: \"Your Y2 Axis\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t *\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * label: {\r\n\t\t\t * text: \"Your Y2 Axis\",\r\n\t\t\t * position: \"outer-middle\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_label: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set formatter for y2 axis tick text.
\r\n\t\t\t * This option works in the same way as axis.y.format.\r\n\t\t\t * @name axis:y2:tick:format\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Function}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * tick: {\r\n\t\t\t * format: d3.format(\"$,\")\r\n\t\t\t * //or format: function(d) { return \"$\" + d; }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_tick_format: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Show or hide y2 axis outer tick.\r\n\t\t\t * @name axis:y2:tick:outer\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Boolean}\r\n\t\t\t * @default true\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * tick: {\r\n\t\t\t * outer: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_tick_outer: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set y2 axis tick values manually.\r\n\t\t\t * @name axis:y2:tick:values\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default null\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * tick: {\r\n\t\t\t * values: [100, 1000, 10000]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_tick_values: null,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the number of y2 axis ticks.\r\n\t\t\t * Note: This works in the same way as axis.y.tick.count.\r\n\t\t\t * @name axis:y2:tick:count\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * tick: {\r\n\t\t\t * count: 5\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_tick_count: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set the number of y2 axis ticks.\r\n\t\t\t * Note: This works in the same way as axis.y.tick.count.\r\n\t\t\t * @name axis:y2:padding\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Number}\r\n\t\t\t * @default {}\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * padding: {\r\n\t\t\t * top: 100,\r\n\t\t\t * bottom: 100\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_padding: {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set default range of y2 axis.
\r\n\t\t\t * This option set the default value for y2 axis when there is no data on init.\r\n\t\t\t * @name axis:y2:default\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * axis: {\r\n\t\t\t * y2: {\r\n\t\t\t * default: [0, 1000]\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\taxis_y2_default: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set related options\r\n\t\t\t * @name grid\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [x.show=false] Show grids along x axis.\r\n\t\t\t * @property {Boolean} [x.lines=[]] Show additional grid lines along x axis.
\r\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.\r\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.\r\n\t\t\t * @property {Boolean} [y.show=false] Show grids along x axis.\r\n\t\t\t * @property {Boolean} [y.lines=[]] Show additional grid lines along y axis.
\r\n\t\t\t * This option accepts array including object that has value, text, position and class.\r\n\t\t\t * @property {Boolean} [y.ticks=10]\r\n\t\t\t * @property {Boolean} [focus.show=true] Show grids when focus.\r\n\t\t\t * @property {Boolean} [lines.front=true]\r\n\t\t\t * @default undefined\r\n\t\t\t * @example\r\n\t\t\t * grid: {\r\n\t\t\t * x: {\r\n\t\t\t * show: true,\r\n\t\t\t * lines: [\r\n\t\t\t * {value: 2, text: \"Label on 2\"},\r\n\t\t\t * {value: 5, text: \"Label on 5\", class: \"label-5\"}\r\n\t\t\t * {value: 6, text: \"Label on 6\", position: \"start\"}\r\n\t\t\t * ]\r\n\t\t\t * },\r\n\t\t\t * \t y: {\r\n\t\t\t * show: true,\r\n\t\t\t * lines: [\r\n\t\t\t * {value: 100, text: \"Label on 100\"},\r\n\t\t\t * {value: 200, text: \"Label on 200\", class: \"label-200\"}\r\n\t\t\t * {value: 300, text: \"Label on 300\", position: 'middle'}\r\n\t\t\t * ],\r\n\t\t\t * ticks: 5\r\n\t\t\t * },\r\n\t\t\t * focus: {\r\n\t\t\t * show: false\r\n\t\t\t * },\r\n\t\t\t * lines: {\r\n\t\t\t * front: false\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tgrid_x_show: false,\r\n\t\t\tgrid_x_type: \"tick\",\r\n\t\t\tgrid_x_lines: [],\r\n\t\t\tgrid_y_show: false,\r\n\t\t\tgrid_y_lines: [],\r\n\t\t\tgrid_y_ticks: 10,\r\n\t\t\tgrid_focus_show: true,\r\n\t\t\tgrid_lines_front: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set point options\r\n\t\t\t * @name point\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [point.show=true] Whether to show each point in line.\r\n\t\t\t * @property {Number} [point.r=2.5] The radius size of each point.\r\n\t\t\t * @property {Boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.\r\n\t\t\t * @property {Boolean} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.\r\n\t\t\t * @property {Number} [point.select.r=point.r*4] The radius size of each point on selected.\r\n\t\t\t * @example\r\n\t\t\t * point: {\r\n\t\t\t * show: false,\r\n\t\t\t * r: 5,\r\n\t\t\t * focus: {\r\n\t\t\t * expand: {\r\n\t\t\t * enabled: true,\r\n\t\t\t * r: 1\r\n\t\t\t * }\r\n\t\t\t * },\r\n\t\t\t * select: {\r\n\t\t\t * r: 3\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tpoint_show: true,\r\n\t\t\tpoint_r: 2.5,\r\n\t\t\tpoint_sensitivity: 10,\r\n\t\t\tpoint_focus_expand_enabled: true,\r\n\t\t\tpoint_focus_expand_r: undefined,\r\n\t\t\tpoint_select_r: undefined,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set line options\r\n\t\t\t * @name line\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [line.connectNull=false] Set if null data point will be connected or not.
\r\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.\r\n\t\t\t * @property {Boolean} [line.step_type=step] Change step type for step chart.
\r\n\t\t\t * Available values:\r\n\t\t\t * - step\r\n\t\t\t * - step-before\r\n\t\t\t * - step-after\r\n\t\t\t * @example\r\n\t\t\t * line: {\r\n\t\t\t * connectNull: true,\r\n\t\t\t * step: {\r\n\t\t\t * type: \"step-after\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tline_connectNull: false,\r\n\t\t\tline_step_type: \"step\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Set bar options\r\n\t\t\t * @name bar\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Number} [bar.width] Change the width of bar chart.\r\n\t\t\t * @property {Number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.\r\n\t\t\t * @property {Number} [bar.width.max]\r\n\t\t\t * @property {Boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.\r\n\t\t\t * @example\r\n\t\t\t * bar: {\r\n\t\t\t * width: 10,\r\n\t\t\t * // or\r\n\t\t\t * width: {\r\n\t\t\t * ratio: 0.2,\r\n\t\t\t * max: 200\r\n\t\t\t * },\r\n\t\t\t * zerobased: false\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tbar_width: undefined,\r\n\t\t\tbar_width_ratio: 0.6,\r\n\t\t\tbar_width_max: undefined,\r\n\t\t\tbar_zerobased: true,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set area options\r\n\t\t\t * @name area\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.\r\n\t\t\t * @property {Boolean} [area.above=false]\r\n\t\t\t * @example\r\n\t\t\t * area: {\r\n\t\t\t * zerobased: false,\r\n\t\t\t * above: true\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tarea_zerobased: true,\r\n\t\t\tarea_above: false,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set pie options\r\n\t\t\t * @name pie\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [pie.label.show=true] Show or hide label on each pie piece.\r\n\t\t\t * @property {Function} [pie.label.format] Set formatter for the label on each pie piece.\r\n\t\t\t * @property {Number} [pie.label.threshold=0.05] Set threshold to show/hide labels.\r\n\t\t\t * @property {Boolean} [pie.expand=true] Enable or disable expanding pie pieces.\r\n\t\t\t * @property {Number} [pie.padAngle=0] Set padding between data.\r\n\t\t\t * @example\r\n\t\t\t * pie: {\r\n\t\t\t * label: {\r\n\t\t\t * show: false,\r\n\t\t\t * format: function(value, ratio, id) {\r\n\t\t\t * return d3.format(\"$\")(value);\r\n\t\t\t * },\r\n\t\t\t * threshold: 0.1\r\n\t\t\t * },\r\n\t\t\t * expand: false,\r\n\t\t\t * padAngle: 0.1\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tpie_label_show: true,\r\n\t\t\tpie_label_format: undefined,\r\n\t\t\tpie_label_threshold: 0.05,\r\n\t\t\tpie_label_ratio: undefined,\r\n\t\t\tpie_expand: {},\r\n\t\t\tpie_expand_duration: 50,\r\n\t\t\tpie_padAngle: 0,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set gauge options\r\n\t\t\t * @name gauge\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [gauge.fullCircle=false]\r\n\t\t\t * @property {Boolean} [gauge.label.show=true] Show or hide label on gauge.\r\n\t\t\t * @property {Function} [gauge.label.format] Set formatter for the label on gauge.\r\n\t\t\t * @property {Boolean} [gauge.expand=true] Enable or disable expanding gauge.\r\n\t\t\t * @property {Number} [gauge.expand.duration=50]\r\n\t\t\t * @property {Number} [gauge.min=0] Set min value of the gauge.\r\n\t\t\t * @property {Number} [gauge.max=100] Set max value of the gauge.\r\n\t\t\t * @property {Number} [gauge.startingAngle=-1 * Math.PI / 2]\r\n\t\t\t * @property {String} [gauge.units] Set units of the gauge.\r\n\t\t\t * @property {Number} [gauge.width] Set width of gauge chart.\r\n\t\t\t * @example\r\n\t\t\t * gauge: {\r\n\t\t\t * label: {\r\n\t\t\t * show: false,\r\n\t\t\t * format: function(value, ratio) {\r\n\t\t\t * return value;\r\n\t\t\t * }\r\n\t\t\t * },\r\n\t\t\t * expand: false,\r\n\t\t\t * min: -100,\r\n\t\t\t * max: 200,\r\n\t\t\t * units: \"%\",\r\n\t\t\t * width: 10\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tgauge_fullCircle: false,\r\n\t\t\tgauge_label_show: true,\r\n\t\t\tgauge_label_format: undefined,\r\n\t\t\tgauge_min: 0,\r\n\t\t\tgauge_max: 100,\r\n\t\t\tgauge_startingAngle: -1 * Math.PI / 2,\r\n\t\t\tgauge_label_extents: undefined,\r\n\t\t\tgauge_units: undefined,\r\n\t\t\tgauge_width: undefined,\r\n\t\t\tgauge_expand: {},\r\n\t\t\tgauge_expand_duration: 50,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set donut options\r\n\t\t\t * @name donut\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [donut.label.show=true] Show or hide label on each donut piece.\r\n\t\t\t * @property {Function} [donut.label.format] Set formatter for the label on each donut piece.\r\n\t\t\t * @property {Number} [donut.label.threshold=0.05] Set threshold to show/hide labels.\r\n\t\t\t * @property {Boolean} [donut.expand=true] Enable or disable expanding donut pieces.\r\n\t\t\t * @property {Number} [donut.width] Set width of donut chart.\r\n\t\t\t * @property {String} [donut.title=\"\"] Set title of donut chart.\r\n\t\t\t * @property {Number} [donut.padAngle=0] Set padding between data.\r\n\t\t\t * @example\r\n\t\t\t * donut: {\r\n\t\t\t * label: {\r\n\t\t\t * show: false,\r\n\t\t\t * format: function(value, ratio, id) {\r\n\t\t\t * return d3.format(\"$\")(value);\r\n\t\t\t * },\r\n\t\t\t * threshold: 0.1\r\n\t\t\t * },\r\n\t\t\t * expand: false,\r\n\t\t\t * width: 10,\r\n\t\t\t * title: \"Donut Title\",\r\n\t\t\t * padAngle: 0.2\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tdonut_label_show: true,\r\n\t\t\tdonut_label_format: undefined,\r\n\t\t\tdonut_label_threshold: 0.05,\r\n\t\t\tdonut_label_ratio: undefined,\r\n\t\t\tdonut_width: undefined,\r\n\t\t\tdonut_title: \"\",\r\n\t\t\tdonut_expand: {},\r\n\t\t\tdonut_expand_duration: 50,\r\n\t\t\tdonut_padAngle: 0,\r\n\r\n\t\t\t/**\r\n\t\t\t * Set spline options\r\n\t\t\t * @name spline\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {String} [spline.interpolation.type=cardinal]\r\n\t\t\t * @example\r\n\t\t\t * spline: {\r\n\t\t\t * interpolation: {\r\n\t\t\t * type: \"cardinal\"\r\n\t\t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\tspline_interpolation_type: \"cardinal\",\r\n\r\n\t\t\t/**\r\n\t\t\t * Show rectangles inside the chart.
\r\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.\r\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.\r\n\t\t\t * @name regions\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Array}\r\n\t\t\t * @default []\r\n\t\t\t * @example\r\n\t\t\t * regions: [\r\n\t\t\t *\t {\r\n\t\t\t *\t axis: \"x\",\r\n\t\t\t *\t start: 1,\r\n\t\t\t *\t end: 4,\r\n\t\t\t *\t class: \"region-1-4\"\r\n\t\t\t *\t }\r\n\t\t\t * ]\r\n\t\t\t */\r\n\t\t\tregions: [],\r\n\r\n\t\t\t/**\r\n\t\t\t * Tooltip options\r\n\t\t\t * @name tooltip\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {Boolean} [tooltip.show=true] Show or hide tooltip.
\r\n\t\t\t * @property {Boolean} [tooltip.grouped=true] Set if tooltip is grouped or not for the data points.\r\n\t\t\t * @property {Function} [tooltip.format.title] Set format for the title of tooltip.
\r\n\t\t\t * Specified function receives x of the data point to show.\r\n\t\t\t * @property {Function} [tooltip.format.name] Set format for the name of each data in tooltip.
\r\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.\r\n\t\t\t * @property {Function} [tooltip.format.value] Set format for the value of each data in tooltip.
\r\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.\r\n\t\t\t * If undefined returned, the row of that value will be skipped.\r\n\t\t\t * @property {function} [tooltip.position] Set custom position for the tooltip.
\r\n\t\t\t * This option can be used to modify the tooltip position by returning object that has top and left.\r\n\t\t\t * @property {function} [tooltip.contents] Set custom HTML for the tooltip.
\r\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.\r\n\t\t\t * @example\r\n\t\t\t * tooltip: {\r\n\t\t\t * show: true,\r\n\t\t\t * grouped: false,\r\n\t\t\t * format: {\r\n\t\t\t * title: function(x) { return \"Data \" + x; },\r\n\t\t\t * name: function(name, ratio, id, index) { return name; },\r\n\t\t\t * value: function(value, ratio, id, index) { return ratio; }\r\n\t\t\t * },\r\n\t\t\t * position: function(data, width, height, element) {\r\n\t\t\t * return {top: 0, left: 0}\r\n \t\t\t * },\r\n \t\t\t * contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\r\n \t\t\t * return ... // formatted html as you want\r\n \t\t * }\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\ttooltip_show: true,\r\n\t\t\ttooltip_grouped: true,\r\n\t\t\ttooltip_format_title: undefined,\r\n\t\t\ttooltip_format_name: undefined,\r\n\t\t\ttooltip_format_value: undefined,\r\n\t\t\ttooltip_position: undefined,\r\n\t\t\ttooltip_contents: function(d, defaultTitleFormat, defaultValueFormat, color) {\r\n\t\t\t\treturn this.getTooltipContent ?\r\n\t\t\t\t\tthis.getTooltipContent(d, defaultTitleFormat, defaultValueFormat, color) : \"\";\r\n\t\t\t},\r\n\t\t\ttooltip_init_show: false,\r\n\t\t\ttooltip_init_x: 0,\r\n\t\t\ttooltip_init_position: {\r\n\t\t\t\ttop: \"0px\",\r\n\t\t\t\tleft: \"50px\"\r\n\t\t\t},\r\n\t\t\ttooltip_onshow: () => {},\r\n\t\t\ttooltip_onhide: () => {},\r\n\r\n\t\t\t/**\r\n\t\t\t * Set title options\r\n\t\t\t * @name title\r\n\t\t\t * @memberof Options\r\n\t\t\t * @type {Object}\r\n\t\t\t * @property {String} [title.text]\r\n\t\t\t * @property {Number} [title.padding.top=0]\r\n\t\t\t * @property {Number} [title.padding.right=0]\r\n\t\t\t * @property {Number} [title.padding.bottom=0]\r\n\t\t\t * @property {Number} [title.padding.left=0]\r\n\t\t\t * @property {String} [title.position=top-center]\r\n\t\t\t * @example\r\n\t\t\t * title: {\r\n\t\t\t * text: \"Title Text\",\r\n\t\t\t * padding: {\r\n\t\t\t * top: 10,\r\n\t\t\t * right: 10,\r\n\t\t\t * bottom: 10,\r\n\t\t\t * left: 10\r\n\t\t\t * },\r\n\t\t\t * position: \"top-center\"\r\n\t\t\t * }\r\n\t\t\t */\r\n\t\t\ttitle_text: undefined,\r\n\t\t\ttitle_padding: {\r\n\t\t\t\ttop: 0,\r\n\t\t\t\tright: 0,\r\n\t\t\t\tbottom: 0,\r\n\t\t\t\tleft: 0\r\n\t\t\t},\r\n\t\t\ttitle_position: \"top-center\"\r\n\t\t};\r\n\t}\r\n}\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/config/Options.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\nimport * as d3 from \"d3\";\r\nimport Chart from \"./internals/Chart\";\r\nimport ChartInternal from \"./internals/ChartInternal\";\r\nimport Axis from \"./axis/Axis\";\r\nimport * as util from \"./internals/util\";\r\nimport \"./scss/main.scss\";\r\n\r\n/**\r\n * @namespace bb\r\n * @version 1.0.0\r\n */\r\nconst bb = {\r\n\t/**\r\n\t * Version information\r\n\t * @property {String} version version\r\n\t * @example\r\n\t * \tbb.version; // \"1.0.0\"\r\n\t * @memberof bb\r\n\t */\r\n\tversion: \"1.0.0\",\r\n\t/**\r\n\t * generate charts\r\n\t * @param {Options} options chart options\r\n\t * @memberof bb\r\n\t * @return {Chart}\r\n\t * @see {@link Options} for different generation options\r\n\t * @see {@link Chart} for different methods API\r\n\t * @example\r\n\t * \r\n\t * \r\n\t * @example\r\n\t * // generate chart with options\r\n\t * var chart = bb.generate({\r\n\t * \"bindto\": \"#LineChart\"\r\n\t * \"data\": {\r\n\t * \"columns\": [\r\n\t * [\"data1\", 30, 200, 100, 400, 150, 250],\r\n\t * [\"data2\", 50, 20, 10, 40, 15, 25]\r\n\t * ]\r\n\t * }\r\n\t * });\r\n\t *\r\n\t * // call some API\r\n\t * // ex) get the data of 'data1'\r\n\t * chart.data(\"data1\");\r\n\t */\r\n\tgenerate(config) {\r\n\t\treturn new Chart(config);\r\n\t},\r\n\tchart: {\r\n\t\tfn: Chart.prototype,\r\n\t\tinternal: {\r\n\t\t\tfn: ChartInternal.prototype,\r\n\t\t\taxis: {\r\n\t\t\t\tfn: Axis.prototype\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n\r\nfor (const p in util) {\r\n\t!/^__/.test(p) && (ChartInternal.prototype[p] = util[p]);\r\n}\r\n\r\nrequire(\"./config/config.js\");\r\nrequire(\"./internals/scale.js\");\r\nrequire(\"./internals/domain.js\");\r\nrequire(\"./data/data.js\");\r\nrequire(\"./data/data.convert.js\");\r\nrequire(\"./data/data.load.js\");\r\nrequire(\"./internals/category.js\");\r\nrequire(\"./interactions/interaction.js\");\r\nrequire(\"./internals/size.js\");\r\nrequire(\"./internals/shape.js\");\r\nrequire(\"./internals/shape.line.js\");\r\nrequire(\"./internals/shape.bar.js\");\r\nrequire(\"./internals/text.js\");\r\nrequire(\"./internals/type.js\");\r\nrequire(\"./internals/grid.js\");\r\nrequire(\"./internals/tooltip.js\");\r\nrequire(\"./internals/legend.js\");\r\nrequire(\"./internals/title.js\");\r\nrequire(\"./internals/clip.js\");\r\nrequire(\"./internals/arc.js\");\r\nrequire(\"./internals/region.js\");\r\nrequire(\"./interactions/drag.js\");\r\nrequire(\"./internals/selection.js\");\r\nrequire(\"./interactions/subchart.js\");\r\nrequire(\"./interactions/zoom.js\");\r\nrequire(\"./internals/color.js\");\r\nrequire(\"./internals/format.js\");\r\nrequire(\"./internals/cache.js\");\r\nrequire(\"./internals/class.js\");\r\nrequire(\"./api/api.focus.js\");\r\nrequire(\"./api/api.show.js\");\r\nrequire(\"./api/api.zoom.js\");\r\nrequire(\"./api/api.load.js\");\r\nrequire(\"./api/api.flow.js\");\r\nrequire(\"./api/api.selection.js\");\r\nrequire(\"./api/api.transform.js\");\r\nrequire(\"./api/api.group.js\");\r\nrequire(\"./api/api.grid.js\");\r\nrequire(\"./api/api.region.js\");\r\nrequire(\"./api/api.data.js\");\r\nrequire(\"./api/api.category.js\");\r\nrequire(\"./api/api.color.js\");\r\nrequire(\"./api/api.x.js\");\r\nrequire(\"./api/api.axis.js\");\r\nrequire(\"./api/api.legend.js\");\r\nrequire(\"./api/api.chart.js\");\r\nrequire(\"./api/api.tooltip.js\");\r\nrequire(\"./axis/bb.axis.js\");\r\nrequire(\"./internals/ua.js\");\r\n\r\nexport {bb, d3};\r\n\n\n\n// WEBPACK FOOTER //\n// src/core.js","/**\r\n * Copyright (c) 2017 NAVER Corp.\r\n * billboard.js project is licensed under the MIT license\r\n */\r\n/* eslint-disable no-new-func, no-nested-ternary */\r\nconst win = typeof window !== \"undefined\" && window.Math === Math ? window : typeof self !== \"undefined\" && self.Math === Math ? self : Function(\"return this\")();\r\n/* eslint-enable no-new-func, no-nested-ternary */\r\n\r\nexport {win as window};\r\nexport const document = win.document;\r\n\n\n\n// WEBPACK FOOTER //\n// src/internals/browser.js"],"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;;;A;;;;;;;;;;;;;;;;;;AChEA;;;;AAUA;AAAA;AAAA;AAAA;AACA;AAAA;AADA;AAEA;AAAA;AAFA;AAGA;AAAA;AAHA;AAIA;AAAA;AAJA;AAKA;AAAA;AALA;AAMA;AAAA;AANA;AAOA;AAAA;AAPA;AAQA;AAAA;AARA;AAaA;AAAA;AAbA;AAcA;AAAA;AAdA;AAkBA;AACA;AAGA;AAFA;AAAA;AAGA;AAvBA;AAwBA;AAAA;AAxBA;AA+BA;;;;;;;AAOA;AAAA;AACA;AAEA;AACA;AACA;AAsBA;AAtBA;AACA;AAFA;AAOA;AACA;AAFA;AAOA;AACA;AAFA;AAOA;AACA;AAFA;AAMA;AAlEA;AAqEA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAhFA;AAoFA;AAAA;AACA;AAEA;AACA;AACA;AAMA;AACA;AAhGA;AAmGA;AACA;AAFA;AAWA;AACA;AAjFA;AACA;AACA;AAmDA;AACA;AACA;AA2BA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAHA;AAMA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAIA;AAKA;AACA;AACA;AACA;AAOA;AACA;AACA;;;;;;AAMA;AAAA;AAAA;AAAA;AAQA;AAAA;AARA;AAqBA;AACA;AAAA;AACA;AAGA;AACA;AAgBA;AAbA;AACA;AACA;AAQA;AAIA;AACA;AA3CA;;;;;;;;AAQA;;;;;;;;;;;AAqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;ACpOA;;;;;;;AAlBA;;;;AAyBA;AACA;AAAA;AACA;AAAA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AAAA;AACA;AACA;AAGA;AAiBA;AAGA;AAAA;AAIA;AAwBA;AACA;AAQA;AACA;AA8BA;AACA;AACA;AAHA;AAgBA;AAGA;AAAA;AAAA;AAIA;AACA;AACA;AAgEA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAcA;AAkDA;AACA;AACA;AACA;AACA;AALA;AAcA;AAGA;AAKA;AAGA;AAEA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAEA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;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;AAGA;AACA;AACA;AACA;AACA;AACA;AAkBA;AAGA;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;AAgGA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AAKA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAYA;AACA;AACA;AAmEA;AACA;AAAA;AAGA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAXA;AAoBA;AAeA;AAFA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AAgBA;AACA;AACA;AAEA;AAAA;AAAA;AAAA;AAMA;AA6BA;AAGA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAGA;AACA;AAGA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AA8BA;AACA;AAGA;AAEA;AAGA;AAEA;AAGA;AACA;AACA;AACA;AAGA;AACA;AAEA;AAMA;AAGA;AAAA;AACA;AACA;AAOA;AACA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AAAA;AAAA;AAAA;AAKA;AAsCA;AAGA;AACA;AACA;AAOA;AAGA;AAAA;AAAA;AAIA;AAoCA;AAGA;AACA;AACA;AAiBA;AAGA;AACA;AACA;AACA;AAMA;AACA;AACA;AAMA;AAQA;AACA;AACA;AACA;AACA;AACA;AANA;AAWA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AAGA;AAAA;AAGA;AAGA;AACA;AAIA;AAKA;AAEA;AACA;AAIA;AACA;AAuBA;AACA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AALA;AACA;AAkBA;AAZA;AACA;AAGA;AAEA;AACA;AAAA;AACA;AAEA;AAGA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAGA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AAQA;AACA;AAzBA;AA2BA;AACA;AACA;AAQA;AAPA;AAKA;AAGA;AAGA;AAAA;AACA;AACA;AAaA;AACA;AAGA;AACA;AAWA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AAeA;AACA;;;AArtCA;;;;;;;ACzBA;;;;;;;;;;ACAA;;;;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;AA3EA;AACA;AA6EA;;;;;;;;;;;;;;;;;;;AC1EA;;;;;;;;;;;;;;;AAeA;AACA;AACA;AAAA;AACA;AACA;AASA;AACA;AAIA;AACA;AACA;;;;;;;;AApBA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;ACRA;;;;AAcA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AAIA;AAwBA;AAFA;AAUA;AAIA;AAAA;AAAA;AAGA;AACA;AACA;AACA;AACA;AACA;AANA;AAFA;AAAA;AACA;AACA;AA6BA;AAbA;AAAA;AAcA;AAGA;AAAA;AAAA;AACA;AAgBA;AACA;AAIA;AAAA;AAAA;AAGA;AACA;AACA;AAHA;AAFA;AACA;AAiBA;AACA;AAGA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AACA;AACA;AAmBA;AAZA;AACA;AAOA;AAAA;AAKA;AACA;AACA;AAGA;AACA;AAMA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AAAA;AAAA;AACA;AAUA;AACA;AAGA;AAAA;AACA;AAOA;AACA;AAGA;AAAA;AAAA;AAIA;AAWA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA;AAUA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAMA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AAAA;AACA;AAaA;AACA;AAGA;AACA;AAYA;AACA;AAGA;AACA;AAYA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AACA;AAGA;AAAA;AAAA;AADA;AAcA;AAGA;AAAA;AADA;AASA;AAGA;AAAA;AADA;AASA;AAGA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AACA;AAGA;AACA;AAAA;AAAA;AAIA;AAiDA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAKA;AAiBA;AAGA;AACA;AAOA;AATA;AAWA;AAGA;AAAA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AAWA;AAIA;AACA;AACA;AACA;AAKA;AAHA;AAAA;AAIA;AAGA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAGA;AACA;AACA;AASA;;;AAnlBA;;;;;;;;;;;;;;;ACCA;AACA;AAaA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAFA;AAAA;AACA;AAQA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAFA;AACA;AAqBA;AAdA;AAAA;AAAA;AAAA;AAKA;AAIA;AAMA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAoEA;AACA;AACA;AAiBA;AACA;AACA;AAAA;AACA;AAMA;AACA;AACA;AAOA;AACA;AACA;AArCA;AAAA;AAAA;AAAA;AAAA;AADA;AAwCA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AA1HA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAKA;AAIA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwEA;AACA;AAIA;AAAA;AACA;AACA;AAFA;AAAA;AAIA;AAQA;AAAA;AACA;AACA;AAAA;AACA;AAmHA;AAjJA;AACA;AACA;AAEA;AA+CA;AAMA;AA1BA;AAMA;AAGA;AACA;AAEA;AAMA;AAiGA;AAAA;AAGA;AACA;AACA;AAEA;AACA;AAKA;AAEA;AACA;AACA;AA5YA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAqfA;AA1GA;AAQA;AAEA;AAMA;AACA;AACA;AACA;AAJA;AAQA;AAEA;AAQA;AAEA;AAQA;AAGA;AACA;AAGA;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;AAIA;AACA;AAGA;AACA;AApgBA;AACA;;;AAIA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACNA;;;;;;;AAPA;;;;AAcA;AACA;AAAA;AAAA;AACA;AACA;AAmBA;AALA;AACA;AAFA;AAOA;AAvBA;AAgCA;AACA;AACA;AAGA;AACA;AACA;AACA;AAHA;AAKA;AA1CA;AACA;AAwBA;;;;;;;;AAmBA;;;;;AAKA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AAEA;AACA;AAIA;AAgBA;AAMA;AAgBA;AAMA;AAwBA;AAKA;AACA;AAFA;AACA;AAKA;AACA;;;;;;;;;ACjKA;AAAA;AAAA;AACA;;;AALA;;;;AAOA;AACA;;;;;;;;;;AAUA;AACA;AAAA;AACA;AACA;AAMA;AACA;AACA;AACA;AAAA;;;;;;;;;;;AAWA;AACA;AAAA;AADA;AAYA;AA9CA;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AACA;;;AAGA;AACA;;;;;;;;;;;;;AAaA;AACA;AACA;AACA;AAIA;AACA;AACA;AAAA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AAAA;;;;;;;;AAQA;AACA;AACA;AA2BA;AAHA;AACA;AAGA;AA7EA;;;;;;;;;;;;ACJA;AAAA;AAAA;AACA;;;AALA;;;;AAOA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AAdA;;;;;;;;;ACHA;AAAA;AAAA;AACA;;;AAEA;;;;;;;;;;;;;;;;AAPA;;;;AAuBA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AAgBA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAoBA;AACA;AAmBA;AACA;AAmBA;AACA;;;;;;;;;AClIA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;;;AASA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AASA;AACA;AASA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAQA;AAMA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAIA;AAAA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAJA;AASA;AAKA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAJA;AACA;AAOA;AACA;AAKA;AAGA;AAGA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AAgCA;AACA;AACA;AACA;AACA;AACA;AALA;AAOA;AACA;AACA;AACA;AAXA;AAaA;AApMA;AAwMA;;;;;;;AAOA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AA;AACA;AAgCA;AACA;AAhBA;AAAA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AAEA;AAKA;AACA;AACA;AAGA;AAAA;AAIA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AADA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AADA;AACA;AAAA;AAGA;AACA;AAAA;AACA;AANA;AAQA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAIA;AAEA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAMA;AAGA;AACA;AAEA;AACA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AACA;AACA;AAMA;AAAA;AAEA;AAAA;AAUA;AAAA;AAEA;AAKA;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAIA;AACA;AAgBA;AACA;AAAA;AAAA;AA3BA;AA6BA;AACA;AACA;AACA;AACA;AAmCA;AAnCA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AAKA;AACA;AAEA;AAAA;AACA;AASA;AAAA;AAKA;AACA;AAGA;AAhRA;;;;;;;;;;;;;;;;;;;;;;;ACfA;;;;AAcA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAQA;AAJA;AAGA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAMA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AAEA;AACA;AAAA;AACA;AASA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAHA;AAKA;AAEA;AACA;AACA;AACA;AAGA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAaA;AARA;AAIA;AAKA;AAEA;AACA;AACA;AAAA;AACA;AAAA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAEA;AAAA;AAAA;AAAA;AACA;AAGA;AADA;AAAA;AAAA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AAOA;AALA;AAEA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAQA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAeA;AACA;AATA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAKA;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;AAHA;AASA;AAEA;AACA;AAAA;AACA;AAYA;AALA;AAAA;AAEA;AACA;AAGA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA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AAA;AAAA;AAIA;AAIA;AAMA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAOA;AAGA;AACA;AACA;AACA;AAGA;AAAA;AACA;AAGA;AACA;AAGA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAA;;;;;AAKA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;;;;AAIA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;;;;AAIA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AAHA;AAyBA;AACA;AACA;AACA;AACA;AALA;AAxBA;AAqCA;AA1IA;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;;;AALA;;;;AAeA;AACA;AACA;AAAA;AAGA;AAEA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AAAA;AAAA;AAIA;AAMA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AADA;AAgBA;AAOA;AAuBA;AAEA;AACA;AAAA;AAAA;AAMA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AA0BA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAJA;AAMA;AAEA;AACA;AACA;AACA;AAGA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AAGA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAMA;AACA;AAGA;AACA;AACA;AACA;AAWA;AAGA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAGA;AAAA;AATA;AAaA;AAEA;AACA;AAAA;AADA;AAaA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAGA;AAEA;AACA;AAAA;AAAA;AACA;AAQA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AAQA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA;AAAA;AARA;AAaA;AAWA;AAEA;AACA;AACA;AACA;AASA;AAEA;AACA;AAMA;AAEA;AAIA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAtBA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAuIA;AAvGA;AAAA;AACA;AAAA;AAIA;AAKA;AAIA;AAAA;AAEA;AACA;AAEA;AAAA;AACA;AAGA;AAAA;AAAA;AAIA;AARA;AAWA;AAEA;AAAA;AAGA;AAAA;AAGA;AANA;AASA;AAEA;AAAA;AAGA;AACA;AAEA;AAAA;AAGA;AAOA;AAEA;AACA;AAIA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAMA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAGA;AApFA;AAuFA;AACA;AAGA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAGA;AAAA;AAAA;AAAA;AAAA;AAMA;AAVA;AAYA;AAEA;AAAA;AAGA;AAAA;AAAA;AAAA;AAAA;AAMA;AATA;AAWA;AAEA;AAAA;AAAA;AAAA;AAAA;AAMA;AACA;AACA;AACA;AACA;AAGA;AAAA;AAGA;AAAA;AAGA;AAAA;AAQA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AAaA;AAEA;AACA;AACA;AACA;AAgBA;AAEA;AACA;AACA;AA5lBA;;;;;;;;;ACXA;AAAA;AAAA;AACA;;;AALA;;;;AAOA;AACA;AACA;AACA;AAKA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AAKA;AACA;AAxBA;;;;;;;;;ACHA;AAAA;AAAA;AACA;;;AALA;;;;AAOA;AACA;;;;;;AAMA;AACA;AACA;AACA;AACA;AAXA;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AAAA;AACA;;;AAIA;AACA;AACA;AACA;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;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AAKA;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;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AAxIA;;;;;;;;;;;;ACLA;AAAA;AAAA;AACA;;;AALA;;;;AAOA;AACA;AACA;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;AACA;AAAA;AAAA;AACA;AACA;AAEA;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;AAvFA;;;;;;;;;ACHA;AAAA;AAAA;AAAA;AACA;;;AAMA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAaA;AAEA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAQA;AACA;AACA;AAC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ALA;AAOA;AAAA;AAPA;AACA;AACA;AAqBA;AAHA;AAAA;AAIA;AAAA;AAAA;AAAA;AACA;AAgBA;AACA;AACA;AAEA;AACA;AACA;AAEA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAMA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AACA;AAGA;AACA;AAIA;AAJA;AAMA;AACA;AAEA;AACA;AACA;AACA;AAWA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AAmBA;AACA;AAOA;AAMA;AAEA;AACA;AAGA;AAEA;AACA;AAAA;AAAA;AAIA;AAKA;AACA;AAGA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAGA;AAMA;AAEA;AACA;AAAA;AAGA;AACA;AAAA;AAGA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AACA;AACA;AAjhBA;;;;;;;;;ACVA;AAAA;AAAA;AAAA;AAAA;AACA;;;AAGA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAOA;AACA;AAEA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAaA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAiBA;AACA;AAEA;AAAA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAUA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AAAA;AACA;AACA;AAoBA;AAvBA;AAwCA;AA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","sourceRoot":""}