apexcharts 6.10.0 → 7.0.0
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 +47 -9
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +30126 -0
- package/dist/apexcharts.core.min.js +5 -0
- package/dist/apexcharts.css +378 -1
- package/dist/apexcharts.esm.js +12364 -45603
- package/dist/apexcharts.js +2140 -5951
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +2140 -5951
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +86 -8
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +362 -121
- package/dist/bar.js +5 -0
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +321 -120
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +86 -8
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +321 -120
- package/dist/candlestick.js +5 -0
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +362 -121
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +1004 -156
- package/dist/donut.common.js +2 -2
- package/dist/donut.esm.js +1 -1
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +1697 -7302
- package/dist/features/annotations.common.js +2 -2
- package/dist/features/annotations.esm.js +66 -10
- package/dist/features/annotations.js +5 -0
- package/dist/features/context-menu.common.js +2 -2
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +5 -0
- package/dist/features/drilldown.common.js +2 -2
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +5 -0
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +1 -1
- package/dist/features/exports.js +5 -0
- package/dist/features/facet.common.js +2 -2
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +5 -0
- package/dist/features/history.common.js +2 -2
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +5 -0
- package/dist/features/ink.common.js +2 -2
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +5 -0
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +18 -3
- package/dist/features/keyboard.js +5 -0
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +39 -13
- package/dist/features/legend.js +5 -0
- package/dist/features/link.common.js +2 -2
- package/dist/features/link.esm.js +1 -1
- package/dist/features/link.js +5 -0
- package/dist/features/marks.common.js +2 -2
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +5 -0
- package/dist/features/measure.common.js +2 -2
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +5 -0
- package/dist/features/morph.common.js +2 -2
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +5 -0
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +4 -1
- package/dist/features/perspectives.js +5 -0
- package/dist/features/renderer-canvas.common.js +2 -2
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +5 -0
- package/dist/features/stats.common.js +2 -2
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +5 -0
- package/dist/features/storyboard.common.js +2 -2
- package/dist/features/storyboard.esm.js +4 -1
- package/dist/features/storyboard.js +5 -0
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +1 -1
- package/dist/features/toolbar.js +5 -0
- package/dist/features/trellis.common.js +5 -0
- package/dist/features/trellis.esm.js +4640 -0
- package/dist/features/trellis.js +5 -0
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +1 -1
- package/dist/features/weave.js +5 -0
- package/dist/heatmap.common.js +2 -2
- package/dist/heatmap.esm.js +11 -5
- package/dist/heatmap.js +5 -0
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +362 -121
- package/dist/line.common.js +2 -2
- package/dist/line.esm.js +86 -8
- package/dist/line.js +5 -0
- package/dist/pictograms.common.js +5 -0
- package/dist/pictograms.esm.js +183 -0
- package/dist/pictograms.js +5 -0
- package/dist/pie.common.js +2 -2
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +5 -0
- package/dist/polarArea.common.js +2 -2
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +2 -2
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +5 -0
- package/dist/radialBar.common.js +2 -2
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +5 -0
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +86 -8
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +362 -121
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +86 -8
- package/dist/sunburst.common.js +2 -2
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +5 -0
- package/dist/treemap.common.js +2 -2
- package/dist/treemap.esm.js +11 -5
- package/dist/treemap.js +5 -0
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +2 -2
- package/dist/unit.common.js +2 -2
- package/dist/unit.esm.js +296 -67
- package/dist/unit.js +5 -0
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +321 -120
- package/dist/violin.js +5 -0
- package/package.json +11 -1
- package/src/apexcharts.js +278 -13
- package/src/assets/apexcharts.css +378 -1
- package/src/charts/Bar.js +296 -46
- package/src/charts/BarStacked.js +81 -2
- package/src/charts/Line.js +155 -16
- package/src/charts/Unit.js +320 -75
- package/src/charts/common/bar/DataLabels.js +131 -38
- package/src/charts/common/bar/Helpers.js +102 -78
- package/src/charts/common/line/Helpers.js +5 -2
- package/src/charts/common/treemap/Helpers.js +19 -10
- package/src/entries/core-umd.js +47 -0
- package/src/entries/full.js +23 -0
- package/src/features/all.js +19 -12
- package/src/features/context-menu.js +11 -0
- package/src/features/history.js +12 -0
- package/src/features/ink.js +12 -2
- package/src/features/link.js +10 -0
- package/src/features/measure.js +10 -1
- package/src/features/perspectives.js +15 -0
- package/src/features/renderer-canvas.js +13 -0
- package/src/features/storyboard.js +15 -1
- package/src/features/trellis.js +40 -0
- package/src/modules/Animations.js +6 -1
- package/src/modules/ChartFactory.js +3 -1
- package/src/modules/CoreUtils.js +28 -20
- package/src/modules/Graphics.js +32 -2
- package/src/modules/Markers.js +257 -5
- package/src/modules/Range.js +12 -0
- package/src/modules/RendererController.js +4 -2
- package/src/modules/Scales.js +113 -10
- package/src/modules/Series.js +42 -0
- package/src/modules/UnitMarkRegistry.js +130 -0
- package/src/modules/accessibility/KeyboardNavigation.js +22 -2
- package/src/modules/animations/DataLabelTransition.js +200 -68
- package/src/modules/animations/StreamScroll.js +8 -0
- package/src/modules/annotations/Annotations.js +8 -2
- package/src/modules/annotations/Helpers.js +114 -15
- package/src/modules/helpers/Destroy.js +5 -0
- package/src/modules/helpers/InitCtxVariables.js +33 -1
- package/src/modules/legend/HeatmapGradientLegend.js +39 -10
- package/src/modules/legend/Helpers.js +21 -4
- package/src/modules/license/LicenseEnforcer.js +11 -0
- package/src/modules/settings/Defaults.js +0 -1
- package/src/modules/settings/Globals.js +15 -0
- package/src/modules/settings/Options.js +196 -6
- package/src/modules/tooltip/Intersect.js +11 -6
- package/src/modules/tooltip/Labels.js +1 -1
- package/src/modules/tooltip/Marker.js +1 -5
- package/src/modules/tooltip/Position.js +3 -1
- package/src/modules/tooltip/Tooltip.js +51 -11
- package/src/modules/tooltip/Utils.js +28 -0
- package/src/modules/trellis/Trellis.js +1382 -0
- package/src/modules/trellis/TrellisChrome.js +406 -0
- package/src/modules/trellis/TrellisExports.js +336 -0
- package/src/modules/trellis/TrellisFrames.js +306 -0
- package/src/modules/trellis/TrellisLayout.js +142 -0
- package/src/modules/trellis/TrellisScales.js +296 -0
- package/src/modules/trellis/TrellisSplit.js +516 -0
- package/src/modules/trellis/TrellisSync.js +331 -0
- package/src/modules/trellis/TrellisTooltip.js +275 -0
- package/src/modules/trellis/TrellisVirtual.js +377 -0
- package/src/modules/trellis/pivotRows.js +130 -0
- package/src/pictograms/catalog.js +40 -0
- package/src/pictograms/cdn.js +25 -0
- package/src/pictograms/engine/mark.js +53 -0
- package/src/pictograms/index.js +58 -0
- package/src/pictograms/marks/bag.js +13 -0
- package/src/pictograms/marks/book.js +13 -0
- package/src/pictograms/marks/bulb.js +17 -0
- package/src/pictograms/marks/car.js +13 -0
- package/src/pictograms/marks/cup.js +13 -0
- package/src/pictograms/marks/droplet.js +13 -0
- package/src/pictograms/marks/heart.js +13 -0
- package/src/pictograms/marks/house.js +13 -0
- package/src/pictograms/marks/person.js +20 -0
- package/src/pictograms/marks/plane.js +13 -0
- package/src/pictograms/marks/star.js +13 -0
- package/src/pictograms/marks/tree.js +13 -0
- package/src/pictograms/registry.js +79 -0
- package/src/types/internal.d.ts +16 -1
- package/types/apexcharts.d.ts +339 -9
- package/types/pictograms.d.ts +60 -0
package/README.md
CHANGED
|
@@ -140,7 +140,19 @@ No more `dynamic(() => import(...), { ssr: false })` workarounds: the chart rend
|
|
|
140
140
|
|
|
141
141
|
## Tree-shaking: ship only what you use
|
|
142
142
|
|
|
143
|
-
|
|
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:
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
import ApexCharts from 'apexcharts'
|
|
151
|
+
import 'apexcharts/features/trellis'
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
For a smaller bundle still, start from `apexcharts/core` and add only what you
|
|
155
|
+
need:
|
|
144
156
|
|
|
145
157
|
```js
|
|
146
158
|
import ApexCharts from 'apexcharts/core' // bare class: no chart types, no features
|
|
@@ -160,19 +172,33 @@ import 'apexcharts/features/toolbar' // zoom/pan toolbar
|
|
|
160
172
|
// import 'apexcharts/features/keyboard' // keyboard navigation
|
|
161
173
|
// import 'apexcharts/features/drilldown' // hierarchical drill-down
|
|
162
174
|
// import 'apexcharts/features/morph' // animated chart-type morphs
|
|
163
|
-
// import 'apexcharts/features/history' // undo/redo (premium)
|
|
164
|
-
// import 'apexcharts/features/perspectives' // shareable view state (premium)
|
|
165
|
-
// import 'apexcharts/features/storyboard' // scrollytelling, incl. perspectives (premium)
|
|
175
|
+
// import 'apexcharts/features/history' // undo/redo (premium, opt-in)
|
|
176
|
+
// import 'apexcharts/features/perspectives' // shareable view state (premium, opt-in)
|
|
177
|
+
// import 'apexcharts/features/storyboard' // scrollytelling, incl. perspectives (premium, opt-in)
|
|
166
178
|
// import 'apexcharts/features/facet' // design tokens + OS themes
|
|
167
179
|
// import 'apexcharts/features/weave' // plugin platform
|
|
168
180
|
// import 'apexcharts/features/marks' // custom series types
|
|
169
|
-
// import 'apexcharts/features/link' // crossfilter / linked views (premium)
|
|
170
|
-
// import 'apexcharts/features/ink' // on-chart annotation editing (premium)
|
|
171
|
-
// import 'apexcharts/features/measure' // measure/delta ruler (premium)
|
|
172
|
-
// import 'apexcharts/features/context-menu' // right-click context menu (premium)
|
|
173
|
-
// import 'apexcharts/features/renderer-canvas' // canvas series renderer
|
|
181
|
+
// import 'apexcharts/features/link' // crossfilter / linked views (premium, opt-in)
|
|
182
|
+
// import 'apexcharts/features/ink' // on-chart annotation editing (premium, opt-in)
|
|
183
|
+
// import 'apexcharts/features/measure' // measure/delta ruler (premium, opt-in)
|
|
184
|
+
// import 'apexcharts/features/context-menu' // right-click context menu (premium, opt-in)
|
|
185
|
+
// import 'apexcharts/features/renderer-canvas' // canvas series renderer (opt-in)
|
|
186
|
+
// import 'apexcharts/features/trellis' // small multiples (premium, opt-in)
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
A page without a bundler gets the same choice. `apexcharts.js` stays
|
|
190
|
+
batteries-included, and `apexcharts.core.min.js` is the lean baseline you build
|
|
191
|
+
up from:
|
|
192
|
+
|
|
193
|
+
```html
|
|
194
|
+
<script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/apexcharts.core.min.js"></script>
|
|
195
|
+
<script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/line.js"></script>
|
|
196
|
+
<script src="https://cdn.jsdelivr.net/npm/apexcharts/dist/features/legend.js"></script>
|
|
174
197
|
```
|
|
175
198
|
|
|
199
|
+
Opt-in features work the same way there: load `dist/features/<name>.js` after
|
|
200
|
+
whichever bundle the page already has.
|
|
201
|
+
|
|
176
202
|
See the [tree-shaking guide](https://apexcharts.com/docs/tree-shaking/) for the complete list of entry points.
|
|
177
203
|
|
|
178
204
|
### Shapes for the unit chart
|
|
@@ -193,6 +219,18 @@ new ApexCharts(el, {
|
|
|
193
219
|
|
|
194
220
|
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.
|
|
195
221
|
|
|
222
|
+
**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:
|
|
223
|
+
|
|
224
|
+
```js
|
|
225
|
+
import { shapeFrom, strokeFrom } from 'apexcharts/unit-shapes'
|
|
226
|
+
|
|
227
|
+
shapeFrom('M 26 71 A 24 21 0 1 1 74 71 …') // your own outline, packed like ours
|
|
228
|
+
strokeFrom('M 6 76 L 24 44 L 40 60 …', { width: 12 }) // a centreline, for a line
|
|
229
|
+
positions: (objects, rect) => objects.map(…) // your own rule, no kit at all
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Working demo of all three, including the outline-authoring rules (subpaths union, a reverse-wound one cuts a hole): [bring-your-own-shape](samples/vanilla-js/unit/bring-your-own-shape.html).
|
|
233
|
+
|
|
196
234
|
## Premium features & licensing
|
|
197
235
|
|
|
198
236
|
Most of ApexCharts is free and open source. A small set of advanced features are **premium** and require a license key:
|