diff --git a/src/static/js/ui/UIGauge.mjs b/src/static/js/ui/UIGauge.mjs index e3d3505..6fb3e50 100644 --- a/src/static/js/ui/UIGauge.mjs +++ b/src/static/js/ui/UIGauge.mjs @@ -1,6 +1,7 @@ "use strict"; import Emel from 'emel'; +import forkawesome_emel from './forkawesome_emel.mjs'; import ApexCharts from 'apexcharts'; import AbstractUIItem from './AbstractUIItem.mjs'; @@ -98,6 +99,9 @@ class UIGauge extends AbstractUIItem { break; default: console.warn(`Warning: Unknown UIGauge content type '${typeof this.def.content}' for def with name '${this.def.name}'.`); + this.el.querySelector(".container-gauge").replaceChildren( + this.emel(`div[class="message-error"]>${forkawesome_emel("exclamation-circle")}+{Oops! An error occurred while rendering this chart. Check the developer tools for more information.}`) + ) return false; }