Skip to content

Commit 4289532

Browse files
committed
improve image test legendrank reversed and group title
1 parent 88c7c54 commit 4289532

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

test/image/baselines/legendrank.png

1.73 KB
Loading

test/image/baselines/legendrank2.png

1.99 KB
Loading

test/image/mocks/legendrank.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{
55
"legendrank": 2,
66
"legendgroup": "pie",
7+
"legendgrouptitle": { "text": "Next pie" },
78
"type": "pie",
89
"labels": ["a","b","c","c","c","a"],
910
"textinfo": "none",
@@ -15,6 +16,7 @@
1516
{
1617
"legendrank": 1,
1718
"legendgroup": "pie",
19+
"legendgrouptitle": { "text": "Pie" },
1820
"type": "pie",
1921
"labels": ["z","x","x","x","y", "y"],
2022
"sort": false,
@@ -25,9 +27,9 @@
2527
}
2628
},
2729
{"type": "scatter", "name": "2", "y": [2], "yaxis": "y", "legendgroup": "one", "legendrank": 2},
28-
{"type": "scatter", "name": "1", "y": [1], "yaxis": "y", "legendgroup": "one", "legendrank": 1},
29-
{"type": "bar", "name": "2", "y": [2], "yaxis": "y2", "legendgroup": "two", "legendrank": 2},
30-
{"type": "scatter", "name": "3", "y": [3], "yaxis": "y", "legendgroup": "one", "legendrank": 3},
30+
{"type": "scatter", "name": "1", "y": [1], "yaxis": "y", "legendgroup": "one", "legendrank": 1, "legendgrouptitle": { "text": "Down" }},
31+
{"type": "bar", "name": "2", "y": [2], "yaxis": "y2", "legendgroup": "two", "legendrank": 2, "legendgrouptitle": { "text": "Up" }},
32+
{"type": "scatter", "name": "3", "y": [3], "yaxis": "y", "legendgroup": "one", "legendrank": 3, "legendgrouptitle": { "text": "IGNORE ME!" }},
3133
{"type": "bar", "name": "3", "y": [3], "yaxis": "y2", "legendgroup": "two", "legendrank": 1}
3234
],
3335
"layout": {
@@ -36,7 +38,8 @@
3638
},
3739
"hovermode": "x unified",
3840
"margin": {
39-
"t": 50
41+
"t": 50,
42+
"b": 25
4043
},
4144
"width": 300,
4245
"height": 400,

test/image/mocks/legendrank2.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,36 @@
33
{
44
"name": "A",
55
"legendrank": 2,
6-
"y": [-2]
6+
"y": [-2],
7+
"legendgrouptitle": { "text": "Middle" }
78
},
89
{
910
"name": "D",
1011
"legendrank": 4,
1112
"y": [-4],
12-
"legendgroup": "bottom"
13+
"legendgroup": "bottom",
14+
"legendgrouptitle": { "text": "Bottom" }
1315
},
1416
{
1517
"name": "E",
1618
"legendrank": 4,
1719
"y": [-4],
18-
"legendgroup": "bottom"
20+
"legendgroup": "bottom",
21+
"legendgrouptitle": { "text": "Second" }
1922
},
2023
{
2124
"name": "B",
2225
"legendrank": 1,
2326
"y": [-1],
24-
"legendgroup": "top"
27+
"legendgroup": "top",
28+
"legendgrouptitle": { "text": "Top" }
2529
},
2630
{
2731
"name": "C",
2832
"legendrank": 3,
2933
"y": [-3],
30-
"legendgroup": "top"
34+
"legendgroup": "top",
35+
"legendgrouptitle": { "text": "Not first" }
3136
}
3237
],
3338
"layout": {

0 commit comments

Comments
 (0)