On this page
The configuration options available for creating a condition vary based on:
Effective type of the value to which you you want to apply the condition
The effective type of a value is its type after array reductions
and aggregations. For example, a string field in a table's
Values channel with a
COUNT aggregation becomes numeric.
Applies to Field
Use the Applies to menu to select the aspect of your chart to which to you want to apply formatting based on a condition.
For Number Charts, you can only apply conditions to the number.
For Data Tables, you can select:
Select a group encoding channel from your chart. The effective type of the field you select determines the available Operators.
Charts formats matching cells in that group field column.
Select a value encoding channel from your chart. The effective type of the field you select determines the available Operators.
Charts formats matching cells in that value field column.
Compare a number to 0-based row indexes (that is, the first
row of data is row
Charts formats matching rows.
Compare a string to column headings.
Charts formats matching columns.
Compare a number or string to any table cell value.
Charts formats any matching cell.
Compare a number to row totals.
Charts formats matching row total cells.
Compare a number to column totals.
Charts formats matching column total cells.
Use the Operator menu to select the operator that the condition uses to determine formatting. Depending on the type of value you selected from the Applies to menu, you can choose from numeric, string, or date operators.
Charts uses the selected operator to compare chart values included in the Applies to field to an input you provide.
You can only select numeric operators for Number Charts.
For individual numeric values, the following operators are available:
Not equal to
Greater than or equal to
Less than or equal to
On Data Tables, the following ranking operators are also available:
Ranked in top
Ranked in bottom
Ranked in top percent
Ranked in bottom percent
Ranking identical values
If multiple, identical values extend outside of the specified ranking, MongoDB Charts formats all matching values. For example, if the top 20 values in your table are identical and you choose to format the top 10, Charts formats all 20 identical values.
For individual date values, the following operators are available:
On or after
On or before
Binned Numbers and Dates
Binned numbers and dates use different operators that apply to the bin range.
For binned number ranges, the following operators are available:
Greater than or includes
Less than or includes
For binned date ranges, the following operators are available:
After or includes
Before or includes
For string values, the following operators are available:
Not equal to
Does not contain
If you select Matches Regex, you can apply any number of the following Regex flags:
Case insensitive (i)
Single line (s)
Use the input field to specify a regular expression.
If you select One of, use the input field to list a series of strings. Matching any string in that list applies your conditional formatting.
The Input field specifies a value to use for evaluating your Operator condition against the values from your Applies to field.
Type of Operator
Type of Input
If you selected the Matches Regex string operator, enter a regular expression.
If you selected the One of string operator, enter a comma-separated list of strings.
Date and time.