Giter VIP home page Giter VIP logo

Comments (1)

m-a-r-1912 avatar m-a-r-1912 commented on June 2, 2024 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:

  1. 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.
  2. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.