Reference > Properties > KeyLimit Property

SharpPlot.KeyLimit Property

Set a maximum number of legend items to appear when a legend is next created.

public int KeyLimit {get; set;}

Example

sp.KeyLimit = 2;

This can be used to restrict the number of key items output (setting it to zero prevents the legend from being drawn) when a legend is created. This may be automatic (legends are flushed when the finished chart is rendered) or explicit (by a call to DrawKey).

The KeyStyle property may be used to reposition the legend frame between each call, for example to have the key split between two regions, top left and top right.

Resetting this to the default value of -1 will cause the remaining key items to be output at the next opportunity. To prevent SharpPlot from flushing unwanted items when the chart is rendered, call ResetKey to remove any pending items.

See also ...

KeyStyle Property | DrawKey Method | ResetKey Method


Send comments on this topic
© Dyalog Ltd 2013