Multi Stacked Barchart

Hi,

I've got a new emon 3.4 system running, logging to emoncms.org - everything "just worked" - thanks!!

And I've got a nice Multigraph showing power usage of all the circuits. Then I tried a multigraph of the kWhd feeds; it does work, but all the bars are superimposed on each other, so it's rather hard to interpret. Is there a option I'm missing somewhere to "stack" the bars? (Actually, this might even be nice on the power graph too). Or is it time to get out my PHP hat? (the wonders of OpenSource!)

Thanks,

Sandy

TimSmall's picture

Re: Multi Stacked Barchart

Any progress?  I'm looking at adapting the MyElectric app to do this.

blaal02's picture

Re: Multi Stacked Barchart

Hi Tim,

Basically - No! (I got "distracted").
I was looking at Multigraph because it already seemed to have most of the pieces I thought I needed. I was thinking 'Stacked' would just be an option on the graph definition that might be generally useful - and would give me what I was after!

Conversely, you are right; 'MyElectric' is a nicer, more accessible display.

Sandy

TimSmall's picture

Re: Multi Stacked Barchart

Screenshot work in progress Energy Breakdown emoncms app

Haven't done anything in javascript for a few years, so it's a bit rough, and it's still work-in-progress, but thought I'd post a screenshot of what I've done so-far.  I'm planning to make quite a few changes still but it's getting to the point of being usable soon hopefully...

Tim.

blaal02's picture

Re: Multi Stacked Barchart

I (finally) got back to this. Here's the graph I was heading for.

I added 'stacked' as a checkbox option at the bottom of the Multigraph configuration to control this behaviour.

TimSmall's picture

Re: Multi Stacked Barchart

Looks good!

I was just thinking that I must get mine finished too...  Progress bar seems to be stuck at 80%.

blaal02's picture

Re: Multi Stacked Barchart

I think this is now about where I want it:

Ant it works on the daily bar chart too:

Controlled by a new checkbox on the multigraph configuration (after 'skip missing data')

Code's attached if anyone else is interested. If lots of interest, I guess we'll see about merging it into the base.

Thanks

Sandy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.