# How to Use PxPlus Query Definitions in Non-NOMADS Environments

Create Charts |

In the Query Definition, you can create simple chart definitions based on the columns of a query, which can be displayed in the query Lookup Table at run time or can be used to draw a chart on a panel.

Click the Define Chart button on the Query Definition toolbar to launch the Chart Wizard that will step you through the process of creating, editing or deleting a public NOMADS AutoChart definition based on the query data.

Once defined, a public chart definition can be displayed in the Run-Time Query by anyone whenever the query is displayed in a query Lookup Table.

#### Note:
Different chart brands (i.e. Plus, Google, RGraph) are available for displaying the charts. The above example is set in the %NOMADS'Chart$ variable.

The AutoChart definition can also be used to generate chart images that you can add to your application. This is done by using the *TOOLS/CHARTIMAGE utility:

> CALL "*tools/chartimage", ERR=stmtref, query$, library$, chart$, imgPath$ [,imgWidth, imgHeight]

Example:

> CALL "*tools/chartimage","qclient","panels.en","Sales by Sales Rep","sales.png"