Home forums Chart Support React .map unique mouseover event

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #31013

    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

    #31180

    @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

    #31190

    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[&quot;name&quot;]}</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>
                        );
    #31191

    I just want to associate the event with from LineChart to te App component and make it unique

    #31192

    @Manoj Mohan

    #31236

    @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?

    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
    Team CanvasJS

    #31239

    @Manoj Mohan
    The issue was solved, I used the subtitles and added unique identifers, which can be retrrived from the event easily.

    #31281

    @osamanatouf,

    Glad that you have figured it out :)

    —-
    Manoj Mohan
    Team CanvasJS

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.