Xceed Toolkit Plus for WPF v4.6 Documentation
Chart Class
Members  Example 


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit.Chart Namespace : Chart Class

Xceed's WPF chart control is designed to display rich, flexible, configurable, extendable charts. The control is 100% lookless and is able to display multiple areas with multiple charts at the same time. It supports area, column (bar), line, and pie charts, and also provides the ability to create custom charts.

Syntax
'Declaration
 
<StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class Chart 
   Inherits System.Windows.Controls.Control
'Usage
 
Dim instance As Chart
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class Chart : System.Windows.Controls.Control 
Remarks

Use the Areas property to add Area objects.

The chart control provides a built-in legend. Howewer, if a custom legend is needed, use the Legend property.

Example
The following demonstrates how to set up a simple line chart. By simply changing the type assigned to Series.Layout (e.g., using instead AreaLayout, ColumnLayout, or PieLayout), different chart types are displayed, namely, area, column/bar, or pie, respectively.
<xctk:Chart>
  <xctk:Chart.Areas>
    <xctk:Area x:Name="_area1" Title="Area #1">
      <xctk:Area.Series>
        <xctk:Series x:Name="_series">
          <xctk:Series.Layout>
            <xctk:LineLayout />
          </xctk:Series.Layout>
          <xctk:Series.DataPoints>
            <xctk:DataPoint X="1" Y="1" Label="Oct" />
            <xctk:DataPoint X="2" Y="2" Label="Jan"/>
            <xctk:DataPoint X="2.5" Y="1.5" Label="Feb" />
            <xctk:DataPoint X="4" Y="1" Label="Jun"/>
            <xctk:DataPoint X="1.5" Y="3" Label="Dec"/>
            <xctk:DataPoint X="5" Y="5" Label="Apr"/>
            <xctk:DataPoint X="3" Y="1" Label="Nov"/>
            <xctk:DataPoint X="4.5" Y="7" Label="Jul"/>
            <xctk:DataPoint X="3.5" Y="4.5" Label="Aug"/>
          </xctk:Series.DataPoints>
        </xctk:Series>
      </xctk:Area.Series>
    </xctk:Area>
  </xctk:Chart.Areas>
</xctk:Chart>
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Control
                     Xceed.Wpf.Toolkit.Chart.Chart

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Chart Members
Xceed.Wpf.Toolkit.Chart Namespace