Articles in this section

How to Apply Conditional Coloring to Bar Charts in Bold Reports

Published:
Updated:

In Bold Reports, conditional coloring allows you to dynamically change the appearance of report elements based on specific data values. This is particularly useful for items, where colors can highlight trends, thresholds, or performance categories.
By applying expressions to the Fill color property, you can visually differentiate data such as marking high values in green and low values in red.
This article explains how to configure conditional coloring for bar charts using expressions.

Step-by-Step Instructions

Step 1: Open the Series Properties

To apply conditional logic to a specific data series, you must first access the series configuration settings.

  1. Open your report in the Bold Reports Designer.
  2. Select the Bar Chart component from the design surface.
  3. Open the Properties panel by clicking the settings icon in the right-side configuration panel.
  4. Under the Basic Settings section, click the Edit icon next to the Series property. This opens the Series Properties dialog box.
    Selecting the Series Property in Bold Reports Web Designer

Step 2: Open the Color Expression Editor

Instead of assigning a static color, use an expression to apply conditional color logic dynamically.

  1. In the Series Properties dialog box, locate the Series Color property.
  2. Click the small Expression icon next to the color selection box.
  3. Select the Expression option from the context menu to open the Expression Editor.
    Opening the Expression Editor for Series Color

Step 3: Configure the Conditional Expression

The IIF (Immediate If) function evaluates the data values and returns a specific hex color code based on the result.

  1. In the Expression Editor, enter the following expression and click OK to save the changes:
    Entering the IIF expression in the editor
=IIF(Fields!FieldValue.Value >= 0, "black", "red")

Expression Breakdown:

  • Fields!FieldValue.Value: Replace this with the actual field name from your dataset.
  • Black: Applies the color black to values greater than or equal to zero.
  • Red: Applies the color red to negative values.

Step 4: Preview and Verify the Results

Verify that the conditional formatting is applied correctly to the chart data.

  1. Click the Preview button in the top toolbar of the Bold Reports Designer.
  2. Review the bar chart. Positive values should appear in black, while negative values should appear in red.
    Preview of the bar chart with conditional colors applied

Sample Report: Download the sample RDL file with this configuration here

Related Articles

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied