billboard.js 3.3.0 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +489 -399
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +2491 -2239
  6. package/dist/billboard.pkgd.min.js +2 -2
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +166 -103
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +166 -103
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +32 -130
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +32 -130
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2004 -1842
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2168 -1943
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2170 -1945
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2036 -1972
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2037 -1973
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +2 -2
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +2 -2
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +2 -2
  28. package/dist-esm/billboard.js +481 -412
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +129 -77
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
  34. package/package.json +28 -28
  35. package/src/Chart/api/chart.ts +1 -1
  36. package/src/Chart/api/focus.ts +8 -8
  37. package/src/Chart/api/regions.ts +3 -3
  38. package/src/Chart/api/selection.ts +15 -15
  39. package/src/Chart/api/subchart.ts +10 -10
  40. package/src/ChartInternal/Axis/Axis.ts +16 -14
  41. package/src/ChartInternal/ChartInternal.ts +7 -8
  42. package/src/ChartInternal/data/data.ts +3 -3
  43. package/src/ChartInternal/data/load.ts +2 -2
  44. package/src/ChartInternal/interactions/drag.ts +15 -15
  45. package/src/ChartInternal/interactions/eventrect.ts +18 -18
  46. package/src/ChartInternal/interactions/interaction.ts +10 -10
  47. package/src/ChartInternal/interactions/zoom.ts +4 -4
  48. package/src/ChartInternal/internals/color.ts +4 -4
  49. package/src/ChartInternal/internals/domain.ts +1 -1
  50. package/src/ChartInternal/internals/format.ts +9 -4
  51. package/src/ChartInternal/internals/grid.ts +32 -32
  52. package/src/ChartInternal/internals/legend.ts +27 -27
  53. package/src/ChartInternal/internals/redraw.ts +6 -5
  54. package/src/ChartInternal/internals/region.ts +3 -3
  55. package/src/ChartInternal/internals/selection.ts +16 -15
  56. package/src/ChartInternal/internals/size.ts +3 -3
  57. package/src/ChartInternal/internals/text.ts +8 -8
  58. package/src/ChartInternal/internals/title.ts +4 -4
  59. package/src/ChartInternal/internals/tooltip.ts +5 -5
  60. package/src/ChartInternal/internals/transform.ts +5 -5
  61. package/src/ChartInternal/shape/arc.ts +22 -22
  62. package/src/ChartInternal/shape/area.ts +4 -4
  63. package/src/ChartInternal/shape/bar.ts +7 -7
  64. package/src/ChartInternal/shape/candlestick.ts +8 -8
  65. package/src/ChartInternal/shape/gauge.ts +8 -8
  66. package/src/ChartInternal/shape/line.ts +7 -7
  67. package/src/ChartInternal/shape/point.ts +18 -18
  68. package/src/ChartInternal/shape/radar.ts +10 -10
  69. package/src/ChartInternal/shape/shape.ts +4 -2
  70. package/src/Plugin/sparkline/index.ts +2 -2
  71. package/src/Plugin/stanford/index.ts +3 -3
  72. package/src/Plugin/stanford/util.ts +0 -1
  73. package/src/config/Options/common/tooltip.ts +10 -1
  74. package/src/config/classes.ts +154 -66
  75. package/src/module/util.ts +21 -13
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.0
8
+ * @version 3.3.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -192,7 +192,7 @@ var Plugin = /*#__PURE__*/function () {
192
192
  return Plugin;
193
193
  }();
194
194
 
195
- Plugin.version = "3.2.2";
195
+ Plugin.version = "3.3.3";
196
196
 
197
197
  ;// CONCATENATED MODULE: ./src/Plugin/bubblecompare/index.ts
