Table Of Contents

Vvidget ServerCommon Keys ► Templates

The dynamic graphs (besides the system ones) are generated starting from a template document made with Graph IDE. The path to that document is found in the following ways.

If the templates key appears in the Peer Visual input string then the template path is obtained from that key's value. If that value is an absolute path (starts with a slash) then that is the path. If that value is a relative path then the path is:

/Library/Vvidget/Configuration/Peer_Visual_Server/custom_templates

where custom_templates is the value of the templates key. If there is no templates key then the path is obtain from one of:

/Library/Vvidget/Configuration/Peer_Visual_Server/templates
/Library/Frameworks/Vvidget_PVS.framework/Resources/templates

Those directories are searched in the order shown above for the respective template name.

Those templates are Graph IDE documents and can be altered like any other document. You can add graphics, change fonts and colors, etc. but one thing you should not do is remove any graphic that exists by default in the template. You must also not change the widget name of graphics in the template.

When you modify the template then the modifications affect all dynamic graphics of that type. For example, you can modify the color table for a Pie Chart in which case all pie charts refering to that templates directory will conform to the new color table scheme. In that way you can set up an application that has a color scheme consistent with your own company's guidelines, for example, and also make many different guideline specifications using different custom templates directories.

The easiest way to make your own templates is to copy the directory:

/Library/Frameworks/Vvidget_PVS.framework/Resources/templates

To another directory such as one of:

<path within your application>/custom_templates
/Library/Vvidget/Configuration/Peer_Visual_Server/custom_templates

and modify the templates in the custom templates directory to suit your needs and refer to that directory as the value of the templates key in the Peer Visual input string.

There are two types of templates which are described here:

Base Template: The base template forms the basis of the static graphics. For example, it might contain a graph. You can modify any attribute of the base template; but, if needed, the attributes will be modified in order to satisfy the dynamic attributes of a requests.

Color Table Template: The color table template form the basis of the colors that vary with data index, for example line color or pie wedge color. The color attribute is extracted from the fill color of the rectangles in the color table template.



© Copyright 1993-2020 by VVimaging, Inc. (VVI); All Rights Reserved. Please email support@vvi.com with any comments you have concerning this documentation. See Legal for trademark and legal information.