Multiple time plots
-
Hi all,
is there a way to plot 2 different time ranges one one graph?
I would like to have a graph where I can compare 2 points with 2 different time ranges. For example - I am logging kW of 2 compressors. Compressor 1 ran for one hour today between 14:00-15:00. Compressor 2 ran 3 days ago for one hour between 11:30-12:30.
Can I plot the 2 series on one chart similar the image attached?Thanks
-
Do you have a means to capture the times when each compressor is on and off?
I would say yes, but not in the way you're doing it because you'd need to know when they are on and off to show them on the same chart.
By doing this I mean each run time is an event that you go by and then you compare each running event, (each event states the datetimes of each) but then using some momentJS voodoo to set both timestamps to the same date range in order to allow you to see some overlap.I've done something similar but not without extra status information to remove any funny values/false running positives
Fox
-
@robmalone
I think there is a sample dashboard called 'Daily comparison chart' inside Mango
that will help you out.
I have created a dashboard similar to what you want for daily/monthly/yearly comparison on the same kWh point.
Below is where you can find the aforementioned sample dashboard.
Hope this helps. -
Thanks for the replies.
@MattFox I like your solution. It sounds great for certain situations which I will probably use at some point but for now I have no way of triggering an event, there may be no event to trigger. The 2 compressors was just an example. What I really need is to be able to select any 2 points at any 2 time ranges and plot them on the same graph. It could be very useful when comparing new/upgraded plant and equipment with old ones. Also a very useful tool for finding and diagnosing electrical/mechanical faults.@cwangv I have used this very nice chart before but it will only plot the same time ranges so I couldn't put 13:00-15:00 time range for point1 with 22:05-00:05 time range for point2.
I figured it was a long shot. I think Ill just put one chart on top of the other and hide the time axis labels.
Thanks again. -
@robmalone
the sample you have shown is for different day on the same time range which is very similar to the Mango example.
I think you can manipulate the 'from' and 'to' range within the serial chart object to suit your ranges. You will most likely need a couple of date pickers on the graph instead of using the build-in one at the top-right corner.
I am doing something similar. I will see if I can come up with something close to what you want. -
@robmalone said in Multiple time plots:
but for now I have no way of triggering an event, there may be no event to trigger
It's not so much an event, is there anything that points out when the points in question are in use ie are they non zero when working?
Are they negative or above a certain threshold. If so we can definitely use this to create your "runtime events" that can be selected from a drop down. Happy to assist with the JS code if desired.Fox
-
@MattFox I'm not really thinking of any particular scenario, more of a generic tool. Say you have a motor which is getting old, you might want to compare some stats (current, power, temp etc.) from now to some time in the past or maybe you've recently had some PCBs fail, you could compare your power quality to how it was previously.
Would it possible to retrospectively tag the start and end of the runtime events? That might work.
Thanks. -
I can tell you if you're measuring power, you can at least make that work from the perspective of current will be greater than zero or at least a standby current, so then you will easily be able to detect your start and end times.
You're still going to have to implement some code to automate what you want to do, but once it's in and running, it will make life a lot easier with what you are trying to achieve I assure you.
Whilst cwangv's idea is a solid starting point, you're still going to want to pull by 24 hour window, then I'd recommend using a slider to add or remove up to twelve hours worth time to be able to overlay the two, the overlay part I can see is where an AngularJS controller will be required to make this work because I do not believe it's as easy to go through and parse and modify the timestamps in the dashboard post API pull.I'll leave cwangv to find the solution for if it can be realised without a controller, I'd be very impressed and a lot of people will benefit from it. However if some further help is required I'll put my hand up.
Fox