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

show datapoints with 0 downloads #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miDeb
Copy link
Contributor

@miDeb miDeb commented Dec 25, 2021

Dates with zero downloads are not included in the downloaded data, so
we have to insert new datapoints between the other datapoints.

Dates with zero downloads are not included in the downloaded data, so
we have to insert new datapoints between the other datapoints.
@klausenbusk
Copy link
Owner

Chart.js has a spanGaps option:

If true, lines will be drawn between points with no or null data. If false, points with null data will create a break in the line. Can also be a number specifying the maximum gap length to span. The unit of the value depends on the scale used.

Wouldn't that be a simpler solution?

@miDeb
Copy link
Contributor Author

miDeb commented Dec 27, 2021

I'm not sure that would work better, because it would create gaps instead of connecting a line to 0, and we would still have to insert data points with a null value where the gap should be. I think it's easier to insert data points with a value of 0 and not use this option.

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 this pull request may close these issues.

2 participants