Selecting Specific Groups

How to:

A group number is a zero-based number that represents a group in the request.


Top of page

x
Syntax: How to Select Specific Groups
{series: svalue, group: gnumber,
   property:value, ..., property:value}

where:

svalue

Defines the series for the selected group.

gnumber

Is a zero-based number. If the group does not exist in the chart, the property is ignored. If a group number is not specified, the properties are applied to all risers in the series.

property:value

Is a supported series property and its value.



Example: Selecting a Specific Group

The following request against the GGSALES data source generates a vertical bar chart and defines a color for each series. It defines a different color (red) for group 4 in series 2:

GRAPH FILE GGSALES
SUM DOLLARS UNITS BUDDOLLARS BUDUNITS
BY PRODUCT 
ON GRAPH PCHOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_JS
series: [
   {series: 0, color: 'cyan'},
   {series: 1, color: 'green'},
   {series: 2, group:4, color: 'red'},
   {series: 2, color: 'slateblue'},
   {series: 3, color: 'orange'},
]
*END
ENDSTYLE
END

On the output, the series 2 risers are all slate blue except for the red one in group 4:


WebFOCUS