AcpStyles
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 |
---|
ACP offers a wide variety of styles and options to control the look and functioning of the user interface. Many of these go beyond what is (currently) available in Desktop Analytica (DTA).
The easiest way to set these styles and options is to use the ACP Style Library, which you can load into your model within ACP from the hamburger menu. As you change styles in ACP, you can see their effects immediately.
If you use ACP Style Library you don't need to learn about the ACP Styles described below. The only reason to read the rest of this page is if you want to do something esoteric with AcpStyles, or use one of the few AcpStyles not accessible in the ACP_Style_Library.
You can also load the ACP Style Library in Analytica on the desktop from the Add Library...' option from the File menu. But, you won't be able to see the effects until you upload the model into ACP.
The styles and options are specified as keywords and tags in the AcpStyles attribute. Most styles and options apply to the whole Model and are specified in the AcpStyles attribute of the Model. When you want to specify special styles for individual modules or variables, you apply them to the ACPStyles attribute of the relevant object.
The easiest way to view and edit the AcpStyles attribute in Desktop Analytica is to use the Attribute panel. Select AcpStyles from the list of Attributes at the top of that panel. By default, AcpStyles is not shown in the Object window, so you first need to set it to be shown either with the right click menu in the Object window, or in the Attributes dialog.
The AcpStyles and their flags are not case sensitive.
When you put multiple flags in a AcpStyles attribute, put each flag on a separate line.
Model level styles
These styles apply to the entire model. You set them in the AcpStyles attribute for the Main Model. (They have no effect when set for a submodule.)
These Navigation_style options control how a user can view and access the module hierarchy:
Navigation_style: Outline
-- Show an expandable tree of modules on the left of the ACP window, similar to the outline view in desktop Analytica (showing only modules not other objects). This is the default style when you upload a model with no ACP styles set or no Acp styles library embedded, or if you have not yet set the Navigation style in the Acp styles library. A navigation flag is not needed for this style, but if you want to explicitly set this style you can addNavigation_style: Outline
to the top diagram's AcpStyles attribute.
Navigation_style: Top diagram only
-- Show only the top diagram, with no Outline and no tabs. This lets you make a simple web application with a single UI page.
For the next two 'Tabbed application' styles, each module in the main model becomes a tab. The order of the tabs follows the sequence of the module nodes in the main diagram, from left to right then top to bottom.
Navigation_style: Top_tabs
-- The main modules in the top model appear as a row of tabs across the top of the window. Click a tab to show the diagram for that module.Navigation_style: Side_tabs
-- The main modules in the top model appear as a column of tabs on the left of the window. Click a tab to show the diagram for that module.
We describe each in more detail below.
Outline Tree
By default, when using the Outline Navigation style, ACP shows an expandable outline tree of modules on the left hand side of the window, similar to the Outline view in Analytica on the desktop. This makes it easy to navigate a model with an extensive hierarchy of modules.
Show_outline: yes
-- The default, and unecessary for Outline Navigation style. It is generally redundant with other Navigation styles since the tabs or hierarchy show the same information, and the Outline takes up screen space. But you can add it to the top diagram's AcpStyles attribute if you want to show the Outline tree with other Navigation styles.
show_outline: no
-- When using the Acp Style library this is set by default for Navigation styles other than Outline. For small models, and most web apps, you may want to suppress the Outline view even when using the Outline Navigation style. Do this by inserting this text into the top diagram's AcpStyles attribute (See image below). (If a model has only one diagram, i.e. with no modules, it never shows the outline tree.)
Top Diagram Only
Set by adding navigation_style: top_diagram_only
to the AcpStyles attribute of the top diagram. The Styles library will set the flag show_outline:no
.
As an alternative to the Outline view, you can set the Navigation_style
to use use a tabbed interface which is often more convenient and familiar for web applications. By default, the main model appears as the first tab. You can change this with the style show_as_tab:no described below.
There are two tabbed styles, Top_tabs, with a row of tabs across the top; and Side_tabs with a column of tabs down the side. Top_tabs works well if you have up to 5 to 8 modules in the main diagram (tabs), depending on the length of their titles and the width of the ACP window. If you have a lot of modules, or they have long titles, it may be better to use Side_tabs.
'Top tabs or side tabs.' The first tab displays the top level diagram, and the remaining tabs display the modules present on the top level diagram of the model. (The modules will not display on the diagram, so you need to tweak your diagram for playing in ACP so that it looks right without these present).
navigation_style: top_tabs
-- This setting instructs ACP to use the 'Tabs across top' navigation style.
navigation_style: side_tabs
-- This setting instructs ACP to use the 'Side tabs' navigation style. Side tabs work better than top tabs when there are more module nodes present.
Toolbar Tabs
show_tabs: no
-- By default, with the Outline Navigation style. ACP shows navigation tabs for "Diagram", "Object", "Table", "Graph" along the top. Use this flag to hide those tabs. If you display the model inputs and outputs on the diagram -- using embedded tables and graphs on the diagram -- your users may not need those tabs. (You can also useshow_tabs: yes
to explicitly show the tabs in Outline and Top diagram only Navigation styles.)
Module hierarchy bar
Using tabbed navigation, ACP shows the model hierarchy in a bar at the top of the diagram by default. The model hierarchy header shows you where you are in a large model by listing the titles of the ancestor modules in which the current diagram is nested. You can click any ancestor to click up levels in the hierarchy. The Hierarchy Bar takes up much less screen real estate than the Outline Tree. ACP doesn't show the hierarchy bar when you are viewing a top level module, or if the module title is already in the selected tab.
Note that this setting is not based on a AcpStyles attribute, but rather on the Show module hierarchy check box in the model Preferences in Analytica. If you want to set this preference manually, with the model opened in Analytica, on the Edit menu, select Preference..., and check (or uncheck) the Show module hierarchy checkbox.
If you are using the ACP styles library, the Styles library will set this to the default setting automatically once you select a Navigation style. But you have the option of changing it if, for instance you want to show the Outline and the Hierarchy bar.
Auto zoom
auto_zoom_diagrams: yes
-- ACP automatically zooms the UI to fit the browser window -- the most constraining of width or height so it retains the aspect ratio of the diagram. Works with zoom in and zoom out. Auto Zoom will allow a model to go down to 50% of its size or up to 200% of its size. If the model does not fit at 50% size, the window will show scroll bars. This Acp style has no effect ifUse_top_diagram_size:Yes
is present, you can use only one or the other. You can also setauto_zoom_diagrams: no
which is the default.
Use top diagram size for all ACP windows
Use_top_diagram_size:Yes
-- Sets the size of all diagrams based on the size of the diagram window of the top level when the model was last viewed in Desktop Analytica (in non-maximized mode).Use_top_diagram_size:No
is the same as if the flag is not set, and is the default - the ACP diagram will use the entire browser window.
Show or hide the Dashboard Title and Model title
show_model_title: no
-- Hide the title of the model, which appears by default in the top Teal bar.
show_diagram_title: yes
-- Use to show the dashboard title at the top of the diagram. Orshow_diagram_title: no
to suppress the diagram title, but not really necessary because ACP does not show the diagram title by default.
Exclude diagram(s) from tabs
When using tabbed navigation, you can select those modules (from the top model diagram) that you want to appear as a tab in ACP. The default is for all to appear as tabs. You should use the Show modules as tabs choice menu in the ACP Navigation styles
section of the ACP Style Library if you want to set this flag,, and if you also want to hide the modules corresponding to these tabs hidden, so that the model viewer cannot see them.
- Optionally, Enter the text
Show_as_tab: no
in the AcpStyles attribute of the modules you don't wish to show as a tab. The modules themselves will not be hidden with this setting, only the tabs.
Tab color
When using Tabbed Navigation, you can use these flags to control how the color of the tabs display on your model in ACP. To use, add one of them to the AcpStyles attribute of the top level diagram of your model. They have no effect if added to a module other than the top diagram.
Tab_color: Default
The default. Non-selected tabs are bluish white. The selected tab uses the background color for that diagram.Tab_color: Background
All tabs use their diagram background color, whether selected or notTab_color: Node
The selected Tab uses its diagram background color; The other tabs use the color of their Module node (not their diagram background color). You can use this to change the color of the tabs by modifying their node color in an Analytica functions.
Model level styles for diagram nodes.
These model-level styles affect how all nodes are displayed in diagrams.
Node shadows and bevels
By default ACP displays nodes without shadows or bevels (for now) , so they look like this:
Set this flag to show a drop shadow behind each node, giving a kind of 3D effect:
node_drop_shadow: yes
Set this flag to display a bevel border for each node, giving another kind of 3-D effect:
bevel_node_border: yes
Node hover highlighting
By default, ACP displays a highlight -- a contrasting light rectangle behind a node -- when you move the cursor over the node:
You can switch it off by setting:
show_hover_highlight: No
Balloon Help
When you move the cursor over a node, ACP usually shows a "balloon" popup next to the node with the description of the node (if it has one) to help end users understand what its for, or what to enter for a user input. If the node has no description, the balloon help will not appear.
show_id_in_balloon: yes
Use this flag to show each node's identifier below its title in the balloon -- unless the identifier and title are identical (except for spaces which are replaced by underscores). This flag goes in the AcpStyles of the model and apply to all nodes in the model.show_hover_balloon: no
- Insert this flag in the AcpStyles for a node, to suppress display of its balloon.
ACP styles inheritance
This is the order of inheritance for Acpstyles below that apply to tables and graphs. Styles at a higher level take precedence over the lower precedence styles. (Inheritance doesn't apply to the ACPstyles described above that apply only at the Model level.)
- Variable (includes Tall nodes): Acpstyles applied to an individual variable will take precedence over all other styles. A variable with a style of
show_title:no
will not show the title, even if the model level style isshow_title:yes
, and if that node shows it's result in a frame node the variable style will override the frame node style. - Frame : An Acpstyle set for a frame node will affect any variable shown in that frame that doesn't have its own settings. These will also override any styles at the model level.
- Model ACP style defaults: Acpstyles that you can enter into the Acptyles attribute of the top diagram of your model. These will override the ACP defaults, and will be inherited by frame nodes and variables in the model that don't have their own Acpstyle.
- ACP style defaults for ACP: The default style ACP uses if you have no specific setting for that style. Eg for show_index_menus the default is fly-in and that is what will show if you don't enter a different show_index_menus: Acpstyle flag in the Acpstyle for the top diagram (model level) or for frame nodes or variables.
ACP Styles for tables and graphs
These styles affect how result graphs and tables are displayed in ACP, including in Tall nodes and ˞Frame nodes. They provide options not (yet) available in Desktop Analytica. ACP has default settings for these. You can override these settings for the entire model. You can also set them for ˞Frame nodes, which will apply to all results shown in the Frame and override the ACP and model level settings. And you can set these styles for individual variables, which will override any settings in the Model or Frame. As always, it's easiest to set the using the ACP_Style_library.
None of these styles apply to tab result views using the default Navigation_style: Outline.
Show or hide the Description
Show_description: nn
' Wherenn
is a number between 0 and 100, where it uses up to nn% of the vertical space available to show the description. If that isn't enough to show the entire description, it shows a vertical scroll bar. Setnn = 0
, if you don't want to show the description at all. Default if not mentioned, is one third, i.e.Show_description: 33
. This style can be used at the model level, for frame nodes or for individual nodes, but controls whether or not the Description shows in tall nodes or Frame nodes.
Show or hide the Object view icon
Object_in_Frame:yes/no
: With this style set, it shows an object view hover icon at the top right of a frame node or tall node when showing a graph or table view. Click this icon to show the object window view. The object view shows the Table and Graph hover icon to go back to the table or graph view. You can setObject_in_frame
style at either the top level of the model or in an individual frame node, which overrides the top level setting. When working with tall nodes, you can setObject_in_frame
style at the top level or in the original variable's ACP style setting, which overrides the top level setting.
Show or hide the title
Show_title
: SetShow_title: yes
to show orShow_title: no
to stop showing the Title and units of a selected variable. This style can be used at the model level, for frame nodes or for individual nodes, but controls whether or not the Title and units show in Frame nodes or tall nodes.
Show or hide the Graph-Table icon
Show_graph_table_icon:no
Hides the icon in the top right of a Result that lets you toggle between Graph and Table view. This applies to Frame nodes and tall nodes. This style can be used for the entire model, for frame nodes or for individual nodes . You set them in the AcpStyles attribute. Conversely, you can setShow_graph_table_icon:yes
. This is the default so not usually necessary at the model level, but can be used in a frame node or variable to override the model default or override a frame node setting.
By default, in ACP, as in desktop Analytica, the Uncertainty views menu appears above each result graph or table to let you select Mid to display its deterministic value, or Mean, Probability distribution, and other ways to display a probabilistic value.
You can override this default behavior with this ACP style for the entire model, Frame nodes, or for individual variables. The Uncertainty view menu is always present in tab result views.
Show_uncertainty_view: No
Never show the uncertainty menu in frame nodes or tall result nodes. Suitable for models with no probabilistic values, or if you want to fix a particular probabilistic view for each frame node or variable so that ACP users can't change it.Show_uncertainty_view: Yes
Always show the uncertainty menu even for variables that are not probabilistic, as in Desktop Analytica. This is the default and not normally necessary at the model level, but can be used to customize which frame nodes or variables to show the uncertainty view menu when the model level style is set toShow_uncertainty_view: No
Show_index_menus: Fly-in
By default (the same as if there is no show_index_menu: setting) the index menus are not shown in [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. If you click this it toggles - on or off - the visibility of the pivoters; allowing you to pivot the result table or graph and then close the pivoters to give you more space.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. Always present in tab result views.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_slicers
If you don't want to show any pivoters or slicers, you can set show_index_menus:Not_even_slicers.
Autocalc
In the ACP Style Library, Autocalc looks like a style you can set for a model, module or variable. It controls whether ACP evaluates each variable and shows its results automatically when you view a Diagram or tab showing the -- instead of the default Analytica behavior where the end user has to click on a Calc button to compute a result. With Autocalc on, a result in view also recomputes automatically when you change an input that influences it.
Autocalc is not actually an ACPStyle in ACP3. (It was in ACP1.) Autocalc is implemented using the Desktop Analytica functionality for Proactive_Evaluation.
Node Level Settings
These style flags and options apply to individual nodes (variables), rather than the model as a whole. So, you set these flags on the AcpStyles for selected objects (nodes).
Other node level flags
Prevent nodes from showing on the diagram
Show_Object: no
You can prevent nodes or modules from showing on the diagram of your model, by adding this flag to the AcpStyles attribute of the object you wish to hide. Once the model is shown in ACP the objects aren't visible.
Normally, ACP offers menus that appear when you press one of the three icons on the right of the top teal bar. These ACP styles let you modify these menus.
Hide the Save options
Hide_save_button: yes
Set this model ACP style option to exclude the 'Save this model' and 'Save model as...' from the ACP Close menu. It prevents users from saving over your models or saving other versions.- This style cannot currently be set from the ACP style library, since it would allow users to show the save and save as menu options and then save changes even if the modeler does not want to allow it.
These styles add menu items to or remove items from the help (?) menu if added to the AcpStyles of the top diagram of your model. For ACP installations on an intranet, these standard links may not be accessible. On the other hand you may want to offer a special help page for a particular model.
Remove_help_menu_options: Text
This style allows you to list one or more of the standard options to remove from the help (?) menu. Replace Text
with one or more of the following: ACP_Online_docs, Analytica_Q_A_forum, Tech_support
.
(Note: The help menu item Connection status
cannot currently be removed).
Add_help_menu_option: Text|URL
Adds another menu item, for example: Add_help_menu_option: How to use this model...|https://www.lumina.com
adds a menu item to the help (?) menu with the text "How to use this model..." and opens the link when clicked.
save_menu_download: yes
This AcpStyle is controlled by a setting in the AcpConfig.json file. On Lumina's acp.analytica.com server it is turned on.
With this AcpStyle in the model, "download this model"
is added to the close menu at the top right of the ACP GUI.
When set, this will allow anyone to download the model - even a reviewer, and even from an email invite.
save_menu_download: no
(default if not set)save_menu_download:Prompt_to_download_free
. This adds a popup dialog with a download link and prompt to download the Analytica free installer.
This style cannot be set from the ACP Style library, since it would allow reviewers to change the style and download the model, even if the modeler does not want to allow that.
Enable comment auto-refresher
Dpaine