Rule-based styling

The rule-based styling extension allows users to dynamically color elements in a visualization based on output values. This can be applied to tables, graphs, bar charts, line charts, and more. To use the extension, click on the 'rule-based styling' icon inside the settings of a report.

Rule-Based Styling

Configuration

First, ensure that the extension is enabled.

Then, on several report types, rule-based styling can be applied to the visualization. To do this, open up the report settings, Then, click the Rule-Based Styling button on the bottom right (marked with the red circle):

Report

This opens the action definition window. Inside the window, a list of action rules can be defined. Each rule has the following structure:

IF [CONDITION] THEN [STYLE]

Report

Conditions are always based on one of the return fields of the query. This can be a simple field (text, number) or a node property. Style rules are (as of NeoDash 2.1) always color-based.

For example, the following rule sets the color of all Warning nodes to red:

IF Warning.level = "critical" THEN 'Node Color' = "red"

The order of the rules is important. If a node matches multiple rules, the first rule that matches the line is applied. If no rules match, the default style is used.

Supported visualizations

Rule-Based styling is available for the following report types:

  • Tables

  • Bar Charts

  • Line Charts

  • Pie Charts

  • Graphs

  • Maps

  • Single Values