billboard.js 3.3.0-next.1 → 3.3.2

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 (96) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +644 -427
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +2809 -2331
  6. package/dist/billboard.pkgd.min.js +3 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
  11. package/dist/plugin/billboardjs-plugin-sparkline.js +156 -103
  12. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-stanford.d.ts +7 -0
  14. package/dist/plugin/billboardjs-plugin-stanford.js +154 -101
  15. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-tableview.d.ts +7 -0
  17. package/dist/plugin/billboardjs-plugin-tableview.js +20 -128
  18. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  19. package/dist/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
  20. package/dist/plugin/billboardjs-plugin-textoverlap.js +20 -128
  21. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  22. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2166 -1905
  23. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2325 -2011
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2320 -2006
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2186 -2033
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2187 -2034
  27. package/dist/theme/datalab.css +1 -1
  28. package/dist/theme/datalab.min.css +2 -2
  29. package/dist/theme/graph.css +1 -1
  30. package/dist/theme/graph.min.css +2 -2
  31. package/dist/theme/insight.css +1 -1
  32. package/dist/theme/insight.min.css +2 -2
  33. package/dist-esm/billboard.js +642 -440
  34. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.d.ts +7 -0
  35. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -4
  36. package/dist-esm/plugin/billboardjs-plugin-sparkline.d.ts +7 -0
  37. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +131 -79
  38. package/dist-esm/plugin/billboardjs-plugin-stanford.d.ts +7 -0
  39. package/dist-esm/plugin/billboardjs-plugin-stanford.js +135 -80
  40. package/dist-esm/plugin/billboardjs-plugin-tableview.d.ts +7 -0
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -8
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.d.ts +7 -0
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -7
  44. package/package.json +39 -38
  45. package/src/Chart/api/chart.ts +8 -2
  46. package/src/Chart/api/data.ts +3 -4
  47. package/src/Chart/api/focus.ts +8 -8
  48. package/src/Chart/api/regions.ts +3 -3
  49. package/src/Chart/api/selection.ts +15 -15
  50. package/src/Chart/api/subchart.ts +10 -10
  51. package/src/ChartInternal/Axis/Axis.ts +26 -19
  52. package/src/ChartInternal/ChartInternal.ts +8 -7
  53. package/src/ChartInternal/data/IData.ts +9 -0
  54. package/src/ChartInternal/data/data.ts +4 -4
  55. package/src/ChartInternal/data/load.ts +2 -2
  56. package/src/ChartInternal/interactions/drag.ts +15 -15
  57. package/src/ChartInternal/interactions/eventrect.ts +18 -18
  58. package/src/ChartInternal/interactions/interaction.ts +46 -14
  59. package/src/ChartInternal/interactions/zoom.ts +4 -4
  60. package/src/ChartInternal/internals/color.ts +4 -4
  61. package/src/ChartInternal/internals/domain.ts +1 -1
  62. package/src/ChartInternal/internals/format.ts +9 -4
  63. package/src/ChartInternal/internals/grid.ts +32 -32
  64. package/src/ChartInternal/internals/legend.ts +27 -27
  65. package/src/ChartInternal/internals/redraw.ts +6 -5
  66. package/src/ChartInternal/internals/region.ts +3 -3
  67. package/src/ChartInternal/internals/selection.ts +16 -15
  68. package/src/ChartInternal/internals/size.ts +3 -3
  69. package/src/ChartInternal/internals/text.ts +8 -8
  70. package/src/ChartInternal/internals/title.ts +4 -4
  71. package/src/ChartInternal/internals/tooltip.ts +5 -6
  72. package/src/ChartInternal/internals/transform.ts +5 -5
  73. package/src/ChartInternal/shape/arc.ts +24 -22
  74. package/src/ChartInternal/shape/area.ts +4 -4
  75. package/src/ChartInternal/shape/bar.ts +11 -9
  76. package/src/ChartInternal/shape/candlestick.ts +8 -8
  77. package/src/ChartInternal/shape/gauge.ts +8 -8
  78. package/src/ChartInternal/shape/line.ts +7 -7
  79. package/src/ChartInternal/shape/point.ts +18 -18
  80. package/src/ChartInternal/shape/radar.ts +12 -10
  81. package/src/ChartInternal/shape/shape.ts +43 -11
  82. package/src/Plugin/sparkline/index.ts +4 -4
  83. package/src/Plugin/stanford/index.ts +3 -3
  84. package/src/Plugin/stanford/util.ts +0 -1
  85. package/src/config/Options/axis/x.ts +25 -5
  86. package/src/config/Options/axis/y.ts +24 -3
  87. package/src/config/Options/axis/y2.ts +24 -3
  88. package/src/config/Options/common/tooltip.ts +10 -1
  89. package/src/config/Options/shape/bar.ts +8 -0
  90. package/src/config/classes.ts +154 -66
  91. package/src/module/util.ts +17 -11
  92. package/types/axis.d.ts +22 -8
  93. package/types/chart.d.ts +1 -1
  94. package/types/options.d.ts +32 -32
  95. package/types/plugin/tableview/index.d.ts +3 -3
  96. package/types/plugin/tableview/options.d.ts +1 -1
package/dist/billboard.js CHANGED
@@ -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-next.1
8
+ * @version 3.3.2
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -314,121 +314,6 @@ function _defineProperty(obj, key, value) {
314
314
  }
315
315
  // EXTERNAL MODULE: external {"commonjs":"d3-brush","commonjs2":"d3-brush","amd":"d3-brush","root":"d3"}
316
316
  var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(3);
317
- ;// CONCATENATED MODULE: ./src/config/classes.ts
318
- /**
319
- * Copyright (c) 2017 ~ present NAVER Corp.
320
- * billboard.js project is licensed under the MIT license
321
- */
322
-
323
- /**
324
- * CSS class names definition
325
- * @private
326
- */
327
- /* harmony default export */ var config_classes = ({
328
- arc: "bb-arc",
329
- arcLabelLine: "bb-arc-label-line",
330
- arcs: "bb-arcs",
331
- area: "bb-area",
332
- areas: "bb-areas",
333
- axis: "bb-axis",
334
- axisX: "bb-axis-x",
335
- axisXLabel: "bb-axis-x-label",
336
- axisY: "bb-axis-y",
337
- axisY2: "bb-axis-y2",
338
- axisY2Label: "bb-axis-y2-label",
339
- axisYLabel: "bb-axis-y-label",
340
- bar: "bb-bar",
341
- bars: "bb-bars",
342
- brush: "bb-brush",
343
- button: "bb-button",
344
- buttonZoomReset: "bb-zoom-reset",
345
- candlestick: "bb-candlestick",
346
- candlesticks: "bb-candlesticks",
347
- chart: "bb-chart",
348
- chartArc: "bb-chart-arc",
349
- chartArcs: "bb-chart-arcs",
350
- chartArcsBackground: "bb-chart-arcs-background",
351
- chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
352
- chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
353
- chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
354
- chartArcsTitle: "bb-chart-arcs-title",
355
- chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
356
- chartBar: "bb-chart-bar",
357
- chartBars: "bb-chart-bars",
358
- chartCandlestick: "bb-chart-candlestick",
359
- chartCandlesticks: "bb-chart-candlesticks",
360
- chartCircles: "bb-chart-circles",
361
- chartLine: "bb-chart-line",
362
- chartLines: "bb-chart-lines",
363
- chartRadar: "bb-chart-radar",
364
- chartRadars: "bb-chart-radars",
365
- chartText: "bb-chart-text",
366
- chartTexts: "bb-chart-texts",
367
- circle: "bb-circle",
368
- circles: "bb-circles",
369
- colorPattern: "bb-color-pattern",
370
- colorScale: "bb-colorscale",
371
- defocused: "bb-defocused",
372
- dragarea: "bb-dragarea",
373
- empty: "bb-empty",
374
- eventRect: "bb-event-rect",
375
- eventRects: "bb-event-rects",
376
- eventRectsMultiple: "bb-event-rects-multiple",
377
- eventRectsSingle: "bb-event-rects-single",
378
- focused: "bb-focused",
379
- gaugeValue: "bb-gauge-value",
380
- grid: "bb-grid",
381
- gridLines: "bb-grid-lines",
382
- legend: "bb-legend",
383
- legendBackground: "bb-legend-background",
384
- legendItem: "bb-legend-item",
385
- legendItemEvent: "bb-legend-item-event",
386
- legendItemFocused: "bb-legend-item-focused",
387
- legendItemHidden: "bb-legend-item-hidden",
388
- legendItemPoint: "bb-legend-item-point",
389
- legendItemTile: "bb-legend-item-tile",
390
- level: "bb-level",
391
- levels: "bb-levels",
392
- line: "bb-line",
393
- lines: "bb-lines",
394
- main: "bb-main",
395
- region: "bb-region",
396
- regions: "bb-regions",
397
- selectedCircle: "bb-selected-circle",
398
- selectedCircles: "bb-selected-circles",
399
- shape: "bb-shape",
400
- shapes: "bb-shapes",
401
- stanfordElements: "bb-stanford-elements",
402
- stanfordLine: "bb-stanford-line",
403
- stanfordLines: "bb-stanford-lines",
404
- stanfordRegion: "bb-stanford-region",
405
- stanfordRegions: "bb-stanford-regions",
406
- subchart: "bb-subchart",
407
- target: "bb-target",
408
- text: "bb-text",
409
- texts: "bb-texts",
410
- title: "bb-title",
411
- tooltip: "bb-tooltip",
412
- tooltipContainer: "bb-tooltip-container",
413
- tooltipName: "bb-tooltip-name",
414
- valueDown: "bb-value-down",
415
- valueUp: "bb-value-up",
416
- xgrid: "bb-xgrid",
417
- xgridFocus: "bb-xgrid-focus",
418
- xgridLine: "bb-xgrid-line",
419
- xgridLines: "bb-xgrid-lines",
420
- xgrids: "bb-xgrids",
421
- ygrid: "bb-ygrid",
422
- ygridFocus: "bb-ygrid-focus",
423
- ygridLine: "bb-ygrid-line",
424
- ygridLines: "bb-ygrid-lines",
425
- ygrids: "bb-ygrids",
426
- zoomBrush: "bb-zoom-brush",
427
- EXPANDED: "_expanded_",
428
- SELECTED: "_selected_",
429
- INCLUDED: "_included_",
430
- TextOverlapping: "text-overlapping"
431
- });
432
317
  ;// CONCATENATED MODULE: ./src/module/util.ts
433
318
 
434
319
 
@@ -446,7 +331,6 @@ function _objectSpread(target) { for (var i = 1, source; i < arguments.length; i
446
331
 
447
332
 
448
333
 
449
-
450
334
  var isValue = function (v) {
451
335
  return v || v === 0;
452
336
  },
@@ -717,7 +601,7 @@ function getBrushSelection(ctx) {
717
601
  // check from event
718
602
  if (event && event.type === "brush") {
719
603
  selection = event.selection; // check from brush area selection
720
- } else if (main && (selection = main.select("." + config_classes.brush).node())) {
604
+ } else if (main && (selection = main.select(".bb-brush").node())) {
721
605
  selection = (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushSelection)(selection);
722
606
  }
723
607
 
@@ -1223,19 +1107,27 @@ function isTabVisible() {
1223
1107
 
1224
1108
 
1225
1109
  function convertInputType(mouse, touch) {
1226
- var isMobile = !1; // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#Mobile_Tablet_or_Desktop
1110
+ var hasTouch = !1;
1227
1111
 
1228
- if (/Mobi/.test(win.navigator.userAgent) && touch) {
1112
+ if (touch) {
1229
1113
  // Some Edge desktop return true: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/20417074/
1230
- var hasTouchPoints = win.navigator && "maxTouchPoints" in win.navigator && win.navigator.maxTouchPoints > 0,
1231
- hasTouch = "ontouchmove" in win || win.DocumentTouch && browser_doc instanceof win.DocumentTouch; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1232
- // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1114
+ if (win.navigator && "maxTouchPoints" in win.navigator) {
1115
+ hasTouch = win.navigator.maxTouchPoints > 0; // Ref: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/touchevents.js
1116
+ // On IE11 with IE9 emulation mode, ('ontouchstart' in window) is returning true
1117
+ } else if ("ontouchmove" in win || win.DocumentTouch && browser_doc instanceof win.DocumentTouch) {
1118
+ hasTouch = !0;
1119
+ } else {
1120
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Browser_detection_using_the_user_agent#avoiding_user_agent_detection
1121
+ var mQ = win.matchMedia && matchMedia("(pointer:coarse)");
1233
1122
 
1234
- isMobile = hasTouchPoints || hasTouch;
1123
+ if (mQ && mQ.media === "(pointer:coarse)") {
1124
+ hasTouch = !!mQ.matches;
1125
+ }
1126
+ }
1235
1127
  }
1236
1128
 
1237
- var hasMouse = mouse && !isMobile ? "onmouseover" in win : !1;
1238
- return hasMouse && "mouse" || isMobile && "touch" || null;
1129
+ var hasMouse = mouse && !hasTouch ? "onmouseover" in win : !1;
1130
+ return hasMouse && "mouse" || hasTouch && "touch" || null;
1239
1131
  }
1240
1132
  ;// CONCATENATED MODULE: ./src/module/error.ts
1241
1133
 
@@ -1295,6 +1187,167 @@ function logError(head, tail) {
1295
1187
 
1296
1188
  throw Error(prefix + " " + head.replace(/\%c([a-z-]+)/i, "'$1' ") + " " + tail);
1297
1189
  }
1190
+ ;// CONCATENATED MODULE: ./src/config/classes.ts
1191
+
1192
+
1193
+ function classes_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; }
1194
+
1195
+ function classes_objectSpread(target) { for (var i = 1, source; i < arguments.length; i++) { source = null != arguments[i] ? arguments[i] : {}; i % 2 ? classes_ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : classes_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1196
+
1197
+ /**
1198
+ * Copyright (c) 2017 ~ present NAVER Corp.
1199
+ * billboard.js project is licensed under the MIT license
1200
+ */
1201
+
1202
+ /**
1203
+ * CSS class names definition
1204
+ * @private
1205
+ */
1206
+ var $COMMON = {
1207
+ button: "bb-button",
1208
+ chart: "bb-chart",
1209
+ empty: "bb-empty",
1210
+ main: "bb-main",
1211
+ target: "bb-target",
1212
+ EXPANDED: "_expanded_"
1213
+ };
1214
+ var $ARC = {
1215
+ arc: "bb-arc",
1216
+ arcLabelLine: "bb-arc-label-line",
1217
+ arcs: "bb-arcs",
1218
+ chartArc: "bb-chart-arc",
1219
+ chartArcs: "bb-chart-arcs",
1220
+ chartArcsBackground: "bb-chart-arcs-background",
1221
+ chartArcsTitle: "bb-chart-arcs-title"
1222
+ };
1223
+ var $AREA = {
1224
+ area: "bb-area",
1225
+ areas: "bb-areas"
1226
+ };
1227
+ var $AXIS = {
1228
+ axis: "bb-axis",
1229
+ axisX: "bb-axis-x",
1230
+ axisXLabel: "bb-axis-x-label",
1231
+ axisY: "bb-axis-y",
1232
+ axisY2: "bb-axis-y2",
1233
+ axisY2Label: "bb-axis-y2-label",
1234
+ axisYLabel: "bb-axis-y-label"
1235
+ };
1236
+ var $BAR = {
1237
+ bar: "bb-bar",
1238
+ bars: "bb-bars",
1239
+ chartBar: "bb-chart-bar",
1240
+ chartBars: "bb-chart-bars"
1241
+ };
1242
+ var $CANDLESTICK = {
1243
+ candlestick: "bb-candlestick",
1244
+ candlesticks: "bb-candlesticks",
1245
+ chartCandlestick: "bb-chart-candlestick",
1246
+ chartCandlesticks: "bb-chart-candlesticks",
1247
+ valueDown: "bb-value-down",
1248
+ valueUp: "bb-value-up"
1249
+ };
1250
+ var $CIRCLE = {
1251
+ chartCircles: "bb-chart-circles",
1252
+ circle: "bb-circle",
1253
+ circles: "bb-circles"
1254
+ };
1255
+ var $COLOR = {
1256
+ colorPattern: "bb-color-pattern",
1257
+ colorScale: "bb-colorscale"
1258
+ };
1259
+ var $DRAG = {
1260
+ dragarea: "bb-dragarea",
1261
+ INCLUDED: "_included_"
1262
+ };
1263
+ var $GAUGE = {
1264
+ chartArcsGaugeMax: "bb-chart-arcs-gauge-max",
1265
+ chartArcsGaugeMin: "bb-chart-arcs-gauge-min",
1266
+ chartArcsGaugeUnit: "bb-chart-arcs-gauge-unit",
1267
+ chartArcsGaugeTitle: "bb-chart-arcs-gauge-title",
1268
+ gaugeValue: "bb-gauge-value"
1269
+ };
1270
+ var $LEGEND = {
1271
+ legend: "bb-legend",
1272
+ legendBackground: "bb-legend-background",
1273
+ legendItem: "bb-legend-item",
1274
+ legendItemEvent: "bb-legend-item-event",
1275
+ legendItemHidden: "bb-legend-item-hidden",
1276
+ legendItemPoint: "bb-legend-item-point",
1277
+ legendItemTile: "bb-legend-item-tile"
1278
+ };
1279
+ var $LINE = {
1280
+ chartLine: "bb-chart-line",
1281
+ chartLines: "bb-chart-lines",
1282
+ line: "bb-line",
1283
+ lines: "bb-lines"
1284
+ };
1285
+ var $EVENT = {
1286
+ eventRect: "bb-event-rect",
1287
+ eventRects: "bb-event-rects",
1288
+ eventRectsMultiple: "bb-event-rects-multiple",
1289
+ eventRectsSingle: "bb-event-rects-single"
1290
+ };
1291
+ var $FOCUS = {
1292
+ focused: "bb-focused",
1293
+ defocused: "bb-defocused",
1294
+ legendItemFocused: "bb-legend-item-focused",
1295
+ xgridFocus: "bb-xgrid-focus",
1296
+ ygridFocus: "bb-ygrid-focus"
1297
+ };
1298
+ var $GRID = {
1299
+ grid: "bb-grid",
1300
+ gridLines: "bb-grid-lines",
1301
+ xgrid: "bb-xgrid",
1302
+ xgridLine: "bb-xgrid-line",
1303
+ xgridLines: "bb-xgrid-lines",
1304
+ xgrids: "bb-xgrids",
1305
+ ygrid: "bb-ygrid",
1306
+ ygridLine: "bb-ygrid-line",
1307
+ ygridLines: "bb-ygrid-lines",
1308
+ ygrids: "bb-ygrids"
1309
+ };
1310
+ var $RADAR = {
1311
+ chartRadar: "bb-chart-radar",
1312
+ chartRadars: "bb-chart-radars",
1313
+ level: "bb-level",
1314
+ levels: "bb-levels"
1315
+ };
1316
+ var $REGION = {
1317
+ region: "bb-region",
1318
+ regions: "bb-regions"
1319
+ };
1320
+ var $SELECT = {
1321
+ selectedCircle: "bb-selected-circle",
1322
+ selectedCircles: "bb-selected-circles",
1323
+ SELECTED: "_selected_"
1324
+ };
1325
+ var $SHAPE = {
1326
+ shape: "bb-shape",
1327
+ shapes: "bb-shapes"
1328
+ };
1329
+ var $SUBCHART = {
1330
+ brush: "bb-brush",
1331
+ subchart: "bb-subchart"
1332
+ };
1333
+ var $TEXT = {
1334
+ chartText: "bb-chart-text",
1335
+ chartTexts: "bb-chart-texts",
1336
+ text: "bb-text",
1337
+ texts: "bb-texts",
1338
+ title: "bb-title",
1339
+ TextOverlapping: "text-overlapping"
1340
+ };
1341
+ var $TOOLTIP = {
1342
+ tooltip: "bb-tooltip",
1343
+ tooltipContainer: "bb-tooltip-container",
1344
+ tooltipName: "bb-tooltip-name"
1345
+ };
1346
+ var $ZOOM = {
1347
+ buttonZoomReset: "bb-zoom-reset",
1348
+ zoomBrush: "bb-zoom-brush"
1349
+ };
1350
+ /* harmony default export */ var classes = (classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread(classes_objectSpread({}, $COMMON), $ARC), $AREA), $AXIS), $BAR), $CANDLESTICK), $CIRCLE), $COLOR), $DRAG), $GAUGE), $LEGEND), $LINE), $EVENT), $FOCUS), $GRID), $RADAR), $REGION), $SELECT), $SHAPE), $SUBCHART), $TEXT), $TOOLTIP), $ZOOM));
1298
1351
  ;// CONCATENATED MODULE: ./src/config/Store/Element.ts
