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