billboard.js 3.14.0 → 3.14.1

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 (46) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +13 -12
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +9 -9
  5. package/dist/billboard.pkgd.js +1554 -913
  6. package/dist/billboard.pkgd.min.js +18 -18
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +3 -3
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +3 -3
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-stanford.js +3 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
  13. package/dist/plugin/billboardjs-plugin-tableview.js +3 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +3 -3
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1607 -967
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -5
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +1608 -968
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +7 -7
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +1609 -969
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +15 -15
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +1610 -970
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +8 -8
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +1611 -971
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -7
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +20 -20
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +4 -77
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -77
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +4 -77
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -66
  43. package/package.json +20 -20
  44. package/src/ChartInternal/interactions/eventrect.ts +1 -4
  45. package/src/ChartInternal/internals/tooltip.ts +4 -5
  46. package/src/ChartInternal/shape/point.ts +7 -6
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.0
8
+ * @version 3.14.1
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.14.0
8
+ * @version 3.14.1
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -157,12 +157,12 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__14__;
157
157
  /******/
158
158
  /************************************************************************/
159
159
  var __webpack_exports__ = {};
160
- // This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
160
+ // This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
161
161
  !function() {
162
162
  // extracted by mini-css-extract-plugin
163
163
 
164
164
  }();
165
- // This entry need to be wrapped in an IIFE because it need to be isolated against other entry modules.
165
+ // This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
166
166
  !function() {
167
167
  // ESM COMPAT FLAG
168
168
  __webpack_require__.r(__webpack_exports__);
@@ -7884,8 +7884,8 @@ function getTextXPos(pos = "left", width) {
7884
7884
  } else {
7885
7885
  const { clientX, clientY } = event;
7886
7886
  setTimeout(() => {
7887
- let target = browser_doc.elementFromPoint(clientX, clientY);
7888
- const data = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(target).datum();
7887
+ let target = [clientX, clientY].every(Number.isFinite) && browser_doc.elementFromPoint(clientX, clientY);
7888
+ const data = target && (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(target).datum();
7889
7889
  if (data) {
7890
7890
  const d = $$.hasArcType() ? $$.convertToArcData($$.updateAngle(data)) : data == null ? void 0 : data.data;
7891
7891
  hasTreemap && (target = svg.node());
@@ -14458,14 +14458,13 @@ class Axis_Axis {
14458
14458
  clickHandlerForMultipleXS(ctx) {
14459
14459
  const $$ = ctx;
14460
14460
  const { config, state } = $$;
14461
- const pointSensitivity = config.point_sensitivity;
14462
14461
  const targetsToShow = $$.filterTargetsToShow($$.data.targets);
14463
14462
  if ($$.hasArcType(targetsToShow)) {
14464
14463
  return;
14465
14464
  }
14466
14465
  const mouse = getPointer(state.event, this);
14467
14466
  const closest = $$.findClosestFromTargets(targetsToShow, mouse);
14468
- const sensitivity = pointSensitivity === "radius" ? closest == null ? void 0 : closest.r : isFunction(pointSensitivity) ? closest && pointSensitivity(closest) : pointSensitivity;
14467
+ const sensitivity = $$.getPointSensitivity(closest);
14469
14468
  if (!closest) {
14470
14469
  return;
14471
14470
  }
@@ -19678,11 +19677,11 @@ const getTransitionName = () => getRandom();
19678
19677
  return $$.config.point_focus_only && !$$.hasType("bubble") && !$$.hasType("scatter") && !$$.hasArcType(null, ["radar"]);
19679
19678
  },
19680
19679
  isWithinCircle(node, r) {
19681
- const { config, state } = this;
19680
+ const { state } = this;
19682
19681
  const mouse = getPointer(state.event, node);
19683
19682
  const element = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(node);
19684
19683
  const prefix = this.isCirclePoint(node) ? "c" : "";
19685
- const sensitivity = config.point_sensitivity === "radius" ? node.getAttribute("r") : config.point_sensitivity;
19684
+ const pointSensitivity = this.getPointSensitivity(element == null ? void 0 : element.datum());
19686
19685
  let cx = +element.attr(`${prefix}x`);
19687
19686
  let cy = +element.attr(`${prefix}y`);
19688
19687
  if (!(cx || cy) && node.nodeType === 1) {
@@ -19692,7 +19691,7 @@ const getTransitionName = () => getRandom();
19692
19691
  }
19693
19692
  return Math.sqrt(
19694
19693
  Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)
19695
- ) < (r || sensitivity);
19694
+ ) < (r || pointSensitivity);
19696
19695
  },
19697
19696
  /**
19698
19697
  * Get data point sensitivity radius
@@ -19702,7 +19701,9 @@ const getTransitionName = () => getRandom();
19702
19701
  getPointSensitivity(d) {
19703
19702
  const $$ = this;
19704
19703
  let sensitivity = $$.config.point_sensitivity;
19705
- if (isFunction(sensitivity)) {
19704
+ if (!d) {
19705
+ return sensitivity;
19706
+ } else if (isFunction(sensitivity)) {
19706
19707
  sensitivity = sensitivity.call($$.api, d);
19707
19708
  } else if (sensitivity === "radius") {
19708
19709
  sensitivity = d.r;
@@ -21824,7 +21825,7 @@ const bb = {
21824
21825
  * bb.version; // "1.0.0"
21825
21826
  * @memberof bb
21826
21827
  */
21827
- version: "3.14.0",
21828
+ version: "3.14.1",
21828
21829
  /**
21829
21830
  * Generate chart
21830
21831
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
@@ -5,5 +5,5 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.0
8
+ * @version 3.14.1
9
9
  */.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle,.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-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{font-size:13px;fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:1em;fill:#fff;white-space:nowrap}.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:gray;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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;user-select:none}.bb-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;opacity:.9;box-shadow:7px 7px 12px -9px #777;white-space:nowrap}.bb-tooltip tr{border:1px solid #CCC}.bb-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.bb-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px}.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-arcs .bb-levels circle{fill:none;stroke:#848282;stroke-width:.5px}.bb-chart-arcs .bb-levels text{fill:#848282}.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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{font-size:11px;border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}