Subscribe Bookmark
heman_robinson

Joined:

Jun 24, 2015

How it works: Interactive HTML in JMP 11

Interactive HTML is a new technology for sharing results in JMP 11. In a previous post, I showed these examples:

  • Diamonds (Distribution Analysis)
  • Movies (Multivariate Analysis)
  • Sales per Employee (Fitted Model)
  • In this post, I want to describe in more detail how to use this new feature. There are two ways to create interactive HTML files: from the JMP desktop or from a JSL script.

    From the JMP desktop, on Windows, choose "File: Save As: Interactive HTML with Data."

    On Mac, choose "File: Export: Interactive HTML with Data."

    Notice in both dialogs the phrase "with Data." The way we make the HTML interactive is by exporting the original data. If you have sensitive data, you may not want to share it. In that case, use the "HTML" format instead. This produces output that is static, not live  -- yes, sort of like a zombie :-) -- and it keeps your data safe.

    If you will be creating interactive HTML files frequently, it is convenient to script them. You can do this in JSL using the "Save Interactive HTML" operator:

    // Exports a Bivariate Fit.

    dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

    obj = Bivariate( Y( :weight ), X( :height ), Histogram Borders( 1 ), Fit Line );

    obj << Save Interactive HTML( "Bivariate.html" );

    Open( "Bivariate.html" );

    Once you have created your HTML file, you can share it on the Web, on your corporate intranet or email it to colleagues. Opening the file in a Web browser will display results like this:

    Figure 3. Interactive HTML in Web Browser

    Interactive HTML is a new technology for JMP, one that could take us in many directions. My fellow developers, John Powell and Josh Markwordt, and I are happy to be working on this project, and we are most interested to hear what our customers want. So, please let us know in comments.

    27 Comments
    Community Member

    Adam wrote:

    I think the interactive HTML is a great feature that makes it easier to share the results of analysis to a broader community. One report feature I would like to see become interactive in the future would be the Profiler. At my organization it would be very helpful to send an interactive HTML file to managers where they could see the effects of changing different variables.

    Heman Robinson wrote:

    Thanks, Adam. We are working on the Profiler as we speak :-)

    Community Member

    Marcus wrote:

    I agree with Adam that this is a great feature. One of the first thing I tried after upgrading to JMP 11 was to save a graphbuilder report (with local datafilter enabled) as interactive html. Seems not to be supported yet, but that would be extremely cool and on top of my wish list. Imagine to be able to interactively explore complex data online with the intuitive interface and power of graphbuilder.

    Compared to the limitations and complexity of the google viz api (which I am currently trying to make use of), interactive html from graph builder would be a blessing for users with limited programming background.

    Community Member

    Erik wrote:

    I tried the script above. It saved the html file, but not any of the data. Is there a way to force it to save the data to support the html?

    Heman Robinson wrote:

    The data are embedded. You won't see the data, unless you choose "View Source" on the Web page. Of course, anybody can do that, which is why JMP offers the choice. You can export either interactive HTML, with data, or static HTML, without.

    Community Member

    Sait COPUROGLU wrote:

    Thanks.

    Unfortunately I can not say JMP Interactive HTML is reliable. You can not trust your reports on it. For example the Fit Y by X, I label the columns and would like to share the content of those columns by managers as they hover over the graph they can read each rows column labels which would help my job a lot to share the survey results but it does not work :( Are you aware of the problem? Any updates coming soon?

    Heman Robinson wrote:

    Thanks for your feedback. In general, column labels work, but you may have found a special case that is new to us.

    We need more information to understand whatâ s going on. I will contact you by email.

    Community Member

    Dan S. wrote:

    Thanks. I find interactive HTML to be a useful way to share our data trends quickly with my time.

    One issue I notice is that point labels blink on mouse-over, rather than just appear. Also, I'd like to vote for finishing development on iHTML charts for variability plots.

    Heman Robinson wrote:

    Dan,

    We have been working to improve our tooltips in JMP 12. I'll send you an example.

    Please let me know what you think. Thanks!

    Heman.

    Community Member

    Michael Allen wrote:

    Hello, I have been testing out the interactive nature of some report output and so far everything I try says it is not interactive. Very likely I am doing something that is breaking it, so your help would be very appreciated. I create a window:

    nw = New Window( "My Web Information", VListBox( Text_Confidential, Date_Strings, Placeholder_Report_Link ), pb = panelbox( "Some Title", lub = Lineup Box( N Col(2) ) ) );

    I loop through 4 parameters and append a bivariate graph each time. Like this:

    obj_bivariate_cats = OutlineBox( Eval( my_loop || " Cats" ), dt_object_cats = dt_general_graphs << Bivariariate(...));

    When I output the 'nw' window as interactive HTML, I can open and close the outline boxes, but I cannot highlight or interact with the data at all. The hover over for each graph merely says that it is not yet interactive. Would this be because I am creating objects within objects?

    Rgrds Michael

    Heman Robinson wrote:

    Hi Michael,

    We work for most graphs, so this surprises me.

    Can you please mail me your complete script and data set? or some subset of the data that you don't mind sharing?

    I'll investigate and get back to you.

    Thanks,

    Heman.

    Community Member

    Michael Allen wrote:

    Hi Herman, I hope this is the correct way to post this. Here is the code with the table created within it (sample code) that outputs a new window similar in fashion to what I'm actually doing. The goal is to have in a web page what I have in a report. When I highlight points in one chart, it highlights the corresponding points in the second chart.

    Clear Globals();

    Placeholder_Report_Link = Text Box( "placeholder_raw" );

    nw = New Window( "My Test Window", VListBox( Placeholder_Report_Link ), pb = panelbox( "Any Investigation", lub = Lineup Box( N Col(2) ) ) );

    test_table = New Table( "test_raw",

    Add Rows( 21 ),

    New Column( "My_R",

    Numeric,

    Continuous,

    Format( "Best", 12 ),

    Set Values(

    [30, 50, 80, 90, 110, 120, 130, 30, 50, 80, 90, 110, 120, 130, 30, 50,

    80, 90, 110, 120, 130]

    )

    ),

    New Column( "My_T",

    Numeric,

    Continuous,

    Format( "Best", 12 ),

    Set Values(

    [300, 215, 250, 225,

    303, 135, 233, 111,

    92, 77, 251, 10,

    155, 227, 332, 276,

    232, 152, 136, 85,

    96]

    )

    ),

    New Column( "WW",

    Numeric,

    Continuous,

    Format( "Best", 8 ),

    Set Values(

    [37, 37, 37, 37, 37, 37, 37, 38, 38, 38, 38, 38, 38, 38, 39, 39, 39, 39,

    39, 39, 39]

    )

    )

    );

    For( i = 1, i <= 2, i++,

    If( i == 1,

    temp_col = "My_R";

    ,

    temp_col = "My_T";

    );

    obj_bivariate = OutlineBox( ( temp_col ), dt_object = test_table << Bivariate( Y( column(i) ), X( :WW ) ) );

    lub << append( HListBox( VListBox( obj_bivariate ) ));

    );

    Heman Robinson wrote:

    This shows no problem in JMP 12, our current release. Michael, which release are you using?

    Thanks,

    Heman.

    Community Member

    Michael Allen wrote:

    Hi Herman, I am using JMP 11.1.1. This is the currently licensed version for us (though many are still using 9). Can you show which object you set as a report? Did you set the obj_bivariate to a report and then save that as interactive HTML? I tried that and did not get the interactive result so likely my syntax was just not correct (or it's not fully featured in 11.1.1?)

    Thanks for your quick response by the way. I appreciate that.

    Heman Robinson wrote:

    Michael, I added these two lines at the end of your script:

    lub << Save Interactive HTML( "Bivariate.html" );

    Open( "Bivariate.html" );

    Does this work for you?

    Heman.

    Community Member

    Michael Allen wrote:

    Thanks Heman, that works fine. I first tried saving the new window, which blocked any thing from being interactive. Saving the lineup box allows the interactivity. Oddly for me, the shortened script I sent to you will allow the panelbox to be interactive as well, but in my original script, the panelbox is not interactive. Only the lowest level, the lineup box, saves with interactivity. I will look to see what is different between my shortened script (in this blog) and the original script. Thanks a lot for the help. The interactivity of the web page is a tremendous help and a massive leap forward for manipulating large amounts of data. From a visualization standpoint, it's just saved me a lot of time trying to manually create what JMP is now doing.

    Heman Robinson wrote:

    Glad to help!

    Community Member

    Sait COPUROGLU wrote:

    As a Resort Hotel CRM Manager I always wanted to share all the comments and details published by the guests at internet in one graph and that is the interactive HTML power of JMP. Had something missing but thanks to Heman all fixed.

    Community Member

    Sait COPUROGLU wrote:

    Dear Heman,

    I would like to thank all html5 coding team who worked hard and still working hard to improve the interactive html reporting capabilities of JMP.

    If you were not so creative I would not be able to prepare such a report, otherwise impossible to share so many info in one screen.

    If I am accepted as one of the best Resort Hotel CRM Manager in reporting skills that's because I use the power of you and your team.

    THANK YOU !!!

    Community Member

    greg k wrote:

    It would be convenient if row legend entries could be used to select / highlight data.

    Community Member

    parthasarathy wrote:

    How would we create Interactive HTML or static HTML reports using Java? Can you please help to share any external tools or plugins needed to create such things?

    Heman Robinson wrote:

    Greg, we will do this eventually. Right now just have many other things are ahead of it in the pipeline. Thanks!

    Heman Robinson wrote:

    Parthsarathy,

    Both kinds of HTML reports can be created by submitting JSL commands to JMP.

    In theory, it is possible to do this from Java, but I have not seen it done. On Windows, there are some hooks available through COM and the RunCommand method on the Application object. But I am not a Windows programmer, so this is outside my expertise.

    Maybe someone else has done this. You might try submitting this question to the JMP User Community, where it would reach a wider audience:

    https://community.jmp.com/

    Thanks,

    Heman.

    Community Member

    greg k wrote:

    I am embedding the interactive HTML in frames on a summary page. Is it possible to use the JMP generated javascript to manipulate the plots (such as for series selection). is there a reference document for these functions?

    Heman Robinson wrote:

    Not yet. To support that, we would need to freeze our JavaScript API, in order to maintain backward compatibility with anything our customers write.

    It's a good question, and something we think about for the future. Right now, it is best that we polish and refine our API, make it as good as possible, before freezing and publishing it.

    HK
    Community Member

    Hello! I'm creating a report using the graph builder and I'm trying to publish it using interactive HTML. When hovering I get a message "The feature is not yet interactive". ( JMP12 ). This is my code-

     

    win=new window("E-Fit Gantt chart", h list box(

    //graph
    graph=Graph Builder(
    Size(1034, 685),
    Show Control Panel( 0 ),
    Automatic Recalc( 0 ),
    Variables(
    X( :STARTDATE ),
    X( :DUEDATE, Position( 1 ) ),
    Y(:TOOLNAME,Order By( :start_date, Descending)),
    color(:RESERVATIONTYPE)
    ),
    Elements(
    Bar(X( 1 ),X( 2 ),Y,legend (2),Bar Style( "Range" )),
    ),
    SendToReport(
    Dispatch(
    {},
    "STARTDATE",
    ScaleBox,
    {Min( Today()-43200 ), Max( Today()+43200 ), Interval( "Hour" ), Inc( 1 ),
    Minor Ticks( 3 ),Add Ref Line( Today(), Dashed, "Red", "Now", 2 ),Show Major Grid( 1 ), Show Minor Grid( 1 ),label row(Label Orientation( "Angled" ))
    }
    ),
    Dispatch(
    {},
    "TOOLNAME",
    ScaleBox,
    {Show Major Grid( 1 ), Show Minor Grid( 1 )}
    ),
    Dispatch( {}, "graph title", TextEditBox, {Set Text( "E-Fit Gantt Chart (Updates every 3 hours)" )} ),
    Dispatch( {}, "X title", TextEditBox, {Set Text( "Time" )} ),
    Dispatch( {}, "Y title", TextEditBox, {Set Text( "Tasks" )} )
    )
    );
    ), text box("Created by HK"));


    win<< save Interactive HTML ("E-Fit_Gantt.html");
    open("E-Fit_Gantt.html");

     

     

    Any insights? Thank you!

     

    Community Member

    Great job on continuing to improve the interactive HTML graphs in JMP as to be honest this is one reason I had started to move away from using the JMP graphs for reporting purposes.

     

    One thing that would be nice to be able to do would be to add links to other data sources from the graphs (e.g. using for example, on mouseover or on click javascript) to link to other websites or items etc. This would make the charts much more interactive. The example I am thinking of is to show yield maps for a semiconductor wafer when you hover over a data point for a lot or wafer.

     

    If you could build this into the HTML that would be great (it may need extra columns in the data table to point to the url for example or where the data or image is) but it does seem like the next step.

     

    Keep up the good work.

     

    Regards,

     

    Derek.

     

    P.S. I just remember what i actually came here to ask was whether you could chaneg the Font Size on the output as I have a pretty big font on a Variability graph in JMP but when it displays in the borwser it seems to be much smaller. Is there anywhere I can set the preferences for this or would it have to be changed manually in the file?Variability chart font Size comparison between interactive HTML and JMP 11 (Windows)Variability chart font Size comparison between interactive HTML and JMP 11 (Windows)