billboard.js 3.15.0-next.1 → 3.15.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 +25 -26
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +9 -9
- package/dist/billboard.pkgd.js +25 -26
- package/dist/billboard.pkgd.min.js +12 -12
- 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 +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- 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 +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- 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 +38 -23
- 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 +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +18 -18
- package/src/ChartInternal/ChartInternal.ts +1 -1
- package/src/ChartInternal/internals/region.ts +25 -10
- package/src/config/Options/axis/y2.ts +0 -13
- package/src/config/Options/common/main.ts +2 -0
- package/types/options.d.ts +1 -0
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.15.0
|
|
8
|
+
* @version 3.15.0
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -1068,6 +1068,7 @@ const $ZOOM = {
|
|
|
1068
1068
|
* - `text {string}`: Text value.
|
|
1069
1069
|
* - `x {number}`: x Position.
|
|
1070
1070
|
* - `y {number}`: y Position.
|
|
1071
|
+
* - `center {string}`: Align label at the center. Allowed values are 'x', 'y', 'xy'.
|
|
1071
1072
|
* - `color {string}`: Color string.
|
|
1072
1073
|
* - `rotated (boolean)`: Whether rotate label or not.
|
|
1073
1074
|
* @name regions
|
|
@@ -1088,6 +1089,7 @@ const $ZOOM = {
|
|
|
1088
1089
|
* text: "Region Text",
|
|
1089
1090
|
* x: 5, // position relative of the initial x coordinate
|
|
1090
1091
|
* y: 5, // position relative of the initial y coordinate
|
|
1092
|
+
* center: "xy", // center text label in both direction.
|
|
1091
1093
|
* color: "red", // color string
|
|
1092
1094
|
* rotated: true // make text to show in vertical or horizontal
|
|
1093
1095
|
* }
|
|
@@ -8954,7 +8956,7 @@ class ChartInternal {
|
|
|
8954
8956
|
if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
|
|
8955
8957
|
$el.defs = $el.svg.append("defs");
|
|
8956
8958
|
if (hasAxis) {
|
|
8957
|
-
["id", "idXAxis", "idYAxis", "
|
|
8959
|
+
["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
|
|
8958
8960
|
$$.appendClip($el.defs, state.clip[v]);
|
|
8959
8961
|
});
|
|
8960
8962
|
}
|
|
@@ -15204,22 +15206,31 @@ function smoothLines(el, type) {
|
|
|
15204
15206
|
redrawRegion(withTransition) {
|
|
15205
15207
|
const $$ = this;
|
|
15206
15208
|
const { $el: { region }, $T } = $$;
|
|
15209
|
+
const regionX = $$.regionX.bind($$);
|
|
15210
|
+
const regionY = $$.regionY.bind($$);
|
|
15211
|
+
const attr = ["width", "height"];
|
|
15207
15212
|
let regions = region.list.select("rect");
|
|
15208
15213
|
let label = region.list.selectAll("text");
|
|
15209
|
-
regions = $T(regions, withTransition).attr("x",
|
|
15210
|
-
label = $T(label, withTransition).
|
|
15214
|
+
regions = $T(regions, withTransition).attr("x", regionX).attr("y", regionY).attr("width", $$.regionWidth.bind($$)).attr("height", $$.regionHeight.bind($$));
|
|
15215
|
+
label = $T(label, withTransition).text((d) => {
|
|
15211
15216
|
var _a;
|
|
15212
|
-
|
|
15213
|
-
|
|
15214
|
-
}).attr("text-anchor", (d) => {
|
|
15217
|
+
return (_a = d.label) == null ? void 0 : _a.text;
|
|
15218
|
+
}).attr("transform", ({ label: label2 }) => label2.rotated ? ` rotate(-90)` : null).attr("transform", function(d) {
|
|
15215
15219
|
var _a;
|
|
15216
|
-
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15220
|
+
const { x = 0, y = 0, center = false, rotated = false } = (_a = d.label) != null ? _a : {};
|
|
15221
|
+
const rect = this.previousElementSibling;
|
|
15222
|
+
const pos = { x: 0, y: 0 };
|
|
15223
|
+
if (isString(center)) {
|
|
15224
|
+
["x", "y"].forEach((v, i) => {
|
|
15225
|
+
if (center.indexOf(v) > -1) {
|
|
15226
|
+
pos[v] = (+rect.getAttribute(attr[i]) - getBoundingRect(this)[attr[i]]) / 2;
|
|
15227
|
+
}
|
|
15228
|
+
});
|
|
15229
|
+
}
|
|
15230
|
+
return `translate(${regionX(d) + pos.x + x}, ${regionY(d) + pos.y + y})${rotated ? ` rotate(-90)` : ``}`;
|
|
15231
|
+
}).attr("text-anchor", ({ label: label2 }) => (label2 == null ? void 0 : label2.rotated) ? "end" : null).attr("dy", "1em").style("fill", ({ label: label2 }) => {
|
|
15221
15232
|
var _a;
|
|
15222
|
-
return (_a =
|
|
15233
|
+
return (_a = label2 == null ? void 0 : label2.color) != null ? _a : null;
|
|
15223
15234
|
});
|
|
15224
15235
|
return [
|
|
15225
15236
|
regions.style("fill-opacity", (d) => isValue(d.opacity) ? d.opacity : null).on("end", function() {
|
|
@@ -16600,18 +16611,6 @@ function smoothLines(el, type) {
|
|
|
16600
16611
|
|
|
16601
16612
|
;// ./src/config/Options/axis/y2.ts
|
|
16602
16613
|
/* harmony default export */ var y2 = ({
|
|
16603
|
-
/**
|
|
16604
|
-
* Set clip-path attribute for y2 axis element
|
|
16605
|
-
* - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
|
|
16606
|
-
* @name axis․y2․clipPath
|
|
16607
|
-
* @memberof Options
|
|
16608
|
-
* @type {boolean}
|
|
16609
|
-
* @default true
|
|
16610
|
-
* @example
|
|
16611
|
-
* // don't set 'clip-path' attribute
|
|
16612
|
-
* clipPath: false
|
|
16613
|
-
*/
|
|
16614
|
-
axis_y2_clipPath: true,
|
|
16615
16614
|
/**
|
|
16616
16615
|
* Show or hide y2 axis.
|
|
16617
16616
|
* - **NOTE**:
|
|
@@ -21905,7 +21904,7 @@ const bb = {
|
|
|
21905
21904
|
* bb.version; // "1.0.0"
|
|
21906
21905
|
* @memberof bb
|
|
21907
21906
|
*/
|
|
21908
|
-
version: "3.15.0
|
|
21907
|
+
version: "3.15.0",
|
|
21909
21908
|
/**
|
|
21910
21909
|
* Generate chart
|
|
21911
21910
|
* - **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.15.0
|
|
8
|
+
* @version 3.15.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}
|