Skip to content

Commit 4346611

Browse files
committed
template mock
1 parent 8e2a321 commit 4346611

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

test/image/baselines/template.png

54.7 KB
Loading

test/image/mocks/template.json

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"config": {"editable": true},
3+
"data": [
4+
{"y": [1, 2, 3]},
5+
{"y": [2, 4, 3]},
6+
{"y": [4, 3, 2], "xaxis": "x2", "yaxis": "y2"},
7+
{"type": "bar", "y": [0.5, 1, 1.5], "text": [0.5, 1, 1.5]},
8+
{"y": [3, 5, 4], "xaxis": "x2", "yaxis": "y2"}
9+
],
10+
"layout": {
11+
"width": 600,
12+
"height": 500,
13+
"yaxis2": {"anchor": "x2", "title": "y2"},
14+
"annotations": [
15+
{"text": "Hi!", "x": 0, "y": 3.5},
16+
{"templateitemname": "watermark", "font": {"size": 120}},
17+
{"templateitemname": "watermark", "font": {"size": 110}},
18+
{"templateitemname": "watermark", "font": {"size": 100}},
19+
{"templateitemname": "nope", "text": "Buh-bye"}
20+
],
21+
"shapes": [
22+
{
23+
"type": "line", "xref": "paper", "yref": "paper",
24+
"x0": -0.1, "x1": 1.15, "y0": 1.05, "y1": 1.05
25+
}
26+
],
27+
"template":{
28+
"data":{
29+
"scatter": [
30+
{"mode": "lines"},
31+
{"mode": "markers", "fill": "tonexty"}
32+
],
33+
"bar": [
34+
{"textposition": "inside", "insidetextfont": {"color": "white"}},
35+
{"textposition": "outside", "outsidetextfont": {"color": "red"}}
36+
]
37+
},
38+
"layout":{
39+
"colorway": ["red", "green", "blue"],
40+
"xaxis": {"domain": [0, 0.45], "color": "#CCC", "title": "XXX"},
41+
"xaxis2": {"domain": [0.55, 1], "title": "XXX222"},
42+
"yaxis": {"color": "#88F", "title": "y"},
43+
"legend": {"bgcolor": "rgba(0,0,0,0)"},
44+
"annotationdefaults": {"arrowcolor": "#8F8", "arrowhead": 7, "ax": 0},
45+
"annotations": [
46+
{
47+
"name": "warning", "text": "Be Cool",
48+
"xref": "paper", "yref": "paper", "x": 1, "y": 0,
49+
"xanchor": "left", "yanchor": "bottom", "showarrow": false
50+
},
51+
{
52+
"name": "warning2", "text": "Stay in School",
53+
"xref": "paper", "yref": "paper", "x": 1, "y": 0,
54+
"xanchor": "left", "yanchor": "top", "showarrow": false
55+
},
56+
{
57+
"name": "watermark", "text": "Plotly", "textangle": 25,
58+
"xref": "paper", "yref": "paper", "x": 0.5, "y": 0.5,
59+
"font": {"size": 40, "color": "rgba(0,0,0,0.1)"},
60+
"showarrow": false
61+
}
62+
],
63+
"shapedefaults": {"line": {"color": "#C60", "width": 4}},
64+
"shapes": [
65+
{
66+
"name": "outline", "type": "rect",
67+
"xref": "paper", "yref": "paper",
68+
"x0": -0.15, "x1": 1.2, "y0": -0.1, "y1": 1.1,
69+
"fillcolor": "rgba(160,160,0,0.1)",
70+
"line": {"width": 2, "color": "rgba(160,160,0,0.25)"}
71+
}
72+
]
73+
}
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)