Skip to content
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

feat(legend): expose legend extra configuration #2043

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

markov00
Copy link
Member

@markov00 markov00 commented May 17, 2023

Summary

This PR rewrites and exposes the configuration for the legend extra parameter, now called legend value.

These are the changes available in the PR:

  • replace the booleanshowLegendExtra prop in Settings with a configurable legendValue
  • the legendValue prop now accept the following configurations:
    • none: don't display a value
    • lastBucket: works only

TODO.....

  • renames of all extra and extra related functions, replacing the extra term with value or values. Extra wasn't a proper name and I feel that value is definitely generic but at least more specific
  • adds a new storybook story to test the effectiveness of one possible value mode.
    Add an example of the wrong rendering of the last bucket in data.
    The example shows:
  • A fixed xDomain that goes from May 16, 2023 @ 00:00:00.000 to May 17, 2023 @ 12:59:59.999 UTC+2
  • The data is aggregated every 30 minutes
  • The last bucket available is starts at May 17 at 12:30 and ends at May 17 at 12:59:59.999
  • The chart shows an additional bucket from 13:00 to 13:30
  • The legend doesn't show the last bucket value because of that additional bucket

Linked to elastic/kibana#153079 for a cleaner resolution of the problem

Details

Issues

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • The :theme label has been added and the @elastic/eui-team team has been pinged when there are Theme API changes
  • All related issues have been linked (i.e. closes #123, fixes #123)
  • New public API exports have been added to packages/charts/src/index.ts
  • Unit tests have been added or updated to match the most common scenarios
  • The proper documentation and/or storybook story has been added or updated
  • The code has been checked for cross-browser compatibility (Chrome, Firefox, Safari, Edge)
  • Visual changes have been tested with all available themes including dark, light, eui-dark & eui-light

@markov00 markov00 changed the title test:add example for last bucket error test: add example for last bucket error May 17, 2023
@markov00
Copy link
Member Author

buildkite update screenshots

elastic-datavis bot and others added 2 commits May 17, 2023 11:16
BREAKING CHANGE: the  has been replaced by a  with multiple parameters
@markov00 markov00 changed the title test: add example for last bucket error feat(legend): expose legend extra configuration May 18, 2023
@markov00
Copy link
Member Author

buildkite update screenshots

@markov00
Copy link
Member Author

markov00 commented Jun 6, 2023

buildkite update screenshots

@elastic-datavis
Copy link
Contributor

Deployments - 0817ed0

  • Storybook (link)
  • e2e server (link)
  • Playwright report (link)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants