ChartDirector 5.1 (.NET Edition)

LegendBox.setKeySpacing


Usage

[VB] Public Sub setKeySpacing(keySpacing As Integer [, lineSpacing As Integer ])
[C#] public void setKeySpacing(int keySpacing [, int lineSpacing ]);

Description

Sets the distance between two legend entries.

In horizontal legend layout, the legend entries will flow from left to right, top to bottom, with a horizontal gap between two legend entries. In vertical legend layout, the legend entries will flow from top to bottom, with one entry per line.

By default, the horizontal gap and the line spacing is automatically determined based on font size. This method can be used to set the horizontal gap and line spacing in pixels.

Arguments

ArgumentDefaultDescription
keySpacing(Mandatory)The horizontal gap between two legend entries for horizontal legend layout, expressed in pixels.
lineSpacing-1The line spacing between two lines in the legend box, expressed in pixels. -1 means the line spacing is automatically determined.

Return Value

None