RuleSet
RuleSet manifests adjust the IBCS scenario rules that tables, charts, and titles
use to display scenario columns: the display name, the IBCS color encoding, and
the sort order of each scenario prefix (ac, pp, fc, pl).
Minimal definition
Section titled “Minimal definition”The smallest well-formed RuleSet sets the required spec.content and overrides
the scenario rules you actually want to change. An empty content leaves the
built-in rules untouched, so the manifest would have no effect.
Instead of a YAML object, spec.content also accepts a JSON string, which is
handy when copying from front-end configuration; see
JSON string form.
All attributes are listed in the Attribute Reference below.
Using named rule sets
Section titled “Using named rule sets”The metadata.name of a RuleSet decides how it is applied:
_default- applied to all components automatically.- Any other name (e.g.
corporateRules) - a named rule set that individual components opt into viaspec.ruleset.
At render time each component merges rule-set layers in this order (later wins):
built-in _system defaults → _default → the rule set named by ruleset.
Overrides are partial: anything you leave out keeps its built-in value.
ruleset is available on Table, ChartStructure, ChartTime, ChartScatter,
ChartBubble, ChartBullet, LayoutPage, and LayoutCard. It is emitted as the
ruleset HTML attribute on the corresponding bn-* element.
Besides a rule-set name, the component kinds (Table and the Chart* kinds)
accept two inheritance keywords:
inherited-closest- reuse therulesetof the nearest surroundingLayoutCardorLayoutPagethat sets one. A card withoutrulesetis skipped and the lookup continues outwards to the page. Template engines before v1.0.0-next.28 ask only the nearest card or page.inherited-page- reuse therulesetof the surroundingLayoutPage(cards are skipped).
A keyword that finds no ruleset this way applies no named rule set: the
component uses the _system and _default rule sets only, on every engine
version. bino lint reports it with the rule
inherited-prop-unresolved.
On LayoutPage and LayoutCard only inherited-page is meaningful, because a
layout inherits from the page around it, never from itself.
A ruleset set on a LayoutPage or LayoutCard also applies to the layout’s
own title row, so scenario labels in page/card titles follow the same rules.
Rule-set structure
Section titled “Rule-set structure”The rule-set object has two top-level sections, both optional:
| Section | Description |
|---|---|
scenarios |
Per-scenario-prefix rule overrides, keyed by scenario prefix |
fallback |
Rules applied to scenario names not covered by scenarios |
Scenario rules (scenarios)
Section titled “Scenario rules (scenarios)”scenarios is a map keyed by scenario prefix. Known prefixes are the base
scenarios (ac, fc, pl, bu, pp, py), the absolute variances
(dac … dpy), and the relative variances (drac … drpy); user-defined
prefixes are allowed too. Dataset columns exist only for ac, pp, fc and
pl, so an entry for bu or py has no effect. For a variance prefix only
sortIndex is read. Each entry supports:
| Property | Type | Description |
|---|---|---|
name |
string | Display name. Slot 1 shows it as written, slots 2 to 4 with their number (Budget, Budget2). |
colorIndex |
number | Theme style slot the scenario is drawn in: 10 = ac (solid), 20 = pp (light), 30 = fc (hatched), 50 = pl (outlined). Any other value counts as 10. |
sortIndex |
number | Base sort index for column ordering. Slot n adds n*10. |
Each prefix expands into four slots (ac → ac1..ac4) that inherit the base
values, with n*10 added to sortIndex.
Where name and colorIndex apply
Section titled “Where name and colorIndex apply”From template engine v1.0.0-next.29 on, name and colorIndex work in
Table, ChartTime, ChartStructure and in page and card titles. Older
engines read them only in ChartScatter, ChartBubble and ChartBullet; in a
table, a time chart or a structure chart a rule set changed only the order.
namereplaces the translated labelsglobal.<prefix>1toglobal.<prefix>4, in every locale. Withpl: { name: Budget }the column ofpl1is labelledBudgetand the one ofpl2Budget2, whatever anInternationalizationdocument sets forglobal.pl1. Only a name that aRuleSetsets counts. The built-in names in the table below do not label anything.colorIndexselects one of the four looks of the theme. TheComponentStylestill decides how each look is drawn. It applies to bars, markers, lines, the variance axis, the bars inside table cells and the line under a table column header.
A report that already has a RuleSet with name or colorIndex therefore
changes its output when it moves to engine v1.0.0-next.29 or later.
Fallback rules (fallback)
Section titled “Fallback rules (fallback)”Applied to scenario names that have no scenarios entry:
| Property | Type | Default | Description |
|---|---|---|---|
name |
string | Series |
Display name for unmatched scenarios. |
group |
string | Series |
Group label for unmatched scenarios. |
colorIndex |
number | 10 |
Theme style slot (see above). |
sortIndex |
number | 120 |
Sort index for unmatched scenarios. |
Built-in defaults (_system)
Section titled “Built-in defaults (_system)”| Prefix | Name | colorIndex | sortIndex |
|---|---|---|---|
ac |
AC | 10 | 400 |
fc |
FC | 30 | 300 |
pl |
PL | 50 | 200 |
bu |
BU | 50 | 200 |
pp |
PP | 20 | 100 |
py |
PY | 20 | 100 |
dac..dpy |
dAC..dPY | as base | base + 1000 |
drac..drpy |
drAC..drPY | as base | base + 2000 |
bu and py are part of the built-in rules, but no dataset column uses these
prefixes.
Complete example
Section titled “Complete example”JSON string form
Section titled “JSON string form”You can also provide the content as a JSON string:
Attribute Reference
Section titled “Attribute Reference”Common Metadata
Section titled “Common Metadata”| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
apiVersion |
string | yes | - | Must be bino.bi/v1alpha1. |
kind |
string | yes | - | Must be RuleSet. |
metadata.name |
string | yes | - | Unique rule-set identifier. Use _default for global overrides. |
metadata.labels |
object | no | - | Key-value pairs for categorization and constraint matching. |
metadata.annotations |
object | no | - | Arbitrary key-value metadata, not used by the system. |
metadata.description |
string | no | - | Free-form description. |
metadata.constraints |
array | no | - | Conditional inclusion rules. See Constraints. |
Spec Attributes
Section titled “Spec Attributes”| Attribute | Type | Required | Default | Description | Sample |
|---|---|---|---|---|---|
spec.content |
object or string | yes | - | Rule-set overrides as a YAML object or as a JSON string (at least 2 characters). Deep-merged over the _system and _default layers. Rendered as the JSON body of a bn-ruleset element. |
content: { scenarios: { pl: { name: PLAN } } } |
spec.content.scenarios |
object | no | - | Per-scenario-prefix rule overrides, keyed by scenario prefix (ac, fc, pl, bu, pp, py, dac..dpy, drac..drpy, or a user-defined prefix). See Scenario rules. |
scenarios: { pl: { name: PLAN } } |
spec.content.scenarios.<prefix> |
object | no | built-in _system rule of that prefix |
Rule overrides for one scenario prefix. Slots 1-4 are derived from the base values. See Built-in defaults. | pl: { name: PLAN, colorIndex: 50, sortIndex: 900 } |
spec.content.scenarios.<prefix>.name |
string | no | - | Display name; slot 1 shows it as written, slots 2 to 4 with their number (Budget, Budget2). |
name: PLAN |
spec.content.scenarios.<prefix>.colorIndex |
number | no | - | Theme style slot: 10 = ac (solid), 20 = pp (light), 30 = fc (hatched), 50 = pl (outlined). |
colorIndex: 50 |
spec.content.scenarios.<prefix>.sortIndex |
number | no | - | Base sort index for column ordering; slot n adds n*10. |
sortIndex: 900 |
spec.content.fallback |
object | no | - | Style applied to scenario names not present in scenarios. See Fallback rules. |
fallback: { name: Other, colorIndex: 20 } |
spec.content.fallback.name |
string | no | see Fallback rules | Display name for unmatched scenarios. | name: Other |
spec.content.fallback.group |
string | no | see Fallback rules | Group label for unmatched scenarios. | group: Other |
spec.content.fallback.colorIndex |
number | no | see Fallback rules | Theme style slot: 10 = ac (solid), 20 = pp (light), 30 = fc (hatched), 50 = pl (outlined). |
colorIndex: 20 |
spec.content.fallback.sortIndex |
number | no | see Fallback rules | Sort index for column ordering. | sortIndex: 500 |
Components reference a named rule set through their own spec.ruleset
attribute; see Using named rule sets.