Toggle Chart Animations
Enable or disable chart animations for the whole dashboard with setChartAnimations() in ESP-DASH Pro.
ESP-DASH Pro feature. This functionality is available only in the commercial edition of ESP-DASH.Charts animate when their data changes. When charts are updated at a high rate, the animations can overlap and make the data harder to read. setChartAnimations() enables or disables animations for all charts on the dashboard.
Chart animations are enabled by default.
Method
void setChartAnimations(bool enable);Prop
Type
setChartAnimations() is a member of ESPDash and applies to every chart on the dashboard. The setting is sent to the browser together with the full dashboard layout, so call it in setup(), before clients connect.
Usage
Disable animations
dashboard.setChartAnimations(false);Enable animations
dashboard.setChartAnimations(true);Changing the setting at runtime
The setting is not part of incremental updates sent by dashboard.sendUpdates(). If you change it after clients have connected, it takes effect when the page is reloaded or when you call dashboard.refreshLayout().