I have used Chart.js bar library in my component.
return (
<div>
<Bar data={this.data} onElementsClick={this.onKeywordClick}
width={100}
height={80}
onElementsClick={elems => {
console.log("hi"+elems[0]._model.label);
window.location = "/keywordNews"
}}
/>
</div>
)
When I click on the bar chart it will map into the route and open the keywordNews component. But I want to send some data using props which is elems[0]._model.label. So is this possible to return component from here or what can be the option to send data when keywordNews component open from window.location method.