Skip to main content

fill()

Update the calendar's data set

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

Arguments

Return

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

When to use

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.

Usage

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');