cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
aallman
Level III

Graph Builder Overlay and Color Legend

I have a script that creates a graph builder window that allows the user to click through options in a local data filter to view different sets of data. I have overlay and color variables set, color shows which bucket the data fall into and overlay shows pass/fail using marker shapes. What I want to change is the legend. If the users selection has one bucket that only has data as "pass", then the color for that bucket in the legend takes on the marker shape of "pass". If there are both "Pass" and "fail" in a bucket then the marker stays the default circle. Here is what I mean:

image.png

Is there any way that I can keep all of the markers for the color variables a constant shape in the legend? Is there a way to specify a shape that I am not using in my Overlay variable (like the default small circle)?

 

I also have times where the wrap variables in the legend change color:

 

image.png

When this happens it actually changes the points in the graph to the color of "Pass" even though it is not a color I defined for any of my buckets.

 

I have the following in my script for the legend:

{Legend Model(
				8,
				Properties( 0, {Line Color( 32 ),Marker(13 ), Marker Size(3)}, Item ID( "0 Pct Rel", 1 ) ),
				Properties( 1, {Line Color( 9 ),Marker(13 ), Marker Size(3)}, Item ID( "0-5 Pct Rel", 1 ) ),
				Properties( 2, {Line Color( 6 ),Marker(13 ), Marker Size(3)}, Item ID( "5-10 Pct Rel", 1 ) ),
				Properties( 3, {Line Color( 3 ),Marker(13 ), Marker Size(3)}, Item ID( "10-15 Pct Rel", 1 ) ),
				Properties( 4, {Marker( "FilledCircle" ),Line Color(0)}, Item ID( "Fail", 1 ) ),
				Properties( 5, {Marker( "Diamond" ),Line Color(0)}, Item ID( "N/A", 1 ) ),
				Properties(
					6,
					{Marker( "Filled Up Triangle" ), Line Color(0)},
					Item ID( "Pass", 1 )
				),
				
				Properties( -1, {Line Color( 27 ),Marker(13 ), Marker Size(3)}, Item ID( "+15 Pct Rel", 1 ) ),
				
			)}

******I updated the script and now I have fixed the issue with the colors changing to different shapes, but I can't seem to figure out how to keep the overlay from changing the colors of the data points.

Thanks!

2 REPLIES 2
gzmorgan0
Super User (Alumni)

Re: Graph Builder Overlay and Color Legend

For the shape properties, try changing Line Color(0) to Line Color("Back").  Even though 0 is Black, I believe GraphBuilder uses a zero as a place holder for Default, and default can change when the graph changes. 

 

I am not 100% this will work, but it is worth a try. If that doen't work, a Local Data Filter handler might be needed to manage the legend. 

txnelson
Super User

Re: Graph Builder Overlay and Color Legend

If you set the RowState color in the data table to the colors you want for the Overlay variable, I believe you will get the color pattern you want.

Jim