Converting a Tagcloud Chart to Chart Attribute Syntax

Reference:

A tagcloud chart is a visual representation of group labels. The size of each label is proportional to its data value. A second measure can be used to color the labels.

Reference: LOOKGRAPH Conversions for Tagcloud Charts

The following table lists the traditional LOOKGRAPH value and the new LOOKGRAPH value.

LOOKGRAPH Parameter

Traditional

Convert to

TAGCLOUD

TAGCLOUD

Reference: Attribute Category Assignments for Tagcloud Charts

The following table lists the attribute category conversions for tagcloud 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 or GRXAXIS sort field

detail

GRMULTIGRAPH sort field

page

Example: Converting a Tagcloud Chart Request to Chart Attribute Syntax

The following example generates multiple tagcloud charts using traditional syntax (LOOKGRAPH value is TAGCLOUD). The high-level sort field (BRANDTYPE) is the GRMULTIGRAPH sort field. Separate tagcloud charts are generated for each value of BRANDTYPE. The PRODUCT_CATEGORY sort field generates the labels. The first measure (GROSS_PROFIT_US) is used for the size of the labels, and the second measure (COGS_US) is used for the color of the labels:

GRAPH FILE WF_RETAIL_LITE
SUM GROSS_PROFIT_US COGS_US
BY BRANDTYPE
BY PRODUCT_CATEGORY 
ON GRAPH SET GRMERGE ADVANCED   
ON GRAPH SET GRMULTIGRAPH 1   
ON GRAPH SET GRLEGEND 1    
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH TAGCLOUD
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 TAGCLOUD. The measures (GROSS_PROFIT_US and COGS_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 field (PRODUCT_CATEGORY) is assigned to the detail attribute category.

GRAPH FILE WF_RETAIL_LITE
HEADING CENTER
" <BRANDTYPE </1"
SUM GROSS_PROFIT_US COGS_US
BY BRANDTYPE
BY PRODUCT_CATEGORY
ON GRAPH SET EMBEDHEADING ON
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH TAGCLOUD
ON GRAPH SET STYLE *
type=data, column=brandtype, bucket=page,$
type=data, column=product_category, bucket=detail,$
type=data, column=gross_profit_us, bucket=size,$
type=data, column=cogs_us, bucket=color,$
type=heading, font=arial, style=bold,$
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENWarm.sty,$
ENDSTYLE
END

The output is shown in the following image:

WebFOCUS

Feedback