Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9dc4e4f

Browse files
document responsiveness
1 parent 7896a4e commit 9dc4e4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,8 @@ You can see an example of this method in action [here](https://codepen.io/rsreus
203203
| `onError` | `Function` | `undefined` | Callback executed when a plotly.js API method rejects |
204204
| `fit` | `Boolean` | `false` | *deprecated* When true, will set `layout.height` and `layout.width` to the component's parent's size if they are unspecified, and will update them on `window.resize` |
205205

206+
To make a plot responsive, i.e. to fill its containing element and resize when the window is resized, use `style` or `className` to set the dimensions of the element (i.e. using `width: 100%; height: 100%` or some similar values) and set `useResizeHandler` to `true` while setting `layout.autosize` to `true` and leaving `layout.height` and `layout.width` undefined. This will implement the behaviour documented here: https://plot.ly/javascript/responsive-fluid-layout/
207+
206208
### Event handler props
207209

208210
Event handlers for [`plotly.js` events](https://plot.ly/javascript/plotlyjs-events/) may be attached through the following props.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /