palantir / plottable

:bar_chart: A library of modular chart components built on D3
http://plottablejs.org/
MIT License
2.96k stars 224 forks source link

Update extents after setBounds #3552

Closed themadcreator closed 4 years ago

themadcreator commented 4 years ago

This change will trigger the 'updateExtents' method of a plot after its bounds are set.

This is necessary because some scales, such as quantitative, will use the scale to add add padding to a domain in a proportional manner requiring the scale to have a valid domain and range.

When the plots are anchored to an element with zero size or hidden with display: none the collapsed range causes invalid padding values to set the domain.

This change will ensure that when the component finally has a valid size, the domains are updated correctly.

blueprint-bot commented 4 years ago

Update extents after setBounds

Demo: quicktests | fiddle