0

I am making a bar chart in D3 v4 and want each bar to have top left and top right rounded corners. The bar chart's y-axis also has negative values, so for data <0, the rect elements will have bottom left and bottom right rounded corners. Assigning rx and ry attributes rounds all four corners instead of just the aforementioned corners. Is there no equivalent to CSS's border-top-right-radius?

Biiiiiird
  • 384
  • 1
  • 3
  • 17
  • There's a path, you can draw anything you like with that including. rect with two rounded corners. – Robert Longson Sep 29 '17 at 22:43
  • Thanks. So for every data element/bar in the graph I have to draw a path? This seems overly complicated for something that to me should be trivial. – Biiiiiird Sep 29 '17 at 22:45
  • you can easily make your own function for that, see [this example](https://bl.ocks.org/mbostock/3468167) – gcalmettes Sep 29 '17 at 22:57

0 Answers0