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
Pk8524
Helper I
Helper I

Column chart with different height and width - svg

I would like to achieve a column chart using svg with different height, widht and project name. I have a very simple data:

 

03.jpg

 

The goal is to have something like this:

 

01.jpg

 

i have managed to do some svg which horizontally works and we see different widht but not in vertical:

 

02.jpg

 

Can you help me to create such custom visual?

 

https://drive.google.com/file/d/1CtnSe47cWBdqrqjdZs4_q01mKUfRfsBP/view?usp=sharing 

1 REPLY 1
lbendlin
Super User
Super User

Have you considered using Deneb for this?

 

lbendlin_0-1741363431009.png

{
  "data": {
    "name": "dataset"
  },
  "transform": [
    {
      "window": [
        {
          "op": "sum",
          "field": "Width",
          "as": "cum_total"
        }
      ],
      "sort": [
        {
          "field": "Project",
          "order": "ascending"
        }
      ],
      "frame": [null, 0]
    },
    {
      "calculate": "0", "as": "bottomedge"
    },
    {
      "calculate": "datum.cum_total - datum['Width'] + 2", "as": "leftedge"
    }
  ],"mark": {
    "type": "bar"
  },
  "encoding": {
    "x": {
      "field": "cum_total",
      "type": "quantitative"
    },
    "x2": {"field":"leftedge"},
    "y2": {"field":"bottomedge"},
    "y": {
      "field": "Height",
      "type": "quantitative"
    },
    "color":{"field":"Project"}
  }
}

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.