Export (0) Print
Expand All

Legend.LegendStyle Property

.NET Framework 4.6 and 4.5

Gets or sets the style of the legend.

Namespace:  System.Web.UI.DataVisualization.Charting
Assembly:  System.Web.DataVisualization (in System.Web.DataVisualization.dll)

[BindableAttribute(true)]
[PersistenceModeAttribute(PersistenceMode.Attribute)]
public LegendStyle LegendStyle { get; set; }

Property Value

Type: System.Web.UI.DataVisualization.Charting.LegendStyle
A 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.

.NET Framework

Supported in: 4.6, 4.5, 4
Show:
© 2015 Microsoft