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: .github/PULL_REQUEST_TEMPLATE.md
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@ Thanks for your interest in plotly.js!
3
3
### Translations:
4
4
5
5
- Make a PR directly to the main repository
6
-
- Label it `type: translation`
7
6
- Please @ mention a few other speakers of this language who can help review your translations.
8
7
- If you've omitted any keys from [dist/translation_keys.txt](https://github.com/plotly/plotly.js/blob/master/dist/translation-keys.txt) - which means they will fall back on the US English text - just make a short comment about why in the PR description: the English text works fine in your language, or you would like someone else to help translating those, or whatever the reason.
9
8
- You should only update files in `lib/locales/`, not those in `dist/`
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -177,6 +177,27 @@ 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 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
+
it may be necessary to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
183
+
184
+
```
185
+
Plotly.newPlot(gd, [{
186
+
x: [1, 1, 1, 2, 2, 2, 3, 3, 3],
187
+
y: [1, 2, 3, 1, 2, 3, 1, 2, 3],
188
+
mode: 'markers'
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
+
});
195
+
```
196
+
197
+
This will produce the following plot, and say you want to simulate a selection path of (175, 175) to (225, 225):
Copy file name to clipboardExpand all lines: dist/README.md
+26-26Lines changed: 26 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ You can grab the relevant MathJax files in `./dist/extras/mathjax/`.
38
38
Plotly.js defaults to US English (en-US) and includes British English (en) in the standard bundle.
39
39
Many other localizations are available - here is an example using Swiss-German (de-CH),
40
40
see the contents of this directory for the full list.
41
-
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.35.2.js
41
+
They are also available on our CDN as https://cdn.plot.ly/plotly-locale-de-ch-latest.js OR https://cdn.plot.ly/plotly-locale-de-ch-1.37.1.js
42
42
Note that the file names are all lowercase, even though the region is uppercase when you apply a locale.
43
43
44
44
*After* the plotly.js script tag, add:
@@ -61,11 +61,11 @@ The main plotly.js bundle includes all the official (non-beta) trace modules.
61
61
62
62
It be can imported as minified javascript
63
63
- using dist file `dist/plotly.min.js`
64
-
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.35.2.min.js
64
+
- using CDN URL https://cdn.plot.ly/plotly-latest.min.js OR https://cdn.plot.ly/plotly-1.37.1.min.js
65
65
66
66
or as raw javascript:
67
67
- using dist file `dist/plotly.js`
68
-
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.35.2.js
68
+
- using CDN URL https://cdn.plot.ly/plotly-latest.js OR https://cdn.plot.ly/plotly-1.37.1.js
69
69
- using CommonJS with `require('plotly.js')`
70
70
71
71
If you would like to have access to the attribute meta information (including attribute descriptions as on the [schema reference page](https://plot.ly/javascript/reference/)), use dist file `dist/plotly-with-meta.js`
@@ -74,7 +74,7 @@ The main plotly.js bundle weights in at:
0 commit comments