Skip to content

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.

1 participant