Anniversary Sale · up to 80% off all librariesEnds Nov 9Shop now
SOFTTDocs
Features
You are reading the documentation for ESP-DASH v4.x.x, which is no longer the latest release. View the v5.x.x documentation.

Toggle Display

Show or hide ESP-DASH Pro v4 cards, charts, tabs and statistics at runtime with setDisplay().

ESP-DASH Pro feature. This functionality is available only in the commercial edition of ESP-DASH.

setDisplay() shows or hides a widget on the dashboard. It is available on cards, charts, tabs and statistics, and lets you adapt the visible layout to the state of your application.

All widgets are displayed by default.

Usage

Call setDisplay() on the widget, for example in setup().

Hide a widget

card1.setDisplay(false);  // Hide a card
chart1.setDisplay(false); // Hide a chart
tab1.setDisplay(false);   // Hide a tab
stat1.setDisplay(false);  // Hide a statistic

Show a widget

card1.setDisplay(true);  // Show a card
chart1.setDisplay(true); // Show a chart
tab1.setDisplay(true);   // Show a tab
stat1.setDisplay(true);  // Show a statistic

On this page