Skip to content

Commit 5b7b18f

Browse files
committedAug 14, 2020
fixup for symbols below 200 and add image test
1 parent d3136aa commit 5b7b18f

File tree

4 files changed

+97
-0
lines changed

4 files changed

+97
-0
lines changed
 

Diff for: ‎src/components/drawing/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,11 @@ Object.keys(SYMBOLDEFS).forEach(function(k) {
220220
var n = symDef.n;
221221
drawing.symbolList.push(
222222
n,
223+
String(n),
223224
k,
225+
224226
n + 100,
227+
String(n + 100),
225228
k + '-open'
226229
);
227230
drawing.symbolNames[n] = k;
@@ -237,6 +240,7 @@ Object.keys(SYMBOLDEFS).forEach(function(k) {
237240
n + 200,
238241
String(n + 200),
239242
k + '-dot',
243+
240244
n + 300,
241245
String(n + 300),
242246
k + '-open-dot'

Diff for: ‎test/image/baselines/symbols_string-numbers.png

18.6 KB
Loading

Diff for: ‎test/image/mocks/symbols_string-numbers.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"data": [
3+
{
4+
"y": [
5+
0,
6+
0,
7+
0,
8+
0
9+
],
10+
"type": "scatter",
11+
"mode": "markers",
12+
"marker": {
13+
"line": { "width": 3, "color": "black" },
14+
"size": 14,
15+
"symbol": "1"
16+
}
17+
},
18+
{
19+
"y": [
20+
1,
21+
1,
22+
1,
23+
1
24+
],
25+
"type": "scatter",
26+
"mode": "markers",
27+
"marker": {
28+
"line": { "width": 3, "color": "black" },
29+
"size": 14,
30+
"symbol": "101"
31+
}
32+
},
33+
{
34+
"y": [
35+
2,
36+
2,
37+
2,
38+
2
39+
],
40+
"type": "scatter",
41+
"mode": "markers",
42+
"marker": {
43+
"line": { "width": 3, "color": "black" },
44+
"size": 14,
45+
"symbol": "201"
46+
}
47+
},
48+
{
49+
"y": [
50+
3,
51+
3,
52+
3,
53+
3
54+
],
55+
"type": "scatter",
56+
"mode": "markers",
57+
"marker": {
58+
"line": { "width": 3, "color": "black" },
59+
"size": 14,
60+
"symbol": "301"
61+
}
62+
},
63+
{
64+
"y": [
65+
4,
66+
4,
67+
4,
68+
4
69+
],
70+
"type": "scatter",
71+
"mode": "markers",
72+
"marker": {
73+
"line": { "width": 3, "color": "black" },
74+
"size": 14,
75+
"symbol": [
76+
"1",
77+
"101",
78+
"201",
79+
"301"
80+
]
81+
}
82+
}
83+
],
84+
"layout": {
85+
"title": {
86+
"text": "Accept symbol numbers in string format"
87+
},
88+
"width": 400,
89+
"height": 400
90+
}
91+
}

Diff for: ‎test/jasmine/tests/mock_test.js

+2
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ var list = [
905905
'sunburst_values_colorscale',
906906
'sunburst_with-without_values',
907907
'sunburst_zero_values_textfit',
908+
'symbols_string-numbers',
908909
'table_latex_multitrace_scatter',
909910
'table_plain_birds',
910911
'table_ragged',
@@ -1952,6 +1953,7 @@ figs['sunburst_values'] = require('@mocks/sunburst_values');
19521953
figs['sunburst_values_colorscale'] = require('@mocks/sunburst_values_colorscale');
19531954
figs['sunburst_with-without_values'] = require('@mocks/sunburst_with-without_values');
19541955
figs['sunburst_zero_values_textfit'] = require('@mocks/sunburst_zero_values_textfit');
1956+
figs['symbols_string-numbers'] = require('@mocks/symbols_string-numbers');
19551957
figs['table_latex_multitrace_scatter'] = require('@mocks/table_latex_multitrace_scatter');
19561958
// figs['table_plain_birds'] = require('@mocks/table_plain_birds');
19571959
figs['table_ragged'] = require('@mocks/table_ragged');

0 commit comments

Comments
 (0)
Please sign in to comment.