File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,10 +65,14 @@ export interface PlotDatum {
6565 x : Datum ;
6666 /** Axis the point's x is plotted against. */
6767 xaxis : LayoutAxis ;
68+ /** Point center x position in pixels from the graph div's top-left corner */
69+ xPixel ?: number ;
6870 /** y coordinate of the point. */
6971 y : Datum ;
7072 /** Axis the point's y is plotted against. */
7173 yaxis : LayoutAxis ;
74+ /** Point center y position in pixels from the graph div's top-left corner */
75+ yPixel ?: number ;
7276 /** Resolved hover/display text for the point. */
7377 text : string ;
7478}
@@ -104,9 +108,10 @@ export interface PlotMouseEvent {
104108 points : PlotDatum [ ] ;
105109 /** The original DOM mouse event. */
106110 event : MouseEvent ;
107- /** x and y pixel position of the mouse */
108- xPixel : number ;
109- yPixel : number ;
111+ /** Cursor x position in pixels from the graph div's top-left corner */
112+ xPixel ?: number ;
113+ /** Cursor y position in pixels from the graph div's top-left corner */
114+ yPixel ?: number ;
110115}
111116
112117/** Payload for `plotly_hover` — augments `PlotMouseEvent` with axis values. */
You can’t perform that action at this time.
0 commit comments