I have a bar chart whose values comes from Axios get request. now this part is working fine, api is returning values fine and on initial render bar chart values are returned from api and chart renders fine but when i filter the content and set some other date values for chart it does get returned from api but component does not get re-rendered until I resize browser window even slightly. why is this happening, what resizing is doing in this case
this is how im handling change
componentDidMount(){
this.getIndividuals()
this.getCompanies()
}
handleClick=(e)=> {
this.setState({clicked:true})
}
componentDidUpdate(prevProps,prevState){
if((prevState.clicked!==this.state.clicked)){
this.getIndividuals()
this.getCompanies()
this.setState({clicked:false})
this.forceUpdate()
}
}
i tried to to use forceupdate()
method but that is also not working