198
198
 
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.0
8
+ * @version 3.3.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}i.d(r,{default:function(){return u}});var n=i(1),o=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();o.version="3.2.2";var u=function(i){var r,o;function u(e){var n=i.call(this,e)||this;return n.$$=void 0,t(n)||t(n)}o=i,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var s=u.prototype;return s.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},s.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,n.select)(t.node().parentNode.parentNode).raise()},s.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},s.findClosest=function(t,e){var n=this,i=this.$$;return t.filter((function(t){return t&&!i.isBarType(t.id)})).reduce((function(t,r){return i.dist(r,e)<n.getBubbleR(r)?r:t}),0)},s.getBubbleR=function(t){var e=this,n=this.options,i=n.minR,r=n.maxR,o=this.getZData(t);if(!o)return i;var u=this.$$.data.targets.reduce((function(t,n){var i=t[0],r=t[1],o=e.getZData(n.values[0]);return[Math.min(i,o),Math.max(r,o)]}),[1e4,0]),s=u[0],a=u[1],c=s>0&&a===s?0:o/a;return Math.abs(c)*(r-i)+i},s.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(o);u.version="0.0.1"}(),r=r.default}()}));
12
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3-selection")):"function"==typeof define&&define.amd?define("bb",["d3-selection"],e):"object"==typeof exports?exports.bb=e(require("d3-selection")):(t.bb=t.bb||{},t.bb.plugin=t.bb.plugin||{},t.bb.plugin.bubblecompare=e(t.d3))}(this,(function(t){return function(){"use strict";var e=[,function(e){e.exports=t}],n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var r={};return function(){function t(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function e(t,n){return e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(t,n)}i.d(r,{default:function(){return u}});var n=i(1),o=function(){function t(t){void 0===t&&(t={}),this.$$=void 0,this.options=void 0,this.options=t}var e=t.prototype;return e.$beforeInit=function(){},e.$init=function(){},e.$afterInit=function(){},e.$redraw=function(){},e.$willDestroy=function(){var t=this;Object.keys(this).forEach((function(e){t[e]=null,delete t[e]}))},t}();o.version="3.3.3";var u=function(i){var r,o;function u(e){var n=i.call(this,e)||this;return n.$$=void 0,t(n)||t(n)}o=i,(r=u).prototype=Object.create(o.prototype),r.prototype.constructor=r,e(r,o);var s=u.prototype;return s.$init=function(){var t=this.$$;t.findClosest=this.findClosest.bind(this),t.getBubbleR=this.getBubbleR.bind(this),t.pointExpandedR=this.pointExpandedR.bind(this)},s.pointExpandedR=function(t){var e=this.getBubbleR(t),n=this.options.expandScale,i=void 0===n?1:n;return u.raiseFocusedBubbleLayer(t),this.changeCursorPoint(),e*i},u.raiseFocusedBubbleLayer=function(t){t.raise&&(0,n.select)(t.node().parentNode.parentNode).raise()},s.changeCursorPoint=function(){this.$$.$el.svg.select(".bb-event-rect").style("cursor","pointer")},s.findClosest=function(t,e){var n=this,i=this.$$;return t.filter((function(t){return t&&!i.isBarType(t.id)})).reduce((function(t,r){return i.dist(r,e)<n.getBubbleR(r)?r:t}),0)},s.getBubbleR=function(t){var e=this,n=this.options,i=n.minR,r=n.maxR,o=this.getZData(t);if(!o)return i;var u=this.$$.data.targets.reduce((function(t,n){var i=t[0],r=t[1],o=e.getZData(n.values[0]);return[Math.min(i,o),Math.max(r,o)]}),[1e4,0]),s=u[0],a=u[1],c=s>0&&a===s?0:o/a;return Math.abs(c)*(r-i)+i},s.getZData=function(t){return this.$$.isBubbleZType(t)?this.$$.getBubbleZData(t.value,"z"):t.value},u}(o);u.version="0.0.1"}(),r=r.default}()}));
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.0
8
+ * @version 3.3.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -114,7 +114,28 @@ function _inheritsLoose(subClass, superClass) {
114
114
  subClass.prototype.constructor = subClass;
115
115
  _setPrototypeOf(subClass, superClass);
116
116
  }
117
+ ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
118
+ function _defineProperty(obj, key, value) {
119
+ if (key in obj) {
120
+ Object.defineProperty(obj, key, {
121
+ value: value,
122
+ enumerable: true,
123
+ configurable: true,
124
+ writable: true
125
+ });
126
+ } else {
127
+ obj[key] = value;
128
+ }
129
+
130
+ return obj;
131
+ }
117
132
  ;// CONCATENATED MODULE: ./src/config/classes.ts
133
+
134
+
135
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
136
+
137
+ function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
138
+
118
139
  /**
119
140
  * Copyright (c) 2017 ~ present NAVER Corp.
120
141
  * billboard.js project is licensed under the MIT license
@@ -124,111 +145,151 @@ function _inheritsLoose(subClass, superClass) {
124
145
  * CSS class names definition
125
146
  * @private
126
147
  */
127
- /* harmony default export */ var classes = ({
148
+ var $COMMON = {
149
+ button: "bb-button",
150
+ chart: "bb-chart",
151
+ empty: "bb-empty",
152
+ main: "bb-main",
153
+ target: "bb-target",
154
+ EXPANDED: "_expanded_"
155
+ };
156
+ var $ARC = {
128
157
  arc: "bb-arc",
129
158
  arcLabelLine: "bb-arc-label-line",
130
159
  arcs: "bb-arcs",
160
+ chartArc: "bb-chart-arc",
161
+ chartArcs: "bb-chart-arcs",
162
+ chartArcsBackground: "bb-chart-arcs-background",
163
+ chartArcsTitle: "bb-chart-arcs-title"
164
+ };
165
+ var $AREA = {
131
166
  area: "bb-area",
132
- areas: "bb-areas",
167
+ areas: "bb-areas"
168
+ };
169
+ var $AXIS = {
133
170
  axis: "bb-axis",
134
171
  axisX: "bb-axis-x",
135
172
  axisXLabel: "bb-axis-x-label",
136
173
  axisY: "bb-axis-y",
137
174
  axisY2: "bb-axis-y2",
138
175
  axisY2Label: "bb-axis-y2-label",
139
- axisYLabel: "bb-axis-y-label",
176
+ axisYLabel: "bb-axis-y-label"
177
+ };
178
+ var $BAR = {
140
179
  bar: "bb-bar",
141
180
  bars: "bb-bars",
142
- brush: "bb-brush",
143
- button: "bb-button",
144
- buttonZoomReset: "bb-zoom-reset",
181
+ chartBar: "bb-chart-bar",
182
+ chartBars: "bb-chart-bars"
183
+ };
184
+ var $CANDLESTICK = {
145
185
  candlestick: "bb-candlestick",
146
186
  candlesticks: "bb-candlesticks",
147
- chart: "bb-chart",
148
- chartArc: "bb-chart-arc",
149
- chartArcs: "bb-chart-arcs",
150
- chartArcsBackground: "bb-chart-arcs-background",
151
- chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
152
- chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
153
- chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
154
- chartArcsTitle: "bb-chart-arcs-title",
155
- chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
156
- chartBar: "bb-chart-bar",
157
- chartBars: "bb-chart-bars",
158
187
  chartCandlestick: "bb-chart-candlestick",
159
188
  chartCandlesticks: "bb-chart-candlesticks",
189
+ valueDown: "bb-value-down",
190
+ valueUp: "bb-value-up"
191
+ };
192
+ var $CIRCLE = {
160
193
  chartCircles: "bb-chart-circles",
161
- chartLine: "bb-chart-line",
162
- chartLines: "bb-chart-lines",
163
- chartRadar: "bb-chart-radar",
164
- chartRadars: "bb-chart-radars",
165
- chartText: "bb-chart-text",
166
- chartTexts: "bb-chart-texts",
167
194
  circle: "bb-circle",
168
- circles: "bb-circles",
195
+ circles: "bb-circles"
196
+ };
197
+ var $COLOR = {
169
198
  colorPattern: "bb-color-pattern",
170
- colorScale: "bb-colorscale",
171
- defocused: "bb-defocused",
199
+ colorScale: "bb-colorscale"
200
+ };
201
+ var $DRAG = {
172
202
  dragarea: "bb-dragarea",
173
- empty: "bb-empty",
174
- eventRect: "bb-event-rect",
175
- eventRects: "bb-event-rects",
176
- eventRectsMultiple: "bb-event-rects-multiple",
177
- eventRectsSingle: "bb-event-rects-single",
178
- focused: "bb-focused",
179
- gaugeValue: "bb-gauge-value",
180
- grid: "bb-grid",
181
- gridLines: "bb-grid-lines",
203
+ INCLUDED: "_included_"
204
+ };
205
+ var $GAUGE = {
206
+ chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
207
+ chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
208
+ chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
209
+ chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
210
+ gaugeValue: "bb-gauge-value"
211
+ };
212
+ var $LEGEND = {
182
213
  legend: "bb-legend",
183
214
  legendBackground: "bb-legend-background",
184
215
  legendItem: "bb-legend-item",
185
216
  legendItemEvent: "bb-legend-item-event",
186
- legendItemFocused: "bb-legend-item-focused",
187
217
  legendItemHidden: "bb-legend-item-hidden",
188
218
  legendItemPoint: "bb-legend-item-point",
189
- legendItemTile: "bb-legend-item-tile",
190
- level: "bb-level",
191
- levels: "bb-levels",
219
+ legendItemTile: "bb-legend-item-tile"
220
+ };
221
+ var $LINE = {
222
+ chartLine: "bb-chart-line",
223
+ chartLines: "bb-chart-lines",
192
224
  line: "bb-line",
193
- lines: "bb-lines",
194
- main: "bb-main",
225
+ lines: "bb-lines"
226
+ };
227
+ var $EVENT = {
228
+ eventRect: "bb-event-rect",
229
+ eventRects: "bb-event-rects",
230
+ eventRectsMultiple: "bb-event-rects-multiple",
231
+ eventRectsSingle: "bb-event-rects-single"
232
+ };
233
+ var $FOCUS = {
234
+ focused: "bb-focused",
235
+ defocused: "bb-defocused",
236
+ legendItemFocused: "bb-legend-item-focused",
237
+ xgridFocus: "bb-xgrid-focus",
238
+ ygridFocus: "bb-ygrid-focus"
239
+ };
240
+ var $GRID = {
241
+ grid: "bb-grid",
242
+ gridLines: "bb-grid-lines",
243
+ xgrid: "bb-xgrid",
244
+ xgridLine: "bb-xgrid-line",
245
+ xgridLines: "bb-xgrid-lines",
246
+ xgrids: "bb-xgrids",
247
+ ygrid: "bb-ygrid",
248
+ ygridLine: "bb-ygrid-line",
249
+ ygridLines: "bb-ygrid-lines",
250
+ ygrids: "bb-ygrids"
251
+ };
252
+ var $RADAR = {
253
+ chartRadar: "bb-chart-radar",
254
+ chartRadars: "bb-chart-radars",
255
+ level: "bb-level",
256
+ levels: "bb-levels"
257
+ };
258
+ var $REGION = {
195
259
  region: "bb-region",
196
- regions: "bb-regions",
260
+ regions: "bb-regions"
261
+ };
262
+ var $SELECT = {
197
263
  selectedCircle: "bb-selected-circle",
198
264
  selectedCircles: "bb-selected-circles",
265
+ SELECTED: "_selected_"
266
+ };
267
+ var $SHAPE = {
199
268
  shape: "bb-shape",
200
- shapes: "bb-shapes",
201
- stanfordElements: "bb-stanford-elements",
202
- stanfordLine: "bb-stanford-line",
203
- stanfordLines: "bb-stanford-lines",
204
- stanfordRegion: "bb-stanford-region",
205
- stanfordRegions: "bb-stanford-regions",
206
- subchart: "bb-subchart",
207
- target: "bb-target",
269
+ shapes: "bb-shapes"
270
+ };
271
+ var $SUBCHART = {
272
+ brush: "bb-brush",
273
+ subchart: "bb-subchart"
274
+ };
275
+ var $TEXT = {
276
+ chartText: "bb-chart-text",
277
+ chartTexts: "bb-chart-texts",
208
278
  text: "bb-text",
209
279
  texts: "bb-texts",
210
280
  title: "bb-title",
281
+ TextOverlapping: "text-overlapping"
282
+ };
283
+ var $TOOLTIP = {
211
284
  tooltip: "bb-tooltip",
212
285
  tooltipContainer: "bb-tooltip-container",
213
- tooltipName: "bb-tooltip-name",
214
- valueDown: "bb-value-down",
215
- valueUp: "bb-value-up",
216
- xgrid: "bb-xgrid",
217
- xgridFocus: "bb-xgrid-focus",
218
- xgridLine: "bb-xgrid-line",
219
- xgridLines: "bb-xgrid-lines",
220
- xgrids: "bb-xgrids",
221
- ygrid: "bb-ygrid",
222
- ygridFocus: "bb-ygrid-focus",
223
- ygridLine: "bb-ygrid-line",
224
- ygridLines: "bb-ygrid-lines",
225
- ygrids: "bb-ygrids",
226
- zoomBrush: "bb-zoom-brush",
227
- EXPANDED: "_expanded_",
228
- SELECTED: "_selected_",
229
- INCLUDED: "_included_",
230
- TextOverlapping: "text-overlapping"
231
- });
286
+ tooltipName: "bb-tooltip-name"
287
+ };
288
+ var $ZOOM = {
289
+ buttonZoomReset: "bb-zoom-reset",
290
+ zoomBrush: "bb-zoom-brush"
291
+ };
292
+ /* harmony default export */ var classes = (_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
232
293
  ;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
233
294
  /**
234
295
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -312,7 +373,7 @@ var Plugin = /*#__PURE__*/function () {
312
373
  return Plugin;
313
374
  }();
314
375
 
315
- Plugin.version = "3.2.2";
376
+ Plugin.version = "3.3.3";
316
377
 
317
378
  ;// CONCATENATED MODULE: ./src/Plugin/sparkline/Options.ts
318
379
  /**
@@ -345,21 +406,6 @@ var Options = function () {
345
406
  };
346
407
 
347
408
 
348
- ;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
349
- function _defineProperty(obj, key, value) {
350
- if (key in obj) {
351
- Object.defineProperty(obj, key, {
352
- value: value,
353
- enumerable: true,
354
- configurable: true,
355
- writable: true
356
- });
357
- } else {
358
- obj[key] = value;
359
- }
360
-
361
- return obj;
362
- }
363
409
  // EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
364
410
  var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
365
411
  // EXTERNAL MODULE: external {"commonjs":"d3-brush","commonjs2":"d3-brush","amd":"d3-brush","root":"d3"}
@@ -398,9 +444,9 @@ var doc = win == null ? void 0 : win.document;
398
444
  ;// CONCATENATED MODULE: ./src/module/util.ts
399
445
 
400
446
 
401
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
447
+ function util_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
402
448
 
403
- function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
449
+ function util_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? util_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : util_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
404
450
 
405
451
  /**
406
452
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -412,7 +458,6 @@ function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i
412
458
 
413
459
 
414
460
 
415
-
416
461
  var isValue = function (v) {
417
462
  return v || v === 0;
418
463
  },
@@ -683,7 +728,7 @@ function getBrushSelection(ctx) {
683
728
  // check from event
684
729
  if (event && event.type === "brush") {
685
730
  selection = event.selection; // check from brush area selection
686
- } else if (main && (selection = main.select("." + classes.brush).node())) {
731
+ } else if (main && (selection = main.select(".bb-brush").node())) {
687
732
  selection = (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushSelection)(selection);
688
733
  }
689
734
 
@@ -705,17 +750,27 @@ function getBoundingRect(node) {
705
750
  /**
706
751
  * Retrun random number
707
752
  * @param {boolean} asStr Convert returned value as string
753
+ * @param {number} min Minimum value
754
+ * @param {number} max Maximum value
708
755
  * @returns {number|string}
709
756
  * @private
710
757
  */
711
758
 
712
759
 
713
- function getRandom(asStr) {
760
+ function getRandom(asStr, min, max) {
714
761
  if (asStr === void 0) {
715
762
  asStr = !0;
716
763
  }
717
764
 
718
- var rand = Math.random();
765
+ if (min === void 0) {
766
+ min = 0;
767
+ }
768
+
769
+ if (max === void 0) {
770
+ max = 1e4;
771
+ }
772
+
773
+ var rand = Math.floor(Math.random() * (max - min) + min);
719
774
  return asStr ? rand + "" : rand;
720
775
  }
721
776
  /**
@@ -800,7 +855,7 @@ function deepClone() {
800
855
  return objectN.map(function (v) {
801
856
  return clone(v);
802
857
  }).reduce(function (a, c) {
803
- return _objectSpread(_objectSpread({}, a), c);
858
+ return util_objectSpread(util_objectSpread({}, a), c);
804
859
  });
805
860
  }
806
861
  /**
@@ -1189,19 +1244,27 @@ function isTabVisible() {
1189
1244
 
1190
1245
 
1191
1246
  function convertInputType(mouse, touch) {
1192
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
1247
+ var hasTouch = !1;
1193
1248
 
1194
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
1249
+ if (touch) {
1195
1250
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
1196
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
1197
- hasTouch = "ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1198
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1199
-
1200
- isMobile = hasTouchPoints || hasTouch;
1251
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
1252
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1253
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1254
+ } else if ("ontouchmove" in win || win.DocumentTouch && doc instanceof win.DocumentTouch) {
1255
+ hasTouch = !0;
1256
+ } else {
1257
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
1258
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
1259
+
1260
+ if (mQ && mQ.media === "(pointer:coarse)") {
1261
+ hasTouch = !!mQ.matches;
1262
+ }
1263
+ }
1201
1264
  }
1202
1265
 
1203
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
1204
- return hasMouse && "mouse" || isMobile && "touch" || null;
1266
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
1267
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
1205
1268
  }
1206
1269
  ;// CONCATENATED MODULE: ./src/config/config.ts
1207
1270
  /**
@@ -1489,7 +1552,7 @@ var Sparkline = /*#__PURE__*/function (_Plugin) {
1489
1552
  data.map(function (v) {
1490
1553
  return v.id;
1491
1554
  }).forEach(function (id, i) {
1492
- var selector = "." + classes.target + "-" + id,
1555
+ var selector = "." + $COMMON.target + "-" + id,
1493
1556
  shape = $el.main.selectAll(selector),
1494
1557
  svg = el[i].querySelector("svg");
1495
1558
 
@@ -5,8 +5,8 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.0
8
+ * @version 3.3.3
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
12
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return n[e](r,r.exports,o),r.exports}o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var r={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}o.d(r,{default:function(){return f}});var n="bb-target",i=function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}();i.version="3.2.2";var l=function(){return{selector:void 0}};o(1),o(3);var s="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")();s.requestIdleCallback=s.requestIdleCallback||function(e){return setTimeout(e,1)},s.cancelIdleCallback=s.cancelIdleCallback||function(e){return clearTimeout(e)};var c=null==s?void 0:s.document;var a=function(e){return void 0!==e},u=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var i=c.createEvent("MouseEvent");i.initMouseEvent(t,n.bubbles,n.cancelable,s,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(i)}}}();function d(e){var t,n,i,o=this.config,r=function(){var e=n.shift();return e&&t&&u(t)&&e in t?(t=t[e],r()):e?void 0:t};Object.keys(o).forEach((function(l){t=e,n=l.split("_"),i=r(),a(i)&&(o[l]=i)}))}var f=function(i){var o,r;function s(t){var n=i.call(this,t)||this;return n.config=void 0,n.element=void 0,n.config=new l,e(n)||e(n)}r=i,(o=s).prototype=Object.create(r.prototype),o.prototype.constructor=o,t(o,r);var c=s.prototype;return c.$beforeInit=function(){d.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},c.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},c.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,i){return"getShapeX"===i?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},c.overrideOptions=function(){var e=this.$$.config;e.legend_show=!1,e.resize_auto=!1,e.axis_x_show=!1,e.axis_x_padding={left:15,right:15,unit:"px"},e.axis_y_show=!1,e.axis_y_padding=5,e.tooltip_position||(e.tooltip_position=function(e,t,n){var i=this.internal.state.event,o=i.pageY-1.35*n,r=i.pageX-t/2;return o<0&&(o=0),r<0&&(r=0),{top:o,left:r}})},c.$init=function(){var e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),document.body.appendChild(e.tooltip.node())},c.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},c.bindEvents=function(e){var t=this;if(void 0===e&&(e=!0),this.$$.config.interaction_enabled){var n=(e?"add":"remove")+"EventListener";this.element.forEach((function(e){var i=e.querySelector("svg");i[n]("mouseover",t.overHandler),i[n]("mousemove",t.moveHandler),i[n]("mouseout",t.outHandler)}))}},c.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},c.moveHandler=function(e){var t,n,i,o=this.$$,r=o.getDataIndexFromEvent(e),l=null==(t=o.api.data(e.target.__id))?void 0:t[0],s=null==(n=l)||null==(i=n.values)?void 0:i[r];s&&!s.name&&(s.name=s.id),o.state.event=e,o.setExpand(r,l.id,!0),o.showTooltip([s],e.target)},c.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},c.$redraw=function(){var e,t=this.$$,i=t.$el,o=this.element,r=t.api.data(),l=null==(e=i.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(o.length<r.length){for(var s=i.chart.node(),c=r.length-o.length;c>0;c--)s.parentNode.insertBefore(o[0].cloneNode(),s.nextSibling);this.element=document.querySelectorAll(this.config.selector),o=this.element}r.map((function(e){return e.id})).forEach((function(e,t){var r="."+n+"-"+e,s=i.main.selectAll(r),c=o[t].querySelector("svg");c||(o[t].innerHTML=l+"</svg>",(c=o[t].querySelector("svg")).__id=e),c.querySelector(r)||s.style("opacity",null),s.style("fill","none").style("opacity",null),c.innerHTML="",c.appendChild(s.node())}))},c.$willDestroy=function(){this.bindEvents(!1),this.element.forEach((function(e){e.innerHTML=""}))},s}(i);f.version="0.0.1"}(),r=r.default}()}));
12
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("d3-selection"),require("d3-brush")):"function"==typeof define&&define.amd?define("bb",["d3-selection","d3-brush"],t):"object"==typeof exports?exports.bb=t(require("d3-selection"),require("d3-brush")):(e.bb=e.bb||{},e.bb.plugin=e.bb.plugin||{},e.bb.plugin.sparkline=t(e.d3,e.d3))}(this,(function(e,t){return function(){"use strict";var n=[,function(t){t.exports=e},,function(e){e.exports=t}],r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};var o={};return function(){function e(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t,i=1;i<arguments.length;i++)t=null!=arguments[i]?arguments[i]:{},i%2?r(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}));return e}i.d(o,{default:function(){return f}});var c={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_"},l=(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a(a({},c),{arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title"}),{area:"bb-area",areas:"bb-areas"}),{axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label"}),{bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars"}),{candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"}),{chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"}),{colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"}),{dragarea:"bb-dragarea",INCLUDED:"_included_"}),{chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"}),{legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"}),{chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"}),{eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"}),{focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"}),{grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"}),{chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",level:"bb-level",levels:"bb-levels"}),{region:"bb-region",regions:"bb-regions"}),{selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"}),{shape:"bb-shape",shapes:"bb-shapes"}),{brush:"bb-brush",subchart:"bb-subchart"}),{chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",TextOverlapping:"text-overlapping"}),{tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"}),{buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"}),function(){function e(e){void 0===e&&(e={}),this.$$=void 0,this.options=void 0,this.options=e}var t=e.prototype;return t.$beforeInit=function(){},t.$init=function(){},t.$afterInit=function(){},t.$redraw=function(){},t.$willDestroy=function(){var e=this;Object.keys(this).forEach((function(t){e[t]=null,delete e[t]}))},e}());l.version="3.3.3";var b=function(){return{selector:void 0}},s=(i(1),i(3),"object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis||"object"==typeof global&&null!==global&&global.Object===Object&&global||"object"==typeof self&&null!==self&&self.Object===Object&&self||Function("return this")());s.requestIdleCallback=s.requestIdleCallback||function(e){return setTimeout(e,1)},s.cancelIdleCallback=s.cancelIdleCallback||function(e){return clearTimeout(e)};var u=null==s?void 0:s.document;var d=function(e){return void 0!==e},h=function(e){return"object"==typeof e};!function(){try{new MouseEvent("t")}catch(e){return function(e,t,n){void 0===n&&(n={bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});var r=u.createEvent("MouseEvent");r.initMouseEvent(t,n.bubbles,n.cancelable,s,0,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.dispatchEvent(r)}}}();function g(e){var t,n,r,i=this.config,o=function(){var e=n.shift();return e&&t&&h(t)&&e in t?(t=t[e],o()):e?void 0:t};Object.keys(i).forEach((function(a){t=e,n=a.split("_"),r=o(),d(r)&&(i[a]=r)}))}var f=function(n){var r,i;function o(t){var r=n.call(this,t)||this;return r.config=void 0,r.element=void 0,r.config=new b,e(r)||e(r)}i=n,(r=o).prototype=Object.create(i.prototype),r.prototype.constructor=r,t(r,i);var a=o.prototype;return a.$beforeInit=function(){g.call(this,this.options),this.validate(),this.element=[].slice.call(document.querySelectorAll(this.config.selector)),this.overrideInternals(),this.overrideOptions(),this.overHandler=this.overHandler.bind(this),this.moveHandler=this.moveHandler.bind(this),this.outHandler=this.outHandler.bind(this)},a.validate=function(){var e=this.$$,t=this.config,n="";if(t.selector&&document.querySelector(t.selector)||(n="No holder elements found from given selector option."),(e.hasType("bubble")||e.hasType("scatter")||e.hasArcType(e.data.targets))&&(n="Contains non supported chart types."),n)throw new Error("[Sparkline plugin] "+n)},a.overrideInternals=function(){var e=this.$$,t=e.getBarW,n=e.getIndices;e.getIndices=function(e,t,r){return"getShapeX"===r?{}:n.call(this,e,t)},e.getBarW=function(e,n){return t.call(this,e,n,1)}},a.overrideOptions=function(){var e=this.$$.config;e.legend_show=!1,e.resize_auto=!1,e.axis_x_show=!1,e.axis_x_padding={left:15,right:15,unit:"px"},e.axis_y_show=!1,e.axis_y_padding=5,e.tooltip_position||(e.tooltip_position=function(e,t,n){var r=this.internal.state.event,i=r.pageY-1.35*n,o=r.pageX-t/2;return i<0&&(i=0),o<0&&(o=0),{top:i,left:o}})},a.$init=function(){var e=this.$$.$el;e.chart.style("width","0").style("height","0").style("pointer-events","none"),document.body.appendChild(e.tooltip.node())},a.$afterInit=function(){this.$$.$el.svg.attr("style",null).style("width","0").style("height","0"),this.bindEvents(!0)},a.bindEvents=function(e){var t=this;if(void 0===e&&(e=!0),this.$$.config.interaction_enabled){var n=(e?"add":"remove")+"EventListener";this.element.forEach((function(e){var r=e.querySelector("svg");r[n]("mouseover",t.overHandler),r[n]("mousemove",t.moveHandler),r[n]("mouseout",t.outHandler)}))}},a.overHandler=function(e){this.$$.state.eventReceiver.rect=e.target.getBoundingClientRect()},a.moveHandler=function(e){var t,n,r,i=this.$$,o=i.getDataIndexFromEvent(e),a=null==(t=i.api.data(e.target.__id))?void 0:t[0],c=null==(n=a)||null==(r=n.values)?void 0:r[o];c&&!c.name&&(c.name=c.id),i.state.event=e,i.setExpand(o,a.id,!0),i.showTooltip([c],e.target)},a.outHandler=function(e){var t=this.$$;t.state.event=e,t.unexpandCircles(),t.hideTooltip()},a.$redraw=function(){var e,t=this.$$,n=t.$el,r=this.element,i=t.api.data(),o=null==(e=n.chart.html().match(/<svg[^>]*>/))?void 0:e[0];if(r.length<i.length){for(var a=n.chart.node(),l=i.length-r.length;l>0;l--)a.parentNode.insertBefore(r[0].cloneNode(),a.nextSibling);this.element=document.querySelectorAll(this.config.selector),r=this.element}i.map((function(e){return e.id})).forEach((function(e,t){var i="."+c.target+"-"+e,a=n.main.selectAll(i),l=r[t].querySelector("svg");l||(r[t].innerHTML=o+"</svg>",(l=r[t].querySelector("svg")).__id=e),l.querySelector(i)||a.style("opacity",null),a.style("fill","none").style("opacity",null),l.innerHTML="",l.appendChild(a.node())}))},a.$willDestroy=function(){this.bindEvents(!1),this.element.forEach((function(e){e.innerHTML=""}))},o}(l);f.version="0.0.1"}(),o=o.default}()}));