billboard.js 3.2.1 → 3.2.2
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 +2 -3
- package/dist/billboard.js +29 -19
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2969 -2381
- package/dist/billboard.pkgd.min.js +2 -2
- 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 +9 -5
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +9 -5
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +9 -5
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +9 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2943 -2365
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2950 -2368
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2951 -2369
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2952 -2370
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2953 -2371
- package/dist/theme/datalab.css +2 -2
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +2 -2
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +2 -2
- package/dist/theme/insight.min.css +2 -2
- package/dist-esm/billboard.js +378 -377
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +6 -6
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +15 -15
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +6 -6
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +4 -4
- package/package.json +37 -38
- package/src/ChartInternal/Axis/Axis.ts +2 -2
- package/src/ChartInternal/internals/legend.ts +2 -1
- package/src/ChartInternal/internals/redraw.ts +2 -2
- package/src/ChartInternal/shape/arc.ts +1 -5
- package/src/ChartInternal/shape/bar.ts +10 -2
- package/src/module/util.ts +3 -5
- package/src/scss/billboard.scss +1 -13
- package/src/scss/theme/datalab.scss +1 -7
- package/src/scss/theme/graph.scss +1 -2
- package/src/scss/theme/insight.scss +1 -2
- package/types/types.d.ts +5 -2
package/dist/billboard.css
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.2.
|
|
8
|
+
* @version 3.2.2
|
|
9
9
|
*/
|
|
10
10
|
/*-- Chart --*/
|
|
11
11
|
.bb svg {
|
|
@@ -113,7 +113,6 @@
|
|
|
113
113
|
.bb-brush .extent {
|
|
114
114
|
fill-opacity: .1; }
|
|
115
115
|
|
|
116
|
-
/*-- Select - Drag --*/
|
|
117
116
|
/*-- Legend --*/
|
|
118
117
|
.bb-legend-item {
|
|
119
118
|
font-size: 12px;
|
|
@@ -177,7 +176,7 @@
|
|
|
177
176
|
dominant-baseline: middle;
|
|
178
177
|
font-size: 1.3em; }
|
|
179
178
|
|
|
180
|
-
.bb-chart-arcs-gauge-title {
|
|
179
|
+
text.bb-chart-arcs-gauge-title {
|
|
181
180
|
dominant-baseline: middle;
|
|
182
181
|
font-size: 2.7em; }
|
|
183
182
|
|
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.2.
|
|
8
|
+
* @version 3.2.2
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -691,9 +691,13 @@ function getPathBox(path) {
|
|
|
691
691
|
|
|
692
692
|
|
|
693
693
|
function getPointer(event, element) {
|
|
694
|
-
var
|
|
695
|
-
|
|
696
|
-
|
|
694
|
+
var _ref,
|
|
695
|
+
touches = event && ((_ref = event.touches || event.sourceEvent && event.sourceEvent.touches) == null ? void 0 : _ref[0]),
|
|
696
|
+
pointer = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.pointer)(touches || event, element);
|
|
697
|
+
|
|
698
|
+
return pointer.map(function (v) {
|
|
699
|
+
return isNaN(v) ? 0 : v;
|
|
700
|
+
});
|
|
697
701
|
}
|
|
698
702
|
/**
|
|
699
703
|
* Return brush selection array
|
|
@@ -6589,8 +6593,9 @@ function getFormat($$, typeValue, v) {
|
|
|
6589
6593
|
return browser_doc.createElementNS(external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
|
|
6590
6594
|
}).attr("class", config_classes.legendItemPoint).style("fill", getColor).style("pointer-events", "none").attr("href", function (data, idx, selection) {
|
|
6591
6595
|
var node = selection[idx],
|
|
6592
|
-
nodeName = node.nodeName.toLowerCase()
|
|
6593
|
-
|
|
6596
|
+
nodeName = node.nodeName.toLowerCase(),
|
|
6597
|
+
id = $$.getTargetSelectorSuffix(data);
|
|
6598
|
+
return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
|
|
6594
6599
|
});
|
|
6595
6600
|
} else {
|
|
6596
6601
|
l.append("line").attr("class", config_classes.legendItemTile).style("stroke", getColor).style("pointer-events", "none").attr("x1", isLegendRightOrInset ? x1ForLegendTile : pos).attr("y1", isLegendRightOrInset ? pos : yForLegendTile).attr("x2", isLegendRightOrInset ? x2ForLegendTile : pos).attr("y2", isLegendRightOrInset ? pos : yForLegendTile).attr("stroke-width", config.legend_item_tile_height);
|
|
@@ -6693,8 +6698,9 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
6693
6698
|
main = $el.main;
|
|
6694
6699
|
state.redrawing = !0;
|
|
6695
6700
|
var targetsToShow = $$.filterTargetsToShow($$.data.targets),
|
|
6696
|
-
|
|
6697
|
-
flow =
|
|
6701
|
+
_options = options,
|
|
6702
|
+
flow = _options.flow,
|
|
6703
|
+
initializing = _options.initializing,
|
|
6698
6704
|
wth = $$.getWithOption(options),
|
|
6699
6705
|
duration = wth.Transition ? config.transition_duration : 0,
|
|
6700
6706
|
durationForExit = wth.TransitionForExit ? duration : 0,
|
|
@@ -6900,6 +6906,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
6900
6906
|
redrawWithoutRescale: function redrawWithoutRescale() {
|
|
6901
6907
|
this.redraw({
|
|
6902
6908
|
withY: !1,
|
|
6909
|
+
withLegend: !0,
|
|
6903
6910
|
withSubchart: !1,
|
|
6904
6911
|
withEventRect: !1,
|
|
6905
6912
|
withTransitionForAxis: !1
|
|
@@ -13395,7 +13402,7 @@ var Axis_Axis = /*#__PURE__*/function () {
|
|
|
13395
13402
|
}
|
|
13396
13403
|
|
|
13397
13404
|
isYAxis || this.updateXAxisTickValues(targetsToShow, axis);
|
|
13398
|
-
var dummy = chart.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "
|
|
13405
|
+
var dummy = chart.append("svg").style("visibility", "hidden").style("position", "fixed").style("top", "0").style("left", "0");
|
|
13399
13406
|
axis.create(dummy);
|
|
13400
13407
|
dummy.selectAll("text").each(function (d, i) {
|
|
13401
13408
|
var currentTextWidth = this.getBoundingClientRect().width;
|
|
@@ -17569,11 +17576,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
17569
17576
|
|
|
17570
17577
|
if (title) {
|
|
17571
17578
|
var text = $$.$el.arcs.append("text").attr("class", config_classes[hasGauge ? "chartArcsGaugeTitle" : "chartArcsTitle"]).style("text-anchor", "middle");
|
|
17572
|
-
|
|
17573
|
-
if (hasGauge) {
|
|
17574
|
-
text.attr("dy", "-0.3em").style("font-size", "27px");
|
|
17575
|
-
}
|
|
17576
|
-
|
|
17579
|
+
hasGauge && text.attr("dy", "-0.3em");
|
|
17577
17580
|
setTextValue(text, title, hasGauge ? undefined : [-.6, 1.35], !0);
|
|
17578
17581
|
}
|
|
17579
17582
|
},
|
|
@@ -18034,9 +18037,16 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18034
18037
|
|
|
18035
18038
|
/* harmony default export */ var bar = ({
|
|
18036
18039
|
initBar: function initBar() {
|
|
18037
|
-
var $el = this.$el
|
|
18040
|
+
var $el = this.$el,
|
|
18041
|
+
config = this.config,
|
|
18042
|
+
clip = this.state.clip;
|
|
18038
18043
|
$el.bar = $el.main.select("." + config_classes.chart) // should positioned at the beginning of the shape node to not overlap others
|
|
18039
|
-
.insert("g", ":first-child").attr("class", config_classes.chartBars);
|
|
18044
|
+
.insert("g", ":first-child").attr("class", config_classes.chartBars); // set clip-path attribute when condition meet
|
|
18045
|
+
// https://github.com/naver/billboard.js/issues/2421
|
|
18046
|
+
|
|
18047
|
+
if (config.clipPath === !1 && (config.bar_radius || config.bar_radius_ratio)) {
|
|
18048
|
+
$el.bar.attr("clip-path", clip.pathXAxis.replace(/#[^)]*/, "#" + clip.id));
|
|
18049
|
+
}
|
|
18040
18050
|
},
|
|
18041
18051
|
updateTargetsForBar: function updateTargetsForBar(targets) {
|
|
18042
18052
|
var $$ = this,
|
|
@@ -18132,7 +18142,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
18132
18142
|
pathRadius = ["", ""],
|
|
18133
18143
|
radius = 0; // switch points if axis is rotated, not applicable for sub chart
|
|
18134
18144
|
|
|
18135
|
-
if (getRadius && !isGrouped) {
|
|
18145
|
+
if (d.value !== 0 && getRadius && !isGrouped) {
|
|
18136
18146
|
var index = isRotated ? indexY : indexX,
|
|
18137
18147
|
barW = points[2][index] - points[0][index];
|
|
18138
18148
|
radius = getRadius(barW);
|
|
@@ -22646,7 +22656,7 @@ var _defaults = {},
|
|
|
22646
22656
|
* bb.version; // "1.0.0"
|
|
22647
22657
|
* @memberof bb
|
|
22648
22658
|
*/
|
|
22649
|
-
version: "3.2.
|
|
22659
|
+
version: "3.2.1",
|
|
22650
22660
|
|
|
22651
22661
|
/**
|
|
22652
22662
|
* Generate chart
|
|
@@ -22780,7 +22790,7 @@ var _defaults = {},
|
|
|
22780
22790
|
};
|
|
22781
22791
|
/**
|
|
22782
22792
|
* @namespace bb
|
|
22783
|
-
* @version 3.2.
|
|
22793
|
+
* @version 3.2.1
|
|
22784
22794
|
*/
|
|
22785
22795
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
22786
22796
|
/**
|
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.2.
|
|
9
|
-
*/.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.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-axis{shape-rendering:crispEdges}.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:grey;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-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.bb-tooltip.value{text-align:right}.bb-area{stroke-width:0;opacity:.2}.bb-chart-arcs-title{dominant-baseline:middle;font-size:1.3em}.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-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{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}
|
|
8
|
+
* @version 3.2.2
|
|
9
|
+
*/.bb svg{-webkit-tap-highlight-color:rgba(0,0,0,0);font:10px sans-serif}.bb line,.bb path{fill:none;stroke:#000}.bb .bb-button,.bb text{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-bars path,.bb-event-rect,.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.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-axis{shape-rendering:crispEdges}.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:grey;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-circles.bb-focused,.bb-target.bb-focused{opacity:1}.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step,.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step{stroke-width:2px}.bb-circles.bb-defocused,.bb-target.bb-defocused{opacity:.3!important}.bb-circles.bb-defocused .text-overlapping,.bb-target.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-brush .extent,.bb-region,.bb-zoom-brush{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{fill:#fff;stroke:#d3d3d3;stroke-width:1;opacity:.75}.bb-title{font:14px sans-serif}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;-webkit-box-shadow:7px 7px 12px -9px #777;-moz-box-shadow:7px 7px 12px -9px #777;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9}.bb-tooltip tr{border:1px solid #ccc}.bb-tooltip th{background-color:#aaa;color:#fff;font-size:14px;padding:2px 5px;text-align:left}.bb-tooltip td{background-color:#fff;border-left:1px dotted #999;font-size:13px;padding:3px 6px}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;height:10px;margin-right:6px;width:10px}.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-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{cursor:default;font-size:1.15em}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;right:10px;top:10px}.bb-button .bb-zoom-reset{background-color:#fff;border:1px solid #ccc;border-radius:5px;cursor:pointer;font-size:11px;padding:5px}
|