*TOOLS/CHARTIMAGE |
Generate a Chart Image File |
1. |
CALL "*tools/chartimage", ERR=stmtref, query$, library$, chart$, imgPath$ [,imgWidth, imgHeight] | |
2. |
CALL "*tools/chartimage", ERR=stmtref, query$, library$, chart$, control, [,controlSettings, var_iol$, var_rec$] | |
3. |
Get Chart Definition: |
CALL "*tools/chartimage;GetChartInfo", ERR=stmtref, query$, library$, chart$, object |
(The Get Chart Definition format was added in PxPlus 2022.)
Where:
query$ |
Name of the query which owns the chart. | ||||||||||||
library$ |
Path of the library where the query definition resides. | ||||||||||||
chart$ |
Name given to the chart definition associated with the query. (Must be a public definition) | ||||||||||||
object |
Variable to receive an *plus/winutil/autochart object that contains the chart definition.This must be freed by the caller when no longer needed. (added in PxPlus 2022) | ||||||||||||
imgPath$ |
Path for the resulting image file. (Must include image type suffix; i.e. .png, .jpg, .bmp, .htm/.html) | ||||||||||||
imgWidth |
Width of the resulting image in pixels. (Optional - Default is 400 if not specified) | ||||||||||||
imgHeight |
Height of the resulting image in pixels. (Optional - Default is 300 if not specified) Note: | ||||||||||||
control |
CTL value of the chart control to be loaded. (added in PxPlus 2019) | ||||||||||||
controlSettings |
Values are: (added in PxPlus 2019) 0 - Use chart format/titles from Query AutoChart definition | ||||||||||||
var_iol$ |
(Optional) Compiled IOList of variables to be passed to the Load logic. (added in PxPlus 2019 Update 1) | ||||||||||||
var_rec$ |
(Optional) Values of variables in the IOList derived by REC(var_iol$). (added in PxPlus 2019 Update 1) | ||||||||||||
stmtref |
Error transfer. Errors may result when:
|
This utility creates an image file (.png, .jpg, .bmp or .htm) based on a chart definition associated with a PxPlus Query+ public AutoChart Definition.
Not all chart brands are supported when generating images. Plus, RGraph and Google charts can be rendered on a Windows system; however, only Plus charts can be rendered on a Linux system. See Important Note, which outlines further restrictions.
If the specified chart brand is not supported by image generation, Plus charts will be used. To generate chart images, Plus charts are recommended, as well as using the .png image format, which does not require additional conversion.
This utility can also be used to generate data to load a chart control based upon a PxPlus Query+ public AutoChart definition using Format 2.
(Plus charts were added in PxPlus 2019.)