implot icon indicating copy to clipboard operation
implot copied to clipboard

Add scrollbar to legend

Open yaszin opened this issue 5 years ago • 2 comments

Is it possible to add a scrollbar or something similar inside the legend in order to view all dataset names when plotting multiple lines ?

yaszin avatar Feb 24 '21 12:02 yaszin

It's not currently possible and I have no plans to support it in the near-term. I'm happy to review PRs if you'd like to give it a shot.

As an alternative, you can try 1) setting the legend location to outside with SetLegendLocation -- this may buy you a little extra room or 2) rendering your own legend in an ImGui window or table (see our drag and drop demo for a comparable example).

epezent avatar Mar 07 '21 18:03 epezent

@yaszin, please also see ShowAltLegend in implot_internal.h. IIRC, my intention was to eventually move this into the public API but I never got around to testing it thoroughly.

epezent avatar Mar 09 '21 23:03 epezent

https://github.com/epezent/implot/pull/504

epezent avatar Aug 20 '23 22:08 epezent