billboard.js 3.9.0-next.1 → 3.9.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 +121 -30
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +121 -30
- 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 +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.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 +149 -57
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -3
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -3
- package/package.json +6 -6
- package/src/ChartInternal/ChartInternal.ts +9 -3
- package/src/ChartInternal/data/IData.ts +5 -0
- package/src/ChartInternal/data/data.ts +21 -8
- package/src/ChartInternal/internals/legend.ts +50 -34
- package/src/ChartInternal/shape/bar.ts +7 -3
- package/src/ChartInternal/shape/bubble.ts +0 -1
- package/src/ChartInternal/shape/point.ts +2 -0
- package/src/config/Options/common/legend.ts +37 -6
- package/src/config/Options/common/point.ts +30 -2
- package/src/config/Options/shape/bar.ts +7 -1
- package/types/options.d.ts +32 -2
- package/types/options.shape.d.ts +9 -4
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.9.0
|
|
8
|
+
* @version 3.9.0
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -3190,17 +3190,34 @@ var data_this = undefined;
|
|
|
3190
3190
|
* - defines the max step the legend has (e.g. If 2 set and legend has 3 legend item, the legend 2 columns).
|
|
3191
3191
|
* @property {boolean} [legend.equally=false] Set to all items have same width size.
|
|
3192
3192
|
* @property {number} [legend.padding=0] Set padding value
|
|
3193
|
+
* @property {boolean} [legend.item.interaction=true] Set legend item interaction.
|
|
3194
|
+
* - **NOTE:**
|
|
3195
|
+
* - This setting will not have effect on `.toggle()` method.
|
|
3196
|
+
* - `legend.item.onXXX` listener options will work if set, regardless of this option value.
|
|
3197
|
+
* @property {boolean} [legend.item.interaction.dblclick=false] Set legend item to interact on double click.
|
|
3198
|
+
* - **NOTE:**
|
|
3199
|
+
* - Double clicking will make focused clicked dataseries only, hiding all others.
|
|
3200
|
+
* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
|
|
3201
|
+
* - To return initial state(which all dataseries are showing), double click current focused legend item again.
|
|
3202
|
+
* - for single click case, `click + altKey(Win)/optionKey(Mac OS)` to have same effect.
|
|
3203
|
+
* - In this case, default `click` interaction will be disabled.
|
|
3193
3204
|
* @property {Function} [legend.item.onclick=undefined] Set click event handler to the legend item.
|
|
3205
|
+
* - **NOTE:**
|
|
3206
|
+
* - When set, default `click` interaction will be disabled.
|
|
3207
|
+
* - When `interaction.dblclick=true` is set, will be called on double click.
|
|
3194
3208
|
* @property {Function} [legend.item.onover=undefined] Set mouse/touch over event handler to the legend item.
|
|
3209
|
+
* - **NOTE:** When set, default `mouseover` interaction will be disabled.
|
|
3195
3210
|
* @property {Function} [legend.item.onout=undefined] Set mouse/touch out event handler to the legend item.
|
|
3211
|
+
* - **NOTE:** When set, default `mouseout` interaction will be disabled.
|
|
3196
3212
|
* @property {number} [legend.item.tile.width=10] Set width for 'rectangle' legend item tile element.
|
|
3197
|
-
* @property {number} [legend.item.tile.height=10]
|
|
3213
|
+
* @property {number} [legend.item.tile.height=10] Set height for 'rectangle' legend item tile element.
|
|
3198
3214
|
* @property {number} [legend.item.tile.r=5] Set the radius for 'circle' legend item tile type.
|
|
3199
3215
|
* @property {string} [legend.item.tile.type="rectangle"] Set legend item shape type.<br>
|
|
3200
3216
|
* - **Available Values:**
|
|
3201
3217
|
* - circle
|
|
3202
3218
|
* - rectangle
|
|
3203
3219
|
* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
|
|
3220
|
+
* @see [Demo: item.interaction](https://naver.github.io/billboard.js/demo/#Legend.LegendItemInteraction)
|
|
3204
3221
|
* @see [Demo: item.tile.type](https://naver.github.io/billboard.js/demo/#Legend.LegendItemTileType)
|
|
3205
3222
|
* @see [Demo: position](https://naver.github.io/billboard.js/demo/#Legend.LegendPosition)
|
|
3206
3223
|
* @see [Demo: contents.template](https://naver.github.io/billboard.js/demo/#Legend.LegendTemplate1)
|
|
@@ -3235,6 +3252,16 @@ var data_this = undefined;
|
|
|
3235
3252
|
* equally: false,
|
|
3236
3253
|
* padding: 10,
|
|
3237
3254
|
* item: {
|
|
3255
|
+
* // will disable default interaction
|
|
3256
|
+
* interaction: false,
|
|
3257
|
+
*
|
|
3258
|
+
* // set legend interact on double click
|
|
3259
|
+
* // by double clicking, will make focused clicked dataseries only, hiding all others.
|
|
3260
|
+
* interaction: {
|
|
3261
|
+
* dblclick: true
|
|
3262
|
+
* }
|
|
3263
|
+
*
|
|
3264
|
+
* // when set below callback, will disable corresponding default interactions
|
|
3238
3265
|
* onclick: function(id) { ... },
|
|
3239
3266
|
* onover: function(id) { ... },
|
|
3240
3267
|
* onout: function(id) { ... },
|
|
@@ -3255,24 +3282,26 @@ var data_this = undefined;
|
|
|
3255
3282
|
* usePoint: true
|
|
3256
3283
|
* }
|
|
3257
3284
|
*/
|
|
3258
|
-
legend_show: !0,
|
|
3259
|
-
legend_hide: !1,
|
|
3260
3285
|
legend_contents_bindto: undefined,
|
|
3261
3286
|
legend_contents_template: "<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
|
|
3262
|
-
|
|
3287
|
+
legend_equally: !1,
|
|
3288
|
+
legend_hide: !1,
|
|
3263
3289
|
legend_inset_anchor: "top-left",
|
|
3264
3290
|
legend_inset_x: 10,
|
|
3265
3291
|
legend_inset_y: 0,
|
|
3266
3292
|
legend_inset_step: undefined,
|
|
3293
|
+
legend_item_interaction: !0,
|
|
3294
|
+
legend_item_dblclick: !1,
|
|
3267
3295
|
legend_item_onclick: undefined,
|
|
3268
3296
|
legend_item_onover: undefined,
|
|
3269
3297
|
legend_item_onout: undefined,
|
|
3270
|
-
legend_equally: !1,
|
|
3271
|
-
legend_padding: 0,
|
|
3272
3298
|
legend_item_tile_width: 10,
|
|
3273
3299
|
legend_item_tile_height: 10,
|
|
3274
3300
|
legend_item_tile_r: 5,
|
|
3275
3301
|
legend_item_tile_type: "rectangle",
|
|
3302
|
+
legend_padding: 0,
|
|
3303
|
+
legend_position: "bottom",
|
|
3304
|
+
legend_show: !0,
|
|
3276
3305
|
legend_usePoint: !1
|
|
3277
3306
|
});
|
|
3278
3307
|
;// CONCATENATED MODULE: ./src/config/Options/common/title.ts
|
|
@@ -5088,7 +5117,17 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
5088
5117
|
_newArrowCheck(this, _this36);
|
|
5089
5118
|
return v && isValue(v.value);
|
|
5090
5119
|
}.bind(this)),
|
|
5091
|
-
|
|
5120
|
+
getSensitivity = function (d) {
|
|
5121
|
+
_newArrowCheck(this, _this36);
|
|
5122
|
+
var sensitivity = config.point_sensitivity;
|
|
5123
|
+
if (isFunction(sensitivity)) {
|
|
5124
|
+
sensitivity = sensitivity.call($$.api, d);
|
|
5125
|
+
} else if (sensitivity === "radius") {
|
|
5126
|
+
sensitivity = d.r;
|
|
5127
|
+
}
|
|
5128
|
+
return sensitivity;
|
|
5129
|
+
}.bind(this),
|
|
5130
|
+
minDist,
|
|
5092
5131
|
closest;
|
|
5093
5132
|
// find mouseovering bar/candlestick
|
|
5094
5133
|
// https://github.com/naver/billboard.js/issues/2434
|
|
@@ -5110,6 +5149,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
5110
5149
|
}.bind(this)).forEach(function (v) {
|
|
5111
5150
|
_newArrowCheck(this, _this36);
|
|
5112
5151
|
var d = $$.dist(v, pos);
|
|
5152
|
+
minDist = getSensitivity(v);
|
|
5113
5153
|
if (d < minDist) {
|
|
5114
5154
|
minDist = d;
|
|
5115
5155
|
closest = v;
|
|
@@ -5121,11 +5161,13 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
5121
5161
|
var $$ = this,
|
|
5122
5162
|
isRotated = $$.config.axis_rotated,
|
|
5123
5163
|
scale = $$.scale,
|
|
5124
|
-
xIndex = isRotated ? 1 : 0,
|
|
5125
|
-
yIndex = isRotated ? 0 : 1,
|
|
5126
5164
|
y = $$.circleY(data, data.index),
|
|
5127
5165
|
x = (scale.zoom || scale.x)(data.x);
|
|
5128
|
-
|
|
5166
|
+
|
|
5167
|
+
// true: 1, false: 0
|
|
5168
|
+
// true: 0, false: 1
|
|
5169
|
+
|
|
5170
|
+
return Math.sqrt(Math.pow(x - pos[+isRotated], 2) + Math.pow(y - pos[+!isRotated], 2));
|
|
5129
5171
|
},
|
|
5130
5172
|
/**
|
|
5131
5173
|
* Convert data for step type
|
|
@@ -7015,7 +7057,8 @@ function getLegendColor(id) {
|
|
|
7015
7057
|
state = $$.state,
|
|
7016
7058
|
isTouch = state.inputType === "touch",
|
|
7017
7059
|
hasGauge = $$.hasType("gauge"),
|
|
7018
|
-
useCssRule = config.boost_useCssRule
|
|
7060
|
+
useCssRule = config.boost_useCssRule,
|
|
7061
|
+
interaction = config.legend_item_interaction;
|
|
7019
7062
|
item.attr("class", function (id) {
|
|
7020
7063
|
var node = (0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this),
|
|
7021
7064
|
itemClass = !node.empty() && node.attr("class") || "";
|
|
@@ -7033,19 +7076,27 @@ function getLegendColor(id) {
|
|
|
7033
7076
|
$$.setCssRule(!1, selector, [props])($el.legend);
|
|
7034
7077
|
}.bind(this));
|
|
7035
7078
|
}
|
|
7036
|
-
item.
|
|
7079
|
+
item.on(interaction.dblclick ? "dblclick" : "click", interaction || isFunction(config.legend_item_onclick) ? function (event, id) {
|
|
7037
7080
|
if (!callFn(config.legend_item_onclick, api, id)) {
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7081
|
+
var altKey = event.altKey,
|
|
7082
|
+
target = event.target,
|
|
7083
|
+
type = event.type;
|
|
7084
|
+
if (type === "dblclick" || altKey) {
|
|
7085
|
+
// when focused legend is clicked(with altKey or double clicked), reset all hiding.
|
|
7086
|
+
if (state.hiddenTargetIds.length && target.parentNode.getAttribute("class").indexOf($LEGEND.legendItemHidden) === -1) {
|
|
7087
|
+
api.show();
|
|
7088
|
+
} else {
|
|
7089
|
+
api.hide();
|
|
7090
|
+
api.show(id);
|
|
7091
|
+
}
|
|
7041
7092
|
} else {
|
|
7042
7093
|
api.toggle(id);
|
|
7043
7094
|
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
|
|
7044
7095
|
}
|
|
7045
7096
|
}
|
|
7046
7097
|
isTouch && $$.hideTooltip();
|
|
7047
|
-
});
|
|
7048
|
-
isTouch || item.on("mouseout", function (event, id) {
|
|
7098
|
+
} : null);
|
|
7099
|
+
isTouch || item.on("mouseout", interaction || isFunction(config.legend_item_onout) ? function (event, id) {
|
|
7049
7100
|
if (!callFn(config.legend_item_onout, api, id)) {
|
|
7050
7101
|
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !1);
|
|
7051
7102
|
if (hasGauge) {
|
|
@@ -7053,7 +7104,7 @@ function getLegendColor(id) {
|
|
|
7053
7104
|
}
|
|
7054
7105
|
$$.api.revert();
|
|
7055
7106
|
}
|
|
7056
|
-
}).on("mouseover", function (event, id) {
|
|
7107
|
+
} : null).on("mouseover", interaction || isFunction(config.legend_item_onover) ? function (event, id) {
|
|
7057
7108
|
if (!callFn(config.legend_item_onover, api, id)) {
|
|
7058
7109
|
(0,external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_.select)(this).classed($FOCUS.legendItemFocused, !0);
|
|
7059
7110
|
if (hasGauge) {
|
|
@@ -7063,7 +7114,10 @@ function getLegendColor(id) {
|
|
|
7063
7114
|
api.focus(id);
|
|
7064
7115
|
}
|
|
7065
7116
|
}
|
|
7066
|
-
});
|
|
7117
|
+
} : null);
|
|
7118
|
+
|
|
7119
|
+
// set cursor when has some interaction
|
|
7120
|
+
!item.empty() && item.on("click mouseout mouseover") && item.style("cursor", $$.getStylePropValue("pointer"));
|
|
7067
7121
|
}
|
|
7068
7122
|
},
|
|
7069
7123
|
/**
|
|
@@ -10656,6 +10710,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10656
10710
|
// Define g for chart area
|
|
10657
10711
|
main.append("g").classed($COMMON.chart, !0).attr("clip-path", hasAxis ? state.clip.path : null);
|
|
10658
10712
|
$$.callPluginHook("$init");
|
|
10713
|
+
$$.initChartElements();
|
|
10659
10714
|
if (hasAxis) {
|
|
10660
10715
|
var _$$$axis;
|
|
10661
10716
|
// Cover whole with rects for events
|
|
@@ -10667,7 +10722,6 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10667
10722
|
// Add Axis here, when clipPath is 'true'
|
|
10668
10723
|
config.clipPath && ((_$$$axis = $$.axis) == null ? void 0 : _$$$axis.init());
|
|
10669
10724
|
}
|
|
10670
|
-
$$.initChartElements();
|
|
10671
10725
|
|
|
10672
10726
|
// Set targets
|
|
10673
10727
|
$$.updateTargets($$.data.targets);
|
|
@@ -10712,7 +10766,11 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
10712
10766
|
hasTreemap = _$$$state.hasTreemap,
|
|
10713
10767
|
types = [];
|
|
10714
10768
|
if (hasAxis) {
|
|
10715
|
-
["bar", "bubble", "candlestick", "line"]
|
|
10769
|
+
var shapes = ["bar", "bubble", "candlestick", "line"];
|
|
10770
|
+
if ($$.config.bar_front) {
|
|
10771
|
+
shapes.push(shapes.shift());
|
|
10772
|
+
}
|
|
10773
|
+
shapes.forEach(function (v) {
|
|
10716
10774
|
_newArrowCheck(this, _this5);
|
|
10717
10775
|
var name = capitalize(v);
|
|
10718
10776
|
if (v === "line" && $$.hasTypeOf(name) || $$.hasType(v)) {
|
|
@@ -19552,9 +19610,9 @@ function getAttrTweenFn(fn) {
|
|
|
19552
19610
|
var $el = this.$el,
|
|
19553
19611
|
config = this.config,
|
|
19554
19612
|
clip = this.state.clip;
|
|
19555
|
-
$el.bar = $el.main.select("." + $COMMON.chart)
|
|
19556
|
-
|
|
19557
|
-
.
|
|
19613
|
+
$el.bar = $el.main.select("." + $COMMON.chart);
|
|
19614
|
+
$el.bar = config.bar_front ? $el.bar.append("g") : $el.bar.insert("g", ":first-child");
|
|
19615
|
+
$el.bar.attr("class", $BAR.chartBars).call(this.setCssRule(!1, "." + $BAR.chartBars, ["pointer-events:none"]));
|
|
19558
19616
|
|
|
19559
19617
|
// set clip-path attribute when condition meet
|
|
19560
19618
|
// https://github.com/naver/billboard.js/issues/2421
|
|
@@ -20153,7 +20211,6 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
20153
20211
|
if ($$.hasType("bubble")) {
|
|
20154
20212
|
config.point_show = !0;
|
|
20155
20213
|
config.point_type = "circle";
|
|
20156
|
-
config.point_sensitivity = 25;
|
|
20157
20214
|
}
|
|
20158
20215
|
},
|
|
20159
20216
|
/**
|
|
@@ -20778,6 +20835,7 @@ var getTransitionName = function () {
|
|
|
20778
20835
|
} else if (isFunction(pointR)) {
|
|
20779
20836
|
r = pointR.bind($$.api)(d);
|
|
20780
20837
|
}
|
|
20838
|
+
d.r = r;
|
|
20781
20839
|
return r;
|
|
20782
20840
|
},
|
|
20783
20841
|
pointExpandedR: function pointExpandedR(d) {
|
|
@@ -21767,6 +21825,7 @@ function convertDataToTreemapData(data) {
|
|
|
21767
21825
|
* Copyright (c) 2017 ~ present NAVER Corp.
|
|
21768
21826
|
* billboard.js project is licensed under the MIT license
|
|
21769
21827
|
*/
|
|
21828
|
+
|
|
21770
21829
|
/**
|
|
21771
21830
|
* point config options
|
|
21772
21831
|
*/
|
|
@@ -21788,7 +21847,20 @@ function convertDataToTreemapData(data) {
|
|
|
21788
21847
|
* - **NOTE:**
|
|
21789
21848
|
* - `null` will make to not set inline 'opacity' css prop.
|
|
21790
21849
|
* - when no value(or undefined) is set, it defaults to set opacity value according its chart types.
|
|
21791
|
-
* @property {number} [point.sensitivity=10] The senstivity value for interaction boundary.
|
|
21850
|
+
* @property {number|string|Function} [point.sensitivity=10] The senstivity value for interaction boundary.
|
|
21851
|
+
* - **Available Values:**
|
|
21852
|
+
* - {number}: Absolute sensitivity value which is the distance from the data point in pixel.
|
|
21853
|
+
* - "radius": sensitivity based on point's radius
|
|
21854
|
+
* - Function: callback for each point to determine the sensitivity<br>
|
|
21855
|
+
* ```js
|
|
21856
|
+
* sensitivity: function(d) {
|
|
21857
|
+
* // ex. of argument d:
|
|
21858
|
+
* // ==> {x: 2, value: 55, id: 'data3', index: 2, r: 19.820624179302296}
|
|
21859
|
+
*
|
|
21860
|
+
* // returning d.r, will make sensitivity same as point's radius value.
|
|
21861
|
+
* return d.r;
|
|
21862
|
+
* }
|
|
21863
|
+
* ```
|
|
21792
21864
|
* @property {number} [point.select.r=point.r*4] The radius size of each point on selected.
|
|
21793
21865
|
* @property {string} [point.type="circle"] The type of point to be drawn
|
|
21794
21866
|
* - **NOTE:**
|
|
@@ -21809,6 +21881,7 @@ function convertDataToTreemapData(data) {
|
|
|
21809
21881
|
* (ex. `<polygon points='2.5 0 0 5 5 5'></polygon>`)
|
|
21810
21882
|
* @see [Demo: point type](https://naver.github.io/billboard.js/demo/#Point.RectanglePoints)
|
|
21811
21883
|
* @see [Demo: point focus only](https://naver.github.io/billboard.js/demo/#Point.FocusOnly)
|
|
21884
|
+
* @see [Demo: point sensitivity](https://naver.github.io/billboard.js/demo/#Point.PointSensitivity)
|
|
21812
21885
|
* @example
|
|
21813
21886
|
* point: {
|
|
21814
21887
|
* show: false,
|
|
@@ -21841,6 +21914,18 @@ function convertDataToTreemapData(data) {
|
|
|
21841
21914
|
* // having lower value, means how closer to be for interaction
|
|
21842
21915
|
* sensitivity: 3,
|
|
21843
21916
|
*
|
|
21917
|
+
* // sensitivity based on point's radius
|
|
21918
|
+
* sensitivity: "radius",
|
|
21919
|
+
*
|
|
21920
|
+
* // callback for each point to determine the sensitivity
|
|
21921
|
+
* sensitivity: function(d) {
|
|
21922
|
+
* // ex. of argument d:
|
|
21923
|
+
* // ==> {x: 2, value: 55, id: 'data3', index: 2, r: 19.820624179302296}
|
|
21924
|
+
*
|
|
21925
|
+
* // returning d.r, will make sensitivity same as point's radius value.
|
|
21926
|
+
* return d.r;
|
|
21927
|
+
* }
|
|
21928
|
+
*
|
|
21844
21929
|
* // valid values are "circle" or "rectangle"
|
|
21845
21930
|
* type: "rectangle",
|
|
21846
21931
|
*
|
|
@@ -21948,6 +22033,7 @@ function convertDataToTreemapData(data) {
|
|
|
21948
22033
|
* @memberof Options
|
|
21949
22034
|
* @type {object}
|
|
21950
22035
|
* @property {object} bar Bar object
|
|
22036
|
+
* @property {boolean} [bar.front=false] Set 'bar' to be positioned over(on the top) other shapes elements.
|
|
21951
22037
|
* @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
|
|
21952
22038
|
* @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
|
|
21953
22039
|
* @property {boolean|object} [bar.linearGradient=false] Set the linear gradient on bar.<br><br>
|
|
@@ -21970,6 +22056,7 @@ function convertDataToTreemapData(data) {
|
|
|
21970
22056
|
* @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
|
|
21971
22057
|
* @property {number} [bar.width.dataname.max] The maximum width value for ratio.
|
|
21972
22058
|
* @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
|
|
22059
|
+
* @see [Demo: bar front](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarFront)
|
|
21973
22060
|
* @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
|
|
21974
22061
|
* @see [Demo: bar overlap](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarOverlap)
|
|
21975
22062
|
* @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
|
|
@@ -21978,6 +22065,9 @@ function convertDataToTreemapData(data) {
|
|
|
21978
22065
|
* @see [Demo: bar width variant](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidthVariant)
|
|
21979
22066
|
* @example
|
|
21980
22067
|
* bar: {
|
|
22068
|
+
* // make bar shape to be positioned over the other shape elements
|
|
22069
|
+
* front: true,
|
|
22070
|
+
*
|
|
21981
22071
|
* // remove nullish data on bar indices postions
|
|
21982
22072
|
* indices: {
|
|
21983
22073
|
* removeNull: true
|
|
@@ -22048,9 +22138,10 @@ function convertDataToTreemapData(data) {
|
|
|
22048
22138
|
* zerobased: false
|
|
22049
22139
|
* }
|
|
22050
22140
|
*/
|
|
22141
|
+
bar_front: !1,
|
|
22142
|
+
bar_indices_removeNull: !1,
|
|
22051
22143
|
bar_label_threshold: 0,
|
|
22052
22144
|
bar_linearGradient: !1,
|
|
22053
|
-
bar_indices_removeNull: !1,
|
|
22054
22145
|
bar_overlap: !1,
|
|
22055
22146
|
bar_padding: 0,
|
|
22056
22147
|
bar_radius: undefined,
|
|
@@ -24993,7 +25084,7 @@ var _defaults = {};
|
|
|
24993
25084
|
|
|
24994
25085
|
/**
|
|
24995
25086
|
* @namespace bb
|
|
24996
|
-
* @version 3.9.0
|
|
25087
|
+
* @version 3.9.0
|
|
24997
25088
|
*/
|
|
24998
25089
|
var bb = {
|
|
24999
25090
|
/**
|
|
@@ -25003,7 +25094,7 @@ var bb = {
|
|
|
25003
25094
|
* bb.version; // "1.0.0"
|
|
25004
25095
|
* @memberof bb
|
|
25005
25096
|
*/
|
|
25006
|
-
version: "3.9.0
|
|
25097
|
+
version: "3.9.0",
|
|
25007
25098
|
/**
|
|
25008
25099
|
* Generate chart
|
|
25009
25100
|
* - **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.9.0
|
|
8
|
+
* @version 3.9.0
|
|
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{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-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}
|