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(metric): add value icon and color #2101

Merged
merged 4 commits into from
Jul 18, 2023

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jul 11, 2023

Summary

Expose two new props for the metric:

  • the valueColor available on every MetricDatum, that allows you to customize the color used by the value label
  • the valueIcon available on every MetricDatum, and that allows you to add an icon right to the value label. The valueIcon receive also the same color used by the value label.
Screenshot 2023-07-17 at 10 05 34

Issues

fix #2098

Checklist

  • The proper chart type label has been added (e.g. :xy, :partition)
  • The proper feature labels have been added (e.g. :interactions, :axis)
  • 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 force-pushed the 2023_07_11-add_value_icon_and_color branch from 2b79377 to 0f87bb6 Compare July 17, 2023 08:02
@markov00 markov00 changed the title [metric] WIP value icon and color feat(metric): add value icon and color Jul 17, 2023
@markov00 markov00 added enhancement New feature or request :metric Related to Metric chart labels Jul 17, 2023
@markov00
Copy link
Member Author

buildkite update screenshots

@markov00 markov00 marked this pull request as ready for review July 17, 2023 09:01
@elastic-datavis
Copy link
Contributor

Deployments - af64686

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

Copy link

@gvnmagni gvnmagni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works exactly as expected

Copy link
Collaborator

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally and works great. Ship it! 🚢

@markov00 markov00 enabled auto-merge (squash) July 18, 2023 10:50
@markov00 markov00 merged commit d7134f5 into elastic:main Jul 18, 2023
11 checks passed
nickofthyme pushed a commit that referenced this pull request Jul 19, 2023
# [59.1.0](v59.0.0...v59.1.0) (2023-07-19)

### Bug Fixes

* **deps:** update dependency @elastic/eui to v83 ([#2088](#2088)) ([c72695e](c72695e))
* **deps:** update dependency @elastic/eui to v84 ([#2108](#2108)) ([2b76a9a](2b76a9a))

### Features

* **metric:** add value icon and color ([#2101](#2101)) ([d7134f5](d7134f5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request :metric Related to Metric chart
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Customize value in the Metric chart
3 participants