billboard.js 3.10.0-next.1 → 3.10.0-next.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 +1 -1
- package/dist/billboard.js +123 -41
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +158 -56
- 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 +4 -4
- 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 +37 -17
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +39 -19
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +37 -17
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +37 -17
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +37 -17
- 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-esm/billboard.js +124 -42
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +4 -4
- 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 +13 -13
- package/src/ChartInternal/interactions/eventrect.ts +3 -3
- package/src/ChartInternal/interactions/interaction.ts +1 -1
- package/src/ChartInternal/internals/clip.ts +1 -2
- package/src/ChartInternal/internals/color.ts +49 -23
- package/src/ChartInternal/internals/redraw.ts +1 -1
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/tooltip.ts +2 -2
- package/src/ChartInternal/shape/point.ts +36 -8
- package/src/ChartInternal/shape/radar.ts +1 -1
- package/src/Plugin/sparkline/index.ts +2 -2
- package/src/config/Options/common/point.ts +41 -0
- package/src/config/Options/shape/area.ts +10 -4
- package/src/config/Options/shape/bar.ts +10 -4
- package/types/options.d.ts +6 -0
- package/types/options.shape.d.ts +26 -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.10.0-next.
|
|
8
|
+
* @version 3.10.0-next.2
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -5739,7 +5739,7 @@ var external_commonjs_d3_drag_commonjs2_d3_drag_amd_d3_drag_root_d3_ = __webpack
|
|
|
5739
5739
|
$$.cache.add(KEY.setOverOut, last);
|
|
5740
5740
|
} else {
|
|
5741
5741
|
if (isOver) {
|
|
5742
|
-
|
|
5742
|
+
$$.isPointFocusOnly() && hasRadar ? $$.showCircleFocus($$.getAllValuesOnIndex(d, !0)) : $$.setExpand(d, null, !0);
|
|
5743
5743
|
}
|
|
5744
5744
|
$$.isMultipleX() || main.selectAll("." + $SHAPE.shape + "-" + d).each(function (d) {
|
|
5745
5745
|
callback(d, this);
|
|
@@ -6170,7 +6170,9 @@ const schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
|
|
|
6170
6170
|
return "url(#" + this.state.datetimeId + "-gradient" + this.getTargetSelectorSuffix(id) + ")";
|
|
6171
6171
|
},
|
|
6172
6172
|
/**
|
|
6173
|
-
* Update linear gradient definition
|
|
6173
|
+
* Update linear/radial gradient definition
|
|
6174
|
+
* - linear: area & bar only
|
|
6175
|
+
* - radial: type which has data points only
|
|
6174
6176
|
* @private
|
|
6175
6177
|
*/
|
|
6176
6178
|
updateLinearGradient: function updateLinearGradient() {
|
|
@@ -6184,22 +6186,45 @@ const schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
|
|
|
6184
6186
|
var _this6 = this;
|
|
6185
6187
|
_newArrowCheck(this, _this5);
|
|
6186
6188
|
const id = datetimeId + "-gradient" + $$.getTargetSelectorSuffix(d.id),
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
if (supportedType && defs.select("#" + id).empty()) {
|
|
6189
|
+
radialGradient = $$.hasPointType() && config.point_radialGradient,
|
|
6190
|
+
supportedType = $$.isAreaType(d) && "area" || $$.isBarType(d) && "bar";
|
|
6191
|
+
if ((radialGradient || supportedType) && defs.select("#" + id).empty()) {
|
|
6190
6192
|
const color = $$.color(d),
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6193
|
+
gradient = {
|
|
6194
|
+
defs: null,
|
|
6195
|
+
stops: []
|
|
6196
|
+
};
|
|
6197
|
+
if (radialGradient) {
|
|
6198
|
+
const _radialGradient = radialGradient,
|
|
6199
|
+
_radialGradient$cx = _radialGradient.cx,
|
|
6200
|
+
cx = _radialGradient$cx === void 0 ? .3 : _radialGradient$cx,
|
|
6201
|
+
_radialGradient$cy = _radialGradient.cy,
|
|
6202
|
+
cy = _radialGradient$cy === void 0 ? .3 : _radialGradient$cy,
|
|
6203
|
+
_radialGradient$r = _radialGradient.r,
|
|
6204
|
+
r = _radialGradient$r === void 0 ? .7 : _radialGradient$r,
|
|
6205
|
+
_radialGradient$stops = _radialGradient.stops,
|
|
6206
|
+
stops = _radialGradient$stops === void 0 ? [[.1, color, 0], [.9, color, 1]] : _radialGradient$stops;
|
|
6207
|
+
gradient.stops = stops;
|
|
6208
|
+
gradient.defs = defs.append("radialGradient").attr("id", "" + id).attr("cx", cx).attr("cy", cy).attr("r", r);
|
|
6209
|
+
} else {
|
|
6210
|
+
const isRotated = config.axis_rotated,
|
|
6211
|
+
_config = config[supportedType + "_linearGradient"],
|
|
6212
|
+
_config$x = _config.x,
|
|
6213
|
+
x = _config$x === void 0 ? isRotated ? [1, 0] : [0, 0] : _config$x,
|
|
6214
|
+
_config$y = _config.y,
|
|
6215
|
+
y = _config$y === void 0 ? isRotated ? [0, 0] : [0, 1] : _config$y,
|
|
6216
|
+
_config$stops = _config.stops,
|
|
6217
|
+
stops = _config$stops === void 0 ? [[0, color, 1], [1, color, 0]] : _config$stops;
|
|
6218
|
+
gradient.stops = stops;
|
|
6219
|
+
gradient.defs = defs.append("linearGradient").attr("id", "" + id).attr("x1", x[0]).attr("x2", x[1]).attr("y1", y[0]).attr("y2", y[1]);
|
|
6220
|
+
}
|
|
6221
|
+
gradient.stops.forEach(function (v) {
|
|
6200
6222
|
_newArrowCheck(this, _this6);
|
|
6201
|
-
const
|
|
6202
|
-
|
|
6223
|
+
const offset = v[0],
|
|
6224
|
+
stopColor = v[1],
|
|
6225
|
+
stopOpacity = v[2],
|
|
6226
|
+
colorValue = isFunction(stopColor) ? stopColor.bind($$.api)(d.id) : stopColor;
|
|
6227
|
+
gradient.defs && gradient.defs.append("stop").attr("offset", offset).attr("stop-color", colorValue || color).attr("stop-opacity", stopOpacity);
|
|
6203
6228
|
}.bind(this));
|
|
6204
6229
|
}
|
|
6205
6230
|
}.bind(this));
|
|
@@ -7727,7 +7752,7 @@ var external_commonjs_d3_transition_commonjs2_d3_transition_amd_d3_transition_ro
|
|
|
7727
7752
|
if (!$$.hasArcType() || hasRadar) {
|
|
7728
7753
|
notEmpty(config.data_labels) && config.data_labels !== !1 && list.push($$.redrawText(xForText, yForText, flow, withTransition));
|
|
7729
7754
|
}
|
|
7730
|
-
if (($$.hasPointType() || hasRadar) &&
|
|
7755
|
+
if (($$.hasPointType() || hasRadar) && !$$.isPointFocusOnly()) {
|
|
7731
7756
|
$$.redrawCircle && list.push($$.redrawCircle(cx, cy, withTransition, flowFn));
|
|
7732
7757
|
}
|
|
7733
7758
|
if (hasTreemap) {
|
|
@@ -9772,7 +9797,7 @@ function getTextXPos(pos, width) {
|
|
|
9772
9797
|
eventRect = _$$$$el.eventRect,
|
|
9773
9798
|
tooltip = _$$$$el.tooltip,
|
|
9774
9799
|
bindto = config.tooltip_contents.bindto,
|
|
9775
|
-
datum = tooltip.datum();
|
|
9800
|
+
datum = tooltip == null ? void 0 : tooltip.datum();
|
|
9776
9801
|
if (!bindto && datum) {
|
|
9777
9802
|
var _config$tooltip_posit, _config$tooltip_posit2;
|
|
9778
9803
|
const _getPointer = getPointer(state.event, eventTarget != null ? eventTarget : eventRect == null ? void 0 : eventRect.node()),
|
|
@@ -9958,7 +9983,8 @@ function getTextXPos(pos, width) {
|
|
|
9958
9983
|
config = $$.config,
|
|
9959
9984
|
tooltip = $$.$el.tooltip;
|
|
9960
9985
|
if (tooltip && tooltip.style("display") !== "none" && (!config.tooltip_doNotHide || force)) {
|
|
9961
|
-
|
|
9986
|
+
var _tooltip$datum$curren;
|
|
9987
|
+
const selectedData = JSON.parse((_tooltip$datum$curren = tooltip.datum().current) != null ? _tooltip$datum$curren : {});
|
|
9962
9988
|
callFn(config.tooltip_onhide, api, selectedData);
|
|
9963
9989
|
|
|
9964
9990
|
// hide tooltip
|
|
@@ -15587,7 +15613,6 @@ let Axis_Axis = /*#__PURE__*/function () {
|
|
|
15587
15613
|
*/
|
|
15588
15614
|
unselectRect: function unselectRect() {
|
|
15589
15615
|
const $$ = this,
|
|
15590
|
-
config = $$.config,
|
|
15591
15616
|
_$$$$el3 = $$.$el,
|
|
15592
15617
|
circle = _$$$$el3.circle,
|
|
15593
15618
|
tooltip = _$$$$el3.tooltip;
|
|
@@ -15597,7 +15622,7 @@ let Axis_Axis = /*#__PURE__*/function () {
|
|
|
15597
15622
|
$$.hideTooltip();
|
|
15598
15623
|
$$._handleLinkedCharts(!1);
|
|
15599
15624
|
}
|
|
15600
|
-
circle &&
|
|
15625
|
+
circle && !$$.isPointFocusOnly() && $$.unexpandCircles();
|
|
15601
15626
|
$$.expandBarTypeShapes(!1);
|
|
15602
15627
|
},
|
|
15603
15628
|
/**
|
|
@@ -15654,7 +15679,7 @@ let Axis_Axis = /*#__PURE__*/function () {
|
|
|
15654
15679
|
|
|
15655
15680
|
// do nothing while dragging/flowing
|
|
15656
15681
|
if (state.dragging || state.flowing || $$.hasArcType() || eventOnSameIdx) {
|
|
15657
|
-
eventOnSameIdx && $$.setTooltipPosition();
|
|
15682
|
+
config.tooltip_show && eventOnSameIdx && $$.setTooltipPosition();
|
|
15658
15683
|
return;
|
|
15659
15684
|
}
|
|
15660
15685
|
if (index !== eventReceiver.currentIdx) {
|
|
@@ -16035,12 +16060,11 @@ var external_commonjs_d3_ease_commonjs2_d3_ease_amd_d3_ease_root_d3_ = __webpack
|
|
|
16035
16060
|
left = Math.max(30, margin.left) - (isRotated ? 0 : 20),
|
|
16036
16061
|
h = (isRotated ? margin.top + height + 10 : margin.bottom) + 20,
|
|
16037
16062
|
x = isRotated ? -(1 + left) : -(left - 1),
|
|
16038
|
-
y = -Math.max(15, margin.bottom),
|
|
16039
16063
|
w = isRotated ? margin.left + 20 : width + 10 + left;
|
|
16040
16064
|
|
|
16041
16065
|
// less than 20 is not enough to show the axis label 'outer' without legend
|
|
16042
16066
|
|
|
16043
|
-
node.attr("x", x).attr("y",
|
|
16067
|
+
node.attr("x", x).attr("y", -2).attr("width", w).attr("height", h);
|
|
16044
16068
|
},
|
|
16045
16069
|
/**
|
|
16046
16070
|
* Set y Axis clipPath dimension
|
|
@@ -20816,7 +20840,7 @@ const getTransitionName = function () {
|
|
|
20816
20840
|
const config = this.config;
|
|
20817
20841
|
let opacity = config.point_opacity;
|
|
20818
20842
|
if (isUndefined(opacity)) {
|
|
20819
|
-
opacity = config.point_show && !
|
|
20843
|
+
opacity = config.point_show && !this.isPointFocusOnly() ? null : "0";
|
|
20820
20844
|
opacity = isValue(this.getBaseValue(d)) ? this.isBubbleType(d) || this.isScatterType(d) ? "0.5" : opacity : "0";
|
|
20821
20845
|
}
|
|
20822
20846
|
return opacity;
|
|
@@ -20890,18 +20914,30 @@ const getTransitionName = function () {
|
|
|
20890
20914
|
config = $$.config,
|
|
20891
20915
|
state = $$.state,
|
|
20892
20916
|
$el = $$.$el,
|
|
20893
|
-
focusOnly =
|
|
20917
|
+
focusOnly = $$.isPointFocusOnly(),
|
|
20894
20918
|
$root = isSub ? $el.subchart : $el;
|
|
20895
20919
|
if (config.point_show && !state.toggling) {
|
|
20920
|
+
config.point_radialGradient && $$.updateLinearGradient();
|
|
20896
20921
|
const circles = $root.main.selectAll("." + $CIRCLE.circles).selectAll("." + $CIRCLE.circle).data(function (d) {
|
|
20897
20922
|
_newArrowCheck(this, _this4);
|
|
20898
20923
|
return $$.isLineType(d) && $$.shouldDrawPointsForLine(d) || $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ? focusOnly ? [d.values[0]] : d.values : [];
|
|
20899
20924
|
}.bind(this));
|
|
20900
20925
|
circles.exit().remove();
|
|
20901
|
-
circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.
|
|
20926
|
+
circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.updateCircleColor.bind($$)));
|
|
20902
20927
|
$root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.getStylePropValue($$.color)).style("opacity", $$.initialOpacityForCircle.bind($$));
|
|
20903
20928
|
}
|
|
20904
20929
|
},
|
|
20930
|
+
/**
|
|
20931
|
+
* Update circle color
|
|
20932
|
+
* @param {object} d Data object
|
|
20933
|
+
* @returns {string} Color string
|
|
20934
|
+
* @private
|
|
20935
|
+
*/
|
|
20936
|
+
updateCircleColor: function updateCircleColor(d) {
|
|
20937
|
+
const $$ = this,
|
|
20938
|
+
fn = $$.getStylePropValue($$.color);
|
|
20939
|
+
return $$.config.point_radialGradient ? $$.getGradienColortUrl(d.id) : fn ? fn(d) : null;
|
|
20940
|
+
},
|
|
20905
20941
|
redrawCircle: function redrawCircle(cx, cy, withTransition, flow, isSub) {
|
|
20906
20942
|
if (isSub === void 0) {
|
|
20907
20943
|
isSub = !1;
|
|
@@ -20915,7 +20951,7 @@ const getTransitionName = function () {
|
|
|
20915
20951
|
if (!$$.config.point_show) {
|
|
20916
20952
|
return [];
|
|
20917
20953
|
}
|
|
20918
|
-
const fn = $$.point("update", $$, cx, cy, $$.
|
|
20954
|
+
const fn = $$.point("update", $$, cx, cy, $$.updateCircleColor.bind($$), withTransition, flow, selectedCircles),
|
|
20919
20955
|
posAttr = $$.isCirclePoint() ? "c" : "",
|
|
20920
20956
|
t = getRandom(),
|
|
20921
20957
|
opacityStyleFn = $$.opacityForCircle.bind($$),
|
|
@@ -20934,7 +20970,6 @@ const getTransitionName = function () {
|
|
|
20934
20970
|
*/
|
|
20935
20971
|
showCircleFocus: function showCircleFocus(d) {
|
|
20936
20972
|
const $$ = this,
|
|
20937
|
-
config = $$.config,
|
|
20938
20973
|
_$$$state = $$.state,
|
|
20939
20974
|
hasRadar = _$$$state.hasRadar,
|
|
20940
20975
|
resizing = _$$$state.resizing,
|
|
@@ -20942,7 +20977,7 @@ const getTransitionName = function () {
|
|
|
20942
20977
|
transiting = _$$$state.transiting,
|
|
20943
20978
|
$el = $$.$el;
|
|
20944
20979
|
let circle = $el.circle;
|
|
20945
|
-
if (transiting === !1 &&
|
|
20980
|
+
if (transiting === !1 && $$.isPointFocusOnly() && circle) {
|
|
20946
20981
|
const cx = (hasRadar ? $$.radarCircleX : $$.circleX).bind($$),
|
|
20947
20982
|
cy = (hasRadar ? $$.radarCircleY : $$.circleY).bind($$),
|
|
20948
20983
|
withTransition = toggling || isUndefined(d),
|
|
@@ -20977,9 +21012,8 @@ const getTransitionName = function () {
|
|
|
20977
21012
|
*/
|
|
20978
21013
|
hideCircleFocus: function hideCircleFocus() {
|
|
20979
21014
|
const $$ = this,
|
|
20980
|
-
config = $$.config,
|
|
20981
21015
|
circle = $$.$el.circle;
|
|
20982
|
-
if (
|
|
21016
|
+
if ($$.isPointFocusOnly() && circle) {
|
|
20983
21017
|
$$.unexpandCircles();
|
|
20984
21018
|
circle.style("visibility", "hidden");
|
|
20985
21019
|
}
|
|
@@ -21062,6 +21096,15 @@ const getTransitionName = function () {
|
|
|
21062
21096
|
selectR = $$.config.point_select_r;
|
|
21063
21097
|
return isFunction(selectR) ? selectR(d) : selectR || $$.pointR(d) * 4;
|
|
21064
21098
|
},
|
|
21099
|
+
/**
|
|
21100
|
+
* Check if point.focus.only option can be applied.
|
|
21101
|
+
* @returns {boolean}
|
|
21102
|
+
* @private
|
|
21103
|
+
*/
|
|
21104
|
+
isPointFocusOnly: function isPointFocusOnly() {
|
|
21105
|
+
const $$ = this;
|
|
21106
|
+
return $$.config.point_focus_only && !$$.hasType("bubble") && !$$.hasType("scatter") && !$$.hasArcType(null, ["radar"]);
|
|
21107
|
+
},
|
|
21065
21108
|
isWithinCircle: function isWithinCircle(node, r) {
|
|
21066
21109
|
const mouse = getPointer(this.state.event, node),
|
|
21067
21110
|
element = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(node),
|
|
@@ -21701,7 +21744,7 @@ const cacheKey = KEY.radarPoints;
|
|
|
21701
21744
|
_$$$$el2 = $$.$el,
|
|
21702
21745
|
radar = _$$$$el2.radar,
|
|
21703
21746
|
svg = _$$$$el2.svg,
|
|
21704
|
-
focusOnly =
|
|
21747
|
+
focusOnly = $$.isPointFocusOnly(),
|
|
21705
21748
|
_state = state,
|
|
21706
21749
|
inputType = _state.inputType,
|
|
21707
21750
|
transiting = _state.transiting;
|
|
@@ -22061,6 +22104,13 @@ function convertDataToTreemapData(data) {
|
|
|
22061
22104
|
* @property {boolean} [point.show=true] Whether to show each point in line.
|
|
22062
22105
|
* @property {number|Function} [point.r=2.5] The radius size of each point.
|
|
22063
22106
|
* - **NOTE:** Disabled for 'bubble' type
|
|
22107
|
+
* @property {boolean|object} [point.radialGradient=false] Set the radial gradient on point.<br><br>
|
|
22108
|
+
* Or customize by giving below object value:
|
|
22109
|
+
* - cx {number}: `cx` value (default: `0.3`)
|
|
22110
|
+
* - cy {number}: `cy` value (default: `0.3`)
|
|
22111
|
+
* - r {number}: `r` value (default: `0.7`)
|
|
22112
|
+
* - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
|
|
22113
|
+
* - (default: `[[0.1, $DATA_COLOR, 1], [0.9, $DATA_COLOR, 0]]`)
|
|
22064
22114
|
* @property {boolean} [point.focus.expand.enabled=true] Whether to expand each point on focus.
|
|
22065
22115
|
* @property {number} [point.focus.expand.r=point.r*1.75] The radius size of each point on focus.
|
|
22066
22116
|
* - **NOTE:** For 'bubble' type, the default is `bubbleSize*1.15`
|
|
@@ -22103,6 +22153,7 @@ function convertDataToTreemapData(data) {
|
|
|
22103
22153
|
* (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)
|
|
22104
22154
|
* @see [Demo: point type](https://naver.github.io/billboard.js/demo/#Point.RectanglePoints)
|
|
22105
22155
|
* @see [Demo: point focus only](https://naver.github.io/billboard.js/demo/#Point.FocusOnly)
|
|
22156
|
+
* @see [Demo: point radialGradient](https://naver.github.io/billboard.js/demo/#Point.RadialGradientPoint)
|
|
22106
22157
|
* @see [Demo: point sensitivity](https://naver.github.io/billboard.js/demo/#Point.PointSensitivity)
|
|
22107
22158
|
* @example
|
|
22108
22159
|
* point: {
|
|
@@ -22115,6 +22166,32 @@ function convertDataToTreemapData(data) {
|
|
|
22115
22166
|
* return r;
|
|
22116
22167
|
* },
|
|
22117
22168
|
*
|
|
22169
|
+
* // will generate follwing radialGradient:
|
|
22170
|
+
* // for more info: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/radialGradient
|
|
22171
|
+
* // <radualGradient cx="0.3" cy="0.3" r="0.7">
|
|
22172
|
+
* // <stop offset="0.1" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
|
|
22173
|
+
* // <stop offset="0.9" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
|
|
22174
|
+
* // </radialrGradient>
|
|
22175
|
+
* radialGradient: true,
|
|
22176
|
+
*
|
|
22177
|
+
* // Or customized gradient
|
|
22178
|
+
* radialGradient: {
|
|
22179
|
+
* cx: 0.3, // cx attributes
|
|
22180
|
+
* cy: 0.5, // cy attributes
|
|
22181
|
+
* r: 0.7, // r attributes
|
|
22182
|
+
* stops: [
|
|
22183
|
+
* // offset, stop-color, stop-opacity
|
|
22184
|
+
* [0, "#7cb5ec", 1],
|
|
22185
|
+
*
|
|
22186
|
+
* // setting 'null' for stop-color, will set its original data color
|
|
22187
|
+
* [0.5, null, 0],
|
|
22188
|
+
*
|
|
22189
|
+
* // setting 'function' for stop-color, will pass data id as argument.
|
|
22190
|
+
* // It should return color string or null value
|
|
22191
|
+
* [1, function(id) { return id === "data1" ? "red" : "blue"; }, 0],
|
|
22192
|
+
* ]
|
|
22193
|
+
* },
|
|
22194
|
+
*
|
|
22118
22195
|
* focus: {
|
|
22119
22196
|
* expand: {
|
|
22120
22197
|
* enabled: true,
|
|
@@ -22161,6 +22238,7 @@ function convertDataToTreemapData(data) {
|
|
|
22161
22238
|
*/
|
|
22162
22239
|
point_show: !0,
|
|
22163
22240
|
point_r: 2.5,
|
|
22241
|
+
point_radialGradient: !1,
|
|
22164
22242
|
point_sensitivity: 10,
|
|
22165
22243
|
point_focus_expand_enabled: !0,
|
|
22166
22244
|
point_focus_expand_r: undefined,
|
|
@@ -22191,9 +22269,10 @@ function convertDataToTreemapData(data) {
|
|
|
22191
22269
|
* @property {boolean} [area.front=true] Set area node to be positioned over line node.
|
|
22192
22270
|
* @property {boolean|object} [area.linearGradient=false] Set the linear gradient on area.<br><br>
|
|
22193
22271
|
* Or customize by giving below object value:
|
|
22194
|
-
* - x {Array}: `x1`, `x2` value
|
|
22195
|
-
* - y {Array}: `y1`, `y2` value
|
|
22272
|
+
* - x {Array}: `x1`, `x2` value (default: `[0, 0]`)
|
|
22273
|
+
* - y {Array}: `y1`, `y2` value (default: `[0, 1]`)
|
|
22196
22274
|
* - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
|
|
22275
|
+
* - (default: `[[0, $DATA_COLOR, 1], [1, $DATA_COLOR, 0]]`)
|
|
22197
22276
|
* @property {boolean} [area.zerobased=true] Set if min or max value will be 0 on area chart.
|
|
22198
22277
|
* @see [MDN's <linearGradient>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient), [<stop>](https://developer.mozilla.org/en-US/docs/Web/SVG/Element/stop)
|
|
22199
22278
|
* @see [Demo](https://naver.github.io/billboard.js/demo/#Chart.AreaChart)
|
|
@@ -22210,6 +22289,7 @@ function convertDataToTreemapData(data) {
|
|
|
22210
22289
|
* front: false,
|
|
22211
22290
|
*
|
|
22212
22291
|
* // will generate follwing linearGradient:
|
|
22292
|
+
* // for more info: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient
|
|
22213
22293
|
* // <linearGradient x1="0" x2="0" y1="0" y2="1">
|
|
22214
22294
|
* // <stop offset="0" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
|
|
22215
22295
|
* // <stop offset="1" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
|
|
@@ -22260,9 +22340,10 @@ function convertDataToTreemapData(data) {
|
|
|
22260
22340
|
* @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
|
|
22261
22341
|
* @property {boolean|object} [bar.linearGradient=false] Set the linear gradient on bar.<br><br>
|
|
22262
22342
|
* Or customize by giving below object value:
|
|
22263
|
-
* - x {Array}: `x1`, `x2` value
|
|
22264
|
-
* - y {Array}: `y1`, `y2` value
|
|
22343
|
+
* - x {Array}: `x1`, `x2` value (default: `[0, 0]`)
|
|
22344
|
+
* - y {Array}: `y1`, `y2` value (default: `[0, 1]`)
|
|
22265
22345
|
* - stops {Array}: Each item should be having `[offset, stop-color, stop-opacity]` values.
|
|
22346
|
+
* - (default: `[[0, $DATA_COLOR, 1], [1, $DATA_COLOR, 0]]`)
|
|
22266
22347
|
* @property {boolean} [bar.overlap=false] Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)
|
|
22267
22348
|
* @property {number} [bar.padding=0] The padding pixel value between each bar.
|
|
22268
22349
|
* @property {number} [bar.radius] Set the radius of bar edge in pixel.
|
|
@@ -22296,6 +22377,7 @@ function convertDataToTreemapData(data) {
|
|
|
22296
22377
|
* },
|
|
22297
22378
|
*
|
|
22298
22379
|
* // will generate follwing linearGradient:
|
|
22380
|
+
* // for more info: https://developer.mozilla.org/en-US/docs/Web/SVG/Element/linearGradient
|
|
22299
22381
|
* // <linearGradient x1="0" x2="0" y1="0" y2="1">
|
|
22300
22382
|
* // <stop offset="0" stop-color="$DATA_COLOR" stop-opacity="1"></stop>
|
|
22301
22383
|
* // <stop offset="1" stop-color="$DATA_COLOR" stop-opacity="0"></stop>
|
|
@@ -24281,7 +24363,7 @@ function selection_objectSpread(e) { for (var r = 1, t; r < arguments.length; r+
|
|
|
24281
24363
|
toggle = $$.getToggle(that, d).bind($$);
|
|
24282
24364
|
let toggledShape;
|
|
24283
24365
|
if (!config.data_selection_multiple) {
|
|
24284
|
-
const focusOnly =
|
|
24366
|
+
const focusOnly = $$.isPointFocusOnly();
|
|
24285
24367
|
let selector = "." + (focusOnly ? $SELECT.selectedCircles : $SHAPE.shapes);
|
|
24286
24368
|
if (config.data_selection_grouped) {
|
|
24287
24369
|
selector += $$.getTargetSelectorSuffix(d.id);
|
|
@@ -25371,7 +25453,7 @@ let _defaults = {};
|
|
|
25371
25453
|
|
|
25372
25454
|
/**
|
|
25373
25455
|
* @namespace bb
|
|
25374
|
-
* @version 3.10.0-next.
|
|
25456
|
+
* @version 3.10.0-next.2
|
|
25375
25457
|
*/
|
|
25376
25458
|
const bb = {
|
|
25377
25459
|
/**
|
|
@@ -25381,7 +25463,7 @@ const bb = {
|
|
|
25381
25463
|
* bb.version; // "1.0.0"
|
|
25382
25464
|
* @memberof bb
|
|
25383
25465
|
*/
|
|
25384
|
-
version: "3.10.0-next.
|
|
25466
|
+
version: "3.10.0-next.2",
|
|
25385
25467
|
/**
|
|
25386
25468
|
* Generate chart
|
|
25387
25469
|
* - **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.10.0-next.
|
|
8
|
+
* @version 3.10.0-next.2
|
|
9
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-legend-item-tile,.bb-xgrid-focus,.bb-ygrid,.bb-ygrid-focus{shape-rendering:crispEdges}.bb-chart-arc .bb-gauge-value,.bb-chart-arcs .bb-needle{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 rect{fill:#4682b4;fill-opacity:.1}.bb-brush .extent,.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-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{user-select:none;z-index:10}.bb-tooltip{background-color:#fff;border-collapse:collapse;border-spacing:0;box-shadow:7px 7px 12px -9px #777;empty-cells:show;opacity:.9;white-space:nowrap}.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-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{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}
|