Skip to content

Commit 90cf5c3

Browse files
archmojemilykl
authored andcommitted
add text to zz-bar-rounded-corners
1 parent 71b53c3 commit 90cf5c3

File tree

2 files changed

+22
-11
lines changed

2 files changed

+22
-11
lines changed
6.31 KB
Loading

test/image/mocks/zz-bar-rounded-corners.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
],
1010
"y": [20, -14, 2, 18],
1111
"type": "bar",
12+
"texttemplate": "%{y}",
13+
"textfont": {"size": 20},
1214
"marker": {"cornerradius": 15},
1315
"name": "Reversed"
1416
},
@@ -18,11 +20,13 @@
1820
"orangutans",
1921
"monkeys",
2022
"capybaras"
21-
],
22-
"x": [20, -4, 1, 18],
23-
"base": [1, 2, 1, 2],
24-
"type": "bar",
25-
"orientation": "h",
23+
],
24+
"x": [20, -4, 1, 18],
25+
"base": [1, 2, 1, 2],
26+
"type": "bar",
27+
"orientation": "h",
28+
"texttemplate": "%{y}: %{x}",
29+
"textfont": {"size": 10},
2630
"xaxis": "x2",
2731
"yaxis": "y2",
2832
"name": "Normal"
@@ -36,6 +40,8 @@
3640
],
3741
"y": [20, -14, 2, 18],
3842
"type": "bar",
43+
"texttemplate": "%{y}",
44+
"textfont": {"size": 10},
3945
"marker": {"cornerradius": "40%"},
4046
"xaxis": "x3",
4147
"yaxis": "y3",
@@ -62,18 +68,23 @@
6268
"orangutans",
6369
"monkeys",
6470
"capybaras"
65-
],
66-
"x": [20, -4, 1, 18],
67-
"base": [1, 2, 1, 2],
68-
"type": "bar",
69-
"marker": {"cornerradius": "20.5%"},
70-
"orientation": "h",
71+
],
72+
"x": [20, -4, 1, 18],
73+
"base": [1, 2, 1, 2],
74+
"type": "bar",
75+
"marker": {"cornerradius": "20.5%"},
76+
"orientation": "h",
77+
"texttemplate": "%{y}: %{x}",
78+
"textfont": {"size": 10},
79+
"insidetextanchor": "middle",
7180
"xaxis": "x4",
7281
"yaxis": "y4",
7382
"name": "Reversed"
7483
}
7584
],
7685
"layout": {
86+
"width": 900,
87+
"height": 450,
7788
"grid": {"rows": 2, "columns": 2, "pattern": "independent"},
7889
"barmode": "stack",
7990
"barcornerradius": "10",

0 commit comments

Comments
 (0)