Apply colors to data points or series using color rules

Contents[Hide]

1. Overview

Use color rules to apply colors to data points or series based on hierarchy values. For example, you may want data points associated with a Bikes product category to always appear with a blue color.

2. Using color rules to color data points

For this example, drag OrderQty to the canvas as a measure.

Then add FirstName as a hierarchy on the ROWS axis.

Re-visualize the resulting visualization as a bar chart.

Bar chart showing OrderQty by FirstName
Bar chart showing OrderQty by FirstName

In the Data Binding Panel, click Bindings in the top-right corner.

Click Bindings
Click Bindings

Scroll down in the panel until you see SERIES 1 COLOR. Drag the FirstName hierarchy onto this field. You can drag the hierarchy from the EXPLORE window or from another field in this panel.

This is the hierarchy that will be used to define different color rule values.

Drag FirstName hierarchy to SERIES 1 COLOR
Drag FirstName hierarchy to SERIES 1 COLOR

The color rules for the chart are now activated. Close the Data Binding Panel and click PROPERTIES to see the properties of the chart.

Click Look, expand the APPEARANCE section, and find the Color Rules collection property.

Color Rules collection property
Color Rules collection property

Click the plus sign button to add a Discrete Color Rule.

Discrete color rule added
Discrete color rule added

Click the discrete color rule to edit it. Choose the color you want and the corresponding FirstName hierarchy value.

Choose the color and corresponding hierarchy value
Choose the color and corresponding hierarchy value

Click DISCRETE COLOR RULE at the top to go back to the list of color rules.

Add and configure more discrete color rules using the same steps.

Add more color rules
Add more color rules

3. Give each series a specific color

For this example, consider the following bar chart (metric set) which shows four different series. Each series corresponds to a specific product category such as Bikes or Clothing.

The steps are basically the same as before. For example, drag the Product hierarchy to the SERIES 1 COLOR field in the Bindings tab.

Drag the Product hierarchy to SERIES 1 COLOR
Drag the Product hierarchy to SERIES 1 COLOR

You can now go to PROPERTIES and add a color rule for each product hierarchy value.

Choose the color for the Bikes product category
Choose the color for the Bikes product category

4. See also

 

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri