Skip to content
GitHub

ScalingGroup

ScalingGroup manifests define named scaling values that multiple chart components can reference. When several components share the same scaling group name, their bar lengths (absolute variances) or pin lengths (relative variances) are guaranteed to use the same em-based scale, making visual comparisons across components meaningful.

The smallest well-formed ScalingGroup is the name that consumers reference plus the scaling value. spec.value is the only spec attribute.

apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_scale
spec:
  value: 250000

All attributes are listed in the Attribute Reference below.

  • value – required. A positive number. The unit depends on the consumer attribute — all of them are map-scale semantics: a larger value means more data per em, i.e. smaller bars.
    • When referenced by unitScalingdata units per 1 em of bar length (250000 → 1 em of bar represents 250 000 units).
    • When referenced by percentageScalingpercentage points per 1 em of pin length (10 → a +10 % variance pin is 1 em long).
    • When referenced by a bubble chart's size.groupdata units per 1 em² of bubble area.
  1. Define one or more ScalingGroup manifests with a unique metadata.name and a numeric value.
  2. On consumer components (ChartTime, ChartStructure, and ChartBubble via size.group), set unitScaling and/or percentageScaling to the scaling group name instead of a hard-coded number.
  3. Every consumer that references the same name resolves to the same value. Changing the ScalingGroup value updates all consumers at once.

Because the value is em-based, one group works uniformly across charts: a revenue delta of 500 000 at value: 250000 renders as a 2 em bar in every consumer, proportioned relative to each component's own font size.

A time chart and a structure chart that share the same absolute and relative scaling:

---
apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_abs
spec:
  value: 250000
---
apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_pct
spec:
  value: 10
---
apiVersion: bino.bi/v1alpha1
kind: ChartTime
metadata:
  name: revenue_trend
spec:
  dataset: revenue_monthly
  chartTitle: "Revenue trend"
  dateInterval: month
  measureScale: M
  measureUnit: "EUR"
  scenarios: ["ac1", "pp1"]
  variances: ["dac1_pp1_pos", "drac1_pp1_pos"]
  unitScaling: revenue_abs
  percentageScaling: revenue_pct
---
apiVersion: bino.bi/v1alpha1
kind: ChartStructure
metadata:
  name: revenue_chart
spec:
  dataset: revenue_by_segment
  chartTitle: "Revenue by segment"
  level: category
  order: ac1
  orderDirection: desc
  measureScale: M
  measureUnit: "EUR"
  scenarios: ["ac1", "pp1"]
  variances: ["dac1_pp1_pos"]
  unitScaling: revenue_abs
  percentageScaling: revenue_pct

Both components render bars at exactly 250 000 units per em and pins at 10 percentage points per em. A revenue delta of 500 000 always produces a 2 em bar regardless of which component it appears in.

Example: Multiple pages with shared scaling

Section titled “Example: Multiple pages with shared scaling”

Use a single scaling group across components on different layout pages:

---
apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: cost_scale
spec:
  value: 50000
---
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
  name: overview_page
spec:
  pageLayout: split-vertical
  children:
    - kind: ChartTime
      spec:
        dataset: cost_monthly
        chartTitle: "Monthly cost"
        dateInterval: month
        scenarios: ["ac1", "fc1"]
        variances: ["dac1_fc1_pos"]
        unitScaling: cost_scale
    - kind: ChartStructure
      spec:
        dataset: cost_by_department
        chartTitle: "Cost by department"
        level: category
        scenarios: ["ac1", "fc1"]
        variances: ["dac1_fc1_pos"]
        unitScaling: cost_scale
ApproachProsCons
Numeric (unitScaling: 250000)Simple, self-containedMust update every component individually when tuning the scale
Scaling group (unitScaling: cost_scale)Single source of truth; all consumers stay in syncRequires an extra manifest

Use scaling groups when two or more components should be visually comparable. Use a plain number when a component stands alone.

Group members agree in em-space: bars match relative to each component's effective font size. If consumers use different scale factors (or auto-scale to different sizes), their bars match proportionally to their own typography, not in absolute pixels — give them the same fixed scale when pixel-identical bars are required.

  • Avoid the name auto. It passes validation, but consumer attributes read auto as the auto-fit keyword, so the group can never be referenced.
  • Avoid names that would parse as a number — including SI-suffixed forms like 1M or 250k. They pass validation too, but they are ambiguous with a literal scaling value on the consumer attribute.
  • Two groups with the same name are a hard error: validation reports duplicate ScalingGroup name per artefact, after constraints are applied.
AttributeTypeRequiredDefaultDescription
apiVersionstringyesMust be bino.bi/v1alpha1.
kindstringyesMust be ScalingGroup.
metadata.namestringyesUnique identifier. Referenced by consumer components in unitScaling, percentageScaling or size.group. Duplicate names are a validation error. Avoid auto and names that parse as a number (e.g. 1M) — consumers read those as literal values.
metadata.labelsobjectnoKey-value pairs for categorization and constraint matching.
metadata.annotationsobjectnoArbitrary key-value metadata, not used by the system.
metadata.descriptionstringnoFree-form description.
metadata.constraintsarraynoConditional inclusion rules. See Constraints.
AttributeTypeRequiredDefaultDescriptionSample
spec.valuenumberyesScaling value, greater than 0. Meaning depends on context: data units per em of bar (for unitScaling), percentage points per em of pin (for percentageScaling), or data units per em² of bubble area (for size.group). Larger value = smaller bars.value: 250000