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

Timeline-facets don't include missing dates automatically #23

Open
samcodrington opened this issue Aug 18, 2021 · 2 comments
Open

Timeline-facets don't include missing dates automatically #23

samcodrington opened this issue Aug 18, 2021 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@samcodrington
Copy link
Contributor

I'm not entirely sure that this is a strictly necessary improvement but it feels like it a useful additional feature If you omit a row of data provided to timeline facet, the facet simply skips over that date rather than including it as empty.
Screenshot from 2021-08-18 13-29-19

My thinking is that a timeline should always include missing days or months as empty automatically rather than trusting the user to fill in every date. If a user doesn't want to fill in every date then they would be simply using a normal bars facet rather than a timeline.

@samcodrington samcodrington added bug Something isn't working enhancement New feature or request labels Aug 18, 2021
@samcodrington
Copy link
Contributor Author

After discussion with @darionco it was decided that this improvement should be made as a plugin for a few reasons:
a) it's reallly easy for a user to just insert a ratio: 0 which renders this improvement
b) philosophy of the package: a visualization component should be as "dumb" as possible, so this shouldn't be included as a core feature
c) There's an edge case that would be difficult to make the facet smart enough to resolve: if my data starts on January 23 and ends on May 7th and I want to visualize data in monthly buckets but I have added the days so I can let users know when the data for a month is incomplete
d) If it's being used to represent abstract dates (month of the year, day of the week etc) rather than specific ones the proposed solution wouldn't work as you wouldn't be able to tell if a day was missing, also leap years would be affected

@samcodrington
Copy link
Contributor Author

Proposed solution: make a plugin for SmartTimelineFacet
data structure: [{ ratio: float, date: Date }] and then the facet fills in missing dates & automatically calculates bucket sizes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant