MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.24.0 is available! For more information about this release, check out this topic.

    MMM-WeatherChart use of Chartjs

    Troubleshooting
    2
    7
    276
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ankonaskiff17
      ankonaskiff17 last edited by

      I have been messing around with the MMM-WeatherChart module and it is using chartjs in some way that I don’t understand. Chartjs seems to be driving the size of the chart in some fashion because I can see some references to it in the developer tool.
      But I absolutely can not locate how it is interacting with chartjs beyond these lines. It’s referencing some size attributes but how?chartjs.jpg

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @ankonaskiff17 last edited by sdetweil

        @ankonaskiff17 i don’t know, looks like it is letting chartjs decide the size.

        See my MyCovid19 module that uses chartjs

        I set the size of the wrapper div and the size of the canvas

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • ankonaskiff17
          ankonaskiff17 last edited by ankonaskiff17

          That’s exactly what I need to do but can’t figure out how to get access. Which one of covid modules is it, or do you have link.? Several modules come up on search covid in 3rd party modules.

          S 2 Replies Last reply Reply Quote 0
          • S
            sdetweil @ankonaskiff17 last edited by

            @ankonaskiff17
            https://github.com/sdetweil/MyCovid19

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • S
              sdetweil @ankonaskiff17 last edited by

              @ankonaskiff17 one learning experience.

              If I give u a module name. Even if misspelled, put that name and github in Google search and u will find it…

              No need to look around

              Sam

              Create a working config
              How to add modules

              ankonaskiff17 1 Reply Last reply Reply Quote 0
              • ankonaskiff17
                ankonaskiff17 @sdetweil last edited by

                @sdetweil There’s a bunch of Covid stuff out there on github. I figured it would be in 3rd party modules but it wasn’t listed.

                No big deal. That weatherchart module has a bunch of what should really be in a CSS page or at top of js page but is just in the code. Was a good learning experience for me though as I wrestled through it .

                Is there either a good custom.css page out that tackles a bunch of modules.

                I generally understand CSS, what I want to better understand is how you target a particular module and override it’s default CSS as a lot of modules have some default value out of the box.

                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @ankonaskiff17 last edited by

                  @ankonaskiff17 see
                  https://forum.magicmirror.builders/topic/6808/css-101-getting-started-with-css-and-understanding-how-css-works?_=1606945574374

                  the chartjs styles are not exposed as css elements

                  They have attributes on the chart object to do the same

                  Sam

                  Create a working config
                  How to add modules

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy