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

Chart titles are missing in demographic breakdown viz #571

Closed
macfarlandian opened this issue May 27, 2022 · 11 comments · Fixed by #573
Closed

Chart titles are missing in demographic breakdown viz #571

macfarlandian opened this issue May 27, 2022 · 11 comments · Fixed by #573

Comments

@macfarlandian
Copy link
Collaborator

Describe the bug
When viewing a demographic breakdown section (e.g., https://spotlight-staging.recidiviz.org/us-nd/narratives/probation/5), labels are missing on all but the last chart when you select a breakdown type.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://spotlight-staging.recidiviz.org/us-nd/narratives/probation/5
  2. Click on the dropdown and select one of the demographic types
  3. See error

Expected behavior
Only the last chart should have a legend but all of the charts should have a title

Screenshots
Screenshots revealing sensitive information must not be shared. If a screenshot is helpful in diagnosing and resolving the bug, please send this directly to a contact on the Recidiviz team.
Screen Shot 2022-05-27 at 11 17 22 AM
(this is not sensitive data)

Desktop (please complete the following information):

  • OS [e.g. Windows 10]: n/a
  • Browser [e.g. chrome, edge]:
  • Version [e.g. 22]:

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]: n/a
  • OS: [e.g. iOS8.1]:
  • Browser [e.g. stock browser, safari]:
  • Version [e.g. 22]:

Additional context
Not evident in prod yet so it must be the result of an unreleased change (I believe 6dc8552) ... it appears that the prop that hides the legend is also inadvertently hiding the title in this situation)

@lilidworkin
Copy link
Contributor

@terryttsai can you look into this when you have a chance, or maybe just assign to Ilya since according to the "Additional Context" it seems like it might be the result of one of his changes!

@nasaownsky
Copy link
Collaborator

@terryttsai I know solution for this problem, so if you haven't done it by now, I could handle it.

@lilidworkin
Copy link
Contributor

Thank you @nasaownsky !!

@terryttsai terryttsai mentioned this issue May 31, 2022
8 tasks
@terryttsai
Copy link
Contributor

Huh I thought I replied to this via email but I don't see my comment. I have a fix for this too: #573

Though poking around in the app, I see areas where we provide a legend on every bar rather than on the last bar, do we want to remove the legend in those places too?

@terryttsai
Copy link
Contributor

In the racial disparities section:

Screen Shot 2022-05-31 at 10 02 14 AM

Screen Shot 2022-05-31 at 10 02 19 AM

Screen Shot 2022-05-31 at 10 02 24 AM

@macfarlandian
Copy link
Collaborator Author

yes I agree the desired behavior in these scenarios would be to only show the legend once, since it's the same for both charts in the section

@lilidworkin
Copy link
Contributor

@terryttsai what's the status on this?

@terryttsai
Copy link
Contributor

PR #573 is up for fixing the issue however we should create a new issue for removing the legends in areas where they're showing up more than once.

@terryttsai
Copy link
Contributor

I'll create the follow-up issue and merge #573

@lilidworkin
Copy link
Contributor

Thanks!!

@terryttsai
Copy link
Contributor

Follow-up issue: #575

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment