Skip to content

Commit f73cb55

Browse files
authored
Merge pull request #6914 from plotly/bug/pikul-standoff-position
Add tests for standoff position PR 6889
2 parents 5b1e104 + ff01679 commit f73cb55

13 files changed

+289
-1
lines changed

draftlogs/6889_fix.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Fix standoff position [[#6889](https://github.com/plotly/plotly.js/pull/6889), [#6914](https://github.com/plotly/plotly.js/pull/6914)],
2+
with thanks to @ayjayt for the contribution!

src/plots/cartesian/axes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2899,7 +2899,7 @@ function calcLabelLevelBbox(ax, cls, mainLinePositionShift) {
28992899
});
29002900
} else {
29012901
var dummyCalc = axes.makeLabelFns(ax, mainLinePositionShift);
2902-
top = bottom = dummyCalc.yFn({dx: 0, dy: 0, fontSize: 0}); // I don't know what dx, dy is
2902+
top = bottom = dummyCalc.yFn({dx: 0, dy: 0, fontSize: 0});
29032903
left = right = dummyCalc.xFn({dx: 0, dy: 0, fontSize: 0});
29042904
}
29052905

tasks/test_mock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ function notBlackListed(name) {
217217
'pattern_bars',
218218
'pattern_fgcolor_overlay_fillmode',
219219
'pattern_with_colorscale',
220+
'zz-petrophysics',
220221
'plot_types',
221222
'polar_blank',
222223
'polar_dates',
Loading
Loading
Loading
Loading
74.3 KB
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"data": [
3+
{
4+
"x": [
5+
1,
6+
2,
7+
3,
8+
4
9+
],
10+
"y": [
11+
10,
12+
15,
13+
13,
14+
17
15+
],
16+
"mode": "markers",
17+
"type": "scatter",
18+
"marker": {
19+
"opacity": 0.5
20+
}
21+
},
22+
{
23+
"x": [
24+
2,
25+
3,
26+
4,
27+
5
28+
],
29+
"y": [
30+
16,
31+
5,
32+
11,
33+
9
34+
],
35+
"mode": "lines",
36+
"type": "scatter",
37+
"opacity": 0.5
38+
},
39+
{
40+
"x": [
41+
1,
42+
2,
43+
3,
44+
4
45+
],
46+
"y": [
47+
12,
48+
9,
49+
15,
50+
12
51+
],
52+
"mode": "lines+markers",
53+
"type": "scatter",
54+
"opacity": 0.707,
55+
"marker": {
56+
"opacity": 0.707
57+
}
58+
},
59+
{
60+
"x": [1, 2, 3],
61+
"y": [1, 2, 3],
62+
"opacity": 0.2,
63+
"line": { "width": 10, "color": "red"},
64+
"marker": { "size": 20, "color": "blue"}
65+
}
66+
],
67+
"layout": {
68+
"yaxis": { "title": {"text": "yaxis", "standoff": 0}, "side": "right", "showticklabels": false, "domain": [0, 1]},
69+
"xaxis": { "title": {"text": "xaxis", "standoff": 0}, "side": "top", "showticklabels": false, "domain": [0, 1]}
70+
}
71+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"data": [
3+
{
4+
"x": [
5+
1,
6+
2,
7+
3,
8+
4
9+
],
10+
"y": [
11+
10,
12+
15,
13+
13,
14+
17
15+
],
16+
"mode": "markers",
17+
"type": "scatter",
18+
"marker": {
19+
"opacity": 0.5
20+
}
21+
},
22+
{
23+
"x": [
24+
2,
25+
3,
26+
4,
27+
5
28+
],
29+
"y": [
30+
16,
31+
5,
32+
11,
33+
9
34+
],
35+
"mode": "lines",
36+
"type": "scatter",
37+
"opacity": 0.5
38+
},
39+
{
40+
"x": [
41+
1,
42+
2,
43+
3,
44+
4
45+
],
46+
"y": [
47+
12,
48+
9,
49+
15,
50+
12
51+
],
52+
"mode": "lines+markers",
53+
"type": "scatter",
54+
"opacity": 0.707,
55+
"marker": {
56+
"opacity": 0.707
57+
}
58+
},
59+
{
60+
"x": [1, 2, 3],
61+
"y": [1, 2, 3],
62+
"opacity": 0.2,
63+
"line": { "width": 10, "color": "red"},
64+
"marker": { "size": 20, "color": "blue"}
65+
}
66+
],
67+
"layout": {
68+
"yaxis": { "title": {"text": "yaxis", "standoff": 0}, "side": "right", "showticklabels": false, "domain": [0.2, 0.8]},
69+
"xaxis": { "title": {"text": "xaxis", "standoff": 0}, "side": "top", "showticklabels": false, "domain": [0.2, 0.8]}
70+
}
71+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"data": [
3+
{
4+
"x": [
5+
1,
6+
2,
7+
3,
8+
4
9+
],
10+
"y": [
11+
10,
12+
15,
13+
13,
14+
17
15+
],
16+
"mode": "markers",
17+
"type": "scatter",
18+
"marker": {
19+
"opacity": 0.5
20+
}
21+
},
22+
{
23+
"x": [
24+
2,
25+
3,
26+
4,
27+
5
28+
],
29+
"y": [
30+
16,
31+
5,
32+
11,
33+
9
34+
],
35+
"mode": "lines",
36+
"type": "scatter",
37+
"opacity": 0.5
38+
},
39+
{
40+
"x": [
41+
1,
42+
2,
43+
3,
44+
4
45+
],
46+
"y": [
47+
12,
48+
9,
49+
15,
50+
12
51+
],
52+
"mode": "lines+markers",
53+
"type": "scatter",
54+
"opacity": 0.707,
55+
"marker": {
56+
"opacity": 0.707
57+
}
58+
},
59+
{
60+
"x": [1, 2, 3],
61+
"y": [1, 2, 3],
62+
"opacity": 0.2,
63+
"line": { "width": 10, "color": "red"},
64+
"marker": { "size": 20, "color": "blue"}
65+
}
66+
],
67+
"layout": {
68+
"yaxis": { "title": {"text": "yaxis", "standoff": 0}, "side": "left", "showticklabels": false, "domain": [0, 1]},
69+
"xaxis": { "title": {"text": "xaxis", "standoff": 0}, "side": "bottom", "showticklabels": false, "domain": [0, 1]}
70+
}
71+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{
2+
"data": [
3+
{
4+
"x": [
5+
1,
6+
2,
7+
3,
8+
4
9+
],
10+
"y": [
11+
10,
12+
15,
13+
13,
14+
17
15+
],
16+
"mode": "markers",
17+
"type": "scatter",
18+
"marker": {
19+
"opacity": 0.5
20+
}
21+
},
22+
{
23+
"x": [
24+
2,
25+
3,
26+
4,
27+
5
28+
],
29+
"y": [
30+
16,
31+
5,
32+
11,
33+
9
34+
],
35+
"mode": "lines",
36+
"type": "scatter",
37+
"opacity": 0.5
38+
},
39+
{
40+
"x": [
41+
1,
42+
2,
43+
3,
44+
4
45+
],
46+
"y": [
47+
12,
48+
9,
49+
15,
50+
12
51+
],
52+
"mode": "lines+markers",
53+
"type": "scatter",
54+
"opacity": 0.707,
55+
"marker": {
56+
"opacity": 0.707
57+
}
58+
},
59+
{
60+
"x": [1, 2, 3],
61+
"y": [1, 2, 3],
62+
"opacity": 0.2,
63+
"line": { "width": 10, "color": "red"},
64+
"marker": { "size": 20, "color": "blue"}
65+
}
66+
],
67+
"layout": {
68+
"yaxis": { "title": {"text": "yaxis", "standoff": 0}, "side": "left", "showticklabels": false, "domain": [0.2, 0.8]},
69+
"xaxis": { "title": {"text": "xaxis", "standoff": 0}, "side": "bottom", "showticklabels": false, "domain": [0.2, 0.8]}
70+
}
71+
}

test/image/mocks/zz-petrophysics.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)