The requested page is not available for the requested platform. You are viewing the content for Default platform.

CartesianChart Class

The Cartesian Chart control to plot series of data points on an XY Cartesian diagram.

Namespace: DevExpress.UI.Xaml.Charts

Assembly: DevExpress.UI.Xaml.Charts.v19.1.dll

Declaration

[ToolboxTabName("DX.19.1: Visualization")]
public class CartesianChart :
    ChartBase,
    IChartViewHolder,
    IRangeControlSupport
<ToolboxTabName("DX.19.1: Visualization")>
Public Class CartesianChart
    Inherits ChartBase
    Implements IChartViewHolder,
               IRangeControlSupport

Remarks

The CartesianChart class represents a visual control intended for graphical data representation. It is comprised of separate elements, such as axes, legend, etc. To learn more about them, refer to Visual Elements.

To display a Series on a chart, it's necessary to add this series to the collection returned by the ChartBase.Series property. Note that the CartesianChart control can display only series for which Series.View is one of the CartesianSeriesView class descendants (e.g., AreaSeriesView, SideBySideBarSeriesView, PointSeriesView, etc.).

To display series of the PieSeriesView, DonutSeriesView and NestedDonutSeriesView type, use the PieChart control instead.

Examples

This example demonstrates how to create a simple Cartesian chart with 3 Stacked Bar series, populate them with data and adjust common settings.

<Page

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:CartesianChart"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Charts="using:DevExpress.UI.Xaml.Charts"
    x:Class="CartesianChart.MainPage"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">

        <Charts:CartesianChart Margin="50">
            <Charts:CartesianChart.Legend>
                <Charts:Legend HorizontalPosition="Left" VerticalPosition="Top"/>
            </Charts:CartesianChart.Legend>
            <Charts:CartesianChart.Series>
                <Charts:Series DisplayName="Illinois">
                    <Charts:Series.View>
                        <Charts:StackedBarSeriesView />
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:DataPointCollection ArgumentScaleType="Qualitative">
                            <Charts:DataPoint Argument="1998" Value="423.721"/>
                            <Charts:DataPoint Argument="2001" Value="476.851"/>
                            <Charts:DataPoint Argument="2004" Value="528.904"/>
                        </Charts:DataPointCollection>
                    </Charts:Series.Data>
                </Charts:Series>
                <Charts:Series DisplayName="Indiana">
                    <Charts:Series.View>
                        <Charts:StackedBarSeriesView />
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:DataPointCollection ArgumentScaleType="Qualitative">
                            <Charts:DataPoint Argument="1998" Value="178.719" />
                            <Charts:DataPoint Argument="2001" Value="195.769" />
                            <Charts:DataPoint Argument="2004" Value="227.271" />
                        </Charts:DataPointCollection>
                    </Charts:Series.Data>
                </Charts:Series>
                <Charts:Series DisplayName="Michigan" >
                    <Charts:Series.View>
                        <Charts:StackedBarSeriesView />
                    </Charts:Series.View>
                    <Charts:Series.Data>
                        <Charts:DataPointCollection ArgumentScaleType="Qualitative">
                            <Charts:DataPoint Argument="1998" Value="308.845" />
                            <Charts:DataPoint Argument="2001" Value="335.793" />
                            <Charts:DataPoint Argument="2004" Value="372.576" />
                        </Charts:DataPointCollection>
                    </Charts:Series.Data>
                </Charts:Series>
            </Charts:CartesianChart.Series>
        </Charts:CartesianChart>

    </Grid>
</Page>

Inheritance

Object
Windows.UI.Xaml.DependencyObject
Windows.UI.Xaml.UIElement
Windows.UI.Xaml.FrameworkElement
Windows.UI.Xaml.Controls.Control
ChartBase
CartesianChart

Implements

Windows.UI.Composition.IAnimationObject
DevExpress.UI.Xaml.Charts.Native.IChartViewHolder
DevExpress.UI.Xaml.Charts.Native.IRangeControlSupport
See Also