apexcharts 7.9.1 → 8.0.0-rc.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 (194) hide show
  1. package/README.md +53 -18
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +136 -28
  4. package/dist/apexcharts.core.min.js +2 -2
  5. package/dist/apexcharts.esm.js +3733 -10219
  6. package/dist/apexcharts.full.js +80876 -0
  7. package/dist/apexcharts.full.min.js +5 -0
  8. package/dist/apexcharts.js +427 -6733
  9. package/dist/apexcharts.min.js +2 -2
  10. package/dist/apexcharts.ssr.common.js +2 -2
  11. package/dist/apexcharts.ssr.esm.js +427 -6733
  12. package/dist/area.common.js +1 -1
  13. package/dist/area.esm.js +1 -1
  14. package/dist/bar.common.js +1 -1
  15. package/dist/bar.esm.js +1 -1
  16. package/dist/bar.js +1 -1
  17. package/dist/boxPlot.common.js +1 -1
  18. package/dist/boxPlot.esm.js +1 -1
  19. package/dist/bubble.common.js +1 -1
  20. package/dist/bubble.esm.js +1 -1
  21. package/dist/candlestick.common.js +1 -1
  22. package/dist/candlestick.esm.js +1 -1
  23. package/dist/candlestick.js +1 -1
  24. package/dist/column.common.js +1 -1
  25. package/dist/column.esm.js +1 -1
  26. package/dist/core.common.js +2 -2
  27. package/dist/core.esm.js +136 -28
  28. package/dist/donut.common.js +1 -1
  29. package/dist/donut.esm.js +1 -1
  30. package/dist/dumbbell.common.js +1 -1
  31. package/dist/dumbbell.esm.js +1 -1
  32. package/dist/features/all.common.js +2 -2
  33. package/dist/features/all.esm.js +1997 -4242
  34. package/dist/features/annotations.common.js +1 -1
  35. package/dist/features/annotations.esm.js +1 -1
  36. package/dist/features/annotations.js +1 -1
  37. package/dist/features/context-menu.common.js +1 -1
  38. package/dist/features/context-menu.esm.js +1 -1
  39. package/dist/features/context-menu.js +1 -1
  40. package/dist/features/drilldown.common.js +2 -2
  41. package/dist/features/drilldown.esm.js +7 -2
  42. package/dist/features/drilldown.js +2 -2
  43. package/dist/features/dumbbell.common.js +1 -1
  44. package/dist/features/dumbbell.esm.js +1 -1
  45. package/dist/features/dumbbell.js +1 -1
  46. package/dist/features/exports.common.js +1 -1
  47. package/dist/features/exports.esm.js +1 -1
  48. package/dist/features/exports.js +1 -1
  49. package/dist/features/facet.common.js +1 -1
  50. package/dist/features/facet.esm.js +1 -1
  51. package/dist/features/facet.js +1 -1
  52. package/dist/features/highlight-filter.common.js +1 -1
  53. package/dist/features/highlight-filter.esm.js +1 -1
  54. package/dist/features/highlight-filter.js +1 -1
  55. package/dist/features/history.common.js +1 -1
  56. package/dist/features/history.esm.js +1 -1
  57. package/dist/features/history.js +1 -1
  58. package/dist/features/ink.common.js +1 -1
  59. package/dist/features/ink.esm.js +1 -1
  60. package/dist/features/ink.js +1 -1
  61. package/dist/features/keyboard.common.js +1 -1
  62. package/dist/features/keyboard.esm.js +1 -1
  63. package/dist/features/keyboard.js +1 -1
  64. package/dist/features/legend.common.js +1 -1
  65. package/dist/features/legend.esm.js +1 -1
  66. package/dist/features/legend.js +1 -1
  67. package/dist/features/link.common.js +1 -1
  68. package/dist/features/link.esm.js +1 -1
  69. package/dist/features/link.js +1 -1
  70. package/dist/features/marks.common.js +1 -1
  71. package/dist/features/marks.esm.js +1 -1
  72. package/dist/features/marks.js +1 -1
  73. package/dist/features/measure.common.js +1 -1
  74. package/dist/features/measure.esm.js +1 -1
  75. package/dist/features/measure.js +1 -1
  76. package/dist/features/morph.common.js +1 -1
  77. package/dist/features/morph.esm.js +1 -1
  78. package/dist/features/morph.js +1 -1
  79. package/dist/features/perspectives.common.js +1 -1
  80. package/dist/features/perspectives.esm.js +1 -1
  81. package/dist/features/perspectives.js +1 -1
  82. package/dist/features/raincloud.common.js +1 -1
  83. package/dist/features/raincloud.esm.js +1 -1
  84. package/dist/features/raincloud.js +1 -1
  85. package/dist/features/renderer-canvas.common.js +1 -1
  86. package/dist/features/renderer-canvas.esm.js +1 -1
  87. package/dist/features/renderer-canvas.js +1 -1
  88. package/dist/features/stats.common.js +1 -1
  89. package/dist/features/stats.esm.js +1 -1
  90. package/dist/features/stats.js +1 -1
  91. package/dist/features/storyboard.common.js +1 -1
  92. package/dist/features/storyboard.esm.js +1 -1
  93. package/dist/features/storyboard.js +1 -1
  94. package/dist/features/streamgraph.common.js +1 -1
  95. package/dist/features/streamgraph.esm.js +1 -1
  96. package/dist/features/streamgraph.js +1 -1
  97. package/dist/features/toolbar.common.js +1 -1
  98. package/dist/features/toolbar.esm.js +1 -1
  99. package/dist/features/toolbar.js +1 -1
  100. package/dist/features/trellis.common.js +2 -2
  101. package/dist/features/trellis.esm.js +9 -3
  102. package/dist/features/trellis.js +2 -2
  103. package/dist/features/waterfall.common.js +1 -1
  104. package/dist/features/waterfall.esm.js +1 -1
  105. package/dist/features/waterfall.js +1 -1
  106. package/dist/features/weave.common.js +1 -1
  107. package/dist/features/weave.esm.js +1 -1
  108. package/dist/features/weave.js +1 -1
  109. package/dist/full.common.js +5 -0
  110. package/dist/full.esm.js +24856 -0
  111. package/dist/heatmap.common.js +1 -1
  112. package/dist/heatmap.esm.js +1 -1
  113. package/dist/heatmap.js +1 -1
  114. package/dist/histogram.common.js +1 -1
  115. package/dist/histogram.esm.js +1 -1
  116. package/dist/icicle.common.js +1 -1
  117. package/dist/icicle.esm.js +1 -1
  118. package/dist/icicle.js +1 -1
  119. package/dist/line.common.js +1 -1
  120. package/dist/line.esm.js +1 -1
  121. package/dist/line.js +1 -1
  122. package/dist/pictograms.common.js +1 -1
  123. package/dist/pictograms.esm.js +1 -1
  124. package/dist/pictograms.js +1 -1
  125. package/dist/pie.common.js +1 -1
  126. package/dist/pie.esm.js +1 -1
  127. package/dist/pie.js +1 -1
  128. package/dist/polarArea.common.js +1 -1
  129. package/dist/polarArea.esm.js +1 -1
  130. package/dist/radar.common.js +1 -1
  131. package/dist/radar.esm.js +1 -1
  132. package/dist/radar.js +1 -1
  133. package/dist/radialBar.common.js +1 -1
  134. package/dist/radialBar.esm.js +1 -1
  135. package/dist/radialBar.js +1 -1
  136. package/dist/raincloud.common.js +2 -2
  137. package/dist/raincloud.esm.js +27 -3272
  138. package/dist/rangeArea.common.js +1 -1
  139. package/dist/rangeArea.esm.js +1 -1
  140. package/dist/rangeBar.common.js +1 -1
  141. package/dist/rangeBar.esm.js +1 -1
  142. package/dist/scatter.common.js +1 -1
  143. package/dist/scatter.esm.js +1 -1
  144. package/dist/streamgraph.common.js +1 -1
  145. package/dist/streamgraph.esm.js +1 -1
  146. package/dist/sunburst.common.js +1 -1
  147. package/dist/sunburst.esm.js +1 -1
  148. package/dist/sunburst.js +1 -1
  149. package/dist/treemap.common.js +2 -2
  150. package/dist/treemap.esm.js +5 -2
  151. package/dist/treemap.js +2 -2
  152. package/dist/unit-shapes.common.js +1 -1
  153. package/dist/unit-shapes.esm.js +1 -1
  154. package/dist/unit-shapes.js +1 -1
  155. package/dist/unit.common.js +1 -1
  156. package/dist/unit.esm.js +1 -1
  157. package/dist/unit.js +1 -1
  158. package/dist/violin.common.js +2 -2
  159. package/dist/violin.esm.js +35 -3299
  160. package/dist/violin.js +2 -2
  161. package/dist/waterfall.common.js +1 -1
  162. package/dist/waterfall.esm.js +1 -1
  163. package/package.json +44 -3
  164. package/src/apexcharts.js +68 -6
  165. package/src/charts/Treemap.js +10 -1
  166. package/src/charts/Violin.js +40 -2
  167. package/src/entries/core-umd.js +5 -4
  168. package/src/entries/full.js +74 -70
  169. package/src/entries/icicle.js +6 -4
  170. package/src/entries/raincloud.js +5 -5
  171. package/src/entries/standard.js +75 -0
  172. package/src/entries/sunburst.js +3 -1
  173. package/src/entries/unit.js +3 -1
  174. package/src/entries/violin.js +7 -1
  175. package/src/features/all.js +3 -6
  176. package/src/features/drilldown.js +14 -0
  177. package/src/features/dumbbell.js +9 -2
  178. package/src/features/marks.js +1 -1
  179. package/src/features/raincloud.js +6 -4
  180. package/src/features/streamgraph.js +9 -2
  181. package/src/features/waterfall.js +9 -2
  182. package/src/modules/ChartFactory.js +56 -21
  183. package/src/modules/Core.js +30 -9
  184. package/src/modules/Data.js +36 -17
  185. package/src/modules/Filters.js +11 -1
  186. package/src/modules/drilldown/Drilldown.js +10 -1
  187. package/src/modules/settings/Options.js +1 -1
  188. package/src/modules/settings/TypeAliases.js +50 -4
  189. package/src/modules/trellis/TrellisExports.js +1 -1
  190. package/src/pictograms/cdn.js +1 -0
  191. package/src/ssr/index.js +1 -1
  192. package/src/unit-shapes/cdn.js +1 -0
  193. package/src/utils/MissingFeature.js +18 -6
  194. package/types/apexcharts.d.ts +27 -6
