[solved] Popup graphs to use block definitions

Moderators: leecollings, htilburgs, robgeerts

Post Reply
User avatar
Sjonnie2017
Posts: 363
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

[solved] Popup graphs to use block definitions

Post by Sjonnie2017 »

With the huge overhaul of the graphs functionality of Dashticz, one feature would be very very welcome to create a consistent user interface:

Popup graphs to use settings of corresponding block definitions.

As it is now the graphs on the dashboard are looking at the block definitions and they are rather consistent in their appearance. Unfortunately the popup graphs ignore these definitions and therefor look different from the graphs on the dashboard.

More info here: https://www.domoticz.com/forum/viewtopi ... 40#p236891 and subsequent replies.

TIA

Greetz,

Sjonnie
Last edited by Sjonnie2017 on Tuesday 25 February 2020 18:34, edited 1 time in total.
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Popup graphs to use block definitions

Post by clinkadink »

This is now available in the latest beta.

Popups can now be defined by adding a new block parameter, “popup”, to the block that popup is for. This allows the popup to use all the block parameters that a graph block does, allowing users to style the graph however they want. It also means the legend and tooltips can display custom names (instead of the key names). Note: this replaces the CSS method provided in the previous beta update.

For example, the user as an Energy meter block defined as follows:
Spoiler: show

Code: Select all

blocks[258] = {
    title: 'Consumption',
    flash: 500,
    width: 4,
    popup: 'popup_consumption'
}
In this example, I have specified that the popup will use a defined graph called 'popup_consumption' instead of the default popup. This defined graph is then added to the config.js just like a normal graph:
Spoiler: show

Code: Select all

blocks['popup_consumption'] = {
    title: 'Energy Consumption Popup',
    devices: [258],
    toolTipStyle: true,
    datasetColors: ['red', 'yellow'],
    graph: 'line',
    legend: {
        'v_258' : 'Usage',          
        'c_258' : 'Total'
    }
}
Image
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
Sjonnie2017
Posts: 363
Joined: Wednesday 02 August 2017 19:43
Target OS: Linux
Domoticz version: Latest ß
Location: The Netherlands
Contact:

Re: Popup graphs to use block definitions

Post by Sjonnie2017 »

Excellent! A few glitches to work out on my side of things but nothing major :lol:
ConBee II - TRÅDFRI lights + switches, loads of ChingLing dimmers and switches, Heiman and Xiaomi sensors
SolarEdge SE4000H (with active modbus_tcp)
YouLess Energy meter
Shelly 2.5 in roller shutter mode
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests