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

fix: preserve data updates to fill() when called with an argument #393

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

Conversation

terencehonles
Copy link
Contributor

This change preserves the provided data source when fill is called with an argument so that cal.fill(records); cal.jumpTo(...); does not reset or blank out the previously provided data.

This change preserves the provided data source when fill is called with
an argument so that `cal.fill(records); cal.jumpTo(...);` does not reset
or blank out the previously provided data.
@terencehonles
Copy link
Contributor Author

terencehonles commented Nov 27, 2023

I believe this is possibly an issue with the previous version of cal heatmap, since we have been setting the data source manually even after calling paint, but now that there's a fill method I expected this to preserve the data passed. It appears that this is not the case, and this change should be fine based on how other things use the fill function (without arguments).

This allows the example given https://cal-heatmap.com/docs/API/fill#usage to allow navigation after filling with a new data source (and not reverting to the previous data set on navigation), or how we are using this, to provide data records that cover the whole domain that will not need to be fetched per navigation.

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.

None yet

1 participant