apexcharts 6.4.0 → 6.6.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 (117) hide show
  1. package/README.md +48 -8
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.esm.js +2977 -162
  4. package/dist/apexcharts.js +2977 -162
  5. package/dist/apexcharts.min.js +2 -2
  6. package/dist/apexcharts.ssr.common.js +2 -2
  7. package/dist/apexcharts.ssr.esm.js +2977 -162
  8. package/dist/area.common.js +1 -1
  9. package/dist/area.esm.js +1 -1
  10. package/dist/bar.common.js +2 -2
  11. package/dist/bar.esm.js +33 -3
  12. package/dist/boxPlot.common.js +2 -2
  13. package/dist/boxPlot.esm.js +33 -3
  14. package/dist/bubble.common.js +1 -1
  15. package/dist/bubble.esm.js +1 -1
  16. package/dist/candlestick.common.js +2 -2
  17. package/dist/candlestick.esm.js +33 -3
  18. package/dist/column.common.js +2 -2
  19. package/dist/column.esm.js +33 -3
  20. package/dist/core.common.js +2 -2
  21. package/dist/core.esm.js +983 -36
  22. package/dist/donut.common.js +1 -1
  23. package/dist/donut.esm.js +1 -1
  24. package/dist/features/all.common.js +2 -2
  25. package/dist/features/all.esm.js +919 -121
  26. package/dist/features/annotations.common.js +1 -1
  27. package/dist/features/annotations.esm.js +1 -1
  28. package/dist/features/context-menu.common.js +1 -1
  29. package/dist/features/context-menu.esm.js +1 -1
  30. package/dist/features/drilldown.common.js +1 -1
  31. package/dist/features/drilldown.esm.js +1 -1
  32. package/dist/features/exports.common.js +1 -1
  33. package/dist/features/exports.esm.js +1 -1
  34. package/dist/features/facet.common.js +1 -1
  35. package/dist/features/facet.esm.js +1 -1
  36. package/dist/features/history.common.js +2 -2
  37. package/dist/features/history.esm.js +2 -1
  38. package/dist/features/ink.common.js +1 -1
  39. package/dist/features/ink.esm.js +1 -1
  40. package/dist/features/keyboard.common.js +1 -1
  41. package/dist/features/keyboard.esm.js +1 -1
  42. package/dist/features/legend.common.js +2 -2
  43. package/dist/features/legend.esm.js +35 -11
  44. package/dist/features/link.common.js +2 -2
  45. package/dist/features/link.esm.js +38 -1
  46. package/dist/features/marks.common.js +1 -1
  47. package/dist/features/marks.esm.js +1 -1
  48. package/dist/features/measure.common.js +1 -1
  49. package/dist/features/measure.esm.js +1 -1
  50. package/dist/features/morph.common.js +2 -2
  51. package/dist/features/morph.esm.js +79 -3
  52. package/dist/features/perspectives.common.js +2 -2
  53. package/dist/features/perspectives.esm.js +565 -3
  54. package/dist/features/renderer-canvas.common.js +1 -1
  55. package/dist/features/renderer-canvas.esm.js +1 -1
  56. package/dist/features/storyboard.common.js +2 -2
  57. package/dist/features/storyboard.esm.js +568 -3
  58. package/dist/features/toolbar.common.js +2 -2
  59. package/dist/features/toolbar.esm.js +224 -108
  60. package/dist/features/weave.common.js +1 -1
  61. package/dist/features/weave.esm.js +1 -1
  62. package/dist/heatmap.common.js +1 -1
  63. package/dist/heatmap.esm.js +1 -1
  64. package/dist/line.common.js +1 -1
  65. package/dist/line.esm.js +1 -1
  66. package/dist/pie.common.js +1 -1
  67. package/dist/pie.esm.js +1 -1
  68. package/dist/polarArea.common.js +1 -1
  69. package/dist/polarArea.esm.js +1 -1
  70. package/dist/radar.common.js +1 -1
  71. package/dist/radar.esm.js +1 -1
  72. package/dist/radialBar.common.js +1 -1
  73. package/dist/radialBar.esm.js +1 -1
  74. package/dist/rangeArea.common.js +1 -1
  75. package/dist/rangeArea.esm.js +1 -1
  76. package/dist/rangeBar.common.js +2 -2
  77. package/dist/rangeBar.esm.js +33 -3
  78. package/dist/scatter.common.js +1 -1
  79. package/dist/scatter.esm.js +1 -1
  80. package/dist/treemap.common.js +1 -1
  81. package/dist/treemap.esm.js +1 -1
  82. package/dist/violin.common.js +2 -2
  83. package/dist/violin.esm.js +33 -3
  84. package/package.json +1 -1
  85. package/src/apexcharts.js +55 -1
  86. package/src/charts/Bar.js +6 -1
  87. package/src/charts/Unit.js +2130 -0
  88. package/src/charts/common/bar/DataLabels.js +7 -2
  89. package/src/entries/full.js +2 -0
  90. package/src/entries/unit.js +17 -0
  91. package/src/features/perspectives.js +12 -3
  92. package/src/modules/Animations.js +5 -5
  93. package/src/modules/AxisMapping.js +65 -0
  94. package/src/modules/Base.js +1 -2
  95. package/src/modules/Core.js +5 -0
  96. package/src/modules/Data.js +46 -0
  97. package/src/modules/MorphTypeChange.js +95 -7
  98. package/src/modules/Series.js +79 -1
  99. package/src/modules/ZoomPanSelection.js +265 -167
  100. package/src/modules/dimensions/Dimensions.js +22 -0
  101. package/src/modules/helpers/UpdateHelpers.js +14 -28
  102. package/src/modules/legend/Helpers.js +40 -10
  103. package/src/modules/license/LicenseEnforcer.js +277 -0
  104. package/src/modules/license/LicenseManager.js +521 -0
  105. package/src/modules/license/Watermark.js +129 -0
  106. package/src/modules/link/LinkedViews.js +50 -2
  107. package/src/modules/perspectives/Perspectives.js +14 -0
  108. package/src/modules/settings/Config.js +24 -3
  109. package/src/modules/settings/Defaults.js +38 -0
  110. package/src/modules/settings/Globals.js +2 -3
  111. package/src/modules/settings/Options.js +156 -0
  112. package/src/modules/state/ViewState.js +5 -0
  113. package/src/modules/storyboard/Storyboard.js +11 -0
  114. package/src/modules/tooltip/Tooltip.js +132 -7
  115. package/src/types/internal.d.ts +16 -3
  116. package/src/utils/Utils.js +8 -0
  117. package/types/apexcharts.d.ts +217 -4
