I have extensively reworked the charts page to accommodate missing data. If you set any data display options to 'visible' in settings, then regardless of whether or not you have any data for that sensor, its button will be displayed on the website. With the latest 'Default Website' visitors will get a message displayed in the chart to indicate that there is no data available.
On the Select-a-Graph page, if no data set is selected1), then the message displayed will prompt visitors to select a data set to view. Even if they choose a data series that does not exist, the chart will still work correctly. I am working on displaying a message popup if the data does not exist but existing data series have already been selected.
All the 'Trends' charts have been modified to accommodate missing data and display a message to that effect. I have included an extra entry for each chart2) so that you can change the language to suit your needs. Just look for the 'lang: { noData:' sections in the charts.js file and edit the text to suit. There is one for each chart series. The 'noData:' section below it controls the colour and size of the message.
This generally only applies to a few of the 'extra Sensor' charts as many actually add date and time data to the 'X' axis resulting in an empty chart.
lang: { noData: 'No temperature data to display' }, noData: { style: { fontWeight: 'bold', fontSize: '20px', color: 'var(--color5)' } },
The same feature has also been added to the Historic charts on the AI.
These pages display a message: 'Please select some data to display' if no data series has been selected. This message remains if you select a series without any data and only disappears when valid data is selected in any one of the option dropdowns.