[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Collapse]Charts Suite
   [Collapse]Chart Control
    [Expand]Getting Started
    [Expand]Fundamentals
    [Expand]Providing Data
    [Expand]Chart Elements
    [Expand]Appearance Customization
    [Expand]End-User Features
    [Expand]Design-Time Features
    [Collapse]Examples
     [Expand]2D Chart Types
     [Expand]3D Chart Types
     [Expand]Providing Data
     [Expand]Data Representation
     [Expand]Chart Elements
     [Collapse]Appearance Customization
       How to: Change Point Colors
       How to: Format Values Displayed in a Crosshair Cursor Using a Crosshair Label's Patterns
       How to: Customize the Appearance of Crosshair Series Labels
       How to: Customize the Appearance of Crosshair Axis Labels
       How to: Provide a Custom Template for Series Labels
       How to: Provide a Custom Template for Axis Labels
       How to: Customize the Appearance of a Series Tooltip
       How to: Provide a Custom Tooltip for a Series Point
       How to: Customize Chart Titles
       How to: Custom Draw a Crosshair Cursor
       How to: Custom Draw Chart Series Points
       How to: Use Themes to Define the Look and Feel of Your Chart
       How to: Use the Chart Palette for Painting Series and their Points
       How to: Create Custom Series Point Model
       How to: Assign Different Models for Series and Point Markers
       How to: Adjust Series Labels
       How to: Configure the Appearance of an Annotation
     [Expand]End-User Interaction
     [Expand]Miscellaneous
    [Expand]Additional Resources
   [Expand]Chart3D Control
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Provide a Custom Template for Series Labels

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E1258.

The following example demonstrates how to change the appearance of series labels. To accomplish this, it is necessary to create a System.Windows.DataTemplate that specifies the appearance of series labels, and add it to a window's resource. Then, this template can be applied to a series label via its ChartTextElement.ElementTemplate property.

Note

The chart control displays a crosshair cursor instead of series labels in the diagram by default. To provide series labels customization, enable series labels (set the Series.LabelsVisibility property to true) and disable the crosshair cursor (set the ChartControlBase.CrosshairEnabled property to false).

Is this topic helpful?​​​​​​​