Skip to content

Commit f61cd4d

Browse files
committed
first pass 3d annotation image test support
1 parent 9520943 commit f61cd4d

File tree

4 files changed

+91
-1
lines changed

4 files changed

+91
-1
lines changed
32.7 KB
Loading
1.55 KB
Loading
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"data": [{
3+
"type": "scatter3d",
4+
"x": ["2017-01-01", "2017-02-10", "2017-03-20"],
5+
"y": ["A", "B", "C"],
6+
"z": [1, 1e3, 1e5]
7+
}],
8+
"layout": {
9+
"scene": {
10+
"camera": {
11+
"eye": {"x": 2.1, "y": 0.1, "z": 0.9}
12+
},
13+
"xaxis": {
14+
"title": ""
15+
},
16+
"yaxis": {
17+
"title": ""
18+
},
19+
"zaxis": {
20+
"type": "log",
21+
"title": ""
22+
},
23+
"annotations": [{
24+
"showarrow": false,
25+
"x": "2017-01-01",
26+
"y": "A",
27+
"z": 0,
28+
"text": "Point 1",
29+
"xanchor": "left",
30+
"xshift": 10,
31+
"opacity": 0.7
32+
}, {
33+
"x": "2017-02-20",
34+
"y": "B",
35+
"z": 4,
36+
"text": "Point 2<br><b>watch out!!</b>",
37+
"textangle": 30,
38+
"ax": 30,
39+
"ay": -100,
40+
"font": {
41+
"color": "blue",
42+
"size": 20
43+
},
44+
"bgcolor": "#d3d3d3",
45+
"bordercolor": "#000",
46+
"borderwidth": 2,
47+
"borderpad": 10,
48+
"standoff": 12,
49+
"arrowcolor": "blue",
50+
"arrowsize": 3,
51+
"arrowwidth": 1,
52+
"arrowhead": 5
53+
}, {
54+
"x": "2017-03-20",
55+
"y": "C",
56+
"z": 5,
57+
"ax": 50,
58+
"ay": 0,
59+
"text": "<i>Threshold</i>",
60+
"bordercolor": "#000",
61+
"borderwidth": 2,
62+
"arrowhead": 7,
63+
"width": 100,
64+
"height": 50,
65+
"xanchor": "left",
66+
"yanchor": "bottom",
67+
"align": "right",
68+
"valign": "bottom"
69+
}, {
70+
"x": "2016-12-25",
71+
"y": "A",
72+
"z": 6,
73+
"text": "autorange bump!",
74+
"ax": -50
75+
}]
76+
}
77+
}
78+
}

test/image/mocks/gl3d_triangle.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@
1010
"k":[2]
1111
}],
1212
"layout": {
13-
"title": "Triangle mesh"
13+
"title": "Triangle mesh",
14+
"scene": {
15+
"annotations": [{
16+
"x": 2,
17+
"y": 1,
18+
"z": 0,
19+
"ax": -50,
20+
"ay": -300,
21+
"text": "<span style=\"color:red;\">IMPORTANT</span>"
22+
}]
23+
},
24+
"width": 600,
25+
"height": 500
1426
}
1527
}

0 commit comments

Comments
 (0)