Legend::LegendStyle Property
Gets or sets the style of the legend.
Assembly: System.Windows.Forms.DataVisualization (in System.Windows.Forms.DataVisualization.dll)
public: [BindableAttribute(true)] property LegendStyle LegendStyle { LegendStyle get(); void set(LegendStyle value); }
Property Value
Type: System.Windows.Forms.DataVisualization.Charting::LegendStyleA LegendStyle enumeration value that determines the legend style. The default value is Table.
By default, the legend is displayed as a series of items in a table. You can specify whether to expand items in the table width-wise or height-wise by setting the TableStyle property. When the TableStyle property is set to Auto, the Chart control will determine whether to draw a wide table or a tall table, depending on the alignment and positioning of the chart. This may cause the legend to be drawn using multiple legend item columns.
There are three possible styles for a legend: Column, Row and Table. Refer to the table below for a summary of these styles:
Style | Description |
Column | Legend items are displayed in one column, with multiple rows. Most commonly used when the legend is docked to the left or right of the chart. |
Row | Legend items are displayed in one row, with multiple columns. Most commonly used when the legend is docked to the top or bottom of the chart. |
Table | Legend items are displayed using multiple columns and rows. |
Available since 4.0