cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
bharathu
Level III

Event lines and comments in Graph Builder

Hello,

 

I am trying to map multiple "suspect" lots on our manufacturing line with "TimeStamp" in X-axis and "Process Step" in the Y-axis. I wanted to superimpose tool maintenance "events" on this data. Ideally I wanted a similar look for the "event" as shown in the post Event Lines and Comments on Control Charts .

 

I am badly stuck trying to implement this on a graph builder. Any tips would be greatly appreciated. I am attaching a sample table. Trying to see if I can draw a vertical line for each date where there is an tool maintenance log by either using "Event_type" or "Event_Comment" column.

3 REPLIES 3
gzmorgan0
Super User (Alumni)

Re: Event lines and comments in Graph Builder

@bharathu ,

Hmmmm, the link you provided has the solution if you can read JSL.  Below is the referenced link's data drawn using GraphBuilder. and the script. Note near the Comment Line "Shift Two" near the bottom there are two points with similar value and have Notes. The notes run into each other.  The Excel example you provided has notes for each point so the comments will collide.  You could make thes hover comments, so when you click on a point you can see the comment.  

 

So it is not clear what issues you are having:

  • reading Excel,
  • creating Graph Builder,
  • adding the comment scripts, or
  • comment collisions.

 

image.png

 

Names Default to Here(1);

dt = Open("$DOWNLOADS/Event Lines and Comments on Control Charts.jmp");


gb = dt << Graph Builder(
	Size( 742, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :ID ), Y( :Data ) ),
	Elements( Line( X, Y, Legend( 5 ) ),  Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Data",
			ScaleBox,
			{Min( -10 ), Max( 25 ), Inc( 5 ), Minor Ticks( 0 ),
			Add Ref Line( 10, "Solid", "Medium Dark Green", "UCL", 3 ),
			Add Ref Line( 17, "Solid", "Medium Dark Red", "CL", 2 ),
			Add Ref Line( 3, "Solid", "Medium Dark Red", "LCL", 2 )}
		),
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				5,
				Properties(
					0,
					{Line Color( 1 ), Fill Color( 0 )},
					Item ID( "Data", 1 )
				)
			)}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {3, [-1], 5, [-1]} ), Position( {-1, -1} )}
		)
	)
);

fb = report(gb)[FrameBox(1)];

fb << Frame Size(1350, 400);
fb << Add Graphics Script(
				1,
				Description( "Script" ),
				For Each Row(
					If( Is Missing( :Comment ) == 0, 
					V Line( Row() );
					Text( Right Justified, {Row(), Col Maximum( :Data ) * 1.2},:Comment ))
				);
				For Each Row(
					If( Is Missing( :Note ) == 0,
					If( :Data <= Col Mean( :Data ),
					Text( Right Justified,{Row(),:Data-:Data*1.1}, :Note ),
					Text( Right Justified,{Row(),:Data * 1.1}, :Note )))
				);
			);
dt << select where(!IsMissing(:Note));
dt << colors(red);			
dt << clear select;
bharathu
Level III

Re: Event lines and comments in Graph Builder

Hello @gzmorgan0 ,

 

Sorry that I have not been clear in my initial post and also that I got delayed getting back to the forums. I am not trying to create a control chart in graph builder. I have attached a picture of what I am trying to achieve from the excel table I provided. I hope this picture clarifies my question. Also I would like to learn the option to have "static comments" vs. "hover comments" so that it can be used as necessary.

 

Many thanks!!

 

Event Log.PNG

bharathu
Level III

Re: Event lines and comments in Graph Builder

I was able to make the event lines come up. Can someone help me on how to make these comments enabled when hovered?