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

Frontend: Refactors Rate bar chart to D3 #3713

Merged
merged 28 commits into from
Oct 11, 2024

Conversation

benhammondmusic
Copy link
Collaborator

@benhammondmusic benhammondmusic commented Oct 9, 2024

Description and Motivation

  • create drop in replacement component for the rate chart using d3 rather than Vega
  • splits out sub components like Axes, Gridlines etc for smaller code files and mimicking pattern from Mia (d3 trend charts) and @eriwarr (stacked share vs population charts)
  • rename rate chart card component that wraps the chart
  • renames ambiguous prop metric to more specific mertricConfig
  • hides the demographic type label (like "race and ethnicity") vertically along the y axis on small screens to give more horizontal space to the chart
  • hide the bar label qualifier per 100k from the smallest screens

Has this been tested? How?

  • e2e tests updated and passing
  • passing unit tests added for rate bar chart helper functions

Screenshots (if appropriate)

Screen Reader Walk Through Demo (Captions)

screen.reader.bar.chart.mov-shrunk.mp4

Mobile, Compare Mode, Hover Tooltip

Screenshot 2024-10-11 at 8 37 30 AM Screenshot 2024-10-11 at 8 37 41 AM Screenshot 2024-10-11 at 8 37 51 AM Screenshot 2024-10-11 at 8 38 31 AM Screenshot 2024-10-11 at 8 38 34 AM Screenshot 2024-10-11 at 8 39 08 AM

Desktop Various Units

HET RATE-CHART Investigate rates of Depression in United States  Oct 2024 (1)
HET RATE-CHART Investigate rates of Depression in United States  Oct 2024
HET RATE-CHART Investigate rates of Excessive Drinking in United States  Oct 2024
HET RATE-CHART Investigate rates of HIV Stigma in United States  Oct 2024
HET RATE-CHART Investigate rates of Linkage to HIV Care in United States  Oct 2024

Types of changes

(leave all that apply)

  • New content or feature
  • Refactor / chore

New frontend preview link is below in the Netlify comment 😎

Copy link

netlify bot commented Oct 9, 2024

Deploy Preview for health-equity-tracker ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 22e16ae
🔍 Latest deploy log https://app.netlify.com/sites/health-equity-tracker/deploys/67097509df38de0008239703
😎 Deploy Preview https://deploy-preview-3713--health-equity-tracker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@benhammondmusic benhammondmusic marked this pull request as ready for review October 11, 2024 14:50
Copy link
Collaborator

@eriwarr eriwarr left a comment

Choose a reason for hiding this comment

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

Awesome!

frontend/src/charts/rateBarChart/EndOfBarLabel.tsx Outdated Show resolved Hide resolved
frontend/src/charts/rateBarChart/GroupLabelsYAxis.tsx Outdated Show resolved Hide resolved
@benhammondmusic benhammondmusic merged commit 6c02577 into SatcherInstitute:main Oct 11, 2024
10 checks passed
@benhammondmusic benhammondmusic deleted the rate-bar-chart branch October 11, 2024 19:01
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.

2 participants