Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I have created the below table in Deneb using vega lite, i need it to show all of the bin values that are the x axis, including ones where the value is zero, at present it only shows bin sizes that have a value in.
My current code is below:
{
"data": {"name": "dataset"},
"encoding":{
"y": {
"field": "Category",
"title": null,
"sort": "descending"
},
"x": {
"field": "Bin Name",
"type": "nominal",
"sort": {"field": "Min"},
"axis": {
"orient": "bottom",
"title": null
}
},
"tooltip": [
{"field": "Category"},
{"field": "Bin Name"},
{"field": "Metric"}
]
},
"layer": [
{
"mark": {"type": "rect"},
"encoding": {
"color": {
"field": "Metric",
"scale":{
"scheme": "lightgreyteal"
},
"legend": null
}
}
}
]
}
Any advice appreciated.
Regards,
JJ
Solved! Go to Solution.
Hi @DW868990. It's hard to tell without seeing a sample of your dataset, but it looks like the bins are created outside of Deneb and then passed in to be used as the x-axis. A different approach would be to pass the raw values in and then perform the binning in vega-lite. Then you could explicitly set the scale domain values.
If this is enough info to get you closer to what you are after, then please consider marking this as the solution. However, if you are willing to provide a representive mock dataset, I'd be happy to try to provide a more thorough answer and a vega-lite spec.
Hi @DW868990. It's hard to tell without seeing a sample of your dataset, but it looks like the bins are created outside of Deneb and then passed in to be used as the x-axis. A different approach would be to pass the raw values in and then perform the binning in vega-lite. Then you could explicitly set the scale domain values.
If this is enough info to get you closer to what you are after, then please consider marking this as the solution. However, if you are willing to provide a representive mock dataset, I'd be happy to try to provide a more thorough answer and a vega-lite spec.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.