Jump to content
News about the LabVIEW Wiki! Read more... ×
Mike Le

Why does a "GraphChart" reference not have access to "ActivePlot" and individual Plot properties?

Recommended Posts

I'm creating some Subpanel Actors to act as reusable plotters. One of the things I'm doing is splitting from a parent class into two concrete instances, one containing a Chart and one containing a Graph.


There are some abstract methods common to both Actors that could theoretically be handled in the parent class, except they require access to control properties like ActivePlot, Plot.Name, Plot.Visible, etc. I tried using a generic GraphChart reference, but found that it doesn't give access to these properties. You have to pass in a Chart OR a Graph reference.


My solution has been to put the code into the concrete methods, but I find myself with essentially identical code in two places, accessing identically named properties, except with either a Chart or Graph property node.


Does anyone know why the GraphChart doesn't have access to these properties? Anyone have a more elegant workaround?



Share this post

Link to post
Share on other sites

I find examples like this scattered throughout the VI server hierarchy. Don't know if you'll get a 'why' answer, it just 'is'. Sorry, don't have an obvious recommendation for you.

My assumption is things ended up like this as features were slowly tacked on without proper consideration for where they ought or could be in the hierarchy. Details like this give me the impression that the underlying implementation is not as clean as it could be...

Share this post

Link to post
Share on other sites

I think it is because the GrapChart also covers some 3d graphing objects:



  • GraphChart (pme)
    • IntensityChart (pm)
    • IntensityGraph (pme)
    • MixedSignalGraph (pme)
    • WaveformChart (pm)
    • WaveformGraph (pme)
      • DigitalGraph (p)
      • XYGraph (p)

(source: http://zone.ni.com/reference/en-XX/help/371361K-01/lvprop/propmeth_class_hierarchy/)



Share this post

Link to post
Share on other sites

Thanks for that, Ton. That makes sense. I do wish there were a level that combined 2D Charts and Graphs, though. They share so much common functionality and are a bit more common than the 3D examples (at least in my experience).

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Important Information

By using this site, you agree to our Terms of Use.