diff --git a/dist/tui-chart.css b/dist/tui-chart.css index 579a3f0b4..2ad405b12 100644 --- a/dist/tui-chart.css +++ b/dist/tui-chart.css @@ -2,10 +2,10 @@ * tui-chart * @fileoverview tui-chart * @author NHN Ent. FE Development Lab - * @version 2.14.2 + * @version 2.15.0 * @license MIT * @link https://github.com/nhnent/tui.chart - * bundle created at "Thu Jan 25 2018 21:47:01 GMT+0900 (KST)" + * bundle created at "Fri Feb 02 2018 11:24:48 GMT+0900 (KST)" */ .tui-chart { position: relative; @@ -651,6 +651,9 @@ padding-bottom: 6px; text-align: center; } +.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip > .tui-chart-tooltip-type { + padding-left: 7px; +} .tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip .hide { display: none; } diff --git a/dist/tui-chart.js b/dist/tui-chart.js index 4f9f164ee..195dc1c7a 100644 --- a/dist/tui-chart.js +++ b/dist/tui-chart.js @@ -2,10 +2,10 @@ * tui-chart * @fileoverview tui-chart * @author NHN Ent. FE Development Lab - * @version 2.14.2 + * @version 2.15.0 * @license MIT * @link https://github.com/nhnent/tui.chart - * bundle created at "Thu Jan 25 2018 21:47:01 GMT+0900 (KST)" + * bundle created at "Fri Feb 02 2018 11:24:48 GMT+0900 (KST)" */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -66,13 +66,13 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var pluginRaphael = __webpack_require__(2); - var chart = __webpack_require__(28); - __webpack_require__(143); + var chart = __webpack_require__(29); + __webpack_require__(147); chart.registerPlugin(pluginRaphael.name, pluginRaphael.plugins, pluginRaphael.callback); chart.renderUtil = __webpack_require__(7); chart.arrayUtil = __webpack_require__(10); - chart.colorutil = __webpack_require__(135); + chart.colorutil = __webpack_require__(138); /** * NHN Entertainment Toast UI Chart. @@ -98,25 +98,27 @@ return /******/ (function(modules) { // webpackBootstrap var BarChart = __webpack_require__(4); var Boxplot = __webpack_require__(12); - var LineChart = __webpack_require__(13); - var AreaChart = __webpack_require__(15); - var PieChart = __webpack_require__(17); - var RadialLineSeries = __webpack_require__(18); - var CoordinateTypeChart = __webpack_require__(19); - var BoxTypeChart = __webpack_require__(20); - var MapChart = __webpack_require__(21); - - var legend = __webpack_require__(22); - var MapLegend = __webpack_require__(23); - var CircleLegend = __webpack_require__(24); - var title = __webpack_require__(25); - var axis = __webpack_require__(26); - - var RadialPlot = __webpack_require__(27); + var Bullet = __webpack_require__(13); + var LineChart = __webpack_require__(14); + var AreaChart = __webpack_require__(16); + var PieChart = __webpack_require__(18); + var RadialLineSeries = __webpack_require__(19); + var CoordinateTypeChart = __webpack_require__(20); + var BoxTypeChart = __webpack_require__(21); + var MapChart = __webpack_require__(22); + + var legend = __webpack_require__(23); + var MapLegend = __webpack_require__(24); + var CircleLegend = __webpack_require__(25); + var title = __webpack_require__(26); + var axis = __webpack_require__(27); + + var RadialPlot = __webpack_require__(28); var pluginRaphael = { bar: BarChart, boxplot: Boxplot, + bullet: Bullet, column: BarChart, line: LineChart, area: AreaChart, @@ -1862,17 +1864,16 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {number} - default series top height */ getDefaultSeriesTopAreaHeight: function(chartType, theme) { - var labelHeight; - - if (!predicate.isBarTypeChart(chartType) && - !predicate.isLineTypeChart(chartType) && - !predicate.isComboChart(chartType)) { - return 0; + if (predicate.isBarTypeChart(chartType) || + predicate.isLineTypeChart(chartType) || + predicate.isComboChart(chartType) || + predicate.isBulletChart(chartType) + ) { + return this.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, theme) + + chartConst.SERIES_LABEL_PADDING; } - labelHeight = this.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORLD, theme); - - return labelHeight + chartConst.SERIES_LABEL_PADDING; + return 0; } }; @@ -2028,6 +2029,8 @@ return /******/ (function(modules) { // webpackBootstrap CHART_TYPE_RADIAL: 'radial', /** @type {string} */ CHART_TYPE_BOXPLOT: 'boxplot', + /** @type {string} */ + CHART_TYPE_BULLET: 'bullet', /** chart padding */ CHART_PADDING: 10, /** chart default width */ @@ -2062,7 +2065,7 @@ return /******/ (function(modules) { // webpackBootstrap * @type {string} */ DEFAULT_THEME_NAME: 'default', - MAX_HEIGHT_WORLD: 'A', + MAX_HEIGHT_WORD: 'A', /** stack type * @type {string} */ @@ -2147,7 +2150,7 @@ return /******/ (function(modules) { // webpackBootstrap THEME_PROPS_MAP: { yAxis: ['tickColor', 'title', 'label'], series: ['label', 'colors', 'borderColor', 'borderWidth', 'selectionColor', 'startColor', 'endColor', - 'overColor', 'dot'] + 'overColor', 'dot', 'ranges'] }, /** title area width padding */ TITLE_AREA_WIDTH_PADDING: 20, @@ -2349,7 +2352,18 @@ return /******/ (function(modules) { // webpackBootstrap IMAGE_EXTENSIONS: ['png', 'jpeg'], DATA_EXTENSIONS: ['xls', 'csv'], - GUIDE_AREACHART_AREAOPACITY_TYPE: 'areaOpacity should be a number between 0 and 1' + GUIDE_AREACHART_AREAOPACITY_TYPE: 'areaOpacity should be a number between 0 and 1', + + /** for bullet */ + BULLET_TYPE_ACTUAL: 'Actual', + BULLET_TYPE_RANGE: 'Ranges', + BULLET_TYPE_MARKER: 'Markers', + BULLET_MARKER_STROKE_TICK: 3, + BULLET_MARKER_BUFFER_POSITION: 5, + BULLET_RANGES_HEIGHT_RATIO: 0.7, + BULLET_ACTUAL_HEIGHT_RATIO: 0.28, + BULLET_MARKERS_HEIGHT_RATIO: 0.55, + BULLET_MARKER_DETECT_PADDING: 3 }; module.exports = chartConst; @@ -2770,6 +2784,16 @@ return /******/ (function(modules) { // webpackBootstrap return chartType === chartConst.CHART_TYPE_BOXPLOT; }, + /** + * Whether bullet chart or not. + * @memberOf module:predicate + * @param {string} chartType - type of chart + * @returns {boolean} + */ + isBulletChart: function(chartType) { + return chartType === chartConst.CHART_TYPE_BULLET; + }, + /** * Whether radial type chart or not. * @memberOf module:predicate @@ -2978,7 +3002,7 @@ return /******/ (function(modules) { // webpackBootstrap * @returns {boolean} */ isPieChart: function(chartType) { - // alias 때문에 indexOf로 변경 + // change to indexOf for handling alias return chartType && chartType.indexOf(chartConst.CHART_TYPE_PIE) !== -1; }, @@ -3010,7 +3034,7 @@ return /******/ (function(modules) { // webpackBootstrap */ allowMinusPointRender: function(chartType) { return predicate.isLineTypeChart(chartType) || predicate.isCoordinateTypeChart(chartType) || - predicate.isBoxTypeChart(chartType); + predicate.isBoxTypeChart(chartType) || predicate.isBulletChart(chartType); }, /** @@ -3932,6 +3956,488 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), /* 13 */ +/***/ (function(module, exports, __webpack_require__) { + + /** + * @fileoverview Raphael bullet chart renderer. + * @author NHN Ent. + * FE Development Lab + */ + + 'use strict'; + + var raphaelRenderUtil = __webpack_require__(5); + var chartConst = __webpack_require__(8); + var snippet = __webpack_require__(6); + var renderUtil = __webpack_require__(7); + + var browser = snippet.browser; + var IS_LTE_IE8 = browser.msie && browser.version <= 8; + var ANIMATION_DURATION = 700; + var ANIMATION_DELAY = 700; + var EMPHASIS_OPACITY = 1; + var DE_EMPHASIS_OPACITY = 0.3; + var EVENT_DETECTOR_PADDING = 20; + + /** + * @classdesc RaphaelBulletChart is graph renderer for bullet chart. + * @class RaphaelBulletChart + * @private + */ + var RaphaelBulletChart = snippet.defineClass(/** @lends RaphaelBulletChart.prototype */ { + /** + * Render function of bar chart + * @param {object} paper paper object + * @param {{size: object, model: object, options: object, tooltipPosition: string}} data chart data + * @returns {Array.} seriesSet + */ + render: function(paper, data) { + var groupBounds = data.groupBounds; + var seriesDataModel = data.seriesDataModel; + + if (!groupBounds || !groupBounds.length) { + return null; + } + + this.paper = paper; + + this.theme = data.theme; + this.dimension = data.dimension; + this.position = data.position; + this.options = data.options; + this.chartType = data.chartType; + this.isVertical = data.isVertical; + + this.seriesDataModel = seriesDataModel; + this.maxRangeCount = seriesDataModel.maxRangeCount; + this.maxMarkerCount = seriesDataModel.maxMarkerCount; + + this.rangeOpacities = {}; + + this.paper.setStart(); + + this._renderBounds(groupBounds); + + return this.paper.setFinish(); + }, + + /** + * Get range opacity by index + * If rangeOpacities[index] not exists, create and store. then use it next time + * @param {number} index - ranges index + * @returns {number} - opacity of ranges bar at index + * @private + */ + _getRangeOpacity: function(index) { + var maxRangeCount = this.maxRangeCount; + if (this.prevMaxRangeCount !== maxRangeCount) { + this._updateOpacityStep(maxRangeCount); + } + + if (index < maxRangeCount && !this.rangeOpacities[index]) { + this.rangeOpacities[index] = 1 - (this.opacityStep * (index + 1)); + } + + return this.rangeOpacities[index]; + }, + + /** + * Update opacity step using maxRangeCount + * @param {number} maxRangeCount - maximum count of ranges bar among series graphes + * @private + */ + _updateOpacityStep: function(maxRangeCount) { + this.rangeOpacities = {}; + this.opacityStep = Number(1 / (maxRangeCount + 1)).toFixed(2); + this.prevMaxRangeCount = maxRangeCount; + }, + + /** + * Render bullet graph using groupBounds model + * @param {Array.} groupBounds - bounds data for rendering bullet graph + * @private + */ + _renderBounds: function(groupBounds) { + var rangeThemes = this.theme.ranges; + var paper = this.paper; + + this.groupBars = []; + this.groupLines = []; + + snippet.forEach(groupBounds, function(bounds, groupIndex) { + var seriesColor = this.theme.colors[groupIndex]; + var rangeIndex = 0; + var barSet = paper.set(); + var lineSet = paper.set(); + + snippet.forEach(bounds, function(bound) { + var type = bound.type; + + if (type === chartConst.BULLET_TYPE_ACTUAL) { + barSet.push(this._renderActual(bound, seriesColor)); + } else if (type === chartConst.BULLET_TYPE_RANGE) { + barSet.push(this._renderRange(bound, seriesColor, rangeIndex, rangeThemes[rangeIndex])); + rangeIndex += 1; + } else if (type === chartConst.BULLET_TYPE_MARKER) { + lineSet.push(this._renderMarker(bound, seriesColor)); + } + }, this); + + this.groupBars.push(barSet); + this.groupLines.push(lineSet); + }, this); + }, + + /** + * Render actual bar + * @param {object} bound - bound model on start point + * @param {string} seriesColor - series color for painting actual bar + * @returns {Element} - rendered actual bar + * @private + */ + _renderActual: function(bound, seriesColor) { + if (!bound) { + return null; + } + + return this._renderBar(bound, seriesColor); + }, + + /** + * Render range bar + * @param {object} bound - bound model on start point + * @param {string} seriesColor - series color for painting range bar + * @param {number} rangeIndex - ranges index + * @param {object} rangeTheme - range theme + * @returns {Element} - rendered range bar + * @private + */ + _renderRange: function(bound, seriesColor, rangeIndex, rangeTheme) { + var color = seriesColor; + var opacity = this._getRangeOpacity(rangeIndex); + var attr = {opacity: opacity}; + + if (!bound) { + return null; + } + + if (rangeTheme) { + color = rangeTheme.color || color; + attr.opacity = rangeTheme.opacity || opacity; + } + + return this._renderBar(bound, color, attr); + }, + + /** + * Create bar type element using passing arguments + * @param {object} bound - bound data for render rect element + * @param {string} color - hex type color string + * @param {object} attributes - styling attributes + * @returns {Element} - svg rect element + * @private + */ + _renderBar: function(bound, color, attributes) { + if (bound.width < 0 || bound.height < 0) { + return null; + } + + return raphaelRenderUtil.renderRect(this.paper, bound, snippet.extend({ + fill: color, + stroke: 'none' + }, attributes)); + }, + + /** + * Render marker + * @param {object} bound - bound model of marker + * @param {string} seriesColor - series color for painting marker + * @returns {Element} - rendered marker + * @private + */ + _renderMarker: function(bound, seriesColor) { + if (!bound) { + return null; + } + + return this._renderLine(bound, seriesColor); + }, + + /** + * Create line element using passing arguments + * @param {object} bound - bound data for render path element + * @param {string} color - hex type color string + * @returns {Element} - svg rect element + * @private + */ + _renderLine: function(bound, color) { + var top = bound.top; + var left = bound.left; + var length = bound.length; + var endPosition = this.isVertical ? 'L' + (left + length) + ',' + top : 'L' + left + ',' + (top + length); + var path = 'M' + left + ',' + top + endPosition; + + return raphaelRenderUtil.renderLine(this.paper, path, color, chartConst.BULLET_MARKER_STROKE_TICK); + }, + + /** + * Animate. + * @param {function} onFinish finish callback function + * @param {Array.} seriesSet series set + */ + animate: function(onFinish, seriesSet) { + var paper = this.paper; + var dimension = this.dimension; + var position = this.position; + var clipRect = this.clipRect; + var clipRectId = this._getClipRectId(); + var clipRectWidth = dimension.width - EVENT_DETECTOR_PADDING; + var clipRectHeight = dimension.height - EVENT_DETECTOR_PADDING; + var startDimension = {}; + var animateAttr = {}; + + if (this.isVertical) { + startDimension.width = clipRectWidth; + startDimension.height = 0; + animateAttr.height = clipRectHeight; + } else { + startDimension.width = 0; + startDimension.height = clipRectHeight; + animateAttr.width = clipRectWidth; + } + + // Animation was implemented using SVG element + // As Browser compatibility of is IE9+, + // No Animation on IE8 + if (!IS_LTE_IE8 && dimension) { + if (!clipRect) { + clipRect = createClipPathRectWithLayout(paper, position, startDimension, clipRectId); + this.clipRect = clipRect; + } else { + clipRect.attr({ + x: position.left, + y: position.top + }); + clipRect.attr(startDimension); + } + + seriesSet.forEach(function(element) { + if (element.type === 'set') { + element.forEach(function(item) { + item.node.setAttribute('clip-path', 'url(#' + clipRectId + ')'); + }); + } else { + element.node.setAttribute('clip-path', 'url(#' + clipRectId + ')'); + } + }); + + clipRect.animate(animateAttr, ANIMATION_DURATION, '>', onFinish); + } + + if (onFinish) { + this.callbackTimeout = setTimeout(function() { + onFinish(); + delete self.callbackTimeout; + }, ANIMATION_DELAY); + } + }, + + /** + * Resize bullet chart + * @param {object} params parameters + * @param {{width: number, height:number}} params.dimension dimension + * @param {Array.>} params.groupBounds group bounds + */ + resize: function(params) { + var dimension = params.dimension; + var groupBounds = params.groupBounds; + var width = dimension.width; + var height = dimension.height; + + this.dimension = params.dimension; + this.groupBounds = groupBounds; + this.resizeClipRect(width, height); + this.paper.setSize(width, height); + + this._renderBounds(groupBounds); + }, + + /** + * Resize clip rect size + * @param {number} width series width + * @param {number} height series height + */ + resizeClipRect: function(width, height) { + var clipRect = this.paper.getById(this._getClipRectId() + '_rect'); + + clipRect.attr({ + width: width, + height: height + }); + }, + + /** + * set clip rect position + * @param {object} position series position + */ + setClipRectPosition: function(position) { + var clipRect = this.paper.getById(this._getClipRectId() + '_rect'); + + clipRect.attr({ + x: position.left, + y: position.top + }); + }, + + /** + * Set clip rect id + * @returns {string} id - clip rect id + * @private + */ + _getClipRectId: function() { + if (!this.clipRectId) { + this.clipRectId = renderUtil.generateClipRectId(); + } + + return this.clipRectId; + }, + + /** + * Change borders color. + * @param {Array.} lines raphael objects + * @param {borderColor} borderColor border color + * @private + */ + _changeBordersColor: function(lines, borderColor) { + snippet.forEach(lines, function(line) { + line.attr({stroke: borderColor}); + }); + }, + + /** + * Select legend. + * @param {?number} legendIndex legend index + */ + selectLegend: function(legendIndex) { + var allEmphasized = snippet.isNull(legendIndex); + + snippet.forEachArray(this.groupBars, function(bars, groupIndex) { + var opacity = (allEmphasized || legendIndex === groupIndex) ? EMPHASIS_OPACITY : DE_EMPHASIS_OPACITY; + + this.groupBars[groupIndex].attr({'fill-opacity': opacity}); + this.groupLabels[groupIndex].attr({opacity: opacity}); + snippet.forEachArray(this.groupLabels[groupIndex], function(label) { + label.attr({opacity: opacity}); + }); + }, this); + }, + + /** + * @param {object} paper - raphael paper + * @param {Array.} positionData - series label positions + * @param {Array.} labelData - series labels + * @param {object} labelTheme - series text theme + * @returns {object} - rendered label set + */ + renderSeriesLabel: function(paper, positionData, labelData, labelTheme) { + var attributes = { + 'font-size': labelTheme.fontSize, + 'font-family': labelTheme.fontFamily, + 'font-weight': labelTheme.fontWeight, + fill: labelTheme.color, + opacity: 0, + 'text-anchor': this.isVertical ? 'middle' : 'start' + }; + var set = paper.set(); + + this.groupLabels = snippet.map(labelData, function(labels, groupIndex) { + var labelSet = paper.set(); + snippet.forEach(labels, function(label, index) { + var labelElement = this._renderLabel(paper, positionData[groupIndex][index], attributes, label); + labelSet.push(labelElement); + set.push(labelElement); + }, this); + + return labelSet; + }, this); + + return set; + }, + + /** + * @param {object} paper - raphael paper + * @param {Array.} position - series label positions + * @param {Array.} attributes - label text attributes + * @param {string} labelText - label text + * @returns {object} - rendered label object + * @private + */ + _renderLabel: function(paper, position, attributes, labelText) { + var label = raphaelRenderUtil.renderText(paper, position, labelText, attributes); + var node = label.node; + var style = node.style; + style.userSelect = 'none'; + style.cursor = 'default'; + node.setAttribute('filter', 'url(#glow)'); + + return label; + }, + + /** + * @param {number} index - series index + * @returns {Array.} - color and opacity of series + */ + getGraphColors: function() { + return snippet.map(this.groupBars, function(barSet, groupIndex) { + var barColors = []; + var markerCount = this.groupLines[groupIndex].length; + var i = 0; + var legendColor; + + barSet.forEach(function(item) { + barColors.push(item.attrs.fill); + }); + + legendColor = barColors[barColors.length - 1]; + + for (; i <= markerCount; i += 1) { + barColors.push(legendColor); + } + + return barColors; + }, this); + } + }); + + /** + * Create clip rect with layout + * @param {object} paper Raphael paper + * @param {object} position position + * @param {object} dimension dimension + * @param {string} id ID string + * @returns {object} + * @ignore + */ + function createClipPathRectWithLayout(paper, position, dimension, id) { + var clipPath = document.createElementNS('http://www.w3.org/2000/svg', 'clipPath'); + var rect = paper.rect(position.left, position.top, dimension.width, dimension.height); + + rect.id = id + '_rect'; + clipPath.id = id; + + clipPath.appendChild(rect.node); + paper.defs.appendChild(clipPath); + + return rect; + } + + module.exports = RaphaelBulletChart; + + +/***/ }), +/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3942,7 +4448,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var RaphaelLineBase = __webpack_require__(14); + var RaphaelLineBase = __webpack_require__(15); var raphaelRenderUtil = __webpack_require__(5); var snippet = __webpack_require__(6); @@ -4087,7 +4593,7 @@ return /******/ (function(modules) { // webpackBootstrap dimension = params.dimension, groupPositions = params.groupPositions; - this.resizeClipRect(dimension); + this.resizeClipRect(dimension.width, dimension.height); this.groupPositions = groupPositions; this.groupPaths = this.isSpline ? this._getSplineLinesPath(groupPositions) : this._getLinesPath(groupPositions); @@ -4211,7 +4717,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 14 */ +/* 15 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4228,7 +4734,7 @@ return /******/ (function(modules) { // webpackBootstrap var arrayUtil = __webpack_require__(10); var browser = snippet.browser; - var IS_LTE_THAN_IE8 = browser.msie && browser.version <= 8; + var IS_LTE_IE8 = browser.msie && browser.version <= 8; var ANIMATION_DURATION = 700; var DEFAULT_DOT_RADIUS = 3; var SELECTION_DOT_RADIUS = 7; @@ -4731,8 +5237,8 @@ return /******/ (function(modules) { // webpackBootstrap var prev = this._prevDotAttributes[groupIndex]; var outDotStyle = this.outDotStyle; - // prev 정보가 있다면 prev의 r을 적용해준다 - // hideDot시 dot이 사라져버리는 이슈 있음 + // if prev data exists, use prev.r + // there is dot disappearing issue, when hideDot if (prev && !snippet.isUndefined(opacity)) { outDotStyle = snippet.extend({ 'r': prev.r, @@ -4875,7 +5381,7 @@ return /******/ (function(modules) { // webpackBootstrap var clipRect = this.clipRect; var clipRectId = this._getClipRectId(); - if (!IS_LTE_THAN_IE8 && dimension) { + if (!IS_LTE_IE8 && dimension) { if (!clipRect) { clipRect = createClipPathRectWithLayout(paper, position, dimension, clipRectId); this.clipRect = clipRect; @@ -5040,14 +5546,15 @@ return /******/ (function(modules) { // webpackBootstrap /** * Resize clip rect size - * @param {object} dimension series dimension + * @param {number} width series width + * @param {number} height series height */ - resizeClipRect: function(dimension) { + resizeClipRect: function(width, height) { var clipRect = this.paper.getById(this._getClipRectId() + '_rect'); clipRect.attr({ - width: dimension.width, - height: dimension.height + width: width, + height: height }); }, @@ -5091,7 +5598,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 15 */ +/* 16 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5102,7 +5609,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var RaphaelLineBase = __webpack_require__(14); + var RaphaelLineBase = __webpack_require__(15); var raphaelRenderUtil = __webpack_require__(5); var snippet = __webpack_require__(6); @@ -5111,7 +5618,7 @@ return /******/ (function(modules) { // webpackBootstrap var concat = Array.prototype.concat; var GUIDE_AREACHART_AREAOPACITY_TYPE = __webpack_require__(8).GUIDE_AREACHART_AREAOPACITY_TYPE; - var consoleUtil = __webpack_require__(16); + var consoleUtil = __webpack_require__(17); var RaphaelAreaChart = snippet.defineClass(RaphaelLineBase, /** @lends RaphaelAreaChart.prototype */ { /** @@ -5399,7 +5906,7 @@ return /******/ (function(modules) { // webpackBootstrap dimension = params.dimension, groupPositions = params.groupPositions; - this.resizeClipRect(dimension); + this.resizeClipRect(dimension.width, dimension.height); this.zeroTop = params.zeroTop; this.groupPositions = groupPositions; @@ -5581,7 +6088,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 16 */ +/* 17 */ /***/ (function(module, exports) { /** @@ -5609,7 +6116,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 17 */ +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5747,10 +6254,10 @@ return /******/ (function(modules) { // webpackBootstrap _makeSectorPath: function(cx, cy, r, startAngle, endAngle) { var startRadian = startAngle * RAD; var endRadian = endAngle * RAD; - var x1 = cx + (r * Math.sin(startRadian)); // 원 호의 시작 x 좌표 - var y1 = cy - (r * Math.cos(startRadian)); // 원 호의 시작 y 좌표 - var x2 = cx + (r * Math.sin(endRadian)); // 원 호의 종료 x 좌표 - var y2 = cy - (r * Math.cos(endRadian)); // 원 호의 종료 y 좌표 + var x1 = cx + (r * Math.sin(startRadian)); // x point of start radian + var y1 = cy - (r * Math.cos(startRadian)); // y posint of start radian + var x2 = cx + (r * Math.sin(endRadian)); // x point of end radian + var y2 = cy - (r * Math.cos(endRadian)); // y point of end radian var largeArcFlag = endAngle - startAngle > DEGREE_180 ? 1 : 0; var path = ['M', cx, cy, 'L', x1, y1, @@ -5758,7 +6265,7 @@ return /******/ (function(modules) { // webpackBootstrap 'Z' ]; - // path에 대한 자세한 설명은 아래 링크를 참고 + // see details about path // http://www.w3schools.com/svg/svg_path.asp // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d return {path: path}; @@ -5779,7 +6286,7 @@ return /******/ (function(modules) { // webpackBootstrap /* eslint max-params: [2, 6]*/ var startRadian = startAngle * RAD; var endRadian = endAngle * RAD; - var r2 = holeRadius || (r * this.holeRatio); // 구멍 반지름 + var r2 = holeRadius || (r * this.holeRatio); // radius of donut hole var x1 = cx + (r * Math.sin(startRadian)); var y1 = cy - (r * Math.cos(startRadian)); var x2 = cx + (r2 * Math.sin(startRadian)); @@ -6304,7 +6811,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 18 */ +/* 19 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6315,7 +6822,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var RaphaelLineTypeBase = __webpack_require__(14); + var RaphaelLineTypeBase = __webpack_require__(15); var raphaelRenderUtil = __webpack_require__(5); var snippet = __webpack_require__(6); @@ -6457,8 +6964,8 @@ return /******/ (function(modules) { // webpackBootstrap /** * Resize graph of line chart. - * 1raphaelLineCharts에서 가져옴, 구조 개편시 중복 제거 - * 그룹툴팁 동작 안해서 tooltipLine 관련 코드 제거됨 + * /todo copied at raphaelLineCharts#resize, should remove duplication + * tooltipLine code was deleted, as group tooltip not works on radial chart/ * @param {object} params parameters * @param {{width: number, height:number}} params.dimension dimension * @param {Array.>} params.groupPositions group positions @@ -6484,7 +6991,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Select legend. - * raphaelLineCharts에서 가져옴, 구조 개편시 중복 제거 + * /todo copied at raphaelLineCharts, should remove duplication * @param {?number} legendIndex legend index */ selectLegend: function(legendIndex) { @@ -6513,7 +7020,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6936,7 +7443,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 20 */ +/* 21 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7262,13 +7769,14 @@ return /******/ (function(modules) { // webpackBootstrap var colorSpectrum = this.colorSpectrum; var box = this.boxesSet[indexes.groupIndex][indexes.index]; var opacity = 1; - var paper = box.rect.paper; - var color; + var color, paper; if (!box) { return; } + paper = box.rect.paper; + if (box.seriesItem.hasChild) { color = null; if (useColorValue) { @@ -7372,7 +7880,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 21 */ +/* 22 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7388,7 +7896,7 @@ return /******/ (function(modules) { // webpackBootstrap var snippet = __webpack_require__(6); var browser = snippet.browser; - var IS_LTE_THAN_IE8 = browser.msie && browser.version <= 8; + var IS_LTE_IE8 = browser.msie && browser.version <= 8; var STROKE_COLOR = 'gray'; var ANIMATION_DURATION = 100; var G_ID = 'tui-chart-series-group'; @@ -7417,7 +7925,7 @@ return /******/ (function(modules) { // webpackBootstrap this.sectorSet = paper.set(); this.sectors = this._renderMap(data, this.ratio); - if (!IS_LTE_THAN_IE8) { + if (!IS_LTE_IE8) { this.g = createGElement(paper, this.sectorSet, G_ID); } @@ -7653,7 +8161,7 @@ return /******/ (function(modules) { // webpackBootstrap label.node.style.cursor = 'default'; label.node.setAttribute('filter', 'url(#glow)'); - if (!IS_LTE_THAN_IE8) { + if (!IS_LTE_IE8) { self.g.appendChild(label.node); } }); @@ -7687,7 +8195,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 22 */ +/* 23 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7760,12 +8268,13 @@ return /******/ (function(modules) { // webpackBootstrap var position = snippet.extend({}, this.basePosition); snippet.forEach(legendData, function(legendDatum, index) { + var iconType = legendDatum.iconType; var legendIndex = legendDatum.index; var legendColor = legendDatum.colorByPoint ? '#aaa' : legendDatum.theme.color; var isUnselected = legendDatum.isUnselected; var labelHeight = legendDatum.labelHeight; var checkboxData = legendDatum.checkbox; - var predicatedLegendWidth = position.left + self._calculateSingleLegendWidth(legendIndex); + var predicatedLegendWidth = position.left + self._calculateSingleLegendWidth(legendIndex, iconType); var isNeedBreakLine = (predicatedLegendWidth >= self.paper.width); if (self.isHorizontal && isNeedBreakLine) { @@ -7785,7 +8294,7 @@ return /******/ (function(modules) { // webpackBootstrap self._renderIcon(position, { legendColor: legendColor, - iconType: legendDatum.iconType, + iconType: iconType, labelHeight: labelHeight, isUnselected: isUnselected, legendIndex: legendIndex, @@ -8178,7 +8687,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 23 */ +/* 24 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8405,7 +8914,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 24 */ +/* 25 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8469,7 +8978,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 25 */ +/* 26 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8537,7 +9046,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 26 */ +/* 27 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -8962,7 +9471,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 27 */ +/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9137,7 +9646,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Get lines path. - * raphaelLineTypeBase에서 가져옴, 구조 개선 작업시 수정필요 + * /todo remove duplication, copied from raphaelLineTypeBase * @param {Array.>} groupPositions positions * @returns {Array.>} path * @private @@ -9152,7 +9661,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Make lines path. - * raphaelLineTypeBase에서 가져옴, 구조 개선 작업시 수정필요 + * /todo remove duplication, copied from raphaelLineTypeBase * @param {Array.<{left: number, top: number, startTop: number}>} positions positions * @param {?string} [posTopType='top'] position top type * @param {boolean} [connectNulls] - boolean value connect nulls or not @@ -9189,7 +9698,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 28 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9201,17 +9710,17 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var chartFactory = __webpack_require__(29); - var pluginFactory = __webpack_require__(31); - var themeManager = __webpack_require__(32); - var mapManager = __webpack_require__(34); - var objectUtil = __webpack_require__(35); - var seriesDataImporter = __webpack_require__(36); - var drawingToolPicker = __webpack_require__(37); - - __webpack_require__(38); + var chartFactory = __webpack_require__(30); + var pluginFactory = __webpack_require__(32); + var themeManager = __webpack_require__(33); + var mapManager = __webpack_require__(35); + var objectUtil = __webpack_require__(36); + var seriesDataImporter = __webpack_require__(37); + var drawingToolPicker = __webpack_require__(38); + __webpack_require__(39); - __webpack_require__(142); + __webpack_require__(40); + __webpack_require__(146); /** * Raw series datum. @@ -10585,6 +11094,49 @@ return /******/ (function(modules) { // webpackBootstrap return _createChart(container, rawData, options, chartConst.CHART_TYPE_BOXPLOT); } + /** + * Bullet chart creator. + * @memberof module:chart + * @memberof tui.chart + * @param {HTMLElement} container - chart container + * @param {rawData} rawData chart data + * @param {object} options - chart options + * @returns {object} box plot chart + * @api + * @example + * var chart = tui.chart; // or require('tui-chart'); + * var container = document.getElementById('chart-area'); + * var data = { + * categories: ['July', 'August'], + * series: [{ + * name: 'Budget', + * data: 25, + * markers: [28, 2, 15], + * ranges: [[-1, 10], [10, 20], [20, 30]] + * },{ + * name: 'Hello', + * data: 11, + * markers: [20], + * ranges: [[0, 8], [8, 15]] + * }] + * }; + * var options = { + * chart: { + * width: 700, + * height: 300, + * title: 'Monthly Revenue' + * }, + * series: { + * showLabel: true, + * vertical: false + * } + * }; + * chart.bulletChart(container, data, options); + */ + function bulletChart(container, rawData, options) { + return _createChart(container, rawData, options, chartConst.CHART_TYPE_BULLET); + } + /** * Register theme. * @memberof tui.chart @@ -10743,6 +11295,7 @@ return /******/ (function(modules) { // webpackBootstrap mapChart: mapChart, radialChart: radialChart, boxplotChart: boxplotChart, + bulletChart: bulletChart, registerTheme: registerTheme, registerMap: registerMap, registerPlugin: registerPlugin @@ -10750,7 +11303,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 29 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10763,7 +11316,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var rawDataHandler = __webpack_require__(30); + var rawDataHandler = __webpack_require__(31); var predicate = __webpack_require__(11); var charts = {}; @@ -10834,7 +11387,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 30 */ +/* 31 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11089,6 +11642,8 @@ return /******/ (function(modules) { // webpackBootstrap */ filterCheckedRawData: function(rawData, checkedLegends) { var cloneData = JSON.parse(JSON.stringify(rawData)); + var filteredCategories; + if (checkedLegends) { snippet.forEach(cloneData.series, function(serieses, chartType) { if (!checkedLegends[chartType]) { @@ -11101,7 +11656,32 @@ return /******/ (function(modules) { // webpackBootstrap }); } + if (cloneData.series.bullet) { + filteredCategories = []; + snippet.forEach(checkedLegends.bullet, function(isChecked, index) { + if (isChecked) { + filteredCategories.push(rawData.categories[index]); + } + }); + cloneData.categories = filteredCategories; + } + return cloneData; + }, + + /** + * Modify rawData to fit chart format + * @param {object} rawData - raw data + * @private + */ + _makeRawSeriesDataForBulletChart: function(rawData) { + var bullet = rawData.series.bullet; + + rawData.categories = rawData.categories || []; + + rawData.categories = snippet.map(bullet, function(seriesData) { + return seriesData.name || ''; + }); } }; @@ -11109,7 +11689,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 31 */ +/* 32 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11162,7 +11742,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 32 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11175,7 +11755,7 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var defaultTheme = __webpack_require__(33); + var defaultTheme = __webpack_require__(34); var snippet = __webpack_require__(6); var themes = {}; @@ -11319,12 +11899,10 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ _setSeriesColors: function(seriesTypes, seriesThemes, rawSeriesThemes, rawSeriesData) { - var self = this; var seriesColors, seriesCount, hasOwnColors; var colorIndex = 0; - var rawSeriesDatum; - rawSeriesThemes = rawSeriesThemes || {}; // 분기문 간소화를위해 + rawSeriesThemes = rawSeriesThemes || {}; // to simplify if/else statement snippet.forEachArray(seriesTypes, function(seriesType) { if (rawSeriesThemes[seriesType]) { @@ -11335,25 +11913,38 @@ return /******/ (function(modules) { // webpackBootstrap hasOwnColors = false; } - rawSeriesDatum = rawSeriesData[seriesType]; - if (rawSeriesDatum && rawSeriesDatum.length) { - if (rawSeriesDatum[0] && rawSeriesDatum[0].data && rawSeriesDatum[0].data.length) { - seriesCount = Math.max(rawSeriesDatum.length, rawSeriesDatum[0].data.length); - } else { - seriesCount = rawSeriesDatum.length; - } - } else { - seriesCount = 0; - } + seriesCount = this._getSeriesThemeColorCount(rawSeriesData[seriesType]); - seriesThemes[seriesType].colors = self._makeEachSeriesColors(seriesColors, seriesCount, + seriesThemes[seriesType].colors = this._makeEachSeriesColors(seriesColors, seriesCount, !hasOwnColors && colorIndex); // To distinct between series that use default theme, we make the colors different if (!hasOwnColors) { colorIndex = (seriesCount + colorIndex) % seriesColors.length; } - }); + }, this); + }, + + /** + * Get number of series theme color from seriesData + * @param {object} rawSeriesDatum - raw series data contains series information + * @returns {number} number of series theme color + * @private + */ + _getSeriesThemeColorCount: function(rawSeriesDatum) { + var seriesCount = 0; + + if (rawSeriesDatum && rawSeriesDatum.length) { + if (rawSeriesDatum.colorLength) { + seriesCount = rawSeriesDatum.colorLength; + } else if (rawSeriesDatum[0] && rawSeriesDatum[0].data && rawSeriesDatum[0].data.length) { + seriesCount = Math.max(rawSeriesDatum.length, rawSeriesDatum[0].data.length); + } else { + seriesCount = rawSeriesDatum.length; + } + } + + return seriesCount; }, /** @@ -11369,15 +11960,14 @@ return /******/ (function(modules) { // webpackBootstrap _initTheme: function(themeName, rawTheme, seriesTypes, rawSeriesData) { var theme; - // 테마 선택, 디폴트 테마 or 유저가 지정하는 컬러 - if (themeName !== chartConst.DEFAULT_THEME_NAME) { + if (themeName !== chartConst.DEFAULT_THEME_NAME) { // customized theme that overrides default theme theme = JSON.parse(JSON.stringify(defaultTheme)); this._overwriteTheme(rawTheme, theme); - } else { + } else { // default theme theme = JSON.parse(JSON.stringify(rawTheme)); } - // 각 컴포넌트 테마에 시리즈명별로 뎊스를 넣어준다. theme.yAxis.테마들 -> theme.yAxis.line.테마들 + // make each component theme have theme by series name. theme.yAxis.theme -> theme.yAxis.line.theme theme.yAxis = this._createComponentThemeWithSeriesName(seriesTypes, rawTheme.yAxis, theme.yAxis, 'yAxis'); theme.series = this._createComponentThemeWithSeriesName(seriesTypes, rawTheme.series, theme.series, 'series'); @@ -11486,7 +12076,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 33 */ +/* 34 */ /***/ (function(module, exports) { 'use strict'; @@ -11565,7 +12155,8 @@ return /******/ (function(modules) { // webpackBootstrap strokeWidth: 3, radius: 4 } - } + }, + ranges: [] }, legend: { label: { @@ -11588,7 +12179,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 34 */ +/* 35 */ /***/ (function(module, exports) { /** @@ -11629,7 +12220,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 35 */ +/* 36 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11682,7 +12273,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 36 */ +/* 37 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -11790,7 +12381,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -11867,7 +12458,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports) { // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON @@ -11971,29 +12562,30 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var chartConst = __webpack_require__(8); - var chartFactory = __webpack_require__(29); - var BarChart = __webpack_require__(40); - var ColumnChart = __webpack_require__(121); - var LineChart = __webpack_require__(122); - var AreaChart = __webpack_require__(124); - var ColumnLineComboChart = __webpack_require__(125); - var LineScatterComboChart = __webpack_require__(127); - var LineAreaComboChart = __webpack_require__(128); - var PieDonutComboChart = __webpack_require__(129); - var PieChart = __webpack_require__(130); - var BubbleChart = __webpack_require__(131); - var ScatterChart = __webpack_require__(132); - var HeatmapChart = __webpack_require__(133); - var TreemapChart = __webpack_require__(136); - var MapChart = __webpack_require__(137); - var RadialChart = __webpack_require__(140); - var BoxplotChart = __webpack_require__(141); + var chartFactory = __webpack_require__(30); + var BarChart = __webpack_require__(41); + var ColumnChart = __webpack_require__(124); + var LineChart = __webpack_require__(125); + var AreaChart = __webpack_require__(127); + var ColumnLineComboChart = __webpack_require__(128); + var LineScatterComboChart = __webpack_require__(130); + var LineAreaComboChart = __webpack_require__(131); + var PieDonutComboChart = __webpack_require__(132); + var PieChart = __webpack_require__(133); + var BubbleChart = __webpack_require__(134); + var ScatterChart = __webpack_require__(135); + var HeatmapChart = __webpack_require__(136); + var TreemapChart = __webpack_require__(139); + var MapChart = __webpack_require__(140); + var RadialChart = __webpack_require__(143); + var BoxplotChart = __webpack_require__(144); + var BulletChart = __webpack_require__(145); chartFactory.register(chartConst.CHART_TYPE_BAR, BarChart); chartFactory.register(chartConst.CHART_TYPE_COLUMN, ColumnChart); @@ -12011,10 +12603,11 @@ return /******/ (function(modules) { // webpackBootstrap chartFactory.register(chartConst.CHART_TYPE_MAP, MapChart); chartFactory.register(chartConst.CHART_TYPE_RADIAL, RadialChart); chartFactory.register(chartConst.CHART_TYPE_BOXPLOT, BoxplotChart); + chartFactory.register(chartConst.CHART_TYPE_BULLET, BulletChart); /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12025,9 +12618,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var chartConst = __webpack_require__(8); - var rawDataHandler = __webpack_require__(30); + var rawDataHandler = __webpack_require__(31); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -12157,7 +12750,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12169,12 +12762,12 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var ComponentManager = __webpack_require__(42); - var DefaultDataProcessor = __webpack_require__(99); - var rawDataHandler = __webpack_require__(30); + var ComponentManager = __webpack_require__(43); + var DefaultDataProcessor = __webpack_require__(101); + var rawDataHandler = __webpack_require__(31); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); - var boundsAndScaleBuilder = __webpack_require__(109); + var boundsAndScaleBuilder = __webpack_require__(112); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -12499,7 +13092,6 @@ return /******/ (function(modules) { // webpackBootstrap this.prevXAxisData = boundsAndScale.axisDataMap.xAxis; } - // 비율값 추가 this.addDataRatios(boundsAndScale.limitMap); return boundsAndScale; @@ -12547,7 +13139,10 @@ return /******/ (function(modules) { // webpackBootstrap var boundsAndScale; if (!rawData) { - rawData = rawDataHandler.filterCheckedRawData(dataProcessor.getZoomedRawData(), checkedLegends); + rawData = rawDataHandler.filterCheckedRawData( + dataProcessor.getZoomedRawData(), + checkedLegends + ); } this.dataProcessor.initData(rawData); @@ -12842,9 +13437,6 @@ return /******/ (function(modules) { // webpackBootstrap if (foundData) { foundData.silent = true; - if (!isGroupTooltip) { - mouseEventDetector.prevFoundData = foundData; - } mouseEventDetector._showTooltip(foundData); } else { this.hideTooltip(); @@ -12876,7 +13468,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -12889,42 +13481,43 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var dom = __webpack_require__(9); - var Axis = __webpack_require__(43); - var Plot = __webpack_require__(45); - var title = __webpack_require__(46); - var RadialPlot = __webpack_require__(47); - var ChartExportMenu = __webpack_require__(49); - var DrawingToolPicker = __webpack_require__(37); + var Axis = __webpack_require__(44); + var Plot = __webpack_require__(46); + var title = __webpack_require__(47); + var RadialPlot = __webpack_require__(48); + var ChartExportMenu = __webpack_require__(50); + var DrawingToolPicker = __webpack_require__(38); // legends - var Legend = __webpack_require__(55); - var SpectrumLegend = __webpack_require__(57); - var CircleLegend = __webpack_require__(58); + var Legend = __webpack_require__(56); + var SpectrumLegend = __webpack_require__(58); + var CircleLegend = __webpack_require__(59); // tooltips - var Tooltip = __webpack_require__(59); - var GroupTooltip = __webpack_require__(65); - var MapChartTooltip = __webpack_require__(67); + var Tooltip = __webpack_require__(60); + var GroupTooltip = __webpack_require__(66); + var MapChartTooltip = __webpack_require__(68); // mouse event detectors - var MapChartEventDetector = __webpack_require__(68); - var mouseEventDetector = __webpack_require__(72); + var MapChartEventDetector = __webpack_require__(69); + var mouseEventDetector = __webpack_require__(73); // series - var BarSeries = __webpack_require__(79); - var ColumnSeries = __webpack_require__(83); - var LineSeries = __webpack_require__(84); - var RadialSeries = __webpack_require__(86); - var AreaSeries = __webpack_require__(87); - var BubbleSeries = __webpack_require__(88); - var ScatterSeries = __webpack_require__(90); - var MapSeries = __webpack_require__(91); - var PieSeries = __webpack_require__(92); - var HeatmapSeries = __webpack_require__(93); - var TreemapSeries = __webpack_require__(94); - var BoxplotSeries = __webpack_require__(96); - - var Zoom = __webpack_require__(97); + var BarSeries = __webpack_require__(80); + var ColumnSeries = __webpack_require__(84); + var LineSeries = __webpack_require__(85); + var RadialSeries = __webpack_require__(87); + var AreaSeries = __webpack_require__(88); + var BubbleSeries = __webpack_require__(89); + var ScatterSeries = __webpack_require__(91); + var MapSeries = __webpack_require__(92); + var PieSeries = __webpack_require__(93); + var HeatmapSeries = __webpack_require__(94); + var TreemapSeries = __webpack_require__(95); + var BoxplotSeries = __webpack_require__(97); + var BulletSeries = __webpack_require__(98); + + var Zoom = __webpack_require__(99); var snippet = __webpack_require__(6); @@ -12952,6 +13545,7 @@ return /******/ (function(modules) { // webpackBootstrap heatmapSeries: HeatmapSeries, treemapSeries: TreemapSeries, boxplotSeries: BoxplotSeries, + bulletSeries: BulletSeries, zoom: Zoom, chartExportMenu: ChartExportMenu, title: title @@ -13062,7 +13656,7 @@ return /******/ (function(modules) { // webpackBootstrap * Chart Component Description : https://i-msdn.sec.s-msft.com/dynimg/IC267997.gif * @param {string} name component name * @param {string} classType component factory name - * @param {object} params params that for alternative charts, 기본 흐름을 타지않는 특이 차트들을 위해 제공 + * @param {object} params params that for alternative charts */ register: function(name, classType, params) { var index, component, componentType, componentFactory, optionKey; @@ -13080,8 +13674,9 @@ return /******/ (function(modules) { // webpackBootstrap params.chartOptions = this.options; params.seriesTypes = this.seriesTypes; - // axis의 경우 name으로 테마와 옵션을 가져온다. xAxis, yAxis if (componentType === 'axis') { + // Get theme and options by axis name + // As axis has 3 types(xAxis, yAxis, rightYAxis) optionKey = name; } else { optionKey = componentType; @@ -13099,12 +13694,10 @@ return /******/ (function(modules) { // webpackBootstrap } if (optionKey === 'series') { - // 시리즈는 옵션과 테마가 시리즈 이름으로 뎊스가 한번더 들어간다. - // 테마는 항상 뎊스가 더들어가고 옵션은 콤보인경우에만 더들어간다. snippet.forEach(this.seriesTypes, function(seriesType) { if (name.indexOf(seriesType) === 0) { - params.options = params.options[seriesType] || params.options; - params.theme = params.theme[seriesType]; + params.options = params.options[seriesType] || params.options; // For combo chart, options are set for each chart + params.theme = params.theme[seriesType]; // For combo, single chart, themes are set for each chart if (snippet.isArray(params.options)) { params.options = params.options[index] || {}; @@ -13122,12 +13715,12 @@ return /******/ (function(modules) { // webpackBootstrap params.isVertical = this.isVertical; params.eventBus = this.eventBus; - // 맵과 같이 일반적인 스케일 모델을 사용하지 않는 차트를 위한 개별 구현한 차트 모델 + // alternative scale models for charts that do not use common scale models like maps params.alternativeModel = this.alternativeModel; component = componentFactory(params); - // 팩토리에서 옵션에따라 생성을 거부할 수 있다. + // component creation can be refused by factory, according to option data if (component) { component.componentName = name; component.componentType = componentType; @@ -13274,7 +13867,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13288,8 +13881,8 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); - var pluginFactory = __webpack_require__(31); + var calculator = __webpack_require__(45); + var pluginFactory = __webpack_require__(32); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -13757,6 +14350,13 @@ return /******/ (function(modules) { // webpackBootstrap var positionTopAndLeft = {}; var labelTopPosition, labelLeftPosition; + /* + * to prevent printing `undefined` text, when category label is not set + */ + if (labelPosition < 0) { + return; + } + if (isYAxis) { labelTopPosition = labelPosition; @@ -13856,8 +14456,9 @@ return /******/ (function(modules) { // webpackBootstrap axisParam.isYAxis = (name === 'yAxis' || name === 'rightYAxis'); axisParam.shifting = axisParam.chartOptions.series.shifting; - // 콤보에서 YAxis가 시리즈별로 두개인 경우를 고려해 시리즈이름으로 테마가 분기된다. - // 나중에 테마에서 시리즈로 다시 분기되는게 아니라 커포넌트 네임인 rightYAxis로 따로 받도록 테마 구조를 변경하자. + // In combo chart, the theme is divided into series name considering two YAxis(yAxis and rightYAxis) + // @todo change theme structure so that access theme by axis type, not considering chart type + // like theme.xAxis, theme.yAxis, theme.rightYAxis if (chartType === 'combo') { if (axisParam.isYAxis) { axisParam.theme = axisParam.theme[axisParam.seriesTypes[0]]; @@ -13866,10 +14467,10 @@ return /******/ (function(modules) { // webpackBootstrap axisParam.theme = axisParam.theme[axisParam.seriesTypes[1]]; axisParam.index = 1; } - // 왜 싱글타입의 yAxis도 내부에 차트이름으로 한번더 분기가 되는 지는 모르겠다 일관성이 없는 느낌, 추가 개선요소 + // @todo I do not know why the single type chart with yAxis branches once again as the chart name inside it. I feel inconsistent } else if (axisParam.isYAxis) { axisParam.theme = axisParam.theme[chartType]; - // 싱글에 xAxis인 경우 + // single chart, xAxis } else { axisParam.theme = axisParam.theme; } @@ -13884,7 +14485,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14166,7 +14767,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14179,7 +14780,7 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var snippet = __webpack_require__(6); var map = snippet.map; @@ -14948,7 +15549,7 @@ return /******/ (function(modules) { // webpackBootstrap var seriesTypes = param.seriesTypes; var xAxisType = param.chartOptions.xAxis.type; - // bar, chart, line, area동일 + // same among bar, chart, line, area charts param.chartType = chartType; param.chartTypes = seriesTypes; param.xAxisTypeOption = xAxisType; @@ -14963,7 +15564,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14975,7 +15576,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var pluginFactory = __webpack_require__(31); + var pluginFactory = __webpack_require__(32); var snippet = __webpack_require__(6); var Title = snippet.defineClass(/** @lends Title.prototype */ { @@ -15087,7 +15688,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15098,9 +15699,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var geom = __webpack_require__(48); + var geom = __webpack_require__(49); var chartConst = __webpack_require__(8); - var pluginFactory = __webpack_require__(31); + var pluginFactory = __webpack_require__(32); var snippet = __webpack_require__(6); var RadialPlot = snippet.defineClass(/** @lends Plot.prototype */ { @@ -15235,7 +15836,7 @@ return /******/ (function(modules) { // webpackBootstrap }); } - // 마지막 스탭 라벨은 카테고리랑 겹칠수 있어 만들지 않음 + // skip last step label. it could overlapped by category label for (j = 0; j < (stepLabels.length - 1); j += 1) { stepLabelData.push({ text: stepLabels[j], @@ -15303,11 +15904,11 @@ return /******/ (function(modules) { // webpackBootstrap var points = []; var stepPoints, pointY, point, stepPixel, i, j; - stepPixel = radius / (stepCount - 1); // 0 스텝에는 크기가 없는 점이니 스텝한개는 제거 + stepPixel = radius / (stepCount - 1); // As there is not size in step 0, one step is removed for (i = 0; i < stepCount; i += 1) { stepPoints = []; - // 회전할 첫번째 픽셀의 Y축 값 + // point Y of first pixel to rotate pointY = centerY + (stepPixel * i); for (j = 0; j < angleStepCount; j += 1) { @@ -15315,7 +15916,7 @@ return /******/ (function(modules) { // webpackBootstrap stepPoints.push({ left: point.x, - top: height - point.y // y좌표를 top좌표로 전환 + top: height - point.y // convert y to top }); } @@ -15365,7 +15966,7 @@ return /******/ (function(modules) { // webpackBootstrap points.push({ left: point.x, - top: height - point.y, // y좌표를 top좌표로 전환 + top: height - point.y, // convert y to top anchor: anchor }); } @@ -15384,7 +15985,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15496,7 +16097,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15508,9 +16109,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var chartExporter = __webpack_require__(50); + var chartExporter = __webpack_require__(51); var dom = __webpack_require__(9); - var eventListener = __webpack_require__(54); + var eventListener = __webpack_require__(55); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -15781,12 +16382,8 @@ return /******/ (function(modules) { // webpackBootstrap this._hideChartExportMenu(); } else if (dom.hasClass(elTarget, chartConst.CLASS_NAME_CHART_EXPORT_MENU_BUTTON) && (this.chartExportMenuContainer === elTarget.parentNode) - ) { - if (dom.hasClass(this.chartExportMenuContainer, CLASS_NAME_CHART_EXPORT_MENU_OPENED)) { - this._hideChartExportMenu(); - } else { - this._showChartExportMenu(); - } + && !dom.hasClass(this.chartExportMenuContainer, CLASS_NAME_CHART_EXPORT_MENU_OPENED)) { + this._showChartExportMenu(); } else { this._hideChartExportMenu(); } @@ -15865,7 +16462,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15877,8 +16474,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var arrayUtil = __webpack_require__(10); - var dataExporter = __webpack_require__(51); - var imageExporter = __webpack_require__(53); + var dataExporter = __webpack_require__(52); + var imageExporter = __webpack_require__(54); var snippet = __webpack_require__(6); var browser = snippet.browser; @@ -15961,7 +16558,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15972,7 +16569,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var downloader = __webpack_require__(52); + var downloader = __webpack_require__(53); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -16018,12 +16615,15 @@ return /******/ (function(modules) { // webpackBootstrap */ function _get2DArrayFromRawData(rawData) { var resultArray = []; - var categories, seriesName, data; + var categories; var isHeatMap = (rawData.categories && snippet.isExisty(rawData.categories.x)); + var isBullet = (rawData.series && snippet.isExisty(rawData.series.bullet)); if (rawData) { if (isHeatMap) { - categories = rawData.categories.x; + return _get2DArrayFromHeatmapRawData(rawData); + } else if (isBullet) { + return _get2DArrayFromBulletRawData(rawData); } else if (rawData.categories) { categories = rawData.categories; } @@ -16031,16 +16631,10 @@ return /******/ (function(modules) { // webpackBootstrap resultArray.push([''].concat(categories)); snippet.forEach(rawData.series, function(seriesDatum) { - snippet.forEach(seriesDatum, function(seriesItem, index) { - if (isHeatMap) { - seriesName = rawData.categories.y[index]; - data = seriesItem; - } else { - seriesName = seriesItem.name; - data = seriesItem.data; - } + snippet.forEach(seriesDatum, function(seriesItem) { + var row = [seriesItem.name].concat(seriesItem.data); - resultArray.push([seriesName].concat(data)); + resultArray.push(row); }); }); } @@ -16048,6 +16642,143 @@ return /******/ (function(modules) { // webpackBootstrap return resultArray; } + /** + * Make table head data for Excel + * @param {number} maxRangeCount - max range count + * @param {number} maxMarkerCount - max marker count + * @returns {Array.} - table head data + * @private + */ + function _makeTHeadForBullet(maxRangeCount, maxMarkerCount) { + var tableHead = ['', chartConst.BULLET_TYPE_ACTUAL]; + var i = 0; + + for (; i < maxRangeCount; i += 1) { + tableHead.push(chartConst.BULLET_TYPE_RANGE + i); + } + + i = 0; + for (; i < maxMarkerCount; i += 1) { + tableHead.push(chartConst.BULLET_TYPE_MARKER + i); + } + + return tableHead; + } + + /** + * Make table cells from bullet ranges + * @param {Array.>} ranges - series item's ranges data + * @param {number} maxRangeCount - max range count + * @returns {Array.} - cells containing range data + * @private + */ + function _makeTCellsFromBulletRanges(ranges, maxRangeCount) { + var cells = []; + var i = 0; + var dataText; + + for (; i < maxRangeCount; i += 1) { + dataText = ''; + + if (ranges && ranges[i]) { + dataText = ((ranges[i].length > 0) ? ranges[i][0] : '') + + '~' + ((ranges[i].length > 1) ? ranges[i][1] : ''); + } + cells.push(dataText); + } + + return cells; + } + + /** + * Make table cells from bullet markers + * @param {Array.>} markers - series item's markers data + * @param {number} maxMarkerCount - max marker count + * @returns {Array.} - cells containing marker data + * @private + */ + function _makeTCellsFromBulletMarkers(markers, maxMarkerCount) { + var cells = []; + var i = 0; + var dataText; + + for (; i < maxMarkerCount; i += 1) { + dataText = markers && markers[i] ? markers[i] : ''; + cells.push(dataText); + } + + return cells; + } + + /** + * Make table data for importing in excel, by using bullet chart raw data + * @param {object} rawData - raw data + * @param {object} [options] download option + * @returns {Array.>} - table data for importing in excel + * @private + */ + function _get2DArrayFromBulletRawData(rawData) { + var resultArray = []; + var maxCounts = _calculateMaxCounts(rawData.series.bullet); + var maxRangeCount = maxCounts.maxRangeCount; + var maxMarkerCount = maxCounts.maxMarkerCount; + + resultArray.push(_makeTHeadForBullet(maxRangeCount, maxMarkerCount)); + + snippet.forEach(rawData.series.bullet, function(seriesItem) { + var row = [seriesItem.name, seriesItem.data]; + + row = row.concat(_makeTCellsFromBulletRanges(seriesItem.ranges, maxRangeCount)); + row = row.concat(_makeTCellsFromBulletMarkers(seriesItem.markers, maxMarkerCount)); + resultArray.push(row); + }); + + return resultArray; + } + + /** + * Calculate maxinum count of range and marker property + * @param {object} bulletSeries - raw series data of bullet chart + * @returns {object} - maximum count of range and marker property + * @private + */ + function _calculateMaxCounts(bulletSeries) { + var maxRangeCount = 0; + var maxMarkerCount = 0; + + snippet.forEach(bulletSeries, function(series) { + maxRangeCount = Math.max(maxRangeCount, series.ranges.length); + maxMarkerCount = Math.max(maxMarkerCount, series.markers.length); + }); + + return { + maxRangeCount: maxRangeCount, + maxMarkerCount: maxMarkerCount + }; + } + + /** + * Make table data for importing in excel, by using heatmap chart raw data + * @param {object} rawData - raw data + * @returns {Array.>} - table data for importing in excel + * @private + */ + function _get2DArrayFromHeatmapRawData(rawData) { + var resultArray = []; + + resultArray.push([''].concat(rawData.categories.x)); + + snippet.forEach(rawData.series, function(seriesDatum) { + snippet.forEach(seriesDatum, function(seriesItem, index) { + var row = [rawData.categories.y[index]].concat(seriesItem); + + resultArray.push(row); + }); + }); + + return resultArray; + } + /** * Get table element from chart data 2D array for xls content * @param {Array.>} chartData2DArray - chart data 2D array @@ -16152,12 +16883,17 @@ return /******/ (function(modules) { // webpackBootstrap dataExporter._makeCsvBodyWithRawData = _makeCsvBodyWithRawData; dataExporter._makeXlsBodyWithRawData = _makeXlsBodyWithRawData; dataExporter._get2DArrayFromRawData = _get2DArrayFromRawData; + dataExporter._get2DArrayFromBulletRawData = _get2DArrayFromBulletRawData; + dataExporter._get2DArrayFromHeatmapRawData = _get2DArrayFromHeatmapRawData; + dataExporter._makeTCellsFromBulletRanges = _makeTCellsFromBulletRanges; + dataExporter._makeTCellsFromBulletMarkers = _makeTCellsFromBulletMarkers; + dataExporter._makeTHeadForBullet = _makeTHeadForBullet; module.exports = dataExporter; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16300,7 +17036,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16311,7 +17047,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var downloader = __webpack_require__(52); + var downloader = __webpack_require__(53); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -16433,7 +17169,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16615,7 +17351,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 55 */ +/* 56 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16627,8 +17363,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var LegendModel = __webpack_require__(56); - var pluginFactory = __webpack_require__(31); + var LegendModel = __webpack_require__(57); + var pluginFactory = __webpack_require__(32); var predicate = __webpack_require__(11); var raphaelRenderUtil = __webpack_require__(5); var snippet = __webpack_require__(6); @@ -16994,7 +17730,7 @@ return /******/ (function(modules) { // webpackBootstrap params.seriesTypes = seriesTypes; params.chartType = chartType; - // @todo axisTypeMixer에서 addComponents에서 추가된 additionalParams가 extends되야됨 우선 생략 그내용이 뭔지 파악해서 여기서 그옵션을 넣어야함 + // @todo should extends additionalParams added when addComponents(), should grasp the omitted legend = new Legend(params); } @@ -17008,12 +17744,11 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 56 */ +/* 57 */ /***/ (function(module, exports, __webpack_require__) { /** - * @fileoverview LegendModel is legend model. - * 각 범례 힝목의 체크와 선택 여부를 관리하는 모델 + * @fileoverview LegendModel is a model for legend area(checkbox, icon, label text) * @author NHN Ent. * FE Development Lab */ @@ -17356,7 +18091,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 57 */ +/* 58 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17369,7 +18104,7 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var pluginFactory = __webpack_require__(31); + var pluginFactory = __webpack_require__(32); var snippet = __webpack_require__(6); var SpectrumLegend = snippet.defineClass(/** @lends SpectrumLegend.prototype */ { @@ -17648,7 +18383,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 58 */ +/* 59 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17661,9 +18396,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); - var pluginFactory = __webpack_require__(31); + var pluginFactory = __webpack_require__(32); var snippet = __webpack_require__(6); var CircleLegend = snippet.defineClass(/** @lends CircleLegend.prototype */ { @@ -17859,7 +18594,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 59 */ +/* 60 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17870,9 +18605,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var normalTooltipFactory = __webpack_require__(60); - var groupTooltipFactory = __webpack_require__(65); - var mapChartTooltipFactory = __webpack_require__(67); + var normalTooltipFactory = __webpack_require__(61); + var groupTooltipFactory = __webpack_require__(66); + var mapChartTooltipFactory = __webpack_require__(68); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -17945,7 +18680,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 60 */ +/* 61 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17956,11 +18691,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var TooltipBase = __webpack_require__(61); - var singleTooltipMixer = __webpack_require__(62); + var TooltipBase = __webpack_require__(62); + var singleTooltipMixer = __webpack_require__(63); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var tooltipTemplate = __webpack_require__(63); + var tooltipTemplate = __webpack_require__(64); var snippet = __webpack_require__(6); /** @@ -17987,29 +18722,54 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ _makeTooltipHtml: function(category, item) { - var isPieOrPieDonutComboChart = predicate.isPieChart(this.chartType) - || predicate.isPieDonutComboChart(this.chartType, this.chartTypes); - var template; + var template = this._getTooltipTemplate(item); + + return template(snippet.extend({ + categoryVisible: category ? 'show' : 'hide', + category: category + }, item)); + }, + + /** + * get tooltip template from a templates collection + * @param {{value: string, legend: string, chartType: string, suffix: ?string}} item item data + * @returns {string} tooltip template + * @private + */ + _getTooltipTemplate: function(item) { + var template = tooltipTemplate.tplDefault; if (predicate.isBoxplotChart(this.chartType)) { - if (snippet.isNumber(item.outlierIndex)) { - template = tooltipTemplate.tplBoxplotChartOutlier; - item.label = item.outliers[item.outlierIndex].label; - } else { - template = tooltipTemplate.tplBoxplotChartDefault; - } - } else if (isPieOrPieDonutComboChart) { + template = this._getBoxplotTooltipTemplate(item); + } else if (predicate.isPieChart(this.chartType) || + predicate.isPieDonutComboChart(this.chartType, this.chartTypes)) { template = tooltipTemplate.tplPieChart; } else if (this.dataProcessor.coordinateType) { template = tooltipTemplate.tplCoordinatetypeChart; - } else { - template = tooltipTemplate.tplDefault; + } else if (predicate.isBulletChart(this.chartType)) { + template = tooltipTemplate.tplBulletChartDefault; } - return template(snippet.extend({ - categoryVisible: category ? 'show' : 'hide', - category: category - }, item)); + return template; + }, + + /** + * Get tooltip template of box plot chart + * If item has outlierIndex, return outlier template + * Otherwise, return box plot default template + * @param {{value: string, legend: string, chartType: string, suffix: ?string}} item item data + * @returns {string} tooltip template + * @private + */ + _getBoxplotTooltipTemplate: function(item) { + var template = tooltipTemplate.tplBoxplotChartDefault; + + if (snippet.isNumber(item.outlierIndex)) { + template = tooltipTemplate.tplBoxplotChartOutlier; + item.label = item.outliers[item.outlierIndex].label; + } + + return template; }, /** @@ -18112,11 +18872,11 @@ return /******/ (function(modules) { // webpackBootstrap var tooltipLabel = seriesItem.tooltipLabel; var labelFormatter = this.labelFormatter; var tooltipDatum = { - legend: (legendLabel || '') + legend: legendLabel || '', + label: tooltipLabel || (seriesItem.label ? labelPrefix + seriesItem.label : ''), + category: category || '' }; - tooltipDatum.label = tooltipLabel || (seriesItem.label ? labelPrefix + seriesItem.label : ''); - if (labelFormatter) { tooltipDatum = labelFormatter(seriesItem, tooltipDatum, labelPrefix); } @@ -18145,14 +18905,20 @@ return /******/ (function(modules) { // webpackBootstrap } this.dataProcessor.eachBySeriesGroup(function(seriesGroup, groupIndex, chartType) { - var data; + var data, isBulletChart; chartType = chartType || self.chartType; + isBulletChart = predicate.isBulletChart(chartType); data = seriesGroup.map(function(seriesItem, index) { var category = self.dataProcessor.makeTooltipCategory(groupIndex, index, self.isVertical); + var legendIndex = isBulletChart ? groupIndex : index; + + if (!seriesItem) { + return null; + } - return seriesItem ? self._makeTooltipDatum(legendLabels[chartType][index], category, seriesItem) : null; + return self._makeTooltipDatum(legendLabels[chartType][legendIndex], category, seriesItem); }); if (!tooltipData[chartType]) { @@ -18179,7 +18945,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 61 */ +/* 62 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18553,13 +19319,14 @@ return /******/ (function(modules) { // webpackBootstrap /** * onHideTooltip is callback of mouse event detector hideTooltip for SeriesView - * @param {number} index index - * @param {{silent: {boolean}}} options - hide tooltip options + * @param {number|object} prevFound - showing tooltip object in case single tooltip, + * - showing tooltip index in case group tooltip + * @param {{silent: {boolean}}} [options] - hide tooltip options */ - onHideTooltip: function(index, options) { + onHideTooltip: function(prevFound, options) { var tooltipElement = this._getTooltipElement(); - this._hideTooltip(tooltipElement, index, options); + this._hideTooltip(tooltipElement, prevFound, options); }, /** @@ -18671,7 +19438,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 62 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18744,7 +19511,23 @@ return /******/ (function(modules) { // webpackBootstrap _isShowedTooltip: function(elTooltip) { var isShowed = elTooltip.getAttribute('data-showed'); - return isShowed === 'true' || isShowed === true; // ie7에서는 boolean형태의 true를 반환함 + return isShowed === 'true' || isShowed === true; // true in ie7 + }, + + /** + * Make tooltip position for bullet chart + * @param {object} params - mouse position + * @returns {object} - position of single tooltip + * @private + */ + _makeTooltipPositionForBulletChart: function(params) { + var mousePosition = params.mousePosition; + var tooltipAreaPosition = this.layout.position; + + return { + left: mousePosition.left - tooltipAreaPosition.left, + top: mousePosition.top - tooltipAreaPosition.top + }; }, /** @@ -18917,7 +19700,7 @@ return /******/ (function(modules) { // webpackBootstrap var position = this.layout.position; var bound = params.bound; var positionOption = params.positionOption; - var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORLD, this.labelTheme); + var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, this.labelTheme); return { left: bound.left + ((bound.width - params.dimension.width) / 2) + positionOption.left - position.left, @@ -19144,7 +19927,7 @@ return /******/ (function(modules) { // webpackBootstrap * Hide tooltip. * @param {HTMLElement} tooltipElement - tooltip element * @param {object} prevFoundData - data represented by tooltip elements - * @param {{silent: {boolean}}} options - options for hiding a tooltip element + * @param {{silent: {boolean}}} [options] - options for hiding a tooltip element * @private */ _hideTooltip: function(tooltipElement, prevFoundData, options) { @@ -19218,7 +20001,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 63 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19229,7 +20012,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var templateMaker = __webpack_require__(64); + var templateMaker = __webpack_require__(65); var htmls = { HTML_DEFAULT_TEMPLATE: '
' + @@ -19259,6 +20042,7 @@ return /******/ (function(modules) { // webpackBootstrap '
{{ category }}
' + '{{ items }}' + '
', + HTML_GROUP_TYPE: '
{{ type }}
', HTML_GROUP_ITEM: '
' + '
' + ' {{ legend }}{{ value }}' + @@ -19309,6 +20093,10 @@ return /******/ (function(modules) { // webpackBootstrap '{{ label }}' + '{{ suffix }}' + '
' + + '', + HTML_BULLET_TEMPLATE: '
' + + '
{{ category }}' + + '{{ label }}{{ suffix }}
' + '
' }; @@ -19317,16 +20105,18 @@ return /******/ (function(modules) { // webpackBootstrap tplPieChart: templateMaker.template(htmls.HTML_PIE_TEMPLATE), tplCoordinatetypeChart: templateMaker.template(htmls.HTML_COORDINATE_TYPE_CHART_TEMPLATE), tplGroup: templateMaker.template(htmls.HTML_GROUP), + tplGroupType: templateMaker.template(htmls.HTML_GROUP_TYPE), tplGroupItem: templateMaker.template(htmls.HTML_GROUP_ITEM), tplGroupCssText: templateMaker.template(htmls.GROUP_CSS_TEXT), tplMapChartDefault: templateMaker.template(htmls.HTML_MAP_CHART_DEFAULT_TEMPLATE), tplBoxplotChartDefault: templateMaker.template(htmls.HTML_BOXPLOT_TEMPLATE), - tplBoxplotChartOutlier: templateMaker.template(htmls.HTML_BOXPLOT_OUTLIER) + tplBoxplotChartOutlier: templateMaker.template(htmls.HTML_BOXPLOT_OUTLIER), + tplBulletChartDefault: templateMaker.template(htmls.HTML_BULLET_TEMPLATE) }; /***/ }), -/* 64 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19366,7 +20156,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 65 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19377,14 +20167,15 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var TooltipBase = __webpack_require__(61); - var GroupTooltipPositionModel = __webpack_require__(66); + var TooltipBase = __webpack_require__(62); + var GroupTooltipPositionModel = __webpack_require__(67); var chartConst = __webpack_require__(8); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); - var defaultTheme = __webpack_require__(33); - var tooltipTemplate = __webpack_require__(63); + var defaultTheme = __webpack_require__(34); + var tooltipTemplate = __webpack_require__(64); var snippet = __webpack_require__(6); + var predicate = __webpack_require__(11); /** * @classdesc GroupTooltip component. @@ -19398,31 +20189,50 @@ return /******/ (function(modules) { // webpackBootstrap * @private * @override */ - init: function() { + init: function(params) { this.prevIndex = null; - TooltipBase.apply(this, arguments); + this.isBullet = predicate.isBulletChart(params.chartType); + TooltipBase.call(this, params); }, /** * Make tooltip html. * @param {string} category category * @param {Array.<{value: string, legend: string, chartType: string, suffix: ?string}>} items items data + * @param {string} rawCategory raw category + * @param {number} groupIndex group index * @returns {string} tooltip html * @private */ - _makeTooltipHtml: function(category, items) { - var template = tooltipTemplate.tplGroupItem, - cssTextTemplate = tooltipTemplate.tplGroupCssText, - colors = this._makeColors(this.theme), - itemsHtml = snippet.map(items, function(item, index) { - if (!item.value) { - return null; - } + _makeTooltipHtml: function(category, items, rawCategory, groupIndex) { + var template = tooltipTemplate.tplGroupItem; + var cssTextTemplate = tooltipTemplate.tplGroupCssText; + var colors = this._makeColors(this.theme, groupIndex); + var prevType, itemsHtml; - return template(snippet.extend({ - cssText: cssTextTemplate({color: colors[index]}) - }, item)); - }).join(''); + itemsHtml = snippet.map(items, function(item, index) { + var type = item.type; + var typeVisible = (type !== 'data') && (prevType !== type); + var itemHtml = ''; + + prevType = type; + + if (!item.value) { + return null; + } + + if (typeVisible) { + itemHtml = tooltipTemplate.tplGroupType({ + type: type + }); + } + + itemHtml += template(snippet.extend({ + cssText: cssTextTemplate({color: colors[index]}) + }, item)); + + return itemHtml; + }).join(''); return tooltipTemplate.tplGroup({ category: category, @@ -19517,28 +20327,39 @@ return /******/ (function(modules) { // webpackBootstrap * @override */ makeTooltipData: function() { - var self = this; var length = this.dataProcessor.getCategoryCount(this.isVertical); return snippet.map(this.dataProcessor.getSeriesGroups(), function(seriesGroup, index) { + var values = seriesGroup.map(function(item) { + return { + type: item.type || 'data', + label: item.label + }; + }); + return { - category: self.dataProcessor.makeTooltipCategory(index, length - index, self.isVertical), - values: seriesGroup.pluck('label') + category: this.dataProcessor.makeTooltipCategory(index, length - index, this.isVertical), + values: values }; - }); + }, this); }, /** * Make colors. * @param {object} theme tooltip theme + * @param {number} [groupIndex] groupIndex * @returns {Array.} colors * @private */ - _makeColors: function(theme) { + _makeColors: function(theme, groupIndex) { var colorIndex = 0, legendLabels = this.dataProcessor.getLegendData(), defaultColors, colors, prevChartType; + if (this.isBullet) { + return this.dataProcessor.getGraphColors()[groupIndex]; + } + if (theme.colors) { return theme.colors; } @@ -19564,23 +20385,34 @@ return /******/ (function(modules) { // webpackBootstrap /** * Make rendering data about legend item. * @param {Array.} values values + * @param {number} groupIndex groupIndex * @returns {Array.<{value: string, legend: string, chartType: string, suffix: ?string}>} legend item data. * @private */ - _makeItemRenderingData: function(values) { + _makeItemRenderingData: function(values, groupIndex) { var dataProcessor = this.dataProcessor, suffix = this.suffix; - return snippet.map(values, function(value, index) { - var legendLabel = dataProcessor.getLegendItem(index); - - return { - value: value, - legend: legendLabel.label, - chartType: legendLabel.chartType, - suffix: suffix + return snippet.map(values, function(data, index) { + var item = { + value: data.label, + type: data.type, + suffix: suffix, + legend: '' }; - }); + var legendLabel; + + if (this.isBullet) { + legendLabel = dataProcessor.getLegendItem(groupIndex); + } else { + legendLabel = dataProcessor.getLegendItem(index); + item.legend = legendLabel.label; + } + + item.chartType = legendLabel.chartType; + + return item; + }, this); }, /** @@ -19594,8 +20426,8 @@ return /******/ (function(modules) { // webpackBootstrap var items, htmlString = ''; if (data) { - items = this._makeItemRenderingData(data.values); - htmlString = this.templateFunc(data.category, items, this.getRawCategory(groupIndex)); + items = this._makeItemRenderingData(data.values, groupIndex); + htmlString = this.templateFunc(data.category, items, this.getRawCategory(groupIndex), groupIndex); } return htmlString; @@ -19810,18 +20642,18 @@ return /******/ (function(modules) { // webpackBootstrap /** * Hide tooltip. - * @param {HTMLElement} elTooltip tooltip element - * @param {number} index index - * @param {object} options - options for hiding tooltip + * @param {HTMLElement} tooltipElement tooltip element + * @param {number} prevFoundIndex - showing tooltip index + * @param {object} [options] - options for hiding tooltip * @private */ - _hideTooltip: function(elTooltip, index, options) { - var silent = options.silent; + _hideTooltip: function(tooltipElement, prevFoundIndex, options) { + var silent = !!(options && options.silent); this.prevIndex = null; - this._fireBeforeHideTooltipPublicEvent(index, silent); - this._hideTooltipSector(index); - dom.removeClass(elTooltip, 'show'); - elTooltip.style.cssText = ''; + this._fireBeforeHideTooltipPublicEvent(prevFoundIndex, silent); + this._hideTooltipSector(prevFoundIndex); + dom.removeClass(tooltipElement, 'show'); + tooltipElement.style.cssText = ''; }, /** @@ -19853,7 +20685,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 66 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20333,7 +21165,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 67 */ +/* 68 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20345,9 +21177,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var TooltipBase = __webpack_require__(61); - var singleTooltipMixer = __webpack_require__(62); - var tooltipTemplate = __webpack_require__(63); + var TooltipBase = __webpack_require__(62); + var singleTooltipMixer = __webpack_require__(63); + var tooltipTemplate = __webpack_require__(64); var snippet = __webpack_require__(6); /** @@ -20446,7 +21278,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 68 */ +/* 69 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20457,9 +21289,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var MouseEventDetectorBase = __webpack_require__(69); + var MouseEventDetectorBase = __webpack_require__(70); var chartConst = __webpack_require__(8); - var eventListener = __webpack_require__(54); + var eventListener = __webpack_require__(55); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -20641,7 +21473,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 69 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -20652,10 +21484,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var TickBaseCoordinateModel = __webpack_require__(70); - var BoundsBaseCoordinateModel = __webpack_require__(71); + var TickBaseCoordinateModel = __webpack_require__(71); + var BoundsBaseCoordinateModel = __webpack_require__(72); var chartConst = __webpack_require__(8); - var eventListener = __webpack_require__(54); + var eventListener = __webpack_require__(55); var predicate = __webpack_require__(11); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); @@ -20702,6 +21534,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * whether allow select series or not + * @type {boolean} */ this.allowSelect = params.allowSelect; @@ -20723,18 +21556,6 @@ return /******/ (function(modules) { // webpackBootstrap */ this.selectedData = null; - /** - * previous client position of mouse event (clientX, clientY) - * @type {null | object} - */ - this.prevClientPosition = null; - - /** - * previous found data - * @type {null | object} - */ - this.prevFoundData = null; - isLineTypeChart = predicate.isLineTypeChart(this.chartType, this.chartTypes); /** * expand size @@ -21006,28 +21827,16 @@ return /******/ (function(modules) { // webpackBootstrap _showTooltip: function() {}, /** - * Animate for adding data. + * hide tooltip + * @private + * @abstract */ - animateForAddingData: function() { - var foundData, isMoving; - - if (!this.prevClientPosition) { - return; - } - - foundData = this._findData(this.prevClientPosition.x, this.prevClientPosition.y); - - if (foundData) { - isMoving = this.prevFoundData && (this.prevFoundData.indexes.groupIndex === foundData.indexes.groupIndex); - this._showTooltip(foundData, isMoving); - } - - this.prevFoundData = foundData; - }, + _hideTooltip: function() {}, /** - * Send mouse position data to series component, when occur mouse event like move, click. - * 이벤트 발생시 시리즈 엘리먼트 감지가 가능하도록 mouseEventDetector container를 일시적으로 숨긴다. + * When mouse event happens, + * hide MouseEventDetector container so that detect event of series elements + * and send mouse position data to series component * @param {string} eventType - mouse event detector type * @param {MouseEvent} e - mouse event * @private @@ -21090,23 +21899,17 @@ return /******/ (function(modules) { // webpackBootstrap /** * Store client position, when occur mouse move event. * @param {MouseEvent} e - mouse event + * @abstract * @private */ - _onMousemove: function(e) { - this.prevClientPosition = { - x: e.clientX, - y: e.clientY - }; - }, + _onMousemove: function() {}, /** - * Initialize prevClientPosition and prevFoundData, when occur mouse out. + * Abstract mouseout handler + * @abstract * @private */ - _onMouseout: function() { - this.prevClientPosition = null; - this.prevFoundData = null; - }, + _onMouseout: function() {}, /** * Attach mouse event. @@ -21126,7 +21929,22 @@ return /******/ (function(modules) { // webpackBootstrap * find data by indexes * @abstract */ - findDataByIndexes: function() {} + findDataByIndexes: function() {}, + + /** + * Set prevClientPosition by MouseEvent + * @param {?MouseEvent} event - mouse event + */ + _setPrevClientPosition: function(event) { + if (!event) { + this.prevClientPosition = null; + } else { + this.prevClientPosition = { + x: event.clientX, + y: event.clientY + }; + } + } }); snippet.CustomEvents.mixin(MouseEventDetectorBase); @@ -21135,7 +21953,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 70 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21327,7 +22145,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 71 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21394,6 +22212,31 @@ return /******/ (function(modules) { // webpackBootstrap this.data = this._makeData(seriesItemBoundsData); }, + /** + * @param {string} chartType - chart type + * @param {object} indexes - index of SeriesDataModel + * @param {boolean} allowNegativeTooltip - whether allow negative tooltip or not + * @param {object} bound - coordinate data for rendering graph + * @returns {object} - `sendData`: tooltip contents, `bound`: for detecting hovered or not + * @private + */ + _makeTooltipData: function(chartType, indexes, allowNegativeTooltip, bound) { + return { + sendData: { + chartType: chartType, + indexes: indexes, + allowNegativeTooltip: allowNegativeTooltip, + bound: bound + }, + bound: { + left: bound.left, + top: bound.top, + right: bound.left + bound.width, + bottom: bound.top + bound.height + } + }; + }, + /** * Make position data for rect type graph * @param {groupBound} groupBounds group bounds @@ -21405,33 +22248,22 @@ return /******/ (function(modules) { // webpackBootstrap var allowNegativeTooltip = !predicate.isBoxTypeChart(chartType); return snippet.map(groupBounds, function(bounds, groupIndex) { - return snippet.map(bounds, function(_bound, index) { - var bound; - if (!_bound) { + return snippet.map(bounds, function(bound, index) { + if (!bound) { return null; } - bound = _bound.end; - - return { - sendData: { - chartType: chartType, - indexes: { - groupIndex: groupIndex, - index: index - }, - allowNegativeTooltip: allowNegativeTooltip, - bound: bound + return this._makeTooltipData( + chartType, + { + groupIndex: groupIndex, + index: index }, - bound: { - left: bound.left, - top: bound.top, - right: bound.left + bound.width, - bottom: bound.top + bound.height - } - }; - }); - }); + allowNegativeTooltip, + bound.end || bound + ); + }, this); + }, this); }, /** @@ -21446,42 +22278,34 @@ return /******/ (function(modules) { // webpackBootstrap var _groupBounds = [].concat(groupBounds); snippet.forEach(_groupBounds, function(bounds, groupIndex) { - snippet.forEach(bounds, function(_bound, index) { + snippet.forEach(bounds, function(bound, index) { var outliers; - if (_bound.outliers && _bound.outliers.length) { - outliers = snippet.map(_bound.outliers, function(outlier, outlierIndex) { - var bound = { + if (bound.outliers && bound.outliers.length) { + outliers = snippet.map(bound.outliers, function(outlier, outlierIndex) { + var outlierBound = { top: outlier.top - 3, left: outlier.left - 3, width: 6, height: 6 }; - return { - sendData: { - chartType: chartType, - indexes: { - groupIndex: groupIndex, - index: index, - outlierIndex: outlierIndex - }, - allowNegativeTooltip: allowNegativeTooltip, - bound: bound + return this._makeTooltipData( + chartType, + { + groupIndex: groupIndex, + index: index, + outlierIndex: outlierIndex }, - bound: { - left: bound.left, - top: bound.top, - right: bound.left + bound.width, - bottom: bound.top + bound.height - } - }; - }); + allowNegativeTooltip, + outlierBound + ); + }, this); resultData[groupIndex] = resultData[groupIndex].concat(outliers); } - }); - }); + }, this); + }, this); }, /** @@ -21558,22 +22382,21 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ _makeData: function(seriesItemBoundsData) { - var self = this; var data = snippet.map(seriesItemBoundsData, function(info) { var result; if (predicate.isLineTypeChart(info.chartType)) { - result = self._makeDotTypePositionData(info.data.groupPositions, info.chartType); + result = this._makeDotTypePositionData(info.data.groupPositions, info.chartType); } else { - result = self._makeRectTypePositionData(info.data.groupBounds, info.chartType); + result = this._makeRectTypePositionData(info.data.groupBounds, info.chartType); } if (predicate.isBoxplotChart(info.chartType)) { - self._makeOutliersPositionDataForBoxplot(info.data.groupBounds, info.chartType, result); + this._makeOutliersPositionDataForBoxplot(info.data.groupBounds, info.chartType, result); } return result; - }); + }, this); return this._joinData(data); }, @@ -21615,10 +22438,10 @@ return /******/ (function(modules) { // webpackBootstrap var candidates; if (groupIndex > -1 && this.data[groupIndex]) { - // layerX, layerY를 포함하는 data 추출 + // extract data containing layerX, layerY candidates = this._findCandidates(this.data[groupIndex], layerX, layerY); - // 추출된 data 중 top이 layerY와 가장 가까운 data 찾아내기 + // find nearest data to top position among extracted data snippet.forEachArray(candidates, function(data) { var diff = Math.abs(layerY - data.bound.top); @@ -21680,7 +22503,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 72 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21691,11 +22514,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var predicate = __webpack_require__(11); - var areaTypeEventDetectorFactory = __webpack_require__(73); - var simpleEventDetectorFactory = __webpack_require__(76); - var groupTypeEventDetectorFactory = __webpack_require__(77); - var boundsTypeEventDetectorFactory = __webpack_require__(78); - var mapChartEventDetectorFactory = __webpack_require__(68); + var areaTypeEventDetectorFactory = __webpack_require__(74); + var simpleEventDetectorFactory = __webpack_require__(77); + var groupTypeEventDetectorFactory = __webpack_require__(78); + var boundsTypeEventDetectorFactory = __webpack_require__(79); + var mapChartEventDetectorFactory = __webpack_require__(69); /** * Factory for MouseEventDetector @@ -21718,6 +22541,7 @@ return /******/ (function(modules) { // webpackBootstrap || predicate.isBoxplotChart(chartType) || predicate.isHeatmapChart(chartType) || predicate.isTreemapChart(chartType) + || predicate.isBulletChart(chartType) ) { factory = boundsTypeEventDetectorFactory; } else if (predicate.isCoordinateTypeChart(chartType) @@ -21730,7 +22554,7 @@ return /******/ (function(modules) { // webpackBootstrap } params.chartType = chartType; - // @todo chartType이나 chartTypes없이 모두 seriesTypes만 보도록 변경해야한다.컴포넌트 전체의 문제임 + // @todo replace chartType, chartTypes to seriesTypes, problem of the whole component params.chartTypes = seriesTypes; params.zoomable = zoomable; params.allowSelect = seriesAllowSelect; @@ -21744,7 +22568,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 73 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21755,9 +22579,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var MouseEventDetectorBase = __webpack_require__(69); - var zoomMixer = __webpack_require__(74); - var AreaTypeDataModel = __webpack_require__(75); + var MouseEventDetectorBase = __webpack_require__(70); + var zoomMixer = __webpack_require__(75); + var AreaTypeDataModel = __webpack_require__(76); var snippet = __webpack_require__(6); var AREA_DETECT_DISTANCE_THRESHHOLD = 50; @@ -21779,6 +22603,12 @@ return /******/ (function(modules) { // webpackBootstrap */ this.prevFoundData = null; + /** + * previous client position of mouse event (clientX, clientY) + * @type {null | object} + */ + this.prevClientPosition = null; + /** * whether zoomable or not * @type {boolean} @@ -21791,6 +22621,26 @@ return /******/ (function(modules) { // webpackBootstrap } }, + /** + * Animate for adding data. + */ + animateForAddingData: function() { + var foundData, isMoving; + + if (!this.prevClientPosition) { + return; + } + + foundData = this._findData(this.prevClientPosition.x, this.prevClientPosition.y); + + if (foundData) { + isMoving = this.prevFoundData && (this.prevFoundData.indexes.groupIndex === foundData.indexes.groupIndex); + this._showTooltip(foundData, isMoving); + } + + this.prevFoundData = foundData; + }, + /** * Create areaTypeDataModel from seriesItemBoundsData for mouse event detector. * @param {Array.} seriesItemBoundsDatum - series item bounds datum @@ -21869,16 +22719,17 @@ return /******/ (function(modules) { // webpackBootstrap */ _showTooltip: function(foundData) { this.eventBus.fire('showTooltip', foundData); + this.prevFoundData = foundData; }, /** * Hide tooltip. - * @param {{silent: {boolean}}} options - options for hiding tooltip + * @param {{silent: {boolean}}} [options] - options for hiding tooltip * @private */ _hideTooltip: function(options) { - options = options || {}; this.eventBus.fire('hideTooltip', this.prevFoundData, options); + this.prevFoundData = null; }, /** @@ -21890,7 +22741,7 @@ return /******/ (function(modules) { // webpackBootstrap _onMousemove: function(e) { var dragMoseupResult, foundData; - MouseEventDetectorBase.prototype._onMousemove.call(this, e); + this._setPrevClientPosition(e); foundData = this._findData(e.clientX, e.clientY); @@ -21921,7 +22772,8 @@ return /******/ (function(modules) { // webpackBootstrap this._hideTooltip(); } - MouseEventDetectorBase.prototype._onMouseout.call(this); + this.prevClientPosition = null; + this.prevFoundData = null; }, /** @@ -21931,6 +22783,21 @@ return /******/ (function(modules) { // webpackBootstrap */ findDataByIndexes: function(indexes) { return this.dataModel.findDataByIndexes(indexes); + }, + + /** + * Set prevClientPosition by MouseEvent + * @param {?MouseEvent} event - mouse event + */ + _setPrevClientPosition: function(event) { + if (!event) { + this.prevClientPosition = null; + } else { + this.prevClientPosition = { + x: event.clientX, + y: event.clientY + }; + } } }); @@ -21944,7 +22811,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 74 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21955,11 +22822,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var MouseEventDetectorBase = __webpack_require__(69); + var MouseEventDetectorBase = __webpack_require__(70); var chartConst = __webpack_require__(8); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); - var eventListener = __webpack_require__(54); + var eventListener = __webpack_require__(55); var snippet = __webpack_require__(6); /** @@ -22310,10 +23177,10 @@ return /******/ (function(modules) { // webpackBootstrap * @private */ _onMouseupAfterDrag: function(e) { - // @TODO: 데이터가 없는 경우의 zoomable 정책 정의 필요 - // dragStartIndexes도 마찬가지지만 dragEnd 인덱스를 찾기 위해서는 차트에 data가 필요하다. - // 하지만 data가 없어도 차트는 그려질 수 있음. - // 그래서 이 부분에서 data가 없는경우 zoom을 실행하지 않도록 하기 위해 먼저 index를 확인한다. + // @TODO: define zoomable policy, when there is no data + // To find dragEndIndex for zoom, data should not be null. + // To avoid zooming avoid zooming with no data, check dragStartIndexes first + // Becault chart without data returns invalid dragStartIndexes var foundedDragEndData = this._findDataForZoomable(e.clientX, e.clientY); var target; @@ -22379,7 +23246,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 75 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22543,7 +23410,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22555,7 +23422,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var MouseEventDetectorBase = __webpack_require__(69); + var MouseEventDetectorBase = __webpack_require__(70); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -22641,7 +23508,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22653,8 +23520,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var EventDetectorBase = __webpack_require__(69); - var zoomMixer = __webpack_require__(74); + var EventDetectorBase = __webpack_require__(70); + var zoomMixer = __webpack_require__(75); var snippet = __webpack_require__(6); var GroupTypeEventDetector = snippet.defineClass(EventDetectorBase, /** @lends GroupTypeEventDetector.prototype */ { @@ -22787,7 +23654,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Show tooltip. - * @param {{indexes: {groupIndex: number}}} foundData - data + * @param {{indexes: {groupIndex: number}, silent: boolean}} foundData - data * @param {boolean} [isMoving] - whether moving or not * @private */ @@ -22801,7 +23668,6 @@ return /******/ (function(modules) { // webpackBootstrap * At this time, the index may be larger than the data size. */ if (this.tickBaseCoordinateModel.data.length > index) { - this.prevIndex = index; this.eventBus.fire('showTooltip', { index: index, range: this.tickBaseCoordinateModel.makeRange(index, positionValue), @@ -22810,16 +23676,16 @@ return /******/ (function(modules) { // webpackBootstrap isMoving: isMoving, silent: foundData.silent }); + this.prevIndex = index; } }, /** * Hide tooltip - * @param {{silent: {boolean}}} options - options for hiding tooltip + * @param {{silent: {boolean}}} [options] - options for hiding tooltip * @private */ _hideTooltip: function(options) { - options = options || {}; this.eventBus.fire('hideTooltip', this.prevIndex, options); this.prevIndex = null; }, @@ -22834,8 +23700,6 @@ return /******/ (function(modules) { // webpackBootstrap _onMousemove: function(e) { var foundData, index; - EventDetectorBase.prototype._onMousemove.call(this, e); - if (this.zoomable && this._isAfterDragMouseup()) { return; } @@ -22863,8 +23727,6 @@ return /******/ (function(modules) { // webpackBootstrap if (this._isOuterPosition(layerPosition.x, layerPosition.y) && !snippet.isNull(this.prevIndex)) { this._hideTooltip(); } - - EventDetectorBase.prototype._onMouseout.call(this); } }); @@ -22878,7 +23740,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22890,7 +23752,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var EventDetectorBase = __webpack_require__(69); + var EventDetectorBase = __webpack_require__(70); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var dom = __webpack_require__(9); @@ -22914,7 +23776,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * history array for treemap chart. - * @type {number} + * @type {array} */ this.zoomHistory = [-1]; @@ -22943,15 +23805,15 @@ return /******/ (function(modules) { // webpackBootstrap */ _showTooltip: function(foundData) { this.eventBus.fire('showTooltip', foundData); + this.prevFoundData = foundData; }, /** * Hide tooltip. - * @param {{silent: {boolean}}} options - options for hiding a tooltip + * @param {{silent: {boolean}}} [options] - options for hiding a tooltip * @private */ _hideTooltip: function(options) { - options = options || {}; this.eventBus.fire('hideTooltip', this.prevFoundData, options); this.prevFoundData = null; this.styleCursor(false); @@ -22977,7 +23839,9 @@ return /******/ (function(modules) { // webpackBootstrap * @override */ _onMousemove: function(e) { - var layerPosition = this._calculateLayerPosition(e.clientX, e.clientY); + var clientX = e.clientX; + var clientY = e.clientY; + var layerPosition = this._calculateLayerPosition(clientX, clientY); var foundData = this._findDataFromBoundsCoordinateModel(layerPosition); var seriesItem; @@ -22998,8 +23862,12 @@ return /******/ (function(modules) { // webpackBootstrap if (predicate.isTreemapChart(this.chartType)) { seriesItem = this._getSeriesItemByIndexes(foundData.indexes); this.styleCursor(seriesItem.hasChild); + } else if (predicate.isBulletChart(this.chartType)) { + foundData.mousePosition = { + left: clientX, + top: clientY + }; } - this._showTooltip(foundData); }, @@ -23074,7 +23942,7 @@ return /******/ (function(modules) { // webpackBootstrap * @override */ _onMouseout: function(e) { - // getBoundingClientRect()값 캐싱 금지 - 차트 위치 변경 시 오류 발생 + // do not cache getBoundingClientRect() - if not, it will cause error when chart location changed var bound = this.mouseEventDetectorContainer.getBoundingClientRect(); var clientX = e.clientX; var clientY = e.clientY; @@ -23088,7 +23956,7 @@ return /******/ (function(modules) { // webpackBootstrap this._hideTooltip(); } - EventDetectorBase.prototype._onMouseout.call(this); + this.prevFoundData = null; }, /** @@ -23128,7 +23996,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23139,8 +24007,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var BarTypeSeriesBase = __webpack_require__(81); + var Series = __webpack_require__(81); + var BarTypeSeriesBase = __webpack_require__(82); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -23314,7 +24182,7 @@ return /******/ (function(modules) { // webpackBootstrap return new BarChartSeries(params); } - // @todo 더나은 방법 찾아보자 + // @todo let's find better way barSeriesFactory.componentType = 'series'; barSeriesFactory.BarChartSeries = BarChartSeries; @@ -23322,7 +24190,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23343,7 +24211,7 @@ return /******/ (function(modules) { // webpackBootstrap var dom = __webpack_require__(9); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); - var pluginFactory = __webpack_require__(31); + var pluginFactory = __webpack_require__(32); var raphaelRenderUtil = __webpack_require__(5); var Series = snippet.defineClass(/** @lends Series.prototype */ { @@ -23502,6 +24370,12 @@ return /******/ (function(modules) { // webpackBootstrap */ this.drawingType = chartConst.COMPONENT_TYPE_RAPHAEL; + /** + * whether series lable is supported + * @type {boolean} + */ + this.supportSeriesLable = true; + this._attachToEventBus(); }, @@ -23619,7 +24493,7 @@ return /******/ (function(modules) { // webpackBootstrap this.seriesSet = funcRenderGraph(dimension, seriesData, paper); } - if (predicate.isShowLabel(this.options)) { + if (predicate.isShowLabel(this.options) && this.supportSeriesLable) { this.labelSet = this._renderSeriesLabelArea(paper); } } @@ -23695,6 +24569,7 @@ return /******/ (function(modules) { // webpackBootstrap var checkedLegends; this.paper = data.paper; this._setDataForRendering(data); + this._clearSeriesContainer(); this.beforeAxisDataMap = this.axisDataMap; if (data.checkedLegends) { @@ -23739,9 +24614,15 @@ return /******/ (function(modules) { // webpackBootstrap */ _clearSeriesContainer: function() { if (this.seriesSet && this.seriesSet.remove) { + this.seriesSet.forEach(function(series) { + series.remove(); + }, this); this.seriesSet.remove(); } if (this.labelSet && this.labelSet.remove) { + this.labelSet.forEach(function(label) { + label.remove(); + }, this); this.labelSet.remove(); } @@ -23755,8 +24636,6 @@ return /******/ (function(modules) { // webpackBootstrap rerender: function(data) { var checkedLegends; - this._clearSeriesContainer(); - if (this.dataProcessor.getGroupCount(this.seriesType)) { if (data.checkedLegends) { checkedLegends = data.checkedLegends[this.seriesType]; @@ -23764,6 +24643,7 @@ return /******/ (function(modules) { // webpackBootstrap } this._setDataForRendering(data); + this._clearSeriesContainer(); this._renderSeriesArea(data.paper, snippet.bind(this._renderGraph, this)); if (this.labelShowEffector) { @@ -23812,10 +24692,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {object} data data for rendering */ resize: function(data) { + this._clearSeriesContainer(); this._setDataForRendering(data); - if (this.labelSet && this.labelSet.remove) { - this.labelSet.remove(); - } this._renderSeriesArea(data.paper, snippet.bind(this._resizeGraph, this)); }, @@ -24097,7 +24975,7 @@ return /******/ (function(modules) { // webpackBootstrap showLabel: function() { this.options.showLabel = true; - if (!this.seriesLabelContainer) { + if (!this.seriesLabelContainer && this.supportSeriesLable) { this._renderSeriesLabelArea(this.paper); } }, @@ -24127,7 +25005,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24139,9 +25017,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var labelHelper = __webpack_require__(82); + var labelHelper = __webpack_require__(83); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); var raphaelRenderUtil = __webpack_require__(5); var snippet = __webpack_require__(6); @@ -24504,7 +25382,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24594,7 +25472,7 @@ return /******/ (function(modules) { // webpackBootstrap */ boundsToLabelPositions: function(seriesDataModel, boundsSet, theme, makePosition, isPivot) { var self = this; - var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORLD, theme); + var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, theme); makePosition = makePosition || snippet.bind(this._makePositionForBoundType, this); isPivot = !!isPivot; @@ -24714,7 +25592,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24725,8 +25603,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var BarTypeSeriesBase = __webpack_require__(81); + var Series = __webpack_require__(81); + var BarTypeSeriesBase = __webpack_require__(82); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); @@ -24893,7 +25771,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24904,8 +25782,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var LineTypeSeriesBase = __webpack_require__(85); + var Series = __webpack_require__(81); + var LineTypeSeriesBase = __webpack_require__(86); var snippet = __webpack_require__(6); var LineChartSeries = snippet.defineClass(Series, /** @lends LineChartSeries.prototype */ { @@ -24993,7 +25871,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25007,7 +25885,7 @@ return /******/ (function(modules) { // webpackBootstrap var arrayUtil = __webpack_require__(10); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -25173,7 +26051,7 @@ return /******/ (function(modules) { // webpackBootstrap _getLabelPositions: function(seriesDataModel, theme) { var self = this; var basePositions = arrayUtil.pivot(this.seriesData.groupPositions); - var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORLD, theme); + var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, theme); return seriesDataModel.map(function(seriesGroup, groupIndex) { return seriesGroup.map(function(seriesItem, index) { @@ -25392,7 +26270,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25403,9 +26281,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); + var Series = __webpack_require__(81); var chartConst = __webpack_require__(8); - var geom = __webpack_require__(48); + var geom = __webpack_require__(49); var snippet = __webpack_require__(6); var RadialChartSeries = snippet.defineClass(Series, /** @lends RadialChartSeries.prototype */ { @@ -25465,17 +26343,17 @@ return /******/ (function(modules) { // webpackBootstrap if (!snippet.isNull(seriesItem.end)) { valueSize = seriesItem.ratio * radius; - // centerY에 데이터의 값에 해당하는 높이만큼 더 해서 실제 좌표Y를 만든다. + // center y + real vaule size y = centerY + valueSize; - // 각도를 시계 방향으로 바꿈 + // turn angle to clockwise angle = 360 - (stepAngle * index); point = geom.rotatePointAroundOrigin(centerX, centerY, centerX, y, angle); position = { left: point.x, - top: height - point.y // y좌표를 top좌표로 변환(4/4분면) + top: height - point.y // convert y coordinate to top }; } @@ -25551,7 +26429,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25562,8 +26440,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var LineTypeSeriesBase = __webpack_require__(85); + var Series = __webpack_require__(81); + var LineTypeSeriesBase = __webpack_require__(86); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -25709,7 +26587,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 88 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25721,8 +26599,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var Series = __webpack_require__(80); - var CoordinateTypeSeriesBase = __webpack_require__(89); + var Series = __webpack_require__(81); + var CoordinateTypeSeriesBase = __webpack_require__(90); var snippet = __webpack_require__(6); var BubbleChartSeries = snippet.defineClass(Series, /** @lends BubbleChartSeries.prototype */ { @@ -25866,7 +26744,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 89 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26002,7 +26880,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 90 */ +/* 91 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26013,8 +26891,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var CoordinateTypeSeriesBase = __webpack_require__(89); + var Series = __webpack_require__(81); + var CoordinateTypeSeriesBase = __webpack_require__(90); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -26090,7 +26968,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 91 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26101,12 +26979,12 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); + var Series = __webpack_require__(81); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); var browser = snippet.browser; - var IS_LTE_THAN_IE8 = browser.msie && browser.version <= 8; + var IS_LTE_IE8 = browser.msie && browser.version <= 8; var MapChartSeries = snippet.defineClass(Series, /** @lends MapChartSeries.prototype */ { /** @@ -26199,7 +27077,7 @@ return /******/ (function(modules) { // webpackBootstrap _attachToEventBus: function() { Series.prototype._attachToEventBus.call(this); - if (!IS_LTE_THAN_IE8) { + if (!IS_LTE_IE8) { this.eventBus.on({ dragStartMapSeries: this.onDragStartMapSeries, dragMapSeries: this.onDragMapSeries, @@ -26561,7 +27439,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 92 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26572,7 +27450,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); + var Series = __webpack_require__(81); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -27293,9 +28171,9 @@ return /******/ (function(modules) { // webpackBootstrap params.chartType = 'pie'; if (chartType === 'combo') { - // 앨리어스라고 불리는 시리즈 매핑 키가 내부에서는 seriesType으로 사용되고 있다.(ex pie1) - // 기존 내용과 맞추기 위해 우선은 컴포넌트 메니저에 등록될 당시의 이름으로 구분 - // 추후 차트 생성자를 통합하게되면 데이터에 시리즈 타입이 포함되기 앨리어스가 필요 없어진다. + // elias series mapping key is used as a seriesType(ex. pie1) + // It is now distinguished to follow current structure + // elias will not be needed after chart constructor is integrated params.seriesType = params.name.split('Series')[0]; params.isCombo = true; } @@ -27316,7 +28194,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 93 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27327,8 +28205,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var labelHelper = __webpack_require__(82); + var Series = __webpack_require__(81); + var labelHelper = __webpack_require__(83); var snippet = __webpack_require__(6); var HeatmapChartSeries = snippet.defineClass(Series, /** @lends HeatmapChartSeries.prototype */ { @@ -27486,7 +28364,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 94 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27497,9 +28375,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var squarifier = __webpack_require__(95); - var labelHelper = __webpack_require__(82); + var Series = __webpack_require__(81); + var squarifier = __webpack_require__(96); + var labelHelper = __webpack_require__(83); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); @@ -27746,6 +28624,7 @@ return /******/ (function(modules) { // webpackBootstrap this.startDepth = startDepth; this.selectedGroup = group; this._renderSeriesArea(this.paper, snippet.bind(this._renderGraph, this)); + this.animateComponent(true); }, /** @@ -27848,7 +28727,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 95 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27859,7 +28738,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var arrayUtil = __webpack_require__(10); var snippet = __webpack_require__(6); @@ -28126,7 +29005,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 96 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28137,8 +29016,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var Series = __webpack_require__(80); - var BarTypeSeriesBase = __webpack_require__(81); + var Series = __webpack_require__(81); + var BarTypeSeriesBase = __webpack_require__(82); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); @@ -28157,6 +29036,12 @@ return /******/ (function(modules) { // webpackBootstrap */ init: function() { Series.apply(this, arguments); + + /** + * whether series label is supported + * @type {boolean} + */ + this.supportSeriesLable = false; }, /** @@ -28310,7 +29195,382 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 97 */ +/* 98 */ +/***/ (function(module, exports, __webpack_require__) { + + /** + * @fileoverview Bullet chart series component. + * @author NHN Ent. + * FE Development Lab + */ + + 'use strict'; + + var Series = __webpack_require__(81); + var renderUtil = __webpack_require__(7); + var chartConst = __webpack_require__(8); + var snippet = __webpack_require__(6); + + var BulletChartSeries = snippet.defineClass(Series, /** @lends BulletChartSeries.prototype */ { + /** + * Bullet chart series component. + * @constructs BulletChartSeries + * @private + * @extends Series + * @param {object} params series initialization data + */ + init: function(params) { + Series.call(this, params); + + /** + * true if graph stratches vertically + * false if graph stratches horizontally + * @type {boolean} + */ + this.isVertical = params.isVertical; + }, + + /** + * Create data for rendering series + * @returns {object} - data for rendering series + * @override + * @private + */ + _makeSeriesData: function() { + var groupBounds = this._makeBounds(); + + return { + groupBounds: groupBounds, + seriesDataModel: this._getSeriesDataModel(), + isVertical: this.isVertical, + isAvailable: function() { + return groupBounds && groupBounds.length > 0; + } + }; + }, + + /** + * Create bounds data + * @returns {Array.} - bound data of bullet graph components + * @private + */ + _makeBounds: function() { + var self = this; + var seriesDataModel = this._getSeriesDataModel(); + var baseData = this._makeBaseDataForMakingBound(); + var iterationData = { + renderedItemCount: 0, + top: baseData.categoryAxisTop, + left: baseData.categoryAxisLeft + }; + + return seriesDataModel.map(function(seriesGroup) { + var iteratee = snippet.bind(self._makeBulletChartBound, self, baseData, iterationData); + var bounds = seriesGroup.map(iteratee); + + self._updateIterationData(iterationData, baseData.itemWidth); + + return bounds; + }); + }, + + /** + * prepare a base data before making a bound + * @returns {object} - base data + * @private + */ + _makeBaseDataForMakingBound: function() { + var groupCount = this._getSeriesDataModel().getGroupCount(); + var dimension = this.layout.dimension; + var width = dimension.width; + var height = dimension.height; + var position = this.layout.position; + var categoryAxisTop = position.top; + var categoryAxisLeft = position.left; + var categoryAxisWidth, valueAxisWidth, itemWidth; + + if (this.isVertical) { + categoryAxisTop += height; + categoryAxisWidth = width; + valueAxisWidth = height; + } else { + categoryAxisWidth = height; + valueAxisWidth = width; + } + + itemWidth = categoryAxisWidth / groupCount; + + return { + categoryAxisTop: categoryAxisTop, + categoryAxisLeft: categoryAxisLeft, + categoryAxisWidth: categoryAxisWidth, + valueAxisWidth: valueAxisWidth, + itemWidth: itemWidth + }; + }, + + /** + * Create a bullet chart bound before making a base data + * @param {object} baseData - base data for making a tooltip + * @param {object} iterationData - increasing data while generating a graph data: index of item, graph position + * @param {object} item - series item + * @returns {Bound} - bullet graph bound + * @private + */ + _makeBulletChartBound: function(baseData, iterationData, item) { + var type = item.type; + var bound; + + if (type === chartConst.BULLET_TYPE_ACTUAL) { + bound = this._makeBarBound(item, chartConst.BULLET_ACTUAL_HEIGHT_RATIO, baseData, iterationData); + } else if (type === chartConst.BULLET_TYPE_RANGE) { + bound = this._makeBarBound(item, chartConst.BULLET_RANGES_HEIGHT_RATIO, baseData, iterationData); + } else if (type === chartConst.BULLET_TYPE_MARKER) { + bound = this._makeLineBound(item, chartConst.BULLET_MARKERS_HEIGHT_RATIO, baseData, iterationData); + } + + bound.type = type; + + return bound; + }, + + /** + * Create bar type bound data + * @param {object} model - series item data + * @param {number} widthRatio - thickness compare to graph area + * @param {object} baseData - base data needed for making a bar bound + * @param {object} iterationData - data for setting up position + * @returns {object} - bar type bound data + * @private + */ + _makeBarBound: function(model, widthRatio, baseData, iterationData) { + var barWidth = baseData.itemWidth * widthRatio; + var barHeight = baseData.valueAxisWidth * model.ratioDistance; + var barEndHeight = baseData.valueAxisWidth * model.endRatio; + var bound; + + if (this.isVertical) { + bound = this._makeVerticalBarBound(iterationData, baseData, barWidth, barHeight, barEndHeight); + } else { + bound = this._makeHorizontalBarBound(iterationData, baseData, barWidth, barHeight, barEndHeight); + } + + return bound; + }, + + /** + * create a bound of bar type component, when it is virtical chart + * @param {object} iterationData - increasing data while generating a graph data: graph position + * @param {object} baseData - base data + * @param {number} barWidth - width of bar + * @param {number} barHeight - bar size from start position to end position + * @param {number} barEndHeight - bar size from axis start point to end position + * @returns {object} - bound data + * @private + */ + _makeVerticalBarBound: function(iterationData, baseData, barWidth, barHeight, barEndHeight) { + return { + top: iterationData.top - barEndHeight, + left: iterationData.left + ((baseData.itemWidth - barWidth) / 2), + width: barWidth, + height: barHeight + }; + }, + + /** + * create a bound of bar type component, when it is a horizontal chart + * @param {object} iterationData - increasing data while generating a graph data: graph position + * @param {object} baseData - base data + * @param {number} barWidth - width of bar + * @param {number} barHeight - bar size from start position to end position + * @param {number} barEndHeight - bar size from axis start point to end position + * @returns {object} - bound data + * @private + */ + _makeHorizontalBarBound: function(iterationData, baseData, barWidth, barHeight, barEndHeight) { + return { + top: iterationData.top + ((baseData.itemWidth - barWidth) / 2), + left: iterationData.left + barEndHeight - barHeight, + width: barHeight, + height: barWidth + }; + }, + + /** + * Create line type bound data + * @param {object} model - series item data + * @param {number} widthRatio - graph thickness compare to graph area + * @param {object} baseData - base data needed for making a line bound + * @param {object} iterationData - data for setting up position + * @returns {object} - line type bound data + * @private + */ + _makeLineBound: function(model, widthRatio, baseData, iterationData) { + var lineWidth = baseData.itemWidth * widthRatio; + var endHeight = baseData.valueAxisWidth * model.endRatio; + var width = chartConst.BULLET_MARKER_DETECT_PADDING; + var height = chartConst.BULLET_MARKER_DETECT_PADDING; + var top, left; + + if (this.isVertical) { + top = iterationData.top - endHeight; + left = iterationData.left + ((baseData.itemWidth - lineWidth) / 2); + width = lineWidth; + } else { + top = iterationData.top + ((baseData.itemWidth - lineWidth) / 2); + left = iterationData.left + endHeight; + height = lineWidth; + } + + return { + top: top, + left: left, + length: lineWidth, + width: width, + height: height + }; + }, + + /** + * update iterationData after making a graph bound + * @param {object} iterationData - iteration data + * @param {number} itemWidth - size of category axis area + * @private + */ + _updateIterationData: function(iterationData, itemWidth) { + iterationData.renderedItemCount += 1; + + if (this.isVertical) { + iterationData.left += itemWidth; + } else { + iterationData.top += itemWidth; + } + }, + + /** + * Render series area. + * @param {object} paper - raphael object + * @param {function} funcRenderGraph - function for graph rendering + * @private + */ + _renderSeriesArea: function(paper, funcRenderGraph) { + Series.prototype._renderSeriesArea.call(this, paper, funcRenderGraph); + + this.dataProcessor.setGraphColors(this.graphRenderer.getGraphColors()); + }, + + /** + * Render series labels + * Series labels are shown only when `options.series.showLabel` is enabled + * @param {object} paper paper + * @returns {Array.} - svg label sets + * @override + * @private + */ + _renderSeriesLabel: function(paper) { + var theme = this.theme.label; + var seriesDataModel = this._getSeriesDataModel(); + var groupLabels = this._getLabelTexts(seriesDataModel); + var positionsSet = this._calculateLabelPositions(seriesDataModel, theme); + + return this.graphRenderer.renderSeriesLabel(paper, positionsSet, groupLabels, theme); + }, + + /** + * Get label texts needed for enabling `options.series.showLabel` option + * @param {object} seriesDataModel - seriesDataModel + * @returns {Array.} - actual data and marker data label + * @private + */ + _getLabelTexts: function(seriesDataModel) { + return seriesDataModel.map(function(seriesGroup) { + var seriesLabels = []; + + seriesGroup.each(function(seriesDatum) { + if (seriesDatum.type !== chartConst.BULLET_TYPE_RANGE) { + seriesLabels.push(seriesDatum.endLabel); + } + }); + + return seriesLabels; + }); + }, + + /** + * calculate a label position + * @param {object} seriesDataModel - bullet chart's series data model + * @param {object} theme - style needed to calculate the size of the text + * @returns {Array.} - position of label text + * @private + */ + _calculateLabelPositions: function(seriesDataModel, theme) { + var serieses = this.seriesData.groupBounds; + var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, theme); + + return snippet.map(serieses, function(series) { + var bounds = []; + + snippet.forEach(series, function(item) { + if (item.type !== chartConst.BULLET_TYPE_RANGE) { + bounds.push(this._makePositionByBound(item, labelHeight)); + } + }, this); + + return bounds; + }, this); + }, + + /** + * make position top, left data using bound data and label height + * @param {object} bound - bound data + * @param {number} labelHeight - label's height + * @returns {object} - position top, left + * @private + */ + _makePositionByBound: function(bound, labelHeight) { + var boundTop = bound.top; + var boundLeft = bound.left; + var width, height; + var position = {}; + + if (this.isVertical) { + width = bound.width || bound.length; + position.top = boundTop - labelHeight; + position.left = boundLeft + (width / 2); + } else { + width = bound.width || 0; + height = bound.height || bound.length; + position.top = boundTop + (height / 2); + position.left = boundLeft + 5 + (width || 0); + } + + return position; + } + }); + + /** + * BulletChartSeries factory function + * @param {object} params - series initialization data + * @returns {BulletChartSeries} - bullet chart series + */ + function bulletSeriesFactory(params) { + var chartTheme = params.chartTheme; + + params.libType = params.chartOptions.libType; + params.chartType = 'bullet'; + params.chartBackground = chartTheme.chart.background; + + return new BulletChartSeries(params); + } + + bulletSeriesFactory.componentType = 'series'; + bulletSeriesFactory.BulletChartSeries = BulletChartSeries; + + module.exports = bulletSeriesFactory; + + +/***/ }), +/* 99 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28324,11 +29584,11 @@ return /******/ (function(modules) { // webpackBootstrap var snippet = __webpack_require__(6); var IS_MSIE_VERSION_LTE_THAN_8 = snippet.browser.msie && snippet.browser.version <= 8; - var seriesTemplate = __webpack_require__(98); + var seriesTemplate = __webpack_require__(100); var chartConst = __webpack_require__(8); var dom = __webpack_require__(9); var renderUtil = __webpack_require__(7); - var eventListener = __webpack_require__(54); + var eventListener = __webpack_require__(55); var Zoom = snippet.defineClass(/** @lends Zoom.prototype */{ /** @@ -28500,7 +29760,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 98 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28511,7 +29771,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var templateMaker = __webpack_require__(64); + var templateMaker = __webpack_require__(65); var htmls = { HTML_SERIES_LABEL: '
' + @@ -28536,7 +29796,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 99 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28550,16 +29810,17 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var chartConst = __webpack_require__(8); - var DataProcessorBase = __webpack_require__(100); - var SeriesDataModel = __webpack_require__(101); - var SeriesDataModelForBoxplot = __webpack_require__(105); - var SeriesDataModelForTreemap = __webpack_require__(107); - var SeriesGroup = __webpack_require__(102); - var rawDataHandler = __webpack_require__(30); + var DataProcessorBase = __webpack_require__(102); + var SeriesDataModel = __webpack_require__(103); + var SeriesDataModelForBoxplot = __webpack_require__(107); + var SeriesDataModelForBullet = __webpack_require__(109); + var SeriesDataModelForTreemap = __webpack_require__(110); + var SeriesGroup = __webpack_require__(104); + var rawDataHandler = __webpack_require__(31); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); - var calculator = __webpack_require__(44); - var objectUtil = __webpack_require__(35); + var calculator = __webpack_require__(45); + var objectUtil = __webpack_require__(36); var snippet = __webpack_require__(6); var concat = Array.prototype.concat; @@ -29124,6 +30385,8 @@ return /******/ (function(modules) { // webpackBootstrap SeriesDataModelClass = SeriesDataModelForBoxplot; } else if (predicate.isTreemapChart(this.chartType)) { SeriesDataModelClass = SeriesDataModelForTreemap; + } else if (predicate.isBulletChart(this.chartType)) { + SeriesDataModelClass = SeriesDataModelForBullet; } else { SeriesDataModelClass = SeriesDataModel; } @@ -29882,6 +31145,24 @@ return /******/ (function(modules) { // webpackBootstrap minItem: seriesDataModel.findMinSeriesItem(valueType, isBiggerRatioThanHalfRatio), maxItem: seriesDataModel.findMaxSeriesItem(valueType, isBiggerRatioThanHalfRatio) }; + }, + + /** + * Register color and opacity data of tooltip icon + * @param {Array.>} colors - color and opacities setGraphColors + * @ignore + */ + setGraphColors: function(colors) { + this.graphColors = colors; + }, + + /** + * Get color and opacity data of tooltip data + * @returns {Array.>} - color and opacities set + * @ignore + */ + getGraphColors: function() { + return this.graphColors; } }); @@ -29889,7 +31170,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 100 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29902,7 +31183,7 @@ return /******/ (function(modules) { // webpackBootstrap var arrayUtil = __webpack_require__(10); var renderUtil = __webpack_require__(7); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var snippet = __webpack_require__(6); /** @@ -30096,7 +31377,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 101 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30134,11 +31415,11 @@ return /******/ (function(modules) { // webpackBootstrap * SeriesItem has processed terminal data like value, ratio, etc. */ - var SeriesGroup = __webpack_require__(102); - var SeriesItem = __webpack_require__(103); - var SeriesItemForCoordinateType = __webpack_require__(104); + var SeriesGroup = __webpack_require__(104); + var SeriesItem = __webpack_require__(105); + var SeriesItemForCoordinateType = __webpack_require__(106); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var arrayUtil = __webpack_require__(10); var snippet = __webpack_require__(6); @@ -30762,7 +32043,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 102 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30774,7 +32055,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var snippet = __webpack_require__(6); var SeriesGroup = snippet.defineClass(/** @lends SeriesGroup.prototype */{ @@ -31045,7 +32326,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 103 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31059,7 +32340,8 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var renderUtil = __webpack_require__(7); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); + var predicate = __webpack_require__(11); var snippet = __webpack_require__(6); var SeriesItem = snippet.defineClass(/** @lends SeriesItem.prototype */{ @@ -31167,6 +32449,13 @@ return /******/ (function(modules) { // webpackBootstrap */ this.ratioDistance = null; + if (predicate.isBulletChart(this.chartType)) { + /** + * @type {string} + */ + this.type = params.type; + } + /** * series legend name * @type {string} @@ -31241,7 +32530,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Add start. * @param {number} value - value - * @private + * @ignore */ addStart: function(value) { if (!snippet.isNull(this.start)) { @@ -31327,7 +32616,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 104 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31507,7 +32796,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 105 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31545,8 +32834,8 @@ return /******/ (function(modules) { // webpackBootstrap * SeriesItem has processed terminal data like value, ratio, etc. */ - var SeriesItemForBoxplot = __webpack_require__(106); - var SeriesDataModel = __webpack_require__(101); + var SeriesItemForBoxplot = __webpack_require__(108); + var SeriesDataModel = __webpack_require__(103); var snippet = __webpack_require__(6); var concat = Array.prototype.concat; @@ -31665,7 +32954,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 106 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31678,7 +32967,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var renderUtil = __webpack_require__(7); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var snippet = __webpack_require__(6); var SeriesItem = snippet.defineClass(/** @lends SeriesItem.prototype */{ @@ -32000,7 +33289,113 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 107 */ +/* 109 */ +/***/ (function(module, exports, __webpack_require__) { + + /** + * @fileoverview SeriesDataModel for Bullet Chart + * @author NHN Ent. + * FE Development Lab + */ + + 'use strict'; + + var SeriesItem = __webpack_require__(105); + var SeriesDataModel = __webpack_require__(103); + var chartConst = __webpack_require__(8); + var snippet = __webpack_require__(6); + + var SeriesDataModelForBullet = snippet.defineClass(SeriesDataModel, /** @lends SeriesDataModelForBullet.prototype */ { + /** + * SeriesDataModelForBullet is series model for boxplot chart + * SeriesDataModel.groups has SeriesGroups. + * @constructs SeriesDataModel + * @param {rawSeriesData} rawSeriesData - raw series data + * @param {string} chartType - chart type + * @param {object} options - options + * @param {Array.} formatFunctions - format functions + */ + init: function(rawSeriesData, chartType, options, formatFunctions) { + SeriesDataModel.call(this, rawSeriesData, chartType, options, formatFunctions); + }, + + /** + * Create base groups. + * Base groups is two-dimensional array by seriesItems. + * @returns {Array.>} + * @private + * @override + */ + _createBaseGroups: function() { + var chartType = this.chartType; + var formatFunctions = this.formatFunctions; + var maxRangeCount = 0; + var maxMarkerCount = 0; + var baseGroups = snippet.map(this.rawSeriesData, function(rawDatum) { + var items = []; + var data = rawDatum.data; + var markers = rawDatum.markers; + var markerCount = markers.length; + var ranges = rawDatum.ranges; + var rangeCount = ranges.length; + + if (ranges && rangeCount) { + snippet.map(ranges, function(range) { + items.push(new SeriesItem({ + datum: range, + chartType: chartType, + formatFunctions: formatFunctions, + type: chartConst.BULLET_TYPE_RANGE + })); + }); + maxRangeCount = Math.max(maxRangeCount, rangeCount); + } + + if (data) { + items.push(new SeriesItem({ + datum: data, + chartType: chartType, + formatFunctions: formatFunctions, + type: chartConst.BULLET_TYPE_ACTUAL + })); + } + + if (markers && markerCount) { + snippet.map(markers, function(marker) { + items.push(new SeriesItem({ + datum: marker, + chartType: chartType, + formabutFunctions: formatFunctions, + type: chartConst.BULLET_TYPE_MARKER + })); + }); + maxMarkerCount = Math.max(maxMarkerCount, markerCount); + } + + return items; + }); + + this.maxMarkerCount = maxMarkerCount; + this.maxRangeCount = maxRangeCount; + + return baseGroups; + }, + + /** + * Create SeriesGroups from rawData.series. + * @returns {Array.} + * @private + */ + _createSeriesGroupsFromRawData: function() { + return SeriesDataModel.prototype._createSeriesGroupsFromRawData.call(this); + } + }); + + module.exports = SeriesDataModelForBullet; + + +/***/ }), +/* 110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32012,10 +33407,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var SeriesDataModel = __webpack_require__(101); - var SeriesItem = __webpack_require__(108); + var SeriesDataModel = __webpack_require__(103); + var SeriesItem = __webpack_require__(111); var chartConst = __webpack_require__(8); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var snippet = __webpack_require__(6); var aps = Array.prototype.slice; @@ -32314,7 +33709,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 108 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32325,7 +33720,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -32433,7 +33828,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 109 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32444,8 +33839,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var BoundsModel = __webpack_require__(110); - var ScaleDataModel = __webpack_require__(116); + var BoundsModel = __webpack_require__(113); + var ScaleDataModel = __webpack_require__(119); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); @@ -32552,7 +33947,7 @@ return /******/ (function(modules) { // webpackBootstrap var isVertical = params.isVertical; var scaleDataMap; - // 01. base dimension 등록 + // 01. register base dimension if (componentManager.has('xAxis')) { boundsModel.registerXAxisHeight(); } @@ -32565,7 +33960,7 @@ return /******/ (function(modules) { // webpackBootstrap } } - // 02. y axis, legend scale 추가 + // 02. add scale of y axis and legend if (scaleOption.yAxis) { this.addYAxisScale(scaleDataModel, 'yAxis', scaleOption.yAxis, params.options.yAxis); } @@ -32584,41 +33979,42 @@ return /******/ (function(modules) { // webpackBootstrap scaleDataMap = scaleDataModel.scaleDataMap; - // 03. y axis dimension 등록 + // 03. register y axis dimension this._registerYAxisDimension(componentManager, boundsModel, scaleDataMap, 'yAxis', isVertical); this._registerYAxisDimension(componentManager, boundsModel, scaleDataMap, 'rightYAxis', isVertical); - // 04. x axis scale 추가 + // 04. add x axis scale if (scaleOption.xAxis) { scaleDataModel.addScale('xAxis', options.xAxis, { valueType: scaleOption.xAxis.valueType || 'value' }, scaleOption.xAxis.additionalOptions); } - // 05. axis data map 생성 및 설정 + // 05. create and configure axis data map if (params.hasAxes) { scaleDataModel.setAxisDataMap(); } - // 06. series 영역 dimension 등록 + // 06. register series dimension boundsModel.registerSeriesDimension(); - // 07. circle legend가 있을 경우에 circle legend dimension 등록 + // 07. register circle legend dimension, if there is a circle legend if (componentManager.has('circleLegend') && options.circleLegend.visible) { boundsModel.registerCircleLegendDimension(scaleDataModel.axisDataMap); } if (componentManager.has('xAxis')) { - // 08. 자동 tick 계산 옵션이 있을 경우에 axisData 갱신 + // 08. update axisData, when autoTickInterval option exist if (predicate.isAutoTickInterval(options.xAxis.tickInterval)) { scaleDataModel.updateXAxisDataForAutoTickInterval(params.prevXAxisData, addingDataMode); } - // 09. x축 label의 회전 여부 관련한 axisData 갱신 + // 09. update axisData related to the rotation of label on x axis scaleDataModel.updateXAxisDataForLabel(addingDataMode); } - // 10. 나머지 영역 dimension 등록 및 각 영역의 position 정보 등록 + // 10. regiser dimension of rest components + // register positon of all components boundsModel.registerBoundsData(scaleDataModel.axisDataMap.xAxis); }, @@ -32674,7 +34070,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 110 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32689,11 +34085,11 @@ return /******/ (function(modules) { // webpackBootstrap var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); var raphaelRenderUtil = __webpack_require__(5); - var circleLegendCalculator = __webpack_require__(111); - var axisCalculator = __webpack_require__(112); - var legendCalculator = __webpack_require__(113); - var seriesCalculator = __webpack_require__(114); - var spectrumLegendCalculator = __webpack_require__(115); + var circleLegendCalculator = __webpack_require__(114); + var axisCalculator = __webpack_require__(115); + var legendCalculator = __webpack_require__(116); + var seriesCalculator = __webpack_require__(117); + var spectrumLegendCalculator = __webpack_require__(118); var snippet = __webpack_require__(6); /** @@ -33442,8 +34838,9 @@ return /******/ (function(modules) { // webpackBootstrap */ calculateMaxRadius: function(axisDataMap) { var dimensionMap = this.getDimensionMap(['series', 'circleLegend']); + var circleLegendVisible = this.options.circleLegend ? this.options.circleLegend.visible : false; - return circleLegendCalculator.calculateMaxRadius(dimensionMap, axisDataMap); + return circleLegendCalculator.calculateMaxRadius(dimensionMap, axisDataMap, circleLegendVisible); } }); @@ -33451,7 +34848,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 111 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33538,13 +34935,18 @@ return /******/ (function(modules) { // webpackBootstrap * Calculate max radius. * @param {{series: {width: number, height: number}, circleLegend: {width: number}}} dimensionMap - dimension map * @param {{xAxis: object, yAxis: object}} axisDataMap - axis data map + * @param {boolean} [circleLegendVisible] - circleLegend visible option * @returns {number} * @private */ - calculateMaxRadius: function(dimensionMap, axisDataMap) { + calculateMaxRadius: function(dimensionMap, axisDataMap, circleLegendVisible) { var maxRadius = this._calculateRadiusByAxisData(dimensionMap.series, axisDataMap); var circleLegendWidth = dimensionMap.circleLegend.width; + if (!circleLegendVisible) { + return maxRadius; + } + return Math.min((circleLegendWidth - chartConst.CIRCLE_LEGEND_PADDING) / 2, maxRadius); } }; @@ -33553,7 +34955,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 112 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33584,7 +34986,7 @@ return /******/ (function(modules) { // webpackBootstrap var titleHeight = title ? renderUtil.getRenderedLabelHeight(title.text, theme.title) : 0; var titleAreaHeight = titleHeight ? (titleHeight + chartConst.TITLE_PADDING) : 0; var labelMargin = options.labelMargin || 0; - var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORLD, theme.label); + var labelHeight = renderUtil.getRenderedLabelHeight(chartConst.MAX_HEIGHT_WORD, theme.label); if (labelMargin > 0) { labelHeight += labelMargin; @@ -33635,7 +35037,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 113 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33649,7 +35051,7 @@ return /******/ (function(modules) { // webpackBootstrap var snippet = __webpack_require__(6); var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); var arrayUtil = __webpack_require__(10); @@ -33871,7 +35273,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 114 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33948,7 +35350,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 115 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34006,14 +35408,14 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 116 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; - var scaleDataMaker = __webpack_require__(117); - var scaleLabelFormatter = __webpack_require__(119); - var axisDataMaker = __webpack_require__(120); + var scaleDataMaker = __webpack_require__(120); + var scaleLabelFormatter = __webpack_require__(122); + var axisDataMaker = __webpack_require__(123); var predicate = __webpack_require__(11); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -34447,7 +35849,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 117 */ +/* 120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34460,9 +35862,9 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var arrayUtil = __webpack_require__(10); - var coordinateScaleCalculator = __webpack_require__(118); + var coordinateScaleCalculator = __webpack_require__(121); var snippet = __webpack_require__(6); var abs = Math.abs; @@ -34474,9 +35876,9 @@ return /******/ (function(modules) { // webpackBootstrap var scaleDataMaker = { /** * Make limit for diverging option. - * 다이버징 차트에서는 min, max의 값을 절대값으로 최대치로 동일하게하고 - * 한쪽만 음수로 처리해서 양쪽의 균형이 맞게 한다. - * 이렇게 하지 않으면 중심이 한쪽으로 쏠려있다. + * To balance diverging chart + * compare absolute value of min, max. and find larger one + * set min by making the value negative * @param {{min: number, max: number}} limit limit * @returns {{min: number, max: number}} changed limit * @private @@ -34502,11 +35904,11 @@ return /******/ (function(modules) { // webpackBootstrap var max = limit.max; if (isOverflowed.min) { - min -= step; + min = calculator.subtract(min, step); } if (isOverflowed.max) { - max += step; + max = calculator.add(max, step); } return { @@ -34626,6 +36028,8 @@ return /******/ (function(modules) { // webpackBootstrap if (firstValue > 0) { limit.min = 0; + } else if (firstValue === 0) { + limit.max = 10; } else { limit.max = 0; } @@ -34803,7 +36207,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 118 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34894,16 +36298,16 @@ return /******/ (function(modules) { // webpackBootstrap var placeNumber = minNumber > 1 ? 1 : (1 / minNumber); var fixedStep = (step * placeNumber); - // max의 step 자릿수 이하 올림 + // ceil max value step digits max = Math.ceil((max * placeNumber) / fixedStep) * fixedStep / placeNumber; if (min > step) { - // 최소값을 step 의 배수로 조정 + // floor min value to multiples of step min = Math.floor((min * placeNumber) / fixedStep) * fixedStep / placeNumber; } else if (min < 0) { min = -(Math.ceil((Math.abs(min) * placeNumber) / fixedStep) * fixedStep) / placeNumber; } else { - // min값이 양수이고 step 보다 작으면 0으로 설정 + // 0 when min value is positive and smaller than step min = 0; } @@ -35015,7 +36419,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 119 */ +/* 122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35027,7 +36431,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; var predicate = __webpack_require__(11); - var calculator = __webpack_require__(44); + var calculator = __webpack_require__(45); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -35110,7 +36514,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 120 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35123,7 +36527,7 @@ return /******/ (function(modules) { // webpackBootstrap var chartConst = __webpack_require__(8); var predicate = __webpack_require__(11); - var geomatric = __webpack_require__(48); + var geomatric = __webpack_require__(49); var renderUtil = __webpack_require__(7); var arrayUtil = __webpack_require__(10); var snippet = __webpack_require__(6); @@ -35303,16 +36707,16 @@ return /******/ (function(modules) { // webpackBootstrap */ _makeAdjustingIntervalInfo: function(beforeBlockCount, seriesWidth, blockSize) { var newBlockCount = parseInt(seriesWidth / blockSize, 10); - // interval : 하나의 새로운 block(tick과 tick 사이의 공간) 영역에 포함되는 이전 block 수 + // interval : number of previous blocks in a new block(spaces between tick and tick) var interval = parseInt(beforeBlockCount / newBlockCount, 10); var intervalInfo = null; var remainCount; if (interval > 1) { - // remainCount : 이전 block들 중 새로운 block으로 채우고 남은 이전 block 수 - // | | | | | | | | | | | | - 이전 block - // | | | | - 새로 계산된 block - // |*|*| - 남은 이전 block 수 + // remainCount : remaining block count after filling new blocks + // | | | | | | | | | | | | - previous block interval + // | | | | - new block interval + // |*|*| - remaining block remainCount = beforeBlockCount - (interval * newBlockCount); if (remainCount >= interval) { @@ -35411,13 +36815,12 @@ return /******/ (function(modules) { // webpackBootstrap beforeRemainBlockCount = intervalInfo.beforeRemainBlockCount; axisData.eventTickCount = axisData.tickCount; - // startIndex는 남은 block수의 반 만큼에서 현재 이동된 tick 수를 뺀 만큼으로 설정함 - // | | | |*|*|*| - * 영역이 남은 이전 block 수 - // |*|*|O | | |*| - 현재 이동된 tick이 없을 경우 (O 지점이 startIndex = 2) - // |*|O | | |*|*| - tick이 하나 이동 됐을 경우 : O 지점이 startIndex = 1) + // startIndex: (remaing block count / 2) - current moved tick index + // | | | |*|*|*| - * remaing block + // |*|*|O | | |*| - tick is not moved (O startIndex = 2) + // |*|O | | |*|*| - tick moved 1 (O startIndex = 1) startIndex = Math.round(beforeRemainBlockCount / 2) - (addedDataCount % interval); - // startIndex가 0보다 작을 경우 interval만큼 증가시킴 if (startIndex < 0) { startIndex += interval; } @@ -35447,7 +36850,7 @@ return /******/ (function(modules) { // webpackBootstrap var firstBlockCount = firstTickCount ? firstTickCount - 1 : 0; var beforeRemainBlockCount; - // 새로 계산된 block의 수가 최초로 계산된 block 수의 두배수 보다 많아지면 interval 숫자를 두배로 늘림 + // twice interval, if new block count is greater than twice of new block count if (firstBlockCount && ((firstBlockCount * 2) <= newBlockCount)) { interval *= 2; } @@ -35605,7 +37008,7 @@ return /******/ (function(modules) { // webpackBootstrap var firstLabelWidth = renderUtil.getRenderedLabelWidth(firstLabel, labelTheme); var newLabelWidth = geomatric.calculateRotatedWidth(degree, firstLabelWidth, labelHeight); - // overflow 체크시에는 우측 상단 꼭지 기준으로 계산해야 함 + // when checking overflow, calculation should be based on right top angle newLabelWidth -= geomatric.calculateAdjacent(chartConst.ANGLE_90 - degree, labelHeight / 2); return newLabelWidth; @@ -35631,7 +37034,7 @@ return /******/ (function(modules) { // webpackBootstrap /** * Make additional data for rotated labels. - * 라벨 크기가 지정된 영역보다 커서 경계를 넘어가는부분을 처리하기 위한 데이터를 만든다. + * The label size is larger than the specified area, creating data to handle the area beyond the border. * @param {Array.} validLabels - valid labels * @param {Array.} validLabelCount - valid label count * @param {object} labelTheme - theme for label @@ -35653,7 +37056,7 @@ return /******/ (function(modules) { // webpackBootstrap rotatedHeight = geomatric.calculateRotatedHeight(degree, maxLabelWidth, labelHeight); rotatedWidth = this._calculateRotatedWidth(degree, validLabels[0], labelHeight, labelTheme); limitWidth = this._calculateLimitWidth(dimensionMap.yAxis.width, isLabelAxis, labelAreaWidth); - contentWidth += rotatedWidth; // 라벨한개 더 표현할정도의 공간 확보 + contentWidth += rotatedWidth; // add spaces to render maybe one label additionalData = { degree: degree, @@ -35679,7 +37082,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 121 */ +/* 124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35690,9 +37093,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var chartConst = __webpack_require__(8); - var rawDataHandler = __webpack_require__(30); + var rawDataHandler = __webpack_require__(31); var snippet = __webpack_require__(6); var ColumnChart = snippet.defineClass(ChartBase, /** @lends ColumnChart.prototype */ { @@ -35784,7 +37187,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 122 */ +/* 125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35795,11 +37198,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var predicate = __webpack_require__(11); - var DynamicDataHelper = __webpack_require__(123); - var Series = __webpack_require__(84); - var rawDataHandler = __webpack_require__(30); + var DynamicDataHelper = __webpack_require__(126); + var Series = __webpack_require__(85); + var rawDataHandler = __webpack_require__(31); var snippet = __webpack_require__(6); var LineChart = snippet.defineClass(ChartBase, /** @lends LineChart.prototype */ { @@ -36034,7 +37437,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 123 */ +/* 126 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; @@ -36282,7 +37685,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 124 */ +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36293,10 +37696,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var DynamicDataHelper = __webpack_require__(123); - var rawDataHandler = __webpack_require__(30); - var Series = __webpack_require__(87); + var ChartBase = __webpack_require__(42); + var DynamicDataHelper = __webpack_require__(126); + var rawDataHandler = __webpack_require__(31); + var Series = __webpack_require__(88); var snippet = __webpack_require__(6); var AreaChart = snippet.defineClass(ChartBase, /** @lends AreaChart.prototype */ { @@ -36508,7 +37911,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 125 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36519,10 +37922,10 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var rawDataHandler = __webpack_require__(30); + var ChartBase = __webpack_require__(42); + var rawDataHandler = __webpack_require__(31); var predicate = __webpack_require__(11); - var validTypeMakerForYAxisOptions = __webpack_require__(126); + var validTypeMakerForYAxisOptions = __webpack_require__(129); var snippet = __webpack_require__(6); var ColumnLineComboChart = snippet.defineClass(ChartBase, /** @lends ColumnLineComboChart.prototype */ { @@ -36733,7 +38136,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 126 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36838,7 +38241,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 127 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36849,7 +38252,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var snippet = __webpack_require__(6); var LineScatterComboChart = snippet.defineClass(ChartBase, /** @lends LineScatterComboChart.prototype */ { @@ -36944,7 +38347,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 128 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36955,11 +38358,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var rawDataHandler = __webpack_require__(30); + var ChartBase = __webpack_require__(42); + var rawDataHandler = __webpack_require__(31); var predicate = __webpack_require__(11); - var validTypeMakerForYAxisOptions = __webpack_require__(126); - var DynamicDataHelper = __webpack_require__(123); + var validTypeMakerForYAxisOptions = __webpack_require__(129); + var DynamicDataHelper = __webpack_require__(126); var snippet = __webpack_require__(6); var LineAreaComboChart = snippet.defineClass(ChartBase, /** @lends LineAreaComboChart.prototype */ { @@ -37228,7 +38631,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 129 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37239,8 +38642,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var rawDataHandler = __webpack_require__(30); + var ChartBase = __webpack_require__(42); + var rawDataHandler = __webpack_require__(31); var snippet = __webpack_require__(6); var PieDonutComboChart = snippet.defineClass(ChartBase, /** @lends PieDonutComboChart.prototype */ { @@ -37326,7 +38729,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 130 */ +/* 133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37337,7 +38740,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -37398,7 +38801,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 131 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37409,7 +38812,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -37517,7 +38920,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 132 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37529,7 +38932,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -37610,7 +39013,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 133 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37622,8 +39025,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var ColorSpectrum = __webpack_require__(134); + var ChartBase = __webpack_require__(42); + var ColorSpectrum = __webpack_require__(137); var chartConst = __webpack_require__(8); var snippet = __webpack_require__(6); @@ -37749,7 +39152,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 134 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37760,7 +39163,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var colorutil = __webpack_require__(135); + var colorutil = __webpack_require__(138); var snippet = __webpack_require__(6); var ColorSpectrum = snippet.defineClass(/** @lends ColorSpectrum.prototype */ { @@ -37821,7 +39224,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 135 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -38071,7 +39474,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 136 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38082,8 +39485,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var ColorSpectrum = __webpack_require__(134); + var ChartBase = __webpack_require__(42); + var ColorSpectrum = __webpack_require__(137); var snippet = __webpack_require__(6); var TreemapChart = snippet.defineClass(ChartBase, /** @lends TreemapChart.prototype */ { @@ -38175,7 +39578,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 137 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38186,11 +39589,11 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var mapManager = __webpack_require__(34); - var MapChartMapModel = __webpack_require__(138); - var MapChartDataProcessor = __webpack_require__(139); - var ColorSpectrum = __webpack_require__(134); + var ChartBase = __webpack_require__(42); + var mapManager = __webpack_require__(35); + var MapChartMapModel = __webpack_require__(141); + var MapChartDataProcessor = __webpack_require__(142); + var ColorSpectrum = __webpack_require__(137); var snippet = __webpack_require__(6); var MapChart = snippet.defineClass(ChartBase, /** @lends MapChart.prototype */ { @@ -38274,7 +39677,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 138 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38693,7 +40096,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 139 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38704,7 +40107,7 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var DataProcessorBase = __webpack_require__(100); + var DataProcessorBase = __webpack_require__(102); var renderUtil = __webpack_require__(7); var snippet = __webpack_require__(6); @@ -38847,7 +40250,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 140 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38858,9 +40261,9 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); + var ChartBase = __webpack_require__(42); var snippet = __webpack_require__(6); - var Series = __webpack_require__(84); + var Series = __webpack_require__(85); var RadialChart = snippet.defineClass(ChartBase, /** @lends RadialChart.prototype */ { /** @@ -38884,7 +40287,8 @@ return /******/ (function(modules) { // webpackBootstrap * @param {object} options chart options */ init: function(rawData, theme, options) { - // Radial차트는 그룹툴팁을 지원하지 않음, 지원하게되면 아래 코드 삭제 + // radial chart doesn't supprot group tooltip + // should delete this code, when it supports group tooltip if (options.tooltip) { options.tooltip.grouped = false; } @@ -38936,7 +40340,7 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 141 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38947,8 +40351,8 @@ return /******/ (function(modules) { // webpackBootstrap 'use strict'; - var ChartBase = __webpack_require__(41); - var rawDataHandler = __webpack_require__(30); + var ChartBase = __webpack_require__(42); + var rawDataHandler = __webpack_require__(31); var snippet = __webpack_require__(6); var BoxplotChart = snippet.defineClass(ChartBase, /** @lends BoxplotChart.prototype */ { @@ -39042,20 +40446,117 @@ return /******/ (function(modules) { // webpackBootstrap /***/ }), -/* 142 */ +/* 145 */ +/***/ (function(module, exports, __webpack_require__) { + + /** + * @fileoverview Bullet chart. + * @author NHN Ent. + * FE Development Lab + */ + + 'use strict'; + + var ChartBase = __webpack_require__(42); + var rawDataHandler = __webpack_require__(31); + var snippet = __webpack_require__(6); + + var BulletChart = snippet.defineClass(ChartBase, /** @lends BulletChart.prototype */ { + /** + * className + * @type {string} + */ + className: 'tui-bullet-chart', + + /** + * Bullet chart. + * @constructs BulletChart + * @extends ChartBase + * @mixes axisTypeMixer + * @param {Array.} rawData raw data + * @param {object} theme chart theme + * @param {object} options chart options + */ + init: function(rawData, theme, options) { + var isVertical = !!options.series.vertical; + + rawDataHandler._makeRawSeriesDataForBulletChart(rawData); + + ChartBase.call(this, { + rawData: rawData, + theme: theme, + options: options, + hasAxes: true, + isVertical: isVertical + }); + }, + + /** + * Add components + * @override + */ + addComponents: function() { + this.componentManager.register('title', 'title'); + this.componentManager.register('plot', 'plot'); + this.componentManager.register('legend', 'legend'); + + this.componentManager.register('bulletSeries', 'bulletSeries'); + + this.componentManager.register('yAxis', 'axis'); + this.componentManager.register('xAxis', 'axis'); + + this.componentManager.register('chartExportMenu', 'chartExportMenu', {chartType: 'bullet'}); + this.componentManager.register('tooltip', 'tooltip'); + this.componentManager.register('mouseEventDetector', 'mouseEventDetector'); + }, + + /** + * Get scale option. + * @returns {{xAxis: boolean}} + * @override + */ + getScaleOption: function() { + if (this.isVertical) { + return { + yAxis: true + }; + } + + return { + xAxis: true + }; + }, + + /** + * Add data ratios. + * @override + * modified from axisTypeMixer + */ + addDataRatios: function(limitMap) { + var chartType = this.chartType; + + this.dataProcessor.addDataRatios(limitMap[chartType], null, chartType); + } + }); + + module.exports = BulletChart; + + +/***/ }), +/* 146 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var chartConst = __webpack_require__(8); - var themeManager = __webpack_require__(32); - var defaultTheme = __webpack_require__(33); + var themeManager = __webpack_require__(33); + var defaultTheme = __webpack_require__(34); themeManager.register(chartConst.DEFAULT_THEME_NAME, defaultTheme); /***/ }), -/* 143 */ +/* 147 */ /***/ (function(module, exports) { // removed by extract-text-webpack-plugin diff --git a/dist/tui-chart.min.css b/dist/tui-chart.min.css index 3c1b21aab..e5dd5a435 100644 --- a/dist/tui-chart.min.css +++ b/dist/tui-chart.min.css @@ -2,9 +2,9 @@ * tui-chart.min * @fileoverview tui-chart * @author NHN Ent. FE Development Lab - * @version 2.14.2 + * @version 2.15.0 * @license MIT * @link https://github.com/nhnent/tui.chart - * bundle created at "Thu Jan 25 2018 21:47:01 GMT+0900 (KST)" + * bundle created at "Fri Feb 02 2018 11:24:48 GMT+0900 (KST)" */ -.tui-chart{position:relative;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart,.tui-chart *{box-sizing:border-box;line-height:1}.tui-chart .tui-chart-title{position:absolute;top:0;left:0;width:100%;text-align:center;padding:10px 0;z-index:350}.tui-chart .tui-chart-axis-area{z-index:300;position:absolute}.tui-chart .tui-chart-axis-area *{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-axis-area .tui-chart-title-area{position:absolute}.tui-chart .tui-chart-axis-area .tui-chart-label-area,.tui-chart .tui-chart-axis-area .tui-chart-tick-area{position:absolute;top:0;width:100%;height:100%}.tui-chart .tui-chart-axis-area .tui-chart-tick-area .tui-chart-tick{position:absolute;background-color:#000}.tui-chart .tui-chart-axis-area .tui-chart-label-area .tui-chart-label{position:absolute}.tui-chart .tui-chart-axis-area .tui-chart-label-area .tui-chart-label>span{line-height:1.2}.tui-chart .tui-chart-axis-area.vertical{top:10px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area{text-align:center;white-space:nowrap;top:0}.tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area.rotation{-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area{right:0}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area .tui-chart-tick{right:1px;width:5px;height:1px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area .tui-chart-tick-line{left:auto;right:0;width:1px;background-color:#000;position:absolute}.tui-chart .tui-chart-axis-area.vertical .tui-chart-label-area{right:10px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-label-area .tui-chart-label{left:0;width:100%;text-align:right;white-space:nowrap}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-title-area{text-align:center;white-space:nowrap;top:0}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-title-area.rotation{-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-label-area,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area{left:0}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-label-area .tui-chart-label{text-align:left;padding-right:0;padding-left:10px}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-title-area{width:100%!important;-webkit-transform:rotate(0deg);transform:rotate(0deg);filter:none;top:auto}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-label-area{left:0;width:100%!important}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-label-area .tui-chart-label{text-align:center}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area{border-right:none}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side .tui-chart-tick,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area .tui-chart-tick{left:1px}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side .tui-chart-tick-line,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area .tui-chart-tick-line{right:auto;left:0}.tui-chart .tui-chart-axis-area.horizontal{right:10px}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-title-area{bottom:0;width:100%;text-align:center}.tui-chart .tui-chart-axis-area.horizontal.division .tui-chart-title-area{left:0;width:auto}.tui-chart .tui-chart-axis-area.horizontal.division .tui-chart-title-area.right{left:auto;right:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area,.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area{left:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-tick-line{top:0;height:1px;background-color:#000;position:absolute}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-ticks{width:100%;position:absolute;left:0;top:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-tick{top:0;width:1px;height:6px}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label{top:10px;text-align:center;word-wrap:break-word;word-break:keep-all}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation{text-align:right;white-space:nowrap}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation span{position:absolute;right:0;top:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation25{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation25 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.9063077870366499, M12=0.42261826174069944, M21=-0.42261826174069944, M22=0.9063077870366499)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation45{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation45 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation65{-webkit-transform:rotate(-65deg);transform:rotate(-65deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation65 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.42261826174069944, M12=0.9063077870366499, M21=-0.9063077870366499, M22=0.42261826174069944)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation85{-webkit-transform:rotate(-85deg);transform:rotate(-85deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation85 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.08715574274765814, M12=0.9961946980917455, M21=-0.9961946980917455, M22=0.08715574274765814)"}.tui-chart .tui-chart-plot-area{position:absolute;right:10px;top:10px;z-index:-100}.tui-chart .tui-chart-plot-area .tui-chart-plot-optional-lines-area{left:0;top:0;width:100%;height:100%;position:absolute}.tui-chart .tui-chart-plot-area .tui-chart-plot-lines-area{width:100%;height:100%;position:relative}.tui-chart .tui-chart-plot-area .tui-chart-plot-line{background-color:#ccc;position:absolute}.tui-chart .tui-chart-plot-area .tui-chart-plot-line.vertical{top:0;width:1px}.tui-chart .tui-chart-plot-area .tui-chart-plot-line.horizontal{left:0;height:1px}.tui-chart .tui-chart-series-area{z-index:200;position:absolute;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-series-area:first-child{overflow:visible}.tui-chart .tui-chart-series-area .tui-chart-series-block-area{position:absolute;left:10px;top:10px}.tui-chart .tui-chart-series-area .tui-chart-series-block-area .tui-chart-series-block{position:absolute}.tui-chart .tui-chart-series-area .tui-chart-series-label-area{position:absolute;overflow:visible;left:0;top:0;display:none;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);opacity:0}.tui-chart .tui-chart-series-area .tui-chart-series-label-area .tui-chart-series-label{position:absolute;cursor:default;text-align:center;white-space:nowrap;text-shadow:#fff 0 0 3px}.tui-chart .tui-chart-series-area .tui-chart-series-label-area.show{display:block}.tui-chart .tui-chart-series-area .tui-chart-series-label-area.opacity{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.tui-chart .tui-chart-series-area .tui-chart-series-graph-area{position:absolute;left:0;top:0}.tui-chart .tui-chart-zoom-area{z-index:1500;position:absolute;border:1px solid #ccc;background-color:#ccc;border-radius:4px;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn{width:21px;height:21px;display:block;background-color:#fff;cursor:pointer;position:relative}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:first-child{margin-bottom:1px;border-radius:4px 4px 0 0;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:last-child{border-radius:0 0 4px 4px;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:hover{background-color:#efefef}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div{font-szie:0;background-color:#555;position:absolute}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div.horizontal-line{width:9px;height:1px;left:6px;top:10px}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div.vertical-line{width:1px;height:9px;left:10px;top:6px}.tui-chart .tui-chart-series-custom-event-area{z-index:1000;position:absolute;left:0;top:0}.tui-chart .tui-chart-series-custom-event-area.hide{display:none}.tui-chart .tui-chart-series-custom-event-area.drag{cursor:move}.tui-chart .tui-chart-series-custom-event-area .tui-chart-drag-selection{top:10px;height:100%;background-color:gray;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3;position:absolute;display:none}.tui-chart .tui-chart-series-custom-event-area .tui-chart-drag-selection.show{display:block}.tui-chart .tui-chart-series-custom-event-area .tui-chart-reset-zoom-btn{position:absolute;left:20px;top:20px;font-size:11px;padding:5px;border:1px solid #ccc;background-color:#efefef;cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-legend-rect{margin-top:2px;width:12px;height:12px}.tui-chart .tui-chart-legend-rect.line{height:2px}.tui-chart .tui-chart-legend-rect.area,.tui-chart .tui-chart-legend-rect.bubble{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter:alpha(opacity=50);opacity:.5}.tui-chart .tui-chart-chartExportMenu-area{z-index:900;position:absolute;font-family:Verdana;margin:0;padding:10px 0 0;z-index:5000}.tui-chart .tui-chart-chartExportMenu-area .tui-chart-chartExportMenu-button{position:absolute;width:26px;height:20px;right:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAAKklEQVQ4EWMsKCj4z0BFwERFs8BGUd1AajtwCJjHOBrLQyCWKHXiCIxlAM/yBv2WsAlAAAAAAElFTkSuQmCC) 0 0 no-repeat;border:0;font-size:12px;padding:3px 5px;margin:0;cursor:pointer}.tui-chart .tui-chart-chartExportMenu-area ul{display:none;position:absolute;top:30px;right:0;width:120px;background:#fff;border:.5px solid #000;font-size:.8em;padding:0;margin:0;box-shadow:3px 3px 5px #888}.tui-chart .tui-chart-chartExportMenu-area ul>li{margin:0;padding:7px 3px;border-collapse:collapse;text-align:center;list-style-type:none;line-height:1;cursor:pointer}.tui-chart .tui-chart-chartExportMenu-area ul>li:hover{background-color:#91ade5}.tui-chart .tui-chart-legend-area{z-index:400;position:absolute;padding:10px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-legend-area .tui-chart-legend{clear:both}.tui-chart .tui-chart-legend-area .tui-chart-legend>div{float:left}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-checkbox-area{width:20px;height:20px;position:relative;box-sizing:border-box}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-checkbox-area input{left:2px;top:2px;*left:-2px;*top:-2px;position:absolute;padding:0;margin:0}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-label{padding:2px 0 2px 4px;cursor:pointer;box-sizing:content-box;line-height:1}.tui-chart .tui-chart-legend-area .tui-chart-legend.unselected .tui-chart-legend-label,.tui-chart .tui-chart-legend-area .tui-chart-legend.unselected .tui-chart-legend-rect{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area{position:absolute;left:10px;top:10px}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area .tui-chart-map-legend-tick{width:15px;height:1px;background-color:#ccc;position:absolute;left:0}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area .tui-chart-map-legend-tick-label{position:absolute;left:30px;text-align:left}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area.horizontal .tui-chart-map-legend-tick{top:0;width:1px;height:15px}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area.horizontal .tui-chart-map-legend-tick-label{top:30px}.tui-chart .tui-chart-legend-area .tui-chart-map-legend-wedge{position:absolute;width:19px;height:4px;border-left:2px solid #777;border-right:2px solid #777;left:8px;top:30px;display:none}.tui-chart .tui-chart-legend-area .tui-chart-map-legend-wedge.show{display:block}.tui-chart .tui-chart-legend-area.horizontal{padding-left:0;padding-right:0}.tui-chart .tui-chart-legend-area.horizontal .tui-chart-legend{clear:none;float:left;white-space:nowrap}.tui-chart .tui-chart-circle-legend-area{position:absolute;z-index:400}.tui-chart .tui-chart-circle-legend-area .tui-chart-circle-legend-label-area{position:absolute;left:0;top:0}.tui-chart .tui-chart-circle-legend-area .tui-chart-circle-legend-label-area .tui-chart-circle-legend-label{position:absolute;font-size:9px;white-space:nowrap;text-shadow:#fff 0 0 3px}.tui-chart .tui-chart-tooltip-area{position:absolute;z-index:500}.tui-chart .tui-chart-tooltip-area *{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip{z-index:100;position:absolute;display:none;user-select:none}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip.show{display:block}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip{padding:4px 0;font-size:12px;min-width:100px;color:#fff;border-radius:5px;background-clip:padding-box;background-color:rgba(0,0,0,.7);background-color:#555\9}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip>*{padding:2px 7px;text-align:center;white-space:nowrap}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip>:first-child{backgound-color:#fff;font-weight:700}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip>*{text-align:left;position:relative;padding-left:20px;padding-top:4px;padding-bottom:4px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip .tui-chart-legend-rect{position:absolute;left:7px;top:2px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip .tui-chart-legend-rect.line{top:7px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip>:first-child{padding-left:7px;padding-top:6px;padding-bottom:6px;text-align:center}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip .hide{display:none}.tui-chart .tui-chart-tooltip-area .tui-chart-group-tooltip-sector{z-index:50;position:absolute;background-color:#aaa;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3;display:none}.tui-chart .tui-chart-tooltip-area .tui-chart-group-tooltip-sector.show{display:block}.tui-chart.tui-map-chart .tui-chart-series-area{overflow:hidden}.tui-chart.tui-map-chart .tui-chart-tooltip-area .tui-chart-default-tooltip>:first-child{font-weight:400}.tui-chart-size-check-element{clear:both;position:absolute;word-wrap:break-word;word-break:keep-all;top:100000px;left:100000px;width:1000px;height:100px;padding:0;line-height:1}.tui-chart-size-check-element>span{display:inline-block;box-sizing:border-box;text-align:center;padding:0}:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation25 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation45 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation65 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation85 span,:root .tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area{filter:none \0} \ No newline at end of file +.tui-chart{position:relative;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart,.tui-chart *{box-sizing:border-box;line-height:1}.tui-chart .tui-chart-title{position:absolute;top:0;left:0;width:100%;text-align:center;padding:10px 0;z-index:350}.tui-chart .tui-chart-axis-area{z-index:300;position:absolute}.tui-chart .tui-chart-axis-area *{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-axis-area .tui-chart-title-area{position:absolute}.tui-chart .tui-chart-axis-area .tui-chart-label-area,.tui-chart .tui-chart-axis-area .tui-chart-tick-area{position:absolute;top:0;width:100%;height:100%}.tui-chart .tui-chart-axis-area .tui-chart-tick-area .tui-chart-tick{position:absolute;background-color:#000}.tui-chart .tui-chart-axis-area .tui-chart-label-area .tui-chart-label{position:absolute}.tui-chart .tui-chart-axis-area .tui-chart-label-area .tui-chart-label>span{line-height:1.2}.tui-chart .tui-chart-axis-area.vertical{top:10px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area{text-align:center;white-space:nowrap;top:0}.tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area.rotation{-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(-90deg);transform:rotate(-90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3)}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area{right:0}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area .tui-chart-tick{right:1px;width:5px;height:1px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-tick-area .tui-chart-tick-line{left:auto;right:0;width:1px;background-color:#000;position:absolute}.tui-chart .tui-chart-axis-area.vertical .tui-chart-label-area{right:10px}.tui-chart .tui-chart-axis-area.vertical .tui-chart-label-area .tui-chart-label{left:0;width:100%;text-align:right;white-space:nowrap}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-title-area{text-align:center;white-space:nowrap;top:0}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-title-area.rotation{-webkit-transform-origin:top left;transform-origin:top left;-webkit-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1)}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-label-area,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area{left:0}.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-label-area .tui-chart-label{text-align:left;padding-right:0;padding-left:10px}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-title-area{width:100%!important;-webkit-transform:rotate(0deg);transform:rotate(0deg);filter:none;top:auto}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-label-area{left:0;width:100%!important}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-label-area .tui-chart-label{text-align:center}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area{border-right:none}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side .tui-chart-tick,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area .tui-chart-tick{left:1px}.tui-chart .tui-chart-axis-area.vertical.center .tui-chart-tick-area.opposite-side .tui-chart-tick-line,.tui-chart .tui-chart-axis-area.vertical.right .tui-chart-tick-area .tui-chart-tick-line{right:auto;left:0}.tui-chart .tui-chart-axis-area.horizontal{right:10px}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-title-area{bottom:0;width:100%;text-align:center}.tui-chart .tui-chart-axis-area.horizontal.division .tui-chart-title-area{left:0;width:auto}.tui-chart .tui-chart-axis-area.horizontal.division .tui-chart-title-area.right{left:auto;right:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area,.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area{left:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-tick-line{top:0;height:1px;background-color:#000;position:absolute}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-ticks{width:100%;position:absolute;left:0;top:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-tick-area .tui-chart-tick{top:0;width:1px;height:6px}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label{top:10px;text-align:center;word-wrap:break-word;word-break:keep-all}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation{text-align:right;white-space:nowrap}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation span{position:absolute;right:0;top:0}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation25{-webkit-transform:rotate(-25deg);transform:rotate(-25deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation25 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.9063077870366499, M12=0.42261826174069944, M21=-0.42261826174069944, M22=0.9063077870366499)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation45{-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation45 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.7071067811865476, M12=0.7071067811865475, M21=-0.7071067811865475, M22=0.7071067811865476)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation65{-webkit-transform:rotate(-65deg);transform:rotate(-65deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation65 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.42261826174069944, M12=0.9063077870366499, M21=-0.9063077870366499, M22=0.42261826174069944)"}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation85{-webkit-transform:rotate(-85deg);transform:rotate(-85deg)}.tui-chart .tui-chart-axis-area.horizontal .tui-chart-label-area .tui-chart-label.tui-chart-xaxis-rotation85 span{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(SizingMethod='auto expand', M11=0.08715574274765814, M12=0.9961946980917455, M21=-0.9961946980917455, M22=0.08715574274765814)"}.tui-chart .tui-chart-plot-area{position:absolute;right:10px;top:10px;z-index:-100}.tui-chart .tui-chart-plot-area .tui-chart-plot-optional-lines-area{left:0;top:0;width:100%;height:100%;position:absolute}.tui-chart .tui-chart-plot-area .tui-chart-plot-lines-area{width:100%;height:100%;position:relative}.tui-chart .tui-chart-plot-area .tui-chart-plot-line{background-color:#ccc;position:absolute}.tui-chart .tui-chart-plot-area .tui-chart-plot-line.vertical{top:0;width:1px}.tui-chart .tui-chart-plot-area .tui-chart-plot-line.horizontal{left:0;height:1px}.tui-chart .tui-chart-series-area{z-index:200;position:absolute;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-series-area:first-child{overflow:visible}.tui-chart .tui-chart-series-area .tui-chart-series-block-area{position:absolute;left:10px;top:10px}.tui-chart .tui-chart-series-area .tui-chart-series-block-area .tui-chart-series-block{position:absolute}.tui-chart .tui-chart-series-area .tui-chart-series-label-area{position:absolute;overflow:visible;left:0;top:0;display:none;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";filter:alpha(opacity=0);opacity:0}.tui-chart .tui-chart-series-area .tui-chart-series-label-area .tui-chart-series-label{position:absolute;cursor:default;text-align:center;white-space:nowrap;text-shadow:#fff 0 0 3px}.tui-chart .tui-chart-series-area .tui-chart-series-label-area.show{display:block}.tui-chart .tui-chart-series-area .tui-chart-series-label-area.opacity{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";filter:alpha(opacity=100);opacity:1}.tui-chart .tui-chart-series-area .tui-chart-series-graph-area{position:absolute;left:0;top:0}.tui-chart .tui-chart-zoom-area{z-index:1500;position:absolute;border:1px solid #ccc;background-color:#ccc;border-radius:4px;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn{width:21px;height:21px;display:block;background-color:#fff;cursor:pointer;position:relative}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:first-child{margin-bottom:1px;border-radius:4px 4px 0 0;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:last-child{border-radius:0 0 4px 4px;background-clip:padding-box}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn:hover{background-color:#efefef}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div{font-szie:0;background-color:#555;position:absolute}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div.horizontal-line{width:9px;height:1px;left:6px;top:10px}.tui-chart .tui-chart-zoom-area>.tui-chart-zoom-btn>div.vertical-line{width:1px;height:9px;left:10px;top:6px}.tui-chart .tui-chart-series-custom-event-area{z-index:1000;position:absolute;left:0;top:0}.tui-chart .tui-chart-series-custom-event-area.hide{display:none}.tui-chart .tui-chart-series-custom-event-area.drag{cursor:move}.tui-chart .tui-chart-series-custom-event-area .tui-chart-drag-selection{top:10px;height:100%;background-color:gray;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3;position:absolute;display:none}.tui-chart .tui-chart-series-custom-event-area .tui-chart-drag-selection.show{display:block}.tui-chart .tui-chart-series-custom-event-area .tui-chart-reset-zoom-btn{position:absolute;left:20px;top:20px;font-size:11px;padding:5px;border:1px solid #ccc;background-color:#efefef;cursor:pointer;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-legend-rect{margin-top:2px;width:12px;height:12px}.tui-chart .tui-chart-legend-rect.line{height:2px}.tui-chart .tui-chart-legend-rect.area,.tui-chart .tui-chart-legend-rect.bubble{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";filter:alpha(opacity=50);opacity:.5}.tui-chart .tui-chart-chartExportMenu-area{z-index:900;position:absolute;font-family:Verdana;margin:0;padding:10px 0 0;z-index:5000}.tui-chart .tui-chart-chartExportMenu-area .tui-chart-chartExportMenu-button{position:absolute;width:26px;height:20px;right:0;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAYAAADkmO9VAAAAKklEQVQ4EWMsKCj4z0BFwERFs8BGUd1AajtwCJjHOBrLQyCWKHXiCIxlAM/yBv2WsAlAAAAAAElFTkSuQmCC) 0 0 no-repeat;border:0;font-size:12px;padding:3px 5px;margin:0;cursor:pointer}.tui-chart .tui-chart-chartExportMenu-area ul{display:none;position:absolute;top:30px;right:0;width:120px;background:#fff;border:.5px solid #000;font-size:.8em;padding:0;margin:0;box-shadow:3px 3px 5px #888}.tui-chart .tui-chart-chartExportMenu-area ul>li{margin:0;padding:7px 3px;border-collapse:collapse;text-align:center;list-style-type:none;line-height:1;cursor:pointer}.tui-chart .tui-chart-chartExportMenu-area ul>li:hover{background-color:#91ade5}.tui-chart .tui-chart-legend-area{z-index:400;position:absolute;padding:10px;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-legend-area .tui-chart-legend{clear:both}.tui-chart .tui-chart-legend-area .tui-chart-legend>div{float:left}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-checkbox-area{width:20px;height:20px;position:relative;box-sizing:border-box}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-checkbox-area input{left:2px;top:2px;*left:-2px;*top:-2px;position:absolute;padding:0;margin:0}.tui-chart .tui-chart-legend-area .tui-chart-legend .tui-chart-legend-label{padding:2px 0 2px 4px;cursor:pointer;box-sizing:content-box;line-height:1}.tui-chart .tui-chart-legend-area .tui-chart-legend.unselected .tui-chart-legend-label,.tui-chart .tui-chart-legend-area .tui-chart-legend.unselected .tui-chart-legend-rect{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area{position:absolute;left:10px;top:10px}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area .tui-chart-map-legend-tick{width:15px;height:1px;background-color:#ccc;position:absolute;left:0}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area .tui-chart-map-legend-tick-label{position:absolute;left:30px;text-align:left}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area.horizontal .tui-chart-map-legend-tick{top:0;width:1px;height:15px}.tui-chart .tui-chart-legend-area .tui-chart-legend-tick-area.horizontal .tui-chart-map-legend-tick-label{top:30px}.tui-chart .tui-chart-legend-area .tui-chart-map-legend-wedge{position:absolute;width:19px;height:4px;border-left:2px solid #777;border-right:2px solid #777;left:8px;top:30px;display:none}.tui-chart .tui-chart-legend-area .tui-chart-map-legend-wedge.show{display:block}.tui-chart .tui-chart-legend-area.horizontal{padding-left:0;padding-right:0}.tui-chart .tui-chart-legend-area.horizontal .tui-chart-legend{clear:none;float:left;white-space:nowrap}.tui-chart .tui-chart-circle-legend-area{position:absolute;z-index:400}.tui-chart .tui-chart-circle-legend-area .tui-chart-circle-legend-label-area{position:absolute;left:0;top:0}.tui-chart .tui-chart-circle-legend-area .tui-chart-circle-legend-label-area .tui-chart-circle-legend-label{position:absolute;font-size:9px;white-space:nowrap;text-shadow:#fff 0 0 3px}.tui-chart .tui-chart-tooltip-area{position:absolute;z-index:500}.tui-chart .tui-chart-tooltip-area *{user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip{z-index:100;position:absolute;display:none;user-select:none}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip.show{display:block}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip{padding:4px 0;font-size:12px;min-width:100px;color:#fff;border-radius:5px;background-clip:padding-box;background-color:rgba(0,0,0,.7);background-color:#555\9}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip>*{padding:2px 7px;text-align:center;white-space:nowrap}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip>:first-child{backgound-color:#fff;font-weight:700}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip>*{text-align:left;position:relative;padding-left:20px;padding-top:4px;padding-bottom:4px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip .tui-chart-legend-rect{position:absolute;left:7px;top:2px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip .tui-chart-legend-rect.line{top:7px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip>:first-child{padding-left:7px;padding-top:6px;padding-bottom:6px;text-align:center}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip.tui-chart-group-tooltip>.tui-chart-tooltip-type{padding-left:7px}.tui-chart .tui-chart-tooltip-area .tui-chart-tooltip .tui-chart-default-tooltip .hide{display:none}.tui-chart .tui-chart-tooltip-area .tui-chart-group-tooltip-sector{z-index:50;position:absolute;background-color:#aaa;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";filter:alpha(opacity=30);opacity:.3;display:none}.tui-chart .tui-chart-tooltip-area .tui-chart-group-tooltip-sector.show{display:block}.tui-chart.tui-map-chart .tui-chart-series-area{overflow:hidden}.tui-chart.tui-map-chart .tui-chart-tooltip-area .tui-chart-default-tooltip>:first-child{font-weight:400}.tui-chart-size-check-element{clear:both;position:absolute;word-wrap:break-word;word-break:keep-all;top:100000px;left:100000px;width:1000px;height:100px;padding:0;line-height:1}.tui-chart-size-check-element>span{display:inline-block;box-sizing:border-box;text-align:center;padding:0}:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation25 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation45 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation65 span,:root .tui-chart .tui-chart-axis-area.horizontal .tui-chart-label.tui-chart-xaxis-rotation85 span,:root .tui-chart .tui-chart-axis-area.vertical .tui-chart-title-area{filter:none \0} \ No newline at end of file diff --git a/dist/tui-chart.min.js b/dist/tui-chart.min.js index 58624211b..5e6bb4628 100644 --- a/dist/tui-chart.min.js +++ b/dist/tui-chart.min.js @@ -2,19 +2,19 @@ * tui-chart.min * @fileoverview tui-chart * @author NHN Ent. FE Development Lab - * @version 2.14.2 + * @version 2.15.0 * @license MIT * @link https://github.com/nhnent/tui.chart - * bundle created at "Thu Jan 25 2018 21:47:01 GMT+0900 (KST)" + * bundle created at "Fri Feb 02 2018 11:24:48 GMT+0900 (KST)" */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("raphael"),require("tui-code-snippet")):"function"==typeof define&&define.amd?define(["raphael","tui-code-snippet"],e):"object"==typeof exports?exports.chart=e(require("raphael"),require("tui-code-snippet")):(t.tui=t.tui||{},t.tui.chart=e(t.Raphael,t.tui&&t.tui.util))}(this,function(__WEBPACK_EXTERNAL_MODULE_3__,__WEBPACK_EXTERNAL_MODULE_6__){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="/dist/",e(0)}([function(t,e,i){"use strict";var n=i(2),o=i(28);i(143),o.registerPlugin(n.name,n.plugins,n.callback),o.renderUtil=i(7),o.arrayUtil=i(10),o.colorutil=i(135),t.exports=o},,function(t,e,i){"use strict";function n(t){var e=document.createElementNS("http://www.w3.org/2000/svg","filter"),i=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),n=document.createElementNS("http://www.w3.org/2000/svg","feFlood"),o=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),a=document.createElementNS("http://www.w3.org/2000/svg","feMorphology"),r=document.createElementNS("http://www.w3.org/2000/svg","feMerge"),s=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode"),h=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");e.id="glow",n.setAttribute("result","flood"),n.setAttribute("flood-color","#ffffff"),n.setAttribute("flood-opacity","0.5"),o.setAttribute("in","flood"),o.setAttribute("result","mask"),o.setAttribute("in2","SourceGraphic"),o.setAttribute("operator","in"),a.setAttribute("in","mask"),a.setAttribute("result","dilated"),a.setAttribute("operator","dilate"),a.setAttribute("radius","2"),i.setAttribute("in","dilated"),i.setAttribute("result","blurred"),i.setAttribute("stdDeviation","1"),s.setAttribute("in","blurred"),h.setAttribute("in","SourceGraphic"),e.appendChild(n),e.appendChild(o),e.appendChild(a),e.appendChild(i),e.appendChild(r),r.appendChild(s),r.appendChild(h),t.defs.appendChild(e)}var o=i(3),a=i(4),r=i(12),s=i(13),h=i(15),l=i(17),c=i(18),u=i(19),d=i(20),p=i(21),f=i(22),m=i(23),g=i(24),_=i(25),T=i(26),v=i(27),x={bar:a,boxplot:r,column:a,line:s,area:h,pie:l,bubble:u,scatter:u,heatmap:d,treemap:d,map:p,radial:c,legend:f,mapLegend:m,circleLegend:g,radialPlot:v,title:_,axis:T},y=function(t,e){var i=o(t,e.width,e.height),a=i.rect(0,0,e.width,e.height);return i.raphael.svg&&n(i),i.pushDownBackgroundToBottom=function(){a.toBack()},i.changeChartBackgroundColor=function(t){a.attr({fill:t})},i.changeChartBackgroundOpacity=function(t){a.attr({"fill-opacity":t})},i.resizeBackground=function(t,e){a.attr({width:t,height:e})},a.attr({fill:"#fff","stroke-width":0}),i};t.exports={name:"Raphael",plugins:x,callback:y}},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_3__},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=1,h=.3,l=.2,c=o.defineClass({render:function(t,e){var i=e.groupBounds;return i?(this.paper=t,this.theme=e.theme,this.seriesDataModel=e.seriesDataModel,this.chartType=e.chartType,this.paper.setStart(),this.options=e.options,this.theme=e.theme,this.groupBars=this._renderBars(i),this.groupBorders=this._renderBarBorders(i),this.overlay=this._renderOverlay(),this.groupBounds=i,this.paper.setFinish()):null},_renderOverlay:function(){var t={width:1,height:1,left:0,top:0},e={"fill-opacity":0};return this._renderBar(t,"#fff",e)},_renderBar:function(t,e,i){var a;return t.width<0||t.height<0?null:a=n.renderRect(this.paper,t,o.extend({fill:e,stroke:"none"},i))},_renderBars:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=o.map(t,function(t,a){return o.map(t,function(t,o){var r,s,h;return t?(h=e.seriesDataModel.getSeriesItem(a,o),r=n?i[a]:i[o],s=e._renderBar(t.start,r),{rect:s,color:r,bound:t.end,item:h,groupIndex:a,index:o,isRange:h.isRange}):null})});return a},_makeRectPoints:function(t){return{leftTop:{left:Math.ceil(t.left),top:Math.ceil(t.top)},rightTop:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top)},rightBottom:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top+t.height)},leftBottom:{left:Math.ceil(t.left),top:Math.ceil(t.top+t.height)}}},_makeTopLinePath:function(t,e,i){var a,r=null,s=i.value;return("bar"===e||s>=0||i.isRange)&&(a=o.extend({},t.leftTop),a.left-="column"===e||s<0?1:0,r=n.makeLinePath(a,t.rightTop).join(" ")),r},_makeRightLinePath:function(t,e,i){var o=null;return("column"===e||i.value>=0||i.isRange)&&(o=n.makeLinePath(t.rightTop,t.rightBottom).join(" ")),o},_makeBottomLinePath:function(t,e,i){var o=null;return("bar"===e||i.value<0||i.isRange)&&(o=n.makeLinePath(t.leftBottom,t.rightBottom).join(" ")),o},_makeLeftLinePath:function(t,e,i){var o=null;return("column"===e||i.value<0||i.isRange)&&(o=n.makeLinePath(t.leftTop,t.leftBottom).join(" ")),o},_makeBorderLinesPaths:function(t,e,i){var n=this._makeRectPoints(t),a={top:this._makeTopLinePath(n,e,i),right:this._makeRightLinePath(n,e,i),bottom:this._makeBottomLinePath(n,e,i),left:this._makeLeftLinePath(n,e,i)};return o.filter(a,function(t){return t})},_renderBorderLines:function(t,e,i,a){var r=this,s=this._makeBorderLinesPaths(t,i,a),h={};return o.forEach(s,function(t,i){h[i]=n.renderLine(r.paper,t,e,1)}),h},_renderBarBorders:function(t){var e,i=this,n=this.theme.borderColor;return n?e=o.map(t,function(t,e){return o.map(t,function(t,o){var a;return t?(a=i.seriesDataModel.getSeriesItem(e,o),i._renderBorderLines(t.start,n,i.chartType,a)):null})}):null},_animateRect:function(t,e){t.animate({x:e.left,y:e.top,width:e.width,height:e.height},r,">")},_animateBorders:function(t,e,i,n){var a=this._makeBorderLinesPaths(e,i,n);o.forEach(t,function(t,e){t.animate({path:a[e]},r,">")})},animate:function(t){var e=this,i=this.groupBorders||[];n.forEach2dArray(this.groupBars,function(t,n,o){var a=i[n]&&i[n][o];t&&(e._animateRect(t.rect,t.bound),a&&e._animateBorders(a,t.bound,e.chartType,t.item))}),t&&(this.callbackTimeout=setTimeout(function(){t(),delete e.callbackTimeout},r))},showAnimation:function(t){var e=this.groupBars[t.groupIndex][t.index],i=e.bound;this.overlay.attr({width:i.width,height:i.height,x:i.left,y:i.top,"fill-opacity":.3})},hideAnimation:function(){this.overlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0})},_updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},resize:function(t){var e=this,i=this.groupBorders||[],o=t.dimension,a=t.groupBounds;this.groupBounds=a,this.paper.setSize(o.width,o.height),n.forEach2dArray(this.groupBars,function(t,o,r){var s,h;t&&(s=i[o]&&i[o][r],h=a[o][r].end,t.bound=h,n.updateRectBound(t.rect,h),s&&e._updateBordersPath(s,h,e.chartType,t.item))})},_changeBordersColor:function(t,e){o.forEach(t,function(t){t.attr({stroke:e})})},_changeBarColor:function(t,e,i){var n,o=this.groupBars[t.groupIndex][t.index];o.rect.attr({fill:e}),i&&(n=this.groupBorders[t.groupIndex][t.index],this._changeBordersColor(n,i))},selectSeries:function(t){var e,i=this.groupBars[t.groupIndex][t.index],o=a.color(i.color),r=this.theme.selectionColor,s=r||n.makeChangedLuminanceColor(o.hex,l),h=this.theme.borderColor;h&&(e=a.color(h),h=n.makeChangedLuminanceColor(e.hex,l)),this._changeBarColor(t,s,h)},unselectSeries:function(t){var e=this.groupBars[t.groupIndex][t.index],i=this.theme.borderColor;this._changeBarColor(t,e.color,i)},selectLegend:function(t){var e=this.groupBorders||[],i=o.isNull(t);n.forEach2dArray(this.groupBars,function(n,a,r){var l,c;n&&(l=e[a]&&e[a][r],c=i||t===r?s:h,n.rect.attr({"fill-opacity":c}),l&&o.forEach(l,function(t){t.attr({"stroke-opacity":c})}))})},renderSeriesLabel:function(t,e,i,a,r){var s=r||"column"===this.chartType?"middle":"start",h={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0,"text-anchor":s},l=t.set();return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var r,s=e[a][o],c=n.renderText(t,s.end,i.end,h);c.node.style.userSelect="none",c.node.style.cursor="default",c.node.setAttribute("filter","url(#glow)"),l.push(c),s.start&&(r=n.renderText(t,s.start,i.start,h),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),l.push(r))})}),l}});t.exports=c},function(t,e,i){"use strict";function n(t){return o.isExisty(t)&&"number"==typeof t}var o=i(6),a=i(7),r=i(3),s={makeLinePath:function(t,e,i){var n,a=[t.left,t.top],r=[e.left,e.top];return i=i||1,n=i%2/2,o.forEachArray(a,function(t,e){t===r[e]&&(a[e]=r[e]=Math.round(t)-n)}),["M"].concat(a).concat("L").concat(r)},renderLine:function(t,e,i,n){var o=t.path([e]),a={stroke:i,"stroke-width":n||2};return"transparent"===i&&(a.stroke="#fff",a["stroke-opacity"]=0),o.attr(a),o},getEllipsisText:function(t,e,i){for(var n=t.split(""),o=n.length,a=this.getRenderedTextSize(".",i.fontSize,i.fontFamily).width,r=2*a,s="",h=0;h=e){s+="..";break}s+=n[h]}return s},renderText:function(t,e,i,n){var a=t.text(e.left,e.top,o.decodeHTMLEntity(String(i)));return n&&(n["dominant-baseline"]?a.node.setAttribute("dominant-baseline",n["dominant-baseline"]):a.node.setAttribute("dominant-baseline","central"),a.attr(n)),a},renderArea:function(t,e,i){var n=t.path(e);return i=o.extend({"stroke-opacity":0},i),n.attr(i),n},renderCircle:function(t,e,i,n){var o=t.circle(e.left,e.top,i);return n&&o.attr(n),o},renderRect:function(t,e,i){var n=t.rect(e.left,e.top,e.width,e.height);return i&&n.attr(i),n},updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},forEach2dArray:function(t,e){t&&o.forEachArray(t,function(t,i){o.forEachArray(t,function(t,n){e(t,i,n)})})},makeChangedLuminanceColor:function(t,e){var i;return t=t.replace("#",""),e=e||0,i=o.map(o.range(3),function(i){var n=parseInt(t.substr(2*i,2),16),o=n+n*e;return o=Math.round(Math.min(Math.max(0,o),255)).toString(16),a.formatToZeroFill(o,2)}).join(""),"#"+i},getRenderedTextSize:function(t,e,i){var n=r(document.body,100,100),o=n.text(0,0,t).attr({"font-size":e,"font-family":i}),a=o.getBBox();return o.remove(),n.remove(),{width:a.width,height:a.height}},animateOpacity:function(t,e,i,o){var a=n(o)?o:600,s=n(e)?e:0,h=n(i)?i:1,l=r.animation({opacity:h},a);t.attr({opacity:s}),t.animate(l)}};t.exports=s},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_6__},function(t,e,i){"use strict";function n(t,e){t=h.isArray(t)?t:[t],h.forEachArray(t,e)}function o(t){return"alpha(opacity="+t*a.OLD_BROWSER_OPACITY_100+")"}var a=i(8),r=i(9),s=i(10),h=i(6),l=i(11),c=Array.prototype.concat,u=h.browser,d=u.msie&&7===u.version,p=u.msie&&u.version<=8,f=window.getComputedStyle||!1,m=0,g="clipRectForAnimation",_={concatStr:function(){return String.prototype.concat.apply("",arguments)},makeFontCssText:function(t){var e=[];return t?(t.fontSize&&e.push(this.concatStr("font-size:",t.fontSize,"px")),t.fontFamily&&e.push(this.concatStr("font-family:",t.fontFamily)),t.color&&e.push(this.concatStr("color:",t.color)),t.fontWeight&&e.push(this.concatStr("font-weight:",t.fontWeight)),e.join(";")):""},checkEl:null,_createSizeCheckEl:function(){var t,e;return this.checkEl?this.checkEl.style.cssText="":(t=r.create("DIV","tui-chart-size-check-element"),e=r.create("SPAN"),t.appendChild(e),this.checkEl=t),this.checkEl},_makeCachingKey:function(t,e,i){var n=[t,i];return h.forEach(e,function(t,e){n.push(t+e)}),n.join("-")},_addCssStyle:function(t,e){t.style.fontSize=(e.fontSize||a.DEFAULT_LABEL_FONT_SIZE)+"px",e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontWeight&&(t.style.fontWeight=e.fontWeight),e.cssText&&(t.style.cssText+=e.cssText)},sizeCache:{},_getRenderedLabelSize:function(t,e,i){var n,o,a,r;return e=e||{},(t=h.isExisty(t)?String(t):"")?(n=this._makeCachingKey(t,e,i),r=this.sizeCache[n],r||(o=this._createSizeCheckEl(),a=o.firstChild,a.innerHTML=t,this._addCssStyle(o,e),document.body.appendChild(o),r=a[i],document.body.removeChild(o),this.sizeCache[n]=r),r):0},getRenderedLabelWidth:function(t,e){var i=this._getRenderedLabelSize(t,e,"offsetWidth");return i},getRenderedLabelHeight:function(t,e){var i=this._getRenderedLabelSize(t,e,"offsetHeight");return i},_getRenderedLabelsMaxSize:function(t,e,i){var n,o=0;return t&&t.length&&(n=h.map(t,function(t){return i(t,e)}),o=s.max(n)),o},getRenderedLabelsMaxWidth:function(t,e){var i=h.bind(this.getRenderedLabelWidth,this),n=this._getRenderedLabelsMaxSize(t,e,i);return n},getRenderedLabelsMaxHeight:function(t,e){var i=h.bind(this.getRenderedLabelHeight,this),n=this._getRenderedLabelsMaxSize(t,e,i);return n},renderDimension:function(t,e){t.style.cssText=[this.concatStr("width:",e.width,"px"),this.concatStr("height:",e.height,"px")].join(";")},renderPosition:function(t,e){h.isUndefined(e)||h.forEachArray(["top","bottom","left","right"],function(i){var n=e[i];h.isNumber(n)&&(t.style[i]=e[i]+"px")})},renderBackground:function(t,e){e&&(t.style.background=e)},renderFontFamily:function(t,e){e&&(t.style.fontFamily=e)},renderTitle:function(t,e,i){var n,o;return t?(n=r.create("DIV",i),n.innerHTML=t,o=_.makeFontCssText(e),e.background&&(o+=";"+this.concatStr("background:",e.background)),n.style.cssText=o,n):null},expandBound:function(t){var e=t.dimension,i=t.position;return{dimension:{width:e.width+2*a.SERIES_EXPAND_SIZE,height:e.height+2*a.SERIES_EXPAND_SIZE},position:{left:i.left-a.SERIES_EXPAND_SIZE,top:i.top-a.SERIES_EXPAND_SIZE}}},_properCase:function(t){return t.substring(0,1).toUpperCase()+t.substring(1)},makeMouseEventDetectorName:function(t,e,i){return t+this._properCase(e)+this._properCase(i)},formatValue:function(t){var e=t.value,i=t.formatFunctions,n=t.valueType||"value",o=t.areaType,a=t.chartType,r=t.legendName,s=[String(e)].concat(i||[]);return h.reduce(s,function(t,e){return e(t,a,o,n,r)})},formatValues:function(t,e,i,n,o){var a;return e&&e.length?a=h.map(t,function(t){return _.formatValue({value:t,formatFunctions:e,chartType:i,areaType:n,valueType:o})}):t},formatDate:function(t,e){var i=h.isDate(t)?t:new Date(t);return e=e||a.DEFAULT_DATE_FORMAT,h.formatDate(e,i)||t},formatDates:function(t,e){var i=this.formatDate;return e=e||a.DEFAULT_DATE_FORMAT,h.map(t,function(t){return i(t,e)})},cancelAnimation:function(t){t&&t.id&&(cancelAnimationFrame(t.id),delete t.id)},startAnimation:function(t,e,i){function n(){var r=(new Date).getTime()-o,s=Math.min(r/t,1);e(s),1===s?(delete a.id,i&&i()):a.id=requestAnimationFrame(n)}var o,a={};return o=(new Date).getTime(),a.id=requestAnimationFrame(n),a},isIE7:function(){return d},isOldBrowser:function(){return p},formatToZeroFill:function(t,e){var i="0";if(t=String(t),t.length>=e)return t;for(;t.length-1?"-":"",t.indexOf(".")>-1?(i=t.split("."),t=String(Math.abs(i[0])),r="."+i[1]):t=String(Math.abs(t)),t.length<=s?o=l:(i=t.split("").reverse(),n=i.length-1,i=h.map(i,function(t,e){var i=[t];return e-1||(i.push(e),t.className=i.join(" ")))},removeClass:function(t,e){var i=this._getClassNames(t),o=n.inArray(e,i);o!==-1&&(i.splice(o,1),t.className=i.join(" "))},hasClass:function(t,e){var i=this._getClassNames(t),o=n.inArray(e,i);return o>-1},findParentByClass:function(t,e,i){var n,o=t.parentNode;return n=o?this.hasClass(o,e)?o:"BODY"===o.nodeName||this.hasClass(o,i)?null:this.findParentByClass(o,e,i):null},append:function(t,e){t&&e&&(e=n.isArray(e)?e:[e],n.forEachArray(e,function(e){e&&t.appendChild(e)}))}};t.exports=a},function(t,e,i){"use strict";var n=i(6),o=function(t,e,i){var o,a,r;return e?(o=t[0],a=e.call(i,o,0),r=t.slice(1),n.forEachArray(r,function(t,n){var r=e.call(i,t,n+1);ra&&(a=r,o=t)})):o=Math.max.apply(null,t),o},r=function(t,e,i){var o=!1;return n.forEach(t,function(n,a){return e.call(i,n,a,t)&&(o=!0),!o}),o},s=function(t,e,i){var o=!!(t||[]).length;return n.forEach(t,function(n,a){return e.call(i,n,a,t)||(o=!1),o!==!1}),o},h=function(t,e,i,o){var a,r=[];return n.isBoolean(e)||(o=i,i=e,e=!1),i=i||function(t){return t},e?n.forEachArray(t,function(e,n){e=i.call(o,e,n,t),n&&a===e||r.push(e),a=e}):n.forEachArray(t,function(e,a){e=i.call(o,e,a,t),n.inArray(e,r)===-1&&r.push(e)}),r},l=function(t){var e,i=[],o=a(n.map(t,function(t){return t.length}));return n.forEachArray(t,function(t){for(e=0;e1&&!e},isDatetimeType:function(t){return t===n.AXIS_TYPE_DATETIME},isSupportPublicShowTooptipAPI:function(t){return this.isBarChart(t)||this.isColumnChart(t)||this.isLineChart(t)||this.isAreaChart(t)||this.isBoxplotChart(t)},isSupportPublicHideTooptipAPI:function(t){return this.isBarChart(t)||this.isColumnChart(t)||this.isLineChart(t)||this.isAreaChart(t)||this.isBoxplotChart(t)}};t.exports=a},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=1,h=.3,l=.2,c=1,u=2,d=2,p=1,f=o.defineClass({render:function(t,e){var i=e.groupBounds;return i?(this.paper=t,this.theme=e.theme,this.options=e.options,this.seriesDataModel=e.seriesDataModel,this.chartType=e.chartType,this.paper.setStart(),this.groupWhiskers=[],this.groupMedians=[],this.groupBoxes=this._renderBoxplots(i),this.groupBorders=this._renderBoxBorders(i),this.rectOverlay=this._renderRectOverlay(),this.circleOverlay=this._renderCircleOverlay(),this.groupBounds=i,this.paper.setFinish()):null},_renderRectOverlay:function(){var t={width:1,height:1,left:0,top:0},e={"fill-opacity":0};return n.renderRect(this.paper,t,o.extend({"stroke-width":0},e))},_renderCircleOverlay:function(){var t={left:0,top:0},e={"fill-opacity":0};return n.renderCircle(this.paper,t,0,o.extend({"stroke-width":0},e))},_renderBox:function(t,e,i){var a;return t.width<0||t.height<0?null:a=n.renderRect(this.paper,t,o.extend({fill:"#fff",stroke:e,"stroke-width":c},i))},_renderBoxes:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint;return o.map(t,function(t,a){return o.map(t,function(t,o){var r,s,h;return t?(h=e.seriesDataModel.getSeriesItem(a,o),r=n?i[a]:i[o],t.start&&(s=e._renderBox(t.start,r)),{rect:s,color:r,bound:t.end,item:h,groupIndex:a,index:o}):null})})},_renderBoxplots:function(t){var e=this._renderBoxes(t);return this.groupWhiskers=this._renderWhiskers(t),this.groupMedians=this._renderMedianLines(t),this.groupOutliers=this._renderOutliers(t),e},_renderWhisker:function(t,e,i){var o=this.paper,a=e.top-t.top,r=a>0?1:-1,s=t.width,h=t.left,l=s/4,c="M"+(h+l)+","+t.top+"H"+(h+3*l),d="M"+(h+2*l)+","+t.top+"V"+(t.top+Math.abs(a)*r),f=n.renderLine(o,c,i,u),m=n.renderLine(o,d,i,p),g=[];return f.attr({opacity:0}),m.attr({opacity:0}),g.push(f),g.push(m),g},_renderWhiskers:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,o){var a=n?i[r]:i[o];t&&(s=s.concat(e._renderWhisker(t.min,t.start,a)),s=s.concat(e._renderWhisker(t.max,t.end,a)))}),a.push(s)}),a},_renderMedianLine:function(t,e){var i=t.width,o="M"+t.left+","+t.top+"H"+(t.left+i),a=n.renderLine(this.paper,o,e,d);return a.attr({opacity:0}),a},_renderMedianLines:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,o){var a=n?i[r]:i[o];t&&s.push(e._renderMedianLine(t.median,a))}),a.push(s)}),a},_renderOutlier:function(t,e){var i=n.renderCircle(this.paper,{left:t.left,top:t.top},3,{stroke:e});return i.attr({opacity:0}),i},_renderOutliers:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,a){var h=n?i[r]:i[a],l=[];t&&(t.outliers.length&&o.forEach(t.outliers,function(t){l.push(e._renderOutlier(t,h))}),s.push(l))}),a.push(s)}),a},_makeRectPoints:function(t){return{leftTop:{left:Math.ceil(t.left),top:Math.ceil(t.top)},rightTop:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top)},rightBottom:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top+t.height)},leftBottom:{left:Math.ceil(t.left),top:Math.ceil(t.top+t.height)}}},_renderBorderLines:function(t,e,i,a){var r=this,s=this._makeBorderLinesPaths(t,i,a),h={};return o.forEach(s,function(t,i){h[i]=n.renderLine(r.paper,t,e,1)}),h},_renderBoxBorders:function(t){var e,i=this,n=this.theme.borderColor;return n?e=o.map(t,function(t,e){return o.map(t,function(t,o){var a;return t?(a=i.seriesDataModel.getSeriesItem(e,o),i._renderBorderLines(t.start,n,i.chartType,a)):null})}):null},_animateRect:function(t,e){t.animate({x:e.left,y:e.top,width:e.width,height:e.height},r,">")},animate:function(t){var e=this,i=a.animation({opacity:1},r);n.forEach2dArray(this.groupBoxes,function(t){t&&e._animateRect(t.rect,t.bound)}),n.forEach2dArray(e.groupWhiskers,function(t){t.animate(i.delay(r))}),n.forEach2dArray(e.groupMedians,function(t){t.animate(i.delay(r))}),n.forEach2dArray(e.groupOutliers,function(t){o.forEach(t,function(t){t.animate(i.delay(r))})}),t&&(this.callbackTimeout=setTimeout(function(){t(),delete e.callbackTimeout},r))},showAnimation:function(t){o.isNumber(t.outlierIndex)?this.showOutlierAnimation(t):this.showRectAnimation(t)},showRectAnimation:function(t){var e=this.groupBoxes[t.groupIndex][t.index],i=e.bound;this.rectOverlay.attr({width:i.width,height:i.height,x:i.left,y:i.top,fill:e.color,"fill-opacity":.3})},showOutlierAnimation:function(t){var e=this.groupOutliers[t.groupIndex][t.index][t.outlierIndex].attr(); -this.circleOverlay.attr({r:e.r,cx:e.cx,cy:e.cy,fill:e.stroke,"fill-opacity":.3,stroke:e.stroke,"stroke-width":2})},hideAnimation:function(){this.circleOverlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0,"stroke-width":0}),this.rectOverlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0})},_updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},resize:function(t){var e=t.dimension,i=t.groupBounds;this.groupBounds=i,this.paper.setSize(e.width,e.height),n.forEach2dArray(this.groupBoxes,function(t,e,o){var a;t&&(a=i[e][o].end,t.bound=a,n.updateRectBound(t.rect,a))})},_changeBordersColor:function(t,e){o.forEach(t,function(t){t.attr({stroke:e})})},_changeBoxColor:function(t,e,i){var n,o=this.groupBoxes[t.groupIndex][t.index];o.rect.attr({stroke:e}),i&&(n=this.groupBorders[t.groupIndex][t.index],this._changeBordersColor(n,i))},selectSeries:function(t){var e,i=this.groupBoxes[t.groupIndex][t.index],o=a.color(i.color),r=this.theme.selectionColor,s=r||n.makeChangedLuminanceColor(o.hex,l),h=this.theme.borderColor;h&&(e=a.color(h),h=n.makeChangedLuminanceColor(e.hex,l)),this._changeBoxColor(t,s,h)},unselectSeries:function(t){var e=this.groupBoxes[t.groupIndex][t.index],i=this.theme.borderColor;this._changeBoxColor(t,e.color,i)},selectLegend:function(t){var e=o.isNull(t);n.forEach2dArray(this.groupBoxes,function(i,n,o){var a;i&&(a=e||t===o?s:h,i.rect.attr({"stroke-opacity":a}))}),n.forEach2dArray(this.groupWhiskers,function(i,n,o){var a=e||t===o?s:h;i.attr({"stroke-opacity":a})}),n.forEach2dArray(this.groupMedians,function(i,n,o){var a=e||t===o?s:h;i.attr({"stroke-opacity":a})})},renderSeriesLabel:function(t,e,i,a,r){var s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0,"text-anchor":r?"middle":"start"},h=t.set();return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var r,l=e[a][o],c=n.renderText(t,l.end,i.end,s);c.node.style.userSelect="none",c.node.style.cursor="default",c.node.setAttribute("filter","url(#glow)"),h.push(c),l.start&&(r=n.renderText(t,l.start,i.start,s),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),h.push(r))})}),h}});t.exports=f},function(t,e,i){"use strict";var n=i(14),o=i(5),a=i(6),r=1,s=.3,h=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="line",this.lineWidth=2},render:function(t,e){var i,n=e.dimension,o=e.groupPositions,r=e.theme,s=r.colors,h=e.options,l=h.showDot?1:0,c=h.spline,u=this.lineWidth=a.isNumber(h.pointWidth)?h.pointWidth:this.lineWidth,d=this.makeBorderStyle(r.borderColor,l),p=this.makeOutDotStyle(l,d);return i=c?this._getSplineLinesPath(o,h.connectNulls):this._getLinesPath(o,h.connectNulls),this.paper=t,this.theme=e.theme,this.isSpline=c,this.dimension=n,this.position=e.position,t.setStart(),this.groupLines=this._renderLines(t,i,s,u),this.tooltipLine=this._renderTooltipLine(t,n.height),this.groupDots=this._renderDots(t,o,s,l),h.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=r.selectionColor),this.colors=s,this.borderStyle=d,this.outDotStyle=p,this.groupPositions=o,this.groupPaths=i,this.dotOpacity=l,delete this.pivotGroupDots,t.setFinish()},_getLinesPath:function(t,e){var i=this;return a.map(t,function(t){return i._makeLinesPath(t,null,e)})},_getSplineLinesPath:function(t,e){var i=this;return a.map(t,function(t){return i._makeSplineLinesPath(t,e)})},_renderLines:function(t,e,i,n){return a.map(e,function(e,a){var r=i[a]||"transparent";return o.renderLine(t,e.join(" "),r,n)})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.resizeClipRect(i),this.groupPositions=n,this.groupPaths=this.isSpline?this._getSplineLinesPath(n):this._getLinesPath(n),this.paper.setSize(i.width,i.height),this.tooltipLine.attr({top:i.height}),a.forEachArray(this.groupPaths,function(t,i){e.groupLines[i].attr({path:t.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){t.endDot&&e._moveDot(t.endDot.dot,n[i][o])})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupLines,function(n,o){var h=i||t===o?r:s;n.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){t.opacity=h,e.dotOpacity&&t.endDot.dot.attr({"fill-opacity":h})})})},animateForAddingData:function(t,e,i,n){var o=this,r=t.options.spline,s=r?this._getSplineLinesPath(i):this._getLinesPath(i),h=0;i.length&&(n&&(h=1),a.forEachArray(this.groupLines,function(t,r){var l=o.groupDots[r],c=i[r];n&&o._removeFirstDot(l),a.forEachArray(l,function(t,i){var n=c[i+h];o._animateByPosition(t.endDot.dot,n,e)}),o._animateByPath(t,s[r],e)}))},renderSeriesLabel:function(t,e,i,n){var r={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle",opacity:0},s=t.set();return a.forEach(i,function(i,n){a.forEach(i,function(i,a){var h,l=e[n][a],c=o.renderText(t,l.end,i.end,r);s.push(c),c.node.style.userSelect="none",c.node.style.cursor="default",c.node.setAttribute("filter","url(#glow)"),l.start&&(h=o.renderText(t,l.start,i.start,r),h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),s.push(h))})}),s}});t.exports=h},function(t,e,i){"use strict";function n(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),a=t.rect(e.left-10,e.top-10,0,i.height);return a.id=n+"_rect",o.id=n,o.appendChild(a.node),t.defs.appendChild(o),a}var o=i(5),a=i(7),r=i(6),s=i(10),h=r.browser,l=h.msie&&h.version<=8,c=700,u=3,d=7,p=.3,f=300,m=Array.prototype.concat,g=r.defineClass({_makeLinesPath:function(t,e,i){var n=[],o=!1;return e=e||"top",r.map(t,function(t){var a=o&&!i?"M":"L";t?(n.push([a,t.left,t[e]]),o&&(o=!1)):o=!0}),n=m.apply([],n),n.length>0&&(n[0]="M"),n},_getAnchor:function(t,e,i){var n,o,a,r,s,h=(e.left-t.left)/2,l=(i.left-e.left)/2,c=Math.atan((e.left-t.left)/Math.abs(e.top-t.top)),u=Math.atan((i.left-e.left)/Math.abs(e.top-i.top));return c=t.top0&&!e||r)&&(i.push(n),n=[])}),i},_getSplinePartialPaths:function(t){var e,i,n,o,a,s,h,l=this,c=[];return r.forEach(t,function(t){h=e=t[0],n=t.length,o=e,i=t[n-1],a=t.slice(1).slice(0,n-2),s=r.map(a,function(e,i){var n=t[i+2],a=l._getAnchor(o,e,n);return o=e,Math.abs(a.y1-h.top)>Math.abs(h.top-e.top)&&(a.y1=e.top),Math.abs(a.y2-n.top)>Math.abs(n.top-e.top)&&(a.y2=e.top),h=e,[a.x1,a.y1,e.left,e.top,a.x2,a.y2]}),s.push([i.left,i.top,i.left,i.top]),s.unshift(["M",e.left,e.top,"C",e.left,e.top]),c.push(s)}),c},_makeSplineLinesPath:function(t,e){var i=[],n=this._getSplinePositionsGroups(t,e),o=this._getSplinePartialPaths(n);return r.forEach(o,function(t){i=i.concat(t)}),i},_renderTooltipLine:function(t,e){var i=o.makeLinePath({left:10,top:e},{left:10,top:0});return o.renderLine(t,i,"transparent",1)},makeBorderStyle:function(t,e){var i;return t&&(i={stroke:t,"stroke-width":1,"stroke-opacity":e}),i},makeOutDotStyle:function(t,e){var i={"fill-opacity":t,"stroke-opacity":0,r:u};return e&&r.extend(i,e),i},renderDot:function(t,e,i,n){var o,a,s,h=this.theme&&this.theme.dot||{dot:{}};return e&&(o=t.circle(e.left,e.top,h.radius||u),a={fill:h.fillColor||i,"fill-opacity":r.isNumber(n)?n:h.fillOpacity,stroke:h.strokeColor||i,"stroke-opacity":r.isNumber(n)?n:h.strokeOpacity,"stroke-width":h.strokeWidth},o.attr(a),s={dot:o,color:i}),s},_moveDotsToFront:function(t){o.forEach2dArray(t,function(t){t.endDot.dot.toFront(),t.startDot&&t.startDot.dot.toFront()})},_renderDots:function(t,e,i,n,o){var a,s=this;return a=r.map(e,function(e,a){var h=i[a];return r.map(e,function(e){var i,a={endDot:s.renderDot(t,e,h,n)};return s.hasRangeData&&(i=r.extend({},e),i.top=i.startTop,a.startDot=s.renderDot(t,i,h,n)),o&&(o.push(a.endDot.dot),a.startDot&&o.push(a.startDot.dot)),a})})},_getCenter:function(t,e){return{left:(t.left+e.left)/2,top:(t.top+e.top)/2}},_showDot:function(t,e){var i=this.theme.dot.hover,n={"fill-opacity":i.fillOpacity,stroke:i.strokeColor||t.color,"stroke-opacity":i.strokeOpacity,"stroke-width":i.strokeWidth,r:i.radius};this._setPrevDotAttributes(e,t.dot),i.fillColor&&(n.fill=i.fillColor),t.dot.attr(n)},_setPrevDotAttributes:function(t,e){this._prevDotAttributes||(this._prevDotAttributes={}),this._prevDotAttributes[t]=e.attr()},_updateLineStrokeWidth:function(t,e){t.attr({"stroke-width":e})},showAnimation:function(t){var e,i,n=t.groupIndex,o=t.index,a=this.groupLines?this.groupLines[o]:this.groupAreas[o],r=this.groupDots[o][n];r&&("area"===this.chartType?(e=2*this.lineWidth,i=a.startLine,a=a.line):e=2*this.lineWidth,this._updateLineStrokeWidth(a,e),i&&this._updateLineStrokeWidth(i,e),this._showDot(r.endDot,o),r.startDot&&this._showDot(r.startDot,o))},_getPivotGroupDots:function(){return!this.pivotGroupDots&&this.groupDots&&(this.pivotGroupDots=s.pivot(this.groupDots)),this.pivotGroupDots},_showGroupDots:function(t){var e=this,i=this._getPivotGroupDots();i&&i[t]&&r.forEachArray(i[t],function(t,i){t.endDot&&e._showDot(t.endDot,i),t.startDot&&e._showDot(t.startDot,i)})},showGroupTooltipLine:function(t,e){var i=Math.max(t.position.left,11),n=o.makeLinePath({left:i,top:e.position.top+t.dimension.height},{left:i,top:e.position.top});this.tooltipLine&&this.tooltipLine.attr({path:n,stroke:"#999","stroke-opacity":1})},showGroupAnimation:function(t){this._showGroupDots(t)},_hideDot:function(t,e,i){var n=this._prevDotAttributes[e],o=this.outDotStyle;n&&!r.isUndefined(i)&&(o=r.extend({r:n.r,stroke:n.stroke,fill:n.fill,"stroke-opacity":n["stroke-opacity"],"stroke-width":n["stroke-width"]},{"fill-opacity":i})),t.attr(o)},hideAnimation:function(t){var e,i,n,o,a=t.groupIndex,s=t.index,h=this.dotOpacity,l=this.groupDots[s];l&&l[a]&&(e=this.groupLines?this.groupLines[s]:this.groupAreas[s],i=l[a],"area"===this.chartType?(n=this.lineWidth,o=e.startLine,e=e.line):n=this.lineWidth,h&&!r.isNull(this.selectedLegendIndex)&&this.selectedLegendIndex!==s&&(h=p),e&&this._updateLineStrokeWidth(e,n),o&&this._updateLineStrokeWidth(o,n),i&&(this._hideDot(i.endDot.dot,s,h),i.startDot&&this._hideDot(i.startDot.dot,s,h)))},_hideGroupDots:function(t){var e=this,i=!r.isNull(this.selectedLegendIndex),n=this.dotOpacity,o=this._getPivotGroupDots();o&&o[t]&&r.forEachArray(o[t],function(t,o){var a=n;a&&i&&e.selectedLegendIndex!==o&&(a=p),t.endDot&&e._hideDot(t.endDot.dot,o,a),t.startDot&&e._hideDot(t.startDot.dot,o,a)})},hideGroupTooltipLine:function(){this.tooltipLine.attr({"stroke-opacity":0})},hideGroupAnimation:function(t){this._hideGroupDots(t)},_moveDot:function(t,e){var i={cx:e.left,cy:e.top};this.dotOpacity&&(i=r.extend({"fill-opacity":this.dotOpacity},i,this.borderStyle)),t.attr(i)},animate:function(t,e){var i=this.paper,o=this.dimension,a=this.position,r=this.clipRect,s=this._getClipRectId();!l&&o&&(r?r.attr({width:0,height:o.height}):(r=n(i,a,o,s),this.clipRect=r),e.forEach(function(t){t.node.setAttribute("clip-path","url(#"+s+")")}),r.animate({width:o.width},c,">",t))},_makeSelectionDot:function(t){var e=t.circle(0,0,d);return e.attr({fill:"#ffffff","fill-opacity":0,"stroke-opacity":0,"stroke-width":2}),e},selectSeries:function(t){var e=this.groupDots[t.index][t.groupIndex],i=this.groupPositions[t.index][t.groupIndex];this.selectedItem=e,this.selectionDot.attr({cx:i.left,cy:i.top,"fill-opacity":.5,"stroke-opacity":1,stroke:this.selectionColor||e.endDot.color}),this.selectionStartDot&&this.selectionStartDot.attr({cx:i.left,cy:i.startTop,"fill-opacity":.5,"stroke-opacity":1,stroke:this.selectionColor||e.startDot.color})},unselectSeries:function(t){var e=this.groupDots[t.index][t.groupIndex];this.selectedItem===e&&this.selectionDot.attr({"fill-opacity":0,"stroke-opacity":0}),this.selectionStartDot&&this.selectionStartDot.attr({"fill-opacity":0,"stroke-opacity":0})},setSize:function(t,e){t=t||this.dimension.width,e=e||this.dimension.height,this.paper.setSize(t,e)},_animateByPosition:function(t,e,i){var n={cx:e.left,cy:e.top};r.isExisty(i)&&(n.transform="t-"+i+",0"),t.animate(n,f)},_animateByPath:function(t,e,i){var n={path:e.join(" ")};r.isExisty(i)&&(n.transform="t-"+i+",0"),t.animate(n,f)},_removeFirstDot:function(t){var e=t.shift();e.endDot.dot.remove(),e.startDot&&e.startDot.dot.remove()},clear:function(){delete this.paper.dots,this.paper.clear()},resizeClipRect:function(t){var e=this.paper.getById(this._getClipRectId()+"_rect");e.attr({width:t.width,height:t.height})},_getClipRectId:function(){return this.clipRectId||(this.clipRectId=a.generateClipRectId()),this.clipRectId}});t.exports=g},function(t,e,i){"use strict";var n=i(14),o=i(5),a=i(6),r=1,s=.3,h=Array.prototype.concat,l=i(8).GUIDE_AREACHART_AREAOPACITY_TYPE,c=i(16),u=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="area",this.lineWidth=1},render:function(t,e){var i=e.dimension,n=e.groupPositions,o=e.theme,r=o.colors,s=e.options,h=this._isAreaOpacityNumber(s.areaOpacity)?s.areaOpacity:.5,l=s.showDot?1:0,c=this.makeBorderStyle(o.borderColor,l),u=this.makeOutDotStyle(l,c),d=this.lineWidth=a.isNumber(s.pointWidth)?s.pointWidth:this.lineWidth;return this.paper=t,this.theme=e.theme,this.isSpline=s.spline,this.dimension=i,this.position=e.position,this.zeroTop=e.zeroTop,this.hasRangeData=e.hasRangeData,t.setStart(),this.groupPaths=this._getAreaChartPath(n,null,s.connectNulls),this.groupAreas=this._renderAreas(t,this.groupPaths,r,d,h),this.tooltipLine=this._renderTooltipLine(t,i.height),this.groupDots=this._renderDots(t,n,r,l),s.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=o.selectionColor,this.hasRangeData&&(this.selectionStartDot=this._makeSelectionDot(t))),this.outDotStyle=u,this.groupPositions=n,this.dotOpacity=l,this.pivotGroupDots=null,t.setFinish()},_getAreaChartPath:function(t,e,i){var n;return n=this.isSpline?this._makeSplineAreaChartPath(t,e):this._makeAreaChartPath(t,e,i)},_renderAreas:function(t,e,i,n,r){var s;return i=i.slice(0,e.length),i.reverse(),e.reverse(),s=a.map(e,function(e,a){var s=i[a]||"transparent",h=s,l={area:o.renderArea(t,e.area.join(" "),{fill:s,opacity:r,stroke:s}),line:o.renderLine(t,e.line.join(" "),h,n)};return e.startLine&&(l.startLine=o.renderLine(t,e.startLine.join(" "),h,1)),l}),s.reverse()},_makeHeight:function(t,e){return Math.abs(t-e)},_makeAreasPath:function(t,e){var i,n=[],o=[],r=!1,s=t.length,l=[],c=[];return a.forEachArray(t,function(t,e){var i;t?(r?(i="M",r=!1):i="L",l.push([i,t.left,t.top]),c.unshift(["L",t.left,t.startTop])):(r=!0,c.push(["z"])),t&&e!==s-1||(o.push(l.concat(c)),l=[],c=[])}),a.forEachArray(o,function(t){n=n.concat(t)}),e!==!1&&(i=t.length-1,n.splice(i+1,0,n[i],n[i+1])),n=h.apply([],n),n[0]="M",n},_makeAreaChartPath:function(t,e,i){var n=this;return a.map(t,function(t){var o;return o={area:n._makeAreasPath(t,e),line:n._makeLinesPath(t,null,i)},n.hasRangeData&&(o.startLine=n._makeLinesPath(t,"startTop")),o})},_makeSplineAreaBottomPath:function(t){var e=this;return a.map(t,function(t){return["L",t.left,e.zeroTop]}).reverse()},_makeSplineAreaChartPath:function(t,e){var i=this;return a.map(t,function(t){var n,o=i._makeSplineLinesPath(t),a=JSON.parse(JSON.stringify(o)),r=i._makeSplineAreaBottomPath(t);return e!==!1&&(n=t[t.length-1],a.push(["L",n.left,n.top]),r.unshift(["L",n.left,i.zeroTop])),{area:a.concat(r),line:o}})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.resizeClipRect(i),this.zeroTop=t.zeroTop,this.groupPositions=n,this.groupPaths=this._getAreaChartPath(n),this.paper.setSize(i.width,i.height),this.tooltipLine.attr({top:i.height}),a.forEachArray(this.groupPaths,function(t,i){var o=e.groupAreas[i];o.area.attr({path:t.area.join(" ")}),o.line.attr({path:t.line.join(" ")}),o.startLine&&o.startLine.attr({path:t.startLine.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){var r,s=n[i][o];t.endDot&&e._moveDot(t.endDot.dot,s),t.startDot&&(r=a.extend({},s),r.top=r.startTop,e._moveDot(t.startDot.dot,r))})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupAreas,function(n,o){var h=i||t===o?r:s;n.area.attr({"fill-opacity":h}),n.line.attr({"stroke-opacity":h}),n.startLine&&n.startLine.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){e.dotOpacity&&(t.endDot.dot.attr({"fill-opacity":h}),t.startDot&&t.startDot.dot.attr({"fill-opacity":h}))})})},animateForAddingData:function(t,e,i,n,o){var r=this,s=this._getAreaChartPath(i,!1),h=0;i.length&&(n&&(h=1),this.zeroTop=o,a.forEachArray(this.groupAreas,function(t,o){var l=r.groupDots[o],c=i[o],u=s[o];n&&r._removeFirstDot(l),a.forEachArray(l,function(t,i){var n=c[i+h];r._animateByPosition(t.endDot.dot,n,e),t.startDot&&r._animateByPosition(t.startDot.dot,{left:n.left,top:n.startTop},e)}),r._animateByPath(t.area,u.area,e),r._animateByPath(t.line,u.line,e),t.startLine&&r._animateByPath(t.startLine,u.startLine,e)}))},renderSeriesLabel:function(t,e,i,n){var r={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle",opacity:0},s=t.set();return a.forEach(i,function(i,n){a.forEach(i,function(i,a){var h,l=e[n][a],c=o.renderText(t,l.end,i.end,r);s.push(c),c.node.style.userSelect="none",c.node.style.cursor="default",c.node.setAttribute("filter","url(#glow)"),l.start&&(h=o.renderText(t,l.start,i.start,r),h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),s.push(h))})}),s},_isAreaOpacityNumber:function(t){var e=a.isNumber(t);return e?(t<0||t>1)&&c.print(l,"warn"):a.isUndefined(t)||c.print(l,"error"),e}});t.exports=u},function(t,e){"use strict";t.exports={print:function(t,e){e=e||"log",window.console&&window.console[e](t)}}},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=180,s=360,h=.01,l=Math.PI/r,c=700,u=1,d=.3,p=.3,f=.2,m="overlay",g=20,_=o.defineClass({render:function(t,e,i){var n=t.set();return this.paper=t,this.holeRatio=e.options.radiusRange[0],this.chartBackground=e.chartBackground,this.chartType=e.chartType,this.callbacks=i,this.selectionColor=e.theme.selectionColor,this.circleBound=e.circleBound,this.sectorName="sector_"+this.chartType,this._setSectorAttr(),this.sectorInfos=this._renderPie(e.sectorData,e.theme.colors,e.additionalIndex,n),this.overlay=this._renderOverlay(),this.prevPosition=null,this.prevHoverSector=null,n},clear:function(){this.legendLines=null,this.paper.clear()},_makeSectorPath:function(t,e,i,n,o){var a=n*l,s=o*l,h=t+i*Math.sin(a),c=e-i*Math.cos(a),u=t+i*Math.sin(s),d=e-i*Math.cos(s),p=o-n>r?1:0,f=["M",t,e,"L",h,c,"A",i,i,0,p,1,u,d,"Z"];return{path:f}},_makeDonutSectorPath:function(t,e,i,n,o,a){var s=n*l,h=o*l,c=a||i*this.holeRatio,u=t+i*Math.sin(s),d=e-i*Math.cos(s),p=t+c*Math.sin(s),f=e-c*Math.cos(s),m=t+i*Math.sin(h),g=e-i*Math.cos(h),_=t+c*Math.sin(h),T=e-c*Math.cos(h),v=o-n>r?1:0,x=["M",u,d,"A",i,i,0,v,1,m,g,"L",_,T,"A",c,c,0,v,0,p,f,"Z"];return{path:x}},_setSectorAttr:function(){var t;this.paper.customAttributes[this.sectorName]||(t=this.holeRatio?this._makeDonutSectorPath:this._makeSectorPath,this.paper.customAttributes[this.sectorName]=o.bind(t,this))},_renderOverlay:function(){var t={paper:this.paper,circleBound:{cx:0,cy:0,r:0},angles:{startAngle:0,endAngle:0},attrs:{fill:"none",opacity:0,stroke:this.chartBackground.color,"stroke-width":1}},e=this._renderSector(t);return e.data("id",m),e.data("chartType",this.chartType),{inner:e,outer:this._renderSector(t)}},_renderSector:function(t){var e=t.circleBound,i=t.angles,n=t.attrs;return n[this.sectorName]=[e.cx,e.cy,e.r,i.startAngle,i.endAngle],t.paper.path().attr(n)},_renderPie:function(t,e,i,n){var a=this,r=this.circleBound,s=this.chartBackground,h=[];return o.forEachArray(t,function(t,o){var l=t.ratio,c=e[o],u=a._renderSector({paper:a.paper,circleBound:r,angles:t.angles.start,attrs:{fill:s.color,stroke:s.color,"stroke-width":1}});u.data("index",o),u.data("legendIndex",o+i),u.data("chartType",a.chartType),h.push({sector:u,color:c,angles:t.angles.end,ratio:l}),n.push(u)}),h},renderLegendLines:function(t){var e,i=this.paper;this.legendLines||(e=this._makeLinePaths(t),this.legendLines=o.map(e,function(t){return n.renderLine(i,t,"transparent",1)}))},_makeLinePaths:function(t){return o.map(t,function(t){return[n.makeLinePath(t.start,t.middle),n.makeLinePath(t.middle,t.end),"Z"].join("")})},_showOverlay:function(t,e){var i,n=this.overlay,o=this.sectorInfos[t],a=o.angles.startAngle,r=o.angles.endAngle,s=this.circleBound;i={fill:"#fff",opacity:d},i[this.sectorName]=[s.cx,s.cy,s.r,a,r,s.r*this.holeRatio],n.inner.attr(i),n.inner.data("index",t),n.inner.data("legendIndex",e),n.outer.attr({path:this._makeDonutSectorPath(s.cx,s.cy,s.r+10,a,r,s.r).path,fill:o.color,opacity:d})},_hideOverlay:function(){var t=this.overlay,e={fill:"none",opacity:0};t.inner.attr(e),t.outer.attr(e)},animate:function(t){var e=0,i=this.sectorName,n=this.circleBound,r=[n.cx,n.cy,n.r];o.forEachArray(this.sectorInfos,function(t){var n,o=t.angles,l={fill:t.color},u=c*t.ratio;0===o.startAngle&&o.endAngle===s&&(o.endAngle=s-h),l[i]=r.concat([o.startAngle,o.endAngle]),n=a.animation(l,u,">"),t.sector.animate(n.delay(e)),e+=u}),t&&setTimeout(t,e)},animateLegendLines:function(t){var e;this.legendLines&&(e=o.isNull(t),o.forEachArray(this.legendLines,function(i,n){var o=e||t===n?u:p;i.animate({stroke:"black","stroke-opacity":o})}))},resize:function(t){var e=t.dimension,i=t.circleBound,n=this.sectorName,a=this.labelSet;this.circleBound=i,this.paper.setSize(e.width,e.height),o.forEachArray(this.sectorInfos,function(t,e){var o,r=t.angles,s={};s[n]=[i.cx,i.cy,i.r,r.startAngle,r.endAngle],t.sector.attr(s),a&&a.length&&(o=t.sector.getBBox(),a[e].attr({x:o.x+o.width/2,y:o.y+o.height/2}))})},moveLegendLines:function(t){var e;this.legendLines&&(e=this._makeLinePaths(t),o.forEachArray(this.legendLines,function(t,i){return t.attr({path:e[i]}),t}))},findSectorInfo:function(t){var e=this.paper&&this.paper.getElementByPoint(t.left,t.top),i=null;return e&&(i={legendIndex:o.isExisty(e.data("legendIndex"))?e.data("legendIndex"):-1,index:o.isExisty(e.data("index"))?e.data("index"):-1,chartType:e.data("chartType")}),i},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},_showTooltip:function(t,e){var i=[{},0,t.data("index"),{left:e.left-g,top:e.top-g}];this.callbacks.showTooltip.apply(null,i)},_isValidSector:function(t){return t&&t.data("chartType")===this.chartType},moveMouseOnSeries:function(t){var e=this.paper&&this.paper.getElementByPoint(t.left,t.top);this._isValidSector(e)?(this.prevHoverSector!==e&&(this._showOverlay(e.data("index"),e.data("legendIndex")),this.prevHoverSector=e),this._isChangedPosition(this.prevPosition,t)&&this._showTooltip(e,t)):this.prevHoverSector&&(this._hideOverlay(),this.callbacks.hideTooltip(),this.prevHoverSector=null),this.prevPosition=t},selectSeries:function(t){var e,i,o,r=this.sectorInfos[t.index];r&&(i=a.color(r.color),e=n.makeChangedLuminanceColor(i.hex,f),o=this.selectionColor||e,r.sector.attr({fill:o}))},unselectSeries:function(t){var e=this.sectorInfos[t.index];e&&e.sector.attr({fill:e.color})},selectLegend:function(t){var e=o.isNull(t),i=this.legendLines;o.forEachArray(this.sectorInfos,function(n,o){var a=e||t===o?u:p;n.sector.attr({"fill-opacity":a}),i&&i[o].attr({"stroke-opacity":a})})},getRenderedLabelWidth:function(t,e){return n.getRenderedTextSize(t,e.fontSize,e.fontFamily).width},getRenderedLabelHeight:function(t,e){return n.getRenderedTextSize(t,e.fontSize,e.fontFamily).height},renderLabels:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,"text-anchor":"middle",fill:a.color,opacity:0};return o.forEach(e,function(e,o){var a;e&&(a=n.renderText(t,e,i[o],s),a.node.style.userSelect="none",a.node.style.cursor="default",a.node.setAttribute("filter","url(#glow)")),r.push(a)}),this.labelSet=r,r}});t.exports=_},function(t,e,i){"use strict";var n=i(14),o=i(5),a=i(6),r=1,s=.3,h=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="radial",this.lineWidth=2},render:function(t,e){var i=e.dimension,n=e.groupPositions,o=e.theme,a=o.colors,r=e.options.showDot?1:0,s=e.options.showArea,h=this._getLinesPath(n),l=this.makeBorderStyle(o.borderColor,r),c=this.makeOutDotStyle(r,l),u=t.set(),d=this.lineWidth=e.options.pointWidth?e.options.pointWidth:this.lineWidth;return this.paper=t,this.theme=e.theme,this.dimension=i,this.position=e.position,s&&(this.groupAreas=this._renderArea(t,h,a,u)),this.groupLines=this._renderLines(t,h,a,d,u),this.groupDots=this._renderDots(t,n,a,r,u),e.options.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=o.selectionColor),this.colors=a,this.borderStyle=l,this.outDotStyle=c,this.groupPositions=n,this.groupPaths=h,this.dotOpacity=r,u},_getLinesPath:function(t){var e=this;return a.map(t,function(t){return e._makeLinesPath(t)})},_renderLines:function(t,e,i,n,r){return a.map(e,function(e,a){var s=i[a]||"transparent",h=o.renderLine(t,e.join(" "),s,n);return r.push(h),h})},_renderArea:function(t,e,i,n){return a.map(e,function(e,a){var r=i[a]||"transparent",s=o.renderArea(t,e,{fill:r,opacity:.4,"stroke-width":0,stroke:r});return n.push(s),s})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.groupPositions=n,this.groupPaths=this._getLinesPath(n),this.paper.setSize(i.width,i.height),a.forEachArray(this.groupPaths,function(t,i){e.groupLines[i].attr({path:t.join(" ")}),e.groupAreas[i].attr({path:t.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){e._moveDot(t.endDot.dot,n[i][o])})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupLines,function(n,o){var h=i||t===o?r:s;n.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){t.opacity=h,e.dotOpacity&&t.endDot.dot.attr({"fill-opacity":h})})})}});t.exports=h},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=.5,h=.3,l=.5,c=.3,u=.2,d=2,p=20,f=o.defineClass({render:function(t,e,i){var n=t.set();return this.paper=t,this.theme=e.theme,this.seriesDataModel=e.seriesDataModel,this.groupBounds=e.groupBounds,this.callbacks=i,this.overlay=this._renderOverlay(),this.groupCircleInfos=this._renderCircles(n),this.prevCircle=null,this.prevOverCircle=null,this.animationTimeoutId=null,n},_renderOverlay:function(){var t={left:0,top:0},e={fill:"none",stroke:"#fff","stroke-opacity":h,"stroke-width":2},i=n.renderCircle(this.paper,t,0,e);return i},_renderCircles:function(t){var e=this,i=this.theme.colors;return o.map(this.groupBounds,function(a,r){return o.map(a,function(o,a){var s,h,l=null;return o&&(s=i[a],h=n.renderCircle(e.paper,o,0,{fill:s,opacity:0,stroke:"none"}),t.push(h),h.data("groupIndex",r),h.data("index",a),l={circle:h,color:s,bound:o}),l})})},_animateCircle:function(t,e){t.animate({r:e,opacity:s},r,">")},animate:function(){var t=this;n.forEach2dArray(this.groupCircleInfos,function(e){e&&t._animateCircle(e.circle,e.bound.radius)})},_updatePosition:function(t,e){t.attr({cx:e.left,cy:e.top,r:e.radius})},resize:function(t){var e=this,i=t.dimension,o=t.groupBounds;this.groupBounds=o,this.paper.setSize(i.width,i.height),n.forEach2dArray(this.groupCircleInfos,function(t,i,n){var a=o[i][n];t&&(t.bound=a,e._updatePosition(t.circle,a))})},findIndexes:function(t){var e=this.paper.getElementByPoint(t.left,t.top),i=null;return e&&(i={index:e.data("index"),groupIndex:e.data("groupIndex")}),i},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},showAnimation:function(t){var e=this.groupCircleInfos[t.groupIndex][t.index],i=e.bound;this.overlay.attr({cx:i.left,cy:i.top,r:i.radius+d,stroke:e.color,opacity:1})},hideAnimation:function(){this.overlay.attr({cx:0,cy:0,r:0,opacity:0})},_findCircle:function(t){for(var e,i,n=[],a=this.paper;o.isUndefined(e);)i=a.getElementByPoint(t.left,t.top),i?i.attrs.opacity>c?e=i:(n.push(i),i.hide()):e=null;return e||(e=n[0]),o.forEachArray(n,function(t){t.show()}),e},moveMouseOnSeries:function(t){var e,i,n,a=this._findCircle(t);a&&o.isExisty(a.data("groupIndex"))?(e=a.data("groupIndex"),i=a.data("index"),n=[{},e,i,{left:t.left-p,top:t.top-p}],this._isChangedPosition(this.prevPosition,t)&&(this.callbacks.showTooltip.apply(null,n),this.prevOverCircle=a)):this.prevOverCircle&&(this.callbacks.hideTooltip(),this.prevOverCircle=null),this.prevPosition=t},selectSeries:function(t){var e=t.groupIndex,i=t.index,o=this.groupCircleInfos[e][i],r=a.color(o.color),s=this.theme.selectionColor,h=s||n.makeChangedLuminanceColor(r.hex,u);o.circle.attr({fill:h})},unselectSeries:function(t){var e=t.groupIndex,i=t.index,n=this.groupCircleInfos[e][i];n.circle.attr({fill:n.color})},selectLegend:function(t){var e=o.isNull(t);n.forEach2dArray(this.groupCircleInfos,function(i,n,o){var a;i&&(a=e||t===o?l:c,i.circle.attr({opacity:a}))})}});t.exports=f},function(t,e,i){"use strict";var n=i(5),o=i(6),a=100,r=1,s=3,h=o.defineClass({render:function(t,e){var i=t.set();return this.paper=t,this.theme=e.theme||{},this.colorSpectrum=e.colorSpectrum,this.chartBackground=e.chartBackground,this.zoomable=e.zoomable,this.borderColor=this.theme.borderColor||"none",this.borderWidth=this.theme.borderWidth,this.groupBounds=e.groupBounds,this.boundMap=e.boundMap,this._bindGetBoundFunction(),this._bindGetColorFunction(),this.boxesSet=this._renderBoxes(e.seriesDataModel,e.startDepth,!!e.isPivot,i),i},_bindGetBoundFunction:function(){this.boundMap?this._getBound=this._getBoundFromBoundMap:this._getBound=this._getBoundFromGroupBounds},_bindGetColorFunction:function(){this.colorSpectrum?this._getColor=this._getColorFromSpectrum:this.zoomable?this._getColor=this._getColorFromColorsWhenZoomable:this._getColor=this._getColorFromColors},_getBoundFromGroupBounds:function(t){return this.groupBounds[t.groupIndex][t.index].end},_getBoundFromBoundMap:function(t){return this.boundMap[t.id]},_getColorFromSpectrum:function(t){var e;return e=t.hasChild?"none":this.colorSpectrum.getColor(t.colorRatio||t.ratio)||this.chartBackground},_getColorFromColors:function(t){return t.hasChild?"none":this.theme.colors[t.group]},_getColorFromColorsWhenZoomable:function(t,e){return t.depth===e?this.theme.colors[t.group]:"none"},_renderRect:function(t,e,i){return n.renderRect(this.paper,t,{fill:e,stroke:this.borderColor,"stroke-width":i})},_getStrokeWidth:function(t,e){var i;return i=this.borderWidth?this.borderWidth:o.isExisty(t)?Math.max(r,s-(t-e)):r},_renderBoxes:function(t,e,i,n){var o,a=this;return o=this.colorSpectrum||!this.zoomable?function(t){t.toBack()}:function(){},t.map(function(t,i){return t.map(function(t,r){var s,h,l=null,c=a._getStrokeWidth(t.depth,e);return t.groupIndex=i,t.index=r,s=a._getBound(t),s&&(h=a._getColor(t,e),l={rect:a._renderRect(s,h,c),seriesItem:t,color:h},o(l.rect),n&&n.push(l.rect)),l})},i)},_animateChangingColor:function(t,e,i){var n={"fill-opacity":o.isExisty(i)?i:1};e&&(n.fill=e),t.animate(n,a,">")},showAnimation:function(t,e,i){var n,a=this.boxesSet[t.groupIndex][t.index];a&&(e=!!o.isUndefined(e)||e,n=e?this.theme.overColor:a.color,a.seriesItem.hasChild&&(e&&a.rect.attr({"fill-opacity":0}),a.rect.toFront()),this._animateChangingColor(a.rect,n,i))},hideAnimation:function(t,e){var i,n=this.colorSpectrum,o=this.boxesSet[t.groupIndex][t.index],r=1,s=o.rect.paper;o&&(o.seriesItem.hasChild?(i=null,e&&(r=0)):i=o.color,this._animateChangingColor(o.rect,i,r),setTimeout(function(){!n&&o.seriesItem.hasChild&&(o.rect.toBack(),s.pushDownBackgroundToBottom())},a))},resize:function(t){var e=this,i=t.dimension;this.boundMap=t.boundMap,this.groupBounds=t.groupBounds,this.paper.setSize(i.width,i.height),n.forEach2dArray(this.boxesSet,function(t,i,o){var a;t&&(a=e._getBound(t.seriesItem,i,o),a&&n.updateRectBound(t.rect,a))})},renderSeriesLabel:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily, -"font-weight":a.fontWeight,fill:a.color,opacity:0};return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var h=n.renderText(t,e[a][o].end,i,s);h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),r.push(h)})}),r},renderSeriesLabelForTreemap:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0};return o.forEach(i,function(i,o){var a=n.renderText(t,e[o],i,s);a.node.style.userSelect="none",a.node.style.cursor="default",a.node.setAttribute("filter","url(#glow)"),r.push(a)}),r}});t.exports=h},function(t,e,i){"use strict";function n(t,e,i){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.id=i,e.forEach(function(t){a.append(n,t.node)}),t.canvas.appendChild(n),n}var o=i(5),a=i(9),r=i(6),s=r.browser,h=s.msie&&s.version<=8,l="gray",c=100,u="tui-chart-series-group",d=r.defineClass({render:function(t,e){var i=e.mapModel.getMapDimension();this.ratio=this._getDimensionRatio(e.layout.dimension,i),this.dimension=e.layout.dimension,this.position=e.layout.position,this.paper=t,this.sectorSet=t.set(),this.sectors=this._renderMap(e,this.ratio),h||(this.g=n(t,this.sectorSet,u)),this.overColor=e.theme.overColor},_getDimensionRatio:function(t,e){return Math.min(t.height/e.height,t.width/e.width)},_renderMap:function(t,e){var i=this.sectorSet,n=t.layout.position,a=this.paper,s=t.colorSpectrum;return r.map(t.mapModel.getMapData(),function(t,r){var h=t.ratio||0,c=s.getColor(h),u=o.renderArea(a,t.path,{fill:c,opacity:1,stroke:l,"stroke-opacity":1,transform:"s"+e+","+e+",0,0t"+n.left/e+","+n.top/e});return u.data("index",r),i.push(u),{sector:u,color:c,ratio:t.ratio}})},findSectorIndex:function(t){var e=this.paper.getElementByPoint(t.left,t.top),i=e&&e.data("index"),n=!r.isUndefined(i)&&this.sectors[i];return n&&!r.isUndefined(n.ratio)?i:null},changeColor:function(t){var e=this.sectors[t];e.sector.animate({fill:this.overColor},c,">")},restoreColor:function(t){var e=this.sectors[t];e.sector.animate({fill:e.color},c,">")},scaleMapPaths:function(t,e,i,n,o){var a,r,s=this.g.transform.baseVal,h=this.paper.canvas.createSVGTransform(),l=this.paper.canvas.createSVGMatrix(),c=this.paper.raphael.matrix(),u=s.numberOfItems?s.getItem(0).matrix:{a:1,b:0,c:0,d:1,e:0,f:0},d=o.width-this.dimension.width,p=o.height-this.dimension.height,f=u.e/u.a,m=u.f/u.d,g=-d/u.a,_=-p/u.d;c.scale(t,t,e.left*i-f*t,e.top*i-m*t),a=c.e/c.a+f,r=c.f/c.d+m,a>=0?c.e=-f*c.a:a=0?c.f=-m*c.a:r<_&&(c.f=_-m),l.a=c.a,l.b=c.b,l.c=c.c,l.d=c.d,l.e=c.e,l.f=c.f,h.setMatrix(l),s.appendItem(h),s.initialize(s.consolidate())},moveMapPaths:function(t,e){var i,n,o,a,r=this.paper.canvas.createSVGMatrix(),s=this.paper.raphael.matrix(),h=this.g.transform.baseVal,l=this.paper.canvas.createSVGTransform(),c=e.width-this.dimension.width,u=e.height-this.dimension.height,d=h.numberOfItems?h.getItem(0).matrix:{a:1,b:0,c:0,d:1,e:0,f:0};s.translate(t.x,t.y),o=s.e/s.a,a=s.f/s.d,i=o+d.e/d.a,n=a+d.f/d.d,i>=0&&o>0?s.e=0:i<0&&i<-c/d.a&&o<0&&(s.e=0),n>=0&&a>0?s.f=0:n<0&&n<-u/d.d&&a<0&&(s.f=0),r.a=s.a,r.b=s.b,r.c=s.c,r.d=s.d,r.e=s.e,r.f=s.f,l.setMatrix(r),h.appendItem(l),h.initialize(h.consolidate())},renderSeriesLabels:function(t,e,i){var n={"font-size":i.fontSize,"font-family":i.fontFamily,"font-weight":i.fontWeight,fill:i.color,"text-anchor":"middle",opacity:0,transform:"s"+this.ratio+","+this.ratio+",0,0t"+this.position.left/this.ratio+","+this.position.top/this.ratio},a=t.set(),s=this;return r.forEach(e,function(e){var i=e.labelPosition,r=o.renderText(t,i,e.name||e.code,n);a.push(r),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),h||s.g.appendChild(r.node)}),a}});t.exports=d},function(t,e,i){"use strict";function n(){return a.LEGEND_ICON_WIDTH+a.LEGEND_LABEL_LEFT_PADDING}var o,a=i(8),r=i(5),s=i(10),h=i(6),l=.5;o=h.defineClass({init:function(){this._checkBoxWidth=0,this._checkBoxHeight=0,this._iconHeight=0,this._legendItemHeight=0,this._currentPageCount=1,this._showCheckbox=!0},_renderLegendItems:function(t){var e=this,i=a.LEGEND_LABEL_LEFT_PADDING,n=h.extend({},this.basePosition);h.forEach(t,function(t,o){var r=t.index,s=t.colorByPoint?"#aaa":t.theme.color,h=t.isUnselected,l=t.labelHeight,c=t.checkbox,u=n.left+e._calculateSingleLegendWidth(r),d=u>=e.paper.width;e.isHorizontal&&d&&(n.top+=e._legendItemHeight+a.LABEL_PADDING_TOP,n.left=e.basePosition.left),e._showCheckbox&&(e._renderCheckbox(n,{isChecked:c.checked,legendIndex:r,legendSet:e.legendSet}),n.left+=e._checkBoxWidth+i),e._renderIcon(n,{legendColor:s,iconType:t.iconType,labelHeight:l,isUnselected:h,legendIndex:r,legendSet:e.legendSet}),n.left+=a.LEGEND_ICON_WIDTH+i,e._renderLabel(n,{labelText:t.label,labelHeight:l,isUnselected:h,legendIndex:r,legendSet:e.legendSet}),e.isHorizontal?n.left+=e.labelWidths[o]+i:(n.left=e.basePosition.left,n.top+=e._legendItemHeight+a.LINE_MARGIN_TOP)})},_getLegendData:function(t,e){var i,n,o,r=this.basePosition.top,s=this.dimension.height,h=this.paper.height,l=t;return!this.isHorizontal&&s+2*r>h&&(i=h-2*r,this._legendItemHeight=Math.max(t[0].labelHeight,a.LEGEND_ICON_HEIGHT),n=this._legendItemHeight+a.LINE_MARGIN_TOP,o=Math.floor(i/n),l=t.slice((e-1)*o,e*o)),l},render:function(t){var e,i;return this.eventBus=t.eventBus,this.paper=t.paper,this.dimension=t.dimension,this.legendSet=this.paper.set(),this.labelWidths=t.labelWidths,this.labelTheme=t.labelTheme,this.basePosition=t.position,this.isHorizontal=t.isHorizontal,this.originalLegendData=t.legendData,this.originalLegendData.length&&(this._showCheckbox=h.isExisty(t.legendData[0].checkbox),this._setComponentDimensionsBaseOnLabelHeight(t.legendData[0].labelHeight),t.dimension.width=this._calculateLegendWidth(t.legendData[0].labelHeight),e=this._getLegendData(t.legendData,this._currentPageCount),this._renderLegendItems(e),!this.isHorizontal&&e&&e.length1&&(i._paginateLegendAreaTo("previous"),i._currentPageCount-=1)}),this.lowerButton.click(function(){i._currentPageCounti&&(n=i),n+a.LEGEND_AREA_PADDING})},getRenderedLabelHeight:function(t,e){return r.getRenderedTextSize(t,e.fontSize,e.fontFamily).height},_renderLabel:function(t,e){var i=this.eventBus,n=this.labelTheme,o={left:t.left,top:t.top+this._iconHeight/2},a={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,opacity:e.isUnselected?l:1,"text-anchor":"start"},s=r.renderText(this.paper,o,e.labelText,a);s.data("index",e.legendIndex),s.node.style.userSelect="none",s.node.style.cursor="pointer",e.legendSet.push(s),s.click(function(){i.fire("labelClicked",e.legendIndex)})},_renderCheckbox:function(t,e){var i,n=this,o=t.left,a=t.top+(this._legendItemHeight-this._checkBoxHeight)/2,r="M"+(.3*this._checkBoxWidth+o)+","+(.5*this._checkBoxHeight+a)+"L"+(.5*this._checkBoxWidth+o)+","+(.7*this._checkBoxHeight+a)+"L"+(.8*this._checkBoxWidth+o)+","+(.2*this._checkBoxHeight+a);i=this.paper.set(),i.push(this.paper.rect(o,a,this._checkBoxWidth,this._checkBoxHeight,2).attr({fill:"#fff"})),e.isChecked&&i.push(this.paper.path(r)),i.data("index",e.legendIndex),i.click(function(){n.eventBus.fire("checkboxClicked",e.legendIndex)}),i.forEach(function(t){e.legendSet.push(t)})},_renderIcon:function(t,e){var i,n,o=this;this.paper.setStart(),"line"===e.iconType?(n="M"+t.left+","+(t.top+this._legendItemHeight/2)+"H"+(t.left+a.LEGEND_ICON_WIDTH),i=r.renderLine(this.paper,n,e.legendColor,3),i.attr("stroke-opacity",e.isUnselected?l:1)):i=r.renderRect(this.paper,{left:t.left,top:t.top,width:a.LEGEND_ICON_WIDTH,height:this._iconHeight},{"stroke-width":0,fill:e.legendColor,opacity:e.isUnselected?l:1}),i.data("icon",e.iconType),i.data("index",e.legendIndex),i.click(function(){o.eventBus.fire("labelClicked",e.legendIndex)}),e.legendSet.push(i)},selectLegend:function(t,e){e.forEach(function(e){var i=e.data("index"),n="line"===e.data("icon")?"stroke-opacity":"opacity";h.isNull(i)||h.isUndefined(i)?e.attr(n,1):h.isUndefined(i)||(h.isNumber(t)&&i!==t?e.attr(n,l):e.attr(n,1))})},_getCheckboxWidth:function(){return this._showCheckbox?this._checkBoxWidth+a.LEGEND_LABEL_LEFT_PADDING:0},_getLabelWidth:function(t){var e;return e=t?this.labelWidths[t]||0:s.max(this.labelWidths),e+a.LEGEND_LABEL_LEFT_PADDING},_calculateLegendWidth:function(){return this._calculateSingleLegendWidth()},_calculateSingleLegendWidth:function(t){return a.LEGEND_AREA_PADDING+this._getCheckboxWidth()+n()+this._getLabelWidth(t)+a.LEGEND_AREA_PADDING},_setComponentDimensionsBaseOnLabelHeight:function(t){this._legendItemHeight=Math.max(t,a.LEGEND_ICON_HEIGHT),this._iconHeight=this._legendItemHeight,this._checkBoxWidth=this._checkBoxHeight=t}}),t.exports=o},function(t,e,i){"use strict";var n=i(5),o=i(8),a=i(6),r=o.LEGEND_AREA_PADDING,s=360,h=270,l=35,c=15,u=3,d=a.defineClass({render:function(t,e,i,n,o){var a;e.position.left+=2*r,e.position.top+=r,a=this._renderGradientBar(t,e,i,n),o.push(a),this.wedge=this._renderWedge(t,e.position),o.push(this.wedge),this.gradientBar=a},renderTicksAndLabels:function(t,e,i,o,r){a.forEach(i,function(i,s){var h=e.step*s,u=a.extend({},e.position),d="M";o?(u.left+=h,d+=u.left+","+(u.top-l)+"V"+(u.top-l+c)):(u.top+=h,d+=u.left-l+","+u.top+"H"+(u.left-l+c)),r.push(n.renderLine(t,d,"#ccc",1)),r.push(n.renderText(t,u,i))})},_renderGradientBar:function(t,e,i,o){var a,l,c=e.dimension.height,u=e.position.left;return o?(c-=r,a=s,this._makeWedghPath=this._makeHorizontalWedgePath):(a=h,this._makeWedghPath=this._makeVerticalWedgePath),l={left:u,top:e.position.top,width:e.dimension.width-r,height:c},n.renderRect(t,l,{fill:a+"-"+i.start+"-"+i.end,stroke:"none"})},_renderWedge:function(t,e){return t.path(this.verticalBasePath).attr({fill:"gray",stroke:"none",opacity:0,transform:"t"+e.left+","+e.top})},verticalBasePath:["M",16,6,"L",24,3,"L",24,9],_makeVerticalWedgePath:function(t){var e=this.verticalBasePath;return e[2]=t,e[5]=t-u,e[8]=t+u,e},horizontalBasePath:["M",5,16,"L",8,24,"L",2,24],_makeHorizontalWedgePath:function(t){var e=this.horizontalBasePath;return e[1]=t,e[4]=t+u,e[7]=t-u,e},showWedge:function(t){var e=this._makeWedghPath(t);this.wedge.attr({path:e,opacity:1})},hideWedge:function(){this.wedge.attr({opacity:0})},removeLocationURLFromFillAttribute:function(){var t=this.gradientBar,e=t.node.getAttribute("fill");this.locationURL=/url\('?([^#]+)#[^#]+'?\)/.exec(e)[1],t.node.setAttribute("fill",e.replace(this.locationURL,""))},restoreLocationURLToFillAttribute:function(){var t=this.gradientBar,e=t.node.getAttribute("fill");t.node.setAttribute("fill",e.replace("#",this.locationURL+"#"))}});t.exports=d},function(t,e,i){"use strict";var n=i(5),o=i(6),a=o.defineClass({render:function(t,e,i,a,r){var s=e.position.left+e.dimension.width/2,h=t.set();return o.forEachArray(a,function(o,a){var l=i*o,c=e.position.top+e.dimension.height-l,u=n.renderCircle(t,{left:s,top:c},l,{fill:"none",opacity:1,stroke:"#888","stroke-width":1});h.push(u),h.push(n.renderText(t,{left:s,top:c-l-5},r[a]))}),h}});t.exports=a},function(t,e,i){"use strict";var n=i(5),o=i(8),a=i(6),r=a.defineClass({render:function(t,e,i,a){var r=a.fontSize,s=a.fontFamily,h=n.getRenderedTextSize(e,r,s),l={left:t.width/2,top:(h.height+o.TITLE_PADDING)/2},c=t.set();return i&&(i.x?l.left+=i.x:i.y&&(l.top+=i.y)),c.push(n.renderText(t,l,e,{"font-family":a.fontFamily,"font-size":a.fontSize,"font-weight":a.fontWeight,fill:a.color,"text-anchor":"middle"})),c},resize:function(t,e){e.attr({x:t/2})}});t.exports=r},function(t,e,i){"use strict";function n(t,e){var i=h.getRenderedTextSize(t,e.fontSize,e.fontFamily);return i.height}function o(t){return!c.isExisty(t.rotateTitle)||t.rotateTitle===!0}function a(t,e,i){var n=t?e.height:e.width,o=t?i.top:i.left;return n/2+o}function r(t,e){e&&(e.x&&(t.left+=e.x),e.y&&(t.top+=e.y))}function s(t,e){var i="none";return t.isPositionRight?i="r90,"+e.left+","+e.top:t.isVertical&&o(t)&&(i="r-90,"+e.left+","+e.top),i}var h=i(5),l=4,c=i(6),u=c.defineClass({init:function(){this.ticks=[]},renderBackground:function(t,e,i,n){var o=n&&n.background||{},a=o.color||"#fff",r=o.opacity||1;return h.renderRect(t,{left:0,top:e.top,width:i.width+e.left-l,height:i.height},{fill:a,opacity:r,"stroke-width":0})},renderTitle:function(t,e){var i,n=e.theme,o={"dominant-baseline":"auto","font-family":n.fontFamily,"font-size":n.fontSize,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle"},a=this.calculatePosition(t,e);o.transform=s(e.rotationInfo,a),i=h.renderText(t,a,e.text,o),i.node.style.userSelect="none",i.node.style.cursor="default",e.set.push(i)},renderLabel:function(t){var e,i=t.positionTopAndLeft,n=t.labelText,o=t.paper,a=t.isVertical,r=t.isPositionRight,s=t.theme,l={"dominant-baseline":"central","font-family":s.fontFamily,"font-size":s.fontSize,"font-weight":s.fontWeight,fill:s.color};r?l["text-anchor"]="start":a?l["text-anchor"]="end":l["text-anchor"]="middle",e=h.renderText(o,i,n,l),e.node.style.userSelect="none",e.node.style.cursor="default",t.set.push(e),this.ticks.push(e)},renderRotatedLabel:function(t){var e=t.positionTopAndLeft,i=t.labelText,n=t.paper,o=t.theme,a=h.renderText(n,e,i,{"dominant-baseline":"central","font-family":o.fontFamily,"font-size":o.fontSize,"font-weight":o.fontWeight,fill:o.color,"text-anchor":"end",transform:"r"+-t.degree+","+(e.left+20)+","+e.top});a.node.style.userSelect="none",a.node.style.cursor="arrow",t.set.push(a),this.ticks.push(a)},renderTicks:function(t){var e,i=this,n=t.paper,o=t.positions,a=t.additionalSize,r=t.isVertical,s=t.isCenter,h=t.isPositionRight,l=t.tickColor,u=t.layout,d=u.position.left+u.dimension.width,p=u.position.top,f=u.position.left,m=function(t){var e=r?"height":"width";return t>u.dimension[e]};c.forEach(o,function(o){var c="M";o+=a,m(o)||(r?s?(c+=f+","+(p+o),c+="H"+(f+5),c+="M"+d+","+(p+o),c+="H"+(d-5)):h?(c+=f+","+(p+o),c+="H"+(f+5)):(c+=d+","+(p+o),c+="H"+(d-5)):(c+=f+o+","+p,c+="V"+(p+5)),isNaN(o)||(e=n.path(c).attr({stroke:l}),t.set.push(e),i.ticks.push(e)))})},renderTickLine:function(t){var e,i,n,o=t.areaSize,a=o,r=t.paper,s=t.layout,h=t.isNotDividedXAxis,l=t.additionalSize,c=t.isPositionRight,u=t.isCenter,d=t.isVertical,p=t.tickColor,f="M",m=s.position.top,g=s.position.left,_=s.dimension.height+m,T=g+s.dimension.width;c?(f+=g+","+m,f+="V"+_):d?(e=m,f+=T+","+e,u?(f+="V"+_,f+="M"+g+","+e,f+="V"+_):(n=m+a,f+="V"+n)):(f+=h?g:g+l,f+=","+m+"H",i=g+a,h||(i+=l),f+=i),t.set.push(r.path(f).attr({"stroke-width":1,stroke:p}))},animateForAddingData:function(t){c.forEach(this.ticks,function(e){e.animate({transform:"t-"+t+",0"},300)})},calculatePosition:function(t,e){var i=e.rotationInfo,o=n(e.text,e.theme),s=e.layout,h=a(i.isVertical,s.dimension,s.position),l={};return i.isCenter?(l.top=t.height-o/2,l.left=s.position.left+s.dimension.width/2):i.isPositionRight?(l.top=h,l.left=s.position.left+s.dimension.width):i.isVertical?(l.top=h,l.left=s.position.left+o/2):(l.top=s.position.top+s.dimension.height,l.left=h),i.isCenter||r(l,e.offset),l}});t.exports=u},function(t,e,i){"use strict";var n=i(5),o=i(10),a=i(6),r=8,s=3,h=a.defineClass({render:function(t){var e=t.paper.set();return this.paper=t.paper,this.layout=t.layout,this.plotPositions=t.plotPositions,this.theme=t.theme,this.options=t.options,this.labelData=t.labelData,this._renderPlot(e),this._renderLabels(e),e.toBack(),this.paper.pushDownBackgroundToBottom(),e},_renderPlot:function(t){"circle"===this.options.type?this._renderCirclePlot(t):this._renderSpiderwebPlot(t),this._renderCatergoryLines(t)},_renderSpiderwebPlot:function(t){var e=this._getLinesPath(this.plotPositions);this._renderLines(e,this.theme.lineColor,t)},_renderCirclePlot:function(t){var e,i,o,a=this.plotPositions,r=a[0][0],s=this.theme.lineColor;for(e=1;e=a&&(r=0);return o},_setSeriesColors:function(t,e,i,n){var o,s,h,l,c=this,u=0;i=i||{},r.forEachArray(t,function(t){i[t]?(o=i[t].colors,h=!0):(o=i.colors||a.series.colors,h=!1),l=n[t],s=l&&l.length?l[0]&&l[0].data&&l[0].data.length?Math.max(l.length,l[0].data.length):l.length:0,e[t].colors=c._makeEachSeriesColors(o,s,!h&&u),h||(u=(s+u)%o.length)})},_initTheme:function(t,e,i,o){var r;return t!==n.DEFAULT_THEME_NAME?(r=JSON.parse(JSON.stringify(a)),this._overwriteTheme(e,r)):r=JSON.parse(JSON.stringify(e)),r.yAxis=this._createComponentThemeWithSeriesName(i,e.yAxis,r.yAxis,"yAxis"),r.series=this._createComponentThemeWithSeriesName(i,e.series,r.series,"series"),this._setSeriesColors(i,r.series,e.series,o),r},_createTargetThemesForFontInherit:function(t){var e=[t.title,t.xAxis.title,t.xAxis.label,t.legend.label,t.plot.label];return r.forEach(t.yAxis,function(t){e.push(t.title,t.label)}),r.forEach(t.series,function(t){e.push(t.label)}),e},_inheritThemeFont:function(t){var e=this._createTargetThemesForFontInherit(t),i=t.chart.fontFamily;r.forEachArray(e,function(t){t.fontFamily||(t.fontFamily=i)})},_copySeriesColorTheme:function(t,e,i){e[i]={colors:t.colors,borderColor:t.borderColor,selectionColor:t.selectionColor}},_copySeriesColorThemeToOther:function(t){var e=this;r.forEach(t.series,function(i,n){e._copySeriesColorTheme(i,t.legend,n),e._copySeriesColorTheme(i,t.tooltip,n)})},get:function(t,e,i){var n,o,a=s[t];if(!a)throw new Error("Not exist "+t+" theme.");return o=this._pickSeriesNames(e,i),n=this._initTheme(t,a,o,i),this._inheritThemeFont(n,o),this._copySeriesColorThemeToOther(n),n}}},function(t,e){"use strict";var i="#000000",n="#ffffff",o="normal",a="",r={tickColor:i,title:{fontSize:12,fontFamily:a,color:i,fontWeight:o},label:{fontSize:12,fontFamily:a,color:i,fontWeight:o}},s={chart:{background:{color:n,opacity:1},fontFamily:"Verdana"},title:{fontSize:18,fontFamily:a,color:i,fontWeight:o},yAxis:r,xAxis:r,plot:{lineColor:"#dddddd",background:"#ffffff",label:{fontSize:11,fontFamily:a,color:"#888"}},series:{label:{fontSize:11,fontFamily:a,color:i,fontWeight:o},colors:["#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],borderColor:a,borderWidth:a,selectionColor:a,startColor:"#F4F4F4",endColor:"#345391",overColor:"#F0C952",dot:{fillColor:a,fillOpacity:1,strokeColor:a,strokeOpacity:1,strokeWidth:2,radius:2,hover:{fillColor:a,fillOpacity:1,strokeColor:a,strokeOpacity:.8,strokeWidth:3,radius:4}}},legend:{label:{fontSize:12,fontFamily:a,color:i,fontWeight:o}},tooltip:{},chartExportMenu:{backgroundColor:"#fff",borderRadius:0,borderWidth:1,color:"#000"}};t.exports=s},function(t,e){"use strict";var i={};t.exports={get:function(t){var e=i[t];if(!e)throw new Error("Not exist "+t+" map.");return e},register:function(t,e){i[t]=e}}},function(t,e,i){"use strict";var n=i(6),o=function(t){var e;return n.isArray(t)?(e=[],n.forEachArray(t,function(t,i){e[i]=o(t)})):n.isFunction(t)||n.isDate(t)?e=t:n.isObject(t)?(e={},n.forEach(t,function(t,i){e[i]=o(t)})):e=t,e},a={deepCopy:o};t.exports=a},function(t,e,i){"use strict";function n(t){var e;return t.length>0&&(e={},e.categories=[],e.series=[],e.categories=t.shift().slice(1),s.forEach(t,function(t){var i={};i.name=t[0],i.data=t.slice(1),e.series.push(i)})),e}function o(t){var e=[],i=[],n=[];return t&&(e=s.toArray(t.getElementsByTagName("TR")),s.forEach(e,function(t,e){var n=0===e?"TH":"TD",o=s.toArray(t.getElementsByTagName(n)),a=s.pluck(o,"innerText");i.push(a)}),i[0].length1,e=r.isYAxisAlignCenter(this.hasRightYAxis,t.yAxis.align),t.yAxis.isCenter=e,t.xAxis.divided=e,t.series.divided=e,t.plot.divided=e)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("barSeries","barSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){return{xAxis:!0}},onChangeCheckedLegends:function(t){var e;this.hasRightYAxis&&(e={optionChartTypes:["bar","bar"]}),n.prototype.onChangeCheckedLegends.call(this,t,null,e)},addDataRatios:function(t){var e=this.options.series||{},i=this.chartType,n=(e[i]||e).stackType;this.dataProcessor.addDataRatios(t[i],n,i)}});t.exports=h},function(t,e,i){ -"use strict";var n=i(8),o=i(42),a=i(99),r=i(30),s=i(9),h=i(7),l=i(109),c=i(11),u=i(6),d=u.defineClass({init:function(t){this.theme=t.theme,this._initializeOptions(t.options),this.chartType=this.options.chartType,this.hasAxes=t.hasAxes,this.isVertical=!!t.isVertical,this.dataProcessor=this._createDataProcessor(t),this.eventBus=new u.CustomEvents,this.prevXAxisData=null,this.componentManager=this._createComponentManager(),this.addComponents(),this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on("changeCheckedLegends",this.onChangeCheckedLegends,this),this.onZoom&&this.eventBus.on({zoom:this.onZoom,resetZoom:this.onResetZoom},this)},_setOffsetProperty:function(t,e,i){u.isExisty(t[e])&&(t.offset=t.offset||{},t.offset[i]=t[e],delete t[e])},_initializeOffset:function(t){t&&(this._setOffsetProperty(t,"offsetX","x"),this._setOffsetProperty(t,"offsetY","y"))},_initializeTitleOptions:function(t){var e,i=this;t&&(e=u.isArray(t)?t:[t],u.forEachArray(e,function(t){var e=t.title;u.isString(e)&&(t.title={text:e}),i._initializeOffset(t.title)}))},_initializeTooltipOptions:function(t){var e=t.position;t.grouped=!!t.grouped,this._initializeOffset(t),!t.offset&&e&&(t.offset={x:e.left,y:e.top}),delete t.position},_initializeOptions:function(t){t.chartTypes=this.charTypes,t.xAxis=t.xAxis||{},t.series=t.series||{},t.tooltip=t.tooltip||{},t.legend=t.legend||{},t.chartExportMenu=t.chartExportMenu||{},this._initializeTitleOptions(t.chart),this._initializeTitleOptions(t.xAxis),this._initializeTitleOptions(t.yAxis),u.isUndefined(t.legend.visible)&&(t.legend.visible=!0),u.isUndefined(t.chartExportMenu.visible)&&(t.chartExportMenu.visible=!0),this._initializeTooltipOptions(t.tooltip),this.options=t},_createDataProcessor:function(t){var e,i;return e=t.DataProcessor||a,i=new e(t.rawData,this.chartType,t.options,this.seriesTypes)},_createComponentManager:function(){return new o({options:this.options,theme:this.theme,dataProcessor:this.dataProcessor,hasAxes:this.hasAxes,eventBus:this.eventBus,isVertical:this.isVertical,seriesTypes:this.seriesTypes||[this.chartType]})},addComponents:function(){},getScaleOption:function(){},_buildBoundsAndScaleData:function(t,e){return l.build(this.dataProcessor,this.componentManager,{chartType:this.chartType,seriesTypes:this.seriesTypes,options:this.options,theme:this.theme,hasAxes:this.hasAxes,scaleOption:this.getScaleOption(),isVertical:this.isVertical,hasRightYAxis:this.hasRightYAxis,addedDataCount:this._dynamicDataHelper?this._dynamicDataHelper.addedDataCount:null,prevXAxisData:t,addingDataMode:e})},addDataRatios:function(){},readyForRender:function(t){var e=this._buildBoundsAndScaleData(this.prevXAxisData,t);return e.axisDataMap.xAxis&&(this.prevXAxisData=e.axisDataMap.xAxis),this.addDataRatios(e.limitMap),e},render:function(t){var e,i=s.create("DIV","tui-chart "+this.className),o=this.componentManager,a=this.dataProcessor,l=a.getLegendVisibility(),c=r.filterCheckedRawData(a.rawData,l),u=o.drawingToolPicker.getPaper(i,n.COMPONENT_TYPE_RAPHAEL);this.dataProcessor.initData(c),u.changeChartBackgroundColor(this.theme.chart.background.color),u.changeChartBackgroundOpacity(this.theme.chart.background.opacity),h.renderFontFamily(i,this.theme.chart.fontFamily),s.append(t,i),e=this.readyForRender(),h.renderDimension(i,e.dimensionMap.chart),o.render("render",e,{checkedLegends:l},i),this.chartContainer=i,this.paper=u},rerender:function(t,e){var i,n=this.dataProcessor;e||(e=r.filterCheckedRawData(n.getZoomedRawData(),t)),this.dataProcessor.initData(e),i=this.readyForRender(),this.componentManager.render("rerender",i,{checkedLegends:t},this.chartContainer)},onChangeCheckedLegends:function(t,e,i){this.rerender(t,e,i)},animateChart:function(){this.componentManager.execute("animateComponent")},on:function(t,e){n.PUBLIC_EVENT_MAP[t]&&this.eventBus.on(n.PUBLIC_EVENT_PREFIX+t,e)},off:function(t,e){n.PUBLIC_EVENT_MAP[t]&&this.eventBus.off(n.PUBLIC_EVENT_PREFIX+t,e)},_updateChartDimension:function(t){var e=!1,i=this.options;return i.chart=i.chart||{},t.width&&t.width>0&&i.chart.width!==t.width&&(i.chart.width=t.width,e=!0),t.height&&t.height>0&&i.chart.height!==t.height&&(i.chart.height=t.height,e=!0),e},resize:function(t){var e,i,n;t&&(e=this._updateChartDimension(t),e&&(i=this.readyForRender(),n=i.dimensionMap.chart,h.renderDimension(this.chartContainer,n),this.paper.resizeBackground(n.width,n.height),this.componentManager.render("resize",i)))},setTooltipAlign:function(t){this.componentManager.get("tooltip").setAlign(t)},setTooltipOffset:function(t){this.componentManager.get("tooltip").setOffset(t)},setTooltipPosition:function(t){this.componentManager.get("tooltip").setPosition(t)},resetTooltipAlign:function(){this.componentManager.get("tooltip").resetAlign()},resetTooltipOffset:function(){this.componentManager.get("tooltip").resetOffset()},resetTooltipPosition:function(){this.resetTooltipOffset()},showSeriesLabel:function(){var t=this.componentManager.where({componentType:"series"});u.forEachArray(t,function(t){t.showLabel()})},hideSeriesLabel:function(){var t=this.componentManager.where({componentType:"series"});u.forEachArray(t,function(t){t.hideLabel()})},addData:function(){},addPlotLine:function(){},addPlotBand:function(){},removePlotLine:function(){},removePlotBand:function(){},_getSeriesData:function(t,e,i){var n={index:t,seriesIndex:e,outlierIndex:i};return e<0?null:this.componentManager.get("mouseEventDetector").findDataByIndexes(n)},_findSeriesIndexByLabel:function(t,e){for(var i=this.dataProcessor.getLegendLabels(t),n=-1,o=0,a=i?i.length:0;o=0||!t&&e.prevFoundData)&&e._hideTooltip({silent:!0}))}});t.exports=d},function(t,e,i){"use strict";var n=i(8),o=i(9),a=i(43),r=i(45),s=i(46),h=i(47),l=i(49),c=i(37),u=i(55),d=i(57),p=i(58),f=i(59),m=i(65),g=i(67),_=i(68),T=i(72),v=i(79),x=i(83),y=i(84),A=i(86),D=i(87),E=i(88),C=i(90),L=i(91),S=i(92),M=i(93),P=i(94),b=i(96),k=i(97),R=i(6),I={axis:a,plot:r,radialPlot:h,legend:u,spectrumLegend:d,circleLegend:p,tooltip:f,groupTooltip:m,mapChartTooltip:g,mapChartEventDetector:_,mouseEventDetector:T,barSeries:v,columnSeries:x,lineSeries:y,radialSeries:A,areaSeries:D,bubbleSeries:E,scatterSeries:C,mapSeries:L,pieSeries:S,heatmapSeries:M,treemapSeries:P,boxplotSeries:b,zoom:k,chartExportMenu:l,title:s},w=R.defineClass({init:function(t){var e=t.options.chart,i=R.pick(e,"width")||n.CHART_DEFAULT_WIDTH,o=R.pick(e,"height")||n.CHART_DEFAULT_HEIGHT;this.components=[],this.componentMap={},this.theme=t.theme||{},this.options=t.options||{},this.dataProcessor=t.dataProcessor,this.hasAxes=t.hasAxes,this.isVertical=t.isVertical,this.eventBus=t.eventBus,this.drawingToolPicker=new c,this.drawingToolPicker.initDimension({width:i,height:o}),this.seriesTypes=t.seriesTypes},_makeComponentOptions:function(t,e,i,n){return t=t||this.options[e],t=R.isArray(t)?t[n]:t||{}},register:function(t,e,i){var n,o,a,r,s;i=i||{},i.name=t,n=i.index||0,r=I[e],a=r.componentType,i.chartTheme=this.theme,i.chartOptions=this.options,i.seriesTypes=this.seriesTypes,s="axis"===a?t:a,i.theme=this.theme[s],i.options=this.options[s],i.theme||"rightYAxis"!==s||(i.theme=this.theme.yAxis),i.options||"rightYAxis"!==s||(i.options=this.options.yAxis),"series"===s&&R.forEach(this.seriesTypes,function(e){return 0!==t.indexOf(e)||(i.options=i.options[e]||i.options,i.theme=i.theme[e],R.isArray(i.options)&&(i.options=i.options[n]||{}),!1)}),i.dataProcessor=this.dataProcessor,i.hasAxes=this.hasAxes,i.isVertical=this.isVertical,i.eventBus=this.eventBus,i.alternativeModel=this.alternativeModel,o=r(i),o&&(o.componentName=t,o.componentType=a,this.components.push(o),this.componentMap[t]=o)},_makeDataForRendering:function(t,e,i,n,o){var a=R.extend({paper:i},o);return n&&(R.extend(a,n),a.layout={dimension:a.dimensionMap[t]||a.dimensionMap[e],position:a.positionMap[t]||a.positionMap[e]}),a},render:function(t,e,i,n){var a,r,s=this,h=R.map(this.components,function(o){var h,l,c,u=null;return o[t]&&(a=o.componentName,r=o.componentType,c=s.drawingToolPicker.getPaper(n,o.drawingType),h=s._makeDataForRendering(a,r,c,e,i),l=o[t](h),l&&!l.paper&&(u=l)),u});n&&o.append(n,h)},where:function(t){return R.filter(this.components,function(e){var i=!0;return R.forEach(t,function(t,n){return e[n]!==t&&(i=!1),i}),i})},execute:function(t){var e=Array.prototype.slice.call(arguments,1);R.forEachArray(this.components,function(i){i[t]&&i[t].apply(i,e)})},get:function(t){return this.componentMap[t]},has:function(t){return!!this.get(t)}});t.exports=w},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.chartType,i=t.name;return t.isYAxis="yAxis"===i||"rightYAxis"===i,t.shifting=t.chartOptions.series.shifting,"combo"===e?t.isYAxis?t.theme=t.theme[t.seriesTypes[0]]:"rightYAxis"===i&&(t.componentType="yAxis",t.theme=t.theme[t.seriesTypes[1]],t.index=1):t.isYAxis?t.theme=t.theme[e]:t.theme=t.theme,new c(t)}var o=i(8),a=i(11),r=i(44),s=i(31),h=i(7),l=i(6),c=l.defineClass({init:function(t){this.className="tui-chart-axis-area",this.dataProcessor=t.dataProcessor,this.options=t.options||{},this.theme=l.extend({},t.theme,{background:t.chartTheme.chart.background}),this.isLabelAxis=!1,this.isYAxis=t.isYAxis,this.shifting=t.shifting,this.data={},this.layout=null,this.dimensionMap=null,this.axisDataMap=null,this.graphRenderer=s.get(o.COMPONENT_TYPE_RAPHAEL,"axis"),this.drawingType=o.COMPONENT_TYPE_RAPHAEL,this.paperAdditionalWidth=0,this.paperAdditionalHeight=0,this._elBg=null},_renderBackground:function(){var t=l.extend({},this.layout.dimension),e=l.extend({},this.layout.position);this.isYAxis&&(t.height=this.dimensionMap.chart.height,e.top=0),this._elBg&&this._elBg.remove(),this._elBg=this.graphRenderer.renderBackground(this.paper,e,t,this.theme.background)},_renderChildContainers:function(t,e,i,n){var o=this.isYAxis&&this.data.aligned;this.isYAxis&&!this.data.isPositionRight&&!this.options.isCenter&&this.shifting&&this._renderBackground(),this._renderTitleArea(),this._renderLabelArea(t,e,i,n),o||this._renderTickArea(t,e,n)},_renderDividedAxis:function(t){var e=this.data,i=Math.round(t.width/2),n=t.width-i-1,o=e.tickCount,a=parseInt(o/2,10)+1,r=e.labels,s=r.slice(0,a),h=r.slice(a-1,o),l=i/a,c=i+this.dimensionMap.yAxis.width-1;this.paperAdditionalWidth=l,this._renderChildContainers(i,a,s,0),this._renderChildContainers(n+1,a,h,c)},_renderNotDividedAxis:function(t){var e=this.data,i=this.isYAxis,n=i?t.height:t.width,o=0;e.positionRatio&&(o=n*e.positionRatio),this._renderChildContainers(n,e.tickCount,e.labels,o)},_renderAxisArea:function(){var t=this.layout.dimension,e=this.data;this.isLabelAxis=e.isLabelAxis,this.options.divided?(this.containerWidth=t.width+this.dimensionMap.yAxis.width,this._renderDividedAxis(t),t.width=this.containerWidth):(t.width+=this.options.isCenter?1:0,this._renderNotDividedAxis(t))},_setDataForRendering:function(t){this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.data=t.axisDataMap[this.componentName],this.options=this.data.options},render:function(t){this.paper=t.paper,this.axisSet=t.paper.set(),this._setDataForRendering(t),this._renderAxisArea()},rerender:function(t){this.axisSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},zoom:function(t){this.rerender(t)},_renderTitleArea:function(){var t=this.options.title||{};t.text&&this.graphRenderer.renderTitle(this.paper,{text:t.text,offset:t.offset,theme:this.theme.title,rotationInfo:{rotateTitle:this.options.rotateTitle,isVertical:this.isYAxis,isPositionRight:this.data.isPositionRight,isCenter:this.options.isCenter},layout:this.layout,set:this.axisSet})},_renderTickLine:function(t,e,i){this.graphRenderer.renderTickLine({areaSize:t,additionalSize:i,additionalWidth:this.paperAdditionalWidth,additionalHeight:this.paperAdditionalHeight,isPositionRight:this.data.isPositionRight,isCenter:this.data.options.isCenter,isNotDividedXAxis:e,isVertical:this.isYAxis,tickColor:this.theme.tickColor,layout:this.layout,paper:this.paper,set:this.axisSet})},_renderTicks:function(t,e,i,n){var o=this.theme.tickColor,a=this.data,s=a.sizeRatio||1,h=this.isYAxis,l=this.data.options.isCenter,c=this.data.isPositionRight,u=r.makeTickPixelPositions(t*s,e),d=this.paperAdditionalHeight+1,p=this.paperAdditionalWidth;u.length=a.tickCount,this.graphRenderer.renderTicks({paper:this.paper,layout:this.layout,positions:u,isVertical:h,isCenter:l,additionalSize:n,additionalWidth:p,additionalHeight:d,isPositionRight:c,tickColor:o,set:this.axisSet})},_renderTickArea:function(t,e,i){var n=!this.isYAxis&&!this.options.divided;this._renderTickLine(t,n,i||0),this._renderTicks(t,e,n,i||0)},_renderLabelArea:function(t,e,i,n){var o=this.data.sizeRatio||1,a=r.makeTickPixelPositions(t*o,e,0),s=a[1]-a[0];this._renderLabels(a,i,s,n||0)},_renderRotationLabels:function(t,e,i,n){var a=this,r=this.graphRenderer,s=this.isYAxis,h=this.theme.label,c=this.data.degree,u=i/2,d=this.layout.position.top+o.AXIS_LABEL_PADDING,p=this.layout.position.left,f=this.options.labelMargin||0;l.forEach(t,function(t,o){var l=t+(n||0),m={};s?(m.top=l+u,m.left=i+f):(m.top=d+f,m.left=p+l,a.isLabelAxis&&(m.left+=u)),r.renderRotatedLabel({degree:c,labelText:e[o],paper:a.paper,positionTopAndLeft:m,set:a.axisSet,theme:h})})},_renderNormalLabels:function(t,e,i,n){var r=this,s=this.graphRenderer,h=this.isYAxis,c=this.data.isPositionRight,u=this.isLabelAxis,d=this.theme.label,p=this.dataProcessor,f=a.isLineTypeChart(p.chartType,p.seriesTypes),m=f&&this.options.pointOnColumn,g=this.layout,_=this.options.labelMargin||0;l.forEach(t,function(t,a){var l,p,T=t+n,v=i/2,x={};h?(l=T,u?l+=v+g.position.top:l=g.dimension.height+g.position.top-l,p=c?g.position.left+o.AXIS_LABEL_PADDING+_:g.position.left+g.dimension.width-o.AXIS_LABEL_PADDING-_):(l=g.position.top+o.CHART_PADDING+o.AXIS_LABEL_PADDING+_,p=T+g.position.left,u&&(f&&!m||(p+=v))),x.top=Math.round(l),x.left=Math.round(p),s.renderLabel({isPositionRight:c,isVertical:h,labelSize:i,labelText:e[a],paper:r.paper,positionTopAndLeft:x,set:r.axisSet,theme:d})})},_renderLabels:function(t,e,i,n){var o,a=!this.isYAxis&&this.isLabelAxis&&this.options.rotateLabel===!1,r="xAxis"===this.componentName&&this.data.degree;o=a?this.data.multilineLabels:e,o.length&&(t.length=o.length),o=h.addPrefixSuffix(o,this.options.prefix,this.options.suffix),r?this._renderRotationLabels(t,o,i,n):this._renderNormalLabels(t,o,i,n)},animateForAddingData:function(t){this.isYAxis||this.graphRenderer.animateForAddingData(t.tickSize)}});n.componentType="axis",n.Axis=c,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=i(10),a=100,r={calculateLimit:function(t,e){var i,n=0,o={};return t<0&&(n=t,e-=t,t=0),i=(e-t)/20,o.max=e+i+n,e/6>t?o.min=n:o.min=t-i+n,o},makeTickPixelPositions:function(t,e,i){var o=[];return i=i||0,e>0&&(o=n.map(n.range(0,e),function(n){var o=0===n?0:n/(e-1);return o*t+i}),o[o.length-1]-=1),o},makeLabelsFromLimit:function(t,e){var i=r.findMultipleNum(e),o=Math.round(t.min*i),a=Math.round(t.max*i),s=n.range(o,a+1,e*i);return n.map(s,function(t){return t/i})},calculateStepFromLimit:function(t,e){return r.divide(r.subtract(t.max,t.min),e-1)},sumPlusValues:function(t){var e=n.filter(t,function(t){return t>0});return r.sum(e)},sumMinusValues:function(t){var e=n.filter(t,function(t){return t<0});return r.sum(e)},makePercentageValue:function(t,e){return t/e*a},calculateRatio:function(t,e,i,n){return(t-i)/e*n}},s=function(t){var e=String(t).split(".");return 2===e.length?e[1].length:0},h=function(){var t=[].slice.call(arguments),e=n.map(t,function(t){return r.getDecimalLength(t)}),i=o.max(e);return Math.pow(10,i)},l=function(t,e){var i,n=r.findMultipleNum(e);return i=1===n?t%e:t*n%(e*n)/n},c=function(t,e){var i=r.findMultipleNum(t,e);return(t*i+e*i)/i},u=function(t,e){var i=r.findMultipleNum(t,e);return(t*i-e*i)/i},d=function(t,e){var i=r.findMultipleNum(t,e);return t*i*(e*i)/(i*i)},p=function(t,e){var i=r.findMultipleNum(t,e);return t*i/(e*i)},f=function(t){var e=t.slice();return e.unshift(0),n.reduce(e,function(t,e){return r.add(parseFloat(t),parseFloat(e))})};r.getDecimalLength=s,r.findMultipleNum=h,r.mod=l,r.add=c,r.subtract=u,r.multiply=d,r.divide=p,r.sum=f,t.exports=r},function(t,e,i){"use strict";function n(t,e){return t.start-e.start}function o(t){var e=t.chartOptions.chartType,i=t.seriesTypes,n=t.chartOptions.xAxis.type;return t.chartType=e,t.chartTypes=i,t.xAxisTypeOption=n,new c(t)}var a=i(8),r=i(11),s=i(44),h=i(6),l=h.map,c=h.defineClass({init:function(t){this.className="tui-chart-plot-area",this.dataProcessor=t.dataProcessor,this.options=t.options||{},this.options.showLine=!!h.isUndefined(this.options.showLine)||this.options.showLine,this.options.lines=this.options.lines||[],this.options.bands=this.options.bands||[],this.xAxisTypeOption=t.xAxisTypeOption,this.theme=t.theme||{},this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.layout=null,this.axisDataMap=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL},_renderPlotArea:function(t){var e;e=this.layout.dimension,r.isLineTypeChart(this.chartType,this.chartTypes)&&this._renderOptionalLines(t,e),this.options.showLine&&this._renderPlotLines(t,e)},_setDataForRendering:function(t){t&&(this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.axisDataMap=t.axisDataMap,this.paper=t.paper)},render:function(t){var e=t&&t.paper||this.paper;this.plotSet=e.set(),this.additionalPlotSet=e.set(),this._setDataForRendering(t),this._renderPlotArea(this.paper),this.additionalPlotSet.toBack(),this.plotSet.toBack(),e.pushDownBackgroundToBottom()},rerender:function(t){this.additionalPlotSet.remove(),this.plotSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},zoom:function(t){this.rerender(t)},_makeVerticalLineTemplateParams:function(t){return h.extend({className:"vertical",positionType:"left",width:"1px"},t)},_makeHorizontalLineTemplateParams:function(t){return h.extend({className:"horizontal",positionType:"bottom",height:"1px"},t)},_renderLine:function(t,e){var i=this.layout.position.top,n=this.layout.dimension.height,o="M"+t+","+i+"V"+(i+n),a=this.paper.path(o);return a.attr({opacity:e.opacity||1,stroke:e.color}),this.additionalPlotSet.push(a),a},_renderBand:function(t,e,i){var n=this.layout.position,o=this.layout.dimension,a=o.width-t+n.left,r=e<0?a:e,s=this.paper.rect(t,n.top,r,o.height);return s.attr({fill:i.color,opacity:i.opacity||1,stroke:i.color}),this.additionalPlotSet.push(s),s},_createOptionalLineValueRange:function(t){var e=t.range||[t.value];return r.isDatetimeType(this.xAxisTypeOption)&&(e=l(e,function(t){var e=new Date(t);return e.getTime()||t})),e},_createOptionalLinePosition:function(t,e,i){var n=(i-t.dataMin)/t.distance,o=n*e;return 1===n&&(o-=1),o<0&&(o=null),o},_createOptionalLinePositionWhenLabelAxis:function(t,e){var i,n=this.dataProcessor,o=n.findCategoryIndex(e),a=null;return h.isNull(o)||(i=0===o?0:o/(n.getCategoryCount()-1),a=i*t),1===i&&(a-=1),a},_createOptionalLinePositionMap:function(t,e,i){var n,o,a=this.dataProcessor.getCategories(),r=this._createOptionalLineValueRange(t);return e.isLabelAxis?(n=this._createOptionalLinePositionWhenLabelAxis(i,r[0]),o=this._createOptionalLinePositionWhenLabelAxis(i,r[1])):(n=this._createOptionalLinePosition(e,i,r[0]),o=r[1]&&this._createOptionalLinePosition(e,i,r[1])),h.isNull(n)&&(n=this._isBeforeVisibleCategories(r[0],a[0])?0:-1),h.isNull(o)&&(o=this._isAfterVisibleCatgories(r[1],a[a.length-1])?i:-1),{start:n,end:o}},_isBeforeVisibleCategories:function(t,e){var i,n,o=this.dataProcessor;return!!h.isExisty(t)&&(r.isDatetimeType(this.xAxisTypeOption)?t=0&&ie:(i=o.findAbsoluteCategoryIndex(t),n=o.findAbsoluteCategoryIndex(e),i>=0&&i>n))},_renderOptionalLine:function(t,e,i,n){var o,a=this._createOptionalLinePositionMap(n,t,e);return a.start>=0&&a.start<=e&&(i.width=1,i.color=n.color||"transparent",i.opacity=n.opacity,o=this._renderLine(a.start+this.layout.position.left,i)),o},_makeOptionalBand:function(t,e,i,o){var a,r=o.range;return r&&r.length&&this._makeRangeTo2DArray(o),a=l(o.range,function(i){return this._createOptionalLinePositionMap({range:i},t,e)},this),o.mergeOverlappingRanges&&(a.sort(n),a=this._mergeOverlappingPositionMaps(a)),l(a,function(t){var n,a,r=t.start>=0&&t.start<=e;return r&&t.end>=0&&(i.color=o.color||"transparent",i.opacity=o.opacity,n=t.end-t.start,a=this._renderBand(t.start+this.layout.position.left,n,i)),a},this)},_makeOptionalLines:function(t,e){var i=e.width,n=this.axisDataMap.xAxis,o=this._makeVerticalLineTemplateParams({height:e.height+"px"}),a=h.bind(this._renderOptionalLine,this,n,i,o);return l(t,a)},_makeOptionalBands:function(t,e){var i=e.width,n=this.axisDataMap.xAxis,o=this._makeVerticalLineTemplateParams({height:e.height+"px"}),a=h.bind(this._makeOptionalBand,this,n,i,o);return l(t,a)},_renderOptionalLines:function(t,e){var i=[];i.concat(this._makeOptionalBands(this.options.bands,e)),i.concat(this._makeOptionalLines(this.options.lines,e)),this.optionalLines=i},_renderVerticalLines:function(t,e){var i=this._makeHorizontalPositions(t.width),n=this,o=this.layout,a=o.position.left,r=o.position.top;h.forEach(i,function(t){var i="M"+(t+a)+","+r+"V"+(r+o.dimension.height),s=n.paper.path(i);s.attr({stroke:e,"stroke-width":1}),n.plotSet.push(s)})},_renderHorizontalLines:function(t,e){var i=this._makeVerticalPositions(t.height),n=this,o=this.layout,a=o.position.left,r=o.position.top,s=i[1]-i[0];h.forEach(i,function(t,i){var h="M"+a+","+(s*i+r)+"H"+(a+o.dimension.width),l=n.paper.path(h);l.attr({stroke:e,"stroke-width":1}),n.plotSet.push(l)})},_renderPlotLines:function(t,e){var i=this.theme;r.isLineTypeChart(this.chartType)||this._renderVerticalLines(e,i.lineColor),this._renderHorizontalLines(e,i.lineColor)},_makeVerticalPositions:function(t){var e=this.axisDataMap,i=e.yAxis||e.rightYAxis,n=s.makeTickPixelPositions(t,i.validTickCount);return n.shift(),n},_makeDividedPlotPositions:function(t,e){var i,n,o,a,r=this.dimensionMap.yAxis.width;return e=parseInt(e/2,10)+1,t-=r,i=Math.round(t/2),n=t-i,o=s.makeTickPixelPositions(i,e),a=s.makeTickPixelPositions(n,e,i+r),o.pop(),a.shift(),o.concat(a)},_makeHorizontalPositions:function(t){var e,i=this.axisDataMap.xAxis.validTickCount;return this.options.divided?e=this._makeDividedPlotPositions(t,i):(e=s.makeTickPixelPositions(t,i),e.shift()),e},addPlotLine:function(t){this.options.lines.push(t),this.rerender()},addPlotBand:function(t){this.options.bands.push(t),this.rerender()},removePlotLine:function(t){this.options.lines=h.filter(this.options.lines,function(e){return e.id!==t}),this.rerender()},removePlotBand:function(t){this.options.bands=h.filter(this.options.bands,function(e){return e.id!==t}),this.rerender()},animateForAddingData:function(t){var e=this;this.dataProcessor.isCoordinateType()||t.shifting&&h.forEach(this.optionalLines,function(i){var n=i.getBBox();n.x-t.tickSize0&&a<180?"end":a>180&&a<360?"start":"middle",f.push({left:i.x,top:h-i.y,anchor:e});return f}function a(t){return new c(t)}var r=i(48),s=i(8),h=i(31),l=i(6),c=l.defineClass({className:"tui-chart-plot-area",init:function(t){this.options=l.extend({type:"spiderweb"},t.options),this.theme=t.theme||{},this.graphRenderer=h.get(s.COMPONENT_TYPE_RAPHAEL,"radialPlot"),this.drawingType=s.COMPONENT_TYPE_RAPHAEL},_renderPlotArea:function(t,e,i,n){var o={paper:t,layout:e,plotPositions:i,labelData:n,theme:this.theme,options:this.options};return this.graphRenderer.render(o)},_makePositions:function(t,e){var i=e.dimension.width-s.RADIAL_PLOT_PADDING-s.RADIAL_MARGIN_FOR_CATEGORY,o=e.dimension.height-s.RADIAL_PLOT_PADDING-s.RADIAL_MARGIN_FOR_CATEGORY,a=i/2+s.RADIAL_PLOT_PADDING/2+s.RADIAL_MARGIN_FOR_CATEGORY/2+e.position.left,r=o/2-s.RADIAL_PLOT_PADDING/2-s.RADIAL_MARGIN_FOR_CATEGORY/2-e.position.top,h=t.yAxis.tickCount,l=t.xAxis.labels.length;return n({width:i,height:o,centerX:a,centerY:r,angleStepCount:l,stepCount:h})},_makeCategoryPositions:function(t,e){var i=e.dimension.width-s.RADIAL_PLOT_PADDING-s.RADIAL_CATEGORY_PADDING,n=e.dimension.height-s.RADIAL_PLOT_PADDING-s.RADIAL_CATEGORY_PADDING,a=i/2+s.RADIAL_PLOT_PADDING/2+s.RADIAL_CATEGORY_PADDING/2+e.position.left,r=n/2-s.RADIAL_PLOT_PADDING/2-s.RADIAL_CATEGORY_PADDING/2-e.position.top,h=t.xAxis.labels.length;return o({width:i,height:n,centerX:a,centerY:r,angleStepCount:h})},_makeLabelData:function(t,e,i){var n,o,a=t.xAxis.labels,r=t.yAxis.labels,s=this._makeCategoryPositions(t,e),h=[],l=[];for(n=0;n",l.forEach(t,function(t,o){var a=0!==i||0===o?' class="number"':"",r="<"+n+a+">"+t+"";e+=r}),e+=""}),e+=""}function a(t){var e=''+o(t)+"";return window.btoa(unescape(encodeURIComponent(e)))}function r(t,e){var i="",n=e&&e.lineDelimiter||"\n",o=e&&e.itemDelimiter||",",a=t.length-1;return l.forEachArray(t,function(t,e){var r=t.length-1;l.forEachArray(t,function(t,e){var n=l.isNumber(t)?t:'"'+t+'"';i+=n,e0?(this.legendModel.updateCheckedLegendsWith(e),this._checkLegend()):this.legendModel.toggleCheckedIndex(t)},_labelClick:function(t){this._selectLegend(t)},_listenEvents:function(){this.eventBus.on("checkboxClicked",this._checkboxClick,this),this.eventBus.on("labelClicked",this._labelClick,this)}});l.CustomEvents.mixin(u),n.componentType="legend",n.Legend=u,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=Array.prototype.concat,a=n.forEachArray,r=n.defineClass({init:function(t){this.theme=t.theme,this.labels=t.labels,this.legendData=t.legendData,this.seriesTypes=t.seriesTypes||[],this.chartType=t.chartType,this.data=null,this.selectedIndex=null,this.checkedIndexesMap={},this.checkedWholeIndexes=[],this._setData(),this._initCheckedIndexes()},_initCheckedIndexes:function(){var t=this,e=[];a(this.legendData,function(i,n){i.visible&&e.push(n),t.checkedWholeIndexes[n]=i.visible}),this.updateCheckedLegendsWith(e)},_setThemeToLegendData:function(t,e,i){var o=0;a(t,function(t,a){var r={color:e.colors[a]};e.borderColor&&(r.borderColor=e.borderColor),t.theme=r,t.index=a,i&&n.isUndefined(i[a])?t.seriesIndex=-1:(t.seriesIndex=o,o+=1)})},_setData:function(){var t,e,i=this,a=this.theme,r=this.chartType,s=this.seriesTypes,h=this.legendData,l=this.checkedIndexesMap;!s||s.length<2?(this._setThemeToLegendData(h,a[r],l[r]),t=h):(e=0,t=o.apply([],n.map(s,function(t){var n,o,r=i.labels[t].length,s=e+r;return n=h.slice(e,s),o=l[t],e=s,i._setThemeToLegendData(n,a[t],o),n}))),this.data=t},getData:function(){return this.data},getDatum:function(t){return this.data[t]},getDatumByLabel:function(t){var e=null;return a(this.data,function(i){return i.label===t&&(e=i),!e}),e},getSelectedDatum:function(){return this.getDatum(this.selectedIndex)},updateSelectedIndex:function(t){this.selectedIndex=t},toggleSelectedIndex:function(t){var e;e=this.selectedIndex===t?null:t,this.updateSelectedIndex(e)},getSelectedIndex:function(){return this.selectedIndex},isUnselectedIndex:function(t){return!n.isNull(this.selectedIndex)&&this.selectedIndex!==t},isCheckedSelectedIndex:function(){return this.isCheckedIndex(this.selectedIndex)},toggleCheckedIndex:function(t){this.checkedWholeIndexes[t]=!this.checkedWholeIndexes[t]},_updateCheckedIndex:function(t){this.checkedWholeIndexes[t]=!0},isCheckedIndex:function(t){return!!this.checkedWholeIndexes[t]},_addSendingDatum:function(t){var e=this.getDatum(t);this.checkedIndexesMap[e.chartType]||(this.checkedIndexesMap[e.chartType]=[]),this.checkedIndexesMap[e.chartType][e.index]=!0},checkSelectedIndex:function(){this._updateCheckedIndex(this.selectedIndex),this._addSendingDatum(this.selectedIndex),this._setData()},getCheckedIndexes:function(){return this.checkedIndexesMap},_resetCheckedData:function(){this.checkedWholeIndexes=[],this.checkedIndexesMap={}},updateCheckedLegendsWith:function(t){var e=this;this._resetCheckedData(),a(t,function(t){e._updateCheckedIndex(t),e._addSendingDatum(t)}),this._setData()}});t.exports=r},function(t,e,i){"use strict";function n(t){var e=!!s.isUndefined(t.options.visible)||t.options.visible,i=t.chartOptions.chartType,n=null;return e&&(t.chartType=i,n=new h(t)),n}var o=i(8),a=i(11),r=i(31),s=i(6),h=s.defineClass({init:function(t){var e=t.libType;this.chartType=t.chartType,this.theme=t.theme,this.options=t.options||{},this.dataProcessor=t.dataProcessor,this.colorSpectrum=t.colorSpectrum,this.eventBus=t.eventBus,this.graphRenderer=r.get(e,"mapLegend"),this.isHorizontal=a.isHorizontalLegend(this.options.align),this.scaleData=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL,this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on({showWedge:this.onShowWedge,hideTooltip:this.onHideWedge},this),this.eventBus.on("beforeImageDownload",s.bind(this._removeLocationURLFromFillAttribute,this)),this.eventBus.on("afterImageDownload",s.bind(this._restoreLocationURLToFillAttribute,this))},_removeLocationURLFromFillAttribute:function(){this.graphRenderer.removeLocationURLFromFillAttribute()},_restoreLocationURLToFillAttribute:function(){this.graphRenderer.restoreLocationURLToFillAttribute()},_makeBaseDataToMakeTickArea:function(){var t=this.layout.dimension,e=this.scaleData,i=e.stepCount||e.tickCount-1,n={};return n.position=this.layout.position,this.isHorizontal?(n.step=t.width/i,n.position.top+=o.MAP_LEGEND_GRAPH_SIZE+o.MAP_LEGEND_LABEL_PADDING):(n.step=t.height/i,n.position.left+=o.MAP_LEGEND_GRAPH_SIZE+o.MAP_LEGEND_LABEL_PADDING),n},_renderTickArea:function(t){this.graphRenderer.renderTicksAndLabels(this.paper,this._makeBaseDataToMakeTickArea(),this.scaleData.labels,this.isHorizontal,t)},_makeVerticalGraphDimension:function(){return{width:o.MAP_LEGEND_GRAPH_SIZE,height:this.layout.dimension.height}},_makeHorizontalGraphDimension:function(){return{width:this.layout.dimension.width+10,height:o.MAP_LEGEND_GRAPH_SIZE}},_renderGraph:function(t){var e;e=this.isHorizontal?this._makeHorizontalGraphDimension():this._makeVerticalGraphDimension(),this.graphRenderer.render(this.paper,{dimension:e,position:this.layout.position},this.colorSpectrum,this.isHorizontal,t)},_renderLegendArea:function(){var t=this.paper.set();return this._renderGraph(t),this._renderTickArea(t),t},_setDataForRendering:function(t){this.layout=t.layout,this.paper=t.paper,this.scaleData=t.legendScaleData},render:function(t){this._setDataForRendering(t),this.legnedSet=this._renderLegendArea()},rerender:function(t){this.legnedSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},onShowWedge:function(t){this.graphRenderer.showWedge(o.MAP_LEGEND_SIZE*t)},onHideWedge:function(){this.graphRenderer.hideWedge()}});n.componentType="legend",n.SpectrumLegend=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e,i=t.chartOptions.chartType,n=t.chartTheme,o=h.pick(t.chartOptions,"circleLegend","visible"),a=null;return e=!!h.isUndefined(o)||o,e&&(t.chartType=i,t.baseFontFamily=n.chart.fontFamily,a=new l(t)),a}var o=i(8),a=i(44),r=i(7),s=i(31),h=i(6),l=h.defineClass({circleRatios:[1,.5,.25],init:function(t){var e=t.libType;this.chartType=t.chartType,this.dataProcessor=t.dataProcessor,this.labelTheme={fontSize:o.CIRCLE_LEGEND_LABEL_FONT_SIZE,fontFamily:t.baseFontFamily},this.graphRenderer=s.get(e,"circleLegend"),this.layout=null,this.maxRadius=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL},_formatLabel:function(t,e){var i,n=this.dataProcessor.getFormatFunctions();return i=0===e?String(parseInt(t,10)):r.formatToDecimal(String(t),e),r.formatValue({value:i,formatFunctions:n,chartType:this.chartType,areaType:"circleLegend",valueType:"r"})},_makeLabels:function(){var t=this,e=this.dataProcessor.getMaxValue(this.chartType,"r"),i=a.getDecimalLength(e);return h.map(this.circleRatios,function(n){return t._formatLabel(e*n,i)})},_render:function(t){return this.graphRenderer.render(t,this.layout,this.maxRadius,this.circleRatios,this._makeLabels())},_setDataForRendering:function(t){this.layout=t.layout,this.maxRadius=t.maxRadius},render:function(t){this._setDataForRendering(t),this.circleLegendSet=this._render(t.paper)},rerender:function(t){this.circleLegendSet.remove(),this._setDataForRendering(t),this.circleLegendSet=this._render(t.paper)},resize:function(t){this.rerender(t)}});n.componentType="legend",n.CircleLegend=l,t.exports=n},function(t,e,i){"use strict";function n(t,e,i){var n,o=(100*t.ratio).toFixed(4),a=parseFloat(o),r=a<9e-4||o.length>5;return o=r?o.substr(0,4):String(a),n=o+" % "||"",e.ratioLabel=i+n,e.label=t.tooltipLabel||(t.label?t.label:""),e}function o(t){var e,i=t.chartOptions.chartType,o=t.seriesTypes,c=t.chartOptions.xAxis,u=[];return l.forEach(l.filter(t.chartTheme.legend,function(t){return l.isArray(t.colors)}),function(t){u=u.concat(t.colors)}),e="map"===i?s:t.options.grouped?r:a,("pie"===i||h.isPieDonutComboChart(i,o))&&(t.labelFormatter=n),t.chartType=i,t.chartTypes=o,t.xAxisType=c.type,t.dateFormat=c.dateFormat,t.colors=u,e(t)}var a=i(60),r=i(65),s=i(67),h=i(11),l=i(6);o.componentType="tooltip",t.exports=o},function(t,e,i){"use strict";function n(t){return new c(t)}var o=i(61),a=i(62),r=i(8),s=i(11),h=i(63),l=i(6),c=l.defineClass(o,{init:function(){o.apply(this,arguments)},_makeTooltipHtml:function(t,e){var i,n=s.isPieChart(this.chartType)||s.isPieDonutComboChart(this.chartType,this.chartTypes);return s.isBoxplotChart(this.chartType)?l.isNumber(e.outlierIndex)?(i=h.tplBoxplotChartOutlier,e.label=e.outliers[e.outlierIndex].label):i=h.tplBoxplotChartDefault:i=n?h.tplPieChart:this.dataProcessor.coordinateType?h.tplCoordinatetypeChart:h.tplDefault,i(l.extend({categoryVisible:t?"show":"hide",category:t},e))},_makeHtmlForValueTypes:function(t,e){return l.map(e,function(e){return t[e]?"
"+e+": "+t[e]+"
":""}).join("")},_makeSingleTooltipHtml:function(t,e){var i=e.groupIndex,n=l.extend({},l.pick(this.data,t,e.groupIndex,e.index));return s.isBoxplotChart(this.chartType)&&l.isNumber(e.outlierIndex)&&(n.outlierIndex=e.outlierIndex),n=l.extend({suffix:this.suffix},n),n.valueTypes=this._makeHtmlForValueTypes(n,["x","y","r"]),this.templateFunc(n.category,n,this.getRawCategory(i))},_setDefaultTooltipPositionOption:function(){this.options.align||(this.isVertical?this.options.align=r.TOOLTIP_DEFAULT_ALIGN_OPTION:this.options.align=r.TOOLTIP_DEFAULT_HORIZONTAL_ALIGN_OPTION)},_makeShowTooltipParams:function(t,e){var i,n,o=t.index,a=this.dataProcessor.getLegendItem(o);return a?(i=a.chartType,n=l.extend({chartType:i,legend:a.label,legendIndex:o,index:t.groupIndex},e),s.isBoxplotChart(i)&&l.isNumber(t.outlierIndex)&&(n.outlierIndex=t.outlierIndex),n):null},_makeTooltipDatum:function(t,e,i){var n=t&&i.label?": ":"",o=i.tooltipLabel,a=this.labelFormatter,r={legend:t||""};return r.label=o||(i.label?n+i.label:""),a&&(r=a(i,r,n)),r.category=e||"",l.extend(r,i.pickValueMapForTooltip())},makeTooltipData:function(){var t=this,e=this.dataProcessor.getLegendLabels(),i=s.isTreemapChart(this.chartType),n={},o={};return l.isArray(e)?n[this.chartType]=e:n=e,this.dataProcessor.eachBySeriesGroup(function(e,i,a){var r;a=a||t.chartType,r=e.map(function(e,o){var r=t.dataProcessor.makeTooltipCategory(i,o,t.isVertical);return e?t._makeTooltipDatum(n[a][o],r,e):null}),o[a]||(o[a]=[]),o[a].push(r)},i),o}});a.mixin(c),n.componentType="tooltip",n.NormalTooltip=c,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(9),r=i(11),s=i(7),h=n.defineClass({init:function(t){var e=r.isPieChart(t.chartType);this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.dataProcessor=t.dataProcessor,this.options=t.options,this.colors=t.colors,this.theme=t.theme,this.isVertical=t.isVertical,this.eventBus=t.eventBus,this.labelTheme=t.labelTheme,this.xAxisType=t.xAxisType,this.dateFormat=t.dateFormat,this.labelFormatter=t.labelFormatter,this.className="tui-chart-tooltip-area",this.tooltipContainer=null,this.suffix=this.options.suffix?" "+this.options.suffix:"",this.templateFunc=this.options.template||n.bind(this._makeTooltipHtml,this),this.animationTime=e?o.TOOLTIP_PIE_ANIMATION_TIME:o.TOOLTIP_ANIMATION_TIME,this.data=[],this.layout=null,this.dimensionMap=null,this.positionMap=null,this.drawingType=o.COMPONENT_TYPE_DOM,this._setDefaultTooltipPositionOption(),this._saveOriginalPositionOptions(),this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on({showTooltip:this.onShowTooltip,hideTooltip:this.onHideTooltip},this),this.onShowTooltipContainer&&this.eventBus.on({showTooltipContainer:this.onShowTooltipContainer,hideTooltipContainer:this.onHideTooltipContainer},this)},_makeTooltipHtml:function(){},_setDefaultTooltipPositionOption:function(){},_saveOriginalPositionOptions:function(){this.orgPositionOptions={align:this.options.align,offset:this.options.offset}},makeTooltipData:function(){},_setDataForRendering:function(t){this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.positionMap=t.positionMap},render:function(t){var e=t.paper;return a.addClass(e,this.className),this._setDataForRendering(t),this.data=this.makeTooltipData(),s.renderPosition(e,this.layout.position),this.tooltipContainer=e,e},rerender:function(t){this.resize(t),this.data=this.makeTooltipData()},resize:function(t){this._setDataForRendering(t),s.renderPosition(this.tooltipContainer,this.layout.position),this.positionModel&&this.positionModel.updateBound(this.layout)},zoom:function(){this.data=this.makeTooltipData()},_getTooltipElement:function(){var t;return this.tooltipElement||(this.tooltipElement=t=a.create("DIV","tui-chart-tooltip"),a.append(this.tooltipContainer,t)),this.tooltipElement},onShowTooltip:function(t){var e,i=this._getTooltipElement(),n=r.isComboChart(this.chartType)&&r.isScatterChart(t.chartType);r.isChartToDetectMouseEventOnSeries(t.chartType)&&!n||!i.offsetWidth||(e={left:i.offsetLeft,top:i.offsetTop}),this._showTooltip(i,t,e)},getTooltipDimension:function(t){return{width:t.offsetWidth,height:t.offsetHeight}},_moveToPosition:function(t,e,i){i?this._slideTooltip(t,i,e):s.renderPosition(t,e)},_slideTooltip:function(t,e,i){var n=i.top-e.top,o=i.left-e.left;s.cancelAnimation(this.slidingAnimation),this.slidingAnimation=s.startAnimation(this.animationTime,function(i){var a=o*i,r=n*i;t.style.left=e.left+a+"px",t.style.top=e.top+r+"px"})},onHideTooltip:function(t,e){var i=this._getTooltipElement();this._hideTooltip(i,t,e)},setAlign:function(t){this.options.align=t,this.positionModel&&this.positionModel.updateOptions(this.options)},_updateOffsetOption:function(t){this.options.offset=t,this.positionModel&&this.positionModel.updateOptions(this.options)},setOffset:function(t){var e=n.extend({},this.options.offset);n.isExisty(t.x)&&(e.x=t.x),n.isExisty(t.y)&&(e.y=t.y),this._updateOffsetOption(n.extend({},this.options.offset,e))},setPosition:function(t){var e=n.extend({},this.options.offset);n.isExisty(t.left)&&(e.x=t.left),n.isExisty(t.top)&&(e.y=t.y),this._updateOffsetOption(e)},resetAlign:function(){var t=this.orgPositionOptions.align;this.options.align=t,this.positionModel&&this.positionModel.updateOptions(this.options)},resetOffset:function(){this.options.offset=this.orgPositionOptions.offset,this._updateOffsetOption(this.options.offset)},getRawCategory:function(t,e){var i=this.isVertical?"x":"y",n=this.dataProcessor.categoriesMap?this.dataProcessor.categoriesMap[i]:null,o="";return n&&(o=n[t]),e&&(o=s.formatDate(o,e)),o}});t.exports=h},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(11),r=i(9),s=i(7),h={_setIndexesCustomAttribute:function(t,e){t.setAttribute("data-groupIndex",e.groupIndex),t.setAttribute("data-index",e.index)},_getIndexesCustomAttribute:function(t){var e=t.getAttribute("data-groupIndex"),i=t.getAttribute("data-index"),o=null;return n.isNull(e)||n.isNull(i)||(o={groupIndex:parseInt(e,10),index:parseInt(i,10)}),o},_setShowedCustomAttribute:function(t,e){t.setAttribute("data-showed",e)},_isShowedTooltip:function(t){var e=t.getAttribute("data-showed");return"true"===e||e===!0},_makeLeftPositionOfNotBarChart:function(t,e,i,n){var a=t,r=i||0,s=n||o.TOOLTIP_GAP;return e.indexOf("left")>-1?a-=r+s:e.indexOf("center")>-1&&r?a-=r/2:a+=s,a},_makeTopPositionOfNotBarChart:function(t,e,i,n){var a=t,r=i||0;return e.indexOf("bottom")>-1?a+=r+n:e.indexOf("middle")>-1&&r?a+=r/2:a-=r+o.TOOLTIP_GAP,a},_makeTooltipPositionForNotBarChart:function(t){var e=t.bound,i=t.positionOption,n=t.dimension.width-(e.width||0),a=e.width?0:o.TOOLTIP_GAP,r=t.alignOption||"",s=t.dimension.height,h=e.left-this.layout.position.left+i.left,l=e.top-this.layout.position.top+i.top-o.TOOLTIP_GAP;return{left:this._makeLeftPositionOfNotBarChart(h,r,n,a),top:this._makeTopPositionOfNotBarChart(l,r,s,a)}},_makeTooltipPositionToMousePosition:function(t){return t.bound||(t.bound=t.bound||{},n.extend(t.bound,t.mousePosition)),this._makeTooltipPositionForNotBarChart(t)},_makeLeftPositionForBarChart:function(t,e,i){var n=t;return e.indexOf("left")>-1?n-=i:e.indexOf("center")>-1?n-=i/2:n+=o.TOOLTIP_GAP,n},_makeTopPositionForBarChart:function(t,e,i){var n=t;return e.indexOf("top")>-1?n-=i:e.indexOf("middle")>-1&&(n-=i/2),n},_makeTooltipPositionForBarChart:function(t){var e=this.layout.position,i=t.bound,n=t.positionOption,o=t.dimension.height-(i.height||0),a=t.alignOption||"",r=t.dimension.width,s=i.left+i.width+n.left-e.left,h=i.top+n.top-e.top;return{left:this._makeLeftPositionForBarChart(s,a,r),top:this._makeTopPositionForBarChart(h,a,o)}},_makeTooltipPositionForTreemapChart:function(t){var e=this.layout.position,i=t.bound,n=t.positionOption,a=s.getRenderedLabelHeight(o.MAX_HEIGHT_WORLD,this.labelTheme);return{left:i.left+(i.width-t.dimension.width)/2+n.left-e.left,top:i.top+i.height/2-a+n.top-e.top}},_adjustPosition:function(t,e){var i=this.dimensionMap.chart,n=this.layout.position;return e.left=Math.max(e.left,-n.left),e.left=Math.min(e.left,i.width-n.left-t.width),e.top=Math.max(e.top,-n.top),e.top=Math.min(e.top,i.height-n.top-t.height),e},_makeTooltipPosition:function(t){var e,i,n,o={};return t.mousePosition?o=this._makeTooltipPositionToMousePosition(t):(a.isBarChart(t.chartType)?(o=this._makeTooltipPositionForBarChart(t),e="width",i="left",n=1):a.isTreemapChart(t.chartType)?o=this._makeTooltipPositionForTreemapChart(t):(o=this._makeTooltipPositionForNotBarChart(t),e="height",i="top",n=-1),t.allowNegativeTooltip&&(o=this._moveToSymmetry(o,{bound:t.bound,indexes:t.indexes,dimension:t.dimension,chartType:t.chartType,sizeType:e,positionType:i,addPadding:n})),o=this._adjustPosition(t.dimension,o)),o},_moveToSymmetry:function(t,e){var i,n,o,r=e.bound,s=e.sizeType,h=e.positionType,l=e.seriesType||e.chartType,c=this.dataProcessor.getValue(e.indexes.groupIndex,e.indexes.index,l),u=a.isBarChart(this.chartType)?-1:1;return c<0&&(i=e.dimension[s],n=r[s],o=t[h]+(n+i)*u,t[h]=o),t},_isChangedIndexes:function(t,e){return!!t&&(t.groupIndex!==e.groupIndex||t.index!==e.index)},_showTooltip:function(t,e,i){var a,s=this.tooltipContainer.parentNode.getBoundingClientRect(),h=e.indexes,l=this._getIndexesCustomAttribute(t),c=this.options.offset||{},u={},d=t&&t.getAttribute("data-chart-type");!e.bound&&e.mousePosition&&(e.bound={left:e.mousePosition.left-s.left+o.CHART_PADDING,top:e.mousePosition.top-s.top+o.CHART_PADDING}),(this._isChangedIndexes(l,h)||d!==e.chartType)&&this.eventBus.fire("hoverOffSeries",l,d),t.innerHTML=this._makeSingleTooltipHtml(e.seriesType||e.chartType,h),t.setAttribute("data-chart-type",e.chartType),this._setIndexesCustomAttribute(t,h),this._setShowedCustomAttribute(t,!0),this._fireBeforeShowTooltipPublicEvent(h,e.silent),r.addClass(t,"show"),u.left=c.x||0,u.top=c.y||0,a=this._makeTooltipPosition(n.extend({dimension:this.getTooltipDimension(t),positionOption:u,alignOption:this.options.align||""},e)),this._moveToPosition(t,a,i),this.eventBus.fire("hoverSeries",h,e.chartType),this._fireAfterShowTooltipPublicEvent(h,{element:t,position:a},e.silent),delete e.silent},_fireBeforeShowTooltipPublicEvent:function(t,e){var i;e||(i=this._makeShowTooltipParams(t),this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"beforeShowTooltip",i))},_fireAfterShowTooltipPublicEvent:function(t,e,i){var n;i||(n=this._makeShowTooltipParams(t,e),this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"afterShowTooltip",n))},_executeHidingTooltip:function(t){r.removeClass(t,"show"),t.removeAttribute("data-groupIndex"),t.removeAttribute("data-index"),t.style.cssText=""},_hideTooltip:function(t,e,i){var n=this,r=this._getIndexesCustomAttribute(t),s=t.getAttribute("data-chart-type"),h=!(!i||!i.silent);a.isChartToDetectMouseEventOnSeries(s)?(this.eventBus.fire("hoverOffSeries",r,s),this._fireBeforeHideTooltipPublicEvent(r,h),this._executeHidingTooltip(t)):s&&(this._setShowedCustomAttribute(t,!1),this.eventBus.fire("hoverOffSeries",r,s),this._isChangedIndexes(this.prevIndexes,r)&&delete this.prevIndexes,setTimeout(function(){n._isShowedTooltip(t)||(n._fireBeforeHideTooltipPublicEvent(r,h),n._executeHidingTooltip(t))},o.HIDE_DELAY))},_fireBeforeHideTooltipPublicEvent:function(t,e){var i;e||this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"beforeHideTooltip",i)},onShowTooltipContainer:function(){this.tooltipContainer.style.zIndex=o.TOOLTIP_ZINDEX},onHideTooltipContainer:function(){this.tooltipContainer.style.zIndex=0},mixin:function(t){n.extend(t.prototype,this)}};t.exports=h},function(t,e,i){"use strict";var n=i(64),o={HTML_DEFAULT_TEMPLATE:'
{{ category }}
{{ legend }}{{ label }}{{ suffix }}
',HTML_PIE_TEMPLATE:'
{{ category }}
{{ legend }}{{ ratioLabel }}( {{ label }} {{ suffix }})
',HTML_COORDINATE_TYPE_CHART_TEMPLATE:'
{{ category }}
{{ legend }}{{ label }}
{{ valueTypes }}
',HTML_GROUP:'
{{ category }}
{{ items }}
',HTML_GROUP_ITEM:'
 {{ legend }}{{ value }}{{ suffix }}
',GROUP_CSS_TEXT:"background-color:{{ color }}",HTML_MAP_CHART_DEFAULT_TEMPLATE:'
{{ name }}: {{ value }}{{ suffix }}
',HTML_BOXPLOT_TEMPLATE:'
{{ category }}
{{ legend }}
Maximum: {{ maxLabel }}{{ suffix }}
Upper Quartile: {{ uqLabel }}{{ suffix }}
Median: {{ medianLabel }}{{ suffix }}
Lower Quartile: {{ lqLabel }}{{ suffix }}
Minimum: {{ minLabel }}{{ suffix }}
',HTML_BOXPLOT_OUTLIER:'
{{ category }}
{{ legend }}
Outlier: {{ label }}{{ suffix }}
'};t.exports={tplDefault:n.template(o.HTML_DEFAULT_TEMPLATE),tplPieChart:n.template(o.HTML_PIE_TEMPLATE),tplCoordinatetypeChart:n.template(o.HTML_COORDINATE_TYPE_CHART_TEMPLATE),tplGroup:n.template(o.HTML_GROUP),tplGroupItem:n.template(o.HTML_GROUP_ITEM),tplGroupCssText:n.template(o.GROUP_CSS_TEXT),tplMapChartDefault:n.template(o.HTML_MAP_CHART_DEFAULT_TEMPLATE),tplBoxplotChartDefault:n.template(o.HTML_BOXPLOT_TEMPLATE),tplBoxplotChartOutlier:n.template(o.HTML_BOXPLOT_OUTLIER)}},function(t,e,i){"use strict";var n=i(6);t.exports={template:function(t){return function(e){var i=t;return n.forEach(e,function(t,e){var n=new RegExp("{{\\s*"+e+"\\s*}}","g");i=i.replace(n,String(t).replace("$","$"))}),i}}}},function(t,e,i){"use strict";function n(t){return new d(t)}var o=i(61),a=i(66),r=i(8),s=i(9),h=i(7),l=i(33),c=i(63),u=i(6),d=u.defineClass(o,{ -init:function(){this.prevIndex=null,o.apply(this,arguments)},_makeTooltipHtml:function(t,e){var i=c.tplGroupItem,n=c.tplGroupCssText,o=this._makeColors(this.theme),a=u.map(e,function(t,e){return t.value?i(u.extend({cssText:n({color:o[e]})},t)):null}).join("");return c.tplGroup({category:t,items:a})},_setDefaultTooltipPositionOption:function(){this.options.align||(this.isVertical?this.options.align=r.TOOLTIP_DEFAULT_GROUP_ALIGN_OPTION:this.options.align=r.TOOLTIP_DEFAULT_GROUP_HORIZONTAL_ALIGN_OPTION)},render:function(t){var e=o.prototype.render.call(this,t),i=this.dimensionMap.chart,n=this.layout;return t.checkedLegends&&(this.theme={colors:this.colors}),this.positionModel=new a(i,n,this.isVertical,this.options),e},rerender:function(t){o.prototype.rerender.call(this,t),this.prevIndex=null,t.checkedLegends&&(this.theme=this._updateLegendTheme(t.checkedLegends))},zoom:function(){this.prevIndex=null,o.prototype.zoom.call(this)},_updateLegendTheme:function(t){var e=[];return u.forEachArray(this.dataProcessor.getOriginalLegendData(),function(i){var n=t[i.chartType]||t;n[i.index]&&e.push(i.theme.color)}),{colors:e}},makeTooltipData:function(){var t=this,e=this.dataProcessor.getCategoryCount(this.isVertical);return u.map(this.dataProcessor.getSeriesGroups(),function(i,n){return{category:t.dataProcessor.makeTooltipCategory(n,e-n,t.isVertical),values:i.pluck("label")}})},_makeColors:function(t){var e,i,n,o=0,a=this.dataProcessor.getLegendData();return t.colors?t.colors:(e=l.series.colors.slice(0,a.length),u.map(u.pluck(a,"chartType"),function(a){var r;return n!==a&&(i=t[a]?t[a].colors:e,o=0),n=a,r=i[o],o+=1,r}))},_makeItemRenderingData:function(t){var e=this.dataProcessor,i=this.suffix;return u.map(t,function(t,n){var o=e.getLegendItem(n);return{value:t,legend:o.label,chartType:o.chartType,suffix:i}})},_makeGroupTooltipHtml:function(t){var e,i=this.data[t],n="";return i&&(e=this._makeItemRenderingData(i.values),n=this.templateFunc(i.category,e,this.getRawCategory(t))),n},_getTooltipSectorElement:function(){var t;return this.groupTooltipSector||(this.groupTooltipSector=t=s.create("DIV","tui-chart-group-tooltip-sector"),s.append(this.tooltipContainer,t)),this.groupTooltipSector},_makeVerticalTooltipSectorBound:function(t,e,i){var n;return n=i?1:e.end-e.start,{dimension:{width:n,height:t},position:{left:e.start,top:r.SERIES_EXPAND_SIZE}}},_makeHorizontalTooltipSectorBound:function(t,e){return{dimension:{width:t,height:e.end-e.start},position:{left:r.SERIES_EXPAND_SIZE,top:e.start}}},_makeTooltipSectorBound:function(t,e,i,n){var o;return o=i?this._makeVerticalTooltipSectorBound(t,e,n):this._makeHorizontalTooltipSectorBound(t,e)},_showTooltipSector:function(t,e,i,n,o){var a=this._getTooltipSectorElement(),r=e.start===e.end,l=this._makeTooltipSectorBound(t,e,i,r);r?this.eventBus.fire("showGroupTooltipLine",l):(h.renderDimension(a,l.dimension),h.renderPosition(a,l.position),s.addClass(a,"show")),o&&(n-=1),this.eventBus.fire("showGroupAnimation",n)},_hideTooltipSector:function(t){var e=this._getTooltipSectorElement();s.hasClass(e,"show")?s.removeClass(e,"show"):this.eventBus.fire("hideGroupTooltipLine"),this.eventBus.fire("hideGroupAnimation",t),this.eventBus.fire("hideGroupTooltipLine")},_showTooltip:function(t,e,i){var n,o;u.isNull(this.prevIndex)||this.eventBus.fire("hideGroupAnimation",this.prevIndex),t.innerHTML=this._makeGroupTooltipHtml(e.index),this._fireBeforeShowTooltipPublicEvent(e.index,e.range,e.silent),s.addClass(t,"show"),this._showTooltipSector(e.size,e.range,e.isVertical,e.index,e.isMoving),n=this.getTooltipDimension(t),o=this.positionModel.calculatePosition(n,e.range),this._moveToPosition(t,o,i),this._fireAfterShowTooltipPublicEvent(e.index,e.range,{element:t,position:o},e.silent),this.prevIndex=e.index},_fireBeforeShowTooltipPublicEvent:function(t,e,i){i||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"beforeShowTooltip",{chartType:this.chartType,index:t,range:e})},_fireAfterShowTooltipPublicEvent:function(t,e,i,n){n||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"afterShowTooltip",u.extend({chartType:this.chartType,index:t,range:e},i))},_hideTooltip:function(t,e,i){var n=i.silent;this.prevIndex=null,this._fireBeforeHideTooltipPublicEvent(e,n),this._hideTooltipSector(e),s.removeClass(t,"show"),t.style.cssText=""},_fireBeforeHideTooltipPublicEvent:function(t,e){e||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"beforeHideTooltip",{chartType:this.chartType,index:t})}});n.componentType="tooltip",n.GroupTooltip=d,t.exports=n},function(t,e,i){"use strict";var n=i(8),o=i(6),a=o.defineClass({init:function(t,e,i,n){this.chartDimension=t,this.areaBound=e,this.isVertical=i,this.options=n,this.positions={},this._setData(t,e,i,n)},_getHorizontalDirection:function(t){var e;return t=t||"",e=t.indexOf("left")>-1?n.TOOLTIP_DIRECTION_BACKWARD:t.indexOf("center")>-1?n.TOOLTIP_DIRECTION_CENTER:n.TOOLTIP_DIRECTION_FORWARD},_makeVerticalData:function(t,e,i){var o=this._getHorizontalDirection(i);return{positionType:"left",sizeType:"width",direction:o,areaPosition:e.position.left,areaSize:e.dimension.width,chartSize:t.width,basePosition:n.SERIES_EXPAND_SIZE}},_getVerticalDirection:function(t){var e;return t=t||"",e=t.indexOf("top")>-1?n.TOOLTIP_DIRECTION_BACKWARD:t.indexOf("bottom")>-1?n.TOOLTIP_DIRECTION_FORWARD:n.TOOLTIP_DIRECTION_CENTER},_makeHorizontalData:function(t,e,i){var o=this._getVerticalDirection(i);return{positionType:"top",sizeType:"height",direction:o,areaPosition:e.position.top,areaSize:e.dimension.height,chartSize:t.height,basePosition:n.SERIES_EXPAND_SIZE}},_setData:function(t,e,i,n){var o=this._makeVerticalData(t,e,n.align),a=this._makeHorizontalData(t,e,n.align),r=n.offset||{};i?(this.mainData=o,this.subData=a):(this.mainData=a,this.subData=o),this.positionOption={},this.positionOption.left=r.x||0,this.positionOption.top=r.y||0,this.positions={}},_calculateMainPositionValue:function(t,e,i){var o=e.start===e.end,a=9,r=5,s=o?a:r,h=i.basePosition;return h+=i.direction===n.TOOLTIP_DIRECTION_FORWARD?e.end+s:i.direction===n.TOOLTIP_DIRECTION_BACKWARD?e.start-t-s:o?e.start-t/2:e.start+(e.end-e.start-t)/2},_calculateSubPositionValue:function(t,e){var i,o=e.areaSize/2;return i=e.direction===n.TOOLTIP_DIRECTION_FORWARD?o+e.basePosition:e.direction===n.TOOLTIP_DIRECTION_BACKWARD?o-t+e.basePosition:o-t/2+e.basePosition},_makePositionValueDiff:function(t,e,i){return t+i.areaPosition+e-i.chartSize},_adjustBackwardPositionValue:function(t,e,i,o){var a;return t<-o.areaPosition&&(a=this._calculateMainPositionValue(i,e,{direction:n.TOOLTIP_DIRECTION_FORWARD,basePosition:o.basePosition}),t=this._makePositionValueDiff(a,i,o)>0?-o.areaPosition:a),t},_adjustForwardPositionValue:function(t,e,i,o){var a,r=this._makePositionValueDiff(t,i,o);return r>0&&(a=this._calculateMainPositionValue(i,e,{direction:n.TOOLTIP_DIRECTION_BACKWARD,basePosition:o.basePosition}),a<-o.areaPosition?t-=r:t=a),t},_adjustMainPositionValue:function(t,e,i,o){return o.direction===n.TOOLTIP_DIRECTION_BACKWARD?t=this._adjustBackwardPositionValue(t,e,i,o):o.direction===n.TOOLTIP_DIRECTION_FORWARD?t=this._adjustForwardPositionValue(t,e,i,o):(t=Math.max(t,-o.areaPosition),t=Math.min(t,o.chartSize-o.areaPosition-i)),t},_adjustSubPositionValue:function(t,e,i){return t=i.direction===n.TOOLTIP_DIRECTION_FORWARD?Math.min(t,i.chartSize-i.areaPosition-e):Math.max(t,-i.areaPosition)},_makeCachingKey:function(t){return t.start+"-"+t.end},_addPositionOptionValue:function(t,e){return t+this.positionOption[e]},_makeMainPositionValue:function(t,e,i){var n;return n=this._calculateMainPositionValue(t[i.sizeType],e,i),n=this._addPositionOptionValue(n,i.positionType),n=this._adjustMainPositionValue(n,e,t[i.sizeType],i)},_makeSubPositionValue:function(t,e){var i;return i=this._calculateSubPositionValue(t[e.sizeType],e),i=this._addPositionOptionValue(i,e.positionType),i=this._adjustSubPositionValue(i,t[e.sizeType],e)},calculatePosition:function(t,e){var i=this._makeCachingKey(e),n=this.mainData,o=this.subData,a=this.positions[i];return a||(a={},a[n.positionType]=this._makeMainPositionValue(t,e,n),a[o.positionType]=this._makeSubPositionValue(t,o),this.positions[i]=a),a},updateOptions:function(t){this.options=t,this._setData(this.chartDimension,this.areaBound,this.isVertical,t)},updateBound:function(t){this.areaBound=t,this._setData(this.chartDimension,t,this.isVertical,this.options)}});t.exports=a},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(8),a=i(61),r=i(62),s=i(63),h=i(6),l=h.defineClass(a,{init:function(t){this.mapModel=t.mapModel,a.apply(this,arguments)},_makeTooltipHtml:function(t){return s.tplMapChartDefault(t)},_makeSingleTooltipHtml:function(t,e){var i=this.mapModel.getDatum(e.index),n=this.options.suffix?" "+this.options.suffix:"";return this.templateFunc({name:i.name||i.code,value:i.label,suffix:n})},_makeShowTooltipParams:function(t,e){var i,n=this.mapModel.getDatum(t.index);return i=h.extend({chartType:this.chartType,code:n.code,name:n.name,value:n.label,index:t.index},e)},_setDefaultTooltipPositionOption:function(){this.options.align||(this.options.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION)}});r.mixin(l),n.componentType="tooltip",t.exports=n},function(t,e,i){"use strict";function n(t){return new c(t)}var o=i(69),a=i(8),r=i(54),s=i(9),h=i(7),l=i(6),c=l.defineClass(o,{init:function(t){this.chartType=t.chartType,this.eventBus=t.eventBus,this.isDown=!1,this.drawingType=a.COMPONENT_TYPE_DOM},_renderMouseEventDetectorArea:function(t){h.renderDimension(t,this.layout.dimension),h.renderPosition(t,this.layout.position)},_onClick:function(){},_onMousedown:function(t){this.isDown=!0,this.eventBus.fire("dragStartMapSeries",{left:t.clientX,top:t.clientY})},_dragEnd:function(){this.isDrag=!1,s.removeClass(this.mouseEventDetectorContainer,"drag"),this.eventBus.fire("dragEndMapSeries")},_onMouseup:function(t){this.isDown=!1,this.isDrag?this._dragEnd():this._onMouseEvent("click",t),this.isMove=!1},_onMousemove:function(t){this.isDown?(this.isDrag||s.addClass(this.mouseEventDetectorContainer,"drag"),this.isDrag=!0,this.eventBus.fire("dragMapSeries",{left:t.clientX,top:t.clientY})):(this.isMove=!0,this._onMouseEvent("move",t))},_onMouseout:function(t){this.isDrag?this._dragEnd():this._onMouseEvent("move",t),this.isDown=!1},_onMousewheel:function(t){var e=t.wheelDelta||t.detail*a.FF_WHEELDELTA_ADJUSTING_VALUE;return this.eventBus.fire("wheel",e,{left:t.clientX,top:t.clientY}),t.preventDefault&&t.preventDefault(),!1},attachEvent:function(t){o.prototype.attachEvent.call(this,t),l.browser.firefox?r.on(t,"DOMMouseScroll",this._onMousewheel,this):r.on(t,"mousewheel",this._onMousewheel,this)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";var n=i(70),o=i(71),a=i(8),r=i(54),s=i(11),h=i(9),l=i(7),c=i(6),u=c.defineClass({init:function(t){var e;this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.isVertical=t.isVertical,this.dataProcessor=t.dataProcessor,this.allowSelect=t.allowSelect,this.eventBus=t.eventBus,this.layout=null,this.selectedData=null,this.prevClientPosition=null,this.prevFoundData=null,e=s.isLineTypeChart(this.chartType,this.chartTypes),this.expandSize=e?a.SERIES_EXPAND_SIZE:0,this.seriesItemBoundsData=[],this.seriesCount=s.isComboChart(this.chartType)?2:1,this._attachToEventBus(),this.drawingType=a.COMPONENT_TYPE_DOM},_attachToEventBus:function(){this.eventBus.on("receiveSeriesData",this.onReceiveSeriesData,this)},_getRenderingBound:function(){var t=l.expandBound(this.layout);return t},_renderMouseEventDetectorArea:function(t,e){var i,o,a=this.layout.dimension;this.dimension=a,o=new n(this.layout,e,this.chartType,this.isVertical,this.chartTypes),this.tickBaseCoordinateModel=o,i=this._getRenderingBound(),l.renderDimension(t,i.dimension),l.renderPosition(t,i.position)},_setDataForRendering:function(t){this.layout=t.layout},_pickTickCount:function(t){var e;return e=this.isVertical?t.xAxis.eventTickCount||t.xAxis.tickCount:t.yAxis.tickCount},render:function(t){var e,i=t.paper;return this.positionMap=t.positionMap,h.addClass(i,"tui-chart-series-custom-event-area"),t.axisDataMap.xAxis&&(e=this._pickTickCount(t.axisDataMap)),this._setDataForRendering(t),this._renderMouseEventDetectorArea(i,e),this.attachEvent(i),this.mouseEventDetectorContainer=i,this.transparentChild=this._createTransparentChild(),h.append(i,this.transparentChild),i},_createTransparentChild:function(){var t=document.createElement("DIV"),e=t.style;return e.backgroundColor="#fff",e.height=l.getStyle(this.mouseEventDetectorContainer).height,l.setOpacity(t,0),t},_calculateLayerPosition:function(t,e,i){var n,o,r=this.mouseEventDetectorContainer.getBoundingClientRect(),s=this.positionMap.series,h=this.expandSize,l={};return i=!!c.isUndefined(i)||i,i&&(n=r.right-h,o=r.left+h,t=Math.min(Math.max(t,o),n)),l.x=t-r.left+s.left-a.CHART_PADDING,c.isUndefined(e)||(l.y=e-r.top+s.top-a.CHART_PADDING),l},onReceiveSeriesData:function(t){var e=this.seriesItemBoundsData,i=this.seriesCount;e.length===i&&(e=[]),e.push(t),e.length===i&&(this.boundsBaseCoordinateModel=new o(e))},rerender:function(t){var e;t.axisDataMap.xAxis&&(e=this._pickTickCount(t.axisDataMap)),this.selectedData=null,this._setDataForRendering(t),this._renderMouseEventDetectorArea(this.mouseEventDetectorContainer,e),this.transparentChild.style.height=l.getStyle(this.mouseEventDetectorContainer).height},resize:function(t){this.containerBound=null,this.rerender(t)},_isChangedSelectData:function(t,e){return!t||!e||t.chartType!==e.chartType||t.indexes.groupIndex!==e.indexes.groupIndex||t.indexes.index!==e.indexes.index},_findDataFromBoundsCoordinateModel:function(t){var e,i=t.x,n=t.y;return e=s.isTreemapChart(this.chartType)?0:this.tickBaseCoordinateModel.findIndex(this.isVertical?i:n),this.boundsBaseCoordinateModel.findData(e,i,n)},_findData:function(t,e){var i=this._calculateLayerPosition(t,e);return this._findDataFromBoundsCoordinateModel(i)},_showTooltip:function(){},animateForAddingData:function(){var t,e;this.prevClientPosition&&(t=this._findData(this.prevClientPosition.x,this.prevClientPosition.y),t&&(e=this.prevFoundData&&this.prevFoundData.indexes.groupIndex===t.indexes.groupIndex,this._showTooltip(t,e)),this.prevFoundData=t)},_onMouseEvent:function(t,e){h.addClass(this.mouseEventDetectorContainer,"hide"),this.eventBus.fire(t+"Series",{left:e.clientX,top:e.clientY}),h.removeClass(this.mouseEventDetectorContainer,"hide")},_unselectSelectedData:function(){this.eventBus.fire("unselectSeries",this.selectedData),this.selectedData=null},_onClick:function(t){var e=this._findData(t.clientX,t.clientY);this._isChangedSelectData(this.selectedData,e)?e&&(this.selectedData&&this._unselectSelectedData(),this.eventBus.fire("selectSeries",e),this.allowSelect&&(this.selectedData=e)):this._unselectSelectedData()},_onMousedown:function(){},_onMouseup:function(){},_onMousemove:function(t){this.prevClientPosition={x:t.clientX,y:t.clientY}},_onMouseout:function(){this.prevClientPosition=null,this.prevFoundData=null},attachEvent:function(t){r.on(t,{click:this._onClick,mousedown:this._onMousedown,mouseup:this._onMouseup,mousemove:this._onMousemove,mouseout:this._onMouseout},this)},findDataByIndexes:function(){}});c.CustomEvents.mixin(u),t.exports=u},function(t,e,i){"use strict";var n=i(11),o=i(10),a=i(6),r=a.defineClass({init:function(t,e,i,o,a){this.isLineType=n.isLineTypeChart(i,a),this.data=this._makeData(t,e,o)},_getRanges:function(t,e,i){var n=e,o=i/2;return a.map(a.range(0,t),function(){var t={min:n-o,max:n+o};return n+=i,t})},_makeLineTypeData:function(t,e,i){var n=(t+1)/(e-1),o=this._getRanges(e,i||0,n);return o[e-1].max-=1,o},_makeNormalData:function(t,e,i){var n=e-1,r=t/n,s=i||0;return a.map(a.range(0,n),function(){var e=o.min([t+s,r+s]),i={min:s,max:e};return s=e,i})},_makeData:function(t,e,i){var n,o=i?"width":"height",a=i?"left":"top";return n=this.isLineType?this._makeLineTypeData(t.dimension[o],e,t.position[a]):this._makeNormalData(t.dimension[o],e,t.position[a])},findIndex:function(t){var e=-1;return a.forEachArray(this.data,function(i,n){return!(i.min=t)||(e=n,!1)}),e},getLastIndex:function(){return this.data.length-1},makeRange:function(t,e){var i,n,o=this.data[t];return this.isLineType?(n=parseInt(o.max-(o.max-o.min)/2,10),i={start:n,end:n}):i={start:o.min-(e||0),end:o.max-(e||0)},i}});t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(10),r=i(6),s=r.defineClass({init:function(t){this.data=this._makeData(t)},_makeRectTypePositionData:function(t,e){var i=!o.isBoxTypeChart(e);return r.map(t,function(t,n){return r.map(t,function(t,o){var a;return t?(a=t.end,{sendData:{chartType:e,indexes:{groupIndex:n,index:o},allowNegativeTooltip:i,bound:a},bound:{left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height}}):null})})},_makeOutliersPositionDataForBoxplot:function(t,e,i){var n=!o.isBoxTypeChart(e),a=[].concat(t);r.forEach(a,function(t,o){r.forEach(t,function(t,a){var s;t.outliers&&t.outliers.length&&(s=r.map(t.outliers,function(t,i){var r={top:t.top-3,left:t.left-3,width:6,height:6};return{sendData:{chartType:e,indexes:{groupIndex:o,index:a,outlierIndex:i},allowNegativeTooltip:n,bound:r},bound:{left:r.left,top:r.top,right:r.left+r.width,bottom:r.top+r.height}}}),i[o]=i[o].concat(s))})})},_makeDotTypePositionData:function(t,e){return t?r.map(a.pivot(t),function(t,i){return r.map(t,function(t,o){return t?{sendData:{chartType:e,indexes:{groupIndex:i,index:o},bound:t},bound:{left:t.left-n.DOT_RADIUS,top:t.top-n.DOT_RADIUS,right:t.left+n.DOT_RADIUS,bottom:t.top+n.DOT_RADIUS}}:null})}):[]},_joinData:function(t){var e=[];return r.forEachArray(t,function(t){r.forEachArray(t,function(t,i){var n;e[i]?(n=e[i].length,r.forEachArray(t,function(t){t&&(t.sendData.indexes.legendIndex=t.sendData.indexes.index+n)}),e[i]=e[i].concat(t)):e[i]=t})}),e},_makeData:function(t){var e=this,i=r.map(t,function(t){var i;return i=o.isLineTypeChart(t.chartType)?e._makeDotTypePositionData(t.data.groupPositions,t.chartType):e._makeRectTypePositionData(t.data.groupBounds,t.chartType),o.isBoxplotChart(t.chartType)&&e._makeOutliersPositionDataForBoxplot(t.data.groupBounds,t.chartType,i),i});return this._joinData(i)},_findCandidates:function(t,e,i){return r.filter(t,function(t){var n,o,a=t&&t.bound,r=!1;return a&&(n=a.left<=e&&a.right>=e,o=a.top<=i&&a.bottom>=i,r=n&&o),r})},findData:function(t,e,i){var n,o=1e4,a=null;return t>-1&&this.data[t]&&(n=this._findCandidates(this.data[t],e,i),r.forEachArray(n,function(t){var e=Math.abs(i-t.bound.top);o>e&&(o=e,a=t.sendData)})),a},findDataByIndexes:function(t){var e=this.data[t.index][t.seriesIndex].sendData;return r.isNumber(t.outlierIndex)?this._findOutlierDataByIndexes(t):e},_findOutlierDataByIndexes:function(t){var e=null;return r.forEachArray(this.data[t.index],function(i){var n=i.sendData.indexes,o=n.index===t.seriesIndex&&n.outlierIndex===t.outlierIndex;return o&&(e=i.sendData),!o}),e}});t.exports=s},function(t,e,i){"use strict";function n(t){var e,i=t.chartOptions.chartType,n=t.seriesTypes,c=t.chartOptions.series.zoomable,u=t.chartOptions.series.allowSelect;return e=t.chartOptions.tooltip.grouped?s:o.isMapChart(i)?l:o.isBarTypeChart(i)||o.isBoxplotChart(i)||o.isHeatmapChart(i)||o.isTreemapChart(i)?h:o.isCoordinateTypeChart(i)||o.isPieChart(i)||o.isPieDonutComboChart(i,n)?r:a,t.chartType=i,t.chartTypes=n,t.zoomable=c,t.allowSelect=u,e(t)}var o=i(11),a=i(73),r=i(76),s=i(77),h=i(78),l=i(68);n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(69),a=i(74),r=i(75),s=i(6),h=50,l=s.defineClass(o,{init:function(t){o.call(this,t),this.prevFoundData=null,this.zoomable=t.zoomable,this.zoomable&&(s.extend(this,a),this._initForZoom(t.zoomable))},onReceiveSeriesData:function(t){var e=this.seriesItemBoundsData,i=this.seriesCount;e.length===i&&(e=[]),e.push(t),e.length===i&&(this.dataModel=new r(e)),this.zoomable&&this._showTooltipAfterZoom()},_findData:function(t,e){var i=this._calculateLayerPosition(t,e);return this.dataModel.findData(i,h)},_findDataForZoomable:function(t,e){var i=this._calculateLayerPosition(t,e);return this.dataModel.findData(i)},_getFirstData:function(t){return this.dataModel.getFirstData(t)},_getLastData:function(t){return this.dataModel.getLastData(t)},_showTooltip:function(t){this.eventBus.fire("showTooltip",t)},_hideTooltip:function(t){t=t||{},this.eventBus.fire("hideTooltip",this.prevFoundData,t)},_onMousemove:function(t){var e,i;o.prototype._onMousemove.call(this,t),i=this._findData(t.clientX,t.clientY),this.zoomable&&(e=this._isAfterDragMouseup()),!e&&this._isChangedSelectData(this.prevFoundData,i)&&(i?this._showTooltip(i):this.prevFoundData&&this._hideTooltip(),this.prevFoundData=i)},_onMouseout:function(){this.prevFoundData&&this._hideTooltip(),o.prototype._onMouseout.call(this)},findDataByIndexes:function(t){return this.dataModel.findDataByIndexes(t)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";var n=i(69),o=i(8),a=i(9),r=i(7),s=i(54),h=i(6),l={_initForZoom:function(t){this.zoomable=t,this.dragStartIndexes=null,this.startClientPosition=null,this.startLayerX=null,this.dragSelectionElement=null,this.containerBound=null,this.isShowTooltipAfterZoom=!1,this.afterMouseup=!1,this.prevDistanceOfRange=null,this.reverseMove=null,this.resetZoomBtn=null},_showTooltipAfterZoom:function(){var t,e=this.isShowTooltipAfterZoom;this.isShowTooltipAfterZoom=!1,e&&this.dragStartIndexes&&(t=this.reverseMove?this._getFirstData(this.dragStartIndexes.index):this._getLastData(this.dragEndIndexes.index),t&&this._showTooltip(t))},_updateDimensionForDragSelection:function(t){r.renderDimension(t,{height:this.layout.dimension.height})},_renderDragSelection:function(){var t=a.create("DIV","tui-chart-drag-selection");return this._updateDimensionForDragSelection(t),t},render:function(t){var e=n.prototype.render.call(this,t),i=this._renderDragSelection();return a.append(e,i),this.dragSelectionElement=i,e},resize:function(t){this.containerBound=null,n.prototype.resize.call(this,t),this._updateDimensionForDragSelection(this.dragSelectionElement)},_onClick:function(){},_isAfterDragMouseup:function(){var t=this.afterMouseup;return t&&(this.afterMouseup=!1),t},_bindDragEvent:function(t){t.setCapture&&t.setCapture(),s.on(document,"mousemove",this._onDrag,this),s.off(this.mouseEventDetectorContainer,"mouseup",this._onMouseup,this),s.on(document,"mouseup",this._onMouseupAfterDrag,this)},_unbindDragEvent:function(){this.downTarget&&this.downTarget.releaseCapture&&this.downTarget.releaseCapture(),s.off(document,"mousemove",this._onDrag,this),s.off(document,"mouseup",this._onMouseupAfterDrag,this),s.on(this.mouseEventDetectorContainer,"mouseup",this._onMouseup,this)},_onMousedown:function(t){var e;this.zoomable&&(e=t.target||t.srcElement,this.startClientPosition={x:t.clientX,y:t.clientY},this.startLayerX=this._calculateLayerPosition(t.clientX).x,this.downTarget=e,this._bindDragEvent(e))},_showDragSelection:function(t){var e=this._calculateLayerPosition(t).x,i=Math.min(e,this.startLayerX)-this.layout.position.left,n=Math.abs(e-this.startLayerX),o=this.dragSelectionElement;o.style.left=i+"px",o.style.width=n+"px",a.addClass(o,"show")},_hideDragSelection:function(){a.removeClass(this.dragSelectionElement,"show")},_onDrag:function(t){var e,i=this.startClientPosition,n=t.target||t.srcElement;i&&(e=this._findDataForZoomable(i.x,i.y),a.hasClass(n,o.CLASS_NAME_RESET_ZOOM_BTN)||(h.isNull(this.dragStartIndexes)?this.dragStartIndexes=e?e.indexes:{}:this._showDragSelection(t.clientX)))},_adjustIndexRange:function(t,e){var i=[t,e].sort(function(t,e){return t-e}),n=i[1]-i[0];return 0===n?0===i[0]?i[1]+=2:(i[0]-=1,i[1]+=1):1===n&&(0===i[0]?i[1]+=1:i[0]-=1),i},_fireZoom:function(t,e){var i=t>e,n=this._adjustIndexRange(t,e),o=n[1]-n[0];this.prevDistanceOfRange!==o&&(this.prevDistanceOfRange=o,this.reverseMove=i,this.eventBus.fire("zoom",n))},_setIsShowTooltipAfterZoomFlag:function(t,e){var i=this._calculateLayerPosition(t,e,!1).x,n=this._calculateLayerPosition(t,e).x;this.isShowTooltipAfterZoom=i===n},_onMouseupAfterDrag:function(t){var e,i=this._findDataForZoomable(t.clientX,t.clientY);this._unbindDragEvent(),h.isNull(this.dragStartIndexes)?(e=t.target||t.srcElement,a.hasClass(e,o.CLASS_NAME_RESET_ZOOM_BTN)?(this._hideTooltip(),this.prevDistanceOfRange=null,this.eventBus.fire("resetZoom")):n.prototype._onClick.call(this,t)):this.dragStartIndexes&&i?(this.dragEndIndexes=i.indexes,this._setIsShowTooltipAfterZoomFlag(t.clientX,t.clientY),this._hideDragSelection(),this._fireZoom(this.dragStartIndexes.groupIndex,this.dragEndIndexes.groupIndex)):(this._setIsShowTooltipAfterZoomFlag(t.clientX,t.clientY),this._hideDragSelection()),this.startClientPosition=null,this.dragStartIndexes=null,this.startLayerX=null,this.afterMouseup=!0},_renderResetZoomBtn:function(){var t=a.create("DIV",o.CLASS_NAME_RESET_ZOOM_BTN);return t.innerHTML="Reset Zoom",t},zoom:function(t){this.prevFoundData=null,this.rerender(t),this._updateDimensionForDragSelection(this.dragSelectionElement),this.resetZoomBtn?t.isResetZoom&&(this.mouseEventDetectorContainer.removeChild(this.resetZoomBtn),this.resetZoomBtn=null):(this.resetZoomBtn=this._renderResetZoomBtn(),a.append(this.mouseEventDetectorContainer,this.resetZoomBtn))}};t.exports=l},function(t,e,i){"use strict";var n=i(11),o=i(10),a=i(6),r=Array.prototype.concat,s=a.defineClass({init:function(t){this.data=this._makeData(t),this.lastGroupIndex=0},_makeData:function(t){var e=0,i=t.length,s=a.map(t,function(t,r){var s=t.data.groupPositions||t.data.groupBounds,h=t.chartType;return(n.isLineTypeChart(h)||n.isRadialChart(h))&&(s=o.pivot(s)),e=Math.max(s.length-1,e),a.map(s,function(t,e){return a.map(t,function(t,n){var o=null;return t&&(o={chartType:h,indexes:{groupIndex:e,index:n},bound:t}),i>1&&(o.indexes.legendIndex=r),o})})});return s=r.apply([],s),this.lastGroupIndex=e,a.filter(r.apply([],s),function(t){return!!t})},findData:function(t,e){var i,n=1e5;return e=e||Number.MAX_VALUE,a.forEach(this.data,function(o){var a=t.x-o.bound.left,r=t.y-o.bound.top,s=Math.sqrt(Math.pow(a,2)+Math.pow(r,2));ss+n||er+o},_showTooltip:function(t,e){var i=t.indexes.groupIndex,n=(this.isVertical?this.layout.position.left:this.layout.position.top)-o.CHART_PADDING;this.tickBaseCoordinateModel.data.length>i&&(this.prevIndex=i,this.eventBus.fire("showTooltip",{index:i,range:this.tickBaseCoordinateModel.makeRange(i,n),size:this.dimension[this.sizeType],isVertical:this.isVertical,isMoving:e,silent:t.silent}))},_hideTooltip:function(t){t=t||{},this.eventBus.fire("hideTooltip",this.prevIndex,t),this.prevIndex=null},_onMousemove:function(t){var e,i;a.prototype._onMousemove.call(this,t),this.zoomable&&this._isAfterDragMouseup()||(e=this._findGroupData(t.clientX,t.clientY),i=e.indexes.groupIndex,i===-1?this._onMouseout(t):this.prevIndex!==i&&this._showTooltip(e))},_onMouseout:function(t){var e;e=this._calculateLayerPosition(t.clientX,t.clientY,!1),this._isOuterPosition(e.x,e.y)&&!s.isNull(this.prevIndex)&&this._hideTooltip(),a.prototype._onMouseout.call(this)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(69),a=i(8),r=i(11),s=i(9),h=i(6),l=h.defineClass(o,{init:function(){o.apply(this,arguments),this.prevFoundData=null,this.zoomHistory=[-1],this.historyBackBtn=null},_attachToEventBus:function(){o.prototype._attachToEventBus.call(this),this.eventBus.on("afterZoom",this.onAfterZoom,this)},_showTooltip:function(t){this.eventBus.fire("showTooltip",t)},_hideTooltip:function(t){t=t||{},this.eventBus.fire("hideTooltip",this.prevFoundData,t),this.prevFoundData=null,this.styleCursor(!1)},styleCursor:function(t){var e=this.mouseEventDetectorContainer;t?e.style.cursor="pointer":e.style.cursor="default"},_onMousemove:function(t){var e,i=this._calculateLayerPosition(t.clientX,t.clientY),n=this._findDataFromBoundsCoordinateModel(i);this._isChangedSelectData(this.prevFoundData,n)&&(this.prevFoundData&&this._hideTooltip(),this.prevFoundData=n,n&&(r.isTreemapChart(this.chartType)&&(e=this._getSeriesItemByIndexes(n.indexes),this.styleCursor(e.hasChild)),this._showTooltip(n)))},_zoomHistoryBack:function(){var t=this.zoomHistory[this.zoomHistory.length-2];this.zoomHistory.pop(),this.eventBus.fire("zoom",t),1===this.zoomHistory.length&&(this.mouseEventDetectorContainer.removeChild(this.historyBackBtn),this.historyBackBtn=null)},_getSeriesItemByIndexes:function(t){var e=this.dataProcessor.getSeriesDataModel(a.CHART_TYPE_TREEMAP);return e.getSeriesItem(t.groupIndex,t.index,!0)},_onClick:function(t){var e,i,n,h=t.target||t.srcElement;if(o.prototype._onClick.call(this,t),r.isTreemapChart(this.chartType)){if(s.hasClass(h,a.CLASS_NAME_RESET_ZOOM_BTN))return this._hideTooltip(),void this._zoomHistoryBack();if(e=this._calculateLayerPosition(t.clientX,t.clientY),i=this._findDataFromBoundsCoordinateModel(e)){if(n=this._getSeriesItemByIndexes(i.indexes),!n.hasChild)return;this._hideTooltip(),this.eventBus.fire("zoom",i.indexes.index)}}},_onMouseout:function(t){var e=this.mouseEventDetectorContainer.getBoundingClientRect(),i=t.clientX,n=t.clientY;e.left<=i&&e.top<=n&&e.right>=i&&e.bottom>=n||(this.prevFoundData&&this._hideTooltip(),o.prototype._onMouseout.call(this))},onAfterZoom:function(t){this.historyBackBtn||(this.historyBackBtn=s.create("DIV",a.CLASS_NAME_RESET_ZOOM_BTN),this.historyBackBtn.innerHTML="< Back",s.append(this.mouseEventDetectorContainer,this.historyBackBtn)),this.zoomHistory[this.zoomHistory.length-1]!==t&&this.zoomHistory.push(t)},findDataByIndexes:function(t){return this.boundsBaseCoordinateModel.findDataByIndexes(t)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="bar",t.chartBackground=i.chart.background,new l(t)}var o=i(80),a=i(81),r=i(8),s=i(11),h=i(6),l=h.defineClass(o,{init:function(){o.apply(this,arguments)},_makeBound:function(t,e,i,n,o){return{start:{top:i,left:n,width:0,height:e},end:{top:i,left:o,width:t,height:e}}},_calculateAdditionalLeft:function(t){ -var e=0;return this.options.divided&&t>0&&(e=this.dimensionMap.yAxis.width+r.OVERLAPPING_WIDTH),e},_makeBarChartBound:function(t,e,i,n,o){var a,r,s,h,l=t.baseBarSize*n.ratioDistance,c=this._calculateAdditionalLeft(n.value),u=t.baseBarSize*n.startRatio,d=t.basePosition+u+c,p=n.stack!==e.prevStack;return(!i||!this.options.diverging&&p)&&(a=i?this.dataProcessor.findStackIndex(n.stack):o,e.top=e.baseTop+t.pointInterval*a,e.plusLeft=0,e.minusLeft=0),n.value>=0?(r=d+e.plusLeft,e.plusLeft+=l):(e.minusLeft-=l,r=d+e.minusLeft),e.prevStack=n.stack,h=e.top+t.pointInterval-t.barSize/2,s=this._makeBound(l,t.barSize,h,d,r)},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.height,n.width);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.top,r={baseTop:a,top:a,plusLeft:0,minusLeft:0,prevStack:null},s=h.bind(t._makeBarChartBound,t,o,r,i);return e.map(s)})},_calculateTopPositionOfSumLabel:function(t,e){return t.top+(t.height-e+r.TEXT_PADDING)/2}});a.mixin(l),n.componentType="series",n.BarChartSeries=l,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=600,a=n.browser,r=a.msie&&7===a.version,s=i(8),h=i(9),l=i(11),c=i(7),u=i(31),d=i(5),p=n.defineClass({className:"tui-chart-series-area",init:function(t){var e=t.libType;this.chartType=t.chartType,this.seriesType=t.seriesType||t.chartType,this.componentType=t.componentType,this.dataProcessor=t.dataProcessor,this.eventBus=t.eventBus,this.chartBackground=t.chartBackground,this.options=t.options||{},this.orgTheme=this.theme=t.theme,this.graphRenderer=u.get(e,t.chartType),this.seriesContainer=null,this.seriesLabelContainer=null,this.seriesData=[],this.selectedLegendIndex=null,this.labelShowEffector=null,this.paper=null,this.limit=null,this.aligned=null,this.layout=null,this.dimensionMap=null,this.positionMap=null,this.axisDataMap=null,this.beforeAxisDataMap=null,this.drawingType=s.COMPONENT_TYPE_RAPHAEL,this._attachToEventBus()},_attachToEventBus:function(){var t=n.bind(function(){this.isInitRenderCompleted=!0,this.eventBus.off("load",t)},this);this.eventBus.on(s.PUBLIC_EVENT_PREFIX+"load",t),this.eventBus.on({selectLegend:this.onSelectLegend,selectSeries:this.onSelectSeries,unselectSeries:this.onUnselectSeries,hoverSeries:this.onHoverSeries,hoverOffSeries:this.onHoverOffSeries,showGroupAnimation:this.onShowGroupAnimation,hideGroupAnimation:this.onHideGroupAnimation},this),this.onShowTooltip&&this.eventBus.on("showTooltip",this.onShowTooltip,this),this.onShowGroupTooltipLine&&this.eventBus.on({showGroupTooltipLine:this.onShowGroupTooltipLine,hideGroupTooltipLine:this.onHideGroupTooltipLine},this),this.onClickSeries&&this.eventBus.on({clickSeries:this.onClickSeries,moveSeries:this.onMoveSeries},this)},_getSeriesDataModel:function(){return this.dataProcessor.getSeriesDataModel(this.seriesType)},_makeSeriesData:function(){},getSeriesData:function(){return this.seriesData},_renderSeriesLabel:function(){},_renderSeriesLabelArea:function(t){return this._renderSeriesLabel(t)},_sendBoundsToMouseEventDetector:function(t){this.eventBus.fire("receiveSeriesData",{chartType:this.chartType,data:t})},_renderSeriesArea:function(t,e){var i,n;i=this.dimensionMap.extendedSeries,this.seriesData=n=this._makeSeriesData(),this._sendBoundsToMouseEventDetector(n),(this.hasDataForRendering(n)||"map"===this.chartType)&&(e&&(this.seriesSet=e(i,n,t)),l.isShowLabel(this.options)&&(this.labelSet=this._renderSeriesLabelArea(t)))},_makeParamsForGraphRendering:function(t,e){return n.extend({dimension:t,position:this.layout.position,chartType:this.seriesType,theme:this.theme,options:this.options},e)},_renderGraph:function(t,e,i){var n=this._makeParamsForGraphRendering(t,e);return this.graphRenderer.render(i,n)},_setDataForRendering:function(t){this.paper=t.paper,this.limit=t.limitMap[this.chartType],t.axisDataMap&&t.axisDataMap.xAxis&&(this.aligned=t.axisDataMap.xAxis.aligned),this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.positionMap=t.positionMap,this.axisDataMap=t.axisDataMap},render:function(t){var e;this.paper=t.paper,this._setDataForRendering(t),this.beforeAxisDataMap=this.axisDataMap,t.checkedLegends&&(e=t.checkedLegends[this.seriesType],this.options.colorByPoint||(this.theme=this._getCheckedSeriesTheme(this.orgTheme,e))),this._renderSeriesArea(t.paper,n.bind(this._renderGraph,this)),this.paper.pushDownBackgroundToBottom&&this.paper.pushDownBackgroundToBottom()},_getCheckedSeriesTheme:function(t,e){var i;return e.length?(i=JSON.parse(JSON.stringify(t)),i.colors=n.filter(i.colors,function(t,i){return e[i]}),i):t},_clearSeriesContainer:function(){this.seriesSet&&this.seriesSet.remove&&this.seriesSet.remove(),this.labelSet&&this.labelSet.remove&&this.labelSet.remove(),this.seriesData=[]},rerender:function(t){var e;this._clearSeriesContainer(),this.dataProcessor.getGroupCount(this.seriesType)&&(t.checkedLegends&&(e=t.checkedLegends[this.seriesType],this.theme=this._getCheckedSeriesTheme(this.orgTheme,e)),this._setDataForRendering(t),this._renderSeriesArea(t.paper,n.bind(this._renderGraph,this)),this.labelShowEffector&&clearInterval(this.labelShowEffector.timerId),!e&&this.isInitRenderCompleted||this.animateComponent(!0),n.isNull(this.selectedLegendIndex)||this.graphRenderer.selectLegend(this.selectedLegendIndex))},_isLabelVisible:function(){return!(!this.options.showLabel&&!this.options.showLegend)},_resizeGraph:function(t,e){return this.graphRenderer.resize(n.extend({dimension:this.dimensionMap.chart},e)),this.seriesSet},resize:function(t){this._setDataForRendering(t),this.labelSet&&this.labelSet.remove&&this.labelSet.remove(),this._renderSeriesArea(t.paper,n.bind(this._resizeGraph,this))},_renderPosition:function(t,e){var i=c.isOldBrowser()?1:0;c.renderPosition(t,{top:e.top-i,left:e.left-2*i})},_getLimitDistanceFromZeroPoint:function(t,e){var i=e.min,n=e.max,o=n-i,a=0,r=0;return i<=0&&n>=0?(a=(o+i)/o*t,r=(o-n)/o*t):i>0&&(a=t),{toMax:a,toMin:r}},_findLabelElement:function(t){var e=null;return e=h.hasClass(t,s.CLASS_NAME_SERIES_LABEL)?t:h.findParentByClass(t,s.CLASS_NAME_SERIES_LABEL)},onHoverSeries:function(t,e){e===this.chartType&&this.graphRenderer.showAnimation&&this.graphRenderer.showAnimation(t)},onHoverOffSeries:function(t,e){e===this.chartType&&this.graphRenderer.hideAnimation&&t&&this.graphRenderer.hideAnimation(t)},onShowGroupAnimation:function(t){this.graphRenderer.showGroupAnimation&&this.graphRenderer.showGroupAnimation(t)},onHideGroupAnimation:function(t){this.graphRenderer.hideGroupAnimation&&this.graphRenderer.hideGroupAnimation(t)},animateComponent:function(t){this.graphRenderer.animate&&this.seriesSet?this.graphRenderer.animate(n.bind(this.animateSeriesLabelArea,this,t),this.seriesSet):this.animateSeriesLabelArea(t)},_fireLoadEvent:function(t){t||this.eventBus.fire(s.PUBLIC_EVENT_PREFIX+"load")},animateSeriesLabelArea:function(t){return this._isLabelVisible()?void(r?(this._fireLoadEvent(t),this.labelSet.attr({opacity:1})):this.labelSet&&this.labelSet.length&&d.animateOpacity(this.labelSet,0,1,o)):void this._fireLoadEvent(t)},_makeExportationSeriesData:function(t){var e,i=t.indexes,o=n.isExisty(i.legendIndex)?i.legendIndex:i.index,a=this.dataProcessor.getLegendItem(o),r=n.isExisty(i.groupIndex)?i.groupIndex:0,s=this._getSeriesDataModel().getSeriesItem(r,i.index);return n.isExisty(s)&&(e={chartType:a.chartType,legend:a.label,legendIndex:o},e.index=s.index),e},_executeGraphRenderer:function(t,e){var i,n=!1;return this.eventBus.fire("hideTooltipContainer"),this.seriesLabelContainer&&h.hasClass(this.seriesLabelContainer,"show")&&(h.removeClass(this.seriesLabelContainer,"show"),n=!0),i=this.graphRenderer[e](t),n&&h.addClass(this.seriesLabelContainer,"show"),this.eventBus.fire("showTooltipContainer"),i},onSelectSeries:function(t,e){var i;t.chartType===this.chartType&&(i=s.PUBLIC_EVENT_PREFIX+"selectSeries",this.eventBus.fire(i,this._makeExportationSeriesData(t)),e=!!n.isEmpty(e)||e,this.options.allowSelect&&this.graphRenderer.selectSeries&&e&&this.graphRenderer.selectSeries(t.indexes))},onUnselectSeries:function(t){var e;t.chartType===this.chartType&&(e=s.PUBLIC_EVENT_PREFIX+"unselectSeries",this.eventBus.fire(e,this._makeExportationSeriesData(t)),this.options.allowSelect&&this.graphRenderer.unselectSeries&&this.graphRenderer.unselectSeries(t.indexes))},onSelectLegend:function(t,e){this.seriesType===t||n.isNull(e)||(e=-1),this.selectedLegendIndex=e,this._getSeriesDataModel().getGroupCount()&&this.graphRenderer.selectLegend(e)},showLabel:function(){this.options.showLabel=!0,this.seriesLabelContainer||this._renderSeriesLabelArea(this.paper)},hideLabel:function(){this.options.showLabel=!1,this.seriesLabelContainer&&(h.removeClass(this.seriesLabelContainer,"show"),h.removeClass(this.seriesLabelContainer,"opacity"))},hasDataForRendering:function(t){return!(!t||!t.isAvailable())}});t.exports=p},function(t,e,i){"use strict";var n=i(8),o=i(82),a=i(11),r=i(44),s=i(7),h=i(5),l=i(6),c=.8,u=l.defineClass({_makeSeriesData:function(){var t=this._makeBounds(this.layout.dimension);return this.groupBounds=t,{groupBounds:t,seriesDataModel:this._getSeriesDataModel(),isAvailable:function(){return t&&t.length>0}}},_getBarWidthOptionSize:function(t,e){var i=0;return e&&(e/2>=t?e=2*t:e<0&&(e=0),i=e),i},_calculateAdditionalPosition:function(t,e,i){var n=0;return e&&e0&&(o=d?this.options.diverging?1:this.dataProcessor.getStackCount(this.seriesType):p.getFirstSeriesGroup().getSeriesItemCount(),l=f/(o+1),r=l*c,s=this.options.barWidth||this.options.pointWidth,r=this._getBarWidthOptionSize(l,s)||r,h=g+i,a.isColumnChart(this.chartType)&&(h=e-h),a.isBoxplotChart(this.chartType)&&g&&(h-=2*g),u={baseBarSize:e,groupSize:f,barSize:r,pointInterval:l,firstAdditionalPosition:l,basePosition:h}),u},_renderNormalSeriesLabel:function(t){var e,i=this.graphRenderer,n=this._getSeriesDataModel(),r=this.seriesData.groupBounds,s=this.theme.label,h=this.selectedLegendIndex,c=n.map(function(t){return t.map(function(t){var e={end:t.endLabel};return l.isExisty(t.start)&&(e.start=t.startLabel),e})});return e=a.isBarChart(this.chartType)?o.boundsToLabelPositionsForBarChart(n,r,s):o.boundsToLabelPositionsForColumnChart(n,r,s),i.renderSeriesLabel(t,e,c,s,h)},_makeSumValues:function(t){var e=r.sum(t);return s.formatValue({value:e,formatFunctions:this.dataProcessor.getFormatFunctions(),chartType:this.chartType,areaType:"series"})},_makeStackedLabelPosition:function(t){var e=t.left+t.width/2,i=t.top+t.height/2;return{left:e,top:i}},_makeStackedLabelPositions:function(t){var e=this,i=t.seriesGroup,n=i.map(function(i,n){var o,a=t.bounds[n];return a&&i&&(o=e._makeStackedLabelPosition(a.end)),{end:o}});return n},getGroupLabels:function(t,e,i){var n=a.isNormalStack(this.options.stackType);return t.map(function(t){var o,a=t.map(function(t){return{end:t.endLabel}});return n&&(e.push(r.sumPlusValues(t.pluck("value"))),o=r.sumMinusValues(t.pluck("value")),o<0&&i.push(o)),a})},getGroupPositions:function(t,e){var i=this;return t.map(function(t,n){return i._makeStackedLabelPositions({seriesGroup:t,bounds:e[n]})})},_renderStackedSeriesLabel:function(t){var e=this,i=[],o=[],r=this.theme.label,c=this.seriesData.groupBounds,u=this._getSeriesDataModel(),d=this.getGroupPositions(u,c),p=this.getGroupLabels(u,i,o),f=!0,m=a.isNormalStack(this.options.stackType),g=a.isBarChart(this.chartType),_=g?"width":"height",T=g?"left":"top",v=g?1:-1;return m&&(l.forEach(p,function(t,n){var a=i[n],r=o[n];r<0&&e.options.diverging&&(r*=-1),t.push({end:s.formatToComma(a)}),o.length&&t.push({end:s.formatToComma(r)})}),l.forEach(d,function(t,a){var s=c[a],l=s[s.length-1].end,u=s[Math.max(parseInt(s.length/2,10),1)-1].end,d=e._makeStackedLabelPosition(l),p=e._makeStackedLabelPosition(u),f=i[a],m=o[a],g=h.getRenderedTextSize(f,r.fontSize,r.fontFamily),x=h.getRenderedTextSize(m,r.fontSize,r.fontFamily),y=(l[_]+g[_])/2,A=(u[_]+x[_])/2;d[T]+=(y+n.LEGEND_LABEL_LEFT_PADDING)*v,p[T]-=(A+n.LEGEND_LABEL_LEFT_PADDING)*v,t.push({end:d}),o.length&&t.push({end:p})})),this.graphRenderer.renderSeriesLabel(t,d,p,r,f)},_renderSeriesLabel:function(t){var e;return e=this.options.stackType?this._renderStackedSeriesLabel(t):this._renderNormalSeriesLabel(t)}});u.mixin=function(t){l.extend(t.prototype,u.prototype)},t.exports=u},function(t,e,i){"use strict";var n=i(8),o=i(7),a=i(6),r={_calculateLeftPositionForCenterAlign:function(t){return t.left+t.width/2},_calculateTopPositionForMiddleAlign:function(t){return t.top+t.height/2},_makePositionForBoundType:function(t){return{left:this._calculateLeftPositionForCenterAlign(t),top:this._calculateTopPositionForMiddleAlign(t)}},_makePositionMap:function(t,e,i,n,o){var a=t.value,r=a>=0,s={end:o(e,i,t.endLabel||t.label,n,r)};return t.isRange&&(r=a<0,s.start=o(e,i,t.startLabel,n,r)),s},boundsToLabelPositions:function(t,e,i,r,s){var h=this,l=o.getRenderedLabelHeight(n.MAX_HEIGHT_WORLD,i);return r=r||a.bind(this._makePositionForBoundType,this),s=!!s,t.map(function(t,n){var o=e[n];return t.map(function(t,e){var n=o[e].end;return h._makePositionMap(t,n,l,i,r)})},s)},_makePositionForBarChart:function(t,e,i,a,r){var s=o.getRenderedLabelWidth(i,a),h=t.left;return r?h+=t.width+n.SERIES_LABEL_PADDING:h-=s+n.SERIES_LABEL_PADDING,{left:h,top:this._calculateTopPositionForMiddleAlign(t)}},boundsToLabelPositionsForBarChart:function(t,e,i){var n=a.bind(this._makePositionForBarChart,this);return this.boundsToLabelPositions(t,e,i,n)},_makePositionForColumnChart:function(t,e,i,o,a){var r=t.top;return a?r-=e+n.SERIES_LABEL_PADDING:r+=t.height+n.SERIES_LABEL_PADDING,{left:this._calculateLeftPositionForCenterAlign(t),top:r}},boundsToLabelPositionsForColumnChart:function(t,e,i){var n=a.bind(this._makePositionForColumnChart,this);return this.boundsToLabelPositions(t,e,i,n)},boundsToLabelPostionsForTreemap:function(t,e){var i=this,n=a.map(t,function(t){var n,o=e[t.id];return o&&(n=i._makePositionForBoundType(o)),n});return n}};t.exports=r},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="column",t.chartBackground=i.chart.background,new c(t)}var o=i(80),a=i(81),r=i(8),s=i(11),h=i(7),l=i(6),c=l.defineClass(o,{init:function(){o.apply(this,arguments)},_makeBound:function(t,e,i,n,o){return{start:{top:n,left:i,width:t,height:0},end:{top:o,left:i,width:t,height:e}}},_makeColumnChartBound:function(t,e,i,n,o){var a,s,h,l,c=Math.abs(t.baseBarSize*n.ratioDistance),u=t.baseBarSize*n.startRatio,d=t.basePosition+u+r.SERIES_EXPAND_SIZE,p=n.stack!==e.prevStack;return(!i||!this.options.diverging&&p)&&(a=i?this.dataProcessor.findStackIndex(n.stack):o,e.left=e.baseLeft+t.pointInterval*a,e.plusTop=0,e.minusTop=0),n.value>=0?(e.plusTop-=c,s=d+e.plusTop):(s=d+e.minusTop,e.minusTop+=c),e.prevStack=n.stack,l=e.left+t.pointInterval-t.barSize/2,h=this._makeBound(t.barSize,c,l,d,s)},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.width,n.height);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.left,r={baseLeft:a,left:a,plusTop:0,minusTop:0,prevStack:null},s=l.bind(t._makeColumnChartBound,t,o,r,i);return e.map(s)})},_calculateLeftPositionOfSumLabel:function(t,e){var i=h.getRenderedLabelWidth(e,this.theme.label);return t.left+(t.width-i+r.TEXT_PADDING)/2}});a.mixin(c),n.componentType="series",n.ColumnChartSeries=c,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="line",t.chartBackground=i.chart.background,new s(t)}var o=i(80),a=i(85),r=i(6),s=r.defineClass(o,{init:function(){o.apply(this,arguments),this.movingAnimation=null},_makePositions:function(t){return this._makeBasicPositions(t)},_makeSeriesData:function(){var t=this._makePositions();return{chartBackground:this.chartBackground,groupPositions:t,isAvailable:function(){return t&&t.length>0}}},rerender:function(t){var e;return this._cancelMovingAnimation(),e=o.prototype.rerender.call(this,t)}});a.mixin(s),n.componentType="series",t.exports=n},function(t,e,i){"use strict";var n=i(10),o=i(8),a=i(11),r=i(44),s=i(7),h=i(6),l=h.defineClass({_makePositionsForDefaultType:function(t){var e,i=this.layout.dimension,n=this._getSeriesDataModel(),o=t||i.width||0,a=i.height,r=n.getGroupCount(),s=this.layout.position.top,l=this.layout.position.left;return this.aligned?e=o/(r>1?r-1:r):(e=o/r,l+=e/2),n.map(function(t){return t.map(function(t,i){var n;return h.isNull(t.end)||(n={left:l+e*i,top:s+a-t.ratio*a},h.isExisty(t.startRatio)&&(n.startTop=s+a-t.startRatio*a)),n})},!0)},_makePositionForCoordinateType:function(t){var e=this.layout.dimension,i=this._getSeriesDataModel(),n=t||e.width||0,a=e.height,s=this.axisDataMap.xAxis,l=0,c=this.layout.position.top,u=this.layout.position.left;return s.sizeRatio&&(l=r.multiply(n,s.positionRatio),n=r.multiply(n,s.sizeRatio)),i.map(function(t){return t.map(function(t){var e;return h.isNull(t.end)||(e={left:u+t.ratioMap.x*n+l,top:c+a-t.ratioMap.y*a},h.isExisty(t.ratioMap.start)&&(e.startTop=a-t.ratioMap.start*a+o.SERIES_EXPAND_SIZE)),e})},!0)},_makeBasicPositions:function(t){var e;return e=this.dataProcessor.isCoordinateType()?this._makePositionForCoordinateType(t):this._makePositionsForDefaultType(t)},_calculateLabelPositionTop:function(t,e,i,n){var r,s=t.top;return r=a.isValidStackOption(this.options.stackType)?(t.startTop+s-i)/2+1:e>=0&&!n||e<0&&n?s-i-o.SERIES_LABEL_PADDING:s+o.SERIES_LABEL_PADDING},_makeLabelPosition:function(t,e,i,n,o){return{left:t.left,top:this._calculateLabelPositionTop(t,n,e/2,o)}},_getLabelPositions:function(t,e){var i=this,a=n.pivot(this.seriesData.groupPositions),r=s.getRenderedLabelHeight(o.MAX_HEIGHT_WORLD,e);return t.map(function(t,e){return t.map(function(t,n){var o=a[e][n],s=i._makeLabelPosition(o,r,t.endLabel,t.end),h={end:s};return t.isRange&&(o.top=o.startTop,h.start=i._makeLabelPosition(o,r,t.startLabel,t.start)),h})})},_getLabelTexts:function(t){return t.map(function(t){return t.map(function(t){var e={end:t.endLabel};return t.isRange&&(e.start=t.startLabel),e})})},_renderSeriesLabel:function(t){var e=this.theme.label,i=this._getSeriesDataModel(),n=this._getLabelTexts(i),o=this._getLabelPositions(i,e);return this.graphRenderer.renderSeriesLabel(t,o,n,e)},onShowGroupTooltipLine:function(t){this.graphRenderer.showGroupTooltipLine&&this.graphRenderer.showGroupTooltipLine(t,this.layout)},onHideGroupTooltipLine:function(){this.seriesData&&this.seriesData.isAvailable()&&this.graphRenderer.hideGroupTooltipLine&&this.graphRenderer.hideGroupTooltipLine()},zoom:function(t){this._cancelMovingAnimation(),this._clearSeriesContainer(t.paper),this._setDataForRendering(t),this._renderSeriesArea(t.paper,h.bind(this._renderGraph,this)),this.animateComponent(!0),h.isNull(this.selectedLegendIndex)||this.graphRenderer.selectLegend(this.selectedLegendIndex)},_isChangedLimit:function(t,e){return t.min!==e.min||t.max!==e.max},_isChangedAxisLimit:function(){var t=this.beforeAxisDataMap,e=this.axisDataMap,i=!0;return t&&(i=this._isChangedLimit(t.yAxis.limit,e.yAxis.limit),e.xAxis.limit&&(i=i||this._isChangedLimit(t.xAxis.limit,e.xAxis.limit))),this.beforeAxisDataMap=e,i},_animate:function(t){var e=this,i=o.ADDING_DATA_ANIMATION_DURATION,n=this._isChangedAxisLimit();n&&this.seriesLabelContainer&&(this.seriesLabelContainer.innerHTML=""),t&&(this.movingAnimation=s.startAnimation(i,t,function(){e.movingAnimation=null}))},_makeZeroTopForAddingData:function(){var t=this.layout.dimension.height,e=this.axisDataMap.yAxis.limit;return this._getLimitDistanceFromZeroPoint(t,e).toMax+o.SERIES_EXPAND_SIZE},animateForAddingData:function(t){var e,i,n,o,a=this.dimensionMap.extendedSeries,r=this.layout.dimension.width,s=t.tickSize,h=this.options.shifting;this.limit=t.limitMap[this.chartType],this.axisDataMap=t.axisDataMap,e=this._makeSeriesData(),i=this._makeParamsForGraphRendering(a,e),h&&(r+=s),n=this._makePositions(r),o=this._makeZeroTopForAddingData(),this.graphRenderer.animateForAddingData(i,s,n,h,o)},_cancelMovingAnimation:function(){this.movingAnimation&&(cancelAnimationFrame(this.movingAnimation.id),this.movingAnimation=null)}});l.mixin=function(t){h.extend(t.prototype,l.prototype)},t.exports=l},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.chartType,i=t.chartOptions.libType,n=t.chartTheme;return t.libType=i,t.chartType=e,t.chartBackground=n.background,new h(t)}var o=i(80),a=i(8),r=i(48),s=i(6),h=s.defineClass(o,{init:function(){o.apply(this,arguments),this.options=s.extend({showDot:!0,showArea:!0},this.options),this.movingAnimation=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL},_makePositionsForRadial:function(t,e){var i,n=this.layout,o=n.dimension,h=o.width-a.RADIAL_PLOT_PADDING-a.RADIAL_MARGIN_FOR_CATEGORY,l=o.height-a.RADIAL_PLOT_PADDING-a.RADIAL_MARGIN_FOR_CATEGORY,c=h/2+a.RADIAL_PLOT_PADDING/2+a.RADIAL_MARGIN_FOR_CATEGORY/2+n.position.left,u=l/2-a.RADIAL_PLOT_PADDING/2-a.RADIAL_MARGIN_FOR_CATEGORY/2-n.position.top,d=360/e;return i=Math.min(h,l)/2,s.map(t,function(t){var e=s.map(t,function(t,e){var n,o,a,h,p;return s.isNull(t.end)||(p=t.ratio*i,o=u+p,a=360-d*e,h=r.rotatePointAroundOrigin(c,u,c,o,a),n={left:h.x,top:l-h.y}),n});return e.push(e[0]),e},!0)},_getSeriesGroups:function(){var t=this._getSeriesDataModel();return t.map(function(t){return t.map(function(t){return t})},!0)},_makeSeriesData:function(){var t=this._getSeriesGroups(),e=this._makePositionsForRadial(t,this._getSeriesDataModel().getGroupCount());return{groupPositions:e,isAvailable:function(){return e&&e.length>0}}},rerender:function(t){return o.prototype.rerender.call(this,t)}});n.componentType="series",n.RadialChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="area",t.chartBackground=i.chart.background,new h(t)}var o=i(80),a=i(85),r=i(11),s=i(6),h=s.defineClass(o,{init:function(){o.apply(this,arguments),this.movingAnimation=null},_makePositionTopOfZeroPoint:function(){var t=this.layout.dimension,e=this.axisDataMap.yAxis.limit,i=this.layout.position.top,n=this._getLimitDistanceFromZeroPoint(t.height,e).toMax+i;return e.min>=0&&!n&&(n=t.height),n},_makeStackedPositions:function(t){var e=this.layout.dimension.height,i=this.layout.position.top,n=this._makePositionTopOfZeroPoint(),o=[];return s.map(t,function(t){return s.map(t,function(t,a){var r=o[a]||n,s=t?t.top:0,h=e-s+i,l=t?r-h:r;return t&&(t.startTop=r,t.top=l),o[a]=l,t})})},_makePositions:function(t){var e=this._makeBasicPositions(t);return r.isValidStackOption(this.options.stackType)&&(e=this._makeStackedPositions(e)),e},_makeSeriesData:function(){var t=this.layout.dimension,e=this.layout.position.top,i=this._getLimitDistanceFromZeroPoint(t.height,this.limit).toMax+e,n=this._makePositions();return{chartBackground:this.chartBackground,groupPositions:n,hasRangeData:this._getSeriesDataModel().hasRangeData(),zeroTop:i,isAvailable:function(){return n&&n.length>0}}},rerender:function(t){var e;return this._cancelMovingAnimation(),e=o.prototype.rerender.call(this,t)}});a.mixin(h),n.componentType="series",n.AreaChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="bubble",t.chartBackground=i.chart.background,new h(t)}var o=i(8),a=i(80),r=i(89),s=i(6),h=s.defineClass(a,{init:function(){this.prevClickedIndex=null,this.maxRadius=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL,a.apply(this,arguments)},_calculateStep:function(){var t,e,i,n=0,o=this.dataProcessor.isXCountGreaterThanYCount(this.chartType);return this.dataProcessor.hasCategories(o)&&(t=this.layout.dimension,i=this.dataProcessor.getCategoryCount(o),e=o?t.height:t.width,n=e/i),n},_makeBound:function(t,e,i){var n=this.layout.dimension,o=this.layout.position,a=s.isExisty(t.x)?t.x*n.width:e,r=s.isExisty(t.y)?t.y*n.height:e;return{left:o.left+a,top:o.top+n.height-r,radius:Math.max(i*t.r,2)}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=this.maxRadius,n=this._calculateStep(),o=n?n/2:0;return e.map(function(e,a){var r=o+n*a;return e.map(function(e){var n=e&&e.ratioMap;return n?t._makeBound(e.ratioMap,r,i):null})})},_setDataForRendering:function(t){this.maxRadius=t.maxRadius,a.prototype._setDataForRendering.call(this,t)}});r.mixin(h),n.componentType="series",n.BubbleChartSeries=h,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=n.defineClass({_makeSeriesData:function(){var t=this._makeBounds();return{groupBounds:t,seriesDataModel:this._getSeriesDataModel(),isAvailable:function(){return t&&t.length>0}}},showTooltip:function(t,e,i,o,a){this.eventBus.fire("showTooltip",n.extend({indexes:{groupIndex:i,index:o},mousePosition:a},t))},hideTooltip:function(){this.eventBus.fire("hideTooltip")},_renderGraph:function(t,e,i){var o=n.bind(this.showTooltip,this,{chartType:this.chartType}),a={showTooltip:o,hideTooltip:n.bind(this.hideTooltip,this)},r=this._makeParamsForGraphRendering(t,e);return this.graphRenderer.render(i,r,a)},onClickSeries:function(t){var e,i=this._executeGraphRenderer(t,"findIndexes"),n=this.prevClickedIndexes,o=this.options.allowSelect;i&&n&&(this.onUnselectSeries({indexes:n}),this.prevClickedIndexes=null),i&&(e=!n||i.index!==n.index||i.groupIndex!==n.groupIndex,o&&!e||(this.onSelectSeries({chartType:this.chartType,indexes:i},e),o&&(this.prevClickedIndexes=i)))},onMoveSeries:function(t){this._executeGraphRenderer(t,"moveMouseOnSeries")}});o.mixin=function(t){n.extend(t.prototype,o.prototype)},t.exports=o},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="scatter",t.chartBackground=i.chart.background,new h(t)}var o=i(80),a=i(89),r=i(8),s=i(6),h=s.defineClass(o,{init:function(){this.prevClickedIndex=null,o.apply(this,arguments)},_makeBound:function(t){var e=this.layout.dimension,i=this.layout.position;return{left:i.left+t.x*e.width,top:e.height-t.y*e.height+i.top,radius:r.SCATTER_RADIUS}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel();return e.map(function(e){return e.map(function(e){var i=e&&e.ratioMap;return i?t._makeBound(e.ratioMap):null})})}});a.mixin(h),n.componentType="series",n.ScatterChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType;return t.libType=e,t.chartType="map",new l(t)}var o=i(80),a=i(8),r=i(6),s=r.browser,h=s.msie&&s.version<=8,l=r.defineClass(o,{init:function(t){this.basePosition={left:0,top:0},this.zoomMagn=1,this.mapRatio=1,this.graphDimension={},this.limitPosition={},this.mapModel=t.mapModel,this.colorSpectrum=t.colorSpectrum,this.prevPosition=null,this.prevMovedIndex=null,this.isDrag=!1,this.startPosition=null,o.call(this,t)},_attachToEventBus:function(){o.prototype._attachToEventBus.call(this),h||this.eventBus.on({dragStartMapSeries:this.onDragStartMapSeries,dragMapSeries:this.onDragMapSeries,dragEndMapSeries:this.onDragEndMapSeries,zoomMap:this.onZoomMap},this)},_setMapRatio:function(t){var e=this.layout.dimension,i=t||this.mapModel.getMapDimension(),n=e.width/i.width,o=e.height/i.height;this.mapRatio=Math.min(n,o)},_setGraphDimension:function(){var t=this.layout.dimension;this.graphDimension={width:t.width*this.zoomMagn,height:t.height*this.zoomMagn}},render:function(t){o.prototype.render.call(this,t),this._setMapRatio()},_setLimitPositionToMoveMap:function(){var t=this.layout.dimension,e=this.graphDimension;this.limitPosition={left:t.width-e.width,top:t.height-e.height}},_renderGraph:function(){this._setGraphDimension(),this._setLimitPositionToMoveMap(),this.graphRenderer.render(this.paper,{colorSpectrum:this.colorSpectrum,mapModel:this.mapModel,layout:this.layout,theme:this.theme})},_renderSeriesLabel:function(){var t=this.mapModel.getLabelData(this.zoomMagn*this.mapRatio);return this.graphRenderer.renderSeriesLabels(this.paper,t,this.theme.label)},_renderSeriesArea:function(t,e,i){o.prototype._renderSeriesArea.call(this,t,e,i)},_adjustMapPosition:function(t){return{left:Math.max(Math.min(t.left,0),this.limitPosition.left),top:Math.max(Math.min(t.top,0),this.limitPosition.top)}},_updateBasePositionForZoom:function(t,e,i){var n=this.basePosition,o=n.left-e.left/2,a=n.top-e.top/2,r={left:o*i+this.limitPosition.left/2,top:a*i+this.limitPosition.top/2};this.basePosition=this._adjustMapPosition(r)},_zoom:function(t,e){var i=this.graphDimension,n=this.limitPosition;this._setGraphDimension(),this._setLimitPositionToMoveMap(),this._updateBasePositionForZoom(i,n,t),this._setMapRatio(this.graphDimension),this.graphRenderer.scaleMapPaths(t,e,this.mapRatio,i,i)},_updatePositionsToResize:function(t){var e=this.mapRatio/t;this.basePosition.left*=e,this.basePosition.top*=e,this.limitPosition.left*=e,this.limitPosition.top*=e},onClickSeries:function(t){var e=this._executeGraphRenderer(t,"findSectorIndex");r.isNull(e)||this.eventBus.fire("selectSeries",{chartType:this.chartType,index:e,code:this.mapModel.getDatum(e).code})},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},_showWedge:function(t){var e=this.mapModel.getDatum(t);r.isUndefined(e.ratio)||this.eventBus.fire("showWedge",e.ratio)},_showTooltip:function(t,e){this.eventBus.fire("showTooltip",{chartType:this.chartType,indexes:{index:t},mousePosition:{left:e.left,top:e.top-a.TOOLTIP_GAP}})},onMoveSeries:function(t){var e=this._executeGraphRenderer(t,"findSectorIndex");r.isNull(e)?r.isNull(this.prevMovedIndex)||(this.graphRenderer.restoreColor(this.prevMovedIndex),this.eventBus.fire("hideTooltip"),this.prevMovedIndex=null):(this.prevMovedIndex!==e&&(r.isNull(this.prevMovedIndex)||(this.graphRenderer.restoreColor(this.prevMovedIndex),this.eventBus.fire("hideTooltip")),this.graphRenderer.changeColor(e)),this._isChangedPosition(this.prevPosition,t)&&(this._showTooltip(e,{left:t.left,top:t.top}),this.prevMovedIndex=e),this._showWedge(e)),this.prevPosition=t},onDragStartMapSeries:function(t){this.startPosition={left:t.left,top:t.top}},_movePosition:function(t,e){var i={x:(e.left-t.left)*this.mapRatio,y:(e.top-t.top)*this.mapRatio};this.graphRenderer.moveMapPaths(i,this.graphDimension)},onDragMapSeries:function(t){this._movePosition(this.startPosition,t),this.startPosition=t,this.isDrag||(this.isDrag=!0,this.eventBus.fire("hideTooltip"))},onDragEndMapSeries:function(){this.isDrag=!1},onZoomMap:function(t,e){var i=t/this.zoomMagn,n=this.layout.position,o=e?e:{left:this.layout.dimension.width/2,top:this.layout.dimension.height/2};this.zoomMagn=t,this._zoom(i,{left:o.left-n.left,top:o.top-n.top}),this.eventBus.fire(a.PUBLIC_EVENT_PREFIX+"zoom",t)},_makeExportationSeriesData:function(t){return t}});n.componentType="series",n.MapChartSeries=l,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme,n=t.chartOptions.chartType,o=t.chartOptions.legend;return t.libType=e,t.chartType="pie","combo"===n&&(t.seriesType=t.name.split("Series")[0],t.isCombo=!0),o&&(t.legendMaxWidth=o.maxWidth),t.chartBackground=i.chart.background,new l(t)}var o=i(80),a=i(8),r=i(11),s=i(6),h=i(5),l=s.defineClass(o,{init:function(t){o.call(this,t),this.isCombo=!!t.isCombo,this.isShowOuterLabel=r.isShowOuterLabel(this.options),this.quadrantRange=null,this.prevClickedIndex=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL,this.legendMaxWidth=t.legendMaxWidth,this._setDefaultOptions()},_makeValidAngle:function(t,e){return s.isUndefined(t)?t=e:t<0?t=a.ANGLE_360-Math.abs(t)%a.ANGLE_360:t>0&&(t%=a.ANGLE_360),t},_transformRadiusRange:function(t){ -return t=t||["0%","100%"],s.map(t,function(t){var e=.01*parseInt(t,10);return Math.max(Math.min(e,1),0)})},_setDefaultOptions:function(){var t=this.options;t.startAngle=this._makeValidAngle(t.startAngle,0),t.endAngle=this._makeValidAngle(t.endAngle,t.startAngle),t.radiusRange=this._transformRadiusRange(t.radiusRange),1===t.radiusRange.length&&t.radiusRange.unshift(0)},_calculateAngleForRendering:function(){var t,e=this.options.startAngle,i=this.options.endAngle;return t=ei?a.ANGLE_360-(e-i):a.ANGLE_360},_makeSectorData:function(t){var e,i=this,n=this._getSeriesDataModel().getFirstSeriesGroup(),o=t.cx,a=t.cy,r=t.r,h=this.options.startAngle,l=this._calculateAngleForRendering(),c=10,u=this.options.radiusRange[0],d=.5*r;return u&&(d+=d*u),n?e=n.map(function(t){var e=t?t.ratio:0,n=l*e,u=h+n,p=h+n/2,f={start:{startAngle:h,endAngle:h},end:{startAngle:h,endAngle:u}},m={cx:o,cy:a,angle:p};return h=u,{ratio:e,angles:f,centerPosition:i._getArcPosition(s.extend({r:d},m)),outerPosition:{start:i._getArcPosition(s.extend({r:r},m)),middle:i._getArcPosition(s.extend({r:r+c},m))}}}):null},_makeSeriesData:function(){var t=this._makeCircleBound(),e=this._makeSectorData(t);return{chartBackground:this.chartBackground,circleBound:t,sectorData:e,isAvailable:function(){return e&&e.length>0}}},_getQuadrantFromAngle:function(t,e){var i=parseInt(t/a.ANGLE_90,10)+1;return e&&t%a.ANGLE_90===0&&(i+=1===i?3:-1),i},_getRangeForQuadrant:function(){return this.quadrantRange||(this.quadrantRange={start:this._getQuadrantFromAngle(this.options.startAngle),end:this._getQuadrantFromAngle(this.options.endAngle,!0)}),this.quadrantRange},_isInQuadrantRange:function(t,e){var i=this._getRangeForQuadrant();return i.start===t&&i.end===e},_calculateBaseSize:function(){var t,e=this.layout.dimension,i=e.width,n=e.height;return this.isCombo||(t=this._getRangeForQuadrant(),this._isInQuadrantRange(2,3)||this._isInQuadrantRange(4,1)?n*=2:this._isInQuadrantRange(1,2)||this._isInQuadrantRange(3,4)?i*=2:t.start===t.end&&(i*=2,n*=2)),Math.min(i,n)},_calculateRadius:function(){var t=this.isShowOuterLabel?a.PIE_GRAPH_SMALL_RATIO:a.PIE_GRAPH_DEFAULT_RATIO,e=this._calculateBaseSize();return e*t*this.options.radiusRange[1]/2},_calculateCenterXY:function(t){var e=this.layout.dimension,i=this.layout.position,n=t/2,o=e.width/2+i.left,a=e.height/2+i.top;return this.isCombo||(this._isInQuadrantRange(1,1)?(o-=n,a+=n):this._isInQuadrantRange(1,2)?o-=n:this._isInQuadrantRange(2,2)?(o-=n,a-=n):this._isInQuadrantRange(2,3)?a-=n:this._isInQuadrantRange(3,3)?(o+=n,a-=n):this._isInQuadrantRange(3,4)?o+=n:this._isInQuadrantRange(4,1)?a+=n:this._isInQuadrantRange(4,4)&&(o+=n,a+=n)),{cx:o,cy:a}},_makeCircleBound:function(){var t=this._calculateRadius(),e=this._calculateCenterXY(t);return s.extend({r:t},e)},_getArcPosition:function(t){return{left:t.cx+t.r*Math.sin(t.angle*a.RAD),top:t.cy-t.r*Math.cos(t.angle*a.RAD)}},_renderGraph:function(t,e,i){var n=s.bind(this.showTooltip,this,{allowNegativeTooltip:!!this.allowNegativeTooltip,seriesType:this.seriesType,chartType:this.chartType}),o={showTooltip:n,hideTooltip:s.bind(this.hideTooltip,this)},a=this._makeParamsForGraphRendering(t,e),r=this.seriesType,h=this.dataProcessor.seriesDataModelMap,l=[],c=0;return s.forEach(this.dataProcessor.seriesTypes,function(t){var e=!0;return t!==r?l.push(t):e=!1,e}),s.forEach(l,function(t){c+=h[t].baseGroups.length}),a.additionalIndex=c,this.graphRenderer.render(i,a,o)},resize:function(){o.prototype.resize.apply(this,arguments),this._moveLegendLines()},showTooltip:function(t,e,i,n,o){this.eventBus.fire("showTooltip",s.extend({indexes:{groupIndex:i,index:n},mousePosition:o},t))},hideTooltip:function(){this.eventBus.fire("hideTooltip")},_makeSeriesDataBySelection:function(t){return{indexes:{index:t,groupIndex:t}}},_getSeriesLabel:function(t,e){var i="";return this.options.showLegend&&(i=h.getEllipsisText(t,this.legendMaxWidth,this.theme.label)),this.options.showLabel&&(i+=(i?a.LABEL_SEPARATOR:"")+e),i},_pickPositionsFromSectorData:function(t){return s.map(this.seriesData.sectorData,function(e){return e.ratio?e[t]:null})},_addEndPosition:function(t,e){s.forEachArray(e,function(e){var i;e&&(i=s.extend({},e.middle),i.left-1&&e!==o,a&&!i||(this.onSelectSeries({chartType:this.chartType,indexes:{index:e,legendIndex:n.legendIndex}},i),a&&e>-1&&(this.prevClickedIndex=e)))},onMoveSeries:function(t){this._executeGraphRenderer(t,"moveMouseOnSeries")}});n.componentType="series",n.PieChartSeries=l,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType;return t.libType=e,t.chartType="heatmap",new s(t)}var o=i(80),a=i(82),r=i(6),s=r.defineClass(o,{init:function(t){this.colorSpectrum=t.colorSpectrum,o.call(this,t)},_makeSeriesData:function(){var t=this._makeBounds(),e=this._getSeriesDataModel();return{colorSpectrum:this.colorSpectrum,groupBounds:t,seriesDataModel:e,isAvailable:function(){return t&&t.length>0}}},_makeBound:function(t,e,i,n){var o=this.layout.dimension.height,a=t*i+this.layout.position.left,r=o-e*(n+1)+this.layout.position.top;return{end:{left:a,top:r,width:t,height:e}}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=this.layout.dimension,n=i.width/this.dataProcessor.getCategoryCount(!1),o=i.height/this.dataProcessor.getCategoryCount(!0);return e.map(function(e,i){return e.map(function(e,a){return t._makeBound(n,o,i,a)})})},onShowTooltip:function(t){var e=this._getSeriesDataModel(),i=t.indexes,n=e.getSeriesItem(i.groupIndex,i.index).ratio;this.eventBus.fire("showWedge",n)},_renderSeriesLabel:function(t){var e=this._getSeriesDataModel(),i=this.seriesData.groupBounds,n=this.theme.label,o=this.selectedLegendIndex,r=a.boundsToLabelPositions(e,i,n),s=e.map(function(t){return t.valuesMap.value});return this.graphRenderer.renderSeriesLabel(t,r,s,n,o)},resize:function(){this.boundMap=null,o.prototype.resize.apply(this,arguments)},_makeExportationSeriesData:function(t){return{x:t.indexes.groupIndex,y:t.indexes.index}}});n.componentType="series",n.HeatmapChartSeries=s,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="treemap",t.chartBackground=i.chart.background,new c(t)}var o=i(80),a=i(95),r=i(82),s=i(8),h=i(11),l=i(6),c=l.defineClass(o,{init:function(t){o.call(this,t),this.theme.borderColor=this.theme.borderColor||s.TREEMAP_DEFAULT_BORDER,this.rootId=s.TREEMAP_ROOT_ID,this.startDepth=1,this.selectedGroup=null,this.boundMap=null,this.colorSpectrum=t.colorSpectrum,this._initOptions()},_initOptions:function(){this.options.useColorValue=!!this.options.useColorValue,l.isUndefined(this.options.zoomable)&&(this.options.zoomable=!this.options.useColorValue),l.isUndefined(this.options.useLeafLabel)&&(this.options.useLeafLabel=!this.options.zoomable)},_makeSeriesData:function(){var t=this._getBoundMap(),e=this._makeBounds(t);return{boundMap:t,groupBounds:e,seriesDataModel:this._getSeriesDataModel(),startDepth:this.startDepth,isPivot:!0,colorSpectrum:this.options.useColorValue?this.colorSpectrum:null,chartBackground:this.chartBackground,zoomable:this.options.zoomable,isAvailable:function(){return e&&e.length>0}}},_makeBoundMap:function(t,e,i){var n,o=this,r=this._getSeriesDataModel(),s=l.extend({},this.layout.dimension,this.layout.position);return i=i||s,n=r.findSeriesItemsByParent(t),e=l.extend(e||{},a.squarify(i,n)),l.forEachArray(n,function(t){e=o._makeBoundMap(t.id,e,e[t.id])}),e},_makeBounds:function(t){var e,i=this.startDepth,n=this._getSeriesDataModel();return e=this.options.zoomable?function(t){return t.depth===i}:function(t){return!t.hasChild},n.map(function(i){return i.map(function(i){var n=t[i.id],o=null;return n&&e(i)&&(o={end:n}),o},!0)},!0)},_getBoundMap:function(){return this.boundMap||(this.boundMap=this._makeBoundMap(this.rootId)),this.boundMap},_shouldDimmed:function(t,e,i){var n,o=!1;return e&&i.id!==e.id&&i.group===e.group&&(n=t.findParentByDepth(i.id,e.depth+1),n&&n.parent===e.id&&(o=!0)),o},_renderSeriesLabel:function(t){var e,i,n,o=this._getSeriesDataModel(),a=this._getBoundMap(),s=this.theme.label,h=this.options.labelTemplate;return i=this.options.useLeafLabel?o.findLeafSeriesItems(this.selectedGroup):o.findSeriesItemsByDepth(this.startDepth,this.selectedGroup),n=l.map(i,function(t){var e=h?h(t.pickLabelTemplateData()):t.label;return e}),e=r.boundsToLabelPostionsForTreemap(i,a,s),this.graphRenderer.renderSeriesLabelForTreemap(t,e,n,s)},resize:function(){this.boundMap=null,o.prototype.resize.apply(this,arguments)},_zoom:function(t,e,i){this._clearSeriesContainer(),this.boundMap=null,this.rootId=t,this.startDepth=e,this.selectedGroup=i,this._renderSeriesArea(this.paper,l.bind(this._renderGraph,this))},zoom:function(t){var e,i,n=t.index;return this.labelSet.remove(),n===-1?void this._zoom(s.TREEMAP_ROOT_ID,1,null):(e=this._getSeriesDataModel(),i=e.getSeriesItem(0,n,!0),void(i&&i.hasChild&&(this._zoom(i.id,i.depth+1,i.group),this.eventBus.fire("afterZoom",n))))},_makeExportationSeriesData:function(t){var e=t.indexes,i=this._getSeriesDataModel().getSeriesItem(e.groupIndex,e.index,!0);return l.extend({chartType:this.chartType,indexes:i.indexes})},onHoverSeries:function(t){h.isShowLabel(this.options)&&this.graphRenderer.showAnimation(t,this.options.useColorValue,.6)},onHoverOffSeries:function(t){h.isShowLabel(this.options)&&t&&this.graphRenderer.hideAnimation(t,this.options.useColorValue)},onShowTooltip:function(t){var e=this._getSeriesDataModel(),i=t.indexes,n=e.getSeriesItem(i.groupIndex,i.index,!0).colorRatio;n>-1&&this.eventBus.fire("showWedge",n)}});n.componentType="series",n.TreemapChartSeries=c,t.exports=n},function(t,e,i){"use strict";var n=i(44),o=i(10),a=i(6),r={boundMap:{},_makeBaseBound:function(t){return a.extend({},t)},_calculateScale:function(t,e,i){return e*i/n.sum(t)},_makeBaseData:function(t,e,i){var n=this._calculateScale(a.pluck(t,"value"),e,i),o=a.map(t,function(t){return{id:t.id,weight:t.value*n}}).sort(function(t,e){return e.weight-t.weight});return o},_worst:function(t,e,i,n){var o=t*t,a=n*n;return Math.max(a*i/o,o/(a*e))},_changedStackDirection:function(t,e,i,n){var a=o.min(e),r=o.max(e),s=this._worst(t,a,r,i),h=this._worst(t+n,Math.min(a,n),Math.max(r,n),i);return h>=s},_isVerticalStack:function(t){return t.height=0?(e.plusTop-=u,s=p+e.plusTop):(s=p+e.minusTop,e.minusTop+=u),h=e.left+t.pointInterval-t.barSize/2,c=l.map(n.outliers,function(e){return{top:t.baseBarSize*(1-e.ratio)+f,left:h+t.barSize/2}}),{start:{top:p,left:h,width:t.barSize,height:0},end:{top:s,left:h,width:t.barSize,height:u},min:{top:t.baseBarSize*(1-n.minRatio)+f,left:h,width:t.barSize,height:0},max:{top:t.baseBarSize*(1-n.maxRatio)+f,left:h,width:t.barSize,height:0},median:{top:t.baseBarSize*(1-n.medianRatio)+f,left:h,width:t.barSize,height:0},outliers:c}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.width,n.height);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.left,r={baseLeft:a,left:a,plusTop:0,minusTop:0,prevStack:null},s=l.bind(t._makeBoxplotChartBound,t,o,r,i);return e.map(s)})},_calculateLeftPositionOfSumLabel:function(t,e){var i=h.getRenderedLabelWidth(e,this.theme.label);return t.left+(t.width-i+r.TEXT_PADDING)/2}});a.mixin(c),n.componentType="series",n.BoxplotChartSeries=c,t.exports=n},function(t,e,i){"use strict";function n(t){return new u(t)}var o=i(6),a=o.browser.msie&&o.browser.version<=8,r=i(98),s=i(8),h=i(9),l=i(7),c=i(54),u=o.defineClass({className:"tui-chart-zoom-area",init:function(t){this.eventBus=t.eventBus,this.magn=1,this.stackedWheelDelta=0,this.drawingType=s.COMPONENT_TYPE_DOM,this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on("wheel",this.onWheel,this)},render:function(t){var e;return a||(e=h.create("DIV",this.className),e.innerHTML+=r.ZOOM_BUTTONS,l.renderPosition(e,t.positionMap.series),this._attachEvent(e)),e},_findBtnElement:function(t){var e="tui-chart-zoom-btn",i=t;return h.hasClass(t,e)||(i=h.findParentByClass(t,e)),i},_zoom:function(t,e){this.eventBus.fire("zoomMap",t,e)},_onClick:function(t){var e=t.target||t.srcElement,i=this._findBtnElement(e),n=i.getAttribute("data-magn"),o=this._calculateMagn(n);return o>5?this.magn=5:o<1?this.magn=1:o>=1&&this._zoom(o),t.preventDefault&&t.preventDefault(),!1},_attachEvent:function(t){c.on(t,"click",this._onClick,this)},_calculateMagn:function(t){return t>0?this.magn+=.1:t<0&&(this.magn-=.1),this.magn},onWheel:function(t,e){var i=this._calculateMagn(t);i>5?this.magn=5:i<1?this.magn=1:i>=1&&this._zoom(i,e)}});n.componentType="zoom",t.exports=n},function(t,e,i){"use strict";var n=i(64),o={HTML_SERIES_LABEL:'
{{ label }}
',TEXT_CSS_TEXT:"left:{{ left }}px;top:{{ top }}px;font-family:{{ fontFamily }};font-size:{{ fontSize }}px;font-weight:{{ fontWeight }}{{opacity}}",TEXT_CSS_TEXT_FOR_LINE_TYPE:"left:{{ left }}%;top:{{ top }}%;font-family:{{ fontFamily }};font-size:{{ fontSize }}px;font-weight:{{ fontWeight }}{{opacity}}",HTML_ZOOM_BUTTONS:'
',HTML_SERIES_BLOCK:'
{{ label }}
'};t.exports={tplSeriesLabel:n.template(o.HTML_SERIES_LABEL),tplCssText:n.template(o.TEXT_CSS_TEXT),tplCssTextForLineType:n.template(o.TEXT_CSS_TEXT_FOR_LINE_TYPE),ZOOM_BUTTONS:o.HTML_ZOOM_BUTTONS,tplSeriesBlock:n.template(o.HTML_SERIES_BLOCK)}},function(t,e,i){"use strict";var n=i(8),o=i(100),a=i(101),r=i(105),s=i(107),h=i(102),l=i(30),c=i(11),u=i(7),d=i(44),p=i(35),f=i(6),m=Array.prototype.concat,g=f.isUndefined,_=f.defineClass(o,{init:function(t,e,i,n){this.originalRawData=p.deepCopy(t),this.chartType=e,this.options=i,this.seriesTypes=n,this.originalLegendData=null,this.dynamicData=[],this.defaultValues=[0,500],this.initData(t),this.initZoomedRawData(),this.baseInit()},getOriginalRawData:function(){return p.deepCopy(this.originalRawData)},getZoomedRawData:function(){var t=this.zoomedRawData;return t=t?p.deepCopy(t):this.getOriginalRawData()},_filterSeriesDataByIndexRange:function(t,e,i){return f.forEachArray(t,function(t){t.data=t.data.slice(e,i+1)}),t},_filterRawDataByIndexRange:function(t,e){var i=this,n=e[0],o=e[1];return f.forEach(t.series,function(e,a){t.series[a]=i._filterSeriesDataByIndexRange(e,n,o)}),t.categories&&(t.categories=t.categories.slice(n,o+1)),t},updateRawDataForZoom:function(t){var e=this.getRawData(),i=this.getZoomedRawData();this.zoomedRawData=this._filterRawDataByIndexRange(i,t),e=this._filterRawDataByIndexRange(e,t),this.initData(e)},initZoomedRawData:function(){this.zoomedRawData=null},initData:function(t){this.rawData=t,this.categoriesMap=null,this.stacks=null,this.seriesDataModelMap={},this.seriesGroups=null,this.valuesMap={},this.legendLabels=null,this.legendData=null,this.multilineCategories=null,this.coordinateType=null},getRawData:function(){return this.rawData},findChartType:function(t){return l.findChartType(this.rawData.seriesAlias,t)},_escapeCategories:function(t){return f.map(t,function(t){return f.encodeHTMLEntity(String(t))})},_mapCategories:function(t,e){var i=e+"Axis",n=this.options[i]||{},o=!1;return o=f.isArray(n)?f.filter(n,function(t){return t.type&&c.isDatetimeType(t.type)}):n.type&&c.isDatetimeType(n.type),t=o?f.map(t,function(t){var e=new Date(t);return e.getTime()||t}):this._escapeCategories(t)},_processCategories:function(t){var e=this.rawData.categories,i={};return f.isArray(e)?i[t]=this._mapCategories(e,t):e&&(e.x&&(i.x=this._mapCategories(e.x,"x")),e.y&&(i.y=this._mapCategories(e.y,"y").reverse())),i},getCategories:function(t){var e=t?"y":"x",i=[];return this.categoriesMap||(this.categoriesMap=this._processCategories(e)),f.isExisty(t)?i=this.categoriesMap[e]||[]:f.forEach(this.categoriesMap,function(t){return i=t,!1}),i},getCategoryCount:function(t){var e=this.getCategories(t);return e?e.length:0},hasCategories:function(t){return!!this.getCategoryCount(t)},isXCountGreaterThanYCount:function(t){var e=this.getSeriesDataModel(t);return e.isXCountGreaterThanYCount()},hasXValue:function(t){var e=this.isXCountGreaterThanYCount(t);return!this.hasCategories(e)||e},hasYValue:function(t){var e=this.isXCountGreaterThanYCount(t);return!this.hasCategories(e)||!e},getCategory:function(t,e){return this.getCategories(e)[t]},findCategoryIndex:function(t){var e=this.getCategories(),i=null;return f.forEachArray(e,function(e,n){return e===t&&(i=n),f.isNull(i)}),i},findAbsoluteCategoryIndex:function(t){var e=this.originalRawData?this.originalRawData.categories:null,i=-1;return e?(f.forEach(e,function(e,n){var o=e===t;return o&&(i=n),!o}),i):i},_getTooltipCategory:function(t,e){var i=this.getCategory(t,e),n=e?"yAxis":"xAxis",o=this.options[n]||{},a=this.options.tooltip||{};return c.isDatetimeType(a.type)?i=u.formatDate(i,a.dateFormat):c.isDatetimeType(o.type)&&(i=u.formatDate(i,o.dateFormat)),i},makeTooltipCategory:function(t,e,i){var n=!i,o=this._getTooltipCategory(t,n),a=this.getCategoryCount(!n);return a&&(o+=", "+this._getTooltipCategory(a-e-1,!n)),o},getStacks:function(t){return this.stacks||(this.stacks=l.pickStacks(this.rawData.series[t])),this.stacks},getStackCount:function(t){return this.getStacks(t).length},findStackIndex:function(t){return f.inArray(t,this.getStacks())},isCoordinateType:function(){var t=this.chartType,e=this.coordinateType;return f.isExisty(e)||(e=c.isCoordinateTypeChart(t),e=e||c.isLineScatterComboChart(t,this.seriesTypes),e=e||c.isLineTypeChart(t)&&!this.hasCategories(),this.coordinateType=e),e},getSeriesDataModel:function(t){var e,i,n;return this.seriesDataModelMap[t]||(i=this.findChartType(t),e=this.rawData.series[t],n=c.isBoxplotChart(this.chartType)?r:c.isTreemapChart(this.chartType)?s:a,this.seriesDataModelMap[t]=new n(e,i,this.options,this.getFormatFunctions(),this.isCoordinateType())),this.seriesDataModelMap[t]},getGroupCount:function(t){return this.getSeriesDataModel(t).getGroupCount()},_pushCategory:function(t){this.rawData.categories&&(this.rawData.categories.push(t),this.originalRawData.categories.push(t))},_shiftCategory:function(){this.rawData.categories&&(this.rawData.categories.shift(),this.originalRawData.categories.shift())},_findRawSeriesDatumByName:function(t,e){var i=null,n=this.rawData.series[e];return f.forEachArray(n,function(e){var n=e.name===t;return n&&(i=e),!n}),i},_pushValue:function(t,e,i){var n=this._findRawSeriesDatumByName(t.name,i);t.data.push(e),n&&n.data.push(e)},_pushValues:function(t,e,i){var n=this;f.forEachArray(t,function(t,o){n._pushValue(t,e[o],i)})},_pushSeriesData:function(t){var e,i=this;"combo"!==this.chartType&&f.isArray(t)&&(e=t,t={},t[this.chartType]=e),f.forEach(this.originalRawData.series,function(e,n){i._pushValues(e,t[n],n)})},_shiftValues:function(t,e){var i=this;f.forEachArray(t,function(t){var n=i._findRawSeriesDatumByName(t.name,e);t.data.shift(),n&&n.data.shift()})},_shiftSeriesData:function(){var t=this;f.forEach(this.originalRawData.series,function(e,i){t._shiftValues(e,i)})},addDynamicData:function(t,e){this.dynamicData.push({category:t,values:e})},_pushDynamicData:function(t){this._pushCategory(t.category),this._pushSeriesData(t.values)},_pushDynamicDataForCoordinateType:function(t){var e=this;f.forEachArray(this.originalRawData.series,function(i){e._pushValue(i,t[i.name])})},addDataFromDynamicData:function(){var t=this.dynamicData.shift();return t&&(this.isCoordinateType()?this._pushDynamicDataForCoordinateType(t.values):this._pushDynamicData(t),this.initData(this.rawData)),!!t},shiftData:function(){this._shiftCategory(),this._shiftSeriesData(),this.initData(this.rawData)},addDataFromRemainDynamicData:function(t){var e=this,i=this.dynamicData;this.dynamicData=[],f.forEach(i,function(i){e._pushCategory(i.category),e._pushSeriesData(i.values),t&&(e._shiftCategory(),e._shiftSeriesData())}),this.initData(this.rawData)},_eachByAllSeriesDataModel:function(t){var e=this,i=this.seriesTypes||[this.chartType];f.forEachArray(i,function(i){return t(e.getSeriesDataModel(i),i)})},isValidAllSeriesDataModel:function(){var t=!0;return this._eachByAllSeriesDataModel(function(e){return t=!!e.getGroupCount()}),t},_makeSeriesGroups:function(){var t,e=[];return this._eachByAllSeriesDataModel(function(t){t.each(function(t,i){e[i]||(e[i]=[]),e[i]=e[i].concat(t.items)})}),t=f.map(e,function(t){return new h(t)})},getSeriesGroups:function(){return this.seriesGroups||(this.seriesGroups=this._makeSeriesGroups()),this.seriesGroups},getValue:function(t,e,i){return this.getSeriesDataModel(i).getValue(t,e)},getDefaultDatetimeValues:function(){var t=36e5,e=Date.now();return[e-t,e]},isSeriesDataEmpty:function(t){var e=this.rawData,i=e&&!e.series;return!e||i||!e.series[t]||e.series[t]&&!e.series[t].length},isLimitOptionsEmpty:function(t){var e=this.options[t]||{};return g(e.min)&&g(e.max)},isLimitOptionsInsufficient:function(t){var e=this.options[t]||{};return g(e.min)||g(e.max)},_createValues:function(t,e,i){var n,o,a=this.options,r=a.plot,s=a[i]||{},h=s.type,l=this.isSeriesDataEmpty(t),u=this.isLimitOptionsEmpty(i),d=this.isLimitOptionsInsufficient(i),p=c.isLineChart(t)||c.isAreaChart(t)||c.isLineAreaComboChart(t,this.seriesTypes),f=this.defaultValues;return c.isComboChart(t)?(n=[],this._eachByAllSeriesDataModel(function(t){n=n.concat(t.getValues(e))})):l&&d?(!u&&d&&(f=f.concat([s.min||s.max])),"x"===e&&"datetime"===h?(n=this.getDefaultDatetimeValues(),p&&r&&(o=this.getValuesFromPlotOptions(r,h),n=n.concat(o))):n=f):n=this.getSeriesDataModel(t).getValues(e),n},getValuesFromPlotOptions:function(t,e){var i=[];return t.lines&&f.forEach(t.lines,function(t){i.push("datetime"!==e?t.value:new Date(t.value))}),t.bands&&f.forEach(t.bands,function(t){var n=f.map(t.range,function(t){return"datetime"!==e?t:new Date(t)});i=i.concat(n)}),i},getValues:function(t,e,i){var n;return n=t+e,this.valuesMap[n]||(this.valuesMap[n]=this._createValues(t,e,i)),this.valuesMap[n]},eachBySeriesGroup:function(t,e){this._eachByAllSeriesDataModel(function(i,n){i.each(function(e,i){t(e,i,n)},e)})},_pickLegendLabel:function(t){return t.name?f.encodeHTMLEntity(t.name):null},_isVisibleLegend:function(t){var e=!0;return f.isExisty(t.visible)&&t.visible===!1&&(e=!1),e},_pickLegendData:function(t){var e,i=this.rawData.series,n={};return"visibility"===t?e=this._isVisibleLegend:"label"===t&&(e=this._pickLegendLabel),e&&(f.forEach(i,function(t,i){n[i]=f.map(t,e)}),n=f.filter(n,f.isExisty)),n},getLegendLabels:function(t){return this.legendLabels||(this.legendLabels=this._pickLegendData("label")),this.legendLabels[t]||this.legendLabels},getLegendVisibility:function(t){return this.legendVisibilities||(this.legendVisibilities=this._pickLegendData("visibility")),this.legendVisibilities[t]||this.legendVisibilities},_makeLegendData:function(){var t,e,i=this.getLegendLabels(this.chartType),n=this.seriesTypes||[this.chartType],o=this.getLegendVisibility();return f.isArray(i)?(t=[this.chartType],t[this.chartType]=i):(n=this.seriesTypes,t=i),e=f.map(n,function(e){return f.map(t[e],function(t,i){var n=f.isArray(o[e]);return{chartType:e,label:t,visible:n?o[e][i]:o[i]}})}),m.apply([],e)},getLegendData:function(){return this.legendData||(this.legendData=this._makeLegendData()),this.originalLegendData||(this.originalLegendData=this.legendData),this.legendData},getOriginalLegendData:function(){return this.originalLegendData},getLegendItem:function(t){return this.getLegendData()[t]},getFirstItemLabel:function(t){return this.getSeriesDataModel(t).getFirstItemLabel()},addDataRatiosOfPieChart:function(t){this.getSeriesDataModel(t).addDataRatiosOfPieChart()},addDataRatiosForCoordinateType:function(t,e,i){c.isLineTypeChart(t)&&this._addStartValueToAllSeriesItem(e.yAxis,t),this.getSeriesDataModel(t).addDataRatiosForCoordinateType(e,i)},_addStartValueToAllSeriesItem:function(t,e){var i=0;t.min>=0?i=t.min:t.max<=0&&(i=t.max),this.getSeriesDataModel(e).addStartValueToAllSeriesItem(i)},addDataRatios:function(t,e,i){var n=this.getSeriesDataModel(i);this._addStartValueToAllSeriesItem(t,i),n.addDataRatios(t,e)},addDataRatiosForTreemapChart:function(t,e){this.getSeriesDataModel(e).addDataRatios(t)},_createBaseValuesForNormalStackedChart:function(t){var e=this.getSeriesDataModel(t),i=[];return e.each(function(t){var e=t._makeValuesMapPerStack();f.forEach(e,function(t){var e=d.sumPlusValues(t),n=d.sumMinusValues(t);i=i.concat([e,n])})}),i},createBaseValuesForLimit:function(t,e,i,n,o){var a;return c.isComboChart(this.chartType)&&e?(a=this.getValues(this.chartType,n),c.isNormalStackChart(t,i)&&(a=a.concat(this._createBaseValuesForNormalStackedChart(t)))):a=c.isTreemapChart(t)?this.getValues(t,"colorValue"):c.isNormalStackChart(t,i)?this._createBaseValuesForNormalStackedChart(t):this.getValues(t,n,o),a},findOverflowItem:function(t,e){var i=this.getSeriesDataModel(t),o=i.getMaxValue("r"),a=function(t){return t.r/o>n.HALF_RATIO};return{minItem:i.findMinSeriesItem(e,a),maxItem:i.findMaxSeriesItem(e,a)}}});t.exports=_},function(t,e,i){"use strict";var n=i(10),o=i(7),a=i(44),r=i(6),s=r.defineClass({baseInit:function(){this.formatFunctions=null},getValues:function(){},getMaxValue:function(t,e){return n.max(this.getValues(t,e))},getFormattedMaxValue:function(t,e,i){var n=this.getMaxValue(t,i),a=this.getFormatFunctions();return o.formatValue({value:n,formatFunctions:a,chartType:t,areaType:e,valueType:i})},_pickMaxLenUnderPoint:function(t){var e=0;return r.forEachArray(t,function(t){var i=a.getDecimalLength(t);i>e&&(e=i)}),e},_isZeroFill:function(t){return t.length>2&&"0"===t.charAt(0)},_isDecimal:function(t){var e=t.indexOf(".");return e>-1&&e-1},_formatToZeroFill:function(t,e){var i=e<0;return e=o.formatToZeroFill(Math.abs(e),t),(i?"-":"")+e},_formatToDecimal:function(t,e){return o.formatToDecimal(e,t)},_findSimpleTypeFormatFunctions:function(t){var e,i=[];if(this._isDecimal(t))e=this._pickMaxLenUnderPoint([t]),i=[r.bind(this._formatToDecimal,this,e)];else if(this._isZeroFill(t))return e=t.length,i=[r.bind(this._formatToZeroFill,this,e)];return this._isComma(t)&&i.push(o.formatToComma),i},_findFormatFunctions:function(){var t=r.pick(this.options,"chart","format"),e=[];return r.isFunction(t)?e=[t]:r.isString(t)&&(e=this._findSimpleTypeFormatFunctions(t)),e},getFormatFunctions:function(){return this.formatFunctions||(this.formatFunctions=this._findFormatFunctions()),this.formatFunctions}});t.exports=s},function(t,e,i){"use strict";var n=i(102),o=i(103),a=i(104),r=i(11),s=i(44),h=i(10),l=i(6),c=Array.prototype.concat,u=l.defineClass({init:function(t,e,i,n,o){this.chartType=e,this.options=i||{},this.formatFunctions=n,this.rawSeriesData=t||[],this.isCoordinateType=o,this.baseGroups=null,this.groups=null,this.options.series=this.options.series||{},this.isDivergingChart=r.isDivergingChart(e,this.options.series.diverging),this.valuesMap={},this._removeRangeValue()},_removeRangeValue:function(){var t=l.pick(this.options,"series")||{},e=r.isAllowRangeData(this.chartType)&&!r.isValidStackOption(t.stackType)&&!t.spline;e||this.isCoordinateType||l.forEachArray(this.rawSeriesData,function(t){l.isArray(t.data)&&l.forEachArray(t.data,function(e,i){l.isExisty(e)&&(t.data[i]=c.apply(e)[0])})})},_createBaseGroups:function(){var t,e,i=this.chartType,n=this.formatFunctions,s=this.options.xAxis,h=this.isDivergingChart,c=this.isCoordinateType,u=r.isPieChart(this.chartType),d=r.isHeatmapChart(this.chartType)||r.isTreemapChart(this.chartType);return c?(e=a,t=function(t){t.sort(function(t,e){return t.x-e.x})}):(e=o,t=function(){}),l.map(this.rawSeriesData,function(o){var a,r,p,f;return r=l.isArray(o)?o:[].concat(o.data),d||(a=o.stack),o.name&&(p=o.name),(c||u)&&(r=l.filter(r,l.isExisty)),f=l.map(r,function(t,o){return new e({datum:t,chartType:i,formatFunctions:n, -index:o,legendName:p,stack:a,isDivergingChart:h,xAxisType:s.type,dateFormat:s.dateFormat})}),t(f),f})},_getBaseGroups:function(){return this.baseGroups||(this.baseGroups=this._createBaseGroups()),this.baseGroups},_createSeriesGroupsFromRawData:function(t){var e=this._getBaseGroups();return t&&(e=h.pivot(e)),l.map(e,function(t){return new n(t)})},_getSeriesGroups:function(){return this.groups||(this.groups=this._createSeriesGroupsFromRawData(!0)),this.groups},getGroupCount:function(){return this._getSeriesGroups().length},_getPivotGroups:function(){return this.pivotGroups||(this.pivotGroups=this._createSeriesGroupsFromRawData()),this.pivotGroups},getSeriesGroup:function(t,e){return e?this._getPivotGroups()[t]:this._getSeriesGroups()[t]},getFirstSeriesGroup:function(t){return this.getSeriesGroup(0,t)},getFirstItemLabel:function(){return this.getFirstSeriesGroup().getFirstSeriesItem().label},getSeriesItem:function(t,e,i){return this.getSeriesGroup(t,i).getSeriesItem(e)},getFirstSeriesItem:function(){return this.getSeriesItem(0,0)},getValue:function(t,e){return this.getSeriesItem(t,e).value},getMinValue:function(t){return h.min(this.getValues(t))},getMaxValue:function(t){return h.max(this.getValues(t))},_findSeriesItem:function(t){var e;return this.each(function(i){return e=i.find(t),!e}),e},_findSeriesItemByValue:function(t,e,i){return i=i||function(){return null},this._findSeriesItem(function(n){return n&&n[t]===e&&i(n)})},findMinSeriesItem:function(t,e){var i=this.getMinValue(t);return this._findSeriesItemByValue(t,i,e)},findMaxSeriesItem:function(t,e){var i=this.getMaxValue(t);return this._findSeriesItemByValue(t,i,e)},_createValues:function(t){var e=this.map(function(e){return e.getValues(t)});return e=c.apply([],e),l.filter(e,function(t){return!isNaN(t)})},getValues:function(t){return t=t||"value",this.valuesMap[t]||(this.valuesMap[t]=this._createValues(t)),this.valuesMap[t]},isXCountGreaterThanYCount:function(){return this.getValues("x").length>this.getValues("y").length},_addRatiosWhenNormalStacked:function(t){var e=Math.abs(t.max-t.min);this.each(function(t){t.addRatios(e)})},_calculateBaseRatio:function(){var t=this.getValues(),e=s.sumPlusValues(t),i=Math.abs(s.sumMinusValues(t)),n=e>0&&i>0?.5:1;return n},_addRatiosWhenPercentStacked:function(){var t=this._calculateBaseRatio();this.each(function(e){e.addRatiosWhenPercentStacked(t)})},_addRatiosWhenDivergingStacked:function(){this.each(function(t){var e=t.pluck("value"),i=s.sumPlusValues(e),n=Math.abs(s.sumMinusValues(e));t.addRatiosWhenDivergingStacked(i,n)})},_makeSubtractionValue:function(t){var e=r.allowMinusPointRender(this.chartType),i=0;return!e&&r.isMinusLimit(t)?i=t.max:(e||t.min>=0)&&(i=t.min),i},_addRatios:function(t){var e=Math.abs(t.max-t.min),i=this._makeSubtractionValue(t);this.each(function(t){t.addRatios(e,i)})},addDataRatios:function(t,e){var i=r.isAllowedStackOption(this.chartType);i&&r.isNormalStack(e)?this._addRatiosWhenNormalStacked(t):i&&r.isPercentStack(e)?this.isDivergingChart?this._addRatiosWhenDivergingStacked():this._addRatiosWhenPercentStacked():this._addRatios(t)},addDataRatiosOfPieChart:function(){this.each(function(t){var e=s.sum(t.pluck("value"));t.addRatios(e)})},addDataRatiosForCoordinateType:function(t,e){var i,n,o,a,r=t.xAxis,s=t.yAxis,c=e?h.max(this.getValues("r")):0;r&&(i=Math.abs(r.max-r.min),n=this._makeSubtractionValue(r)),s&&(o=Math.abs(s.max-s.min),a=this._makeSubtractionValue(s)),this.each(function(t){t.each(function(t){t&&(t.addRatio("x",i,n),t.addRatio("y",o,a),t.addRatio("r",c,0),l.isExisty(t.start)&&t.addRatio("start",o,a))})})},addStartValueToAllSeriesItem:function(t){this.each(function(e){e.addStartValueToAllSeriesItem(t)})},hasRangeData:function(){var t=!1;return this.each(function(e){return t=e.hasRangeData(),!t}),t},each:function(t,e){var i=e?this._getPivotGroups():this._getSeriesGroups();l.forEachArray(i,function(e,i){return t(e,i)})},map:function(t,e){var i=[];return this.each(function(e,n){i.push(t(e,n))},e),i}});t.exports=u},function(t,e,i){"use strict";var n=i(44),o=i(6),a=o.defineClass({init:function(t){this.items=t,this.valuesMap={},this.valuesMapPerStack=null},getSeriesItemCount:function(){return this.items.length},getSeriesItem:function(t){return this.items[t]},getFirstSeriesItem:function(){return this.getSeriesItem(0)},_createValues:function(t){var e=[];return this.each(function(i){i&&(o.isExisty(i[t])&&e.push(i[t]),o.isExisty(i.start)&&e.push(i.start))}),e},getValues:function(t){return t=t||"value",this.valuesMap[t]||(this.valuesMap[t]=this._createValues(t)),this.valuesMap[t]},_makeValuesMapPerStack:function(){var t={};return this.each(function(e){t[e.stack]||(t[e.stack]=[]),t[e.stack].push(e.value)}),t},getValuesMapPerStack:function(){return this.valuesMapPerStack||(this.valuesMapPerStack=this._makeValuesMapPerStack()),this.valuesMapPerStack},_makeSumMapPerStack:function(){var t=this.getValuesMapPerStack(),e={};return o.forEach(t,function(t,i){e[i]=n.sum(o.map(t,function(t){return Math.abs(t)}))}),e},addStartValueToAllSeriesItem:function(t){this.each(function(e){e&&e.addStart(t)})},addRatiosWhenPercentStacked:function(t){var e=this._makeSumMapPerStack();this.each(function(i){var n=e[i.stack];i.addRatio(n,0,t)})},addRatiosWhenDivergingStacked:function(t,e){this.each(function(i){var n=i.value>=0?t:e;i.addRatio(n,0,.5)})},addRatios:function(t,e){this.each(function(i){i&&i.addRatio(t,e)})},hasRangeData:function(){var t=!1;return this.each(function(e){return t=e&&e.isRange,!t}),t},each:function(t){o.forEachArray(this.items,t)},map:function(t){return o.map(this.items,t)},pluck:function(t){var e=o.filter(this.items,o.isExisty);return o.pluck(e,t)},find:function(t){var e;return this.each(function(i){return t(i)&&(e=i),!e}),e||null},filter:function(t){return o.filter(this.items,t)}});t.exports=a},function(t,e,i){"use strict";var n=i(8),o=i(7),a=i(44),r=i(6),s=r.defineClass({init:function(t){this.chartType=t.chartType,this.stack=t.stack||n.DEFAULT_STACK,this.isDivergingChart=t.isDivergingChart,this.formatFunctions=t.formatFunctions,this.isRange=!1,this.value=null,this.label=null,this.ratio=null,this.end=null,this.endLabel=null,this.endRatio=null,this.start=null,this.startLabel=null,this.startRatio=null,this.ratioDistance=null,this.legendName=t.legendName,this._initValues(t.datum,t.index)},_initValues:function(t,e){var i=this._createValues(t),n="makingSeriesLabel",a=i.length>1,s=i[0];this.value=this.end=s,this.index=e,this.isDivergingChart&&(s=Math.abs(s)),r.isNull(s)?this.label="":this.label=o.formatValue({value:s,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:n,legendName:this.legendName}),this.endLabel=this.label,a&&(this.addStart(i[1],!0),this._updateFormattedValueforRange(),this.isRange=!0)},_createValues:function(t){var e=r.map([].concat(t),function(t){return r.isNull(t)?null:parseFloat(t)});return e=e.sort(function(t,e){return t<0&&e<0?t-e:e-t})},addStart:function(t){r.isNull(this.start)&&(this.start=t,this.startLabel=o.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series",legendName:this.legendName}))},_updateFormattedValueforRange:function(){this.label=this.startLabel+" ~ "+this.endLabel},addRatio:function(t,e,i){t=t||1,i=i||1,e=e||0,this.ratio=this.endRatio=a.calculateRatio(this.value,t,e,i),r.isExisty(this.start)&&(this.startRatio=a.calculateRatio(this.start,t,e,i),this.ratioDistance=Math.abs(this.endRatio-this.startRatio))},_getFormattedValueForTooltip:function(t){return o.formatValue({value:this[t],formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t,legendName:this.legendName})},pickValueMapForTooltip:function(){var t={value:this._getFormattedValueForTooltip("value"),ratio:this.ratio};return r.isExisty(this.start)&&(t.start=this._getFormattedValueForTooltip("start"),t.end=this._getFormattedValueForTooltip("end"),t.startRatio=this.startRatio,t.endRatio=this.endRatio),t}});t.exports=s},function(t,e,i){"use strict";var n=i(11),o=i(7),a=i(6),r=a.defineClass({init:function(t){this.chartType=t.chartType,this.formatFunctions=t.formatFunctions,this.xAxisType=t.xAxisType,this.dateFormat=t.dateFormat,this.ratioMap={},this._initData(t.datum,t.index)},_initData:function(t,e){var i;a.isArray(t)?(this.x=t[0]||0,this.y=t[1]||0,n.isBubbleChart(this.chartType)?(this.r=t[2],this.label=t[3]||""):this.label=t[2]||""):(this.x=t.x,this.y=t.y,this.r=t.r,this.label=t.label||""),n.isDatetimeType(this.xAxisType)&&(i=a.isDate(this.x)?this.x:new Date(this.x),this.x=i.getTime()||0),this.index=e,this.label||(n.isLineTypeChart(this.chartType)&&n.isDatetimeType(this.xAxisType)?this.label=o.formatDate(this.x,this.dateFormat):this.label=o.formatValue({value:this.x,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series"}),this.label+=", "+o.formatValue({value:this.y,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series"}))},addStart:function(t){this.start=t},addRatio:function(t,e,i){!a.isExisty(this.ratioMap[t])&&e&&(this.ratioMap[t]=(this[t]-i)/e)},_getFormattedValueForTooltip:function(t){var e=this.ratioMap[t],i=this[t],n=o.formatValue({value:i,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t});return a.isNumber(e)?n:i},pickValueMapForTooltip:function(){var t={x:this._getFormattedValueForTooltip("x"),y:this._getFormattedValueForTooltip("y"),xRatio:this.ratioMap.x,yRatio:this.ratioMap.y};return a.isExisty(this.r)&&(t.r=this._getFormattedValueForTooltip("r"),t.rRatio=this.ratioMap.r),t}});t.exports=r},function(t,e,i){"use strict";var n=i(106),o=i(101),a=i(6),r=Array.prototype.concat,s=a.defineClass(o,{init:function(t,e,i,n){this.chartType=e,this.options=i||{},this.formatFunctions=n,this.rawSeriesData=t||[],this.baseGroups=null,this.groups=null,this.options.series=this.options.series||{},this.valuesMap={}},_createBaseGroups:function(){var t=this.chartType,e=this.formatFunctions;return a.map(this.rawSeriesData,function(i){var o=a.isArray(i)?i:[].concat(i.data),r=a.map(o,function(o,a){return new n({datum:o,chartType:t,formatFunctions:e,index:a,legendName:i.name})});return r})},_createValues:function(){var t=[];return this.map(function(e){a.forEach(e.items,function(e){t.push(e.min),t.push(e.max),t.push(e.uq),t.push(e.lq),t.push(e.median)})}),t=r.apply([],t),a.filter(t,function(t){return!isNaN(t)})}});t.exports=s},function(t,e,i){"use strict";var n=i(7),o=i(44),a=i(6),r=a.defineClass({init:function(t){this.chartType=t.chartType,this.formatFunctions=t.formatFunctions,this.value=null,this.label=null,this.ratio=null,this.min=null,this.minLabel=null,this.minRatio=null,this.max=null,this.maxLabel=null,this.maxRatio=null,this.median=null,this.medianLabel=null,this.medianRatio=null,this.lq=null,this.lqLabel=null,this.lqRatio=null,this.uq=null,this.uqLabel=null,this.uqRatio=null,this.ratioDistance=null,this.legendName=t.legendName,this._initValues(t.datum,t.index)},_initValues:function(t,e){var i,o=this._createValues(t),r=o[4],s=o[3],h=o[2],l=o[1],c=o[0],u=o.length>5,d=a.bind(function(t){return n.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"makingSeriesLabel",legendName:this.legendName})},this);this.value=this.max=r,this.uq=s,this.median=h,this.lq=l,this.min=c,this.index=e,u&&(this.outliers=[],i=this.outliers,a.forEach(o.slice(5),function(t){i.push({value:t,label:d(t)})})),this.label=d(r),this.uqLabel=d(s),this.medianLabel=d(h),this.lqLabel=d(l),this.minLabel=d(c),this.maxLabel=this.label},_createValues:function(t){var e=a.map([].concat(t),function(t){return a.isNull(t)?null:parseFloat(t)});return e},addStart:function(t){a.isNull(this.min)&&(this.min=t,this.minLabel=n.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series",legendName:this.legendName}))},_updateFormattedValueforRange:function(){this.label=this.minLabel+" ~ "+this.maxLabel},addRatio:function(t,e,i){var n=o.calculateRatio;t=t||1,i=i||1,e=e||0,this.ratio=this.maxRatio=n(this.max,t,e,i),this.uqRatio=n(this.uq,t,e,i),this.medianRatio=n(this.median,t,e,i),this.lqRatio=n(this.lq,t,e,i),this.minRatio=n(this.min,t,e,i),a.forEach(this.outliers,function(o){o.ratio=n(o.value,t,e,i)}),this.ratioDistance=Math.abs(this.uqRatio-this.lqRatio)},_getFormattedValueForTooltip:function(t){return n.formatValue({value:this[t],formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t,legendName:this.legendName})},pickValueMapForTooltip:function(){var t={value:this._getFormattedValueForTooltip("value"),ratio:this.ratio};return a.isExisty(this.min)&&(t.min=this._getFormattedValueForTooltip("min"),t.max=this._getFormattedValueForTooltip("max"),t.minRatio=this.minRatio,t.maxRatio=this.maxRatio,t.maxLabel=this.maxLabel,t.minLabel=this.minLabel,t.uqLabel=this.uqLabel,t.lqLabel=this.lqLabel,t.medianLabel=this.medianLabel,t.outliers=this.outliers),t}});t.exports=r},function(t,e,i){"use strict";var n=i(101),o=i(108),a=i(8),r=i(44),s=i(6),h=Array.prototype.slice,l=s.defineClass(n,{init:function(){n.apply(this,arguments),this.foundSeriesItemsMap={},this.seriesItemMap={}},_flattenHierarchicalData:function(t,e,i){var n,o=this,r=[];return e?n=e+"_":(n=a.TREEMAP_ID_PREFIX,e=a.TREEMAP_ROOT_ID),i=i||[],s.forEachArray(t,function(t,a){var h=n+a,l=t.children,c=i.concat(a);t.indexes=c,s.isNull(t.value)||r.push(t),t.id||(t.id=h),t.parent||(t.parent=e),l&&(r=r.concat(o._flattenHierarchicalData(l,h,c)),delete t.children)}),r},_partitionRawSeriesDataByParent:function(t,e){var i=[],n=[];return s.forEachArray(t,function(t){t.parent===e?i.push(t):n.push(t)}),[i,n]},_setTreeProperties:function(t,e,i,n){var o=this,a=this._partitionRawSeriesDataByParent(t,i),h=a[0],l=a[1],c=e+1;return s.forEachArray(h,function(t,i){var a,u;t.depth=e,t.group=s.isUndefined(n)?i:n,a=o._setTreeProperties(l,c,t.id,t.group),u=s.filter(a,function(t){return t.depth===c}),u.length?(t.value=r.sum(s.pluck(u,"value")),t.hasChild=!0):t.hasChild=!1,h=h.concat(a)}),h},_setRatio:function(t,e){var i=this,n=this._partitionRawSeriesDataByParent(t,e),o=n[0],a=n[1],h=r.sum(s.pluck(o,"value"));s.forEachArray(o,function(t){var e=s.isNull(t.value)?0:t.value;t.ratio=e/h,t.hasChild&&i._setRatio(a,t.id)})},_createBaseGroups:function(){var t=this.chartType,e=this.seriesItemMap,i=this.formatFunctions,n=this._flattenHierarchicalData(this.rawSeriesData);return n=this._setTreeProperties(n,1,a.TREEMAP_ROOT_ID),this._setRatio(n,a.TREEMAP_ROOT_ID),[s.map(n,function(n){var a=new o(n,i,t);return e[a.id]=a,a})]},_findSeriesItems:function(t,e){return this.foundSeriesItemsMap[t]||(this.foundSeriesItemsMap[t]=this.getFirstSeriesGroup(!0).filter(e)),this.foundSeriesItemsMap[t]},_makeCacheKey:function(t){var e=t;return arguments.length>1&&(e+=h.call(arguments,1).join("_")),e},_isValidGroup:function(t,e){return!s.isExisty(e)||t===e},findSeriesItemsByDepth:function(t,e){var i=this,n=this._makeCacheKey(a.TREEMAP_DEPTH_KEY_PREFIX,t,e);return this._findSeriesItems(n,function(n){return n.depth===t&&i._isValidGroup(n.group,e)})},findSeriesItemsByParent:function(t){var e=this._makeCacheKey(a.TREEMAP_PARENT_KEY_PREFIX,t);return this._findSeriesItems(e,function(e){return e.parent===t})},findLeafSeriesItems:function(t){var e=this,i=this._makeCacheKey(a.TREEMAP_LEAF_KEY_PREFIX,t);return this._findSeriesItems(i,function(i){return!i.hasChild&&e._isValidGroup(i.group,t)})},findParentByDepth:function(t,e){var i=this.seriesItemMap[t]||null;return i&&i.depth!==e&&(i=this.findParentByDepth(i.parent,e)),i},initSeriesItemsMap:function(){this.foundSeriesItemsMap=null}});t.exports=l},function(t,e,i){"use strict";var n=i(44),o=i(7),a=i(6),r=a.defineClass({init:function(t,e,i){this.chartType=i,this.formatFunctions=e,this.id=t.id,this.parent=t.parent,this.value=t.value,this.ratio=t.ratio,this.colorValue=t.colorValue,this.depth=t.depth,this.label=t.label||"",this.group=t.group,this.hasChild=!!t.hasChild,this.indexes=t.indexes},addRatio:function(t,e){t=t||1,e=e||0,this.colorRatio=n.calculateRatio(this.colorValue,t,e,1)||-1},pickValueMapForTooltip:function(){var t=this.formatFunctions,e=this.chartType,i=this.colorValue,n=o.formatValue({value:this.value,formatFunctions:t,chartType:e,areaType:"tooltipValue"}),r=(this.label?this.label+": ":"")+n,s={value:n,label:r,ratio:this.ratio};return a.isExisty(i)&&(s.colorValue=o.formatValue({value:i,formatFunctions:t,chartType:e,areaType:"tooltipColorValue"}),s.colorRatio=this.colorRatio),s},pickLabelTemplateData:function(){var t={value:this.value,ratio:this.ratio,label:this.label};return a.isExisty(this.colorValue)&&(t.colorValue=this.colorValue,t.colorValueRatio=this.ratio),t}});t.exports=r},function(t,e,i){"use strict";var n=i(110),o=i(116),a=i(8),r=i(11),s={_createBoundsModel:function(t,e){return new n({chartType:e.chartType,seriesTypes:e.seriesTypes,options:e.options,theme:e.theme,dataProcessor:t,hasAxes:e.hasAxes,isVertical:e.isVertical})},_createScaleDataModel:function(t,e,i){return new o({chartType:i.chartType,seriesTypes:i.seriesTypes,options:i.options,theme:i.theme,dataProcessor:t,boundsModel:e,hasRightYAxis:i.hasRightYAxis,addedDataCount:i.addedDataCount})},addYAxisScale:function(t,e,i,n){t.addScale(e,i&&i.options||n||{},{valueType:i.valueType||"value",areaType:i.areaType,chartType:i.chartType},i.additionalOptions)},_registerYAxisDimension:function(t,e,i,n,o){var a,r=t.get(n),s=null;r&&(a=i[n],a&&(s=a.limit),e.registerYAxisDimension(s,n,r.options,r.theme,o))},_setLayoutBoundsAndScale:function(t,e,i,n,o){var s,h=o.options,l=o.scaleOption||{},c=o.addingDataMode,u=o.isVertical;e.has("xAxis")&&i.registerXAxisHeight(),e.has("legend")&&(e.get("legend").colorSpectrum?i.registerSpectrumLegendDimension():i.registerLegendDimension()),l.yAxis&&this.addYAxisScale(n,"yAxis",l.yAxis,o.options.yAxis),l.rightYAxis&&this.addYAxisScale(n,"rightYAxis",l.rightYAxis),l.legend&&n.addScale("legend",{},{chartType:o.chartType},{tickCounts:[a.SPECTRUM_LEGEND_TICK_COUNT]}),s=n.scaleDataMap,this._registerYAxisDimension(e,i,s,"yAxis",u),this._registerYAxisDimension(e,i,s,"rightYAxis",u),l.xAxis&&n.addScale("xAxis",h.xAxis,{valueType:l.xAxis.valueType||"value"},l.xAxis.additionalOptions),o.hasAxes&&n.setAxisDataMap(),i.registerSeriesDimension(),e.has("circleLegend")&&h.circleLegend.visible&&i.registerCircleLegendDimension(n.axisDataMap),e.has("xAxis")&&(r.isAutoTickInterval(h.xAxis.tickInterval)&&n.updateXAxisDataForAutoTickInterval(o.prevXAxisData,c),n.updateXAxisDataForLabel(c)),i.registerBoundsData(n.axisDataMap.xAxis)},build:function(t,e,i){var n,o=this._createBoundsModel(t,i),a=this._createScaleDataModel(t,o,i);return this._setLayoutBoundsAndScale(t,e,o,a,i),n={dimensionMap:o.dimensionMap,positionMap:o.positionMap,limitMap:a.makeLimitMap(i.seriesTypes||[i.chartType],i.isVertical)},a.axisDataMap&&(n.axisDataMap=a.axisDataMap),r.isBubbleChart(i.chartType)&&(n.maxRadius=o.calculateMaxRadius(a.axisDataMap)),a.scaleDataMap.legend&&(n.legendScaleData=a.scaleDataMap.legend),n}};t.exports=s},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r=i(5),s=i(111),h=i(112),l=i(113),c=i(114),u=i(115),d=i(6),p=d.defineClass({init:function(t){this.options=t.options||{},this.options.legend=this.options.legend||{},this.options.yAxis=this.options.yAxis||{},this.theme=t.theme||{},this.hasAxes=t.hasAxes,this.chartType=t.chartType,this.seriesTypes=t.seriesTypes||[],this.dataProcessor=t.dataProcessor,this.initBoundsData()},initBoundsData:function(){this.dimensionMap={legend:{width:0},yAxis:{width:0},rightYAxis:{width:0},xAxis:{height:0},circleLegend:{width:0},chartExportMenu:{width:0}},this.positionMap={},this.chartLeftPadding=n.CHART_PADDING,this.maxRadiusForBubbleChart=null,this._registerChartDimension(),this._registerTitleDimension(),this._registerChartExportMenuDimension()},_registerDimension:function(t,e){this.dimensionMap[t]=d.extend(this.dimensionMap[t]||{},e)},getBound:function(t){return{dimension:this.dimensionMap[t]||{},position:this.positionMap[t]||{}}},_setBound:function(t,e){this.dimensionMap[t]=e.dimension,this.positionMap[t]=e.position},getDimension:function(t){return this.dimensionMap[t]},getDimensionMap:function(t){var e=this,i={};return t&&t.length?d.forEachArray(t,function(t){i[t]=e.dimensionMap[t]}):i=this.dimensionMap,JSON.parse(JSON.stringify(i))},getPosition:function(t){return this.positionMap[t]},_registerChartDimension:function(){var t=this.options.chart||{},e={width:t.width||n.CHART_DEFAULT_WIDTH,height:t.height||n.CHART_DEFAULT_HEIGHT};this._registerDimension("chart",e)},_registerTitleDimension:function(){var t=this.options.chart||{},e=d.isExisty(t.title),i=e?r.getRenderedTextSize(t.title.text,this.theme.title.fontSize,this.theme.title.fontFamily).height:0,o={height:i?i+n.TITLE_PADDING:0};this._registerDimension("title",o)},_registerChartExportMenuDimension:function(){var t;t=this.options.chartExportMenu.visible?{height:17+n.CHART_PADDING,width:60}:{width:0,height:0},this._registerDimension("chartExportMenu",t)},registerXAxisHeight:function(){this._registerDimension("xAxis",{height:h.calculateXAxisHeight(this.options.xAxis,this.theme.xAxis)})},registerLegendDimension:function(){var t=d.pluck(this.dataProcessor.getOriginalLegendData(),"label"),e=this.options.legend,i=this.theme.legend.label,n=this.getDimension("chart").width,o=l.calculate(e,i,t,n);this._registerDimension("legend",o)},registerSpectrumLegendDimension:function(){var t,e=this.dataProcessor.getFormattedMaxValue(this.chartType,"legend"),i=this.theme.label;t=o.isHorizontalLegend(this.options.legend.align)?u._makeHorizontalDimension(e,i):u._makeVerticalDimension(e,i),this._registerDimension("legend",t)},registerYAxisDimension:function(t,e,i,n,a){var r,s;if(t)r=[t.min,t.max];else{if(!o.isHeatmapChart(this.chartType)&&a)return;r=this.dataProcessor.getCategories(!0)}s=d.isArray(i)?"yAxis"===e?i[0]:i[1]:i,this._registerDimension(e,{width:h.calculateYAxisWidth(r,s,n)})},calculateSeriesWidth:function(){var t=this.getDimensionMap(["chart","yAxis","legend","rightYAxis"]);return c.calculateWidth(t,this.options.legend)},calculateSeriesHeight:function(){var t=this.getDimensionMap(["chart","title","legend","xAxis","chartExportMenu"]);return c.calculateHeight(t,this.options.legend,this.chartType,this.theme.series)},getBaseSizeForLimit:function(t){var e;return e=t?this.calculateSeriesHeight():this.calculateSeriesWidth()},_makeSeriesDimension:function(){return{width:this.calculateSeriesWidth(),height:this.calculateSeriesHeight()}},registerSeriesDimension:function(){var t=this._makeSeriesDimension();this._registerDimension("series",t)},_updateLegendAndSeriesWidth:function(t,e){var i=this.options.legend;o.isVerticalLegend(i.align)&&i.visible&&this._registerDimension("legend",{width:t}),this._registerDimension("series",{width:this.getDimension("series").width-e})},registerCircleLegendDimension:function(t){var e,i,a=this.getDimension("series"),r=this.options.legend,h=this.dataProcessor.getFormattedMaxValue(this.chartType,"circleLegend","r"),l=this.theme.chart.fontFamily,c=s.calculateCircleLegendWidth(a,t,h,l);e=o.isVerticalLegend(r.align)&&r.visible?this.getDimension("legend").width:0,c=Math.min(c,Math.max(e,n.MIN_LEGEND_WIDTH)),i=c-e,this._registerDimension("circleLegend",{width:c,height:c}),i>0&&this._updateLegendAndSeriesWidth(c,i)},_makePlotDimension:function(){var t=this.getDimension("series");return{width:t.width,height:t.height+n.OVERLAPPING_WIDTH}},_registerCenterComponentsDimension:function(){var t=this.getDimension("series");this._registerDimension("tooltip",t),this._registerDimension("mouseEventDetector",t)},_registerAxisComponentsDimension:function(){var t=this._makePlotDimension();this._registerDimension("plot",t),this._registerDimension("xAxis",{width:t.width}),this._registerDimension("yAxis",{height:t.height}),this._registerDimension("rightYAxis",{height:t.height})},_updateDimensionsWidth:function(t){var e=Math.max(t.overflowLeft,0),i=Math.max(t.overflowRight,0),n=e+i;this.chartLeftPadding+=e,this.dimensionMap.plot.width-=n,this.dimensionMap.series.width-=n,this.dimensionMap.mouseEventDetector.width-=n,this.dimensionMap.xAxis.width-=n},_updateDimensionsHeight:function(t){this.dimensionMap.plot.height-=t,this.dimensionMap.series.height-=t,this.dimensionMap.mouseEventDetector.height-=t,this.dimensionMap.tooltip.height-=t,this.dimensionMap.yAxis.height-=t,this.dimensionMap.rightYAxis.height-=t,this.dimensionMap.xAxis.height+=t},_updateDimensionsForXAxisLabel:function(t){(t.overflowRight>0||t.overflowLeft>0)&&this._updateDimensionsWidth(t),t.overflowHeight&&this._updateDimensionsHeight(t.overflowHeight)},_registerAxisComponentsPosition:function(t){var e=this.getPosition("series"),i=this.getDimension("series"),o=this.getDimension("yAxis").width,a=t+o+i.width;this.positionMap.plot={top:e.top,left:e.left},this.positionMap.yAxis={top:e.top,left:this.chartLeftPadding+t},this.positionMap.xAxis={top:e.top+i.height,left:e.left},this.positionMap.rightYAxis={top:e.top,left:this.chartLeftPadding+a-n.OVERLAPPING_WIDTH}},_makeLegendPosition:function(){var t,e,i=this.dimensionMap,a=this.getDimension("series"),r=this.options.legend,s=i.title.height||i.chartExportMenu.height;return o.isLegendAlignBottom(r.align)&&(s+=a.height+this.getDimension("xAxis").height+n.LEGEND_AREA_PADDING),o.isHorizontalLegend(r.align)?e=(this.getDimension("chart").width-this.getDimension("legend").width)/2:o.isLegendAlignLeft(r.align)?e=this.chartLeftPadding:(t=this.getDimension("yAxis").width+this.getDimension("rightYAxis").width,e=this.chartLeftPadding+t+a.width),{top:s,left:e}},_makeChartExportMenuPosition:function(){return{top:1,right:20}},_makeCircleLegendPosition:function(){var t,e,i=this.getPosition("series"),a=this.getDimension("series"),r=this.getDimension("circleLegend"),s=this.options.legend;return t=o.isLegendAlignLeft(s.align)?0:i.left+a.width,o.isVerticalLegend(s.align)&&s.visible&&(e=this.getDimension("legend").width+n.CHART_PADDING,t+=(e-r.width)/2),{top:i.top+a.height-r.height,left:t}},_isNeedExpansionSeries:function(){var t=this.chartType;return!(o.isPieChart(t)||o.isMapChart(t)||o.isTreemapChart(t)||o.isRadialChart(t)||o.isPieDonutComboChart(t,this.seriesTypes))},_registerEssentialComponentsPositions:function(){var t,e=this.getPosition("series");this.positionMap.mouseEventDetector=d.extend({},e),this.positionMap.legend=this._makeLegendPosition(),this.positionMap.chartExportMenu=this._makeChartExportMenuPosition(),this.getDimension("circleLegend").width&&(this.positionMap.circleLegend=this._makeCircleLegendPosition()),t=this._isNeedExpansionSeries()?{top:e.top-n.SERIES_EXPAND_SIZE,left:e.left-n.SERIES_EXPAND_SIZE}:e,this.positionMap.tooltip=t},_registerPositions:function(){var t=this.options.legend.align,e=this.options.legend.visible,i=this.getDimension("legend"),r=o.isLegendAlignTop(t)&&e?i.height:0,s=o.isLegendAlignLeft(t)&&e?i.width:0,h=Math.max(this.getDimension("title").height,this.getDimension("chartExportMenu").height),l=h+r,c=a.getDefaultSeriesTopAreaHeight(this.chartType,this.theme.series),u={top:(l?l:c)+n.CHART_PADDING,left:this.chartLeftPadding+s+this.getDimension("yAxis").width};this.positionMap.series=u,this.hasAxes&&this._registerAxisComponentsPosition(s),this._registerEssentialComponentsPositions()},_registerExtendedSeriesBound:function(){var t=this.getBound("series");this._isNeedExpansionSeries()&&(t=a.expandBound(t)),this._setBound("extendedSeries",t)},_updateBoundsForYAxisCenterOption:function(){var t=this.getDimension("yAxis").width,e=Math.floor(this.getDimension("series").width/2)+n.OVERLAPPING_WIDTH,i=t-n.OVERLAPPING_WIDTH,o=a.isOldBrowser()?1:0;this.dimensionMap.extendedSeries.width+=t,this.dimensionMap.xAxis.width+=n.OVERLAPPING_WIDTH,this.dimensionMap.plot.width+=t+n.OVERLAPPING_WIDTH,this.dimensionMap.mouseEventDetector.width+=t,this.dimensionMap.tooltip.width+=t,this.positionMap.series.left-=t-o,this.positionMap.extendedSeries.left-=i-o,this.positionMap.plot.left-=i,this.positionMap.yAxis.left+=e,this.positionMap.xAxis.left-=i,this.positionMap.mouseEventDetector.left-=i,this.positionMap.tooltip.left-=i},registerBoundsData:function(t){this._registerCenterComponentsDimension(),this.hasAxes&&(this._registerAxisComponentsDimension(),this._updateDimensionsForXAxisLabel(t)),this._registerPositions(),this._registerExtendedSeriesBound(),this.options.yAxis.isCenter&&this._updateBoundsForYAxisCenterOption()},calculateMaxRadius:function(t){var e=this.getDimensionMap(["series","circleLegend"]);return s.calculateMaxRadius(e,t)}});t.exports=p},function(t,e,i){"use strict";var n=i(8),o=i(7),a={_calculatePixelStep:function(t,e){var i,n=t.tickCount;return i=t.isLabelAxis?e/n/2:e/(n-1),parseInt(i,10)},_calculateRadiusByAxisData:function(t,e){var i=this._calculatePixelStep(e.yAxis,t.height),n=this._calculatePixelStep(e.xAxis,t.width);return Math.min(i,n)},_getCircleLegendLabelMaxWidth:function(t,e){return o.getRenderedLabelWidth(t,{fontSize:n.CIRCLE_LEGEND_LABEL_FONT_SIZE,fontFamily:e})},calculateCircleLegendWidth:function(t,e,i,o){var a=this._calculateRadiusByAxisData(t,e),r=this._getCircleLegendLabelMaxWidth(i,o);return Math.max(2*a,r)+n.CIRCLE_LEGEND_PADDING},calculateMaxRadius:function(t,e){var i=this._calculateRadiusByAxisData(t.series,e),o=t.circleLegend.width;return Math.min((o-n.CIRCLE_LEGEND_PADDING)/2,i)}};t.exports=a},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r={calculateXAxisHeight:function(t,e){var i=t.title,o=i?a.getRenderedLabelHeight(i.text,e.title):0,r=o?o+n.TITLE_PADDING:0,s=t.labelMargin||0,h=a.getRenderedLabelHeight(n.MAX_HEIGHT_WORLD,e.label);return s>0&&(h+=s),r+h+n.CHART_PADDING},calculateYAxisWidth:function(t,e,i){var r=e.title||"",s=0,h=e.labelMargin||0,l=0;return t=a.addPrefixSuffix(t,e.prefix,e.suffix),e.isCenter?l+=n.AXIS_LABEL_PADDING:s=e.rotateTitle===!1?a.getRenderedLabelWidth(r.text,i.title)+n.TITLE_PADDING:a.getRenderedLabelHeight(r.text,i.title)+n.TITLE_PADDING,o.isDatetimeType(e.type)&&(t=a.formatDates(t,e.dateFormat)),h>0&&(l+=h),l+=a.getRenderedLabelsMaxWidth(t,i.label)+s+n.AXIS_LABEL_PADDING}};t.exports=r},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(11),r=i(44),s=i(7),h=i(10),l=o.LEGEND_CHECKBOX_WIDTH,c=o.LEGEND_ICON_WIDTH,u=o.LEGEND_ICON_HEIGHT,d=o.LEGEND_LABEL_LEFT_PADDING,p=o.LEGEND_AREA_PADDING,f={legendMargin:d+p,_calculateLegendsWidthSum:function(t,e,i,o){var a=p+i+c+d,h=this.legendMargin;return r.sum(n.map(t,function(t){var i=s.getRenderedLabelWidth(t,e);return o&&i>o&&(i=o),i+=a,i+h}))},_divideLegendLabels:function(t,e){var i=Math.round(t.length/e),o=[],a=[];return n.forEachArray(t,function(t){a.length=e);return{labels:a,maxLineWidth:h}},_calculateHorizontalLegendHeight:function(t,e){var i=Math.max.apply(null,n.map(t,function(t){return s.getRenderedLabelsMaxHeight(t,e)})),a=Math.max(u,i)+o.LINE_MARGIN_TOP,r=a*t.length-o.LINE_MARGIN_TOP;return r},_makeHorizontalDimension:function(t,e,i,n,a){var r=this._makeDividedLabelsAndMaxLineWidth(e,i,t,n,a),s=this._calculateHorizontalLegendHeight(r.labels,t),h=s+2*p;return{width:Math.max(r.maxLineWidth,o.MIN_LEGEND_WIDTH),height:h}},_makeVerticalDimension:function(t,e,i,n){var o=s.getRenderedLabelsMaxWidth(e,t);return n&&o>n&&(o=n),o+=p+i+c+d,{width:o+this.legendMargin,height:0}},calculate:function(t,e,i,n){var o=t.showCheckbox===!1?0:l+d,r=t.maxWidth,s={};return t.visible?s=a.isHorizontalLegend(t.align)?this._makeHorizontalDimension(e,i,n,o,r):this._makeVerticalDimension(e,i,o,r):s.width=0,s}};t.exports=f},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r={calculateWidth:function(t,e){var i=t.chart.width,a=t.yAxis.width+t.rightYAxis.width,r=t.legend,s=0;return o.isVerticalLegend(e.align)&&e.visible&&(s=r?r.width:0), -i-2*n.CHART_PADDING-a-s},calculateHeight:function(t,e,i,r){var s=t.chart.height,h=a.getDefaultSeriesTopAreaHeight(i,r),l=Math.max(t.title.height,t.chartExportMenu.height),c=t.xAxis.height,u=e.visible?t.legend.height:0,d=e.align;return c+=o.isLegendAlignBottom(d)?u:0,l+=o.isLegendAlignTop(d)?u:0,l=l||h,s-2*n.CHART_PADDING-l-c}};t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(7),a={_makeVerticalDimension:function(t,e){var i=o.getRenderedLabelWidth(t,e),a=n.LEGEND_AREA_PADDING+n.MAP_LEGEND_LABEL_PADDING;return{width:n.MAP_LEGEND_GRAPH_SIZE+i+a,height:n.MAP_LEGEND_SIZE}},_makeHorizontalDimension:function(t,e){var i=o.getRenderedLabelHeight(t,e),a=n.LEGEND_AREA_PADDING+n.MAP_LEGEND_LABEL_PADDING;return{width:n.MAP_LEGEND_SIZE,height:n.MAP_LEGEND_GRAPH_SIZE+i+a}}};t.exports=a},function(t,e,i){"use strict";var n=i(117),o=i(119),a=i(120),r=i(11),s=i(7),h=i(6),l=h.defineClass({init:function(t){this.chartType=t.chartType,this.seriesTypes=t.seriesTypes,this.dataProcessor=t.dataProcessor,this.boundsModel=t.boundsModel,this.options=t.options,this.theme=t.theme,this.hasRightYAxis=!!t.hasRightYAxis,this.prevValidLabelCount=null,this.initScaleData(t.addedDataCount),this.initForAutoTickInterval()},initScaleData:function(t){this.scaleDataMap={},this.axisDataMap={},this.addedDataCount=t},initForAutoTickInterval:function(){this.firstTickCount=null},_pickLimitOption:function(t){return t=t||{},{min:t.min,max:t.max}},_createBaseScaleData:function(t,e,i,o){var a=t.chartType,s="xAxis"!==t.areaType,l=this.dataProcessor.createBaseValuesForLimit(a,o.isSingleYAxis,e.stackType,t.valueType,t.areaType),c=this.boundsModel.getBaseSizeForLimit(s),u=h.extend(e,{isVertical:s,limitOption:this._pickLimitOption(i),tickCounts:o.tickCounts});return r.isBubbleChart(a)&&(u.overflowItem=this.dataProcessor.findOverflowItem(a,t.valueType)),n.makeScaleData(l,c,a,u)},_createScaleLabels:function(t,e,i,n){var a=this.dataProcessor.getFormatFunctions(),r=h.extend(i,{dateFormat:n});return o.createFormattedLabels(t,e,r,a)},_createScaleData:function(t,e,i){var n,o,a=this.options.series,r=e.chartType||this.chartType;return e.chartType=r,a=a[r]||a,n={stackType:i.stackType||a.stackType,diverging:a.diverging,type:t.type},o=this._createBaseScaleData(e,n,t,i),h.extend(o,{labels:this._createScaleLabels(o,e,n,t.dateFormat),axisOptions:t})},_createValueAxisData:function(t,e,i,n,o){var r,s,l=this.dataProcessor.hasCategories(),c=!n&&!l&&i,u=t.labels,d=t.limit,p=t.step,f=u.length,m=a.makeValueAxisData({labels:u,tickCount:u.length,limit:d,step:p,options:t.axisOptions,labelTheme:e,isVertical:!!n,isPositionRight:!!o,aligned:i});return c&&(r=this.dataProcessor.getValues(this.chartType,"x"),s=a.makeAdditionalDataForCoordinateLineType(u,r,d,p,f),h.extend(m,s)),m},_createLabelAxisData:function(t,e,i,n,o){return a.makeLabelAxisData({labels:this.dataProcessor.getCategories(n),options:t,labelTheme:e,isVertical:!!n,isPositionRight:!!o,aligned:i,addedDataCount:this.options.series.shifting?this.addedDataCount:0})},_createAxisData:function(t,e,i,n,o){var a,s=r.isLineTypeChart(this.chartType,this.seriesTypes)&&!e.pointOnColumn;return a=t?this._createValueAxisData(t,i,s,n,o):this._createLabelAxisData(e,i,s,n,o)},_createAxesData:function(){var t=this.scaleDataMap,e=this.options,i=this.theme,n=h.isArray(e.yAxis)?e.yAxis:[e.yAxis],o={};return o.xAxis=this._createAxisData(t.xAxis,e.xAxis,i.xAxis.label),o.yAxis=this._createAxisData(t.yAxis,n[0],i.yAxis.label,!0),this.hasRightYAxis&&(o.rightYAxis=this._createAxisData(t.rightYAxis,n[1],i.yAxis.label,!0,!0),o.rightYAxis.aligned=o.xAxis.aligned),o},addScale:function(t,e,i,n){i=i||{},n=n||{},i.areaType=i.areaType||t,i.chartType=n.chartType||i.chartType,this.scaleDataMap[t]=this._createScaleData(e,i,n)},setAxisDataMap:function(){this.axisDataMap=this._createAxesData()},updateXAxisDataForAutoTickInterval:function(t,e){var i=this.options.series.shifting,n=this.options.series.zoomable,o=this.axisDataMap.xAxis,r=this.boundsModel.getDimension("series").width,s=this.addedDataCount;i||!t||n?a.updateLabelAxisDataForAutoTickInterval(o,r,s,e):a.updateLabelAxisDataForStackingDynamicData(o,t,this.firstTickCount),this.firstTickCount||(this.firstTickCount=o.tickCount)},updateXAxisDataForLabel:function(t){var e,i,n,o=this.axisDataMap.xAxis,r=o.labels,l=this.boundsModel.getDimensionMap(["series","yAxis","chart"]),c=o.isLabelAxis,u=this.theme.xAxis.label;t&&(r=r.slice(0,r.length-1)),r=s.addPrefixSuffix(r,this.options.xAxis.prefix,this.options.xAxis.suffix),e=h.filter(r,function(t){return!!t}),i=h.isNull(this.prevValidLabelCount)?e.length:this.prevValidLabelCount,this.options.yAxis.isCenter&&(i+=1,l.yAxis.width=0),n=o.options.rotateLabel===!1?a.makeAdditionalDataForMultilineLabels(r,i,u,c,l):a.makeAdditionalDataForRotatedLabels(e,i,u,c,l),this.prevValidLabelCount=i,h.extend(o,n)},_findLimit:function(t,e,i){var n;return n=0===e?i?t.yAxis:t.xAxis:t.rightYAxis?t.rightYAxis:t.yAxis},makeLimitMap:function(t,e){var i=this,n=this.scaleDataMap,o={};return n.xAxis&&(o.xAxis=n.xAxis.limit),n.yAxis&&(o.yAxis=n.yAxis.limit),n.rightYAxis&&(o.rightYAxis=n.rightYAxis.limit),n.legend&&(o.legend=n.legend.limit),h.forEachArray(t,function(t,n){o[t]=i._findLimit(o,n,e)}),o}});t.exports=l},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(44),r=i(10),s=i(118),h=i(6),l=Math.abs,c={_makeLimitForDivergingOption:function(t){var e=Math.max(l(t.min),l(t.max));return{min:-e,max:e}},_adjustLimitForOverflow:function(t,e,i){var n=t.min,o=t.max;return i.min&&(n-=e),i.max&&(o+=e),{min:n,max:o}},millisecondMap:{year:31536e6,month:26784e5,week:6048e5,date:864e5,hour:36e5,minute:6e4,second:1e3},millisecondTypes:["year","month","week","date","hour","minute","second"],_findDateType:function(t,e){var i,o=t.max-t.min,a=this.millisecondTypes,r=this.millisecondMap,s=a.length-1;return o?h.forEachArray(a,function(t,n){var l,c=r[t],u=Math.floor(o/c);return u&&(l=n0?i.min=0:i.max=0):0===i.min&&0===i.max?i.max=10:i.min===i.max&&(i.min-=i.min/10,i.max+=i.max/10),i},_calculateDatetimeScale:function(t,e,i){var n,o,a;return n=this._makeDatetimeInfo(this._getLimitSafely(t),t.length),a=n.dataLimit,i&&(a=this._makeLimitForDivergingOption(a)),o=s({min:a.min,max:a.max,offsetSize:e,minimumStepSize:1}),o=this._restoreScaleToDatetimeType(o,n.minDate,n.divisionNumber)},_calculatePercentStackedScale:function(t,e){var i;return i=0===a.sumMinusValues(t)?n.PERCENT_STACKED_AXIS_SCALE:0===a.sumPlusValues(t)?n.MINUS_PERCENT_STACKED_AXIS_SCALE:e?n.DIVERGING_PERCENT_STACKED_AXIS_SCALE:n.DUAL_PERCENT_STACKED_AXIS_SCALE},_calculateCoordinateScale:function(t,e,i,n,o){var a,r,l=this._getLimitSafely(t),c=o.limitOption||{},u=h.isExisty(c.min),d=h.isExisty(c.max),p=l.min,f=l.max,m=o.stepCount;return u&&(p=c.min,m=null),d&&(f=c.max,m=null),r=s({min:p,max:f,stepCount:m,offsetSize:e}),a=this._isOverflowed(i,r,l,u,d),a&&(r.limit=this._adjustLimitForOverflow(r.limit,r.step,a)),n&&(r.limit=this._makeLimitForDivergingOption(r.limit)),r},_isOverflowed:function(t,e,i,n,o){var a=!(!t||!t.minItem),r=!(!t||!t.maxItem),s=e.limit,h=a||!n&&s.min===i.min&&0!==s.min,l=r||!o&&s.max===i.max&&0!==s.max;return h||l?{min:h,max:l}:null},makeScaleData:function(t,e,i,n){var a,r=o.isDivergingChart(i,n.diverging),s=n.overflowItem;return o.isPercentStackChart(i,n.stackType)?a=this._calculatePercentStackedScale(t,r):o.isDatetimeType(n.type)?a=this._calculateDatetimeScale(t,e,r):(o.isRadialChart(i)&&(n.stepCount=Math.floor(e/100)),a=this._calculateCoordinateScale(t,e,s,r,n)),a}};t.exports=c},function(t,e,i){"use strict";function n(t){var e=0===t?1:Math.log(Math.abs(t))/Math.LN10;return Math.pow(10,Math.floor(e))}function o(t){var e,i,n,o;for(n=0,o=d.length;n1?1:1/o,r=i*a;return e=Math.ceil(e*a/r)*r/a,t=t>i?Math.floor(t*a/r)*r/a:t<0?-(Math.ceil(Math.abs(t)*a/r)*r)/a:0,{min:t,max:e}}function s(t,e){var i=1/Math.min(n(t),n(e));return Math.ceil(t*i/(e*i))}function h(t){var e=a(t.step),i=r(t.limit.min,t.limit.max,e),n=Math.abs(i.max-i.min),o=s(n,e);return{limit:{min:i.min,max:i.max},step:e,stepCount:o}}function l(t,e,i,n,o){var a,r,s=Math.abs(e-t),h=s/i;return n||(n=Math.ceil(i/p)),a=i/n,r=h*a,u.isNumber(o)&&ri.labelInterval&&(n=this._makeLabelsByIntervalOption(t.labels,i.labelInterval,t.addedDataCount)),o.isDatetimeType(i.type)&&(n=r.formatDates(n,i.dateFormat)),t.aligned||(e+=1),{labels:n,tickCount:e,validTickCount:0,isLabelAxis:!0,options:i,isVertical:!!t.isVertical,isPositionRight:!!t.isPositionRight,aligned:!!t.aligned}},makeValueAxisData:function(t){var e=t.labels,i=t.tickCount,n=t.limit,o={labels:e,tickCount:i,validTickCount:i,limit:n,dataMin:n.min,distance:n.max-n.min,step:t.step,options:t.options,isVertical:!!t.isVertical,isPositionRight:!!t.isPositionRight,aligned:!!t.aligned};return o},makeAdditionalDataForCoordinateLineType:function(t,e,i,n,o){var a,r=1,h=0,l=s.min(e),c=s.max(e);return a=c-l,a&&(i.minc&&(i.max-=n,r-=(c-i.max)/a,o-=1,t.pop())),{labels:t,tickCount:o,validTickCount:o,limit:i,dataMin:l,distance:a,positionRatio:h,sizeRatio:r}},_makeAdjustingIntervalInfo:function(t,e,i){var n,o=parseInt(e/i,10),a=parseInt(t/o,10),r=null;return a>1&&(n=t-a*o,n>=a&&(o+=parseInt(n/a,0),n%=a),r={blockCount:o,beforeRemainBlockCount:n,interval:a}),r},_makeCandidatesForAdjustingInterval:function(t,e){var i=this,n=h.range(90,121,5),o=h.map(n,function(n){return i._makeAdjustingIntervalInfo(t,e,n)});return h.filter(o,function(t){return!!t})},_calculateAdjustingIntervalInfo:function(t,e){var i=this._makeCandidatesForAdjustingInterval(t,e),n=null;return i.length&&(n=s.min(i,function(t){return t.blockCount})),n},_makeFilteredLabelsByInterval:function(t,e,i){return h.filter(t.slice(e),function(t,e){return e%i===0})},updateLabelAxisDataForAutoTickInterval:function(t,e,i,n){var o,a,r,s,l,c;n&&(t.tickCount-=1,t.labels.pop()),o=t.tickCount-1,a=this._calculateAdjustingIntervalInfo(o,e),a&&(r=a.blockCount,s=a.interval,l=a.beforeRemainBlockCount,t.eventTickCount=t.tickCount,c=Math.round(l/2)-i%s,c<0&&(c+=s),t.labels=this._makeFilteredLabelsByInterval(t.labels,c,s),h.extend(t,{startIndex:c,tickCount:r+1,positionRatio:c/o,sizeRatio:1-l/o,interval:s}))},updateLabelAxisDataForStackingDynamicData:function(t,e,i){var n,o=e.interval,a=e.startIndex,r=t.tickCount-1,s=r/o,l=i?i-1:0;l&&2*l<=s&&(o*=2),t.labels=this._makeFilteredLabelsByInterval(t.labels,a,o),s=t.labels.length-1,n=r-o*s,h.extend(t,{startIndex:a,eventTickCount:t.tickCount,tickCount:t.labels.length,positionRatio:a/r,sizeRatio:1-n/r,interval:o})},_calculateXAxisLabelAreaWidth:function(t,e,i){return t||(i-=1),e/i},_createMultilineLabel:function(t,e,i){var n=String(t).split(/\s+/),o=n[0],a=[];return h.forEachArray(n.slice(1),function(t){var n=r.getRenderedLabelWidth(o+" "+t,i);n>e?(a.push(o),o=t):o+=" "+t}),o&&a.push(o),a.join("
")},_createMultilineLabels:function(t,e,i){var n=this._createMultilineLabel;return h.map(t,function(t){return n(t,i,e)})},_calculateMultilineHeight:function(t,e,i){return r.getRenderedLabelsMaxHeight(t,h.extend({cssText:"line-height:1.2;width:"+i+"px"},e))},makeAdditionalDataForMultilineLabels:function(t,e,i,n,o){var a=o.series.width,s=this._calculateXAxisLabelAreaWidth(n,a,e),h=this._createMultilineLabels(t,i,a),l=this._calculateMultilineHeight(h,i,s),c=r.getRenderedLabelsMaxHeight(t,i);return{multilineLabels:h,overflowHeight:l-c,overflowLeft:s/2-o.yAxis.width}},_findRotationDegree:function(t,e,i){var o=null;return h.forEachArray(n.DEGREE_CANDIDATES,function(r){var s=a.calculateRotatedWidth(r,e,i);return o=r,!(s<=t+n.XAXIS_LABEL_COMPARE_MARGIN)}),o},_calculateRotatedWidth:function(t,e,i,o){var s=r.getRenderedLabelWidth(e,o),h=a.calculateRotatedWidth(t,s,i);return h-=a.calculateAdjacent(n.ANGLE_90-t,i/2)},_calculateLimitWidth:function(t,e,i){var n=t;return e&&(n+=i/2),n},makeAdditionalDataForRotatedLabels:function(t,e,i,o,s){var h,l,c,u,d,p=r.getRenderedLabelsMaxWidth(t,i),f=s.series.width,m=this._calculateXAxisLabelAreaWidth(o,f,e),g=null,_=n.CHART_PADDING+s.yAxis.width+f;return m1,i.tooltip=i.tooltip||{},i.tooltip.grouped=!0,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},_makeYAxisOptions:function(t,e){var i={};return e=e||{},s.forEachArray(t,function(t,n){i[t]=e[n]||e}),i},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getOriginalRawData(),i=o.filterCheckedRawData(e,t),n=r({rawSeriesData:i.series,yAxisOptions:this.options.yAxis});this.chartTypes=n.chartTypes,this.seriesTypes=n.seriesTypes,this.rerender(t,i,n)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("columnSeries","columnSeries"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("yAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){var t={yAxis:this._makeYAxisScaleOption("yAxis",this.chartTypes[0],!this.hasRightYAxis)};return this.hasRightYAxis&&(t.rightYAxis=this._makeYAxisScaleOption("rightYAxis",this.chartTypes[1])),t},_makeYAxisScaleOption:function(t,e,i){var n=this.yAxisOptions[e],o={isSingleYAxis:!!i};return i&&this.options.series&&this._setAdditionalOptions(o),{options:n,areaType:"yAxis",chartType:e,additionalOptions:o}},_setAdditionalOptions:function(t){var e=this.dataProcessor;s.forEach(this.options.series,function(i,n){var o;i.stackType&&(o=e.findChartType(n),a.isAllowedStackOption(o)&&(t.chartType=o,t.stackType=i.stackType))})},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType],o=this.options.series||{};e=function(e){var n=(o[e]||o).stackType;i.dataProcessor.addDataRatios(t[e],n,e)},s.forEachArray(n,e)}});t.exports=h},function(t,e,i){"use strict";function n(t){var e=t.rawSeriesData,i=t.yAxisOptions,n=o(e,i);return{chartTypes:n.chartTypes,seriesTypes:n.seriesTypes}}function o(t,e){var i,n=r.keys(t).sort(),o=a(n,e),s=o.length?o:n,h=r.filter(o,function(e){return t[e].length});return i=1===h.length?{chartTypes:h,seriesTypes:h}:{chartTypes:s,seriesTypes:n}}function a(t,e){var i,n=t.slice(),o=[].concat(e||[]),a=!1;return!o.length||1===o.length&&!o[0].chartType?n=[]:o.length&&(i=r.map(o,function(t){return t.chartType}),r.forEachArray(i,function(t,e){a=a||t&&n[e]!==t||!1}),a&&n.reverse()),n}var r=i(6);t.exports=n},function(t,e,i){"use strict";var n=i(41),o=i(6),a=o.defineClass(n,{init:function(t,e,i){this.chartTypes=["line","scatter"],this.seriesTypes=["line","scatter"],n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},getScaleOption:function(){return{yAxis:{valueType:"y"},xAxis:{valueType:"x"}}},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType];e=function(e){i.dataProcessor.addDataRatiosForCoordinateType(e,t,!1)},o.forEachArray(n,e)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("scatterSeries","scatterSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")}});t.exports=a},function(t,e,i){"use strict";var n=i(41),o=i(30),a=i(11),r=i(126),s=i(123),h=i(6),l=h.defineClass(n,{className:"tui-combo-chart",init:function(t,e,i){var o=r({rawSeriesData:t.series,yAxisOptions:i.yAxis});this.chartTypes=o.chartTypes,this.seriesTypes=o.seriesTypes,this.yAxisOptions=this._makeYAxisOptions(this.chartTypes,i.yAxis),this.hasRightYAxis=h.isArray(i.yAxis)&&i.yAxis.length>1,i.tooltip=i.tooltip||{},i.tooltip.grouped=!0,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0}),this._dynamicDataHelper=new s(this)},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getZoomedRawData(),i=o.filterCheckedRawData(e,t),n=r({rawSeriesData:i.series,yAxisOptions:this.options.yAxis});this._dynamicDataHelper.reset(),this._dynamicDataHelper.changeCheckedLegends(t,i,n)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("areaSeries","areaSeries"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("xAxis","axis"),this.componentManager.register("yAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){var t={yAxis:this._makeYAxisScaleOption("yAxis",this.chartTypes[0],!this.hasRightYAxis)};return this.hasRightYAxis&&(t.rightYAxis=this._makeYAxisScaleOption("rightYAxis",this.chartTypes[1])),t},_makeYAxisScaleOption:function(t,e,i){var n=this.yAxisOptions[e],o={isSingleYAxis:!!i};return i&&this.options.series&&this._setAdditionalOptions(o),{options:n,areaType:"yAxis",chartType:e,additionalOptions:o}},_makeYAxisOptions:function(t,e){var i={};return e=e||{},h.forEachArray(t,function(t,n){i[t]=e[n]||e}),i},addData:function(t,e){this._dynamicDataHelper.addData(t,e)},_setAdditionalOptions:function(t){var e=this.dataProcessor;h.forEach(this.options.series,function(i,n){var o;i.stackType&&(o=e.findChartType(n),a.isAllowedStackOption(o)&&(t.chartType=o,t.stackType=i.stackType))})},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType],o=this.options.series||{};e=this.dataProcessor.isCoordinateType()?function(e){i.dataProcessor.addDataRatiosForCoordinateType(e,t,!1)}:function(e){var n=(o[e]||o).stackType;i.dataProcessor.addDataRatios(t[e],n,e)},h.forEachArray(n,e)},_renderForZoom:function(t){var e=this.readyForRender();this.componentManager.render("zoom",e,{isResetZoom:t})},onZoom:function(t){this._dynamicDataHelper.pauseAnimation(),this.dataProcessor.updateRawDataForZoom(t),this._renderForZoom(!1)},onResetZoom:function(){var t=this.dataProcessor.getOriginalRawData();this._dynamicDataHelper.checkedLegends&&(t=o.filterCheckedRawData(t,this._dynamicDataHelper.checkedLegends)),this.dataProcessor.initData(t),this.dataProcessor.initZoomedRawData(),this.dataProcessor.addDataFromRemainDynamicData(h.pick(this.options.series,"shifting")),this._renderForZoom(!0),this._dynamicDataHelper.restartAnimation()}});t.exports=l},function(t,e,i){"use strict";var n=i(41),o=i(30),a=i(6),r=a.defineClass(n,{className:"tui-combo-chart",init:function(t,e,i){this.seriesTypes=a.keys(t.series).sort(),this.chartTypes=["pie","pie"],n.call(this,{rawData:t,theme:e,options:i,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("pie1Series","pieSeries"),this.componentManager.register("pie2Series","pieSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(){var t=this,e=this.seriesTypes||[this.chartType];a.forEachArray(e,function(e){t.dataProcessor.addDataRatiosOfPieChart(e)})},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getOriginalRawData(),i=o.filterCheckedRawData(e,t);n.prototype.onChangeCheckedLegends.call(this,t,i,{seriesTypes:this.seriesTypes})}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-pie-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION),n.call(this,{rawData:t,theme:e,options:i})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("pieSeries","pieSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(){this.dataProcessor.addDataRatiosOfPieChart(this.chartType)}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-bubble-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.circleLegend=i.circleLegend||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION), -a.isUndefined(i.circleLegend.visible)&&(i.circleLegend.visible=!0),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0})},getScaleOption:function(){var t={};return this.dataProcessor.hasXValue(this.chartType)&&(t.xAxis={valueType:"x"}),this.dataProcessor.hasYValue(this.chartType)&&(t.yAxis={valueType:"y"}),t},_setDefaultOptions:function(t){n.prototype._setDefaultOptions.call(this,t),this.options.circleLegend=this.options.circleLegend||{},a.isUndefined(this.options.circleLegend.visible)&&(this.options.circleLegend.visible=!0)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("circleLegend","circleLegend"),this.componentManager.register("bubbleSeries","bubbleSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatiosForCoordinateType(this.chartType,t,!0)}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-scatter-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0})},getScaleOption:function(){return{xAxis:{valueType:"x"},yAxis:{valueType:"y"}}},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("scatterSeries","scatterSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatiosForCoordinateType(this.chartType,t,!1)}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(134),a=i(8),r=i(6),s=r.defineClass(n,{className:"tui-heatmap-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=a.TOOLTIP_DEFAULT_ALIGN_OPTION),i.tooltip.grouped=!1,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},_addComponents:function(){var t=this.theme.series[this.chartType],e=new o(t.startColor,t.endColor);this._addComponentsForAxisType({axis:[{name:"yAxis",isVertical:!0},{name:"xAxis"}],legend:{classType:"spectrumLegend",additionalParams:{colorSpectrum:e}},series:[{name:"heatmapSeries",data:{colorSpectrum:e}}],tooltip:!0,mouseEventDetector:!0})},getScaleOption:function(){return{legend:!0}},addDataRatios:function(t){this.dataProcessor.addDataRatios(t.legend,null,this.chartType)},addComponents:function(){var t=this.theme.series[this.chartType],e=new o(t.startColor,t.endColor);this.componentManager.register("title","title"),this.componentManager.register("legend","spectrumLegend",{colorSpectrum:e}),this.componentManager.register("heatmapSeries","heatmapSeries",{colorSpectrum:e}),this.componentManager.register("xAxis","axis"),this.componentManager.register("yAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")}});t.exports=s},function(t,e,i){"use strict";var n=i(135),o=i(6),a=o.defineClass({init:function(t,e){var i;this.start=n.colorNameToHex(t),this.startRGB=n.hexToRGB(this.start),this.end=n.colorNameToHex(e),i=n.hexToRGB(this.end),this.distances=this._makeDistances(this.startRGB,i),this.colorMap={}},_makeDistances:function(t,e){return o.map(t,function(t,i){return e[i]-t})},getColor:function(t){var e,i,a=this.colorMap[t];return a||(e=this.distances,i=o.map(this.startRGB,function(i,n){return i+parseInt(e[n]*t,10)}),a=n.rgbToHEX.apply(null,i)),a||null}});t.exports=a},function(t,e){"use strict";var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},o={leadingZero:function(t,e){var i="",n=0;if(String(t).length>e)return String(t);for(;n=0&&(r.ratio=a),r})},getMapData:function(){return this.mapData||(this.mapData=this._createMapData(this.rawMapData)),this.mapData},getDatum:function(t){return this.getMapData()[t]},getLabelData:function(t){var e=this,i=this.getMapData(),n=a.filter(i,function(t){return e.dataProcessor.getValueMapDatum(t.code)});return a.map(n,function(e){return{name:e.name,labelPosition:{left:e.labelPosition.left*t,top:e.labelPosition.top*t}}})},_makeMapDimension:function(){var t=this.getMapData(),e=a.map(t,function(t){return t.bound.position.left}),i=a.map(t,function(t){return t.bound.position.left+t.bound.dimension.width}),n=a.map(t,function(t){return t.bound.position.top}),r=a.map(t,function(t){return t.bound.position.top+t.bound.dimension.height});return{width:o.max(i)-o.min(e),height:o.max(r)-o.min(n)}},getMapDimension:function(){return this.mapDimension||(this.mapDimension=this._makeMapDimension()),this.mapDimension}});t.exports=r},function(t,e,i){"use strict";var n=i(100),o=i(7),a=i(6),r=a.defineClass(n,{init:function(t,e,i){this.rawData=t,this.options=i},initData:function(t){this.rawData=t,this.valueMap=null},_makeValueMap:function(){var t=this.rawData.series.map,e={},i=this._findFormatFunctions();return a.forEachArray(t,function(t){var n={value:t.data,label:o.formatValue({value:t.data,formatFunctions:i,chartType:"map",areaType:"series"})};t.name&&(n.name=t.name),t.labelCoordinate&&(n.labelCoordinate=t.labelCoordinate),e[t.code]=n}),e},getValueMap:function(){return this.valueMap||(this.valueMap=this._makeValueMap()),this.valueMap},getValues:function(){return a.pluck(this.getValueMap(),"value")},getValueMapDatum:function(t){return this.getValueMap()[t]},addDataRatios:function(t){var e=t.min,i=t.max-e;a.forEach(this.getValueMap(),function(t){t.ratio=(t.value-e)/i})},createBaseValuesForLimit:function(){return this.getValues()},getLegendVisibility:function(){return null}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(6),a=i(84),r=o.defineClass(n,{className:"tui-radial-chart",Series:a,init:function(t,e,i){i.tooltip&&(i.tooltip.grouped=!1),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("plot","radialPlot"),this.componentManager.register("radialSeries","radialSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatios(t[this.chartType],null,this.chartType)},getScaleOption:function(){return{yAxis:{}}}});t.exports=r},function(t,e,i){"use strict";var n=i(41),o=i(30),a=i(6),r=a.defineClass(n,{className:"tui-boxplot-chart",init:function(t,e,i){o.appendOutliersToSeriesData(t),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("boxplotSeries","boxplotSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){return{yAxis:!0}},onChangeCheckedLegends:function(t){var e;this.hasRightYAxis&&(e={optionChartTypes:["boxplot","boxplot"]}),n.prototype.onChangeCheckedLegends.call(this,t,null,e)},addDataRatios:function(t){var e=this.options.series||{},i=this.chartType,n=(e[i]||e).stackType;this.dataProcessor.addDataRatios(t[i],n,i)}});t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(32),a=i(33);o.register(n.DEFAULT_THEME_NAME,a)},function(t,e){}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("raphael"),require("tui-code-snippet")):"function"==typeof define&&define.amd?define(["raphael","tui-code-snippet"],e):"object"==typeof exports?exports.chart=e(require("raphael"),require("tui-code-snippet")):(t.tui=t.tui||{},t.tui.chart=e(t.Raphael,t.tui&&t.tui.util))}(this,function(__WEBPACK_EXTERNAL_MODULE_3__,__WEBPACK_EXTERNAL_MODULE_6__){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var i={};return e.m=t,e.c=i,e.p="/dist/",e(0)}([function(t,e,i){"use strict";var n=i(2),o=i(29);i(147),o.registerPlugin(n.name,n.plugins,n.callback),o.renderUtil=i(7),o.arrayUtil=i(10),o.colorutil=i(138),t.exports=o},,function(t,e,i){"use strict";function n(t){var e=document.createElementNS("http://www.w3.org/2000/svg","filter"),i=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),n=document.createElementNS("http://www.w3.org/2000/svg","feFlood"),o=document.createElementNS("http://www.w3.org/2000/svg","feComposite"),a=document.createElementNS("http://www.w3.org/2000/svg","feMorphology"),r=document.createElementNS("http://www.w3.org/2000/svg","feMerge"),s=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode"),h=document.createElementNS("http://www.w3.org/2000/svg","feMergeNode");e.id="glow",n.setAttribute("result","flood"),n.setAttribute("flood-color","#ffffff"),n.setAttribute("flood-opacity","0.5"),o.setAttribute("in","flood"),o.setAttribute("result","mask"),o.setAttribute("in2","SourceGraphic"),o.setAttribute("operator","in"),a.setAttribute("in","mask"),a.setAttribute("result","dilated"),a.setAttribute("operator","dilate"),a.setAttribute("radius","2"),i.setAttribute("in","dilated"),i.setAttribute("result","blurred"),i.setAttribute("stdDeviation","1"),s.setAttribute("in","blurred"),h.setAttribute("in","SourceGraphic"),e.appendChild(n),e.appendChild(o),e.appendChild(a),e.appendChild(i),e.appendChild(r),r.appendChild(s),r.appendChild(h),t.defs.appendChild(e)}var o=i(3),a=i(4),r=i(12),s=i(13),h=i(14),l=i(16),u=i(18),c=i(19),d=i(20),p=i(21),f=i(22),m=i(23),g=i(24),_=i(25),T=i(26),v=i(27),y=i(28),x={bar:a,boxplot:r,bullet:s,column:a,line:h,area:l,pie:u,bubble:d,scatter:d,heatmap:p,treemap:p,map:f,radial:c,legend:m,mapLegend:g,circleLegend:_,radialPlot:y,title:T,axis:v},A=function(t,e){var i=o(t,e.width,e.height),a=i.rect(0,0,e.width,e.height);return i.raphael.svg&&n(i),i.pushDownBackgroundToBottom=function(){a.toBack()},i.changeChartBackgroundColor=function(t){a.attr({fill:t})},i.changeChartBackgroundOpacity=function(t){a.attr({"fill-opacity":t})},i.resizeBackground=function(t,e){a.attr({width:t,height:e})},a.attr({fill:"#fff","stroke-width":0}),i};t.exports={name:"Raphael",plugins:x,callback:A}},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_3__},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=1,h=.3,l=.2,u=o.defineClass({render:function(t,e){var i=e.groupBounds;return i?(this.paper=t,this.theme=e.theme,this.seriesDataModel=e.seriesDataModel,this.chartType=e.chartType,this.paper.setStart(),this.options=e.options,this.theme=e.theme,this.groupBars=this._renderBars(i),this.groupBorders=this._renderBarBorders(i),this.overlay=this._renderOverlay(),this.groupBounds=i,this.paper.setFinish()):null},_renderOverlay:function(){var t={width:1,height:1,left:0,top:0},e={"fill-opacity":0};return this._renderBar(t,"#fff",e)},_renderBar:function(t,e,i){var a;return t.width<0||t.height<0?null:a=n.renderRect(this.paper,t,o.extend({fill:e,stroke:"none"},i))},_renderBars:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=o.map(t,function(t,a){return o.map(t,function(t,o){var r,s,h;return t?(h=e.seriesDataModel.getSeriesItem(a,o),r=n?i[a]:i[o],s=e._renderBar(t.start,r),{rect:s,color:r,bound:t.end,item:h,groupIndex:a,index:o,isRange:h.isRange}):null})});return a},_makeRectPoints:function(t){return{leftTop:{left:Math.ceil(t.left),top:Math.ceil(t.top)},rightTop:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top)},rightBottom:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top+t.height)},leftBottom:{left:Math.ceil(t.left),top:Math.ceil(t.top+t.height)}}},_makeTopLinePath:function(t,e,i){var a,r=null,s=i.value;return("bar"===e||s>=0||i.isRange)&&(a=o.extend({},t.leftTop),a.left-="column"===e||s<0?1:0,r=n.makeLinePath(a,t.rightTop).join(" ")),r},_makeRightLinePath:function(t,e,i){var o=null;return("column"===e||i.value>=0||i.isRange)&&(o=n.makeLinePath(t.rightTop,t.rightBottom).join(" ")),o},_makeBottomLinePath:function(t,e,i){var o=null;return("bar"===e||i.value<0||i.isRange)&&(o=n.makeLinePath(t.leftBottom,t.rightBottom).join(" ")),o},_makeLeftLinePath:function(t,e,i){var o=null;return("column"===e||i.value<0||i.isRange)&&(o=n.makeLinePath(t.leftTop,t.leftBottom).join(" ")),o},_makeBorderLinesPaths:function(t,e,i){var n=this._makeRectPoints(t),a={top:this._makeTopLinePath(n,e,i),right:this._makeRightLinePath(n,e,i),bottom:this._makeBottomLinePath(n,e,i),left:this._makeLeftLinePath(n,e,i)};return o.filter(a,function(t){return t})},_renderBorderLines:function(t,e,i,a){var r=this,s=this._makeBorderLinesPaths(t,i,a),h={};return o.forEach(s,function(t,i){h[i]=n.renderLine(r.paper,t,e,1)}),h},_renderBarBorders:function(t){var e,i=this,n=this.theme.borderColor;return n?e=o.map(t,function(t,e){return o.map(t,function(t,o){var a;return t?(a=i.seriesDataModel.getSeriesItem(e,o),i._renderBorderLines(t.start,n,i.chartType,a)):null})}):null},_animateRect:function(t,e){t.animate({x:e.left,y:e.top,width:e.width,height:e.height},r,">")},_animateBorders:function(t,e,i,n){var a=this._makeBorderLinesPaths(e,i,n);o.forEach(t,function(t,e){t.animate({path:a[e]},r,">")})},animate:function(t){var e=this,i=this.groupBorders||[];n.forEach2dArray(this.groupBars,function(t,n,o){var a=i[n]&&i[n][o];t&&(e._animateRect(t.rect,t.bound),a&&e._animateBorders(a,t.bound,e.chartType,t.item))}),t&&(this.callbackTimeout=setTimeout(function(){t(),delete e.callbackTimeout},r))},showAnimation:function(t){var e=this.groupBars[t.groupIndex][t.index],i=e.bound;this.overlay.attr({width:i.width,height:i.height,x:i.left,y:i.top,"fill-opacity":.3})},hideAnimation:function(){this.overlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0})},_updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},resize:function(t){var e=this,i=this.groupBorders||[],o=t.dimension,a=t.groupBounds;this.groupBounds=a,this.paper.setSize(o.width,o.height),n.forEach2dArray(this.groupBars,function(t,o,r){var s,h;t&&(s=i[o]&&i[o][r],h=a[o][r].end,t.bound=h,n.updateRectBound(t.rect,h),s&&e._updateBordersPath(s,h,e.chartType,t.item))})},_changeBordersColor:function(t,e){o.forEach(t,function(t){t.attr({stroke:e})})},_changeBarColor:function(t,e,i){var n,o=this.groupBars[t.groupIndex][t.index];o.rect.attr({fill:e}),i&&(n=this.groupBorders[t.groupIndex][t.index],this._changeBordersColor(n,i))},selectSeries:function(t){var e,i=this.groupBars[t.groupIndex][t.index],o=a.color(i.color),r=this.theme.selectionColor,s=r||n.makeChangedLuminanceColor(o.hex,l),h=this.theme.borderColor;h&&(e=a.color(h),h=n.makeChangedLuminanceColor(e.hex,l)),this._changeBarColor(t,s,h)},unselectSeries:function(t){var e=this.groupBars[t.groupIndex][t.index],i=this.theme.borderColor;this._changeBarColor(t,e.color,i)},selectLegend:function(t){var e=this.groupBorders||[],i=o.isNull(t);n.forEach2dArray(this.groupBars,function(n,a,r){var l,u;n&&(l=e[a]&&e[a][r],u=i||t===r?s:h,n.rect.attr({"fill-opacity":u}),l&&o.forEach(l,function(t){t.attr({"stroke-opacity":u})}))})},renderSeriesLabel:function(t,e,i,a,r){var s=r||"column"===this.chartType?"middle":"start",h={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0,"text-anchor":s},l=t.set();return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var r,s=e[a][o],u=n.renderText(t,s.end,i.end,h);u.node.style.userSelect="none",u.node.style.cursor="default",u.node.setAttribute("filter","url(#glow)"),l.push(u),s.start&&(r=n.renderText(t,s.start,i.start,h),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),l.push(r))})}),l}});t.exports=u},function(t,e,i){"use strict";function n(t){return o.isExisty(t)&&"number"==typeof t}var o=i(6),a=i(7),r=i(3),s={makeLinePath:function(t,e,i){var n,a=[t.left,t.top],r=[e.left,e.top];return i=i||1,n=i%2/2,o.forEachArray(a,function(t,e){t===r[e]&&(a[e]=r[e]=Math.round(t)-n)}),["M"].concat(a).concat("L").concat(r)},renderLine:function(t,e,i,n){var o=t.path([e]),a={stroke:i,"stroke-width":n||2};return"transparent"===i&&(a.stroke="#fff",a["stroke-opacity"]=0),o.attr(a),o},getEllipsisText:function(t,e,i){for(var n=t.split(""),o=n.length,a=this.getRenderedTextSize(".",i.fontSize,i.fontFamily).width,r=2*a,s="",h=0;h=e){s+="..";break}s+=n[h]}return s},renderText:function(t,e,i,n){var a=t.text(e.left,e.top,o.decodeHTMLEntity(String(i)));return n&&(n["dominant-baseline"]?a.node.setAttribute("dominant-baseline",n["dominant-baseline"]):a.node.setAttribute("dominant-baseline","central"),a.attr(n)),a},renderArea:function(t,e,i){var n=t.path(e);return i=o.extend({"stroke-opacity":0},i),n.attr(i),n},renderCircle:function(t,e,i,n){var o=t.circle(e.left,e.top,i);return n&&o.attr(n),o},renderRect:function(t,e,i){var n=t.rect(e.left,e.top,e.width,e.height);return i&&n.attr(i),n},updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},forEach2dArray:function(t,e){t&&o.forEachArray(t,function(t,i){o.forEachArray(t,function(t,n){e(t,i,n)})})},makeChangedLuminanceColor:function(t,e){var i;return t=t.replace("#",""),e=e||0,i=o.map(o.range(3),function(i){var n=parseInt(t.substr(2*i,2),16),o=n+n*e;return o=Math.round(Math.min(Math.max(0,o),255)).toString(16),a.formatToZeroFill(o,2)}).join(""),"#"+i},getRenderedTextSize:function(t,e,i){var n=r(document.body,100,100),o=n.text(0,0,t).attr({"font-size":e,"font-family":i}),a=o.getBBox();return o.remove(),n.remove(),{width:a.width,height:a.height}},animateOpacity:function(t,e,i,o){var a=n(o)?o:600,s=n(e)?e:0,h=n(i)?i:1,l=r.animation({opacity:h},a);t.attr({opacity:s}),t.animate(l)}};t.exports=s},function(t,e){t.exports=__WEBPACK_EXTERNAL_MODULE_6__},function(t,e,i){"use strict";function n(t,e){t=h.isArray(t)?t:[t],h.forEachArray(t,e)}function o(t){return"alpha(opacity="+t*a.OLD_BROWSER_OPACITY_100+")"}var a=i(8),r=i(9),s=i(10),h=i(6),l=i(11),u=Array.prototype.concat,c=h.browser,d=c.msie&&7===c.version,p=c.msie&&c.version<=8,f=window.getComputedStyle||!1,m=0,g="clipRectForAnimation",_={concatStr:function(){return String.prototype.concat.apply("",arguments)},makeFontCssText:function(t){var e=[];return t?(t.fontSize&&e.push(this.concatStr("font-size:",t.fontSize,"px")),t.fontFamily&&e.push(this.concatStr("font-family:",t.fontFamily)),t.color&&e.push(this.concatStr("color:",t.color)),t.fontWeight&&e.push(this.concatStr("font-weight:",t.fontWeight)),e.join(";")):""},checkEl:null,_createSizeCheckEl:function(){var t,e;return this.checkEl?this.checkEl.style.cssText="":(t=r.create("DIV","tui-chart-size-check-element"),e=r.create("SPAN"),t.appendChild(e),this.checkEl=t),this.checkEl},_makeCachingKey:function(t,e,i){var n=[t,i];return h.forEach(e,function(t,e){n.push(t+e)}),n.join("-")},_addCssStyle:function(t,e){t.style.fontSize=(e.fontSize||a.DEFAULT_LABEL_FONT_SIZE)+"px",e.fontFamily&&(t.style.fontFamily=e.fontFamily),e.fontWeight&&(t.style.fontWeight=e.fontWeight),e.cssText&&(t.style.cssText+=e.cssText)},sizeCache:{},_getRenderedLabelSize:function(t,e,i){var n,o,a,r;return e=e||{},(t=h.isExisty(t)?String(t):"")?(n=this._makeCachingKey(t,e,i),r=this.sizeCache[n],r||(o=this._createSizeCheckEl(),a=o.firstChild,a.innerHTML=t,this._addCssStyle(o,e),document.body.appendChild(o),r=a[i],document.body.removeChild(o),this.sizeCache[n]=r),r):0},getRenderedLabelWidth:function(t,e){var i=this._getRenderedLabelSize(t,e,"offsetWidth");return i},getRenderedLabelHeight:function(t,e){var i=this._getRenderedLabelSize(t,e,"offsetHeight");return i},_getRenderedLabelsMaxSize:function(t,e,i){var n,o=0;return t&&t.length&&(n=h.map(t,function(t){return i(t,e)}),o=s.max(n)),o},getRenderedLabelsMaxWidth:function(t,e){var i=h.bind(this.getRenderedLabelWidth,this),n=this._getRenderedLabelsMaxSize(t,e,i);return n},getRenderedLabelsMaxHeight:function(t,e){var i=h.bind(this.getRenderedLabelHeight,this),n=this._getRenderedLabelsMaxSize(t,e,i);return n},renderDimension:function(t,e){t.style.cssText=[this.concatStr("width:",e.width,"px"),this.concatStr("height:",e.height,"px")].join(";")},renderPosition:function(t,e){h.isUndefined(e)||h.forEachArray(["top","bottom","left","right"],function(i){var n=e[i];h.isNumber(n)&&(t.style[i]=e[i]+"px")})},renderBackground:function(t,e){e&&(t.style.background=e)},renderFontFamily:function(t,e){e&&(t.style.fontFamily=e)},renderTitle:function(t,e,i){var n,o;return t?(n=r.create("DIV",i),n.innerHTML=t,o=_.makeFontCssText(e),e.background&&(o+=";"+this.concatStr("background:",e.background)),n.style.cssText=o,n):null},expandBound:function(t){var e=t.dimension,i=t.position;return{dimension:{width:e.width+2*a.SERIES_EXPAND_SIZE,height:e.height+2*a.SERIES_EXPAND_SIZE},position:{left:i.left-a.SERIES_EXPAND_SIZE,top:i.top-a.SERIES_EXPAND_SIZE}}},_properCase:function(t){return t.substring(0,1).toUpperCase()+t.substring(1)},makeMouseEventDetectorName:function(t,e,i){return t+this._properCase(e)+this._properCase(i)},formatValue:function(t){var e=t.value,i=t.formatFunctions,n=t.valueType||"value",o=t.areaType,a=t.chartType,r=t.legendName,s=[String(e)].concat(i||[]);return h.reduce(s,function(t,e){return e(t,a,o,n,r)})},formatValues:function(t,e,i,n,o){var a;return e&&e.length?a=h.map(t,function(t){return _.formatValue({value:t,formatFunctions:e,chartType:i,areaType:n,valueType:o})}):t},formatDate:function(t,e){var i=h.isDate(t)?t:new Date(t);return e=e||a.DEFAULT_DATE_FORMAT,h.formatDate(e,i)||t},formatDates:function(t,e){var i=this.formatDate;return e=e||a.DEFAULT_DATE_FORMAT,h.map(t,function(t){return i(t,e)})},cancelAnimation:function(t){t&&t.id&&(cancelAnimationFrame(t.id),delete t.id)},startAnimation:function(t,e,i){function n(){var r=(new Date).getTime()-o,s=Math.min(r/t,1);e(s),1===s?(delete a.id,i&&i()):a.id=requestAnimationFrame(n)}var o,a={};return o=(new Date).getTime(),a.id=requestAnimationFrame(n),a},isIE7:function(){return d},isOldBrowser:function(){return p},formatToZeroFill:function(t,e){var i="0";if(t=String(t),t.length>=e)return t;for(;t.length-1?"-":"",t.indexOf(".")>-1?(i=t.split("."),t=String(Math.abs(i[0])),r="."+i[1]):t=String(Math.abs(t)),t.length<=s?o=l:(i=t.split("").reverse(),n=i.length-1,i=h.map(i,function(t,e){var i=[t];return e-1||(i.push(e),t.className=i.join(" ")))},removeClass:function(t,e){var i=this._getClassNames(t),o=n.inArray(e,i);o!==-1&&(i.splice(o,1),t.className=i.join(" "))},hasClass:function(t,e){var i=this._getClassNames(t),o=n.inArray(e,i);return o>-1},findParentByClass:function(t,e,i){var n,o=t.parentNode;return n=o?this.hasClass(o,e)?o:"BODY"===o.nodeName||this.hasClass(o,i)?null:this.findParentByClass(o,e,i):null},append:function(t,e){t&&e&&(e=n.isArray(e)?e:[e],n.forEachArray(e,function(e){e&&t.appendChild(e)}))}};t.exports=a},function(t,e,i){"use strict";var n=i(6),o=function(t,e,i){var o,a,r;return e?(o=t[0],a=e.call(i,o,0),r=t.slice(1),n.forEachArray(r,function(t,n){var r=e.call(i,t,n+1);ra&&(a=r,o=t)})):o=Math.max.apply(null,t),o},r=function(t,e,i){var o=!1;return n.forEach(t,function(n,a){return e.call(i,n,a,t)&&(o=!0),!o}),o},s=function(t,e,i){var o=!!(t||[]).length;return n.forEach(t,function(n,a){return e.call(i,n,a,t)||(o=!1),o!==!1}),o},h=function(t,e,i,o){var a,r=[];return n.isBoolean(e)||(o=i,i=e,e=!1),i=i||function(t){return t},e?n.forEachArray(t,function(e,n){e=i.call(o,e,n,t),n&&a===e||r.push(e),a=e}):n.forEachArray(t,function(e,a){e=i.call(o,e,a,t),n.inArray(e,r)===-1&&r.push(e)}),r},l=function(t){var e,i=[],o=a(n.map(t,function(t){return t.length}));return n.forEachArray(t,function(t){for(e=0;e1&&!e},isDatetimeType:function(t){return t===n.AXIS_TYPE_DATETIME},isSupportPublicShowTooptipAPI:function(t){return this.isBarChart(t)||this.isColumnChart(t)||this.isLineChart(t)||this.isAreaChart(t)||this.isBoxplotChart(t)},isSupportPublicHideTooptipAPI:function(t){return this.isBarChart(t)||this.isColumnChart(t)||this.isLineChart(t)||this.isAreaChart(t)||this.isBoxplotChart(t)}};t.exports=a},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=1,h=.3,l=.2,u=1,c=2,d=2,p=1,f=o.defineClass({render:function(t,e){var i=e.groupBounds;return i?(this.paper=t,this.theme=e.theme,this.options=e.options,this.seriesDataModel=e.seriesDataModel,this.chartType=e.chartType,this.paper.setStart(),this.groupWhiskers=[],this.groupMedians=[],this.groupBoxes=this._renderBoxplots(i),this.groupBorders=this._renderBoxBorders(i),this.rectOverlay=this._renderRectOverlay(),this.circleOverlay=this._renderCircleOverlay(),this.groupBounds=i,this.paper.setFinish()):null},_renderRectOverlay:function(){var t={width:1,height:1,left:0,top:0},e={"fill-opacity":0};return n.renderRect(this.paper,t,o.extend({"stroke-width":0},e))},_renderCircleOverlay:function(){var t={left:0,top:0},e={"fill-opacity":0};return n.renderCircle(this.paper,t,0,o.extend({"stroke-width":0},e))},_renderBox:function(t,e,i){var a;return t.width<0||t.height<0?null:a=n.renderRect(this.paper,t,o.extend({fill:"#fff",stroke:e,"stroke-width":u},i))},_renderBoxes:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint;return o.map(t,function(t,a){return o.map(t,function(t,o){var r,s,h;return t?(h=e.seriesDataModel.getSeriesItem(a,o),r=n?i[a]:i[o],t.start&&(s=e._renderBox(t.start,r)),{rect:s,color:r,bound:t.end,item:h,groupIndex:a,index:o}):null})})},_renderBoxplots:function(t){var e=this._renderBoxes(t);return this.groupWhiskers=this._renderWhiskers(t),this.groupMedians=this._renderMedianLines(t),this.groupOutliers=this._renderOutliers(t),e},_renderWhisker:function(t,e,i){var o=this.paper,a=e.top-t.top,r=a>0?1:-1,s=t.width,h=t.left,l=s/4,u="M"+(h+l)+","+t.top+"H"+(h+3*l),d="M"+(h+2*l)+","+t.top+"V"+(t.top+Math.abs(a)*r),f=n.renderLine(o,u,i,c),m=n.renderLine(o,d,i,p),g=[];return f.attr({opacity:0}),m.attr({opacity:0}),g.push(f),g.push(m),g},_renderWhiskers:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,o){var a=n?i[r]:i[o];t&&(s=s.concat(e._renderWhisker(t.min,t.start,a)),s=s.concat(e._renderWhisker(t.max,t.end,a)))}),a.push(s)}),a},_renderMedianLine:function(t,e){var i=t.width,o="M"+t.left+","+t.top+"H"+(t.left+i),a=n.renderLine(this.paper,o,e,d);return a.attr({opacity:0}),a},_renderMedianLines:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,o){var a=n?i[r]:i[o];t&&s.push(e._renderMedianLine(t.median,a))}),a.push(s)}),a},_renderOutlier:function(t,e){var i=n.renderCircle(this.paper,{left:t.left,top:t.top},3,{stroke:e});return i.attr({opacity:0}),i},_renderOutliers:function(t){var e=this,i=this.theme.colors,n=this.options.colorByPoint,a=[];return o.forEach(t,function(t,r){var s=[];o.forEach(t,function(t,a){var h=n?i[r]:i[a],l=[];t&&(t.outliers.length&&o.forEach(t.outliers,function(t){l.push(e._renderOutlier(t,h))}),s.push(l))}),a.push(s)}),a},_makeRectPoints:function(t){return{leftTop:{left:Math.ceil(t.left),top:Math.ceil(t.top)},rightTop:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top)},rightBottom:{left:Math.ceil(t.left+t.width),top:Math.ceil(t.top+t.height)},leftBottom:{left:Math.ceil(t.left),top:Math.ceil(t.top+t.height)}}},_renderBorderLines:function(t,e,i,a){var r=this,s=this._makeBorderLinesPaths(t,i,a),h={};return o.forEach(s,function(t,i){h[i]=n.renderLine(r.paper,t,e,1)}),h},_renderBoxBorders:function(t){var e,i=this,n=this.theme.borderColor;return n?e=o.map(t,function(t,e){return o.map(t,function(t,o){var a;return t?(a=i.seriesDataModel.getSeriesItem(e,o),i._renderBorderLines(t.start,n,i.chartType,a)):null})}):null},_animateRect:function(t,e){t.animate({x:e.left,y:e.top,width:e.width,height:e.height},r,">")},animate:function(t){var e=this,i=a.animation({opacity:1},r);n.forEach2dArray(this.groupBoxes,function(t){t&&e._animateRect(t.rect,t.bound)}),n.forEach2dArray(e.groupWhiskers,function(t){t.animate(i.delay(r))}),n.forEach2dArray(e.groupMedians,function(t){t.animate(i.delay(r))}),n.forEach2dArray(e.groupOutliers,function(t){o.forEach(t,function(t){t.animate(i.delay(r))})}),t&&(this.callbackTimeout=setTimeout(function(){ +t(),delete e.callbackTimeout},r))},showAnimation:function(t){o.isNumber(t.outlierIndex)?this.showOutlierAnimation(t):this.showRectAnimation(t)},showRectAnimation:function(t){var e=this.groupBoxes[t.groupIndex][t.index],i=e.bound;this.rectOverlay.attr({width:i.width,height:i.height,x:i.left,y:i.top,fill:e.color,"fill-opacity":.3})},showOutlierAnimation:function(t){var e=this.groupOutliers[t.groupIndex][t.index][t.outlierIndex].attr();this.circleOverlay.attr({r:e.r,cx:e.cx,cy:e.cy,fill:e.stroke,"fill-opacity":.3,stroke:e.stroke,"stroke-width":2})},hideAnimation:function(){this.circleOverlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0,"stroke-width":0}),this.rectOverlay.attr({width:1,height:1,x:0,y:0,"fill-opacity":0})},_updateRectBound:function(t,e){t.attr({x:e.left,y:e.top,width:e.width,height:e.height})},resize:function(t){var e=t.dimension,i=t.groupBounds;this.groupBounds=i,this.paper.setSize(e.width,e.height),n.forEach2dArray(this.groupBoxes,function(t,e,o){var a;t&&(a=i[e][o].end,t.bound=a,n.updateRectBound(t.rect,a))})},_changeBordersColor:function(t,e){o.forEach(t,function(t){t.attr({stroke:e})})},_changeBoxColor:function(t,e,i){var n,o=this.groupBoxes[t.groupIndex][t.index];o.rect.attr({stroke:e}),i&&(n=this.groupBorders[t.groupIndex][t.index],this._changeBordersColor(n,i))},selectSeries:function(t){var e,i=this.groupBoxes[t.groupIndex][t.index],o=a.color(i.color),r=this.theme.selectionColor,s=r||n.makeChangedLuminanceColor(o.hex,l),h=this.theme.borderColor;h&&(e=a.color(h),h=n.makeChangedLuminanceColor(e.hex,l)),this._changeBoxColor(t,s,h)},unselectSeries:function(t){var e=this.groupBoxes[t.groupIndex][t.index],i=this.theme.borderColor;this._changeBoxColor(t,e.color,i)},selectLegend:function(t){var e=o.isNull(t);n.forEach2dArray(this.groupBoxes,function(i,n,o){var a;i&&(a=e||t===o?s:h,i.rect.attr({"stroke-opacity":a}))}),n.forEach2dArray(this.groupWhiskers,function(i,n,o){var a=e||t===o?s:h;i.attr({"stroke-opacity":a})}),n.forEach2dArray(this.groupMedians,function(i,n,o){var a=e||t===o?s:h;i.attr({"stroke-opacity":a})})},renderSeriesLabel:function(t,e,i,a,r){var s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0,"text-anchor":r?"middle":"start"},h=t.set();return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var r,l=e[a][o],u=n.renderText(t,l.end,i.end,s);u.node.style.userSelect="none",u.node.style.cursor="default",u.node.setAttribute("filter","url(#glow)"),h.push(u),l.start&&(r=n.renderText(t,l.start,i.start,s),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),h.push(r))})}),h}});t.exports=f},function(t,e,i){"use strict";function n(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),a=t.rect(e.left,e.top,i.width,i.height);return a.id=n+"_rect",o.id=n,o.appendChild(a.node),t.defs.appendChild(o),a}var o=i(5),a=i(8),r=i(6),s=i(7),h=r.browser,l=h.msie&&h.version<=8,u=700,c=700,d=1,p=.3,f=20,m=r.defineClass({render:function(t,e){var i=e.groupBounds,n=e.seriesDataModel;return i&&i.length?(this.paper=t,this.theme=e.theme,this.dimension=e.dimension,this.position=e.position,this.options=e.options,this.chartType=e.chartType,this.isVertical=e.isVertical,this.seriesDataModel=n,this.maxRangeCount=n.maxRangeCount,this.maxMarkerCount=n.maxMarkerCount,this.rangeOpacities={},this.paper.setStart(),this._renderBounds(i),this.paper.setFinish()):null},_getRangeOpacity:function(t){var e=this.maxRangeCount;return this.prevMaxRangeCount!==e&&this._updateOpacityStep(e),t",t)),t&&(this.callbackTimeout=setTimeout(function(){t(),delete self.callbackTimeout},c))},resize:function(t){var e=t.dimension,i=t.groupBounds,n=e.width,o=e.height;this.dimension=t.dimension,this.groupBounds=i,this.resizeClipRect(n,o),this.paper.setSize(n,o),this._renderBounds(i)},resizeClipRect:function(t,e){var i=this.paper.getById(this._getClipRectId()+"_rect");i.attr({width:t,height:e})},setClipRectPosition:function(t){var e=this.paper.getById(this._getClipRectId()+"_rect");e.attr({x:t.left,y:t.top})},_getClipRectId:function(){return this.clipRectId||(this.clipRectId=s.generateClipRectId()),this.clipRectId},_changeBordersColor:function(t,e){r.forEach(t,function(t){t.attr({stroke:e})})},selectLegend:function(t){var e=r.isNull(t);r.forEachArray(this.groupBars,function(i,n){var o=e||t===n?d:p;this.groupBars[n].attr({"fill-opacity":o}),this.groupLabels[n].attr({opacity:o}),r.forEachArray(this.groupLabels[n],function(t){t.attr({opacity:o})})},this)},renderSeriesLabel:function(t,e,i,n){var o={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,fill:n.color,opacity:0,"text-anchor":this.isVertical?"middle":"start"},a=t.set();return this.groupLabels=r.map(i,function(i,n){var s=t.set();return r.forEach(i,function(i,r){var h=this._renderLabel(t,e[n][r],o,i);s.push(h),a.push(h)},this),s},this),a},_renderLabel:function(t,e,i,n){var a=o.renderText(t,e,n,i),r=a.node,s=r.style;return s.userSelect="none",s.cursor="default",r.setAttribute("filter","url(#glow)"),a},getGraphColors:function(){return r.map(this.groupBars,function(t,e){var i,n=[],o=this.groupLines[e].length,a=0;for(t.forEach(function(t){n.push(t.attrs.fill)}),i=n[n.length-1];a<=o;a+=1)n.push(i);return n},this)}});t.exports=m},function(t,e,i){"use strict";var n=i(15),o=i(5),a=i(6),r=1,s=.3,h=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="line",this.lineWidth=2},render:function(t,e){var i,n=e.dimension,o=e.groupPositions,r=e.theme,s=r.colors,h=e.options,l=h.showDot?1:0,u=h.spline,c=this.lineWidth=a.isNumber(h.pointWidth)?h.pointWidth:this.lineWidth,d=this.makeBorderStyle(r.borderColor,l),p=this.makeOutDotStyle(l,d);return i=u?this._getSplineLinesPath(o,h.connectNulls):this._getLinesPath(o,h.connectNulls),this.paper=t,this.theme=e.theme,this.isSpline=u,this.dimension=n,this.position=e.position,t.setStart(),this.groupLines=this._renderLines(t,i,s,c),this.tooltipLine=this._renderTooltipLine(t,n.height),this.groupDots=this._renderDots(t,o,s,l),h.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=r.selectionColor),this.colors=s,this.borderStyle=d,this.outDotStyle=p,this.groupPositions=o,this.groupPaths=i,this.dotOpacity=l,delete this.pivotGroupDots,t.setFinish()},_getLinesPath:function(t,e){var i=this;return a.map(t,function(t){return i._makeLinesPath(t,null,e)})},_getSplineLinesPath:function(t,e){var i=this;return a.map(t,function(t){return i._makeSplineLinesPath(t,e)})},_renderLines:function(t,e,i,n){return a.map(e,function(e,a){var r=i[a]||"transparent";return o.renderLine(t,e.join(" "),r,n)})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.resizeClipRect(i.width,i.height),this.groupPositions=n,this.groupPaths=this.isSpline?this._getSplineLinesPath(n):this._getLinesPath(n),this.paper.setSize(i.width,i.height),this.tooltipLine.attr({top:i.height}),a.forEachArray(this.groupPaths,function(t,i){e.groupLines[i].attr({path:t.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){t.endDot&&e._moveDot(t.endDot.dot,n[i][o])})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupLines,function(n,o){var h=i||t===o?r:s;n.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){t.opacity=h,e.dotOpacity&&t.endDot.dot.attr({"fill-opacity":h})})})},animateForAddingData:function(t,e,i,n){var o=this,r=t.options.spline,s=r?this._getSplineLinesPath(i):this._getLinesPath(i),h=0;i.length&&(n&&(h=1),a.forEachArray(this.groupLines,function(t,r){var l=o.groupDots[r],u=i[r];n&&o._removeFirstDot(l),a.forEachArray(l,function(t,i){var n=u[i+h];o._animateByPosition(t.endDot.dot,n,e)}),o._animateByPath(t,s[r],e)}))},renderSeriesLabel:function(t,e,i,n){var r={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle",opacity:0},s=t.set();return a.forEach(i,function(i,n){a.forEach(i,function(i,a){var h,l=e[n][a],u=o.renderText(t,l.end,i.end,r);s.push(u),u.node.style.userSelect="none",u.node.style.cursor="default",u.node.setAttribute("filter","url(#glow)"),l.start&&(h=o.renderText(t,l.start,i.start,r),h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),s.push(h))})}),s}});t.exports=h},function(t,e,i){"use strict";function n(t,e,i,n){var o=document.createElementNS("http://www.w3.org/2000/svg","clipPath"),a=t.rect(e.left-10,e.top-10,0,i.height);return a.id=n+"_rect",o.id=n,o.appendChild(a.node),t.defs.appendChild(o),a}var o=i(5),a=i(7),r=i(6),s=i(10),h=r.browser,l=h.msie&&h.version<=8,u=700,c=3,d=7,p=.3,f=300,m=Array.prototype.concat,g=r.defineClass({_makeLinesPath:function(t,e,i){var n=[],o=!1;return e=e||"top",r.map(t,function(t){var a=o&&!i?"M":"L";t?(n.push([a,t.left,t[e]]),o&&(o=!1)):o=!0}),n=m.apply([],n),n.length>0&&(n[0]="M"),n},_getAnchor:function(t,e,i){var n,o,a,r,s,h=(e.left-t.left)/2,l=(i.left-e.left)/2,u=Math.atan((e.left-t.left)/Math.abs(e.top-t.top)),c=Math.atan((i.left-e.left)/Math.abs(e.top-i.top));return u=t.top0&&!e||r)&&(i.push(n),n=[])}),i},_getSplinePartialPaths:function(t){var e,i,n,o,a,s,h,l=this,u=[];return r.forEach(t,function(t){h=e=t[0],n=t.length,o=e,i=t[n-1],a=t.slice(1).slice(0,n-2),s=r.map(a,function(e,i){var n=t[i+2],a=l._getAnchor(o,e,n);return o=e,Math.abs(a.y1-h.top)>Math.abs(h.top-e.top)&&(a.y1=e.top),Math.abs(a.y2-n.top)>Math.abs(n.top-e.top)&&(a.y2=e.top),h=e,[a.x1,a.y1,e.left,e.top,a.x2,a.y2]}),s.push([i.left,i.top,i.left,i.top]),s.unshift(["M",e.left,e.top,"C",e.left,e.top]),u.push(s)}),u},_makeSplineLinesPath:function(t,e){var i=[],n=this._getSplinePositionsGroups(t,e),o=this._getSplinePartialPaths(n);return r.forEach(o,function(t){i=i.concat(t)}),i},_renderTooltipLine:function(t,e){var i=o.makeLinePath({left:10,top:e},{left:10,top:0});return o.renderLine(t,i,"transparent",1)},makeBorderStyle:function(t,e){var i;return t&&(i={stroke:t,"stroke-width":1,"stroke-opacity":e}),i},makeOutDotStyle:function(t,e){var i={"fill-opacity":t,"stroke-opacity":0,r:c};return e&&r.extend(i,e),i},renderDot:function(t,e,i,n){var o,a,s,h=this.theme&&this.theme.dot||{dot:{}};return e&&(o=t.circle(e.left,e.top,h.radius||c),a={fill:h.fillColor||i,"fill-opacity":r.isNumber(n)?n:h.fillOpacity,stroke:h.strokeColor||i,"stroke-opacity":r.isNumber(n)?n:h.strokeOpacity,"stroke-width":h.strokeWidth},o.attr(a),s={dot:o,color:i}),s},_moveDotsToFront:function(t){o.forEach2dArray(t,function(t){t.endDot.dot.toFront(),t.startDot&&t.startDot.dot.toFront()})},_renderDots:function(t,e,i,n,o){var a,s=this;return a=r.map(e,function(e,a){var h=i[a];return r.map(e,function(e){var i,a={endDot:s.renderDot(t,e,h,n)};return s.hasRangeData&&(i=r.extend({},e),i.top=i.startTop,a.startDot=s.renderDot(t,i,h,n)),o&&(o.push(a.endDot.dot),a.startDot&&o.push(a.startDot.dot)),a})})},_getCenter:function(t,e){return{left:(t.left+e.left)/2,top:(t.top+e.top)/2}},_showDot:function(t,e){var i=this.theme.dot.hover,n={"fill-opacity":i.fillOpacity,stroke:i.strokeColor||t.color,"stroke-opacity":i.strokeOpacity,"stroke-width":i.strokeWidth,r:i.radius};this._setPrevDotAttributes(e,t.dot),i.fillColor&&(n.fill=i.fillColor),t.dot.attr(n)},_setPrevDotAttributes:function(t,e){this._prevDotAttributes||(this._prevDotAttributes={}),this._prevDotAttributes[t]=e.attr()},_updateLineStrokeWidth:function(t,e){t.attr({"stroke-width":e})},showAnimation:function(t){var e,i,n=t.groupIndex,o=t.index,a=this.groupLines?this.groupLines[o]:this.groupAreas[o],r=this.groupDots[o][n];r&&("area"===this.chartType?(e=2*this.lineWidth,i=a.startLine,a=a.line):e=2*this.lineWidth,this._updateLineStrokeWidth(a,e),i&&this._updateLineStrokeWidth(i,e),this._showDot(r.endDot,o),r.startDot&&this._showDot(r.startDot,o))},_getPivotGroupDots:function(){return!this.pivotGroupDots&&this.groupDots&&(this.pivotGroupDots=s.pivot(this.groupDots)),this.pivotGroupDots},_showGroupDots:function(t){var e=this,i=this._getPivotGroupDots();i&&i[t]&&r.forEachArray(i[t],function(t,i){t.endDot&&e._showDot(t.endDot,i),t.startDot&&e._showDot(t.startDot,i)})},showGroupTooltipLine:function(t,e){var i=Math.max(t.position.left,11),n=o.makeLinePath({left:i,top:e.position.top+t.dimension.height},{left:i,top:e.position.top});this.tooltipLine&&this.tooltipLine.attr({path:n,stroke:"#999","stroke-opacity":1})},showGroupAnimation:function(t){this._showGroupDots(t)},_hideDot:function(t,e,i){var n=this._prevDotAttributes[e],o=this.outDotStyle;n&&!r.isUndefined(i)&&(o=r.extend({r:n.r,stroke:n.stroke,fill:n.fill,"stroke-opacity":n["stroke-opacity"],"stroke-width":n["stroke-width"]},{"fill-opacity":i})),t.attr(o)},hideAnimation:function(t){var e,i,n,o,a=t.groupIndex,s=t.index,h=this.dotOpacity,l=this.groupDots[s];l&&l[a]&&(e=this.groupLines?this.groupLines[s]:this.groupAreas[s],i=l[a],"area"===this.chartType?(n=this.lineWidth,o=e.startLine,e=e.line):n=this.lineWidth,h&&!r.isNull(this.selectedLegendIndex)&&this.selectedLegendIndex!==s&&(h=p),e&&this._updateLineStrokeWidth(e,n),o&&this._updateLineStrokeWidth(o,n),i&&(this._hideDot(i.endDot.dot,s,h),i.startDot&&this._hideDot(i.startDot.dot,s,h)))},_hideGroupDots:function(t){var e=this,i=!r.isNull(this.selectedLegendIndex),n=this.dotOpacity,o=this._getPivotGroupDots();o&&o[t]&&r.forEachArray(o[t],function(t,o){var a=n;a&&i&&e.selectedLegendIndex!==o&&(a=p),t.endDot&&e._hideDot(t.endDot.dot,o,a),t.startDot&&e._hideDot(t.startDot.dot,o,a)})},hideGroupTooltipLine:function(){this.tooltipLine.attr({"stroke-opacity":0})},hideGroupAnimation:function(t){this._hideGroupDots(t)},_moveDot:function(t,e){var i={cx:e.left,cy:e.top};this.dotOpacity&&(i=r.extend({"fill-opacity":this.dotOpacity},i,this.borderStyle)),t.attr(i)},animate:function(t,e){var i=this.paper,o=this.dimension,a=this.position,r=this.clipRect,s=this._getClipRectId();!l&&o&&(r?r.attr({width:0,height:o.height}):(r=n(i,a,o,s),this.clipRect=r),e.forEach(function(t){t.node.setAttribute("clip-path","url(#"+s+")")}),r.animate({width:o.width},u,">",t))},_makeSelectionDot:function(t){var e=t.circle(0,0,d);return e.attr({fill:"#ffffff","fill-opacity":0,"stroke-opacity":0,"stroke-width":2}),e},selectSeries:function(t){var e=this.groupDots[t.index][t.groupIndex],i=this.groupPositions[t.index][t.groupIndex];this.selectedItem=e,this.selectionDot.attr({cx:i.left,cy:i.top,"fill-opacity":.5,"stroke-opacity":1,stroke:this.selectionColor||e.endDot.color}),this.selectionStartDot&&this.selectionStartDot.attr({cx:i.left,cy:i.startTop,"fill-opacity":.5,"stroke-opacity":1,stroke:this.selectionColor||e.startDot.color})},unselectSeries:function(t){var e=this.groupDots[t.index][t.groupIndex];this.selectedItem===e&&this.selectionDot.attr({"fill-opacity":0,"stroke-opacity":0}),this.selectionStartDot&&this.selectionStartDot.attr({"fill-opacity":0,"stroke-opacity":0})},setSize:function(t,e){t=t||this.dimension.width,e=e||this.dimension.height,this.paper.setSize(t,e)},_animateByPosition:function(t,e,i){var n={cx:e.left,cy:e.top};r.isExisty(i)&&(n.transform="t-"+i+",0"),t.animate(n,f)},_animateByPath:function(t,e,i){var n={path:e.join(" ")};r.isExisty(i)&&(n.transform="t-"+i+",0"),t.animate(n,f)},_removeFirstDot:function(t){var e=t.shift();e.endDot.dot.remove(),e.startDot&&e.startDot.dot.remove()},clear:function(){delete this.paper.dots,this.paper.clear()},resizeClipRect:function(t,e){var i=this.paper.getById(this._getClipRectId()+"_rect");i.attr({width:t,height:e})},_getClipRectId:function(){return this.clipRectId||(this.clipRectId=a.generateClipRectId()),this.clipRectId}});t.exports=g},function(t,e,i){"use strict";var n=i(15),o=i(5),a=i(6),r=1,s=.3,h=Array.prototype.concat,l=i(8).GUIDE_AREACHART_AREAOPACITY_TYPE,u=i(17),c=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="area",this.lineWidth=1},render:function(t,e){var i=e.dimension,n=e.groupPositions,o=e.theme,r=o.colors,s=e.options,h=this._isAreaOpacityNumber(s.areaOpacity)?s.areaOpacity:.5,l=s.showDot?1:0,u=this.makeBorderStyle(o.borderColor,l),c=this.makeOutDotStyle(l,u),d=this.lineWidth=a.isNumber(s.pointWidth)?s.pointWidth:this.lineWidth;return this.paper=t,this.theme=e.theme,this.isSpline=s.spline,this.dimension=i,this.position=e.position,this.zeroTop=e.zeroTop,this.hasRangeData=e.hasRangeData,t.setStart(),this.groupPaths=this._getAreaChartPath(n,null,s.connectNulls),this.groupAreas=this._renderAreas(t,this.groupPaths,r,d,h),this.tooltipLine=this._renderTooltipLine(t,i.height),this.groupDots=this._renderDots(t,n,r,l),s.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=o.selectionColor,this.hasRangeData&&(this.selectionStartDot=this._makeSelectionDot(t))),this.outDotStyle=c,this.groupPositions=n,this.dotOpacity=l,this.pivotGroupDots=null,t.setFinish()},_getAreaChartPath:function(t,e,i){var n;return n=this.isSpline?this._makeSplineAreaChartPath(t,e):this._makeAreaChartPath(t,e,i)},_renderAreas:function(t,e,i,n,r){var s;return i=i.slice(0,e.length),i.reverse(),e.reverse(),s=a.map(e,function(e,a){var s=i[a]||"transparent",h=s,l={area:o.renderArea(t,e.area.join(" "),{fill:s,opacity:r,stroke:s}),line:o.renderLine(t,e.line.join(" "),h,n)};return e.startLine&&(l.startLine=o.renderLine(t,e.startLine.join(" "),h,1)),l}),s.reverse()},_makeHeight:function(t,e){return Math.abs(t-e)},_makeAreasPath:function(t,e){var i,n=[],o=[],r=!1,s=t.length,l=[],u=[];return a.forEachArray(t,function(t,e){var i;t?(r?(i="M",r=!1):i="L",l.push([i,t.left,t.top]),u.unshift(["L",t.left,t.startTop])):(r=!0,u.push(["z"])),t&&e!==s-1||(o.push(l.concat(u)),l=[],u=[])}),a.forEachArray(o,function(t){n=n.concat(t)}),e!==!1&&(i=t.length-1,n.splice(i+1,0,n[i],n[i+1])),n=h.apply([],n),n[0]="M",n},_makeAreaChartPath:function(t,e,i){var n=this;return a.map(t,function(t){var o;return o={area:n._makeAreasPath(t,e),line:n._makeLinesPath(t,null,i)},n.hasRangeData&&(o.startLine=n._makeLinesPath(t,"startTop")),o})},_makeSplineAreaBottomPath:function(t){var e=this;return a.map(t,function(t){return["L",t.left,e.zeroTop]}).reverse()},_makeSplineAreaChartPath:function(t,e){var i=this;return a.map(t,function(t){var n,o=i._makeSplineLinesPath(t),a=JSON.parse(JSON.stringify(o)),r=i._makeSplineAreaBottomPath(t);return e!==!1&&(n=t[t.length-1],a.push(["L",n.left,n.top]),r.unshift(["L",n.left,i.zeroTop])),{area:a.concat(r),line:o}})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.resizeClipRect(i.width,i.height),this.zeroTop=t.zeroTop,this.groupPositions=n,this.groupPaths=this._getAreaChartPath(n),this.paper.setSize(i.width,i.height),this.tooltipLine.attr({top:i.height}),a.forEachArray(this.groupPaths,function(t,i){var o=e.groupAreas[i];o.area.attr({path:t.area.join(" ")}),o.line.attr({path:t.line.join(" ")}),o.startLine&&o.startLine.attr({path:t.startLine.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){var r,s=n[i][o];t.endDot&&e._moveDot(t.endDot.dot,s),t.startDot&&(r=a.extend({},s),r.top=r.startTop,e._moveDot(t.startDot.dot,r))})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupAreas,function(n,o){var h=i||t===o?r:s;n.area.attr({"fill-opacity":h}),n.line.attr({"stroke-opacity":h}),n.startLine&&n.startLine.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){e.dotOpacity&&(t.endDot.dot.attr({"fill-opacity":h}),t.startDot&&t.startDot.dot.attr({"fill-opacity":h}))})})},animateForAddingData:function(t,e,i,n,o){var r=this,s=this._getAreaChartPath(i,!1),h=0;i.length&&(n&&(h=1),this.zeroTop=o,a.forEachArray(this.groupAreas,function(t,o){var l=r.groupDots[o],u=i[o],c=s[o];n&&r._removeFirstDot(l),a.forEachArray(l,function(t,i){var n=u[i+h];r._animateByPosition(t.endDot.dot,n,e),t.startDot&&r._animateByPosition(t.startDot.dot,{left:n.left,top:n.startTop},e)}),r._animateByPath(t.area,c.area,e),r._animateByPath(t.line,c.line,e),t.startLine&&r._animateByPath(t.startLine,c.startLine,e)}))},renderSeriesLabel:function(t,e,i,n){var r={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle",opacity:0},s=t.set();return a.forEach(i,function(i,n){a.forEach(i,function(i,a){var h,l=e[n][a],u=o.renderText(t,l.end,i.end,r);s.push(u),u.node.style.userSelect="none",u.node.style.cursor="default",u.node.setAttribute("filter","url(#glow)"),l.start&&(h=o.renderText(t,l.start,i.start,r),h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),s.push(h))})}),s},_isAreaOpacityNumber:function(t){var e=a.isNumber(t);return e?(t<0||t>1)&&u.print(l,"warn"):a.isUndefined(t)||u.print(l,"error"),e}});t.exports=c},function(t,e){"use strict";t.exports={print:function(t,e){e=e||"log",window.console&&window.console[e](t)}}},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=180,s=360,h=.01,l=Math.PI/r,u=700,c=1,d=.3,p=.3,f=.2,m="overlay",g=20,_=o.defineClass({render:function(t,e,i){var n=t.set();return this.paper=t,this.holeRatio=e.options.radiusRange[0],this.chartBackground=e.chartBackground,this.chartType=e.chartType,this.callbacks=i,this.selectionColor=e.theme.selectionColor,this.circleBound=e.circleBound,this.sectorName="sector_"+this.chartType,this._setSectorAttr(),this.sectorInfos=this._renderPie(e.sectorData,e.theme.colors,e.additionalIndex,n),this.overlay=this._renderOverlay(),this.prevPosition=null,this.prevHoverSector=null,n},clear:function(){this.legendLines=null,this.paper.clear()},_makeSectorPath:function(t,e,i,n,o){var a=n*l,s=o*l,h=t+i*Math.sin(a),u=e-i*Math.cos(a),c=t+i*Math.sin(s),d=e-i*Math.cos(s),p=o-n>r?1:0,f=["M",t,e,"L",h,u,"A",i,i,0,p,1,c,d,"Z"];return{path:f}},_makeDonutSectorPath:function(t,e,i,n,o,a){var s=n*l,h=o*l,u=a||i*this.holeRatio,c=t+i*Math.sin(s),d=e-i*Math.cos(s),p=t+u*Math.sin(s),f=e-u*Math.cos(s),m=t+i*Math.sin(h),g=e-i*Math.cos(h),_=t+u*Math.sin(h),T=e-u*Math.cos(h),v=o-n>r?1:0,y=["M",c,d,"A",i,i,0,v,1,m,g,"L",_,T,"A",u,u,0,v,0,p,f,"Z"];return{path:y}},_setSectorAttr:function(){var t;this.paper.customAttributes[this.sectorName]||(t=this.holeRatio?this._makeDonutSectorPath:this._makeSectorPath,this.paper.customAttributes[this.sectorName]=o.bind(t,this))},_renderOverlay:function(){var t={paper:this.paper,circleBound:{cx:0,cy:0,r:0},angles:{startAngle:0,endAngle:0},attrs:{fill:"none",opacity:0,stroke:this.chartBackground.color,"stroke-width":1}},e=this._renderSector(t);return e.data("id",m),e.data("chartType",this.chartType),{inner:e,outer:this._renderSector(t)}},_renderSector:function(t){var e=t.circleBound,i=t.angles,n=t.attrs;return n[this.sectorName]=[e.cx,e.cy,e.r,i.startAngle,i.endAngle],t.paper.path().attr(n)},_renderPie:function(t,e,i,n){var a=this,r=this.circleBound,s=this.chartBackground,h=[];return o.forEachArray(t,function(t,o){var l=t.ratio,u=e[o],c=a._renderSector({paper:a.paper,circleBound:r,angles:t.angles.start,attrs:{fill:s.color,stroke:s.color,"stroke-width":1}});c.data("index",o),c.data("legendIndex",o+i),c.data("chartType",a.chartType),h.push({sector:c,color:u,angles:t.angles.end,ratio:l}),n.push(c)}),h},renderLegendLines:function(t){var e,i=this.paper;this.legendLines||(e=this._makeLinePaths(t),this.legendLines=o.map(e,function(t){return n.renderLine(i,t,"transparent",1)}))},_makeLinePaths:function(t){return o.map(t,function(t){return[n.makeLinePath(t.start,t.middle),n.makeLinePath(t.middle,t.end),"Z"].join("")})},_showOverlay:function(t,e){var i,n=this.overlay,o=this.sectorInfos[t],a=o.angles.startAngle,r=o.angles.endAngle,s=this.circleBound;i={fill:"#fff",opacity:d},i[this.sectorName]=[s.cx,s.cy,s.r,a,r,s.r*this.holeRatio],n.inner.attr(i),n.inner.data("index",t),n.inner.data("legendIndex",e),n.outer.attr({path:this._makeDonutSectorPath(s.cx,s.cy,s.r+10,a,r,s.r).path,fill:o.color,opacity:d})},_hideOverlay:function(){var t=this.overlay,e={fill:"none",opacity:0};t.inner.attr(e),t.outer.attr(e)},animate:function(t){var e=0,i=this.sectorName,n=this.circleBound,r=[n.cx,n.cy,n.r];o.forEachArray(this.sectorInfos,function(t){var n,o=t.angles,l={fill:t.color},c=u*t.ratio;0===o.startAngle&&o.endAngle===s&&(o.endAngle=s-h),l[i]=r.concat([o.startAngle,o.endAngle]),n=a.animation(l,c,">"),t.sector.animate(n.delay(e)),e+=c}),t&&setTimeout(t,e)},animateLegendLines:function(t){var e;this.legendLines&&(e=o.isNull(t),o.forEachArray(this.legendLines,function(i,n){var o=e||t===n?c:p;i.animate({stroke:"black","stroke-opacity":o})}))},resize:function(t){var e=t.dimension,i=t.circleBound,n=this.sectorName,a=this.labelSet;this.circleBound=i,this.paper.setSize(e.width,e.height),o.forEachArray(this.sectorInfos,function(t,e){var o,r=t.angles,s={};s[n]=[i.cx,i.cy,i.r,r.startAngle,r.endAngle],t.sector.attr(s),a&&a.length&&(o=t.sector.getBBox(),a[e].attr({x:o.x+o.width/2,y:o.y+o.height/2}))})},moveLegendLines:function(t){var e;this.legendLines&&(e=this._makeLinePaths(t),o.forEachArray(this.legendLines,function(t,i){return t.attr({path:e[i]}),t}))},findSectorInfo:function(t){var e=this.paper&&this.paper.getElementByPoint(t.left,t.top),i=null;return e&&(i={legendIndex:o.isExisty(e.data("legendIndex"))?e.data("legendIndex"):-1,index:o.isExisty(e.data("index"))?e.data("index"):-1,chartType:e.data("chartType")}),i},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},_showTooltip:function(t,e){var i=[{},0,t.data("index"),{left:e.left-g,top:e.top-g}];this.callbacks.showTooltip.apply(null,i)},_isValidSector:function(t){return t&&t.data("chartType")===this.chartType},moveMouseOnSeries:function(t){var e=this.paper&&this.paper.getElementByPoint(t.left,t.top);this._isValidSector(e)?(this.prevHoverSector!==e&&(this._showOverlay(e.data("index"),e.data("legendIndex")),this.prevHoverSector=e),this._isChangedPosition(this.prevPosition,t)&&this._showTooltip(e,t)):this.prevHoverSector&&(this._hideOverlay(),this.callbacks.hideTooltip(),this.prevHoverSector=null),this.prevPosition=t},selectSeries:function(t){var e,i,o,r=this.sectorInfos[t.index];r&&(i=a.color(r.color),e=n.makeChangedLuminanceColor(i.hex,f),o=this.selectionColor||e,r.sector.attr({fill:o}))},unselectSeries:function(t){var e=this.sectorInfos[t.index];e&&e.sector.attr({fill:e.color})},selectLegend:function(t){var e=o.isNull(t),i=this.legendLines;o.forEachArray(this.sectorInfos,function(n,o){var a=e||t===o?c:p;n.sector.attr({"fill-opacity":a}),i&&i[o].attr({"stroke-opacity":a})})},getRenderedLabelWidth:function(t,e){return n.getRenderedTextSize(t,e.fontSize,e.fontFamily).width},getRenderedLabelHeight:function(t,e){return n.getRenderedTextSize(t,e.fontSize,e.fontFamily).height},renderLabels:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,"text-anchor":"middle",fill:a.color,opacity:0};return o.forEach(e,function(e,o){var a;e&&(a=n.renderText(t,e,i[o],s),a.node.style.userSelect="none",a.node.style.cursor="default",a.node.setAttribute("filter","url(#glow)")),r.push(a)}),this.labelSet=r,r}});t.exports=_},function(t,e,i){"use strict";var n=i(15),o=i(5),a=i(6),r=1,s=.3,h=a.defineClass(n,{init:function(){this.selectedLegendIndex=null,this.chartType="radial",this.lineWidth=2},render:function(t,e){var i=e.dimension,n=e.groupPositions,o=e.theme,a=o.colors,r=e.options.showDot?1:0,s=e.options.showArea,h=this._getLinesPath(n),l=this.makeBorderStyle(o.borderColor,r),u=this.makeOutDotStyle(r,l),c=t.set(),d=this.lineWidth=e.options.pointWidth?e.options.pointWidth:this.lineWidth;return this.paper=t,this.theme=e.theme,this.dimension=i,this.position=e.position,s&&(this.groupAreas=this._renderArea(t,h,a,c)),this.groupLines=this._renderLines(t,h,a,d,c),this.groupDots=this._renderDots(t,n,a,r,c),e.options.allowSelect&&(this.selectionDot=this._makeSelectionDot(t),this.selectionColor=o.selectionColor),this.colors=a,this.borderStyle=l,this.outDotStyle=u,this.groupPositions=n,this.groupPaths=h,this.dotOpacity=r,c},_getLinesPath:function(t){var e=this;return a.map(t,function(t){return e._makeLinesPath(t)})},_renderLines:function(t,e,i,n,r){return a.map(e,function(e,a){var s=i[a]||"transparent",h=o.renderLine(t,e.join(" "),s,n);return r.push(h),h})},_renderArea:function(t,e,i,n){return a.map(e,function(e,a){var r=i[a]||"transparent",s=o.renderArea(t,e,{fill:r,opacity:.4,"stroke-width":0,stroke:r});return n.push(s),s})},resize:function(t){var e=this,i=t.dimension,n=t.groupPositions;this.groupPositions=n,this.groupPaths=this._getLinesPath(n),this.paper.setSize(i.width,i.height),a.forEachArray(this.groupPaths,function(t,i){e.groupLines[i].attr({path:t.join(" ")}),e.groupAreas[i].attr({path:t.join(" ")}),a.forEachArray(e.groupDots[i],function(t,o){e._moveDot(t.endDot.dot,n[i][o])})})},selectLegend:function(t){var e=this,i=a.isNull(t);this.selectedLegendIndex=t,a.forEachArray(this.groupLines,function(n,o){var h=i||t===o?r:s;n.attr({"stroke-opacity":h}),a.forEachArray(e.groupDots[o],function(t){t.opacity=h,e.dotOpacity&&t.endDot.dot.attr({"fill-opacity":h})})})}});t.exports=h},function(t,e,i){"use strict";var n=i(5),o=i(6),a=i(3),r=700,s=.5,h=.3,l=.5,u=.3,c=.2,d=2,p=20,f=o.defineClass({render:function(t,e,i){var n=t.set();return this.paper=t,this.theme=e.theme,this.seriesDataModel=e.seriesDataModel,this.groupBounds=e.groupBounds,this.callbacks=i,this.overlay=this._renderOverlay(),this.groupCircleInfos=this._renderCircles(n),this.prevCircle=null,this.prevOverCircle=null,this.animationTimeoutId=null,n},_renderOverlay:function(){var t={left:0,top:0},e={fill:"none",stroke:"#fff","stroke-opacity":h,"stroke-width":2},i=n.renderCircle(this.paper,t,0,e);return i},_renderCircles:function(t){var e=this,i=this.theme.colors;return o.map(this.groupBounds,function(a,r){return o.map(a,function(o,a){var s,h,l=null;return o&&(s=i[a],h=n.renderCircle(e.paper,o,0,{fill:s,opacity:0,stroke:"none"}),t.push(h),h.data("groupIndex",r),h.data("index",a),l={circle:h,color:s,bound:o}),l})})},_animateCircle:function(t,e){t.animate({r:e,opacity:s},r,">")},animate:function(){var t=this;n.forEach2dArray(this.groupCircleInfos,function(e){e&&t._animateCircle(e.circle,e.bound.radius); +})},_updatePosition:function(t,e){t.attr({cx:e.left,cy:e.top,r:e.radius})},resize:function(t){var e=this,i=t.dimension,o=t.groupBounds;this.groupBounds=o,this.paper.setSize(i.width,i.height),n.forEach2dArray(this.groupCircleInfos,function(t,i,n){var a=o[i][n];t&&(t.bound=a,e._updatePosition(t.circle,a))})},findIndexes:function(t){var e=this.paper.getElementByPoint(t.left,t.top),i=null;return e&&(i={index:e.data("index"),groupIndex:e.data("groupIndex")}),i},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},showAnimation:function(t){var e=this.groupCircleInfos[t.groupIndex][t.index],i=e.bound;this.overlay.attr({cx:i.left,cy:i.top,r:i.radius+d,stroke:e.color,opacity:1})},hideAnimation:function(){this.overlay.attr({cx:0,cy:0,r:0,opacity:0})},_findCircle:function(t){for(var e,i,n=[],a=this.paper;o.isUndefined(e);)i=a.getElementByPoint(t.left,t.top),i?i.attrs.opacity>u?e=i:(n.push(i),i.hide()):e=null;return e||(e=n[0]),o.forEachArray(n,function(t){t.show()}),e},moveMouseOnSeries:function(t){var e,i,n,a=this._findCircle(t);a&&o.isExisty(a.data("groupIndex"))?(e=a.data("groupIndex"),i=a.data("index"),n=[{},e,i,{left:t.left-p,top:t.top-p}],this._isChangedPosition(this.prevPosition,t)&&(this.callbacks.showTooltip.apply(null,n),this.prevOverCircle=a)):this.prevOverCircle&&(this.callbacks.hideTooltip(),this.prevOverCircle=null),this.prevPosition=t},selectSeries:function(t){var e=t.groupIndex,i=t.index,o=this.groupCircleInfos[e][i],r=a.color(o.color),s=this.theme.selectionColor,h=s||n.makeChangedLuminanceColor(r.hex,c);o.circle.attr({fill:h})},unselectSeries:function(t){var e=t.groupIndex,i=t.index,n=this.groupCircleInfos[e][i];n.circle.attr({fill:n.color})},selectLegend:function(t){var e=o.isNull(t);n.forEach2dArray(this.groupCircleInfos,function(i,n,o){var a;i&&(a=e||t===o?l:u,i.circle.attr({opacity:a}))})}});t.exports=f},function(t,e,i){"use strict";var n=i(5),o=i(6),a=100,r=1,s=3,h=o.defineClass({render:function(t,e){var i=t.set();return this.paper=t,this.theme=e.theme||{},this.colorSpectrum=e.colorSpectrum,this.chartBackground=e.chartBackground,this.zoomable=e.zoomable,this.borderColor=this.theme.borderColor||"none",this.borderWidth=this.theme.borderWidth,this.groupBounds=e.groupBounds,this.boundMap=e.boundMap,this._bindGetBoundFunction(),this._bindGetColorFunction(),this.boxesSet=this._renderBoxes(e.seriesDataModel,e.startDepth,!!e.isPivot,i),i},_bindGetBoundFunction:function(){this.boundMap?this._getBound=this._getBoundFromBoundMap:this._getBound=this._getBoundFromGroupBounds},_bindGetColorFunction:function(){this.colorSpectrum?this._getColor=this._getColorFromSpectrum:this.zoomable?this._getColor=this._getColorFromColorsWhenZoomable:this._getColor=this._getColorFromColors},_getBoundFromGroupBounds:function(t){return this.groupBounds[t.groupIndex][t.index].end},_getBoundFromBoundMap:function(t){return this.boundMap[t.id]},_getColorFromSpectrum:function(t){var e;return e=t.hasChild?"none":this.colorSpectrum.getColor(t.colorRatio||t.ratio)||this.chartBackground},_getColorFromColors:function(t){return t.hasChild?"none":this.theme.colors[t.group]},_getColorFromColorsWhenZoomable:function(t,e){return t.depth===e?this.theme.colors[t.group]:"none"},_renderRect:function(t,e,i){return n.renderRect(this.paper,t,{fill:e,stroke:this.borderColor,"stroke-width":i})},_getStrokeWidth:function(t,e){var i;return i=this.borderWidth?this.borderWidth:o.isExisty(t)?Math.max(r,s-(t-e)):r},_renderBoxes:function(t,e,i,n){var o,a=this;return o=this.colorSpectrum||!this.zoomable?function(t){t.toBack()}:function(){},t.map(function(t,i){return t.map(function(t,r){var s,h,l=null,u=a._getStrokeWidth(t.depth,e);return t.groupIndex=i,t.index=r,s=a._getBound(t),s&&(h=a._getColor(t,e),l={rect:a._renderRect(s,h,u),seriesItem:t,color:h},o(l.rect),n&&n.push(l.rect)),l})},i)},_animateChangingColor:function(t,e,i){var n={"fill-opacity":o.isExisty(i)?i:1};e&&(n.fill=e),t.animate(n,a,">")},showAnimation:function(t,e,i){var n,a=this.boxesSet[t.groupIndex][t.index];a&&(e=!!o.isUndefined(e)||e,n=e?this.theme.overColor:a.color,a.seriesItem.hasChild&&(e&&a.rect.attr({"fill-opacity":0}),a.rect.toFront()),this._animateChangingColor(a.rect,n,i))},hideAnimation:function(t,e){var i,n,o=this.colorSpectrum,r=this.boxesSet[t.groupIndex][t.index],s=1;r&&(n=r.rect.paper,r.seriesItem.hasChild?(i=null,e&&(s=0)):i=r.color,this._animateChangingColor(r.rect,i,s),setTimeout(function(){!o&&r.seriesItem.hasChild&&(r.rect.toBack(),n.pushDownBackgroundToBottom())},a))},resize:function(t){var e=this,i=t.dimension;this.boundMap=t.boundMap,this.groupBounds=t.groupBounds,this.paper.setSize(i.width,i.height),n.forEach2dArray(this.boxesSet,function(t,i,o){var a;t&&(a=e._getBound(t.seriesItem,i,o),a&&n.updateRectBound(t.rect,a))})},renderSeriesLabel:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0};return o.forEach(i,function(i,a){o.forEach(i,function(i,o){var h=n.renderText(t,e[a][o].end,i,s);h.node.style.userSelect="none",h.node.style.cursor="default",h.node.setAttribute("filter","url(#glow)"),r.push(h)})}),r},renderSeriesLabelForTreemap:function(t,e,i,a){var r=t.set(),s={"font-size":a.fontSize,"font-family":a.fontFamily,"font-weight":a.fontWeight,fill:a.color,opacity:0};return o.forEach(i,function(i,o){var a=n.renderText(t,e[o],i,s);a.node.style.userSelect="none",a.node.style.cursor="default",a.node.setAttribute("filter","url(#glow)"),r.push(a)}),r}});t.exports=h},function(t,e,i){"use strict";function n(t,e,i){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.id=i,e.forEach(function(t){a.append(n,t.node)}),t.canvas.appendChild(n),n}var o=i(5),a=i(9),r=i(6),s=r.browser,h=s.msie&&s.version<=8,l="gray",u=100,c="tui-chart-series-group",d=r.defineClass({render:function(t,e){var i=e.mapModel.getMapDimension();this.ratio=this._getDimensionRatio(e.layout.dimension,i),this.dimension=e.layout.dimension,this.position=e.layout.position,this.paper=t,this.sectorSet=t.set(),this.sectors=this._renderMap(e,this.ratio),h||(this.g=n(t,this.sectorSet,c)),this.overColor=e.theme.overColor},_getDimensionRatio:function(t,e){return Math.min(t.height/e.height,t.width/e.width)},_renderMap:function(t,e){var i=this.sectorSet,n=t.layout.position,a=this.paper,s=t.colorSpectrum;return r.map(t.mapModel.getMapData(),function(t,r){var h=t.ratio||0,u=s.getColor(h),c=o.renderArea(a,t.path,{fill:u,opacity:1,stroke:l,"stroke-opacity":1,transform:"s"+e+","+e+",0,0t"+n.left/e+","+n.top/e});return c.data("index",r),i.push(c),{sector:c,color:u,ratio:t.ratio}})},findSectorIndex:function(t){var e=this.paper.getElementByPoint(t.left,t.top),i=e&&e.data("index"),n=!r.isUndefined(i)&&this.sectors[i];return n&&!r.isUndefined(n.ratio)?i:null},changeColor:function(t){var e=this.sectors[t];e.sector.animate({fill:this.overColor},u,">")},restoreColor:function(t){var e=this.sectors[t];e.sector.animate({fill:e.color},u,">")},scaleMapPaths:function(t,e,i,n,o){var a,r,s=this.g.transform.baseVal,h=this.paper.canvas.createSVGTransform(),l=this.paper.canvas.createSVGMatrix(),u=this.paper.raphael.matrix(),c=s.numberOfItems?s.getItem(0).matrix:{a:1,b:0,c:0,d:1,e:0,f:0},d=o.width-this.dimension.width,p=o.height-this.dimension.height,f=c.e/c.a,m=c.f/c.d,g=-d/c.a,_=-p/c.d;u.scale(t,t,e.left*i-f*t,e.top*i-m*t),a=u.e/u.a+f,r=u.f/u.d+m,a>=0?u.e=-f*u.a:a=0?u.f=-m*u.a:r<_&&(u.f=_-m),l.a=u.a,l.b=u.b,l.c=u.c,l.d=u.d,l.e=u.e,l.f=u.f,h.setMatrix(l),s.appendItem(h),s.initialize(s.consolidate())},moveMapPaths:function(t,e){var i,n,o,a,r=this.paper.canvas.createSVGMatrix(),s=this.paper.raphael.matrix(),h=this.g.transform.baseVal,l=this.paper.canvas.createSVGTransform(),u=e.width-this.dimension.width,c=e.height-this.dimension.height,d=h.numberOfItems?h.getItem(0).matrix:{a:1,b:0,c:0,d:1,e:0,f:0};s.translate(t.x,t.y),o=s.e/s.a,a=s.f/s.d,i=o+d.e/d.a,n=a+d.f/d.d,i>=0&&o>0?s.e=0:i<0&&i<-u/d.a&&o<0&&(s.e=0),n>=0&&a>0?s.f=0:n<0&&n<-c/d.d&&a<0&&(s.f=0),r.a=s.a,r.b=s.b,r.c=s.c,r.d=s.d,r.e=s.e,r.f=s.f,l.setMatrix(r),h.appendItem(l),h.initialize(h.consolidate())},renderSeriesLabels:function(t,e,i){var n={"font-size":i.fontSize,"font-family":i.fontFamily,"font-weight":i.fontWeight,fill:i.color,"text-anchor":"middle",opacity:0,transform:"s"+this.ratio+","+this.ratio+",0,0t"+this.position.left/this.ratio+","+this.position.top/this.ratio},a=t.set(),s=this;return r.forEach(e,function(e){var i=e.labelPosition,r=o.renderText(t,i,e.name||e.code,n);a.push(r),r.node.style.userSelect="none",r.node.style.cursor="default",r.node.setAttribute("filter","url(#glow)"),h||s.g.appendChild(r.node)}),a}});t.exports=d},function(t,e,i){"use strict";function n(){return a.LEGEND_ICON_WIDTH+a.LEGEND_LABEL_LEFT_PADDING}var o,a=i(8),r=i(5),s=i(10),h=i(6),l=.5;o=h.defineClass({init:function(){this._checkBoxWidth=0,this._checkBoxHeight=0,this._iconHeight=0,this._legendItemHeight=0,this._currentPageCount=1,this._showCheckbox=!0},_renderLegendItems:function(t){var e=this,i=a.LEGEND_LABEL_LEFT_PADDING,n=h.extend({},this.basePosition);h.forEach(t,function(t,o){var r=t.iconType,s=t.index,h=t.colorByPoint?"#aaa":t.theme.color,l=t.isUnselected,u=t.labelHeight,c=t.checkbox,d=n.left+e._calculateSingleLegendWidth(s,r),p=d>=e.paper.width;e.isHorizontal&&p&&(n.top+=e._legendItemHeight+a.LABEL_PADDING_TOP,n.left=e.basePosition.left),e._showCheckbox&&(e._renderCheckbox(n,{isChecked:c.checked,legendIndex:s,legendSet:e.legendSet}),n.left+=e._checkBoxWidth+i),e._renderIcon(n,{legendColor:h,iconType:r,labelHeight:u,isUnselected:l,legendIndex:s,legendSet:e.legendSet}),n.left+=a.LEGEND_ICON_WIDTH+i,e._renderLabel(n,{labelText:t.label,labelHeight:u,isUnselected:l,legendIndex:s,legendSet:e.legendSet}),e.isHorizontal?n.left+=e.labelWidths[o]+i:(n.left=e.basePosition.left,n.top+=e._legendItemHeight+a.LINE_MARGIN_TOP)})},_getLegendData:function(t,e){var i,n,o,r=this.basePosition.top,s=this.dimension.height,h=this.paper.height,l=t;return!this.isHorizontal&&s+2*r>h&&(i=h-2*r,this._legendItemHeight=Math.max(t[0].labelHeight,a.LEGEND_ICON_HEIGHT),n=this._legendItemHeight+a.LINE_MARGIN_TOP,o=Math.floor(i/n),l=t.slice((e-1)*o,e*o)),l},render:function(t){var e,i;return this.eventBus=t.eventBus,this.paper=t.paper,this.dimension=t.dimension,this.legendSet=this.paper.set(),this.labelWidths=t.labelWidths,this.labelTheme=t.labelTheme,this.basePosition=t.position,this.isHorizontal=t.isHorizontal,this.originalLegendData=t.legendData,this.originalLegendData.length&&(this._showCheckbox=h.isExisty(t.legendData[0].checkbox),this._setComponentDimensionsBaseOnLabelHeight(t.legendData[0].labelHeight),t.dimension.width=this._calculateLegendWidth(t.legendData[0].labelHeight),e=this._getLegendData(t.legendData,this._currentPageCount),this._renderLegendItems(e),!this.isHorizontal&&e&&e.length1&&(i._paginateLegendAreaTo("previous"),i._currentPageCount-=1)}),this.lowerButton.click(function(){i._currentPageCounti&&(n=i),n+a.LEGEND_AREA_PADDING})},getRenderedLabelHeight:function(t,e){return r.getRenderedTextSize(t,e.fontSize,e.fontFamily).height},_renderLabel:function(t,e){var i=this.eventBus,n=this.labelTheme,o={left:t.left,top:t.top+this._iconHeight/2},a={"font-size":n.fontSize,"font-family":n.fontFamily,"font-weight":n.fontWeight,opacity:e.isUnselected?l:1,"text-anchor":"start"},s=r.renderText(this.paper,o,e.labelText,a);s.data("index",e.legendIndex),s.node.style.userSelect="none",s.node.style.cursor="pointer",e.legendSet.push(s),s.click(function(){i.fire("labelClicked",e.legendIndex)})},_renderCheckbox:function(t,e){var i,n=this,o=t.left,a=t.top+(this._legendItemHeight-this._checkBoxHeight)/2,r="M"+(.3*this._checkBoxWidth+o)+","+(.5*this._checkBoxHeight+a)+"L"+(.5*this._checkBoxWidth+o)+","+(.7*this._checkBoxHeight+a)+"L"+(.8*this._checkBoxWidth+o)+","+(.2*this._checkBoxHeight+a);i=this.paper.set(),i.push(this.paper.rect(o,a,this._checkBoxWidth,this._checkBoxHeight,2).attr({fill:"#fff"})),e.isChecked&&i.push(this.paper.path(r)),i.data("index",e.legendIndex),i.click(function(){n.eventBus.fire("checkboxClicked",e.legendIndex)}),i.forEach(function(t){e.legendSet.push(t)})},_renderIcon:function(t,e){var i,n,o=this;this.paper.setStart(),"line"===e.iconType?(n="M"+t.left+","+(t.top+this._legendItemHeight/2)+"H"+(t.left+a.LEGEND_ICON_WIDTH),i=r.renderLine(this.paper,n,e.legendColor,3),i.attr("stroke-opacity",e.isUnselected?l:1)):i=r.renderRect(this.paper,{left:t.left,top:t.top,width:a.LEGEND_ICON_WIDTH,height:this._iconHeight},{"stroke-width":0,fill:e.legendColor,opacity:e.isUnselected?l:1}),i.data("icon",e.iconType),i.data("index",e.legendIndex),i.click(function(){o.eventBus.fire("labelClicked",e.legendIndex)}),e.legendSet.push(i)},selectLegend:function(t,e){e.forEach(function(e){var i=e.data("index"),n="line"===e.data("icon")?"stroke-opacity":"opacity";h.isNull(i)||h.isUndefined(i)?e.attr(n,1):h.isUndefined(i)||(h.isNumber(t)&&i!==t?e.attr(n,l):e.attr(n,1))})},_getCheckboxWidth:function(){return this._showCheckbox?this._checkBoxWidth+a.LEGEND_LABEL_LEFT_PADDING:0},_getLabelWidth:function(t){var e;return e=t?this.labelWidths[t]||0:s.max(this.labelWidths),e+a.LEGEND_LABEL_LEFT_PADDING},_calculateLegendWidth:function(){return this._calculateSingleLegendWidth()},_calculateSingleLegendWidth:function(t){return a.LEGEND_AREA_PADDING+this._getCheckboxWidth()+n()+this._getLabelWidth(t)+a.LEGEND_AREA_PADDING},_setComponentDimensionsBaseOnLabelHeight:function(t){this._legendItemHeight=Math.max(t,a.LEGEND_ICON_HEIGHT),this._iconHeight=this._legendItemHeight,this._checkBoxWidth=this._checkBoxHeight=t}}),t.exports=o},function(t,e,i){"use strict";var n=i(5),o=i(8),a=i(6),r=o.LEGEND_AREA_PADDING,s=360,h=270,l=35,u=15,c=3,d=a.defineClass({render:function(t,e,i,n,o){var a;e.position.left+=2*r,e.position.top+=r,a=this._renderGradientBar(t,e,i,n),o.push(a),this.wedge=this._renderWedge(t,e.position),o.push(this.wedge),this.gradientBar=a},renderTicksAndLabels:function(t,e,i,o,r){a.forEach(i,function(i,s){var h=e.step*s,c=a.extend({},e.position),d="M";o?(c.left+=h,d+=c.left+","+(c.top-l)+"V"+(c.top-l+u)):(c.top+=h,d+=c.left-l+","+c.top+"H"+(c.left-l+u)),r.push(n.renderLine(t,d,"#ccc",1)),r.push(n.renderText(t,c,i))})},_renderGradientBar:function(t,e,i,o){var a,l,u=e.dimension.height,c=e.position.left;return o?(u-=r,a=s,this._makeWedghPath=this._makeHorizontalWedgePath):(a=h,this._makeWedghPath=this._makeVerticalWedgePath),l={left:c,top:e.position.top,width:e.dimension.width-r,height:u},n.renderRect(t,l,{fill:a+"-"+i.start+"-"+i.end,stroke:"none"})},_renderWedge:function(t,e){return t.path(this.verticalBasePath).attr({fill:"gray",stroke:"none",opacity:0,transform:"t"+e.left+","+e.top})},verticalBasePath:["M",16,6,"L",24,3,"L",24,9],_makeVerticalWedgePath:function(t){var e=this.verticalBasePath;return e[2]=t,e[5]=t-c,e[8]=t+c,e},horizontalBasePath:["M",5,16,"L",8,24,"L",2,24],_makeHorizontalWedgePath:function(t){var e=this.horizontalBasePath;return e[1]=t,e[4]=t+c,e[7]=t-c,e},showWedge:function(t){var e=this._makeWedghPath(t);this.wedge.attr({path:e,opacity:1})},hideWedge:function(){this.wedge.attr({opacity:0})},removeLocationURLFromFillAttribute:function(){var t=this.gradientBar,e=t.node.getAttribute("fill");this.locationURL=/url\('?([^#]+)#[^#]+'?\)/.exec(e)[1],t.node.setAttribute("fill",e.replace(this.locationURL,""))},restoreLocationURLToFillAttribute:function(){var t=this.gradientBar,e=t.node.getAttribute("fill");t.node.setAttribute("fill",e.replace("#",this.locationURL+"#"))}});t.exports=d},function(t,e,i){"use strict";var n=i(5),o=i(6),a=o.defineClass({render:function(t,e,i,a,r){var s=e.position.left+e.dimension.width/2,h=t.set();return o.forEachArray(a,function(o,a){var l=i*o,u=e.position.top+e.dimension.height-l,c=n.renderCircle(t,{left:s,top:u},l,{fill:"none",opacity:1,stroke:"#888","stroke-width":1});h.push(c),h.push(n.renderText(t,{left:s,top:u-l-5},r[a]))}),h}});t.exports=a},function(t,e,i){"use strict";var n=i(5),o=i(8),a=i(6),r=a.defineClass({render:function(t,e,i,a){var r=a.fontSize,s=a.fontFamily,h=n.getRenderedTextSize(e,r,s),l={left:t.width/2,top:(h.height+o.TITLE_PADDING)/2},u=t.set();return i&&(i.x?l.left+=i.x:i.y&&(l.top+=i.y)),u.push(n.renderText(t,l,e,{"font-family":a.fontFamily,"font-size":a.fontSize,"font-weight":a.fontWeight,fill:a.color,"text-anchor":"middle"})),u},resize:function(t,e){e.attr({x:t/2})}});t.exports=r},function(t,e,i){"use strict";function n(t,e){var i=h.getRenderedTextSize(t,e.fontSize,e.fontFamily);return i.height}function o(t){return!u.isExisty(t.rotateTitle)||t.rotateTitle===!0}function a(t,e,i){var n=t?e.height:e.width,o=t?i.top:i.left;return n/2+o}function r(t,e){e&&(e.x&&(t.left+=e.x),e.y&&(t.top+=e.y))}function s(t,e){var i="none";return t.isPositionRight?i="r90,"+e.left+","+e.top:t.isVertical&&o(t)&&(i="r-90,"+e.left+","+e.top),i}var h=i(5),l=4,u=i(6),c=u.defineClass({init:function(){this.ticks=[]},renderBackground:function(t,e,i,n){var o=n&&n.background||{},a=o.color||"#fff",r=o.opacity||1;return h.renderRect(t,{left:0,top:e.top,width:i.width+e.left-l,height:i.height},{fill:a,opacity:r,"stroke-width":0})},renderTitle:function(t,e){var i,n=e.theme,o={"dominant-baseline":"auto","font-family":n.fontFamily,"font-size":n.fontSize,"font-weight":n.fontWeight,fill:n.color,"text-anchor":"middle"},a=this.calculatePosition(t,e);o.transform=s(e.rotationInfo,a),i=h.renderText(t,a,e.text,o),i.node.style.userSelect="none",i.node.style.cursor="default",e.set.push(i)},renderLabel:function(t){var e,i=t.positionTopAndLeft,n=t.labelText,o=t.paper,a=t.isVertical,r=t.isPositionRight,s=t.theme,l={"dominant-baseline":"central","font-family":s.fontFamily,"font-size":s.fontSize,"font-weight":s.fontWeight,fill:s.color};r?l["text-anchor"]="start":a?l["text-anchor"]="end":l["text-anchor"]="middle",e=h.renderText(o,i,n,l),e.node.style.userSelect="none",e.node.style.cursor="default",t.set.push(e),this.ticks.push(e)},renderRotatedLabel:function(t){var e=t.positionTopAndLeft,i=t.labelText,n=t.paper,o=t.theme,a=h.renderText(n,e,i,{"dominant-baseline":"central","font-family":o.fontFamily,"font-size":o.fontSize,"font-weight":o.fontWeight,fill:o.color,"text-anchor":"end",transform:"r"+-t.degree+","+(e.left+20)+","+e.top});a.node.style.userSelect="none",a.node.style.cursor="arrow",t.set.push(a),this.ticks.push(a)},renderTicks:function(t){var e,i=this,n=t.paper,o=t.positions,a=t.additionalSize,r=t.isVertical,s=t.isCenter,h=t.isPositionRight,l=t.tickColor,c=t.layout,d=c.position.left+c.dimension.width,p=c.position.top,f=c.position.left,m=function(t){var e=r?"height":"width";return t>c.dimension[e]};u.forEach(o,function(o){var u="M";o+=a,m(o)||(r?s?(u+=f+","+(p+o),u+="H"+(f+5),u+="M"+d+","+(p+o),u+="H"+(d-5)):h?(u+=f+","+(p+o),u+="H"+(f+5)):(u+=d+","+(p+o),u+="H"+(d-5)):(u+=f+o+","+p,u+="V"+(p+5)),isNaN(o)||(e=n.path(u).attr({stroke:l}),t.set.push(e),i.ticks.push(e)))})},renderTickLine:function(t){var e,i,n,o=t.areaSize,a=o,r=t.paper,s=t.layout,h=t.isNotDividedXAxis,l=t.additionalSize,u=t.isPositionRight,c=t.isCenter,d=t.isVertical,p=t.tickColor,f="M",m=s.position.top,g=s.position.left,_=s.dimension.height+m,T=g+s.dimension.width;u?(f+=g+","+m,f+="V"+_):d?(e=m,f+=T+","+e,c?(f+="V"+_,f+="M"+g+","+e,f+="V"+_):(n=m+a,f+="V"+n)):(f+=h?g:g+l,f+=","+m+"H",i=g+a,h||(i+=l),f+=i),t.set.push(r.path(f).attr({"stroke-width":1,stroke:p}))},animateForAddingData:function(t){u.forEach(this.ticks,function(e){e.animate({transform:"t-"+t+",0"},300)})},calculatePosition:function(t,e){var i=e.rotationInfo,o=n(e.text,e.theme),s=e.layout,h=a(i.isVertical,s.dimension,s.position),l={};return i.isCenter?(l.top=t.height-o/2,l.left=s.position.left+s.dimension.width/2):i.isPositionRight?(l.top=h,l.left=s.position.left+s.dimension.width):i.isVertical?(l.top=h,l.left=s.position.left+o/2):(l.top=s.position.top+s.dimension.height,l.left=h),i.isCenter||r(l,e.offset),l}});t.exports=c},function(t,e,i){"use strict";var n=i(5),o=i(10),a=i(6),r=8,s=3,h=a.defineClass({render:function(t){var e=t.paper.set();return this.paper=t.paper,this.layout=t.layout,this.plotPositions=t.plotPositions,this.theme=t.theme,this.options=t.options,this.labelData=t.labelData,this._renderPlot(e),this._renderLabels(e),e.toBack(),this.paper.pushDownBackgroundToBottom(),e},_renderPlot:function(t){"circle"===this.options.type?this._renderCirclePlot(t):this._renderSpiderwebPlot(t),this._renderCatergoryLines(t)},_renderSpiderwebPlot:function(t){var e=this._getLinesPath(this.plotPositions);this._renderLines(e,this.theme.lineColor,t)},_renderCirclePlot:function(t){var e,i,o,a=this.plotPositions,r=a[0][0],s=this.theme.lineColor;for(e=1;e=a&&(r=0);return o},_setSeriesColors:function(t,e,i,n){var o,s,h,l=0;i=i||{},r.forEachArray(t,function(t){i[t]?(o=i[t].colors,h=!0):(o=i.colors||a.series.colors,h=!1),s=this._getSeriesThemeColorCount(n[t]),e[t].colors=this._makeEachSeriesColors(o,s,!h&&l),h||(l=(s+l)%o.length)},this)},_getSeriesThemeColorCount:function(t){var e=0;return t&&t.length&&(e=t.colorLength?t.colorLength:t[0]&&t[0].data&&t[0].data.length?Math.max(t.length,t[0].data.length):t.length),e},_initTheme:function(t,e,i,o){var r;return t!==n.DEFAULT_THEME_NAME?(r=JSON.parse(JSON.stringify(a)),this._overwriteTheme(e,r)):r=JSON.parse(JSON.stringify(e)),r.yAxis=this._createComponentThemeWithSeriesName(i,e.yAxis,r.yAxis,"yAxis"),r.series=this._createComponentThemeWithSeriesName(i,e.series,r.series,"series"),this._setSeriesColors(i,r.series,e.series,o),r},_createTargetThemesForFontInherit:function(t){var e=[t.title,t.xAxis.title,t.xAxis.label,t.legend.label,t.plot.label];return r.forEach(t.yAxis,function(t){e.push(t.title,t.label)}),r.forEach(t.series,function(t){e.push(t.label)}),e},_inheritThemeFont:function(t){var e=this._createTargetThemesForFontInherit(t),i=t.chart.fontFamily;r.forEachArray(e,function(t){t.fontFamily||(t.fontFamily=i)})},_copySeriesColorTheme:function(t,e,i){e[i]={colors:t.colors,borderColor:t.borderColor,selectionColor:t.selectionColor}},_copySeriesColorThemeToOther:function(t){var e=this;r.forEach(t.series,function(i,n){e._copySeriesColorTheme(i,t.legend,n),e._copySeriesColorTheme(i,t.tooltip,n)})},get:function(t,e,i){var n,o,a=s[t];if(!a)throw new Error("Not exist "+t+" theme.");return o=this._pickSeriesNames(e,i),n=this._initTheme(t,a,o,i),this._inheritThemeFont(n,o),this._copySeriesColorThemeToOther(n),n}}},function(t,e){"use strict";var i="#000000",n="#ffffff",o="normal",a="",r={tickColor:i,title:{fontSize:12,fontFamily:a,color:i,fontWeight:o},label:{fontSize:12,fontFamily:a,color:i,fontWeight:o}},s={chart:{background:{color:n,opacity:1},fontFamily:"Verdana"},title:{fontSize:18,fontFamily:a,color:i,fontWeight:o},yAxis:r,xAxis:r,plot:{lineColor:"#dddddd",background:"#ffffff",label:{fontSize:11,fontFamily:a,color:"#888"}},series:{label:{fontSize:11,fontFamily:a,color:i,fontWeight:o},colors:["#ac4142","#d28445","#f4bf75","#90a959","#75b5aa","#6a9fb5","#aa759f","#8f5536"],borderColor:a,borderWidth:a,selectionColor:a,startColor:"#F4F4F4",endColor:"#345391",overColor:"#F0C952",dot:{fillColor:a,fillOpacity:1,strokeColor:a,strokeOpacity:1,strokeWidth:2,radius:2,hover:{fillColor:a,fillOpacity:1,strokeColor:a,strokeOpacity:.8,strokeWidth:3,radius:4}},ranges:[]},legend:{label:{fontSize:12,fontFamily:a,color:i,fontWeight:o}},tooltip:{},chartExportMenu:{backgroundColor:"#fff",borderRadius:0,borderWidth:1,color:"#000"}};t.exports=s},function(t,e){"use strict";var i={};t.exports={get:function(t){var e=i[t];if(!e)throw new Error("Not exist "+t+" map.");return e},register:function(t,e){i[t]=e}}},function(t,e,i){"use strict";var n=i(6),o=function(t){var e;return n.isArray(t)?(e=[],n.forEachArray(t,function(t,i){e[i]=o(t)})):n.isFunction(t)||n.isDate(t)?e=t:n.isObject(t)?(e={},n.forEach(t,function(t,i){e[i]=o(t); +})):e=t,e},a={deepCopy:o};t.exports=a},function(t,e,i){"use strict";function n(t){var e;return t.length>0&&(e={},e.categories=[],e.series=[],e.categories=t.shift().slice(1),s.forEach(t,function(t){var i={};i.name=t[0],i.data=t.slice(1),e.series.push(i)})),e}function o(t){var e=[],i=[],n=[];return t&&(e=s.toArray(t.getElementsByTagName("TR")),s.forEach(e,function(t,e){var n=0===e?"TH":"TD",o=s.toArray(t.getElementsByTagName(n)),a=s.pluck(o,"innerText");i.push(a)}),i[0].length1,e=r.isYAxisAlignCenter(this.hasRightYAxis,t.yAxis.align),t.yAxis.isCenter=e,t.xAxis.divided=e,t.series.divided=e,t.plot.divided=e)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("barSeries","barSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){return{xAxis:!0}},onChangeCheckedLegends:function(t){var e;this.hasRightYAxis&&(e={optionChartTypes:["bar","bar"]}),n.prototype.onChangeCheckedLegends.call(this,t,null,e)},addDataRatios:function(t){var e=this.options.series||{},i=this.chartType,n=(e[i]||e).stackType;this.dataProcessor.addDataRatios(t[i],n,i)}});t.exports=h},function(t,e,i){"use strict";var n=i(8),o=i(43),a=i(101),r=i(31),s=i(9),h=i(7),l=i(112),u=i(11),c=i(6),d=c.defineClass({init:function(t){this.theme=t.theme,this._initializeOptions(t.options),this.chartType=this.options.chartType,this.hasAxes=t.hasAxes,this.isVertical=!!t.isVertical,this.dataProcessor=this._createDataProcessor(t),this.eventBus=new c.CustomEvents,this.prevXAxisData=null,this.componentManager=this._createComponentManager(),this.addComponents(),this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on("changeCheckedLegends",this.onChangeCheckedLegends,this),this.onZoom&&this.eventBus.on({zoom:this.onZoom,resetZoom:this.onResetZoom},this)},_setOffsetProperty:function(t,e,i){c.isExisty(t[e])&&(t.offset=t.offset||{},t.offset[i]=t[e],delete t[e])},_initializeOffset:function(t){t&&(this._setOffsetProperty(t,"offsetX","x"),this._setOffsetProperty(t,"offsetY","y"))},_initializeTitleOptions:function(t){var e,i=this;t&&(e=c.isArray(t)?t:[t],c.forEachArray(e,function(t){var e=t.title;c.isString(e)&&(t.title={text:e}),i._initializeOffset(t.title)}))},_initializeTooltipOptions:function(t){var e=t.position;t.grouped=!!t.grouped,this._initializeOffset(t),!t.offset&&e&&(t.offset={x:e.left,y:e.top}),delete t.position},_initializeOptions:function(t){t.chartTypes=this.charTypes,t.xAxis=t.xAxis||{},t.series=t.series||{},t.tooltip=t.tooltip||{},t.legend=t.legend||{},t.chartExportMenu=t.chartExportMenu||{},this._initializeTitleOptions(t.chart),this._initializeTitleOptions(t.xAxis),this._initializeTitleOptions(t.yAxis),c.isUndefined(t.legend.visible)&&(t.legend.visible=!0),c.isUndefined(t.chartExportMenu.visible)&&(t.chartExportMenu.visible=!0),this._initializeTooltipOptions(t.tooltip),this.options=t},_createDataProcessor:function(t){var e,i;return e=t.DataProcessor||a,i=new e(t.rawData,this.chartType,t.options,this.seriesTypes)},_createComponentManager:function(){return new o({options:this.options,theme:this.theme,dataProcessor:this.dataProcessor,hasAxes:this.hasAxes,eventBus:this.eventBus,isVertical:this.isVertical,seriesTypes:this.seriesTypes||[this.chartType]})},addComponents:function(){},getScaleOption:function(){},_buildBoundsAndScaleData:function(t,e){return l.build(this.dataProcessor,this.componentManager,{chartType:this.chartType,seriesTypes:this.seriesTypes,options:this.options,theme:this.theme,hasAxes:this.hasAxes,scaleOption:this.getScaleOption(),isVertical:this.isVertical,hasRightYAxis:this.hasRightYAxis,addedDataCount:this._dynamicDataHelper?this._dynamicDataHelper.addedDataCount:null,prevXAxisData:t,addingDataMode:e})},addDataRatios:function(){},readyForRender:function(t){var e=this._buildBoundsAndScaleData(this.prevXAxisData,t);return e.axisDataMap.xAxis&&(this.prevXAxisData=e.axisDataMap.xAxis),this.addDataRatios(e.limitMap),e},render:function(t){var e,i=s.create("DIV","tui-chart "+this.className),o=this.componentManager,a=this.dataProcessor,l=a.getLegendVisibility(),u=r.filterCheckedRawData(a.rawData,l),c=o.drawingToolPicker.getPaper(i,n.COMPONENT_TYPE_RAPHAEL);this.dataProcessor.initData(u),c.changeChartBackgroundColor(this.theme.chart.background.color),c.changeChartBackgroundOpacity(this.theme.chart.background.opacity),h.renderFontFamily(i,this.theme.chart.fontFamily),s.append(t,i),e=this.readyForRender(),h.renderDimension(i,e.dimensionMap.chart),o.render("render",e,{checkedLegends:l},i),this.chartContainer=i,this.paper=c},rerender:function(t,e){var i,n=this.dataProcessor;e||(e=r.filterCheckedRawData(n.getZoomedRawData(),t)),this.dataProcessor.initData(e),i=this.readyForRender(),this.componentManager.render("rerender",i,{checkedLegends:t},this.chartContainer)},onChangeCheckedLegends:function(t,e,i){this.rerender(t,e,i)},animateChart:function(){this.componentManager.execute("animateComponent")},on:function(t,e){n.PUBLIC_EVENT_MAP[t]&&this.eventBus.on(n.PUBLIC_EVENT_PREFIX+t,e)},off:function(t,e){n.PUBLIC_EVENT_MAP[t]&&this.eventBus.off(n.PUBLIC_EVENT_PREFIX+t,e)},_updateChartDimension:function(t){var e=!1,i=this.options;return i.chart=i.chart||{},t.width&&t.width>0&&i.chart.width!==t.width&&(i.chart.width=t.width,e=!0),t.height&&t.height>0&&i.chart.height!==t.height&&(i.chart.height=t.height,e=!0),e},resize:function(t){var e,i,n;t&&(e=this._updateChartDimension(t),e&&(i=this.readyForRender(),n=i.dimensionMap.chart,h.renderDimension(this.chartContainer,n),this.paper.resizeBackground(n.width,n.height),this.componentManager.render("resize",i)))},setTooltipAlign:function(t){this.componentManager.get("tooltip").setAlign(t)},setTooltipOffset:function(t){this.componentManager.get("tooltip").setOffset(t)},setTooltipPosition:function(t){this.componentManager.get("tooltip").setPosition(t)},resetTooltipAlign:function(){this.componentManager.get("tooltip").resetAlign()},resetTooltipOffset:function(){this.componentManager.get("tooltip").resetOffset()},resetTooltipPosition:function(){this.resetTooltipOffset()},showSeriesLabel:function(){var t=this.componentManager.where({componentType:"series"});c.forEachArray(t,function(t){t.showLabel()})},hideSeriesLabel:function(){var t=this.componentManager.where({componentType:"series"});c.forEachArray(t,function(t){t.hideLabel()})},addData:function(){},addPlotLine:function(){},addPlotBand:function(){},removePlotLine:function(){},removePlotBand:function(){},_getSeriesData:function(t,e,i){var n={index:t,seriesIndex:e,outlierIndex:i};return e<0?null:this.componentManager.get("mouseEventDetector").findDataByIndexes(n)},_findSeriesIndexByLabel:function(t,e){for(var i=this.dataProcessor.getLegendLabels(t),n=-1,o=0,a=i?i.length:0;o=0||!t&&e.prevFoundData)&&e._hideTooltip({silent:!0}))}});t.exports=d},function(t,e,i){"use strict";var n=i(8),o=i(9),a=i(44),r=i(46),s=i(47),h=i(48),l=i(50),u=i(38),c=i(56),d=i(58),p=i(59),f=i(60),m=i(66),g=i(68),_=i(69),T=i(73),v=i(80),y=i(84),x=i(85),A=i(87),D=i(88),E=i(89),C=i(91),L=i(92),S=i(93),M=i(94),P=i(95),b=i(97),R=i(98),k=i(99),I=i(6),w={axis:a,plot:r,radialPlot:h,legend:c,spectrumLegend:d,circleLegend:p,tooltip:f,groupTooltip:m,mapChartTooltip:g,mapChartEventDetector:_,mouseEventDetector:T,barSeries:v,columnSeries:y,lineSeries:x,radialSeries:A,areaSeries:D,bubbleSeries:E,scatterSeries:C,mapSeries:L,pieSeries:S,heatmapSeries:M,treemapSeries:P,boxplotSeries:b,bulletSeries:R,zoom:k,chartExportMenu:l,title:s},B=I.defineClass({init:function(t){var e=t.options.chart,i=I.pick(e,"width")||n.CHART_DEFAULT_WIDTH,o=I.pick(e,"height")||n.CHART_DEFAULT_HEIGHT;this.components=[],this.componentMap={},this.theme=t.theme||{},this.options=t.options||{},this.dataProcessor=t.dataProcessor,this.hasAxes=t.hasAxes,this.isVertical=t.isVertical,this.eventBus=t.eventBus,this.drawingToolPicker=new u,this.drawingToolPicker.initDimension({width:i,height:o}),this.seriesTypes=t.seriesTypes},_makeComponentOptions:function(t,e,i,n){return t=t||this.options[e],t=I.isArray(t)?t[n]:t||{}},register:function(t,e,i){var n,o,a,r,s;i=i||{},i.name=t,n=i.index||0,r=w[e],a=r.componentType,i.chartTheme=this.theme,i.chartOptions=this.options,i.seriesTypes=this.seriesTypes,s="axis"===a?t:a,i.theme=this.theme[s],i.options=this.options[s],i.theme||"rightYAxis"!==s||(i.theme=this.theme.yAxis),i.options||"rightYAxis"!==s||(i.options=this.options.yAxis),"series"===s&&I.forEach(this.seriesTypes,function(e){return 0!==t.indexOf(e)||(i.options=i.options[e]||i.options,i.theme=i.theme[e],I.isArray(i.options)&&(i.options=i.options[n]||{}),!1)}),i.dataProcessor=this.dataProcessor,i.hasAxes=this.hasAxes,i.isVertical=this.isVertical,i.eventBus=this.eventBus,i.alternativeModel=this.alternativeModel,o=r(i),o&&(o.componentName=t,o.componentType=a,this.components.push(o),this.componentMap[t]=o)},_makeDataForRendering:function(t,e,i,n,o){var a=I.extend({paper:i},o);return n&&(I.extend(a,n),a.layout={dimension:a.dimensionMap[t]||a.dimensionMap[e],position:a.positionMap[t]||a.positionMap[e]}),a},render:function(t,e,i,n){var a,r,s=this,h=I.map(this.components,function(o){var h,l,u,c=null;return o[t]&&(a=o.componentName,r=o.componentType,u=s.drawingToolPicker.getPaper(n,o.drawingType),h=s._makeDataForRendering(a,r,u,e,i),l=o[t](h),l&&!l.paper&&(c=l)),c});n&&o.append(n,h)},where:function(t){return I.filter(this.components,function(e){var i=!0;return I.forEach(t,function(t,n){return e[n]!==t&&(i=!1),i}),i})},execute:function(t){var e=Array.prototype.slice.call(arguments,1);I.forEachArray(this.components,function(i){i[t]&&i[t].apply(i,e)})},get:function(t){return this.componentMap[t]},has:function(t){return!!this.get(t)}});t.exports=B},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.chartType,i=t.name;return t.isYAxis="yAxis"===i||"rightYAxis"===i,t.shifting=t.chartOptions.series.shifting,"combo"===e?t.isYAxis?t.theme=t.theme[t.seriesTypes[0]]:"rightYAxis"===i&&(t.componentType="yAxis",t.theme=t.theme[t.seriesTypes[1]],t.index=1):t.isYAxis?t.theme=t.theme[e]:t.theme=t.theme,new u(t)}var o=i(8),a=i(11),r=i(45),s=i(32),h=i(7),l=i(6),u=l.defineClass({init:function(t){this.className="tui-chart-axis-area",this.dataProcessor=t.dataProcessor,this.options=t.options||{},this.theme=l.extend({},t.theme,{background:t.chartTheme.chart.background}),this.isLabelAxis=!1,this.isYAxis=t.isYAxis,this.shifting=t.shifting,this.data={},this.layout=null,this.dimensionMap=null,this.axisDataMap=null,this.graphRenderer=s.get(o.COMPONENT_TYPE_RAPHAEL,"axis"),this.drawingType=o.COMPONENT_TYPE_RAPHAEL,this.paperAdditionalWidth=0,this.paperAdditionalHeight=0,this._elBg=null},_renderBackground:function(){var t=l.extend({},this.layout.dimension),e=l.extend({},this.layout.position);this.isYAxis&&(t.height=this.dimensionMap.chart.height,e.top=0),this._elBg&&this._elBg.remove(),this._elBg=this.graphRenderer.renderBackground(this.paper,e,t,this.theme.background)},_renderChildContainers:function(t,e,i,n){var o=this.isYAxis&&this.data.aligned;this.isYAxis&&!this.data.isPositionRight&&!this.options.isCenter&&this.shifting&&this._renderBackground(),this._renderTitleArea(),this._renderLabelArea(t,e,i,n),o||this._renderTickArea(t,e,n)},_renderDividedAxis:function(t){var e=this.data,i=Math.round(t.width/2),n=t.width-i-1,o=e.tickCount,a=parseInt(o/2,10)+1,r=e.labels,s=r.slice(0,a),h=r.slice(a-1,o),l=i/a,u=i+this.dimensionMap.yAxis.width-1;this.paperAdditionalWidth=l,this._renderChildContainers(i,a,s,0),this._renderChildContainers(n+1,a,h,u)},_renderNotDividedAxis:function(t){var e=this.data,i=this.isYAxis,n=i?t.height:t.width,o=0;e.positionRatio&&(o=n*e.positionRatio),this._renderChildContainers(n,e.tickCount,e.labels,o)},_renderAxisArea:function(){var t=this.layout.dimension,e=this.data;this.isLabelAxis=e.isLabelAxis,this.options.divided?(this.containerWidth=t.width+this.dimensionMap.yAxis.width,this._renderDividedAxis(t),t.width=this.containerWidth):(t.width+=this.options.isCenter?1:0,this._renderNotDividedAxis(t))},_setDataForRendering:function(t){this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.data=t.axisDataMap[this.componentName],this.options=this.data.options},render:function(t){this.paper=t.paper,this.axisSet=t.paper.set(),this._setDataForRendering(t),this._renderAxisArea()},rerender:function(t){this.axisSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},zoom:function(t){this.rerender(t)},_renderTitleArea:function(){var t=this.options.title||{};t.text&&this.graphRenderer.renderTitle(this.paper,{text:t.text,offset:t.offset,theme:this.theme.title,rotationInfo:{rotateTitle:this.options.rotateTitle,isVertical:this.isYAxis,isPositionRight:this.data.isPositionRight,isCenter:this.options.isCenter},layout:this.layout,set:this.axisSet})},_renderTickLine:function(t,e,i){this.graphRenderer.renderTickLine({areaSize:t,additionalSize:i,additionalWidth:this.paperAdditionalWidth,additionalHeight:this.paperAdditionalHeight,isPositionRight:this.data.isPositionRight,isCenter:this.data.options.isCenter,isNotDividedXAxis:e,isVertical:this.isYAxis,tickColor:this.theme.tickColor,layout:this.layout,paper:this.paper,set:this.axisSet})},_renderTicks:function(t,e,i,n){var o=this.theme.tickColor,a=this.data,s=a.sizeRatio||1,h=this.isYAxis,l=this.data.options.isCenter,u=this.data.isPositionRight,c=r.makeTickPixelPositions(t*s,e),d=this.paperAdditionalHeight+1,p=this.paperAdditionalWidth;c.length=a.tickCount,this.graphRenderer.renderTicks({paper:this.paper,layout:this.layout,positions:c,isVertical:h,isCenter:l,additionalSize:n,additionalWidth:p,additionalHeight:d,isPositionRight:u,tickColor:o,set:this.axisSet})},_renderTickArea:function(t,e,i){var n=!this.isYAxis&&!this.options.divided;this._renderTickLine(t,n,i||0),this._renderTicks(t,e,n,i||0)},_renderLabelArea:function(t,e,i,n){var o=this.data.sizeRatio||1,a=r.makeTickPixelPositions(t*o,e,0),s=a[1]-a[0];this._renderLabels(a,i,s,n||0)},_renderRotationLabels:function(t,e,i,n){var a=this,r=this.graphRenderer,s=this.isYAxis,h=this.theme.label,u=this.data.degree,c=i/2,d=this.layout.position.top+o.AXIS_LABEL_PADDING,p=this.layout.position.left,f=this.options.labelMargin||0;l.forEach(t,function(t,o){var l=t+(n||0),m={};s?(m.top=l+c,m.left=i+f):(m.top=d+f,m.left=p+l,a.isLabelAxis&&(m.left+=c)),r.renderRotatedLabel({degree:u,labelText:e[o],paper:a.paper,positionTopAndLeft:m,set:a.axisSet,theme:h})})},_renderNormalLabels:function(t,e,i,n){var r=this,s=this.graphRenderer,h=this.isYAxis,u=this.data.isPositionRight,c=this.isLabelAxis,d=this.theme.label,p=this.dataProcessor,f=a.isLineTypeChart(p.chartType,p.seriesTypes),m=f&&this.options.pointOnColumn,g=this.layout,_=this.options.labelMargin||0;l.forEach(t,function(t,a){var l,p,T=t+n,v=i/2,y={};T<0||(h?(l=T,c?l+=v+g.position.top:l=g.dimension.height+g.position.top-l,p=u?g.position.left+o.AXIS_LABEL_PADDING+_:g.position.left+g.dimension.width-o.AXIS_LABEL_PADDING-_):(l=g.position.top+o.CHART_PADDING+o.AXIS_LABEL_PADDING+_,p=T+g.position.left,c&&(f&&!m||(p+=v))),y.top=Math.round(l),y.left=Math.round(p),s.renderLabel({isPositionRight:u,isVertical:h,labelSize:i,labelText:e[a],paper:r.paper,positionTopAndLeft:y,set:r.axisSet,theme:d}))})},_renderLabels:function(t,e,i,n){var o,a=!this.isYAxis&&this.isLabelAxis&&this.options.rotateLabel===!1,r="xAxis"===this.componentName&&this.data.degree;o=a?this.data.multilineLabels:e,o.length&&(t.length=o.length),o=h.addPrefixSuffix(o,this.options.prefix,this.options.suffix),r?this._renderRotationLabels(t,o,i,n):this._renderNormalLabels(t,o,i,n)},animateForAddingData:function(t){this.isYAxis||this.graphRenderer.animateForAddingData(t.tickSize)}});n.componentType="axis",n.Axis=u,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=i(10),a=100,r={calculateLimit:function(t,e){var i,n=0,o={};return t<0&&(n=t,e-=t,t=0),i=(e-t)/20,o.max=e+i+n,e/6>t?o.min=n:o.min=t-i+n,o},makeTickPixelPositions:function(t,e,i){var o=[];return i=i||0,e>0&&(o=n.map(n.range(0,e),function(n){var o=0===n?0:n/(e-1);return o*t+i}),o[o.length-1]-=1),o},makeLabelsFromLimit:function(t,e){var i=r.findMultipleNum(e),o=Math.round(t.min*i),a=Math.round(t.max*i),s=n.range(o,a+1,e*i);return n.map(s,function(t){return t/i})},calculateStepFromLimit:function(t,e){return r.divide(r.subtract(t.max,t.min),e-1)},sumPlusValues:function(t){var e=n.filter(t,function(t){return t>0});return r.sum(e)},sumMinusValues:function(t){var e=n.filter(t,function(t){return t<0});return r.sum(e)},makePercentageValue:function(t,e){return t/e*a},calculateRatio:function(t,e,i,n){return(t-i)/e*n}},s=function(t){var e=String(t).split(".");return 2===e.length?e[1].length:0},h=function(){var t=[].slice.call(arguments),e=n.map(t,function(t){return r.getDecimalLength(t)}),i=o.max(e);return Math.pow(10,i)},l=function(t,e){var i,n=r.findMultipleNum(e);return i=1===n?t%e:t*n%(e*n)/n},u=function(t,e){var i=r.findMultipleNum(t,e);return(t*i+e*i)/i},c=function(t,e){var i=r.findMultipleNum(t,e);return(t*i-e*i)/i},d=function(t,e){var i=r.findMultipleNum(t,e);return t*i*(e*i)/(i*i)},p=function(t,e){var i=r.findMultipleNum(t,e);return t*i/(e*i)},f=function(t){var e=t.slice();return e.unshift(0),n.reduce(e,function(t,e){return r.add(parseFloat(t),parseFloat(e))})};r.getDecimalLength=s,r.findMultipleNum=h,r.mod=l,r.add=u,r.subtract=c,r.multiply=d,r.divide=p,r.sum=f,t.exports=r},function(t,e,i){"use strict";function n(t,e){return t.start-e.start}function o(t){var e=t.chartOptions.chartType,i=t.seriesTypes,n=t.chartOptions.xAxis.type;return t.chartType=e,t.chartTypes=i,t.xAxisTypeOption=n,new u(t)}var a=i(8),r=i(11),s=i(45),h=i(6),l=h.map,u=h.defineClass({init:function(t){this.className="tui-chart-plot-area",this.dataProcessor=t.dataProcessor,this.options=t.options||{},this.options.showLine=!!h.isUndefined(this.options.showLine)||this.options.showLine,this.options.lines=this.options.lines||[],this.options.bands=this.options.bands||[],this.xAxisTypeOption=t.xAxisTypeOption,this.theme=t.theme||{},this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.layout=null,this.axisDataMap=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL},_renderPlotArea:function(t){var e;e=this.layout.dimension,r.isLineTypeChart(this.chartType,this.chartTypes)&&this._renderOptionalLines(t,e),this.options.showLine&&this._renderPlotLines(t,e)},_setDataForRendering:function(t){t&&(this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.axisDataMap=t.axisDataMap,this.paper=t.paper)},render:function(t){var e=t&&t.paper||this.paper;this.plotSet=e.set(),this.additionalPlotSet=e.set(),this._setDataForRendering(t),this._renderPlotArea(this.paper),this.additionalPlotSet.toBack(),this.plotSet.toBack(),e.pushDownBackgroundToBottom()},rerender:function(t){this.additionalPlotSet.remove(),this.plotSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},zoom:function(t){this.rerender(t)},_makeVerticalLineTemplateParams:function(t){return h.extend({className:"vertical",positionType:"left",width:"1px"},t)},_makeHorizontalLineTemplateParams:function(t){return h.extend({className:"horizontal",positionType:"bottom",height:"1px"},t)},_renderLine:function(t,e){var i=this.layout.position.top,n=this.layout.dimension.height,o="M"+t+","+i+"V"+(i+n),a=this.paper.path(o);return a.attr({opacity:e.opacity||1,stroke:e.color}),this.additionalPlotSet.push(a),a},_renderBand:function(t,e,i){var n=this.layout.position,o=this.layout.dimension,a=o.width-t+n.left,r=e<0?a:e,s=this.paper.rect(t,n.top,r,o.height);return s.attr({fill:i.color,opacity:i.opacity||1,stroke:i.color}),this.additionalPlotSet.push(s),s},_createOptionalLineValueRange:function(t){var e=t.range||[t.value];return r.isDatetimeType(this.xAxisTypeOption)&&(e=l(e,function(t){var e=new Date(t);return e.getTime()||t})),e},_createOptionalLinePosition:function(t,e,i){var n=(i-t.dataMin)/t.distance,o=n*e;return 1===n&&(o-=1),o<0&&(o=null),o},_createOptionalLinePositionWhenLabelAxis:function(t,e){var i,n=this.dataProcessor,o=n.findCategoryIndex(e),a=null;return h.isNull(o)||(i=0===o?0:o/(n.getCategoryCount()-1),a=i*t),1===i&&(a-=1),a},_createOptionalLinePositionMap:function(t,e,i){var n,o,a=this.dataProcessor.getCategories(),r=this._createOptionalLineValueRange(t);return e.isLabelAxis?(n=this._createOptionalLinePositionWhenLabelAxis(i,r[0]),o=this._createOptionalLinePositionWhenLabelAxis(i,r[1])):(n=this._createOptionalLinePosition(e,i,r[0]),o=r[1]&&this._createOptionalLinePosition(e,i,r[1])),h.isNull(n)&&(n=this._isBeforeVisibleCategories(r[0],a[0])?0:-1),h.isNull(o)&&(o=this._isAfterVisibleCatgories(r[1],a[a.length-1])?i:-1),{start:n,end:o}},_isBeforeVisibleCategories:function(t,e){var i,n,o=this.dataProcessor;return!!h.isExisty(t)&&(r.isDatetimeType(this.xAxisTypeOption)?t=0&&ie:(i=o.findAbsoluteCategoryIndex(t),n=o.findAbsoluteCategoryIndex(e),i>=0&&i>n))},_renderOptionalLine:function(t,e,i,n){var o,a=this._createOptionalLinePositionMap(n,t,e);return a.start>=0&&a.start<=e&&(i.width=1,i.color=n.color||"transparent",i.opacity=n.opacity,o=this._renderLine(a.start+this.layout.position.left,i)),o},_makeOptionalBand:function(t,e,i,o){var a,r=o.range;return r&&r.length&&this._makeRangeTo2DArray(o),a=l(o.range,function(i){return this._createOptionalLinePositionMap({range:i},t,e)},this),o.mergeOverlappingRanges&&(a.sort(n),a=this._mergeOverlappingPositionMaps(a)),l(a,function(t){var n,a,r=t.start>=0&&t.start<=e;return r&&t.end>=0&&(i.color=o.color||"transparent",i.opacity=o.opacity,n=t.end-t.start,a=this._renderBand(t.start+this.layout.position.left,n,i)),a},this)},_makeOptionalLines:function(t,e){var i=e.width,n=this.axisDataMap.xAxis,o=this._makeVerticalLineTemplateParams({height:e.height+"px"}),a=h.bind(this._renderOptionalLine,this,n,i,o);return l(t,a)},_makeOptionalBands:function(t,e){var i=e.width,n=this.axisDataMap.xAxis,o=this._makeVerticalLineTemplateParams({height:e.height+"px"}),a=h.bind(this._makeOptionalBand,this,n,i,o);return l(t,a)},_renderOptionalLines:function(t,e){var i=[];i.concat(this._makeOptionalBands(this.options.bands,e)),i.concat(this._makeOptionalLines(this.options.lines,e)),this.optionalLines=i},_renderVerticalLines:function(t,e){var i=this._makeHorizontalPositions(t.width),n=this,o=this.layout,a=o.position.left,r=o.position.top;h.forEach(i,function(t){var i="M"+(t+a)+","+r+"V"+(r+o.dimension.height),s=n.paper.path(i);s.attr({stroke:e,"stroke-width":1}),n.plotSet.push(s)})},_renderHorizontalLines:function(t,e){var i=this._makeVerticalPositions(t.height),n=this,o=this.layout,a=o.position.left,r=o.position.top,s=i[1]-i[0];h.forEach(i,function(t,i){var h="M"+a+","+(s*i+r)+"H"+(a+o.dimension.width),l=n.paper.path(h);l.attr({stroke:e,"stroke-width":1}),n.plotSet.push(l)})},_renderPlotLines:function(t,e){var i=this.theme;r.isLineTypeChart(this.chartType)||this._renderVerticalLines(e,i.lineColor),this._renderHorizontalLines(e,i.lineColor)},_makeVerticalPositions:function(t){var e=this.axisDataMap,i=e.yAxis||e.rightYAxis,n=s.makeTickPixelPositions(t,i.validTickCount);return n.shift(),n},_makeDividedPlotPositions:function(t,e){var i,n,o,a,r=this.dimensionMap.yAxis.width;return e=parseInt(e/2,10)+1,t-=r,i=Math.round(t/2),n=t-i,o=s.makeTickPixelPositions(i,e),a=s.makeTickPixelPositions(n,e,i+r),o.pop(),a.shift(),o.concat(a)},_makeHorizontalPositions:function(t){var e,i=this.axisDataMap.xAxis.validTickCount;return this.options.divided?e=this._makeDividedPlotPositions(t,i):(e=s.makeTickPixelPositions(t,i),e.shift()),e},addPlotLine:function(t){this.options.lines.push(t),this.rerender()},addPlotBand:function(t){this.options.bands.push(t),this.rerender()},removePlotLine:function(t){this.options.lines=h.filter(this.options.lines,function(e){return e.id!==t}),this.rerender()},removePlotBand:function(t){this.options.bands=h.filter(this.options.bands,function(e){return e.id!==t}),this.rerender()},animateForAddingData:function(t){var e=this;this.dataProcessor.isCoordinateType()||t.shifting&&h.forEach(this.optionalLines,function(i){var n=i.getBBox();n.x-t.tickSize0&&a<180?"end":a>180&&a<360?"start":"middle",f.push({left:i.x,top:h-i.y,anchor:e});return f}function a(t){return new u(t)}var r=i(49),s=i(8),h=i(32),l=i(6),u=l.defineClass({className:"tui-chart-plot-area",init:function(t){this.options=l.extend({type:"spiderweb"},t.options),this.theme=t.theme||{},this.graphRenderer=h.get(s.COMPONENT_TYPE_RAPHAEL,"radialPlot"),this.drawingType=s.COMPONENT_TYPE_RAPHAEL},_renderPlotArea:function(t,e,i,n){var o={paper:t,layout:e,plotPositions:i,labelData:n,theme:this.theme,options:this.options};return this.graphRenderer.render(o)},_makePositions:function(t,e){var i=e.dimension.width-s.RADIAL_PLOT_PADDING-s.RADIAL_MARGIN_FOR_CATEGORY,o=e.dimension.height-s.RADIAL_PLOT_PADDING-s.RADIAL_MARGIN_FOR_CATEGORY,a=i/2+s.RADIAL_PLOT_PADDING/2+s.RADIAL_MARGIN_FOR_CATEGORY/2+e.position.left,r=o/2-s.RADIAL_PLOT_PADDING/2-s.RADIAL_MARGIN_FOR_CATEGORY/2-e.position.top,h=t.yAxis.tickCount,l=t.xAxis.labels.length;return n({width:i,height:o,centerX:a,centerY:r,angleStepCount:l,stepCount:h})},_makeCategoryPositions:function(t,e){var i=e.dimension.width-s.RADIAL_PLOT_PADDING-s.RADIAL_CATEGORY_PADDING,n=e.dimension.height-s.RADIAL_PLOT_PADDING-s.RADIAL_CATEGORY_PADDING,a=i/2+s.RADIAL_PLOT_PADDING/2+s.RADIAL_CATEGORY_PADDING/2+e.position.left,r=n/2-s.RADIAL_PLOT_PADDING/2-s.RADIAL_CATEGORY_PADDING/2-e.position.top,h=t.xAxis.labels.length; +return o({width:i,height:n,centerX:a,centerY:r,angleStepCount:h})},_makeLabelData:function(t,e,i){var n,o,a=t.xAxis.labels,r=t.yAxis.labels,s=this._makeCategoryPositions(t,e),h=[],l=[];for(n=0;n0?t[o][0]:"")+"~"+(t[o].length>1?t[o][1]:"")),n.push(i);return n}function r(t,e){for(var i,n=[],o=0;o",m.forEach(t,function(t,o){var a=0!==i||0===o?' class="number"':"",r="<"+n+a+">"+t+"";e+=r}),e+=""}),e+=""}function c(t){var e=''+u(t)+"";return window.btoa(unescape(encodeURIComponent(e)))}function d(t,e){var i="",n=e&&e.lineDelimiter||"\n",o=e&&e.itemDelimiter||",",a=t.length-1;return m.forEachArray(t,function(t,e){var r=t.length-1;m.forEachArray(t,function(t,e){var n=m.isNumber(t)?t:'"'+t+'"';i+=n,e0?(this.legendModel.updateCheckedLegendsWith(e),this._checkLegend()):this.legendModel.toggleCheckedIndex(t)},_labelClick:function(t){this._selectLegend(t)},_listenEvents:function(){this.eventBus.on("checkboxClicked",this._checkboxClick,this),this.eventBus.on("labelClicked",this._labelClick,this)}});l.CustomEvents.mixin(c),n.componentType="legend",n.Legend=c,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=Array.prototype.concat,a=n.forEachArray,r=n.defineClass({init:function(t){this.theme=t.theme,this.labels=t.labels,this.legendData=t.legendData,this.seriesTypes=t.seriesTypes||[],this.chartType=t.chartType,this.data=null,this.selectedIndex=null,this.checkedIndexesMap={},this.checkedWholeIndexes=[],this._setData(),this._initCheckedIndexes()},_initCheckedIndexes:function(){var t=this,e=[];a(this.legendData,function(i,n){i.visible&&e.push(n),t.checkedWholeIndexes[n]=i.visible}),this.updateCheckedLegendsWith(e)},_setThemeToLegendData:function(t,e,i){var o=0;a(t,function(t,a){var r={color:e.colors[a]};e.borderColor&&(r.borderColor=e.borderColor),t.theme=r,t.index=a,i&&n.isUndefined(i[a])?t.seriesIndex=-1:(t.seriesIndex=o,o+=1)})},_setData:function(){var t,e,i=this,a=this.theme,r=this.chartType,s=this.seriesTypes,h=this.legendData,l=this.checkedIndexesMap;!s||s.length<2?(this._setThemeToLegendData(h,a[r],l[r]),t=h):(e=0,t=o.apply([],n.map(s,function(t){var n,o,r=i.labels[t].length,s=e+r;return n=h.slice(e,s),o=l[t],e=s,i._setThemeToLegendData(n,a[t],o),n}))),this.data=t},getData:function(){return this.data},getDatum:function(t){return this.data[t]},getDatumByLabel:function(t){var e=null;return a(this.data,function(i){return i.label===t&&(e=i),!e}),e},getSelectedDatum:function(){return this.getDatum(this.selectedIndex)},updateSelectedIndex:function(t){this.selectedIndex=t},toggleSelectedIndex:function(t){var e;e=this.selectedIndex===t?null:t,this.updateSelectedIndex(e)},getSelectedIndex:function(){return this.selectedIndex},isUnselectedIndex:function(t){return!n.isNull(this.selectedIndex)&&this.selectedIndex!==t},isCheckedSelectedIndex:function(){return this.isCheckedIndex(this.selectedIndex)},toggleCheckedIndex:function(t){this.checkedWholeIndexes[t]=!this.checkedWholeIndexes[t]},_updateCheckedIndex:function(t){this.checkedWholeIndexes[t]=!0},isCheckedIndex:function(t){return!!this.checkedWholeIndexes[t]},_addSendingDatum:function(t){var e=this.getDatum(t);this.checkedIndexesMap[e.chartType]||(this.checkedIndexesMap[e.chartType]=[]),this.checkedIndexesMap[e.chartType][e.index]=!0},checkSelectedIndex:function(){this._updateCheckedIndex(this.selectedIndex),this._addSendingDatum(this.selectedIndex),this._setData()},getCheckedIndexes:function(){return this.checkedIndexesMap},_resetCheckedData:function(){this.checkedWholeIndexes=[],this.checkedIndexesMap={}},updateCheckedLegendsWith:function(t){var e=this;this._resetCheckedData(),a(t,function(t){e._updateCheckedIndex(t),e._addSendingDatum(t)}),this._setData()}});t.exports=r},function(t,e,i){"use strict";function n(t){var e=!!s.isUndefined(t.options.visible)||t.options.visible,i=t.chartOptions.chartType,n=null;return e&&(t.chartType=i,n=new h(t)),n}var o=i(8),a=i(11),r=i(32),s=i(6),h=s.defineClass({init:function(t){var e=t.libType;this.chartType=t.chartType,this.theme=t.theme,this.options=t.options||{},this.dataProcessor=t.dataProcessor,this.colorSpectrum=t.colorSpectrum,this.eventBus=t.eventBus,this.graphRenderer=r.get(e,"mapLegend"),this.isHorizontal=a.isHorizontalLegend(this.options.align),this.scaleData=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL,this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on({showWedge:this.onShowWedge,hideTooltip:this.onHideWedge},this),this.eventBus.on("beforeImageDownload",s.bind(this._removeLocationURLFromFillAttribute,this)),this.eventBus.on("afterImageDownload",s.bind(this._restoreLocationURLToFillAttribute,this))},_removeLocationURLFromFillAttribute:function(){this.graphRenderer.removeLocationURLFromFillAttribute()},_restoreLocationURLToFillAttribute:function(){this.graphRenderer.restoreLocationURLToFillAttribute()},_makeBaseDataToMakeTickArea:function(){var t=this.layout.dimension,e=this.scaleData,i=e.stepCount||e.tickCount-1,n={};return n.position=this.layout.position,this.isHorizontal?(n.step=t.width/i,n.position.top+=o.MAP_LEGEND_GRAPH_SIZE+o.MAP_LEGEND_LABEL_PADDING):(n.step=t.height/i,n.position.left+=o.MAP_LEGEND_GRAPH_SIZE+o.MAP_LEGEND_LABEL_PADDING),n},_renderTickArea:function(t){this.graphRenderer.renderTicksAndLabels(this.paper,this._makeBaseDataToMakeTickArea(),this.scaleData.labels,this.isHorizontal,t)},_makeVerticalGraphDimension:function(){return{width:o.MAP_LEGEND_GRAPH_SIZE,height:this.layout.dimension.height}},_makeHorizontalGraphDimension:function(){return{width:this.layout.dimension.width+10,height:o.MAP_LEGEND_GRAPH_SIZE}},_renderGraph:function(t){var e;e=this.isHorizontal?this._makeHorizontalGraphDimension():this._makeVerticalGraphDimension(),this.graphRenderer.render(this.paper,{dimension:e,position:this.layout.position},this.colorSpectrum,this.isHorizontal,t)},_renderLegendArea:function(){var t=this.paper.set();return this._renderGraph(t),this._renderTickArea(t),t},_setDataForRendering:function(t){this.layout=t.layout,this.paper=t.paper,this.scaleData=t.legendScaleData},render:function(t){this._setDataForRendering(t),this.legnedSet=this._renderLegendArea()},rerender:function(t){this.legnedSet.remove(),this.render(t)},resize:function(t){this.rerender(t)},onShowWedge:function(t){this.graphRenderer.showWedge(o.MAP_LEGEND_SIZE*t)},onHideWedge:function(){this.graphRenderer.hideWedge()}});n.componentType="legend",n.SpectrumLegend=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e,i=t.chartOptions.chartType,n=t.chartTheme,o=h.pick(t.chartOptions,"circleLegend","visible"),a=null;return e=!!h.isUndefined(o)||o,e&&(t.chartType=i,t.baseFontFamily=n.chart.fontFamily,a=new l(t)),a}var o=i(8),a=i(45),r=i(7),s=i(32),h=i(6),l=h.defineClass({circleRatios:[1,.5,.25],init:function(t){var e=t.libType;this.chartType=t.chartType,this.dataProcessor=t.dataProcessor,this.labelTheme={fontSize:o.CIRCLE_LEGEND_LABEL_FONT_SIZE,fontFamily:t.baseFontFamily},this.graphRenderer=s.get(e,"circleLegend"),this.layout=null,this.maxRadius=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL},_formatLabel:function(t,e){var i,n=this.dataProcessor.getFormatFunctions();return i=0===e?String(parseInt(t,10)):r.formatToDecimal(String(t),e),r.formatValue({value:i,formatFunctions:n,chartType:this.chartType,areaType:"circleLegend",valueType:"r"})},_makeLabels:function(){var t=this,e=this.dataProcessor.getMaxValue(this.chartType,"r"),i=a.getDecimalLength(e);return h.map(this.circleRatios,function(n){return t._formatLabel(e*n,i)})},_render:function(t){return this.graphRenderer.render(t,this.layout,this.maxRadius,this.circleRatios,this._makeLabels())},_setDataForRendering:function(t){this.layout=t.layout,this.maxRadius=t.maxRadius},render:function(t){this._setDataForRendering(t),this.circleLegendSet=this._render(t.paper)},rerender:function(t){this.circleLegendSet.remove(),this._setDataForRendering(t),this.circleLegendSet=this._render(t.paper)},resize:function(t){this.rerender(t)}});n.componentType="legend",n.CircleLegend=l,t.exports=n},function(t,e,i){"use strict";function n(t,e,i){var n,o=(100*t.ratio).toFixed(4),a=parseFloat(o),r=a<9e-4||o.length>5;return o=r?o.substr(0,4):String(a),n=o+" % "||"",e.ratioLabel=i+n,e.label=t.tooltipLabel||(t.label?t.label:""),e}function o(t){var e,i=t.chartOptions.chartType,o=t.seriesTypes,u=t.chartOptions.xAxis,c=[];return l.forEach(l.filter(t.chartTheme.legend,function(t){return l.isArray(t.colors)}),function(t){c=c.concat(t.colors)}),e="map"===i?s:t.options.grouped?r:a,("pie"===i||h.isPieDonutComboChart(i,o))&&(t.labelFormatter=n),t.chartType=i,t.chartTypes=o,t.xAxisType=u.type,t.dateFormat=u.dateFormat,t.colors=c,e(t)}var a=i(61),r=i(66),s=i(68),h=i(11),l=i(6);o.componentType="tooltip",t.exports=o},function(t,e,i){"use strict";function n(t){return new u(t)}var o=i(62),a=i(63),r=i(8),s=i(11),h=i(64),l=i(6),u=l.defineClass(o,{init:function(){o.apply(this,arguments)},_makeTooltipHtml:function(t,e){var i=this._getTooltipTemplate(e);return i(l.extend({categoryVisible:t?"show":"hide",category:t},e))},_getTooltipTemplate:function(t){var e=h.tplDefault;return s.isBoxplotChart(this.chartType)?e=this._getBoxplotTooltipTemplate(t):s.isPieChart(this.chartType)||s.isPieDonutComboChart(this.chartType,this.chartTypes)?e=h.tplPieChart:this.dataProcessor.coordinateType?e=h.tplCoordinatetypeChart:s.isBulletChart(this.chartType)&&(e=h.tplBulletChartDefault),e},_getBoxplotTooltipTemplate:function(t){var e=h.tplBoxplotChartDefault;return l.isNumber(t.outlierIndex)&&(e=h.tplBoxplotChartOutlier,t.label=t.outliers[t.outlierIndex].label),e},_makeHtmlForValueTypes:function(t,e){return l.map(e,function(e){return t[e]?"
"+e+": "+t[e]+"
":""}).join("")},_makeSingleTooltipHtml:function(t,e){var i=e.groupIndex,n=l.extend({},l.pick(this.data,t,e.groupIndex,e.index));return s.isBoxplotChart(this.chartType)&&l.isNumber(e.outlierIndex)&&(n.outlierIndex=e.outlierIndex),n=l.extend({suffix:this.suffix},n),n.valueTypes=this._makeHtmlForValueTypes(n,["x","y","r"]),this.templateFunc(n.category,n,this.getRawCategory(i))},_setDefaultTooltipPositionOption:function(){this.options.align||(this.isVertical?this.options.align=r.TOOLTIP_DEFAULT_ALIGN_OPTION:this.options.align=r.TOOLTIP_DEFAULT_HORIZONTAL_ALIGN_OPTION)},_makeShowTooltipParams:function(t,e){var i,n,o=t.index,a=this.dataProcessor.getLegendItem(o);return a?(i=a.chartType,n=l.extend({chartType:i,legend:a.label,legendIndex:o,index:t.groupIndex},e),s.isBoxplotChart(i)&&l.isNumber(t.outlierIndex)&&(n.outlierIndex=t.outlierIndex),n):null},_makeTooltipDatum:function(t,e,i){var n=t&&i.label?": ":"",o=i.tooltipLabel,a=this.labelFormatter,r={legend:t||"",label:o||(i.label?n+i.label:""),category:e||""};return a&&(r=a(i,r,n)),r.category=e||"",l.extend(r,i.pickValueMapForTooltip())},makeTooltipData:function(){var t=this,e=this.dataProcessor.getLegendLabels(),i=s.isTreemapChart(this.chartType),n={},o={};return l.isArray(e)?n[this.chartType]=e:n=e,this.dataProcessor.eachBySeriesGroup(function(e,i,a){var r,h;a=a||t.chartType,h=s.isBulletChart(a),r=e.map(function(e,o){var r=t.dataProcessor.makeTooltipCategory(i,o,t.isVertical),s=h?i:o;return e?t._makeTooltipDatum(n[a][s],r,e):null}),o[a]||(o[a]=[]),o[a].push(r)},i),o}});a.mixin(u),n.componentType="tooltip",n.NormalTooltip=u,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(9),r=i(11),s=i(7),h=n.defineClass({init:function(t){var e=r.isPieChart(t.chartType);this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.dataProcessor=t.dataProcessor,this.options=t.options,this.colors=t.colors,this.theme=t.theme,this.isVertical=t.isVertical,this.eventBus=t.eventBus,this.labelTheme=t.labelTheme,this.xAxisType=t.xAxisType,this.dateFormat=t.dateFormat,this.labelFormatter=t.labelFormatter,this.className="tui-chart-tooltip-area",this.tooltipContainer=null,this.suffix=this.options.suffix?" "+this.options.suffix:"",this.templateFunc=this.options.template||n.bind(this._makeTooltipHtml,this),this.animationTime=e?o.TOOLTIP_PIE_ANIMATION_TIME:o.TOOLTIP_ANIMATION_TIME,this.data=[],this.layout=null,this.dimensionMap=null,this.positionMap=null,this.drawingType=o.COMPONENT_TYPE_DOM,this._setDefaultTooltipPositionOption(),this._saveOriginalPositionOptions(),this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on({showTooltip:this.onShowTooltip,hideTooltip:this.onHideTooltip},this),this.onShowTooltipContainer&&this.eventBus.on({showTooltipContainer:this.onShowTooltipContainer,hideTooltipContainer:this.onHideTooltipContainer},this)},_makeTooltipHtml:function(){},_setDefaultTooltipPositionOption:function(){},_saveOriginalPositionOptions:function(){this.orgPositionOptions={align:this.options.align,offset:this.options.offset}},makeTooltipData:function(){},_setDataForRendering:function(t){this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.positionMap=t.positionMap},render:function(t){var e=t.paper;return a.addClass(e,this.className),this._setDataForRendering(t),this.data=this.makeTooltipData(),s.renderPosition(e,this.layout.position),this.tooltipContainer=e,e},rerender:function(t){this.resize(t),this.data=this.makeTooltipData()},resize:function(t){this._setDataForRendering(t),s.renderPosition(this.tooltipContainer,this.layout.position),this.positionModel&&this.positionModel.updateBound(this.layout)},zoom:function(){this.data=this.makeTooltipData()},_getTooltipElement:function(){var t;return this.tooltipElement||(this.tooltipElement=t=a.create("DIV","tui-chart-tooltip"),a.append(this.tooltipContainer,t)),this.tooltipElement},onShowTooltip:function(t){var e,i=this._getTooltipElement(),n=r.isComboChart(this.chartType)&&r.isScatterChart(t.chartType);r.isChartToDetectMouseEventOnSeries(t.chartType)&&!n||!i.offsetWidth||(e={left:i.offsetLeft,top:i.offsetTop}),this._showTooltip(i,t,e)},getTooltipDimension:function(t){return{width:t.offsetWidth,height:t.offsetHeight}},_moveToPosition:function(t,e,i){i?this._slideTooltip(t,i,e):s.renderPosition(t,e)},_slideTooltip:function(t,e,i){var n=i.top-e.top,o=i.left-e.left;s.cancelAnimation(this.slidingAnimation),this.slidingAnimation=s.startAnimation(this.animationTime,function(i){var a=o*i,r=n*i;t.style.left=e.left+a+"px",t.style.top=e.top+r+"px"})},onHideTooltip:function(t,e){var i=this._getTooltipElement();this._hideTooltip(i,t,e)},setAlign:function(t){this.options.align=t,this.positionModel&&this.positionModel.updateOptions(this.options)},_updateOffsetOption:function(t){this.options.offset=t,this.positionModel&&this.positionModel.updateOptions(this.options)},setOffset:function(t){var e=n.extend({},this.options.offset);n.isExisty(t.x)&&(e.x=t.x),n.isExisty(t.y)&&(e.y=t.y),this._updateOffsetOption(n.extend({},this.options.offset,e))},setPosition:function(t){var e=n.extend({},this.options.offset);n.isExisty(t.left)&&(e.x=t.left),n.isExisty(t.top)&&(e.y=t.y),this._updateOffsetOption(e)},resetAlign:function(){var t=this.orgPositionOptions.align;this.options.align=t,this.positionModel&&this.positionModel.updateOptions(this.options)},resetOffset:function(){this.options.offset=this.orgPositionOptions.offset,this._updateOffsetOption(this.options.offset)},getRawCategory:function(t,e){var i=this.isVertical?"x":"y",n=this.dataProcessor.categoriesMap?this.dataProcessor.categoriesMap[i]:null,o="";return n&&(o=n[t]),e&&(o=s.formatDate(o,e)),o}});t.exports=h},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(11),r=i(9),s=i(7),h={_setIndexesCustomAttribute:function(t,e){t.setAttribute("data-groupIndex",e.groupIndex),t.setAttribute("data-index",e.index)},_getIndexesCustomAttribute:function(t){var e=t.getAttribute("data-groupIndex"),i=t.getAttribute("data-index"),o=null;return n.isNull(e)||n.isNull(i)||(o={groupIndex:parseInt(e,10),index:parseInt(i,10)}),o},_setShowedCustomAttribute:function(t,e){t.setAttribute("data-showed",e)},_isShowedTooltip:function(t){var e=t.getAttribute("data-showed");return"true"===e||e===!0},_makeTooltipPositionForBulletChart:function(t){var e=t.mousePosition,i=this.layout.position;return{left:e.left-i.left,top:e.top-i.top}},_makeLeftPositionOfNotBarChart:function(t,e,i,n){var a=t,r=i||0,s=n||o.TOOLTIP_GAP;return e.indexOf("left")>-1?a-=r+s:e.indexOf("center")>-1&&r?a-=r/2:a+=s,a},_makeTopPositionOfNotBarChart:function(t,e,i,n){var a=t,r=i||0;return e.indexOf("bottom")>-1?a+=r+n:e.indexOf("middle")>-1&&r?a+=r/2:a-=r+o.TOOLTIP_GAP,a},_makeTooltipPositionForNotBarChart:function(t){var e=t.bound,i=t.positionOption,n=t.dimension.width-(e.width||0),a=e.width?0:o.TOOLTIP_GAP,r=t.alignOption||"",s=t.dimension.height,h=e.left-this.layout.position.left+i.left,l=e.top-this.layout.position.top+i.top-o.TOOLTIP_GAP;return{left:this._makeLeftPositionOfNotBarChart(h,r,n,a),top:this._makeTopPositionOfNotBarChart(l,r,s,a)}},_makeTooltipPositionToMousePosition:function(t){return t.bound||(t.bound=t.bound||{},n.extend(t.bound,t.mousePosition)),this._makeTooltipPositionForNotBarChart(t)},_makeLeftPositionForBarChart:function(t,e,i){var n=t;return e.indexOf("left")>-1?n-=i:e.indexOf("center")>-1?n-=i/2:n+=o.TOOLTIP_GAP,n},_makeTopPositionForBarChart:function(t,e,i){var n=t;return e.indexOf("top")>-1?n-=i:e.indexOf("middle")>-1&&(n-=i/2),n},_makeTooltipPositionForBarChart:function(t){var e=this.layout.position,i=t.bound,n=t.positionOption,o=t.dimension.height-(i.height||0),a=t.alignOption||"",r=t.dimension.width,s=i.left+i.width+n.left-e.left,h=i.top+n.top-e.top;return{left:this._makeLeftPositionForBarChart(s,a,r),top:this._makeTopPositionForBarChart(h,a,o) +}},_makeTooltipPositionForTreemapChart:function(t){var e=this.layout.position,i=t.bound,n=t.positionOption,a=s.getRenderedLabelHeight(o.MAX_HEIGHT_WORD,this.labelTheme);return{left:i.left+(i.width-t.dimension.width)/2+n.left-e.left,top:i.top+i.height/2-a+n.top-e.top}},_adjustPosition:function(t,e){var i=this.dimensionMap.chart,n=this.layout.position;return e.left=Math.max(e.left,-n.left),e.left=Math.min(e.left,i.width-n.left-t.width),e.top=Math.max(e.top,-n.top),e.top=Math.min(e.top,i.height-n.top-t.height),e},_makeTooltipPosition:function(t){var e,i,n,o={};return t.mousePosition?o=this._makeTooltipPositionToMousePosition(t):(a.isBarChart(t.chartType)?(o=this._makeTooltipPositionForBarChart(t),e="width",i="left",n=1):a.isTreemapChart(t.chartType)?o=this._makeTooltipPositionForTreemapChart(t):(o=this._makeTooltipPositionForNotBarChart(t),e="height",i="top",n=-1),t.allowNegativeTooltip&&(o=this._moveToSymmetry(o,{bound:t.bound,indexes:t.indexes,dimension:t.dimension,chartType:t.chartType,sizeType:e,positionType:i,addPadding:n})),o=this._adjustPosition(t.dimension,o)),o},_moveToSymmetry:function(t,e){var i,n,o,r=e.bound,s=e.sizeType,h=e.positionType,l=e.seriesType||e.chartType,u=this.dataProcessor.getValue(e.indexes.groupIndex,e.indexes.index,l),c=a.isBarChart(this.chartType)?-1:1;return u<0&&(i=e.dimension[s],n=r[s],o=t[h]+(n+i)*c,t[h]=o),t},_isChangedIndexes:function(t,e){return!!t&&(t.groupIndex!==e.groupIndex||t.index!==e.index)},_showTooltip:function(t,e,i){var a,s=this.tooltipContainer.parentNode.getBoundingClientRect(),h=e.indexes,l=this._getIndexesCustomAttribute(t),u=this.options.offset||{},c={},d=t&&t.getAttribute("data-chart-type");!e.bound&&e.mousePosition&&(e.bound={left:e.mousePosition.left-s.left+o.CHART_PADDING,top:e.mousePosition.top-s.top+o.CHART_PADDING}),(this._isChangedIndexes(l,h)||d!==e.chartType)&&this.eventBus.fire("hoverOffSeries",l,d),t.innerHTML=this._makeSingleTooltipHtml(e.seriesType||e.chartType,h),t.setAttribute("data-chart-type",e.chartType),this._setIndexesCustomAttribute(t,h),this._setShowedCustomAttribute(t,!0),this._fireBeforeShowTooltipPublicEvent(h,e.silent),r.addClass(t,"show"),c.left=u.x||0,c.top=u.y||0,a=this._makeTooltipPosition(n.extend({dimension:this.getTooltipDimension(t),positionOption:c,alignOption:this.options.align||""},e)),this._moveToPosition(t,a,i),this.eventBus.fire("hoverSeries",h,e.chartType),this._fireAfterShowTooltipPublicEvent(h,{element:t,position:a},e.silent),delete e.silent},_fireBeforeShowTooltipPublicEvent:function(t,e){var i;e||(i=this._makeShowTooltipParams(t),this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"beforeShowTooltip",i))},_fireAfterShowTooltipPublicEvent:function(t,e,i){var n;i||(n=this._makeShowTooltipParams(t,e),this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"afterShowTooltip",n))},_executeHidingTooltip:function(t){r.removeClass(t,"show"),t.removeAttribute("data-groupIndex"),t.removeAttribute("data-index"),t.style.cssText=""},_hideTooltip:function(t,e,i){var n=this,r=this._getIndexesCustomAttribute(t),s=t.getAttribute("data-chart-type"),h=!(!i||!i.silent);a.isChartToDetectMouseEventOnSeries(s)?(this.eventBus.fire("hoverOffSeries",r,s),this._fireBeforeHideTooltipPublicEvent(r,h),this._executeHidingTooltip(t)):s&&(this._setShowedCustomAttribute(t,!1),this.eventBus.fire("hoverOffSeries",r,s),this._isChangedIndexes(this.prevIndexes,r)&&delete this.prevIndexes,setTimeout(function(){n._isShowedTooltip(t)||(n._fireBeforeHideTooltipPublicEvent(r,h),n._executeHidingTooltip(t))},o.HIDE_DELAY))},_fireBeforeHideTooltipPublicEvent:function(t,e){var i;e||this.eventBus.fire(o.PUBLIC_EVENT_PREFIX+"beforeHideTooltip",i)},onShowTooltipContainer:function(){this.tooltipContainer.style.zIndex=o.TOOLTIP_ZINDEX},onHideTooltipContainer:function(){this.tooltipContainer.style.zIndex=0},mixin:function(t){n.extend(t.prototype,this)}};t.exports=h},function(t,e,i){"use strict";var n=i(65),o={HTML_DEFAULT_TEMPLATE:'
{{ category }}
{{ legend }}{{ label }}{{ suffix }}
',HTML_PIE_TEMPLATE:'
{{ category }}
{{ legend }}{{ ratioLabel }}( {{ label }} {{ suffix }})
',HTML_COORDINATE_TYPE_CHART_TEMPLATE:'
{{ category }}
{{ legend }}{{ label }}
{{ valueTypes }}
',HTML_GROUP:'
{{ category }}
{{ items }}
',HTML_GROUP_TYPE:'
{{ type }}
',HTML_GROUP_ITEM:'
 {{ legend }}{{ value }}{{ suffix }}
',GROUP_CSS_TEXT:"background-color:{{ color }}",HTML_MAP_CHART_DEFAULT_TEMPLATE:'
{{ name }}: {{ value }}{{ suffix }}
',HTML_BOXPLOT_TEMPLATE:'
{{ category }}
{{ legend }}
Maximum: {{ maxLabel }}{{ suffix }}
Upper Quartile: {{ uqLabel }}{{ suffix }}
Median: {{ medianLabel }}{{ suffix }}
Lower Quartile: {{ lqLabel }}{{ suffix }}
Minimum: {{ minLabel }}{{ suffix }}
',HTML_BOXPLOT_OUTLIER:'
{{ category }}
{{ legend }}
Outlier: {{ label }}{{ suffix }}
',HTML_BULLET_TEMPLATE:'
{{ category }}{{ label }}{{ suffix }}
'};t.exports={tplDefault:n.template(o.HTML_DEFAULT_TEMPLATE),tplPieChart:n.template(o.HTML_PIE_TEMPLATE),tplCoordinatetypeChart:n.template(o.HTML_COORDINATE_TYPE_CHART_TEMPLATE),tplGroup:n.template(o.HTML_GROUP),tplGroupType:n.template(o.HTML_GROUP_TYPE),tplGroupItem:n.template(o.HTML_GROUP_ITEM),tplGroupCssText:n.template(o.GROUP_CSS_TEXT),tplMapChartDefault:n.template(o.HTML_MAP_CHART_DEFAULT_TEMPLATE),tplBoxplotChartDefault:n.template(o.HTML_BOXPLOT_TEMPLATE),tplBoxplotChartOutlier:n.template(o.HTML_BOXPLOT_OUTLIER),tplBulletChartDefault:n.template(o.HTML_BULLET_TEMPLATE)}},function(t,e,i){"use strict";var n=i(6);t.exports={template:function(t){return function(e){var i=t;return n.forEach(e,function(t,e){var n=new RegExp("{{\\s*"+e+"\\s*}}","g");i=i.replace(n,String(t).replace("$","$"))}),i}}}},function(t,e,i){"use strict";function n(t){return new p(t)}var o=i(62),a=i(67),r=i(8),s=i(9),h=i(7),l=i(34),u=i(64),c=i(6),d=i(11),p=c.defineClass(o,{init:function(t){this.prevIndex=null,this.isBullet=d.isBulletChart(t.chartType),o.call(this,t)},_makeTooltipHtml:function(t,e,i,n){var o,a,r=u.tplGroupItem,s=u.tplGroupCssText,h=this._makeColors(this.theme,n);return a=c.map(e,function(t,e){var i=t.type,n="data"!==i&&o!==i,a="";return o=i,t.value?(n&&(a=u.tplGroupType({type:i})),a+=r(c.extend({cssText:s({color:h[e]})},t))):null}).join(""),u.tplGroup({category:t,items:a})},_setDefaultTooltipPositionOption:function(){this.options.align||(this.isVertical?this.options.align=r.TOOLTIP_DEFAULT_GROUP_ALIGN_OPTION:this.options.align=r.TOOLTIP_DEFAULT_GROUP_HORIZONTAL_ALIGN_OPTION)},render:function(t){var e=o.prototype.render.call(this,t),i=this.dimensionMap.chart,n=this.layout;return t.checkedLegends&&(this.theme={colors:this.colors}),this.positionModel=new a(i,n,this.isVertical,this.options),e},rerender:function(t){o.prototype.rerender.call(this,t),this.prevIndex=null,t.checkedLegends&&(this.theme=this._updateLegendTheme(t.checkedLegends))},zoom:function(){this.prevIndex=null,o.prototype.zoom.call(this)},_updateLegendTheme:function(t){var e=[];return c.forEachArray(this.dataProcessor.getOriginalLegendData(),function(i){var n=t[i.chartType]||t;n[i.index]&&e.push(i.theme.color)}),{colors:e}},makeTooltipData:function(){var t=this.dataProcessor.getCategoryCount(this.isVertical);return c.map(this.dataProcessor.getSeriesGroups(),function(e,i){var n=e.map(function(t){return{type:t.type||"data",label:t.label}});return{category:this.dataProcessor.makeTooltipCategory(i,t-i,this.isVertical),values:n}},this)},_makeColors:function(t,e){var i,n,o,a=0,r=this.dataProcessor.getLegendData();return this.isBullet?this.dataProcessor.getGraphColors()[e]:t.colors?t.colors:(i=l.series.colors.slice(0,r.length),c.map(c.pluck(r,"chartType"),function(e){var r;return o!==e&&(n=t[e]?t[e].colors:i,a=0),o=e,r=n[a],a+=1,r}))},_makeItemRenderingData:function(t,e){var i=this.dataProcessor,n=this.suffix;return c.map(t,function(t,o){var a,r={value:t.label,type:t.type,suffix:n,legend:""};return this.isBullet?a=i.getLegendItem(e):(a=i.getLegendItem(o),r.legend=a.label),r.chartType=a.chartType,r},this)},_makeGroupTooltipHtml:function(t){var e,i=this.data[t],n="";return i&&(e=this._makeItemRenderingData(i.values,t),n=this.templateFunc(i.category,e,this.getRawCategory(t),t)),n},_getTooltipSectorElement:function(){var t;return this.groupTooltipSector||(this.groupTooltipSector=t=s.create("DIV","tui-chart-group-tooltip-sector"),s.append(this.tooltipContainer,t)),this.groupTooltipSector},_makeVerticalTooltipSectorBound:function(t,e,i){var n;return n=i?1:e.end-e.start,{dimension:{width:n,height:t},position:{left:e.start,top:r.SERIES_EXPAND_SIZE}}},_makeHorizontalTooltipSectorBound:function(t,e){return{dimension:{width:t,height:e.end-e.start},position:{left:r.SERIES_EXPAND_SIZE,top:e.start}}},_makeTooltipSectorBound:function(t,e,i,n){var o;return o=i?this._makeVerticalTooltipSectorBound(t,e,n):this._makeHorizontalTooltipSectorBound(t,e)},_showTooltipSector:function(t,e,i,n,o){var a=this._getTooltipSectorElement(),r=e.start===e.end,l=this._makeTooltipSectorBound(t,e,i,r);r?this.eventBus.fire("showGroupTooltipLine",l):(h.renderDimension(a,l.dimension),h.renderPosition(a,l.position),s.addClass(a,"show")),o&&(n-=1),this.eventBus.fire("showGroupAnimation",n)},_hideTooltipSector:function(t){var e=this._getTooltipSectorElement();s.hasClass(e,"show")?s.removeClass(e,"show"):this.eventBus.fire("hideGroupTooltipLine"),this.eventBus.fire("hideGroupAnimation",t),this.eventBus.fire("hideGroupTooltipLine")},_showTooltip:function(t,e,i){var n,o;c.isNull(this.prevIndex)||this.eventBus.fire("hideGroupAnimation",this.prevIndex),t.innerHTML=this._makeGroupTooltipHtml(e.index),this._fireBeforeShowTooltipPublicEvent(e.index,e.range,e.silent),s.addClass(t,"show"),this._showTooltipSector(e.size,e.range,e.isVertical,e.index,e.isMoving),n=this.getTooltipDimension(t),o=this.positionModel.calculatePosition(n,e.range),this._moveToPosition(t,o,i),this._fireAfterShowTooltipPublicEvent(e.index,e.range,{element:t,position:o},e.silent),this.prevIndex=e.index},_fireBeforeShowTooltipPublicEvent:function(t,e,i){i||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"beforeShowTooltip",{chartType:this.chartType,index:t,range:e})},_fireAfterShowTooltipPublicEvent:function(t,e,i,n){n||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"afterShowTooltip",c.extend({chartType:this.chartType,index:t,range:e},i))},_hideTooltip:function(t,e,i){var n=!(!i||!i.silent);this.prevIndex=null,this._fireBeforeHideTooltipPublicEvent(e,n),this._hideTooltipSector(e),s.removeClass(t,"show"),t.style.cssText=""},_fireBeforeHideTooltipPublicEvent:function(t,e){e||this.eventBus.fire(r.PUBLIC_EVENT_PREFIX+"beforeHideTooltip",{chartType:this.chartType,index:t})}});n.componentType="tooltip",n.GroupTooltip=p,t.exports=n},function(t,e,i){"use strict";var n=i(8),o=i(6),a=o.defineClass({init:function(t,e,i,n){this.chartDimension=t,this.areaBound=e,this.isVertical=i,this.options=n,this.positions={},this._setData(t,e,i,n)},_getHorizontalDirection:function(t){var e;return t=t||"",e=t.indexOf("left")>-1?n.TOOLTIP_DIRECTION_BACKWARD:t.indexOf("center")>-1?n.TOOLTIP_DIRECTION_CENTER:n.TOOLTIP_DIRECTION_FORWARD},_makeVerticalData:function(t,e,i){var o=this._getHorizontalDirection(i);return{positionType:"left",sizeType:"width",direction:o,areaPosition:e.position.left,areaSize:e.dimension.width,chartSize:t.width,basePosition:n.SERIES_EXPAND_SIZE}},_getVerticalDirection:function(t){var e;return t=t||"",e=t.indexOf("top")>-1?n.TOOLTIP_DIRECTION_BACKWARD:t.indexOf("bottom")>-1?n.TOOLTIP_DIRECTION_FORWARD:n.TOOLTIP_DIRECTION_CENTER},_makeHorizontalData:function(t,e,i){var o=this._getVerticalDirection(i);return{positionType:"top",sizeType:"height",direction:o,areaPosition:e.position.top,areaSize:e.dimension.height,chartSize:t.height,basePosition:n.SERIES_EXPAND_SIZE}},_setData:function(t,e,i,n){var o=this._makeVerticalData(t,e,n.align),a=this._makeHorizontalData(t,e,n.align),r=n.offset||{};i?(this.mainData=o,this.subData=a):(this.mainData=a,this.subData=o),this.positionOption={},this.positionOption.left=r.x||0,this.positionOption.top=r.y||0,this.positions={}},_calculateMainPositionValue:function(t,e,i){var o=e.start===e.end,a=9,r=5,s=o?a:r,h=i.basePosition;return h+=i.direction===n.TOOLTIP_DIRECTION_FORWARD?e.end+s:i.direction===n.TOOLTIP_DIRECTION_BACKWARD?e.start-t-s:o?e.start-t/2:e.start+(e.end-e.start-t)/2},_calculateSubPositionValue:function(t,e){var i,o=e.areaSize/2;return i=e.direction===n.TOOLTIP_DIRECTION_FORWARD?o+e.basePosition:e.direction===n.TOOLTIP_DIRECTION_BACKWARD?o-t+e.basePosition:o-t/2+e.basePosition},_makePositionValueDiff:function(t,e,i){return t+i.areaPosition+e-i.chartSize},_adjustBackwardPositionValue:function(t,e,i,o){var a;return t<-o.areaPosition&&(a=this._calculateMainPositionValue(i,e,{direction:n.TOOLTIP_DIRECTION_FORWARD,basePosition:o.basePosition}),t=this._makePositionValueDiff(a,i,o)>0?-o.areaPosition:a),t},_adjustForwardPositionValue:function(t,e,i,o){var a,r=this._makePositionValueDiff(t,i,o);return r>0&&(a=this._calculateMainPositionValue(i,e,{direction:n.TOOLTIP_DIRECTION_BACKWARD,basePosition:o.basePosition}),a<-o.areaPosition?t-=r:t=a),t},_adjustMainPositionValue:function(t,e,i,o){return o.direction===n.TOOLTIP_DIRECTION_BACKWARD?t=this._adjustBackwardPositionValue(t,e,i,o):o.direction===n.TOOLTIP_DIRECTION_FORWARD?t=this._adjustForwardPositionValue(t,e,i,o):(t=Math.max(t,-o.areaPosition),t=Math.min(t,o.chartSize-o.areaPosition-i)),t},_adjustSubPositionValue:function(t,e,i){return t=i.direction===n.TOOLTIP_DIRECTION_FORWARD?Math.min(t,i.chartSize-i.areaPosition-e):Math.max(t,-i.areaPosition)},_makeCachingKey:function(t){return t.start+"-"+t.end},_addPositionOptionValue:function(t,e){return t+this.positionOption[e]},_makeMainPositionValue:function(t,e,i){var n;return n=this._calculateMainPositionValue(t[i.sizeType],e,i),n=this._addPositionOptionValue(n,i.positionType),n=this._adjustMainPositionValue(n,e,t[i.sizeType],i)},_makeSubPositionValue:function(t,e){var i;return i=this._calculateSubPositionValue(t[e.sizeType],e),i=this._addPositionOptionValue(i,e.positionType),i=this._adjustSubPositionValue(i,t[e.sizeType],e)},calculatePosition:function(t,e){var i=this._makeCachingKey(e),n=this.mainData,o=this.subData,a=this.positions[i];return a||(a={},a[n.positionType]=this._makeMainPositionValue(t,e,n),a[o.positionType]=this._makeSubPositionValue(t,o),this.positions[i]=a),a},updateOptions:function(t){this.options=t,this._setData(this.chartDimension,this.areaBound,this.isVertical,t)},updateBound:function(t){this.areaBound=t,this._setData(this.chartDimension,t,this.isVertical,this.options)}});t.exports=a},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(8),a=i(62),r=i(63),s=i(64),h=i(6),l=h.defineClass(a,{init:function(t){this.mapModel=t.mapModel,a.apply(this,arguments)},_makeTooltipHtml:function(t){return s.tplMapChartDefault(t)},_makeSingleTooltipHtml:function(t,e){var i=this.mapModel.getDatum(e.index),n=this.options.suffix?" "+this.options.suffix:"";return this.templateFunc({name:i.name||i.code,value:i.label,suffix:n})},_makeShowTooltipParams:function(t,e){var i,n=this.mapModel.getDatum(t.index);return i=h.extend({chartType:this.chartType,code:n.code,name:n.name,value:n.label,index:t.index},e)},_setDefaultTooltipPositionOption:function(){this.options.align||(this.options.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION)}});r.mixin(l),n.componentType="tooltip",t.exports=n},function(t,e,i){"use strict";function n(t){return new u(t)}var o=i(70),a=i(8),r=i(55),s=i(9),h=i(7),l=i(6),u=l.defineClass(o,{init:function(t){this.chartType=t.chartType,this.eventBus=t.eventBus,this.isDown=!1,this.drawingType=a.COMPONENT_TYPE_DOM},_renderMouseEventDetectorArea:function(t){h.renderDimension(t,this.layout.dimension),h.renderPosition(t,this.layout.position)},_onClick:function(){},_onMousedown:function(t){this.isDown=!0,this.eventBus.fire("dragStartMapSeries",{left:t.clientX,top:t.clientY})},_dragEnd:function(){this.isDrag=!1,s.removeClass(this.mouseEventDetectorContainer,"drag"),this.eventBus.fire("dragEndMapSeries")},_onMouseup:function(t){this.isDown=!1,this.isDrag?this._dragEnd():this._onMouseEvent("click",t),this.isMove=!1},_onMousemove:function(t){this.isDown?(this.isDrag||s.addClass(this.mouseEventDetectorContainer,"drag"),this.isDrag=!0,this.eventBus.fire("dragMapSeries",{left:t.clientX,top:t.clientY})):(this.isMove=!0,this._onMouseEvent("move",t))},_onMouseout:function(t){this.isDrag?this._dragEnd():this._onMouseEvent("move",t),this.isDown=!1},_onMousewheel:function(t){var e=t.wheelDelta||t.detail*a.FF_WHEELDELTA_ADJUSTING_VALUE;return this.eventBus.fire("wheel",e,{left:t.clientX,top:t.clientY}),t.preventDefault&&t.preventDefault(),!1},attachEvent:function(t){o.prototype.attachEvent.call(this,t),l.browser.firefox?r.on(t,"DOMMouseScroll",this._onMousewheel,this):r.on(t,"mousewheel",this._onMousewheel,this)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";var n=i(71),o=i(72),a=i(8),r=i(55),s=i(11),h=i(9),l=i(7),u=i(6),c=u.defineClass({init:function(t){var e;this.chartType=t.chartType,this.chartTypes=t.chartTypes,this.isVertical=t.isVertical,this.dataProcessor=t.dataProcessor,this.allowSelect=t.allowSelect,this.eventBus=t.eventBus,this.layout=null,this.selectedData=null,e=s.isLineTypeChart(this.chartType,this.chartTypes),this.expandSize=e?a.SERIES_EXPAND_SIZE:0,this.seriesItemBoundsData=[],this.seriesCount=s.isComboChart(this.chartType)?2:1,this._attachToEventBus(),this.drawingType=a.COMPONENT_TYPE_DOM},_attachToEventBus:function(){this.eventBus.on("receiveSeriesData",this.onReceiveSeriesData,this)},_getRenderingBound:function(){var t=l.expandBound(this.layout);return t},_renderMouseEventDetectorArea:function(t,e){var i,o,a=this.layout.dimension;this.dimension=a,o=new n(this.layout,e,this.chartType,this.isVertical,this.chartTypes),this.tickBaseCoordinateModel=o,i=this._getRenderingBound(),l.renderDimension(t,i.dimension),l.renderPosition(t,i.position)},_setDataForRendering:function(t){this.layout=t.layout},_pickTickCount:function(t){var e;return e=this.isVertical?t.xAxis.eventTickCount||t.xAxis.tickCount:t.yAxis.tickCount},render:function(t){var e,i=t.paper;return this.positionMap=t.positionMap,h.addClass(i,"tui-chart-series-custom-event-area"),t.axisDataMap.xAxis&&(e=this._pickTickCount(t.axisDataMap)),this._setDataForRendering(t),this._renderMouseEventDetectorArea(i,e),this.attachEvent(i),this.mouseEventDetectorContainer=i,this.transparentChild=this._createTransparentChild(),h.append(i,this.transparentChild),i},_createTransparentChild:function(){var t=document.createElement("DIV"),e=t.style;return e.backgroundColor="#fff",e.height=l.getStyle(this.mouseEventDetectorContainer).height,l.setOpacity(t,0),t},_calculateLayerPosition:function(t,e,i){var n,o,r=this.mouseEventDetectorContainer.getBoundingClientRect(),s=this.positionMap.series,h=this.expandSize,l={};return i=!!u.isUndefined(i)||i,i&&(n=r.right-h,o=r.left+h,t=Math.min(Math.max(t,o),n)),l.x=t-r.left+s.left-a.CHART_PADDING,u.isUndefined(e)||(l.y=e-r.top+s.top-a.CHART_PADDING),l},onReceiveSeriesData:function(t){var e=this.seriesItemBoundsData,i=this.seriesCount;e.length===i&&(e=[]),e.push(t),e.length===i&&(this.boundsBaseCoordinateModel=new o(e))},rerender:function(t){var e;t.axisDataMap.xAxis&&(e=this._pickTickCount(t.axisDataMap)),this.selectedData=null,this._setDataForRendering(t),this._renderMouseEventDetectorArea(this.mouseEventDetectorContainer,e),this.transparentChild.style.height=l.getStyle(this.mouseEventDetectorContainer).height},resize:function(t){this.containerBound=null,this.rerender(t)},_isChangedSelectData:function(t,e){return!t||!e||t.chartType!==e.chartType||t.indexes.groupIndex!==e.indexes.groupIndex||t.indexes.index!==e.indexes.index},_findDataFromBoundsCoordinateModel:function(t){var e,i=t.x,n=t.y;return e=s.isTreemapChart(this.chartType)?0:this.tickBaseCoordinateModel.findIndex(this.isVertical?i:n),this.boundsBaseCoordinateModel.findData(e,i,n)},_findData:function(t,e){var i=this._calculateLayerPosition(t,e);return this._findDataFromBoundsCoordinateModel(i)},_showTooltip:function(){},_hideTooltip:function(){},_onMouseEvent:function(t,e){h.addClass(this.mouseEventDetectorContainer,"hide"),this.eventBus.fire(t+"Series",{left:e.clientX,top:e.clientY}),h.removeClass(this.mouseEventDetectorContainer,"hide")},_unselectSelectedData:function(){this.eventBus.fire("unselectSeries",this.selectedData),this.selectedData=null},_onClick:function(t){var e=this._findData(t.clientX,t.clientY);this._isChangedSelectData(this.selectedData,e)?e&&(this.selectedData&&this._unselectSelectedData(),this.eventBus.fire("selectSeries",e),this.allowSelect&&(this.selectedData=e)):this._unselectSelectedData()},_onMousedown:function(){},_onMouseup:function(){},_onMousemove:function(){},_onMouseout:function(){},attachEvent:function(t){r.on(t,{click:this._onClick,mousedown:this._onMousedown,mouseup:this._onMouseup,mousemove:this._onMousemove,mouseout:this._onMouseout},this)},findDataByIndexes:function(){},_setPrevClientPosition:function(t){t?this.prevClientPosition={x:t.clientX,y:t.clientY}:this.prevClientPosition=null}});u.CustomEvents.mixin(c),t.exports=c},function(t,e,i){"use strict";var n=i(11),o=i(10),a=i(6),r=a.defineClass({init:function(t,e,i,o,a){this.isLineType=n.isLineTypeChart(i,a),this.data=this._makeData(t,e,o)},_getRanges:function(t,e,i){var n=e,o=i/2;return a.map(a.range(0,t),function(){var t={min:n-o,max:n+o};return n+=i,t})},_makeLineTypeData:function(t,e,i){var n=(t+1)/(e-1),o=this._getRanges(e,i||0,n);return o[e-1].max-=1,o},_makeNormalData:function(t,e,i){var n=e-1,r=t/n,s=i||0;return a.map(a.range(0,n),function(){var e=o.min([t+s,r+s]),i={min:s,max:e};return s=e,i})},_makeData:function(t,e,i){var n,o=i?"width":"height",a=i?"left":"top";return n=this.isLineType?this._makeLineTypeData(t.dimension[o],e,t.position[a]):this._makeNormalData(t.dimension[o],e,t.position[a])},findIndex:function(t){var e=-1;return a.forEachArray(this.data,function(i,n){return!(i.min=t)||(e=n,!1)}),e},getLastIndex:function(){return this.data.length-1},makeRange:function(t,e){var i,n,o=this.data[t];return this.isLineType?(n=parseInt(o.max-(o.max-o.min)/2,10),i={start:n,end:n}):i={start:o.min-(e||0),end:o.max-(e||0)},i}});t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(10),r=i(6),s=r.defineClass({init:function(t){this.data=this._makeData(t)},_makeTooltipData:function(t,e,i,n){return{sendData:{chartType:t,indexes:e,allowNegativeTooltip:i,bound:n},bound:{left:n.left,top:n.top,right:n.left+n.width,bottom:n.top+n.height}}},_makeRectTypePositionData:function(t,e){var i=!o.isBoxTypeChart(e);return r.map(t,function(t,n){return r.map(t,function(t,o){return t?this._makeTooltipData(e,{groupIndex:n,index:o},i,t.end||t):null},this)},this)},_makeOutliersPositionDataForBoxplot:function(t,e,i){var n=!o.isBoxTypeChart(e),a=[].concat(t);r.forEach(a,function(t,o){r.forEach(t,function(t,a){var s;t.outliers&&t.outliers.length&&(s=r.map(t.outliers,function(t,i){var r={top:t.top-3,left:t.left-3,width:6,height:6};return this._makeTooltipData(e,{groupIndex:o,index:a,outlierIndex:i},n,r)},this),i[o]=i[o].concat(s))},this)},this)},_makeDotTypePositionData:function(t,e){return t?r.map(a.pivot(t),function(t,i){return r.map(t,function(t,o){return t?{sendData:{chartType:e,indexes:{groupIndex:i,index:o},bound:t},bound:{left:t.left-n.DOT_RADIUS,top:t.top-n.DOT_RADIUS,right:t.left+n.DOT_RADIUS,bottom:t.top+n.DOT_RADIUS}}:null})}):[]},_joinData:function(t){var e=[];return r.forEachArray(t,function(t){r.forEachArray(t,function(t,i){var n;e[i]?(n=e[i].length,r.forEachArray(t,function(t){t&&(t.sendData.indexes.legendIndex=t.sendData.indexes.index+n)}),e[i]=e[i].concat(t)):e[i]=t})}),e},_makeData:function(t){var e=r.map(t,function(t){var e;return e=o.isLineTypeChart(t.chartType)?this._makeDotTypePositionData(t.data.groupPositions,t.chartType):this._makeRectTypePositionData(t.data.groupBounds,t.chartType),o.isBoxplotChart(t.chartType)&&this._makeOutliersPositionDataForBoxplot(t.data.groupBounds,t.chartType,e),e},this);return this._joinData(e)},_findCandidates:function(t,e,i){return r.filter(t,function(t){var n,o,a=t&&t.bound,r=!1;return a&&(n=a.left<=e&&a.right>=e,o=a.top<=i&&a.bottom>=i,r=n&&o),r})},findData:function(t,e,i){var n,o=1e4,a=null;return t>-1&&this.data[t]&&(n=this._findCandidates(this.data[t],e,i),r.forEachArray(n,function(t){var e=Math.abs(i-t.bound.top);o>e&&(o=e,a=t.sendData)})),a},findDataByIndexes:function(t){var e=this.data[t.index][t.seriesIndex].sendData;return r.isNumber(t.outlierIndex)?this._findOutlierDataByIndexes(t):e},_findOutlierDataByIndexes:function(t){var e=null;return r.forEachArray(this.data[t.index],function(i){var n=i.sendData.indexes,o=n.index===t.seriesIndex&&n.outlierIndex===t.outlierIndex;return o&&(e=i.sendData),!o}),e}});t.exports=s},function(t,e,i){"use strict";function n(t){var e,i=t.chartOptions.chartType,n=t.seriesTypes,u=t.chartOptions.series.zoomable,c=t.chartOptions.series.allowSelect;return e=t.chartOptions.tooltip.grouped?s:o.isMapChart(i)?l:o.isBarTypeChart(i)||o.isBoxplotChart(i)||o.isHeatmapChart(i)||o.isTreemapChart(i)||o.isBulletChart(i)?h:o.isCoordinateTypeChart(i)||o.isPieChart(i)||o.isPieDonutComboChart(i,n)?r:a,t.chartType=i,t.chartTypes=n,t.zoomable=u,t.allowSelect=c,e(t)}var o=i(11),a=i(74),r=i(77),s=i(78),h=i(79),l=i(69);n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(70),a=i(75),r=i(76),s=i(6),h=50,l=s.defineClass(o,{init:function(t){o.call(this,t),this.prevFoundData=null,this.prevClientPosition=null,this.zoomable=t.zoomable,this.zoomable&&(s.extend(this,a),this._initForZoom(t.zoomable))},animateForAddingData:function(){var t,e;this.prevClientPosition&&(t=this._findData(this.prevClientPosition.x,this.prevClientPosition.y),t&&(e=this.prevFoundData&&this.prevFoundData.indexes.groupIndex===t.indexes.groupIndex,this._showTooltip(t,e)),this.prevFoundData=t)},onReceiveSeriesData:function(t){var e=this.seriesItemBoundsData,i=this.seriesCount;e.length===i&&(e=[]),e.push(t),e.length===i&&(this.dataModel=new r(e)),this.zoomable&&this._showTooltipAfterZoom()},_findData:function(t,e){var i=this._calculateLayerPosition(t,e);return this.dataModel.findData(i,h)},_findDataForZoomable:function(t,e){var i=this._calculateLayerPosition(t,e);return this.dataModel.findData(i)},_getFirstData:function(t){return this.dataModel.getFirstData(t)},_getLastData:function(t){return this.dataModel.getLastData(t)},_showTooltip:function(t){this.eventBus.fire("showTooltip",t),this.prevFoundData=t},_hideTooltip:function(t){this.eventBus.fire("hideTooltip",this.prevFoundData,t),this.prevFoundData=null},_onMousemove:function(t){var e,i;this._setPrevClientPosition(t),i=this._findData(t.clientX,t.clientY),this.zoomable&&(e=this._isAfterDragMouseup()),!e&&this._isChangedSelectData(this.prevFoundData,i)&&(i?this._showTooltip(i):this.prevFoundData&&this._hideTooltip(),this.prevFoundData=i)},_onMouseout:function(){this.prevFoundData&&this._hideTooltip(),this.prevClientPosition=null,this.prevFoundData=null},findDataByIndexes:function(t){return this.dataModel.findDataByIndexes(t)},_setPrevClientPosition:function(t){t?this.prevClientPosition={x:t.clientX,y:t.clientY}:this.prevClientPosition=null}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";var n=i(70),o=i(8),a=i(9),r=i(7),s=i(55),h=i(6),l={_initForZoom:function(t){this.zoomable=t,this.dragStartIndexes=null,this.startClientPosition=null,this.startLayerX=null,this.dragSelectionElement=null,this.containerBound=null,this.isShowTooltipAfterZoom=!1,this.afterMouseup=!1,this.prevDistanceOfRange=null,this.reverseMove=null,this.resetZoomBtn=null},_showTooltipAfterZoom:function(){var t,e=this.isShowTooltipAfterZoom;this.isShowTooltipAfterZoom=!1,e&&this.dragStartIndexes&&(t=this.reverseMove?this._getFirstData(this.dragStartIndexes.index):this._getLastData(this.dragEndIndexes.index),t&&this._showTooltip(t))},_updateDimensionForDragSelection:function(t){r.renderDimension(t,{height:this.layout.dimension.height})},_renderDragSelection:function(){var t=a.create("DIV","tui-chart-drag-selection");return this._updateDimensionForDragSelection(t),t},render:function(t){var e=n.prototype.render.call(this,t),i=this._renderDragSelection();return a.append(e,i),this.dragSelectionElement=i,e},resize:function(t){this.containerBound=null,n.prototype.resize.call(this,t),this._updateDimensionForDragSelection(this.dragSelectionElement)},_onClick:function(){},_isAfterDragMouseup:function(){var t=this.afterMouseup;return t&&(this.afterMouseup=!1),t},_bindDragEvent:function(t){t.setCapture&&t.setCapture(),s.on(document,"mousemove",this._onDrag,this),s.off(this.mouseEventDetectorContainer,"mouseup",this._onMouseup,this),s.on(document,"mouseup",this._onMouseupAfterDrag,this)},_unbindDragEvent:function(){this.downTarget&&this.downTarget.releaseCapture&&this.downTarget.releaseCapture(),s.off(document,"mousemove",this._onDrag,this),s.off(document,"mouseup",this._onMouseupAfterDrag,this),s.on(this.mouseEventDetectorContainer,"mouseup",this._onMouseup,this)},_onMousedown:function(t){var e;this.zoomable&&(e=t.target||t.srcElement,this.startClientPosition={x:t.clientX,y:t.clientY},this.startLayerX=this._calculateLayerPosition(t.clientX).x,this.downTarget=e,this._bindDragEvent(e))},_showDragSelection:function(t){var e=this._calculateLayerPosition(t).x,i=Math.min(e,this.startLayerX)-this.layout.position.left,n=Math.abs(e-this.startLayerX),o=this.dragSelectionElement;o.style.left=i+"px",o.style.width=n+"px",a.addClass(o,"show")},_hideDragSelection:function(){a.removeClass(this.dragSelectionElement,"show")},_onDrag:function(t){var e,i=this.startClientPosition,n=t.target||t.srcElement;i&&(e=this._findDataForZoomable(i.x,i.y),a.hasClass(n,o.CLASS_NAME_RESET_ZOOM_BTN)||(h.isNull(this.dragStartIndexes)?this.dragStartIndexes=e?e.indexes:{}:this._showDragSelection(t.clientX)))},_adjustIndexRange:function(t,e){var i=[t,e].sort(function(t,e){return t-e}),n=i[1]-i[0];return 0===n?0===i[0]?i[1]+=2:(i[0]-=1,i[1]+=1):1===n&&(0===i[0]?i[1]+=1:i[0]-=1),i},_fireZoom:function(t,e){var i=t>e,n=this._adjustIndexRange(t,e),o=n[1]-n[0];this.prevDistanceOfRange!==o&&(this.prevDistanceOfRange=o,this.reverseMove=i,this.eventBus.fire("zoom",n))},_setIsShowTooltipAfterZoomFlag:function(t,e){var i=this._calculateLayerPosition(t,e,!1).x,n=this._calculateLayerPosition(t,e).x;this.isShowTooltipAfterZoom=i===n},_onMouseupAfterDrag:function(t){var e,i=this._findDataForZoomable(t.clientX,t.clientY);this._unbindDragEvent(),h.isNull(this.dragStartIndexes)?(e=t.target||t.srcElement,a.hasClass(e,o.CLASS_NAME_RESET_ZOOM_BTN)?(this._hideTooltip(),this.prevDistanceOfRange=null,this.eventBus.fire("resetZoom")):n.prototype._onClick.call(this,t)):this.dragStartIndexes&&i?(this.dragEndIndexes=i.indexes,this._setIsShowTooltipAfterZoomFlag(t.clientX,t.clientY), +this._hideDragSelection(),this._fireZoom(this.dragStartIndexes.groupIndex,this.dragEndIndexes.groupIndex)):(this._setIsShowTooltipAfterZoomFlag(t.clientX,t.clientY),this._hideDragSelection()),this.startClientPosition=null,this.dragStartIndexes=null,this.startLayerX=null,this.afterMouseup=!0},_renderResetZoomBtn:function(){var t=a.create("DIV",o.CLASS_NAME_RESET_ZOOM_BTN);return t.innerHTML="Reset Zoom",t},zoom:function(t){this.prevFoundData=null,this.rerender(t),this._updateDimensionForDragSelection(this.dragSelectionElement),this.resetZoomBtn?t.isResetZoom&&(this.mouseEventDetectorContainer.removeChild(this.resetZoomBtn),this.resetZoomBtn=null):(this.resetZoomBtn=this._renderResetZoomBtn(),a.append(this.mouseEventDetectorContainer,this.resetZoomBtn))}};t.exports=l},function(t,e,i){"use strict";var n=i(11),o=i(10),a=i(6),r=Array.prototype.concat,s=a.defineClass({init:function(t){this.data=this._makeData(t),this.lastGroupIndex=0},_makeData:function(t){var e=0,i=t.length,s=a.map(t,function(t,r){var s=t.data.groupPositions||t.data.groupBounds,h=t.chartType;return(n.isLineTypeChart(h)||n.isRadialChart(h))&&(s=o.pivot(s)),e=Math.max(s.length-1,e),a.map(s,function(t,e){return a.map(t,function(t,n){var o=null;return t&&(o={chartType:h,indexes:{groupIndex:e,index:n},bound:t}),i>1&&(o.indexes.legendIndex=r),o})})});return s=r.apply([],s),this.lastGroupIndex=e,a.filter(r.apply([],s),function(t){return!!t})},findData:function(t,e){var i,n=1e5;return e=e||Number.MAX_VALUE,a.forEach(this.data,function(o){var a=t.x-o.bound.left,r=t.y-o.bound.top,s=Math.sqrt(Math.pow(a,2)+Math.pow(r,2));ss+n||er+o},_showTooltip:function(t,e){var i=t.indexes.groupIndex,n=(this.isVertical?this.layout.position.left:this.layout.position.top)-o.CHART_PADDING;this.tickBaseCoordinateModel.data.length>i&&(this.eventBus.fire("showTooltip",{index:i,range:this.tickBaseCoordinateModel.makeRange(i,n),size:this.dimension[this.sizeType],isVertical:this.isVertical,isMoving:e,silent:t.silent}),this.prevIndex=i)},_hideTooltip:function(t){this.eventBus.fire("hideTooltip",this.prevIndex,t),this.prevIndex=null},_onMousemove:function(t){var e,i;this.zoomable&&this._isAfterDragMouseup()||(e=this._findGroupData(t.clientX,t.clientY),i=e.indexes.groupIndex,i===-1?this._onMouseout(t):this.prevIndex!==i&&this._showTooltip(e))},_onMouseout:function(t){var e;e=this._calculateLayerPosition(t.clientX,t.clientY,!1),this._isOuterPosition(e.x,e.y)&&!s.isNull(this.prevIndex)&&this._hideTooltip()}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){return new l(t)}var o=i(70),a=i(8),r=i(11),s=i(9),h=i(6),l=h.defineClass(o,{init:function(){o.apply(this,arguments),this.prevFoundData=null,this.zoomHistory=[-1],this.historyBackBtn=null},_attachToEventBus:function(){o.prototype._attachToEventBus.call(this),this.eventBus.on("afterZoom",this.onAfterZoom,this)},_showTooltip:function(t){this.eventBus.fire("showTooltip",t),this.prevFoundData=t},_hideTooltip:function(t){this.eventBus.fire("hideTooltip",this.prevFoundData,t),this.prevFoundData=null,this.styleCursor(!1)},styleCursor:function(t){var e=this.mouseEventDetectorContainer;t?e.style.cursor="pointer":e.style.cursor="default"},_onMousemove:function(t){var e,i=t.clientX,n=t.clientY,o=this._calculateLayerPosition(i,n),a=this._findDataFromBoundsCoordinateModel(o);this._isChangedSelectData(this.prevFoundData,a)&&(this.prevFoundData&&this._hideTooltip(),this.prevFoundData=a,a&&(r.isTreemapChart(this.chartType)?(e=this._getSeriesItemByIndexes(a.indexes),this.styleCursor(e.hasChild)):r.isBulletChart(this.chartType)&&(a.mousePosition={left:i,top:n}),this._showTooltip(a)))},_zoomHistoryBack:function(){var t=this.zoomHistory[this.zoomHistory.length-2];this.zoomHistory.pop(),this.eventBus.fire("zoom",t),1===this.zoomHistory.length&&(this.mouseEventDetectorContainer.removeChild(this.historyBackBtn),this.historyBackBtn=null)},_getSeriesItemByIndexes:function(t){var e=this.dataProcessor.getSeriesDataModel(a.CHART_TYPE_TREEMAP);return e.getSeriesItem(t.groupIndex,t.index,!0)},_onClick:function(t){var e,i,n,h=t.target||t.srcElement;if(o.prototype._onClick.call(this,t),r.isTreemapChart(this.chartType)){if(s.hasClass(h,a.CLASS_NAME_RESET_ZOOM_BTN))return this._hideTooltip(),void this._zoomHistoryBack();if(e=this._calculateLayerPosition(t.clientX,t.clientY),i=this._findDataFromBoundsCoordinateModel(e)){if(n=this._getSeriesItemByIndexes(i.indexes),!n.hasChild)return;this._hideTooltip(),this.eventBus.fire("zoom",i.indexes.index)}}},_onMouseout:function(t){var e=this.mouseEventDetectorContainer.getBoundingClientRect(),i=t.clientX,n=t.clientY;e.left<=i&&e.top<=n&&e.right>=i&&e.bottom>=n||(this.prevFoundData&&this._hideTooltip(),this.prevFoundData=null)},onAfterZoom:function(t){this.historyBackBtn||(this.historyBackBtn=s.create("DIV",a.CLASS_NAME_RESET_ZOOM_BTN),this.historyBackBtn.innerHTML="< Back",s.append(this.mouseEventDetectorContainer,this.historyBackBtn)),this.zoomHistory[this.zoomHistory.length-1]!==t&&this.zoomHistory.push(t)},findDataByIndexes:function(t){return this.boundsBaseCoordinateModel.findDataByIndexes(t)}});n.componentType="mouseEventDetector",t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="bar",t.chartBackground=i.chart.background,new l(t)}var o=i(81),a=i(82),r=i(8),s=i(11),h=i(6),l=h.defineClass(o,{init:function(){o.apply(this,arguments)},_makeBound:function(t,e,i,n,o){return{start:{top:i,left:n,width:0,height:e},end:{top:i,left:o,width:t,height:e}}},_calculateAdditionalLeft:function(t){var e=0;return this.options.divided&&t>0&&(e=this.dimensionMap.yAxis.width+r.OVERLAPPING_WIDTH),e},_makeBarChartBound:function(t,e,i,n,o){var a,r,s,h,l=t.baseBarSize*n.ratioDistance,u=this._calculateAdditionalLeft(n.value),c=t.baseBarSize*n.startRatio,d=t.basePosition+c+u,p=n.stack!==e.prevStack;return(!i||!this.options.diverging&&p)&&(a=i?this.dataProcessor.findStackIndex(n.stack):o,e.top=e.baseTop+t.pointInterval*a,e.plusLeft=0,e.minusLeft=0),n.value>=0?(r=d+e.plusLeft,e.plusLeft+=l):(e.minusLeft-=l,r=d+e.minusLeft),e.prevStack=n.stack,h=e.top+t.pointInterval-t.barSize/2,s=this._makeBound(l,t.barSize,h,d,r)},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.height,n.width);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.top,r={baseTop:a,top:a,plusLeft:0,minusLeft:0,prevStack:null},s=h.bind(t._makeBarChartBound,t,o,r,i);return e.map(s)})},_calculateTopPositionOfSumLabel:function(t,e){return t.top+(t.height-e+r.TEXT_PADDING)/2}});a.mixin(l),n.componentType="series",n.BarChartSeries=l,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=600,a=n.browser,r=a.msie&&7===a.version,s=i(8),h=i(9),l=i(11),u=i(7),c=i(32),d=i(5),p=n.defineClass({className:"tui-chart-series-area",init:function(t){var e=t.libType;this.chartType=t.chartType,this.seriesType=t.seriesType||t.chartType,this.componentType=t.componentType,this.dataProcessor=t.dataProcessor,this.eventBus=t.eventBus,this.chartBackground=t.chartBackground,this.options=t.options||{},this.orgTheme=this.theme=t.theme,this.graphRenderer=c.get(e,t.chartType),this.seriesContainer=null,this.seriesLabelContainer=null,this.seriesData=[],this.selectedLegendIndex=null,this.labelShowEffector=null,this.paper=null,this.limit=null,this.aligned=null,this.layout=null,this.dimensionMap=null,this.positionMap=null,this.axisDataMap=null,this.beforeAxisDataMap=null,this.drawingType=s.COMPONENT_TYPE_RAPHAEL,this.supportSeriesLable=!0,this._attachToEventBus()},_attachToEventBus:function(){var t=n.bind(function(){this.isInitRenderCompleted=!0,this.eventBus.off("load",t)},this);this.eventBus.on(s.PUBLIC_EVENT_PREFIX+"load",t),this.eventBus.on({selectLegend:this.onSelectLegend,selectSeries:this.onSelectSeries,unselectSeries:this.onUnselectSeries,hoverSeries:this.onHoverSeries,hoverOffSeries:this.onHoverOffSeries,showGroupAnimation:this.onShowGroupAnimation,hideGroupAnimation:this.onHideGroupAnimation},this),this.onShowTooltip&&this.eventBus.on("showTooltip",this.onShowTooltip,this),this.onShowGroupTooltipLine&&this.eventBus.on({showGroupTooltipLine:this.onShowGroupTooltipLine,hideGroupTooltipLine:this.onHideGroupTooltipLine},this),this.onClickSeries&&this.eventBus.on({clickSeries:this.onClickSeries,moveSeries:this.onMoveSeries},this)},_getSeriesDataModel:function(){return this.dataProcessor.getSeriesDataModel(this.seriesType)},_makeSeriesData:function(){},getSeriesData:function(){return this.seriesData},_renderSeriesLabel:function(){},_renderSeriesLabelArea:function(t){return this._renderSeriesLabel(t)},_sendBoundsToMouseEventDetector:function(t){this.eventBus.fire("receiveSeriesData",{chartType:this.chartType,data:t})},_renderSeriesArea:function(t,e){var i,n;i=this.dimensionMap.extendedSeries,this.seriesData=n=this._makeSeriesData(),this._sendBoundsToMouseEventDetector(n),(this.hasDataForRendering(n)||"map"===this.chartType)&&(e&&(this.seriesSet=e(i,n,t)),l.isShowLabel(this.options)&&this.supportSeriesLable&&(this.labelSet=this._renderSeriesLabelArea(t)))},_makeParamsForGraphRendering:function(t,e){return n.extend({dimension:t,position:this.layout.position,chartType:this.seriesType,theme:this.theme,options:this.options},e)},_renderGraph:function(t,e,i){var n=this._makeParamsForGraphRendering(t,e);return this.graphRenderer.render(i,n)},_setDataForRendering:function(t){this.paper=t.paper,this.limit=t.limitMap[this.chartType],t.axisDataMap&&t.axisDataMap.xAxis&&(this.aligned=t.axisDataMap.xAxis.aligned),this.layout=t.layout,this.dimensionMap=t.dimensionMap,this.positionMap=t.positionMap,this.axisDataMap=t.axisDataMap},render:function(t){var e;this.paper=t.paper,this._setDataForRendering(t),this._clearSeriesContainer(),this.beforeAxisDataMap=this.axisDataMap,t.checkedLegends&&(e=t.checkedLegends[this.seriesType],this.options.colorByPoint||(this.theme=this._getCheckedSeriesTheme(this.orgTheme,e))),this._renderSeriesArea(t.paper,n.bind(this._renderGraph,this)),this.paper.pushDownBackgroundToBottom&&this.paper.pushDownBackgroundToBottom()},_getCheckedSeriesTheme:function(t,e){var i;return e.length?(i=JSON.parse(JSON.stringify(t)),i.colors=n.filter(i.colors,function(t,i){return e[i]}),i):t},_clearSeriesContainer:function(){this.seriesSet&&this.seriesSet.remove&&(this.seriesSet.forEach(function(t){t.remove()},this),this.seriesSet.remove()),this.labelSet&&this.labelSet.remove&&(this.labelSet.forEach(function(t){t.remove()},this),this.labelSet.remove()),this.seriesData=[]},rerender:function(t){var e;this.dataProcessor.getGroupCount(this.seriesType)&&(t.checkedLegends&&(e=t.checkedLegends[this.seriesType],this.theme=this._getCheckedSeriesTheme(this.orgTheme,e)),this._setDataForRendering(t),this._clearSeriesContainer(),this._renderSeriesArea(t.paper,n.bind(this._renderGraph,this)),this.labelShowEffector&&clearInterval(this.labelShowEffector.timerId),!e&&this.isInitRenderCompleted||this.animateComponent(!0),n.isNull(this.selectedLegendIndex)||this.graphRenderer.selectLegend(this.selectedLegendIndex))},_isLabelVisible:function(){return!(!this.options.showLabel&&!this.options.showLegend)},_resizeGraph:function(t,e){return this.graphRenderer.resize(n.extend({dimension:this.dimensionMap.chart},e)),this.seriesSet},resize:function(t){this._clearSeriesContainer(),this._setDataForRendering(t),this._renderSeriesArea(t.paper,n.bind(this._resizeGraph,this))},_renderPosition:function(t,e){var i=u.isOldBrowser()?1:0;u.renderPosition(t,{top:e.top-i,left:e.left-2*i})},_getLimitDistanceFromZeroPoint:function(t,e){var i=e.min,n=e.max,o=n-i,a=0,r=0;return i<=0&&n>=0?(a=(o+i)/o*t,r=(o-n)/o*t):i>0&&(a=t),{toMax:a,toMin:r}},_findLabelElement:function(t){var e=null;return e=h.hasClass(t,s.CLASS_NAME_SERIES_LABEL)?t:h.findParentByClass(t,s.CLASS_NAME_SERIES_LABEL)},onHoverSeries:function(t,e){e===this.chartType&&this.graphRenderer.showAnimation&&this.graphRenderer.showAnimation(t)},onHoverOffSeries:function(t,e){e===this.chartType&&this.graphRenderer.hideAnimation&&t&&this.graphRenderer.hideAnimation(t)},onShowGroupAnimation:function(t){this.graphRenderer.showGroupAnimation&&this.graphRenderer.showGroupAnimation(t)},onHideGroupAnimation:function(t){this.graphRenderer.hideGroupAnimation&&this.graphRenderer.hideGroupAnimation(t)},animateComponent:function(t){this.graphRenderer.animate&&this.seriesSet?this.graphRenderer.animate(n.bind(this.animateSeriesLabelArea,this,t),this.seriesSet):this.animateSeriesLabelArea(t)},_fireLoadEvent:function(t){t||this.eventBus.fire(s.PUBLIC_EVENT_PREFIX+"load")},animateSeriesLabelArea:function(t){return this._isLabelVisible()?void(r?(this._fireLoadEvent(t),this.labelSet.attr({opacity:1})):this.labelSet&&this.labelSet.length&&d.animateOpacity(this.labelSet,0,1,o)):void this._fireLoadEvent(t)},_makeExportationSeriesData:function(t){var e,i=t.indexes,o=n.isExisty(i.legendIndex)?i.legendIndex:i.index,a=this.dataProcessor.getLegendItem(o),r=n.isExisty(i.groupIndex)?i.groupIndex:0,s=this._getSeriesDataModel().getSeriesItem(r,i.index);return n.isExisty(s)&&(e={chartType:a.chartType,legend:a.label,legendIndex:o},e.index=s.index),e},_executeGraphRenderer:function(t,e){var i,n=!1;return this.eventBus.fire("hideTooltipContainer"),this.seriesLabelContainer&&h.hasClass(this.seriesLabelContainer,"show")&&(h.removeClass(this.seriesLabelContainer,"show"),n=!0),i=this.graphRenderer[e](t),n&&h.addClass(this.seriesLabelContainer,"show"),this.eventBus.fire("showTooltipContainer"),i},onSelectSeries:function(t,e){var i;t.chartType===this.chartType&&(i=s.PUBLIC_EVENT_PREFIX+"selectSeries",this.eventBus.fire(i,this._makeExportationSeriesData(t)),e=!!n.isEmpty(e)||e,this.options.allowSelect&&this.graphRenderer.selectSeries&&e&&this.graphRenderer.selectSeries(t.indexes))},onUnselectSeries:function(t){var e;t.chartType===this.chartType&&(e=s.PUBLIC_EVENT_PREFIX+"unselectSeries",this.eventBus.fire(e,this._makeExportationSeriesData(t)),this.options.allowSelect&&this.graphRenderer.unselectSeries&&this.graphRenderer.unselectSeries(t.indexes))},onSelectLegend:function(t,e){this.seriesType===t||n.isNull(e)||(e=-1),this.selectedLegendIndex=e,this._getSeriesDataModel().getGroupCount()&&this.graphRenderer.selectLegend(e)},showLabel:function(){this.options.showLabel=!0,!this.seriesLabelContainer&&this.supportSeriesLable&&this._renderSeriesLabelArea(this.paper)},hideLabel:function(){this.options.showLabel=!1,this.seriesLabelContainer&&(h.removeClass(this.seriesLabelContainer,"show"),h.removeClass(this.seriesLabelContainer,"opacity"))},hasDataForRendering:function(t){return!(!t||!t.isAvailable())}});t.exports=p},function(t,e,i){"use strict";var n=i(8),o=i(83),a=i(11),r=i(45),s=i(7),h=i(5),l=i(6),u=.8,c=l.defineClass({_makeSeriesData:function(){var t=this._makeBounds(this.layout.dimension);return this.groupBounds=t,{groupBounds:t,seriesDataModel:this._getSeriesDataModel(),isAvailable:function(){return t&&t.length>0}}},_getBarWidthOptionSize:function(t,e){var i=0;return e&&(e/2>=t?e=2*t:e<0&&(e=0),i=e),i},_calculateAdditionalPosition:function(t,e,i){var n=0;return e&&e0&&(o=d?this.options.diverging?1:this.dataProcessor.getStackCount(this.seriesType):p.getFirstSeriesGroup().getSeriesItemCount(),l=f/(o+1),r=l*u,s=this.options.barWidth||this.options.pointWidth,r=this._getBarWidthOptionSize(l,s)||r,h=g+i,a.isColumnChart(this.chartType)&&(h=e-h),a.isBoxplotChart(this.chartType)&&g&&(h-=2*g),c={baseBarSize:e,groupSize:f,barSize:r,pointInterval:l,firstAdditionalPosition:l,basePosition:h}),c},_renderNormalSeriesLabel:function(t){var e,i=this.graphRenderer,n=this._getSeriesDataModel(),r=this.seriesData.groupBounds,s=this.theme.label,h=this.selectedLegendIndex,u=n.map(function(t){return t.map(function(t){var e={end:t.endLabel};return l.isExisty(t.start)&&(e.start=t.startLabel),e})});return e=a.isBarChart(this.chartType)?o.boundsToLabelPositionsForBarChart(n,r,s):o.boundsToLabelPositionsForColumnChart(n,r,s),i.renderSeriesLabel(t,e,u,s,h)},_makeSumValues:function(t){var e=r.sum(t);return s.formatValue({value:e,formatFunctions:this.dataProcessor.getFormatFunctions(),chartType:this.chartType,areaType:"series"})},_makeStackedLabelPosition:function(t){var e=t.left+t.width/2,i=t.top+t.height/2;return{left:e,top:i}},_makeStackedLabelPositions:function(t){var e=this,i=t.seriesGroup,n=i.map(function(i,n){var o,a=t.bounds[n];return a&&i&&(o=e._makeStackedLabelPosition(a.end)),{end:o}});return n},getGroupLabels:function(t,e,i){var n=a.isNormalStack(this.options.stackType);return t.map(function(t){var o,a=t.map(function(t){return{end:t.endLabel}});return n&&(e.push(r.sumPlusValues(t.pluck("value"))),o=r.sumMinusValues(t.pluck("value")),o<0&&i.push(o)),a})},getGroupPositions:function(t,e){var i=this;return t.map(function(t,n){return i._makeStackedLabelPositions({seriesGroup:t,bounds:e[n]})})},_renderStackedSeriesLabel:function(t){var e=this,i=[],o=[],r=this.theme.label,u=this.seriesData.groupBounds,c=this._getSeriesDataModel(),d=this.getGroupPositions(c,u),p=this.getGroupLabels(c,i,o),f=!0,m=a.isNormalStack(this.options.stackType),g=a.isBarChart(this.chartType),_=g?"width":"height",T=g?"left":"top",v=g?1:-1;return m&&(l.forEach(p,function(t,n){var a=i[n],r=o[n];r<0&&e.options.diverging&&(r*=-1),t.push({end:s.formatToComma(a)}),o.length&&t.push({end:s.formatToComma(r)})}),l.forEach(d,function(t,a){var s=u[a],l=s[s.length-1].end,c=s[Math.max(parseInt(s.length/2,10),1)-1].end,d=e._makeStackedLabelPosition(l),p=e._makeStackedLabelPosition(c),f=i[a],m=o[a],g=h.getRenderedTextSize(f,r.fontSize,r.fontFamily),y=h.getRenderedTextSize(m,r.fontSize,r.fontFamily),x=(l[_]+g[_])/2,A=(c[_]+y[_])/2;d[T]+=(x+n.LEGEND_LABEL_LEFT_PADDING)*v,p[T]-=(A+n.LEGEND_LABEL_LEFT_PADDING)*v,t.push({end:d}),o.length&&t.push({end:p})})),this.graphRenderer.renderSeriesLabel(t,d,p,r,f)},_renderSeriesLabel:function(t){var e;return e=this.options.stackType?this._renderStackedSeriesLabel(t):this._renderNormalSeriesLabel(t)}});c.mixin=function(t){l.extend(t.prototype,c.prototype)},t.exports=c},function(t,e,i){"use strict";var n=i(8),o=i(7),a=i(6),r={_calculateLeftPositionForCenterAlign:function(t){return t.left+t.width/2},_calculateTopPositionForMiddleAlign:function(t){return t.top+t.height/2},_makePositionForBoundType:function(t){return{left:this._calculateLeftPositionForCenterAlign(t),top:this._calculateTopPositionForMiddleAlign(t)}},_makePositionMap:function(t,e,i,n,o){var a=t.value,r=a>=0,s={end:o(e,i,t.endLabel||t.label,n,r)};return t.isRange&&(r=a<0,s.start=o(e,i,t.startLabel,n,r)),s},boundsToLabelPositions:function(t,e,i,r,s){var h=this,l=o.getRenderedLabelHeight(n.MAX_HEIGHT_WORD,i);return r=r||a.bind(this._makePositionForBoundType,this),s=!!s,t.map(function(t,n){var o=e[n];return t.map(function(t,e){var n=o[e].end;return h._makePositionMap(t,n,l,i,r)})},s)},_makePositionForBarChart:function(t,e,i,a,r){var s=o.getRenderedLabelWidth(i,a),h=t.left;return r?h+=t.width+n.SERIES_LABEL_PADDING:h-=s+n.SERIES_LABEL_PADDING,{left:h,top:this._calculateTopPositionForMiddleAlign(t)}},boundsToLabelPositionsForBarChart:function(t,e,i){var n=a.bind(this._makePositionForBarChart,this);return this.boundsToLabelPositions(t,e,i,n)},_makePositionForColumnChart:function(t,e,i,o,a){var r=t.top;return a?r-=e+n.SERIES_LABEL_PADDING:r+=t.height+n.SERIES_LABEL_PADDING,{left:this._calculateLeftPositionForCenterAlign(t),top:r}},boundsToLabelPositionsForColumnChart:function(t,e,i){var n=a.bind(this._makePositionForColumnChart,this);return this.boundsToLabelPositions(t,e,i,n)},boundsToLabelPostionsForTreemap:function(t,e){var i=this,n=a.map(t,function(t){var n,o=e[t.id];return o&&(n=i._makePositionForBoundType(o)),n});return n}};t.exports=r},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="column",t.chartBackground=i.chart.background,new u(t)}var o=i(81),a=i(82),r=i(8),s=i(11),h=i(7),l=i(6),u=l.defineClass(o,{init:function(){o.apply(this,arguments)},_makeBound:function(t,e,i,n,o){return{start:{top:n,left:i,width:t,height:0},end:{top:o,left:i,width:t,height:e}}},_makeColumnChartBound:function(t,e,i,n,o){var a,s,h,l,u=Math.abs(t.baseBarSize*n.ratioDistance),c=t.baseBarSize*n.startRatio,d=t.basePosition+c+r.SERIES_EXPAND_SIZE,p=n.stack!==e.prevStack;return(!i||!this.options.diverging&&p)&&(a=i?this.dataProcessor.findStackIndex(n.stack):o,e.left=e.baseLeft+t.pointInterval*a,e.plusTop=0,e.minusTop=0),n.value>=0?(e.plusTop-=u,s=d+e.plusTop):(s=d+e.minusTop,e.minusTop+=u),e.prevStack=n.stack,l=e.left+t.pointInterval-t.barSize/2,h=this._makeBound(t.barSize,u,l,d,s)},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.width,n.height);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.left,r={baseLeft:a,left:a,plusTop:0,minusTop:0,prevStack:null},s=l.bind(t._makeColumnChartBound,t,o,r,i);return e.map(s)})},_calculateLeftPositionOfSumLabel:function(t,e){var i=h.getRenderedLabelWidth(e,this.theme.label);return t.left+(t.width-i+r.TEXT_PADDING)/2}});a.mixin(u),n.componentType="series",n.ColumnChartSeries=u,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="line",t.chartBackground=i.chart.background,new s(t)}var o=i(81),a=i(86),r=i(6),s=r.defineClass(o,{init:function(){o.apply(this,arguments),this.movingAnimation=null},_makePositions:function(t){return this._makeBasicPositions(t)},_makeSeriesData:function(){var t=this._makePositions();return{chartBackground:this.chartBackground,groupPositions:t,isAvailable:function(){return t&&t.length>0}}},rerender:function(t){var e;return this._cancelMovingAnimation(),e=o.prototype.rerender.call(this,t)}});a.mixin(s),n.componentType="series",t.exports=n},function(t,e,i){"use strict";var n=i(10),o=i(8),a=i(11),r=i(45),s=i(7),h=i(6),l=h.defineClass({_makePositionsForDefaultType:function(t){var e,i=this.layout.dimension,n=this._getSeriesDataModel(),o=t||i.width||0,a=i.height,r=n.getGroupCount(),s=this.layout.position.top,l=this.layout.position.left;return this.aligned?e=o/(r>1?r-1:r):(e=o/r,l+=e/2),n.map(function(t){return t.map(function(t,i){var n;return h.isNull(t.end)||(n={left:l+e*i,top:s+a-t.ratio*a},h.isExisty(t.startRatio)&&(n.startTop=s+a-t.startRatio*a)),n})},!0)},_makePositionForCoordinateType:function(t){var e=this.layout.dimension,i=this._getSeriesDataModel(),n=t||e.width||0,a=e.height,s=this.axisDataMap.xAxis,l=0,u=this.layout.position.top,c=this.layout.position.left;return s.sizeRatio&&(l=r.multiply(n,s.positionRatio),n=r.multiply(n,s.sizeRatio)),i.map(function(t){return t.map(function(t){var e;return h.isNull(t.end)||(e={left:c+t.ratioMap.x*n+l,top:u+a-t.ratioMap.y*a},h.isExisty(t.ratioMap.start)&&(e.startTop=a-t.ratioMap.start*a+o.SERIES_EXPAND_SIZE)),e})},!0)},_makeBasicPositions:function(t){var e;return e=this.dataProcessor.isCoordinateType()?this._makePositionForCoordinateType(t):this._makePositionsForDefaultType(t)},_calculateLabelPositionTop:function(t,e,i,n){var r,s=t.top;return r=a.isValidStackOption(this.options.stackType)?(t.startTop+s-i)/2+1:e>=0&&!n||e<0&&n?s-i-o.SERIES_LABEL_PADDING:s+o.SERIES_LABEL_PADDING},_makeLabelPosition:function(t,e,i,n,o){return{left:t.left,top:this._calculateLabelPositionTop(t,n,e/2,o)}},_getLabelPositions:function(t,e){var i=this,a=n.pivot(this.seriesData.groupPositions),r=s.getRenderedLabelHeight(o.MAX_HEIGHT_WORD,e);return t.map(function(t,e){return t.map(function(t,n){var o=a[e][n],s=i._makeLabelPosition(o,r,t.endLabel,t.end),h={end:s};return t.isRange&&(o.top=o.startTop,h.start=i._makeLabelPosition(o,r,t.startLabel,t.start)),h})})},_getLabelTexts:function(t){return t.map(function(t){return t.map(function(t){var e={end:t.endLabel};return t.isRange&&(e.start=t.startLabel),e})})},_renderSeriesLabel:function(t){var e=this.theme.label,i=this._getSeriesDataModel(),n=this._getLabelTexts(i),o=this._getLabelPositions(i,e);return this.graphRenderer.renderSeriesLabel(t,o,n,e)},onShowGroupTooltipLine:function(t){this.graphRenderer.showGroupTooltipLine&&this.graphRenderer.showGroupTooltipLine(t,this.layout)},onHideGroupTooltipLine:function(){this.seriesData&&this.seriesData.isAvailable()&&this.graphRenderer.hideGroupTooltipLine&&this.graphRenderer.hideGroupTooltipLine()},zoom:function(t){this._cancelMovingAnimation(),this._clearSeriesContainer(t.paper),this._setDataForRendering(t),this._renderSeriesArea(t.paper,h.bind(this._renderGraph,this)),this.animateComponent(!0),h.isNull(this.selectedLegendIndex)||this.graphRenderer.selectLegend(this.selectedLegendIndex)},_isChangedLimit:function(t,e){return t.min!==e.min||t.max!==e.max},_isChangedAxisLimit:function(){var t=this.beforeAxisDataMap,e=this.axisDataMap,i=!0;return t&&(i=this._isChangedLimit(t.yAxis.limit,e.yAxis.limit),e.xAxis.limit&&(i=i||this._isChangedLimit(t.xAxis.limit,e.xAxis.limit))),this.beforeAxisDataMap=e,i},_animate:function(t){var e=this,i=o.ADDING_DATA_ANIMATION_DURATION,n=this._isChangedAxisLimit();n&&this.seriesLabelContainer&&(this.seriesLabelContainer.innerHTML=""),t&&(this.movingAnimation=s.startAnimation(i,t,function(){e.movingAnimation=null}))},_makeZeroTopForAddingData:function(){var t=this.layout.dimension.height,e=this.axisDataMap.yAxis.limit;return this._getLimitDistanceFromZeroPoint(t,e).toMax+o.SERIES_EXPAND_SIZE},animateForAddingData:function(t){var e,i,n,o,a=this.dimensionMap.extendedSeries,r=this.layout.dimension.width,s=t.tickSize,h=this.options.shifting;this.limit=t.limitMap[this.chartType],this.axisDataMap=t.axisDataMap,e=this._makeSeriesData(),i=this._makeParamsForGraphRendering(a,e),h&&(r+=s),n=this._makePositions(r),o=this._makeZeroTopForAddingData(),this.graphRenderer.animateForAddingData(i,s,n,h,o)},_cancelMovingAnimation:function(){this.movingAnimation&&(cancelAnimationFrame(this.movingAnimation.id),this.movingAnimation=null)}});l.mixin=function(t){h.extend(t.prototype,l.prototype)},t.exports=l},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.chartType,i=t.chartOptions.libType,n=t.chartTheme;return t.libType=i,t.chartType=e,t.chartBackground=n.background,new h(t)}var o=i(81),a=i(8),r=i(49),s=i(6),h=s.defineClass(o,{init:function(){o.apply(this,arguments),this.options=s.extend({showDot:!0,showArea:!0},this.options),this.movingAnimation=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL},_makePositionsForRadial:function(t,e){var i,n=this.layout,o=n.dimension,h=o.width-a.RADIAL_PLOT_PADDING-a.RADIAL_MARGIN_FOR_CATEGORY,l=o.height-a.RADIAL_PLOT_PADDING-a.RADIAL_MARGIN_FOR_CATEGORY,u=h/2+a.RADIAL_PLOT_PADDING/2+a.RADIAL_MARGIN_FOR_CATEGORY/2+n.position.left,c=l/2-a.RADIAL_PLOT_PADDING/2-a.RADIAL_MARGIN_FOR_CATEGORY/2-n.position.top,d=360/e;return i=Math.min(h,l)/2,s.map(t,function(t){var e=s.map(t,function(t,e){var n,o,a,h,p;return s.isNull(t.end)||(p=t.ratio*i,o=c+p,a=360-d*e,h=r.rotatePointAroundOrigin(u,c,u,o,a),n={left:h.x,top:l-h.y}),n});return e.push(e[0]),e},!0)},_getSeriesGroups:function(){var t=this._getSeriesDataModel();return t.map(function(t){return t.map(function(t){return t})},!0)},_makeSeriesData:function(){var t=this._getSeriesGroups(),e=this._makePositionsForRadial(t,this._getSeriesDataModel().getGroupCount());return{groupPositions:e,isAvailable:function(){return e&&e.length>0}}},rerender:function(t){return o.prototype.rerender.call(this,t)}});n.componentType="series",n.RadialChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="area",t.chartBackground=i.chart.background,new h(t)}var o=i(81),a=i(86),r=i(11),s=i(6),h=s.defineClass(o,{init:function(){o.apply(this,arguments),this.movingAnimation=null},_makePositionTopOfZeroPoint:function(){var t=this.layout.dimension,e=this.axisDataMap.yAxis.limit,i=this.layout.position.top,n=this._getLimitDistanceFromZeroPoint(t.height,e).toMax+i;return e.min>=0&&!n&&(n=t.height),n},_makeStackedPositions:function(t){var e=this.layout.dimension.height,i=this.layout.position.top,n=this._makePositionTopOfZeroPoint(),o=[];return s.map(t,function(t){return s.map(t,function(t,a){var r=o[a]||n,s=t?t.top:0,h=e-s+i,l=t?r-h:r;return t&&(t.startTop=r,t.top=l),o[a]=l,t})})},_makePositions:function(t){var e=this._makeBasicPositions(t);return r.isValidStackOption(this.options.stackType)&&(e=this._makeStackedPositions(e)),e},_makeSeriesData:function(){var t=this.layout.dimension,e=this.layout.position.top,i=this._getLimitDistanceFromZeroPoint(t.height,this.limit).toMax+e,n=this._makePositions();return{chartBackground:this.chartBackground,groupPositions:n,hasRangeData:this._getSeriesDataModel().hasRangeData(),zeroTop:i,isAvailable:function(){return n&&n.length>0}}},rerender:function(t){var e;return this._cancelMovingAnimation(),e=o.prototype.rerender.call(this,t)}});a.mixin(h),n.componentType="series",n.AreaChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="bubble",t.chartBackground=i.chart.background,new h(t)}var o=i(8),a=i(81),r=i(90),s=i(6),h=s.defineClass(a,{init:function(){this.prevClickedIndex=null,this.maxRadius=null,this.drawingType=o.COMPONENT_TYPE_RAPHAEL,a.apply(this,arguments)},_calculateStep:function(){var t,e,i,n=0,o=this.dataProcessor.isXCountGreaterThanYCount(this.chartType);return this.dataProcessor.hasCategories(o)&&(t=this.layout.dimension,i=this.dataProcessor.getCategoryCount(o),e=o?t.height:t.width,n=e/i),n},_makeBound:function(t,e,i){ +var n=this.layout.dimension,o=this.layout.position,a=s.isExisty(t.x)?t.x*n.width:e,r=s.isExisty(t.y)?t.y*n.height:e;return{left:o.left+a,top:o.top+n.height-r,radius:Math.max(i*t.r,2)}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=this.maxRadius,n=this._calculateStep(),o=n?n/2:0;return e.map(function(e,a){var r=o+n*a;return e.map(function(e){var n=e&&e.ratioMap;return n?t._makeBound(e.ratioMap,r,i):null})})},_setDataForRendering:function(t){this.maxRadius=t.maxRadius,a.prototype._setDataForRendering.call(this,t)}});r.mixin(h),n.componentType="series",n.BubbleChartSeries=h,t.exports=n},function(t,e,i){"use strict";var n=i(6),o=n.defineClass({_makeSeriesData:function(){var t=this._makeBounds();return{groupBounds:t,seriesDataModel:this._getSeriesDataModel(),isAvailable:function(){return t&&t.length>0}}},showTooltip:function(t,e,i,o,a){this.eventBus.fire("showTooltip",n.extend({indexes:{groupIndex:i,index:o},mousePosition:a},t))},hideTooltip:function(){this.eventBus.fire("hideTooltip")},_renderGraph:function(t,e,i){var o=n.bind(this.showTooltip,this,{chartType:this.chartType}),a={showTooltip:o,hideTooltip:n.bind(this.hideTooltip,this)},r=this._makeParamsForGraphRendering(t,e);return this.graphRenderer.render(i,r,a)},onClickSeries:function(t){var e,i=this._executeGraphRenderer(t,"findIndexes"),n=this.prevClickedIndexes,o=this.options.allowSelect;i&&n&&(this.onUnselectSeries({indexes:n}),this.prevClickedIndexes=null),i&&(e=!n||i.index!==n.index||i.groupIndex!==n.groupIndex,o&&!e||(this.onSelectSeries({chartType:this.chartType,indexes:i},e),o&&(this.prevClickedIndexes=i)))},onMoveSeries:function(t){this._executeGraphRenderer(t,"moveMouseOnSeries")}});o.mixin=function(t){n.extend(t.prototype,o.prototype)},t.exports=o},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="scatter",t.chartBackground=i.chart.background,new h(t)}var o=i(81),a=i(90),r=i(8),s=i(6),h=s.defineClass(o,{init:function(){this.prevClickedIndex=null,o.apply(this,arguments)},_makeBound:function(t){var e=this.layout.dimension,i=this.layout.position;return{left:i.left+t.x*e.width,top:e.height-t.y*e.height+i.top,radius:r.SCATTER_RADIUS}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel();return e.map(function(e){return e.map(function(e){var i=e&&e.ratioMap;return i?t._makeBound(e.ratioMap):null})})}});a.mixin(h),n.componentType="series",n.ScatterChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType;return t.libType=e,t.chartType="map",new l(t)}var o=i(81),a=i(8),r=i(6),s=r.browser,h=s.msie&&s.version<=8,l=r.defineClass(o,{init:function(t){this.basePosition={left:0,top:0},this.zoomMagn=1,this.mapRatio=1,this.graphDimension={},this.limitPosition={},this.mapModel=t.mapModel,this.colorSpectrum=t.colorSpectrum,this.prevPosition=null,this.prevMovedIndex=null,this.isDrag=!1,this.startPosition=null,o.call(this,t)},_attachToEventBus:function(){o.prototype._attachToEventBus.call(this),h||this.eventBus.on({dragStartMapSeries:this.onDragStartMapSeries,dragMapSeries:this.onDragMapSeries,dragEndMapSeries:this.onDragEndMapSeries,zoomMap:this.onZoomMap},this)},_setMapRatio:function(t){var e=this.layout.dimension,i=t||this.mapModel.getMapDimension(),n=e.width/i.width,o=e.height/i.height;this.mapRatio=Math.min(n,o)},_setGraphDimension:function(){var t=this.layout.dimension;this.graphDimension={width:t.width*this.zoomMagn,height:t.height*this.zoomMagn}},render:function(t){o.prototype.render.call(this,t),this._setMapRatio()},_setLimitPositionToMoveMap:function(){var t=this.layout.dimension,e=this.graphDimension;this.limitPosition={left:t.width-e.width,top:t.height-e.height}},_renderGraph:function(){this._setGraphDimension(),this._setLimitPositionToMoveMap(),this.graphRenderer.render(this.paper,{colorSpectrum:this.colorSpectrum,mapModel:this.mapModel,layout:this.layout,theme:this.theme})},_renderSeriesLabel:function(){var t=this.mapModel.getLabelData(this.zoomMagn*this.mapRatio);return this.graphRenderer.renderSeriesLabels(this.paper,t,this.theme.label)},_renderSeriesArea:function(t,e,i){o.prototype._renderSeriesArea.call(this,t,e,i)},_adjustMapPosition:function(t){return{left:Math.max(Math.min(t.left,0),this.limitPosition.left),top:Math.max(Math.min(t.top,0),this.limitPosition.top)}},_updateBasePositionForZoom:function(t,e,i){var n=this.basePosition,o=n.left-e.left/2,a=n.top-e.top/2,r={left:o*i+this.limitPosition.left/2,top:a*i+this.limitPosition.top/2};this.basePosition=this._adjustMapPosition(r)},_zoom:function(t,e){var i=this.graphDimension,n=this.limitPosition;this._setGraphDimension(),this._setLimitPositionToMoveMap(),this._updateBasePositionForZoom(i,n,t),this._setMapRatio(this.graphDimension),this.graphRenderer.scaleMapPaths(t,e,this.mapRatio,i,i)},_updatePositionsToResize:function(t){var e=this.mapRatio/t;this.basePosition.left*=e,this.basePosition.top*=e,this.limitPosition.left*=e,this.limitPosition.top*=e},onClickSeries:function(t){var e=this._executeGraphRenderer(t,"findSectorIndex");r.isNull(e)||this.eventBus.fire("selectSeries",{chartType:this.chartType,index:e,code:this.mapModel.getDatum(e).code})},_isChangedPosition:function(t,e){return!t||t.left!==e.left||t.top!==e.top},_showWedge:function(t){var e=this.mapModel.getDatum(t);r.isUndefined(e.ratio)||this.eventBus.fire("showWedge",e.ratio)},_showTooltip:function(t,e){this.eventBus.fire("showTooltip",{chartType:this.chartType,indexes:{index:t},mousePosition:{left:e.left,top:e.top-a.TOOLTIP_GAP}})},onMoveSeries:function(t){var e=this._executeGraphRenderer(t,"findSectorIndex");r.isNull(e)?r.isNull(this.prevMovedIndex)||(this.graphRenderer.restoreColor(this.prevMovedIndex),this.eventBus.fire("hideTooltip"),this.prevMovedIndex=null):(this.prevMovedIndex!==e&&(r.isNull(this.prevMovedIndex)||(this.graphRenderer.restoreColor(this.prevMovedIndex),this.eventBus.fire("hideTooltip")),this.graphRenderer.changeColor(e)),this._isChangedPosition(this.prevPosition,t)&&(this._showTooltip(e,{left:t.left,top:t.top}),this.prevMovedIndex=e),this._showWedge(e)),this.prevPosition=t},onDragStartMapSeries:function(t){this.startPosition={left:t.left,top:t.top}},_movePosition:function(t,e){var i={x:(e.left-t.left)*this.mapRatio,y:(e.top-t.top)*this.mapRatio};this.graphRenderer.moveMapPaths(i,this.graphDimension)},onDragMapSeries:function(t){this._movePosition(this.startPosition,t),this.startPosition=t,this.isDrag||(this.isDrag=!0,this.eventBus.fire("hideTooltip"))},onDragEndMapSeries:function(){this.isDrag=!1},onZoomMap:function(t,e){var i=t/this.zoomMagn,n=this.layout.position,o=e?e:{left:this.layout.dimension.width/2,top:this.layout.dimension.height/2};this.zoomMagn=t,this._zoom(i,{left:o.left-n.left,top:o.top-n.top}),this.eventBus.fire(a.PUBLIC_EVENT_PREFIX+"zoom",t)},_makeExportationSeriesData:function(t){return t}});n.componentType="series",n.MapChartSeries=l,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme,n=t.chartOptions.chartType,o=t.chartOptions.legend;return t.libType=e,t.chartType="pie","combo"===n&&(t.seriesType=t.name.split("Series")[0],t.isCombo=!0),o&&(t.legendMaxWidth=o.maxWidth),t.chartBackground=i.chart.background,new l(t)}var o=i(81),a=i(8),r=i(11),s=i(6),h=i(5),l=s.defineClass(o,{init:function(t){o.call(this,t),this.isCombo=!!t.isCombo,this.isShowOuterLabel=r.isShowOuterLabel(this.options),this.quadrantRange=null,this.prevClickedIndex=null,this.drawingType=a.COMPONENT_TYPE_RAPHAEL,this.legendMaxWidth=t.legendMaxWidth,this._setDefaultOptions()},_makeValidAngle:function(t,e){return s.isUndefined(t)?t=e:t<0?t=a.ANGLE_360-Math.abs(t)%a.ANGLE_360:t>0&&(t%=a.ANGLE_360),t},_transformRadiusRange:function(t){return t=t||["0%","100%"],s.map(t,function(t){var e=.01*parseInt(t,10);return Math.max(Math.min(e,1),0)})},_setDefaultOptions:function(){var t=this.options;t.startAngle=this._makeValidAngle(t.startAngle,0),t.endAngle=this._makeValidAngle(t.endAngle,t.startAngle),t.radiusRange=this._transformRadiusRange(t.radiusRange),1===t.radiusRange.length&&t.radiusRange.unshift(0)},_calculateAngleForRendering:function(){var t,e=this.options.startAngle,i=this.options.endAngle;return t=ei?a.ANGLE_360-(e-i):a.ANGLE_360},_makeSectorData:function(t){var e,i=this,n=this._getSeriesDataModel().getFirstSeriesGroup(),o=t.cx,a=t.cy,r=t.r,h=this.options.startAngle,l=this._calculateAngleForRendering(),u=10,c=this.options.radiusRange[0],d=.5*r;return c&&(d+=d*c),n?e=n.map(function(t){var e=t?t.ratio:0,n=l*e,c=h+n,p=h+n/2,f={start:{startAngle:h,endAngle:h},end:{startAngle:h,endAngle:c}},m={cx:o,cy:a,angle:p};return h=c,{ratio:e,angles:f,centerPosition:i._getArcPosition(s.extend({r:d},m)),outerPosition:{start:i._getArcPosition(s.extend({r:r},m)),middle:i._getArcPosition(s.extend({r:r+u},m))}}}):null},_makeSeriesData:function(){var t=this._makeCircleBound(),e=this._makeSectorData(t);return{chartBackground:this.chartBackground,circleBound:t,sectorData:e,isAvailable:function(){return e&&e.length>0}}},_getQuadrantFromAngle:function(t,e){var i=parseInt(t/a.ANGLE_90,10)+1;return e&&t%a.ANGLE_90===0&&(i+=1===i?3:-1),i},_getRangeForQuadrant:function(){return this.quadrantRange||(this.quadrantRange={start:this._getQuadrantFromAngle(this.options.startAngle),end:this._getQuadrantFromAngle(this.options.endAngle,!0)}),this.quadrantRange},_isInQuadrantRange:function(t,e){var i=this._getRangeForQuadrant();return i.start===t&&i.end===e},_calculateBaseSize:function(){var t,e=this.layout.dimension,i=e.width,n=e.height;return this.isCombo||(t=this._getRangeForQuadrant(),this._isInQuadrantRange(2,3)||this._isInQuadrantRange(4,1)?n*=2:this._isInQuadrantRange(1,2)||this._isInQuadrantRange(3,4)?i*=2:t.start===t.end&&(i*=2,n*=2)),Math.min(i,n)},_calculateRadius:function(){var t=this.isShowOuterLabel?a.PIE_GRAPH_SMALL_RATIO:a.PIE_GRAPH_DEFAULT_RATIO,e=this._calculateBaseSize();return e*t*this.options.radiusRange[1]/2},_calculateCenterXY:function(t){var e=this.layout.dimension,i=this.layout.position,n=t/2,o=e.width/2+i.left,a=e.height/2+i.top;return this.isCombo||(this._isInQuadrantRange(1,1)?(o-=n,a+=n):this._isInQuadrantRange(1,2)?o-=n:this._isInQuadrantRange(2,2)?(o-=n,a-=n):this._isInQuadrantRange(2,3)?a-=n:this._isInQuadrantRange(3,3)?(o+=n,a-=n):this._isInQuadrantRange(3,4)?o+=n:this._isInQuadrantRange(4,1)?a+=n:this._isInQuadrantRange(4,4)&&(o+=n,a+=n)),{cx:o,cy:a}},_makeCircleBound:function(){var t=this._calculateRadius(),e=this._calculateCenterXY(t);return s.extend({r:t},e)},_getArcPosition:function(t){return{left:t.cx+t.r*Math.sin(t.angle*a.RAD),top:t.cy-t.r*Math.cos(t.angle*a.RAD)}},_renderGraph:function(t,e,i){var n=s.bind(this.showTooltip,this,{allowNegativeTooltip:!!this.allowNegativeTooltip,seriesType:this.seriesType,chartType:this.chartType}),o={showTooltip:n,hideTooltip:s.bind(this.hideTooltip,this)},a=this._makeParamsForGraphRendering(t,e),r=this.seriesType,h=this.dataProcessor.seriesDataModelMap,l=[],u=0;return s.forEach(this.dataProcessor.seriesTypes,function(t){var e=!0;return t!==r?l.push(t):e=!1,e}),s.forEach(l,function(t){u+=h[t].baseGroups.length}),a.additionalIndex=u,this.graphRenderer.render(i,a,o)},resize:function(){o.prototype.resize.apply(this,arguments),this._moveLegendLines()},showTooltip:function(t,e,i,n,o){this.eventBus.fire("showTooltip",s.extend({indexes:{groupIndex:i,index:n},mousePosition:o},t))},hideTooltip:function(){this.eventBus.fire("hideTooltip")},_makeSeriesDataBySelection:function(t){return{indexes:{index:t,groupIndex:t}}},_getSeriesLabel:function(t,e){var i="";return this.options.showLegend&&(i=h.getEllipsisText(t,this.legendMaxWidth,this.theme.label)),this.options.showLabel&&(i+=(i?a.LABEL_SEPARATOR:"")+e),i},_pickPositionsFromSectorData:function(t){return s.map(this.seriesData.sectorData,function(e){return e.ratio?e[t]:null})},_addEndPosition:function(t,e){s.forEachArray(e,function(e){var i;e&&(i=s.extend({},e.middle),i.left-1&&e!==o,a&&!i||(this.onSelectSeries({chartType:this.chartType,indexes:{index:e,legendIndex:n.legendIndex}},i),a&&e>-1&&(this.prevClickedIndex=e)))},onMoveSeries:function(t){this._executeGraphRenderer(t,"moveMouseOnSeries")}});n.componentType="series",n.PieChartSeries=l,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType;return t.libType=e,t.chartType="heatmap",new s(t)}var o=i(81),a=i(83),r=i(6),s=r.defineClass(o,{init:function(t){this.colorSpectrum=t.colorSpectrum,o.call(this,t)},_makeSeriesData:function(){var t=this._makeBounds(),e=this._getSeriesDataModel();return{colorSpectrum:this.colorSpectrum,groupBounds:t,seriesDataModel:e,isAvailable:function(){return t&&t.length>0}}},_makeBound:function(t,e,i,n){var o=this.layout.dimension.height,a=t*i+this.layout.position.left,r=o-e*(n+1)+this.layout.position.top;return{end:{left:a,top:r,width:t,height:e}}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=this.layout.dimension,n=i.width/this.dataProcessor.getCategoryCount(!1),o=i.height/this.dataProcessor.getCategoryCount(!0);return e.map(function(e,i){return e.map(function(e,a){return t._makeBound(n,o,i,a)})})},onShowTooltip:function(t){var e=this._getSeriesDataModel(),i=t.indexes,n=e.getSeriesItem(i.groupIndex,i.index).ratio;this.eventBus.fire("showWedge",n)},_renderSeriesLabel:function(t){var e=this._getSeriesDataModel(),i=this.seriesData.groupBounds,n=this.theme.label,o=this.selectedLegendIndex,r=a.boundsToLabelPositions(e,i,n),s=e.map(function(t){return t.valuesMap.value});return this.graphRenderer.renderSeriesLabel(t,r,s,n,o)},resize:function(){this.boundMap=null,o.prototype.resize.apply(this,arguments)},_makeExportationSeriesData:function(t){return{x:t.indexes.groupIndex,y:t.indexes.index}}});n.componentType="series",n.HeatmapChartSeries=s,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartOptions.libType,i=t.chartTheme;return t.libType=e,t.chartType="treemap",t.chartBackground=i.chart.background,new u(t)}var o=i(81),a=i(96),r=i(83),s=i(8),h=i(11),l=i(6),u=l.defineClass(o,{init:function(t){o.call(this,t),this.theme.borderColor=this.theme.borderColor||s.TREEMAP_DEFAULT_BORDER,this.rootId=s.TREEMAP_ROOT_ID,this.startDepth=1,this.selectedGroup=null,this.boundMap=null,this.colorSpectrum=t.colorSpectrum,this._initOptions()},_initOptions:function(){this.options.useColorValue=!!this.options.useColorValue,l.isUndefined(this.options.zoomable)&&(this.options.zoomable=!this.options.useColorValue),l.isUndefined(this.options.useLeafLabel)&&(this.options.useLeafLabel=!this.options.zoomable)},_makeSeriesData:function(){var t=this._getBoundMap(),e=this._makeBounds(t);return{boundMap:t,groupBounds:e,seriesDataModel:this._getSeriesDataModel(),startDepth:this.startDepth,isPivot:!0,colorSpectrum:this.options.useColorValue?this.colorSpectrum:null,chartBackground:this.chartBackground,zoomable:this.options.zoomable,isAvailable:function(){return e&&e.length>0}}},_makeBoundMap:function(t,e,i){var n,o=this,r=this._getSeriesDataModel(),s=l.extend({},this.layout.dimension,this.layout.position);return i=i||s,n=r.findSeriesItemsByParent(t),e=l.extend(e||{},a.squarify(i,n)),l.forEachArray(n,function(t){e=o._makeBoundMap(t.id,e,e[t.id])}),e},_makeBounds:function(t){var e,i=this.startDepth,n=this._getSeriesDataModel();return e=this.options.zoomable?function(t){return t.depth===i}:function(t){return!t.hasChild},n.map(function(i){return i.map(function(i){var n=t[i.id],o=null;return n&&e(i)&&(o={end:n}),o},!0)},!0)},_getBoundMap:function(){return this.boundMap||(this.boundMap=this._makeBoundMap(this.rootId)),this.boundMap},_shouldDimmed:function(t,e,i){var n,o=!1;return e&&i.id!==e.id&&i.group===e.group&&(n=t.findParentByDepth(i.id,e.depth+1),n&&n.parent===e.id&&(o=!0)),o},_renderSeriesLabel:function(t){var e,i,n,o=this._getSeriesDataModel(),a=this._getBoundMap(),s=this.theme.label,h=this.options.labelTemplate;return i=this.options.useLeafLabel?o.findLeafSeriesItems(this.selectedGroup):o.findSeriesItemsByDepth(this.startDepth,this.selectedGroup),n=l.map(i,function(t){var e=h?h(t.pickLabelTemplateData()):t.label;return e}),e=r.boundsToLabelPostionsForTreemap(i,a,s),this.graphRenderer.renderSeriesLabelForTreemap(t,e,n,s)},resize:function(){this.boundMap=null,o.prototype.resize.apply(this,arguments)},_zoom:function(t,e,i){this._clearSeriesContainer(),this.boundMap=null,this.rootId=t,this.startDepth=e,this.selectedGroup=i,this._renderSeriesArea(this.paper,l.bind(this._renderGraph,this)),this.animateComponent(!0)},zoom:function(t){var e,i,n=t.index;return this.labelSet.remove(),n===-1?void this._zoom(s.TREEMAP_ROOT_ID,1,null):(e=this._getSeriesDataModel(),i=e.getSeriesItem(0,n,!0),void(i&&i.hasChild&&(this._zoom(i.id,i.depth+1,i.group),this.eventBus.fire("afterZoom",n))))},_makeExportationSeriesData:function(t){var e=t.indexes,i=this._getSeriesDataModel().getSeriesItem(e.groupIndex,e.index,!0);return l.extend({chartType:this.chartType,indexes:i.indexes})},onHoverSeries:function(t){h.isShowLabel(this.options)&&this.graphRenderer.showAnimation(t,this.options.useColorValue,.6)},onHoverOffSeries:function(t){h.isShowLabel(this.options)&&t&&this.graphRenderer.hideAnimation(t,this.options.useColorValue)},onShowTooltip:function(t){var e=this._getSeriesDataModel(),i=t.indexes,n=e.getSeriesItem(i.groupIndex,i.index,!0).colorRatio;n>-1&&this.eventBus.fire("showWedge",n)}});n.componentType="series",n.TreemapChartSeries=u,t.exports=n},function(t,e,i){"use strict";var n=i(45),o=i(10),a=i(6),r={boundMap:{},_makeBaseBound:function(t){return a.extend({},t)},_calculateScale:function(t,e,i){return e*i/n.sum(t)},_makeBaseData:function(t,e,i){var n=this._calculateScale(a.pluck(t,"value"),e,i),o=a.map(t,function(t){return{id:t.id,weight:t.value*n}}).sort(function(t,e){return e.weight-t.weight});return o},_worst:function(t,e,i,n){var o=t*t,a=n*n;return Math.max(a*i/o,o/(a*e))},_changedStackDirection:function(t,e,i,n){var a=o.min(e),r=o.max(e),s=this._worst(t,a,r,i),h=this._worst(t+n,Math.min(a,n),Math.max(r,n),i);return h>=s},_isVerticalStack:function(t){return t.height=0?(e.plusTop-=c,s=p+e.plusTop):(s=p+e.minusTop,e.minusTop+=c),h=e.left+t.pointInterval-t.barSize/2,u=l.map(n.outliers,function(e){return{top:t.baseBarSize*(1-e.ratio)+f,left:h+t.barSize/2}}),{start:{top:p,left:h,width:t.barSize,height:0},end:{top:s,left:h,width:t.barSize,height:c},min:{top:t.baseBarSize*(1-n.minRatio)+f,left:h,width:t.barSize,height:0},max:{top:t.baseBarSize*(1-n.maxRatio)+f,left:h,width:t.barSize,height:0},median:{top:t.baseBarSize*(1-n.medianRatio)+f,left:h,width:t.barSize,height:0},outliers:u}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=s.isValidStackOption(this.options.stackType),n=this.layout.dimension,o=this._makeBaseDataForMakingBound(n.width,n.height);return e.map(function(e,n){var a=n*o.groupSize+t.layout.position.left,r={baseLeft:a,left:a,plusTop:0,minusTop:0,prevStack:null},s=l.bind(t._makeBoxplotChartBound,t,o,r,i);return e.map(s)})},_calculateLeftPositionOfSumLabel:function(t,e){var i=h.getRenderedLabelWidth(e,this.theme.label);return t.left+(t.width-i+r.TEXT_PADDING)/2}});a.mixin(u),n.componentType="series",n.BoxplotChartSeries=u,t.exports=n},function(t,e,i){"use strict";function n(t){var e=t.chartTheme;return t.libType=t.chartOptions.libType,t.chartType="bullet",t.chartBackground=e.chart.background,new h(t)}var o=i(81),a=i(7),r=i(8),s=i(6),h=s.defineClass(o,{init:function(t){o.call(this,t),this.isVertical=t.isVertical},_makeSeriesData:function(){var t=this._makeBounds();return{groupBounds:t,seriesDataModel:this._getSeriesDataModel(),isVertical:this.isVertical,isAvailable:function(){return t&&t.length>0}}},_makeBounds:function(){var t=this,e=this._getSeriesDataModel(),i=this._makeBaseDataForMakingBound(),n={renderedItemCount:0,top:i.categoryAxisTop,left:i.categoryAxisLeft};return e.map(function(e){var o=s.bind(t._makeBulletChartBound,t,i,n),a=e.map(o);return t._updateIterationData(n,i.itemWidth),a})},_makeBaseDataForMakingBound:function(){var t,e,i,n=this._getSeriesDataModel().getGroupCount(),o=this.layout.dimension,a=o.width,r=o.height,s=this.layout.position,h=s.top,l=s.left;return this.isVertical?(h+=r,t=a,e=r):(t=r,e=a),i=t/n,{categoryAxisTop:h,categoryAxisLeft:l,categoryAxisWidth:t,valueAxisWidth:e,itemWidth:i}},_makeBulletChartBound:function(t,e,i){var n,o=i.type;return o===r.BULLET_TYPE_ACTUAL?n=this._makeBarBound(i,r.BULLET_ACTUAL_HEIGHT_RATIO,t,e):o===r.BULLET_TYPE_RANGE?n=this._makeBarBound(i,r.BULLET_RANGES_HEIGHT_RATIO,t,e):o===r.BULLET_TYPE_MARKER&&(n=this._makeLineBound(i,r.BULLET_MARKERS_HEIGHT_RATIO,t,e)),n.type=o,n},_makeBarBound:function(t,e,i,n){var o,a=i.itemWidth*e,r=i.valueAxisWidth*t.ratioDistance,s=i.valueAxisWidth*t.endRatio;return o=this.isVertical?this._makeVerticalBarBound(n,i,a,r,s):this._makeHorizontalBarBound(n,i,a,r,s)},_makeVerticalBarBound:function(t,e,i,n,o){return{top:t.top-o,left:t.left+(e.itemWidth-i)/2,width:i,height:n}},_makeHorizontalBarBound:function(t,e,i,n,o){return{top:t.top+(e.itemWidth-i)/2,left:t.left+o-n,width:n,height:i}},_makeLineBound:function(t,e,i,n){var o,a,s=i.itemWidth*e,h=i.valueAxisWidth*t.endRatio,l=r.BULLET_MARKER_DETECT_PADDING,u=r.BULLET_MARKER_DETECT_PADDING;return this.isVertical?(o=n.top-h,a=n.left+(i.itemWidth-s)/2,l=s):(o=n.top+(i.itemWidth-s)/2,a=n.left+h,u=s),{top:o,left:a,length:s,width:l,height:u}},_updateIterationData:function(t,e){t.renderedItemCount+=1,this.isVertical?t.left+=e:t.top+=e},_renderSeriesArea:function(t,e){o.prototype._renderSeriesArea.call(this,t,e),this.dataProcessor.setGraphColors(this.graphRenderer.getGraphColors())},_renderSeriesLabel:function(t){var e=this.theme.label,i=this._getSeriesDataModel(),n=this._getLabelTexts(i),o=this._calculateLabelPositions(i,e);return this.graphRenderer.renderSeriesLabel(t,o,n,e)},_getLabelTexts:function(t){return t.map(function(t){var e=[];return t.each(function(t){t.type!==r.BULLET_TYPE_RANGE&&e.push(t.endLabel)}),e})},_calculateLabelPositions:function(t,e){var i=this.seriesData.groupBounds,n=a.getRenderedLabelHeight(r.MAX_HEIGHT_WORD,e);return s.map(i,function(t){var e=[];return s.forEach(t,function(t){t.type!==r.BULLET_TYPE_RANGE&&e.push(this._makePositionByBound(t,n))},this),e},this)},_makePositionByBound:function(t,e){var i,n,o=t.top,a=t.left,r={};return this.isVertical?(i=t.width||t.length,r.top=o-e,r.left=a+i/2):(i=t.width||0,n=t.height||t.length,r.top=o+n/2,r.left=a+5+(i||0)),r}});n.componentType="series",n.BulletChartSeries=h,t.exports=n},function(t,e,i){"use strict";function n(t){return new c(t)}var o=i(6),a=o.browser.msie&&o.browser.version<=8,r=i(100),s=i(8),h=i(9),l=i(7),u=i(55),c=o.defineClass({className:"tui-chart-zoom-area",init:function(t){this.eventBus=t.eventBus,this.magn=1,this.stackedWheelDelta=0,this.drawingType=s.COMPONENT_TYPE_DOM,this._attachToEventBus()},_attachToEventBus:function(){this.eventBus.on("wheel",this.onWheel,this)},render:function(t){var e;return a||(e=h.create("DIV",this.className),e.innerHTML+=r.ZOOM_BUTTONS,l.renderPosition(e,t.positionMap.series),this._attachEvent(e)),e},_findBtnElement:function(t){var e="tui-chart-zoom-btn",i=t;return h.hasClass(t,e)||(i=h.findParentByClass(t,e)),i},_zoom:function(t,e){this.eventBus.fire("zoomMap",t,e)},_onClick:function(t){var e=t.target||t.srcElement,i=this._findBtnElement(e),n=i.getAttribute("data-magn"),o=this._calculateMagn(n);return o>5?this.magn=5:o<1?this.magn=1:o>=1&&this._zoom(o),t.preventDefault&&t.preventDefault(),!1},_attachEvent:function(t){u.on(t,"click",this._onClick,this)},_calculateMagn:function(t){return t>0?this.magn+=.1:t<0&&(this.magn-=.1),this.magn},onWheel:function(t,e){var i=this._calculateMagn(t);i>5?this.magn=5:i<1?this.magn=1:i>=1&&this._zoom(i,e)}});n.componentType="zoom",t.exports=n},function(t,e,i){"use strict";var n=i(65),o={HTML_SERIES_LABEL:'
{{ label }}
',TEXT_CSS_TEXT:"left:{{ left }}px;top:{{ top }}px;font-family:{{ fontFamily }};font-size:{{ fontSize }}px;font-weight:{{ fontWeight }}{{opacity}}",TEXT_CSS_TEXT_FOR_LINE_TYPE:"left:{{ left }}%;top:{{ top }}%;font-family:{{ fontFamily }};font-size:{{ fontSize }}px;font-weight:{{ fontWeight }}{{opacity}}",HTML_ZOOM_BUTTONS:'
',HTML_SERIES_BLOCK:'
{{ label }}
'};t.exports={tplSeriesLabel:n.template(o.HTML_SERIES_LABEL),tplCssText:n.template(o.TEXT_CSS_TEXT),tplCssTextForLineType:n.template(o.TEXT_CSS_TEXT_FOR_LINE_TYPE),ZOOM_BUTTONS:o.HTML_ZOOM_BUTTONS,tplSeriesBlock:n.template(o.HTML_SERIES_BLOCK)}},function(t,e,i){"use strict";var n=i(8),o=i(102),a=i(103),r=i(107),s=i(109),h=i(110),l=i(104),u=i(31),c=i(11),d=i(7),p=i(45),f=i(36),m=i(6),g=Array.prototype.concat,_=m.isUndefined,T=m.defineClass(o,{init:function(t,e,i,n){this.originalRawData=f.deepCopy(t),this.chartType=e,this.options=i,this.seriesTypes=n,this.originalLegendData=null,this.dynamicData=[],this.defaultValues=[0,500],this.initData(t),this.initZoomedRawData(),this.baseInit()},getOriginalRawData:function(){return f.deepCopy(this.originalRawData)},getZoomedRawData:function(){var t=this.zoomedRawData;return t=t?f.deepCopy(t):this.getOriginalRawData()},_filterSeriesDataByIndexRange:function(t,e,i){return m.forEachArray(t,function(t){t.data=t.data.slice(e,i+1)}),t},_filterRawDataByIndexRange:function(t,e){var i=this,n=e[0],o=e[1];return m.forEach(t.series,function(e,a){t.series[a]=i._filterSeriesDataByIndexRange(e,n,o)}),t.categories&&(t.categories=t.categories.slice(n,o+1)),t},updateRawDataForZoom:function(t){var e=this.getRawData(),i=this.getZoomedRawData();this.zoomedRawData=this._filterRawDataByIndexRange(i,t),e=this._filterRawDataByIndexRange(e,t),this.initData(e)},initZoomedRawData:function(){this.zoomedRawData=null},initData:function(t){this.rawData=t,this.categoriesMap=null,this.stacks=null,this.seriesDataModelMap={},this.seriesGroups=null,this.valuesMap={},this.legendLabels=null,this.legendData=null,this.multilineCategories=null,this.coordinateType=null},getRawData:function(){return this.rawData},findChartType:function(t){return u.findChartType(this.rawData.seriesAlias,t)},_escapeCategories:function(t){return m.map(t,function(t){return m.encodeHTMLEntity(String(t))})},_mapCategories:function(t,e){var i=e+"Axis",n=this.options[i]||{},o=!1;return o=m.isArray(n)?m.filter(n,function(t){return t.type&&c.isDatetimeType(t.type)}):n.type&&c.isDatetimeType(n.type),t=o?m.map(t,function(t){var e=new Date(t);return e.getTime()||t}):this._escapeCategories(t)},_processCategories:function(t){var e=this.rawData.categories,i={};return m.isArray(e)?i[t]=this._mapCategories(e,t):e&&(e.x&&(i.x=this._mapCategories(e.x,"x")),e.y&&(i.y=this._mapCategories(e.y,"y").reverse())),i},getCategories:function(t){var e=t?"y":"x",i=[];return this.categoriesMap||(this.categoriesMap=this._processCategories(e)),m.isExisty(t)?i=this.categoriesMap[e]||[]:m.forEach(this.categoriesMap,function(t){return i=t,!1}),i},getCategoryCount:function(t){var e=this.getCategories(t);return e?e.length:0},hasCategories:function(t){return!!this.getCategoryCount(t)},isXCountGreaterThanYCount:function(t){var e=this.getSeriesDataModel(t);return e.isXCountGreaterThanYCount()},hasXValue:function(t){var e=this.isXCountGreaterThanYCount(t);return!this.hasCategories(e)||e},hasYValue:function(t){var e=this.isXCountGreaterThanYCount(t);return!this.hasCategories(e)||!e},getCategory:function(t,e){return this.getCategories(e)[t]},findCategoryIndex:function(t){var e=this.getCategories(),i=null;return m.forEachArray(e,function(e,n){return e===t&&(i=n),m.isNull(i)}),i},findAbsoluteCategoryIndex:function(t){var e=this.originalRawData?this.originalRawData.categories:null,i=-1;return e?(m.forEach(e,function(e,n){var o=e===t;return o&&(i=n),!o}),i):i},_getTooltipCategory:function(t,e){var i=this.getCategory(t,e),n=e?"yAxis":"xAxis",o=this.options[n]||{},a=this.options.tooltip||{}; +return c.isDatetimeType(a.type)?i=d.formatDate(i,a.dateFormat):c.isDatetimeType(o.type)&&(i=d.formatDate(i,o.dateFormat)),i},makeTooltipCategory:function(t,e,i){var n=!i,o=this._getTooltipCategory(t,n),a=this.getCategoryCount(!n);return a&&(o+=", "+this._getTooltipCategory(a-e-1,!n)),o},getStacks:function(t){return this.stacks||(this.stacks=u.pickStacks(this.rawData.series[t])),this.stacks},getStackCount:function(t){return this.getStacks(t).length},findStackIndex:function(t){return m.inArray(t,this.getStacks())},isCoordinateType:function(){var t=this.chartType,e=this.coordinateType;return m.isExisty(e)||(e=c.isCoordinateTypeChart(t),e=e||c.isLineScatterComboChart(t,this.seriesTypes),e=e||c.isLineTypeChart(t)&&!this.hasCategories(),this.coordinateType=e),e},getSeriesDataModel:function(t){var e,i,n;return this.seriesDataModelMap[t]||(i=this.findChartType(t),e=this.rawData.series[t],n=c.isBoxplotChart(this.chartType)?r:c.isTreemapChart(this.chartType)?h:c.isBulletChart(this.chartType)?s:a,this.seriesDataModelMap[t]=new n(e,i,this.options,this.getFormatFunctions(),this.isCoordinateType())),this.seriesDataModelMap[t]},getGroupCount:function(t){return this.getSeriesDataModel(t).getGroupCount()},_pushCategory:function(t){this.rawData.categories&&(this.rawData.categories.push(t),this.originalRawData.categories.push(t))},_shiftCategory:function(){this.rawData.categories&&(this.rawData.categories.shift(),this.originalRawData.categories.shift())},_findRawSeriesDatumByName:function(t,e){var i=null,n=this.rawData.series[e];return m.forEachArray(n,function(e){var n=e.name===t;return n&&(i=e),!n}),i},_pushValue:function(t,e,i){var n=this._findRawSeriesDatumByName(t.name,i);t.data.push(e),n&&n.data.push(e)},_pushValues:function(t,e,i){var n=this;m.forEachArray(t,function(t,o){n._pushValue(t,e[o],i)})},_pushSeriesData:function(t){var e,i=this;"combo"!==this.chartType&&m.isArray(t)&&(e=t,t={},t[this.chartType]=e),m.forEach(this.originalRawData.series,function(e,n){i._pushValues(e,t[n],n)})},_shiftValues:function(t,e){var i=this;m.forEachArray(t,function(t){var n=i._findRawSeriesDatumByName(t.name,e);t.data.shift(),n&&n.data.shift()})},_shiftSeriesData:function(){var t=this;m.forEach(this.originalRawData.series,function(e,i){t._shiftValues(e,i)})},addDynamicData:function(t,e){this.dynamicData.push({category:t,values:e})},_pushDynamicData:function(t){this._pushCategory(t.category),this._pushSeriesData(t.values)},_pushDynamicDataForCoordinateType:function(t){var e=this;m.forEachArray(this.originalRawData.series,function(i){e._pushValue(i,t[i.name])})},addDataFromDynamicData:function(){var t=this.dynamicData.shift();return t&&(this.isCoordinateType()?this._pushDynamicDataForCoordinateType(t.values):this._pushDynamicData(t),this.initData(this.rawData)),!!t},shiftData:function(){this._shiftCategory(),this._shiftSeriesData(),this.initData(this.rawData)},addDataFromRemainDynamicData:function(t){var e=this,i=this.dynamicData;this.dynamicData=[],m.forEach(i,function(i){e._pushCategory(i.category),e._pushSeriesData(i.values),t&&(e._shiftCategory(),e._shiftSeriesData())}),this.initData(this.rawData)},_eachByAllSeriesDataModel:function(t){var e=this,i=this.seriesTypes||[this.chartType];m.forEachArray(i,function(i){return t(e.getSeriesDataModel(i),i)})},isValidAllSeriesDataModel:function(){var t=!0;return this._eachByAllSeriesDataModel(function(e){return t=!!e.getGroupCount()}),t},_makeSeriesGroups:function(){var t,e=[];return this._eachByAllSeriesDataModel(function(t){t.each(function(t,i){e[i]||(e[i]=[]),e[i]=e[i].concat(t.items)})}),t=m.map(e,function(t){return new l(t)})},getSeriesGroups:function(){return this.seriesGroups||(this.seriesGroups=this._makeSeriesGroups()),this.seriesGroups},getValue:function(t,e,i){return this.getSeriesDataModel(i).getValue(t,e)},getDefaultDatetimeValues:function(){var t=36e5,e=Date.now();return[e-t,e]},isSeriesDataEmpty:function(t){var e=this.rawData,i=e&&!e.series;return!e||i||!e.series[t]||e.series[t]&&!e.series[t].length},isLimitOptionsEmpty:function(t){var e=this.options[t]||{};return _(e.min)&&_(e.max)},isLimitOptionsInsufficient:function(t){var e=this.options[t]||{};return _(e.min)||_(e.max)},_createValues:function(t,e,i){var n,o,a=this.options,r=a.plot,s=a[i]||{},h=s.type,l=this.isSeriesDataEmpty(t),u=this.isLimitOptionsEmpty(i),d=this.isLimitOptionsInsufficient(i),p=c.isLineChart(t)||c.isAreaChart(t)||c.isLineAreaComboChart(t,this.seriesTypes),f=this.defaultValues;return c.isComboChart(t)?(n=[],this._eachByAllSeriesDataModel(function(t){n=n.concat(t.getValues(e))})):l&&d?(!u&&d&&(f=f.concat([s.min||s.max])),"x"===e&&"datetime"===h?(n=this.getDefaultDatetimeValues(),p&&r&&(o=this.getValuesFromPlotOptions(r,h),n=n.concat(o))):n=f):n=this.getSeriesDataModel(t).getValues(e),n},getValuesFromPlotOptions:function(t,e){var i=[];return t.lines&&m.forEach(t.lines,function(t){i.push("datetime"!==e?t.value:new Date(t.value))}),t.bands&&m.forEach(t.bands,function(t){var n=m.map(t.range,function(t){return"datetime"!==e?t:new Date(t)});i=i.concat(n)}),i},getValues:function(t,e,i){var n;return n=t+e,this.valuesMap[n]||(this.valuesMap[n]=this._createValues(t,e,i)),this.valuesMap[n]},eachBySeriesGroup:function(t,e){this._eachByAllSeriesDataModel(function(i,n){i.each(function(e,i){t(e,i,n)},e)})},_pickLegendLabel:function(t){return t.name?m.encodeHTMLEntity(t.name):null},_isVisibleLegend:function(t){var e=!0;return m.isExisty(t.visible)&&t.visible===!1&&(e=!1),e},_pickLegendData:function(t){var e,i=this.rawData.series,n={};return"visibility"===t?e=this._isVisibleLegend:"label"===t&&(e=this._pickLegendLabel),e&&(m.forEach(i,function(t,i){n[i]=m.map(t,e)}),n=m.filter(n,m.isExisty)),n},getLegendLabels:function(t){return this.legendLabels||(this.legendLabels=this._pickLegendData("label")),this.legendLabels[t]||this.legendLabels},getLegendVisibility:function(t){return this.legendVisibilities||(this.legendVisibilities=this._pickLegendData("visibility")),this.legendVisibilities[t]||this.legendVisibilities},_makeLegendData:function(){var t,e,i=this.getLegendLabels(this.chartType),n=this.seriesTypes||[this.chartType],o=this.getLegendVisibility();return m.isArray(i)?(t=[this.chartType],t[this.chartType]=i):(n=this.seriesTypes,t=i),e=m.map(n,function(e){return m.map(t[e],function(t,i){var n=m.isArray(o[e]);return{chartType:e,label:t,visible:n?o[e][i]:o[i]}})}),g.apply([],e)},getLegendData:function(){return this.legendData||(this.legendData=this._makeLegendData()),this.originalLegendData||(this.originalLegendData=this.legendData),this.legendData},getOriginalLegendData:function(){return this.originalLegendData},getLegendItem:function(t){return this.getLegendData()[t]},getFirstItemLabel:function(t){return this.getSeriesDataModel(t).getFirstItemLabel()},addDataRatiosOfPieChart:function(t){this.getSeriesDataModel(t).addDataRatiosOfPieChart()},addDataRatiosForCoordinateType:function(t,e,i){c.isLineTypeChart(t)&&this._addStartValueToAllSeriesItem(e.yAxis,t),this.getSeriesDataModel(t).addDataRatiosForCoordinateType(e,i)},_addStartValueToAllSeriesItem:function(t,e){var i=0;t.min>=0?i=t.min:t.max<=0&&(i=t.max),this.getSeriesDataModel(e).addStartValueToAllSeriesItem(i)},addDataRatios:function(t,e,i){var n=this.getSeriesDataModel(i);this._addStartValueToAllSeriesItem(t,i),n.addDataRatios(t,e)},addDataRatiosForTreemapChart:function(t,e){this.getSeriesDataModel(e).addDataRatios(t)},_createBaseValuesForNormalStackedChart:function(t){var e=this.getSeriesDataModel(t),i=[];return e.each(function(t){var e=t._makeValuesMapPerStack();m.forEach(e,function(t){var e=p.sumPlusValues(t),n=p.sumMinusValues(t);i=i.concat([e,n])})}),i},createBaseValuesForLimit:function(t,e,i,n,o){var a;return c.isComboChart(this.chartType)&&e?(a=this.getValues(this.chartType,n),c.isNormalStackChart(t,i)&&(a=a.concat(this._createBaseValuesForNormalStackedChart(t)))):a=c.isTreemapChart(t)?this.getValues(t,"colorValue"):c.isNormalStackChart(t,i)?this._createBaseValuesForNormalStackedChart(t):this.getValues(t,n,o),a},findOverflowItem:function(t,e){var i=this.getSeriesDataModel(t),o=i.getMaxValue("r"),a=function(t){return t.r/o>n.HALF_RATIO};return{minItem:i.findMinSeriesItem(e,a),maxItem:i.findMaxSeriesItem(e,a)}},setGraphColors:function(t){this.graphColors=t},getGraphColors:function(){return this.graphColors}});t.exports=T},function(t,e,i){"use strict";var n=i(10),o=i(7),a=i(45),r=i(6),s=r.defineClass({baseInit:function(){this.formatFunctions=null},getValues:function(){},getMaxValue:function(t,e){return n.max(this.getValues(t,e))},getFormattedMaxValue:function(t,e,i){var n=this.getMaxValue(t,i),a=this.getFormatFunctions();return o.formatValue({value:n,formatFunctions:a,chartType:t,areaType:e,valueType:i})},_pickMaxLenUnderPoint:function(t){var e=0;return r.forEachArray(t,function(t){var i=a.getDecimalLength(t);i>e&&(e=i)}),e},_isZeroFill:function(t){return t.length>2&&"0"===t.charAt(0)},_isDecimal:function(t){var e=t.indexOf(".");return e>-1&&e-1},_formatToZeroFill:function(t,e){var i=e<0;return e=o.formatToZeroFill(Math.abs(e),t),(i?"-":"")+e},_formatToDecimal:function(t,e){return o.formatToDecimal(e,t)},_findSimpleTypeFormatFunctions:function(t){var e,i=[];if(this._isDecimal(t))e=this._pickMaxLenUnderPoint([t]),i=[r.bind(this._formatToDecimal,this,e)];else if(this._isZeroFill(t))return e=t.length,i=[r.bind(this._formatToZeroFill,this,e)];return this._isComma(t)&&i.push(o.formatToComma),i},_findFormatFunctions:function(){var t=r.pick(this.options,"chart","format"),e=[];return r.isFunction(t)?e=[t]:r.isString(t)&&(e=this._findSimpleTypeFormatFunctions(t)),e},getFormatFunctions:function(){return this.formatFunctions||(this.formatFunctions=this._findFormatFunctions()),this.formatFunctions}});t.exports=s},function(t,e,i){"use strict";var n=i(104),o=i(105),a=i(106),r=i(11),s=i(45),h=i(10),l=i(6),u=Array.prototype.concat,c=l.defineClass({init:function(t,e,i,n,o){this.chartType=e,this.options=i||{},this.formatFunctions=n,this.rawSeriesData=t||[],this.isCoordinateType=o,this.baseGroups=null,this.groups=null,this.options.series=this.options.series||{},this.isDivergingChart=r.isDivergingChart(e,this.options.series.diverging),this.valuesMap={},this._removeRangeValue()},_removeRangeValue:function(){var t=l.pick(this.options,"series")||{},e=r.isAllowRangeData(this.chartType)&&!r.isValidStackOption(t.stackType)&&!t.spline;e||this.isCoordinateType||l.forEachArray(this.rawSeriesData,function(t){l.isArray(t.data)&&l.forEachArray(t.data,function(e,i){l.isExisty(e)&&(t.data[i]=u.apply(e)[0])})})},_createBaseGroups:function(){var t,e,i=this.chartType,n=this.formatFunctions,s=this.options.xAxis,h=this.isDivergingChart,u=this.isCoordinateType,c=r.isPieChart(this.chartType),d=r.isHeatmapChart(this.chartType)||r.isTreemapChart(this.chartType);return u?(e=a,t=function(t){t.sort(function(t,e){return t.x-e.x})}):(e=o,t=function(){}),l.map(this.rawSeriesData,function(o){var a,r,p,f;return r=l.isArray(o)?o:[].concat(o.data),d||(a=o.stack),o.name&&(p=o.name),(u||c)&&(r=l.filter(r,l.isExisty)),f=l.map(r,function(t,o){return new e({datum:t,chartType:i,formatFunctions:n,index:o,legendName:p,stack:a,isDivergingChart:h,xAxisType:s.type,dateFormat:s.dateFormat})}),t(f),f})},_getBaseGroups:function(){return this.baseGroups||(this.baseGroups=this._createBaseGroups()),this.baseGroups},_createSeriesGroupsFromRawData:function(t){var e=this._getBaseGroups();return t&&(e=h.pivot(e)),l.map(e,function(t){return new n(t)})},_getSeriesGroups:function(){return this.groups||(this.groups=this._createSeriesGroupsFromRawData(!0)),this.groups},getGroupCount:function(){return this._getSeriesGroups().length},_getPivotGroups:function(){return this.pivotGroups||(this.pivotGroups=this._createSeriesGroupsFromRawData()),this.pivotGroups},getSeriesGroup:function(t,e){return e?this._getPivotGroups()[t]:this._getSeriesGroups()[t]},getFirstSeriesGroup:function(t){return this.getSeriesGroup(0,t)},getFirstItemLabel:function(){return this.getFirstSeriesGroup().getFirstSeriesItem().label},getSeriesItem:function(t,e,i){return this.getSeriesGroup(t,i).getSeriesItem(e)},getFirstSeriesItem:function(){return this.getSeriesItem(0,0)},getValue:function(t,e){return this.getSeriesItem(t,e).value},getMinValue:function(t){return h.min(this.getValues(t))},getMaxValue:function(t){return h.max(this.getValues(t))},_findSeriesItem:function(t){var e;return this.each(function(i){return e=i.find(t),!e}),e},_findSeriesItemByValue:function(t,e,i){return i=i||function(){return null},this._findSeriesItem(function(n){return n&&n[t]===e&&i(n)})},findMinSeriesItem:function(t,e){var i=this.getMinValue(t);return this._findSeriesItemByValue(t,i,e)},findMaxSeriesItem:function(t,e){var i=this.getMaxValue(t);return this._findSeriesItemByValue(t,i,e)},_createValues:function(t){var e=this.map(function(e){return e.getValues(t)});return e=u.apply([],e),l.filter(e,function(t){return!isNaN(t)})},getValues:function(t){return t=t||"value",this.valuesMap[t]||(this.valuesMap[t]=this._createValues(t)),this.valuesMap[t]},isXCountGreaterThanYCount:function(){return this.getValues("x").length>this.getValues("y").length},_addRatiosWhenNormalStacked:function(t){var e=Math.abs(t.max-t.min);this.each(function(t){t.addRatios(e)})},_calculateBaseRatio:function(){var t=this.getValues(),e=s.sumPlusValues(t),i=Math.abs(s.sumMinusValues(t)),n=e>0&&i>0?.5:1;return n},_addRatiosWhenPercentStacked:function(){var t=this._calculateBaseRatio();this.each(function(e){e.addRatiosWhenPercentStacked(t)})},_addRatiosWhenDivergingStacked:function(){this.each(function(t){var e=t.pluck("value"),i=s.sumPlusValues(e),n=Math.abs(s.sumMinusValues(e));t.addRatiosWhenDivergingStacked(i,n)})},_makeSubtractionValue:function(t){var e=r.allowMinusPointRender(this.chartType),i=0;return!e&&r.isMinusLimit(t)?i=t.max:(e||t.min>=0)&&(i=t.min),i},_addRatios:function(t){var e=Math.abs(t.max-t.min),i=this._makeSubtractionValue(t);this.each(function(t){t.addRatios(e,i)})},addDataRatios:function(t,e){var i=r.isAllowedStackOption(this.chartType);i&&r.isNormalStack(e)?this._addRatiosWhenNormalStacked(t):i&&r.isPercentStack(e)?this.isDivergingChart?this._addRatiosWhenDivergingStacked():this._addRatiosWhenPercentStacked():this._addRatios(t)},addDataRatiosOfPieChart:function(){this.each(function(t){var e=s.sum(t.pluck("value"));t.addRatios(e)})},addDataRatiosForCoordinateType:function(t,e){var i,n,o,a,r=t.xAxis,s=t.yAxis,u=e?h.max(this.getValues("r")):0;r&&(i=Math.abs(r.max-r.min),n=this._makeSubtractionValue(r)),s&&(o=Math.abs(s.max-s.min),a=this._makeSubtractionValue(s)),this.each(function(t){t.each(function(t){t&&(t.addRatio("x",i,n),t.addRatio("y",o,a),t.addRatio("r",u,0),l.isExisty(t.start)&&t.addRatio("start",o,a))})})},addStartValueToAllSeriesItem:function(t){this.each(function(e){e.addStartValueToAllSeriesItem(t)})},hasRangeData:function(){var t=!1;return this.each(function(e){return t=e.hasRangeData(),!t}),t},each:function(t,e){var i=e?this._getPivotGroups():this._getSeriesGroups();l.forEachArray(i,function(e,i){return t(e,i)})},map:function(t,e){var i=[];return this.each(function(e,n){i.push(t(e,n))},e),i}});t.exports=c},function(t,e,i){"use strict";var n=i(45),o=i(6),a=o.defineClass({init:function(t){this.items=t,this.valuesMap={},this.valuesMapPerStack=null},getSeriesItemCount:function(){return this.items.length},getSeriesItem:function(t){return this.items[t]},getFirstSeriesItem:function(){return this.getSeriesItem(0)},_createValues:function(t){var e=[];return this.each(function(i){i&&(o.isExisty(i[t])&&e.push(i[t]),o.isExisty(i.start)&&e.push(i.start))}),e},getValues:function(t){return t=t||"value",this.valuesMap[t]||(this.valuesMap[t]=this._createValues(t)),this.valuesMap[t]},_makeValuesMapPerStack:function(){var t={};return this.each(function(e){t[e.stack]||(t[e.stack]=[]),t[e.stack].push(e.value)}),t},getValuesMapPerStack:function(){return this.valuesMapPerStack||(this.valuesMapPerStack=this._makeValuesMapPerStack()),this.valuesMapPerStack},_makeSumMapPerStack:function(){var t=this.getValuesMapPerStack(),e={};return o.forEach(t,function(t,i){e[i]=n.sum(o.map(t,function(t){return Math.abs(t)}))}),e},addStartValueToAllSeriesItem:function(t){this.each(function(e){e&&e.addStart(t)})},addRatiosWhenPercentStacked:function(t){var e=this._makeSumMapPerStack();this.each(function(i){var n=e[i.stack];i.addRatio(n,0,t)})},addRatiosWhenDivergingStacked:function(t,e){this.each(function(i){var n=i.value>=0?t:e;i.addRatio(n,0,.5)})},addRatios:function(t,e){this.each(function(i){i&&i.addRatio(t,e)})},hasRangeData:function(){var t=!1;return this.each(function(e){return t=e&&e.isRange,!t}),t},each:function(t){o.forEachArray(this.items,t)},map:function(t){return o.map(this.items,t)},pluck:function(t){var e=o.filter(this.items,o.isExisty);return o.pluck(e,t)},find:function(t){var e;return this.each(function(i){return t(i)&&(e=i),!e}),e||null},filter:function(t){return o.filter(this.items,t)}});t.exports=a},function(t,e,i){"use strict";var n=i(8),o=i(7),a=i(45),r=i(11),s=i(6),h=s.defineClass({init:function(t){this.chartType=t.chartType,this.stack=t.stack||n.DEFAULT_STACK,this.isDivergingChart=t.isDivergingChart,this.formatFunctions=t.formatFunctions,this.isRange=!1,this.value=null,this.label=null,this.ratio=null,this.end=null,this.endLabel=null,this.endRatio=null,this.start=null,this.startLabel=null,this.startRatio=null,this.ratioDistance=null,r.isBulletChart(this.chartType)&&(this.type=t.type),this.legendName=t.legendName,this._initValues(t.datum,t.index)},_initValues:function(t,e){var i=this._createValues(t),n="makingSeriesLabel",a=i.length>1,r=i[0];this.value=this.end=r,this.index=e,this.isDivergingChart&&(r=Math.abs(r)),s.isNull(r)?this.label="":this.label=o.formatValue({value:r,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:n,legendName:this.legendName}),this.endLabel=this.label,a&&(this.addStart(i[1],!0),this._updateFormattedValueforRange(),this.isRange=!0)},_createValues:function(t){var e=s.map([].concat(t),function(t){return s.isNull(t)?null:parseFloat(t)});return e=e.sort(function(t,e){return t<0&&e<0?t-e:e-t})},addStart:function(t){s.isNull(this.start)&&(this.start=t,this.startLabel=o.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series",legendName:this.legendName}))},_updateFormattedValueforRange:function(){this.label=this.startLabel+" ~ "+this.endLabel},addRatio:function(t,e,i){t=t||1,i=i||1,e=e||0,this.ratio=this.endRatio=a.calculateRatio(this.value,t,e,i),s.isExisty(this.start)&&(this.startRatio=a.calculateRatio(this.start,t,e,i),this.ratioDistance=Math.abs(this.endRatio-this.startRatio))},_getFormattedValueForTooltip:function(t){return o.formatValue({value:this[t],formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t,legendName:this.legendName})},pickValueMapForTooltip:function(){var t={value:this._getFormattedValueForTooltip("value"),ratio:this.ratio};return s.isExisty(this.start)&&(t.start=this._getFormattedValueForTooltip("start"),t.end=this._getFormattedValueForTooltip("end"),t.startRatio=this.startRatio,t.endRatio=this.endRatio),t}});t.exports=h},function(t,e,i){"use strict";var n=i(11),o=i(7),a=i(6),r=a.defineClass({init:function(t){this.chartType=t.chartType,this.formatFunctions=t.formatFunctions,this.xAxisType=t.xAxisType,this.dateFormat=t.dateFormat,this.ratioMap={},this._initData(t.datum,t.index)},_initData:function(t,e){var i;a.isArray(t)?(this.x=t[0]||0,this.y=t[1]||0,n.isBubbleChart(this.chartType)?(this.r=t[2],this.label=t[3]||""):this.label=t[2]||""):(this.x=t.x,this.y=t.y,this.r=t.r,this.label=t.label||""),n.isDatetimeType(this.xAxisType)&&(i=a.isDate(this.x)?this.x:new Date(this.x),this.x=i.getTime()||0),this.index=e,this.label||(n.isLineTypeChart(this.chartType)&&n.isDatetimeType(this.xAxisType)?this.label=o.formatDate(this.x,this.dateFormat):this.label=o.formatValue({value:this.x,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series"}),this.label+=", "+o.formatValue({value:this.y,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series"}))},addStart:function(t){this.start=t},addRatio:function(t,e,i){!a.isExisty(this.ratioMap[t])&&e&&(this.ratioMap[t]=(this[t]-i)/e)},_getFormattedValueForTooltip:function(t){var e=this.ratioMap[t],i=this[t],n=o.formatValue({value:i,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t});return a.isNumber(e)?n:i},pickValueMapForTooltip:function(){var t={x:this._getFormattedValueForTooltip("x"),y:this._getFormattedValueForTooltip("y"),xRatio:this.ratioMap.x,yRatio:this.ratioMap.y};return a.isExisty(this.r)&&(t.r=this._getFormattedValueForTooltip("r"),t.rRatio=this.ratioMap.r),t}});t.exports=r},function(t,e,i){"use strict";var n=i(108),o=i(103),a=i(6),r=Array.prototype.concat,s=a.defineClass(o,{init:function(t,e,i,n){this.chartType=e,this.options=i||{},this.formatFunctions=n,this.rawSeriesData=t||[],this.baseGroups=null,this.groups=null,this.options.series=this.options.series||{},this.valuesMap={}},_createBaseGroups:function(){var t=this.chartType,e=this.formatFunctions;return a.map(this.rawSeriesData,function(i){var o=a.isArray(i)?i:[].concat(i.data),r=a.map(o,function(o,a){return new n({datum:o,chartType:t,formatFunctions:e,index:a,legendName:i.name})});return r})},_createValues:function(){var t=[];return this.map(function(e){a.forEach(e.items,function(e){t.push(e.min),t.push(e.max),t.push(e.uq),t.push(e.lq),t.push(e.median)})}),t=r.apply([],t),a.filter(t,function(t){return!isNaN(t)})}});t.exports=s},function(t,e,i){"use strict";var n=i(7),o=i(45),a=i(6),r=a.defineClass({init:function(t){this.chartType=t.chartType,this.formatFunctions=t.formatFunctions,this.value=null,this.label=null,this.ratio=null,this.min=null,this.minLabel=null,this.minRatio=null,this.max=null,this.maxLabel=null,this.maxRatio=null,this.median=null,this.medianLabel=null,this.medianRatio=null,this.lq=null,this.lqLabel=null,this.lqRatio=null,this.uq=null,this.uqLabel=null,this.uqRatio=null,this.ratioDistance=null,this.legendName=t.legendName,this._initValues(t.datum,t.index)},_initValues:function(t,e){var i,o=this._createValues(t),r=o[4],s=o[3],h=o[2],l=o[1],u=o[0],c=o.length>5,d=a.bind(function(t){return n.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"makingSeriesLabel",legendName:this.legendName})},this);this.value=this.max=r,this.uq=s,this.median=h,this.lq=l,this.min=u,this.index=e,c&&(this.outliers=[],i=this.outliers,a.forEach(o.slice(5),function(t){i.push({value:t,label:d(t)})})),this.label=d(r),this.uqLabel=d(s),this.medianLabel=d(h),this.lqLabel=d(l),this.minLabel=d(u),this.maxLabel=this.label},_createValues:function(t){var e=a.map([].concat(t),function(t){return a.isNull(t)?null:parseFloat(t)});return e},addStart:function(t){a.isNull(this.min)&&(this.min=t,this.minLabel=n.formatValue({value:t,formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"series",legendName:this.legendName}))},_updateFormattedValueforRange:function(){this.label=this.minLabel+" ~ "+this.maxLabel},addRatio:function(t,e,i){var n=o.calculateRatio;t=t||1,i=i||1,e=e||0,this.ratio=this.maxRatio=n(this.max,t,e,i),this.uqRatio=n(this.uq,t,e,i),this.medianRatio=n(this.median,t,e,i),this.lqRatio=n(this.lq,t,e,i),this.minRatio=n(this.min,t,e,i),a.forEach(this.outliers,function(o){o.ratio=n(o.value,t,e,i)}),this.ratioDistance=Math.abs(this.uqRatio-this.lqRatio)},_getFormattedValueForTooltip:function(t){return n.formatValue({value:this[t],formatFunctions:this.formatFunctions,chartType:this.chartType,areaType:"tooltip",valueType:t,legendName:this.legendName})},pickValueMapForTooltip:function(){var t={value:this._getFormattedValueForTooltip("value"),ratio:this.ratio};return a.isExisty(this.min)&&(t.min=this._getFormattedValueForTooltip("min"),t.max=this._getFormattedValueForTooltip("max"),t.minRatio=this.minRatio,t.maxRatio=this.maxRatio,t.maxLabel=this.maxLabel,t.minLabel=this.minLabel,t.uqLabel=this.uqLabel,t.lqLabel=this.lqLabel,t.medianLabel=this.medianLabel,t.outliers=this.outliers),t}});t.exports=r},function(t,e,i){"use strict";var n=i(105),o=i(103),a=i(8),r=i(6),s=r.defineClass(o,{init:function(t,e,i,n){o.call(this,t,e,i,n)},_createBaseGroups:function(){var t=this.chartType,e=this.formatFunctions,i=0,o=0,s=r.map(this.rawSeriesData,function(s){var h=[],l=s.data,u=s.markers,c=u.length,d=s.ranges,p=d.length;return d&&p&&(r.map(d,function(i){h.push(new n({datum:i,chartType:t,formatFunctions:e,type:a.BULLET_TYPE_RANGE}))}),i=Math.max(i,p)),l&&h.push(new n({datum:l,chartType:t,formatFunctions:e,type:a.BULLET_TYPE_ACTUAL})),u&&c&&(r.map(u,function(i){h.push(new n({datum:i,chartType:t,formabutFunctions:e,type:a.BULLET_TYPE_MARKER}))}),o=Math.max(o,c)),h});return this.maxMarkerCount=o,this.maxRangeCount=i,s},_createSeriesGroupsFromRawData:function(){return o.prototype._createSeriesGroupsFromRawData.call(this)}});t.exports=s},function(t,e,i){"use strict";var n=i(103),o=i(111),a=i(8),r=i(45),s=i(6),h=Array.prototype.slice,l=s.defineClass(n,{init:function(){n.apply(this,arguments),this.foundSeriesItemsMap={},this.seriesItemMap={}},_flattenHierarchicalData:function(t,e,i){var n,o=this,r=[];return e?n=e+"_":(n=a.TREEMAP_ID_PREFIX,e=a.TREEMAP_ROOT_ID),i=i||[],s.forEachArray(t,function(t,a){var h=n+a,l=t.children,u=i.concat(a);t.indexes=u,s.isNull(t.value)||r.push(t),t.id||(t.id=h),t.parent||(t.parent=e),l&&(r=r.concat(o._flattenHierarchicalData(l,h,u)),delete t.children)}),r},_partitionRawSeriesDataByParent:function(t,e){var i=[],n=[];return s.forEachArray(t,function(t){t.parent===e?i.push(t):n.push(t)}),[i,n]},_setTreeProperties:function(t,e,i,n){var o=this,a=this._partitionRawSeriesDataByParent(t,i),h=a[0],l=a[1],u=e+1;return s.forEachArray(h,function(t,i){var a,c;t.depth=e,t.group=s.isUndefined(n)?i:n,a=o._setTreeProperties(l,u,t.id,t.group),c=s.filter(a,function(t){return t.depth===u}),c.length?(t.value=r.sum(s.pluck(c,"value")),t.hasChild=!0):t.hasChild=!1,h=h.concat(a)}),h},_setRatio:function(t,e){var i=this,n=this._partitionRawSeriesDataByParent(t,e),o=n[0],a=n[1],h=r.sum(s.pluck(o,"value"));s.forEachArray(o,function(t){var e=s.isNull(t.value)?0:t.value;t.ratio=e/h,t.hasChild&&i._setRatio(a,t.id)})},_createBaseGroups:function(){var t=this.chartType,e=this.seriesItemMap,i=this.formatFunctions,n=this._flattenHierarchicalData(this.rawSeriesData);return n=this._setTreeProperties(n,1,a.TREEMAP_ROOT_ID),this._setRatio(n,a.TREEMAP_ROOT_ID),[s.map(n,function(n){var a=new o(n,i,t);return e[a.id]=a,a})]},_findSeriesItems:function(t,e){return this.foundSeriesItemsMap[t]||(this.foundSeriesItemsMap[t]=this.getFirstSeriesGroup(!0).filter(e)),this.foundSeriesItemsMap[t]},_makeCacheKey:function(t){var e=t;return arguments.length>1&&(e+=h.call(arguments,1).join("_")),e},_isValidGroup:function(t,e){return!s.isExisty(e)||t===e},findSeriesItemsByDepth:function(t,e){var i=this,n=this._makeCacheKey(a.TREEMAP_DEPTH_KEY_PREFIX,t,e);return this._findSeriesItems(n,function(n){return n.depth===t&&i._isValidGroup(n.group,e)})},findSeriesItemsByParent:function(t){var e=this._makeCacheKey(a.TREEMAP_PARENT_KEY_PREFIX,t);return this._findSeriesItems(e,function(e){return e.parent===t})},findLeafSeriesItems:function(t){var e=this,i=this._makeCacheKey(a.TREEMAP_LEAF_KEY_PREFIX,t);return this._findSeriesItems(i,function(i){return!i.hasChild&&e._isValidGroup(i.group,t)})},findParentByDepth:function(t,e){var i=this.seriesItemMap[t]||null;return i&&i.depth!==e&&(i=this.findParentByDepth(i.parent,e)),i},initSeriesItemsMap:function(){this.foundSeriesItemsMap=null}});t.exports=l},function(t,e,i){"use strict";var n=i(45),o=i(7),a=i(6),r=a.defineClass({init:function(t,e,i){this.chartType=i,this.formatFunctions=e,this.id=t.id,this.parent=t.parent,this.value=t.value,this.ratio=t.ratio,this.colorValue=t.colorValue,this.depth=t.depth,this.label=t.label||"",this.group=t.group,this.hasChild=!!t.hasChild,this.indexes=t.indexes},addRatio:function(t,e){t=t||1,e=e||0,this.colorRatio=n.calculateRatio(this.colorValue,t,e,1)||-1},pickValueMapForTooltip:function(){var t=this.formatFunctions,e=this.chartType,i=this.colorValue,n=o.formatValue({value:this.value,formatFunctions:t,chartType:e,areaType:"tooltipValue"}),r=(this.label?this.label+": ":"")+n,s={value:n,label:r,ratio:this.ratio};return a.isExisty(i)&&(s.colorValue=o.formatValue({value:i,formatFunctions:t,chartType:e,areaType:"tooltipColorValue"}),s.colorRatio=this.colorRatio),s},pickLabelTemplateData:function(){var t={value:this.value,ratio:this.ratio,label:this.label};return a.isExisty(this.colorValue)&&(t.colorValue=this.colorValue,t.colorValueRatio=this.ratio),t}});t.exports=r},function(t,e,i){"use strict";var n=i(113),o=i(119),a=i(8),r=i(11),s={_createBoundsModel:function(t,e){return new n({chartType:e.chartType,seriesTypes:e.seriesTypes,options:e.options,theme:e.theme,dataProcessor:t,hasAxes:e.hasAxes,isVertical:e.isVertical})},_createScaleDataModel:function(t,e,i){return new o({chartType:i.chartType,seriesTypes:i.seriesTypes,options:i.options,theme:i.theme,dataProcessor:t,boundsModel:e,hasRightYAxis:i.hasRightYAxis,addedDataCount:i.addedDataCount})},addYAxisScale:function(t,e,i,n){t.addScale(e,i&&i.options||n||{},{valueType:i.valueType||"value",areaType:i.areaType,chartType:i.chartType},i.additionalOptions)},_registerYAxisDimension:function(t,e,i,n,o){var a,r=t.get(n),s=null;r&&(a=i[n],a&&(s=a.limit),e.registerYAxisDimension(s,n,r.options,r.theme,o))},_setLayoutBoundsAndScale:function(t,e,i,n,o){var s,h=o.options,l=o.scaleOption||{},u=o.addingDataMode,c=o.isVertical;e.has("xAxis")&&i.registerXAxisHeight(),e.has("legend")&&(e.get("legend").colorSpectrum?i.registerSpectrumLegendDimension():i.registerLegendDimension()),l.yAxis&&this.addYAxisScale(n,"yAxis",l.yAxis,o.options.yAxis),l.rightYAxis&&this.addYAxisScale(n,"rightYAxis",l.rightYAxis),l.legend&&n.addScale("legend",{},{chartType:o.chartType},{tickCounts:[a.SPECTRUM_LEGEND_TICK_COUNT]}),s=n.scaleDataMap,this._registerYAxisDimension(e,i,s,"yAxis",c),this._registerYAxisDimension(e,i,s,"rightYAxis",c),l.xAxis&&n.addScale("xAxis",h.xAxis,{valueType:l.xAxis.valueType||"value"},l.xAxis.additionalOptions),o.hasAxes&&n.setAxisDataMap(),i.registerSeriesDimension(),e.has("circleLegend")&&h.circleLegend.visible&&i.registerCircleLegendDimension(n.axisDataMap),e.has("xAxis")&&(r.isAutoTickInterval(h.xAxis.tickInterval)&&n.updateXAxisDataForAutoTickInterval(o.prevXAxisData,u),n.updateXAxisDataForLabel(u)),i.registerBoundsData(n.axisDataMap.xAxis)},build:function(t,e,i){var n,o=this._createBoundsModel(t,i),a=this._createScaleDataModel(t,o,i);return this._setLayoutBoundsAndScale(t,e,o,a,i),n={dimensionMap:o.dimensionMap,positionMap:o.positionMap,limitMap:a.makeLimitMap(i.seriesTypes||[i.chartType],i.isVertical)},a.axisDataMap&&(n.axisDataMap=a.axisDataMap),r.isBubbleChart(i.chartType)&&(n.maxRadius=o.calculateMaxRadius(a.axisDataMap)),a.scaleDataMap.legend&&(n.legendScaleData=a.scaleDataMap.legend),n}};t.exports=s},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r=i(5),s=i(114),h=i(115),l=i(116),u=i(117),c=i(118),d=i(6),p=d.defineClass({init:function(t){this.options=t.options||{},this.options.legend=this.options.legend||{},this.options.yAxis=this.options.yAxis||{},this.theme=t.theme||{},this.hasAxes=t.hasAxes,this.chartType=t.chartType,this.seriesTypes=t.seriesTypes||[],this.dataProcessor=t.dataProcessor,this.initBoundsData()},initBoundsData:function(){this.dimensionMap={legend:{width:0},yAxis:{width:0},rightYAxis:{width:0},xAxis:{height:0},circleLegend:{width:0},chartExportMenu:{width:0}},this.positionMap={},this.chartLeftPadding=n.CHART_PADDING,this.maxRadiusForBubbleChart=null,this._registerChartDimension(),this._registerTitleDimension(),this._registerChartExportMenuDimension()},_registerDimension:function(t,e){this.dimensionMap[t]=d.extend(this.dimensionMap[t]||{},e)},getBound:function(t){return{dimension:this.dimensionMap[t]||{},position:this.positionMap[t]||{} +}},_setBound:function(t,e){this.dimensionMap[t]=e.dimension,this.positionMap[t]=e.position},getDimension:function(t){return this.dimensionMap[t]},getDimensionMap:function(t){var e=this,i={};return t&&t.length?d.forEachArray(t,function(t){i[t]=e.dimensionMap[t]}):i=this.dimensionMap,JSON.parse(JSON.stringify(i))},getPosition:function(t){return this.positionMap[t]},_registerChartDimension:function(){var t=this.options.chart||{},e={width:t.width||n.CHART_DEFAULT_WIDTH,height:t.height||n.CHART_DEFAULT_HEIGHT};this._registerDimension("chart",e)},_registerTitleDimension:function(){var t=this.options.chart||{},e=d.isExisty(t.title),i=e?r.getRenderedTextSize(t.title.text,this.theme.title.fontSize,this.theme.title.fontFamily).height:0,o={height:i?i+n.TITLE_PADDING:0};this._registerDimension("title",o)},_registerChartExportMenuDimension:function(){var t;t=this.options.chartExportMenu.visible?{height:17+n.CHART_PADDING,width:60}:{width:0,height:0},this._registerDimension("chartExportMenu",t)},registerXAxisHeight:function(){this._registerDimension("xAxis",{height:h.calculateXAxisHeight(this.options.xAxis,this.theme.xAxis)})},registerLegendDimension:function(){var t=d.pluck(this.dataProcessor.getOriginalLegendData(),"label"),e=this.options.legend,i=this.theme.legend.label,n=this.getDimension("chart").width,o=l.calculate(e,i,t,n);this._registerDimension("legend",o)},registerSpectrumLegendDimension:function(){var t,e=this.dataProcessor.getFormattedMaxValue(this.chartType,"legend"),i=this.theme.label;t=o.isHorizontalLegend(this.options.legend.align)?c._makeHorizontalDimension(e,i):c._makeVerticalDimension(e,i),this._registerDimension("legend",t)},registerYAxisDimension:function(t,e,i,n,a){var r,s;if(t)r=[t.min,t.max];else{if(!o.isHeatmapChart(this.chartType)&&a)return;r=this.dataProcessor.getCategories(!0)}s=d.isArray(i)?"yAxis"===e?i[0]:i[1]:i,this._registerDimension(e,{width:h.calculateYAxisWidth(r,s,n)})},calculateSeriesWidth:function(){var t=this.getDimensionMap(["chart","yAxis","legend","rightYAxis"]);return u.calculateWidth(t,this.options.legend)},calculateSeriesHeight:function(){var t=this.getDimensionMap(["chart","title","legend","xAxis","chartExportMenu"]);return u.calculateHeight(t,this.options.legend,this.chartType,this.theme.series)},getBaseSizeForLimit:function(t){var e;return e=t?this.calculateSeriesHeight():this.calculateSeriesWidth()},_makeSeriesDimension:function(){return{width:this.calculateSeriesWidth(),height:this.calculateSeriesHeight()}},registerSeriesDimension:function(){var t=this._makeSeriesDimension();this._registerDimension("series",t)},_updateLegendAndSeriesWidth:function(t,e){var i=this.options.legend;o.isVerticalLegend(i.align)&&i.visible&&this._registerDimension("legend",{width:t}),this._registerDimension("series",{width:this.getDimension("series").width-e})},registerCircleLegendDimension:function(t){var e,i,a=this.getDimension("series"),r=this.options.legend,h=this.dataProcessor.getFormattedMaxValue(this.chartType,"circleLegend","r"),l=this.theme.chart.fontFamily,u=s.calculateCircleLegendWidth(a,t,h,l);e=o.isVerticalLegend(r.align)&&r.visible?this.getDimension("legend").width:0,u=Math.min(u,Math.max(e,n.MIN_LEGEND_WIDTH)),i=u-e,this._registerDimension("circleLegend",{width:u,height:u}),i>0&&this._updateLegendAndSeriesWidth(u,i)},_makePlotDimension:function(){var t=this.getDimension("series");return{width:t.width,height:t.height+n.OVERLAPPING_WIDTH}},_registerCenterComponentsDimension:function(){var t=this.getDimension("series");this._registerDimension("tooltip",t),this._registerDimension("mouseEventDetector",t)},_registerAxisComponentsDimension:function(){var t=this._makePlotDimension();this._registerDimension("plot",t),this._registerDimension("xAxis",{width:t.width}),this._registerDimension("yAxis",{height:t.height}),this._registerDimension("rightYAxis",{height:t.height})},_updateDimensionsWidth:function(t){var e=Math.max(t.overflowLeft,0),i=Math.max(t.overflowRight,0),n=e+i;this.chartLeftPadding+=e,this.dimensionMap.plot.width-=n,this.dimensionMap.series.width-=n,this.dimensionMap.mouseEventDetector.width-=n,this.dimensionMap.xAxis.width-=n},_updateDimensionsHeight:function(t){this.dimensionMap.plot.height-=t,this.dimensionMap.series.height-=t,this.dimensionMap.mouseEventDetector.height-=t,this.dimensionMap.tooltip.height-=t,this.dimensionMap.yAxis.height-=t,this.dimensionMap.rightYAxis.height-=t,this.dimensionMap.xAxis.height+=t},_updateDimensionsForXAxisLabel:function(t){(t.overflowRight>0||t.overflowLeft>0)&&this._updateDimensionsWidth(t),t.overflowHeight&&this._updateDimensionsHeight(t.overflowHeight)},_registerAxisComponentsPosition:function(t){var e=this.getPosition("series"),i=this.getDimension("series"),o=this.getDimension("yAxis").width,a=t+o+i.width;this.positionMap.plot={top:e.top,left:e.left},this.positionMap.yAxis={top:e.top,left:this.chartLeftPadding+t},this.positionMap.xAxis={top:e.top+i.height,left:e.left},this.positionMap.rightYAxis={top:e.top,left:this.chartLeftPadding+a-n.OVERLAPPING_WIDTH}},_makeLegendPosition:function(){var t,e,i=this.dimensionMap,a=this.getDimension("series"),r=this.options.legend,s=i.title.height||i.chartExportMenu.height;return o.isLegendAlignBottom(r.align)&&(s+=a.height+this.getDimension("xAxis").height+n.LEGEND_AREA_PADDING),o.isHorizontalLegend(r.align)?e=(this.getDimension("chart").width-this.getDimension("legend").width)/2:o.isLegendAlignLeft(r.align)?e=this.chartLeftPadding:(t=this.getDimension("yAxis").width+this.getDimension("rightYAxis").width,e=this.chartLeftPadding+t+a.width),{top:s,left:e}},_makeChartExportMenuPosition:function(){return{top:1,right:20}},_makeCircleLegendPosition:function(){var t,e,i=this.getPosition("series"),a=this.getDimension("series"),r=this.getDimension("circleLegend"),s=this.options.legend;return t=o.isLegendAlignLeft(s.align)?0:i.left+a.width,o.isVerticalLegend(s.align)&&s.visible&&(e=this.getDimension("legend").width+n.CHART_PADDING,t+=(e-r.width)/2),{top:i.top+a.height-r.height,left:t}},_isNeedExpansionSeries:function(){var t=this.chartType;return!(o.isPieChart(t)||o.isMapChart(t)||o.isTreemapChart(t)||o.isRadialChart(t)||o.isPieDonutComboChart(t,this.seriesTypes))},_registerEssentialComponentsPositions:function(){var t,e=this.getPosition("series");this.positionMap.mouseEventDetector=d.extend({},e),this.positionMap.legend=this._makeLegendPosition(),this.positionMap.chartExportMenu=this._makeChartExportMenuPosition(),this.getDimension("circleLegend").width&&(this.positionMap.circleLegend=this._makeCircleLegendPosition()),t=this._isNeedExpansionSeries()?{top:e.top-n.SERIES_EXPAND_SIZE,left:e.left-n.SERIES_EXPAND_SIZE}:e,this.positionMap.tooltip=t},_registerPositions:function(){var t=this.options.legend.align,e=this.options.legend.visible,i=this.getDimension("legend"),r=o.isLegendAlignTop(t)&&e?i.height:0,s=o.isLegendAlignLeft(t)&&e?i.width:0,h=Math.max(this.getDimension("title").height,this.getDimension("chartExportMenu").height),l=h+r,u=a.getDefaultSeriesTopAreaHeight(this.chartType,this.theme.series),c={top:(l?l:u)+n.CHART_PADDING,left:this.chartLeftPadding+s+this.getDimension("yAxis").width};this.positionMap.series=c,this.hasAxes&&this._registerAxisComponentsPosition(s),this._registerEssentialComponentsPositions()},_registerExtendedSeriesBound:function(){var t=this.getBound("series");this._isNeedExpansionSeries()&&(t=a.expandBound(t)),this._setBound("extendedSeries",t)},_updateBoundsForYAxisCenterOption:function(){var t=this.getDimension("yAxis").width,e=Math.floor(this.getDimension("series").width/2)+n.OVERLAPPING_WIDTH,i=t-n.OVERLAPPING_WIDTH,o=a.isOldBrowser()?1:0;this.dimensionMap.extendedSeries.width+=t,this.dimensionMap.xAxis.width+=n.OVERLAPPING_WIDTH,this.dimensionMap.plot.width+=t+n.OVERLAPPING_WIDTH,this.dimensionMap.mouseEventDetector.width+=t,this.dimensionMap.tooltip.width+=t,this.positionMap.series.left-=t-o,this.positionMap.extendedSeries.left-=i-o,this.positionMap.plot.left-=i,this.positionMap.yAxis.left+=e,this.positionMap.xAxis.left-=i,this.positionMap.mouseEventDetector.left-=i,this.positionMap.tooltip.left-=i},registerBoundsData:function(t){this._registerCenterComponentsDimension(),this.hasAxes&&(this._registerAxisComponentsDimension(),this._updateDimensionsForXAxisLabel(t)),this._registerPositions(),this._registerExtendedSeriesBound(),this.options.yAxis.isCenter&&this._updateBoundsForYAxisCenterOption()},calculateMaxRadius:function(t){var e=this.getDimensionMap(["series","circleLegend"]),i=!!this.options.circleLegend&&this.options.circleLegend.visible;return s.calculateMaxRadius(e,t,i)}});t.exports=p},function(t,e,i){"use strict";var n=i(8),o=i(7),a={_calculatePixelStep:function(t,e){var i,n=t.tickCount;return i=t.isLabelAxis?e/n/2:e/(n-1),parseInt(i,10)},_calculateRadiusByAxisData:function(t,e){var i=this._calculatePixelStep(e.yAxis,t.height),n=this._calculatePixelStep(e.xAxis,t.width);return Math.min(i,n)},_getCircleLegendLabelMaxWidth:function(t,e){return o.getRenderedLabelWidth(t,{fontSize:n.CIRCLE_LEGEND_LABEL_FONT_SIZE,fontFamily:e})},calculateCircleLegendWidth:function(t,e,i,o){var a=this._calculateRadiusByAxisData(t,e),r=this._getCircleLegendLabelMaxWidth(i,o);return Math.max(2*a,r)+n.CIRCLE_LEGEND_PADDING},calculateMaxRadius:function(t,e,i){var o=this._calculateRadiusByAxisData(t.series,e),a=t.circleLegend.width;return i?Math.min((a-n.CIRCLE_LEGEND_PADDING)/2,o):o}};t.exports=a},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r={calculateXAxisHeight:function(t,e){var i=t.title,o=i?a.getRenderedLabelHeight(i.text,e.title):0,r=o?o+n.TITLE_PADDING:0,s=t.labelMargin||0,h=a.getRenderedLabelHeight(n.MAX_HEIGHT_WORD,e.label);return s>0&&(h+=s),r+h+n.CHART_PADDING},calculateYAxisWidth:function(t,e,i){var r=e.title||"",s=0,h=e.labelMargin||0,l=0;return t=a.addPrefixSuffix(t,e.prefix,e.suffix),e.isCenter?l+=n.AXIS_LABEL_PADDING:s=e.rotateTitle===!1?a.getRenderedLabelWidth(r.text,i.title)+n.TITLE_PADDING:a.getRenderedLabelHeight(r.text,i.title)+n.TITLE_PADDING,o.isDatetimeType(e.type)&&(t=a.formatDates(t,e.dateFormat)),h>0&&(l+=h),l+=a.getRenderedLabelsMaxWidth(t,i.label)+s+n.AXIS_LABEL_PADDING}};t.exports=r},function(t,e,i){"use strict";var n=i(6),o=i(8),a=i(11),r=i(45),s=i(7),h=i(10),l=o.LEGEND_CHECKBOX_WIDTH,u=o.LEGEND_ICON_WIDTH,c=o.LEGEND_ICON_HEIGHT,d=o.LEGEND_LABEL_LEFT_PADDING,p=o.LEGEND_AREA_PADDING,f={legendMargin:d+p,_calculateLegendsWidthSum:function(t,e,i,o){var a=p+i+u+d,h=this.legendMargin;return r.sum(n.map(t,function(t){var i=s.getRenderedLabelWidth(t,e);return o&&i>o&&(i=o),i+=a,i+h}))},_divideLegendLabels:function(t,e){var i=Math.round(t.length/e),o=[],a=[];return n.forEachArray(t,function(t){a.length=e);return{labels:a,maxLineWidth:h}},_calculateHorizontalLegendHeight:function(t,e){var i=Math.max.apply(null,n.map(t,function(t){return s.getRenderedLabelsMaxHeight(t,e)})),a=Math.max(c,i)+o.LINE_MARGIN_TOP,r=a*t.length-o.LINE_MARGIN_TOP;return r},_makeHorizontalDimension:function(t,e,i,n,a){var r=this._makeDividedLabelsAndMaxLineWidth(e,i,t,n,a),s=this._calculateHorizontalLegendHeight(r.labels,t),h=s+2*p;return{width:Math.max(r.maxLineWidth,o.MIN_LEGEND_WIDTH),height:h}},_makeVerticalDimension:function(t,e,i,n){var o=s.getRenderedLabelsMaxWidth(e,t);return n&&o>n&&(o=n),o+=p+i+u+d,{width:o+this.legendMargin,height:0}},calculate:function(t,e,i,n){var o=t.showCheckbox===!1?0:l+d,r=t.maxWidth,s={};return t.visible?s=a.isHorizontalLegend(t.align)?this._makeHorizontalDimension(e,i,n,o,r):this._makeVerticalDimension(e,i,o,r):s.width=0,s}};t.exports=f},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(7),r={calculateWidth:function(t,e){var i=t.chart.width,a=t.yAxis.width+t.rightYAxis.width,r=t.legend,s=0;return o.isVerticalLegend(e.align)&&e.visible&&(s=r?r.width:0),i-2*n.CHART_PADDING-a-s},calculateHeight:function(t,e,i,r){var s=t.chart.height,h=a.getDefaultSeriesTopAreaHeight(i,r),l=Math.max(t.title.height,t.chartExportMenu.height),u=t.xAxis.height,c=e.visible?t.legend.height:0,d=e.align;return u+=o.isLegendAlignBottom(d)?c:0,l+=o.isLegendAlignTop(d)?c:0,l=l||h,s-2*n.CHART_PADDING-l-u}};t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(7),a={_makeVerticalDimension:function(t,e){var i=o.getRenderedLabelWidth(t,e),a=n.LEGEND_AREA_PADDING+n.MAP_LEGEND_LABEL_PADDING;return{width:n.MAP_LEGEND_GRAPH_SIZE+i+a,height:n.MAP_LEGEND_SIZE}},_makeHorizontalDimension:function(t,e){var i=o.getRenderedLabelHeight(t,e),a=n.LEGEND_AREA_PADDING+n.MAP_LEGEND_LABEL_PADDING;return{width:n.MAP_LEGEND_SIZE,height:n.MAP_LEGEND_GRAPH_SIZE+i+a}}};t.exports=a},function(t,e,i){"use strict";var n=i(120),o=i(122),a=i(123),r=i(11),s=i(7),h=i(6),l=h.defineClass({init:function(t){this.chartType=t.chartType,this.seriesTypes=t.seriesTypes,this.dataProcessor=t.dataProcessor,this.boundsModel=t.boundsModel,this.options=t.options,this.theme=t.theme,this.hasRightYAxis=!!t.hasRightYAxis,this.prevValidLabelCount=null,this.initScaleData(t.addedDataCount),this.initForAutoTickInterval()},initScaleData:function(t){this.scaleDataMap={},this.axisDataMap={},this.addedDataCount=t},initForAutoTickInterval:function(){this.firstTickCount=null},_pickLimitOption:function(t){return t=t||{},{min:t.min,max:t.max}},_createBaseScaleData:function(t,e,i,o){var a=t.chartType,s="xAxis"!==t.areaType,l=this.dataProcessor.createBaseValuesForLimit(a,o.isSingleYAxis,e.stackType,t.valueType,t.areaType),u=this.boundsModel.getBaseSizeForLimit(s),c=h.extend(e,{isVertical:s,limitOption:this._pickLimitOption(i),tickCounts:o.tickCounts});return r.isBubbleChart(a)&&(c.overflowItem=this.dataProcessor.findOverflowItem(a,t.valueType)),n.makeScaleData(l,u,a,c)},_createScaleLabels:function(t,e,i,n){var a=this.dataProcessor.getFormatFunctions(),r=h.extend(i,{dateFormat:n});return o.createFormattedLabels(t,e,r,a)},_createScaleData:function(t,e,i){var n,o,a=this.options.series,r=e.chartType||this.chartType;return e.chartType=r,a=a[r]||a,n={stackType:i.stackType||a.stackType,diverging:a.diverging,type:t.type},o=this._createBaseScaleData(e,n,t,i),h.extend(o,{labels:this._createScaleLabels(o,e,n,t.dateFormat),axisOptions:t})},_createValueAxisData:function(t,e,i,n,o){var r,s,l=this.dataProcessor.hasCategories(),u=!n&&!l&&i,c=t.labels,d=t.limit,p=t.step,f=c.length,m=a.makeValueAxisData({labels:c,tickCount:c.length,limit:d,step:p,options:t.axisOptions,labelTheme:e,isVertical:!!n,isPositionRight:!!o,aligned:i});return u&&(r=this.dataProcessor.getValues(this.chartType,"x"),s=a.makeAdditionalDataForCoordinateLineType(c,r,d,p,f),h.extend(m,s)),m},_createLabelAxisData:function(t,e,i,n,o){return a.makeLabelAxisData({labels:this.dataProcessor.getCategories(n),options:t,labelTheme:e,isVertical:!!n,isPositionRight:!!o,aligned:i,addedDataCount:this.options.series.shifting?this.addedDataCount:0})},_createAxisData:function(t,e,i,n,o){var a,s=r.isLineTypeChart(this.chartType,this.seriesTypes)&&!e.pointOnColumn;return a=t?this._createValueAxisData(t,i,s,n,o):this._createLabelAxisData(e,i,s,n,o)},_createAxesData:function(){var t=this.scaleDataMap,e=this.options,i=this.theme,n=h.isArray(e.yAxis)?e.yAxis:[e.yAxis],o={};return o.xAxis=this._createAxisData(t.xAxis,e.xAxis,i.xAxis.label),o.yAxis=this._createAxisData(t.yAxis,n[0],i.yAxis.label,!0),this.hasRightYAxis&&(o.rightYAxis=this._createAxisData(t.rightYAxis,n[1],i.yAxis.label,!0,!0),o.rightYAxis.aligned=o.xAxis.aligned),o},addScale:function(t,e,i,n){i=i||{},n=n||{},i.areaType=i.areaType||t,i.chartType=n.chartType||i.chartType,this.scaleDataMap[t]=this._createScaleData(e,i,n)},setAxisDataMap:function(){this.axisDataMap=this._createAxesData()},updateXAxisDataForAutoTickInterval:function(t,e){var i=this.options.series.shifting,n=this.options.series.zoomable,o=this.axisDataMap.xAxis,r=this.boundsModel.getDimension("series").width,s=this.addedDataCount;i||!t||n?a.updateLabelAxisDataForAutoTickInterval(o,r,s,e):a.updateLabelAxisDataForStackingDynamicData(o,t,this.firstTickCount),this.firstTickCount||(this.firstTickCount=o.tickCount)},updateXAxisDataForLabel:function(t){var e,i,n,o=this.axisDataMap.xAxis,r=o.labels,l=this.boundsModel.getDimensionMap(["series","yAxis","chart"]),u=o.isLabelAxis,c=this.theme.xAxis.label;t&&(r=r.slice(0,r.length-1)),r=s.addPrefixSuffix(r,this.options.xAxis.prefix,this.options.xAxis.suffix),e=h.filter(r,function(t){return!!t}),i=h.isNull(this.prevValidLabelCount)?e.length:this.prevValidLabelCount,this.options.yAxis.isCenter&&(i+=1,l.yAxis.width=0),n=o.options.rotateLabel===!1?a.makeAdditionalDataForMultilineLabels(r,i,c,u,l):a.makeAdditionalDataForRotatedLabels(e,i,c,u,l),this.prevValidLabelCount=i,h.extend(o,n)},_findLimit:function(t,e,i){var n;return n=0===e?i?t.yAxis:t.xAxis:t.rightYAxis?t.rightYAxis:t.yAxis},makeLimitMap:function(t,e){var i=this,n=this.scaleDataMap,o={};return n.xAxis&&(o.xAxis=n.xAxis.limit),n.yAxis&&(o.yAxis=n.yAxis.limit),n.rightYAxis&&(o.rightYAxis=n.rightYAxis.limit),n.legend&&(o.legend=n.legend.limit),h.forEachArray(t,function(t,n){o[t]=i._findLimit(o,n,e)}),o}});t.exports=l},function(t,e,i){"use strict";var n=i(8),o=i(11),a=i(45),r=i(10),s=i(121),h=i(6),l=Math.abs,u={_makeLimitForDivergingOption:function(t){var e=Math.max(l(t.min),l(t.max));return{min:-e,max:e}},_adjustLimitForOverflow:function(t,e,i){var n=t.min,o=t.max;return i.min&&(n=a.subtract(n,e)),i.max&&(o=a.add(o,e)),{min:n,max:o}},millisecondMap:{year:31536e6,month:26784e5,week:6048e5,date:864e5,hour:36e5,minute:6e4,second:1e3},millisecondTypes:["year","month","week","date","hour","minute","second"],_findDateType:function(t,e){var i,o=t.max-t.min,a=this.millisecondTypes,r=this.millisecondMap,s=a.length-1;return o?h.forEachArray(a,function(t,n){var l,u=r[t],c=Math.floor(o/u);return c&&(l=n0?i.min=0:0===e?i.max=10:i.max=0):0===i.min&&0===i.max?i.max=10:i.min===i.max&&(i.min-=i.min/10,i.max+=i.max/10),i},_calculateDatetimeScale:function(t,e,i){var n,o,a;return n=this._makeDatetimeInfo(this._getLimitSafely(t),t.length),a=n.dataLimit,i&&(a=this._makeLimitForDivergingOption(a)),o=s({min:a.min,max:a.max,offsetSize:e,minimumStepSize:1}),o=this._restoreScaleToDatetimeType(o,n.minDate,n.divisionNumber)},_calculatePercentStackedScale:function(t,e){var i;return i=0===a.sumMinusValues(t)?n.PERCENT_STACKED_AXIS_SCALE:0===a.sumPlusValues(t)?n.MINUS_PERCENT_STACKED_AXIS_SCALE:e?n.DIVERGING_PERCENT_STACKED_AXIS_SCALE:n.DUAL_PERCENT_STACKED_AXIS_SCALE},_calculateCoordinateScale:function(t,e,i,n,o){var a,r,l=this._getLimitSafely(t),u=o.limitOption||{},c=h.isExisty(u.min),d=h.isExisty(u.max),p=l.min,f=l.max,m=o.stepCount;return c&&(p=u.min,m=null),d&&(f=u.max,m=null),r=s({min:p,max:f,stepCount:m,offsetSize:e}),a=this._isOverflowed(i,r,l,c,d),a&&(r.limit=this._adjustLimitForOverflow(r.limit,r.step,a)),n&&(r.limit=this._makeLimitForDivergingOption(r.limit)),r},_isOverflowed:function(t,e,i,n,o){var a=!(!t||!t.minItem),r=!(!t||!t.maxItem),s=e.limit,h=a||!n&&s.min===i.min&&0!==s.min,l=r||!o&&s.max===i.max&&0!==s.max;return h||l?{min:h,max:l}:null},makeScaleData:function(t,e,i,n){var a,r=o.isDivergingChart(i,n.diverging),s=n.overflowItem;return o.isPercentStackChart(i,n.stackType)?a=this._calculatePercentStackedScale(t,r):o.isDatetimeType(n.type)?a=this._calculateDatetimeScale(t,e,r):(o.isRadialChart(i)&&(n.stepCount=Math.floor(e/100)),a=this._calculateCoordinateScale(t,e,s,r,n)),a}};t.exports=u},function(t,e,i){"use strict";function n(t){var e=0===t?1:Math.log(Math.abs(t))/Math.LN10;return Math.pow(10,Math.floor(e))}function o(t){var e,i,n,o;for(n=0,o=d.length;n1?1:1/o,r=i*a;return e=Math.ceil(e*a/r)*r/a,t=t>i?Math.floor(t*a/r)*r/a:t<0?-(Math.ceil(Math.abs(t)*a/r)*r)/a:0,{min:t,max:e}}function s(t,e){var i=1/Math.min(n(t),n(e));return Math.ceil(t*i/(e*i))}function h(t){var e=a(t.step),i=r(t.limit.min,t.limit.max,e),n=Math.abs(i.max-i.min),o=s(n,e);return{limit:{min:i.min,max:i.max},step:e,stepCount:o}}function l(t,e,i,n,o){var a,r,s=Math.abs(e-t),h=s/i;return n||(n=Math.ceil(i/p)),a=i/n,r=h*a,c.isNumber(o)&&ri.labelInterval&&(n=this._makeLabelsByIntervalOption(t.labels,i.labelInterval,t.addedDataCount)),o.isDatetimeType(i.type)&&(n=r.formatDates(n,i.dateFormat)),t.aligned||(e+=1),{labels:n,tickCount:e,validTickCount:0,isLabelAxis:!0,options:i,isVertical:!!t.isVertical,isPositionRight:!!t.isPositionRight,aligned:!!t.aligned}},makeValueAxisData:function(t){var e=t.labels,i=t.tickCount,n=t.limit,o={labels:e,tickCount:i,validTickCount:i,limit:n,dataMin:n.min,distance:n.max-n.min,step:t.step,options:t.options,isVertical:!!t.isVertical,isPositionRight:!!t.isPositionRight,aligned:!!t.aligned};return o},makeAdditionalDataForCoordinateLineType:function(t,e,i,n,o){var a,r=1,h=0,l=s.min(e),u=s.max(e);return a=u-l,a&&(i.minu&&(i.max-=n,r-=(u-i.max)/a,o-=1,t.pop())),{labels:t,tickCount:o,validTickCount:o,limit:i,dataMin:l,distance:a,positionRatio:h,sizeRatio:r}},_makeAdjustingIntervalInfo:function(t,e,i){var n,o=parseInt(e/i,10),a=parseInt(t/o,10),r=null;return a>1&&(n=t-a*o,n>=a&&(o+=parseInt(n/a,0),n%=a),r={blockCount:o,beforeRemainBlockCount:n,interval:a}),r},_makeCandidatesForAdjustingInterval:function(t,e){var i=this,n=h.range(90,121,5),o=h.map(n,function(n){return i._makeAdjustingIntervalInfo(t,e,n)});return h.filter(o,function(t){return!!t})},_calculateAdjustingIntervalInfo:function(t,e){var i=this._makeCandidatesForAdjustingInterval(t,e),n=null;return i.length&&(n=s.min(i,function(t){return t.blockCount})),n},_makeFilteredLabelsByInterval:function(t,e,i){return h.filter(t.slice(e),function(t,e){return e%i===0})},updateLabelAxisDataForAutoTickInterval:function(t,e,i,n){var o,a,r,s,l,u;n&&(t.tickCount-=1,t.labels.pop()),o=t.tickCount-1,a=this._calculateAdjustingIntervalInfo(o,e),a&&(r=a.blockCount,s=a.interval,l=a.beforeRemainBlockCount,t.eventTickCount=t.tickCount,u=Math.round(l/2)-i%s,u<0&&(u+=s),t.labels=this._makeFilteredLabelsByInterval(t.labels,u,s),h.extend(t,{startIndex:u,tickCount:r+1,positionRatio:u/o,sizeRatio:1-l/o,interval:s}))},updateLabelAxisDataForStackingDynamicData:function(t,e,i){var n,o=e.interval,a=e.startIndex,r=t.tickCount-1,s=r/o,l=i?i-1:0;l&&2*l<=s&&(o*=2),t.labels=this._makeFilteredLabelsByInterval(t.labels,a,o),s=t.labels.length-1,n=r-o*s,h.extend(t,{startIndex:a,eventTickCount:t.tickCount,tickCount:t.labels.length,positionRatio:a/r,sizeRatio:1-n/r,interval:o})},_calculateXAxisLabelAreaWidth:function(t,e,i){return t||(i-=1),e/i},_createMultilineLabel:function(t,e,i){var n=String(t).split(/\s+/),o=n[0],a=[];return h.forEachArray(n.slice(1),function(t){var n=r.getRenderedLabelWidth(o+" "+t,i);n>e?(a.push(o),o=t):o+=" "+t}),o&&a.push(o),a.join("
")},_createMultilineLabels:function(t,e,i){var n=this._createMultilineLabel;return h.map(t,function(t){return n(t,i,e)})},_calculateMultilineHeight:function(t,e,i){return r.getRenderedLabelsMaxHeight(t,h.extend({cssText:"line-height:1.2;width:"+i+"px"},e))},makeAdditionalDataForMultilineLabels:function(t,e,i,n,o){var a=o.series.width,s=this._calculateXAxisLabelAreaWidth(n,a,e),h=this._createMultilineLabels(t,i,a),l=this._calculateMultilineHeight(h,i,s),u=r.getRenderedLabelsMaxHeight(t,i);return{multilineLabels:h,overflowHeight:l-u,overflowLeft:s/2-o.yAxis.width}},_findRotationDegree:function(t,e,i){var o=null;return h.forEachArray(n.DEGREE_CANDIDATES,function(r){var s=a.calculateRotatedWidth(r,e,i);return o=r,!(s<=t+n.XAXIS_LABEL_COMPARE_MARGIN)}),o},_calculateRotatedWidth:function(t,e,i,o){var s=r.getRenderedLabelWidth(e,o),h=a.calculateRotatedWidth(t,s,i);return h-=a.calculateAdjacent(n.ANGLE_90-t,i/2)},_calculateLimitWidth:function(t,e,i){var n=t;return e&&(n+=i/2),n},makeAdditionalDataForRotatedLabels:function(t,e,i,o,s){var h,l,u,c,d,p=r.getRenderedLabelsMaxWidth(t,i),f=s.series.width,m=this._calculateXAxisLabelAreaWidth(o,f,e),g=null,_=n.CHART_PADDING+s.yAxis.width+f;return m1,i.tooltip=i.tooltip||{},i.tooltip.grouped=!0,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},_makeYAxisOptions:function(t,e){var i={};return e=e||{},s.forEachArray(t,function(t,n){i[t]=e[n]||e}),i},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getOriginalRawData(),i=o.filterCheckedRawData(e,t),n=r({rawSeriesData:i.series,yAxisOptions:this.options.yAxis});this.chartTypes=n.chartTypes,this.seriesTypes=n.seriesTypes,this.rerender(t,i,n)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("columnSeries","columnSeries"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("yAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){var t={yAxis:this._makeYAxisScaleOption("yAxis",this.chartTypes[0],!this.hasRightYAxis)};return this.hasRightYAxis&&(t.rightYAxis=this._makeYAxisScaleOption("rightYAxis",this.chartTypes[1])),t},_makeYAxisScaleOption:function(t,e,i){var n=this.yAxisOptions[e],o={isSingleYAxis:!!i};return i&&this.options.series&&this._setAdditionalOptions(o),{options:n,areaType:"yAxis",chartType:e,additionalOptions:o}},_setAdditionalOptions:function(t){var e=this.dataProcessor;s.forEach(this.options.series,function(i,n){var o;i.stackType&&(o=e.findChartType(n),a.isAllowedStackOption(o)&&(t.chartType=o,t.stackType=i.stackType))})},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType],o=this.options.series||{};e=function(e){var n=(o[e]||o).stackType;i.dataProcessor.addDataRatios(t[e],n,e)},s.forEachArray(n,e)}});t.exports=h},function(t,e,i){"use strict";function n(t){var e=t.rawSeriesData,i=t.yAxisOptions,n=o(e,i);return{chartTypes:n.chartTypes,seriesTypes:n.seriesTypes}}function o(t,e){var i,n=r.keys(t).sort(),o=a(n,e),s=o.length?o:n,h=r.filter(o,function(e){return t[e].length});return i=1===h.length?{chartTypes:h,seriesTypes:h}:{chartTypes:s,seriesTypes:n}}function a(t,e){var i,n=t.slice(),o=[].concat(e||[]),a=!1;return!o.length||1===o.length&&!o[0].chartType?n=[]:o.length&&(i=r.map(o,function(t){return t.chartType}),r.forEachArray(i,function(t,e){a=a||t&&n[e]!==t||!1}),a&&n.reverse()),n}var r=i(6);t.exports=n},function(t,e,i){"use strict";var n=i(42),o=i(6),a=o.defineClass(n,{init:function(t,e,i){this.chartTypes=["line","scatter"],this.seriesTypes=["line","scatter"],n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},getScaleOption:function(){return{yAxis:{valueType:"y"},xAxis:{valueType:"x"}}},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType];e=function(e){i.dataProcessor.addDataRatiosForCoordinateType(e,t,!1)},o.forEachArray(n,e)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("scatterSeries","scatterSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")}});t.exports=a},function(t,e,i){"use strict";var n=i(42),o=i(31),a=i(11),r=i(129),s=i(126),h=i(6),l=h.defineClass(n,{className:"tui-combo-chart",init:function(t,e,i){var o=r({rawSeriesData:t.series,yAxisOptions:i.yAxis});this.chartTypes=o.chartTypes,this.seriesTypes=o.seriesTypes,this.yAxisOptions=this._makeYAxisOptions(this.chartTypes,i.yAxis),this.hasRightYAxis=h.isArray(i.yAxis)&&i.yAxis.length>1,i.tooltip=i.tooltip||{},i.tooltip.grouped=!0,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0}),this._dynamicDataHelper=new s(this)},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getZoomedRawData(),i=o.filterCheckedRawData(e,t),n=r({rawSeriesData:i.series,yAxisOptions:this.options.yAxis});this._dynamicDataHelper.reset(),this._dynamicDataHelper.changeCheckedLegends(t,i,n)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("areaSeries","areaSeries"),this.componentManager.register("lineSeries","lineSeries"),this.componentManager.register("xAxis","axis"),this.componentManager.register("yAxis","axis"),this.hasRightYAxis&&this.componentManager.register("rightYAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){var t={yAxis:this._makeYAxisScaleOption("yAxis",this.chartTypes[0],!this.hasRightYAxis)};return this.hasRightYAxis&&(t.rightYAxis=this._makeYAxisScaleOption("rightYAxis",this.chartTypes[1])),t},_makeYAxisScaleOption:function(t,e,i){var n=this.yAxisOptions[e],o={isSingleYAxis:!!i};return i&&this.options.series&&this._setAdditionalOptions(o),{options:n,areaType:"yAxis",chartType:e,additionalOptions:o}},_makeYAxisOptions:function(t,e){var i={};return e=e||{},h.forEachArray(t,function(t,n){i[t]=e[n]||e}),i},addData:function(t,e){this._dynamicDataHelper.addData(t,e)},_setAdditionalOptions:function(t){var e=this.dataProcessor;h.forEach(this.options.series,function(i,n){var o;i.stackType&&(o=e.findChartType(n),a.isAllowedStackOption(o)&&(t.chartType=o,t.stackType=i.stackType))})},addDataRatios:function(t){var e,i=this,n=this.chartTypes||[this.chartType],o=this.options.series||{};e=this.dataProcessor.isCoordinateType()?function(e){i.dataProcessor.addDataRatiosForCoordinateType(e,t,!1)}:function(e){var n=(o[e]||o).stackType;i.dataProcessor.addDataRatios(t[e],n,e)},h.forEachArray(n,e)},_renderForZoom:function(t){var e=this.readyForRender();this.componentManager.render("zoom",e,{isResetZoom:t})},onZoom:function(t){this._dynamicDataHelper.pauseAnimation(),this.dataProcessor.updateRawDataForZoom(t),this._renderForZoom(!1)},onResetZoom:function(){var t=this.dataProcessor.getOriginalRawData();this._dynamicDataHelper.checkedLegends&&(t=o.filterCheckedRawData(t,this._dynamicDataHelper.checkedLegends)),this.dataProcessor.initData(t),this.dataProcessor.initZoomedRawData(),this.dataProcessor.addDataFromRemainDynamicData(h.pick(this.options.series,"shifting")),this._renderForZoom(!0),this._dynamicDataHelper.restartAnimation()}});t.exports=l},function(t,e,i){"use strict";var n=i(42),o=i(31),a=i(6),r=a.defineClass(n,{className:"tui-combo-chart",init:function(t,e,i){this.seriesTypes=a.keys(t.series).sort(),this.chartTypes=["pie","pie"],n.call(this,{rawData:t,theme:e,options:i,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("pie1Series","pieSeries"),this.componentManager.register("pie2Series","pieSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(){var t=this,e=this.seriesTypes||[this.chartType];a.forEachArray(e,function(e){t.dataProcessor.addDataRatiosOfPieChart(e)})},onChangeCheckedLegends:function(t){var e=this.dataProcessor.getOriginalRawData(),i=o.filterCheckedRawData(e,t);n.prototype.onChangeCheckedLegends.call(this,t,i,{seriesTypes:this.seriesTypes})}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-pie-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION),n.call(this,{rawData:t,theme:e,options:i})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("pieSeries","pieSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(){this.dataProcessor.addDataRatiosOfPieChart(this.chartType)}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-bubble-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.circleLegend=i.circleLegend||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION),a.isUndefined(i.circleLegend.visible)&&(i.circleLegend.visible=!0),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0})},getScaleOption:function(){var t={};return this.dataProcessor.hasXValue(this.chartType)&&(t.xAxis={valueType:"x"}),this.dataProcessor.hasYValue(this.chartType)&&(t.yAxis={valueType:"y"}),t},_setDefaultOptions:function(t){n.prototype._setDefaultOptions.call(this,t),this.options.circleLegend=this.options.circleLegend||{},a.isUndefined(this.options.circleLegend.visible)&&(this.options.circleLegend.visible=!0)},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("circleLegend","circleLegend"),this.componentManager.register("bubbleSeries","bubbleSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatiosForCoordinateType(this.chartType,t,!0)}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(8),a=i(6),r=a.defineClass(n,{className:"tui-scatter-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=o.TOOLTIP_DEFAULT_ALIGN_OPTION),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0})},getScaleOption:function(){return{xAxis:{valueType:"x"},yAxis:{valueType:"y"}}},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("scatterSeries","scatterSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatiosForCoordinateType(this.chartType,t,!1)}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(137),a=i(8),r=i(6),s=r.defineClass(n,{className:"tui-heatmap-chart",init:function(t,e,i){i.tooltip=i.tooltip||{},i.tooltip.align||(i.tooltip.align=a.TOOLTIP_DEFAULT_ALIGN_OPTION),i.tooltip.grouped=!1,n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},_addComponents:function(){var t=this.theme.series[this.chartType],e=new o(t.startColor,t.endColor);this._addComponentsForAxisType({axis:[{name:"yAxis",isVertical:!0},{name:"xAxis"}],legend:{classType:"spectrumLegend",additionalParams:{colorSpectrum:e}},series:[{name:"heatmapSeries",data:{colorSpectrum:e}}],tooltip:!0,mouseEventDetector:!0})},getScaleOption:function(){return{legend:!0}},addDataRatios:function(t){this.dataProcessor.addDataRatios(t.legend,null,this.chartType)},addComponents:function(){var t=this.theme.series[this.chartType],e=new o(t.startColor,t.endColor);this.componentManager.register("title","title"),this.componentManager.register("legend","spectrumLegend",{colorSpectrum:e}),this.componentManager.register("heatmapSeries","heatmapSeries",{colorSpectrum:e}),this.componentManager.register("xAxis","axis"),this.componentManager.register("yAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")}});t.exports=s},function(t,e,i){"use strict";var n=i(138),o=i(6),a=o.defineClass({init:function(t,e){var i;this.start=n.colorNameToHex(t),this.startRGB=n.hexToRGB(this.start),this.end=n.colorNameToHex(e),i=n.hexToRGB(this.end),this.distances=this._makeDistances(this.startRGB,i),this.colorMap={}},_makeDistances:function(t,e){return o.map(t,function(t,i){return e[i]-t})},getColor:function(t){var e,i,a=this.colorMap[t];return a||(e=this.distances,i=o.map(this.startRGB,function(i,n){return i+parseInt(e[n]*t,10)}),a=n.rgbToHEX.apply(null,i)),a||null}});t.exports=a},function(t,e){"use strict";var i=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i,n={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},o={leadingZero:function(t,e){var i="",n=0;if(String(t).length>e)return String(t);for(;n=0&&(r.ratio=a),r})},getMapData:function(){return this.mapData||(this.mapData=this._createMapData(this.rawMapData)),this.mapData},getDatum:function(t){return this.getMapData()[t]},getLabelData:function(t){var e=this,i=this.getMapData(),n=a.filter(i,function(t){return e.dataProcessor.getValueMapDatum(t.code)});return a.map(n,function(e){return{name:e.name,labelPosition:{left:e.labelPosition.left*t,top:e.labelPosition.top*t}}})},_makeMapDimension:function(){var t=this.getMapData(),e=a.map(t,function(t){return t.bound.position.left}),i=a.map(t,function(t){return t.bound.position.left+t.bound.dimension.width}),n=a.map(t,function(t){return t.bound.position.top}),r=a.map(t,function(t){return t.bound.position.top+t.bound.dimension.height});return{width:o.max(i)-o.min(e),height:o.max(r)-o.min(n)}},getMapDimension:function(){return this.mapDimension||(this.mapDimension=this._makeMapDimension()),this.mapDimension}});t.exports=r},function(t,e,i){"use strict";var n=i(102),o=i(7),a=i(6),r=a.defineClass(n,{init:function(t,e,i){this.rawData=t,this.options=i},initData:function(t){this.rawData=t,this.valueMap=null},_makeValueMap:function(){var t=this.rawData.series.map,e={},i=this._findFormatFunctions();return a.forEachArray(t,function(t){var n={value:t.data,label:o.formatValue({value:t.data,formatFunctions:i,chartType:"map",areaType:"series"})};t.name&&(n.name=t.name),t.labelCoordinate&&(n.labelCoordinate=t.labelCoordinate),e[t.code]=n}),e},getValueMap:function(){return this.valueMap||(this.valueMap=this._makeValueMap()),this.valueMap},getValues:function(){return a.pluck(this.getValueMap(),"value")},getValueMapDatum:function(t){return this.getValueMap()[t]},addDataRatios:function(t){var e=t.min,i=t.max-e;a.forEach(this.getValueMap(),function(t){t.ratio=(t.value-e)/i})},createBaseValuesForLimit:function(){return this.getValues()},getLegendVisibility:function(){return null}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(6),a=i(85),r=o.defineClass(n,{className:"tui-radial-chart",Series:a,init:function(t,e,i){i.tooltip&&(i.tooltip.grouped=!1),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("legend","legend"),this.componentManager.register("plot","radialPlot"),this.componentManager.register("radialSeries","radialSeries"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},addDataRatios:function(t){this.dataProcessor.addDataRatios(t[this.chartType],null,this.chartType)},getScaleOption:function(){return{yAxis:{}}}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(31),a=i(6),r=a.defineClass(n,{className:"tui-boxplot-chart",init:function(t,e,i){o.appendOutliersToSeriesData(t),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:!0})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("boxplotSeries","boxplotSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu"),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){return{yAxis:!0}},onChangeCheckedLegends:function(t){var e;this.hasRightYAxis&&(e={optionChartTypes:["boxplot","boxplot"]}),n.prototype.onChangeCheckedLegends.call(this,t,null,e)},addDataRatios:function(t){var e=this.options.series||{},i=this.chartType,n=(e[i]||e).stackType;this.dataProcessor.addDataRatios(t[i],n,i)}});t.exports=r},function(t,e,i){"use strict";var n=i(42),o=i(31),a=i(6),r=a.defineClass(n,{className:"tui-bullet-chart",init:function(t,e,i){var a=!!i.series.vertical;o._makeRawSeriesDataForBulletChart(t),n.call(this,{rawData:t,theme:e,options:i,hasAxes:!0,isVertical:a})},addComponents:function(){this.componentManager.register("title","title"),this.componentManager.register("plot","plot"),this.componentManager.register("legend","legend"),this.componentManager.register("bulletSeries","bulletSeries"),this.componentManager.register("yAxis","axis"),this.componentManager.register("xAxis","axis"),this.componentManager.register("chartExportMenu","chartExportMenu",{chartType:"bullet"}),this.componentManager.register("tooltip","tooltip"),this.componentManager.register("mouseEventDetector","mouseEventDetector")},getScaleOption:function(){return this.isVertical?{yAxis:!0}:{xAxis:!0}},addDataRatios:function(t){var e=this.chartType;this.dataProcessor.addDataRatios(t[e],null,e)}});t.exports=r},function(t,e,i){"use strict";var n=i(8),o=i(33),a=i(34);o.register(n.DEFAULT_THEME_NAME,a)},function(t,e){}])}); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 8029e701e..408e89eeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3422,14 +3422,6 @@ } } }, - "string_decoder": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "5.0.1" - } - }, "string-width": { "version": "1.0.2", "bundled": true, @@ -3440,6 +3432,14 @@ "strip-ansi": "3.0.1" } }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, "stringstream": { "version": "0.0.5", "bundled": true,