How to: |
WebFOCUS supports a graph output format that takes advantage of the HTML5 standard. The charts are rendered in the browser as high quality interactive vector graphics using a built-in JavaScript engine. Note that older browsers do not support all of the features of the HTML5 standard.
You can use the SET AUTOFIT command to make the HTML5 graph output resize to fit into the container in which it is placed.
In your graph request, include the following commands:
ON GRAPH SET ARGRAPHENGIN JSCHART ON GRAPH PCHOLD FORMAT JSCHART
or, you can set the ARGRAPHENGIN parameter outside of the request:
SET ARGRAPHENGIN = JSCHART
then, in the request, include the following command
ON GRAPH PCHOLD FORMAT JSCHART
If either the SET ARGRAPHENGIN or ON GRAPH PCHOLD FORMAT JSCHART command is not issued, server-side graphics are generated. This graph output format is not supported in an Active Technologies request.
The following request against the GGSALES data source creates an HTML5 vertical bar graph:
GRAPH FILE GGSALES SUM DOLLARS BUDDOLLARS BY REGION ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET ARGRAPHENGIN JSCHART ON GRAPH SET LOOKGRAPH VBAR END
The output is:
ON GRAPH SET AUTOFIT {OFF|ON|RESIZE}
where:
Respects the dimensions specified by the HAXIS and VAXIS parameters.
Always resizes the HTML5 graph output to fit its container.
Respects the dimensions specified by the HAXIS and VAXIS parameters initially, but resizes the graph output if the container is resized.
WebFOCUS |