BookmarkSubscribe
Choose Language Hide Translation Bar
adam
Community Trekker

Graph Builder X-Y choice selection

Hi All,

 

I have the following problem whereby I have few Xs and Ys. Depending on product, not all the data I crunched from database has the same parameters. I am aware that I can just use drag/drop but I intend to do it using a simple script. 

For eg. in Product A, my Ys are Strength, Tensile, Mass and Diameter which means that I don't have Force in my column. Here my X is Date.

And for eg. in Product B, my Ys are Strength, Tensile, Force and Diameter which means that I don't have Mass in my column. Here my X is Day. 

 

How can I do it with this kind of flexibility whereby the script will autoplot those parameters that are presence. 

 

Graph Builder(
	Size( 1015, 727 ),
	Variables(
		X( :date ),
		X( :day)
		Y( :Strength ),
		Y( :Tensile ),
		Y( :Force ),
		Y( :Mass ),
		Y( :Diameter ),
		

Thank you.

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Graph Builder X-Y choice selection

You can easily script the stacking of the data table, where all of your Y variables are stacked into one column.  If you then use it as your Y column, and the Label (Y Column Names ) as your Overlay, then you will get what you want, without having to have a long and complex version of the Graph Builder code.

Jim
3 REPLIES 3
txnelson
Super User

Re: Graph Builder X-Y choice selection

You can easily script the stacking of the data table, where all of your Y variables are stacked into one column.  If you then use it as your Y column, and the Label (Y Column Names ) as your Overlay, then you will get what you want, without having to have a long and complex version of the Graph Builder code.

Jim
Highlighted
adam
Community Trekker

Re: Graph Builder X-Y choice selection

Thanks, that's a good one, Jim. Never thought of it.
0 Kudos
EMC2
Occasional Contributor

Re: Graph Builder X-Y choice selection

Question: Does this method work if a particular variable column itself missing in one of the product ?

0 Kudos