Legend of a graph of a dial

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
roblom
Posts: 408
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Legend of a graph of a dial

Post by roblom »

I've created a custom dial which works fine. But when I click on the dial a graph opens so this also works fine. But how can I change the legend of this graph (it's now hu_198 and te_198).

The settings below doesn't work

Code: Select all

blocks['Badkamer'] = {
	idx: 198,
	title: 'Badkamer',
	type: 'dial',
	setpoint: 20,
	min: 15,
	max: 25,
	shownumbers: true,
	showring: true,
	showunit: true,
	last_update: false,
	width: 3,
	values : [
		{
			value: 'Temp',
			idx: 198,
			unit: '°C',
			legend: 'Temperatuur'
		},
		{
			value: 'Humidity',
			idx: 198,
			icon: 'fas fa-tint',
			unit: '%',
			legend: 'Vochtigheid',
		},
		{
			value:'Barometer',
			idx: 135,
			icon: 'fas fa-cloud',
			unit:' hPa',
		},
	],
}
And also adding the code below doesn't change anything.

Code: Select all

	legend: {
		hu_198: 'Vochtigheid',
		te_198: 'Temperatuur'
	}
Attachments
2020-12-29_17h35_22.png
2020-12-29_17h35_22.png (34.88 KiB) Viewed 337 times
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Legend of a graph of a dial

Post by Lokonli »

The dial and graph are independent of each other.
To be able to configure the graph of a dial you have to explicitly set the popup parameter on the dial block, like:

Code: Select all


blocks['Badkamer'] = {
   ...
   popup: 'BadkamerGraph',
   ...
}

blocks['BadkamerGraph'] = {
   devices: [198],
   legend: {
		hu_198: 'Vochtigheid',
		te_198: 'Temperatuur'
	}
}

roblom
Posts: 408
Joined: Wednesday 26 February 2014 15:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: the Netherlands
Contact:

Re: Legend of a graph of a dial

Post by roblom »

Thank you, that did the trick.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest