Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 688a66f

Browse files
committed
fix restyleData propType, and improve prop docs
1 parent 8e7806b commit 688a66f

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

src/components/Graph.react.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,17 +244,17 @@ const graphPropTypes = {
244244
*/
245245
id: PropTypes.string,
246246
/**
247-
* Data from latest click event
247+
* Data from latest click event. Read-only.
248248
*/
249249
clickData: PropTypes.object,
250250

251251
/**
252-
* Data from latest click annotation event
252+
* Data from latest click annotation event. Read-only.
253253
*/
254254
clickAnnotationData: PropTypes.object,
255255

256256
/**
257-
* Data from latest hover event
257+
* Data from latest hover event. Read-only.
258258
*/
259259
hoverData: PropTypes.object,
260260

@@ -267,21 +267,28 @@ const graphPropTypes = {
267267
clear_on_unhover: PropTypes.bool,
268268

269269
/**
270-
* Data from latest select event
270+
* Data from latest select event. Read-only.
271271
*/
272272
selectedData: PropTypes.object,
273273

274274
/**
275275
* Data from latest relayout event which occurs
276-
* when the user zooms or pans on the plot
276+
* when the user zooms or pans on the plot or other
277+
* layout-level edits. Has the form `{<attr string>: <value>}`
278+
* describing the changes made. Read-only.
277279
*/
278280
relayoutData: PropTypes.object,
279281

280282
/**
281283
* Data from latest restyle event which occurs
282-
* when the user toggles a legend item
284+
* when the user toggles a legend item, changes
285+
* parcoords selections, or other trace-level edits.
286+
* Has the form `[edits, indices]`, where `edits` is an object
287+
* `{<attr string>: <value>}` describing the changes made,
288+
* and `indices` is an array of trace indices that were edited.
289+
* Read-only.
283290
*/
284-
restyleData: PropTypes.object,
291+
restyleData: PropTypes.array,
285292

286293
/**
287294
* Plotly `figure` object. See schema:

0 commit comments

Comments
 (0)