Not able to add text property in react-plotly.js for horizontal line using x0,x1,y0,y1 value in React JS

Viewed 22

I have a requirement to add multiple horizontal/vertical line in my i am able to populate the data but not able to add text property(Tool tip on hover) for my horizontal/vertical lines. Here is my sample code :

<Plot
data={boxValues()}
layout={{
title:"My Title",
showlegend:true,
autosize:true,
yaxis:{title:"Values"}
boxpoints:false,
shapes:{
   type:'line',
   xref:'paper',
   x0:0,
   x1:1,
   y0:100,
   y1:100,
   **text:"my text which is not appear"**,
   line:{
     dash : "dot",
     width : 2,
     color:'green'
   }
}
}}
/>

My requirement is to draw a horizontal/vertical line with tooltip property without any point range, where i have populated the data the only issue is with text(tooltip) property.

Any lead/help would appreciate.

Thanks in advance :).

0 Answers
Related