Difference between revisions of "Embed table or graph with ACP"

 
(89 intermediate revisions by 8 users not shown)
Line 1: Line 1:
=== Embed_location (formerly Results on right) ===
+
[[Category: Analytica_Cloud_Platform]]
 +
{{ReleaseBar}}
  
During the first round of work on the USGBC's LEED Credit Calculator, we used a text node with the special idenitifer 'Results_on_right' to select a rectangle (the outline of the text node) where to display the edit table, result table, or graph of any selected node. It also displays the title and description of the selected variable at the top of the frame, and highlights the displayed node, so you know what you are looking at. This scheme turns out to be very convenient, since the author needs specify a single area, and the end user can quickly see the table or result of any node selected in a diagram or form containing inputs and outputs.  It is especially handy in AWP where the user is viewing the model via a Web browser, and cannot easily position multiple windows to view diagrams and results at the same time, as they can in DTA.  It would also be a convenient UI option for DTA, letting end users easily view input and output tables and graphs, without having to rearrange windows all the time.  
+
You can create user interfaces for [[Analytica Cloud Platform]] (ACP) that embed tables and graphs inside a Diagram window. This works better for web applications than the separate windows to show tables and graphs used in Analytica on the desktop.  There are two ways to do this:
 +
* [[#Tall input and output nodes]]:  You just resize a user input or output node to be tall enough so that it has space to show a table or graph. ACP will then automatically know to display the table or graph inside it.
 +
*  [[#Frame nodes]]: You create a  text nodes that you specify as a Frame for that Diagram (module) using the [[ACP Style Library]]. When the end user clicks a user input or output, or actually, any node in a Diagram, it shows the value of the node as a table or graph inside the Frame.  
  
It would be useful to expand the scheme to allow display of more than one edit table, result table or graph in the same Diagram view. For example, you might want to see a table and corresponding graph at the same time. Or see multiple graphs for comparison. 
+
__TOC__
For some models it may work better to arrange the diagram nodes to be wide, with the results below, or above, hence the name 'Results_on_right' may become misleading. Accordingly, here is an expanded spec, based on Fred's suggestions with a few tweaks:
 
  
=== Spec for something better for non-specific embedded frames ===
 
  
If we want to display edit tables, or results in multiple frames, AWP needs to know which frame to use for which node.
+
This lets users view and input tables and result tables and graphs all in a single user interface window -- unlike Analytica on the desktop in which each input table and result table or graph must be in its own window.
  
A. One option is (as in Fred's scheme below), you can specify an AWP_attrib for each node,
+
See [[ACP Style Library]] for guidance on how to set up your model to, for example, auto calculate the results when the user views a model in ACP (note: '''auto calculate is required''' for tall nodes).
containing '''FrameNode:TextNode1''' to specify that it use Textnode1 as the frame.
 
If you want to show two frames say in a diagram for Module M, you could set one, say Textnode1 as the default
 
by specifying
 
  Module M
 
  Awp_Attrib: FrameNode:TextNode1
 
  
By default any node in M will use Textnode1 as its frame.
+
There are two ways to render a table or graph on the diagram.
For selected nodes, you could add the attribute to those Objects:
 
  Awp_Attrib: FrameNode:TextNode2
 
and they will use a second TextNode2 as their frame.
 
As Fred points out, it is tricky but possible for a user to specify an attribute for
 
an alias, input or output node -- rather than its original node.
 
Generally, for each module, you'd only want to specify a frame in that diagram,
 
so inheriting a frame node from a parent diagram would probably not be that useful.
 
  
B. Another option would be to use cycle through any available frames -- the first node
+
The second way to render a table or graph is to [[#Frame nodes|create a Frame]], which serves as a the location where a User input node or User output node will render the table or graph for the user.
clicked would use the first frame. The second uses the second frame. If there are only
 
two frames in the diagram, the third node will reuse the first frame. And so on.
 
Normally, the author would lay out two or more frames of the same size.
 
  
Pros:
+
== Tall nodes ==
* The user can compare two or more input or output tables or graphs just by clicking on them.
 
* The user controls which node edit tables or results are shown at the same time (subject to
 
the number of frames available) -- i.e. the last n nodes clicked on display in the n frames.
 
* The author need only define one or more frames for a module -- no need to define frames
 
separately in the AWP_Attrib for any nodes.
 
  
Cons:
+
The simplest way to embed a user input or output in a diagram in ACP is to make it a '''Tall node''' -- i.e. to resize the node
* The author can't control which input or output displays in which frame.  
+
in Analytica so that its tall enough to show the table or graph (at least 4 times taller than the default size). The default height of a user input or output node is 26 pixels -- if it uses the default 11-point font size. So, "tall" means more than 104 pixels -- more for a larger font. It may look a little odd in desktop Analytica, which just shows the Edit table, Calc, or Result button in the tall node. But, when you load the model into ACP, it automatically shows the edit table for an input node. For an output node, it displays the result as a table or graph (usually in whatever form it was last saved in Analytica).
* For that reason, it would be usual to make all the frames the same size. There's no way for the author to control that a small edit table, say, go in a small frame, and large graph, say, in a large frame.
 
  
(For this multiple frame scenario, I think it would also be easy to add the functionality that a user could click on a node, and then drag the mouse over to the frame, and then display the table or graph for that node in that frameDon't know if this functionality is really useful, but it is appealing IMHO. [[User:Fredbrunt|Fredbrunt]])
+
ACP sizes a graph automatically to fit the frame (node size) you have specifiedFor a table larger than the node size, scroll bars let you see all parts of the table.  
  
Option C: If we combine Option B with the embedded tall input/output node scheme, the author can
+
ACP uses the table or graph format last used in the version of the model you saved in Desktop Analytica. So, if you want ACP to show a graph (not a table), you should view it that way -- and set any other table or graph options you want -- before you save the model. Similarly, for an Edit table, choose the pivot (which index is rows and which columns) before you save the model. ACP also uses the uncertainty view -- [[mid]], [[mean]], [[statistics]], [[pdf]], [[cdf]], or [[sample]] -- that you last viewed in DTA. (For experts, you can find this information in the ValueState attribute for the original node.)
use the tall node scheme if they want to always show a particular node table or graph in
 
its own (custom-sized and located frame). If there is not enough room for every node to have
 
its own frame (the usual case), the rest can share common frames, as in Option B.
 
  
=== What is displayed? ===
+
=== Examples  ===
  
'''Title and description:''' It displays the title of the variable is displayed in bold at the top, with description below it. If Description contains more text than will fit in the top 1/3 of the framenode, it shows only what will fit in the top 1/3, with a scroller to see more.
+
In the Car cost.ana model from the Analytica Tutorial [[Example Models and Libraries]], define a [[User output nodes|User output node]] from the Total cost Objective.
  
When Diagram window is opened, and no node has been selected, it shows the title and description of any Frame node, which is useful for initial explanation of the diagram/module and how to use it. (That's what we did in the USGBC model.)
+
{{CalloutAnnotationBlock|[[File:ACP_Create_User_Output_node.png]]|
 +
{{CalloutAnnotation|Right click the '''Total cost''' Objective.|v=20|pt=24,42|n=1}}
 +
{{CalloutAnnotation|Select ''Make User Output node'' from the options.|v=100|pt=85,245|n=+}}
 +
}}
  
'''Font size:''' It uses the font style and size specified for the frame node with the title in bold -- initially the title and description specified for the frame, and then the title and description for the selected variable.
+
Re-position and resize the resulting User output node to a size corresponding to how large the graph will be when rendered in ACP.
It should allow web links (as in other descriptions) to appear in the description text.
 
  
If users clicks twice on a variable node (not double-click) and there are at least two frames, it shows the default (graph or table) view in the first, and the other (table or graph) in the other. Alternatively, we can label a framenode, as "Graph_over_table" and it shows the graph and table in the same frame node, with only one title and description at the top. It's up to the author must make sure it is large enough.  
+
{{CalloutAnnotationBlock|[[File:ACP_make_tall_node.png]]|
 +
{{CalloutAnnotation|Resize the node by clicking and dragging the bottom right handle.|v=200|pt=650,404|n=+}}
 +
}}
  
'''FrameOptions:'''   
+
Once you publish to cloud and play the model, here's the result displayed on the diagram ACP:
* Show_title [on by default]
+
 
* Show_description:nn : Where nn is a number between 0 and 100, where it uses up to nn% of the vertical space available to show the description, showing vertical scroller if that isn't enough to show the entire description. if nn=0, it shows no description (and no scroller). Default if not mentioned, is "Show_description:30"
+
:[[File:Embedded result graph in awp.png]]
* Graph_or_table: Shows whichever form was last saved in the model [default]. Shows a button as in DTA, allowing user to toggle between graph and table.  
+
 
* Graph: Shows graph
+
==== Tall nodes for Web application ====
* Table: Shows table
+
 
* Graph_over_table: Graph above table.
+
Here's a second example, with two different User output nodes and three User input nodes.
* Table_over_graph: Table above graph.
+
 
 +
:[[File:User_Output_nodes_for_ACP.png|600px]]
 +
 
 +
In the ACP Style Library, the settings for Web application are as follows:
 +
 
 +
:[[File:ACP_Web_application_style.png]]
 +
 
 +
Here's the result displayed in a ACP model designed for Web application:
 +
 
 +
:[[File:User_Output_nodes_for_ACP_web.png]]
 +
 
 +
'''AcpStyles flags in tall output nodes'''
 +
 
 +
In the previous screenshots, the graph on the left does not have any Index selection options, while the one on the right does. For the graph on the left, the AcpStyles attribute for that Variable includes the flag <code>Show_index_menus:no</code>.
 +
 
 +
:[[Image:ACP_Cloud_Player_Style_no_index.png]]
 +
 
 +
== Frame nodes  ==
 +
 
 +
[[Frame_node|The main wiki article on Frame nodes]]
 +
 
 +
A second way to embed tables and graphs in a diagram uses Frames. This is very convenient, since you need make only one Frame node, usually to the right of the user interface or diagram, and it will show a table or graph for any node you click.  A Frame is a rectangular area defined by a  that will display the edit table for any input node you click, or a result table or graph for any output node you click. In fact, it also shows a result table or graph for any variable node that you click in an influence diagram. (If the variable has a single atomic value, it will show it in the user input or output node, not in the Frame node.)
 +
 
 +
{{Release||5.4|Note that in Desktop Analytica 6.0 the [[Frame node]] object was introduced, which simplifies the process for creating framenodes. You simply drag a text node of the desired size on to the diagram and set its object class to [[frame node|framenode]]. ACP will detect this automatically.
 +
 
 +
In previous builds (and optionally in 6.0) , you add a [[Text nodes|Text node]] to the diagram and set the acpstyle as described here to include this text node as a module text node.}}
 +
{{Release|6.0||To create a Frame Node, you simply drag a text node of the desired size on to the diagram and set its object class to [[frame node|framenode]]. ACP will detect this automatically.}}
 +
 
 +
=== What is displayed?  ===
 +
 
 +
ACP  resizes a result graph fit into the frame.  You may need make sure that the frame node is large enough to display the entire graph in a legible way, depending font size, and its complexity. If an edit table or result table is too large to fit, ACP will show scroll bars to let you scroll around the table.
 +
 
 +
'''Title, Units and description:''' Normally ACP shows the node's title and units (If any) in bold at the top of the frame, followed by its description (if any). But, if the Description contains more text than will fit in the top third of the frame, it shows only what will fit in the top third, with a scrollbar to see more.
 +
 
 +
When a Diagram first opens in ACP (and no node has been selected), each frame node shows its own title, and description (if any). This is a useful place to put an introductory explanation of this diagram and how to use it.
 +
 
 +
'''Font size:''' It uses the font style and size specified for the frame node with the title in bold -- initially the title and description specified for the frame, and then the title and description for the selected variable.
 +
 
 +
It should allow web links (as in other descriptions) to appear in the description text.
 +
 
 +
===ACP styles for Embedded Tall nodes or Frame nodes===
 +
 
 +
The following ''ACP styles'' can be used in tall output nodes and in frame nodes.
 +
 
 +
*<code>Show_title</code>: Set <code>Show_title: yes</code> to show or <code>Show_title: no</code> tostop showing the Title and units of a selected variable.
 +
*<code>Show_description: nn</code>: Where <code>nn</code> is a number between 0 and 100, where it uses up to nn% of the vertical space available to show the description, showing vertical scroller if that isn't enough to show the entire description. Set <code>nn = 0</code>, if you don't want to show the description at all (and no scroller). Default if not mentioned, is one third, i.e. <code>Show_description: 33</code>
 +
*<code>Show_graph_table_icon:</code> No/ yes
 +
*<code>Show_uncertainty_view:</code> no/yes
 +
*<code>Show_Index_menus:</code>
 +
**By default (no show_index_menu: setting) the index menus for are not shown in [[frame nodes]] or tall nodes (but slicers are), since often the modeler has already chosen the pivot they want to use. And because these menus take up valuable screen space. But if you hover over the frame node (or tall node) there is a fly-in pivoter control.
 +
**show_index_menus:yes If you do want to allow users to be able to pivot or change the slice of the table or graph, without using the fly-in, then use use show_index_menus:yes.
 +
**show_index_menus:no If show_index_menus:no is set then the indexes and pivoters will not show and there is no fly-in, but the slicers will still be present.
 +
**show_index_menus:Not_even_slicersIf you don't want to show any pivoters or slicers, you can set show_index_menus:Not_even_slicers.
 +
 
 +
<!--[DP]Not incorporated into ACP3 and I don't think they will be in the near future.
 +
*<code>Graph_only</code>: Shows graph (even if model author last saved result as a table)
 +
*<code>Table_only:</code> Shows table (even if model author last saved result as a graph)
 +
*<code>Graph_over_table</code>: Show graph above table in the same Frame.  
 +
*<code>Table_over_graph:</code> Table above graph in the same Frame.
 +
 
 +
Example, to have the result graph show over the result table, and to allow the description to use up to 50% of the frame node area you would specify the following:
 +
 
 +
:<code>Text Textnode1</code>
 +
:<code>AcpStyles :  Show_description: 50 </code>
 +
-->
 +
<!--not in ACP3 yet
 +
Note that if the graph of a particular variable is not graphically meaningful (e.g. the result is scalar or a list of labels) it will show the result as a table instead of a graph.
 +
-->
 +
 
 +
=== Examples ===
 +
 
 +
==== Single Frame node ====
 +
 
 +
To create a [[Frame node|Frame_node]], drag a text node to the diagram and make it large enough to hold graphs and tables. {{Release|6.0||Then edit its Class attribute and change its class to be FrameNode
 +
:[[image:Creating a FrameNode.png]]}}
 +
 
 +
Analytica initializes the node with a long cryptic identifier starting with 'Te' and end with a string of numbers. You can rename the text node Identifiers to make it easier to review your Frames. For example, this changes 'Te1510871050' to a more meaningful 'FrameNode1':
 +
 
 +
{{CalloutAnnotationBlock|[[File:ACP_change_textnode_identifier.png]]|
 +
{{CalloutAnnotation|Type '''''FrameNode1''''' to rename.|v=30|pt=6,51|n=1}}
 +
}}
 +
 
 +
{{Release||5.4|Next, you need to specify which text nodes are Frame nodes by naming them in the [[AcpStyles|AcpStyles ]] attribute of ''the parent model or module'', i.e. not of the text node itself. In this example, we specify <code>FrameNode1</code> as a <code>Framenode</code> in our Module.
 +
 
 +
{{CalloutAnnotationBlock|[[File:ACP define framenode.png]]|
 +
{{CalloutAnnotation|Click somewhere in the grey diagram background.|v=70|pt=288,195|n=+}}
 +
{{CalloutAnnotation|Select ''Acp Styles '' from the Attributed drop down.|v=210|pt=294,388|n=+|path=r/}}
 +
{{CalloutAnnotation|Type '''''Framenode: FrameNode1'''''.|v=320|pt=3,410|n=+}}
 +
}}
 +
}}
 +
 
 +
Publish the model to cloud to (follow the [[Tutorial: Sharing a model with ACP|tutorial]] for instructions on how to do this) to test the Edit table and Graph functionality in the model.
 +
 
 +
{{CalloutAnnotationBlock|[[File:ACP Frame edit table.png]]|
 +
{{CalloutAnnotation|Click ''Table'' to display the Edit table in the Frame.|v=70|pt=327,87|path=r/|n=+}}
 +
{{CalloutAnnotation|Editable table|Type=Bare|v=258|pt=434,268}}
 +
}}
 +
 
 +
{{CalloutAnnotationBlock|[[File:ACP Frame results.png]]|
 +
{{CalloutAnnotation|Click ''Result'' to display the graph in the Frame.|v=70|pt=333,167|path=r/|n=+}}
 +
{{CalloutAnnotation|Result graph|Type=Bare|v=258|pt=434,268}}
 +
}}
 +
 
 +
==== Multiple Frames ====
 +
 
 +
If a Diagram has more than one [[Frame node]], when you click a user input or output, it reuses the Frame with the oldest previous table or graph that was displayed and replaces it with the new result. {{Release||5.4|To specify multiple Frames in a Diagram, you list all Text nodes that will serve as Frames in AC, seperated by &amp;. Here is how you specify two Frames in a Diagram in a generic <code>Module M</code>:
 +
 
 +
::<code>AcpStyles: Framenode:FrameNode1 &amp; FrameNode2</code>
 +
 
 +
In this case, the }}{{Release|6.0||Suppose you create two frame nodes in the same diagram and rename them to be <code>FrameNode1</code> and <code>FrameNode2</code>. The }} first User input or output node clicked will fill <code>FrameNode1</code> and the next one will fill <code>FrameNode2</code> because that's the order in which they were {{Release||5.4|specified}}{{Release|6.0||created}}. Each time you click on a User input or output node, the corresponding table or graph will display in the Frame whose contents was displayed the longest ago. Thus, as you click on different nodes, it cycles through the Frames. In this way, you can see and compare edit tables or results from multiple nodes all in the same diagram window.
 +
 
 +
''*Once you evaluate a variable, if that result is present in a frame node, if you evaluate the same variable again the result will stay in the same frame node.''
 +
 
 +
====Atomic results in output nodes====
 +
When a result is atomic, the result will be displayed directly in the output node rather than in a frame node.
 +
 
 +
 
 +
<!--
 +
==== Multiple Frames corresponding to specific variables ====
 +
 
 +
Alternatively, you can specify that you want specific nodes displayed in specific frames. In this example, let's say you have a diagram with two nodes with edit tables, <code>Inputdata1</code> and <code>Inputdata2</code>. And you have two nodes which show graphical results, called <code>Result1</code> and <code>Result2</code>. You might specify one frame node, <code>Textnode1</code>, for handling the two inputs for the two edit tables and another Frame node, <code>TextNode2</code>, for displaying the result graph one at a time. In this case, you specify which Framenode to use in the [[AcpStyles|AcpStyles ]] of each variable, rather than in '''AcpStyles ''' of the parent module:
 +
 
 +
<pre style="background:white; border:white; margin-left: 1em;">
 +
Variable Inputdata1
 +
AcpStyles : FrameNode: TextNode1
 +
 
 +
Variable Inputdata2
 +
AcpStyles : FrameNode: TextNode1
 +
 
 +
Variable Result1
 +
AcpStyles : FrameNode: TextNode2
 +
 
 +
Variable Result2
 +
AcpStyles : FrameNode: TextNode2
 +
</pre>
 +
 
 +
==== Using two frame nodes, where one is a module level frame node ====
 +
 
 +
Suppose your diagram has two input tables and five output nodes to show results. In this case, you decide you want to use one frame to display the two inputs, and another frame for results. In this case, you could set the [[AcpStyles|AcpStyles ]] for the two input tables, and set a module level '''AcpStyles ''' which will be used by any other node, in this case &nbsp;output nodes.
 +
 
 +
<pre style="background:white; border:white; margin-left: 1em;">
 +
Variable Inputdata1
 +
AcpStyles : FrameNode: TextNode1
 +
 
 +
Variable Inputdata2
 +
AcpStyles : FrameNode: TextNode1
 +
 
 +
Module M
 +
AcpStyles : FrameNode: TextNode2
 +
</pre>
 +
 
 +
Since the output nodes do not have an '''AcpStyles ''' specifying a frame, they use the frame specified in the module's '''AcpStyles '''.
 +
 
 +
 
 +
==== Text Area Input Node  ====
 +
 
 +
In ACP 2, if you make an input node that contains a single (atomic) text value tall (in DTA), ACP will insert a multi-line text box. This lets users enter multi-line input -- e.g. from copying and pasting multiple lines of text. A standard single line text box will not support multiline text input.
 +
 
 +
If you would like this feature or a similar feature to use in your model in ACP 3, let us know, and we'll probably implement it for you.  E.g. Email us at [mailto:acp@lumina.com acp@lumina.com].
 +
 
 +
-->
 +
 
 +
==See Also==
 +
* [[Analytica Cloud Platform]]
 +
* [[AcpStyles]]

Latest revision as of 09:45, 15 November 2024



Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5  •  6.6


You can create user interfaces for Analytica Cloud Platform (ACP) that embed tables and graphs inside a Diagram window. This works better for web applications than the separate windows to show tables and graphs used in Analytica on the desktop. There are two ways to do this:

  • #Tall input and output nodes: You just resize a user input or output node to be tall enough so that it has space to show a table or graph. ACP will then automatically know to display the table or graph inside it.
  • #Frame nodes: You create a text nodes that you specify as a Frame for that Diagram (module) using the ACP Style Library. When the end user clicks a user input or output, or actually, any node in a Diagram, it shows the value of the node as a table or graph inside the Frame.


This lets users view and input tables and result tables and graphs all in a single user interface window -- unlike Analytica on the desktop in which each input table and result table or graph must be in its own window.

See ACP Style Library for guidance on how to set up your model to, for example, auto calculate the results when the user views a model in ACP (note: auto calculate is required for tall nodes).

There are two ways to render a table or graph on the diagram.

The second way to render a table or graph is to create a Frame, which serves as a the location where a User input node or User output node will render the table or graph for the user.

Tall nodes

The simplest way to embed a user input or output in a diagram in ACP is to make it a Tall node -- i.e. to resize the node in Analytica so that its tall enough to show the table or graph (at least 4 times taller than the default size). The default height of a user input or output node is 26 pixels -- if it uses the default 11-point font size. So, "tall" means more than 104 pixels -- more for a larger font. It may look a little odd in desktop Analytica, which just shows the Edit table, Calc, or Result button in the tall node. But, when you load the model into ACP, it automatically shows the edit table for an input node. For an output node, it displays the result as a table or graph (usually in whatever form it was last saved in Analytica).

ACP sizes a graph automatically to fit the frame (node size) you have specified. For a table larger than the node size, scroll bars let you see all parts of the table.

ACP uses the table or graph format last used in the version of the model you saved in Desktop Analytica. So, if you want ACP to show a graph (not a table), you should view it that way -- and set any other table or graph options you want -- before you save the model. Similarly, for an Edit table, choose the pivot (which index is rows and which columns) before you save the model. ACP also uses the uncertainty view -- mid, mean, statistics, pdf, cdf, or sample -- that you last viewed in DTA. (For experts, you can find this information in the ValueState attribute for the original node.)

Examples

In the Car cost.ana model from the Analytica Tutorial Example Models and Libraries, define a User output node from the Total cost Objective.


ACP Create User Output node.png


1. Right click the Total cost Objective.


2. Select Make User Output node from the options.

Re-position and resize the resulting User output node to a size corresponding to how large the graph will be when rendered in ACP.


ACP make tall node.png


3. Resize the node by clicking and dragging the bottom right handle.

Once you publish to cloud and play the model, here's the result displayed on the diagram ACP:

Embedded result graph in awp.png

Tall nodes for Web application

Here's a second example, with two different User output nodes and three User input nodes.

User Output nodes for ACP.png

In the ACP Style Library, the settings for Web application are as follows:

ACP Web application style.png

Here's the result displayed in a ACP model designed for Web application:

User Output nodes for ACP web.png

AcpStyles flags in tall output nodes

In the previous screenshots, the graph on the left does not have any Index selection options, while the one on the right does. For the graph on the left, the AcpStyles attribute for that Variable includes the flag Show_index_menus:no.

ACP Cloud Player Style no index.png

Frame nodes

The main wiki article on Frame nodes

A second way to embed tables and graphs in a diagram uses Frames. This is very convenient, since you need make only one Frame node, usually to the right of the user interface or diagram, and it will show a table or graph for any node you click. A Frame is a rectangular area defined by a that will display the edit table for any input node you click, or a result table or graph for any output node you click. In fact, it also shows a result table or graph for any variable node that you click in an influence diagram. (If the variable has a single atomic value, it will show it in the user input or output node, not in the Frame node.)


To create a Frame Node, you simply drag a text node of the desired size on to the diagram and set its object class to framenode. ACP will detect this automatically.

What is displayed?

ACP resizes a result graph fit into the frame. You may need make sure that the frame node is large enough to display the entire graph in a legible way, depending font size, and its complexity. If an edit table or result table is too large to fit, ACP will show scroll bars to let you scroll around the table.

Title, Units and description: Normally ACP shows the node's title and units (If any) in bold at the top of the frame, followed by its description (if any). But, if the Description contains more text than will fit in the top third of the frame, it shows only what will fit in the top third, with a scrollbar to see more.

When a Diagram first opens in ACP (and no node has been selected), each frame node shows its own title, and description (if any). This is a useful place to put an introductory explanation of this diagram and how to use it.

Font size: It uses the font style and size specified for the frame node with the title in bold -- initially the title and description specified for the frame, and then the title and description for the selected variable.

It should allow web links (as in other descriptions) to appear in the description text.

ACP styles for Embedded Tall nodes or Frame nodes

The following ACP styles can be used in tall output nodes and in frame nodes.

  • Show_title: Set Show_title: yes to show or Show_title: no tostop showing the Title and units of a selected variable.
  • Show_description: nn: Where nn is a number between 0 and 100, where it uses up to nn% of the vertical space available to show the description, showing vertical scroller if that isn't enough to show the entire description. Set nn = 0, if you don't want to show the description at all (and no scroller). Default if not mentioned, is one third, i.e. Show_description: 33
  • Show_graph_table_icon: No/ yes
  • Show_uncertainty_view: no/yes
  • Show_Index_menus:
    • By default (no show_index_menu: setting) the index menus for are not shown in frame nodes or tall nodes (but slicers are), since often the modeler has already chosen the pivot they want to use. And because these menus take up valuable screen space. But if you hover over the frame node (or tall node) there is a fly-in pivoter control.
    • show_index_menus:yes If you do want to allow users to be able to pivot or change the slice of the table or graph, without using the fly-in, then use use show_index_menus:yes.
    • show_index_menus:no If show_index_menus:no is set then the indexes and pivoters will not show and there is no fly-in, but the slicers will still be present.
    • show_index_menus:Not_even_slicersIf you don't want to show any pivoters or slicers, you can set show_index_menus:Not_even_slicers.


Examples

Single Frame node

To create a Frame_node, drag a text node to the diagram and make it large enough to hold graphs and tables. Then edit its Class attribute and change its class to be FrameNode

Creating a FrameNode.png

Analytica initializes the node with a long cryptic identifier starting with 'Te' and end with a string of numbers. You can rename the text node Identifiers to make it easier to review your Frames. For example, this changes 'Te1510871050' to a more meaningful 'FrameNode1':


ACP change textnode identifier.png


1. Type FrameNode1 to rename.


Publish the model to cloud to (follow the tutorial for instructions on how to do this) to test the Edit table and Graph functionality in the model.


ACP Frame edit table.png


2. Click Table to display the Edit table in the Frame.


Editable table


ACP Frame results.png


3. Click Result to display the graph in the Frame.


Result graph

Multiple Frames

If a Diagram has more than one Frame node, when you click a user input or output, it reuses the Frame with the oldest previous table or graph that was displayed and replaces it with the new result. Suppose you create two frame nodes in the same diagram and rename them to be FrameNode1 and FrameNode2. The first User input or output node clicked will fill FrameNode1 and the next one will fill FrameNode2 because that's the order in which they were created. Each time you click on a User input or output node, the corresponding table or graph will display in the Frame whose contents was displayed the longest ago. Thus, as you click on different nodes, it cycles through the Frames. In this way, you can see and compare edit tables or results from multiple nodes all in the same diagram window.

*Once you evaluate a variable, if that result is present in a frame node, if you evaluate the same variable again the result will stay in the same frame node.

Atomic results in output nodes

When a result is atomic, the result will be displayed directly in the output node rather than in a frame node.


See Also

Comments


You are not allowed to post comments.