billboard.js 3.14.0-next.3 → 3.14.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 (52) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +16 -29
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +6 -6
  5. package/dist/billboard.pkgd.js +16 -29
  6. package/dist/billboard.pkgd.min.js +6 -6
  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 +4 -4
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
  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.pkgd.js +2 -2
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +4 -4
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +7 -7
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  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 +18 -30
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -4
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  43. package/package.json +10 -10
  44. package/src/ChartInternal/Axis/Axis.ts +1 -1
  45. package/src/ChartInternal/Axis/AxisRenderer.ts +5 -7
  46. package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
  47. package/src/ChartInternal/ChartInternal.ts +1 -1
  48. package/src/ChartInternal/internals/grid.ts +2 -2
  49. package/src/ChartInternal/internals/scale.ts +4 -7
  50. package/src/ChartInternal/shape/bar.ts +3 -1
  51. package/src/Plugin/stanford/Elements.ts +2 -2
  52. 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.3
8
+ * @version 3.14.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.14.0-next.3
8
+ * @version 3.14.0
9
9
  */
10
10
  (function webpackUniversalModuleDefinition(root, factory) {
11
11
  if(typeof exports === 'object' && typeof module === 'object')
@@ -6427,9 +6427,8 @@ function getScale(type = "linear", min, max) {
6427
6427
  const $$ = this;
6428
6428
  const offset = offsetValue || (() => $$.axis.x.tickOffset());
6429
6429
  const isInverted = $$.config.axis_x_inverted;
6430
- const scale = function(d, raw) {
6431
- const v = scaleValue(d) + offset();
6432
- return raw ? v : Math.ceil(v);
6430
+ const scale = function(d) {
6431
+ return scaleValue(d) + offset();
6433
6432
  };
6434
6433
  for (const key in scaleValue) {
6435
6434
  scale[key] = scaleValue[key];
@@ -6552,13 +6551,13 @@ function getScale(type = "linear", min, max) {
6552
6551
  } else if (axis.isCategorized() && isString(value)) {
6553
6552
  value = config.axis_x_categories.indexOf(value);
6554
6553
  }
6555
- return Math.ceil(fn(value));
6554
+ return fn(value);
6556
6555
  },
6557
6556
  yv(d) {
6558
6557
  const $$ = this;
6559
6558
  const { scale: { y, y2 } } = $$;
6560
6559
  const yScale = d.axis && d.axis === "y2" ? y2 : y;
6561
- return Math.ceil(yScale($$.getBaseValue(d)));
6560
+ return yScale($$.getBaseValue(d));
6562
6561
  },
6563
6562
  subxx(d) {
6564
6563
  return d ? this.scale.subX(d.x) : null;
@@ -8916,7 +8915,7 @@ class ChartInternal {
8916
8915
  if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
8917
8916
  $el.defs = $el.svg.append("defs");
8918
8917
  if (hasAxis) {
8919
- ["id", "idXAxis", "idYAxis", "idY2Axis", "idGrid"].forEach((v) => {
8918
+ ["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
8920
8919
  $$.appendClip($el.defs, state.clip[v]);
8921
8920
  });
8922
8921
  }
@@ -12784,7 +12783,7 @@ class AxisRendererHelper {
12784
12783
  return (selection, scale) => {
12785
12784
  selection.attr("transform", (d) => {
12786
12785
  const x = scale(d);
12787
- return isValue(d) ? fn(Math.ceil(x)) : null;
12786
+ return isValue(d) ? fn(x) : null;
12788
12787
  });
12789
12788
  };
12790
12789
  }
@@ -12922,7 +12921,7 @@ class AxisRenderer {
12922
12921
  let scale1 = helper.copyScale();
12923
12922
  $g = g2;
12924
12923
  this.__chart__ = scale1;
12925
- config.tickOffset = params.isCategory ? Math.ceil((scale1(1) - scale1(0)) / 2) : 0;
12924
+ config.tickOffset = params.isCategory ? (scale1(1) - scale1(0)) / 2 : 0;
12926
12925
  const path = g2.selectAll(".domain").data([0]);
12927
12926
  path.enter().append("path").attr("class", "domain").merge(path).attr("d", () => {
12928
12927
  const outerTickSized = config.outerTickSize * sign;
@@ -13097,9 +13096,7 @@ class AxisRenderer {
13097
13096
  }
13098
13097
  let tickWidth = params.tickWidth;
13099
13098
  if (!tickWidth || tickWidth <= 0) {
13100
- tickWidth = isLeftRight ? 95 : params.isCategory ? Math.ceil(
13101
- params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])
13102
- ) - 12 : 110;
13099
+ tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
13103
13100
  }
13104
13101
  function split(splitted2, text) {
13105
13102
  let subtext;
@@ -13775,7 +13772,7 @@ class Axis_Axis {
13775
13772
  left * -1,
13776
13773
  $$.getXDomainMax($$.data.targets) + 1 + right
13777
13774
  ]);
13778
- tickOffset = Math.ceil((scale(1) - scale(0)) / 2);
13775
+ tickOffset = (scale(1) - scale(0)) / 2;
13779
13776
  }
13780
13777
  return maxOverflow + tickOffset;
13781
13778
  }
@@ -14782,7 +14779,7 @@ function smoothLines(el, type) {
14782
14779
  if (type === "grid") {
14783
14780
  el.each(function() {
14784
14781
  const g = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this);
14785
- ["x1", "x2", "y1", "y2"].forEach((v) => g.attr(v, Math.ceil(+g.attr(v))));
14782
+ ["x1", "x2", "y1", "y2"].forEach((v) => g.attr(v, +g.attr(v)));
14786
14783
  });
14787
14784
  }
14788
14785
  }
@@ -14843,7 +14840,7 @@ function smoothLines(el, type) {
14843
14840
  const $$ = this;
14844
14841
  const { axis, config, scale, state, $el: { grid, main } } = $$;
14845
14842
  const isRotated = config.axis_rotated;
14846
- const pos = (d) => Math.ceil(scale.y(d));
14843
+ const pos = (d) => scale.y(d);
14847
14844
  const gridValues = axis.y.getGeneratedTicks(config.grid_y_ticks) || $$.scale.y.ticks(config.grid_y_ticks);
14848
14845
  grid.y = main.select(`.${$GRID.ygrids}`).selectAll(`.${$GRID.ygrid}`).data(gridValues);
14849
14846
  grid.y.exit().remove();
@@ -16537,18 +16534,6 @@ function smoothLines(el, type) {
16537
16534
 
16538
16535
  ;// ./src/config/Options/axis/y2.ts
16539
16536
  /* harmony default export */ var y2 = ({
16540
- /**
16541
- * Set clip-path attribute for y2 axis element
16542
- * - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
16543
- * @name axis․y2․clipPath
16544
- * @memberof Options
16545
- * @type {boolean}
16546
- * @default true
16547
- * @example
16548
- * // don't set 'clip-path' attribute
16549
- * clipPath: false
16550
- */
16551
- axis_y2_clipPath: true,
16552
16537
  /**
16553
16538
  * Show or hide y2 axis.
16554
16539
  * - **NOTE**:
@@ -18475,7 +18460,9 @@ function getAttrTweenFn(fn) {
18475
18460
  clipPath = `0 0 ${pos - init[1]}px 0`;
18476
18461
  }
18477
18462
  }
18478
- d.clipPath = `inset(${clipPath})`;
18463
+ if (clipPath) {
18464
+ d.clipPath = `inset(${clipPath})`;
18465
+ }
18479
18466
  }
18480
18467
  const path = isRotated ? `H${pos} ${pathRadius[0]}V${points[2][indexY] - radius} ${pathRadius[1]}H${points[3][indexX]}` : `V${pos} ${pathRadius[0]}H${points[2][indexX] - radius} ${pathRadius[1]}V${points[3][indexY]}`;
18481
18468
  return `M${points[0][indexX]},${points[0][indexY]}${path}z`;
@@ -21837,7 +21824,7 @@ const bb = {
21837
21824
  * bb.version; // "1.0.0"
21838
21825
  * @memberof bb
21839
21826
  */
21840
- version: "3.14.0-next.3",
21827
+ version: "3.14.0",
21841
21828
  /**
21842
21829
  * Generate chart
21843
21830
  * - **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.3
8
+ * @version 3.14.0
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}