Search code examples
vegavega-lite

How to Create Rounded Bar Charts vega


I am using vega library to render my column chart, I have gone through all the provided example in vega site but unable to find how I can make rounded column of my column chart,

Thank you very much if anybody can help enter image description here


Solution

  • You can set the cornerRadius property of the mark.

    "mark": {
      "type": "rect",
      "cornerRadius": 10
    },
    

    enter image description here

    Try it here: https://vega.github.io/editor/#/url/vega-lite/N4KABGBEAkDODGALApgWwIaQFxUQFzwAdYsB6UgN2QHN0A6agSz0QFcAjOxge1IRQyUa6ALQAbZskoAmOgCtY3AHaQANOCgATZAgBOjQnh4qckAIJhYjVITHIw7dLrBIneMAHdmiMGnbJNbU0wTXQ8ejUNSFDw7DBQCAhICnQxVh04gG0NRPjITFMzNUh2OOkADgBfVTyCqAAhYtKcAFYW6tq4yABhJriAFgBmapzE4HyugBE+nABOAEYO8brIAFEZsHLFmuWugDENluH1XIhd0wBxDfnZpYnTAAkN8oB2O5WASUPpStGAXQ0I0gGF0AGs4gkoHgAJ6EZBdXTIeB4SJJeDcXRKZC6ABK6E0jFYsDi8wADCARklkEp0QSlNQIaNIAAPCGQABmjGQYk0XUwNUgMLhXQxdNSkEpiUg0LZnO5vNMpQFQvhpgAjqx0EojOEjFQJYCKSAgA