package/README.md CHANGED
@@ -24,9 +24,9 @@
24
24
 
25
25
  ## Why ApexCharts
26
26
 
27
- - **18+ chart types** out of the box: line, area, bar, column, pie, donut, radar, heatmap, treemap, candlestick, boxplot, violin, funnel, pyramid, gauge, unit (dot / pictogram / waffle / beeswarm) and more
27
+ - **18+ chart types**: line, area, bar, column, pie, donut, radar, heatmap, treemap, candlestick, boxplot, funnel, pyramid, gauge and more in the default bundle, with unit (dot / pictogram / waffle / beeswarm), violin, sunburst, icicle, waterfall, dumbbell, streamgraph and raincloud one import away
28
28
  - **SSR support** for Next.js, Nuxt, SvelteKit, Astro, and other meta-frameworks: render real SVG on the server, hydrate on the client
29
- - **Tree-shakable**: import only the chart types and features you need; typical bundles are 30-60% smaller than the full build
29
+ - **Tree-shakable**: import only the chart types and features you need; typical bundles are 30-60% smaller than the default bundle
30
30
  - **TypeScript-first**: full type definitions ship with the package, no `@types/*` install needed
31
31
  - **Zero runtime dependencies**: no React/Vue/D3 required; works in any framework or vanilla JS
32
32
  - **Accessibility**: keyboard navigation and ARIA support built in
@@ -140,17 +140,37 @@ No more `dynamic(() => import(...), { ssr: false })` workarounds: the chart rend
140
140
 
141
141
  ## Tree-shaking: ship only what you use
142
142
 
143
- `import ApexCharts from 'apexcharts'` gives you every chart type and the
144
- everyday features. Nine optional features ship outside it and are imported
145
- explicitly (marked **opt-in** below); each warns in the console if its config is
146
- set but the feature is absent. Adding one to the default bundle is a single
147
- line, and the two share one copy of the core:
143
+ `import ApexCharts from 'apexcharts'` gives you the standard chart types and the
144
+ everyday features. The rest ship outside it and are imported explicitly (marked
145
+ **opt-in** below); a chart that asks for one that is absent logs a console line
146
+ naming the import. Adding one to the default bundle is a single line, and the
147
+ two share one copy of the core:
148
148
 
149
149
  ```js
150
150
  import ApexCharts from 'apexcharts'
151
+ import 'apexcharts/sunburst'
151
152
  import 'apexcharts/features/trellis'
152
153
  ```
153
154
 
155
+ Or take everything at once, every chart type and feature:
156
+
157
+ ```js
158
+ import ApexCharts from 'apexcharts/full'
159
+ ```
160
+
161
+ | Outside the default bundle | Bundler | Script tag (after the ApexCharts script) |
162
+ |---|---|---|
163
+ | unit (and waffle, beeswarm) | `apexcharts/unit` | `dist/unit.js` |
164
+ | sunburst | `apexcharts/sunburst` | `dist/sunburst.js` |
165
+ | violin | `apexcharts/violin` | `dist/violin.js` |
166
+ | icicle | `apexcharts/icicle` | `dist/icicle.js` |
167
+ | raincloud | `apexcharts/raincloud` | `dist/violin.js`, then `dist/features/raincloud.js` |
168
+ | waterfall, dumbbell, streamgraph | `apexcharts/features/waterfall` (and so on) | `dist/features/waterfall.js` (and so on) |
169
+ | drilldown | `apexcharts/features/drilldown` | `dist/features/drilldown.js` |
170
+ | trellis, measure, link, ink, storyboard, perspectives, history, context-menu, highlight-filter, renderer-canvas | `apexcharts/features/<name>` | `dist/features/<name>.js` |
171
+
172
+ Server rendering takes the same imports next to `apexcharts/ssr`.
173
+
154
174
  For a smaller bundle still, start from `apexcharts/core` and add only what you
