Comments (1)
Hey so it looks like you're trying to resize the calendar when the window size changes.
I'm trying to do the same thing and noticed a couple things when looking at your code:
- You're using the cal.init() method, which isn't part of the newest version of cal-heatmap. The documentation for v4 doesn't have that method and instead uses cal.paint() : https://cal-heatmap.com/docs/migrate_from_v3 . So you'll have to look into migrating your code to v4.
- The code you provided doesn't show where you're using the addEventListener method nor what the listener function looks like.
Maybe you could first try migrating your code to the latest version. About the event listener, you could create a callback function that updates how big the cells look. (For the calendar configuration I'm using, updating how big the cells look means changing the width and height of the subDomain . )
from cal-heatmap.
Related Issues (20)
- Resize calendar HOT 1
- Problem with timestamp and timezone HOT 6
- groupY median does not exist HOT 1
- Add custom subdomain classes
- Custom scales in CSS HOT 1
- React project using cal-heatmap and TypeScript cannot be built HOT 2
- Angular/Typescript typing issue HOT 3
- Commonjs export is not working HOT 1
- get other info from source data HOT 3
- Type is not correctly exported in
- Type is not correctly exported in "exports" HOT 1
- data is not filled into cal boxes HOT 8
- Could not find a declaration file for module 'cal-heatmap' HOT 3
- Hours subdomain is not honoring local browser time HOT 1
- New external plugins repositories HOT 1
- Error occurs when import plugin HOT 2
- How to hide the future days? HOT 3
- Full working code HOT 1
- Data not loading HOT 1
- Could not load plugins from unpkg HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cal-heatmap.