billboard.js 3.17.3 → 3.18.0-next.1
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/CONTRIBUTING.md +12 -12
- package/README.md +12 -12
- package/dist/billboard.css +15 -1
- package/dist/billboard.js +769 -310
- package/dist/billboard.min.css +2 -2
- package/dist/billboard.min.js +10 -10
- package/dist/billboard.pkgd.js +777 -318
- package/dist/billboard.pkgd.min.js +21 -21
- 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 +16 -7
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +18 -9
- package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +16 -8
- package/dist/plugin/billboardjs-plugin-tableview.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -7
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +3 -3
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +16 -7
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +26 -17
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +16 -8
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +15 -7
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +3 -3
- package/dist/theme/dark.css +15 -1
- package/dist/theme/dark.min.css +2 -2
- package/dist/theme/datalab.css +15 -1
- package/dist/theme/datalab.min.css +2 -2
- package/dist/theme/graph.css +15 -1
- package/dist/theme/graph.min.css +2 -2
- package/dist/theme/insight.css +15 -1
- package/dist/theme/insight.min.css +2 -2
- package/dist/theme/modern.css +15 -1
- package/dist/theme/modern.min.css +2 -2
- package/dist-esm/billboard.js +957 -357
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +5 -4
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +22 -12
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +35 -34
- package/src/Chart/Chart.ts +1 -1
- package/src/Chart/api/chart.ts +5 -5
- package/src/Chart/api/data.ts +2 -1
- package/src/Chart/api/export.ts +1 -1
- package/src/Chart/api/flow.ts +1 -1
- package/src/Chart/api/load.ts +3 -3
- package/src/Chart/api/subchart.ts +3 -3
- package/src/Chart/api/tooltip.ts +1 -1
- package/src/Chart/api/zoom.ts +1 -1
- package/src/ChartInternal/Axis/Axis.ts +1 -1
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
- package/src/ChartInternal/ChartInternal.ts +3 -2
- package/src/ChartInternal/data/IData.ts +3 -0
- package/src/ChartInternal/data/convert.helper.ts +1 -1
- package/src/ChartInternal/data/convert.ts +1 -1
- package/src/ChartInternal/data/data.ts +97 -14
- package/src/ChartInternal/data/load.ts +8 -8
- package/src/ChartInternal/interactions/eventrect.ts +15 -5
- package/src/ChartInternal/interactions/flow.ts +1 -1
- package/src/ChartInternal/interactions/interaction.ts +1 -1
- package/src/ChartInternal/interactions/zoom.ts +1 -1
- package/src/ChartInternal/internals/color.ts +23 -6
- package/src/ChartInternal/internals/domain.ts +13 -1
- package/src/ChartInternal/internals/format.ts +1 -1
- package/src/ChartInternal/internals/grid.ts +1 -1
- package/src/ChartInternal/internals/legend.ts +2 -2
- package/src/ChartInternal/internals/scale.ts +6 -6
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/style.ts +3 -3
- package/src/ChartInternal/internals/text.arc.ts +304 -0
- package/src/ChartInternal/internals/text.ts +8 -7
- package/src/ChartInternal/internals/tooltip.ts +23 -15
- package/src/ChartInternal/shape/arc.ts +167 -64
- package/src/ChartInternal/shape/area.ts +2 -2
- package/src/ChartInternal/shape/bar.ts +2 -2
- package/src/ChartInternal/shape/candlestick.ts +3 -3
- package/src/ChartInternal/shape/funnel.ts +1 -1
- package/src/ChartInternal/shape/line.ts +4 -4
- package/src/ChartInternal/shape/point.common.ts +1 -1
- package/src/ChartInternal/shape/radar.ts +2 -2
- package/src/ChartInternal/shape/shape.ts +3 -3
- package/src/ChartInternal/shape/treemap.ts +19 -5
- package/src/Plugin/stanford/Options.ts +2 -2
- package/src/Plugin/tableview/Options.ts +1 -1
- package/src/config/Options/axis/axis.ts +7 -7
- package/src/config/Options/axis/x.ts +6 -6
- package/src/config/Options/axis/y.ts +4 -4
- package/src/config/Options/axis/y2.ts +16 -3
- package/src/config/Options/common/color.ts +2 -2
- package/src/config/Options/common/legend.ts +5 -5
- package/src/config/Options/common/main.ts +23 -23
- package/src/config/Options/common/point.ts +3 -3
- package/src/config/Options/common/tooltip.ts +13 -13
- package/src/config/Options/data/axis.ts +31 -6
- package/src/config/Options/data/data.ts +44 -44
- package/src/config/Options/data/selection.ts +4 -4
- package/src/config/Options/interaction/interaction.ts +2 -1
- package/src/config/Options/interaction/subchart.ts +2 -2
- package/src/config/Options/interaction/zoom.ts +4 -4
- package/src/config/Options/shape/arc.ts +4 -4
- package/src/config/Options/shape/area.ts +1 -1
- package/src/config/Options/shape/bar.ts +4 -4
- package/src/config/Options/shape/bubble.ts +2 -2
- package/src/config/Options/shape/candlestick.ts +1 -1
- package/src/config/Options/shape/donut.ts +34 -3
- package/src/config/Options/shape/gauge.ts +36 -4
- package/src/config/Options/shape/line.ts +1 -1
- package/src/config/Options/shape/pie.ts +34 -3
- package/src/config/Options/shape/polar.ts +35 -4
- package/src/config/Options/shape/radar.ts +1 -1
- package/src/config/Options/shape/scatter.ts +1 -1
- package/src/config/Options/shape/treemap.ts +31 -5
- package/src/config/classes.ts +1 -0
- package/src/core.ts +1 -1
- package/src/module/Cache.ts +3 -3
- package/src/module/generator.ts +1 -1
- package/src/module/util.ts +31 -20
- package/src/module/worker.ts +3 -3
- package/src/scss/billboard.scss +15 -0
- package/src/scss/theme/dark.scss +15 -0
- package/src/scss/theme/datalab.scss +15 -0
- package/src/scss/theme/graph.scss +15 -0
- package/src/scss/theme/insight.scss +15 -0
- package/src/scss/theme/modern.scss +15 -0
- package/types/axis.d.ts +3 -3
- package/types/chart.d.ts +4 -4
- package/types/options.d.ts +22 -9
- package/types/options.shape.d.ts +59 -2
package/CONTRIBUTING.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# How to contribute to billboard.js
|
|
2
|
-
billboard.js is open to everyone, and we welcome any
|
|
3
|
-
We believe that our project can grow with your
|
|
2
|
+
billboard.js is open to everyone, and we welcome any kind of contribution.
|
|
3
|
+
We believe that our project can grow with your interest in helping others' needs.
|
|
4
4
|
|
|
5
5
|
## Style Guide
|
|
6
6
|
|
|
7
7
|
billboard.js has several style guidelines that you must follow.
|
|
8
|
-
Before
|
|
8
|
+
Before you start, please read the below instructions carefully.
|
|
9
9
|
|
|
10
10
|
### Linting and Code Convention
|
|
11
11
|
To maintain the code style and quality, we adopted [ESLint](http://eslint.org/).
|
|
@@ -13,8 +13,8 @@ The [rules](https://github.com/naver/eslint-config-naver/tree/master/rules) are
|
|
|
13
13
|
|
|
14
14
|
### Commit Log Guidelines
|
|
15
15
|
billboard.js follows formatted commit logs based on [Conventional Commits](https://www.conventionalcommits.org/) for many different purposes (like creating CHANGELOG, ease history searching, etc.).
|
|
16
|
-
To
|
|
17
|
-
Before your commit/push, make sure follow our commit log guidelines.
|
|
16
|
+
To avoid breaking the current format, please follow our commit log guidelines.
|
|
17
|
+
Before your commit/push, make sure to follow our commit log guidelines.
|
|
18
18
|
|
|
19
19
|
The outline is as below:
|
|
20
20
|
```bash
|
|
@@ -33,7 +33,7 @@ The outline is as below:
|
|
|
33
33
|
- **refactor**: A code change that neither fixes a bug nor adds a feature
|
|
34
34
|
- **test**: Adding missing tests. Changing tests.
|
|
35
35
|
- **chore**: Changes to the build process or tools and libraries such as documentation generation
|
|
36
|
-
- **skip**: For commits made
|
|
36
|
+
- **skip**: For commits made after the 1st commit. Usually for applying code review changes.
|
|
37
37
|
|
|
38
38
|
- #### Description
|
|
39
39
|
A short description of the commit.
|
|
@@ -102,17 +102,17 @@ The outline is as below:
|
|
|
102
102
|
## How to submit Pull Requests
|
|
103
103
|
Steps to submit your pull request:
|
|
104
104
|
|
|
105
|
-
1. Fork `billboard.js`
|
|
106
|
-
2. Create a new branch from your billboard.js `master` branch (and be sure
|
|
105
|
+
1. Fork `billboard.js` to your repository
|
|
106
|
+
2. Create a new branch from your billboard.js `master` branch (and be sure it is always up-to-date)
|
|
107
107
|
3. Do your work
|
|
108
|
-
4. Create test code for your work (when
|
|
109
|
-
5. Run `npm run lint` for linting and code style check. (update until
|
|
108
|
+
4. Create test code for your work (when possible)
|
|
109
|
+
5. Run `npm run lint` for linting and code style check. (update until there are no errors or warnings)
|
|
110
110
|
6. Run test code by `npm test` or `npm test:chrome` for chrome browser.
|
|
111
|
-
Make sure all tests pass at least on the latest version of Chrome(mobile/desktop).
|
|
111
|
+
Make sure all tests pass at least on the latest version of Chrome (mobile/desktop).
|
|
112
112
|
7. Write a commit log following convention and push to your repository branch.
|
|
113
113
|
8. Create a new PR from your branch to `billboard.js/master` branch.
|
|
114
114
|
9. Wait for reviews.
|
|
115
|
-
When your contribution is
|
|
115
|
+
When your contribution is ready to be accepted, then it will be merged to our branch.
|
|
116
116
|
10. All done!
|
|
117
117
|
|
|
118
118
|
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ billboard.js is a re-usable, easy interface JavaScript chart library, based on [
|
|
|
35
35
|
- [billboard.js 3.0 release: D3.js v6 support & new candlestick type!](https://netil.medium.com/billboard-js-3-0-release-d3-js-v6-support-new-candlestick-type-9bd74af6a753)
|
|
36
36
|
|
|
37
37
|
## Questions?
|
|
38
|
-
If you have any questions,
|
|
38
|
+
If you have any questions, check out the previous posts or create a new one at:
|
|
39
39
|
- [Stack Overflow: billboard.js tagged posts](https://stackoverflow.com/questions/tagged/billboard.js)
|
|
40
40
|
- [Issue with 'question' label](https://github.com/naver/billboard.js/issues?utf8=%E2%9C%93&q=label%3Aquestion)
|
|
41
41
|
|
|
@@ -89,7 +89,7 @@ You can download the compressed files for production
|
|
|
89
89
|
|
|
90
90
|
### Themes
|
|
91
91
|
> [!NOTE]
|
|
92
|
-
> If you want apply themes, simply load one of the theme css
|
|
92
|
+
> If you want to apply themes, simply load one of the theme css files provided instead of the default css file.
|
|
93
93
|
> - [Screenshot Preview](https://github.com/naver/billboard.js/wiki/Themes)
|
|
94
94
|
|
|
95
95
|
|
|
@@ -121,14 +121,14 @@ You can download the compressed files for production
|
|
|
121
121
|
### Nightly version
|
|
122
122
|
|
|
123
123
|
Nightly version is the latest build from the master branch.
|
|
124
|
-
With nightly, you can try upcoming changes prior the official release.
|
|
124
|
+
With nightly, you can try upcoming changes prior to the official release.
|
|
125
125
|
|
|
126
126
|
- https://github.com/naver/billboard.js/tree/nightly/dist
|
|
127
127
|
|
|
128
128
|
> [!NOTE]
|
|
129
129
|
> The version info will be given as the build datetime: `x.x.x-nightly-yyyymmddhhmmss`
|
|
130
130
|
|
|
131
|
-
There
|
|
131
|
+
There are two ways to install from the `nightly` branch directly.
|
|
132
132
|
```js
|
|
133
133
|
// Specify on 'package.json' file
|
|
134
134
|
"dependencies": {
|
|
@@ -142,9 +142,9 @@ There're two ways to install from `nightly` branch directly.
|
|
|
142
142
|
$ npm install git+https://github.com/naver/billboard.js.git#nightly --save
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
### Next(Release
|
|
145
|
+
### Next (Release Candidate) version
|
|
146
146
|
|
|
147
|
-
Next version is the 'release candidate' build, prior the latest official release.
|
|
147
|
+
Next version is the 'release candidate' build, prior to the latest official release.
|
|
148
148
|
|
|
149
149
|
```sh
|
|
150
150
|
# Run install command from shell
|
|
@@ -176,9 +176,9 @@ If you want to use 'billboard.js' without installation, load files directly from
|
|
|
176
176
|
> [!IMPORTANT]
|
|
177
177
|
> - Basically will work on all SVG and ES6+ supported browsers.
|
|
178
178
|
> - <sup>*</sup>Notes for legacy browsers:
|
|
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)
|
|
180
|
-
> - D3.js dropped
|
|
181
|
-
> -
|
|
179
|
+
> - Recommended to use the `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) instructions.
|
|
180
|
+
> - D3.js has dropped support for legacy browsers since [v6](https://observablehq.com/@d3/d3v6-migration-guide).
|
|
181
|
+
> - Support isn't fully guaranteed.
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
## Dependency by version
|
|
@@ -206,7 +206,7 @@ Load billboard.js after D3.js.
|
|
|
206
206
|
<script src="$YOUR_PATH/billboard.pkgd.js"></script>
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
or
|
|
209
|
+
or by importing ESM.
|
|
210
210
|
> [!TIP]
|
|
211
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)
|
|
212
212
|
|
|
@@ -227,8 +227,8 @@ import "billboard.js/dist/theme/insight.css"
|
|
|
227
227
|
```
|
|
228
228
|
|
|
229
229
|
> [!NOTE]
|
|
230
|
-
> - For migration from C3.js,
|
|
231
|
-
> - If
|
|
230
|
+
> - For migration from C3.js, check out the [migration guide](https://github.com/naver/billboard.js/wiki/How-to-migrate-from-C3.js%3F).
|
|
231
|
+
> - If you have an issue bundling for legacy browsers, check out "[How to bundle for legacy browsers?](https://github.com/naver/billboard.js/wiki/How-to-bundle-for-legacy-browsers%3F)".
|
|
232
232
|
|
|
233
233
|
## Basic usage example
|
|
234
234
|
|
package/dist/billboard.css
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.18.0-next.1
|
|
9
9
|
*/
|
|
10
10
|
/*-- Chart --*/
|
|
11
11
|
.bb svg {
|
|
@@ -47,6 +47,20 @@
|
|
|
47
47
|
fill: #fff;
|
|
48
48
|
font-size: 13px;
|
|
49
49
|
}
|
|
50
|
+
.bb-chart-arc {
|
|
51
|
+
/* Connector line base styles */
|
|
52
|
+
}
|
|
53
|
+
.bb-chart-arc .bb-arc-label-line {
|
|
54
|
+
fill: none;
|
|
55
|
+
stroke-width: 1px;
|
|
56
|
+
pointer-events: none;
|
|
57
|
+
}
|
|
58
|
+
.bb-chart-arc .bb-arc-label-line {
|
|
59
|
+
stroke: #7f7f7f;
|
|
60
|
+
}
|
|
61
|
+
.bb-chart-arc > text.bb-arc-label-line-text {
|
|
62
|
+
fill: #000;
|
|
63
|
+
}
|
|
50
64
|
|
|
51
65
|
/*-- Funnel --*/
|
|
52
66
|
.bb-chart-funnels path {
|