Controlling the Number of Charts in a Horizontal Row

How to:

For pie, gauge, and funnel charts that can have multiple charts in a single draw area, the chartsPerRow property defines how many charts to draw in a horizontal row.


Top of page

x
Syntax: How to Control the Number of Charts Per Row
chartsPerRow: number

where:

number

Is the number of charts to draw in a horizontal row. The default value is undefined.



Example: Controlling the Number of Charts Per Row

The following request against the GGSALES data source generates four pie charts. The chartsPerRow property places them all on one horizontal row:

GRAPH FILE GGSALES
SUM DOLLARS AVE.DOLLARS MAX.DOLLARS MIN.DOLLARS
ACROSS PRODUCT 
ON GRAPH PCHOLD FORMAT JSCHART
 ON GRAPH SET LOOKGRAPH PIE
ON GRAPH SET STYLE *
*GRAPH_JS
chartsPerRow: 4,
legend: {visible: false}, 
series: [
   {series: 0, color: 'cyan'},
   {series: 1, color: 'bisque'},
   {series: 2, color: 'slateblue'},
   {series: 3, color: 'beige'},
   {series: 4, color: 'lightgreen'},
   {series: 5, color: 'yellow'},
   {series: 6, color: 'navy'},
   {series: 7, color: 'lavender'},
   {series: 8, color: 'limegreen'},
   {series: 9, color: 'red'}  
]
*END
INCLUDE=ENIADefault_combine.sty,$
ENDSTYLE
END

The output is:


WebFOCUS