Vue PieChart - legend
Specifies PieChart legend options.
The PieChart widget can include a legend. It helps you distinguish and identify the points of the displayed series. Each point is presented by an item on the legend. An item marker identifies the point's (slice's) color. An item label displays a value corresponding to the point. Use the legend property to set up PieChart legend options to the required values. To learn more about the legend and its options, refer to the Legend topic.
border
Specifies legend border options.
Use this object to make a legend's border visible/invisible and set up such border options as color, width etc.
columnCount
Specifies how many columns it takes to arrange legend items.
To arrange legend items, specify how many rows and columns they must occupy. To do this, use the rowCount and columnCount properties.
customizeHint
Specifies the text for a hint that appears when a user hovers the mouse pointer over a legend item.
The text for the hint to display.
this
keyword.customizeText
Specifies a callback function that returns the text to be displayed by a legend item.
The text for the legend item to display.
this
keyword.horizontalAlignment
Specifies a legend's position on the chart.
When using the widget as an ASP.NET MVC Control, specify this option using the HorizontalAlignment
enum. This enum accepts the following values: Left
, Center
and Right
.
hoverMode
Specifies what chart elements to highlight when a corresponding item in the legend is hovered over.
In the PieChart widget, legend items represent series points. When a legend item is hovered over, the corresponding series point is highlighted. To prevent this behavior, set the hoverMode property to 'none'.
You can set a custom 'hover' style for series points. To do this, use the series.hoverStyle configuration object.
When using the widget as an ASP.NET MVC Control, specify this option using the ChartLegendHoverMode
enum. This enum accepts the following values: AllArgumentPoints
and None
.
itemsAlignment
Specifies the alignment of legend items.
This option is useful when there is an odd count of items in the legend and they are placed in several columns.
When using the widget as an ASP.NET MVC Control, specify this option using the HorizontalAlignment
enum. This enum accepts the following values: Left
, Center
and Right
.
itemTextPosition
Specifies the position of text relative to the item marker.
A legend item consists of a marker that indicates the series (for the Chart widget) / point (for the PieChart widget) color and text that specifies the name of the series/point. Use the itemTextPosition property to specify the position of the text relative to the item marker.
margin
Specifies the distance between the legend and surrounding widget elements or container borders in pixels.
When this option is set to a number, the specified margin applies to all the sides of the legend. Alternatively, the margin option can be set to an object. This object specifies margins for each side of the legend separately.
Whether or not the specified margin is applied to a particular side of the legend depends on the legend's location. The location is determined by the horizontalAlignment and verticalAlignment options. Refer to the top, bottom, left and right options' description to discover when the margin applies to the corresponding side of the legend.
orientation
Specifies whether to place legend items horizontally or vertically.
When this option is set to 'vertical', legend items are displayed vertically (i.e., in a column). When this option is set to 'horizontal', legend items are displayed horizontally (i.e, in a row). When this option is not defined, the legend orientation is chosen automatically.
When using the widget as an ASP.NET MVC Control, specify this option using the Orientation
enum. This enum accepts the following values: Horizontal
and Vertical
.
paddingLeftRight
Specifies a blank space between a legend's left/right boundaries and the inner item boundaries in pixels.
paddingTopBottom
Specifies a blank space between a legend's top/bottom boundaries and the inner item boundaries in pixels.
rowCount
Specifies how many rows it takes to arrange legend items.
To arrange legend items, specify how many rows and columns they must occupy. To do this, use the rowCount and columnCount properties.
verticalAlignment
Specifies a legend's position on the chart.
When using the widget as an ASP.NET MVC Control, specify this option using the VerticalEdge
enum. This enum accepts the following values: Top
and Bottom
.
If you have technical questions, please create a support ticket in the DevExpress Support Center.