Open terencehonles opened 9 months ago
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.
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.