Page 2 of 3
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 18 April 2020 22:10
by clinkadink
I am hoping we won't need this block much longer. But it was updated today in the latest beta to help with monitoring.
- Left and right Y axes are now used and labelled "Total" and "Day"
- User can choose what data to show in the graph using "mode" on the corona block:
Code: Select all
mode: 0 // both total and day is shown (default)
mode: 1 // only total is shown
mode: 2 // only day is shown
Mode 0 will show the accumalitive total figures as stacked bars (left) and the daily increases as a line (right)
Mode 1
Mode 2

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 13:31
by Scotty
Struggling with this block.
I get the error:
Code: Select all
unknown string block - js/blocks.js:497
{type: "corona", c: 5, key: "corona", $mountPoint: jQuery.fn.init(1), mountPoint: "#block_24", …}
type: "corona"
c: 5
key: "corona"
$mountPoint: jQuery.fn.init [div#block_24]
mountPoint: "#block_24"
entry: "block_24"
width: 12
__proto__: Object
When using the code copied from this post:
Code: Select all
blocks['corona'] = {
type: 'corona',
countryCode: 'NL',
startDate: '01/03/2020',
graph: 'bar',
stacked: true,
height: '500px',
zoom: 'x'
}
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 13:36
by clinkadink
Are you using the latest beta?
Code: Select all
blocks['coronavirus_graph_nl'] = {
type: 'corona',
title: 'Coronavirus',
countryCode:'NL',
startDate: '01/03/2020',
graph: 'bar',
stacked: true,
tooltiptotal: ['Confirmed (Total)', 'Deaths (Total)'],
height: '380px',
width: 6,
zoom: 'x'
}
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 13:59
by Scotty
I am indeed. I updated last night when I seen the announcement.
Copied and pasted your code and get:
Code: Select all
unknown string block
{type: "coronavirus_graph_nl", c: 5, key: "coronavirus_graph_nl", $mountPoint: jQuery.fn.init(1), mountPoint: "#block_24", …}
type: "coronavirus_graph_nl"
c: 5
key: "coronavirus_graph_nl"
$mountPoint: jQuery.fn.init [div#block_24]
mountPoint: "#block_24"
entry: "block_24"
width: 12
__proto__: Object
blocks['coronavirus_graph_nl'] = {
type: 'corona',
title: 'Coronavirus',
countryCode:'NL',
startDate: '01/03/2020',
graph: 'bar',
stacked: true,
tooltiptotal: ['Confirmed (Total)', 'Deaths (Total)'],
height: '380px',
width: 6,
zoom: 'x'
}
columns[5] = {}
columns[5]['blocks'] = ['coronavirus_graph_nl'],
columns[5]['width'] = 4;
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 14:25
by clinkadink
OK, I will have a look whats going on.
Update: I have just deleted my Dashticz folder, and installed the latest beta. I have no issues. All corona graphs show fine, and there are no errors in DevTools. What is going on
I have see a similar issue from another user with the calendar block. It may be related, it might not. I will need to investigate further.
https://www.domoticz.com/forum/viewtopi ... 20#p244135
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 16:03
by Scotty
Changed below
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 16:09
by Scotty
Wow. I'm so stoopid.
Where I was rushing to copy your code into my config, I pasted it above the line
I've moved it now and all working great.
Perhaps this will help you with your calendar issue?
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 19 April 2020 16:13
by clinkadink
Thanks for letting me know. I'll see if this cures the other issue too.
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Friday 31 July 2020 9:58
by Vomera
Hi!

I'm only interested in the daily new cases, is there an option to show it like a report ?
for example ?
Code: Select all
blocks['coronavirus_nl_doubling'] = {
countryCode:'NL',
type: 'corona',
report: 'Doubling', <-- daily comfirms???
width: 6
}
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 01 August 2020 10:40
by clinkadink
Vomera wrote: ↑Friday 31 July 2020 9:58
Hi!

I'm only interested in the daily new cases, is there an option to show it like a report ?
Yes, use "mode" ... shown 8 posts above this one:
https://www.domoticz.com/forum/viewtopi ... 20#p244233
Code: Select all
mode: 0 // show all datasets (default)
mode: 1 // show totals datasets
mode: 2 // show daily datasets
Hope that helps

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 01 August 2020 15:53
by Vomera
Tnx for that!!
When i set start date i get the following. The first day shows a lot of numbers (i think because of the calulation)
I was thinking to set a max of 1000 in the graph, so the graph will not start at 60k
Code: Select all
blocks['coronanl'] = {
type: 'corona',
mode: 2,
countryCode: 'NL',
startDate: '1/07/2020',
stacked: false,
height: '225px',
options: {
scales: {
yAxes: [{
ticks: {
min: 0,
max: 1000
}
}, {
ticks: {
min: 0,
max: 31
}
}]
}
}
}
But the option doesnt work.
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 01 August 2020 18:15
by clinkadink
Vomera wrote: ↑Saturday 01 August 2020 15:53
When i set start date i get the following. The first day shows a lot of numbers (i think because of the calulation)
Hmmm. So do I
I found out why. Basically, when you use a start date, like 01/07/2020, with Mode 2 (daily growth), it has no previous data to calculate the growth between 01/07/2020 and the day before. I have updated the code to start one day before the start date, so it can calculate the difference between the two days. In your case, this is 30/06/2020. But this date is not plotted on the graph, it is only used to calculate the growth for 01/07/2020. Hope that makes sense - it does in my head
It now looks like this:
I also tweaked the code so it only formats 1000 to K for the Total, not the day. As you can see above, it is now just showing the unformatted value.
I have submitted a PR for this change. I will hopefully be merged soon in the latest beta.
By the way - the actual graphs are a little scary. I think people are relaxing too quickly, as daily cases have more than tripled in 2 weeks

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 01 August 2020 20:24
by Vomera
Thanks for your response, yeah something like that was also in my head, i am not a programma, i can just tweak some script and implement it.
I hope the next beta will be released soon, so i can use the data you showed in your post.
Yeah the second wave is coming like this :O, today 431, but i see its not plotted into the graphic jet, is there 1 day delay ?
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 01 August 2020 20:27
by clinkadink
The data via the api isn't updated until the end of each day by John Hopkins University, USA. We can't do anything about this unfortunately.
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Sunday 02 August 2020 15:09
by clinkadink
The fix has now been made available in the latest beta today.
Sent from my HD1913 using Tapatalk
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Monday 03 August 2020 21:00
by Vomera
Okay i test it and it works

Thank you for that.
Can i reduce the information? I would like only to see the last infections (latest data) like the view in the image ?

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Monday 03 August 2020 23:38
by clinkadink
Vomera wrote: ↑Monday 03 August 2020 21:00
Okay i test it and it works

Thank you for that.
Great to hear it's working
Vomera wrote: ↑Monday 03 August 2020 21:00
Can i reduce the information? I would like only to see the last infections (latest data) like the view in the image ?
I have included new capability this evening to allow users to choose what information they want to display in the header. This is controlled by a new block parameter called "header" on the corona block. The param takes an array of numbers, which correspond to:
1 = Total confirmed
2 = Total deaths
3 = Ratio
4 = Doubling
5 = Daily confirmed
6 = Daily deaths
The default setting if the parameter is not set is:
The image below is with the block set to:
I have raised a PR requesting this change, once it is implemented in the latest beta, I will let you know.
Cheers

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Tuesday 04 August 2020 0:16
by Vomera
wow nice! can't wait to test it! Let me know

Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Tuesday 04 August 2020 17:37
by clinkadink
It's now available in the latest beta.
Sent from my HD1913 using Tapatalk
Re: Dashticz Coronavirus - Features, Fixes & Updates
Posted: Saturday 08 August 2020 20:20
by Vomera
I'm going to test tomorrow !

thank you