Reputation: 1
I am trying to create a faceted donut chart in PowerBI using Deneb, and Vega-lite. However, when I try to add faceting to my existing chart, I get an error saying that "facet" or "column" are not allowed in the "encoding" section.
I tried using the code shown on the Vega-lite github pie and donut charts example page here to create multiples of the donut chart using "column". I also tried using "facet". However, both resulted in an error that reads "Property column [facet] is not allowed."
This is under the Spec section of Deneb. My code:
{
"data": {
"name": "dataset"
},
"layer": [
{
"description": "Outer donut for showing the KPI % measure",
"mark": {
"type": "arc",
"radius": 98,
"radius2": 70
},
"encoding": {
"column": {
"field": "Location_ID"
},
"theta": {
"field": "Result_umol-L",
"type": "quantitative",
"aggregate": "sum"
},
"color": {
"field": "Data Color Fixed",
"type": "nominal",
"scale": null
}
}
}
{
"description": "KPI text inside the donut",
"mark": {
"type": "text",
"yOffset": 7,
"baseline": "bottom",
"font": "DIN",
"fontSize": 20,
"fontWeight": "bold",
"color": "#000000"
},
"encoding": {
"text": {
"aggregate": "sum",
"field": "Result",
"type": "quantitative",
"format": "0.0 ug/L",
"formatType": "pbiFormat"
}
}
},
{
"description": "Location text inside donut",
"mark": {
"type": "text",
"yOffset": 7,
"baseline": "top",
"font": "DIN",
"fontSize": 20,
"fontWeight": "bold",
"color": "#000000"
},
"encoding": {
"text": {
"aggregate": "min",
"field": "Location_ID",
"type": "nominal",
"formatType": "pbiFormat"
}
}
}
]
}
Upvotes: 0
Views: 26