Skip to content

Commit 0e036a0

Browse files
archmojetpinard
authored andcommitted
add new mocks to test all attrributes and number formatting
1 parent fc5c2c9 commit 0e036a0

File tree

4 files changed

+425
-0
lines changed

4 files changed

+425
-0
lines changed
54.7 KB
Loading
Loading

test/image/mocks/indicator_attrs.json

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
{
2+
"data": [
3+
{
4+
"type": "indicator",
5+
"mode": "number+delta+gauge",
6+
"value": 12345.6789,
7+
"align": "right",
8+
"domain": {
9+
"x": [
10+
0,
11+
1
12+
],
13+
"y": [
14+
0,
15+
1
16+
],
17+
"row": 0,
18+
"column": 0
19+
},
20+
"title": {
21+
"text": "Customized indicator",
22+
"align": "left",
23+
"font": {
24+
"family": "Arial",
25+
"size": 16,
26+
"color": "#F70"
27+
}
28+
},
29+
"number": {
30+
"valueformat": ".10s",
31+
"font": {
32+
"family": "Arial",
33+
"size": 48,
34+
"color": "red"
35+
},
36+
"prefix": "$",
37+
"suffix": "!"
38+
},
39+
"delta": {
40+
"reference": 10000,
41+
"position": "bottom",
42+
"relative": true,
43+
"valueformat": ".8%",
44+
"increasing": {
45+
"symbol": "",
46+
"color": "blue"
47+
},
48+
"decreasing": {
49+
"symbol": "",
50+
"color": "red"
51+
},
52+
"font": {
53+
"family": "Arial",
54+
"size": 32,
55+
"color": "green"
56+
}
57+
},
58+
"gauge": {
59+
"shape": "angular",
60+
"bar": {
61+
"color": "orange",
62+
"line": {
63+
"color": "red",
64+
"width": 3
65+
},
66+
"thickness": 0.5
67+
},
68+
"bgcolor": "yellow",
69+
"bordercolor": "pink",
70+
"borderwidth": 0.5,
71+
"axis": {
72+
"range": [
73+
-1000,
74+
1000
75+
],
76+
"visible": true,
77+
"tickmode": "auto",
78+
"nticks": 10,
79+
"tick0": 0,
80+
"dtick": 1,
81+
"tickvals": [
82+
0,
83+
1,
84+
2,
85+
3,
86+
4,
87+
5,
88+
6,
89+
7,
90+
8,
91+
9,
92+
10
93+
],
94+
"ticktext": [
95+
"A",
96+
"B",
97+
"C",
98+
"D",
99+
"E",
100+
"F",
101+
"G",
102+
"H",
103+
"I",
104+
"J"
105+
],
106+
"ticks": "outside",
107+
"ticklen": 10,
108+
"tickwidth": 5,
109+
"tickcolor": "blue",
110+
"showticklabels": true,
111+
"tickfont": {
112+
"family": "Arial",
113+
"size": 16,
114+
"color": "green"
115+
},
116+
"tickangle": "auto",
117+
"tickformat": "",
118+
"tickprefix": "[",
119+
"showtickprefix": "all",
120+
"ticksuffix": "]",
121+
"showticksuffix": "all",
122+
"separatethousands": true,
123+
"exponentformat": "none",
124+
"showexponent": "all"
125+
},
126+
"steps": {
127+
"color": "red",
128+
"line": {
129+
"color": "blue",
130+
"width": 2
131+
},
132+
"thickness": 0.5,
133+
"range": [
134+
-100,
135+
100
136+
],
137+
"name": "name"
138+
},
139+
"threshold": {
140+
"line": {
141+
"color": "green",
142+
"width": 0.5
143+
},
144+
"thickness": 0.5,
145+
"value": 1
146+
}
147+
}
148+
}
149+
],
150+
"layout": {
151+
"width": 800,
152+
"height": 500
153+
}
154+
}

0 commit comments

Comments
 (0)