Forum Discussion
Markzolotoy
Impactful Individual
3 years ago100% Clustered Stacked Column Chart with data labels
So far I see that this is still in "submit idea" stage, for years.
Does anyone know an unexpensive visual that would do 100% Clustered Stacked Column Chart with data labels?
Thanks
Markzolotoy
Impactful Individual
3 years agolbendlin Data labels as actual numbers.
lbendlin
Super User
3 years agoThis should get you started. The placement of the text needs to be tuned.
- Markzolotoy3 years ago
Impactful Individual
- lbendlin3 years ago
Super User
no idea what that means.
Table:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WckktyMmvTE1R0lEyNjQBkkaWFoZKsTrRSsGpRWWpRcVAIUsgNoCLZSanggRBao1NwaKORckZmWWpQAFDiMpYAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [System = _t, Alerts = _t, OK = _t]), #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(Source, {"System"}, "Attribute", "Value"), #"Changed Type" = Table.TransformColumnTypes(#"Unpivoted Other Columns",{{"Value", type number}}) in #"Changed Type"Vega Lite:
{ "data": {"name": "dataset"}, "encoding": { "x": { "field": "System", "type": "nominal" }, "y": { "field": "Sum of Value", "type": "quantitative", "stack":"normalize" }, "yOffset": {"field": "Attribute"}, "color": {"field": "Attribute"}, "opacity": { "condition": { "test": { "field": "__selected__", "equal": "off" }, "value": 0.3 }, "value": 1 } }, "layer": [ { "mark": { "type": "bar", "tooltip": true } }, { "mark": { "type": "text", "color": "black", "dx": -15, "dy": -15 }, "encoding": { "detail": { "type": "nominal", "field": "Attribute" }, "text": { "type": "quantitative", "aggregate": "sum", "field": "Sum of Value", "format": ".0f" } } } ] }- Markzolotoy3 years ago
Impactful Individual
lbendlin I was able to open the file. I see this Deneb control for the first time, please explain where this Vega code is stored and how do I get real data into it?