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.
Files changed (133) hide show
  1. package/CONTRIBUTING.md +12 -12
  2. package/README.md +12 -12
  3. package/dist/billboard.css +15 -1
  4. package/dist/billboard.js +769 -310
  5. package/dist/billboard.min.css +2 -2
  6. package/dist/billboard.min.js +10 -10
  7. package/dist/billboard.pkgd.js +777 -318
  8. package/dist/billboard.pkgd.min.js +21 -21
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  11. package/dist/plugin/billboardjs-plugin-sparkline.js +16 -7
  12. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  13. package/dist/plugin/billboardjs-plugin-stanford.js +18 -9
  14. package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
  15. package/dist/plugin/billboardjs-plugin-tableview.js +16 -8
  16. package/dist/plugin/billboardjs-plugin-tableview.min.js +3 -3
  17. package/dist/plugin/billboardjs-plugin-textoverlap.js +15 -7
  18. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +3 -3
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +16 -7
  22. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +26 -17
  24. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +10 -10
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +16 -8
  26. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +15 -7
  28. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +3 -3
  29. package/dist/theme/dark.css +15 -1
  30. package/dist/theme/dark.min.css +2 -2
  31. package/dist/theme/datalab.css +15 -1
  32. package/dist/theme/datalab.min.css +2 -2
  33. package/dist/theme/graph.css +15 -1
  34. package/dist/theme/graph.min.css +2 -2
  35. package/dist/theme/insight.css +15 -1
  36. package/dist/theme/insight.min.css +2 -2
  37. package/dist/theme/modern.css +15 -1
  38. package/dist/theme/modern.min.css +2 -2
  39. package/dist-esm/billboard.js +957 -357
  40. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  41. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -2
  42. package/dist-esm/plugin/billboardjs-plugin-stanford.js +5 -4
  43. package/dist-esm/plugin/billboardjs-plugin-tableview.js +22 -12
  44. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  45. package/package.json +35 -34
  46. package/src/Chart/Chart.ts +1 -1
  47. package/src/Chart/api/chart.ts +5 -5
  48. package/src/Chart/api/data.ts +2 -1
  49. package/src/Chart/api/export.ts +1 -1
  50. package/src/Chart/api/flow.ts +1 -1
  51. package/src/Chart/api/load.ts +3 -3
  52. package/src/Chart/api/subchart.ts +3 -3
  53. package/src/Chart/api/tooltip.ts +1 -1
  54. package/src/Chart/api/zoom.ts +1 -1
  55. package/src/ChartInternal/Axis/Axis.ts +1 -1
  56. package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
  57. package/src/ChartInternal/ChartInternal.ts +3 -2
  58. package/src/ChartInternal/data/IData.ts +3 -0
  59. package/src/ChartInternal/data/convert.helper.ts +1 -1
  60. package/src/ChartInternal/data/convert.ts +1 -1
  61. package/src/ChartInternal/data/data.ts +97 -14
  62. package/src/ChartInternal/data/load.ts +8 -8
  63. package/src/ChartInternal/interactions/eventrect.ts +15 -5
  64. package/src/ChartInternal/interactions/flow.ts +1 -1
  65. package/src/ChartInternal/interactions/interaction.ts +1 -1
  66. package/src/ChartInternal/interactions/zoom.ts +1 -1
  67. package/src/ChartInternal/internals/color.ts +23 -6
  68. package/src/ChartInternal/internals/domain.ts +13 -1
  69. package/src/ChartInternal/internals/format.ts +1 -1
  70. package/src/ChartInternal/internals/grid.ts +1 -1
  71. package/src/ChartInternal/internals/legend.ts +2 -2
  72. package/src/ChartInternal/internals/scale.ts +6 -6
  73. package/src/ChartInternal/internals/selection.ts +1 -1
  74. package/src/ChartInternal/internals/style.ts +3 -3
  75. package/src/ChartInternal/internals/text.arc.ts +304 -0
  76. package/src/ChartInternal/internals/text.ts +8 -7
  77. package/src/ChartInternal/internals/tooltip.ts +23 -15
  78. package/src/ChartInternal/shape/arc.ts +167 -64
  79. package/src/ChartInternal/shape/area.ts +2 -2
  80. package/src/ChartInternal/shape/bar.ts +2 -2
  81. package/src/ChartInternal/shape/candlestick.ts +3 -3
  82. package/src/ChartInternal/shape/funnel.ts +1 -1
  83. package/src/ChartInternal/shape/line.ts +4 -4
  84. package/src/ChartInternal/shape/point.common.ts +1 -1
  85. package/src/ChartInternal/shape/radar.ts +2 -2
  86. package/src/ChartInternal/shape/shape.ts +3 -3
  87. package/src/ChartInternal/shape/treemap.ts +19 -5
  88. package/src/Plugin/stanford/Options.ts +2 -2
  89. package/src/Plugin/tableview/Options.ts +1 -1
  90. package/src/config/Options/axis/axis.ts +7 -7
  91. package/src/config/Options/axis/x.ts +6 -6
  92. package/src/config/Options/axis/y.ts +4 -4
  93. package/src/config/Options/axis/y2.ts +16 -3
  94. package/src/config/Options/common/color.ts +2 -2
  95. package/src/config/Options/common/legend.ts +5 -5
  96. package/src/config/Options/common/main.ts +23 -23
  97. package/src/config/Options/common/point.ts +3 -3
  98. package/src/config/Options/common/tooltip.ts +13 -13
  99. package/src/config/Options/data/axis.ts +31 -6
  100. package/src/config/Options/data/data.ts +44 -44
  101. package/src/config/Options/data/selection.ts +4 -4
  102. package/src/config/Options/interaction/interaction.ts +2 -1
  103. package/src/config/Options/interaction/subchart.ts +2 -2
  104. package/src/config/Options/interaction/zoom.ts +4 -4
  105. package/src/config/Options/shape/arc.ts +4 -4
  106. package/src/config/Options/shape/area.ts +1 -1
  107. package/src/config/Options/shape/bar.ts +4 -4
  108. package/src/config/Options/shape/bubble.ts +2 -2
  109. package/src/config/Options/shape/candlestick.ts +1 -1
  110. package/src/config/Options/shape/donut.ts +34 -3
  111. package/src/config/Options/shape/gauge.ts +36 -4
  112. package/src/config/Options/shape/line.ts +1 -1
  113. package/src/config/Options/shape/pie.ts +34 -3
  114. package/src/config/Options/shape/polar.ts +35 -4
  115. package/src/config/Options/shape/radar.ts +1 -1
  116. package/src/config/Options/shape/scatter.ts +1 -1
  117. package/src/config/Options/shape/treemap.ts +31 -5
  118. package/src/config/classes.ts +1 -0
  119. package/src/core.ts +1 -1
  120. package/src/module/Cache.ts +3 -3
  121. package/src/module/generator.ts +1 -1
  122. package/src/module/util.ts +31 -20
  123. package/src/module/worker.ts +3 -3
  124. package/src/scss/billboard.scss +15 -0
  125. package/src/scss/theme/dark.scss +15 -0
  126. package/src/scss/theme/datalab.scss +15 -0
  127. package/src/scss/theme/graph.scss +15 -0
  128. package/src/scss/theme/insight.scss +15 -0
  129. package/src/scss/theme/modern.scss +15 -0
  130. package/types/axis.d.ts +3 -3
  131. package/types/chart.d.ts +4 -4
  132. package/types/options.d.ts +22 -9
  133. 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 kinds of contribution.
3
- We believe that our project can grow with your interests in helping others' necessities.
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 your start, please read the below instructions carefully.
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 not break the current format, you'll be forced to follow our commit log guidelines.
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 by after the 1st commit. Usually for applying code review changes.
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` on your repository
106
- 2. Create a new branch from your billboard.js `master` branch (and be sure to be always up-to-date)
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 is possible)
109
- 5. Run `npm run lint` for linting and code style check. (update until without any error or warnings)
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 well enough to be accepted, then it will be merged to our branch.
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, checkout the previous posts or create a new one at:
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 file provided instead of the default css file.
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're two ways to install from `nightly` branch directly.
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 Canditate) version
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) instruction.
180
- > - D3.js dropped the support of legacy browsers since [v6](https://observablehq.com/@d3/d3v6-migration-guide).
181
- > - The support isn't fully guaranteed.
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 use importing ESM.
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, checkout the [migration guide](https://github.com/naver/billboard.js/wiki/How-to-migrate-from-C3.js%3F).
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)".
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
 
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.17.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 {