LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Which graph property assigns the background color?

I'm looking to see which property node contains the color that sets the background on the graph control.  In the screenshot below, this would be the light-green color.  I've tried to systematically go through all the various properites with the word 'color' and none of them seem to be it but I'm sure I'm just overlooking it somehow.

 

Thanks.

 

graph.png


0 Kudos
Message 1 of 9
(2,781 Views)

The Property is Frame Color

Richard






Message 2 of 9
(2,767 Views)

Perfect, now how do I get to that?  Right click the graph, Create --> Propert Node --> ????


0 Kudos
Message 3 of 9
(2,758 Views)

Yes. Then find Frame Color in the list

Richard






Message 4 of 9
(2,755 Views)

Hmm, I don't see it.  Is this property new for 2011? I'm on 2010 SP1


0 Kudos
Message 5 of 9
(2,753 Views)

Apparently this is not possible pre 2011.

 

If you're like me and don't have 2011 and need a solution, here you go:  http://forums.ni.com/t5/LabVIEW/How-to-change-programmatically-the-color-of-a-graph-frame/td-p/15228...

 


0 Kudos
Message 6 of 9
(2,746 Views)

That is definitely a new one for LV11.  If you have a doubt you can search in the Class Browser.

 

Avert your eyes if you do not like treks deep into hack territory.

 

  1. Color the background frame of the XY Graph Transparent
  2. Create a new Horizontal Smooth Box decoration, size it to the XY Graph and send it to the back.  Group the two.
  3. On the Front panel, right-click on one of the scrollbars, Create -> Property Node -> Decorations[]
  4. Assuming you only have one decoration, drop an Index Array primitive, connect to Decorations[] and on the output create Indicator
  5. Run the VI
  6. Right-click the Indicator you just created and select Create Constant, Delete the Decorations[] PN, Index array, and Indicator or put in conditional disable structure
  7. Right-click the Decoration reference constant and Create->Property for Decoration Class -> Colors -> FG Color
  8. Create a color box Control or constant and wire to the property (Create Control will give you a U32 number).

Easy peasy.  Now you can change that color at will, and please do that green is pretty ugly.

 

Edit:  Seeing the link in the previous post, not much has changed in 7 years...

Message 7 of 9
(2,743 Views)

Thanks for the tips on creating a Decoration constant and grouping them together.


0 Kudos
Message 8 of 9
(2,737 Views)

Sorry SiegeX, I hope I didn't send you on a wild goose chase. Should have remembered my Release Notes with 2011. Smiley Happy

Richard






0 Kudos
Message 9 of 9
(2,726 Views)