billboard.js 3.5.0-next.2 → 3.5.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 +116 -91
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +124 -96
- 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 +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.js +10 -7
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +10 -7
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +10 -7
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +10 -7
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +10 -7
- 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 +86 -60
- 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 +14 -14
- package/src/ChartInternal/ChartInternal.ts +2 -11
- package/src/ChartInternal/internals/class.ts +1 -1
- package/src/ChartInternal/internals/color.ts +1 -25
- package/src/ChartInternal/internals/legend.ts +21 -6
- package/src/ChartInternal/internals/style.ts +54 -0
- package/src/ChartInternal/internals/text.ts +3 -4
- package/src/ChartInternal/shape/arc.ts +4 -3
- package/src/ChartInternal/shape/bar.ts +6 -5
- package/src/ChartInternal/shape/line.ts +3 -2
- package/src/ChartInternal/shape/point.ts +8 -6
- package/src/config/Store/State.ts +1 -1
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.5.0
|
|
8
|
+
* @version 3.5.0
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - d3-axis ^3.0.0
|
|
@@ -1126,10 +1126,10 @@ var store = __webpack_require__(35);
|
|
|
1126
1126
|
(module.exports = function (key, value) {
|
|
1127
1127
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
1128
1128
|
})('versions', []).push({
|
|
1129
|
-
version: '3.23.
|
|
1129
|
+
version: '3.23.3',
|
|
1130
1130
|
mode: IS_PURE ? 'pure' : 'global',
|
|
1131
1131
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
1132
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.23.
|
|
1132
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE',
|
|
1133
1133
|
source: 'https://github.com/zloirock/core-js'
|
|
1134
1134
|
});
|
|
1135
1135
|
|
|
@@ -1369,8 +1369,10 @@ module.exports = function (O, key, value, options) {
|
|
|
1369
1369
|
if (simple) O[key] = value;
|
|
1370
1370
|
else defineGlobalProperty(key, value);
|
|
1371
1371
|
} else {
|
|
1372
|
-
|
|
1373
|
-
|
|
1372
|
+
try {
|
|
1373
|
+
if (!options.unsafe) delete O[key];
|
|
1374
|
+
else if (O[key]) simple = true;
|
|
1375
|
+
} catch (error) { /* empty */ }
|
|
1374
1376
|
if (simple) O[key] = value;
|
|
1375
1377
|
else definePropertyModule.f(O, key, {
|
|
1376
1378
|
value: value,
|
|
@@ -1412,7 +1414,8 @@ var makeBuiltIn = module.exports = function (value, name, options) {
|
|
|
1412
1414
|
if (options && options.getter) name = 'get ' + name;
|
|
1413
1415
|
if (options && options.setter) name = 'set ' + name;
|
|
1414
1416
|
if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
1415
|
-
defineProperty(value, 'name', { value: name, configurable: true });
|
|
1417
|
+
if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
|
|
1418
|
+
else value.name = name;
|
|
1416
1419
|
}
|
|
1417
1420
|
if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
|
|
1418
1421
|
defineProperty(value, 'length', { value: options.arity });
|
|
@@ -23429,7 +23432,7 @@ var State = function () {
|
|
|
23429
23432
|
hasAxis: !1,
|
|
23430
23433
|
hasRadar: !1,
|
|
23431
23434
|
// for data CSS rule index (used when boost.useCssRule is true)
|
|
23432
|
-
|
|
23435
|
+
cssRule: {},
|
|
23433
23436
|
current: {
|
|
23434
23437
|
// chart whole dimension
|
|
23435
23438
|
width: 0,
|
|
@@ -28847,48 +28850,8 @@ function getColorFromCss(element) {
|
|
|
28847
28850
|
|
|
28848
28851
|
var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"];
|
|
28849
28852
|
/* harmony default export */ var internals_color = ({
|
|
28850
|
-
/**
|
|
28851
|
-
* Add props color css rule to given selector
|
|
28852
|
-
* @param {Function} fn Color function
|
|
28853
|
-
* @param {string} selector CSS selector
|
|
28854
|
-
* @param {Array} props CSS props list
|
|
28855
|
-
* @returns {Function}
|
|
28856
|
-
* @private
|
|
28857
|
-
*/
|
|
28858
|
-
setColorByRule: function setColorByRule(fn, selector, props) {
|
|
28859
|
-
var _this3 = this,
|
|
28860
|
-
$$ = this,
|
|
28861
|
-
config = $$.config,
|
|
28862
|
-
_$$$state = $$.state,
|
|
28863
|
-
colorRule = _$$$state.colorRule,
|
|
28864
|
-
style = _$$$state.style,
|
|
28865
|
-
colorFn = fn || $$.color;
|
|
28866
|
-
|
|
28867
|
-
return config.boost_useCssRule ? function (selection) {
|
|
28868
|
-
var _this4 = this;
|
|
28869
|
-
|
|
28870
|
-
_newArrowCheck(this, _this3);
|
|
28871
|
-
|
|
28872
|
-
selection.each(function (d) {
|
|
28873
|
-
var _this5 = this;
|
|
28874
|
-
|
|
28875
|
-
_newArrowCheck(this, _this4);
|
|
28876
|
-
|
|
28877
|
-
var color = colorFn.call($$, d),
|
|
28878
|
-
shapeSelector = "" + $SHAPE.shapes + $$.getTargetSelectorSuffix(d.id) + " ." + selector;
|
|
28879
|
-
shapeSelector in colorRule && style.sheet.deleteRule(colorRule[shapeSelector]);
|
|
28880
|
-
$$.state.colorRule[shapeSelector] = addCssRules(style, shapeSelector, props.map(function (v) {
|
|
28881
|
-
_newArrowCheck(this, _this5);
|
|
28882
|
-
|
|
28883
|
-
return v + ": " + color;
|
|
28884
|
-
}.bind(this)));
|
|
28885
|
-
}.bind(this));
|
|
28886
|
-
}.bind(this) : function () {
|
|
28887
|
-
_newArrowCheck(this, _this3);
|
|
28888
|
-
}.bind(this);
|
|
28889
|
-
},
|
|
28890
28853
|
generateColor: function generateColor() {
|
|
28891
|
-
var
|
|
28854
|
+
var _this3 = this,
|
|
28892
28855
|
$$ = this,
|
|
28893
28856
|
$el = $$.$el,
|
|
28894
28857
|
config = $$.config,
|
|
@@ -28901,7 +28864,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
28901
28864
|
if (isFunction(config.color_tiles)) {
|
|
28902
28865
|
var tiles = config.color_tiles.bind($$.api)(),
|
|
28903
28866
|
colorizedPatterns = pattern.map(function (p, index) {
|
|
28904
|
-
_newArrowCheck(this,
|
|
28867
|
+
_newArrowCheck(this, _this3);
|
|
28905
28868
|
|
|
28906
28869
|
var color = p.replace(/[#\(\)\s,]/g, ""),
|
|
28907
28870
|
id = $$.state.datetimeId + "-pattern-" + color + "-" + index;
|
|
@@ -28909,7 +28872,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
28909
28872
|
}.bind(this)); // Add background color to patterns
|
|
28910
28873
|
|
|
28911
28874
|
pattern = colorizedPatterns.map(function (p) {
|
|
28912
|
-
_newArrowCheck(this,
|
|
28875
|
+
_newArrowCheck(this, _this3);
|
|
28913
28876
|
|
|
28914
28877
|
return "url(#" + p.id + ")";
|
|
28915
28878
|
}.bind(this));
|
|
@@ -28968,7 +28931,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
28968
28931
|
* @private
|
|
28969
28932
|
*/
|
|
28970
28933
|
generateDataLabelBackgroundColorFilter: function generateDataLabelBackgroundColorFilter(color) {
|
|
28971
|
-
var
|
|
28934
|
+
var _this4 = this,
|
|
28972
28935
|
$$ = this,
|
|
28973
28936
|
$el = $$.$el,
|
|
28974
28937
|
config = $$.config,
|
|
@@ -28985,7 +28948,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
28985
28948
|
}
|
|
28986
28949
|
|
|
28987
28950
|
ids.forEach(function (v) {
|
|
28988
|
-
_newArrowCheck(this,
|
|
28951
|
+
_newArrowCheck(this, _this4);
|
|
28989
28952
|
|
|
28990
28953
|
var id = state.datetimeId + "-labels-bg" + $$.getTargetSelectorSuffix(v) + (color ? $$.getTargetSelectorSuffix(color) : "");
|
|
28991
28954
|
$el.defs.append("filter").attr("x", "0").attr("y", "0").attr("width", "1").attr("height", "1").attr("id", id).html("<feFlood flood-color=\"" + (v === "" ? backgroundColors : backgroundColors[v]) + "\" /><feComposite in=\"SourceGraphic\"/>");
|
|
@@ -29001,7 +28964,7 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
29001
28964
|
* @private
|
|
29002
28965
|
*/
|
|
29003
28966
|
setOverColor: function setOverColor(isOver, d) {
|
|
29004
|
-
var
|
|
28967
|
+
var _this5 = this,
|
|
29005
28968
|
$$ = this,
|
|
29006
28969
|
config = $$.config,
|
|
29007
28970
|
main = $$.$el.main,
|
|
@@ -29012,13 +28975,13 @@ var schemeCategory10 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "
|
|
|
29012
28975
|
color = function (_ref) {
|
|
29013
28976
|
var id = _ref.id;
|
|
29014
28977
|
|
|
29015
|
-
_newArrowCheck(this,
|
|
28978
|
+
_newArrowCheck(this, _this5);
|
|
29016
28979
|
|
|
29017
28980
|
return id in onover ? onover[id] : $$.color(id);
|
|
29018
28981
|
}.bind(this);
|
|
29019
28982
|
} else if (isString(color)) {
|
|
29020
28983
|
color = function () {
|
|
29021
|
-
_newArrowCheck(this,
|
|
28984
|
+
_newArrowCheck(this, _this5);
|
|
29022
28985
|
|
|
29023
28986
|
return onover;
|
|
29024
28987
|
}.bind(this);
|
|
@@ -29924,11 +29887,13 @@ function getFormat($$, typeValue, v) {
|
|
|
29924
29887
|
setLegendItem: function setLegendItem(item) {
|
|
29925
29888
|
var _this3 = this,
|
|
29926
29889
|
$$ = this,
|
|
29890
|
+
$el = $$.$el,
|
|
29927
29891
|
api = $$.api,
|
|
29928
29892
|
config = $$.config,
|
|
29929
29893
|
state = $$.state,
|
|
29930
29894
|
isTouch = state.inputType === "touch",
|
|
29931
|
-
hasGauge = $$.hasType("gauge")
|
|
29895
|
+
hasGauge = $$.hasType("gauge"),
|
|
29896
|
+
useCssRule = config.boost_useCssRule;
|
|
29932
29897
|
|
|
29933
29898
|
item.attr("class", function (id) {
|
|
29934
29899
|
var node = src_select(this),
|
|
@@ -29941,7 +29906,17 @@ function getFormat($$, typeValue, v) {
|
|
|
29941
29906
|
}.bind(this));
|
|
29942
29907
|
|
|
29943
29908
|
if (config.interaction_enabled) {
|
|
29944
|
-
|
|
29909
|
+
if (useCssRule) {
|
|
29910
|
+
[["." + $LEGEND.legendItem, "cursor:pointer"], ["." + $LEGEND.legendItem + " text", "pointer-events:none"], ["." + $LEGEND.legendItemPoint + " text", "pointer-events:none"], ["." + $LEGEND.legendItemTile, "pointer-events:none"], ["." + $LEGEND.legendItemEvent, "fill-opacity:0"]].forEach(function (v) {
|
|
29911
|
+
_newArrowCheck(this, _this3);
|
|
29912
|
+
|
|
29913
|
+
var selector = v[0],
|
|
29914
|
+
props = v[1];
|
|
29915
|
+
$$.setCssRule(!1, selector, [props])($el.legend);
|
|
29916
|
+
}.bind(this));
|
|
29917
|
+
}
|
|
29918
|
+
|
|
29919
|
+
item.style("cursor", $$.getStylePropValue("pointer")).on("click", function (event, id) {
|
|
29945
29920
|
if (!callFn(config.legend_item_onclick, api, id)) {
|
|
29946
29921
|
if (event.altKey) {
|
|
29947
29922
|
api.hide();
|
|
@@ -30184,8 +30159,8 @@ function getFormat($$, typeValue, v) {
|
|
|
30184
30159
|
return isDefined(config.data_names[id]) ? config.data_names[id] : id;
|
|
30185
30160
|
}.bind(this)).each(function (id, i) {
|
|
30186
30161
|
updatePositions(this, id, i);
|
|
30187
|
-
}).style("pointer-events", "none").attr("x", isLegendRightOrInset ? xForLegendText : pos).attr("y", isLegendRightOrInset ? pos : yForLegendText);
|
|
30188
|
-
l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", "0").attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
|
|
30162
|
+
}).style("pointer-events", $$.getStylePropValue("none")).attr("x", isLegendRightOrInset ? xForLegendText : pos).attr("y", isLegendRightOrInset ? pos : yForLegendText);
|
|
30163
|
+
l.append("rect").attr("class", $LEGEND.legendItemEvent).style("fill-opacity", $$.getStylePropValue("0")).attr("x", isLegendRightOrInset ? xForLegendRect : pos).attr("y", isLegendRightOrInset ? pos : yForLegendRect);
|
|
30189
30164
|
|
|
30190
30165
|
var getColor = function (id) {
|
|
30191
30166
|
_newArrowCheck(this, _this4);
|
|
@@ -30209,7 +30184,7 @@ function getFormat($$, typeValue, v) {
|
|
|
30209
30184
|
}
|
|
30210
30185
|
|
|
30211
30186
|
return browser_doc.createElementNS(namespaces.svg, "hasValidPointType" in $$ && $$.hasValidPointType(point) ? point : "use");
|
|
30212
|
-
}.bind(this)).attr("class", $LEGEND.legendItemPoint).style("fill", getColor).style("pointer-events", "none").attr("href", function (data, idx, selection) {
|
|
30187
|
+
}.bind(this)).attr("class", $LEGEND.legendItemPoint).style("fill", getColor).style("pointer-events", $$.getStylePropValue("none")).attr("href", function (data, idx, selection) {
|
|
30213
30188
|
_newArrowCheck(this, _this4);
|
|
30214
30189
|
|
|
30215
30190
|
var node = selection[idx],
|
|
@@ -30218,7 +30193,7 @@ function getFormat($$, typeValue, v) {
|
|
|
30218
30193
|
return nodeName === "use" ? "#" + state.datetimeId + "-point" + id : undefined;
|
|
30219
30194
|
}.bind(this));
|
|
30220
30195
|
} else {
|
|
30221
|
-
l.append("line").attr("class", $LEGEND.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);
|
|
30196
|
+
l.append("line").attr("class", $LEGEND.legendItemTile).style("stroke", getColor).style("pointer-events", $$.getStylePropValue("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);
|
|
30222
30197
|
} // Set background for inset legend
|
|
30223
30198
|
|
|
30224
30199
|
|
|
@@ -34198,6 +34173,68 @@ function stepAfter(context) {
|
|
|
34198
34173
|
}
|
|
34199
34174
|
}
|
|
34200
34175
|
});
|
|
34176
|
+
;// CONCATENATED MODULE: ./src/ChartInternal/internals/style.ts
|
|
34177
|
+
|
|
34178
|
+
|
|
34179
|
+
/**
|
|
34180
|
+
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
34181
|
+
* billboard.js project is licensed under the MIT license
|
|
34182
|
+
*/
|
|
34183
|
+
|
|
34184
|
+
|
|
34185
|
+
/* harmony default export */ var internals_style = ({
|
|
34186
|
+
/**
|
|
34187
|
+
* Add props color css rule to given selector
|
|
34188
|
+
* @param {boolean} withShape Set shpes' prefix class
|
|
34189
|
+
* @param {string} selector CSS selector
|
|
34190
|
+
* @param {Array} props CSS props list
|
|
34191
|
+
* @param {Function} propsFn Function to retrieve value or determine for props
|
|
34192
|
+
* @returns {Function}
|
|
34193
|
+
* @private
|
|
34194
|
+
*/
|
|
34195
|
+
setCssRule: function setCssRule(withShape, selector, props, propsFn) {
|
|
34196
|
+
var _this = this,
|
|
34197
|
+
$$ = this,
|
|
34198
|
+
config = $$.config,
|
|
34199
|
+
_$$$state = $$.state,
|
|
34200
|
+
cssRule = _$$$state.cssRule,
|
|
34201
|
+
style = _$$$state.style;
|
|
34202
|
+
|
|
34203
|
+
return config.boost_useCssRule ? function (selection) {
|
|
34204
|
+
var _this2 = this;
|
|
34205
|
+
|
|
34206
|
+
_newArrowCheck(this, _this);
|
|
34207
|
+
|
|
34208
|
+
selection.each(function (d) {
|
|
34209
|
+
var _this3 = this;
|
|
34210
|
+
|
|
34211
|
+
_newArrowCheck(this, _this2);
|
|
34212
|
+
|
|
34213
|
+
var res = propsFn && (propsFn == null ? void 0 : propsFn.call($$, d)),
|
|
34214
|
+
shapeSelector = "" + (withShape ? "." + ($SHAPE.shapes + $$.getTargetSelectorSuffix(d.id)) : "") + selector;
|
|
34215
|
+
selector in cssRule && style.sheet.deleteRule(cssRule[shapeSelector]);
|
|
34216
|
+
$$.state.cssRule[shapeSelector] = addCssRules(style, shapeSelector, props.filter(Boolean).map(function (v) {
|
|
34217
|
+
_newArrowCheck(this, _this3);
|
|
34218
|
+
|
|
34219
|
+
return isString(res) && v.indexOf(":") === -1 ? v + ": " + res : v || "";
|
|
34220
|
+
}.bind(this)));
|
|
34221
|
+
}.bind(this));
|
|
34222
|
+
}.bind(this) : function () {
|
|
34223
|
+
_newArrowCheck(this, _this);
|
|
34224
|
+
}.bind(this);
|
|
34225
|
+
},
|
|
34226
|
+
|
|
34227
|
+
/**
|
|
34228
|
+
* Get style prop value
|
|
34229
|
+
* @param {Function|string} v Value
|
|
34230
|
+
* @returns {string|null}
|
|
34231
|
+
* @private
|
|
34232
|
+
*/
|
|
34233
|
+
getStylePropValue: function getStylePropValue(v) {
|
|
34234
|
+
var useCssRule = this.config.boost_useCssRule;
|
|
34235
|
+
return useCssRule ? null : isFunction(v) ? v.bind(this) : v;
|
|
34236
|
+
}
|
|
34237
|
+
});
|
|
34201
34238
|
;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selectAll.js
|
|
34202
34239
|
|
|
34203
34240
|
|
|
@@ -34322,7 +34359,7 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
|
|
|
34322
34359
|
|
|
34323
34360
|
return classChartText(d) + classFocus(d);
|
|
34324
34361
|
}.bind(this)),
|
|
34325
|
-
mainTextEnter = mainTextUpdate.enter().append("g").style("opacity", "0").attr("class", classChartText).call($$.
|
|
34362
|
+
mainTextEnter = mainTextUpdate.enter().append("g").style("opacity", "0").attr("class", classChartText).call($$.setCssRule(!0, " ." + $TEXT.text, ["fill", "pointer-events:none"], $$.updateTextColor));
|
|
34326
34363
|
|
|
34327
34364
|
mainTextEnter.append("g").attr("class", classTexts);
|
|
34328
34365
|
},
|
|
@@ -34353,7 +34390,7 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
|
|
|
34353
34390
|
}
|
|
34354
34391
|
|
|
34355
34392
|
return config.axis_rotated ? isEndAnchor ? "end" : "start" : "middle";
|
|
34356
|
-
}.bind(this)).style("fill", $$.
|
|
34393
|
+
}.bind(this)).style("fill", $$.getStylePropValue($$.updateTextColor)).style("fill-opacity", "0").each(function (d, i, texts) {
|
|
34357
34394
|
var node = src_select(this),
|
|
34358
34395
|
value = d.value;
|
|
34359
34396
|
|
|
@@ -34450,7 +34487,7 @@ function setRotatePos(d, pos, anchor, isRotated, isInverted) {
|
|
|
34450
34487
|
angle = config.data_labels.rotate,
|
|
34451
34488
|
anchorString = getRotateAnchor(angle),
|
|
34452
34489
|
rotateString = angle ? "rotate(" + angle + ")" : "";
|
|
34453
|
-
$$.$el.text.style("fill", $$.
|
|
34490
|
+
$$.$el.text.style("fill", $$.getStylePropValue($$.updateTextColor)).attr("filter", $$.updateTextBacgroundColor.bind($$)).style("fill-opacity", forFlow ? 0 : $$.opacityForText.bind($$)).each(function (d, i) {
|
|
34454
34491
|
// do not apply transition for newly added text elements
|
|
34455
34492
|
var node = $T(this, !!(withTransition && this.getAttribute("x")), t),
|
|
34456
34493
|
isInverted = config["axis_" + (axis == null ? void 0 : axis.getId(d.id)) + "_inverted"],
|
|
@@ -35823,6 +35860,7 @@ function getTextPos(pos, width) {
|
|
|
35823
35860
|
|
|
35824
35861
|
|
|
35825
35862
|
|
|
35863
|
+
|
|
35826
35864
|
/**
|
|
35827
35865
|
* Internal chart class.
|
|
35828
35866
|
* - Note: Instantiated internally, not exposed for public.
|
|
@@ -36044,22 +36082,11 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
36044
36082
|
config = $$.config,
|
|
36045
36083
|
format = $$.format,
|
|
36046
36084
|
state = $$.state,
|
|
36047
|
-
isRotated = config.axis_rotated
|
|
36048
|
-
useCssRule = config.boost_useCssRule;
|
|
36085
|
+
isRotated = config.axis_rotated;
|
|
36049
36086
|
|
|
36050
36087
|
// color settings
|
|
36051
36088
|
$$.color = $$.generateColor();
|
|
36052
|
-
$$.
|
|
36053
|
-
$$.colorTextByRule = $$.updateTextColor.bind($$);
|
|
36054
|
-
$$.levelColor = $$.generateLevelColor();
|
|
36055
|
-
|
|
36056
|
-
if (useCssRule) {
|
|
36057
|
-
state.colorRule = {}; // to not apply inline color setting
|
|
36058
|
-
|
|
36059
|
-
$$.colorByRule = null;
|
|
36060
|
-
$$.colorTextByRule = null;
|
|
36061
|
-
} // when 'padding=false' is set, disable axes and subchart. Because they are useless.
|
|
36062
|
-
|
|
36089
|
+
$$.levelColor = $$.generateLevelColor(); // when 'padding=false' is set, disable axes and subchart. Because they are useless.
|
|
36063
36090
|
|
|
36064
36091
|
if (config.padding === !1) {
|
|
36065
36092
|
config.axis_x_show = !1;
|
|
@@ -36594,7 +36621,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
36594
36621
|
|
|
36595
36622
|
|
|
36596
36623
|
util_extend(ChartInternal.prototype, [// common
|
|
36597
|
-
convert, ChartInternal_data_data, load, category, internals_class, internals_color, domain, interactions_interaction, format, internals_legend, redraw, scale, shape, internals_size, internals_text, internals_title, internals_tooltip, transform, internals_type]);
|
|
36624
|
+
convert, ChartInternal_data_data, load, category, internals_class, internals_color, domain, interactions_interaction, format, internals_legend, redraw, scale, shape, internals_size, internals_style, internals_text, internals_title, internals_tooltip, transform, internals_type]);
|
|
36598
36625
|
;// CONCATENATED MODULE: ./src/config/config.ts
|
|
36599
36626
|
|
|
36600
36627
|
|
|
@@ -45520,10 +45547,10 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
|
|
|
45520
45547
|
|
|
45521
45548
|
return classChartArc(d) + classFocus(d.data);
|
|
45522
45549
|
}.bind(this)),
|
|
45523
|
-
mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc);
|
|
45550
|
+
mainPieEnter = mainPieUpdate.enter().append("g").attr("class", classChartArc).call(this.setCssRule(!1, "." + $ARC.chartArcs + " text", ["pointer-events:none", "text-anchor:middle"]));
|
|
45524
45551
|
|
|
45525
45552
|
mainPieEnter.append("g").attr("class", classArcs).merge(mainPieUpdate);
|
|
45526
|
-
mainPieEnter.append("text").attr("dy", hasGauge && !$$.hasMultiTargets() ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", "middle").style("pointer-events", "none");
|
|
45553
|
+
mainPieEnter.append("text").attr("dy", hasGauge && !$$.hasMultiTargets() ? "-.1em" : ".35em").style("opacity", "0").style("text-anchor", $$.getStylePropValue("middle")).style("pointer-events", $$.getStylePropValue("none"));
|
|
45527
45554
|
$el.text = chartArcs.selectAll("." + $COMMON.target + " text"); // MEMO: can not keep same color..., but not bad to update color in redraw
|
|
45528
45555
|
// mainPieUpdate.exit().remove();
|
|
45529
45556
|
},
|
|
@@ -46245,7 +46272,7 @@ function point_y(p) {
|
|
|
46245
46272
|
config = this.config,
|
|
46246
46273
|
clip = this.state.clip;
|
|
46247
46274
|
$el.bar = $el.main.select("." + $COMMON.chart) // should positioned at the beginning of the shape node to not overlap others
|
|
46248
|
-
.insert("g", ":first-child").attr("class", $BAR.chartBars); // set clip-path attribute when condition meet
|
|
46275
|
+
.insert("g", ":first-child").attr("class", $BAR.chartBars).call(this.setCssRule(!1, "." + $BAR.chartBars, ["pointer-events:none"])); // set clip-path attribute when condition meet
|
|
46249
46276
|
// https://github.com/naver/billboard.js/issues/2421
|
|
46250
46277
|
|
|
46251
46278
|
if (config.clipPath === !1 && (config.bar_radius || config.bar_radius_ratio)) {
|
|
@@ -46282,13 +46309,13 @@ function point_y(p) {
|
|
|
46282
46309
|
|
|
46283
46310
|
return classChartBar(d) + classFocus(d);
|
|
46284
46311
|
}.bind(this)),
|
|
46285
|
-
mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", "none");
|
|
46312
|
+
mainBarEnter = mainBarUpdate.enter().append("g").attr("class", classChartBar).style("opacity", "0").style("pointer-events", $$.getStylePropValue("none"));
|
|
46286
46313
|
// Bars for each data
|
|
46287
46314
|
mainBarEnter.append("g").attr("class", classBars).style("cursor", function (d) {
|
|
46288
46315
|
_newArrowCheck(this, _this);
|
|
46289
46316
|
|
|
46290
46317
|
return isSelectable != null && isSelectable.bind != null && isSelectable.bind($$.api)(d) ? "pointer" : null;
|
|
46291
|
-
}.bind(this)).call($$.
|
|
46318
|
+
}.bind(this)).call($$.setCssRule(!0, " ." + $BAR.bar, ["fill"], $$.color));
|
|
46292
46319
|
},
|
|
46293
46320
|
|
|
46294
46321
|
/**
|
|
@@ -46310,7 +46337,7 @@ function point_y(p) {
|
|
|
46310
46337
|
initialOpacity = $$.initialOpacity.bind($$),
|
|
46311
46338
|
bar = $root.main.selectAll("." + $BAR.bars).selectAll("." + $BAR.bar).data($$.labelishData.bind($$));
|
|
46312
46339
|
$T(bar.exit(), withTransition).style("opacity", "0").remove();
|
|
46313
|
-
$root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.
|
|
46340
|
+
$root.bar = bar.enter().append("path").attr("class", classBar).style("fill", $$.getStylePropValue($$.color)).merge(bar).style("opacity", initialOpacity);
|
|
46314
46341
|
},
|
|
46315
46342
|
|
|
46316
46343
|
/**
|
|
@@ -46335,7 +46362,7 @@ function point_y(p) {
|
|
|
46335
46362
|
_newArrowCheck(this, _this3);
|
|
46336
46363
|
|
|
46337
46364
|
return (isNumber(d.value) || $$.isBarRangeType(d)) && drawFn(d);
|
|
46338
|
-
}.bind(this)).style("fill", $$.
|
|
46365
|
+
}.bind(this)).style("fill", $$.getStylePropValue($$.color)).style("opacity", null)];
|
|
46339
46366
|
},
|
|
46340
46367
|
|
|
46341
46368
|
/**
|
|
@@ -46970,7 +46997,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
46970
46997
|
/* harmony default export */ var line = ({
|
|
46971
46998
|
initLine: function initLine() {
|
|
46972
46999
|
var $el = this.$el;
|
|
46973
|
-
$el.line = $el.main.select("." + $COMMON.chart).append("g").attr("class", $LINE.chartLines);
|
|
47000
|
+
$el.line = $el.main.select("." + $COMMON.chart).append("g").attr("class", $LINE.chartLines).call(this.setCssRule(!1, "." + $LINE.chartLines, ["pointer-events:none"]));
|
|
46974
47001
|
},
|
|
46975
47002
|
updateTargetsForLine: function updateTargetsForLine(t) {
|
|
46976
47003
|
var _this = this,
|
|
@@ -46997,7 +47024,7 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
46997
47024
|
|
|
46998
47025
|
return classChartLine(d) + classFocus(d);
|
|
46999
47026
|
}.bind(this)),
|
|
47000
|
-
mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", "none");
|
|
47027
|
+
mainLineEnter = mainLineUpdate.enter().append("g").attr("class", classChartLine).style("opacity", "0").style("pointer-events", $$.getStylePropValue("none"));
|
|
47001
47028
|
// Lines for each data
|
|
47002
47029
|
mainLineEnter.append("g").attr("class", classLines); // Areas
|
|
47003
47030
|
|
|
@@ -47400,11 +47427,12 @@ var getTransitionName = function () {
|
|
|
47400
47427
|
|
|
47401
47428
|
return $$.generateClass($SELECT.selectedCircles, d.id);
|
|
47402
47429
|
}.bind(this));
|
|
47403
|
-
enterNode.append("g").attr("class", classCircles).
|
|
47430
|
+
enterNode.append("g").attr("class", classCircles).call(function (selection) {
|
|
47404
47431
|
_newArrowCheck(this, _this2);
|
|
47405
47432
|
|
|
47406
|
-
|
|
47407
|
-
|
|
47433
|
+
$$.setCssRule(!0, "." + $CIRCLE.circles, ["cursor:pointer"], isSelectable)(selection);
|
|
47434
|
+
$$.setCssRule(!0, " ." + $CIRCLE.circle, ["fill", "stroke"], $$.color)(selection);
|
|
47435
|
+
}.bind(this)).style("opacity", function () {
|
|
47408
47436
|
var parent = src_select(this.parentNode); // if the parent node is .bb-chart-circles (bubble, scatter), initialize <g bb-circles> with opacity "0"
|
|
47409
47437
|
|
|
47410
47438
|
return parent.attr("class").indexOf($CIRCLE.chartCircles) > -1 ? "0" : null;
|
|
@@ -47443,8 +47471,8 @@ var getTransitionName = function () {
|
|
|
47443
47471
|
return $$.isLineType(d) && $$.shouldDrawPointsForLine(d) || $$.isBubbleType(d) || $$.isRadarType(d) || $$.isScatterType(d) ? focusOnly ? [d.values[0]] : d.values : [];
|
|
47444
47472
|
}.bind(this));
|
|
47445
47473
|
circles.exit().remove();
|
|
47446
|
-
circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.
|
|
47447
|
-
$root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.
|
|
47474
|
+
circles.enter().filter(Boolean).append($$.point("create", this, $$.pointR.bind($$), $$.getStylePropValue($$.color)));
|
|
47475
|
+
$root.circle = $root.main.selectAll("." + $CIRCLE.circles + " ." + $CIRCLE.circle).style("stroke", $$.getStylePropValue($$.color)).style("opacity", $$.initialOpacityForCircle.bind($$));
|
|
47448
47476
|
}
|
|
47449
47477
|
},
|
|
47450
47478
|
redrawCircle: function redrawCircle(cx, cy, withTransition, flow, isSub) {
|
|
@@ -47463,7 +47491,7 @@ var getTransitionName = function () {
|
|
|
47463
47491
|
return [];
|
|
47464
47492
|
}
|
|
47465
47493
|
|
|
47466
|
-
var fn = $$.point("update", $$, cx, cy, $$.
|
|
47494
|
+
var fn = $$.point("update", $$, cx, cy, $$.getStylePropValue($$.color), withTransition, flow, selectedCircles),
|
|
47467
47495
|
posAttr = $$.isCirclePoint() ? "c" : "",
|
|
47468
47496
|
t = getRandom(),
|
|
47469
47497
|
opacityStyleFn = $$.opacityForCircle.bind($$),
|
|
@@ -47496,7 +47524,7 @@ var getTransitionName = function () {
|
|
|
47496
47524
|
var cx = (hasRadar ? $$.radarCircleX : $$.circleX).bind($$),
|
|
47497
47525
|
cy = (hasRadar ? $$.radarCircleY : $$.circleY).bind($$),
|
|
47498
47526
|
withTransition = toggling || isUndefined(d),
|
|
47499
|
-
fn = $$.point("update", $$, cx, cy, $$.
|
|
47527
|
+
fn = $$.point("update", $$, cx, cy, $$.getStylePropValue($$.color), resizing ? !1 : withTransition);
|
|
47500
47528
|
|
|
47501
47529
|
if (d) {
|
|
47502
47530
|
circle = circle.filter(function (t) {
|
|
@@ -52311,7 +52339,7 @@ var _defaults = {},
|
|
|
52311
52339
|
* bb.version; // "1.0.0"
|
|
52312
52340
|
* @memberof bb
|
|
52313
52341
|
*/
|
|
52314
|
-
version: "3.5.0
|
|
52342
|
+
version: "3.5.0",
|
|
52315
52343
|
|
|
52316
52344
|
/**
|
|
52317
52345
|
* Generate chart
|
|
@@ -52446,7 +52474,7 @@ var _defaults = {},
|
|
|
52446
52474
|
};
|
|
52447
52475
|
/**
|
|
52448
52476
|
* @namespace bb
|
|
52449
|
-
* @version 3.5.0
|
|
52477
|
+
* @version 3.5.0
|
|
52450
52478
|
*/
|
|
52451
52479
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
52452
52480
|
|