Changing Colors and Styles Dynamically

There are many dynamic color and style changes available for graph data items, including:

Changing the Color Theme

Color themes specify colors for up to sixteen data series. These colors are used for any bars, lines, symbols, pie wedges, and filled areas in the series. Set a graph's color theme dynamically with ITXML or PCScript.

For information on creating new color themes, see Color Themes

ITXML

Change the color theme for a graph in ITXML using cit:color-palette property. More information on this property is available in the Corda® 7 Object Reference in Corda Builder™.

PCScript

Change the color theme for a graph in PCScript with the graph.useColorPalette method.

Changing the Color of a Data Series

Change data series colors dynamically using either PCScript or ITXML.

ITXML

Change the series color in the color attribute of the appropriate series property. The specific property name varies by graph type (e.g., cit:bar-series, cit:line-series, etc.) More information on these properties and attributes is available in the Corda 7 Object Reference in Corda Builder.

PCScript

Color override commands are available in the graph.setSeries and graph.setCategories methods, and are placed in parentheses before the item to which they apply.

There are many other override commands, including ones that let you override area fill colors, bubble colors, and outline colors. For a complete list of these override commands, see the Color and Style Override Commands table.

Changing Colors for Individual Data Items

Change the colors of an individual data item dynamically using either ITXML or PCScript.

ITXML

Change a data item's color in the Data property. More information on this property is available in the Corda 7 Object Reference in Corda Builder.

Note: Changing a data item's color in ITXML must be done when sending the data to Corda Server™.

PCScript

Color override commands are available in the graph.setSeries and graph.setCategories methods, and are placed in parentheses before the item to which they apply.

There are many other override commands, including ones that let you override area fill colors, bubble colors, and outline colors. For a complete list of these override commands, see the Color and Style Override Commands table.

Changing Data Series Styles

Certain graphs, including Line, X-Y, Time Plot, Area, Bubble, and Radar, support changing some or all of the following settings: line width, symbol type, area fill, and bubble type.

ITXML

Change the series style in the appropriate series property. The specific property name varies by graph type (e.g., cit:bar-series, cit:line-series, etc.) More information on these properties and attributes is available in the Corda 7 Object Reference in Corda Builder.

PCScript

To change these settings in PCScript, use the graph.setSeries method.