I have updated to the latest beta version, The graphs are not displayed correctly. In the previous version it worked well.
The bars are gone, these are standard line again
The adjusted colors are gone
The legend is also gone
Sorry for my English. I am Dutch
blocks['graph_27'] = {}
blocks['graph_27']['title'] = 'Stroom';
blocks['graph_27']['legend'] = {'v2':'Dag', 'v':'Nacht', 'r2': 'Retour dag', 'r1': 'Retour nacht'};
blocks['graph_27']['datasetColors'] = ['#b3d0ff','#0062ff','#f170ff','#e600ff'];
blocks['graph_27']['graph'] = 'bar';
blocks['graph_27']['width'] = 12;
Graph dont show correct.
Moderators: leecollings, htilburgs, robgeerts
-
- Posts: 82
- Joined: Tuesday 04 February 2020 11:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: The Netherlands
- Contact:
Re: Graph dont show correct.
There has been a lot of changes since 3.3.2 beta I think. See this topic https://www.domoticz.com/forum/viewtopi ... 67&t=31534 and
https://dashticz.readthedocs.io/en/beta ... raphs.html
You can try this:
https://dashticz.readthedocs.io/en/beta ... raphs.html
You can try this:
Code: Select all
blocks['graph_27'] = {
devices: [27],
title: ['Stroom'],
graph: ['bar'],
width: [12],
datasetColors: ['#b3d0ff','#0062ff','#f170ff','#e600ff'],
legend: {
'v2':'Dag', 'v':'Nacht', 'r2': 'Retour dag', 'r1': 'Retour nacht',
}
}
-
- Posts: 2291
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Graph dont show correct.
Small addition: Since all graph now support combining the data from several devices, you have to add the device id to the legend keys, like this:
Code: Select all
blocks['graph_27'] = {
devices: [27],
title: ['Stroom'],
graph: ['bar'],
width: [12],
datasetColors: ['#b3d0ff', '#0062ff', '#f170ff', '#e600ff'],
legend: {
'v2_27': 'Dag',
'v_27': 'Nacht',
'r2_27': 'Retour dag',
'r1_27': 'Retour nacht',
}
}
-
- Posts: 2
- Joined: Friday 01 May 2020 9:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Graph dont show correct.
graphs are now properly displayed. But the colors in the legend that I applied are not displayed properly. has this also changed?
-
- Posts: 82
- Joined: Tuesday 04 February 2020 11:42
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: The Netherlands
- Contact:
Re: Graph dont show correct.
I checked the beta documentation, you problably have to give the colors a name.
Change the datasetcolors to this
datasetColors: [colourBlue1, colourBlue2, colourPurple1, colourPurple2],
And add this, I think outside the graph code:
var colourBlue1= '#b3d0ff';
var colourBlue2= '#0062ff';
var colourPurple1= '#f170ff';
var colourPurple2= '#e600ff';
See https://dashticz.readthedocs.io/en/beta ... raphs.html
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Graph dont show correct.
You can do this, but it is optional.
Supported color formats are:
Code: Select all
datasetColors: [colorRed, colorGreen, colorOrange], <----- color variables
datasetColors: ["#e0ecf4", "#9ebcda", "#8856a7"], <----- hex colors
datasetColors: ["red", "yellow", "blue"], <----- html web safe colors
datasetColors: ["rgb(1, 2, 3)", "rgb(4, 5, 6)", "rgb(7, 8, 9)"], <----- rgb colors
datasetColors: ["rgba(1, 2, 3, 0.5)", "rgba(4, 5, 6, 0.6)", "rgba(7, 8, 9, 0.8)"], <----- rgba colors
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
- clinkadink
- Posts: 417
- Joined: Tuesday 31 December 2019 1:15
- Target OS: Linux
- Domoticz version: 2020.2
- Location: Swindon, UK
- Contact:
Re: Graph dont show correct.
Please can you post your graph block?
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Who is online
Users browsing this forum: Bing [Bot] and 1 guest