Skip to main content Link Menu Expand (external link) Document Search Copy Copied

fill()

Update the calendar data set

const cal = new CalHeatmap();
cal.fill(data: DataOptions['source']);

Use this method if you only want to update your calendar dataset, without trigerring any other changes, as fill() is already called behind the scene by paint() and all navigation methods.

Arguments:

Return

  • A Promise, that will resolve once the calendar is filled with the new data.

Usage

Example

const cal = new CalHeatmap();
cal.paint({ data: { source: 'https://my-api.com/weather-min-temp.json' } });
// User opted to show max temp instead of min temp
cal.fill('https://my-api.com/weather-max-temp.json');