Posts: 6
Joined: Tue Nov 28, 2023 6:08 am

Hide a chart in a dashboard

Hello, I'm currently learning programming and I wonder if it's possible to hide a chart in the dashboard based on whether a variable is set to true, everytime I tried to hide it, it left a blank space which is unwanted behaviour. :)

The chart I'm trying to hide is cell: 'dashboard-col-2' in the demo

I'm glad for any possible improvements, also, is there any OOP solution in the official documentation? I'm kind of stuck in that part
Here's a demo:
Posts: 742
Joined: Tue Jan 24, 2023 11:21 am

Re: Hide a chart in a dashboard


Thanks for reaching out to us with your inqury!

The simplest way would be to check the variable and depending on it's state update cell visibility with CSS selectors.


Other way around can be achieved by referencing Board.layouts, where you can access certain cell and call the hide() and show() methods.


API: ... -1#layouts ... #L247-L254

Let me know if that was helpful for you.
Best regards!
Jędrzej Ruta
Highcharts Developer

Return to “Highcharts Dashboards”