This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Change the Trend URL
#5
Hi admin, thanks for this but having a problems trying to impliment.
How do I find the widgetId & frameWidgetId Think I know we know the widgetID , but sure so chcking.

have placed the provide code like this in Custom JavaScript

$(function() {
const widgetId = 18
const frameWidgetId = ?????

Visu.on('widget-ready', widgetId, ({ widget }) => {
const clickHandler = widget.component.compactModeClick
const frame = document.getElementById(`widget-frame-${frameWidgetId}`)

widget.component.compactModeClick = () => {
const shown = widget.component.showPopover
clickHandler()

if (shown) {
frame.src = '/scada-vis/trends?id=1&mode=week'
}
}
})
});

not sure how to tie the button to the function, therefore not sure what to do for button 2, 3, 4, ..... 20 etc.

If you could provide a bit more info, I would appreciate the helping hand
Reply


Messages In This Thread
Change the Trend URL - by sjfp - 17.07.2026, 11:29
RE: Change the Trend URL - by admin - 17.07.2026, 11:33
RE: Change the Trend URL - by sjfp - 17.07.2026, 12:20
RE: Change the Trend URL - by admin - 17.07.2026, 13:24
RE: Change the Trend URL - by sjfp - 17.07.2026, 14:52
RE: Change the Trend URL - by Daniel - 17.07.2026, 14:58
RE: Change the Trend URL - by sjfp - 17.07.2026, 15:11
RE: Change the Trend URL - by admin - 17.07.2026, 15:15

Forum Jump: