billboard.js 3.14.0-next.4 → 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 (48) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +14 -25
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +9 -9
  5. package/dist/billboard.pkgd.js +1555 -926
  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 +21 -33
  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/ChartInternal.ts +1 -1
  45. package/src/ChartInternal/interactions/eventrect.ts +1 -4
  46. package/src/ChartInternal/internals/tooltip.ts +4 -5
  47. package/src/ChartInternal/shape/point.ts +7 -6
  48. package/src/config/Options/axis/y2.ts +0 -13
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.14.0-next.4
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-next.4
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());
@@ -8915,7 +8915,7 @@ class ChartInternal {
8915
8915
  if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
8916
8916
  $el.defs = $el.svg.append("defs");
8917
8917
  if (hasAxis) {
8918
- ["id", "idXAxis", "idYAxis", "idY2Axis", "idGrid"].forEach((v) => {
8918
+ ["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
8919
8919
  $$.appendClip($el.defs, state.clip[v]);
8920
8920
  });
8921
8921
  }
@@ -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
  }
@@ -16534,18 +16533,6 @@ function smoothLines(el, type) {
16534
16533
 
16535
16534
  ;// ./src/config/Options/axis/y2.ts
16536
16535
  /* harmony default export */ var y2 = ({
16537
- /**
16538
- * Set clip-path attribute for y2 axis element
16539
- * - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
16540
- * @name axis․y2․clipPath
16541
- * @memberof Options
16542
- * @type {boolean}
16543
- * @default true
16544
- * @example
16545
- * // don't set 'clip-path' attribute
16546
- * clipPath: false
16547
- */
16548
- axis_y2_clipPath: true,
16549
16536
  /**
16550
16537
  * Show or hide y2 axis.
16551
16538
  * - **NOTE**:
@@ -19690,11 +19677,11 @@ const getTransitionName = () => getRandom();
19690
19677
  return $$.config.point_focus_only && !$$.hasType("bubble") && !$$.hasType("scatter") && !$$.hasArcType(null, ["radar"]);
19691
19678
  },
19692
19679
  isWithinCircle(node, r) {
19693
- const { config, state } = this;
19680
+ const { state } = this;
19694
19681
  const mouse = getPointer(state.event, node);
19695
19682
  const element = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(node);
19696
19683
  const prefix = this.isCirclePoint(node) ? "c" : "";
19697
- const sensitivity = config.point_sensitivity === "radius" ? node.getAttribute("r") : config.point_sensitivity;
19684
+ const pointSensitivity = this.getPointSensitivity(element == null ? void 0 : element.datum());
19698
19685
  let cx = +element.attr(`${prefix}x`);
19699
19686
  let cy = +element.attr(`${prefix}y`);
19700
19687
  if (!(cx || cy) && node.nodeType === 1) {
@@ -19704,7 +19691,7 @@ const getTransitionName = () => getRandom();
19704
19691
  }
19705
19692
  return Math.sqrt(
19706
19693
  Math.pow(cx - mouse[0], 2) + Math.pow(cy - mouse[1], 2)
19707
- ) < (r || sensitivity);
19694
+ ) < (r || pointSensitivity);
19708
19695
  },
19709
19696
  /**
19710
19697
  * Get data point sensitivity radius
@@ -19714,7 +19701,9 @@ const getTransitionName = () => getRandom();
19714
19701
  getPointSensitivity(d) {
19715
19702
  const $$ = this;
19716
19703
  let sensitivity = $$.config.point_sensitivity;
19717
- if (isFunction(sensitivity)) {
19704
+ if (!d) {
19705
+ return sensitivity;
19706
+ } else if (isFunction(sensitivity)) {
19718
19707
  sensitivity = sensitivity.call($$.api, d);
19719
19708
  } else if (sensitivity === "radius") {
19720
19709
  sensitivity = d.r;
@@ -21836,7 +21825,7 @@ const bb = {
21836
21825
  * bb.version; // "1.0.0"
21837
21826
  * @memberof bb
21838
21827
  */
21839
- version: "3.14.0-next.4",
21828
+ version: "3.14.1",
21840
21829
  /**
21841
21830
  * Generate chart
21842
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-next.4
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}