epezent / implot

Immediate Mode Plotting
MIT License
4.71k stars 521 forks source link

Unable to see all elements of the legend if graph is small #531

Open JuanDiegoMontoya opened 10 months ago

JuanDiegoMontoya commented 10 months ago

I'm making a graph to visualize performance of various systems in my renderer. However, when the graph is small or if I add too many plots, some of the elements of the legend get cut off. I understand this is intended behavior, but as far as I can tell, there is no way to see those elements without making the graph annoyingly tall or splitting the plots into multiple graphs.

You can see how the next element of the legend is clipped in the screenshot:

Section of a graph showing the legend. There are too many plots and the bottom of the legend is clipped.

I browsed implot.h for mentions of "legend" and could not find a flag or graph/plot parameter that let me control this aspect of legend behavior.

Ideally, I would like to see the ability to scroll or drag through the legend, or have an option to allow the legend to be formatted with multiple rows and columns (the exact behavior of which would depend on whether ImPlotLegendFlags_Horizontal was set).