billboard.js 3.13.0-next.1 → 3.13.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 +10 -3
- package/dist/billboard.css +167 -118
- package/dist/billboard.js +17 -10
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +9 -9
- package/dist/billboard.pkgd.js +554 -525
- package/dist/billboard.pkgd.min.js +14 -14
- 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 +5 -5
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-stanford.js +5 -5
- package/dist/plugin/billboardjs-plugin-stanford.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-tableview.js +5 -5
- package/dist/plugin/billboardjs-plugin-tableview.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-textoverlap.js +5 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +539 -517
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +5 -5
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +543 -521
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +6 -6
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +543 -521
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +12 -12
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +543 -521
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +7 -7
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +543 -521
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -7
- package/dist/theme/dark.css +220 -154
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +221 -157
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +223 -158
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +212 -149
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +223 -159
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +19 -10
- 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 +20 -34
- package/src/Chart/api/show.ts +1 -1
- package/src/ChartInternal/interactions/zoom.ts +12 -1
- package/src/ChartInternal/internals/legend.ts +1 -1
- package/src/ChartInternal/internals/scale.ts +1 -1
- package/src/config/Options/common/legend.ts +3 -2
- package/src/module/browser.ts +1 -1
- package/src/module/util.ts +2 -2
- package/src/module/worker.ts +1 -1
- package/types/options.d.ts +3 -3
package/README.md
CHANGED
|
@@ -74,8 +74,9 @@ You can download the compressed files for production
|
|
|
74
74
|
- https://naver.github.io/billboard.js/release/[VERSION]/dist/billboard.min.css
|
|
75
75
|
|
|
76
76
|
### Packaged version (with D3.js inclusion)
|
|
77
|
-
|
|
78
|
-
>
|
|
77
|
+
|
|
78
|
+
> ⚠️ Packaged version is not an official distribution.
|
|
79
|
+
> It's to provide an easy way to load 'billboard.js' with dependencies.
|
|
79
80
|
|
|
80
81
|
- **Latest**
|
|
81
82
|
- https://naver.github.io/billboard.js/release/latest/dist/billboard.pkgd.js
|
|
@@ -87,6 +88,7 @@ You can download the compressed files for production
|
|
|
87
88
|
</details>
|
|
88
89
|
|
|
89
90
|
### Themes
|
|
91
|
+
> [!NOTE]
|
|
90
92
|
> If you want apply themes, simply load one of the theme css file provided instead of the default css file.
|
|
91
93
|
> - [Screenshot Preview](https://github.com/naver/billboard.js/wiki/Themes)
|
|
92
94
|
|
|
@@ -123,6 +125,7 @@ With nightly, you can try upcoming changes prior the official release.
|
|
|
123
125
|
|
|
124
126
|
- https://github.com/naver/billboard.js/tree/nightly/dist
|
|
125
127
|
|
|
128
|
+
> [!NOTE]
|
|
126
129
|
> The version info will be given as the build datetime: `x.x.x-nightly-yyyymmddhhmmss`
|
|
127
130
|
|
|
128
131
|
There're two ways to install from `nightly` branch directly.
|
|
@@ -170,6 +173,7 @@ If you want to use 'billboard.js' without installation, load files directly from
|
|
|
170
173
|
|
|
171
174
|
## Supported Browsers
|
|
172
175
|
|
|
176
|
+
> [!IMPORTANT]
|
|
173
177
|
> - Basically will work on all SVG and ES6+ supported browsers.
|
|
174
178
|
> - <sup>*</sup>Notes for legacy browsers:
|
|
175
179
|
> - Recommended to use `packaged` build or construct your own build following [`How to bundle for legacy browsers?`](https://github.com/naver/billboard.js/wiki/How-to-bundle-for-legacy-browsers%3F) instruction.
|
|
@@ -184,6 +188,8 @@ If you want to use 'billboard.js' without installation, load files directly from
|
|
|
184
188
|
4.x ~ 5.x | 1.x ~ 2.x
|
|
185
189
|
6.x+ | 3.x+
|
|
186
190
|
|
|
191
|
+
# Getting Started
|
|
192
|
+
|
|
187
193
|
Load billboard.js after D3.js.
|
|
188
194
|
|
|
189
195
|
```html
|
|
@@ -201,6 +207,7 @@ Load billboard.js after D3.js.
|
|
|
201
207
|
```
|
|
202
208
|
|
|
203
209
|
or use importing ESM.
|
|
210
|
+
> [!TIP]
|
|
204
211
|
> 📌 Also check: [How to load as ESM directly from the browser?](https://github.com/naver/billboard.js/wiki/How-to-load-as-ESM-directly-from-the-browser%3F)
|
|
205
212
|
|
|
206
213
|
```js
|
|
@@ -219,7 +226,7 @@ import "billboard.js/dist/billboard.css";
|
|
|
219
226
|
import "billboard.js/dist/theme/insight.css"
|
|
220
227
|
```
|
|
221
228
|
|
|
222
|
-
>
|
|
229
|
+
> [!NOTE]
|
|
223
230
|
> - For migration from C3.js, checkout the [migration guide](https://github.com/naver/billboard.js/wiki/How-to-migrate-from-C3.js%3F).
|
|
224
231
|
> - If has an issue bundling for legacy browsers, checkout "[How to bundle for legacy browsers?](https://github.com/naver/billboard.js/wiki/How-to-bundle-for-legacy-browsers%3F)".
|
|
225
232
|
|
package/dist/billboard.css
CHANGED
|
@@ -5,155 +5,186 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.13.0-next.
|
|
8
|
+
* @version 3.13.0-next.2
|
|
9
9
|
*/
|
|
10
10
|
/*-- Chart --*/
|
|
11
11
|
.bb svg {
|
|
12
12
|
font: 10px sans-serif;
|
|
13
|
-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
14
|
-
|
|
13
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
14
|
+
}
|
|
15
15
|
.bb path, .bb line {
|
|
16
16
|
fill: none;
|
|
17
|
-
stroke: #000;
|
|
18
|
-
|
|
17
|
+
stroke: #000;
|
|
18
|
+
}
|
|
19
19
|
.bb text, .bb .bb-button {
|
|
20
20
|
-webkit-user-select: none;
|
|
21
21
|
-moz-user-select: none;
|
|
22
|
-
user-select: none;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
23
24
|
|
|
24
25
|
.bb-legend-item-tile,
|
|
25
26
|
.bb-xgrid-focus,
|
|
26
27
|
.bb-ygrid-focus,
|
|
27
28
|
.bb-ygrid {
|
|
28
|
-
shape-rendering: crispEdges;
|
|
29
|
+
shape-rendering: crispEdges;
|
|
30
|
+
}
|
|
29
31
|
|
|
30
32
|
.bb-chart-arcs .bb-needle {
|
|
31
|
-
fill: #000;
|
|
33
|
+
fill: #000;
|
|
34
|
+
}
|
|
32
35
|
|
|
33
36
|
.bb-chart-arc .bb-gauge-value {
|
|
34
|
-
fill: #000;
|
|
35
|
-
|
|
37
|
+
fill: #000;
|
|
38
|
+
}
|
|
36
39
|
.bb-chart-arc path {
|
|
37
|
-
stroke: #fff;
|
|
38
|
-
|
|
40
|
+
stroke: #fff;
|
|
41
|
+
}
|
|
39
42
|
.bb-chart-arc rect {
|
|
40
43
|
stroke: #fff;
|
|
41
|
-
stroke-width: 1;
|
|
42
|
-
|
|
44
|
+
stroke-width: 1;
|
|
45
|
+
}
|
|
43
46
|
.bb-chart-arc text {
|
|
44
47
|
fill: #fff;
|
|
45
|
-
font-size: 13px;
|
|
48
|
+
font-size: 13px;
|
|
49
|
+
}
|
|
46
50
|
|
|
47
51
|
/*-- Funnel --*/
|
|
48
52
|
.bb-chart-funnels path {
|
|
49
|
-
stroke-width: 0;
|
|
50
|
-
|
|
53
|
+
stroke-width: 0;
|
|
54
|
+
}
|
|
51
55
|
.bb-chart-funnels + .bb-chart-texts text {
|
|
52
56
|
font-size: 13px;
|
|
53
|
-
fill: #fff;
|
|
57
|
+
fill: #fff;
|
|
58
|
+
}
|
|
54
59
|
|
|
55
60
|
/*-- Axis --*/
|
|
56
61
|
.bb-axis {
|
|
57
|
-
shape-rendering: crispEdges;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
shape-rendering: crispEdges;
|
|
63
|
+
}
|
|
64
|
+
.bb-axis .bb-axis-x-tooltip, .bb-axis .bb-axis-y-tooltip, .bb-axis .bb-axis-y2-tooltip {
|
|
65
|
+
font-size: 1em;
|
|
66
|
+
fill: #fff;
|
|
67
|
+
white-space: nowrap;
|
|
68
|
+
}
|
|
62
69
|
|
|
63
70
|
/*-- Grid --*/
|
|
64
71
|
.bb-grid {
|
|
65
|
-
pointer-events: none;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
}
|
|
74
|
+
.bb-grid line {
|
|
75
|
+
stroke: #aaa;
|
|
76
|
+
}
|
|
77
|
+
.bb-grid text {
|
|
78
|
+
fill: #aaa;
|
|
79
|
+
}
|
|
70
80
|
|
|
71
81
|
.bb-xgrid, .bb-ygrid {
|
|
72
|
-
stroke-dasharray: 3 3;
|
|
82
|
+
stroke-dasharray: 3 3;
|
|
83
|
+
}
|
|
73
84
|
|
|
74
85
|
/*-- Text on Chart --*/
|
|
75
86
|
.bb-text.bb-empty {
|
|
76
87
|
fill: #808080;
|
|
77
|
-
font-size: 2em;
|
|
88
|
+
font-size: 2em;
|
|
89
|
+
}
|
|
78
90
|
|
|
79
91
|
/*-- Line --*/
|
|
80
92
|
.bb-line {
|
|
81
|
-
stroke-width: 1px;
|
|
93
|
+
stroke-width: 1px;
|
|
94
|
+
}
|
|
82
95
|
|
|
83
96
|
/*-- Point --*/
|
|
84
97
|
.bb-circle._expanded_ {
|
|
85
98
|
stroke-width: 1px;
|
|
86
|
-
stroke: white;
|
|
99
|
+
stroke: white;
|
|
100
|
+
}
|
|
87
101
|
|
|
88
102
|
.bb-selected-circle {
|
|
89
103
|
fill: white;
|
|
90
|
-
stroke-width: 2px;
|
|
104
|
+
stroke-width: 2px;
|
|
105
|
+
}
|
|
91
106
|
|
|
92
107
|
/*-- Bar --*/
|
|
93
108
|
.bb-bar {
|
|
94
|
-
stroke-width: 0;
|
|
95
|
-
|
|
96
|
-
|
|
109
|
+
stroke-width: 0;
|
|
110
|
+
}
|
|
111
|
+
.bb-bar._expanded_ {
|
|
112
|
+
fill-opacity: 0.75;
|
|
113
|
+
}
|
|
97
114
|
|
|
98
115
|
/*-- Candlestick --*/
|
|
99
116
|
.bb-candlestick {
|
|
100
|
-
stroke-width: 1px;
|
|
101
|
-
|
|
102
|
-
|
|
117
|
+
stroke-width: 1px;
|
|
118
|
+
}
|
|
119
|
+
.bb-candlestick._expanded_ {
|
|
120
|
+
fill-opacity: 0.75;
|
|
121
|
+
}
|
|
103
122
|
|
|
104
123
|
/*-- Focus --*/
|
|
105
124
|
.bb-target.bb-focused, .bb-circles.bb-focused {
|
|
106
|
-
opacity: 1;
|
|
107
|
-
|
|
125
|
+
opacity: 1;
|
|
126
|
+
}
|
|
108
127
|
.bb-target.bb-focused path.bb-line, .bb-target.bb-focused path.bb-step, .bb-circles.bb-focused path.bb-line, .bb-circles.bb-focused path.bb-step {
|
|
109
|
-
stroke-width: 2px;
|
|
110
|
-
|
|
128
|
+
stroke-width: 2px;
|
|
129
|
+
}
|
|
111
130
|
.bb-target.bb-defocused, .bb-circles.bb-defocused {
|
|
112
|
-
opacity: 0.3 !important;
|
|
113
|
-
|
|
114
|
-
|
|
131
|
+
opacity: 0.3 !important;
|
|
132
|
+
}
|
|
133
|
+
.bb-target.bb-defocused .text-overlapping, .bb-circles.bb-defocused .text-overlapping {
|
|
134
|
+
opacity: 0.05 !important;
|
|
135
|
+
}
|
|
115
136
|
|
|
116
137
|
/*-- Region --*/
|
|
117
138
|
.bb-region {
|
|
118
|
-
fill: steelblue;
|
|
119
|
-
|
|
120
|
-
|
|
139
|
+
fill: steelblue;
|
|
140
|
+
}
|
|
141
|
+
.bb-region rect {
|
|
142
|
+
fill-opacity: 0.1;
|
|
143
|
+
}
|
|
121
144
|
|
|
122
145
|
/*-- Zoom region --*/
|
|
123
146
|
.bb-zoom-brush {
|
|
124
|
-
fill-opacity: .1;
|
|
147
|
+
fill-opacity: 0.1;
|
|
148
|
+
}
|
|
125
149
|
|
|
126
150
|
/*-- Brush --*/
|
|
127
151
|
.bb-brush .extent {
|
|
128
|
-
fill-opacity: .1;
|
|
152
|
+
fill-opacity: 0.1;
|
|
153
|
+
}
|
|
129
154
|
|
|
130
155
|
/*-- Legend --*/
|
|
131
156
|
.bb-legend-item {
|
|
132
157
|
font-size: 12px;
|
|
133
|
-
user-select: none;
|
|
158
|
+
user-select: none;
|
|
159
|
+
}
|
|
134
160
|
|
|
135
161
|
.bb-legend-item-hidden {
|
|
136
|
-
opacity: 0.15;
|
|
162
|
+
opacity: 0.15;
|
|
163
|
+
}
|
|
137
164
|
|
|
138
165
|
.bb-legend-background {
|
|
139
166
|
opacity: 0.75;
|
|
140
167
|
fill: white;
|
|
141
168
|
stroke: lightgray;
|
|
142
|
-
stroke-width: 1;
|
|
169
|
+
stroke-width: 1;
|
|
170
|
+
}
|
|
143
171
|
|
|
144
172
|
/*-- Title --*/
|
|
145
173
|
.bb-title {
|
|
146
|
-
font: 14px sans-serif;
|
|
174
|
+
font: 14px sans-serif;
|
|
175
|
+
}
|
|
147
176
|
|
|
148
177
|
/*-- Treemap --*/
|
|
149
178
|
.bb-chart-treemaps rect {
|
|
150
179
|
stroke: #fff;
|
|
151
|
-
stroke-width: 1px;
|
|
180
|
+
stroke-width: 1px;
|
|
181
|
+
}
|
|
152
182
|
|
|
153
183
|
/*-- Tooltip --*/
|
|
154
184
|
.bb-tooltip-container {
|
|
155
185
|
z-index: 10;
|
|
156
|
-
user-select: none;
|
|
186
|
+
user-select: none;
|
|
187
|
+
}
|
|
157
188
|
|
|
158
189
|
.bb-tooltip {
|
|
159
190
|
border-collapse: collapse;
|
|
@@ -161,93 +192,111 @@
|
|
|
161
192
|
background-color: #fff;
|
|
162
193
|
empty-cells: show;
|
|
163
194
|
opacity: 0.9;
|
|
164
|
-
box-shadow: 7px 7px 12px -9px
|
|
165
|
-
white-space: nowrap;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
195
|
+
box-shadow: 7px 7px 12px -9px rgb(119, 119, 119);
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
}
|
|
198
|
+
.bb-tooltip tr {
|
|
199
|
+
border: 1px solid #CCC;
|
|
200
|
+
}
|
|
201
|
+
.bb-tooltip th {
|
|
202
|
+
background-color: #aaa;
|
|
203
|
+
font-size: 14px;
|
|
204
|
+
padding: 2px 5px;
|
|
205
|
+
text-align: left;
|
|
206
|
+
color: #FFF;
|
|
207
|
+
}
|
|
208
|
+
.bb-tooltip td {
|
|
209
|
+
font-size: 13px;
|
|
210
|
+
padding: 3px 6px;
|
|
211
|
+
background-color: #fff;
|
|
212
|
+
border-left: 1px dotted #999;
|
|
213
|
+
}
|
|
214
|
+
.bb-tooltip td > span, .bb-tooltip td > svg {
|
|
215
|
+
display: inline-block;
|
|
216
|
+
width: 10px;
|
|
217
|
+
height: 10px;
|
|
218
|
+
margin-right: 6px;
|
|
219
|
+
}
|
|
220
|
+
.bb-tooltip.value {
|
|
221
|
+
text-align: right;
|
|
222
|
+
}
|
|
186
223
|
|
|
187
224
|
/*-- Area --*/
|
|
188
225
|
.bb-area {
|
|
189
226
|
stroke-width: 0;
|
|
190
|
-
opacity: 0.2;
|
|
227
|
+
opacity: 0.2;
|
|
228
|
+
}
|
|
191
229
|
|
|
192
230
|
/*-- Arc --*/
|
|
193
231
|
.bb-chart-arcs-title {
|
|
194
232
|
dominant-baseline: middle;
|
|
195
|
-
font-size: 1.3em;
|
|
233
|
+
font-size: 1.3em;
|
|
234
|
+
}
|
|
196
235
|
|
|
197
236
|
text.bb-chart-arcs-gauge-title {
|
|
198
237
|
dominant-baseline: middle;
|
|
199
|
-
font-size: 2.7em;
|
|
238
|
+
font-size: 2.7em;
|
|
239
|
+
}
|
|
200
240
|
|
|
201
241
|
.bb-chart-arcs {
|
|
202
|
-
/*-- Polar --*/
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
242
|
+
/*-- Polar --*/
|
|
243
|
+
}
|
|
244
|
+
.bb-chart-arcs .bb-chart-arcs-background {
|
|
245
|
+
fill: #e0e0e0;
|
|
246
|
+
stroke: #fff;
|
|
247
|
+
}
|
|
248
|
+
.bb-chart-arcs .bb-chart-arcs-gauge-unit {
|
|
249
|
+
fill: #000;
|
|
250
|
+
font-size: 16px;
|
|
251
|
+
}
|
|
252
|
+
.bb-chart-arcs .bb-chart-arcs-gauge-max {
|
|
253
|
+
fill: #777;
|
|
254
|
+
}
|
|
255
|
+
.bb-chart-arcs .bb-chart-arcs-gauge-min {
|
|
256
|
+
fill: #777;
|
|
257
|
+
}
|
|
258
|
+
.bb-chart-arcs .bb-levels circle {
|
|
259
|
+
fill: none;
|
|
260
|
+
stroke: #848282;
|
|
261
|
+
stroke-width: 0.5px;
|
|
262
|
+
}
|
|
263
|
+
.bb-chart-arcs .bb-levels text {
|
|
264
|
+
fill: #848282;
|
|
265
|
+
}
|
|
219
266
|
|
|
220
267
|
/*-- Radar --*/
|
|
221
268
|
.bb-chart-radars .bb-levels polygon {
|
|
222
269
|
fill: none;
|
|
223
270
|
stroke: #848282;
|
|
224
|
-
stroke-width: .5px;
|
|
225
|
-
|
|
271
|
+
stroke-width: 0.5px;
|
|
272
|
+
}
|
|
226
273
|
.bb-chart-radars .bb-levels text {
|
|
227
|
-
fill: #848282;
|
|
228
|
-
|
|
274
|
+
fill: #848282;
|
|
275
|
+
}
|
|
229
276
|
.bb-chart-radars .bb-axis line {
|
|
230
277
|
stroke: #848282;
|
|
231
|
-
stroke-width: .5px;
|
|
232
|
-
|
|
278
|
+
stroke-width: 0.5px;
|
|
279
|
+
}
|
|
233
280
|
.bb-chart-radars .bb-axis text {
|
|
234
281
|
font-size: 1.15em;
|
|
235
|
-
cursor: default;
|
|
236
|
-
|
|
282
|
+
cursor: default;
|
|
283
|
+
}
|
|
237
284
|
.bb-chart-radars .bb-shapes polygon {
|
|
238
|
-
fill-opacity: .2;
|
|
239
|
-
stroke-width: 1px;
|
|
285
|
+
fill-opacity: 0.2;
|
|
286
|
+
stroke-width: 1px;
|
|
287
|
+
}
|
|
240
288
|
|
|
241
289
|
/*-- Button --*/
|
|
242
290
|
.bb-button {
|
|
243
291
|
position: absolute;
|
|
244
292
|
top: 10px;
|
|
245
|
-
right: 10px;
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
293
|
+
right: 10px;
|
|
294
|
+
}
|
|
295
|
+
.bb-button .bb-zoom-reset {
|
|
296
|
+
font-size: 11px;
|
|
297
|
+
border: solid 1px #ccc;
|
|
298
|
+
background-color: #fff;
|
|
299
|
+
padding: 5px;
|
|
300
|
+
border-radius: 5px;
|
|
301
|
+
cursor: pointer;
|
|
302
|
+
}
|
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.13.0-next.
|
|
8
|
+
* @version 3.13.0-next.2
|
|
9
9
|
*/
|
|
10
10
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
11
11
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -565,7 +565,8 @@ const $ZOOM = {
|
|
|
565
565
|
* - rectangle
|
|
566
566
|
* @property {boolean} [legend.format] Set formatter function for legend text.
|
|
567
567
|
* The argument:<br>
|
|
568
|
-
* - `id`:
|
|
568
|
+
* - `id`: Legend text value. When `data.names` is specified, will pass from it, otherwise will pass data id.
|
|
569
|
+
* - `dataId`: When `data.names` specified, will pass the original data id. Otherwise will be undefined.
|
|
569
570
|
* @property {boolean} [legend.tooltip=false] Show full legend text value using system tooltip(via `<title>` element).
|
|
570
571
|
* @property {boolean} [legend.usePoint=false] Whether to use custom points in legend.
|
|
571
572
|
* @see [Demo: format](https://naver.github.io/billboard.js/demo/#Legend.LegendFormat)
|
|
@@ -631,7 +632,7 @@ const $ZOOM = {
|
|
|
631
632
|
* r: 10
|
|
632
633
|
* }
|
|
633
634
|
* },
|
|
634
|
-
* format: function(id) {
|
|
635
|
+
* format: function(id, dataId) {
|
|
635
636
|
* // set ellipsis string when length is > 5
|
|
636
637
|
* // to get full legend value, combine with 'legend.tooltip=true'
|
|
637
638
|
* if (id.length > 5) {
|
|
@@ -2490,10 +2491,10 @@ function getCssRules(styleSheets) {
|
|
|
2490
2491
|
return rules;
|
|
2491
2492
|
}
|
|
2492
2493
|
function getScrollPosition(node) {
|
|
2493
|
-
var _a, _b, _c, _d;
|
|
2494
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2494
2495
|
return {
|
|
2495
|
-
x: ((_b = (_a = win.pageXOffset) != null ? _a : win.scrollX) != null ? _b : 0) + node.scrollLeft,
|
|
2496
|
-
y: ((
|
|
2496
|
+
x: ((_b = (_a = win.pageXOffset) != null ? _a : win.scrollX) != null ? _b : 0) + ((_c = node.scrollLeft) != null ? _c : 0),
|
|
2497
|
+
y: ((_e = (_d = win.pageYOffset) != null ? _d : win.scrollY) != null ? _e : 0) + ((_f = node.scrollTop) != null ? _f : 0)
|
|
2497
2498
|
};
|
|
2498
2499
|
}
|
|
2499
2500
|
function getTranslation(node) {
|
|
@@ -5486,7 +5487,7 @@ function getFormattedText(id, formatted = true) {
|
|
|
5486
5487
|
const { config } = this;
|
|
5487
5488
|
let text = (_a = config.data_names[id]) != null ? _a : id;
|
|
5488
5489
|
if (formatted && isFunction(config.legend_format)) {
|
|
5489
|
-
text = config.legend_format(text);
|
|
5490
|
+
text = config.legend_format(text, id !== text ? id : void 0);
|
|
5490
5491
|
}
|
|
5491
5492
|
return text;
|
|
5492
5493
|
}
|
|
@@ -10055,9 +10056,10 @@ function showHide(show, targetIdsValue, options) {
|
|
|
10055
10056
|
callFn($$.config.data_onshown, this, hiddenIds);
|
|
10056
10057
|
}
|
|
10057
10058
|
$$.$T(targets).style("opacity", opacity, "important").call(endall, () => {
|
|
10059
|
+
var _a;
|
|
10058
10060
|
if (!show && hiddenIds.length === 0) {
|
|
10059
10061
|
targets.style("display", "none");
|
|
10060
|
-
callFn($$.config.data_onhidden, this, targetIds);
|
|
10062
|
+
callFn((_a = $$.config) == null ? void 0 : _a.data_onhidden, this, targetIds);
|
|
10061
10063
|
}
|
|
10062
10064
|
targets.style("opacity", opacity);
|
|
10063
10065
|
});
|
|
@@ -11001,6 +11003,7 @@ extend(zoom, {
|
|
|
11001
11003
|
|
|
11002
11004
|
|
|
11003
11005
|
|
|
11006
|
+
|
|
11004
11007
|
/* harmony default export */ var interactions_zoom = ({
|
|
11005
11008
|
/**
|
|
11006
11009
|
* Initialize zoom.
|
|
@@ -11210,8 +11213,12 @@ extend(zoom, {
|
|
|
11210
11213
|
*/
|
|
11211
11214
|
bindZoomOnEventRect() {
|
|
11212
11215
|
const $$ = this;
|
|
11213
|
-
const { config, $el: { eventRect } } = $$;
|
|
11216
|
+
const { config, $el: { eventRect, svg } } = $$;
|
|
11214
11217
|
const behaviour = config.zoom_type === "drag" ? $$.zoomBehaviour : $$.zoom;
|
|
11218
|
+
if (win.GestureEvent && /^((?!chrome|android|mobile).)*safari/i.test(navigator.userAgent)) {
|
|
11219
|
+
svg.on("wheel", () => {
|
|
11220
|
+
});
|
|
11221
|
+
}
|
|
11215
11222
|
eventRect == null ? void 0 : eventRect.call(behaviour).on("dblclick.zoom", null);
|
|
11216
11223
|
},
|
|
11217
11224
|
/**
|
|
@@ -21646,7 +21653,7 @@ const bb = {
|
|
|
21646
21653
|
* bb.version; // "1.0.0"
|
|
21647
21654
|
* @memberof bb
|
|
21648
21655
|
*/
|
|
21649
|
-
version: "3.13.0-next.
|
|
21656
|
+
version: "3.13.0-next.2",
|
|
21650
21657
|
/**
|
|
21651
21658
|
* Generate chart
|
|
21652
21659
|
* - **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.13.0-next.
|
|
8
|
+
* @version 3.13.0-next.2
|
|
9
9
|
*/.bb svg{font:10px sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0)}.bb path,.bb line{fill:none;stroke:#000}.bb text,.bb .bb-button{-webkit-user-select:none;-moz-user-select:none;user-select:none}.bb-legend-item-tile,.bb-xgrid-focus,.bb-ygrid-focus,.bb-ygrid{shape-rendering:crispEdges}.bb-chart-arcs .bb-needle,.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-chart-funnels path{stroke-width:0}.bb-chart-funnels+.bb-chart-texts text{font-size:13px;fill:#fff}.bb-axis{shape-rendering:crispEdges}.bb-axis .bb-axis-x-tooltip,.bb-axis .bb-axis-y-tooltip,.bb-axis .bb-axis-y2-tooltip{font-size:1em;fill:#fff;white-space:nowrap}.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:gray;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-target.bb-focused,.bb-circles.bb-focused{opacity:1}.bb-target.bb-focused path.bb-line,.bb-target.bb-focused path.bb-step,.bb-circles.bb-focused path.bb-line,.bb-circles.bb-focused path.bb-step{stroke-width:2px}.bb-target.bb-defocused,.bb-circles.bb-defocused{opacity:.3!important}.bb-target.bb-defocused .text-overlapping,.bb-circles.bb-defocused .text-overlapping{opacity:.05!important}.bb-region{fill:#4682b4}.bb-region rect{fill-opacity:.1}.bb-zoom-brush,.bb-brush .extent{fill-opacity:.1}.bb-legend-item{font-size:12px;user-select:none}.bb-legend-item-hidden{opacity:.15}.bb-legend-background{opacity:.75;fill:#fff;stroke:#d3d3d3;stroke-width:1}.bb-title{font:14px sans-serif}.bb-chart-treemaps rect{stroke:#fff;stroke-width:1px}.bb-tooltip-container{z-index:10;user-select:none}.bb-tooltip{border-collapse:collapse;border-spacing:0;background-color:#fff;empty-cells:show;opacity:.9;box-shadow:7px 7px 12px -9px #777;white-space:nowrap}.bb-tooltip tr{border:1px solid #CCC}.bb-tooltip th{background-color:#aaa;font-size:14px;padding:2px 5px;text-align:left;color:#fff}.bb-tooltip td{font-size:13px;padding:3px 6px;background-color:#fff;border-left:1px dotted #999}.bb-tooltip td>span,.bb-tooltip td>svg{display:inline-block;width:10px;height:10px;margin-right:6px}.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{font-size:1.15em;cursor:default}.bb-chart-radars .bb-shapes polygon{fill-opacity:.2;stroke-width:1px}.bb-button{position:absolute;top:10px;right:10px}.bb-button .bb-zoom-reset{font-size:11px;border:solid 1px #ccc;background-color:#fff;padding:5px;border-radius:5px;cursor:pointer}
|