Skip to examples
Browse analysis capabilities

Ranking & contribution / ANNOTATION GUIDE

contribution

Sum selected values and divide by the total of all input values.

01 / EXPLORE

See it in action.

Compare parameter variations. Switch to Code to copy an example with the active theme.

Default configuration · Pie Chart

Contribution of one observation · Pie Chart

02 / CONFIGURE

Make it yours.

Add this configuration to the annotations array in your chart JSON.

Configuration

PropertyTypeRequiredDescription
type'contribution'requiredExact annotation type; keep the spelling and capitalization shown here.
dataSelection | TableMappingrequiredSelect observations to sum; tables also require field.
labelstringoptionalOverride the computed label; use an empty string to hide it.
styleAnnotationStyle<'contribution'>optionalReuse the shared style definition with the fields supported by this annotation type.

03 / CHART SUPPORT

Choose a supported chart.

One example for each supported chart type. The default chart is shown above; the remaining charts use the same annotation configuration.

Calculation rules & limits

  • Requires nonnegative additive values. Share equals the selected sum divided by all input values; a zero total produces no annotation.
  • Supply a selection, rather than a precomputed total or share.
  • Tables require data.field for calculation; data.row limits candidates and data.column selects the emphasized column.
Full configuration reference

contribution · Line Chart

contribution · Area Chart

Column Chart

Chart type guide

contribution · Column Chart

contribution · Bar Chart

Scatter Chart

Chart type guide

contribution · Scatter Chart

contribution · Table

Example theme

Shared with Theme Studio. Applies to chart and annotation examples.

Default theme

Preset theme

theme.json
{
  "id": "default",
  "label": "Default theme",
  "baseTheme": "default"
}

Copied examples include this theme. Your selection is saved in this browser.