This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Bar Chart
#1
Hi, I need to create a column chart with weekly electricity consumption and water consumption.
I need to connect KNX objects with data from Monday to Sunday and show them on the bar graph,
I need to use Google api or something like that?
I'm just starting with js and css, so I need help
Reply
#2
Why not use trends in week view? It won't be a bar chart but it works without any extra programming. Google charts can also be used but that requires some extra effort. Short example here: https://forum.logicmachine.net/showthread.php?tid=1400
Reply
#3
(18.01.2019, 14:06)admin Wrote: Why not use trends in week view? It won't be a bar chart but it works without any extra programming. Google charts can also be used but that requires some extra effort. Short example here: https://forum.logicmachine.net/showthread.php?tid=1400

Yes, can use trends but trends didn't show how many kWh we use in week.
If I use bar i can show that, for example in monday we usuage 60kWh per day and 2m^3 water per day, in trends clients not look that.
Reply
#4
Month view shows days consumption,
------------------------------
Ctrl+F5
Reply
#5
(18.01.2019, 16:45)Daniel. Wrote: Month view shows days consumption,


No don't show day consumption, it show's only average value on that day, this value is not sum of value per day
Reply
#6
You have probably selected absolute value mode instead of counter.
Reply
#7
(20.01.2019, 08:33)admin Wrote: You have probably selected absolute value mode instead of counter.

 Yes i use it.

I should take counter ?
Reply
#8
Yes, absolute value is meant for temperature sensors and similar data. In your case counter mode should be used.
Reply
#9
(21.01.2019, 07:50)admin Wrote: Yes, absolute value is meant for temperature sensors and similar data. In your case counter mode should be used.

Ok, can you give me more information how work, counter mode? I have data object were i have 15min power consumption, how i can show it. 
I need a chart with  sum when turn weekly view. 
For example, 
I know that I use 1kWh per our, when i look at day view i see 24 point one per our with 1kWh value and it is correct,
but when I use view weekly I need see 7 point with value 24kWh, but i see value 1kWh also.

Reply
#10
Weekly view shows data in the same resolution as daily. Monthly view will show you daily consumption.
------------------------------
Ctrl+F5
Reply
#11
For counter mode to work properly you need a source object that has total consumption.

From RRD docs:
Quote:COUNTER is for continuous incrementing counters like the ifInOctets counter in a router. The COUNTER data source assumes that the counter never decreases, except when a counter overflows.
Reply
#12
The raw data is stored in the history trend, the history service make this data available. Grab data, send to Google and then chart it?
Reply


Forum Jump: