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

Contact 311 chart visual issues #460

Closed
jmensch1 opened this issue Mar 24, 2020 · 4 comments · Fixed by #509
Closed

Contact 311 chart visual issues #460

jmensch1 opened this issue Mar 24, 2020 · 4 comments · Fixed by #509
Assignees
Labels
Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Feature: Missing Role: Frontend React front end work size: Missing v1 The first version of the site

Comments

@jmensch1
Copy link
Contributor

Description

There are a few issues with the Contact 311 chart:

  • the labels overlap in cases where the individual sections are small
  • the longer labels sometimes run off the edge of the screen (like "Mobile App" below). It would take a lot of padding to avoid that for the longest labels ("Driver Self Report").

pie-chart

In addition to these visual issues, there are a bunch of request sources that are not identified in the wireframes, and so they don't have colors assigned. Here's a full list of the requests sources that are in the DB from 2019-2020.

request sources

I'm not sure whether we want to display all of these request sources, or just stick with the ones in the wireframes. But obviously if we do display all of them there would be more potential for overlap between the labels.

Potential fix

It might help to use a legend specifically for this chart. I'll see what our chart package can do about adding a legend.

@jmensch1
Copy link
Contributor Author

Hey guys, after I wrote this ticket I thought of a simple way to do this. It wouldn't involve any change to the layout or adding a legend.

Basically we'd group together all the requests that have very small numbers (like less than 1%) and put them in a catchall category called "Other" instead of displaying them individually. So the chart would look like this:

new-pie

That would make it unlikely that there would be overlap between the labels.

And as for the labels running off on the side, I could make abbreviations for the longer ones, like DSR for Driver Self Report, MA for Mobile App. And then inside the hoverover tooltip I could put the full name.

Does that sound okay? thanks

@itsjoycelee
Copy link
Contributor

That works, Jake.
For overlapped text, would it be possible to use lines that help the text not be in the vicinity of each slice (see below image example)?
image

@yuenyilam is also designing alternative views for the pie chart for the next iterations as well.

@jmensch1
Copy link
Contributor Author

Hi Joyce,

I looked at the docs for our chart package, and unfortunately they don't offer any way to add lines like that, or move labels out of the way of each other. But they do have an option to hide a label if it overlaps another label. And it's also possible to control how far away the label is from the edge of the pie.

@yuenyilam
Copy link

Screen Shot 2020-03-26 at 3 31 18 PM

@jmensch1 jmensch1 reopened this Mar 30, 2020
@jmensch1 jmensch1 linked a pull request Apr 7, 2020 that will close this issue
@ExperimentsInHonesty ExperimentsInHonesty added the v1 The first version of the site label Aug 22, 2024
@cottonchristopher cottonchristopher added the Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Missing This ticket needs a complexity (good first issue, small, medium, or large) Feature: Missing Role: Frontend React front end work size: Missing v1 The first version of the site
Projects
Development

Successfully merging a pull request may close this issue.

5 participants