apexcharts 7.9.0 → 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.
- package/README.md +53 -18
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +186 -57
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.esm.js +3737 -10221
- package/dist/apexcharts.full.js +80876 -0
- package/dist/apexcharts.full.min.js +5 -0
- package/dist/apexcharts.js +493 -6776
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +493 -6776
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +1 -1
- package/dist/bar.esm.js +1 -1
- package/dist/bar.js +1 -1
- package/dist/boxPlot.common.js +1 -1
- package/dist/boxPlot.esm.js +1 -1
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +1 -1
- package/dist/candlestick.esm.js +1 -1
- package/dist/candlestick.js +1 -1
- package/dist/column.common.js +1 -1
- package/dist/column.esm.js +1 -1
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +186 -57
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +1 -1
- package/dist/dumbbell.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +1998 -4243
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +2 -2
- package/dist/features/drilldown.esm.js +7 -2
- package/dist/features/drilldown.js +2 -2
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +1 -1
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/exports.js +1 -1
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/highlight-filter.common.js +1 -1
- package/dist/features/highlight-filter.esm.js +1 -1
- package/dist/features/highlight-filter.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +1 -1
- package/dist/features/keyboard.esm.js +1 -1
- package/dist/features/keyboard.js +1 -1
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +2 -2
- package/dist/features/legend.js +2 -2
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +16 -5
- package/dist/features/perspectives.js +2 -2
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +2 -2
- package/dist/features/storyboard.esm.js +16 -5
- package/dist/features/storyboard.js +2 -2
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +1 -1
- package/dist/features/toolbar.esm.js +1 -1
- package/dist/features/toolbar.js +1 -1
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +19 -3
- package/dist/features/trellis.js +2 -2
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +1 -1
- package/dist/features/weave.esm.js +1 -1
- package/dist/features/weave.js +1 -1
- package/dist/full.common.js +5 -0
- package/dist/full.esm.js +24856 -0
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +1 -1
- package/dist/histogram.esm.js +1 -1
- package/dist/icicle.common.js +1 -1
- package/dist/icicle.esm.js +1 -1
- package/dist/icicle.js +1 -1
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +27 -3272
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +1 -1
- package/dist/rangeBar.esm.js +1 -1
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +2 -2
- package/dist/treemap.esm.js +5 -2
- package/dist/treemap.js +2 -2
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +1 -1
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +35 -3299
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +1 -1
- package/dist/waterfall.esm.js +1 -1
- package/package.json +45 -3
- package/src/apexcharts.js +81 -29
- package/src/charts/Treemap.js +10 -1
- package/src/charts/Violin.js +40 -2
- package/src/entries/core-umd.js +5 -4
- package/src/entries/full.js +76 -65
- package/src/entries/icicle.js +6 -4
- package/src/entries/raincloud.js +5 -5
- package/src/entries/standard.js +75 -0
- package/src/entries/sunburst.js +3 -1
- package/src/entries/unit.js +3 -1
- package/src/entries/violin.js +7 -1
- package/src/features/all.js +3 -6
- package/src/features/drilldown.js +14 -0
- package/src/features/dumbbell.js +9 -2
- package/src/features/marks.js +1 -1
- package/src/features/raincloud.js +6 -4
- package/src/features/streamgraph.js +9 -2
- package/src/features/waterfall.js +9 -2
- package/src/modules/ChartFactory.js +76 -21
- package/src/modules/Core.js +30 -9
- package/src/modules/Data.js +36 -22
- package/src/modules/Filters.js +11 -1
- package/src/modules/RendererController.js +7 -5
- package/src/modules/drilldown/Drilldown.js +10 -1
- package/src/modules/license/LicenseEnforcer.js +29 -7
- package/src/modules/settings/Options.js +1 -1
- package/src/modules/settings/TypeAliases.js +50 -4
- package/src/modules/trellis/TrellisExports.js +1 -1
- package/src/pictograms/cdn.js +1 -0
- package/src/ssr/index.js +1 -1
- package/src/unit-shapes/cdn.js +1 -0
- package/src/utils/MissingFeature.js +47 -0
- 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
|
|
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
|
|
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
|
|
144
|
-
everyday features.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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/
|
|
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
|
|
192
|
-
|
|
193
|
-
|
|
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
|
|
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/
|
|
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` |
|