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

IE section of browsers chart is rendering improperly #765

Open
1 task
tdlowden opened this issue Jan 21, 2021 · 3 comments
Open
1 task

IE section of browsers chart is rendering improperly #765

tdlowden opened this issue Jan 21, 2021 · 3 comments

Comments

@tdlowden
Copy link
Contributor

tdlowden commented Jan 21, 2021

What kind of issue?

  • Feature Request?
  • [x ] Bug

In the https://analytics.usa.gov/executive-office-president/ and https://analytics.usa.gov/national-aeronautics-space-administration/, the Internet Explorer part of the Browsers chart is rendering as its own separate chart, with "Internet Explorer" in bold, and not representing a total percentage rather than just the % of IE versions. It should be a nested chart within the "Browsers" section.

image

@tdlowden
Copy link
Contributor Author

Thanks to @ryanhofdotgov, we have this info:

Since IE doesn’t exist in the Browser section, this logic doesn’t work. Normally it would render as a sub-chart.

Who would have thought we would live in a world where IE usage falls off the chart?

The offending line of code is really this one:

whenRendered(['browsers', 'ie'], () => {

Needs to check if the Internet Explorer Key exists in the parent chart before nesting it. Technically also needs to be done with all the other nested charts.

@ryanwoldatwork
Copy link
Contributor

It appears the the Internet Explorer details are rendered all the time.
After render, the code loops through the browsers listed under "Browsers" and will nest the Internet Explorer element.

However, here, "Internet Explorer" is not showing in the "Browsers" element, so the Internet Explorer element doesn't get nested, as intended.

@ryanwoldatwork
Copy link
Contributor

Here's a PR #767

The javascript line is perhaps overly cautious, and certainly ugly. But the general take here is to render AND hide the Internet Explorer section by default. And if the Browser section shows an "Internet Explorer" entry, the hidden section will show and be nested. If an entry for IE does not show, the original section will remain hidden.

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

No branches or pull requests

2 participants