WinUI

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfCartesianChart - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfCartesianChart

    Renders the Cartesian type charts.

    Inheritance
    System.Object
    ChartBase
    SfCartesianChart
    Implements
    System.IDisposable
    Inherited Members
    ChartBase.VisibleSeriesProperty
    ChartBase.HeaderProperty
    ChartBase.HorizontalHeaderAlignmentProperty
    ChartBase.VerticalHeaderAlignmentProperty
    ChartBase.TooltipBehaviorProperty
    ChartBase.LegendProperty
    ChartBase.SuspendSeriesNotification()
    ChartBase.ResumeSeriesNotification()
    ChartBase.Dispose()
    ChartBase.OnApplyTemplate()
    ChartBase.MeasureOverride(Size)
    ChartBase.OnLostFocus(RoutedEventArgs)
    ChartBase.OnGotFocus(RoutedEventArgs)
    ChartBase.OnPointerCaptureLost(PointerRoutedEventArgs)
    ChartBase.OnTapped(TappedRoutedEventArgs)
    ChartBase.OnRightTapped(RightTappedRoutedEventArgs)
    ChartBase.OnPointerWheelChanged(PointerRoutedEventArgs)
    ChartBase.OnPointerExited(PointerRoutedEventArgs)
    ChartBase.OnPointerEntered(PointerRoutedEventArgs)
    ChartBase.OnPointerCanceled(PointerRoutedEventArgs)
    ChartBase.OnKeyUp(KeyRoutedEventArgs)
    ChartBase.OnKeyDown(KeyRoutedEventArgs)
    ChartBase.OnHolding(HoldingRoutedEventArgs)
    ChartBase.OnManipulationStarting(ManipulationStartingRoutedEventArgs)
    ChartBase.OnManipulationStarted(ManipulationStartedRoutedEventArgs)
    ChartBase.OnManipulationInertiaStarting(ManipulationInertiaStartingRoutedEventArgs)
    ChartBase.OnManipulationCompleted(ManipulationCompletedRoutedEventArgs)
    ChartBase.OnManipulationDelta(ManipulationDeltaRoutedEventArgs)
    ChartBase.OnPointerPressed(PointerRoutedEventArgs)
    ChartBase.OnPointerMoved(PointerRoutedEventArgs)
    ChartBase.OnPointerReleased(PointerRoutedEventArgs)
    ChartBase.OnDoubleTapped(DoubleTappedRoutedEventArgs)
    ChartBase.TooltipBehavior
    ChartBase.Header
    ChartBase.HorizontalHeaderAlignment
    ChartBase.VerticalHeaderAlignment
    ChartBase.Legend
    ChartBase.SeriesBoundsChanged
    Namespace: Syncfusion.UI.Xaml.Charts
    Assembly: Syncfusion.Chart.WinUI.dll
    Syntax
    public class SfCartesianChart : ChartBase, IDisposable
    Remarks

    The Cartesian chart control is used to visualize the data graphically, it typically have horizontal and vertical axes.

    SfCartesianChart class properties provides an option to add the series and axis collection, allows to customize the chart elements such as series, axis, legend, data label and tooltip features.

    Axis

    ChartAxis is used to locate a data point inside the chart area. Charts typically have two axes that are used to measure and categorize data. Vertical(Y) axis always uses numerical scale. Horizontal(X) axis supports the Category, Numeric and Date time.

    To render an axis, the chart axis instance has to be added in chart’s XAxes and YAxes collection as per the following code snippet.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
            <chart:SfCartesianChart.BindingContext>
                <local:ViewModel/>
            </chart:SfCartesianChart.BindingContext>
    
            <chart:SfCartesianChart.XAxes>
                <chart:NumericalAxis/>
            </chart:SfCartesianChart.XAxes>
    
            <chart:SfCartesianChart.YAxes>
                <chart:NumericalAxis/>
            </chart:SfCartesianChart.YAxes>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);

    Series

    ChartSeries is the visual representation of data. SfCartesianChart offers many types such as Line, Fast line, Fast column, Fast scatter, Fast step line, Spline, Column, Scatter, Bubble, Area and SplineArea series. Based on your requirements and specifications, any type of series can be added for data visualization.

    To render a series, create an instance of required series class, and add it to the Series collection.

    • MainPage.xaml
    • MainPage.xaml.cs
    • ViewModel.cs
     
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
               <chart:LineSeries ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
               <chart:LineSeries ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
           </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue1"
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue2"
    };
    chart.Series.Add(series2);
    public ObservableCollection<Model> Data { get; set; }
    
    public ViewModel()
    {
       Data = new ObservableCollection<Model>();
       Data.Add(new Model() { XValue = 10, YValue1 = 100, YValue2 = 110 });
       Data.Add(new Model() { XValue = 20, YValue1 = 150, YValue2 = 100 });
       Data.Add(new Model() { XValue = 30, YValue1 = 110, YValue2 = 130 });
       Data.Add(new Model() { XValue = 40, YValue1 = 230, YValue2 = 180 });
    }

    Legend

    The Legend contains list of chart series or data points in chart. The information provided in each legend item helps to identify the corresponding data series in chart. The Series Label property text will be displayed in the associated legend item.

    To render a legend, create an instance of ChartLegend, and assign it to the Legend property.

    • MainPage.xaml
    • MainPage.xaml.cs
     
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.Legend>
               <chart:ChartLegend/>
           </chart:SfCartesianChart.Legend>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
               <chart:LineSeries Label="Singapore" ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
               <chart:LineSeries Label="Spain" ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
           </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.Legend = new ChartLegend();
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue1",
        Label = "Singapore"
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue2",
        Label = "Spain"
    };
    chart.Series.Add(series2);

    Tooltip

    Tooltip displays information while tapping or mouse hover on the segment. To display the tooltip on chart, you need to set the ShowTooltip property as true in ChartSeriesBase.

    To customize the appearance of the tooltip elements like Background, TextColor and Font, create an instance of ChartTooltipBehavior class, modify the values, and assign it to the chart’s TooltipBehavior property.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
            <chart:SfCartesianChart.BindingContext>
                <local:ViewModel/>
            </chart:SfCartesianChart.BindingContext>
    
            <chart:SfCartesianChart.TooltipBehavior>
                <chart:ChartTooltipBehavior/>
            </chart:SfCartesianChart.TooltipBehavior>
    
            <chart:SfCartesianChart.XAxes>
                <chart:NumericalAxis/>
            </chart:SfCartesianChart.XAxes>
    
            <chart:SfCartesianChart.YAxes>
                <chart:NumericalAxis/>
            </chart:SfCartesianChart.YAxes>
    
            <chart:SfCartesianChart.Series>
                <chart:LineSeries ShowTooltip="True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
                <chart:LineSeries ShowTooltip="True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
            </chart:SfCartesianChart.Series>
    
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.TooltipBehavior = new ChartTooltipBehavior();
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
       ShowTooltip = true
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue2",
       ShowTooltip = true
    };
    chart.Series.Add(series2);

    Data Label

    Data labels are used to display values related to a chart segment. To render the data labels, you need to enable the ShowDataLabels property as true in DataMarkerSeries class.

    To customize the chart data labels alignment, placement and label styles, need to create an instance of CartesianDataLabelSettings and set to the DataLabelSettings property.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
               <chart:ColumnSeries ShowDataLabels="True" ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
           </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    ColumnSeries series = new ColumnSeries()
    {
        ItemsSource = viewmodel.Data,
        XBindingPath = "XValue",
        YBindingPath = "YValue1",
        ShowDataLabels = true
    };
    chart.Series.Add(series);

    Zooming and Panning

    SfCartesianChart allows you to zoom the chart area with the help of the zoom feature. This behavior is mostly used to view the data point in the specific area, when there are large number of data points inside the chart.

    Zooming and panning provides you to take a close-up look of the data point plotted in the series. To enable the zooming and panning in the chart, create an instance of ChartZoomPanBehavior and set it to the ZoomPanBehavior property of SfCartesianChart.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.ZoomPanBehavior>
               <chart:ChartZoomPanBehavior EnablePanning = "True" EnableDoubleTap="True" EnablePinchZooming="True"/>
           </chart:SfCartesianChart.ZoomPanBehavior>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
            </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.ZoomPanBehavior = new ChartZoomPanBehavior() { EnablePinchZooming = true, EnableDoubleTap = true, EnablePanning = true };
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue2",
    };
    chart.Series.Add(series2);

    Selection

    SfCartesianChart allows you to select or highlight a segment or series in the chart by using ChartSelectionBehavior.

    SfCartessianChart provides seperate behaviors for series and segment selection. To enable the series selection in the chart, create an instance of SeriesSelectionBehavior and set it to the SelectionBehavior property of SfCartesianChart.

    • MainPage.xaml
    • MainPage.xaml.cs
    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.SelectionBehavior>
               <chart:SeriesSelectionBehavior SelectionBrush="Red"/>
           </chart:SfCartesianChart.SelectionBehavior>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
                <chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
                <chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
            </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.SelectionBehavior = new SeriesSelectionBehavior() { SelectionBrush=new SolidColorBrush(Colors.Green) };
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    ColumnSeries series1 = new ColumnSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
    };
    chart.Series.Add(series1);
    
    ColumnSeries series2 = new ColumnSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue2",
    };
    chart.Series.Add(series2);

    DataPointSelectionBehavior is applicable only to certain series such as ColumnSeries, AreaSeries, BubbleSeries,LineSeries,ScatterSeries, SplineSeries,SplineAreaSeries,StackedAreaSeries,StackedColumnSeries, StepAreaSeries,StepLineSeries.

    To enable the segment selection in the chart, create an instance of DataPointSelectionBehavior and set it to the SelectionBehavior property of series.

    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
            <chart:SfCartesianChart.Series>
                <chart:ColumnSeries ItemsSource = "{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1">
                    <chart:ColumnSeries.SelectionBehavior>
                        <chart:DataPointSelectionBehavior SelectionBrush = "Green" />
                    </ chart:ColumnSeries.SelectionBehavior>
                </chart:ColumnSeries>
            </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    DataPointSelectionBehavior selectionBehavior = new DataPointSelectionBehavior()
    {
       SelectionBrush=new SolidColorBrush(Colors.Green)
    };
    ColumnSeries series1 = new ColumnSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
       Selection = selectionBehavior
    };
    chart.Series.Add(series1);

    Cross Hair

    SfCartesianChart allows you to view the informations related to Chart coordinates, at mouse over position or at touch contact point inside a Chart.

    ChartCrosshairBehavior displays a vertical line, horizontal line and a popup like control displaying information about the data point at touch contact point or at mouse over position. To enable the cross hair in the chart, create an instance of ChartCrosshairBehavior and set it to the CrosshairBehavior property of SfCartesianChart.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.CrosshairBehavior>
               <chart:ChartCrosshairBehavior/>
           </chart:SfCartesianChart.CrosshairBehavior>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
            </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.CrosshairBehavior = new ChartCrosshairBehavior();
    
    NumericalAxis xaxis = new NumericalAxis();
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue2",
    };
    chart.Series.Add(series2);

    Track Ball

    SfCartesianChart allows you to view tooltip for the data points that are nearer to mouse over position or at touch contact point in a Chart.

    To enable the track ball in the chart, create an instance of ChartTrackballBehavior and set it to the TrackballBehavior property of SfCartesianChart.

    To view the trackball label in the particular axis, you have to enable the ShowTrackballInfo property in that axis.

    • MainPage.xaml
    • MainPage.xaml.cs
    <chart:SfCartesianChart>
    
           <chart:SfCartesianChart.BindingContext>
               <local:ViewModel/>
           </chart:SfCartesianChart.BindingContext>
    
           <chart:SfCartesianChart.TrackballBehavior>
               <chart:ChartTrackballBehavior/>
           </chart:SfCartesianChart.TrackballBehavior>
    
           <chart:SfCartesianChart.XAxes>
               <chart:NumericalAxis ShowTrackballInfo="true"/>
           </chart:SfCartesianChart.XAxes>
    
           <chart:SfCartesianChart.YAxes>
               <chart:NumericalAxis/>
           </chart:SfCartesianChart.YAxes>
    
           <chart:SfCartesianChart.Series>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue1"/>
                <chart:LineSeries ItemsSource="{Binding Data}" XBindingPath="XValue" YBindingPath="YValue2"/>
            </chart:SfCartesianChart.Series>
    </chart:SfCartesianChart>
    SfCartesianChart chart = new SfCartesianChart();
    
    ViewModel viewModel = new ViewModel();
    chart.BindingContext = viewModel;
    
    chart.TrackballBehavior = new ChartTrackballBehavior();
    
    NumericalAxis xaxis = new NumericalAxis();
    xaxis.ShowTrackballInfo = true;
    chart.XAxes.Add(xaxis);	
    
    NumericalAxis yaxis = new NumericalAxis();
    chart.YAxes.Add(yaxis);
    
    LineSeries series1 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue1",
    };
    chart.Series.Add(series1);
    
    LineSeries series2 = new LineSeries()
    {
       ItemsSource = viewmodel.Data,
       XBindingPath = "XValue",
       YBindingPath = "YValue2",
    };
    chart.Series.Add(series2);

    Constructors

    SfCartesianChart()

    Declaration
    public SfCartesianChart()

    Fields

    CrosshairBehaviorProperty

    The DependencyProperty for CrosshairBehavior property.

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

    EnableSideBySideSeriesPlacementProperty

    Identifies the EnableSideBySideSeriesPlacement dependency property.

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

    The identifier for EnableSideBySideSeriesPlacement dependency property.

    IsTransposedProperty

    The DependencyProperty for IsTransposed property.

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

    PaletteBrushesProperty

    Identifies the PaletteBrushes dependency property.

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

    The identifier for PaletteBrushes dependency property.

    PlotAreaBackgroundProperty

    Identifies the PlotAreaBackground dependency property.

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

    The identifier for PlotAreaBackground dependency property.

    PlotAreaBorderBrushProperty

    Identifies the PlotAreaBorderBrush dependency property.

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

    The identifier for PlotAreaBorderBrush dependency property.

    PlotAreaBorderThicknessProperty

    Identifies the PlotAreaBorderThickness dependency property.

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

    The identifier for PlotAreaBorderThickness dependency property.

    SelectionBehaviorProperty

    The DependencyProperty for SelectionBehavior property.

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

    SeriesProperty

    Identifies the Series dependency property.

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

    The identifier for Series dependency property.

    TrackballBehaviorProperty

    The DependencyProperty for TrackballBehavior property.

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

    ZoomPanBehaviorProperty

    The DependencyProperty for ZoomPanBehavior property.

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

    Properties

    CrosshairBehavior

    Declaration
    public ChartCrosshairBehavior CrosshairBehavior { get; set; }
    Property Value
    Type Description
    ChartCrosshairBehavior

    EnableSideBySideSeriesPlacement

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

    IsTransposed

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

    PaletteBrushes

    Declaration
    public IList<Brush> PaletteBrushes { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IList<Microsoft.UI.Xaml.Media.Brush>

    PlotAreaBackground

    Declaration
    public Brush PlotAreaBackground { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.Brush

    PlotAreaBorderBrush

    Declaration
    public Brush PlotAreaBorderBrush { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Media.Brush

    PlotAreaBorderThickness

    Declaration
    public Thickness PlotAreaBorderThickness { get; set; }
    Property Value
    Type Description
    Microsoft.UI.Xaml.Thickness

    SelectionBehavior

    Declaration
    public SeriesSelectionBehavior SelectionBehavior { get; set; }
    Property Value
    Type Description
    SeriesSelectionBehavior

    Series

    Declaration
    public CartesianSeriesCollection Series { get; set; }
    Property Value
    Type Description
    CartesianSeriesCollection

    TrackballBehavior

    Declaration
    public ChartTrackballBehavior TrackballBehavior { get; set; }
    Property Value
    Type Description
    ChartTrackballBehavior

    XAxes

    Declaration
    public ObservableCollection<ChartAxis> XAxes { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<ChartAxis>

    YAxes

    Declaration
    public ObservableCollection<RangeAxisBase> YAxes { get; }
    Property Value
    Type Description
    System.Collections.ObjectModel.ObservableCollection<RangeAxisBase>

    ZoomPanBehavior

    Declaration
    public ChartZoomPanBehavior ZoomPanBehavior { get; set; }
    Property Value
    Type Description
    ChartZoomPanBehavior

    Implements

    System.IDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2022 Syncfusion Inc. All Rights Reserved