billboard.js 3.14.0-next.3 → 3.14.0-next.4
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.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +15 -16
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +5 -5
- package/dist/billboard.pkgd.js +15 -16
- package/dist/billboard.pkgd.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +4 -4
- package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +4 -4
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +7 -7
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +17 -17
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +4 -4
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +10 -10
- package/src/ChartInternal/Axis/Axis.ts +1 -1
- package/src/ChartInternal/Axis/AxisRenderer.ts +5 -7
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
- package/src/ChartInternal/internals/grid.ts +2 -2
- package/src/ChartInternal/internals/scale.ts +4 -7
- package/src/ChartInternal/shape/bar.ts +3 -1
- package/src/Plugin/stanford/Elements.ts +2 -2
package/dist/billboard.css
CHANGED
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.
|
|
8
|
+
* @version 3.14.0-next.4
|
|
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
|
|
6431
|
-
|
|
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
|
|
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
|
|
6560
|
+
return yScale($$.getBaseValue(d));
|
|
6562
6561
|
},
|
|
6563
6562
|
subxx(d) {
|
|
6564
6563
|
return d ? this.scale.subX(d.x) : null;
|
|
@@ -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(
|
|
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 ?
|
|
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 ?
|
|
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 =
|
|
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,
|
|
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) =>
|
|
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();
|
|
@@ -18475,7 +18472,9 @@ function getAttrTweenFn(fn) {
|
|
|
18475
18472
|
clipPath = `0 0 ${pos - init[1]}px 0`;
|
|
18476
18473
|
}
|
|
18477
18474
|
}
|
|
18478
|
-
|
|
18475
|
+
if (clipPath) {
|
|
18476
|
+
d.clipPath = `inset(${clipPath})`;
|
|
18477
|
+
}
|
|
18479
18478
|
}
|
|
18480
18479
|
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
18480
|
return `M${points[0][indexX]},${points[0][indexY]}${path}z`;
|
|
@@ -21837,7 +21836,7 @@ const bb = {
|
|
|
21837
21836
|
* bb.version; // "1.0.0"
|
|
21838
21837
|
* @memberof bb
|
|
21839
21838
|
*/
|
|
21840
|
-
version: "3.14.0-next.
|
|
21839
|
+
version: "3.14.0-next.4",
|
|
21841
21840
|
/**
|
|
21842
21841
|
* Generate chart
|
|
21843
21842
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|
package/dist/billboard.min.css
CHANGED
|
@@ -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.
|
|
8
|
+
* @version 3.14.0-next.4
|
|
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}
|