155
175
  need:
156
176
 
@@ -162,7 +182,10 @@ import 'apexcharts/line'
162
182
  import 'apexcharts/bar'
163
183
  // import 'apexcharts/area'
164
184
  // import 'apexcharts/scatter'
165
- // import 'apexcharts/unit' // dot / pictogram / waffle / beeswarm (premium; 'waffle' aliases this)
185
+ // import 'apexcharts/unit' // dot / pictogram / waffle / beeswarm (premium, opt-in; 'waffle' aliases this)
186
+ // import 'apexcharts/sunburst' // hierarchical rings (opt-in)
187
+ // import 'apexcharts/violin' // distributions, drawn on 'apexcharts/bar' (opt-in)
188
+ // import 'apexcharts/icicle' // hierarchical bands (opt-in)
166
189
 
167
190
  // Optional features
168
191
  import 'apexcharts/features/legend'
@@ -170,7 +193,7 @@ import 'apexcharts/features/toolbar' // zoom/pan toolbar
170
193
  // import 'apexcharts/features/exports' // SVG/PNG/CSV download
171
194
  // import 'apexcharts/features/annotations'
172
195
  // import 'apexcharts/features/keyboard' // keyboard navigation
173
- // import 'apexcharts/features/drilldown' // hierarchical drill-down
196
+ // import 'apexcharts/features/drilldown' // hierarchical drill-down (opt-in)
174
197
  // import 'apexcharts/features/morph' // animated chart-type morphs
175
198
  // import 'apexcharts/features/history' // undo/redo (premium, opt-in)
176
199
  // import 'apexcharts/features/perspectives' // shareable view state (premium, opt-in)
@@ -185,12 +208,23 @@ import 'apexcharts/features/toolbar' // zoom/pan toolbar
185
208
  // import 'apexcharts/features/renderer-canvas' // canvas series renderer (opt-in)
186
209
  // import 'apexcharts/features/trellis' // small multiples (premium, opt-in)
187
210
  // import 'apexcharts/features/highlight-filter' // whole faded, part solid in front (premium, opt-in)
