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

Issue

This Content is from Stack Overflow. Question asked by Killerrr_anku

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 :).



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?