billboard.js 3.3.0-next.2 → 3.3.0

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 (40) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +38 -10
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +2 -2
  5. package/dist/billboard.pkgd.js +39 -11
  6. package/dist/billboard.pkgd.min.js +3 -3
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +2 -2
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2 -2
  22. package/dist/theme/datalab.css +1 -1
  23. package/dist/theme/datalab.min.css +1 -1
  24. package/dist/theme/graph.css +1 -1
  25. package/dist/theme/graph.min.css +1 -1
  26. package/dist/theme/insight.css +1 -1
  27. package/dist/theme/insight.min.css +1 -1
  28. package/dist-esm/billboard.js +45 -10
  29. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  30. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  31. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  32. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  33. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  34. package/package.json +19 -19
  35. package/src/Chart/api/chart.ts +7 -1
  36. package/src/ChartInternal/ChartInternal.ts +3 -1
  37. package/src/ChartInternal/interactions/interaction.ts +36 -4
  38. package/src/ChartInternal/internals/tooltip.ts +0 -1
  39. package/types/axis.d.ts +4 -4
  40. package/types/chart.d.ts +1 -1
@@ -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.2
8
+ * @version 3.3.0
9
9
  */
10
10
  /*-- Chart --*/
11
11
  .bb svg {
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.2
8
+ * @version 3.3.0
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -5247,14 +5247,40 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
5247
5247
  * @private
5248
5248
  */
5249
5249
  unbindZoomEvent: function unbindZoomEvent() {
5250
- var _zoomResetBtn,
5250
+ var _eventRect,
5251
+ _zoomResetBtn,
5251
5252
  $$ = this,
5252
5253
  _$$$$el2 = $$.$el,
5253
5254
  eventRect = _$$$$el2.eventRect,
5254
5255
  zoomResetBtn = _$$$$el2.zoomResetBtn;
5255
5256
 
5256
- eventRect.on(".zoom", null).on(".drag", null);
5257
- (_zoomResetBtn = zoomResetBtn) == null ? void 0 : _zoomResetBtn.style("display", "none");
5257
+ (_eventRect = eventRect) == null ? void 0 : _eventRect.on(".zoom wheel.zoom .drag", null);
5258
+ (_zoomResetBtn = zoomResetBtn) == null ? void 0 : _zoomResetBtn.on("click", null).style("display", "none");
5259
+ },
5260
+
5261
+ /**
5262
+ * Unbind all attached events
5263
+ * @private
5264
+ */
5265
+ unbindAllEvents: function unbindAllEvents() {
5266
+ var _region,
5267
+ _brush,
5268
+ _arcs,
5269
+ _legend,
5270
+ $$ = this,
5271
+ _$$$$el3 = $$.$el,
5272
+ arcs = _$$$$el3.arcs,
5273
+ eventRect = _$$$$el3.eventRect,
5274
+ legend = _$$$$el3.legend,
5275
+ region = _$$$$el3.region,
5276
+ svg = _$$$$el3.svg,
5277
+ brush = $$.brush;
5278
+
5279
+ // detach all possible event types
5280
+ [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) {
5281
+ 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);
5282
+ });
5283
+ $$.unbindZoomEvent == null ? void 0 : $$.unbindZoomEvent();
5258
5284
  }
5259
5285
  });
5260
5286
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/class.ts
@@ -8593,7 +8619,7 @@ function getTextPos(pos, width) {
8593
8619
  $el.tooltip = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(config.tooltip_contents.bindto);
8594
8620
 
8595
8621
  if ($el.tooltip.empty()) {
8596
- $el.tooltip = $el.chart.style("position", "relative").append("div").attr("class", config_classes.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
8622
+ $el.tooltip = $el.chart.append("div").attr("class", config_classes.tooltipContainer).style("position", "absolute").style("pointer-events", "none").style("display", "none");
8597
8623
  }
8598
8624
 
8599
8625
  $$.bindTooltipResizePos();
@@ -9575,7 +9601,7 @@ var ChartInternal = /*#__PURE__*/function () {
9575
9601
  $el.chart = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(browser_doc.body.appendChild(browser_doc.createElement("div")));
9576
9602
  }
9577
9603
 
9578
- $el.chart.html("").classed(bindto.classname, !0);
9604
+ $el.chart.html("").classed(bindto.classname, !0).style("position", "relative");
9579
9605
  $$.initToRender();
9580
9606
  }
9581
9607
  /**
@@ -10233,12 +10259,14 @@ function loadConfig(config) {
10233
10259
 
10234
10260
  if (notEmpty($$)) {
10235
10261
  $$.callPluginHook("$willDestroy");
10236
- $$.charts.splice($$.charts.indexOf(this), 1); // clear timers && pending transition
10262
+ $$.charts.splice($$.charts.indexOf(this), 1); // detach events
10263
+
10264
+ $$.unbindAllEvents(); // clear timers && pending transition
10237
10265
 
10238
10266
  svg.select("*").interrupt();
10239
10267
  $$.resizeFunction.clear();
10240
10268
  win.removeEventListener("resize", $$.resizeFunction);
10241
- chart.classed("bb", !1).html(""); // releasing own references
10269
+ chart.classed("bb", !1).style("position", null).selectChildren().remove(); // releasing own references
10242
10270
 
10243
10271
  Object.keys(this).forEach(function (key) {
10244
10272
  key === "internal" && Object.keys($$).forEach(function (k) {
@@ -22928,7 +22956,7 @@ var _defaults = {},
22928
22956
  * bb.version; // "1.0.0"
22929
22957
  * @memberof bb
22930
22958
  */
22931
- version: "3.3.0-next.1",
22959
+ version: "3.2.2",
22932
22960
 
22933
22961
  /**
22934
22962
  * Generate chart
@@ -23062,7 +23090,7 @@ var _defaults = {},
23062
23090
  };
23063
23091
  /**
23064
23092
  * @namespace bb
23065
- * @version 3.3.0-next.1
23093
+ * @version 3.2.2
23066
23094
  */
23067
23095
  ;// CONCATENATED MODULE: ./src/index.ts
23068
23096
  /**
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.3.0-next.2
8
+ * @version 3.3.0
9
9
  */.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value{fill:#000}.bb-chart-arc path{stroke:#fff}.bb-chart-arc rect{stroke:#fff;stroke-width:1}.bb-chart-arc text{fill:#fff;font-size:13px}.bb-axis{shape-rendering:crispEdges}.bb-grid{pointer-events:none}.bb-grid line{stroke:#aaa}.bb-grid text{fill:#aaa}.bb-xgrid,.bb-ygrid{stroke-dasharray:3 3}.bb-text.bb-empty{fill:grey;font-size:2em}.bb-line{stroke-width:1px}.bb-circle._expanded_{stroke-width:1px;stroke:#fff}.bb-selected-circle{fill:#fff;stroke-width:2px}.bb-bar{stroke-width:0}.bb-bar._expanded_{fill-opacity:.75}.bb-candlestick{stroke-width:1px}.bb-candlestick._expanded_{fill-opacity:.75}.bb-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}text.bb-chart-arcs-gauge-title{dominant-baseline:middle;font-size:2.7em}.bb-chart-arcs .bb-chart-arcs-background{fill:#e0e0e0;stroke:#fff}.bb-chart-arcs .bb-chart-arcs-gauge-unit{fill:#000;font-size:16px}.bb-chart-arcs .bb-chart-arcs-gauge-max,.bb-chart-arcs .bb-chart-arcs-gauge-min{fill:#777}.bb-chart-radars .bb-levels polygon{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-levels text{fill:#848282}.bb-chart-radars .bb-axis line{stroke:#848282;stroke-width:.5px}.bb-chart-radars .bb-axis text{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}