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 PCHOLD FORMAT JSCHART
If the ON GRAPH PCHOLD FORMAT JSCHART command is not issued, server-side graphics are generated.
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 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.