Emoncms listing kWhd data from 12:00 not 00:00

I don’t have gaps between my bars & on my original emonGLCD (2011?) the bars had no gaps & were centred on 12:00 as you’d expect. Can you build in the option of where to centre the bars; 00:00 or 12:00?

So this is why I could never make sense of the dates & times. There was me, assuming the grid lines would be aligned to midnight. To me, it makes more sense to remove the vertical grid lines when unit of time becomes a day or greater.

In my screenshot above that is the case. Am I misunderstanding you?

Exactly. But because the bar represents the whole day, and is labelled as such, there’s a conflict, I see the grid lines as representing noon. While each bar is labelled, the grid lines are redundant. Hence my suggestion to remove them.

If you like, as it stands, my interpretation is the grid lines represent the boundaries between the days, therefore the label and the bar belongs to the space to the right of the grid line.

I think the distinction is drawn between the bar representing an instant or the bar representing a period. When the bar represents a reading at 10 o’clock precisely, it belongs on the grid line. When it’s a wide bar representing the consumption between 10:00 & 10:59, the bar should sit between the 10 o’clock and 11 o’clock grid lines.
10 o’clock is an instant, 8th March is a period.

Now if the label read Mar 08 12:00, I say it becomes a lot clearer.

Couldn’t the bar start off as a vertical line at 00:00 & grow wider & taller with the passage of time until it reached its maximum width at 00:00 24 hours later, leaving no gaps between consecutive days?

Exactly. The problem is that the flot library aligns the labels with the grid regardless of whether the label represents the instant that is the grid line or the period that follows it. I run with a patch to the library that distinguishes between the two cases.

No, that’s wrong. The grid line still represents midnight and it should be labelled with that time if at all. If you display a line chart on the same graph you can see that easily.

The problem is that the bars are displayed in the wrong position. They represent the readings for a period and they should be displayed within and aligned with that period. That then looks stupid but that is a problem with the position of the labelling as I described above.

The current situation is that by leaving the labels incorrectly positioned by the library and then compounding the problem by incorrectly positioning the bars, a pretty-looking solution is obtained for the special case of a bar-only display.

It would then violate one of the tenets of data display, which is that people read the value by looking at the area of a bar. So the bar should start at full height and simply get wider if a dynamic display is desired. Clearly the height could vary somewhat if the quantity on display changed value at all during the time period.

I think the gap is designed to make it easier to understand where one bar finishes and the next one begins, but perhaps there could be an option to close the gaps?

Without a line chart it would make sense, with it, because there’s no other reference. With one, yes, it’s wrong.

The height represents the value being measured, which will increase over time (assuming we’re generating (solar) or consuming (house use/grid); the width of the bar represents the passage of time up to a maximum of 1 day (24 hours). The vertical grid line at 00:00 would provide the necessary distinction of separate daily values.

Since we’re only using bar charts for measuring kWhd these values either remain constant (no power being generated or used) or they increase (power being generated or used)

There are two problems.

First, by varying the width it is no longer a bar chart. The complete 24-hr bar can be thought of as encoding the energy as the height, yes, but if you admit of the possibility of different widths then it is really expressing kWh/day i.e. a power, not an energy. The height is a measure of the average power over the duration that has been measured. It does not increase as time progresses, it only increases if the average power over the increased time increases.

Second, although intellectually people may recognize that the height is the measured quantity, psychologically they do not. The brain compares the area of things. Fortunately this leads to the same conclusion as the first point; namely the height remains constant for constant power. (not zero power - the height would gradually reduce in that case).

There’s an aesthetic judgment to be made about the width of the gap between bars. I suspect most people prefer gaps, as I do, which is why I suggested making it an option. Also there is no grid line between every daily bar if you for example display a month’s worth of data. It’s only the special case of one grid line per day that has a grid line between all bars.

There’s just knowing its a lie. :slight_smile: It would make sense if the lines and bars were moved 12 hours to the right and relabelled with a 12:00 timestamp.

edit: just to be clear, it’s the flot library that decides on these things, so it’s its semantics that get the winning vote.

A bar chart can be any width, hours, days, years as labelled on the x-axis. A bar chart is a definition of its appearance not width

My kWh bar charts all start at zero at 00:00 & measures accumulated kWh throught the day increasing in height if power is being used or generated or remaining constant if no power is being used or generated until 1 day later at 00:00 the bar chart gives me the total kWh value for the day ie kWh/d.
Averages don’t enter into my bar charts

Edit - fixed mangled quote. BT, Moderator

Any progress on this option?