-
Notifications
You must be signed in to change notification settings - Fork 981
Closed
Description
Features Suggestion
Currently, if one wants to get the bitmap to a legend with e.g
var legend = FormsPlot.Plot.Legend();
var picture = legend.GetBitmap();This call returns an error if no plot has a label.
However, there is no way to actually know the number of items in the legend as this property is private.
ScottPlot/src/ScottPlot/Renderable/Legend.cs
Line 166 in a214b94
| private LegendItem[] LegendItems; |
One could think of two solutions :
- Either not return an error in case the legend is empty but return a
nullor an equivalent - Or make the
LegendItemslist public so that one can check its length priorGetLegendBitmap()
Side note : Wouldn't it be relevant to switch from an LegendItem[] array to a List<LegendItem> as there is intrinsically variable amount of plots in a ScottPlot ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels