RomRider / apexcharts-card

📈 A Lovelace card to display advanced graphs and charts based on ApexChartsJS for Home Assistant
MIT License
1.2k stars 82 forks source link

Support for Synchronized Charts #703

Open heinemannj opened 6 months ago

heinemannj commented 6 months ago

ApexCharts.js supports having multiple charts which support a common and synchronized x-axis: https://apexcharts.com/docs/chart-types/synchronized-charts/

image

Would it be possible to support this in this card as well?

It would be very useful to have separate graphs for certain data with completely independent y-axes and to be able to display the data in a stacked fashion so that the graphs don't overlap, but still be able to synchronize the viewing of the values at any given point.

Today you can create multiple instances of the card and stack them in a vertical stack card, but the result is not very compact and there is no synchronization between them.

Please see discussion: https://github.com/RomRider/apexcharts-card/discussions/513

igorsantos07 commented 4 months ago

I would guess this is not possible because of the way HA renders cards: it creates a shadow DOM for each card, effectively sandboxing every card to its own tiny world. Thus, a graph would not be able to see/interact with another one.

And the discussion you linked has nothing more than this issue.... hahah

Theory aside, what happens when you try to set the recommended options from https://apexcharts.com/docs/chart-types/synchronized-charts/#charts?

Edit: I tried as well and, indeed, it doesn't seem to work. Not 100% sure though, since I did something nasty and my whole dashboard is dragging a LOT at the charts page :clown_face: hahaha

RomRider commented 4 months ago

I have tried something in the past but it didn't work. I'll try something again

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

igorsantos07 commented 2 months ago

anti-stalebot comment

github-actions[bot] commented 3 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

heinemannj commented 3 days ago

anti-stalebot comment

heinemannj commented 1 day ago

anti-stalebot comment