Subscribe Bookmark RSS Feed

How to add contextuel information on a bar graph ?

SOLVED
Highlighted
yves38

Occasional Contributor

Joined:

Dec 12, 2016

Hi,

I would like to add some information on a graph when I click (select) a sample on the graph. By scripting, I want to add a message box containing some information linked to the sample (row) selected. The information is coming from data into column for the given selected row.

By clicking on another sample, message is updated with new information coming from this selected row(s).

Is it possible ? Has someone already done something similar ?

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
markbailey

Staff

Joined:

Jun 23, 2011

See the Help > Books > Scripting Guide about the Mouse Box display box object and the Mouse Trap function for an explanation and examples.

3 REPLIES
markbailey

Staff

Joined:

Jun 23, 2011

See the Help > Books > Scripting Guide about the Mouse Box display box object and the Mouse Trap function for an explanation and examples.

yves38

Occasional Contributor

Joined:

Dec 12, 2016

Thank you !

yves38

Occasional Contributor

Joined:

Dec 12, 2016

After many trials and reading of the help, I did not succeed to do what I want.

Maybe my description was not clear enough and surely I'm a beginner in scripting in JMP.

Here is an example of graph builder on which I would like to have a small popup (help info) when I click on 1 bar of the graph. The provided information is related to a column value for the selected row (e.g. column B). It could be also interesting to get the popup information just when the mouse goes on top of a bar (without selecting the bar).

Thanks in advance for provide me with some code lines for this example.

 

New Table( "Untitled 15",
    Add Rows( 8 ),
    New Column( "P",
        Numeric,
        "Nominal",
        Format( "Best", 12 ),
        Set Values( [1, 2, 3, 4, 5, 6, 7, 8] )
    ),
    New Column( "A col",
        Character,
        "Nominal",
        Set Values(
            {"1234", "123", "12314", "1232", "123123", "13131", "131313", "131323"}
        )
    ),
    New Column( "B col",
        Character,
        "Nominal",
        Set Values(
            {"CAT1", "CAT2", "CAT3", "CAT1", "CAT1", "CAT3", "CAT2", "CAT3"}
        )
    )
)    ;

Graph Builder(
    Size( 534, 448 ),
    Show Control Panel( 0 ),
    Variables( X( :P ), Y( :B col ) ),
    Elements( Histogram( X, Y, Legend( 8 ) ) ),
    SendToReport( Dispatch( {}, "400", LegendBox, {Set Title( "" )} ) )
);