Home › Forums › Feature Requests & Feedback › Resize Canvas when parent-div got resized › Reply To: Resize Canvas when parent-div got resized
hi, I have the same problem as yours, I fixed it by using the following code:
var chart = new CanvasJS.Chart(“chartContainer”, { height: 550, //in pixels width: 600, title:{ text: “Earthquakes – per month” },
I have set the height and width inside the property of chart. I have encountered the same bug when I first set the height and width in my <div>. Hope this will help.