Bar chart in dashticz - block definition
Moderator: leecollings
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Bar chart in dashticz - block definition
Please help me define a block in dashticz total energy.
I want to add a bar chart because now I have a linear one, I used the following instructions: https://dashticz.readthedocs.io/en/mast ... raphs.html
but somehow I don't manage to insert a block like this:
blocks[610] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
and still nothing, line graph.
Please help me how to define a block in dashticz so that a bar chart is displayed as in the instructions.
I want to add a bar chart because now I have a linear one, I used the following instructions: https://dashticz.readthedocs.io/en/mast ... raphs.html
but somehow I don't manage to insert a block like this:
blocks[610] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
and still nothing, line graph.
Please help me how to define a block in dashticz so that a bar chart is displayed as in the instructions.
- Attachments
-
- wykress.jpg (19.58 KiB) Viewed 3985 times
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
Code: Select all
blocks[610] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
Code: Select all
blocks['610'] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
Better to give it a meaningfull title like 'TV Kamer Całkowita''in your case
so
Code: Select all
blocks['TV Kamer Całkowita'] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
Then something is wrong because this entry doesn't work:
610 - this is the idx of the device in domoticz that I want to display in a bar chart
So in this notation:
how does dashticz know what domoticz block should show?
doesn't work
I want to display a bar chart of this device in domoticz:
Code: Select all
blocks['610'] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
columns[38] = { blocks : ['blocktitle_13',576,580,579,578,'610'], width: 12}
So in this notation:
Code: Select all
blocks['TV Kamer Całkowita'] = { title: 'TV Kamer Całkowita', devices: [6], graph:'bar', width: 2,}
Code: Select all
blocks[610] = { title: 'TV Kamer Całkowita', graph:'bar', width: 2,}
I want to display a bar chart of this device in domoticz:
- Attachments
-
- IDX610.jpg (13.04 KiB) Viewed 3923 times
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Bar chart in dashticz - block definition
With '610' as key Dashticz normally will display a default Domoticz block for device with domoticz id 610
You can enforce to display it as a graph as follows:
If you want to show all data in one graph:
You can enforce to display it as a graph as follows:
Code: Select all
blocks['mykey'] = { title: 'TV Kamer Całkowita', graph:'bar', devices=[610], width: 2, type:'graph'}
Code: Select all
blocks['mykey'] = { title: 'TV Kamer Całkowita', graph:'bar', devices=[576, 580, 579, 578, 610], width: 2, type:'graph'}
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
I managed to display the chart, but I wanted the dashticz to display a bar chart after clicking on the block, not a line chart as in the instructions.
In the code you sent you have the error "devices=[610]" it doesn't work, there is a total error, it should probably be "devices:[610]"
And then there is a graph in the block:
I would like to display a bar chart instead of a line chart as it is now when clicking on a block.
In the code you sent you have the error "devices=[610]" it doesn't work, there is a total error, it should probably be "devices:[610]"
And then there is a graph in the block:
I would like to display a bar chart instead of a line chart as it is now when clicking on a block.
- Attachments
-
- Liniowy.jpg (94.39 KiB) Viewed 3907 times
-
- wykresss.jpg (141.85 KiB) Viewed 3913 times
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
If it is about the popup graph (you did not state that in your first question), then you should look at the documentation here:
https://dashticz.readthedocs.io/en/mast ... aph-window
https://dashticz.readthedocs.io/en/mast ... aph-window
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
I meant the chart that pops up after clicking on the block. Maybe I described it wrong, sorry.
But thanks to this I learned how to make a nice chart on a separate screen.
Now I will try to follow the instructions provided to make a pop-up bar graph after clicking on the block regarding total electricity.
But thanks to this I learned how to make a nice chart on a separate screen.
Now I will try to follow the instructions provided to make a pop-up bar graph after clicking on the block regarding total electricity.
-
- Posts: 2260
- Joined: Monday 29 August 2016 22:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Bar chart in dashticz - block definition
You have to define a block for the popup parameter, like:
Code: Select all
blocks['tv'] = { title: 'TV Kamer Całkowita', idx:610, width: 2, popup: 'tvgraph'}
blocks[ 'tvgraph'] = { devices: [610], type: 'graph', graph: 'bar'}
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
I have a question about the chart below, how to set it to display - the last month?
Code: Select all
blocks['wykres_dom'] = { title: 'Dom Całkowita', graph:'bar', devices:[618], width: 12, height: '300px', type:'graph'}
- Attachments
-
- Ostatni miesiąc.jpg (127.44 KiB) Viewed 3609 times
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
https://dashticz.readthedocs.io/en/mast ... tom-graphs
use range and filter as described in the manual, link above
use range and filter as described in the manual, link above
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
I just wish the first view was a month and not 24 hours
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
Do I understand correctly:
I would like the month to be displayed because now I have to press the month button, by default it displays several hours
Code: Select all
custom: {range: 'month'}
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
You have to create a CUSTOM graph as shown in the link and then define the month as the first in the list.Daro1003 wrote: ↑Monday 15 January 2024 22:31 Do I understand correctly:I would like the month to be displayed because now I have to press the month button, by default it displays several hoursCode: Select all
custom: {range: 'month'}
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
Or so:
And what should I enter in data? ?
Code: Select all
blocks['wykres2'] = {
title: 'Całkowita',
height: '300px',
devices: [618],
graph: ['bar'],
custom : {
"Miesiąc": {
range: 'month',
filter: '1 month',
data: {
}
},
"Dziś": {
range: 'today',
filter: '1 days',
data: {
}
},
"Ostatnie godziny": {
range: 'days',
filter: '6 hours',
data: {
}
}
},
legend: true,
datasetColors:['blue','red','yellow']
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
d.v_618 , in line with the example in the manaul
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
Code: Select all
blocks['wykres2'] = {
title: 'Całkowita Dziś',
height: '300px',
devices: [770],
graph: ['bar'],
custom : {
"Miesiąc": {
range: 'month',
filter: '1 month',
data: {
nett: 'd.v_770'
}
},
"Dziś": {
range: 'today',
filter: '1 days',
data: {
nett: 'd.v_770'
}
},
"Cały Rok": {
range: 'year',
filter: '6 months',
data: {
nett: 'd.v_770'
}
}
},
legend: {nett: 'Godziny Dni Miesiące'},
datasetColors:['blue','red','yellow']
}
Monthly chart - ok, very good
Today Chart - Not ok indications as in the picture
Year Chart - No ok it doesn't show the year.
What's wrong with my code?
In the Year Chart it should show the months and in the Today Chart it should show the hours from 00 to 23:59 but it shows otherwise, what is wrong?
- Attachments
-
- Dziś - Today.jpg (118.95 KiB) Viewed 747 times
Last edited by Daro1003 on Monday 01 April 2024 0:25, edited 1 time in total.
-
- Posts: 621
- Joined: Saturday 21 September 2019 17:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.1
- Location: The Netherlands
- Contact:
Re: Bar chart in dashticz - block definition
How does the graph of this devcie in domoticz itself look like? Are you sure there is data for other moments?
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
In red, a positive graph of the same domoticz device like this:
In blue, the custom chart shows differently as you can see.
But in the meantime - a month is ok.
Code: Select all
blocks['wykres_dom'] = { title: 'Dom Dziś', graph:'bar', devices:[770], width: 12, height: '300px', type:'graph',}
But in the meantime - a month is ok.
Last edited by Daro1003 on Monday 01 April 2024 0:24, edited 1 time in total.
-
- Posts: 83
- Joined: Monday 14 November 2022 12:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.1
- Location: Poland
- Contact:
Re: Bar chart in dashticz - block definition
Domoticz All year round
Last edited by Daro1003 on Monday 01 April 2024 0:24, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 0 guests