The answer to my own question, I hope it will help others.
For anyone browsing the topic trying to find a solution for the multitude of console errors clogging your memory. For instance, <svg> attribute height: Expected length, "NaN"
and Error: <path> attribute d: Expected number, "M 0 NaN"
. Present in the (now) current version: v2.0.2.
This is a known bug in the apex chart library, caused by its inability to work with null values.
It was suggested to remove the null values, so that is what I did.
Go to config/www/community/apexcharts-card. Remove the file apexcharts-card.js.gz
.
Open the file apexcharts-card.js, and find “this._computedHistory=a.data;”. After the semicolon, add the following string.
const ch=this._computedHistory;for(let x in ch)if(ch[x][1]==null)ch.splice(x, 1);
Explained: _coputedHistory is the field the data is stored, when the data point (represented by ch[x][1]) is null, then remove the whole data entry.
Your not done yet! Then, go to settings > dashboards, click the three dots (top right) > sources. Find the entry “/hacsfiles/apexcharts-card/apexcharts-card.js?hacstag=123456”, and just add a ‘x’ to the end of it. Now reload your browser, thats it.
This will not remove most, not all, errors.
To @RomRider, my suggestion for a temporary patch.
Cheers,
– Ingrid
PS: it has nothing to do with browser or config whatsoever, so ignore the comments above.