I'm new to JSL and I suspect I'm going about this in the wrong way. Pointers and ideas would be welcome.
I have a data table that contains several versions of Z scores from slightly different models.
Z score from Model A Z Score from Model B....Z Score from model X
Subject 1
Subect 2
...
Subject N
I'm trying to build a data visualization application where the client would pick a pair of these z values and a critical value.
The resultant interactive graph would then be an XY chart of the Z values and a horizontal line and a vertical line, both at the chosen critical value.
Hopefully the client can then mouse around the chart and locate individuals with dramatically different Z values.
I constructed a graph in graph builder that does what I want for a pair of variables.
I've modified the sample application Launcher with Report to return an X Value, a Y Value and a Critical number and have managed to pass these values into the code from graph builder.
OnModuleLoad({items},
yval = items[1];
xval = items[2];
critical = items[3];
);
By changing x variable to xval (and the same thing for the y axis) I can make the sample application change axis. There is sample code at the end of the post.
I'm running into two problems.
#1. I can't seem to suppress the column dialog that autostarts when I use xval/yval. (If I could get the column dialog to pass a critical value....I suppose I could work with that.)
#2 I can't seem to locate a suitable way to modify the dispatch lines so the vertical and horizontal lines appear when I change the X, Y values from what they where when I created the graph in graph builder.
Am I just way up the wrong tree here?
Thanks in advance for any replies.
| | | Report1 = Platform( | |
| | | | DataTable1, | |
| | | | Graph Builder( | |
| | | | | Show Control Panel( 0 ), | |
| | | | | Variables( X( Eval( xval ) ), Y( Eval( yval ) ) ), | |
| | | | | Elements( Points( X, Y, Legend( 1 ), Jitter( 1 ) ) ), | |
| | | | | SendToReport( | |
| | | | | | Dispatch( | |
| | | | | | | {}, | |
| | | | | | | "Z Value From A", | |
| | | | | | | ScaleBox, | |
| | | | | | | {Add Ref Line( | |
| | | | | | | | Eval( critical ), |
| | | | | | | | Solid, |
| | | | | | | | "Red", |
| | | | | | | | "", |
| | | | | | | | 2 |
| | | | | | | )} | |
| | | | | | ), | |
| | | | | | Dispatch( | |
| | | | | | | {}, | |
| | | | | | | "Z Value from D", | |
| | | | | | | ScaleBox, | |
| | | | | | | {Add Ref Line( | |
| | | | | | | | Eval( critical ), |
| | | | | | | | Solid, |
| | | | | | | | "Red", |
| | | | | | | | "", |
| | | | | | | | 2 |
| | | | | | | )} | |
| | | | | | ) | |
| | | | | ) | |
| | | | ) | |
| | | ) | |
| | ), | |
Thank you