I am trying to apply some css file to dash components so that when hovering effect the content will auto stretch. Here are some common css tricks using flexboxes:
.flexbox {
display: flex;
> div {
flex: 1;
margin: 0.5rem;
flex-basis: 0;
transition: flex-grow 0.3s;
-webkit-transition: flex-grow 0.3s;
&:hover {
flex-grow: 3;
transition: flex-grow 0.3s;
-webkit-transition: flex-grow 0.3s;
}
}
}
and here is a snippet of my app:
html.Div(
[
html.Div(
[dcc.Graph(),], #some figure here
className = "item"
),
html.Div([
dash_table.DataTable(), # some data-table here
],
className="item"
),
html.Div([
dcc.Graph(), # again some graph here
], className="item",
),
], className='flexbox'
),
Now the when hovering over the graph component, the data-table flex-shrink perfectly, but the graph cannot grow properly. Similarly when hovering over data-table component as the graph do not shrink the data-table cannot expand.
I am looking for some way to ‘properly’ enlarge the graph component when hovering-over. By ‘properly’ I mean resizing the graph in the same way as in changing the size/width of the graph itself. I tried somethings like transform:scale(1.5)
in css as well, but this is just scaling the graph component as a whole svg, namely all icons/ticker grow large. What I really look for is just zoom the graph alone to fit the content.
Any luck?