open-innovations / oi-lume-viz

Lume Plugin that enables charting
https://open-innovations.github.io/oi-lume-viz/
5 stars 1 forks source link

Can we make a "fixed height" or "percentage" bar chart? #29

Closed luke-strange closed 1 year ago

luke-strange commented 1 year ago

https://chartio.com/learn/charts/stacked-bar-chart-complete-guide/

We want something where each category is normalised to 0-100%.

Need to think about how we would present the tooltips on this, and not lose the original data values.

luke-strange commented 1 year ago

Name: 100 percent chart (from excel)

slowe commented 1 year ago

Setting the flag percent: true on a stacked: true bar chart will create a dummy column for each series that is scaled to 100% and use that instead. The dummy column has the same name as the original column but with _percent appended. These dummy values are created before any virtual columns are created so that tooltips can be created using these dummy values.