MxChartJS

Tips, Tricks and Scripts to enhance your home automation and workaround known device bugs, limitations and incompatibilities
Post Reply
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

MxChartJS

Post by piet66 »

Hi Michael,
I would like to answer you here in the forum. It's easier and maybe other people have something from it too.
Have replaced the sensor for testing - and have seen a conflict with IntChart module (same icon - and it is switching between the charts ;)...) that's why have used another sensor - not deleted, but changed in UI only.
Then is coming up a window with question about deleting/continue chart because of devices were replaced.
I included this query by intention. The stupid alpaca has no security against input errors and very quickly you have destroyed your beautiful chart.
Unfortunately I have not found a way to enter the answer here as well. You have to do that in the configuration. But I can add an explanatory text.
Will it be ok for you if I will send suggestions/issues to you?
Suggestions/issues are welcome. But whether I will make them is uncertain. ;)
And - is a second y-axis possible to realize? Would be very nice for temp / humidity chart (different ranges...).
Very difficult. And besides this, I actually wanted to make a tool that was as simple as possible. Therefore I limited myself to one axis and correct the data of some sensors by arithmetic.
Can you add the "bar" graph option please?
For some charts like Energy it could be nice to get a bar graph.
I don't really have a need for bar graphs. But I will see if it is easy to do.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
michap
Posts: 437
Joined: 26 Mar 2013 10:35
Contact:

Re: MxChartJS

Post by michap »

Just have seen this topic - great!
At first - thank you for your work and time - a great app for the users!

About the window with deleting/continue - it is not critical at all. Maybe only add a text that define it in settings once again for understanding.
And - is a second y-axis possible to realize? Would be very nice for temp / humidity chart (different ranges...).

>> Very difficult. And besides this, I actually wanted to make a tool that was as simple as possible.
Really? I didn't thought that it is complicated (use it in highcharts in this time).
For user it can be easy - an option behind the second(+) device(s) that second axis should be used.

--------------------------------------
another request ;) ... sorry....

What do you thing about the option
spanGaps: true / false
for the case that user have selected the "changed value" option for chart data?
This option (changed value) make sense for a lot of sensor types to detect min/max values.
But - if I have two parameters of the sensor (as sample wind/temperature or temperature/VOC - then not both values will be changed at same time.
In this time you "fill" the value with the previous value - this is one option.
Other option would be to fill the value with null in JSON - and use spanGaps: true - then the latest 2 points will be connected.
It can be more true for the values of sensors.

What do you think?

Michael
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: MxChartJS

Post by piet66 »

What do you thing about the option
spanGaps: true / false
for the case that user have selected the "changed value" option for chart data?
This option (changed value) make sense for a lot of sensor types to detect min/max values.
But - if I have two parameters of the sensor (as sample wind/temperature or temperature/VOC - then not both values will be changed at same time.
In this time you "fill" the value with the previous value - this is one option.
Other option would be to fill the value with null in JSON - and use spanGaps: true - then the latest 2 points will be connected.
It can be more true for the values of sensors.
I'm not quite sure whether I've understood right. I think you can use Graph Type = single points in such case. But actually the purpose of this app is to illustrate sensor value trends, not single events.
Single events you can see in MxInfo/Communication.
Can you add the "bar" graph option please?
For some charts like Energy it could be nice to get a bar graph.
Can you please explain, why do you need this? In my opinion, bars are less suitable for the presentation of measured values.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
michap
Posts: 437
Joined: 26 Mar 2013 10:35
Contact:

Re: MxChartJS

Post by michap »

piet66 wrote:
10 Feb 2021 12:19
What do you thing about the option
spanGaps: true / false
I'm not quite sure whether I've understood right. I think you can use Graph Type = single points in such case. But actually the purpose of this app is to illustrate sensor value trends, not single events.
I mean, as sample for wind the user should use the "changed value" option - for detecting the right values, and not the current value every 5 minutes (as sample)
For Humidity as sample it will be at 7:00 40% and then at 8:00 45%. Fro my understanding it could be more correct to draw a line between these 2 points and not draw a humidity line from 07:00 until 07:55 with 40% (because of only first line temperature was changing often) and then a line from 7:55 to 8:00 from 40% to 45%.
Maybe more clear now what I mean? ;)
Can you add the "bar" graph option please?
For some charts like Energy it could be nice to get a bar graph.
Can you please explain, why do you need this? In my opinion, bars are less suitable for the presentation of measured values.
[/quote]

As sample you have an energy meter (maybe plug or meter) - and you want to create a for usage per hour.
Here will be used in most cases a bar graph.
Additional here could be added a second graph as line.

Yes, it is for comfort only - you are right.

I'm working since a lot of years with sensors and visualization of data (even over a long time) that's why have some experience how different users like to evaluate data from different sources.
Please do not think that I do not like your app - it is a great step within the Z-Way application, and a nice work!
piet66
Posts: 266
Joined: 04 Feb 2017 17:00

Re: MxChartJS

Post by piet66 »

In all those cases you should use Graph Type = rectangle.
Rectangle and Single Points are always taken, when the value changed, in addition to the cyclically read (if wanted). Anything else doesn't make any sense.

For binary devices rectangle is the default.
Raspberry Pi 3 Model B Rev 1.2
Raspbian GNU/Linux 10 (buster, 32bit)
RaZberry by Z-Wave.Me ZW0700 7.20.00 07.38/1766938484 1025/257
Z-Way version v3.2.3 from 2022-04-06 04:56:23 +0300
michap
Posts: 437
Joined: 26 Mar 2013 10:35
Contact:

Re: MxChartJS

Post by michap »

piet66 wrote:
10 Feb 2021 13:41
In all those cases you should use Graph Type = rectangle.
Yes, for energy rectangle is an option, right. bars looks more elegant / professional, but ok...

About the spanGaps - I can change it in code in my version, no problem ;)
I thought it maybe interesting for you.

Attached 2 pictures about the sense of 2 axes - A temperature/humidity sensor is a real use case.

The ranges are very different, so that it maybe not possible to check it at first view.
Same will be for room temperature - have no sample for MxChartJS in this time...
Again - it is only an idea to make it a bit better to use ;)

No very good visible temperature range:
mxchart_5.jpg
mxchart_5.jpg (56.19 KiB) Viewed 19658 times
just using highcharts (with 2 axis):
mxchart_5a.jpg
mxchart_5a.jpg (30.79 KiB) Viewed 19658 times
Post Reply