1299
1352
  /**
1300
1353
  * Copyright (c) 2017 ~ present NAVER Corp.
@@ -1543,7 +1596,7 @@ var State = function () {
1543
1596
 
1544
1597
  // mapping
1545
1598
 
1546
- var classes = {
1599
+ var Store_classes = {
1547
1600
  element: Element,
1548
1601
  state: State
1549
1602
  };
@@ -1558,8 +1611,8 @@ var Store = /*#__PURE__*/function () {
1558
1611
  function Store() {
1559
1612
  var _this = this;
1560
1613
 
1561
- Object.keys(classes).forEach(function (v) {
1562
- _this[v] = new classes[v]();
1614
+ Object.keys(Store_classes).forEach(function (v) {
1615
+ _this[v] = new Store_classes[v]();
1563
1616
  });
1564
1617
  }
1565
1618
 
@@ -3102,7 +3155,16 @@ var Store = /*#__PURE__*/function () {
3102
3155
  * - `element {SVGElement}`: Tooltip event bound element
3103
3156
  * - `pos {object}`: Current position of the tooltip.
3104
3157
  * @property {Function|object} [tooltip.contents] Set custom HTML for the tooltip.<br>
3105
- * Specified function receives data, defaultTitleFormat, defaultValueFormat and color of the data point to show. If tooltip.grouped is true, data includes multiple data points.
3158
+ * If tooltip.grouped is true, data includes multiple data points.<br><br>
3159
+ * Specified function receives `data` array and `defaultTitleFormat`, `defaultValueFormat` and `color` functions of the data point to show.
3160
+ * - **Note:**
3161
+ * - defaultTitleFormat:
3162
+ * - if `axis.x.tick.format` option will be used if set.
3163
+ * - otherwise, will return funciton based on tick format type(category, timeseries).
3164
+ * - defaultValueFormat:
3165
+ * - for Arc type (except gauge, radar), the function will return value from `(ratio * 100).toFixed(1)`.
3166
+ * - for Axis based types, will be used `axis.[y|y2].tick.format` option value if is set.
3167
+ * - otherwise, will parse value and return as number.
3106
3168
  * @property {string|HTMLElement} [tooltip.contents.bindto=undefined] Set CSS selector or element reference to bind tooltip.
3107
3169
  * - **NOTE:** When is specified, will not be updating tooltip's position.
3108
3170
  * @property {string} [tooltip.contents.template=undefined] Set tooltip's template.<br><br>
@@ -4024,7 +4086,7 @@ var external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_re
4024
4086
 
4025
4087
  if (filterNull) {
4026
4088
  value = value.filter(function (v) {
4027
- return isValue(v.value);
4089
+ return v && "value" in v && isValue(v.value);
4028
4090
  });
4029
4091
  }
4030
4092
 
@@ -4615,7 +4677,7 @@ var external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_re
4615
4677
  data.filter(function (v) {
4616
4678
  return $$.isBarType(v.id) || $$.isCandlestickType(v.id);
4617
4679
  }).forEach(function (v) {
4618
- var selector = $$.isBarType(v.id) ? "." + config_classes.chartBar + "." + config_classes.target + $$.getTargetSelectorSuffix(v.id) + " ." + config_classes.bar + "-" + v.index : "." + config_classes.chartCandlestick + "." + config_classes.target + $$.getTargetSelectorSuffix(v.id) + " ." + config_classes.candlestick + "-" + v.index + " path";
4680
+ var selector = $$.isBarType(v.id) ? "." + $BAR.chartBar + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $BAR.bar + "-" + v.index : "." + $CANDLESTICK.chartCandlestick + "." + $COMMON.target + $$.getTargetSelectorSuffix(v.id) + " ." + $CANDLESTICK.candlestick + "-" + v.index + " path";
4619
4681
 
4620
4682
  if (!closest && $$.isWithinBar(main.select(selector).node())) {
4621
4683
  closest = v;
@@ -4986,7 +5048,7 @@ var external_commonjs_d3_dsv_commonjs2_d3_dsv_amd_d3_dsv_root_d3_ = __webpack_re
4986
5048
  state.withoutFadeIn[id] = !1; // Remove target's elements
4987
5049
 
4988
5050
  if ($el.legend) {
4989
- $el.legend.selectAll("." + config_classes.legendItem + $$.getTargetSelectorSuffix(id)).remove();
5051
+ $el.legend.selectAll("." + $LEGEND.legendItem + $$.getTargetSelectorSuffix(id)).remove();
4990
5052
  } // Remove target
4991
5053
 
4992
5054
 
@@ -5030,8 +5092,8 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5030
5092
  }
5031
5093
  }
5032
5094
 
5033
- main.selectAll("." + config_classes.shape + "-" + index).each(function () {
5034
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.EXPANDED, !0);
5095
+ main.selectAll("." + $SHAPE.shape + "-" + index).each(function () {
5096
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($COMMON.EXPANDED, !0);
5035
5097
 
5036
5098
  if (isSelectionEnabled) {
5037
5099
  eventRect.style("cursor", isSelectionGrouped ? "pointer" : null);
@@ -5096,8 +5158,8 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5096
5158
  ["bar", "candlestick"].filter(function (v) {
5097
5159
  return $$.$el[v];
5098
5160
  }).forEach(function (v) {
5099
- reset && $$.$el[v].classed(config_classes.EXPANDED, !1);
5100
- $$.getShapeByIndex(v, i, id).classed(config_classes.EXPANDED, expand);
5161
+ reset && $$.$el[v].classed($COMMON.EXPANDED, !1);
5162
+ $$.getShapeByIndex(v, i, id).classed($COMMON.EXPANDED, expand);
5101
5163
  });
5102
5164
  },
5103
5165
 
@@ -5120,10 +5182,10 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5120
5182
  config.color_onover && $$.setOverColor(isOver, d, isArc);
5121
5183
 
5122
5184
  if (isArc) {
5123
- callback(d, main.select("." + config_classes.arc + $$.getTargetSelectorSuffix(d.id)).node());
5185
+ callback(d, main.select("." + $ARC.arc + $$.getTargetSelectorSuffix(d.id)).node());
5124
5186
  } else if (!config.tooltip_grouped) {
5125
5187
  var last = $$.cache.get(KEY.setOverOut) || [],
5126
- shape = main.selectAll("." + config_classes.shape + "-" + d).filter(function (d) {
5188
+ shape = main.selectAll("." + $SHAPE.shape + "-" + d).filter(function (d) {
5127
5189
  return $$.isWithinShape(this, d);
5128
5190
  });
5129
5191
  shape.each(function (d) {
@@ -5151,7 +5213,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5151
5213
  config.point_focus_only && hasRadar ? $$.showCircleFocus($$.getAllValuesOnIndex(d, !0)) : $$.setExpand(d, null, !0);
5152
5214
  }
5153
5215
 
5154
- $$.isMultipleX() || main.selectAll("." + config_classes.shape + "-" + d).each(function (d) {
5216
+ $$.isMultipleX() || main.selectAll("." + $SHAPE.shape + "-" + d).each(function (d) {
5155
5217
  callback(d, this);
5156
5218
  });
5157
5219
  }
@@ -5214,7 +5276,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5214
5276
  arcs = _$$$$el.arcs,
5215
5277
  radar = _$$$$el.radar,
5216
5278
  isMultipleX = $$.isMultipleX(),
5217
- element = (hasRadar ? radar.axes.select("." + config_classes.axis + "-" + index + " text") : eventRect || arcs.selectAll("." + config_classes.target + " path").filter(function (d, i) {
5279
+ element = (hasRadar ? radar.axes.select("." + $AXIS.axis + "-" + index + " text") : eventRect || arcs.selectAll("." + $COMMON.target + " path").filter(function (d, i) {
5218
5280
  return i === index;
5219
5281
  })).node(),
5220
5282
  _element$getBoundingC = element.getBoundingClientRect(),
@@ -5247,14 +5309,40 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5247
5309
  * @private
5248
5310
  */
5249
5311
  unbindZoomEvent: function unbindZoomEvent() {
5250
- var _zoomResetBtn,
5312
+ var _eventRect,
5313
+ _zoomResetBtn,
5251
5314
  $$ = this,
5252
5315
  _$$$$el2 = $$.$el,
5253
5316
  eventRect = _$$$$el2.eventRect,
5254
5317
  zoomResetBtn = _$$$$el2.zoomResetBtn;
5255
5318
 
5256
- eventRect.on(".zoom", null).on(".drag", null);
5257
- (_zoomResetBtn = zoomResetBtn) == null ? void 0 : _zoomResetBtn.style("display", "none");
5319
+ (_eventRect = eventRect) == null ? void 0 : _eventRect.on(".zoom wheel.zoom .drag", null);
5320
+ (_zoomResetBtn = zoomResetBtn) == null ? void 0 : _zoomResetBtn.on("click", null).style("display", "none");
5321
+ },
5322
+
5323
+ /**
5324
+ * Unbind all attached events
5325
+ * @private
5326
+ */
5327
+ unbindAllEvents: function unbindAllEvents() {
5328
+ var _region,
5329
+ _brush,
5330
+ _arcs,
5331
+ _legend,
5332
+ $$ = this,
5333
+ _$$$$el3 = $$.$el,
5334
+ arcs = _$$$$el3.arcs,
5335
+ eventRect = _$$$$el3.eventRect,
5336
+ legend = _$$$$el3.legend,
5337
+ region = _$$$$el3.region,
5338
+ svg = _$$$$el3.svg,
5339
+ brush = $$.brush;
5340
+
5341
+ // detach all possible event types
5342
+ [svg, eventRect, (_region = region) == null ? void 0 : _region.list, (_brush = brush) == null ? void 0 : _brush.getSelection(), (_arcs = arcs) == null ? void 0 : _arcs.selectAll("path"), (_legend = legend) == null ? void 0 : _legend.selectAll("g")].forEach(function (v) {
5343
+ return v == null ? void 0 : v.on("wheel click mouseover mousemove mouseout touchstart touchmove touchend touchstart.eventRect touchmove.eventRect touchend.eventRect .brush .drag .zoom wheel.zoom dblclick.zoom", null);
5344
+ });
5345
+ $$.unbindZoomEvent == null ? void 0 : $$.unbindZoomEvent();
5258
5346
  }
5259
5347
  });
5260
5348
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/class.ts
@@ -5283,7 +5371,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5283
5371
 
5284
5372
  return function (d) {
5285
5373
  var data = d.data || d,
5286
- result = (withShape ? _this.generateClass(config_classes[isPlural ? "shapes" : "shape"], data[key]) : "") + _this.generateClass(config_classes[type], data[useIdKey ? "id" : key]);
5374
+ result = (withShape ? _this.generateClass(classes[isPlural ? "shapes" : "shape"], data[key]) : "") + _this.generateClass(classes[type], data[useIdKey ? "id" : key]);
5287
5375
 
5288
5376
  return result.trim();
5289
5377
  };
@@ -5299,7 +5387,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5299
5387
  var _this2 = this;
5300
5388
 
5301
5389
  return function (d) {
5302
- return config_classes["chart" + type] + _this2.classTarget((d.data ? d.data : d).id);
5390
+ return classes["chart" + type] + _this2.classTarget((d.data ? d.data : d).id);
5303
5391
  };
5304
5392
  },
5305
5393
  generateExtraLineClass: function generateExtraLineClass() {
@@ -5318,26 +5406,26 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5318
5406
  };
5319
5407
  },
5320
5408
  classRegion: function classRegion(d, i) {
5321
- return this.generateClass(config_classes.region, i) + " " + ("class" in d ? d.class : "");
5409
+ return this.generateClass(classes.region, i) + " " + ("class" in d ? d.class : "");
5322
5410
  },
5323
5411
  classTarget: function classTarget(id) {
5324
5412
  var additionalClassSuffix = this.config.data_classes[id],
5325
5413
  additionalClass = "";
5326
5414
 
5327
5415
  if (additionalClassSuffix) {
5328
- additionalClass = " " + config_classes.target + "-" + additionalClassSuffix;
5416
+ additionalClass = " " + classes.target + "-" + additionalClassSuffix;
5329
5417
  }
5330
5418
 
5331
- return this.generateClass(config_classes.target, id) + additionalClass;
5419
+ return this.generateClass(classes.target, id) + additionalClass;
5332
5420
  },
5333
5421
  classFocus: function classFocus(d) {
5334
5422
  return this.classFocused(d) + this.classDefocused(d);
5335
5423
  },
5336
5424
  classFocused: function classFocused(d) {
5337
- return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? config_classes.focused : "");
5425
+ return " " + (this.state.focusedTargetIds.indexOf(d.id) >= 0 ? classes.focused : "");
5338
5426
  },
5339
5427
  classDefocused: function classDefocused(d) {
5340
- return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? config_classes.defocused : "");
5428
+ return " " + (this.state.defocusedTargetIds.indexOf(d.id) >= 0 ? classes.defocused : "");
5341
5429
  },
5342
5430
  getTargetSelectorSuffix: function getTargetSelectorSuffix(targetId) {
5343
5431
  var targetStr = targetId || targetId === 0 ? "-" + targetId : "";
@@ -5347,7 +5435,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5347
5435
  var pfx = prefix || "",
5348
5436
  target = this.getTargetSelectorSuffix(id);
5349
5437
  // select target & circle
5350
- return pfx + "." + (config_classes.target + target) + ", " + pfx + "." + (config_classes.circles + target);
5438
+ return pfx + "." + (classes.target + target) + ", " + pfx + "." + (classes.circles + target);
5351
5439
  },
5352
5440
  selectorTargets: function selectorTargets(idsValue, prefix) {
5353
5441
  var _this3 = this,
@@ -5358,7 +5446,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5358
5446
  }) : null;
5359
5447
  },
5360
5448
  selectorLegend: function selectorLegend(id) {
5361
- return "." + (config_classes.legendItem + this.getTargetSelectorSuffix(id));
5449
+ return "." + (classes.legendItem + this.getTargetSelectorSuffix(id));
5362
5450
  },
5363
5451
  selectorLegends: function selectorLegends(ids) {
5364
5452
  var _this4 = this;
@@ -5434,7 +5522,7 @@ var colorizePattern = function (pattern, color, id) {
5434
5522
 
5435
5523
  if (!pattern) {
5436
5524
  var span = browser_doc.createElement("span");
5437
- span.className = config_classes.colorPattern;
5525
+ span.className = $COLOR.colorPattern;
5438
5526
  span.style.display = "none";
5439
5527
  body.appendChild(span);
5440
5528
  var content = win.getComputedStyle(span).backgroundImage;
@@ -5574,7 +5662,7 @@ var colorizePattern = function (pattern, color, id) {
5574
5662
  }
5575
5663
 
5576
5664
  main.selectAll(isObject(d) ? // when is Arc type
5577
- "." + config_classes.arc + $$.getTargetSelectorSuffix(d.id) : "." + config_classes.shape + "-" + d).style("fill", color);
5665
+ "." + $ARC.arc + $$.getTargetSelectorSuffix(d.id) : "." + $SHAPE.shape + "-" + d).style("fill", color);
5578
5666
  }
5579
5667
  });
5580
5668
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/domain.ts
@@ -5688,7 +5776,7 @@ var colorizePattern = function (pattern, color, id) {
5688
5776
  yDomainMax = $$.getYDomainMinMax(yTargets, "max"),
5689
5777
  isZeroBased = [TYPE.BAR, TYPE.BUBBLE, TYPE.SCATTER].concat(TYPE_BY_CATEGORY.Line).some(function (v) {
5690
5778
  var type = v.indexOf("area") > -1 ? "area" : v;
5691
- return $$.hasType(v, yTargets) && config[type + "_zerobased"];
5779
+ return $$.hasType(v, yTargets, !0) && config[type + "_zerobased"];
5692
5780
  });
5693
5781
  // MEMO: avoid inverting domain unexpectedly
5694
5782
  yDomainMin = isValue(yMin) ? yMin : isValue(yMax) ? yDomainMin < yMax ? yDomainMin : yMax - 10 : yDomainMin;
@@ -6027,8 +6115,14 @@ function getFormat($$, typeValue, v) {
6027
6115
  */
6028
6116
  getDefaultValueFormat: function getDefaultValueFormat() {
6029
6117
  var $$ = this,
6030
- hasArc = $$.hasArcType();
6031
- return hasArc && !$$.hasType("gauge") ? $$.defaultArcValueFormat : $$.defaultValueFormat;
6118
+ defaultArcValueFormat = $$.defaultArcValueFormat,
6119
+ yFormat = $$.yFormat,
6120
+ y2Format = $$.y2Format,
6121
+ hasArc = $$.hasArcType(null, ["gauge", "radar"]);
6122
+ return function (v, ratio, id) {
6123
+ var format = hasArc ? defaultArcValueFormat : $$.axis && $$.axis.getId(id) === "y2" ? y2Format : yFormat;
6124
+ return format.call($$, v, ratio);
6125
+ };
6032
6126
  },
6033
6127
  defaultValueFormat: function defaultValueFormat(v) {
6034
6128
  return isValue(v) ? +v : "";
@@ -6084,7 +6178,7 @@ function getFormat($$, typeValue, v) {
6084
6178
 
6085
6179
  if (config.legend_show) {
6086
6180
  if (!config.legend_contents_bindto) {
6087
- $el.legend = $$.$el.svg.append("g").classed(config_classes.legend, !0).attr("transform", $$.getTranslate("legend"));
6181
+ $el.legend = $$.$el.svg.append("g").classed($LEGEND.legend, !0).attr("transform", $$.getTranslate("legend"));
6088
6182
  } // MEMO: call here to update legend box and translate for all
6089
6183
  // MEMO: translate will be updated by this, so transform not needed in updateLegend()
6090
6184
 
@@ -6123,7 +6217,7 @@ function getFormat($$, typeValue, v) {
6123
6217
  } // toggle legend state
6124
6218
 
6125
6219
 
6126
- $el.legend.selectAll("." + config_classes.legendItem).classed(config_classes.legendItemHidden, function (id) {
6220
+ $el.legend.selectAll("." + $LEGEND.legendItem).classed($LEGEND.legendItemHidden, function (id) {
6127
6221
  var hide = !$$.isTargetToShow(id);
6128
6222
 
6129
6223
  if (hide) {
@@ -6251,7 +6345,7 @@ function getFormat($$, typeValue, v) {
6251
6345
  var legend = this.$el.legend;
6252
6346
 
6253
6347
  if (legend) {
6254
- legend.select("." + config_classes.legendItem + "-" + id + " line").style("stroke", color);
6348
+ legend.select("." + $LEGEND.legendItem + "-" + id + " line").style("stroke", color);
6255
6349
  }
6256
6350
  },
6257
6351
 
@@ -6293,7 +6387,7 @@ function getFormat($$, typeValue, v) {
6293
6387
  * @private
6294
6388
  */
6295
6389
  opacityForUnfocusedLegend: function opacityForUnfocusedLegend(legendItem) {
6296
- return legendItem.classed(config_classes.legendItemHidden) ? null : "0.3";
6390
+ return legendItem.classed($LEGEND.legendItemHidden) ? null : "0.3";
6297
6391
  },
6298
6392
 
6299
6393
  /**
@@ -6307,9 +6401,9 @@ function getFormat($$, typeValue, v) {
6307
6401
  legend = $$.$el.legend,
6308
6402
  $T = $$.$T,
6309
6403
  targetIdz = $$.mapToTargetIds(targetIds);
6310
- legend && $T(legend.selectAll("." + config_classes.legendItem).filter(function (id) {
6404
+ legend && $T(legend.selectAll("." + $LEGEND.legendItem).filter(function (id) {
6311
6405
  return targetIdz.indexOf(id) >= 0;
6312
- }).classed(config_classes.legendItemFocused, focus)).style("opacity", function () {
6406
+ }).classed($FOCUS.legendItemFocused, focus)).style("opacity", function () {
6313
6407
  return focus ? null : $$.opacityForUnfocusedLegend.call($$, (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this));
6314
6408
  });
6315
6409
  },
@@ -6322,7 +6416,7 @@ function getFormat($$, typeValue, v) {
6322
6416
  var $$ = this,
6323
6417
  legend = $$.$el.legend,
6324
6418
  $T = $$.$T;
6325
- legend && $T(legend.selectAll("." + config_classes.legendItem).classed(config_classes.legendItemFocused, !1)).style("opacity", null);
6419
+ legend && $T(legend.selectAll("." + $LEGEND.legendItem).classed($FOCUS.legendItemFocused, !1)).style("opacity", null);
6326
6420
  },
6327
6421
 
6328
6422
  /**
@@ -6383,7 +6477,7 @@ function getFormat($$, typeValue, v) {
6383
6477
  data = !state.redrawing && cache.get(cacheKey) || {};
6384
6478
 
6385
6479
  if (!data[id]) {
6386
- data[id] = $$.getTextRect(textElement, config_classes.legendItem);
6480
+ data[id] = $$.getTextRect(textElement, $LEGEND.legendItem);
6387
6481
  cache.add(cacheKey, data);
6388
6482
  }
6389
6483
 
@@ -6408,7 +6502,7 @@ function getFormat($$, typeValue, v) {
6408
6502
  item.attr("class", function (id) {
6409
6503
  var node = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
6410
6504
  itemClass = !node.empty() && node.attr("class") || "";
6411
- return itemClass + $$.generateClass(config_classes.legendItem, id);
6505
+ return itemClass + $$.generateClass($LEGEND.legendItem, id);
6412
6506
  }).style("visibility", function (id) {
6413
6507
  return $$.isLegendToShow(id) ? null : "hidden";
6414
6508
  });
@@ -6421,7 +6515,7 @@ function getFormat($$, typeValue, v) {
6421
6515
  api.show(id);
6422
6516
  } else {
6423
6517
  api.toggle(id);
6424
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.legendItemFocused, !1);
6518
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
6425
6519
  }
6426
6520
  }
6427
6521
 
@@ -6429,20 +6523,20 @@ function getFormat($$, typeValue, v) {
6429
6523
  });
6430
6524
  isTouch || item.on("mouseout", function (event, id) {
6431
6525
  if (!callFn(config.legend_item_onout, api, id)) {
6432
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.legendItemFocused, !1);
6526
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
6433
6527
 
6434
6528
  if (hasGauge) {
6435
- $$.undoMarkOverlapped($$, "." + config_classes.gaugeValue);
6529
+ $$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
6436
6530
  }
6437
6531
 
6438
6532
  $$.api.revert();
6439
6533
  }
6440
6534
  }).on("mouseover", function (event, id) {
6441
6535
  if (!callFn(config.legend_item_onover, api, id)) {
6442
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.legendItemFocused, !0);
6536
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !0);
6443
6537
 
6444
6538
  if (hasGauge) {
6445
- $$.markOverlapped(id, $$, "." + config_classes.gaugeValue);
6539
+ $$.markOverlapped(id, $$, "." + $GAUGE.gaugeValue);
6446
6540
  }
6447
6541
 
6448
6542
  if (!state.transiting && $$.isTargetToShow(id)) {
@@ -6613,7 +6707,7 @@ function getFormat($$, typeValue, v) {
6613
6707
  return yForLegend(id, i) + 4;
6614
6708
  },
6615
6709
  pos = -200,
6616
- l = legend.selectAll("." + config_classes.legendItem).data(targetIdz).enter().append("g");
6710
+ l = legend.selectAll("." + $LEGEND.legendItem).data(targetIdz).enter().append("g");
6617
6711
 
6618
6712
  $$.setLegendItem(l);
6619
6713
  l.append("text").text(function (id) {
@@ -6621,7 +6715,7 @@ function getFormat($$, typeValue, v) {
6621
6715
  }).each(function (id, i) {
6622
6716
  updatePositions(this, id, i);
6623
6717
  }).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : pos).attr("y", isLegendRightOrInset ? pos : yForLegendText);
6624
- l.append("rect").attr("class", config_classes.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
6718
+ l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
6625
6719
 
6626
6720
  var getColor = function (id) {
6627
6721
  var data = $$.getDataById(id);
@@ -6641,21 +6735,21 @@ function getFormat($$, typeValue, v) {
6641
6735
  }
6642
6736
 
6643
6737
  return browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
6644
- }).attr("class", config_classes.legendItemPoint).style("fill", getColor).style("pointer-events", "none").attr("href", function (data, idx, selection) {
6738
+ }).attr("class", $LEGEND.legendItemPoint).style("fill", getColor).style("pointer-events", "none").attr("href", function (data, idx, selection) {
6645
6739
  var node = selection[idx],
6646
6740
  nodeName = node.nodeName.toLowerCase(),
6647
6741
  id = $$.getTargetSelectorSuffix(data);
6648
6742
  return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
6649
6743
  });
6650
6744
  } else {
6651
- l.append("line").attr("class", config_classes.legendItemTile).style("stroke", getColor).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos).attr("y1", isLegendRightOrInset ? pos : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : pos).attr("y2", isLegendRightOrInset ? pos : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
6745
+ l.append("line").attr("class", $LEGEND.legendItemTile).style("stroke", getColor).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos).attr("y1", isLegendRightOrInset ? pos : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : pos).attr("y2", isLegendRightOrInset ? pos : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
6652
6746
  } // Set background for inset legend
6653
6747
 
6654
6748
 
6655
- background = legend.select("." + config_classes.legendBackground + " rect");
6749
+ background = legend.select("." + $LEGEND.legendBackground + " rect");
6656
6750
 
6657
6751
  if (state.isLegendInset && maxWidth > 0 && background.size() === 0) {
6658
- background = legend.insert("g", "." + config_classes.legendItem).attr("class", config_classes.legendBackground).append("rect");
6752
+ background = legend.insert("g", "." + $LEGEND.legendItem).attr("class", $LEGEND.legendBackground).append("rect");
6659
6753
  }
6660
6754
 
6661
6755
  var texts = legend.selectAll("text").data(targetIdz).text(function (id) {
@@ -6665,7 +6759,7 @@ function getFormat($$, typeValue, v) {
6665
6759
  updatePositions(this, id, i);
6666
6760
  });
6667
6761
  $T(texts, withTransition).attr("x", xForLegendText).attr("y", yForLegendText);
6668
- var rects = legend.selectAll("rect." + config_classes.legendItemEvent).data(targetIdz);
6762
+ var rects = legend.selectAll("rect." + $LEGEND.legendItemEvent).data(targetIdz);
6669
6763
  $T(rects, withTransition).attr("width", function (id) {
6670
6764
  return widths[id];
6671
6765
  }).attr("height", function (id) {
@@ -6673,7 +6767,7 @@ function getFormat($$, typeValue, v) {
6673
6767
  }).attr("x", xForLegendRect).attr("y", yForLegendRect);
6674
6768
 
6675
6769
  if (usePoint) {
6676
- var tiles = legend.selectAll("." + config_classes.legendItemPoint).data(targetIdz);
6770
+ var tiles = legend.selectAll("." + $LEGEND.legendItemPoint).data(targetIdz);
6677
6771
  $T(tiles, withTransition).each(function () {
6678
6772
  var nodeName = this.nodeName.toLowerCase(),
6679
6773
  pointR = config.point_r,
@@ -6707,7 +6801,7 @@ function getFormat($$, typeValue, v) {
6707
6801
  }).attr("r", radius).attr("width", width).attr("height", height);
6708
6802
  });
6709
6803
  } else {
6710
- var _tiles = legend.selectAll("line." + config_classes.legendItemTile).data(targetIdz);
6804
+ var _tiles = legend.selectAll("line." + $LEGEND.legendItemTile).data(targetIdz);
6711
6805
 
6712
6806
  $T(_tiles, withTransition).style("stroke", getColor).attr("x1", x1ForLegendTile).attr("y1", yForLegendTile).attr("x2", x2ForLegendTile).attr("y2", yForLegendTile);
6713
6807
  }
@@ -6777,7 +6871,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
6777
6871
  // @TODO: Make 'init' state to be accessible everywhere not passing as argument.
6778
6872
  $$.axis.redrawAxis(targetsToShow, wth, transitions, flow, initializing); // Data empty label positioning and text.
6779
6873
 
6780
- config.data_empty_label_text && main.select("text." + config_classes.text + "." + config_classes.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null); // grid
6874
+ config.data_empty_label_text && main.select("text." + $TEXT.text + "." + $COMMON.empty).attr("x", state.width / 2).attr("y", state.height / 2).text(config.data_empty_label_text).style("display", targetsToShow.length ? "none" : null); // grid
6781
6875
 
6782
6876
  $$.hasGrid() && $$.updateGrid(); // rect for regions
6783
6877
 
@@ -6790,7 +6884,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
6790
6884
  }
6791
6885
  }); // circles for select
6792
6886
 
6793
- $el.text && main.selectAll("." + config_classes.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(); // event rects will redrawn when flow called
6887
+ $el.text && main.selectAll("." + $SELECT.selectedCircles).filter($$.isBarType.bind($$)).selectAll("circle").remove(); // event rects will redrawn when flow called
6794
6888
 
6795
6889
  if (config.interaction_enabled && !flow && wth.EventRect) {
6796
6890
  $$.redrawEventRect();
@@ -6956,7 +7050,8 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
6956
7050
  redrawWithoutRescale: function redrawWithoutRescale() {
6957
7051
  this.redraw({
6958
7052
  withY: !1,
6959
- withLegend: !0,
7053
+ withDimension: !1,
7054
+ withLegend: !1,
6960
7055
  withSubchart: !1,
6961
7056
  withEventRect: !1,
6962
7057
  withTransitionForAxis: !1
@@ -7269,6 +7364,20 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7269
7364
 
7270
7365
  return shape;
7271
7366
  },
7367
+
7368
+ /**
7369
+ * Get shape's indices according it's position
7370
+ *
7371
+ * From the below example, indices will be:
7372
+ * ==> {data1: 0, data2: 0, data3: 1, data4: 1, __max__: 1}
7373
+ *
7374
+ * data1 data3 data1 data3
7375
+ * data2 data4 data2 data4
7376
+ * -------------------------
7377
+ * 0 1
7378
+ * @param {Function} typeFilter Chart type filter function
7379
+ * @returns {object} Indices object with its position
7380
+ */
7272
7381
  getShapeIndices: function getShapeIndices(typeFilter) {
7273
7382
  var $$ = this,
7274
7383
  config = $$.config,
@@ -7314,12 +7423,30 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7314
7423
  /**
7315
7424
  * Get indices value based on data ID value
7316
7425
  * @param {object} indices Indices object
7317
- * @param {string} id Data id value
7426
+ * @param {object} d Data row
7427
+ * @param {string} caller Caller function name (Used only for 'sparkline' plugin)
7318
7428
  * @returns {object} Indices object
7319
7429
  * @private
7320
7430
  */
7321
- getIndices: function getIndices(indices, id) {
7322
- var xs = this.config.data_xs;
7431
+ getIndices: function getIndices(indices, d) {
7432
+ // eslint-disable-line
7433
+ var $$ = this,
7434
+ _$$$config = $$.config,
7435
+ xs = _$$$config.data_xs,
7436
+ removeNull = _$$$config.bar_indices_removeNull,
7437
+ id = d.id,
7438
+ index = d.index;
7439
+
7440
+ if ($$.isBarType(id) && removeNull) {
7441
+ var ind = {}; // redefine bar indices order
7442
+
7443
+ $$.getAllValuesOnIndex(index, !0).forEach(function (v, i) {
7444
+ ind[v.id] = i;
7445
+ ind.__max__ = i;
7446
+ });
7447
+ return ind;
7448
+ }
7449
+
7323
7450
  return notEmpty(xs) ? indices[xs[id]] : indices;
7324
7451
  },
7325
7452
 
@@ -7349,7 +7476,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7349
7476
  halfWidth = isObjectType(offset) && (offset._$total.length ? offset._$total.reduce(sum) / 2 : 0);
7350
7477
 
7351
7478
  return function (d) {
7352
- var ind = $$.getIndices(indices, d.id, "getShapeX"),
7479
+ var ind = $$.getIndices(indices, d, "getShapeX"),
7353
7480
  index = d.id in ind ? ind[d.id] : 0,
7354
7481
  targetsNum = (ind.__max__ || 0) + 1,
7355
7482
  x = 0;
@@ -7409,11 +7536,13 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7409
7536
  */
7410
7537
  getShapeYMin: function getShapeYMin(id) {
7411
7538
  var $$ = this,
7412
- scale = $$.scale[$$.axis.getId(id)],
7539
+ axisId = $$.axis.getId(id),
7540
+ scale = $$.scale[axisId],
7413
7541
  _scale$domain = scale.domain(),
7414
- yMin = _scale$domain[0];
7542
+ yMin = _scale$domain[0],
7543
+ inverted = $$.config["axis_" + axisId + "_inverted"];
7415
7544
 
7416
- return !$$.isGrouped(id) && yMin > 0 ? yMin : 0;
7545
+ return !$$.isGrouped(id) && !inverted && yMin > 0 ? yMin : 0;
7417
7546
  },
7418
7547
 
7419
7548
  /**
@@ -7467,7 +7596,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7467
7596
  var id = d.id,
7468
7597
  value = d.value,
7469
7598
  x = d.x,
7470
- ind = $$.getIndices(indices, id),
7599
+ ind = $$.getIndices(indices, d),
7471
7600
  scale = $$.getYScaleById(id, isSub);
7472
7601
 
7473
7602
  if ($$.isBarRangeType(d)) {
@@ -7564,7 +7693,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7564
7693
  return isValue(i) ? d.index === i : !0;
7565
7694
  });
7566
7695
  } else {
7567
- shape = (id ? $el.main.selectAll("." + config_classes[shapeName + "s"] + $$.getTargetSelectorSuffix(id)) : $el.main).selectAll("." + config_classes[shapeName] + suffix);
7696
+ shape = (id ? $el.main.selectAll("." + classes[shapeName + "s"] + $$.getTargetSelectorSuffix(id)) : $el.main).selectAll("." + classes[shapeName] + suffix);
7568
7697
  }
7569
7698
 
7570
7699
  return shape;
@@ -7579,7 +7708,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7579
7708
  } else if ($$.hasValidPointType != null && $$.hasValidPointType(that.nodeName)) {
7580
7709
  isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)(d.value)) : $$.isWithinCircle(that, $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0);
7581
7710
  } else if (that.nodeName === "path") {
7582
- isWithin = shape.classed(config_classes.bar) ? $$.isWithinBar(that) : !0;
7711
+ isWithin = shape.classed(classes.bar) ? $$.isWithinBar(that) : !0;
7583
7712
  }
7584
7713
 
7585
7714
  return isWithin;
@@ -7789,7 +7918,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7789
7918
  config = $$.config,
7790
7919
  $el = $$.$el,
7791
7920
  hasLeftAxisRect = config.axis_rotated || !config.axis_rotated && !config.axis_y_inner,
7792
- leftAxisClass = config.axis_rotated ? config_classes.axisX : config_classes.axisY,
7921
+ leftAxisClass = config.axis_rotated ? $AXIS.axisX : $AXIS.axisY,
7793
7922
  leftAxis = $el.main.select("." + leftAxisClass).node(),
7794
7923
  svgRect = leftAxis && hasLeftAxisRect ? leftAxis.getBoundingClientRect() : {
7795
7924
  right: 0
@@ -7828,7 +7957,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7828
7957
  svg.attr("width", current.width).attr("height", current.height);
7829
7958
 
7830
7959
  if (hasAxis) {
7831
- var brush = svg.select("." + config_classes.brush + " .overlay"),
7960
+ var brush = svg.select("." + $SUBCHART.brush + " .overlay"),
7832
7961
  brushSize = {
7833
7962
  width: 0,
7834
7963
  height: 0
@@ -7991,7 +8120,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
7991
8120
  */
7992
8121
  initText: function initText() {
7993
8122
  var $el = this.$el;
7994
- $el.main.select("." + config_classes.chart).append("g").attr("class", config_classes.chartTexts);
8123
+ $el.main.select("." + $COMMON.chart).append("g").attr("class", $TEXT.chartTexts);
7995
8124
  },
7996
8125
 
7997
8126
  /**
@@ -8004,7 +8133,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8004
8133
  classChartText = $$.getChartClass("Text"),
8005
8134
  classTexts = $$.getClass("texts", "id"),
8006
8135
  classFocus = $$.classFocus.bind($$),
8007
- mainTextUpdate = $$.$el.main.select("." + config_classes.chartTexts).selectAll("." + config_classes.chartText).data(targets).attr("class", function (d) {
8136
+ mainTextUpdate = $$.$el.main.select("." + $TEXT.chartTexts).selectAll("." + $TEXT.chartText).data(targets).attr("class", function (d) {
8008
8137
  return classChartText(d) + classFocus(d);
8009
8138
  }),
8010
8139
  mainTextEnter = mainTextUpdate.enter().append("g").style("opacity", "0").attr("class", classChartText).style("pointer-events", "none");
@@ -8021,7 +8150,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8021
8150
  $T = $$.$T,
8022
8151
  config = $$.config,
8023
8152
  classText = $$.getClass("text", "index"),
8024
- text = $el.main.selectAll("." + config_classes.texts).selectAll("." + config_classes.text).data($$.labelishData.bind($$));
8153
+ text = $el.main.selectAll("." + $TEXT.texts).selectAll("." + $TEXT.text).data($$.labelishData.bind($$));
8025
8154
  $T(text.exit()).style("fill-opacity", "0").remove();
8026
8155
  $el.text = text.enter().append("text").merge(text).attr("class", classText).attr("text-anchor", function (d) {
8027
8156
  // when value is negative or
@@ -8384,7 +8513,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8384
8513
  nodeForWidth = calcHypo(translate.e, translate.f) > calcHypo(coordinate.e, coordinate.f) ? textNode : filteredTextNode,
8385
8514
  overlapsX = Math.ceil(Math.abs(translate.e - coordinate.e)) < Math.ceil(nodeForWidth.node().getComputedTextLength()),
8386
8515
  overlapsY = Math.ceil(Math.abs(translate.f - coordinate.f)) < parseInt(textNode.style("font-size"), 10);
8387
- filteredTextNode.classed(config_classes.TextOverlapping, overlapsX && overlapsY);
8516
+ filteredTextNode.classed($TEXT.TextOverlapping, overlapsX && overlapsY);
8388
8517
  });
8389
8518
  },
8390
8519
 
@@ -8397,7 +8526,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
8397
8526
  */
8398
8527
  undoMarkOverlapped: function undoMarkOverlapped($$, selector) {
8399
8528
  $$.$el.arcs.selectAll(selector).each(function () {
8400
- (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([this, this.previousSibling]).classed(config_classes.TextOverlapping, !1);
8529
+ (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([this, this.previousSibling]).classed($TEXT.TextOverlapping, !1);
8401
8530
  });
8402
8531
  },
8403
8532
 
@@ -8465,7 +8594,7 @@ function getTextPos(pos, width) {
8465
8594
 
8466
8595
  if (config.title_text) {
8467
8596
  $el.title = $el.svg.append("g");
8468
- var text = $el.title.append("text").style("text-anchor", getTextPos(config.title_position)).attr("class", config_classes.title);
8597
+ var text = $el.title.append("text").style("text-anchor", getTextPos(config.title_position)).attr("class", $TEXT.title);
8469
8598
  setTextValue(text, config.title_text, [.3, 1.5]);
8470
8599
  }
8471
8600
  },
@@ -8501,7 +8630,7 @@ function getTextPos(pos, width) {
8501
8630
  config = $$.config,
8502
8631
  current = $$.state.current,
8503
8632
  position = config.title_position || "left",
8504
- textRectWidth = $$.getTextRect($$.$el.title, config_classes.title).width,
8633
+ textRectWidth = $$.getTextRect($$.$el.title, $TEXT.title).width,
8505
8634
  x;
8506
8635
 
8507
8636
  if (/(right|center)/.test(position)) {
@@ -8527,7 +8656,7 @@ function getTextPos(pos, width) {
8527
8656
  */
8528
8657
  yForTitle: function yForTitle() {
8529
8658
  var $$ = this;
8530
- return ($$.config.title_padding.top || 0) + $$.getTextRect($$.$el.title, config_classes.title).height;
8659
+ return ($$.config.title_padding.top || 0) + $$.getTextRect($$.$el.title, $TEXT.title).height;
8531
8660
  },
8532
8661
 
8533
8662
  /**
@@ -8561,7 +8690,7 @@ function getTextPos(pos, width) {
8561
8690
  $el.tooltip = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(config.tooltip_contents.bindto);
8562
8691
 
8563
8692
  if ($el.tooltip.empty()) {
8564
- $el.tooltip = $el.chart.style("position", "relative").append("div").attr("class", config_classes.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
8693
+ $el.tooltip = $el.chart.append("div").attr("class", $TOOLTIP.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
8565
8694
  }
8566
8695
 
8567
8696
  $$.bindTooltipResizePos();
@@ -8714,13 +8843,13 @@ function getTextPos(pos, width) {
8714
8843
  if (isUndefined(text)) {
8715
8844
  var title = (state.hasAxis || state.hasRadar) && sanitise(titleFormat ? titleFormat(row.x) : row.x);
8716
8845
  text = tplProcess(tpl[0], {
8717
- CLASS_TOOLTIP: config_classes.tooltip,
8846
+ CLASS_TOOLTIP: $TOOLTIP.tooltip,
8718
8847
  TITLE: isValue(title) ? tplStr ? title : "<tr><th colspan=\"2\">" + title + "</th></tr>" : ""
8719
8848
  });
8720
8849
  }
8721
8850
 
8722
8851
  if (!row.ratio && $$.$el.arcs) {
8723
- row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + config_classes.arc + "-" + row.id).data()[0]);
8852
+ row.ratio = $$.getRatio("arc", $$.$el.arcs.select("path." + $ARC.arc + "-" + row.id).data()[0]);
8724
8853
  }
8725
8854
 
8726
8855
  param = [row.ratio, row.id, row.index, d];
@@ -8762,7 +8891,7 @@ function getTextPos(pos, width) {
8762
8891
  var name = sanitise(nameFormat.apply(void 0, [row.name].concat(param))),
8763
8892
  color = getBgColor(row),
8764
8893
  contentValue = {
8765
- CLASS_TOOLTIP_NAME: config_classes.tooltipName + $$.getTargetSelectorSuffix(row.id),
8894
+ CLASS_TOOLTIP_NAME: $TOOLTIP.tooltipName + $$.getTargetSelectorSuffix(row.id),
8766
8895
  COLOR: tplStr || !$$.patterns ? color : "<svg><rect style=\"fill:" + color + "\" width=\"10\" height=\"10\"></rect></svg>",
8767
8896
  NAME: name,
8768
8897
  VALUE: value
@@ -9100,14 +9229,14 @@ function getTextPos(pos, width) {
9100
9229
  var $$ = this,
9101
9230
  main = $$.$el.main,
9102
9231
  $T = $$.$T,
9103
- xAxis = transitions != null && transitions.axisX ? transitions.axisX : $T(main.select("." + config_classes.axisX), withTransition),
9104
- yAxis = transitions != null && transitions.axisY ? transitions.axisY : $T(main.select("." + config_classes.axisY), withTransition),
9105
- y2Axis = transitions != null && transitions.axisY2 ? transitions.axisY2 : $T(main.select("." + config_classes.axisY2), withTransition);
9232
+ xAxis = transitions != null && transitions.axisX ? transitions.axisX : $T(main.select("." + $AXIS.axisX), withTransition),
9233
+ yAxis = transitions != null && transitions.axisY ? transitions.axisY : $T(main.select("." + $AXIS.axisY), withTransition),
9234
+ y2Axis = transitions != null && transitions.axisY2 ? transitions.axisY2 : $T(main.select("." + $AXIS.axisY2), withTransition);
9106
9235
  $T(main, withTransition).attr("transform", $$.getTranslate("main"));
9107
9236
  xAxis.attr("transform", $$.getTranslate("x"));
9108
9237
  yAxis.attr("transform", $$.getTranslate("y"));
9109
9238
  y2Axis.attr("transform", $$.getTranslate("y2"));
9110
- main.select("." + config_classes.chartArcs).attr("transform", $$.getTranslate("arc"));
9239
+ main.select("." + $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
9111
9240
  },
9112
9241
  transformAll: function transformAll(withTransition, transitions) {
9113
9242
  var $$ = this,
@@ -9543,7 +9672,7 @@ var ChartInternal = /*#__PURE__*/function () {
9543
9672
  $el.chart = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(browser_doc.body.appendChild(browser_doc.createElement("div")));
9544
9673
  }
9545
9674
 
9546
- $el.chart.html("").classed(bindto.classname, !0);
9675
+ $el.chart.html("").classed(bindto.classname, !0).style("position", "relative");
9547
9676
  $$.initToRender();
9548
9677
  }
9549
9678
  /**
@@ -9728,7 +9857,7 @@ var ChartInternal = /*#__PURE__*/function () {
9728
9857
 
9729
9858
  $$.bindResize(); // Define regions
9730
9859
 
9731
- var main = $el.svg.append("g").classed(config_classes.main, !0).attr("transform", $$.getTranslate("main"));
9860
+ var main = $el.svg.append("g").classed($COMMON.main, !0).attr("transform", $$.getTranslate("main"));
9732
9861
  $el.main = main; // initialize subchart when subchart show option is set
9733
9862
 
9734
9863
  config.subchart_show && $$.initSubchart();
@@ -9738,7 +9867,7 @@ var ChartInternal = /*#__PURE__*/function () {
9738
9867
  // text when empty
9739
9868
 
9740
9869
  if (config.data_empty_label_text) {
9741
- main.append("text").attr("class", config_classes.text + " " + config_classes.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
9870
+ main.append("text").attr("class", $TEXT.text + " " + $COMMON.empty).attr("text-anchor", "middle") // horizontal centering of text at x position in all browsers.
9742
9871
  .attr("dominant-baseline", "middle"); // vertical centering of text at y position in all browsers, except IE.
9743
9872
  }
9744
9873
 
@@ -9750,7 +9879,7 @@ var ChartInternal = /*#__PURE__*/function () {
9750
9879
  } // Define g for chart area
9751
9880
 
9752
9881
 
9753
- main.append("g").attr("class", config_classes.chart).attr("clip-path", state.clip.path);
9882
+ main.append("g").attr("class", $COMMON.chart).attr("clip-path", state.clip.path);
9754
9883
  $$.callPluginHook("$init");
9755
9884
 
9756
9885
  if (hasAxis) {
@@ -9949,7 +10078,7 @@ var ChartInternal = /*#__PURE__*/function () {
9949
10078
  var $$ = this,
9950
10079
  svg = $$.$el.svg,
9951
10080
  $T = $$.$T;
9952
- $T(svg.selectAll("." + config_classes.target).filter(function (d) {
10081
+ $T(svg.selectAll("." + $COMMON.target).filter(function (d) {
9953
10082
  return $$.isTargetToShow(d.id);
9954
10083
  })).style("opacity", null);
9955
10084
  };
@@ -10119,7 +10248,7 @@ function loadConfig(config) {
10119
10248
  config.size_width = size ? size.width : null;
10120
10249
  config.size_height = size ? size.height : null;
10121
10250
  state.resizing = !0;
10122
- this.flush(!1, !0);
10251
+ this.flush(!1);
10123
10252
  $$.resizeFunction();
10124
10253
  }
10125
10254
  },
@@ -10201,12 +10330,14 @@ function loadConfig(config) {
10201
10330
 
10202
10331
  if (notEmpty($$)) {
10203
10332
  $$.callPluginHook("$willDestroy");
10204
- $$.charts.splice($$.charts.indexOf(this), 1); // clear timers && pending transition
10333
+ $$.charts.splice($$.charts.indexOf(this), 1); // detach events
10334
+
10335
+ $$.unbindAllEvents(); // clear timers && pending transition
10205
10336
 
10206
10337
  svg.select("*").interrupt();
10207
10338
  $$.resizeFunction.clear();
10208
10339
  win.removeEventListener("resize", $$.resizeFunction);
10209
- chart.classed("bb", !1).html(""); // releasing own references
10340
+ chart.classed("bb", !1).style("position", null).selectChildren().remove(); // releasing own references
10210
10341
 
10211
10342
  Object.keys(this).forEach(function (key) {
10212
10343
  key === "internal" && Object.keys($$).forEach(function (k) {
@@ -10651,11 +10782,11 @@ function nodeToSvgDataUrl(node, option, orgSize) {
10651
10782
  candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
10652
10783
  this.revert();
10653
10784
  this.defocus();
10654
- candidates.classed(config_classes.focused, !0).classed(config_classes.defocused, !1);
10785
+ candidates.classed($FOCUS.focused, !0).classed($FOCUS.defocused, !1);
10655
10786
 
10656
10787
  if ($$.hasArcType() && !state.hasRadar) {
10657
10788
  $$.expandArc(targetIds);
10658
- $$.hasType("gauge") && $$.markOverlapped(targetIdsValue, $$, "." + config_classes.gaugeValue);
10789
+ $$.hasType("gauge") && $$.markOverlapped(targetIdsValue, $$, "." + $GAUGE.gaugeValue);
10659
10790
  }
10660
10791
 
10661
10792
  $$.toggleFocusLegend(targetIds, !0);
@@ -10687,11 +10818,11 @@ function nodeToSvgDataUrl(node, option, orgSize) {
10687
10818
  state = $$.state,
10688
10819
  targetIds = $$.mapToTargetIds(targetIdsValue),
10689
10820
  candidates = $$.$el.svg.selectAll($$.selectorTargets(targetIds.filter($$.isTargetToShow, $$)));
10690
- candidates.classed(config_classes.focused, !1).classed(config_classes.defocused, !0);
10821
+ candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !0);
10691
10822
 
10692
10823
  if ($$.hasArcType()) {
10693
10824
  $$.unexpandArc(targetIds);
10694
- $$.hasType("gauge") && $$.undoMarkOverlapped($$, "." + config_classes.gaugeValue);
10825
+ $$.hasType("gauge") && $$.undoMarkOverlapped($$, "." + $GAUGE.gaugeValue);
10695
10826
  }
10696
10827
 
10697
10828
  $$.toggleFocusLegend(targetIds, !1);
@@ -10726,14 +10857,14 @@ function nodeToSvgDataUrl(node, option, orgSize) {
10726
10857
  targetIds = $$.mapToTargetIds(targetIdsValue),
10727
10858
  candidates = $el.svg.selectAll($$.selectorTargets(targetIds));
10728
10859
  // should be for all targets
10729
- candidates.classed(config_classes.focused, !1).classed(config_classes.defocused, !1);
10860
+ candidates.classed($FOCUS.focused, !1).classed($FOCUS.defocused, !1);
10730
10861
  $$.hasArcType() && $$.unexpandArc(targetIds);
10731
10862
 
10732
10863
  if (config.legend_show) {
10733
10864
  $$.showLegend(targetIds.filter($$.isLegendToShow.bind($$)));
10734
10865
  $el.legend.selectAll($$.selectorLegends(targetIds)).filter(function () {
10735
- return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.legendItemFocused);
10736
- }).classed(config_classes.legendItemFocused, !1);
10866
+ return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused);
10867
+ }).classed($FOCUS.legendItemFocused, !1);
10737
10868
  }
10738
10869
 
10739
10870
  state.focusedTargetIds = [];
@@ -11972,8 +12103,8 @@ extend(regions, {
11972
12103
  config = $$.config,
11973
12104
  $T = $$.$T,
11974
12105
  options = optionsValue || {},
11975
- classes = getOption(options, "classes", [config_classes.region]),
11976
- regions = $$.$el.main.select("." + config_classes.regions).selectAll(classes.map(function (c) {
12106
+ classes = getOption(options, "classes", [$REGION.region]),
12107
+ regions = $$.$el.main.select("." + $REGION.regions).selectAll(classes.map(function (c) {
11977
12108
  return "." + c;
11978
12109
  }));
11979
12110
  $T(regions).style("opacity", "0").remove();
@@ -12966,7 +13097,7 @@ var Axis_Axis = /*#__PURE__*/function () {
12966
13097
  var _proto = Axis.prototype;
12967
13098
 
12968
13099
  _proto.getAxisClassName = function getAxisClassName(id) {
12969
- return config_classes.axis + " " + config_classes["axis" + capitalize(id)];
13100
+ return $AXIS.axis + " " + $AXIS["axis" + capitalize(id)];
12970
13101
  };
12971
13102
 
12972
13103
  _proto.isHorizontal = function isHorizontal($$, forHorizontal) {
@@ -13036,7 +13167,7 @@ var Axis_Axis = /*#__PURE__*/function () {
13036
13167
  config.axis_y2_show && target.push("y2");
13037
13168
  target.forEach(function (v) {
13038
13169
  var classAxis = _this.getAxisClassName(v),
13039
- classLabel = config_classes["axis" + v.toUpperCase() + "Label"];
13170
+ classLabel = $AXIS["axis" + v.toUpperCase() + "Label"];
13040
13171
 
13041
13172
  axis[v] = main.append("g").attr("class", classAxis).attr("clip-path", function () {
13042
13173
  var res = null;
@@ -13123,7 +13254,8 @@ var Axis_Axis = /*#__PURE__*/function () {
13123
13254
  var _this2 = this,
13124
13255
  $$ = this.owner,
13125
13256
  config = $$.config,
13126
- main = $$.$el.main;
13257
+ main = $$.$el.main,
13258
+ $T = $$.$T;
13127
13259
 
13128
13260
  Object.keys(this.axesList).forEach(function (id) {
13129
13261
  var axesConfig = config["axis_" + id + "_axes"],
@@ -13147,7 +13279,7 @@ var Axis_Axis = /*#__PURE__*/function () {
13147
13279
  g = main.append("g").attr("class", className).style("visibility", config["axis_" + id + "_show"] ? null : "hidden").call(v);
13148
13280
  } else {
13149
13281
  axesConfig[i].domain && scale.domain(axesConfig[i].domain);
13150
- $$.$T(g).call(v.scale(scale));
13282
+ $T(g).call(v.scale(scale));
13151
13283
  }
13152
13284
 
13153
13285
  g.attr("transform", $$.getTranslate(id, i + 1));
@@ -13603,9 +13735,9 @@ var Axis_Axis = /*#__PURE__*/function () {
13603
13735
  main = $$.$el.main,
13604
13736
  $T = $$.$T,
13605
13737
  labels = {
13606
- x: main.select("." + config_classes.axisX + " ." + config_classes.axisXLabel),
13607
- y: main.select("." + config_classes.axisY + " ." + config_classes.axisYLabel),
13608
- y2: main.select("." + config_classes.axisY2 + " ." + config_classes.axisY2Label)
13738
+ x: main.select("." + $AXIS.axisX + " ." + $AXIS.axisXLabel),
13739
+ y: main.select("." + $AXIS.axisY + " ." + $AXIS.axisYLabel),
13740
+ y2: main.select("." + $AXIS.axisY2 + " ." + $AXIS.axisY2Label)
13609
13741
  };
13610
13742
 
13611
13743
  Object.keys(labels).filter(function (id) {
@@ -13766,11 +13898,12 @@ var Axis_Axis = /*#__PURE__*/function () {
13766
13898
  }
13767
13899
 
13768
13900
  ["y", "y2"].forEach(function (key) {
13769
- var axisScale = scale[key];
13901
+ var prefix = "axis_" + key + "_",
13902
+ axisScale = scale[key];
13770
13903
 
13771
- if (axisScale) {
13772
- var tickValues = config["axis_" + key + "_tick_values"],
13773
- tickCount = config["axis_" + key + "_tick_count"];
13904
+ if (config[prefix + "show"] && axisScale) {
13905
+ var tickValues = config[prefix + "tick_values"],
13906
+ tickCount = config[prefix + "tick_count"];
13774
13907
  axisScale.domain($$.getYDomain(targetsToShow, key, xDomainForZoom));
13775
13908
 
13776
13909
  if (!tickValues && tickCount) {
@@ -13816,13 +13949,15 @@ var Axis_Axis = /*#__PURE__*/function () {
13816
13949
  ["subX", "x", "y", "y2"].forEach(function (type) {
13817
13950
  var axis = $el.axis[type],
13818
13951
  id = type === "subX" ? "x" : type,
13819
- toCull = config["axis_" + id + "_tick_culling"]; // subchart x axis should be aligned with x axis culling
13952
+ cullingOptionPrefix = "axis_" + id + "_tick_culling",
13953
+ toCull = config[cullingOptionPrefix]; // subchart x axis should be aligned with x axis culling
13820
13954
 
13821
13955
  if (axis && toCull) {
13822
- var tickText = axis.selectAll(".tick text"),
13823
- tickValues = sortValue(tickText.data()),
13956
+ var tickNodes = axis.selectAll(".tick"),
13957
+ tickValues = sortValue(tickNodes.data()),
13824
13958
  tickSize = tickValues.length,
13825
- cullingMax = config["axis_" + id + "_tick_culling_max"],
13959
+ cullingMax = config[cullingOptionPrefix + "_max"],
13960
+ lines = config[cullingOptionPrefix + "_lines"],
13826
13961
  intervalForCulling;
13827
13962
 
13828
13963
  if (tickSize) {
@@ -13833,17 +13968,19 @@ var Axis_Axis = /*#__PURE__*/function () {
13833
13968
  }
13834
13969
  }
13835
13970
 
13836
- tickText.each(function (d) {
13837
- this.style.display = tickValues.indexOf(d) % intervalForCulling ? "none" : null;
13971
+ tickNodes.each(function (d) {
13972
+ if (tickValues.indexOf(d) % intervalForCulling) {
13973
+ (lines ? this.querySelector("text") : this).style.display = "none";
13974
+ }
13838
13975
  });
13839
13976
  } else {
13840
- tickText.style("display", null);
13977
+ tickNodes.style("display", null);
13841
13978
  } // set/unset x_axis_tick_clippath
13842
13979
 
13843
13980
 
13844
13981
  if (type === "x") {
13845
13982
  var clipPath = current.maxTickWidths.x.clipPath ? clip.pathXAxisTickTexts : null;
13846
- $el.svg.selectAll("." + config_classes.axisX + " .tick text").attr("clip-path", clipPath);
13983
+ $el.svg.selectAll("." + $AXIS.axisX + " .tick text").attr("clip-path", clipPath);
13847
13984
  }
13848
13985
  }
13849
13986
  });
@@ -13866,7 +14003,7 @@ var Axis_Axis = /*#__PURE__*/function () {
13866
14003
  */
13867
14004
  initEventRect: function initEventRect() {
13868
14005
  var $$ = this;
13869
- $$.$el.main.select("." + config_classes.chart).append("g").attr("class", config_classes.eventRects).style("fill-opacity", "0");
14006
+ $$.$el.main.select("." + $COMMON.chart).append("g").attr("class", $EVENT.eventRects).style("fill-opacity", "0");
13870
14007
  },
13871
14008
 
13872
14009
  /**
@@ -13883,8 +14020,8 @@ var Axis_Axis = /*#__PURE__*/function () {
13883
14020
  if ($el.eventRect) {
13884
14021
  $$.updateEventRect($el.eventRect, !0);
13885
14022
  } else {
13886
- var eventRects = $$.$el.main.select("." + config_classes.eventRects).style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? config.axis_rotated ? "ns-resize" : "ew-resize" : null).classed(config_classes.eventRectsMultiple, isMultipleX).classed(config_classes.eventRectsSingle, !isMultipleX),
13887
- eventRectUpdate = eventRects.selectAll("." + config_classes.eventRect).data([0]).enter().append("rect"); // append event <rect>
14023
+ var eventRects = $$.$el.main.select("." + $EVENT.eventRects).style("cursor", config.zoom_enabled && config.zoom_type !== "drag" ? config.axis_rotated ? "ns-resize" : "ew-resize" : null).classed($EVENT.eventRectsMultiple, isMultipleX).classed($EVENT.eventRectsSingle, !isMultipleX),
14024
+ eventRectUpdate = eventRects.selectAll("." + $EVENT.eventRect).data([0]).enter().append("rect"); // append event <rect>
13888
14025
 
13889
14026
  $$.updateEventRect(eventRectUpdate); // bind event to <rect> element
13890
14027
 
@@ -13962,7 +14099,7 @@ var Axis_Axis = /*#__PURE__*/function () {
13962
14099
  }).on("touchstart.eventRect touchmove.eventRect", function (event) {
13963
14100
  state.event = event;
13964
14101
 
13965
- if (!eventRect.empty() && eventRect.classed(config_classes.eventRect)) {
14102
+ if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
13966
14103
  // if touch points are > 1, means doing zooming interaction. In this case do not execute tooltip codes.
13967
14104
  if (state.dragging || state.flowing || $$.hasArcType() || event.touches.length > 1) {
13968
14105
  return;
@@ -13976,7 +14113,7 @@ var Axis_Axis = /*#__PURE__*/function () {
13976
14113
  }, !0).on("touchend.eventRect", function (event) {
13977
14114
  state.event = event;
13978
14115
 
13979
- if (!eventRect.empty() && eventRect.classed(config_classes.eventRect)) {
14116
+ if (!eventRect.empty() && eventRect.classed($EVENT.eventRect)) {
13980
14117
  if ($$.hasArcType() || !$$.toggleShape || state.cancelClick) {
13981
14118
  state.cancelClick && (state.cancelClick = !1);
13982
14119
  }
@@ -14018,7 +14155,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14018
14155
  rectElement.attr("x", 0).attr("y", 0).attr("width", width).attr("height", height); // only for init
14019
14156
 
14020
14157
  if (!rendered) {
14021
- rectElement.attr("class", config_classes.eventRect);
14158
+ rectElement.attr("class", $EVENT.eventRect);
14022
14159
  }
14023
14160
  }
14024
14161
 
@@ -14159,7 +14296,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14159
14296
  $$.showGridFocus(selectedData); // Show cursor as pointer if point is close to mouse position
14160
14297
 
14161
14298
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
14162
- $$.$el.svg.select("." + config_classes.eventRect).style("cursor", "pointer");
14299
+ $$.$el.svg.select("." + $EVENT.eventRect).style("cursor", "pointer");
14163
14300
 
14164
14301
  if (!state.mouseover) {
14165
14302
  config.data_onover.call($$.api, closest);
@@ -14178,7 +14315,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14178
14315
  _$$$$el2 = $$.$el,
14179
14316
  circle = _$$$$el2.circle,
14180
14317
  tooltip = _$$$$el2.tooltip;
14181
- $$.$el.svg.select("." + config_classes.eventRect).style("cursor", null);
14318
+ $$.$el.svg.select("." + $EVENT.eventRect).style("cursor", null);
14182
14319
  $$.hideGridFocus();
14183
14320
 
14184
14321
  if (tooltip) {
@@ -14194,8 +14331,8 @@ var Axis_Axis = /*#__PURE__*/function () {
14194
14331
  /**
14195
14332
  * Create eventRect for each data on the x-axis.
14196
14333
  * Register touch and drag events.
14197
- * @param {object} eventRectEnter d3.select(CLASS.eventRects) object.
14198
- * @returns {object} d3.select(CLASS.eventRects) object.
14334
+ * @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
14335
+ * @returns {object} d3.select($EVENT.eventRects) object.
14199
14336
  * @private
14200
14337
  */
14201
14338
  generateEventRectsForSingleX: function generateEventRectsForSingleX(eventRectEnter) {
@@ -14287,7 +14424,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14287
14424
  }
14288
14425
 
14289
14426
  var index = d.index;
14290
- main.selectAll("." + config_classes.shape + "-" + index).each(function (d2) {
14427
+ main.selectAll("." + $SHAPE.shape + "-" + index).each(function (d2) {
14291
14428
  if (config.data_selection_grouped || $$.isWithinShape(this, d2)) {
14292
14429
  $$.toggleShape == null ? void 0 : $$.toggleShape(this, d2, index);
14293
14430
  config.data_onclick.bind($$.api)(d2, this);
@@ -14298,7 +14435,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14298
14435
  /**
14299
14436
  * Create an eventRect,
14300
14437
  * Register touch and drag events.
14301
- * @param {object} eventRectEnter d3.select(CLASS.eventRects) object.
14438
+ * @param {object} eventRectEnter d3.select($EVENT.eventRects) object.
14302
14439
  * @private
14303
14440
  */
14304
14441
  generateEventRectsForMultipleXs: function generateEventRectsForMultipleXs(eventRectEnter) {
@@ -14343,7 +14480,7 @@ var Axis_Axis = /*#__PURE__*/function () {
14343
14480
 
14344
14481
 
14345
14482
  if ($$.isBarType(closest.id) || $$.dist(closest, mouse) < config.point_sensitivity) {
14346
- $$.$el.main.selectAll("." + config_classes.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + config_classes.shape + "-" + closest.index).each(function () {
14483
+ $$.$el.main.selectAll("." + $SHAPE.shapes + $$.getTargetSelectorSuffix(closest.id)).selectAll("." + $SHAPE.shape + "-" + closest.index).each(function () {
14347
14484
  if (config.data_selection_grouped || $$.isWithinShape(this, closest)) {
14348
14485
  $$.toggleShape == null ? void 0 : $$.toggleShape(this, closest, closest.index);
14349
14486
  config.data_onclick.bind($$.api)(closest, this);
@@ -14478,13 +14615,13 @@ var external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack
14478
14615
  var target = [];
14479
14616
 
14480
14617
  for (var i = 0; i < flowLength; i++) {
14481
- target.push("." + config_classes[v] + "-" + i);
14618
+ target.push("." + classes[v] + "-" + i);
14482
14619
  }
14483
14620
 
14484
- svg.selectAll("." + config_classes[v + "s"]) // circles, shapes, texts, eventRects
14621
+ svg.selectAll("." + classes[v + "s"]) // circles, shapes, texts, eventRects
14485
14622
  .selectAll(target).remove();
14486
14623
  });
14487
- svg.select("." + config_classes.xgrid).remove();
14624
+ svg.select("." + classes.xgrid).remove();
14488
14625
  } // draw again for removing flowed elements and reverting attr
14489
14626
 
14490
14627
 
@@ -14777,9 +14914,9 @@ function smoothLines(el, type) {
14777
14914
  $el = $$.$el;
14778
14915
 
14779
14916
  if (config.grid_x_lines.length || config.grid_y_lines.length) {
14780
- $el.gridLines.main = $el.main.insert("g", "." + config_classes.chart + (config.grid_lines_front ? " + *" : "")).attr("clip-path", clip.pathGrid).attr("class", config_classes.grid + " " + config_classes.gridLines);
14781
- $el.gridLines.main.append("g").attr("class", config_classes.xgridLines);
14782
- $el.gridLines.main.append("g").attr("class", config_classes.ygridLines);
14917
+ $el.gridLines.main = $el.main.insert("g", "." + $COMMON.chart + (config.grid_lines_front ? " + *" : "")).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid + " " + $GRID.gridLines);
14918
+ $el.gridLines.main.append("g").attr("class", $GRID.xgridLines);
14919
+ $el.gridLines.main.append("g").attr("class", $GRID.ygridLines);
14783
14920
  $el.gridLines.x = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.selectAll)([]);
14784
14921
  }
14785
14922
  },
@@ -14809,9 +14946,9 @@ function smoothLines(el, type) {
14809
14946
  "y1": 0,
14810
14947
  "y2": state.height
14811
14948
  };
14812
- grid.x = main.select("." + config_classes.xgrids).selectAll("." + config_classes.xgrid).data(xgridData);
14949
+ grid.x = main.select("." + $GRID.xgrids).selectAll("." + $GRID.xgrid).data(xgridData);
14813
14950
  grid.x.exit().remove();
14814
- grid.x = grid.x.enter().append("line").attr("class", config_classes.xgrid).merge(grid.x);
14951
+ grid.x = grid.x.enter().append("line").attr("class", $GRID.xgrid).merge(grid.x);
14815
14952
 
14816
14953
  if (!withoutUpdate) {
14817
14954
  grid.x.each(function () {
@@ -14837,9 +14974,9 @@ function smoothLines(el, type) {
14837
14974
  return Math.ceil($$.scale.y(d));
14838
14975
  };
14839
14976
 
14840
- grid.y = main.select("." + config_classes.ygrids).selectAll("." + config_classes.ygrid).data(gridValues);
14977
+ grid.y = main.select("." + $GRID.ygrids).selectAll("." + $GRID.ygrid).data(gridValues);
14841
14978
  grid.y.exit().remove();
14842
- grid.y = grid.y.enter().append("line").attr("class", config_classes.ygrid).merge(grid.y);
14979
+ grid.y = grid.y.enter().append("line").attr("class", $GRID.ygrid).merge(grid.y);
14843
14980
  grid.y.attr("x1", isRotated ? pos : 0).attr("x2", isRotated ? pos : state.width).attr("y1", isRotated ? 0 : pos).attr("y2", isRotated ? state.height : pos);
14844
14981
  smoothLines(grid.y, "grid");
14845
14982
  },
@@ -14869,7 +15006,7 @@ function smoothLines(el, type) {
14869
15006
  $T = $$.$T,
14870
15007
  isRotated = config.axis_rotated;
14871
15008
  config.grid_x_show && $$.updateXGrid();
14872
- var xLines = main.select("." + config_classes.xgridLines).selectAll("." + config_classes.xgridLine).data(config.grid_x_lines); // exit
15009
+ var xLines = main.select("." + $GRID.xgridLines).selectAll("." + $GRID.xgridLine).data(config.grid_x_lines); // exit
14873
15010
 
14874
15011
  $T(xLines.exit()).style("opacity", "0").remove(); // enter
14875
15012
 
@@ -14878,7 +15015,7 @@ function smoothLines(el, type) {
14878
15015
  xgridLine.append("text").attr("transform", isRotated ? "" : "rotate(-90)").attr("dy", -5).style("opacity", "0");
14879
15016
  xLines = xgridLine.merge(xLines);
14880
15017
  $T(xLines.attr("class", function (d) {
14881
- return (config_classes.xgridLine + " " + (d.class || "")).trim();
15018
+ return ($GRID.xgridLine + " " + (d.class || "")).trim();
14882
15019
  }).select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).text(function (d) {
14883
15020
  return d.text;
14884
15021
  }).style("opacity", null);
@@ -14899,7 +15036,7 @@ function smoothLines(el, type) {
14899
15036
  $T = $$.$T,
14900
15037
  isRotated = config.axis_rotated;
14901
15038
  config.grid_y_show && $$.updateYGrid();
14902
- var ygridLines = $el.main.select("." + config_classes.ygridLines).selectAll("." + config_classes.ygridLine).data(config.grid_y_lines); // exit
15039
+ var ygridLines = $el.main.select("." + $GRID.ygridLines).selectAll("." + $GRID.ygridLine).data(config.grid_y_lines); // exit
14903
15040
 
14904
15041
  $T(ygridLines.exit()).style("opacity", "0").remove(); // enter
14905
15042
 
@@ -14910,7 +15047,7 @@ function smoothLines(el, type) {
14910
15047
 
14911
15048
  var yv = $$.yv.bind($$);
14912
15049
  $T(ygridLines.attr("class", function (d) {
14913
- return (config_classes.ygridLine + " " + (d.class || "")).trim();
15050
+ return ($GRID.ygridLine + " " + (d.class || "")).trim();
14914
15051
  }).select("line")).attr("x1", isRotated ? yv : 0).attr("x2", isRotated ? yv : width).attr("y1", isRotated ? 0 : yv).attr("y2", isRotated ? height : yv).style("opacity", null);
14915
15052
  $T(ygridLines.select("text").attr("text-anchor", getGridTextAnchor).attr("dx", getGridTextDx)).attr("dy", -5).attr("x", getGridTextX(isRotated, width, height)).attr("y", yv).text(function (d) {
14916
15053
  return d.text;
@@ -14940,17 +15077,17 @@ function smoothLines(el, type) {
14940
15077
  clip = $$.state.clip,
14941
15078
  $el = $$.$el,
14942
15079
  isFront = config.grid_front,
14943
- className = "." + config_classes[isFront && $el.gridLines.main ? "gridLines" : "chart"] + (isFront ? " + *" : ""),
14944
- grid = $el.main.insert("g", className).attr("clip-path", clip.pathGrid).attr("class", config_classes.grid);
15080
+ className = "." + (isFront && $el.gridLines.main ? $GRID.gridLines : $COMMON.chart) + (isFront ? " + *" : ""),
15081
+ grid = $el.main.insert("g", className).attr("clip-path", clip.pathGrid).attr("class", $GRID.grid);
14945
15082
  $el.grid.main = grid;
14946
- config.grid_x_show && grid.append("g").attr("class", config_classes.xgrids);
14947
- config.grid_y_show && grid.append("g").attr("class", config_classes.ygrids);
15083
+ config.grid_x_show && grid.append("g").attr("class", $GRID.xgrids);
15084
+ config.grid_y_show && grid.append("g").attr("class", $GRID.ygrids);
14948
15085
 
14949
15086
  if (config.interaction_enabled && config.grid_focus_show) {
14950
- grid.append("g").attr("class", config_classes.xgridFocus).append("line").attr("class", config_classes.xgridFocus); // to show xy focus grid line, should be 'tooltip.grouped=false'
15087
+ grid.append("g").attr("class", $FOCUS.xgridFocus).append("line").attr("class", $FOCUS.xgridFocus); // to show xy focus grid line, should be 'tooltip.grouped=false'
14951
15088
 
14952
15089
  if (config.grid_focus_y && !config.tooltip_grouped) {
14953
- grid.append("g").attr("class", config_classes.ygridFocus).append("line").attr("class", config_classes.ygridFocus);
15090
+ grid.append("g").attr("class", $FOCUS.ygridFocus).append("line").attr("class", $FOCUS.ygridFocus);
14954
15091
  }
14955
15092
  }
14956
15093
  },
@@ -14967,7 +15104,7 @@ function smoothLines(el, type) {
14967
15104
  width = _$$$state3.width,
14968
15105
  height = _$$$state3.height,
14969
15106
  isRotated = config.axis_rotated,
14970
- focusEl = $$.$el.main.selectAll("line." + config_classes.xgridFocus + ", line." + config_classes.ygridFocus),
15107
+ focusEl = $$.$el.main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus),
14971
15108
  dataToShow = (data || [focusEl.datum()]).filter(function (d) {
14972
15109
  return d && isValue($$.getBaseValue(d));
14973
15110
  });
@@ -14987,7 +15124,7 @@ function smoothLines(el, type) {
14987
15124
  },
14988
15125
  xy;
14989
15126
 
14990
- if (el.classed(config_classes.xgridFocus)) {
15127
+ if (el.classed($FOCUS.xgridFocus)) {
14991
15128
  // will contain 'x1, y1, x2, y2' order
14992
15129
  xy = isRotated ? [null, // x1
14993
15130
  pos.x, // y1
@@ -15018,7 +15155,7 @@ function smoothLines(el, type) {
15018
15155
  main = $$.$el.main;
15019
15156
 
15020
15157
  if (inputType === "mouse" || !resizing) {
15021
- main.selectAll("line." + config_classes.xgridFocus + ", line." + config_classes.ygridFocus).style("visibility", "hidden");
15158
+ main.selectAll("line." + $FOCUS.xgridFocus + ", line." + $FOCUS.ygridFocus).style("visibility", "hidden");
15022
15159
  $$.hideCircleFocus == null ? void 0 : $$.hideCircleFocus();
15023
15160
  }
15024
15161
  },
@@ -15030,7 +15167,7 @@ function smoothLines(el, type) {
15030
15167
  height = _$$$state5.height,
15031
15168
  resizing = _$$$state5.resizing,
15032
15169
  grid = $$.$el.grid,
15033
- xgridFocus = grid.main.select("line." + config_classes.xgridFocus);
15170
+ xgridFocus = grid.main.select("line." + $FOCUS.xgridFocus);
15034
15171
 
15035
15172
  if (inputType === "touch") {
15036
15173
  if (xgridFocus.empty()) {
@@ -15049,7 +15186,7 @@ function smoothLines(el, type) {
15049
15186
  },
15050
15187
  generateGridData: function generateGridData(type, scale) {
15051
15188
  var $$ = this,
15052
- tickNum = $$.$el.main.select("." + config_classes.axisX).selectAll(".tick").size(),
15189
+ tickNum = $$.$el.main.select("." + $AXIS.axisX).selectAll(".tick").size(),
15053
15190
  gridData = [];
15054
15191
 
15055
15192
  if (type === "year") {
@@ -15094,8 +15231,8 @@ function smoothLines(el, type) {
15094
15231
  config = $$.config,
15095
15232
  $T = $$.$T,
15096
15233
  toRemove = $$.getGridFilterToRemove(params),
15097
- classLines = forX ? config_classes.xgridLines : config_classes.ygridLines,
15098
- classLine = forX ? config_classes.xgridLine : config_classes.ygridLine;
15234
+ classLines = forX ? $GRID.xgridLines : $GRID.ygridLines,
15235
+ classLine = forX ? $GRID.xgridLine : $GRID.ygridLine;
15099
15236
  $T($$.$el.main.select("." + classLines).selectAll("." + classLine).filter(toRemove)).style("opacity", "0").remove();
15100
15237
  var gridLines = "grid_" + (forX ? "x" : "y") + "_lines";
15101
15238
  config[gridLines] = config[gridLines].filter(function toShow(line) {
@@ -15116,7 +15253,7 @@ function smoothLines(el, type) {
15116
15253
  initRegion: function initRegion() {
15117
15254
  var $$ = this,
15118
15255
  $el = $$.$el;
15119
- $el.region.main = $el.main.insert("g", ":first-child").attr("clip-path", $$.state.clip.path).attr("class", config_classes.regions);
15256
+ $el.region.main = $el.main.insert("g", ":first-child").attr("clip-path", $$.state.clip.path).attr("class", $REGION.regions);
15120
15257
  },
15121
15258
  updateRegion: function updateRegion() {
15122
15259
  var $$ = this,
@@ -15131,7 +15268,7 @@ function smoothLines(el, type) {
15131
15268
 
15132
15269
  region.main.style("visibility", $$.hasArcType() ? "hidden" : null); // select <g> element
15133
15270
 
15134
- var list = region.main.selectAll("." + config_classes.region).data(config.regions);
15271
+ var list = region.main.selectAll("." + $REGION.region).data(config.regions);
15135
15272
  $T(list.exit()).style("opacity", "0").remove();
15136
15273
  list = list.enter().append("g").merge(list).attr("class", $$.classRegion.bind($$));
15137
15274
  list.append("rect").style("fill-opacity", "0");
@@ -15648,15 +15785,16 @@ function smoothLines(el, type) {
15648
15785
  axis_x_tick_format: undefined,
15649
15786
 
15650
15787
  /**
15651
- * Setting for culling ticks.<br><br>
15652
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
15653
- * We can change the number of ticks to be shown by axis.x.tick.culling.max.
15788
+ * Setting for culling ticks.
15789
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
15790
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.x.tick.culling.lines=false`.
15791
+ * - `false`: all of ticks will be shown.<br><br>
15792
+ * The number of ticks to be shown can be chaned by `axis.x.tick.culling.max`.
15654
15793
  * @name axis․x․tick․culling
15655
15794
  * @memberof Options
15656
15795
  * @type {boolean}
15657
15796
  * @default
15658
- * - true for indexed axis and timeseries axis
15659
- * - false for category axis
15797
+ * `true` for indexed axis and timeseries axis, `false` for category axis
15660
15798
  * @example
15661
15799
  * axis: {
15662
15800
  * x: {
@@ -15687,6 +15825,25 @@ function smoothLines(el, type) {
15687
15825
  */
15688
15826
  axis_x_tick_culling_max: 10,
15689
15827
 
15828
+ /**
15829
+ * Control visibility of tick lines within culling option, along with tick text.
15830
+ * @name axis․x․tick․culling․lines
15831
+ * @memberof Options
15832
+ * @type {boolean}
15833
+ * @default true
15834
+ * @example
15835
+ * axis: {
15836
+ * x: {
15837
+ * tick: {
15838
+ * culling: {
15839
+ * lines: false,
15840
+ * }
15841
+ * }
15842
+ * }
15843
+ * }
15844
+ */
15845
+ axis_x_tick_culling_lines: !0,
15846
+
15690
15847
  /**
15691
15848
  * The number of x axis ticks to show.<br><br>
15692
15849
  * This option hides tick lines together with tick text. If this option is used on timeseries axis, the ticks position will be determined precisely and not nicely positioned (e.g. it will have rough second value).
@@ -16360,9 +16517,11 @@ function smoothLines(el, type) {
16360
16517
  axis_y_tick_format: undefined,
16361
16518
 
16362
16519
  /**
16363
- * Setting for culling ticks.<br><br>
16364
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
16365
- * We can change the number of ticks to be shown by axis.y.tick.culling.max.
16520
+ * Setting for culling ticks.
16521
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
16522
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y.tick.culling.lines=false`.
16523
+ * - `false`: all of ticks will be shown.<br><br>
16524
+ * The number of ticks to be shown can be chaned by `axis.y.tick.culling.max`.
16366
16525
  * @name axis․y․tick․culling
16367
16526
  * @memberof Options
16368
16527
  * @type {boolean}
@@ -16397,6 +16556,25 @@ function smoothLines(el, type) {
16397
16556
  */
16398
16557
  axis_y_tick_culling_max: 5,
16399
16558
 
16559
+ /**
16560
+ * Control visibility of tick lines within culling option, along with tick text.
16561
+ * @name axis․y․tick․culling․lines
16562
+ * @memberof Options
16563
+ * @type {boolean}
16564
+ * @default true
16565
+ * @example
16566
+ * axis: {
16567
+ * y: {
16568
+ * tick: {
16569
+ * culling: {
16570
+ * lines: false,
16571
+ * }
16572
+ * }
16573
+ * }
16574
+ * }
16575
+ */
16576
+ axis_y_tick_culling_lines: !0,
16577
+
16400
16578
  /**
16401
16579
  * Show y axis outer tick.
16402
16580
  * @name axis․y․tick․outer
@@ -16840,9 +17018,11 @@ function smoothLines(el, type) {
16840
17018
  axis_y2_tick_format: undefined,
16841
17019
 
16842
17020
  /**
16843
- * Setting for culling ticks.<br><br>
16844
- * If true is set, the ticks will be culled, then only limitted tick text will be shown. This option does not hide the tick lines. If false is set, all of ticks will be shown.<br><br>
16845
- * We can change the number of ticks to be shown by axis.y.tick.culling.max.
17021
+ * Setting for culling ticks.
17022
+ * - `true`: the ticks will be culled, then only limited tick text will be shown.<br>
17023
+ * This option does not hide the tick lines by default, if want to hide tick lines, set `axis.y2.tick.culling.lines=false`.
17024
+ * - `false`: all of ticks will be shown.<br><br>
17025
+ * The number of ticks to be shown can be chaned by `axis.y2.tick.culling.max`.
16846
17026
  * @name axis․y2․tick․culling
16847
17027
  * @memberof Options
16848
17028
  * @type {boolean}
@@ -16877,6 +17057,25 @@ function smoothLines(el, type) {
16877
17057
  */
16878
17058
  axis_y2_tick_culling_max: 5,
16879
17059
 
17060
+ /**
17061
+ * Control visibility of tick lines within culling option, along with tick text.
17062
+ * @name axis․y2․tick․culling․lines
17063
+ * @memberof Options
17064
+ * @type {boolean}
17065
+ * @default true
17066
+ * @example
17067
+ * axis: {
17068
+ * y2: {
17069
+ * tick: {
17070
+ * culling: {
17071
+ * lines: false,
17072
+ * }
17073
+ * }
17074
+ * }
17075
+ * }
17076
+ */
17077
+ axis_y2_tick_culling_lines: !0,
17078
+
16880
17079
  /**
16881
17080
  * Show or hide y2 axis outer tick.
16882
17081
  * @name axis․y2․tick․outer
@@ -17571,14 +17770,14 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17571
17770
  var interval = setInterval(function () {
17572
17771
  if (!transiting) {
17573
17772
  clearInterval(interval);
17574
- $el.legend.selectAll("." + config_classes.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
17773
+ $el.legend.selectAll("." + $FOCUS.legendItemFocused).size() > 0 && $$.expandArc(targetIds);
17575
17774
  }
17576
17775
  }, 10);
17577
17776
  return;
17578
17777
  }
17579
17778
 
17580
17779
  var newTargetIds = $$.mapToTargetIds(targetIds);
17581
- $el.svg.selectAll($$.selectorTargets(newTargetIds, "." + config_classes.chartArc)).each(function (d) {
17780
+ $el.svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).each(function (d) {
17582
17781
  if (!$$.shouldExpand(d.data.id)) {
17583
17782
  return;
17584
17783
  }
@@ -17598,10 +17797,10 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17598
17797
  }
17599
17798
 
17600
17799
  var newTargetIds = $$.mapToTargetIds(targetIds);
17601
- svg.selectAll($$.selectorTargets(newTargetIds, "." + config_classes.chartArc)).selectAll("path").transition().duration(function (d) {
17800
+ svg.selectAll($$.selectorTargets(newTargetIds, "." + $ARC.chartArc)).selectAll("path").transition().duration(function (d) {
17602
17801
  return $$.getExpandConfig(d.data.id, "duration");
17603
17802
  }).attr("d", $$.svgArc);
17604
- svg.selectAll("" + config_classes.arc).style("opacity", null);
17803
+ svg.selectAll("" + $ARC.arc).style("opacity", null);
17605
17804
  },
17606
17805
 
17607
17806
  /**
@@ -17666,20 +17865,20 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17666
17865
  classChartArc = $$.getChartClass("Arc"),
17667
17866
  classArcs = $$.getClass("arcs", !0),
17668
17867
  classFocus = $$.classFocus.bind($$),
17669
- chartArcs = $el.main.select("." + config_classes.chartArcs),
17670
- mainPieUpdate = chartArcs.selectAll("." + config_classes.chartArc).data($$.pie(targets)).attr("class", function (d) {
17868
+ chartArcs = $el.main.select("." + $ARC.chartArcs),
17869
+ mainPieUpdate = chartArcs.selectAll("." + $ARC.chartArc).data($$.pie(targets)).attr("class", function (d) {
17671
17870
  return classChartArc(d) + classFocus(d.data);
17672
17871
  }),
17673
17872
  mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc);
17674
17873
  mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate);
17675
17874
  mainPieEnter.append("text").attr("dy", hasGauge && !$$.hasMultiTargets() ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none");
17676
- $el.text = chartArcs.selectAll("." + config_classes.target + " text"); // MEMO: can not keep same color..., but not bad to update color in redraw
17875
+ $el.text = chartArcs.selectAll("." + $COMMON.target + " text"); // MEMO: can not keep same color..., but not bad to update color in redraw
17677
17876
  // mainPieUpdate.exit().remove();
17678
17877
  },
17679
17878
  initArc: function initArc() {
17680
17879
  var $$ = this,
17681
17880
  $el = $$.$el;
17682
- $el.arcs = $el.main.select("." + config_classes.chart).append("g").attr("class", config_classes.chartArcs).attr("transform", $$.getTranslate("arc"));
17881
+ $el.arcs = $el.main.select("." + $COMMON.chart).append("g").attr("class", $ARC.chartArcs).attr("transform", $$.getTranslate("arc"));
17683
17882
  $$.setArcTitle();
17684
17883
  },
17685
17884
 
@@ -17693,7 +17892,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17693
17892
  hasGauge = $$.hasType("gauge");
17694
17893
 
17695
17894
  if (title) {
17696
- var text = $$.$el.arcs.append("text").attr("class", config_classes[hasGauge ? "chartArcsGaugeTitle" : "chartArcsTitle"]).style("text-anchor", "middle");
17895
+ var text = $$.$el.arcs.append("text").attr("class", hasGauge ? $GAUGE.chartArcsGaugeTitle : $ARC.chartArcsTitle).style("text-anchor", "middle");
17697
17896
  hasGauge && text.attr("dy", "-0.3em");
17698
17897
  setTextValue(text, title, hasGauge ? undefined : [-.6, 1.35], !0);
17699
17898
  }
@@ -17705,7 +17904,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17705
17904
  main = $$.$el.main,
17706
17905
  hasInteraction = config.interaction_enabled,
17707
17906
  isSelectable = hasInteraction && config.data_selection_isselectable,
17708
- mainArc = main.selectAll("." + config_classes.arcs).selectAll("." + config_classes.arc).data($$.arcData.bind($$));
17907
+ mainArc = main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arc).data($$.arcData.bind($$));
17709
17908
  mainArc.exit().transition().duration(durationForExit).style("opacity", "0").remove();
17710
17909
  mainArc = mainArc.enter().append("path").attr("class", $$.getClass("arc", !0)).style("fill", function (d) {
17711
17910
  return $$.color(d.data);
@@ -17794,13 +17993,13 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17794
17993
  isFullCircle = config.gauge_fullCircle,
17795
17994
  startAngle = $$.getStartAngle(),
17796
17995
  endAngle = isFullCircle ? startAngle + $$.getArcLength() : startAngle * -1,
17797
- backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + config_classes.chartArcsBackground);
17996
+ backgroundArc = $$.$el.arcs.select((hasMultiArcGauge ? "g" : "") + "." + $ARC.chartArcsBackground);
17798
17997
 
17799
17998
  if (hasMultiArcGauge) {
17800
17999
  var index = 0;
17801
- backgroundArc = backgroundArc.selectAll("path." + config_classes.chartArcsBackground).data($$.data.targets);
18000
+ backgroundArc = backgroundArc.selectAll("path." + $ARC.chartArcsBackground).data($$.data.targets);
17802
18001
  backgroundArc.enter().append("path").attr("class", function (d, i) {
17803
- return config_classes.chartArcsBackground + " " + config_classes.chartArcsBackground + "-" + i;
18002
+ return $ARC.chartArcsBackground + " " + $ARC.chartArcsBackground + "-" + i;
17804
18003
  }).merge(backgroundArc).style("fill", config.gauge_background || null).attr("d", function (_ref2) {
17805
18004
  var id = _ref2.id;
17806
18005
 
@@ -17918,6 +18117,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17918
18117
  return;
17919
18118
  }
17920
18119
 
18120
+ state.event = event;
17921
18121
  var eventArc = getEventArc(event),
17922
18122
  datum = eventArc.datum(),
17923
18123
  updated = (_datum = datum) != null && _datum.data && datum.data.id ? $$.updateAngle(datum) : null,
@@ -17941,8 +18141,8 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17941
18141
 
17942
18142
  // for gauge type, update text when has no title & multi data
17943
18143
  if (!(hasGauge && $$.data.targets.length === 1 && config.gauge_title)) {
17944
- text = main.selectAll("." + config_classes.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
17945
- return $$.isGaugeType(d.data) ? config_classes.gaugeValue : null;
18144
+ text = main.selectAll("." + $ARC.chartArc).select("text").style("opacity", "0").attr("class", function (d) {
18145
+ return $$.isGaugeType(d.data) ? $GAUGE.gaugeValue : null;
17946
18146
  }).call($$.textForArcLabel.bind($$)).attr("transform", $$.transformForArcLabel.bind($$)).style("font-size", function (d) {
17947
18147
  return $$.isGaugeType(d.data) && $$.data.targets.length === 1 && !hasMultiArcGauge ? Math.round(state.radius / 5) + "px" : null;
17948
18148
  }).transition().duration(duration).style("opacity", function (d) {
@@ -17951,7 +18151,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17951
18151
  hasMultiArcGauge && text.attr("dy", "-.1em");
17952
18152
  }
17953
18153
 
17954
- main.select("." + config_classes.chartArcsTitle).style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
18154
+ main.select("." + $ARC.chartArcsTitle).style("opacity", $$.hasType("donut") || hasGauge ? null : "0");
17955
18155
 
17956
18156
  if (hasGauge) {
17957
18157
  var _text,
@@ -17960,10 +18160,10 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17960
18160
  isFullCircle && ((_text = text) == null ? void 0 : _text.attr("dy", "" + (hasMultiArcGauge ? 0 : Math.round(state.radius / 14))));
17961
18161
 
17962
18162
  if (config.gauge_label_show) {
17963
- arcs.select("." + config_classes.chartArcsGaugeUnit).attr("dy", (isFullCircle ? 1.5 : .75) + "em").text(config.gauge_units);
17964
- arcs.select("." + config_classes.chartArcsGaugeMin).attr("dx", -1 * (state.innerRadius + (state.radius - state.innerRadius) / (isFullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)); // show max text when isn't fullCircle
18163
+ arcs.select("." + $GAUGE.chartArcsGaugeUnit).attr("dy", (isFullCircle ? 1.5 : .75) + "em").text(config.gauge_units);
18164
+ arcs.select("." + $GAUGE.chartArcsGaugeMin).attr("dx", -1 * (state.innerRadius + (state.radius - state.innerRadius) / (isFullCircle ? 1 : 2)) + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_min, !1)); // show max text when isn't fullCircle
17965
18165
 
17966
- isFullCircle || arcs.select("." + config_classes.chartArcsGaugeMax).attr("dx", state.innerRadius + (state.radius - state.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0));
18166
+ isFullCircle || arcs.select("." + $GAUGE.chartArcsGaugeMax).attr("dx", state.innerRadius + (state.radius - state.innerRadius) / 2 + "px").attr("dy", "1.2em").text($$.textForGaugeMinMax(config.gauge_max, !0));
17967
18167
  }
17968
18168
  }
17969
18169
  }
@@ -17981,7 +18181,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
17981
18181
  initArea: function initArea(mainLine) {
17982
18182
  var $$ = this,
17983
18183
  config = $$.config;
17984
- mainLine.insert("g", "." + config_classes[config.area_front ? "circles" : "lines"]).attr("class", $$.getClass("areas", !0));
18184
+ mainLine.insert("g", "." + (config.area_front ? $CIRCLE.circles : $LINE.lines)).attr("class", $$.getClass("areas", !0));
17985
18185
  },
17986
18186
  updateAreaGradient: function updateAreaGradient() {
17987
18187
  var $$ = this,
@@ -18031,7 +18231,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18031
18231
  $T = $$.$T,
18032
18232
  $root = isSub ? $el.subchart : $el;
18033
18233
  config.area_linearGradient && $$.updateAreaGradient();
18034
- var area = $root.main.selectAll("." + config_classes.areas).selectAll("." + config_classes.area).data($$.lineData.bind($$));
18234
+ var area = $root.main.selectAll("." + $AREA.areas).selectAll("." + $AREA.area).data($$.lineData.bind($$));
18035
18235
  $T(area.exit(), withTransition).style("opacity", "0").remove();
18036
18236
  $root.area = area.enter().append("path").attr("class", $$.getClass("area", !0)).style("fill", $$.updateAreaColor.bind($$)).style("opacity", function () {
18037
18237
  state.orgAreaOpacity = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).style("opacity");
@@ -18158,8 +18358,8 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18158
18358
  var $el = this.$el,
18159
18359
  config = this.config,
18160
18360
  clip = this.state.clip;
18161
- $el.bar = $el.main.select("." + config_classes.chart) // should positioned at the beginning of the shape node to not overlap others
18162
- .insert("g", ":first-child").attr("class", config_classes.chartBars); // set clip-path attribute when condition meet
18361
+ $el.bar = $el.main.select("." + $COMMON.chart) // should positioned at the beginning of the shape node to not overlap others
18362
+ .insert("g", ":first-child").attr("class", $BAR.chartBars); // set clip-path attribute when condition meet
18163
18363
  // https://github.com/naver/billboard.js/issues/2421
18164
18364
 
18165
18365
  if (config.clipPath === !1 && (config.bar_radius || config.bar_radius_ratio)) {
@@ -18179,7 +18379,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18179
18379
  $$.initBar();
18180
18380
  }
18181
18381
 
18182
- var mainBarUpdate = $$.$el.main.select("." + config_classes.chartBars).selectAll("." + config_classes.chartBar).data( // remove
18382
+ var mainBarUpdate = $$.$el.main.select("." + $BAR.chartBars).selectAll("." + $BAR.chartBar).data( // remove
18183
18383
  targets.filter(function (v) {
18184
18384
  return v.values.some(function (d) {
18185
18385
  return isNumber(d.value) || $$.isBarRangeType(d);
@@ -18213,7 +18413,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18213
18413
  $root = isSub ? $el.subchart : $el,
18214
18414
  classBar = $$.getClass("bar", !0),
18215
18415
  initialOpacity = $$.initialOpacity.bind($$),
18216
- bar = $root.main.selectAll("." + config_classes.bars).selectAll("." + config_classes.bar).data($$.labelishData.bind($$));
18416
+ bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
18217
18417
  $T(bar.exit(), withTransition).style("opacity", "0").remove();
18218
18418
  $root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.color).merge(bar).style("opacity", initialOpacity);
18219
18419
  },
@@ -18279,9 +18479,11 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
18279
18479
  isNegative = d.value < 0,
18280
18480
  pathRadius = ["", ""],
18281
18481
  radius = 0,
18282
- isRadiusData = $$.isGrouped(d.id) ? $$.isStackingRadiusData(d) : !1; // switch points if axis is rotated, not applicable for sub chart
18482
+ isGrouped = $$.isGrouped(d.id),
18483
+ hasRadius = d.value !== 0 && getRadius,
18484
+ isRadiusData = hasRadius && isGrouped ? $$.isStackingRadiusData(d) : !1; // switch points if axis is rotated, not applicable for sub chart
18283
18485
 
18284
- if (d.value !== 0 && getRadius && (!$$.isGrouped(d.id) || isRadiusData)) {
18486
+ if (hasRadius && (!isGrouped || isRadiusData)) {
18285
18487
  var index = isRotated ? indexY : indexX,
18286
18488
  barW = points[2][index] - points[0][index];
18287
18489
  radius = getRadius(barW);
@@ -18383,8 +18585,8 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18383
18585
  /* harmony default export */ var candlestick = ({
18384
18586
  initCandlestick: function initCandlestick() {
18385
18587
  var $el = this.$el;
18386
- $el.candlestick = $el.main.select("." + config_classes.chart) // should positioned at the beginning of the shape node to not overlap others
18387
- .append("g").attr("class", config_classes.chartCandlesticks);
18588
+ $el.candlestick = $el.main.select("." + $COMMON.chart) // should positioned at the beginning of the shape node to not overlap others
18589
+ .append("g").attr("class", $CANDLESTICK.chartCandlesticks);
18388
18590
  },
18389
18591
 
18390
18592
  /**
@@ -18403,7 +18605,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18403
18605
  $$.initCandlestick();
18404
18606
  }
18405
18607
 
18406
- var mainUpdate = $$.$el.main.select("." + config_classes.chartCandlesticks).selectAll("." + config_classes.chartCandlestick).data(targets).attr("class", function (d) {
18608
+ var mainUpdate = $$.$el.main.select("." + $CANDLESTICK.chartCandlesticks).selectAll("." + $CANDLESTICK.chartCandlestick).data(targets).attr("class", function (d) {
18407
18609
  return classChart(d) + classFocus(d);
18408
18610
  });
18409
18611
  mainUpdate.enter().append("g").attr("class", classChart).style("pointer-events", "none");
@@ -18426,7 +18628,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18426
18628
  $root = isSub ? $el.subchart : $el,
18427
18629
  classSetter = $$.getClass("candlestick", !0),
18428
18630
  initialOpacity = $$.initialOpacity.bind($$),
18429
- candlestick = $root.main.selectAll("." + config_classes.chartCandlestick).selectAll("." + config_classes.candlestick).data($$.labelishData.bind($$));
18631
+ candlestick = $root.main.selectAll("." + $CANDLESTICK.chartCandlestick).selectAll("." + $CANDLESTICK.candlestick).data($$.labelishData.bind($$));
18430
18632
  $T(candlestick.exit(), withTransition).style("opacity", "0").remove();
18431
18633
  var candlestickEnter = candlestick.enter().filter(function (d) {
18432
18634
  return d.value;
@@ -18462,7 +18664,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18462
18664
  indexX = +isRotated;
18463
18665
 
18464
18666
  if (g.classed) {
18465
- g.classed(config_classes[isUp ? "valueUp" : "valueDown"], !0);
18667
+ g.classed($CANDLESTICK[isUp ? "valueUp" : "valueDown"], !0);
18466
18668
  }
18467
18669
 
18468
18670
  var path = isRotated ? "H" + points[1][1] + " V" + points[1][0] + " H" + points[0][1] : "V" + points[1][1] + " H" + points[1][0] + " V" + points[0][1];
@@ -18631,12 +18833,12 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18631
18833
 
18632
18834
  if ($$.hasType("gauge")) {
18633
18835
  var hasMulti = $$.hasMultiArcGauge();
18634
- arcs.append(hasMulti ? "g" : "path").attr("class", config_classes.chartArcsBackground).style("fill", !hasMulti && config.gauge_background || null);
18635
- config.gauge_units && appendText(config_classes.chartArcsGaugeUnit);
18836
+ arcs.append(hasMulti ? "g" : "path").attr("class", $ARC.chartArcsBackground).style("fill", !hasMulti && config.gauge_background || null);
18837
+ config.gauge_units && appendText($GAUGE.chartArcsGaugeUnit);
18636
18838
 
18637
18839
  if (config.gauge_label_show) {
18638
- appendText(config_classes.chartArcsGaugeMin);
18639
- config.gauge_fullCircle || appendText(config_classes.chartArcsGaugeMax);
18840
+ appendText($GAUGE.chartArcsGaugeMin);
18841
+ config.gauge_fullCircle || appendText($GAUGE.chartArcsGaugeMax);
18640
18842
  }
18641
18843
  }
18642
18844
  },
@@ -18658,9 +18860,9 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18658
18860
  state = $$.state,
18659
18861
  $el = $$.$el,
18660
18862
  hiddenTargetIds = $$.state.hiddenTargetIds,
18661
- arcLabelLines = $el.main.selectAll("." + config_classes.arcs).selectAll("." + config_classes.arcLabelLine).data($$.arcData.bind($$)),
18863
+ arcLabelLines = $el.main.selectAll("." + $ARC.arcs).selectAll("." + $ARC.arcLabelLine).data($$.arcData.bind($$)),
18662
18864
  mainArcLabelLine = arcLabelLines.enter().append("rect").attr("class", function (d) {
18663
- return config_classes.arcLabelLine + " " + config_classes.target + " " + config_classes.target + "-" + d.data.id;
18865
+ return $ARC.arcLabelLine + " " + $COMMON.target + " " + $COMMON.target + "-" + d.data.id;
18664
18866
  }).merge(arcLabelLines);
18665
18867
  mainArcLabelLine.style("fill", function (d) {
18666
18868
  return $$.levelColor ? $$.levelColor(d.data.values[0].value) : $$.color(d.data);
@@ -18791,7 +18993,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18791
18993
  /* harmony default export */ var line = ({
18792
18994
  initLine: function initLine() {
18793
18995
  var $el = this.$el;
18794
- $el.line = $el.main.select("." + config_classes.chart).append("g").attr("class", config_classes.chartLines);
18996
+ $el.line = $el.main.select("." + $COMMON.chart).append("g").attr("class", $LINE.chartLines);
18795
18997
  },
18796
18998
  updateTargetsForLine: function updateTargetsForLine(t) {
18797
18999
  var $$ = this,
@@ -18810,7 +19012,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18810
19012
  var targets = t.filter(function (d) {
18811
19013
  return !($$.isScatterType(d) || $$.isBubbleType(d));
18812
19014
  }),
18813
- mainLineUpdate = main.select("." + config_classes.chartLines).selectAll("." + config_classes.chartLine).data(targets).attr("class", function (d) {
19015
+ mainLineUpdate = main.select("." + $LINE.chartLines).selectAll("." + $LINE.chartLine).data(targets).attr("class", function (d) {
18814
19016
  return classChartLine(d) + classFocus(d);
18815
19017
  }),
18816
19018
  mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none");
@@ -18840,7 +19042,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
18840
19042
  $el = $$.$el,
18841
19043
  $T = $$.$T,
18842
19044
  $root = isSub ? $el.subchart : $el,
18843
- line = $root.main.selectAll("." + config_classes.lines).selectAll("." + config_classes.line).data($$.lineData.bind($$));
19045
+ line = $root.main.selectAll("." + $LINE.lines).selectAll("." + $LINE.line).data($$.lineData.bind($$));
18844
19046
  $T(line.exit(), withTransition).style("opacity", "0").remove();
18845
19047
  $root.line = line.enter().append("path").attr("class", function (d) {
18846
19048
  return $$.getClass("line", !0)(d) + " " + (extraLineClasses(d) || "");
@@ -19132,8 +19334,8 @@ var getTransitionName = function () {
19132
19334
  main = $$.$el.main;
19133
19335
  $$.point = $$.generatePoint();
19134
19336
 
19135
- if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + config_classes.chartCircles).empty()) {
19136
- main.select("." + config_classes.chart).append("g").attr("class", config_classes.chartCircles);
19337
+ if (($$.hasType("bubble") || $$.hasType("scatter")) && main.select("." + $CIRCLE.chartCircles).empty()) {
19338
+ main.select("." + $COMMON.chart).append("g").attr("class", $CIRCLE.chartCircles);
19137
19339
  }
19138
19340
  },
19139
19341
  updateTargetForCircle: function updateTargetForCircle(targetsValue, enterNodeValue) {
@@ -19159,21 +19361,21 @@ var getTransitionName = function () {
19159
19361
  targets = data.targets.filter(function (d) {
19160
19362
  return _this.isScatterType(d) || _this.isBubbleType(d);
19161
19363
  });
19162
- var mainCircle = $el.main.select("." + config_classes.chartCircles).style("pointer-events", "none").selectAll("." + config_classes.circles).data(targets).attr("class", classCircles);
19364
+ var mainCircle = $el.main.select("." + $CIRCLE.chartCircles).style("pointer-events", "none").selectAll("." + $CIRCLE.circles).data(targets).attr("class", classCircles);
19163
19365
  mainCircle.exit().remove();
19164
19366
  enterNode = mainCircle.enter();
19165
19367
  } // Circles for each data point on lines
19166
19368
 
19167
19369
 
19168
19370
  selectionEnabled && enterNode.append("g").attr("class", function (d) {
19169
- return $$.generateClass(config_classes.selectedCircles, d.id);
19371
+ return $$.generateClass($SELECT.selectedCircles, d.id);
19170
19372
  });
19171
19373
  enterNode.append("g").attr("class", classCircles).style("cursor", function (d) {
19172
19374
  return isFunction(isSelectable) && isSelectable(d) ? "pointer" : null;
19173
19375
  }); // Update date for selected circles
19174
19376
 
19175
19377
  selectionEnabled && targets.forEach(function (t) {
19176
- $el.main.selectAll("." + config_classes.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + config_classes.selectedCircle).each(function (d) {
19378
+ $el.main.selectAll("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(t.id)).selectAll("" + $SELECT.selectedCircle).each(function (d) {
19177
19379
  d.value = t.values[d.index].value;
19178
19380
  });
19179
19381
  });
@@ -19191,12 +19393,12 @@ var getTransitionName = function () {
19191
19393
  $root = isSub ? $el.subchart : $el;
19192
19394
 
19193
19395
  if (config.point_show && !state.toggling) {
19194
- var circles = $root.main.selectAll("." + config_classes.circles).selectAll("." + config_classes.circle).data(function (d) {
19396
+ var circles = $root.main.selectAll("." + $CIRCLE.circles).selectAll("." + $CIRCLE.circle).data(function (d) {
19195
19397
  return $$.isLineType(d) && $$.shouldDrawPointsForLine(d) || $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ? focusOnly ? [d.values[0]] : d.values : [];
19196
19398
  });
19197
19399
  circles.exit().remove();
19198
19400
  circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.color));
19199
- $root.circle = $root.main.selectAll("." + config_classes.circles + " ." + config_classes.circle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$));
19401
+ $root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.color).style("opacity", $$.initialOpacityForCircle.bind($$));
19200
19402
  }
19201
19403
  },
19202
19404
  redrawCircle: function redrawCircle(cx, cy, withTransition, flow, isSub) {
@@ -19209,7 +19411,7 @@ var getTransitionName = function () {
19209
19411
  $el = $$.$el,
19210
19412
  $T = $$.$T,
19211
19413
  $root = isSub ? $el.subchart : $el,
19212
- selectedCircles = $root.main.selectAll("." + config_classes.selectedCircle);
19414
+ selectedCircles = $root.main.selectAll("." + $SELECT.selectedCircle);
19213
19415
 
19214
19416
  if (!$$.config.point_show) {
19215
19417
  return [];
@@ -19309,7 +19511,7 @@ var getTransitionName = function () {
19309
19511
  var $$ = this,
19310
19512
  r = $$.pointExpandedR.bind($$);
19311
19513
  reset && $$.unexpandCircles();
19312
- var circles = $$.getShapeByIndex("circle", i, id).classed(config_classes.EXPANDED, !0),
19514
+ var circles = $$.getShapeByIndex("circle", i, id).classed($COMMON.EXPANDED, !0),
19313
19515
  scale = r(circles) / $$.config.point_r,
19314
19516
  ratio = 1 - scale;
19315
19517
 
@@ -19338,8 +19540,8 @@ var getTransitionName = function () {
19338
19540
  var $$ = this,
19339
19541
  r = $$.pointR.bind($$),
19340
19542
  circles = $$.getShapeByIndex("circle", i).filter(function () {
19341
- return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.EXPANDED);
19342
- }).classed(config_classes.EXPANDED, !1);
19543
+ return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($COMMON.EXPANDED);
19544
+ }).classed($COMMON.EXPANDED, !1);
19343
19545
  circles.attr("r", r);
19344
19546
  $$.isCirclePoint() || circles.attr("transform", "scale(" + r(circles) / $$.config.point_r + ")");
19345
19547
  },
@@ -19431,8 +19633,8 @@ var getTransitionName = function () {
19431
19633
  pointClass = d === !0 ? circle.each(function (d) {
19432
19634
  var className = $$.getClass("circle", !0)(d);
19433
19635
 
19434
- if (this.getAttribute("class").indexOf(config_classes.EXPANDED) > -1) {
19435
- className += " " + config_classes.EXPANDED;
19636
+ if (this.getAttribute("class").indexOf($COMMON.EXPANDED) > -1) {
19637
+ className += " " + $COMMON.EXPANDED;
19436
19638
  }
19437
19639
 
19438
19640
  this.setAttribute("class", className);
@@ -19625,13 +19827,13 @@ var cacheKey = KEY.radarPoints;
19625
19827
  $el = $$.$el;
19626
19828
 
19627
19829
  if ($$.hasType("radar")) {
19628
- $el.radar = $el.main.select("." + config_classes.chart).append("g").attr("class", config_classes.chartRadars); // level
19830
+ $el.radar = $el.main.select("." + $COMMON.chart).append("g").attr("class", $RADAR.chartRadars); // level
19629
19831
 
19630
- $el.radar.levels = $el.radar.append("g").attr("class", config_classes.levels); // axis
19832
+ $el.radar.levels = $el.radar.append("g").attr("class", $RADAR.levels); // axis
19631
19833
 
19632
- $el.radar.axes = $el.radar.append("g").attr("class", config_classes.axis); // shapes
19834
+ $el.radar.axes = $el.radar.append("g").attr("class", $AXIS.axis); // shapes
19633
19835
 
19634
- $el.radar.shapes = $el.radar.append("g").attr("class", config_classes.shapes);
19836
+ $el.radar.shapes = $el.radar.append("g").attr("class", $SHAPE.shapes);
19635
19837
  current.dataMax = config.radar_axis_max || $$.getMinMaxData().max[0].value;
19636
19838
  }
19637
19839
  },
@@ -19709,7 +19911,7 @@ var cacheKey = KEY.radarPoints;
19709
19911
  // Adjust radar, circles and texts' position
19710
19912
  if (translate) {
19711
19913
  radar.attr("transform", translate);
19712
- main.select("." + config_classes.chartTexts).attr("transform", translate);
19914
+ main.select("." + $TEXT.chartTexts).attr("transform", translate);
19713
19915
  $$.generateRadarPoints();
19714
19916
  $$.updateRadarLevel();
19715
19917
  $$.updateRadarAxes();
@@ -19748,11 +19950,11 @@ var cacheKey = KEY.radarPoints;
19748
19950
  });
19749
19951
  return pos.join(" ");
19750
19952
  }),
19751
- level = radarLevels.selectAll("." + config_classes.level).data(levelData);
19953
+ level = radarLevels.selectAll("." + $RADAR.level).data(levelData);
19752
19954
 
19753
19955
  level.exit().remove();
19754
19956
  var levelEnter = level.enter().append("g").attr("class", function (d, i) {
19755
- return config_classes.level + " " + config_classes.level + "-" + i;
19957
+ return $RADAR.level + " " + $RADAR.level + "-" + i;
19756
19958
  });
19757
19959
  levelEnter.append("polygon").style("visibility", config.radar_level_show ? null : "hidden");
19758
19960
 
@@ -19794,7 +19996,7 @@ var cacheKey = KEY.radarPoints;
19794
19996
 
19795
19997
  axis.exit().remove();
19796
19998
  var axisEnter = axis.enter().append("g").attr("class", function (d, i) {
19797
- return config_classes.axis + "-" + i;
19999
+ return $AXIS.axis + "-" + i;
19798
20000
  });
19799
20001
  config.radar_axis_line_show && axisEnter.append("line");
19800
20002
  config.radar_axis_text_show && axisEnter.append("text");
@@ -19880,6 +20082,7 @@ var cacheKey = KEY.radarPoints;
19880
20082
  return d && Object.keys(d).length === 1 ? d.index : undefined;
19881
20083
  },
19882
20084
  hide = function (event) {
20085
+ state.event = event;
19883
20086
  var index = getIndex(event),
19884
20087
  noIndex = isUndefined(index);
19885
20088
 
@@ -20131,6 +20334,7 @@ var cacheKey = KEY.radarPoints;
20131
20334
  * @memberof Options
20132
20335
  * @type {object}
20133
20336
  * @property {object} bar Bar object
20337
+ * @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
20134
20338
  * @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
20135
20339
  * @property {number} [bar.padding=0] The padding pixel value between each bar.
20136
20340
  * @property {number} [bar.radius] Set the radius of bar edge in pixel.
@@ -20146,12 +20350,18 @@ var cacheKey = KEY.radarPoints;
20146
20350
  * @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
20147
20351
  * @property {number} [bar.width.dataname.max] The maximum width value for ratio.
20148
20352
  * @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
20353
+ * @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
20149
20354
  * @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
20150
20355
  * @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
20151
20356
  * @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
20152
20357
  * @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
20153
20358
  * @example
20154
20359
  * bar: {
20360
+ * // remove nullish data on bar indices postions
20361
+ * indices: {
20362
+ * removeNull: true
20363
+ * },
20364
+ *
20155
20365
  * padding: 1,
20156
20366
  *
20157
20367
  * // bar radius
@@ -20191,6 +20401,7 @@ var cacheKey = KEY.radarPoints;
20191
20401
  * }
20192
20402
  */
20193
20403
  bar_label_threshold: 0,
20404
+ bar_indices_removeNull: !1,
20194
20405
  bar_padding: 0,
20195
20406
  bar_radius: undefined,
20196
20407
  bar_radius_ratio: undefined,
@@ -21011,8 +21222,8 @@ var _area = function area() {
21011
21222
  selected: function selected(targetId) {
21012
21223
  var $$ = this.internal,
21013
21224
  dataPoint = [];
21014
- $$.$el.main.selectAll("." + (config_classes.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + config_classes.shape).filter(function () {
21015
- return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed(config_classes.SELECTED);
21225
+ $$.$el.main.selectAll("." + ($SHAPE.shapes + $$.getTargetSelectorSuffix(targetId))).selectAll("." + $SHAPE.shape).filter(function () {
21226
+ return (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($SELECT.SELECTED);
21016
21227
  }).each(function (d) {
21017
21228
  return dataPoint.push(d);
21018
21229
  });
@@ -21052,25 +21263,25 @@ var _area = function area() {
21052
21263
  return;
21053
21264
  }
21054
21265
 
21055
- $el.main.selectAll("." + config_classes.shapes).selectAll("." + config_classes.shape).each(function (d, i) {
21266
+ $el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
21056
21267
  var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
21057
21268
  id = d.data ? d.data.id : d.id,
21058
21269
  toggle = $$.getToggle(this, d).bind($$),
21059
21270
  isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
21060
21271
  isTargetIndex = !indices || indices.indexOf(i) >= 0,
21061
- isSelected = shape.classed(config_classes.SELECTED);
21272
+ isSelected = shape.classed($SELECT.SELECTED);
21062
21273
 
21063
21274
  // line/area selection not supported yet
21064
- if (shape.classed(config_classes.line) || shape.classed(config_classes.area)) {
21275
+ if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
21065
21276
  return;
21066
21277
  }
21067
21278
 
21068
21279
  if (isTargetId && isTargetIndex) {
21069
21280
  if (config.data_selection_isselectable.bind($$.api)(d) && !isSelected) {
21070
- toggle(!0, shape.classed(config_classes.SELECTED, !0), d, i);
21281
+ toggle(!0, shape.classed($SELECT.SELECTED, !0), d, i);
21071
21282
  }
21072
21283
  } else if (isDefined(resetOther) && resetOther && isSelected) {
21073
- toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i);
21284
+ toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
21074
21285
  }
21075
21286
  });
21076
21287
  },
@@ -21101,21 +21312,21 @@ var _area = function area() {
21101
21312
  return;
21102
21313
  }
21103
21314
 
21104
- $el.main.selectAll("." + config_classes.shapes).selectAll("." + config_classes.shape).each(function (d, i) {
21315
+ $el.main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).each(function (d, i) {
21105
21316
  var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
21106
21317
  id = d.data ? d.data.id : d.id,
21107
21318
  toggle = $$.getToggle(this, d).bind($$),
21108
21319
  isTargetId = config.data_selection_grouped || !ids || ids.indexOf(id) >= 0,
21109
21320
  isTargetIndex = !indices || indices.indexOf(i) >= 0,
21110
- isSelected = shape.classed(config_classes.SELECTED);
21321
+ isSelected = shape.classed($SELECT.SELECTED);
21111
21322
 
21112
21323
  // line/area selection not supported yet
21113
- if (shape.classed(config_classes.line) || shape.classed(config_classes.area)) {
21324
+ if (shape.classed($LINE.line) || shape.classed($AREA.area)) {
21114
21325
  return;
21115
21326
  }
21116
21327
 
21117
21328
  if (isTargetId && isTargetIndex && config.data_selection_isselectable.bind($$.api)(d) && isSelected) {
21118
- toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i);
21329
+ toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
21119
21330
  }
21120
21331
  });
21121
21332
  }
@@ -21158,21 +21369,25 @@ var _area = function area() {
21158
21369
  show = config.subchart_show;
21159
21370
 
21160
21371
  if (!show) {
21372
+ var _$target, _subchart$main2;
21373
+
21161
21374
  // unbind zoom event bound to chart rect area
21162
21375
  $$.unbindZoomEvent();
21163
21376
  config.subchart_show = !show;
21164
21377
  subchart.main || $$.initSubchart();
21165
- var $target = subchart.main.selectAll("." + config_classes.target); // need to cover when new data has been loaded
21378
+ var $target = subchart.main.selectAll("." + $COMMON.target); // need to cover when new data has been loaded
21166
21379
 
21167
21380
  if ($$.data.targets.length !== $target.size()) {
21381
+ var _subchart$main;
21382
+
21168
21383
  $$.updateSizes();
21169
21384
  $$.updateTargetsForSubchart($$.data.targets);
21170
- $target = subchart.main.selectAll("." + config_classes.target);
21385
+ $target = (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.selectAll("." + $COMMON.target);
21171
21386
  }
21172
21387
 
21173
- $target.style("opacity", null);
21174
- subchart.main.style("display", null);
21175
- this.flush();
21388
+ (_$target = $target) == null ? void 0 : _$target.style("opacity", null);
21389
+ (_subchart$main2 = subchart.main) == null ? void 0 : _subchart$main2.style("display", null);
21390
+ this.resize();
21176
21391
  }
21177
21392
  },
21178
21393
 
@@ -21186,14 +21401,15 @@ var _area = function area() {
21186
21401
  * chart.subchart.hide();
21187
21402
  */
21188
21403
  hide: function hide() {
21189
- var $$ = this.internal,
21190
- subchart = $$.$el.subchart,
21404
+ var _main,
21405
+ $$ = this.internal,
21406
+ main = $$.$el.subchart.main,
21191
21407
  config = $$.config;
21192
21408
 
21193
- if (config.subchart_show && subchart.main.style("display") !== "none") {
21409
+ if (config.subchart_show && ((_main = main) == null ? void 0 : _main.style("display")) !== "none") {
21194
21410
  config.subchart_show = !1;
21195
- subchart.main.style("display", "none");
21196
- this.flush();
21411
+ main.style("display", "none");
21412
+ this.resize();
21197
21413
  }
21198
21414
  },
21199
21415
 
@@ -21507,25 +21723,25 @@ extend(zoom, {
21507
21723
  minY = isSelectionGrouped ? state.margin.top : Math.min(sy, my),
21508
21724
  maxY = isSelectionGrouped ? state.height : Math.max(sy, my);
21509
21725
 
21510
- main.select("." + config_classes.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY); // TODO: binary search when multiple xs
21726
+ main.select("." + $DRAG.dragarea).attr("x", minX).attr("y", minY).attr("width", maxX - minX).attr("height", maxY - minY); // TODO: binary search when multiple xs
21511
21727
 
21512
- main.selectAll("." + config_classes.shapes).selectAll("." + config_classes.shape).filter(function (d) {
21728
+ main.selectAll("." + $SHAPE.shapes).selectAll("." + $SHAPE.shape).filter(function (d) {
21513
21729
  var _isSelectable;
21514
21730
 
21515
21731
  return (_isSelectable = isSelectable) == null ? void 0 : _isSelectable.bind($$.api)(d);
21516
21732
  }).each(function (d, i) {
21517
21733
  var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
21518
- isSelected = shape.classed(config_classes.SELECTED),
21519
- isIncluded = shape.classed(config_classes.INCLUDED),
21734
+ isSelected = shape.classed($SELECT.SELECTED),
21735
+ isIncluded = shape.classed($DRAG.INCLUDED),
21520
21736
  isWithin = !1,
21521
21737
  toggle;
21522
21738
 
21523
- if (shape.classed(config_classes.circle)) {
21739
+ if (shape.classed($CIRCLE.circle)) {
21524
21740
  var x = +shape.attr("cx") * 1,
21525
21741
  y = +shape.attr("cy") * 1;
21526
21742
  toggle = $$.togglePoint;
21527
21743
  isWithin = minX < x && x < maxX && minY < y && y < maxY;
21528
- } else if (shape.classed(config_classes.bar)) {
21744
+ } else if (shape.classed($BAR.bar)) {
21529
21745
  var _getPathBox = getPathBox(this),
21530
21746
  _x = _getPathBox.x,
21531
21747
  y = _getPathBox.y,
@@ -21541,9 +21757,9 @@ extend(zoom, {
21541
21757
 
21542
21758
 
21543
21759
  if (isWithin ^ isIncluded) {
21544
- shape.classed(config_classes.INCLUDED, !isIncluded); // TODO: included/unincluded callback here
21760
+ shape.classed($DRAG.INCLUDED, !isIncluded); // TODO: included/unincluded callback here
21545
21761
 
21546
- shape.classed(config_classes.SELECTED, !isSelected);
21762
+ shape.classed($SELECT.SELECTED, !isSelected);
21547
21763
  toggle.call($$, !isSelected, shape, d, i);
21548
21764
  }
21549
21765
  });
@@ -21566,7 +21782,7 @@ extend(zoom, {
21566
21782
  }
21567
21783
 
21568
21784
  state.dragStart = mouse;
21569
- main.select("." + config_classes.chart).append("rect").attr("class", config_classes.dragarea).style("opacity", "0.1");
21785
+ main.select("." + $COMMON.chart).append("rect").attr("class", $DRAG.dragarea).style("opacity", "0.1");
21570
21786
  $$.setDragStatus(!0);
21571
21787
  },
21572
21788
 
@@ -21586,8 +21802,8 @@ extend(zoom, {
21586
21802
  return;
21587
21803
  }
21588
21804
 
21589
- $T(main.select("." + config_classes.dragarea)).style("opacity", "0").remove();
21590
- main.selectAll("." + config_classes.shape).classed(config_classes.INCLUDED, !1);
21805
+ $T(main.select("." + $DRAG.dragarea)).style("opacity", "0").remove();
21806
+ main.selectAll("." + $SHAPE.shape).classed($DRAG.INCLUDED, !1);
21591
21807
  $$.setDragStatus(!1);
21592
21808
  }
21593
21809
  });
@@ -21625,8 +21841,8 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21625
21841
  r = $$.pointSelectR.bind($$);
21626
21842
  callFn(config.data_onselected, $$.api, d, target.node()); // add selected-circle on low layer g
21627
21843
 
21628
- $T(main.select("." + config_classes.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + config_classes.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () {
21629
- return $$.generateClass(config_classes.selectedCircle, i);
21844
+ $T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i).data([d]).enter().append("circle").attr("class", function () {
21845
+ return $$.generateClass($SELECT.selectedCircle, i);
21630
21846
  }).attr("cx", cx).attr("cy", cy).attr("stroke", $$.color).attr("r", function (d2) {
21631
21847
  return $$.pointSelectR(d2) * 1.4;
21632
21848
  })).attr("r", r);
@@ -21646,7 +21862,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21646
21862
  $T = $$.$T;
21647
21863
  callFn(config.data_onunselected, $$.api, d, target.node()); // remove selected-circle from low layer g
21648
21864
 
21649
- $T(main.select("." + config_classes.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + config_classes.selectedCircle + "-" + i)).attr("r", 0).remove();
21865
+ $T(main.select("." + $SELECT.selectedCircles + $$.getTargetSelectorSuffix(d.id)).selectAll("." + $SELECT.selectedCircle + "-" + i)).attr("r", 0).remove();
21650
21866
  },
21651
21867
 
21652
21868
  /**
@@ -21729,32 +21945,33 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21729
21945
  toggleShape: function toggleShape(that, d, i) {
21730
21946
  var $$ = this,
21731
21947
  config = $$.config,
21732
- main = $$.$el.main,
21733
- shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(that),
21734
- isSelected = shape.classed(config_classes.SELECTED),
21735
- toggle = $$.getToggle(that, d).bind($$),
21736
- toggledShape;
21948
+ main = $$.$el.main;
21737
21949
 
21738
21950
  if (config.data_selection_enabled && config.data_selection_isselectable.bind($$.api)(d)) {
21951
+ var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(that),
21952
+ isSelected = shape.classed($SELECT.SELECTED),
21953
+ toggle = $$.getToggle(that, d).bind($$),
21954
+ toggledShape;
21955
+
21739
21956
  if (!config.data_selection_multiple) {
21740
- var selector = "." + config_classes.shapes;
21957
+ var selector = "." + $SHAPE.shapes;
21741
21958
 
21742
21959
  if (config.data_selection_grouped) {
21743
21960
  selector += $$.getTargetSelectorSuffix(d.id);
21744
21961
  }
21745
21962
 
21746
- main.selectAll(selector).selectAll("." + config_classes.shape).each(function (d, i) {
21963
+ main.selectAll(selector).selectAll("." + $SHAPE.shape).each(function (d, i) {
21747
21964
  var shape = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this);
21748
21965
 
21749
- if (shape.classed(config_classes.SELECTED)) {
21966
+ if (shape.classed($SELECT.SELECTED)) {
21750
21967
  toggledShape = shape;
21751
- toggle(!1, shape.classed(config_classes.SELECTED, !1), d, i);
21968
+ toggle(!1, shape.classed($SELECT.SELECTED, !1), d, i);
21752
21969
  }
21753
21970
  });
21754
21971
  }
21755
21972
 
21756
21973
  if (!toggledShape || toggledShape.node() !== shape.node()) {
21757
- shape.classed(config_classes.SELECTED, !isSelected);
21974
+ shape.classed($SELECT.SELECTED, !isSelected);
21758
21975
  toggle(!isSelected, shape, d, i);
21759
21976
  }
21760
21977
  }
@@ -21786,7 +22003,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21786
22003
  $$.brush = (isRotated ? (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushY)() : (0,external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_.brushX)()).handleSize(5);
21787
22004
 
21788
22005
  var getBrushSize = function () {
21789
- var brush = $$.$el.svg.select("." + config_classes.brush + " .overlay"),
22006
+ var brush = $$.$el.svg.select("." + classes.brush + " .overlay"),
21790
22007
  brushSize = {
21791
22008
  width: 0,
21792
22009
  height: 0
@@ -21850,7 +22067,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21850
22067
  }).length === 0) {
21851
22068
  var _subchart$main;
21852
22069
 
21853
- (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." + config_classes.brush).call(this);
22070
+ (_subchart$main = subchart.main) == null ? void 0 : _subchart$main.select("." + classes.brush).call(this);
21854
22071
  }
21855
22072
 
21856
22073
  return this;
@@ -21879,7 +22096,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21879
22096
 
21880
22097
  $$.brush.getSelection = function () {
21881
22098
  return (// @ts-ignore
21882
- subchart.main ? subchart.main.select("." + config_classes.brush) : (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)([])
22099
+ subchart.main ? subchart.main.select("." + classes.brush) : (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)([])
21883
22100
  );
21884
22101
  };
21885
22102
  },
@@ -21910,18 +22127,18 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21910
22127
  clip.idSubchart = clipId;
21911
22128
  $$.appendClip(defs, clipId);
21912
22129
  $$.initBrush();
21913
- subchart.main = svg.append("g").classed(config_classes.subchart, !0).attr("transform", $$.getTranslate("context"));
22130
+ subchart.main = svg.append("g").classed(classes.subchart, !0).attr("transform", $$.getTranslate("context"));
21914
22131
  var main = subchart.main;
21915
22132
  main.style("visibility", visibility); // Define g for chart area
21916
22133
 
21917
- main.append("g").attr("clip-path", clipPath).attr("class", config_classes.chart); // Define g for chart types area
22134
+ main.append("g").attr("clip-path", clipPath).attr("class", classes.chart); // Define g for chart types area
21918
22135
 
21919
22136
  ["bar", "line", "bubble", "candlestick", "scatter"].forEach(function (v) {
21920
22137
  var type = capitalize(/^(bubble|scatter)$/.test(v) ? "circle" : v);
21921
22138
 
21922
22139
  if ($$.hasType(v) || $$.hasTypeOf(type)) {
21923
- var chart = main.select("." + config_classes.chart),
21924
- chartClassName = config_classes["chart" + type + "s"];
22140
+ var chart = main.select("." + classes.chart),
22141
+ chartClassName = classes["chart" + type + "s"];
21925
22142
 
21926
22143
  if (chart.select("." + chartClassName).empty()) {
21927
22144
  chart.append("g").attr("class", chartClassName);
@@ -21929,11 +22146,11 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21929
22146
  }
21930
22147
  }); // Add extent rect for Brush
21931
22148
 
21932
- var brush = main.append("g").attr("clip-path", clipPath).attr("class", config_classes.brush).call($$.brush);
22149
+ var brush = main.append("g").attr("clip-path", clipPath).attr("class", classes.brush).call($$.brush);
21933
22150
  config.subchart_showHandle && $$.addBrushHandle(brush); // ATTENTION: This must be called AFTER chart added
21934
22151
  // Add Axis
21935
22152
 
21936
- axis.subX = main.append("g").attr("class", config_classes.axisX).attr("transform", $$.getTranslate("subX")).attr("clip-path", config.axis_rotated ? "" : clip.pathXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden");
22153
+ axis.subX = main.append("g").attr("class", classes.axisX).attr("transform", $$.getTranslate("subX")).attr("clip-path", config.axis_rotated ? "" : clip.pathXAxis).style("visibility", config.subchart_axis_x_show ? visibility : "hidden");
21937
22154
  },
21938
22155
 
21939
22156
  /**
@@ -21981,14 +22198,14 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21981
22198
  name = capitalize(isPointType ? "circle" : v),
21982
22199
  chartClass = $$.getChartClass(name, !0),
21983
22200
  shapeClass = $$.getClass(isPointType ? "circles" : v + "s", !0),
21984
- shapeChart = main.select("." + config_classes["chart" + (name + "s")]);
22201
+ shapeChart = main.select("." + classes["chart" + (name + "s")]);
21985
22202
 
21986
22203
  if (isPointType) {
21987
- var circle = shapeChart.selectAll("." + config_classes.circles).data(targets.filter($$["is" + capitalize(v) + "Type"].bind($$))).attr("class", shapeClass);
22204
+ var circle = shapeChart.selectAll("." + classes.circles).data(targets.filter($$["is" + capitalize(v) + "Type"].bind($$))).attr("class", shapeClass);
21988
22205
  circle.exit().remove();
21989
22206
  circle.enter().append("g").attr("class", shapeClass);
21990
22207
  } else {
21991
- var shapeUpdate = shapeChart.selectAll("." + config_classes["chart" + name]).attr("class", chartClass).data(targets.filter($$["is" + name + "Type"].bind($$))),
22208
+ var shapeUpdate = shapeChart.selectAll("." + classes["chart" + name]).attr("class", chartClass).data(targets.filter($$["is" + name + "Type"].bind($$))),
21992
22209
  shapeEnter = shapeUpdate.enter().append("g").style("opacity", "0").attr("class", chartClass).append("g").attr("class", shapeClass);
21993
22210
  shapeUpdate.exit().remove(); // Area
21994
22211
 
@@ -21996,7 +22213,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
21996
22213
  }
21997
22214
  }); // -- Brush --//
21998
22215
 
21999
- main.selectAll("." + config_classes.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
22216
+ main.selectAll("." + classes.brush + " rect").attr(config.axis_rotated ? "width" : "height", config.axis_rotated ? state.width2 : state.height2);
22000
22217
  }
22001
22218
  },
22002
22219
 
@@ -22078,7 +22295,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
22078
22295
  var $$ = this,
22079
22296
  subchart = $$.$el.subchart,
22080
22297
  $T = $$.$T,
22081
- subXAxis = transitions != null && transitions.axisSubX ? transitions.axisSubX : $T(subchart.main.select("." + config_classes.axisX), withTransition);
22298
+ subXAxis = transitions != null && transitions.axisSubX ? transitions.axisSubX : $T(subchart.main.select("." + classes.axisX), withTransition);
22082
22299
  subchart.main.attr("transform", $$.getTranslate("context"));
22083
22300
  subXAxis.attr("transform", $$.getTranslate("subX"));
22084
22301
  },
@@ -22398,7 +22615,7 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
22398
22615
  $$.unselectRect();
22399
22616
 
22400
22617
  if (!zoomRect) {
22401
- zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class", config_classes.zoomBrush).attr("width", isRotated ? state.width : 0).attr("height", isRotated ? 0 : state.height);
22618
+ zoomRect = $$.$el.main.append("rect").attr("clip-path", state.clip.path).attr("class", $ZOOM.zoomBrush).attr("width", isRotated ? state.width : 0).attr("height", isRotated ? 0 : state.height);
22402
22619
  }
22403
22620
 
22404
22621
  start = getPointer(event, this)[prop.index];
@@ -22441,10 +22658,10 @@ function selection_objectSpread(target) { for (var i = 1, source; i < arguments.
22441
22658
 
22442
22659
  if (resetButton && config.zoom_type === "drag") {
22443
22660
  if (!$el.zoomResetBtn) {
22444
- $el.zoomResetBtn = $$.$el.chart.append("div").classed(config_classes.button, !0).append("span").on("click", function () {
22661
+ $el.zoomResetBtn = $$.$el.chart.append("div").classed($COMMON.button, !0).append("span").on("click", function () {
22445
22662
  isFunction(resetButton.onclick) && resetButton.onclick.bind($$.api)(this);
22446
22663
  $$.api.unzoom();
22447
- }).classed(config_classes.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom");
22664
+ }).classed($ZOOM.buttonZoomReset, !0).text(resetButton.text || "Reset Zoom");
22448
22665
  } else {
22449
22666
  $el.zoomResetBtn.style("display", null);
22450
22667
  }
@@ -22818,7 +23035,7 @@ var _defaults = {},
22818
23035
  * bb.version; // "1.0.0"
22819
23036
  * @memberof bb
22820
23037
  */
22821
- version: "3.2.2",
23038
+ version: "3.3.1",
22822
23039
 
22823
23040
  /**
22824
23041
  * Generate chart
@@ -22952,7 +23169,7 @@ var _defaults = {},
22952
23169
  };
22953
23170
  /**
22954
23171
  * @namespace bb
22955
- * @version 3.2.2
23172
+ * @version 3.3.1
22956
23173
  */
22957
23174
  ;// CONCATENATED MODULE: ./src/index.ts
22958
23175
  /**