Skip to content

Group legend and group tooltip colors don't match getFillColor defined color #828

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

Closed
1 of 5 tasks
icaro1508 opened this issue Oct 2, 2020 · 1 comment · Fixed by #834
Closed
1 of 5 tasks

Group legend and group tooltip colors don't match getFillColor defined color #828

icaro1508 opened this issue Oct 2, 2020 · 1 comment · Fixed by #834

Comments

@icaro1508
Copy link
Contributor

icaro1508 commented Oct 2, 2020

I am submitting a...

  • Feature request
  • Design defect
  • Source code defect
  • Demo/documentation defect
  • Other

charts version:

@carbon/charts: "0.38.0"
@carbon/charts-react: "0.38.0"

Issue description

Group color in tooltip and legend doesn't match the color provided by the BaseChartOptions.getFillColor

Steps to produce the issue

  • Create a new CRA project
  • Install carbon-components and @carbon/charts-react
  • Import chart styles
  • Create new Component that uses some chart (I only tested the SimpleBarChart component)
  • Set getFillColor function to return a static value (in the CodeSandbox example rgb(110, 50, 201))
  • Hover over bars for tooltip or check group color in legend

Current behavior

Group legend and group in tooltip colors don't match fill color defined by getFillColor function

Expected behavior

Group legend and group in tooltip colors should match fill color defined by getFillColor function

Screenshot or recording

bug_tooltips

Link to Running Demo

CodeSandBox

@icaro1508
Copy link
Contributor Author

icaro1508 commented Oct 2, 2020

Just wanna say, awesome work with the components!

I might be willing to take a look at this overt the weekend if you guys want

P.S.: I know it's not really related to the issue but this is my first issue ever on GitHub and I didn't really manage to label it as a bug, so, sorry about that...

theiliad pushed a commit that referenced this issue Oct 8, 2020
* fix(core): fix Legend and Tooltip group color

Fix Legend and Tooltip Group colors to be based on the getFillColor option as well

fix #828

* fix(core): make color of legend and tooltip group be based on element's fillColor

Reverts 6fb39af and changes the color used in the Legend and Tooltip group item to use the element's
fillColor instead of the strokeColor

fix #828

Co-authored-by: Ícaro Aguiar Perez <[email protected]>
theiliad pushed a commit to theiliad/carbon-charts that referenced this issue May 17, 2021
* fix(core): fix Legend and Tooltip group color

Fix Legend and Tooltip Group colors to be based on the getFillColor option as well

fix carbon-design-system#828

* fix(core): make color of legend and tooltip group be based on element's fillColor

Reverts 6fb39af and changes the color used in the Legend and Tooltip group item to use the element's
fillColor instead of the strokeColor

fix carbon-design-system#828

Co-authored-by: Ícaro Aguiar Perez <[email protected]>
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 a pull request may close this issue.

1 participant