Step 4. Design the Series Legend

  1. Expand Series under Legends.

  2. Specify if the series header should be visible.

  1. Select HeaderVisible under Legends–Series.

  2. Select True to make it visible, False to hide it.

3.   Configure the font to display in the series header.

  1. Select Font under Legends–Series.

  2. Either:

Click the Font button on the Legend–Series Font row and open the Font dialog box to configure the font, or

Set UseAmbientFont under legends–Series to TRUE.

  1. Select a fill for the header's background.

  1. Select Brush under Legends–Series.

  2. Select a color for the header background.

Click the down arrow to the right of the displayed color.

Select a color from the palette that appears.

  1. Select the brush Type.


Fills the series legend with a:


Solid color


Hatch (pattern)

  1. Select a HatchStyle for the brush if you selected apBrushHatch as the type.







  1. Configure the Series legend's columns for the XY Plot's series.

  1. Expand Columns under Legends–Series.

The number of columns currently in the header appears (grayed out) in the Count row. You can add additional columns or delete existing ones.

  1. Expand Item.

Each number that appears represents a column in the order that it displays, from left to right, e.g. 0 represents the column that is furthest left.

  1. Set Visible to True to make the column visible; False to hide it.

  2. Specify the type of series' value that appears in the legend column. The options are:


Shows the


Series color


Series name


Data value that is intersected by a particular slider


Data value at a particular index in a series data vector

  1. Make specifications when apLegendSeriesValueAtIndex is selected.

  1. Select True for ShowX to display the series' X values; False to display the series Y values.

  2. Enter an Index value that contains the index to the series data value that you want to display.


If you enter 0 in the Index row, the column will display the first data value (X or Y, depending on the value of ShowX.

  1. Enter text that displays as the column header in the Header row. The text normally describes the type of value the column is reporting.

  2. Specify the column width.

Set AutoWidth to TRUE to make the column width expand or contract to accommodate the width of its values, or

Set AutoWidth to FALSE and enter a value in the Width row.

  1. Enter a number in the Order row that defines the order in which the column should appear in the legend, from left to right. For example, 0 is the first column at the left of the legend; 1 is to Column 0's right.

  2. Select a fill for a selected column.

  1. Expand Brush under Column–Item <number>.

  2. Click the Palette button on the Color row to select a color.

  1. (Optional) Add additional columns.

  1. Select Item under Legends–Series.

  2. Click the right mouse button.

  3. Select Add from the popup menu.

  1. Format the Series Legend's rows for the XY Plot series.

  1. Expand Row under Legends–Series.

The number of rows currently in the Series Legend appears (grayed out) in the Count row.

  1. Enter the maximum number of Series Legend rows that can be visible during runtime in the VisibleCount row.

More information

Design XY plot legends.