Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
DW868990
Helper IV
Helper IV

Deneb Vega Lite Table - Need to show values of zero

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.

 

DW868990_0-1674042608281.png

 

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

1 ACCEPTED SOLUTION
giammariam
Solution Sage
Solution Sage

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. 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

1 REPLY 1
giammariam
Solution Sage
Solution Sage

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. 



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.