package/README.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  ## Why ApexCharts
26
26
 
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
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
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
29
  - **Tree-shakable**: import only the chart types and features you need; typical bundles are 30-60% smaller than the full build
30
30
  - **TypeScript-first**: full type definitions ship with the package, no `@types/*` install needed
@@ -89,6 +89,7 @@ Browse [100+ ready-to-use samples](https://apexcharts.com/javascript-chart-demos
89
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/)
90
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/)
91
91
  - [Funnel](https://apexcharts.com/javascript-chart-demos/funnel-charts/)
92
+ - [Unit / Pictogram / Beeswarm](samples/vanilla-js/unit/) · [Waffle](samples/vanilla-js/waffle/) (premium)
92
93
 
93
94
  Combine any of the above as [mixed/combo charts](https://apexcharts.com/javascript-chart-demos/mixed-charts/), [stacked variants](https://apexcharts.com/javascript-chart-demos/column-charts/stacked/), [sparklines](https://apexcharts.com/javascript-chart-demos/sparklines/), or [synchronized multi-chart layouts](https://apexcharts.com/javascript-chart-demos/line-charts/syncing-charts/).
94
95
 
@@ -149,6 +150,7 @@ import 'apexcharts/line'
149
150
  import 'apexcharts/bar'
150
151
  // import 'apexcharts/area'
151
152
  // import 'apexcharts/scatter'
153
+ // import 'apexcharts/unit' // dot / pictogram / waffle / beeswarm (premium; 'waffle' aliases this)
152
154
 
153
155
  // Optional features
154
156
  import 'apexcharts/features/legend'
@@ -158,21 +160,59 @@ import 'apexcharts/features/toolbar' // zoom/pan toolbar
158
160
  // import 'apexcharts/features/keyboard' // keyboard navigation
159
161
  // import 'apexcharts/features/drilldown' // hierarchical drill-down
160
162
  // 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)
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)
164
166
  // import 'apexcharts/features/facet' // design tokens + OS themes
165
167
  // import 'apexcharts/features/weave' // plugin platform
166
168
  // 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
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)
171
173
  // import 'apexcharts/features/renderer-canvas' // canvas series renderer
