How to: |
A series selection is a zero-based number or a string. If the series does not exist in the chart, the property is ignored.
series: [ {series: number, property: value, ..., property: value}, ]
where:
Selects a series for the specified properties. Valid values are:
Is a supported series property and its value.
The following request generates a vertical bar chart with four series and specifies colors for 10 series:
GRAPH FILE WFLITE
SUM COGS_US GROSS_PROFIT_US REVENUE_US DISCOUNT_US
ACROSS PRODUCT_CATEGORY
ON GRAPH HOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VBAR
ON GRAPH SET STYLE *
*GRAPH_JS
series: [
{series: 0, color: 'red'},
{series: 1, color: 'green'},
{series: 2, color: 'blue'},
{series: 3, color: 'orange'},
{series: 4, color: 'lightgreen'},
{series: 5, color: 'yellow'},
{series: 6, color: 'slateblue'},
{series: 7, color: 'lavender'},
{series: 8, color: 'limegreen'},
{series: 9, color: 'red'}
]
*END
ENDSTYLE
END
The colors for series that are not in the chart are ignored. The output is:
The following request generates a vertical line chart and sets the markers for all series to the shape 'triangle' and the size 20:
GRAPH FILE WFLITE
SUM COGS_US MSRP_US
ACROSS PRODUCT_CATEGORY
ON GRAPH HOLD FORMAT JSCHART
ON GRAPH SET LOOKGRAPH VLINE
ON GRAPH SET STYLE *
*GRAPH_JS
series: [{series:'all', marker:{shape:'triangle', size:20}},
{series: 0, color: 'red'},
{series: 1, color: 'green'},
]
*END
ENDSTYLE
END
The output is:
The following request sets the riserCycleEndLightness property, which cycles through defined colors and then, if more series exist, uses a lightening or darkening effect for the rest of the series. However, in order to apply this effect, the default colors must be removed, or they will be used instead of the lightening effect:
GRAPH FILE WFLITE SUM COGS_US ACROSS PRODUCT_CATEGORY ON GRAPH HOLD FORMAT JSCHART ON GRAPH SET LOOKGRAPH PIE ON GRAPH SET STYLE * *GRAPH_JS riserCycleEndLightness: 0.4, series: [{series: 'reset', color: undefined}, {series: 0, color: 'teal'} ] *END ENDSTYLE END
The output is:
Information Builders |