Page 1 of 1

Dashticz - Gas graph no longer showing usage

Posted: Sunday 07 November 2021 17:50
by Sjonnie2017
Hi All,

It's been a while :)

I noticed that since a few weeks my gas usage graph is no longer showing the usage. An example of what I see nowadays:

Image

I examined the block and made some adjustments to the height of the block but had no luck. My block looks like this:

Code: Select all

blocks[grafiek_gas] = {}
blocks[grafiek_gas]['title'] = 'Gas';
blocks[grafiek_gas]['devices'] = [200];
blocks[grafiek_gas]['width'] = 12;
blocks[grafiek_gas]['height'] = '400px';
blocks[grafiek_gas]['interval'] = 2;
blocks[grafiek_gas]['graphTypes'] = ['v', 'c'];
blocks[grafiek_gas]['zoom'] = 'xy';
blocks[grafiek_gas]['toolTipStyle'] = true;
blocks[grafiek_gas]['debugButton'] = true;
blocks[grafiek_gas]['datasetColors'] = ['yellow', 'red'];
blocks[grafiek_gas]['legend'] = {'v_200': 'Verbruik', 'c_200': 'Totaal'};
blocks[grafiek_gas]['custom'] = {
        "Laatste uren": {range: 'day',filter: '4 hours',data: {Verbruik: 'd.v_200', Totaal: 'd.c_200'}},
        "Vandaag": {range: 'day',filter: '24 hours',data: {Verbruik: 'd.v_200', Totaal: 'd.c_200'}},
        "Afgelopen maand": {ylabels: ['M³', 'Ʃ M³'],range: 'year',filter: '1 months',data: {Verbruik: 'd.v_200', Totaal: 'd.c_200'}}
         }
 

Note that I define the graph at the beginning of my config.js

Any thoughts on how to get my graph working again?

Thanks!

EDIT: The graph in Domoticz itself works. So it has to be a setting in Dashticz (I hope :-) )

Re: Dashticz - Gas graph no longer showing usage

Posted: Thursday 11 November 2021 22:09
by Lokonli
It's caused by the following line:

Code: Select all

blocks[grafiek_gas]['legend'] = {'v_200': 'Verbruik', 'c_200': 'Totaal'};
You have defined a legend consisting of v_200 and c_200, but since you are using custom data these data fields don't exist anymore.

If you want to show the legend you could use the following instead:

Code: Select all

blocks[grafiek_gas]['legend'] = true;

Re: Dashticz - Gas graph no longer showing usage

Posted: Friday 12 November 2021 14:34
by Sjonnie2017
Hi Lokonli,

That did it! Graph is working again. Thanks!