Skip to content

Commit 4201f0a

Browse files
committed
add metatext mock
1 parent 1a1d0c7 commit 4201f0a

File tree

2 files changed

+85
-0
lines changed

2 files changed

+85
-0
lines changed
94.8 KB
Loading

test/image/mocks/layout_metatext.json

+85
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
{
2+
"data": [{
3+
"y": [1, 2, 1]
4+
}, {
5+
"type": "scatterpolar",
6+
"r": [1, 2, 1]
7+
}, {
8+
"type": "scatterternary",
9+
"a": [2, 1, 1],
10+
"b": [1, 2, 1],
11+
"c": [1, 1, 2.12]
12+
}, {
13+
"type": "surface",
14+
"z": [[1, 2, 3], [1, 2, 1], [3, 2, 1]],
15+
"colorbar": {
16+
"title": {"text": "Product %{metatext[0]}", "side": "right"},
17+
"len": 0.3
18+
}
19+
}, {
20+
"type": "pie",
21+
"labels": ["a", "b", "c"],
22+
"values": [1, 2, 3],
23+
"domain": {"row": 0, "column": 1},
24+
"title": {"text": "Employee %{metatext[1]}"}
25+
}],
26+
"layout": {
27+
"metatext": ["A", "B", "<b>IMPORTANT</b>", "company<sup>TM</sup>", 1000],
28+
"grid": {"rows": 3, "columns": 2, "xgap": 0.2, "ygap": 0.35},
29+
"width": 700,
30+
"height": 800,
31+
"margin": {"b": 40},
32+
"showlegend": false,
33+
34+
"title": {"text": "This graph is %{metatext[2]}"},
35+
"xaxis": {
36+
"domain": {"row": 0, "column": 0},
37+
"title": {"text": "Worth more than %{metatext[4]} %{metatext[1]}"}
38+
},
39+
"yaxis": {
40+
"domain": {"row": 0, "column": 0},
41+
"title": {"text": "$ by %{metatext[3]}"}
42+
},
43+
"polar": {
44+
"bgcolor": "#d3d3d3",
45+
"domain": {"row": 1, "column": 0},
46+
"radialaxis": {
47+
"title": {
48+
"text": "%{metatext[3]} -> %{metatext[4]}",
49+
"font": {"color": "red"}
50+
}
51+
}
52+
},
53+
"ternary": {
54+
"domain": {"row": 2, "column": 0},
55+
"aaxis": {"title": {"text": "%{metatext[2]}"}},
56+
"baxis": {"title": {"text": "%{metatext[1]}"}},
57+
"caxis": {"title": {"text": "%{metatext[4]}"}}
58+
},
59+
"scene": {
60+
"domain": {"row": 1, "column": 1},
61+
"camera": {"eye": {"x": 0.01, "y": 0.01, "z": 2.165}},
62+
"xaxis": {"title": {"text": "AX:%{metatext[1]}"}},
63+
"yaxis": {"title": {"text": "AX:%{metatext[0]}"}},
64+
"zaxis": {"title": {"text": "%{metatext[1]}%{metatext[0]}"}},
65+
"annotations": [{
66+
"text": "Look at %{metatext[1]}",
67+
"bgcolor": "#d3d3d3",
68+
"borderpad": 2,
69+
"bordercolor": "#000",
70+
"borderwidth": "1",
71+
"x": 1,
72+
"y": 1,
73+
"z": 2
74+
}]
75+
},
76+
77+
"annotations": [{
78+
"text": "<i>N.B.</i> %{metatext[2]}",
79+
"xref": "x",
80+
"yref": "y",
81+
"x": 1,
82+
"y": 2
83+
}]
84+
}
85+
}

0 commit comments

Comments
 (0)