Data Bars
Draws a horizontal bar behind or beside a numeric value, proportional to the value within a domain. Supports negative values with a center axis, gradient or solid fill, and an option to hide the number. Works in both flat and pivot mode.
Planned. This page shows the specification from issue #198. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
Pivot of Reps by sum of Attainment %. Data bars are on with an automatic domain.
Expected behavior
Bar lengths reflect the values. Negative values draw left of the center axis in the negative color. Changing the domain rescales the bars. Total rows are excluded from domain calculation by default.
Planned API surface
column.dataBardataBar.domaindataBar.filldataBar.negativeColordataBar.axisdataBar.showValuedataBar.scopeAcceptance criteria
- Bar width = (value - min) / (max - min) for an all-positive domain, clamped to [0, 1]. (pending)
- With mixed signs, the axis position reflects where zero falls in the domain. (pending)
- Total rows are excluded from the auto domain unless dataBar.includeTotals is set. (pending)
- The bar never hides the text. The text color adjusts for contrast. (pending)