apexcharts 5.15.2 → 6.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.
Files changed (165) hide show
  1. package/README.md +58 -25
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.css +273 -1
  4. package/dist/apexcharts.esm.js +30196 -19994
  5. package/dist/apexcharts.js +30230 -20028
  6. package/dist/apexcharts.min.js +2 -2
  7. package/dist/apexcharts.ssr.common.js +2 -2
  8. package/dist/apexcharts.ssr.esm.js +30212 -20030
  9. package/dist/area.common.js +2 -2
  10. package/dist/area.esm.js +682 -11
  11. package/dist/bar.common.js +2 -2
  12. package/dist/bar.esm.js +276 -27
  13. package/dist/boxPlot.common.js +2 -2
  14. package/dist/boxPlot.esm.js +282 -31
  15. package/dist/bubble.common.js +2 -2
  16. package/dist/bubble.esm.js +682 -11
  17. package/dist/candlestick.common.js +2 -2
  18. package/dist/candlestick.esm.js +282 -31
  19. package/dist/column.common.js +2 -2
  20. package/dist/column.esm.js +276 -27
  21. package/dist/core.common.js +2 -2
  22. package/dist/core.esm.js +4030 -1816
  23. package/dist/donut.common.js +2 -2
  24. package/dist/donut.esm.js +274 -2
  25. package/dist/features/all.common.js +2 -2
  26. package/dist/features/all.esm.js +7078 -39
  27. package/dist/features/annotations.common.js +1 -1
  28. package/dist/features/annotations.esm.js +1 -1
  29. package/dist/features/context-menu.common.js +5 -0
  30. package/dist/features/context-menu.esm.js +313 -0
  31. package/dist/features/drilldown.common.js +5 -0
  32. package/dist/features/drilldown.esm.js +615 -0
  33. package/dist/features/exports.common.js +2 -2
  34. package/dist/features/exports.esm.js +39 -1
  35. package/dist/features/facet.common.js +5 -0
  36. package/dist/features/facet.esm.js +115 -0
  37. package/dist/features/history.common.js +5 -0
  38. package/dist/features/history.esm.js +548 -0
  39. package/dist/features/ink.common.js +5 -0
  40. package/dist/features/ink.esm.js +1050 -0
  41. package/dist/features/keyboard.common.js +1 -1
  42. package/dist/features/keyboard.esm.js +1 -1
  43. package/dist/features/legend.common.js +2 -2
  44. package/dist/features/legend.esm.js +9 -7
  45. package/dist/features/link.common.js +5 -0
  46. package/dist/features/link.esm.js +937 -0
  47. package/dist/features/marks.common.js +5 -0
  48. package/dist/features/marks.esm.js +250 -0
  49. package/dist/features/measure.common.js +5 -0
  50. package/dist/features/measure.esm.js +795 -0
  51. package/dist/features/morph.common.js +2 -2
  52. package/dist/features/morph.esm.js +3 -2
  53. package/dist/features/perspectives.common.js +5 -0
  54. package/dist/features/perspectives.esm.js +399 -0
  55. package/dist/features/renderer-canvas.common.js +5 -0
  56. package/dist/features/renderer-canvas.esm.js +1135 -0
  57. package/dist/features/storyboard.common.js +5 -0
  58. package/dist/features/storyboard.esm.js +650 -0
  59. package/dist/features/toolbar.common.js +2 -2
  60. package/dist/features/toolbar.esm.js +413 -9
  61. package/dist/features/weave.common.js +5 -0
  62. package/dist/features/weave.esm.js +552 -0
  63. package/dist/heatmap.common.js +1 -1
  64. package/dist/heatmap.esm.js +1 -1
  65. package/dist/line.common.js +2 -2
  66. package/dist/line.esm.js +682 -11
  67. package/dist/pie.common.js +2 -2
  68. package/dist/pie.esm.js +274 -2
  69. package/dist/polarArea.common.js +2 -2
  70. package/dist/polarArea.esm.js +274 -2
  71. package/dist/radar.common.js +2 -2
  72. package/dist/radar.esm.js +95 -1
  73. package/dist/radialBar.common.js +2 -2
  74. package/dist/radialBar.esm.js +274 -3
  75. package/dist/rangeArea.common.js +2 -2
  76. package/dist/rangeArea.esm.js +682 -11
  77. package/dist/rangeBar.common.js +2 -2
  78. package/dist/rangeBar.esm.js +276 -27
  79. package/dist/scatter.common.js +2 -2
  80. package/dist/scatter.esm.js +682 -11
  81. package/dist/treemap.common.js +1 -1
  82. package/dist/treemap.esm.js +1 -1
  83. package/dist/violin.common.js +2 -2
  84. package/dist/violin.esm.js +282 -31
  85. package/package.json +49 -1
  86. package/src/apexcharts.js +411 -29
  87. package/src/assets/apexcharts.css +273 -1
  88. package/src/charts/Bar.js +185 -18
  89. package/src/charts/BoxCandleStick.js +12 -8
  90. package/src/charts/CustomSeries.js +307 -0
  91. package/src/charts/Line.js +137 -11
  92. package/src/charts/Pie.js +251 -1
  93. package/src/charts/Scatter.js +29 -2
  94. package/src/charts/Violin.js +10 -4
  95. package/src/charts/common/bar/Helpers.js +39 -14
  96. package/src/charts/common/circle/Helpers.js +106 -0
  97. package/src/entries/core.js +1 -1
  98. package/src/features/all.js +12 -0
  99. package/src/features/context-menu.js +9 -0
  100. package/src/features/drilldown.js +7 -0
  101. package/src/features/facet.js +18 -0
  102. package/src/features/history.js +7 -0
  103. package/src/features/ink.js +9 -0
  104. package/src/features/link.js +18 -0
  105. package/src/features/marks.js +16 -0
  106. package/src/features/measure.js +9 -0
  107. package/src/features/perspectives.js +17 -0
  108. package/src/features/renderer-canvas.js +25 -0
  109. package/src/features/storyboard.js +12 -0
  110. package/src/features/weave.js +7 -0
  111. package/src/modules/Animations.js +79 -7
  112. package/src/modules/ChartFactory.js +50 -0
  113. package/src/modules/Core.js +76 -5
  114. package/src/modules/Data.js +337 -4
  115. package/src/modules/Exports.js +41 -0
  116. package/src/modules/Graphics.js +74 -57
  117. package/src/modules/Markers.js +15 -2
  118. package/src/modules/MorphTypeChange.js +11 -2
  119. package/src/modules/RendererController.js +172 -0
  120. package/src/modules/Series.js +56 -1
  121. package/src/modules/Theme.js +185 -2
  122. package/src/modules/ThemeRegistry.js +63 -0
  123. package/src/modules/ZoomPanSelection.js +504 -12
  124. package/src/modules/animations/AxisTransition.js +493 -0
  125. package/src/modules/animations/Easing.js +148 -0
  126. package/src/modules/animations/LengthTransition.js +541 -0
  127. package/src/modules/animations/StreamScroll.js +339 -0
  128. package/src/modules/contextMenu/ContextMenu.js +381 -0
  129. package/src/modules/drilldown/Breadcrumb.js +139 -0
  130. package/src/modules/drilldown/Drilldown.js +619 -0
  131. package/src/modules/helpers/Destroy.js +31 -0
  132. package/src/modules/helpers/InitCtxVariables.js +75 -0
  133. package/src/modules/helpers/UpdateHelpers.js +41 -5
  134. package/src/modules/history/History.js +541 -0
  135. package/src/modules/ink/InkLayer.js +1226 -0
  136. package/src/modules/legend/Helpers.js +9 -3
  137. package/src/modules/legend/Legend.js +10 -0
  138. package/src/modules/link/Crossfilter.js +709 -0
  139. package/src/modules/link/LinkedViews.js +435 -0
  140. package/src/modules/measure/Measure.js +888 -0
  141. package/src/modules/perspectives/Perspectives.js +311 -0
  142. package/src/modules/settings/Config.js +8 -0
  143. package/src/modules/settings/Globals.js +10 -0
  144. package/src/modules/settings/Options.js +279 -1
  145. package/src/modules/state/ViewState.js +382 -0
  146. package/src/modules/storyboard/Storyboard.js +370 -0
  147. package/src/modules/theme/OSThemeWatcher.js +144 -0
  148. package/src/modules/theme/Tokens.js +73 -0
  149. package/src/modules/tooltip/Labels.js +5 -0
  150. package/src/modules/tooltip/Position.js +33 -5
  151. package/src/modules/tooltip/Tooltip.js +66 -4
  152. package/src/modules/weave/PluginAPI.js +273 -0
  153. package/src/modules/weave/PluginRegistry.js +55 -0
  154. package/src/modules/weave/WeaveHost.js +364 -0
  155. package/src/renderers/Renderer.js +138 -0
  156. package/src/renderers/canvas/CanvasCompositor.js +408 -0
  157. package/src/renderers/canvas/CanvasGraphics.js +790 -0
  158. package/src/renderers/canvas/CanvasRenderer.js +160 -0
  159. package/src/renderers/svg/SvgRenderer.js +105 -0
  160. package/src/ssr/BrowserAPIs.js +18 -0
  161. package/src/svg/PathReconcile.js +286 -0
  162. package/src/svg/SVGAnimation.js +44 -5
  163. package/src/svg/SVGElement.js +4 -0
  164. package/src/types/internal.d.ts +68 -2
  165. package/types/apexcharts.d.ts +1135 -2
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <h1 align="center">ApexCharts</h1>
4
4
 
5
5
  <p align="center">
6
- Modern, interactive JavaScript charts your users will love - built for dashboards, SaaS, and data-heavy UIs.
6
+ Modern, interactive JavaScript charts your users will love, built for dashboards, SaaS, and data-heavy UIs.
7
7
  </p>
8
8
 
9
9
  <p align="center">
@@ -24,13 +24,33 @@
24
24
 
25
25
  ## Why ApexCharts
26
26
 
27
- - **16+ chart types** out of the box line, area, bar, column, pie, donut, radar, heatmap, treemap, candlestick, boxplot, funnel, pyramid, gauge and more
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 3060% smaller than the full build
30
- - **TypeScript-first** full type definitions ship with the package, no `@types/*` install needed
31
- - **Zero runtime dependencies** no React/Vue/D3 required; works in any framework or vanilla JS
32
- - **Accessibility** keyboard navigation and ARIA support built in
33
- - **Free for most users** see [License](#license)
27
+ - **17+ chart types** out of the box: line, area, bar, column, pie, donut, radar, heatmap, treemap, candlestick, boxplot, violin, funnel, pyramid, gauge and more
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
30
+ - **TypeScript-first**: full type definitions ship with the package, no `@types/*` install needed
31
+ - **Zero runtime dependencies**: no React/Vue/D3 required; works in any framework or vanilla JS
32
+ - **Accessibility**: keyboard navigation and ARIA support built in
33
+ - **Free for most users**: see [License](#license)
34
+
35
+ ## New in v6
36
+
37
+ Version 6 turns a chart from a picture you look at into a surface you investigate, author, and share. Most features below are opt-in and tree-shakeable; existing configs keep working unchanged.
38
+
39
+ - **Plugin platform**: publish reusable chart plugins to npm against a stable, versioned API. `ApexCharts.registerPlugin(def)`, then activate per chart with `plugins: [{ name }]`.
40
+ - **Canvas rendering for dense series**: `chart: { renderer: 'auto' }` paints the series layer to canvas above a point threshold while axes, tooltips, annotations, and exports stay SVG. Hundreds of thousands of points, same config.
41
+ - **Undo / redo**: `chart: { history: { enabled: true } }` records zooms, series toggles, option changes, and annotation edits. Ctrl-Z just works, and `chart.history` exposes undo, redo, jump, and transactions.
42
+ - **Shareable view state**: `chart.perspectives.capture()` serializes the exact view (zoom window, hidden series, selections, annotations, theme) into a compact token you can put in a URL and restore anywhere.
43
+ - **Design tokens and OS-aware themes**: define `--apx-*` CSS custom properties once and every chart reads them; `theme: { follow: 'os' }` tracks the system light/dark preference with zero JS, and `ApexCharts.registerTheme` registers named brand themes.
44
+ - **Custom series types**: `ApexCharts.registerSeriesType(name, { renderItem })` draws primitives per datum and inherits tooltips, events, legend, and keyboard navigation for free.
45
+ - **Native-feeling touch**: two-finger pinch-zoom, two-finger pan, and kinetic inertia with axis rails, on by default.
46
+ - **Pluggable easing**: `chart.animations.easing` accepts named curves, cubic-bezier arrays, or functions; add your own with `ApexCharts.registerEasing`.
47
+ - **Coherent data transitions**: updates that add or remove data points animate as one coordinated motion. New bars grow from the baseline, removed ones shrink away, line and area fills reshape without tearing, and markers, bubbles, and axis labels ride along. On by default for animated charts.
48
+ - **Crossfilter dashboards**: link charts into a shared filter engine with `ApexCharts.crossfilter`. Click a slice or brush a range in one chart and every linked chart filters to match.
49
+ - **Annotation authoring**: `chart: { ink: { enabled: true } }` makes annotations draggable and resizable, adds click-to-create, snap, and a floating editor card (rename, recolor, restyle, delete), all wired into undo.
50
+ - **Measure ruler**: hold a key and drag to read the change, percent, and slope between two points; pinned rulers re-project on zoom and resize (`chart.measure`).
51
+ - **Context menu**: right-click or long-press a data point for actions that operate at that exact point, with custom items supported (`chart.contextMenu`).
52
+ - **Real-time streaming**: rolling-window updates scroll at constant velocity instead of warping in place, and `chart.streaming` bounds memory for long-running feeds.
53
+ - **Scrollytelling**: `chart.storyboard.bind({ beats })` pairs prose sections with saved chart views; the chart morphs to each view as the reader scrolls and reverses when they scroll back.
34
54
 
35
55
  ## Install
36
56
 
@@ -58,14 +78,14 @@ const chart = new ApexCharts(document.querySelector('#chart'), {
58
78
  chart.render()
59
79
  ```
60
80
 
61
- Browse [100+ ready-to-use samples](https://apexcharts.com/javascript-chart-demos/) copy, paste, ship.
81
+ Browse [100+ ready-to-use samples](https://apexcharts.com/javascript-chart-demos/): copy, paste, ship.
62
82
 
63
83
  ## Chart types
64
84
 
65
85
  - [Line](https://apexcharts.com/javascript-chart-demos/line-charts/) · [Area](https://apexcharts.com/javascript-chart-demos/area-charts/) · [Range Area](https://apexcharts.com/javascript-chart-demos/range-area-charts/)
66
86
  - [Bar](https://apexcharts.com/javascript-chart-demos/bar-charts/) · [Column](https://apexcharts.com/javascript-chart-demos/column-charts/) · [Range Bar / Timeline](https://apexcharts.com/javascript-chart-demos/range-bar-charts/)
67
87
  - [Scatter](https://apexcharts.com/javascript-chart-demos/scatter-charts/) · [Bubble](https://apexcharts.com/javascript-chart-demos/bubble-charts/)
68
- - [Candlestick](https://apexcharts.com/javascript-chart-demos/candlestick-charts/) · [BoxPlot](https://apexcharts.com/javascript-chart-demos/boxplot-charts/)
88
+ - [Candlestick](https://apexcharts.com/javascript-chart-demos/candlestick-charts/) · [BoxPlot](https://apexcharts.com/javascript-chart-demos/boxplot-charts/) · [Violin](samples/vanilla-js/violin/)
69
89
  - [Pie](https://apexcharts.com/javascript-chart-demos/pie-charts/) · [Donut](https://apexcharts.com/javascript-chart-demos/pie-charts/) · [Polar Area](https://apexcharts.com/javascript-chart-demos/polar-area-charts/) · [Radial Bar / Gauge](https://apexcharts.com/javascript-chart-demos/radialbar-charts/)
70
90
  - [Radar](https://apexcharts.com/javascript-chart-demos/radar-charts/) · [Heatmap](https://apexcharts.com/javascript-chart-demos/heatmap-charts/) · [Treemap](https://apexcharts.com/javascript-chart-demos/treemap-charts/)
71
91
  - [Funnel](https://apexcharts.com/javascript-chart-demos/funnel-charts/)
@@ -76,19 +96,19 @@ Combine any of the above as [mixed/combo charts](https://apexcharts.com/javascri
76
96
 
77
97
  Official:
78
98
 
79
- - **React** [react-apexcharts](https://github.com/apexcharts/react-apexcharts)
80
- - **Vue 3** [vue3-apexcharts](https://github.com/apexcharts/vue3-apexcharts)
81
- - **Vue 2** [vue-apexcharts](https://github.com/apexcharts/vue-apexcharts)
82
- - **Angular** [ng-apexcharts](https://github.com/apexcharts/ng-apexcharts)
83
- - **Blazor** [Blazor-ApexCharts](https://github.com/apexcharts/Blazor-ApexCharts)
84
- - **Stencil** [stencil-apexcharts](https://github.com/apexcharts/stencil-apexcharts)
99
+ - **React**: [react-apexcharts](https://github.com/apexcharts/react-apexcharts)
100
+ - **Vue 3**: [vue3-apexcharts](https://github.com/apexcharts/vue3-apexcharts)
101
+ - **Vue 2**: [vue-apexcharts](https://github.com/apexcharts/vue-apexcharts)
102
+ - **Angular**: [ng-apexcharts](https://github.com/apexcharts/ng-apexcharts)
103
+ - **Blazor**: [Blazor-ApexCharts](https://github.com/apexcharts/Blazor-ApexCharts)
104
+ - **Stencil**: [stencil-apexcharts](https://github.com/apexcharts/stencil-apexcharts)
85
105
 
86
106
  Community:
87
107
 
88
- - **Svelte** [svelte-apexcharts](https://github.com/galkatz373/svelte-apexcharts)
89
- - **Ruby** [apexcharts.rb](https://github.com/styd/apexcharts.rb)
90
- - **Laravel** [larapex-charts](https://github.com/ArielMejiaDev/larapex-charts)
91
- - **R** [apexcharter](https://github.com/dreamRs/apexcharter)
108
+ - **Svelte**: [svelte-apexcharts](https://github.com/galkatz373/svelte-apexcharts)
109
+ - **Ruby**: [apexcharts.rb](https://github.com/styd/apexcharts.rb)
110
+ - **Laravel**: [larapex-charts](https://github.com/ArielMejiaDev/larapex-charts)
111
+ - **R**: [apexcharter](https://github.com/dreamRs/apexcharter)
92
112
 
93
113
  ## Server-side rendering
94
114
 
@@ -115,14 +135,14 @@ ApexCharts.hydrate(document.getElementById('my-chart'))
115
135
  // or: ApexCharts.hydrateAll()
116
136
  ```
117
137
 
118
- No more `dynamic(() => import(...), { ssr: false })` workarounds the chart renders on the server and becomes interactive on hydration.
138
+ No more `dynamic(() => import(...), { ssr: false })` workarounds: the chart renders on the server and becomes interactive on hydration.
119
139
 
120
- ## Tree-shaking ship only what you use
140
+ ## Tree-shaking: ship only what you use
121
141
 
122
142
  By default `import ApexCharts from 'apexcharts'` includes everything. For smaller bundles, import from `apexcharts/core` and add only what you need:
123
143
 
124
144
  ```js
125
- import ApexCharts from 'apexcharts/core' // bare class no chart types, no features
145
+ import ApexCharts from 'apexcharts/core' // bare class: no chart types, no features
126
146
 
127
147
  // Chart types (match the value of chart.type)
128
148
  import 'apexcharts/line'
@@ -136,6 +156,19 @@ import 'apexcharts/features/toolbar' // zoom/pan toolbar
136
156
  // import 'apexcharts/features/exports' // SVG/PNG/CSV download
137
157
  // import 'apexcharts/features/annotations'
138
158
  // import 'apexcharts/features/keyboard' // keyboard navigation
159
+ // import 'apexcharts/features/drilldown' // hierarchical drill-down
160
+ // import 'apexcharts/features/morph' // animated chart-type morphs
161
+ // import 'apexcharts/features/history' // undo/redo
162
+ // import 'apexcharts/features/perspectives' // shareable view state
163
+ // import 'apexcharts/features/storyboard' // scrollytelling (includes perspectives)
164
+ // import 'apexcharts/features/facet' // design tokens + OS themes
165
+ // import 'apexcharts/features/weave' // plugin platform
166
+ // import 'apexcharts/features/marks' // custom series types
167
+ // import 'apexcharts/features/link' // crossfilter / linked views
168
+ // import 'apexcharts/features/ink' // on-chart annotation editing
169
+ // import 'apexcharts/features/measure' // measure/delta ruler
170
+ // import 'apexcharts/features/context-menu' // right-click context menu
171
+ // import 'apexcharts/features/renderer-canvas' // canvas series renderer
139
172
  ```
140
173
 
141
174
  See the [tree-shaking guide](https://apexcharts.com/docs/tree-shaking/) for the complete list of entry points.
@@ -163,14 +196,14 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, coding conventions, and PR gui
163
196
 
164
197
  ApexCharts uses a **revenue-based license**:
165
198
 
166
- - **Free** for individuals, and organizations with **under $2M USD in annual gross revenue** including commercial and internal use. No registration required.
199
+ - **Free** for individuals, and organizations with **under $2M USD in annual gross revenue**, including commercial and internal use. No registration required.
167
200
  - **Commercial license required** for organizations at or above $2M USD annual gross revenue.
168
201
 
169
202
  Full terms: [apexcharts.com/license](https://apexcharts.com/license)
170
203
 
171
204
  ## Need an enterprise data grid?
172
205
 
173
- We've partnered with [Infragistics](https://www.infragistics.com/), creators of Ignite UI high-performance data grids that handle unlimited rows and columns, with custom templates and real-time updates.
206
+ We've partnered with [Infragistics](https://www.infragistics.com/), creators of Ignite UI: high-performance data grids that handle unlimited rows and columns, with custom templates and real-time updates.
174
207
 
175
208
  <p align="center"><a href="https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/grid" target="_blank"><img src="https://apexcharts.com/media/infragistics-data-grid.png" alt="Ignite UI Data Grid" /></a></p>
176
209