Skip to content

Commit 28c255c

Browse files
committed
add gl2d annotations mock
1 parent 38b8a92 commit 28c255c

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed
49.8 KB
Loading
+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"data":[{
3+
"type": "scattergl",
4+
"x":[1,1,1,1,1,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,5,5,5,5,5],
5+
"y":[1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
6+
"mode":"markers"
7+
}],
8+
"layout": {
9+
"yaxis":{"autorange":false,"range":[1,5],"showgrid":false,"zeroline":false,"showticklabels":false},
10+
"xaxis":{"autorange":false,"range":[1,5],"showgrid":false,"zeroline":false,"showticklabels":false},
11+
"height":500,
12+
"width":800,
13+
"margin": {"l":100,"r":100,"top":80,"bottom":80,"pad":0},
14+
"showlegend":false,
15+
"annotations":[
16+
{"text":"left top","showarrow":false,"xref":"paper","yref":"paper","xanchor":"left","yanchor":"top","x":0,"y":1},
17+
{"text":"center middle","showarrow":false,"xref":"paper","yref":"paper","xanchor":"center","yanchor":"middle","x":0.25,"y":1},
18+
{"text":"right bottom","showarrow":false,"xref":"paper","yref":"paper","xanchor":"right","yanchor":"bottom","x":0.5,"y":1},
19+
{"text":"move with page","xref":"paper","yref":"paper","x":0.75,"y":1},
20+
{"text":"opacity","opacity":0.5,"x":5,"y":5},
21+
{"text":"not-visible", "visible": false},
22+
{"text":"left<br>justified","showarrow":false,"align":"left","x":1,"y":4},
23+
{"text":"center<br>justified","showarrow":false,"x":2,"y":4},
24+
{"text":"right<br>justified","showarrow":false,"align":"right","x":3,"y":4},
25+
{"text":"no arrow<br>page auto TR","showarrow":false,"xref":"paper","yref":"paper","x":0.75,"y":0.75},
26+
{"text":"no arrow<br>page auto ML","showarrow":false,"xref":"paper","yref":"paper","x":0.25,"y":0.5},
27+
{"text":"no arrow<br>page auto BC","showarrow":false,"xref":"paper","yref":"paper","x":0.5,"y":0.25},
28+
{"text":"default"},
29+
{"text":"no arrow","x":5,"y":4,"showarrow":false},
30+
{"text":"border","showarrow":false,"bordercolor":"rgb(148, 103, 189)","x":4,"y":3},
31+
{"text":"border width","showarrow":false,"bordercolor":"rgb(0, 0, 255)","borderwidth":3,"x":5,"y":3},
32+
{"text":"background","showarrow":false,"bgcolor":"rgb(255, 127, 14)","x":4,"y":2},
33+
{"text":"padding","showarrow":false,"bordercolor":"rgb(0, 0, 0)","borderpad":3,"x":5,"y":2},
34+
{"text":"angle<br>Bottom R","showarrow":false,"textangle":40,"x":1,"y":1,"xanchor":"right","yanchor":"bottom"},
35+
{"text":"angle<br>Middle C","showarrow":false,"textangle":-70,"x":2,"y":1,"xanchor":"center","yanchor":"middle"},
36+
{"text":"angle<br>Top L","showarrow":false,"textangle":160,"x":3,"y":1,"xanchor":"left","yanchor":"top"},
37+
{
38+
"text":"arrowhead styling","arrowcolor":"rgb(214, 39, 40)","arrowwidth":4.1,"arrowhead":7,
39+
"ax":-34,"ay":37,"arrowsize":2,"x":4,"y":1
40+
},
41+
{
42+
"text":"All together<br>with<sup style=\"font-family:raleway;fill:rgb(0,255,255)\">STYLE</sup>",
43+
"opacity":0.6,"arrowwidth":5,"arrowhead":3,"ax":-77,"ay":-5,
44+
"bordercolor":"rgb(255, 0, 0)","borderwidth":4,"bgcolor":"rgba(255,255,0,0.5)",
45+
"font":{"color":"rgb(0, 0, 255)","size":20},
46+
"arrowcolor":"rgb(166, 28, 0)","borderpad":3,"textangle":50,"x":5,"y":1
47+
},
48+
{"text":"","showarrow":true,"borderwidth":1.2,"arrowhead":2,"axref":"x","ayref":"y","x":5,"y":3,"ax":4,"ay":5},
49+
{"text":"","showarrow":true,"borderwidth":1.2,"arrowhead":2,"axref":"x","ayref":"y","x":6,"y":2,"ax":3,"ay":3}
50+
]
51+
}
52+
}

0 commit comments

Comments
 (0)