menu

Class CartesianSeries - API Reference

    Show / Hide Table of Contents

    Class CartesianSeries

    Inheritance
    System.Object
    ChartSeries
    CartesianSeries
    XyDataSeries
    Inherited Members
    ChartSeries.SelectionBehaviorProperty
    ChartSeries.SpacingProperty
    ChartSeries.TooltipTemplateProperty
    ChartSeries.EnableTooltipProperty
    ChartSeries.ListenPropertyChangeProperty
    ChartSeries.IsSeriesVisibleProperty
    ChartSeries.XBindingPathProperty
    ChartSeries.ItemsSourceProperty
    ChartSeries.TrackballLabelTemplateProperty
    ChartSeries.FillProperty
    ChartSeries.LabelProperty
    ChartSeries.LegendIconProperty
    ChartSeries.LegendIconTemplateProperty
    ChartSeries.IsVisibleOnLegendProperty
    ChartSeries.EnableAnimationProperty
    ChartSeries.AnimationDurationProperty
    ChartSeries.PaletteBrushesProperty
    ChartSeries.ShowDataLabelsProperty
    ChartSeries.SuspendNotification()
    ChartSeries.ResumeNotification()
    ChartSeries.OnPointerPressed(PointerRoutedEventArgs)
    ChartSeries.OnPointerMoved(PointerRoutedEventArgs)
    ChartSeries.OnTapped(TappedRoutedEventArgs)
    ChartSeries.OnPointerExited(PointerRoutedEventArgs)
    ChartSeries.OnPointerReleased(PointerRoutedEventArgs)
    ChartSeries.SelectionBehavior
    ChartSeries.PaletteBrushes
    ChartSeries.TooltipTemplate
    ChartSeries.EnableTooltip
    ChartSeries.ListenPropertyChange
    ChartSeries.IsSeriesVisible
    ChartSeries.ItemsSource
    ChartSeries.TrackballLabelTemplate
    ChartSeries.Fill
    ChartSeries.Label
    ChartSeries.LegendIcon
    ChartSeries.LegendIconTemplate
    ChartSeries.IsVisibleOnLegend
    ChartSeries.XBindingPath
    ChartSeries.EnableAnimation
    ChartSeries.AnimationDuration
    ChartSeries.Chart
    ChartSeries.ShowDataLabels
    ChartSeries.PropertyChanged
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.Chart.WinUI.dll
    Syntax
    public abstract class CartesianSeries : ChartSeries

    Constructors

    CartesianSeries()

    Called when instance created for CartesianSeries.

    Declaration
    public CartesianSeries()

    Fields

    DataLabelSettingsProperty

    The DependencyProperty for CartesianDataLabelSettings property.

    Declaration
    public static readonly DependencyProperty DataLabelSettingsProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    ShowTrackballLabelProperty

    The DependencyProperty for ShowTrackballLabel property.

    Declaration
    public static readonly DependencyProperty ShowTrackballLabelProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    XAxisNameProperty

    The DependencyProperty for XAxisName property.

    Declaration
    public static readonly DependencyProperty XAxisNameProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    YAxisNameProperty

    The DependencyProperty for YAxisName property.

    Declaration
    public static readonly DependencyProperty YAxisNameProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    DataLabelSettings

    Gets or sets a value to customize the appearance of the displaying data labels in the cartesian series.

    Declaration
    public CartesianDataLabelSettings DataLabelSettings { get; set; }
    Property Value
    Type Description
    CartesianDataLabelSettings

    It takes the CartesianDataLabelSettings.

    Remarks

    This allows us to change the look of the displaying labels' content, shapes, and connector lines at the data point.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:AreaSeries ItemsSource="{Binding Data}"
                               XBindingPath="XValue"
                               YBindingPath="YValue">
                 <chart:AreaSeries.DataLabelSettings>
                     <chart:CartesianDataLabelSettings />
                 </chart:AreaSeries.DataLabelSettings>
             </chart:AreaSeries>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        AreaSeries series = new AreaSeries();
        series.ItemsSource = viewModel.Data;
        series.XBindingPath = "XValue";
        series.YBindingPath = "YValue";
        series.DataLabelSettings = new CartesianDataLabelSettings();
        chart.Series.Add(series);

    ShowTrackballLabel

    Gets or sets a value indicating whether to show or hide the series information when the trackball is shown.

    Declaration
    public bool ShowTrackballLabel { get; set; }
    Property Value
    Type Description
    System.Boolean

    It takes bool values and its default value is true.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <!-- ... Eliminated for simplicity-->
    
             <chart:SplineSeries ItemsSource="{Binding Data}"
                                 XBindingPath="XValue"
                                 YBindingPath="YValue"
                                 ShowTrackballLabel = "True"/>
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        // Eliminated for simplicity
    
        SplineSeries splineSeries = new SplineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              ShowTrackballLabel = true,
        };
    
        chart.Series.Add(splineSeries);

    XAxisName

    Gets or sets the name of the (horizontal) axis in the XAxes collection which is used to plot the series with particular axis.

    Declaration
    public string XAxisName { get; set; }
    Property Value
    Type Description
    System.String
    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <chart:SfCartesianChart.XAxes>
           <chart:CategoryAxis x:Name="XAxis1"/>
           <chart:NumericalAxis x:Name="XAxis2"/>
       </chart:SfCartesianChart.XAxes>
    
       <chart:SfCartesianChart.YAxes>
          <chart:NumericalAxis />
      </chart:SfCartesianChart.YAxes>
    
             <chart:SplineSeries ItemsSource="{Binding Data}"
                                 XBindingPath="XValue"
                                 YBindingPath="YValue" />
             <chart:ColumnSeries ItemsSource = "{Binding Data}"
                                 XBindingPath="XValue"
                                 YBindingPath="YValue"
                                 XAxisName="XAxis2" />
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        var XAxis1 = new CategoryAxis() { Name = "XAXis1" };
        var XAxis2 = new NumericalAxis() { Name = "XAXis2" }; 
        chart.XAxes.Add(XAxis1);
        chart.XAxes.Add(XAxis2);
        var YAxis = new NumericalAxis();
        chart.YAxes.Add(YAxis);
    
        SplineSeries splineSeries = new SplineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
        };
    
        ColumnSeries columnSeries = new ColumnSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              XAxisName = "XAXis2",
        };
    
        chart.Series.Add(splineSeries);
        chart.Series.Add(columnSeries);

    YAxisName

    Gets or sets the name of the (vertical) axis in the YAxes collection which is used to plot the series with particular axis.

    Declaration
    public string YAxisName { get; set; }
    Property Value
    Type Description
    System.String

    It takes the string value and its default value is null.

    Examples
    • Xaml
    • C#
        <chart:SfCartesianChart>
    
        <chart:SfCartesianChart.XAxes>
           <chart:CategoryAxis />
       </chart:SfCartesianChart.XAxes>
    
       <chart:SfCartesianChart.YAxes>
          <chart:NumericalAxis x:Name="YAxis1"/>
          <chart:NumericalAxis x:Name="YAxis2"/>
      </chart:SfCartesianChart.YAxes>
    
             <chart:SplineSeries ItemsSource="{Binding Data}"
                                 XBindingPath="XValue"
                                 YBindingPath="YValue" />
             <chart:ColumnSeries ItemsSource = "{Binding Data}"
                                 XBindingPath="XValue"
                                 YBindingPath="YValue"
                                 YAxisName="YAxis2" />
    
        </chart:SfCartesianChart>
        SfCartesianChart chart = new SfCartesianChart();
        ViewModel viewModel = new ViewModel();
    
        var XAxis = new CategoryAxis();
        chart.XAxes.Add(XAxis);
        var YAxis1 = new NumericalAxis(){Name = "YAXis1"};
        var YAxis2 = new NumericalAxis(){Name = "YAXis2"};
        chart.YAxes.Add(YAxis1);
        chart.YAxes.Add(YAxis2);
    
        SplineSeries splineSeries = new SplineSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
        };
    
        ColumnSeries columnSeries = new ColumnSeries()
        {
              ItemsSource = viewModel.Data,
              XBindingPath = "XValue",
              YBindingPath = "YValue",
              YAxisName = "YAXis2",
        };
    
        chart.Series.Add(splineSeries);
        chart.Series.Add(columnSeries);

    Methods

    OnApplyTemplate()

    Declaration
    protected override void OnApplyTemplate()
    Overrides
    ChartSeries.OnApplyTemplate()
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved