There was an error while loading. Please reload this page.
1 parent 0684198 commit 17e2399Copy full SHA for 17e2399
1 file changed
src/marks/bar.js
@@ -17,6 +17,8 @@ export class AbstractBar extends Mark {
17
insetRight = 0,
18
insetBottom = 0,
19
insetLeft = 0,
20
+ rx,
21
+ ry,
22
transform,
23
...style
24
} = {}
@@ -39,8 +41,11 @@ export class AbstractBar extends Mark {
39
41
this.insetRight = number(insetRight);
40
42
this.insetBottom = number(insetBottom);
43
this.insetLeft = number(insetLeft);
44
+ this.rx = number(rx);
45
+ this.ry = number(ry);
46
}
47
render(I, scales, channels, dimensions) {
48
+ const {rx, ry} = this;
49
const {color} = scales;
50
const {z: Z, title: L, fill: F, stroke: S} = channels;
51
const index = filter(I, ...this._positions(channels), F, S);
@@ -58,6 +63,8 @@ export class AbstractBar extends Mark {
58
63
.attr("height", this._height(scales, channels, dimensions))
59
64
.attr("fill", F && (i => color(F[i])))
60
65
.attr("stroke", S && (i => color(S[i])))
66
+ .call(rx != null ? rect => rect.attr("rx", rx) : () => {})
67
+ .call(ry != null ? rect => rect.attr("ry", ry) : () => {})
61
68
.call(title(L)))
62
69
.node();
70
0 commit comments