-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix(partition): linkLabel textColor override #1498
Conversation
FYI I came across #1499 while making these changes. So I added a VRT to test that in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Nick, this change works for me. After removing the textInvertible
property from the config some release ago, there was no more option to overwrite that computed value.
What do you think if we use the same technique also for the fill_label?
Yeah I can add that |
packages/charts/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts
Show resolved
Hide resolved
packages/charts/src/chart_types/partition_chart/layout/viewmodel/viewmodel.ts
Show resolved
Hide resolved
Co-authored-by: Marco Vettorello <vettorello.marco@gmail.com>
# Conflicts: # integration/tests/partition_stories.test.ts
# [40.2.0](v40.1.0...v40.2.0) (2021-12-09) ### Bug Fixes * **partition:** linkLabel textColor override ([#1498](#1498)) ([3013310](3013310)) * **waffle:** use descend sortPredicate by default ([#1510](#1510)) ([763e2e3](763e2e3)) * **xy:** stacked polarity ([#1502](#1502)) ([920666a](920666a)), closes [#1280](#1280) ### Features * **xy:** expose style for interpolation fit functions ([#1505](#1505)) ([3071457](3071457))
# Conflicts: # integration/tests/axis_stories.test.ts # integration/tests/partition_stories.test.ts # packages/charts/src/chart_types/partition_chart/layout/viewmodel/link_text_layout.ts
Summary
The partition chart type now respects the
textColor
defined on theconfig.linkLabels
object. This will NOT adjust the color based on the background contrast.Details
Added new
ColorVariant
key calledAdaptive
to be used in cases where color should be adaptive depending on the background contrast. Only when the thelinkLabel.textColor
is set toAdaptive
, is the color contrast determined, otherwise the custom color string is used for all themes.Also changed the
eachTheme
api to passparams
without the&
prefix, to be placed anywhere in the url.Side note: I improved the error handling in the vrt framework. Before we waited for element from selector, if this failed, it would throw a misleading error that didn't help. Now if the element or url fails to load, there is an assertion to check the element exists and if not the test fails but does NOT throw an error. If the url fails to load the url will be logged to the console for easier debugging. See example below.
Issues
fix #1469
Checklist
:xy
,:partition
):interactions
,:axis
)closes #123
,fixes #123
)packages/charts/src/index.ts
dark
,light
,eui-dark
&eui-light