#load "../../lib/app.uce" COMPONENT:PROGRESSBAR(Request& context) { starter_register_js("components/gauges/common.js", context); starter_register_css("themes/common/css/gauges.css", context); String gauge_id = first(context.call["id"].to_string(), "progressbar-" + std::to_string((u64)time())); String layout = first(context.call["layout"].to_string(), "horizontal"); String style = context.call["style"].to_string(); String item_style = context.call["item-style"].to_string(); String value_style = context.call["value-style"].to_string(); String bar_style = context.call["bar-style"].to_string(); String title = context.call["title"].to_string(); String subtitle = context.call["subtitle"].to_string(); <>

px;">
} COMPONENT:NEEDLEGAUGE(Request& context) { starter_register_css("themes/common/css/gauges.css", context); String gauge_id = first(context.call["id"].to_string(), "needlegauge-" + std::to_string((u64)time())); String style = context.call["style"].to_string(); String title = context.call["title"].to_string(); String subtitle = context.call["subtitle"].to_string(); s32 size = (s32)int_val(first(context.call["size"].to_string(), "200")); <>

} COMPONENT:ARCGAUGE(Request& context) { starter_register_js("components/gauges/common.js", context); starter_register_css("themes/common/css/gauges.css", context); String gauge_id = first(context.call["id"].to_string(), "arcgauge-" + std::to_string((u64)time())); String title = context.call["title"].to_string(); String subtitle = context.call["subtitle"].to_string(); String style = context.call["style"].to_string(); <>

0.0 ? std::max(0.0, std::min(100.0, (value / max_value) * 100.0)) : 0.0; f64 arc_length = (pct / 100.0) * 157.08; char buf[64]; snprintf(buf, sizeof(buf), ("%." + std::to_string(precision) + "f").c_str(), value); ?>
}