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.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +16 -29
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +6 -6
- package/dist/billboard.pkgd.js +16 -29
- package/dist/billboard.pkgd.min.js +6 -6
- 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 +18 -30
- 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/ChartInternal.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/src/config/Options/axis/y2.ts +0 -13
package/dist/billboard.pkgd.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.0
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.11
|
|
@@ -30791,9 +30791,8 @@ function getScale(type = "linear", min, max) {
|
|
|
30791
30791
|
const $$ = this;
|
|
30792
30792
|
const offset = offsetValue || (() => $$.axis.x.tickOffset());
|
|
30793
30793
|
const isInverted = $$.config.axis_x_inverted;
|
|
30794
|
-
const scale = function(d
|
|
30795
|
-
|
|
30796
|
-
return raw ? v : Math.ceil(v);
|
|
30794
|
+
const scale = function(d) {
|
|
30795
|
+
return scaleValue(d) + offset();
|
|
30797
30796
|
};
|
|
30798
30797
|
for (const key in scaleValue) {
|
|
30799
30798
|
scale[key] = scaleValue[key];
|
|
@@ -30916,13 +30915,13 @@ function getScale(type = "linear", min, max) {
|
|
|
30916
30915
|
} else if (axis.isCategorized() && isString(value)) {
|
|
30917
30916
|
value = config.axis_x_categories.indexOf(value);
|
|
30918
30917
|
}
|
|
30919
|
-
return
|
|
30918
|
+
return fn(value);
|
|
30920
30919
|
},
|
|
30921
30920
|
yv(d) {
|
|
30922
30921
|
const $$ = this;
|
|
30923
30922
|
const { scale: { y, y2 } } = $$;
|
|
30924
30923
|
const yScale = d.axis && d.axis === "y2" ? y2 : y;
|
|
30925
|
-
return
|
|
30924
|
+
return yScale($$.getBaseValue(d));
|
|
30926
30925
|
},
|
|
30927
30926
|
subxx(d) {
|
|
30928
30927
|
return d ? this.scale.subX(d.x) : null;
|
|
@@ -34192,7 +34191,7 @@ class ChartInternal {
|
|
|
34192
34191
|
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
|
|
34193
34192
|
$el.defs = $el.svg.append("defs");
|
|
34194
34193
|
if (hasAxis) {
|
|
34195
|
-
["id", "idXAxis", "idYAxis", "
|
|
34194
|
+
["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
|
|
34196
34195
|
$$.appendClip($el.defs, state.clip[v]);
|
|
34197
34196
|
});
|
|
34198
34197
|
}
|
|
@@ -38609,7 +38608,7 @@ class AxisRendererHelper {
|
|
|
38609
38608
|
return (selection, scale) => {
|
|
38610
38609
|
selection.attr("transform", (d) => {
|
|
38611
38610
|
const x = scale(d);
|
|
38612
|
-
return isValue(d) ? fn(
|
|
38611
|
+
return isValue(d) ? fn(x) : null;
|
|
38613
38612
|
});
|
|
38614
38613
|
};
|
|
38615
38614
|
}
|
|
@@ -38747,7 +38746,7 @@ class AxisRenderer {
|
|
|
38747
38746
|
let scale1 = helper.copyScale();
|
|
38748
38747
|
$g = g2;
|
|
38749
38748
|
this.__chart__ = scale1;
|
|
38750
|
-
config.tickOffset = params.isCategory ?
|
|
38749
|
+
config.tickOffset = params.isCategory ? (scale1(1) - scale1(0)) / 2 : 0;
|
|
38751
38750
|
const path = g2.selectAll(".domain").data([0]);
|
|
38752
38751
|
path.enter().append("path").attr("class", "domain").merge(path).attr("d", () => {
|
|
38753
38752
|
const outerTickSized = config.outerTickSize * sign;
|
|
@@ -38922,9 +38921,7 @@ class AxisRenderer {
|
|
|
38922
38921
|
}
|
|
38923
38922
|
let tickWidth = params.tickWidth;
|
|
38924
38923
|
if (!tickWidth || tickWidth <= 0) {
|
|
38925
|
-
tickWidth = isLeftRight ? 95 : params.isCategory ?
|
|
38926
|
-
params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])
|
|
38927
|
-
) - 12 : 110;
|
|
38924
|
+
tickWidth = isLeftRight ? 95 : params.isCategory ? (params.isInverted ? scale(ticks[0]) - scale(ticks[1]) : scale(ticks[1]) - scale(ticks[0])) - 12 : 110;
|
|
38928
38925
|
}
|
|
38929
38926
|
function split(splitted2, text) {
|
|
38930
38927
|
let subtext;
|
|
@@ -39600,7 +39597,7 @@ class Axis_Axis {
|
|
|
39600
39597
|
left * -1,
|
|
39601
39598
|
$$.getXDomainMax($$.data.targets) + 1 + right
|
|
39602
39599
|
]);
|
|
39603
|
-
tickOffset =
|
|
39600
|
+
tickOffset = (scale(1) - scale(0)) / 2;
|
|
39604
39601
|
}
|
|
39605
39602
|
return maxOverflow + tickOffset;
|
|
39606
39603
|
}
|
|
@@ -40608,7 +40605,7 @@ function smoothLines(el, type) {
|
|
|
40608
40605
|
if (type === "grid") {
|
|
40609
40606
|
el.each(function() {
|
|
40610
40607
|
const g = src_select(this);
|
|
40611
|
-
["x1", "x2", "y1", "y2"].forEach((v) => g.attr(v,
|
|
40608
|
+
["x1", "x2", "y1", "y2"].forEach((v) => g.attr(v, +g.attr(v)));
|
|
40612
40609
|
});
|
|
40613
40610
|
}
|
|
40614
40611
|
}
|
|
@@ -40669,7 +40666,7 @@ function smoothLines(el, type) {
|
|
|
40669
40666
|
const $$ = this;
|
|
40670
40667
|
const { axis, config, scale, state, $el: { grid, main } } = $$;
|
|
40671
40668
|
const isRotated = config.axis_rotated;
|
|
40672
|
-
const pos = (d) =>
|
|
40669
|
+
const pos = (d) => scale.y(d);
|
|
40673
40670
|
const gridValues = axis.y.getGeneratedTicks(config.grid_y_ticks) || $$.scale.y.ticks(config.grid_y_ticks);
|
|
40674
40671
|
grid.y = main.select(`.${$GRID.ygrids}`).selectAll(`.${$GRID.ygrid}`).data(gridValues);
|
|
40675
40672
|
grid.y.exit().remove();
|
|
@@ -42363,18 +42360,6 @@ function smoothLines(el, type) {
|
|
|
42363
42360
|
|
|
42364
42361
|
;// ./src/config/Options/axis/y2.ts
|
|
42365
42362
|
/* harmony default export */ var y2 = ({
|
|
42366
|
-
/**
|
|
42367
|
-
* Set clip-path attribute for y2 axis element
|
|
42368
|
-
* - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
|
|
42369
|
-
* @name axis․y2․clipPath
|
|
42370
|
-
* @memberof Options
|
|
42371
|
-
* @type {boolean}
|
|
42372
|
-
* @default true
|
|
42373
|
-
* @example
|
|
42374
|
-
* // don't set 'clip-path' attribute
|
|
42375
|
-
* clipPath: false
|
|
42376
|
-
*/
|
|
42377
|
-
axis_y2_clipPath: true,
|
|
42378
42363
|
/**
|
|
42379
42364
|
* Show or hide y2 axis.
|
|
42380
42365
|
* - **NOTE**:
|
|
@@ -44749,7 +44734,9 @@ function point_y(p) {
|
|
|
44749
44734
|
clipPath = `0 0 ${pos - init[1]}px 0`;
|
|
44750
44735
|
}
|
|
44751
44736
|
}
|
|
44752
|
-
|
|
44737
|
+
if (clipPath) {
|
|
44738
|
+
d.clipPath = `inset(${clipPath})`;
|
|
44739
|
+
}
|
|
44753
44740
|
}
|
|
44754
44741
|
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]}`;
|
|
44755
44742
|
return `M${points[0][indexX]},${points[0][indexY]}${path}z`;
|
|
@@ -48567,7 +48554,7 @@ const bb = {
|
|
|
48567
48554
|
* bb.version; // "1.0.0"
|
|
48568
48555
|
* @memberof bb
|
|
48569
48556
|
*/
|
|
48570
|
-
version: "3.14.0
|
|
48557
|
+
version: "3.14.0",
|
|
48571
48558
|
/**
|
|
48572
48559
|
* Generate chart
|
|
48573
48560
|
* - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when:
|