Skip to content
GitHub

ScalingGroup

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

apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_scale
spec:
  value: 0.001
  • value – required. The scaling factor applied to every component that references this group. The meaning depends on the consumer attribute:
    • When referenced by unitScaling – pixels per data unit for absolute variance bars.
    • When referenced by percentageScaling – pixels per percentage point for relative variance pins.
  1. Define one or more ScalingGroup manifests with a unique metadata.name and a numeric value.
  2. On consumer components (Table, ChartTime, ChartStructure), 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 numeric factor. Changing the ScalingGroup value updates all consumers at once.

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

---
apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_abs
spec:
  value: 0.001
---
apiVersion: bino.bi/v1alpha1
kind: ScalingGroup
metadata:
  name: revenue_pct
spec:
  value: 0.5
---
apiVersion: bino.bi/v1alpha1
kind: Table
metadata:
  name: revenue_table
spec:
  dataset: revenue_by_segment
  tableTitle: "Revenue by segment"
  measureScale: M
  measureUnit: "EUR"
  scenarios: ["ac1", "pp1"]
  variances: ["dac1_pp1_pos", "drac1_pp1_pos"]
  barColumns: ["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 0.001 pixels per unit and pins at 0.5 pixels per percentage point. A revenue delta of 5 000 always produces the same bar length 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: 0.002
---
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: Table
      spec:
        dataset: cost_by_department
        tableTitle: "Cost by department"
        scenarios: ["ac1", "fc1"]
        variances: ["dac1_fc1_pos"]
        barColumns: ["dac1_fc1_pos"]
        unitScaling: cost_scale
ApproachProsCons
Numeric (unitScaling: 0.001)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.

AttributeTypeRequiredDefaultDescription
apiVersionstringyesMust be bino.bi/v1alpha1.
kindstringyesMust be ScalingGroup.
metadata.namestringyesUnique identifier. Referenced by consumer components in unitScaling or percentageScaling. The name auto is reserved and cannot be used.
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 factor. Meaning depends on context: pixels per data unit (for unitScaling) or pixels per percentage point (for percentageScaling).value: 0.001