Fix sizes

Adds a javascript method to calculate sizes properly and consistently.

Resolves https://github.com/theodi/dashboards/issues/143