Skip to content

Visualizations / Faceting: ensure all vizs provide empty plots for empty facets #706

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

Closed
bobular opened this issue Nov 15, 2021 · 3 comments · Fixed by #721
Closed

Visualizations / Faceting: ensure all vizs provide empty plots for empty facets #706

bobular opened this issue Nov 15, 2021 · 3 comments · Fixed by #721
Assignees

Comments

@bobular
Copy link
Member

bobular commented Nov 15, 2021

I noticed that faceting Mosaic plots on Country (where country is filtered in subsetting to just one country) looks like a no-op (there's only one facet, so the facet layout handling is not triggered). There should be mostly empty plots.

Should coordinate with @chowington who is working on #681 - we discussed how to deal with it here but I think we concluded the opposite to what we wrote down 😬

The plot components already test for "empty data" (usually data.series.length === 0) and render a skeleton. However, the individual components all use 'empty data' as a fallback value for the data prop. Example here.

We were going to make the plot component (probably at PlotlyPlot.tsx) render its own HTML title and render a no-data message instead of the skeleton plot. We may need to change the fallback handling of data as described above. I think these changes would be too much for a last minute b55 push.

I'll keep thinking about how best to do this in discussion with @chowington

@bobular bobular added this to the EDA ClinEpi Phase 2 milestone Nov 15, 2021
@dmfalke
Copy link
Member

dmfalke commented Nov 16, 2021

I think a low cost approach would be to make a "delegate component" in web-eda. This component would be responsible for either rendering the "no data" UI if data is undefined, or delegating to the actual plot component. The props interface would look very similar to FacetedPlot. I'll leave the implementation details as homework, but happy to provide more if needed!

@bobular
Copy link
Member Author

bobular commented Nov 16, 2021

I think a low cost approach would be to make a "delegate component" in web-eda. This component would be responsible for either rendering the "no data" UI if data is undefined, or delegating to the actual plot component. The props interface would look very similar to FacetedPlot. I'll leave the implementation details as homework, but happy to provide more if needed!

Oh, sorry, just saw this. I think we're going with Connor's solution that is triggered in FacetedPlot by undefined data.

@nkittur-uga
Copy link
Member

Tested in a number of different plots and they do provide empty plots for empty facets. Passes QA.

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 a pull request may close this issue.

4 participants