Applying a Lightening or Darkening Effect to Successive Risers

If there are more series than series colors defined, the charting engine cycles through the defined colors. The riserCycleEndLightness property defines the lightness or darkness of the final riser color cycle.

riserCycleEndLightness: number

where:

riserCycleEndLightness: number

Is a number between 0 and 1 that controls the brightness of colors assigned to undefined series risers. Values less 0.5 darken each series cycle. Values greater than 0.5 lighten each series cycle. The default value is 0.8.

Note: Since WebFOCUS provides default values for the series colors, you must remove these defaults by including {series: 'reset', color: undefined} in the series array. Then define one color to be the starting color for the cycle.


Top of page

Example: Applying A Darkening Effect To Successive Pie Slices

The following request starts with the color teal for series 0 and applies a darkening effect to each successive pie slice:

GRAPH FILE WF_RETAIL_LITE
SUM COGS_US 
ACROSS PRODUCT_CATEGORY
ON GRAPH PCHOLD 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:


WebFOCUS