Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Charting Basics
    [Expand]Professional Charting
    [Expand]Series Views
    [Collapse]Chart Elements
     [Expand]Series
     [Expand]Diagram
      Chart Titles
     [Collapse]Legends
       Adding Legends
       Legends Alignment and Layout
       Legends Appearance
       Legend Title
       Legend Items
     [Expand]Annotations
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Adding Legends

This document describes how a new additional legend can be added to a chart at design time.

To add a new legend to a chart at design time, select the chart. In the Properties window, locate the ChartControl.Legends property and click the ellipsis button. In the invoked editor, click Add.

Then, configure the legend properties. Dock it to the required pane or chart control using the Legend.DockTarget property...

... and position it using the Legend.AlignmentVertical and Legend.AlignmentHorizontal properties.

For more information about the legend layout, refer to the Legends Alignment and Layout document.

Then, assign the legend to a series, indicator, constant line or strip using the SeriesBase.Legend, Indicator.Legend, ConstantLine.Legend or Strip.Legend property respectively.

As a result, the additional legend will be displayed.

Note

Please note that the additional legend will not be displayed at runtime until it is assigned to a series, indicator, constant line or strip. At design time an empty legend will be labeled by Empty Legend text.

To learn how to add additional legends at runtime, refer to the How to: Add an Additional Legend to a Chart example.

How would you rate this topic?​​​​​​​