Hi everyone, this is my first post here.
I started to set up my MM one month ago.
Initialy I set up some basic modules, but I had trouble finding modules that could handle what I wanted to display on my MM.
I have very little experience with coding, but it’s 2024 and I use AI a lot at work. I have mostly used AI to guide me in making my custom modules, and AI can help with a lot (but not everything).
I have made 4-5 custom modules now, three of them focus on electricity info, the rest is updated weather-modules that uses the new Yr.no API.
The problem I have now is with chart.js plugins.
I have one module to display prices the next few days. It uses chart.js annotations.
The other module display my daily consumption for the month, and it uses chart.js datalabels.
My problem is that if both modules are active, the module drawn “last” removes the plugin on the other. So the price-module loose the annotations.
Is there a way to “encapsule” chart.js inside each module? Or any other way to make sure they don’t interfer with eachother?
I don’t have much experience with the “depths” on how MM works, so any enlightenment is highly apprechiated!
Both modules have different canvas-id, both have chart.umd.js installed and start them from the node_modules (I have tried a vendors folder too, but no luck).
I can paste/attach the code if needed.