172
174
  ```
173
175
 
174
176
  See the [tree-shaking guide](https://apexcharts.com/docs/tree-shaking/) for the complete list of entry points.
175
177
 
178
+ ## Premium features & licensing
179
+
180
+ Most of ApexCharts is free and open source. A small set of advanced features are **premium** and require a license key:
181
+
182
+ | Feature | Enabled by |
183
+ |---|---|
184
+ | Unit chart type (dot / pictogram / waffle / beeswarm) | `chart.type: 'unit'` / `chart.type: 'waffle'` |
185
+ | Storyboard (scrollytelling) | `chart.storyboard.bind(...)` |
186
+ | Linked views / crossfilter | `chart.link.enabled` / `chart.link.dimension` / `ApexCharts.crossfilter()` |
187
+ | Ink layer (on-chart annotation editing) | `chart.ink.enabled` |
188
+ | Measure / delta ruler | `chart.measure.enabled` |
189
+ | Context menu (right-click) | `chart.contextMenu.enabled` |
190
+ | Perspectives (shareable view state) | `chart.perspectives.apply()` / `.save()` / `ApexCharts.perspectives.decode()` |
191
+ | History (undo/redo) | `chart.history.enabled` |
192
+
193
+ Without a valid key these features still work (**trial mode**), but the chart shows an "APEXCHARTS" watermark. A valid key removes it. Every other chart type and feature is free and never watermarked; the `unit` chart type (listed above, aliased by `waffle`) is the one premium chart type.
194
+
195
+ ```js
196
+ import ApexCharts from 'apexcharts'
197
+
198
+ // Set once, before rendering. Applies to every chart on the page.
199
+ ApexCharts.setLicense('APEX-xxxxxxxx')
200
+ ```
201
+
202
+ Alternatives to `setLicense`:
203
+
204
+ ```js
205
+ // Global variable (used when setLicense was not called):
206
+ window.Apex = { license: 'APEX-xxxxxxxx' }
207
+
208
+ // Per-chart override (most specific wins):
209
+ new ApexCharts(el, { chart: { license: 'APEX-xxxxxxxx' /* ... */ } })
210
+ ```
211
+
212
+ Precedence per chart: `chart.license` -> `ApexCharts.setLicense()` -> `window.Apex.license` -> unlicensed (trial). The watermark is re-evaluated on every render, so a late `setLicense(validKey)` followed by `chart.update()` clears it.
213
+
214
+ Keys are **shared across the whole ApexCharts family** (apexgantt, apextree, apexsankey, apex-grid-enterprise, apexstock), so one customer key works everywhere. Get a license at [apexcharts.com/pricing](https://apexcharts.com/pricing).
215
+
176
216
  ## Browser support
177
217
 
178
218
  ApexCharts works in all modern evergreen browsers (Chrome, Firefox, Safari, Edge). For server-side rendering, Node.js 18+ is required.