# Charting

Charting Alternatives in PxPlus |

PxPlus supports Plus Charts, RGraph Charts, and Google Interactive Charts (using the Google Visualization API) as options to replace the internal PxPlus chart control. These charts are interactive and animated with attractive displays and expose events such as the mouse click.

For examples of the various chart formats, see Chart Formats.

(Plus Charts were added in PxPlus 2019.)

Most existing internal chart formats are supported (Area, Bar, Column, Line, Pie and Stack) with additional formats (Scatter, Donut and Gauge) supported selectively. Most CHART directives are also supported, as are selected properties. This makes it possible to switch chart displays from the internal chart to one of the alternate chart options with little or no code changes. The alternate chart interfaces are designed to work in both NOMADS and iNomads environments.

| NOMADS | iNomads

One of the ways that a chart control can be defined is by using the Chart Properties dialog in the NOMADS Panel Designer. The definition interface is the same as for the standard internal chart, although some of the properties are not applicable.

Once a chart is defined, the switch to an alternate chart display is relatively simple. The chart brand can be set system wide or for an individual chart. When working in a NOMADS environment, set your charting option system wide by setting the global variable %NOMADS'Chart$ to "plus", "rgraph" or "google". If %NOMADS'Chart$ is not set, the default will be "plus" charts. See Plus Charts.

(Support to default to Plus Charts when %NOMADS'Chart$ is not set was added in PxPlus 2024 Update 1.)

Example:

> %Nomads'Chart$="plus"

To set the chart brand system wide when working in an iNomads environment:

| 1. | Invoke the iNomads System Administration Functions (admin) dialog.
| 2. | Under Template Settings, select a template from the Template drop box.
| 3. | Click the Options button to launch Template Configuration Maintenance.
| 4. | On the Misc tab, select a chart brand from the Charting Object to Use drop box.

To set the chart display for an individual chart in NOMADS:

| 1. | Invoke the NOMADS Chart Properties dialog for the chart.
| 2. | On the Display tab, select a chart brand from the Chart Brand drop box. This setting will override the system wide setting for the chart unless set to Default, in which case the %NOMADS'Chart$ setting will be used.

## See Also

Chart Formats
Chart Processing
Properties and Methods
Events
NOMADS AutoChart

## Plus Charts

Plus Charts emulate a chart control, rendering NOMADS charts using printed shapes and iNomads charts using HTML. Plus Charts are strongly recommended, as they support all chart formats and most properties, and they are not dependent upon third-party software or Internet connections. Simply set the Chart Brand option to "Plus".

See *OBJ/CHART Plus Charting Utility.

(Plus Charts were added in PxPlus 2019.)

## RGraph Charts

RGraph is an HTML5 canvas graph library. The required files are part of the PxPlus install; therefore, all you have to do is set your charting option to "rgraph". In an iNomads environment, RGraph charts are supported on any browser that supports the canvas element.

For information on RGraph, visit https://www.rgraph.net.

#### Note:
As of PxPlus 2019, RGraph (v4) is supported.

## Google Interactive Charts

To use Google Interactive Charts, all that is required is access to the Internet and setting the charting option to "google". At run time, the PxPlus chart interface works in conjunction with your Internet browser to request the Visualization API and chart packages from the Google website. All code and data are processed and rendered in the browser; security issues are addressed, as no data is sent to any external server for processing.

For information on the Google Visualization API and Terms of Use, visit https://code.google.com/apis/visualization/interactive_charts.html and https://developers.google.com/chart/terms?hl=en.