Black Lives Matter. Please consider donating to Black Girls Code today.

Setting id on Plot component in Reactjs

How can I set an id on the Plot component of my graph?

I am using react-plotly.js library. I want to set the id so that I can get the id of the chart later when someone clicks on it.

This is my code in which I want to set the id.

            values: value,
            labels: ['US', 'China', 'European Union', 'Russian Federation', 'Brazil', 'India', 'Rest of World'],
            name: '',
            hoverinfo: 'label+percent+name',
            hole: .6,
            type: 'pie'

if you look in basic props you can set an id with divId