Skip to main content
A newer version of this page is available. .

CustomLegendItem Class

An individual custom legend item.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v18.1.dll

Declaration

[TypeConverter(typeof(CustomLegendItemTypeConverter))]
public class CustomLegendItem :
    ChartElementNamed,
    ILegendItemData,
    ILegendItem

The following members accept/return CustomLegendItem objects:

Remarks

The CustomLegendItem class contains the settings that define the functionality of a custom item within a legend.

In addition to the settings inherited from the base ChartElementNamed class, the CustomLegendItem class implements properties that allow you to specify the text used to display an item (the CustomLegendItem.Text property), color (CustomLegendItem.MarkerColor) or image (CustomLegendItem.MarkerImage) used to display an item’s marker and control the item elements visibility (CustomLegendItem.TextVisible and CustomLegendItem.MarkerVisible).

Custom items associated with a particular legend are contained within the Legend.CustomItems collection which is represented by an object of the CustomLegendItemCollection class. A particular CustomLegendItem object can be accessed within the collection either using indexer notation or by its name (see the CustomLegendItemCollection.Item property).

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomLegendItem class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

See Also