Black Lives Matter. Please consider donating to Black Girls Code today.

Way to specify height to underlying SVG container?

I am creating a Shiny application that allows a user to query a database for a gene name and show a plot. The size of the plot (specifically the height) should be dependent on how many rows are returned from the database query. At first, the plot appears great and there is no problem. Once the user enters in a different gene name (i.e. the DB query returns a different number of rows), the underlying svg-container does not update with the new height that the plot should be. Is there a way to do this? Keep in mind that I am using R and would like to avoid any JS if at all possible.

Below is a screenshot of the web developer tools after entering in the first gene. See that the highlighted div (the svg-container) has the same height attribute as the fainted highlighted div two up.

Below is a screenshot of the web dev tools after I entered in a different gene name. See that the highlighted div stayed at height:800px, when it needs to match the new plot height that is updated in the fainted highlighted div two up.

Were you able to find the answer?
I am still struggling with gigantic margins on the plots due to SVG container