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

Bar on click #400

Merged
merged 34 commits into from
Sep 5, 2024
Merged

Bar on click #400

merged 34 commits into from
Sep 5, 2024

Conversation

adrianTJenkins
Copy link
Contributor

@adrianTJenkins adrianTJenkins commented Aug 28, 2024

Description

This change provides onClick handling to bar chart elements (i.e. Bar, DodgedBar, etc.) to allow bar element data to be exposed on different components beyond ChartPopover or ChartToolTip.

Related Issue

onClick prop for Chart components

Motivation and Context

onClick prop support for chart element components will enable chart info features that expose chart data on components outside of ChartPopover or ChartToolTip.

How Has This Been Tested?

  • All existing test cases pass
  • New test cases written for change coverage

Screenshots (if appropriate):

Screen.Recording.2024-09-03.at.9.13.12.AM.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • [] My change requires a change to the documentation.
  • [] I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

github-actions bot commented Sep 3, 2024

Copy link

github-actions bot commented Sep 3, 2024

@adrianTJenkins adrianTJenkins marked this pull request as ready for review September 3, 2024 16:21
@marshallpete marshallpete linked an issue Sep 3, 2024 that may be closed by this pull request
@marshallpete
Copy link
Member

I think you are missing the props on getInteractive(children, props) on stackedBarUtils

@@ -113,6 +114,7 @@ export const getStackedDimensionEncodings = (props: BarSpecProps): RectEncodeEnt
const { dimensionAxis, rangeScale, dimensionScaleKey } = getOrientationProperties(orientation);

return {
cursor: getCursor(props.children, props),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cursor: getCursor(props.children, props),

Copy link

github-actions bot commented Sep 4, 2024

Copy link

github-actions bot commented Sep 4, 2024

Copy link

github-actions bot commented Sep 4, 2024

src/utils/utils.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Sep 4, 2024

@marshallpete
Copy link
Member

@pratyushbanerjee do you have any idea why the sonarcloud code coverage percentage has worked on each of your PRs but isn't working on this one?

Long shot but curious if you might have any idea.

Copy link

github-actions bot commented Sep 5, 2024

@pratyushbanerjee
Copy link
Contributor

pratyushbanerjee commented Sep 5, 2024

@pratyushbanerjee do you have any idea why the sonarcloud code coverage percentage has worked on each of your PRs but isn't working on this one?

Long shot but curious if you might have any idea.

It seems there are no tests in this PR so it has 0% coverage. But it shows passed. Maybe some misconfiguration in sonarcloud.

I see some tests, strange that it shows no coverage.

@marshallpete
Copy link
Member

@pratyushbanerjee do you have any idea why the sonarcloud code coverage percentage has worked on each of your PRs but isn't working on this one?
Long shot but curious if you might have any idea.

It seems there are no tests in this PR so it has 0% coverage. But it shows passed. Maybe some misconfiguration in sonarcloud.

I see some tests, strange that it shows no coverage.

Your PRs have the coverage loading and if you open the sonar details in sonarcloud it looks correct.

This PR and many other show 0% and when you open the details in sonar cloud, it states that the coverage requires additional setup.

This PR

Your PR

image

@marshallpete
Copy link
Member

They use the same sonar cloud setup. I can't figure out what is different about the PRs which would make yours work but others don't.

@pratyushbanerjee
Copy link
Contributor

I see this in the sonar action logs:

WARN  Found 46 inconsistencies in coverage report. Re-run analyse in debug mode to see details.

Copy link

github-actions bot commented Sep 5, 2024

2 similar comments
Copy link

github-actions bot commented Sep 5, 2024

Copy link

github-actions bot commented Sep 5, 2024

Copy link

sonarqubecloud bot commented Sep 5, 2024

@marshallpete
Copy link
Member

Finally figured it out.

@marshallpete marshallpete merged commit 1578810 into adobe:main Sep 5, 2024
5 checks passed
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.

onClick prop for Chart components
3 participants