# Chart Control

> Source: https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart

The Chart control tool is used to create more advanced two- and three-dimensional Chart illustrations in your graphical application. When defining a Chart, you can select from several different Chart types: *Area, Bar, Column, Line, Pie, Ribbon, Scatter, Stack, Donut* and *Gauge*. For examples of each of these Chart types, see **[Chart Formats](https://manual.pvxplus.com/charting-alternatives-in-pxplus/chart-formats/overview)**.

Note:  
Use the [Image](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/image-control/image) tool to insert images created outside of NOMADS and PxPlus. For more simplistic drawings, use the [Shape](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/shape-control/shape) control tool.

To learn about using Plus Charts, RGraphCharts, and Google Interactive Charts (using the Google Visualization API) as options to replace the internal PxPlus Chart control, see **[Charting Alternatives in PxPlus](https://manual.pvxplus.com/charting-alternatives-in-pxplus/introduction)**.

For information on how you can define simple Charts based on the columns of a List Box, Grid or Query, see **[NOMADS AutoChart](https://manual.pvxplus.com/nomads-autochart/introduction)**.

To learn how you can use a Query-based AutoChart definition to load a ***Smart Chart*** control, see **[Defining Smart Controls](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/defining-smart-controls)**.

To learn about creating images of Charts for display on dashboards, on your website, or as part of your application, see **[Chart Images Generation](https://manual.pvxplus.com/chart-images-generation/introduction)**.

For information on the utilities to use when working with Chart images, see **[Chart Image Utilities](https://manual.pvxplus.com/chart-image-utilities/introduction)**.

## Drawing a Chart

To draw a Chart object on your panel, select the Chart control tool from the **[Controls Toolbar](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/drawing-and-modifying-panel-objects/controls-toolbox)**. Hold down the left mouse button and drag the mouse to create a rectangle to the desired size. Release the mouse button to create the new object.

For making other adjustments, see **[Modifying Objects](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/drawing-and-modifying-panel-objects/modifying-objects)**.

To define the specific attributes for the new control, see **[Chart Properties](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#chartproperties)** and **[Defining a Chart](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#definingachart)**.

## Chart Properties

When creating or editing a *Chart* control, the **Chart Properties** dialogue (pictured below using the **[Folder Style](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/folder-style/using-the-folder-style)** version of the NOMADS Panel Designer) is displayed:

![](https://manual.pvxplus.com/migration-assets/92c98043bc5a9c103863053a2053cc9d7567267bea63f547c8257c446bb9e113.jpg)

This dialogue is divided into the following tabbed panels for viewing and/or changing Chart properties: **[Display](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#display)**, **[Font/Color](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#font)**, **[Attributes](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#attributes)**, **[Logic](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#logic)** and **[User Aids](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#useraids)**.

|  |  |
| --- | --- |
| *Name* | Unique name of the Chart object (NOMADS provides a default). Naming conventions for variables apply. Click the Browse Library button to copy parameters from an existing object (via the **[Library Browse](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/drawing-and-modifying-panel-objects/library-browse)** dialogue).<br>Note:  <br>When a new control name is entered, it will be checked against the [Reserved Words](https://manual.pvxplus.com/reserved-words) list to determine if it is restricted for use as a NOMADS control name. If it is found, a warning message will display.  <br>  <br>(User Reserved Words Maintenance was added in PxPlus 2020.) |
| *Smart Load* | Select this button to set up a Smart control that will self-load based on a query definition. See **[Smart Controls](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/overview)**.<br>*(The Smart Load button was added in PxPlus 2019.)* |
| **Display** |  |
| **Properties** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Chart Type* \| Determines the type of Chart to be created. Click the drop-down arrow for a list of selections: *Area, Bar, Column, Line, Pie, Ribbon, Scatter, Stack, Donut* and *Gauge*. \|<br>\| *3D Effect* \| Visual mode for Chart. \|<br>\| *Chart Brand* \| Select the brand of Chart to display (see **[Charting Alternatives in PxPlus](https://manual.pvxplus.com/charting-alternatives-in-pxplus/introduction)**):<br>*Default*<br>Chart brand specified in **[%NOMADS'Chart$](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#chart)**. If **%NOMADS'Chart$** is not set, the default will be "plus" charts. See **[Plus Charts](https://manual.pvxplus.com/charting-alternatives-in-pxplus/introduction#pluscharts)**.<br>*(Support to default to Plus Charts when %NOMADS'Chart$ is not set was added in PxPlus 2024 Update 1.)*<br>*Plus*<br>Image-based (NOMADS) or HTML-base (iNomads) Charts from PVX Plus<br>*RGraph*<br>HTML-based Charts from RGraph<br>*Google*<br>Uses the Google Visualization API (requires Internet access)<br>*Native*<br>Internal PVX Plus Chart control \|<br>\| *Title 1* \| Primary Chart title (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *Title 2* \| Secondary Chart title (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *Footer* \| Footer title for the Chart (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *Bitmap Path* \| Bitmap for the Chart background (*Fixed* value or string *Expression*). Specify embedded (e.g. !Stop) or external file (e.g. C:\\windows\\clouds.bmp). For available images, see **[Recognized File Types](https://manual.pvxplus.com/pxplus-user-guide/appendix-of-miscellaneous-topics/handling-images-and-icons/overview#Mark2)**. \|<br>*(The Chart Brand option was added in PxPlus 2019.)* |
| **Position** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Column* \| Starting column for top left corner of the control - numeric expression. Format mask is #0.00. Valid entries are 0 to 620. \|<br>\| *Line* \| Starting line for top left corner of the control - numeric expression. Format mask is #0.00. Valid entries are 0 to 255. \|<br>*(Support for increased Column and Line maximums was added in PxPlus 2021.)* |
| **Size** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Width* \| Width of control in number of columns - numeric expression. Format mask is #0.00. Valid entries are 0 to 620. \|<br>\| *Height* \| Height of control in number of lines - numeric expression. Format mask is #0.00. Valid entries are 0 to 255. \|<br>*(Support for increased Width and Height maximums was added in PxPlus 2021.)* |
| **Attributes** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Initially Hidden* \| Control is not displayed but is accessible programmatically. \|<br>\| *Initially Disabled* \| Control region is grayed out and is not accessible to the user for input. The control is accessible programmatically. \|<br>\| *Borderless* \| Control is drawn with no border or frame. \|<br>\| *Bitmap Position* \| Controls the position and appearance of the bitmap. Select from pre-set selections or enter coordinates (***syntax:*** *X:Y:columns:lines*); e.g. 1:2:10:20. \|<br>\| *Column Separator* \| Delimiter character. Click the drop-down arrow for a list of selections. \| |
| **User Tag Field** | For controls, data/tag field that can be used to pass information on such things as formatting, error messages or validation rules. Field contents are placed in a variable using the control name with a .TAG$ extension. |
| **Font/Color** |  |
| **Font Specification** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Font  <br>Size* \| Click the drop-down arrow for a list of selections. \| |
| **Color** | \|  \|  \|<br>\| --- \| --- \|<br>\| For each of the following **Color** options, click the Query button to access **[Color Selections](https://manual.pvxplus.com/nomads-graphical-application/appendix/color-selections)**. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.  <br>  <br>*(The Color Selections Query button and dialog were added in PxPlus 2020.)* \|  \|<br>\| *Foreground* \| Click the Query button to access color selections. \|<br>\| *Background* \| Click the Query button to access color selections. \|<br>\| *Back Face* \| Affects the appearance of the Chart's back face surface. Click the Query button to access color selections. \|<br>\| *Bottom Face* \| Affects the appearance of the Chart's bottom face surface. Click the Query button to access color selections. \|<br>\| *Left Face* \| Affects the appearance of the Chart's left face surface. Click the Query button to access color selections. \|<br>Note:  <br>The Chart Colors property in [Themes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/themes) and [Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes) can be used to select the colors to apply when plotting the different data sets of a Chart.  <br>  <br>(The Chart Colors property in Themes Maintenance and Visual Classes Maintenance was added in PxPlus 2020.) |
| **Attributes** | Optional attributes (*Bold, Italics*, etc.). |
| **Visual Class** | Assign a visual class to the control.<br>Click the Visual Class Maintenance button to launch the **[Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes#vcutility)** utility for creating or editing visual classes.<br>To assign visual classes to controls at the ***library*** level, see **[Visual Class Assignment](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/visual-class-assignment)**.<br>Note:  <br>Visual class names that begin with an "\*" (asterisk) are pre-defined visual classes used by PVX Plus and may be subject to change without notice.<br>*(The Visual Class Maintenance button was added in PxPlus 2019.)* |
| **iNomads Class** | Assign an iNomads class to the control. The iNomads class contains class attribute references used when defining the control in the HTML code generated in iNomads. An iNomads class reference must start with an alpha character (A-Z or a-z), followed by any combination of A-Z, a-z, 0-9, underscore or dash. Multiple references may be entered, separated by a space.<br>For a list of pre-defined iNomads classes, see **[iNomads Classes](https://manual.pvxplus.com/inomads/inomads-classes)**.<br>*(The iNomads Class property was added to Charts in PxPlus 2019.)* |
| **Attributes** |  |
| **Margins** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Left* \| Number of columns offset from the left border of the Chart window. Valid format can be a *Fixed* value (number between 0 - 127) or a numeric *Expression*. \|<br>\| *Right* \| Number of columns offset from the right border of the Chart window. Valid format can be a *Fixed* value (number between 0 - 255) or a numeric *Expression*. \|<br>\| *Top* \| Number of lines offset from the top border of the Chart window. Valid format can be a *Fixed* value (number between 0 - 127) or a numeric *Expression*. \|<br>\| *Bottom* \| Number of lines offset from the bottom border of the Chart window. Valid format can be a *Fixed* value (number between 0 - 255) or a numeric *Expression*. \| |
| **Proportions** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Depth/Width* \| Sets percentage of Chart depth to width for altering proportions of three-dimensional Charts. Valid formats can be a *Fixed* value (number between 0 - 99999) or a numeric *Expression*. \|<br>\| *Height/Width* \| Sets percentage of Chart height to width for altering proportions of two-dimensional Charts. Valid formats can be a *Fixed* value (number between 0 - 99999) or a numeric *Expression*. \|<br>\| *To Margins* \| Sets the Chart to the variable-proportion mode, which means that the Chart should be proportioned to the current height-to-width ratio of the window that contains the Chart. \| |
| **Range** | \|  \|  \|<br>\| --- \| --- \|<br>\| *Minimum* \| Minimum Chart value. \|<br>\| *Maximum* \| Maximum Chart value. \| |
| **Axis Location and Axis Title** | \|  \|  \|<br>\| --- \| --- \|<br>\| *X* \| Axis location (*Back* or *Bottom*). Axis title (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *Y* \| Axis location (*Back* or *Left*). Axis title (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *Z* \| Axis location (*Bottom* or *Left*). Axis title (*Fixed* value, string *Expression* or *Message Library Reference*). \| |
| *Ignore Change Flag* | Select this check box when you do ***not*** want the NOMADS **[CHANGE_FLG](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#reserved)** variable to be updated when the control value is changed.<br>*(The Ignore Change Flag property was added in PxPlus 2017.)* |
| **Logic** |  |
| *Default Program* | Displays the name of the **[Default Program](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview#display)** used in the Panel Header definition.<br>*(The Default Program was added for display in PxPlus 2019.)* |
| **Post Create** | Logic to be processed after the control is drawn. Click the drop-down arrow for a list of selections. See **[Events Logic](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/events-logic/overview)**.<br>Click the Program Logic button beside the *Perform* or *Call* action to launch the default program editor, which is typically the **[\*IT - Integrated Toolkit](https://manual.pvxplus.com/toolkit1/overview)**. To make **[Ed+](https://manual.pvxplus.com/ed-program-editor)** the default program editor, change the setting for the **[%NOMADS'Program_Editor](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#programeditor)** property to *Ed+*.<br>*(The ability to set Ed+ as the default program editor was added in PxPlus 2023.)* |
| **When Data Set is Selected from Chart** | Logic to be executed when focus leaves the control or the state of the control has changed. Click the drop-down arrow for a list of selections. See **[Events Logic](https://manual.pvxplus.com/nomads-graphical-application/program-interaction/events-logic/overview)**.<br>Click the Program Logic button beside the *Perform* or *Call* action to launch the default program editor, which is typically the **[\*IT - Integrated Toolkit](https://manual.pvxplus.com/toolkit1/overview)**. To make **[Ed+](https://manual.pvxplus.com/ed-program-editor)** the default program editor, change the setting for the **[%NOMADS'Program_Editor](https://manual.pvxplus.com/nomads-graphical-application/appendix/nomads-variables/overview#programeditor)** property to *Ed+*.<br>*(The ability to set Ed+ as the default program editor was added in PxPlus 2023.)* |
| **User Aids** |  |
| **Help Reference** | Help text to be invoked at run time by pressing Shift - F1 while focus is on a control.<br>\|  \|  \|<br>\| --- \| --- \|<br>\| *Type* \| Select from *External* or *Internal* help types:<br>*External*<br>***(Default)*** Standard Windows help system consisting of a help *File Name* (.*html*, .*hlp*, .*doc*, etc.) and an optional *Keyword* or *Reference* number (*Fixed* value or string *Expression*).<br>*Internal*<br>Application supplied message text (*Fixed* value, string *Expression* or *Message Library Reference*). \|<br>\| *File Name* \| Name of the help file. \|<br>\| *Keyword* \| Indicates that the text in the adjacent field is the index entry for the topic in the indicated help file. \|<br>\| *Reference* \| Indicates that the adjacent field contains the reference number for a specific topic in the context sensitive help. \|<br>\| *Popup* \| Select this check box to display the help topic as a popup rather than as an independent window. \|<br>\| *Test* \| Tests the current help settings. \| |
| **Floating Tip** | Mouse pointer message for control (*Fixed* value, string *Expression* or *Message Library Reference*).<br>You can customize the floating tip by adding a tip title, descriptive tip text and a hyperlink. These features enhance the visual display and functionality of the tip by providing users with much needed information at their fingertips. You can define either a *Standard* tip or an *HTML* tip that provides a simplified HTML Editor for customizing the tip text. To do this, click the button to the right of the **Floating Tip** multi-line input to invoke the **Define Info Tip** dialogue. See **[Defining an Info Tip](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/defining-an-info-tip)**.<br>Note:  <br>The Floating Tip drop box and multi-line input cannot be changed once an [HTML](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/defining-an-info-tip#tiptype) tip has been defined.<br>***NOMADS Wiki Help***<br>The floating tip text can be used when displaying the **[Wiki Help](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/nomads-wiki-help)**. Info tips, however, are not supported and will be ignored.<br>*(Support for customizing Floating Tips was added in PxPlus 2016.)  <br>(Support for the use of Floating Tip text in the Wiki Help was added in PxPlus 2023.)* |
|  |  |
| *Security* | Security restrictions. See **[Restricting Access](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/security-manager/restricting-access)** for information on **Object Security Definition**. |
| *Groups* | Assign the control to a group. See **[Group Assignment](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/group-assignment)**. |
| *Popup Menu* | Associate a floating menu that will appear when you right-click the mouse over a control or a blank area on a panel. Valid formats are a NOMADS popup object or a user-supplied program (*Fixed* value or string *Expression*). |
| *Presets* | Invokes the **Presets** dialogue. See **[Presets Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/chart-control/chart#presetsdef)**. |
| *Notes* | Add notes/comments for the control. Maximum 1024 characters. These notes also display in the Wiki Help documentation for the panel. See **[NOMADS Wiki Help](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/nomads-wiki-help)**.<br>*(The Notes button was added in PxPlus 2023.)* |

## Defining a Chart

Set the Chart Type and Effect properties to change the shape and dimensional appearance. This information is used in the **[CHART](https://manual.pvxplus.com/directives/chart)** directive's **FMT=** option during creation of the object. Since a Chart is a visual aid with limited user interaction, the only logic assignments possible are *Post Create* and *When Data Set is Selected from Chart*.

Once created, the Chart can be updated in your program code using **[CHART LOAD](https://manual.pvxplus.com/directives/chart#Mark7)** or **[CHART WRITE](https://manual.pvxplus.com/directives/chart#Mark19)** directives or by using the control object property **'[Value$](https://manual.pvxplus.com/properties/value)** to read/write data in the Chart in conjunction with the data set and data point.

## Presets Definition

To aid in the development of Chart applications, the NOMADS toolkit supports preset definition records. These presets allow the designer to build a table of properties that can be assigned to specific data sets and data points. The value set for the Data Set and Data Point correspond to the different Chart elements. Through the presets, the user can change the text color, font, label location, as well as control the auto-scaling mode for a particular Chart label.

The presets are assigned to the Chart after it has been created and prior to the execution of the Post Create logic.

Click the *Presets* button to invoke the **Presets** dialogue:

![](https://manual.pvxplus.com/migration-assets/c63cfa6a3a917927b5cbe55e3147980062c175178b3a5c317d2e26b87e0cb3be.jpg)

At run time, the following will occur when the above presets are applied to the Chart:

1. Auto-scaling is turned Off for the primary Chart title.
2. The text color for the primary Chart title is set to "RGB:0 128 225".
3. The font for the primary Chart title is set to "Algerian,1,I".
4. The text color for the secondary Chart title is set to "light cyan".
5. The font for the secondary Chart title is set to "Comic Sans MS,1".
6. Auto-scaling is turned Off for the secondary Chart title.

The **Presets** dialogue allows you to define a maximum of 999 preset records, consisting of data set, data point, property and value.

This dialogue consists of the following:

|  |  |
| --- | --- |
| *Data Set* | Value to be placed in the ['CurrentSet](https://manual.pvxplus.com/properties/currentset) property (numeric). Valid entries: 0, 1, -1, -2 or -3. |
| *Data Point* | Value to be placed in the **['CurrentPoint](https://manual.pvxplus.com/properties/currentpoint)** property (numeric). Valid entries: 0, 1, -1, -2 or -3. |
| *Property* | Click the drop-down arrow for a list of **CHART** control object properties: **['AutoScale](https://manual.pvxplus.com/properties/autoscale)**, **['Font$](https://manual.pvxplus.com/properties/font)**, **['LabelLocation$](https://manual.pvxplus.com/properties/labellocation)** and **['TextColor$](https://manual.pvxplus.com/properties/textcolor)**. |
| *Exp* | Check box to indicate that the contents of the *Value/Expression* column is an expression. The default ***(Off)*** indicates literal/fixed. |
| *Value/Expression* | Value that will be assigned to the property.<br>If the value is not marked as an expression, click the drop-down arrow to access defaults for the selected property (if applicable). The cell type for this column is determined by the selected property. |
| *Delete Row(s)* | Deletes preset records. |
| *Move Up  <br>Move Down* | Changes the order of existing preset records. |

## See Also

**[CHART Properties](https://manual.pvxplus.com/control-object-properties/chart-properties)**  
**[CHART Directive](https://manual.pvxplus.com/directives/chart#Mark3)  
[Charting Alternatives in PxPlus](https://manual.pvxplus.com/charting-alternatives-in-pxplus/introduction)  
[NOMADS AutoChart](https://manual.pvxplus.com/nomads-autochart/introduction)  
[Smart Controls](https://manual.pvxplus.com/nomads-graphical-application/smart-controls/overview)  
[Chart Images Generation](https://manual.pvxplus.com/chart-images-generation/introduction)  
[Chart Image Utilities](https://manual.pvxplus.com/chart-image-utilities/introduction)**
