0

I change to use a different pc with windows 11 instead of windows 10. There are a lot of issuses with graph size. It is too big to fit into dcc.Graph.

For example, I define dcc.Graph with CSS style

heatmap_graph = dcc.Graph(id="heatmapgraph",className='heatmap-graph')

in CSS, I define the height using 100vh-5px

.heatmap-graph 
{
    height: calc(100vh - 5px);
}

In actual graph plotting, I used height=900 so the heatmap fit into original defined size of dcc.Graph.

fig.update_layout(
            title={"text": plot_title, 
                   "x": 0.5, "y": 0.98, "font": {"size": 20}},
            legend={"yanchor": "top", "y": 0.97,'x':0.999, "tracegroupgap": 450,
                   'font':{'size': 12}},  # for bottom line plot with legend
            margin={"t": 75, "l": 80, "r": 100, "b": 50,'pad': 0},  
            height=900,
            }

However, after changing to windows 11, the heatmap graph is too big so I have to change height to be 700 in order to fit.

Now I have to manually change all the graph to fit dcc.Graph(), is there any other way I can auto-scale the graph into defined dcc.Graph()?

Thanks

0

Browse other questions tagged or ask your own question.