From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display legends selectively in the XY graph legend bar

Solved!
Go to solution

Hi Everybody

 

There's a 1-D array contains 65 XY graph elements. I made them plotted with a XY-graph indicator, and color them in 5 groups. Each group contains 13 plots .

 

SamuelLIN_0-1594729662471.png

 

The problem is "how to show legends selectively?". I just want to show 5 legends , and name them as " group-1, group-2, ...group-5", corresponding to the color of each group.

 

The Legend-> visible property note makes all the legends disappear... , So I didn't find the right way to use it .

 

Can anyone show me an applicable way ?  Thanks very much .

 

 

 

0 Kudos
Message 1 of 3
(1,083 Views)
Solution
Accepted by topic author SamuelLIN

Hi Samuel,

 

I see two options:

  1. Create your own legend using a cluster of string and colorbox.
  2. Use the graphs legend and show only the first 5 elements. Sort your plots to have the 1st plot of each group as the first 5 plots in the graph. Name those 5 plots "group1" to "group5"…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,080 Views)

Hi GerdW:

 

Thanks for your ideas. It solved the issue 

👍

0 Kudos
Message 3 of 3
(1,016 Views)