-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributors
Description
I think the issue described in #2131 can be resolved by making this function public
ScottPlot/src/ScottPlot4/ScottPlot.WinForms/FormsPlotLegendViewer.cs
Lines 40 to 51 in 4008bdf
| private void RefreshLegendImage() | |
| { | |
| FormsPlot.Refresh(); | |
| Legend.UpdateLegendItems(FormsPlot.Plot, includeHidden: true); | |
| System.Drawing.Image originalImage = PictureBoxLegend.Image; | |
| PictureBoxLegend.Image = Legend.GetBitmap(false); | |
| if (originalImage is not null) | |
| originalImage.Dispose(); | |
| } |
Discussed in #2131
Originally posted by Z0ld3n September 21, 2022
Hi, thanks for this amazing library.
I have a question. If I hide series programmatically (by changing .IsVisible in IPlottable) when the legend is detached it is not picking up state change automatically. Is there a way to force refresh/update the legend when it is in a detached state other than force closing FormsPlotLegendViewer and opening a new one?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Good First IssueThis issue has limited complexity and may be a good start for new contributorsThis issue has limited complexity and may be a good start for new contributors