Home Forums Chart Support Contain chart to 50% page width? Reply To: Contain chart to 50% page width?

#38809

@cmayo,

The above issue is happening due to combination of float and absolute positioning of dom elements. You can check this StackOverflow thread for more information about the issue. In order to overcome this issue in your scenario, you can specify float as left or right for chart container and use clearfix hack for the parent element to handle the difference in height of floated elements. You can check this page for more information about the clearfix hack for handling float elements. Please take a look at this updated JSFiddle for an example on the same.

Chart inside the Float Containers

—-
Manoj Mohan
Team CanvasJS