diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 84cad93b48..3a5784ae21 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -49,10 +49,20 @@ export interface PlotCoordinate { pointNumber: number; } -export interface PlotSelectionEvent { - points: PlotCoordinate[]; +export interface SelectionDescription { + x: number[], + y: number[], } +export type PlotSelectedData = Partial; + +export interface PlotSelectionEvent { + points: PlotSelectedData[]; + range?: SelectionDescription; + lassoPoints?: SelectionDescription; +} + + export type PlotRestyleEvent = [ any, // update object -- attribute updated: new value number[] // array of traces updated