我知道svg有一个内置功能来做圆角,但我需要在四个角中的两个角上做圆角.
我知道我可以在彼此之上绘制多个矩形来模仿它,但这看起来有点俗气.有什么方法可以使用剪辑或任何d3.js方法吗?
现在我有一个水平条形图,其形状如下:
rects.enter().append("rect")
.attr("x",function(d,i) { return x(0); })
.attr("width",function(d) { return x(d.value) - x(0); })
.attr("height",y.rangeBand())
.attr("y",function(d) { return y(d.name); })
Run Code Online (Sandbox Code Playgroud)
我试图在rect的右侧产生圆角,但不知道该怎么做.
我正在尝试实现类似图表的条形图.我有以下html元素
<rect x="35" y="-135" width="10" height="51" style="stroke: rgb(255, 255, 255); opacity: 0.8; fill: rgb(255, 122, 0);"></rect>
Run Code Online (Sandbox Code Playgroud)
我想给矩形的顶角一个圆角形状.这怎么可能?
我无法应用border-radius属性.