Skip to content

chore: merge v6 to next for nightly build #21049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 535 commits into from
Jun 23, 2025
Merged
Changes from 1 commit
Commits
Show all changes
535 commits
Select commit Hold shift + click to select a range
c737464
fix(series): mismatched dimension index when canOmitUnusedDimensions …
Jan 13, 2025
271f9db
chore(test): fix local echarts file path
Ovilia Jan 14, 2025
3a65ed2
fix(break): run visual tests and fix
Ovilia Jan 15, 2025
5bb0785
test(series):mismatched dimension index when canOmitUnusedDimensions …
Jan 15, 2025
1d4895f
Merge pull request #20676 from apache/chore/visualTest
plainheart Jan 16, 2025
efe6d87
fix(break): fix nearest in marker
Ovilia Jan 17, 2025
a5bef72
feat(break): break axis events and actions
Ovilia Jan 17, 2025
5378182
fix(break): fix unit test cases
Ovilia Jan 17, 2025
2872e5c
fix(heatmap): fix labels that are not in calendar range are unexpecte…
plainheart Jan 18, 2025
2979818
Merge branch 'master' into v6
Ovilia Jan 20, 2025
4344997
feat(theme): dynamically register and set chart theme
Ovilia Jan 21, 2025
18f0316
Merge pull request #20699 from apache/fix/heatmap-label
Ovilia Jan 21, 2025
a14f462
fix(theme): update setTheme
Ovilia Jan 22, 2025
533206b
fix(theme): revert theme
Ovilia Jan 22, 2025
21c5ffc
fix(theme): update code according to review comments
Ovilia Jan 23, 2025
b5d1a83
Merge pull request #20705 from apache/feat/design-token
Ovilia Jan 23, 2025
f073433
Added missing period for consistency and readability
shaymolcho Jan 31, 2025
d54443d
Merge pull request #20727 from shaymolcho/master
plainheart Feb 1, 2025
03e2883
fix(chord): fix lint errors
Ovilia Feb 7, 2025
b4ca13f
feat(chord): support tooltip
Ovilia Feb 8, 2025
6724f9a
feat(chord): legend with items
Ovilia Feb 8, 2025
e8961ee
feat(chord): node value can be larger than edge sum
Ovilia Feb 10, 2025
fd0bdbd
feat(chord): support links.value being all 0
Ovilia Feb 10, 2025
869eb99
feat(chord): WIP clockwise
Ovilia Feb 12, 2025
214441e
chore(deps-dev): bump rollup from 2.34.2 to 2.79.2
dependabot[bot] Feb 12, 2025
b5c4a66
Merge pull request #20754 from apache/dependabot/npm_and_yarn/rollup-…
plainheart Feb 13, 2025
824791f
fix(chord): fix clockwise and some failed cases
Ovilia Feb 13, 2025
c4df9c0
feat(chord): support label
Ovilia Feb 14, 2025
19c094a
fix(svg): remove SVG support check in `getSvgDataURL`
plainheart Feb 17, 2025
969bc1c
feat(chord): WIP focus
Ovilia Feb 17, 2025
cf7440d
feat(chord): focus supported
Ovilia Feb 18, 2025
4ca9d39
style(chord): remove unused imports
Ovilia Feb 18, 2025
db1896e
Merge branch 'v6' into feat-chord
Ovilia Feb 20, 2025
8e258fa
test: fix test visual
Ovilia Feb 20, 2025
bfed24a
test(chord): add test visual actions
Ovilia Feb 20, 2025
85c56b9
test(break): add test record
Ovilia Feb 21, 2025
88cf7cf
Add Norwegian Bokmål language file
joakimono Feb 26, 2025
bd37d6e
Use single quoted strings
joakimono Feb 27, 2025
56c4fc0
Merge pull request #20792 from joakimono/feature/i18n-norwegian
plainheart Feb 28, 2025
adcbbfb
fix(title): title text style width type should not include string #20799
sz-p Mar 3, 2025
f738e27
Merge pull request #20682 from Justin-ZS/fix/20672
100pah Mar 6, 2025
8180fae
Merge pull request #20800 from sz-p/fix-20799
Ovilia Mar 10, 2025
15dba64
fix(sankey): center changes when re-render
Ovilia Mar 10, 2025
3078ef4
test(sankey): test case to test sankey roam
Ovilia Mar 10, 2025
e910d37
fix(sankey): fix import
Ovilia Mar 10, 2025
3f2ed21
fix(marker): rename relativeTo
Ovilia Mar 10, 2025
29c83aa
chord: merge from v6 and resolve conflict
Ovilia Mar 10, 2025
3e741b1
fix(dataZoom): restrict range on brushEnd
mortalYoung Mar 10, 2025
bfa8c92
fix(axis):null value item on category axis should be able to show too…
Justin-ZS Mar 10, 2025
f559a45
feat(marker): markPoint markLine markArea add z2 option to support ch…
sz-p Mar 12, 2025
6cba74c
Merge pull request #20782 from sz-p/feat-6691
Ovilia Mar 13, 2025
87561ee
feat(legend): legend support triggerEvent (#18144)
sz-p Mar 17, 2025
97939bd
Fix the PR: make the extent match the target range.
100pah Mar 18, 2025
9ce6fe4
Merge pull request #20814 from mortalYoung/fix-20807
100pah Mar 18, 2025
bd1fbe8
feat: export parsePercent for custom series
Ovilia Mar 24, 2025
30340d4
Merge branch 'v6' into feat-sankey-roam
Ovilia Mar 24, 2025
a03a4a7
refactor(roam): move roam controller logic to helper
Ovilia Mar 24, 2025
be096e7
fix(roam): fix import
Ovilia Mar 24, 2025
9f4dfcf
(feat & fix): (1) break axis (2) time axis (3) test helper. Based on …
100pah Mar 24, 2025
b74fca5
Merge branch 'feat/break-axis' into feat/break-axis-crmod
100pah Mar 24, 2025
a07d471
Merge pull request #20321 from apache/feat-sankey-roam
Ovilia Mar 25, 2025
87599b5
fix(chord): padAngle takes rest space of minAngle
Ovilia Mar 25, 2025
4c9428b
feat: new theme color
Ovilia Mar 26, 2025
0abc0bd
(feat & fix): (1) fix test/axis-break-3.html (2) Add license headers.…
100pah Mar 26, 2025
2fab291
Merge pull request #18164 from sz-p/add-legend-mouse-event
100pah Mar 27, 2025
1b19b82
design: gray tokens
Ovilia Mar 27, 2025
6fdd2be
design: colors using tokens
Ovilia Mar 28, 2025
21b80f3
(test) enhance testHelper.js: support range input and select input.
100pah Mar 28, 2025
0f759d0
Merge pull request #20873 from apache/test-helper
100pah Mar 28, 2025
0a31803
fix: add css for test helper new added range input and select input.
100pah Mar 28, 2025
139f33b
Merge pull request #20874 from apache/test-helper
100pah Mar 28, 2025
28db68a
chore(deps-dev): bump tar-fs from 3.0.6 to 3.0.8 in /test/runTest
dependabot[bot] Mar 28, 2025
74291dd
(test): enhance testHelper to support range input in select.
100pah Mar 29, 2025
8dbf9ac
Merge pull request #20877 from apache/test-helper
100pah Mar 29, 2025
397943d
(test): manually sync testHelper from branch: v6
100pah Mar 29, 2025
1d52dfb
Merge branch 'v6' into feat/break-axis
Ovilia Mar 31, 2025
fc1d010
Merge branch 'v6' into feat/break-axis
Ovilia Mar 31, 2025
28cebea
Merge branch 'v6' into feat/break-axis-crmod
Ovilia Mar 31, 2025
294ed78
feat: update theme
Ovilia Mar 31, 2025
70c6b29
(test) Enhance testHelper: (1) Support saving states when a input con…
100pah Mar 31, 2025
147f7dc
(visual test fix): Fix replay broken in recorder brought by #20676. @…
100pah Mar 31, 2025
a7ecea9
(visual test fix): Fix that when a HTML selector has an ancestor with…
100pah Mar 31, 2025
f5ee975
Merge pull request #20884 from apache/test-helper
100pah Mar 31, 2025
14d22bb
Merge pull request #20875 from apache/dependabot/npm_and_yarn/test/ru…
plainheart Apr 1, 2025
d8accf1
(tweak) rename public TS type: ScaleBreak => AxisBreak
100pah Apr 1, 2025
17a3bad
feat: first round color all changed
Ovilia Apr 1, 2025
70f20ac
misc: fix spelling
jbampton Apr 2, 2025
a121f0a
Merge pull request #20887 from jbampton/fix-spelling
plainheart Apr 2, 2025
fef4195
(tweak) (1) support breakLabelLayout.moveOverlap. (2) rename axisLabe…
100pah Apr 2, 2025
7638b4d
(feat): Support `refineEvent` in `registerAction`, and refactor 'sele…
100pah Apr 4, 2025
bfc206b
(tweak): change axis break event to be user-friendly.
100pah Apr 5, 2025
12a05b2
(tweak): Add break connect test case.
100pah Apr 5, 2025
c37073d
(fix) Fix the extent boundary pruning by break.
100pah Apr 5, 2025
e593355
(test): (1) Sync testHelper update manually. (2) Fix buttons input an…
100pah Apr 6, 2025
26247ac
(feat) Support config margin for axis labels to escape overlap.
100pah Apr 6, 2025
8ed6871
(test) manually sync visual test fix.
100pah Apr 6, 2025
2fabc76
Merge pull request #20760 from apache/getSvgDataURL-remove-svg-suppor…
plainheart Apr 7, 2025
3ff94c5
Merge pull request #20522 from apache/feat-chord
Ovilia Apr 7, 2025
02060ff
Merge branch 'v6' into feat-scatter
Ovilia Apr 7, 2025
769c3f0
(test) fix testHelper. And add fix buttons height.
100pah Apr 7, 2025
aa1ea8b
Merge pull request #20896 from apache/test-helper
100pah Apr 7, 2025
d5df6aa
fix(scatter): clamp jitter within bandwidth
Ovilia Apr 7, 2025
e99f581
refactor(jitter): improve code efficiency according to #19941#discuss…
Ovilia Apr 7, 2025
216e288
chore: merge
Ovilia Apr 7, 2025
365f33b
(test): (1) Fix visual test facilities: the initial source "Release" …
100pah Apr 7, 2025
b0337ee
fix(bar): remove unused `startValue` option from the `BarSeriesOption…
plainheart Apr 8, 2025
5f0184b
Merge branch 'v6' into feat-theme
Ovilia Apr 8, 2025
90395d5
[test] Fix test facilities. (1) Fix that visual test runtime thrown e…
100pah Apr 8, 2025
2629a7c
(fix) Remove the breaking change introduced by axis break. And export…
100pah Apr 8, 2025
e79c643
(test) Fix axis break test cases.
100pah Apr 8, 2025
092c9ed
Merge branch 'v6' into feat/break-axis-crmod
100pah Apr 8, 2025
18b2d65
Modify the zrender dep to github:ecomfe/zrender#v6 for testing.
100pah Apr 8, 2025
20ad93e
Merge branch 'feat/break-axis' into feat/break-axis-crmod
100pah Apr 8, 2025
7ef21ea
test(time): Fix failed time locale based test case.
100pah Apr 8, 2025
a8d0485
Merge pull request #20582 from apache/fix-roundCap
plainheart Apr 9, 2025
b9e5bb0
fix(pie): fix labelLine may be not removed and cause error when singl…
plainheart Apr 9, 2025
6629fb2
feat: update dataZoom theme
Ovilia Apr 9, 2025
6118d1e
feat(legend): legend support triggerEvent (#18144)
sz-p Apr 9, 2025
6377d8d
Merge pull request #20907 from sz-p/fix-18164
plainheart Apr 9, 2025
b407027
Merge pull request #20906 from apache/fix/pie/labelLine-remove-error
plainheart Apr 9, 2025
3fa2605
Merge pull request #20857 from apache/feat/break-axis-crmod
Ovilia Apr 10, 2025
2a3b098
Merge pull request #19459 from apache/feat/break-axis
Ovilia Apr 10, 2025
beb3636
refactor: improve code
Ovilia Apr 10, 2025
f6ebee9
Merge pull request #20901 from apache/fix/bar/remove-unused-startValu…
Ovilia Apr 10, 2025
2b0bd9a
Merge pull request #20166 from apache/feat/stock-marker
plainheart Apr 10, 2025
2f8fcc2
chore: merge
Ovilia Apr 11, 2025
6233037
refactor(jitter): register jitter on need
Ovilia Apr 11, 2025
0bda493
refactor(jitter): remove JitterStorable
Ovilia Apr 11, 2025
403db55
fix(custom): fix potential NPE when applying leave transition
plainheart Apr 16, 2025
b1319ce
Merge branch 'v6' into feat-disableTooltip
Ovilia Apr 17, 2025
ed9b5c5
fix(custom): rename to tooltipDisabled and add more cases
Ovilia Apr 17, 2025
ef926fa
Merge pull request #20920 from apache/fix/custom-series-NPE
Ovilia Apr 17, 2025
c350fc8
fix: fix disableTooltip
Ovilia Apr 23, 2025
3898955
fix: adjust themes
Ovilia Apr 23, 2025
d2d1fbd
Merge pull request #20447 from apache/feat-disableTooltip
Ovilia Apr 24, 2025
c88e9f7
feat: update themes
Ovilia Apr 24, 2025
85482d9
Merge pull request #19941 from apache/feat-scatter
Ovilia Apr 24, 2025
74ddbde
fix: fix unit test cases
Ovilia Apr 25, 2025
026ade4
Merge branch 'master' into fix-16924
andrearoota May 7, 2025
76b1071
fix(sankey): fix browser crash when `emphasis.focus` is `'trajectory'…
plainheart May 8, 2025
e23ed44
feat(theme): use containDataZoom to avoid overlap
Ovilia May 8, 2025
230ca04
fix(theme): adjust grid, legend, tokens
Ovilia May 8, 2025
9a20185
fix(visualMap): fix some text style can't work on visualMap
plainheart May 8, 2025
7d76132
fix(visualMap): fix some text style can't work on visualMap
plainheart May 8, 2025
f3c93a6
fix(theme): revert containDataZoom and update theme
Ovilia May 8, 2025
8fd6cd4
fix(theme): remove comment
Ovilia May 9, 2025
731aac4
feat(theme): add dark theme
Ovilia May 12, 2025
0882edd
feat(theme): remove light colorLayer
Ovilia May 12, 2025
4385bc6
set tooltip display to none when hide
May 12, 2025
a24e8aa
Merge pull request #20961 from apache/fix/visualMap-textStyle
Ovilia May 13, 2025
a1c4c3f
fix(label): fix label rich style does not inherit the plain label sty…
plainheart May 16, 2025
2204b1a
fix(label): support global `richInheritPlainLabel` option
plainheart May 16, 2025
b7d4893
Merge pull request #20977 from apache/fix/rich-inherit-plain-label
plainheart May 16, 2025
fc6656f
Merge pull request #16978 from andrearoota/fix-16924
100pah May 17, 2025
7b34b19
fix(theme): update according to the pr review
Ovilia May 20, 2025
eddf284
feat(axis): support tooltip for angleAxis label
plainheart May 21, 2025
7872705
fix(tooltip): fix style coord transform markers are not removed after…
plainheart May 21, 2025
77826be
fix: update styles
Ovilia May 23, 2025
6bcfe10
test: sync test helper.
100pah May 24, 2025
139206b
test: manually sync visual test updates.
100pah May 24, 2025
7d0518b
fix(tooltip): rename `_styleCoordCleanups` to `_clearStyleCoord`
plainheart May 24, 2025
f9b2a82
chore(theme): support theme in visual test
Ovilia May 26, 2025
8ddd15d
feat(visualMap): support specify `seriesId` on visualMap option; prev…
100pah May 26, 2025
8005bc3
test: support using theme in visual test
Ovilia May 27, 2025
75361e6
feat(stack): able to reverse the stack order
Justin-ZS May 27, 2025
f74b153
feat(theme): WIP v5 theme
Ovilia May 27, 2025
88d658a
fix(theme): update v5 theme
Ovilia May 28, 2025
e7867e1
chore(test): support mark diff as expected
Ovilia May 29, 2025
bd4d965
Merge branch 'v6' into feat-theme
Ovilia May 29, 2025
dcebabd
test: add interactive test base on official example
Justin-ZS May 29, 2025
791daf5
chore(tooltip): remove unused option `displayMode`
plainheart May 29, 2025
4e73d95
feat(tooltip): add `displayTransition` option to control the display …
plainheart May 29, 2025
d88a52a
test(tooltip): add test case for `displayTransition` option
plainheart May 29, 2025
a18d636
chore: merge master branch
plainheart May 29, 2025
6e40225
chore: merge 'feat/tooltip/displayTransition' branch
plainheart May 29, 2025
a61f52e
fix(tooltip): only apply fade transition when `displayTransition` is …
plainheart May 30, 2025
c448109
test(theme): fix test cases of v6
Ovilia May 30, 2025
6beeef2
feat(matrix & calendar): (1). Support matrix col/row size option. (2)…
100pah May 30, 2025
7a22db7
Merge pull request #20959 from apache/fix/sankey-focus-trajectory-per…
100pah May 31, 2025
f1df397
Merge pull request #20986 from apache/feat/angleAxis-tooltip
100pah May 31, 2025
4ea877a
Merge pull request #20966 from jqqin/fix/tooltip-display-none-on-hide
plainheart May 31, 2025
1767746
Merge branch 'master' into fix/tooltip/cleanup-styleCoord-markers
plainheart May 31, 2025
43dd693
fix(tooltip): use `transformLocalCoordClear` to clear transform style…
plainheart May 31, 2025
123976e
Merge pull request #20987 from apache/fix/tooltip/cleanup-styleCoord-…
100pah May 31, 2025
485be0f
Merge pull request #21006 from apache/master
100pah May 31, 2025
9afb1c4
Merge pull request #21007 from apache/next
100pah May 31, 2025
7e49f51
fix(matrix): fix test case and typo
100pah May 31, 2025
97f54eb
Merge pull request #21008 from apache/master
100pah May 31, 2025
418b818
Merge branch 'v6' into feat-matrix-enhance
100pah Jun 1, 2025
13cf562
refactor(layout): unify margin/padding apply util.
100pah Jun 1, 2025
a4ac203
feat(matrix): (1). Support sankey, tree, treemap layout on matrix and…
100pah Jun 1, 2025
5d555a2
feat(matrix): (1) Add lineOverflow to long text in cells. (2) Fix tex…
100pah Jun 2, 2025
cfcd145
chore(deps-dev): bump tar-fs from 3.0.8 to 3.0.9 in /test/runTest
dependabot[bot] Jun 3, 2025
9c5b5fc
Merge pull request #21011 from apache/dependabot/npm_and_yarn/test/ru…
plainheart Jun 3, 2025
acf99c7
chore: fix visual test
Ovilia Jun 4, 2025
a43e38d
chore: merge branch 'v6' into 'feat-matrix'
plainheart Jun 4, 2025
a09d775
chore: merge branch 'feat-matrix' into 'feat-matrix-enhance'
plainheart Jun 4, 2025
21d4124
fix: remove an unintentionally added test case
Ovilia Jun 4, 2025
4181b3f
chore: merge v6
Ovilia Jun 4, 2025
72f92ba
chore(test): fix default actual source
Ovilia Jun 4, 2025
3c33ba5
chore: remove unintentionally added files
Ovilia Jun 4, 2025
a1d61c2
chore: remove unintentionally added import
Ovilia Jun 4, 2025
31cf386
tweak(series data): Add validator to hint incorrect option.
100pah Jun 4, 2025
3123a3a
test(matrix): Add an application case.
100pah Jun 4, 2025
4a978a0
feat(matrix): fix treemap breadcrumb layout in matrix.
100pah Jun 4, 2025
b60f105
Merge pull request #20865 from apache/feat-theme
Ovilia Jun 5, 2025
5c11b74
fix(rich-text-inherit-plain): see https://github.com/apache/echarts/…
100pah Jun 5, 2025
ad7c5c8
fix(rich-inherit-plain): fix and add test case.
100pah Jun 5, 2025
9003873
Merge pull request #21016 from apache/fix/rich-inherit-plain-label-2
plainheart Jun 8, 2025
29230b8
Merge remote-tracking branch 'origin/v6' into feat-matrix-enhance
100pah Jun 8, 2025
59e8c64
feat(matrix): change the definition of cell.size and levelSize - base…
100pah Jun 9, 2025
1a3e819
feat(matrix): (1) Fix text truncate area. (2) Remove extra padding, u…
100pah Jun 9, 2025
9b3f71e
test(matrix): Add visual test (partial, not complete)
100pah Jun 9, 2025
069e686
test: temporarily change zrender dep.
100pah Jun 9, 2025
e48b8ba
Merge pull request #21005 from apache/feat-matrix-enhance
100pah Jun 9, 2025
09cdac9
feat(matrix): Add clipPath for text.
100pah Jun 9, 2025
469ad35
fix(test infra): fix test bug introduced in 8005bc3d41a24d06e7508d47e…
100pah Jun 9, 2025
1a9faac
chore: fix comment and TS type error.
100pah Jun 10, 2025
b2ac493
feat(roam): Change cursor style to indicate the draggable area. (effe…
100pah Jun 10, 2025
10b4528
test(infra): testHelper support multiple inner range in select input.
100pah Jun 11, 2025
1465e18
feat(matrix): use tokens for color
Ovilia Jun 12, 2025
72cf70d
test: Support suffix to range input
100pah Jun 12, 2025
0b9b08a
test: Add resize cb.
100pah Jun 12, 2025
6319d56
Update Ordinal.ts
100pah Jun 12, 2025
f4c244c
Merge pull request #20777 from Justin-ZS/fix/20774
Ovilia Jun 12, 2025
0661c79
fix(graph): #16904 introcuded percentage string here, such as '33%'. …
100pah Jun 12, 2025
a29a45e
fix: code review
Justin-ZS Jun 13, 2025
237badb
feat: (1) Support `preserveAspect` `preserveAspectAlign` `preserveAsp…
100pah Jun 15, 2025
9ea647f
Merge branch 'feat-matrix' of github.com:apache/incubator-echarts int…
100pah Jun 15, 2025
e223dd8
ut: remove itemStyle
Justin-ZS Jun 16, 2025
79f123b
Merge pull request #20998 from Justin-ZS/feat/support_reverse_stack_o…
Ovilia Jun 16, 2025
c5a1265
fix(dataZoom): fix cases with dataset, relates to #16978
Ovilia Jun 17, 2025
106ad3f
Merge pull request #21039 from apache/fix-dataZoom
Ovilia Jun 18, 2025
1fe657d
fix(buildPath): remove checking buildPath
Ovilia Jun 18, 2025
aad95b3
Merge pull request #21040 from apache/fix-buildPath
Ovilia Jun 18, 2025
3aac20d
fix(marker): fix bug since #20166
Ovilia Jun 18, 2025
0b863d1
Merge pull request #21042 from apache/fix-relativeTo
Ovilia Jun 19, 2025
b604a9f
fix(dataZoom): fix dataZoom for single data
Ovilia Jun 19, 2025
f5c8bf6
fix(dataZoom): revert unnecessary changes
Ovilia Jun 19, 2025
5d66452
Merge pull request #21043 from apache/fix-dataZoom
Ovilia Jun 19, 2025
ca03ff8
fix(marker): overwrite value only if type is not defined
Ovilia Jun 19, 2025
4cccafb
fix(dataZoom): fix the case when first value is NaN, relates to #16978
Ovilia Jun 19, 2025
eed7264
chore: merge master into v6
Ovilia Jun 19, 2025
74af455
feat(thumbnail): (1) Refactor thumbnail to a component for further ex…
100pah Jun 19, 2025
b5e06ca
fix(graph): fix NPE when triggering graphRoam action after removing.
100pah Jun 19, 2025
7323317
test(matrix): complete visual test for matrix.
100pah Jun 19, 2025
7974074
switch zrender dep to v6
100pah Jun 20, 2025
e4c0eb8
Merge pull request #19807 from apache/feat-matrix
100pah Jun 20, 2025
921cb58
Merge pull request #21045 from apache/fix-dataZoom
Ovilia Jun 21, 2025
9688ffc
Merge pull request #21044 from apache/fix-marker
Ovilia Jun 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(rich-text-inherit-plain): see https://github.com/apache/echarts/p…
100pah committed Jun 5, 2025
commit 5c11b747bb0cc21d5a86561ba0e9e088a3493d12
34 changes: 24 additions & 10 deletions src/label/labelStyle.ts
Original file line number Diff line number Diff line change
@@ -30,10 +30,11 @@ import {
ColorString,
ZRStyleProps,
AnimationOptionMixin,
InterpolatableValue
InterpolatableValue,
NullUndefined
} from '../util/types';
import GlobalModel from '../model/Global';
import { isFunction, retrieve2, extend, keys, trim } from 'zrender/src/core/util';
import { isFunction, retrieve2, extend, keys, trim, retrieve3 } from 'zrender/src/core/util';
import { SPECIAL_STATES, DISPLAY_STATES } from '../util/states';
import { deprecateReplaceLog } from '../util/log';
import { makeInner, interpolateRawValues } from '../util/model';
@@ -398,15 +399,13 @@ function setTextStyleCommon(
const richInheritPlainLabelOptionName = 'richInheritPlainLabel' as const;
const richInheritPlainLabel = retrieve2(
textStyleModel.get(richInheritPlainLabelOptionName),
ecModel && ecModel.get(richInheritPlainLabelOptionName)
ecModel ? ecModel.get(richInheritPlainLabelOptionName) : undefined
);
const plainTextStyle = textStyleModel.option ? textStyleModel.option.textStyle : null;
for (const name in richItemNames) {
if (richItemNames.hasOwnProperty(name)) {
// Cascade is supported in rich.
const richTextStyle = textStyleModel.getModel(
['rich', name],
richInheritPlainLabel !== false ? textStyleModel : void 0
);
const richTextStyle = textStyleModel.getModel(['rich', name]);
// In rich, never `disableBox`.
// consider `label: {formatter: '{a|xx}', color: 'blue', rich: {a: {}}}`,
// the default color `'blue'` will not be adopted if no color declared in `rich`.
@@ -415,7 +414,8 @@ function setTextStyleCommon(
// Since v6, the rich style inherits plain label by default
// but this behavior can be disabled by setting `richInheritPlainLabel` to `false`.
setTokenTextStyle(
richResult[name] = {}, richTextStyle, globalTextStyle, opt, isNotNormal, isAttached, false, true
richResult[name] = {}, richTextStyle, globalTextStyle, plainTextStyle, richInheritPlainLabel,
opt, isNotNormal, isAttached, false, true
);
}
}
@@ -431,7 +431,9 @@ function setTextStyleCommon(
if (margin != null) {
textStyle.margin = margin;
}
setTokenTextStyle(textStyle, textStyleModel, globalTextStyle, opt, isNotNormal, isAttached, true, false);
setTokenTextStyle(
textStyle, textStyleModel, globalTextStyle, null, null, opt, isNotNormal, isAttached, true, false
);
}
// Consider case:
// {
@@ -482,6 +484,8 @@ function setTokenTextStyle(
textStyle: TextStyleProps['rich'][string],
textStyleModel: Model<LabelOption>,
globalTextStyle: LabelOption,
plainTextStyle: LabelOption | NullUndefined,
richInheritPlainLabel: boolean,
opt?: Pick<TextCommonParams, 'inheritColor' | 'defaultOpacity' | 'disableBox'>,
isNotNormal?: boolean,
isAttached?: boolean,
@@ -566,7 +570,17 @@ function setTokenTextStyle(
// others should remain their original value got from normal style.
for (let i = 0; i < TEXT_PROPS_WITH_GLOBAL.length; i++) {
const key = TEXT_PROPS_WITH_GLOBAL[i];
const val = retrieve2(textStyleModel.getShallow(key), globalTextStyle[key]);
// props width, height, padding, margin, tag, backgroundColor, borderColor,
// borderWidth, borderRadius, shadowColor, shadowBlur, shadowOffsetX, shadowOffsetY
// may inappropriate to inherit from plainTextStyle.
// And if some props is specified in default options, users may have to reset them one by one.
// Therefore, we only allow these props to inherit from plainTextStyle.
// `richInheritPlainLabel` is switch for backward compatibility
const val = richInheritPlainLabel !== false
? retrieve3(
textStyleModel.getShallow(key), plainTextStyle ? plainTextStyle[key] : null, globalTextStyle[key]
)
: retrieve2(textStyleModel.getShallow(key), globalTextStyle[key]);
if (val != null) {
(textStyle as any)[key] = val;
}