You must be logged in to post your query.
Home › Forums › Chart Support › React .map unique mouseover event
Tagged: canvas, Charts, mouseover
I am plotting data using .map function in react and I wanted to make mouseover event unique for each graph and I am not sure how to do that. I thought I can make className for each chart and get className or ID from the mouseover function and determine the event with a conditional statement. any ideas
@osamanatouf,
Can you kindly create a sample project reproducing the issue you are facing and share it with us over Google-Drive or Onedrive along with sample data so that we can look into your code, run it locally at our end to understand the scenario better and help you out?
—- Manoj Mohan Team CanvasJS
Here is a code snippit
{roc.map( data =>{ return( <React.Fragment> <Col md={6} xl={6} key={data["name"].toString()}> <Card > <Card.Header > </Card.Header> <Card.Body > <LineChart linechart={ [data["fpr"],data["tpr"],<code>ROC curve ${data["name"]}</code>,'False Postive Rate','True Postive Rate',data["tpr"].length,data["name"]] }/> </Card.Body> </Card> </Col> < Col md={6} xl={6} > <Card> <Card.Header> </Card.Header> <Card.Body> <App label={[data['name']]}/> </Card.Body> </Card> </Col> </React.Fragment> );
I just want to associate the event with from LineChart to te App component and make it unique
@manoj-mohan
From what we have observed, sometimes things get delayed mostly when we are not able to reproduce the issue at our end or not able to understand the exact requirements or due to the variation in chart-options being used by you and us. Because of these reasons we expect you so share sample project along with sample data(dummy data) which helps us run it locally at our end to understand the use case and help you resolve.
@manoj-mohan The issue was solved, I used the subtitles and added unique identifers, which can be retrrived from the event easily.
Glad that you have figured it out :)
You must be logged in to reply to this topic. Login/Register