apexcharts 7.7.0 → 7.9.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/{LICENSE → LICENSE.md} +1 -1
- package/README.md +1 -0
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +4414 -722
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.css +22 -5
- package/dist/apexcharts.esm.js +2141 -598
- package/dist/apexcharts.js +6568 -1263
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +6567 -1262
- package/dist/area.common.js +2 -2
- package/dist/area.esm.js +297 -194
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +357 -143
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +417 -152
- package/dist/bubble.common.js +2 -2
- package/dist/bubble.esm.js +297 -194
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +417 -152
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +357 -143
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +4414 -722
- package/dist/donut.common.js +2 -2
- package/dist/donut.esm.js +49 -17
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +357 -143
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +647 -133
- package/dist/features/annotations.common.js +2 -2
- package/dist/features/annotations.esm.js +2 -2
- package/dist/features/annotations.js +2 -2
- package/dist/features/context-menu.common.js +2 -2
- package/dist/features/context-menu.esm.js +17 -8
- package/dist/features/context-menu.js +2 -2
- package/dist/features/drilldown.common.js +2 -2
- package/dist/features/drilldown.esm.js +3 -1
- 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 +2 -2
- package/dist/features/exports.esm.js +12 -6
- package/dist/features/exports.js +2 -2
- 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 +5 -0
- package/dist/features/highlight-filter.esm.js +4485 -0
- package/dist/features/highlight-filter.js +5 -0
- 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 +2 -2
- package/dist/features/ink.esm.js +6 -4
- package/dist/features/ink.js +2 -2
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +482 -54
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +2 -2
- package/dist/features/legend.esm.js +24 -8
- 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 +2 -2
- package/dist/features/measure.esm.js +17 -7
- package/dist/features/measure.js +2 -2
- package/dist/features/morph.common.js +2 -2
- package/dist/features/morph.esm.js +74 -25
- package/dist/features/morph.js +2 -2
- package/dist/features/perspectives.common.js +2 -2
- package/dist/features/perspectives.esm.js +3 -1
- 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 +2 -2
- package/dist/features/renderer-canvas.esm.js +464 -28
- package/dist/features/renderer-canvas.js +2 -2
- 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 +3 -1
- 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 +2 -2
- package/dist/features/toolbar.esm.js +69 -48
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +2 -2
- package/dist/features/trellis.esm.js +131 -46
- 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/heatmap.common.js +2 -2
- package/dist/heatmap.esm.js +74 -19
- package/dist/heatmap.js +2 -2
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +357 -143
- 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 +2 -2
- package/dist/line.esm.js +297 -194
- package/dist/line.js +2 -2
- package/dist/locales/eu.json +56 -0
- package/dist/locales/gl.json +4 -3
- 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 +2 -2
- package/dist/pie.esm.js +49 -17
- package/dist/pie.js +2 -2
- package/dist/polarArea.common.js +2 -2
- package/dist/polarArea.esm.js +49 -17
- package/dist/radar.common.js +2 -2
- package/dist/radar.esm.js +30 -4
- package/dist/radar.js +2 -2
- package/dist/radialBar.common.js +2 -2
- package/dist/radialBar.esm.js +149 -60
- package/dist/radialBar.js +2 -2
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +325 -143
- package/dist/rangeArea.common.js +2 -2
- package/dist/rangeArea.esm.js +297 -194
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +357 -143
- package/dist/scatter.common.js +2 -2
- package/dist/scatter.esm.js +297 -194
- package/dist/streamgraph.common.js +2 -2
- package/dist/streamgraph.esm.js +297 -194
- 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 +522 -40
- 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 +325 -143
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +357 -143
- package/package.json +7 -9
- package/src/apexcharts.js +43 -3
- package/src/assets/apexcharts.css +22 -5
- package/src/charts/Bar.js +268 -116
- package/src/charts/BarStacked.js +30 -5
- package/src/charts/BoxCandleStick.js +155 -16
- package/src/charts/HeatMap.js +77 -24
- package/src/charts/Line.js +303 -148
- package/src/charts/Pie.js +66 -15
- package/src/charts/Radar.js +70 -2
- package/src/charts/Radial.js +151 -82
- package/src/charts/RangeBar.js +24 -0
- package/src/charts/Treemap.js +676 -39
- package/src/charts/Violin.js +26 -0
- package/src/charts/common/bar/DataLabels.js +39 -16
- package/src/charts/common/bar/Helpers.js +134 -112
- package/src/charts/common/line/Helpers.js +27 -0
- package/src/entries/core.js +7 -0
- package/src/features/highlight-filter.js +27 -0
- package/src/locales/eu.json +56 -0
- package/src/locales/gl.json +4 -3
- package/src/modules/Animations.js +86 -6
- package/src/modules/Base.js +7 -0
- package/src/modules/Core.js +39 -42
- package/src/modules/CoreUtils.js +15 -7
- package/src/modules/Data.js +132 -17
- package/src/modules/DataLabels.js +289 -31
- package/src/modules/Exports.js +18 -6
- package/src/modules/Graphics.js +44 -23
- package/src/modules/Markers.js +11 -2
- package/src/modules/MorphTypeChange.js +89 -32
- package/src/modules/Range.js +62 -28
- package/src/modules/RendererController.js +36 -10
- package/src/modules/Series.js +341 -9
- package/src/modules/Theme.js +4 -10
- package/src/modules/ZoomPanSelection.js +68 -51
- package/src/modules/accessibility/KeyboardNavigation.js +674 -99
- package/src/modules/animations/AxisTransition.js +100 -9
- package/src/modules/animations/CircleTransition.js +479 -0
- package/src/modules/animations/DataLabelTransition.js +275 -2
- package/src/modules/animations/LayoutTransition.js +472 -0
- package/src/modules/animations/LengthTransition.js +122 -0
- package/src/modules/annotations/Annotations.js +10 -1
- package/src/modules/axes/Grid.js +68 -43
- package/src/modules/contextMenu/ContextMenu.js +23 -7
- package/src/modules/drilldown/Drilldown.js +3 -0
- package/src/modules/helpers/DataLabelOverlap.js +222 -0
- package/src/modules/helpers/Destroy.js +2 -0
- package/src/modules/helpers/InitCtxVariables.js +15 -0
- package/src/modules/helpers/UpdateHelpers.js +95 -3
- package/src/modules/highlightFilter/HighlightFilter.js +2858 -0
- package/src/modules/highlightFilter/PiePart.js +653 -0
- package/src/modules/highlightFilter/RadialPart.js +1337 -0
- package/src/modules/highlightFilter/TreemapPart.js +499 -0
- package/src/modules/highlightFilter/util.js +306 -0
- package/src/modules/ink/InkLayer.js +15 -3
- package/src/modules/legend/HeatmapGradientLegend.js +26 -7
- package/src/modules/legend/Helpers.js +14 -1
- package/src/modules/license/LicenseEnforcer.js +8 -5
- package/src/modules/measure/Measure.js +17 -7
- package/src/modules/settings/Config.js +322 -2
- package/src/modules/settings/Defaults.js +48 -49
- package/src/modules/settings/Globals.js +49 -1
- package/src/modules/settings/Options.js +44 -0
- package/src/modules/settings/TypeAliases.js +83 -0
- package/src/modules/tooltip/AxesTooltip.js +5 -1
- package/src/modules/tooltip/Intersect.js +663 -197
- package/src/modules/tooltip/Labels.js +89 -28
- package/src/modules/tooltip/Marker.js +209 -20
- package/src/modules/tooltip/Position.js +829 -138
- package/src/modules/tooltip/Tooltip.js +493 -73
- package/src/modules/tooltip/Utils.js +173 -3
- package/src/modules/tooltip/constants.js +20 -0
- package/src/modules/tooltip/placement.js +569 -0
- package/src/modules/trellis/Trellis.js +14 -2
- package/src/modules/trellis/TrellisScales.js +58 -17
- package/src/modules/trellis/TrellisSplit.js +19 -3
- package/src/modules/trellis/TrellisSync.js +7 -1
- package/src/modules/trellis/TrellisTooltip.js +27 -15
- package/src/renderers/Renderer.js +2 -0
- package/src/renderers/canvas/CanvasCompositor.js +113 -17
- package/src/renderers/canvas/CanvasGraphics.js +173 -3
- package/src/renderers/canvas/CanvasRenderer.js +275 -14
- package/src/types/internal.d.ts +132 -2
- package/src/utils/Utils.js +61 -0
- package/types/apexcharts.d.ts +365 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apexcharts",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "A JavaScript Chart Library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -240,6 +240,10 @@
|
|
|
240
240
|
"import": "./dist/features/link.esm.js",
|
|
241
241
|
"require": "./dist/features/link.common.js"
|
|
242
242
|
},
|
|
243
|
+
"./features/highlight-filter": {
|
|
244
|
+
"import": "./dist/features/highlight-filter.esm.js",
|
|
245
|
+
"require": "./dist/features/highlight-filter.common.js"
|
|
246
|
+
},
|
|
243
247
|
"./features/ink": {
|
|
244
248
|
"import": "./dist/features/ink.esm.js",
|
|
245
249
|
"require": "./dist/features/ink.common.js"
|
|
@@ -330,14 +334,11 @@
|
|
|
330
334
|
"apex-commons": "^0.8.0"
|
|
331
335
|
},
|
|
332
336
|
"devDependencies": {
|
|
333
|
-
"@babel/core": "7.29.7",
|
|
334
|
-
"@babel/preset-env": "7.29.7",
|
|
335
337
|
"@blazediff/core": "1.0.0",
|
|
336
338
|
"@eslint/js": "^9.0.0",
|
|
337
339
|
"@playwright/test": "1.58.2",
|
|
338
340
|
"@rollup/plugin-terser": "0.4.4",
|
|
339
341
|
"@vitest/coverage-v8": "^4.0.18",
|
|
340
|
-
"babel-jest": "30.2.0",
|
|
341
342
|
"chalk": "3.0.0",
|
|
342
343
|
"eslint": "^9.0.0",
|
|
343
344
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -346,9 +347,6 @@
|
|
|
346
347
|
"eslint-plugin-promise": "^6.1.1",
|
|
347
348
|
"fs-extra": "8.1.0",
|
|
348
349
|
"globals": "^15.0.0",
|
|
349
|
-
"jest": "29.7.0",
|
|
350
|
-
"jest-environment-jsdom": "29.7.0",
|
|
351
|
-
"jest-puppeteer": "^10.0.1",
|
|
352
350
|
"jsdom": "^28.0.0",
|
|
353
351
|
"nunjucks": "3.2.4",
|
|
354
352
|
"nyc": "15.0.0",
|
|
@@ -364,7 +362,7 @@
|
|
|
364
362
|
"vitest": "^4.0.18"
|
|
365
363
|
},
|
|
366
364
|
"resolutions": {
|
|
367
|
-
"undici": "^7.
|
|
365
|
+
"undici": "^7.30.0",
|
|
368
366
|
"form-data": "^4.0.6",
|
|
369
367
|
"serialize-javascript": "^7.0.5",
|
|
370
368
|
"vite": "^6.4.3",
|
|
@@ -373,7 +371,7 @@
|
|
|
373
371
|
"bugs": {
|
|
374
372
|
"url": "https://github.com/apexcharts/apexcharts.js/issues"
|
|
375
373
|
},
|
|
376
|
-
"license": "SEE LICENSE IN LICENSE",
|
|
374
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
377
375
|
"homepage": "https://apexcharts.com",
|
|
378
376
|
"sideEffects": [
|
|
379
377
|
"*.css",
|
package/src/apexcharts.js
CHANGED
|
@@ -4,6 +4,7 @@ import CoreUtils from './modules/CoreUtils'
|
|
|
4
4
|
import DataLabels from './modules/DataLabels'
|
|
5
5
|
import PerformanceCache from './utils/PerformanceCache'
|
|
6
6
|
import Defaults from './modules/settings/Defaults'
|
|
7
|
+
import Config from './modules/settings/Config'
|
|
7
8
|
import { RESERVED_TYPES, TYPE_ALIASES } from './modules/settings/TypeAliases'
|
|
8
9
|
import Grid from './modules/axes/Grid'
|
|
9
10
|
import Markers from './modules/Markers'
|
|
@@ -40,7 +41,11 @@ import {
|
|
|
40
41
|
import { registerEasing } from './modules/animations/Easing'
|
|
41
42
|
import { trimStreamingSeries } from './modules/animations/StreamScroll'
|
|
42
43
|
import { applyAxisTransition } from './modules/animations/AxisTransition'
|
|
43
|
-
import {
|
|
44
|
+
import { applyCircleTransition } from './modules/animations/CircleTransition'
|
|
45
|
+
import {
|
|
46
|
+
applyDataLabelTransition,
|
|
47
|
+
playExitLabels,
|
|
48
|
+
} from './modules/animations/DataLabelTransition'
|
|
44
49
|
import {
|
|
45
50
|
registerPlugin as registerPluginImpl,
|
|
46
51
|
unregisterPlugin as unregisterPluginImpl,
|
|
@@ -440,7 +445,7 @@ export default class ApexCharts {
|
|
|
440
445
|
// @ts-ignore — convertedCatToNumeric is an internal property set by Defaults
|
|
441
446
|
if (w.config.xaxis.convertedCatToNumeric) {
|
|
442
447
|
const defaults = new Defaults(w.config)
|
|
443
|
-
defaults.convertCatToNumericXaxis(w.config
|
|
448
|
+
defaults.convertCatToNumericXaxis(w.config)
|
|
444
449
|
}
|
|
445
450
|
|
|
446
451
|
this.core.setupElements()
|
|
@@ -617,6 +622,7 @@ export default class ApexCharts {
|
|
|
617
622
|
|
|
618
623
|
const dataLabels = new DataLabels(this.w, this)
|
|
619
624
|
dataLabels.bringForward()
|
|
625
|
+
dataLabels.avoidOverlaps()
|
|
620
626
|
if (w.config.dataLabels.background.enabled) {
|
|
621
627
|
dataLabels.dataLabelsBackground()
|
|
622
628
|
}
|
|
@@ -696,6 +702,8 @@ export default class ApexCharts {
|
|
|
696
702
|
} else {
|
|
697
703
|
w.dom.elGraphical.add(graphData.elGraph)
|
|
698
704
|
}
|
|
705
|
+
// Hidden series: clear their resting shape once their exit is over.
|
|
706
|
+
this.series.settleCollapsedShapes(graphData.elGraph)
|
|
699
707
|
|
|
700
708
|
if (w.config.grid.position === 'front') {
|
|
701
709
|
if (elgrid) {
|
|
@@ -925,6 +933,8 @@ export default class ApexCharts {
|
|
|
925
933
|
options = { ...options }
|
|
926
934
|
delete options.series
|
|
927
935
|
}
|
|
936
|
+
// `tooltip: undefined` means "not given" (see Config.dropEmptyOptions).
|
|
937
|
+
options = Config.dropEmptyOptions(options)
|
|
928
938
|
|
|
929
939
|
// Trellis (#22): an option change on a live trellis host is structural
|
|
930
940
|
// (it can move the split, the scales, the layout or any panel option), so
|
|
@@ -1110,6 +1120,11 @@ export default class ApexCharts {
|
|
|
1110
1120
|
|
|
1111
1121
|
me.data.resetParsingFlags()
|
|
1112
1122
|
me.w.globals.dataChanged = true
|
|
1123
|
+
// appendData takes no `animate`: it animates per the config. The flag is
|
|
1124
|
+
// sticky, so without this an earlier unanimated update (a pan, a wheel
|
|
1125
|
+
// zoom, a brush moving its target, updateSeries(data, false)) silently
|
|
1126
|
+
// switched off the animation of every append after it.
|
|
1127
|
+
me.w.globals.shouldAnimate = true
|
|
1113
1128
|
// previous paths feed the update morph; with animations off nothing
|
|
1114
1129
|
// consumes them, and the capture is O(n) (stream-frame + DOM walk)
|
|
1115
1130
|
if (me.w.config.chart.animations.enabled) {
|
|
@@ -1225,6 +1240,10 @@ export default class ApexCharts {
|
|
|
1225
1240
|
? Utils.clone(options)
|
|
1226
1241
|
: null
|
|
1227
1242
|
|
|
1243
|
+
// A type-change morph that has already been shown is over for this
|
|
1244
|
+
// render: it starts from the screen, not from the old chart's shapes.
|
|
1245
|
+
this.morphTypeChange?.retire()
|
|
1246
|
+
|
|
1228
1247
|
new Destroy(this.ctx).clear({ isUpdating: true })
|
|
1229
1248
|
|
|
1230
1249
|
// A re-render replays w.config.series, which carries whatever the last
|
|
@@ -1246,12 +1265,23 @@ export default class ApexCharts {
|
|
|
1246
1265
|
// Variable-length update: slide surviving tick labels/gridlines to
|
|
1247
1266
|
// their new positions and fade in the new ones, on the same clock
|
|
1248
1267
|
// as the series morph (no-op otherwise; consumes prevChromeFrame).
|
|
1249
|
-
|
|
1268
|
+
// A moved plot area eases too, except under a cross-type morph,
|
|
1269
|
+
// which offsets its own start shapes by the move.
|
|
1270
|
+
applyAxisTransition(this.w, {
|
|
1271
|
+
layout: !this.morphTypeChange?.isActive(),
|
|
1272
|
+
})
|
|
1273
|
+
// A circle chart the chrome re-centred or resized (a title, the
|
|
1274
|
+
// legend) eases to its new centre and radius on the same clock, with
|
|
1275
|
+
// the plot rect when it has no axes. Same cross-type morph rule.
|
|
1276
|
+
applyCircleTransition(this.w, {
|
|
1277
|
+
layout: !this.morphTypeChange?.isActive(),
|
|
1278
|
+
})
|
|
1250
1279
|
|
|
1251
1280
|
// Ride data labels to their new slot (and, opt-in, count their value
|
|
1252
1281
|
// up) on the same clock as the morph. No-op when nothing moved or no
|
|
1253
1282
|
// frame was captured this update.
|
|
1254
1283
|
applyDataLabelTransition(this.w)
|
|
1284
|
+
playExitLabels(this.w)
|
|
1255
1285
|
|
|
1256
1286
|
if (typeof this.w.config.chart.events.updated === 'function') {
|
|
1257
1287
|
this.w.config.chart.events.updated(this, this.w)
|
|
@@ -1462,6 +1492,8 @@ export default class ApexCharts {
|
|
|
1462
1492
|
try {
|
|
1463
1493
|
const w = this.w
|
|
1464
1494
|
const gl = w.globals
|
|
1495
|
+
// As in update(): a morph already shown is over for this render.
|
|
1496
|
+
this.morphTypeChange?.retire()
|
|
1465
1497
|
|
|
1466
1498
|
gl.shouldAnimate = animate
|
|
1467
1499
|
gl.dataChanged = true
|
|
@@ -1498,6 +1530,8 @@ export default class ApexCharts {
|
|
|
1498
1530
|
gl2.cachedSelectors = {}
|
|
1499
1531
|
gl2.disableZoomIn = false
|
|
1500
1532
|
gl2.disableZoomOut = false
|
|
1533
|
+
gl2.fadeRevealEls = []
|
|
1534
|
+
gl2.morphBatch = { pending: 0, onDone: null, series: new Map() }
|
|
1501
1535
|
|
|
1502
1536
|
// Recompute axis min/max and scale ranges from new data.
|
|
1503
1537
|
if (gl.axisCharts) {
|
|
@@ -1605,10 +1639,12 @@ export default class ApexCharts {
|
|
|
1605
1639
|
w.dom.elGraphical.add(g)
|
|
1606
1640
|
})
|
|
1607
1641
|
}
|
|
1642
|
+
this.series.settleCollapsedShapes(graphs)
|
|
1608
1643
|
|
|
1609
1644
|
// Bring data labels forward and apply backgrounds if configured.
|
|
1610
1645
|
const dataLabels = new DataLabels(w, this)
|
|
1611
1646
|
dataLabels.bringForward()
|
|
1647
|
+
dataLabels.avoidOverlaps()
|
|
1612
1648
|
if (w.config.dataLabels.background.enabled) {
|
|
1613
1649
|
dataLabels.dataLabelsBackground()
|
|
1614
1650
|
}
|
|
@@ -1642,6 +1678,7 @@ export default class ApexCharts {
|
|
|
1642
1678
|
// scroll itself.
|
|
1643
1679
|
if (!gl.streamScrolled) applyAxisTransition(w)
|
|
1644
1680
|
applyDataLabelTransition(w)
|
|
1681
|
+
playExitLabels(w)
|
|
1645
1682
|
|
|
1646
1683
|
// Reattach tooltip event listeners to new series elements.
|
|
1647
1684
|
if (Environment.isBrowser() && w.config.tooltip.enabled && !gl.noData) {
|
|
@@ -2464,6 +2501,9 @@ export default class ApexCharts {
|
|
|
2464
2501
|
const gl = w.globals
|
|
2465
2502
|
|
|
2466
2503
|
return {
|
|
2504
|
+
// The merged options this chart is running on (defaults < window.Apex <
|
|
2505
|
+
// user), so a reader does not have to go through the internal `w`.
|
|
2506
|
+
config: w.config,
|
|
2467
2507
|
// Series data — computed/parsed form used for rendering
|
|
2468
2508
|
series: w.seriesData.series,
|
|
2469
2509
|
seriesNames: w.seriesData.seriesNames,
|
|
@@ -359,15 +359,24 @@ rect.legend-mouseover-inactive,
|
|
|
359
359
|
.apexcharts-bar-area.apexcharts-keyboard-focused,
|
|
360
360
|
.apexcharts-candlestick-area.apexcharts-keyboard-focused,
|
|
361
361
|
.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
|
|
362
|
+
.apexcharts-violin-area.apexcharts-keyboard-focused,
|
|
362
363
|
.apexcharts-rangebar-area.apexcharts-keyboard-focused,
|
|
363
364
|
.apexcharts-pie-area.apexcharts-keyboard-focused,
|
|
364
365
|
.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
|
|
365
|
-
.apexcharts-treemap-rect.apexcharts-keyboard-focused
|
|
366
|
+
.apexcharts-treemap-rect.apexcharts-keyboard-focused,
|
|
367
|
+
.apexcharts-keyboard-focus-ring {
|
|
366
368
|
stroke: var(--apexcharts-focus-color, #008FFB);
|
|
367
369
|
stroke-width: 2;
|
|
368
370
|
stroke-opacity: 1;
|
|
369
371
|
}
|
|
370
372
|
|
|
373
|
+
/* A heatmap or a bar-like painted to canvas has no node per cell or mark, so
|
|
374
|
+
keyboard focus draws this outline over the focused one instead. */
|
|
375
|
+
.apexcharts-keyboard-focus-ring {
|
|
376
|
+
fill: none;
|
|
377
|
+
pointer-events: none;
|
|
378
|
+
}
|
|
379
|
+
|
|
371
380
|
.apexcharts-tooltip {
|
|
372
381
|
--apx-tt-bg: #ffffff;
|
|
373
382
|
/* Shared by the body and the arrow's two outward facets, so the
|
|
@@ -430,7 +439,9 @@ rect.legend-mouseover-inactive,
|
|
|
430
439
|
opacity: 1;
|
|
431
440
|
transition: opacity .12s ease
|
|
432
441
|
}
|
|
433
|
-
|
|
442
|
+
/* Only while shown: a hidden box keeps its last position, which on a short
|
|
443
|
+
* chart is outside the chart, over whatever the page has there. */
|
|
444
|
+
.apexcharts-tooltip.apexcharts-tooltip-interactive.apexcharts-active {
|
|
434
445
|
pointer-events: auto;
|
|
435
446
|
}
|
|
436
447
|
.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {
|
|
@@ -532,7 +543,13 @@ rect.legend-mouseover-inactive,
|
|
|
532
543
|
* (-6px = -1px border - 10px/2), i.e. exactly on the body's border line,
|
|
533
544
|
* so the two borders meet end to end instead of overlapping or gapping.
|
|
534
545
|
* `box-sizing` must be border-box or the bordered sides would grow the
|
|
535
|
-
* square asymmetrically and knock its centre off that line.
|
|
546
|
+
* square asymmetrically and knock its centre off that line.
|
|
547
|
+
*
|
|
548
|
+
* Along the edge, `--apx-tt-arrow-y` / `--apx-tt-arrow-x` are measured from
|
|
549
|
+
* the body's outer edge, as every position the script works out is, while
|
|
550
|
+
* `top` / `left` count from inside its 1px border: hence 6px back, not 5px,
|
|
551
|
+
* or the arrow stands a pixel past the mark it points at. The 50% default
|
|
552
|
+
* centres on the padding box, which is the body's centre either way. */
|
|
536
553
|
.apexcharts-tooltip-arrow {
|
|
537
554
|
position: absolute;
|
|
538
555
|
box-sizing: border-box;
|
|
@@ -541,7 +558,7 @@ rect.legend-mouseover-inactive,
|
|
|
541
558
|
background: var(--apx-tt-arrow-bg);
|
|
542
559
|
transform: rotate(45deg);
|
|
543
560
|
pointer-events: none;
|
|
544
|
-
top: calc(var(--apx-tt-arrow-y, 50%) -
|
|
561
|
+
top: calc(var(--apx-tt-arrow-y, calc(50% + 1px)) - 6px)
|
|
545
562
|
}
|
|
546
563
|
|
|
547
564
|
/* Which two sides face outward depends on the placement. Under
|
|
@@ -568,7 +585,7 @@ rect.legend-mouseover-inactive,
|
|
|
568
585
|
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,
|
|
569
586
|
.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
|
|
570
587
|
top: auto;
|
|
571
|
-
left: calc(var(--apx-tt-arrow-x, 50%) -
|
|
588
|
+
left: calc(var(--apx-tt-arrow-x, calc(50% + 1px)) - 6px)
|
|
572
589
|
}
|
|
573
590
|
|
|
574
591
|
.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {
|