Reference: |
Treemap charts show hierarchical data as a set of nested colored rectangles.
The following table lists the traditional LOOKGRAPH value and the new LOOKGRAPH value.
LOOKGRAPH Parameter |
|
---|---|
Traditional |
Convert to |
TREEMAP |
TREEMAP |
The following table lists the attribute category conversions for treemap charts. The GRLEGEND and GRXAXIS parameters can be used interchangeably.
Type of Column or Parameter |
Attribute Category |
---|---|
first measure field |
size |
second measure field, if any |
color |
GRLEGEND sort field |
detail |
GRXAXIS sort field |
detail |
GRMULTIGRAPH sort field |
page |
The following example generates multiple treemap charts using traditional syntax (LOOKGRAPH value is TREEMAP). The high-level sort field (BRANDTYPE) is the GRMULTIGRAPH sort field. Separate treemap charts are generated for each value of BRANDTYPE. The PRODUCT_CATEGORY and PRODUCT_SUBCATEG sort fields generate the nested rectangles. The first measure (COGS_US) is used for the size of the rectangles, and the second measure (REVENUE_US) is used for the color of the rectangles:
GRAPH FILE WF_RETAIL_LITE SUM COGS_US REVENUE_US BY BRANDTYPE BY PRODUCT_CATEGORY BY PRODUCT_SUBCATEG ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET GRMERGE ADVANCED ON GRAPH SET GRMULTIGRAPH 1 ON GRAPH SET GRLEGEND 1 ON GRAPH SET GRXAXIS 1 ON GRAPH SET LOOKGRAPH TREEMAP ON GRAPH SET STYLE * INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENWarm.sty,$ ENDSTYLE END
The output is shown in the following image:
The following is the same request converted to chart attribute syntax. The LOOKGRAPH value is TREEMAP. The measures (COGS_US and REVENUE_US) are assigned to the size and color attribute categories, the high-level sort field (BRANDTYPE) is assigned to the page attribute category, and the low-level sort fields (PRODUCT_CATEGORY and PRODUCT_SUBCATEG) are assigned to the detail attribute category.
GRAPH FILE WF_RETAIL_LITE HEADING CENTER "<BRANDTYPE" SUM COGS_US REVENUE_US BY BRANDTYPE BY PRODUCT_CATEGORY BY PRODUCT_SUBCATEG ON GRAPH PCHOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH TREEMAP ON GRAPH SET STYLE * INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENWarm.sty,$ TYPE=DATA, COLUMN=BRANDTYPE, BUCKET=PAGE,$ TYPE=DATA, COLUMN=COGS_US, BUCKET=size,$ TYPE=DATA, COLUMN=REVENUE_US, BUCKET = color,$ TYPE=DATA, COLUMN=PRODUCT_CATEGORY, BUCKET=DETAIL,$ TYPE=DATA, COLUMN=PRODUCT_SUBCATEG, BUCKET=DETAIL,$ TYPE=HEADING, STYLE=BOLD,$ *GRAPH_JS "legend": {"visible": false} *END ENDSTYLE END
The output is shown in the following image:
WebFOCUS | |
Feedback |