LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart annotation

After some research, I've found a lot of posts asking about annotating on a chart and the general response is "you can't, use a graph".

 

So here's my situation that I would greatly appreciate some guidance on.  I have an accelerometer that outputs 6 channels.  Four are the x, y, z, and total axes.  The other two channels are values that correspond to motion.  LabView's chart display has proven to be the exact visual that we want.  See the attached image of the chart set up that is precisely the way we want to see the data as it comes off the accelerometer.  The four accels (x, y, z, and total) are grouped together in the top plot while the two motion channels each have their own plot (this was done using a cluster and property node).  All of the plots are attached to the same scroll bar at the bottom.  The ability to scroll all the plots simultaneously on the same scroll bar is key here.

The problem is I need to be able to mark events on the chart.  The accelerometer will run for a long time and I would like to be able to mark on the chart when we started driving on a bumpy road and when it changed to a smooth paved road.  Stuff like that.  Ideally, these annotations would "stick" to a point on the chart.  So it would scroll with the rest of the data.

 

I'm assuming that my approach thus far has been wrong.  I would greatly appreciate suggestions of how to approach this, since a chart does not seem to be the answer.  Although I would very much like to retain those qualities of a chart that I mentioned above.  If it matters to anyone, the data is coming in via a serial stream that I parse and turn into 6 individual values that are then fed into the chart.

 

Thank you!

 

 

0 Kudos
Message 1 of 4
(3,684 Views)

You can add a few more plots that go from -Nan to -1400 (or wherever)  depending on state. Fill them all to -infinity and you get a color band at the bottom of the graph that indicates the current state. At any given time, one is shown and the others are NaN. See how far you get.

Message 2 of 4
(3,677 Views)

I actually did something very similar to that already.  It's a viable solution, but It falls short of text annotations on the chart itself.  I'm forseeing a situation where the users mark a multitude of events on the same chart.  It'll be a hassle to distinguish between the different colors and reference them against a legend on the side.

0 Kudos
Message 3 of 4
(3,668 Views)

Dear Dan,

 

It seems like you have two options -

1. Continue using a chart and create a bar notification system with legend (able to maintain current chart formatting, but may be more difficult to read). - see Altenbach's post (thanks!)

2. Modify a graph so that it appears like a chart and use the graph annotation function. - see this Dveloper Zone Article. It refers to modifying an XY Graph so that it appears to be an XY Chart, but could be modified for a graph that would have the same formatting as in your screen shot.

 


@dan.laks wrote:


I'm assuming that my approach thus far has been wrong.  I would greatly appreciate suggestions of how to approach this, since a chart does not seem to be the answer.  Although I would very much like to retain those qualities of a chart that I mentioned above.  If it matters to anyone, the data is coming in via a serial stream that I parse and turn into 6 individual values that are then fed into the chart.


Based on what you described, it sounds like option 2 might be worth pursuing, if you are willing to do the custom coding required to make it work.

 

Joey S.
Senior Product Manager, Software
National Instruments
0 Kudos
Message 4 of 4
(3,637 Views)