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.
Files changed (216) hide show
  1. package/README.md +47 -9
  2. package/dist/apexcharts.common.js +2 -2
  3. package/dist/apexcharts.core.js +30126 -0
  4. package/dist/apexcharts.core.min.js +5 -0
  5. package/dist/apexcharts.css +378 -1
  6. package/dist/apexcharts.esm.js +12364 -45603
  7. package/dist/apexcharts.js +2140 -5951
  8. package/dist/apexcharts.min.js +2 -2
  9. package/dist/apexcharts.ssr.common.js +2 -2
  10. package/dist/apexcharts.ssr.esm.js +2140 -5951
  11. package/dist/area.common.js +2 -2
  12. package/dist/area.esm.js +86 -8
  13. package/dist/bar.common.js +2 -2
  14. package/dist/bar.esm.js +362 -121
  15. package/dist/bar.js +5 -0
  16. package/dist/boxPlot.common.js +2 -2
  17. package/dist/boxPlot.esm.js +321 -120
  18. package/dist/bubble.common.js +2 -2
  19. package/dist/bubble.esm.js +86 -8
  20. package/dist/candlestick.common.js +2 -2
  21. package/dist/candlestick.esm.js +321 -120
  22. package/dist/candlestick.js +5 -0
  23. package/dist/column.common.js +2 -2
  24. package/dist/column.esm.js +362 -121
  25. package/dist/core.common.js +2 -2
  26. package/dist/core.esm.js +1004 -156
  27. package/dist/donut.common.js +2 -2
  28. package/dist/donut.esm.js +1 -1
  29. package/dist/features/all.common.js +2 -2
  30. package/dist/features/all.esm.js +1697 -7302
  31. package/dist/features/annotations.common.js +2 -2
  32. package/dist/features/annotations.esm.js +66 -10
  33. package/dist/features/annotations.js +5 -0
  34. package/dist/features/context-menu.common.js +2 -2
  35. package/dist/features/context-menu.esm.js +1 -1
  36. package/dist/features/context-menu.js +5 -0
  37. package/dist/features/drilldown.common.js +2 -2
  38. package/dist/features/drilldown.esm.js +1 -1
  39. package/dist/features/drilldown.js +5 -0
  40. package/dist/features/exports.common.js +2 -2
  41. package/dist/features/exports.esm.js +1 -1
  42. package/dist/features/exports.js +5 -0
  43. package/dist/features/facet.common.js +2 -2
  44. package/dist/features/facet.esm.js +1 -1
  45. package/dist/features/facet.js +5 -0
  46. package/dist/features/history.common.js +2 -2
  47. package/dist/features/history.esm.js +1 -1
  48. package/dist/features/history.js +5 -0
  49. package/dist/features/ink.common.js +2 -2
  50. package/dist/features/ink.esm.js +1 -1
  51. package/dist/features/ink.js +5 -0
  52. package/dist/features/keyboard.common.js +2 -2
  53. package/dist/features/keyboard.esm.js +18 -3
  54. package/dist/features/keyboard.js +5 -0
  55. package/dist/features/legend.common.js +2 -2
  56. package/dist/features/legend.esm.js +39 -13
  57. package/dist/features/legend.js +5 -0
  58. package/dist/features/link.common.js +2 -2
  59. package/dist/features/link.esm.js +1 -1
  60. package/dist/features/link.js +5 -0
  61. package/dist/features/marks.common.js +2 -2
  62. package/dist/features/marks.esm.js +1 -1
  63. package/dist/features/marks.js +5 -0
  64. package/dist/features/measure.common.js +2 -2
  65. package/dist/features/measure.esm.js +1 -1
  66. package/dist/features/measure.js +5 -0
  67. package/dist/features/morph.common.js +2 -2
  68. package/dist/features/morph.esm.js +1 -1
  69. package/dist/features/morph.js +5 -0
  70. package/dist/features/perspectives.common.js +2 -2
  71. package/dist/features/perspectives.esm.js +4 -1
  72. package/dist/features/perspectives.js +5 -0
  73. package/dist/features/renderer-canvas.common.js +2 -2
  74. package/dist/features/renderer-canvas.esm.js +1 -1
  75. package/dist/features/renderer-canvas.js +5 -0
  76. package/dist/features/stats.common.js +2 -2
  77. package/dist/features/stats.esm.js +1 -1
  78. package/dist/features/stats.js +5 -0
  79. package/dist/features/storyboard.common.js +2 -2
  80. package/dist/features/storyboard.esm.js +4 -1
  81. package/dist/features/storyboard.js +5 -0
  82. package/dist/features/toolbar.common.js +2 -2
  83. package/dist/features/toolbar.esm.js +1 -1
  84. package/dist/features/toolbar.js +5 -0
  85. package/dist/features/trellis.common.js +5 -0
  86. package/dist/features/trellis.esm.js +4640 -0
  87. package/dist/features/trellis.js +5 -0
  88. package/dist/features/weave.common.js +2 -2
  89. package/dist/features/weave.esm.js +1 -1
  90. package/dist/features/weave.js +5 -0
  91. package/dist/heatmap.common.js +2 -2
  92. package/dist/heatmap.esm.js +11 -5
  93. package/dist/heatmap.js +5 -0
  94. package/dist/histogram.common.js +2 -2
  95. package/dist/histogram.esm.js +362 -121
  96. package/dist/line.common.js +2 -2
  97. package/dist/line.esm.js +86 -8
  98. package/dist/line.js +5 -0
  99. package/dist/pictograms.common.js +5 -0
  100. package/dist/pictograms.esm.js +183 -0
  101. package/dist/pictograms.js +5 -0
  102. package/dist/pie.common.js +2 -2
  103. package/dist/pie.esm.js +1 -1
  104. package/dist/pie.js +5 -0
  105. package/dist/polarArea.common.js +2 -2
  106. package/dist/polarArea.esm.js +1 -1
  107. package/dist/radar.common.js +2 -2
  108. package/dist/radar.esm.js +1 -1
  109. package/dist/radar.js +5 -0
  110. package/dist/radialBar.common.js +2 -2
  111. package/dist/radialBar.esm.js +1 -1
  112. package/dist/radialBar.js +5 -0
  113. package/dist/rangeArea.common.js +2 -2
  114. package/dist/rangeArea.esm.js +86 -8
  115. package/dist/rangeBar.common.js +2 -2
  116. package/dist/rangeBar.esm.js +362 -121
  117. package/dist/scatter.common.js +2 -2
  118. package/dist/scatter.esm.js +86 -8
  119. package/dist/sunburst.common.js +2 -2
  120. package/dist/sunburst.esm.js +1 -1
  121. package/dist/sunburst.js +5 -0
  122. package/dist/treemap.common.js +2 -2
  123. package/dist/treemap.esm.js +11 -5
  124. package/dist/treemap.js +5 -0
  125. package/dist/unit-shapes.common.js +1 -1
  126. package/dist/unit-shapes.esm.js +1 -1
  127. package/dist/unit-shapes.js +2 -2
  128. package/dist/unit.common.js +2 -2
  129. package/dist/unit.esm.js +296 -67
  130. package/dist/unit.js +5 -0
  131. package/dist/violin.common.js +2 -2
  132. package/dist/violin.esm.js +321 -120
  133. package/dist/violin.js +5 -0
  134. package/package.json +11 -1
  135. package/src/apexcharts.js +278 -13
  136. package/src/assets/apexcharts.css +378 -1
  137. package/src/charts/Bar.js +296 -46
  138. package/src/charts/BarStacked.js +81 -2
  139. package/src/charts/Line.js +155 -16
  140. package/src/charts/Unit.js +320 -75
  141. package/src/charts/common/bar/DataLabels.js +131 -38
  142. package/src/charts/common/bar/Helpers.js +102 -78
  143. package/src/charts/common/line/Helpers.js +5 -2
  144. package/src/charts/common/treemap/Helpers.js +19 -10
  145. package/src/entries/core-umd.js +47 -0
  146. package/src/entries/full.js +23 -0
  147. package/src/features/all.js +19 -12
  148. package/src/features/context-menu.js +11 -0
  149. package/src/features/history.js +12 -0
  150. package/src/features/ink.js +12 -2
  151. package/src/features/link.js +10 -0
  152. package/src/features/measure.js +10 -1
  153. package/src/features/perspectives.js +15 -0
  154. package/src/features/renderer-canvas.js +13 -0
  155. package/src/features/storyboard.js +15 -1
  156. package/src/features/trellis.js +40 -0
  157. package/src/modules/Animations.js +6 -1
  158. package/src/modules/ChartFactory.js +3 -1
  159. package/src/modules/CoreUtils.js +28 -20
  160. package/src/modules/Graphics.js +32 -2
  161. package/src/modules/Markers.js +257 -5
  162. package/src/modules/Range.js +12 -0
  163. package/src/modules/RendererController.js +4 -2
  164. package/src/modules/Scales.js +113 -10
  165. package/src/modules/Series.js +42 -0
  166. package/src/modules/UnitMarkRegistry.js +130 -0
  167. package/src/modules/accessibility/KeyboardNavigation.js +22 -2
  168. package/src/modules/animations/DataLabelTransition.js +200 -68
  169. package/src/modules/animations/StreamScroll.js +8 -0
  170. package/src/modules/annotations/Annotations.js +8 -2
  171. package/src/modules/annotations/Helpers.js +114 -15
  172. package/src/modules/helpers/Destroy.js +5 -0
  173. package/src/modules/helpers/InitCtxVariables.js +33 -1
  174. package/src/modules/legend/HeatmapGradientLegend.js +39 -10
  175. package/src/modules/legend/Helpers.js +21 -4
  176. package/src/modules/license/LicenseEnforcer.js +11 -0
  177. package/src/modules/settings/Defaults.js +0 -1
  178. package/src/modules/settings/Globals.js +15 -0
  179. package/src/modules/settings/Options.js +196 -6
  180. package/src/modules/tooltip/Intersect.js +11 -6
  181. package/src/modules/tooltip/Labels.js +1 -1
  182. package/src/modules/tooltip/Marker.js +1 -5
  183. package/src/modules/tooltip/Position.js +3 -1
  184. package/src/modules/tooltip/Tooltip.js +51 -11
  185. package/src/modules/tooltip/Utils.js +28 -0
  186. package/src/modules/trellis/Trellis.js +1382 -0
  187. package/src/modules/trellis/TrellisChrome.js +406 -0
  188. package/src/modules/trellis/TrellisExports.js +336 -0
  189. package/src/modules/trellis/TrellisFrames.js +306 -0
  190. package/src/modules/trellis/TrellisLayout.js +142 -0
  191. package/src/modules/trellis/TrellisScales.js +296 -0
  192. package/src/modules/trellis/TrellisSplit.js +516 -0
  193. package/src/modules/trellis/TrellisSync.js +331 -0
  194. package/src/modules/trellis/TrellisTooltip.js +275 -0
  195. package/src/modules/trellis/TrellisVirtual.js +377 -0
  196. package/src/modules/trellis/pivotRows.js +130 -0
  197. package/src/pictograms/catalog.js +40 -0
  198. package/src/pictograms/cdn.js +25 -0
  199. package/src/pictograms/engine/mark.js +53 -0
  200. package/src/pictograms/index.js +58 -0
  201. package/src/pictograms/marks/bag.js +13 -0
  202. package/src/pictograms/marks/book.js +13 -0
  203. package/src/pictograms/marks/bulb.js +17 -0
  204. package/src/pictograms/marks/car.js +13 -0
  205. package/src/pictograms/marks/cup.js +13 -0
  206. package/src/pictograms/marks/droplet.js +13 -0
  207. package/src/pictograms/marks/heart.js +13 -0
  208. package/src/pictograms/marks/house.js +13 -0
  209. package/src/pictograms/marks/person.js +20 -0
  210. package/src/pictograms/marks/plane.js +13 -0
  211. package/src/pictograms/marks/star.js +13 -0
  212. package/src/pictograms/marks/tree.js +13 -0
  213. package/src/pictograms/registry.js +79 -0
  214. package/src/types/internal.d.ts +16 -1
  215. package/types/apexcharts.d.ts +339 -9
  216. 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
- By default `import ApexCharts from 'apexcharts'` includes everything. For smaller bundles, import from `apexcharts/core` and add only what you need:
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: