dimensions()
Return the calendar's dimensions
type Dimensions = {
width: number,
height: number,
};
const cal = new CalHeatmap();
cal.dimensions(): Dimensions;
Arguments
- none
Return
- An object, with the calendar
width
andheight
in pixels.
tip
You can also retrieve the calendar's dimensions with the resize
event.
Usage
const cal = new CalHeatmap();
cal.paint().then(() => {
// Wait for paint() to complete before retrieving the dimensions
cal.dimensions(); // { width: 969, height: 142 }
});