Accepted answer

in my case, setting maintainaspectratio:false along with supplying height/width on div

<div style={{height:'100px',width:'200px'}}>
<horizontalbar data={data} options={chartoptions}/>

helped in restricting the canvas's scalability.

relevant source:


try setting responsive: false in your options object. that should according to the documentation make so that the canvas doesn't resize (

Related Query

More Query from same tag