Read the statement by Michael Teeuw here.
MMM-WeatherChart use of Chartjs
-
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? -
@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
-
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.
-
-
@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
-
@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.
-
@ankonaskiff17 see
https://forum.magicmirror.builders/topic/6808/css-101-getting-started-with-css-and-understanding-how-css-works?_=1606945574374the chartjs styles are not exposed as css elements
They have attributes on the chart object to do the same