How to: |
The swapData property can be used to swap series and group orientation. When false (the default), values in a row in a data set are represented as series. When true, values in a column are represented as series.
swapData: boolean
where:
Can be:
The following request generates a vertical bar chart:
GRAPH FILE WF_RETAIL_LITE SUM COGS_US GROSS_PROFIT_US REVENUE_US DISCOUNT_US ACROSS TIME_DAYNAME WHERE TIME_DAYNAME EQ 'FRI' OR 'SAT' OR 'SUN' OR 'MON' ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH VBAR ON GRAPH SET STYLE * INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/ENIADefault_combine.sty,$ *GRAPH_JS swapData:false, series: [ {series: 0, color: 'lightgreen'}, {series: 1, color: 'coral'}, {series: 2, color: 'lightblue'}, {series: 3, color: 'burlywood'} ] *END ENDSTYLE END
On the output:
Changing the swapData property to true generates the following chart, in which:
Although the labels did not change, the series and groups have been swapped:
To swap the labels as well as the series and group orientation, see Swapping Series, Group, and Label Orientation.
WebFOCUS |