councilforeconed / interactive-activities

Council for Economic Education
http://interactives.councilforeconed.org
Mozilla Public License 2.0
6 stars 2 forks source link

Update chart resizing logic #148

Closed jugglinmike closed 8 years ago

jugglinmike commented 8 years ago

In the time since these charts were implemented, the surrounding layout was modified to use only a percentage of the viewport's horizontal space. This invalidated the underlying assumption--that the charts should expand to the width of the viewport itself.

Calculate the chart width according to the containing element. This contextual approach will automatically conform to any future changes to the layout.

Defer initial width calculation until after the chart has been appended to its container in order to avoid setting an invalid width.

Resolves gh-147