Water meter Y axis Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Eugene
Posts: 29
Joined: Wednesday 21 December 2016 19:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Water meter Y axis

Post by Eugene »

Hi Guys,

I can't figure out how to get proper numbers at the Y axis for water consumption. Domoticz gets m3 from the meters, i multiple those by 1000 in Domoticz to get liters which makes numbers looking good in Domoticz. However the scale looks weird in Dashticz, looks like i have to multiply it by 100 to get my liters back on Y axis but I can't find a way how to get this done. I am attaching screenshot of my graph and config section. For some reason graph title shows liters in correct manner.

You can see in the config i made an attempt to multiply numbers by 100 but it did not make any changes to the Y axis.

Thanks.

blocks['water'] = {
width: 6,
title: 'Water Consumption (Hot | Cold)',
devices: [557, 558],
graph: 'bar',
datasetColors: ['red','blue'],
data: {
v_557: 'd.v_557*100', // Hot Water
v_558: 'd.v_558*100', // Cold Water

},
legend: {
'v_557': 'Hot Water',
'v_558': 'Cold Water',
},
};
Screenshot 2024-12-20 162011.png
Screenshot 2024-12-20 162011.png (132.91 KiB) Viewed 175 times
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Water meter Y axis

Post by Lokonli »

Try the following:

Code: Select all

blocks['water'] = {
    width: 6,
    title: 'Water Consumption (Hot | Cold)',
    devices: [557, 558],
    graph: 'bar',
    datasetColors: ['red','blue'],
    custom: {
        today: {
            filter: 'today',
            data: {
                'warm water': 'd.v_557 * 100',
                'cold water': 'd.v_558 * 100'
            }
        },
        month: {
            filter: '1 month',
            data: {
                'warm water': 'd.v_557 * 100',
                'cold water': 'd.v_558 * 100'
            }
        },
        year: {
            filter: '1 year',
            data: {
                'warm water': 'd.v_557 * 100',
                'cold water': 'd.v_558 * 100'
            }
        }

    },
    legend: true
}
Eugene
Posts: 29
Joined: Wednesday 21 December 2016 19:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Water meter Y axis

Post by Eugene »

thanks a lot, it works as it should!
what is the key thing i missed here? Is it a "custom" + "data" subsections?
Lokonli
Posts: 2260
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Water meter Y axis

Post by Lokonli »

Eugene wrote: Saturday 21 December 2024 22:12 thanks a lot, it works as it should!
what is the key thing i missed here? Is it a "custom" + "data" subsections?
yes

For some more info see:
https://dashticz.readthedocs.io/en/beta ... tom-graphs
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest