You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+11-16
Original file line number
Diff line number
Diff line change
@@ -177,31 +177,26 @@ which shows the baseline image, the generated image, the diff and the json mocks
177
177
178
178
To view the results of a run on CircleCI, download the `build/test_images/` and `build/test_images_diff/` artifacts into your local repo and then run `npm run start-image_viewer`.
179
179
180
-
### Writing selection tests
181
-
Keep in mind that the selection coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable selection test,
180
+
### Writing interaction tests
181
+
Keep in mind that the interaction coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable interaction test,
182
182
it may be necessary to to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
183
183
184
184
```
185
-
Plotly.newPlot(gd,
186
-
[
187
-
{
185
+
Plotly.newPlot(gd, [{
188
186
x: [1, 1, 1, 2, 2, 2, 3, 3, 3],
189
187
y: [1, 2, 3, 1, 2, 3, 1, 2, 3],
190
188
mode: 'markers'
191
-
}
192
-
],
193
-
{
194
-
width: 400, height: 400,
195
-
margin: {l: 100, r: 100, t: 100, b: 100},
196
-
xaxis: {range: [0, 4]},
197
-
yaxis: {range: [0, 4]}
198
-
}
199
-
)
189
+
}], {
190
+
width: 400, height: 400,
191
+
margin: {l: 100, r: 100, t: 100, b: 100},
192
+
xaxis: {range: [0, 4]},
193
+
yaxis: {range: [0, 4]}
194
+
});
200
195
```
201
196
202
-
This will produce the following plot, and you want to simulate a selection path of (175, 175) to (225, 225):
197
+
This will produce the following plot, and say you want to simulate a selection path of (175, 175) to (225, 225):
0 commit comments