billboard.js 3.5.1 → 3.6.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/README.md +11 -1
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +87 -35
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +2 -2
- package/dist/billboard.pkgd.js +2343 -2107
- package/dist/billboard.pkgd.min.js +3 -3
- 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 +7 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +7 -3
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +7 -3
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +7 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.js +2258 -2074
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.js +2264 -2076
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.js +2265 -2077
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.js +2266 -2078
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.js +2267 -2079
- 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 +90 -35
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +6 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +6 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +6 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +6 -2
- package/package.json +32 -30
- package/src/Chart/api/chart.ts +11 -3
- package/src/Chart/api/group.ts +1 -1
- package/src/ChartInternal/Axis/AxisRenderer.ts +2 -2
- package/src/ChartInternal/ChartInternal.ts +5 -4
- package/src/ChartInternal/data/convert.ts +1 -1
- package/src/ChartInternal/internals/color.ts +4 -1
- package/src/ChartInternal/internals/grid.ts +0 -1
- package/src/ChartInternal/internals/legend.ts +3 -2
- package/src/ChartInternal/shape/arc.ts +1 -1
- package/src/ChartInternal/shape/bar.ts +2 -1
- package/src/ChartInternal/shape/candlestick.ts +4 -3
- package/src/ChartInternal/shape/line.ts +5 -1
- package/src/ChartInternal/shape/shape.ts +36 -15
- package/src/config/Options/common/grid.ts +2 -2
- package/src/config/Options/common/legend.ts +3 -2
- package/src/config/Options/data/data.ts +18 -0
- package/src/config/Options/shape/bar.ts +6 -0
- package/src/config/Store/State.ts +1 -0
- package/src/config/config.ts +7 -1
- package/types/axis.d.ts +17 -2
- package/types/chart.d.ts +3 -1
- package/types/index.d.ts +1 -0
- package/types/options.d.ts +14 -0
package/README.md
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<img src="https://naver.github.io/billboard.js/img/logo/billboard.js.svg" width="350" alt="billboard.js"><br>
|
|
4
4
|
</picture>
|
|
5
5
|
|
|
6
|
-
[![Latest Version][badge-latest]][link-version] [![Next version][badge-next]][link-version] [![
|
|
6
|
+
[![Latest Version][badge-latest]][link-version] [![Next version][badge-next]][link-version] [![bb][badge-@billboard.js/react]][link-@billboard.js/react]<br>
|
|
7
|
+
[![semantic-release][badge-semantic-release]][link-semantic-release] ![React][badge-react]
|
|
7
8
|
|
|
8
9
|
![CI Status][badge-ci-status] [![Coverage Status][badge-coverage]][link-coverage] [![Known Vulnerabilities][badge-snyk]][link-snyk]
|
|
9
10
|
[![download][badge-download]][link-download] [![jsDelivr][badge-jsDelivr]][link-jsDelivr] [![gzip size][badge-gzip-size]][link-gzip-size]
|
|
@@ -139,6 +140,12 @@ $ npm install billboard.js@next --save
|
|
|
139
140
|
$ npm install billboard.js
|
|
140
141
|
```
|
|
141
142
|
|
|
143
|
+
### Packages
|
|
144
|
+
|
|
145
|
+
Name | For | Description
|
|
146
|
+
:---: | :---:| :---:
|
|
147
|
+
[![bb][badge-@billboard.js/react]][link-@billboard.js/react] | ![React][badge-react] | React component for billboard.js
|
|
148
|
+
|
|
142
149
|
### Using CDN
|
|
143
150
|
|
|
144
151
|
If you want to use 'billboard.js' without installation, load files directly from one of the CDN providers.
|
|
@@ -344,6 +351,8 @@ THE SOFTWARE.
|
|
|
344
351
|
[badge-latest]: https://img.shields.io/npm/v/billboard.js/latest.svg
|
|
345
352
|
[badge-next]: https://img.shields.io/npm/v/billboard.js/next.svg
|
|
346
353
|
[badge-semantic-release]: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
|
|
354
|
+
[badge-react]: https://img.shields.io/badge/React-20232A?style=flat&logo=react&logoColor=fff&labelColor=grey&color=62d9fb
|
|
355
|
+
[badge-@billboard.js/react]: https://img.shields.io/npm/v/@billboard.js/react?style=flat&labelColor=grey&label=%40billboard.js%2Freact
|
|
347
356
|
|
|
348
357
|
<!-- links -->
|
|
349
358
|
[link-download]: https://npm-stat.com/charts.html?package=billboard.js&from=2017-06-08
|
|
@@ -353,5 +362,6 @@ THE SOFTWARE.
|
|
|
353
362
|
[link-snyk]: https://snyk.io/test/github/naver/billboard.js?targetFile=package.json
|
|
354
363
|
[link-gzip-size]: https://unpkg.com/billboard.js/dist/billboard.min.js
|
|
355
364
|
[link-semantic-release]: https://github.com/semantic-release/semantic-release
|
|
365
|
+
[link-@billboard.js/react]: https://www.npmjs.com/package/@billboard.js/react
|
|
356
366
|
|
|
357
367
|
[](https://app.fossa.io/projects/git%2Bgithub.com%2Fnaver%2Fbillboard.js?ref=badge_large)
|
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.
|
|
8
|
+
* @version 3.6.0-next.2
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -1771,6 +1771,8 @@ var State = function () {
|
|
|
1771
1771
|
hasNegativeValue: !1,
|
|
1772
1772
|
hasPositiveValue: !0,
|
|
1773
1773
|
orgAreaOpacity: "0.2",
|
|
1774
|
+
orgConfig: {},
|
|
1775
|
+
// user original genration config
|
|
1774
1776
|
// ID strings
|
|
1775
1777
|
hiddenTargetIds: [],
|
|
1776
1778
|
hiddenLegendIds: [],
|
|
@@ -2529,6 +2531,24 @@ var data_this = undefined;
|
|
|
2529
2531
|
*/
|
|
2530
2532
|
data_groups: [],
|
|
2531
2533
|
|
|
2534
|
+
/**
|
|
2535
|
+
* Set how zero value will be treated on groups.<br>
|
|
2536
|
+
* Possible values:
|
|
2537
|
+
* - `zero`: 0 will be positioned at absolute axis zero point.
|
|
2538
|
+
* - `positive`: 0 will be positioned at the top of a stack.
|
|
2539
|
+
* - `negative`: 0 will be positioned at the bottom of a stack.
|
|
2540
|
+
* @name data․groupsZeroAs
|
|
2541
|
+
* @memberof Options
|
|
2542
|
+
* @type {string}
|
|
2543
|
+
* @default "positive"
|
|
2544
|
+
* @see [Demo](https://naver.github.io/billboard.js/demo/#Data.Groups)
|
|
2545
|
+
* @example
|
|
2546
|
+
* data: {
|
|
2547
|
+
* groupsZeroAs: "zero" // "positive" or "negative"
|
|
2548
|
+
* }
|
|
2549
|
+
*/
|
|
2550
|
+
data_groupsZeroAs: "positive",
|
|
2551
|
+
|
|
2532
2552
|
/**
|
|
2533
2553
|
* Set color converter function.<br><br>
|
|
2534
2554
|
* This option should a function and the specified function receives color (e.g. '#ff0000') and d that has data parameters like id, value, index, etc. And it must return a string that represents color (e.g. '#00ff00').
|
|
@@ -3272,7 +3292,8 @@ var data_this = undefined;
|
|
|
3272
3292
|
* @property {boolean} [legend.hide=false] Hide legend
|
|
3273
3293
|
* If true given, all legend will be hidden. If string or array given, only the legend that has the id will be hidden.
|
|
3274
3294
|
* @property {string|HTMLElement} [legend.contents.bindto=undefined] Set CSS selector or element reference to bind legend items.
|
|
3275
|
-
*
|
|
3295
|
+
* - **NOTE:** Should be used along with `legend.contents.template`.
|
|
3296
|
+
* @property {string|Function} [legend.contents.template="<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>"] Set item's template.<br>
|
|
3276
3297
|
* - If set `string` value, within template the 'color' and 'title' can be replaced using template-like syntax string:
|
|
3277
3298
|
* - {=COLOR}: data color value
|
|
3278
3299
|
* - {=TITLE}: data title value
|
|
@@ -3350,7 +3371,7 @@ var data_this = undefined;
|
|
|
3350
3371
|
legend_show: !0,
|
|
3351
3372
|
legend_hide: !1,
|
|
3352
3373
|
legend_contents_bindto: undefined,
|
|
3353
|
-
legend_contents_template:
|
|
3374
|
+
legend_contents_template: "<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",
|
|
3354
3375
|
legend_position: "bottom",
|
|
3355
3376
|
legend_inset_anchor: "top-left",
|
|
3356
3377
|
legend_inset_x: 10,
|
|
@@ -4496,7 +4517,8 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
4496
4517
|
}.bind(this)); // finish targets
|
|
4497
4518
|
|
|
4498
4519
|
targets.forEach(function (t) {
|
|
4499
|
-
var _this5 = this
|
|
4520
|
+
var _this5 = this,
|
|
4521
|
+
_$$$data$xs$t$id;
|
|
4500
4522
|
|
|
4501
4523
|
_newArrowCheck(this, _this2);
|
|
4502
4524
|
|
|
@@ -4518,7 +4540,7 @@ function getDataKeyForJson(keysParam, config) {
|
|
|
4518
4540
|
return v.index = i;
|
|
4519
4541
|
}.bind(this)); // this needs to be sorted because its index and value.index is identical
|
|
4520
4542
|
|
|
4521
|
-
$$.data.xs[t.id].sort(function (v1, v2) {
|
|
4543
|
+
(_$$$data$xs$t$id = $$.data.xs[t.id]) == null ? void 0 : _$$$data$xs$t$id.sort(function (v1, v2) {
|
|
4522
4544
|
_newArrowCheck(this, _this5);
|
|
4523
4545
|
|
|
4524
4546
|
return v1 - v2;
|
|
@@ -7692,8 +7714,9 @@ function getFormat($$, typeValue, v) {
|
|
|
7692
7714
|
var getColor = function (id) {
|
|
7693
7715
|
_newArrowCheck(this, _this4);
|
|
7694
7716
|
|
|
7695
|
-
var data = $$.getDataById(id)
|
|
7696
|
-
|
|
7717
|
+
var data = $$.getDataById(id),
|
|
7718
|
+
color = $$.levelColor ? $$.levelColor(data.values[0].value) : $$.color(data);
|
|
7719
|
+
return color;
|
|
7697
7720
|
}.bind(this),
|
|
7698
7721
|
usePoint = config.legend_usePoint;
|
|
7699
7722
|
|
|
@@ -8525,6 +8548,7 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8525
8548
|
config = $$.config,
|
|
8526
8549
|
scale = $$.scale,
|
|
8527
8550
|
currScale = isSub ? scale.subX : scale.zoom || scale.x,
|
|
8551
|
+
barOverlap = config.bar_overlap,
|
|
8528
8552
|
barPadding = config.bar_padding,
|
|
8529
8553
|
sum = function (p, c) {
|
|
8530
8554
|
_newArrowCheck(this, _this5);
|
|
@@ -8545,11 +8569,12 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8545
8569
|
var xPos = currScale(d.x, !0);
|
|
8546
8570
|
|
|
8547
8571
|
if (halfWidth) {
|
|
8548
|
-
|
|
8572
|
+
var offsetWidth = offset[d.id] || offset._$width;
|
|
8573
|
+
x = barOverlap ? xPos - offsetWidth / 2 : xPos - offsetWidth + offset._$total.slice(0, index + 1).reduce(sum) - halfWidth;
|
|
8549
8574
|
} else {
|
|
8550
|
-
x = xPos - (isNumber(offset) ? offset : offset._$width) * (targetsNum / 2 - index);
|
|
8575
|
+
x = xPos - (isNumber(offset) ? offset : offset._$width) * (targetsNum / 2 - (barOverlap ? 1 : index));
|
|
8551
8576
|
}
|
|
8552
|
-
} // adjust x position for bar.padding
|
|
8577
|
+
} // adjust x position for bar.padding option
|
|
8553
8578
|
|
|
8554
8579
|
|
|
8555
8580
|
if (offset && x && targetsNum > 1 && barPadding) {
|
|
@@ -8666,7 +8691,8 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8666
8691
|
$$ = this,
|
|
8667
8692
|
_$$$getShapeOffsetDat = $$.getShapeOffsetData(typeFilter),
|
|
8668
8693
|
shapeOffsetTargets = _$$$getShapeOffsetDat.shapeOffsetTargets,
|
|
8669
|
-
indexMapByTargetId = _$$$getShapeOffsetDat.indexMapByTargetId
|
|
8694
|
+
indexMapByTargetId = _$$$getShapeOffsetDat.indexMapByTargetId,
|
|
8695
|
+
groupsZeroAs = $$.config.data_groupsZeroAs;
|
|
8670
8696
|
|
|
8671
8697
|
return function (d, idx) {
|
|
8672
8698
|
var _this10 = this;
|
|
@@ -8684,13 +8710,13 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8684
8710
|
return scale(value[0]);
|
|
8685
8711
|
}
|
|
8686
8712
|
|
|
8687
|
-
var
|
|
8688
|
-
|
|
8713
|
+
var dataXAsNumber = +x,
|
|
8714
|
+
y0 = scale(groupsZeroAs === "zero" ? 0 : $$.getShapeYMin(id)),
|
|
8689
8715
|
offset = y0;
|
|
8690
8716
|
shapeOffsetTargets.filter(function (t) {
|
|
8691
8717
|
_newArrowCheck(this, _this10);
|
|
8692
8718
|
|
|
8693
|
-
return t.id !== id;
|
|
8719
|
+
return t.id !== id && ind[t.id] === ind[id];
|
|
8694
8720
|
}.bind(this)).forEach(function (t) {
|
|
8695
8721
|
_newArrowCheck(this, _this10);
|
|
8696
8722
|
|
|
@@ -8699,8 +8725,9 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8699
8725
|
rowValues = t.rowValues,
|
|
8700
8726
|
tvalues = t.values; // for same stacked group (ind[tid] === ind[id])
|
|
8701
8727
|
|
|
8702
|
-
if (
|
|
8728
|
+
if (indexMapByTargetId[tid] < indexMapByTargetId[id]) {
|
|
8703
8729
|
var _row,
|
|
8730
|
+
rValue = tvalues[dataXAsNumber],
|
|
8704
8731
|
row = rowValues[idx];
|
|
8705
8732
|
|
|
8706
8733
|
// check if the x values line up
|
|
@@ -8708,8 +8735,12 @@ var external_commonjs_d3_shape_commonjs2_d3_shape_amd_d3_shape_root_d3_ = __webp
|
|
|
8708
8735
|
row = rowValueMapByXValue[dataXAsNumber];
|
|
8709
8736
|
}
|
|
8710
8737
|
|
|
8711
|
-
if (((_row = row) == null ? void 0 : _row.value) * value >= 0 && isNumber(
|
|
8712
|
-
|
|
8738
|
+
if (((_row = row) == null ? void 0 : _row.value) * value >= 0 && isNumber(rValue)) {
|
|
8739
|
+
var addOffset = value === 0 ? groupsZeroAs === "positive" && rValue > 0 || groupsZeroAs === "negative" && rValue < 0 : !0;
|
|
8740
|
+
|
|
8741
|
+
if (addOffset) {
|
|
8742
|
+
offset += scale(rValue) - y0;
|
|
8743
|
+
}
|
|
8713
8744
|
}
|
|
8714
8745
|
}
|
|
8715
8746
|
}.bind(this));
|
|
@@ -11283,7 +11314,7 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
11283
11314
|
} // Define g for chart area
|
|
11284
11315
|
|
|
11285
11316
|
|
|
11286
|
-
main.append("g").
|
|
11317
|
+
main.append("g").classed($COMMON.chart, !0).attr("clip-path", hasAxis ? state.clip.path : null);
|
|
11287
11318
|
$$.callPluginHook("$init");
|
|
11288
11319
|
|
|
11289
11320
|
if (hasAxis) {
|
|
@@ -11478,15 +11509,15 @@ var ChartInternal = /*#__PURE__*/function () {
|
|
|
11478
11509
|
|
|
11479
11510
|
$$.updateTargetsForSubchart && $$.updateTargetsForSubchart(targets); // Arc, Polar, Radar
|
|
11480
11511
|
} else if ($$.hasArcType(targets)) {
|
|
11481
|
-
var
|
|
11512
|
+
var type = "Arc";
|
|
11482
11513
|
|
|
11483
11514
|
if (hasRadar) {
|
|
11484
|
-
|
|
11515
|
+
type = "Radar";
|
|
11485
11516
|
} else if ($$.hasType("polar")) {
|
|
11486
|
-
|
|
11517
|
+
type = "Polar";
|
|
11487
11518
|
}
|
|
11488
11519
|
|
|
11489
|
-
helper(
|
|
11520
|
+
helper(type);
|
|
11490
11521
|
} // Point types
|
|
11491
11522
|
|
|
11492
11523
|
|
|
@@ -11689,7 +11720,11 @@ function loadConfig(config) {
|
|
|
11689
11720
|
if (isDefined(read)) {
|
|
11690
11721
|
thisConfig[key] = read;
|
|
11691
11722
|
}
|
|
11692
|
-
}.bind(this));
|
|
11723
|
+
}.bind(this)); // only should run in the ChartInternal context
|
|
11724
|
+
|
|
11725
|
+
if (this.api) {
|
|
11726
|
+
this.state.orgConfig = config;
|
|
11727
|
+
}
|
|
11693
11728
|
}
|
|
11694
11729
|
;// CONCATENATED MODULE: ./src/Chart/api/chart.ts
|
|
11695
11730
|
|
|
@@ -11842,7 +11877,9 @@ function loadConfig(config) {
|
|
|
11842
11877
|
},
|
|
11843
11878
|
|
|
11844
11879
|
/**
|
|
11845
|
-
* Get or set
|
|
11880
|
+
* Get or set config option value.
|
|
11881
|
+
* - **NOTE:** for without parameter occasion
|
|
11882
|
+
* - will return all specified generation options object only. (will exclude any other options not specified at the initialization)
|
|
11846
11883
|
* @function config
|
|
11847
11884
|
* @instance
|
|
11848
11885
|
* @memberof Chart
|
|
@@ -11852,9 +11889,13 @@ function loadConfig(config) {
|
|
|
11852
11889
|
* - **NOTE:** Doesn't guarantee work in all circumstances. It can be applied for limited options only.
|
|
11853
11890
|
* @returns {*}
|
|
11854
11891
|
* @example
|
|
11892
|
+
*
|
|
11855
11893
|
* // Getter
|
|
11856
11894
|
* chart.config("gauge.max");
|
|
11857
11895
|
*
|
|
11896
|
+
* // without any arguments, it returns generation config object
|
|
11897
|
+
* chart.config(); // {data: { ... }, axis: { ... }, ...}
|
|
11898
|
+
*
|
|
11858
11899
|
* // Setter
|
|
11859
11900
|
* chart.config("gauge.max", 100);
|
|
11860
11901
|
*
|
|
@@ -11864,10 +11905,11 @@ function loadConfig(config) {
|
|
|
11864
11905
|
config: function (name, value, redraw) {
|
|
11865
11906
|
var $$ = this.internal,
|
|
11866
11907
|
config = $$.config,
|
|
11908
|
+
state = $$.state,
|
|
11867
11909
|
key = name == null ? void 0 : name.replace(/\./g, "_"),
|
|
11868
11910
|
res;
|
|
11869
11911
|
|
|
11870
|
-
if (key in config) {
|
|
11912
|
+
if (name && key in config) {
|
|
11871
11913
|
if (isDefined(value)) {
|
|
11872
11914
|
config[key] = value;
|
|
11873
11915
|
res = value;
|
|
@@ -11875,6 +11917,8 @@ function loadConfig(config) {
|
|
|
11875
11917
|
} else {
|
|
11876
11918
|
res = config[key];
|
|
11877
11919
|
}
|
|
11920
|
+
} else {
|
|
11921
|
+
res = state.orgConfig;
|
|
11878
11922
|
}
|
|
11879
11923
|
|
|
11880
11924
|
return res;
|
|
@@ -14519,12 +14563,13 @@ var AxisRenderer = /*#__PURE__*/function () {
|
|
|
14519
14563
|
;
|
|
14520
14564
|
|
|
14521
14565
|
_proto.getGeneratedTicks = function getGeneratedTicks(count) {
|
|
14522
|
-
var
|
|
14523
|
-
len = this.generatedTicks.length - 1,
|
|
14524
|
-
res = this.generatedTicks
|
|
14566
|
+
var _this$generatedTicks,
|
|
14567
|
+
len = ((_this$generatedTicks = this.generatedTicks) == null ? void 0 : _this$generatedTicks.length) - 1,
|
|
14568
|
+
res = this.generatedTicks,
|
|
14569
|
+
_this3 = this;
|
|
14525
14570
|
|
|
14526
14571
|
if (len > count) {
|
|
14527
|
-
var interval = Math.round(len / count
|
|
14572
|
+
var interval = Math.round(len / count + .1);
|
|
14528
14573
|
res = this.generatedTicks.map(function (v, i) {
|
|
14529
14574
|
_newArrowCheck(this, _this3);
|
|
14530
14575
|
|
|
@@ -19391,7 +19436,7 @@ function axis_objectSpread(target) { for (var i = 1, source; i < arguments.lengt
|
|
|
19391
19436
|
* @property {boolean} [y.show=false] Show grids along x axis.
|
|
19392
19437
|
* @property {Array} [y.lines=[]] Show additional grid lines along y axis.<br>
|
|
19393
19438
|
* This option accepts array including object that has value, text, position and class.
|
|
19394
|
-
* @property {number} [y.ticks=
|
|
19439
|
+
* @property {number} [y.ticks=undefined] Number of y grids to be shown.
|
|
19395
19440
|
* @property {object} focus Grid focus object
|
|
19396
19441
|
* @property {boolean} [focus.edge=false] Show edged focus grid line.<br>**NOTE:** Available when [`tooltip.grouped=false`](#.tooltip) option is set.
|
|
19397
19442
|
* @property {boolean} [focus.show=true] Show grid line when focus.
|
|
@@ -19439,7 +19484,7 @@ function axis_objectSpread(target) { for (var i = 1, source; i < arguments.lengt
|
|
|
19439
19484
|
grid_x_lines: [],
|
|
19440
19485
|
grid_y_show: !1,
|
|
19441
19486
|
grid_y_lines: [],
|
|
19442
|
-
grid_y_ticks:
|
|
19487
|
+
grid_y_ticks: undefined,
|
|
19443
19488
|
grid_focus_edge: !1,
|
|
19444
19489
|
grid_focus_show: !0,
|
|
19445
19490
|
grid_focus_y: !1,
|
|
@@ -19525,7 +19570,7 @@ var external_commonjs_d3_interpolate_commonjs2_d3_interpolate_amd_d3_interpolate
|
|
|
19525
19570
|
w = config.gauge_width || config.donut_width,
|
|
19526
19571
|
gaugeArcWidth = $$.filterTargetsToShow($$.data.targets).length * config.gauge_arcs_minWidth;
|
|
19527
19572
|
// determine radius
|
|
19528
|
-
state.radiusExpanded = Math.min(state.arcWidth, state.arcHeight) / 2 * ($$.hasMultiArcGauge() ? .85 : 1);
|
|
19573
|
+
state.radiusExpanded = Math.min(state.arcWidth, state.arcHeight) / 2 * ($$.hasMultiArcGauge() && config.gauge_label_show ? .85 : 1);
|
|
19529
19574
|
state.radius = state.radiusExpanded * .95;
|
|
19530
19575
|
state.innerRadiusRatio = w ? (state.radius - w) / state.radius : .6;
|
|
19531
19576
|
state.gaugeArcWidth = w || (gaugeArcWidth <= state.radius - state.innerRadius ? state.radius - state.innerRadius : gaugeArcWidth <= state.radius ? gaugeArcWidth : state.radius);
|
|
@@ -21267,7 +21312,8 @@ function candlestick_objectSpread(target) { for (var i = 1, source; i < argument
|
|
|
21267
21312
|
mainLineEnter.append("g").attr("class", classLines); // Areas
|
|
21268
21313
|
|
|
21269
21314
|
if ($$.hasTypeOf("Area")) {
|
|
21270
|
-
|
|
21315
|
+
var mainLine = (!area && mainLineEnter.empty() ? mainLineUpdate : mainLineEnter).filter($$.isAreaType.bind($$));
|
|
21316
|
+
$$.initArea(mainLine);
|
|
21271
21317
|
}
|
|
21272
21318
|
|
|
21273
21319
|
$$.updateTargetForCircle(targets, mainLineEnter);
|
|
@@ -22888,6 +22934,7 @@ var cacheKey = KEY.radarPoints;
|
|
|
22888
22934
|
* @property {object} bar Bar object
|
|
22889
22935
|
* @property {number} [bar.indices.removeNull=false] Remove nullish data on bar indices positions.
|
|
22890
22936
|
* @property {number} [bar.label.threshold=0] Set threshold ratio to show/hide labels.
|
|
22937
|
+
* @property {boolean} [bar.overlap=false] Bars will be rendered at same position, which will be overlapped each other. (for non-grouped bars only)
|
|
22891
22938
|
* @property {number} [bar.padding=0] The padding pixel value between each bar.
|
|
22892
22939
|
* @property {number} [bar.radius] Set the radius of bar edge in pixel.
|
|
22893
22940
|
* @property {number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
|
|
@@ -22903,6 +22950,7 @@ var cacheKey = KEY.radarPoints;
|
|
|
22903
22950
|
* @property {number} [bar.width.dataname.max] The maximum width value for ratio.
|
|
22904
22951
|
* @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
|
|
22905
22952
|
* @see [Demo: bar indices](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarIndices)
|
|
22953
|
+
* @see [Demo: bar overlap](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarOverlap)
|
|
22906
22954
|
* @see [Demo: bar padding](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarPadding)
|
|
22907
22955
|
* @see [Demo: bar radius](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarRadius)
|
|
22908
22956
|
* @see [Demo: bar width](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarWidth)
|
|
@@ -22914,6 +22962,9 @@ var cacheKey = KEY.radarPoints;
|
|
|
22914
22962
|
* removeNull: true
|
|
22915
22963
|
* },
|
|
22916
22964
|
*
|
|
22965
|
+
* // remove nullish da
|
|
22966
|
+
* overlap: true,
|
|
22967
|
+
*
|
|
22917
22968
|
* padding: 1,
|
|
22918
22969
|
*
|
|
22919
22970
|
* // bar radius
|
|
@@ -22954,6 +23005,7 @@ var cacheKey = KEY.radarPoints;
|
|
|
22954
23005
|
*/
|
|
22955
23006
|
bar_label_threshold: 0,
|
|
22956
23007
|
bar_indices_removeNull: !1,
|
|
23008
|
+
bar_overlap: !1,
|
|
22957
23009
|
bar_padding: 0,
|
|
22958
23010
|
bar_radius: undefined,
|
|
22959
23011
|
bar_radius_ratio: undefined,
|
|
@@ -25936,7 +25988,7 @@ var _defaults = {},
|
|
|
25936
25988
|
* bb.version; // "1.0.0"
|
|
25937
25989
|
* @memberof bb
|
|
25938
25990
|
*/
|
|
25939
|
-
version: "3.
|
|
25991
|
+
version: "3.6.0-next.2",
|
|
25940
25992
|
|
|
25941
25993
|
/**
|
|
25942
25994
|
* Generate chart
|
|
@@ -26071,7 +26123,7 @@ var _defaults = {},
|
|
|
26071
26123
|
};
|
|
26072
26124
|
/**
|
|
26073
26125
|
* @namespace bb
|
|
26074
|
-
* @version 3.
|
|
26126
|
+
* @version 3.6.0-next.2
|
|
26075
26127
|
*/
|
|
26076
26128
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
26077
26129
|
|
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.
|
|
8
|
+
* @version 3.6.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-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-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}
|