188
- // import 'apexcharts/features/raincloud' // raincloud chart type statistics (premium, opt-in)
211
+ // import 'apexcharts/features/waterfall' // also 'dumbbell': on 'apexcharts/bar' (opt-in)
212
+ // import 'apexcharts/features/streamgraph' // on 'apexcharts/line' (opt-in)
213
+ // import 'apexcharts/raincloud' // raincloud: violin renderer + its statistics, on 'apexcharts/bar' (premium, opt-in)
189
214
  ```
190
215
 
191
- A page without a bundler gets the same choice. `apexcharts.js` stays
192
- batteries-included, and `apexcharts.core.min.js` is the lean baseline you build
193
- up from:
216
+ A page without a bundler gets the same choice, from three baselines:
217
+
218
+ | File | What it has |
219
+ |---|---|
220
+ | `apexcharts.min.js` | The default bundle: the standard chart types and everyday features. Add an opt-in type or feature as its own file after it. |
221
+ | `apexcharts.full.min.js` | Everything: every chart type and feature, and the unit-shape and pictogram catalogs. No add-on needed. |
222
+ | `apexcharts.core.min.js` | The chart class alone: add each chart type and feature you use as its own file. |
223
+
224
+ ```html
225
+ <script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/apexcharts.min.js"></script>
226
+ <script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/sunburst.js"></script>
227
+ ```
194
228
 
195
229
  ```html
196
230
  <script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/apexcharts.core.min.js"></script>
@@ -198,8 +232,9 @@ up from:
198
232
  <script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/features/legend.js"></script>
199
233
  ```
200
234
 
201
- Opt-in features work the same way there: load `dist/features/<name>.js` after
202
- whichever bundle the page already has.
235
+ Opt-in types and features work the same way on any of them: load their file
236
+ after whichever bundle the page already has. Order matters: an add-on loaded
237
+ before the ApexCharts script has nothing to register onto.
203
238
 
204
239
  See the [tree-shaking guide](https://apexcharts.com/docs/tree-shaking/) for the complete list of entry points.
205
240
 
@@ -219,7 +254,7 @@ new ApexCharts(el, {
219
254
  }).render()
220
255
  ```
221
256
 
222
- Shapes are composable (`outlined(heart)` traces it instead of filling it, `heart.with({ order: 'cols' })` changes where each series band lands), and `preview(heart, { series })` renders one to an SVG string with no chart and no DOM, for docs and build-time images. From a script tag, `dist/unit-shapes.js` exposes the same kit as `ApexUnitShapes` and registers every shape by name.
257
+ Shapes are composable (`outlined(heart)` traces it instead of filling it, `heart.with({ order: 'cols' })` changes where each series band lands), and `preview(heart, { series })` renders one to an SVG string with no chart and no DOM, for docs and build-time images. From a script tag, `dist/unit-shapes.js` (after `dist/unit.js`) exposes the same kit as `ApexUnitShapes` and registers every shape by name; `apexcharts.full.min.js` registers them all too.
223
258
 
224
259
  **The shape you want is probably not one of the 39, and it does not have to be.** `positions` takes any function of the marks and the plot rectangle, so there are three ways in, none of which needs a release from us:
225
260
 
@@ -239,8 +274,8 @@ Most of ApexCharts is free and open source. A small set of advanced features are
239
274
 
240
275
  | Feature | Enabled by |
241
276
  |---|---|
242
- | Unit chart type (dot / pictogram / waffle / beeswarm) | `chart.type: 'unit'` / `chart.type: 'waffle'` |
243
- | Raincloud chart type (half-density + box + raw points) | `chart.type: 'raincloud'` (needs `apexcharts/features/raincloud`, not in the default bundle) |
277
+ | Unit chart type (dot / pictogram / waffle / beeswarm) | `chart.type: 'unit'` / `chart.type: 'waffle'` (needs `apexcharts/unit`, not in the default bundle) |
278
+ | Raincloud chart type (half-density + box + raw points) | `chart.type: 'raincloud'` (needs `apexcharts/raincloud`, not in the default bundle) |
244
279
  | Storyboard (scrollytelling) | `chart.storyboard.bind(...)` |
245
280
  | Linked views / crossfilter | `chart.link.enabled` / `chart.link.dimension` / `ApexCharts.crossfilter()` |
246
281
  | Ink layer (on-chart annotation editing) | `chart.ink.enabled` |