PointSeriesView Class
In This Article
The Point series view.
Namespace: DevExpress.WinUI.Charts
Assembly: DevExpress.WinUI.Charts.v23.2.dll
NuGet Package: DevExpress.WinUI
#Declaration
public class PointSeriesView :
MarkerSeriesView
#Remarks
Use the Series.View property to define the series view type.
The following example creates a Point chart:
<Window
x:Class="PointChartExample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:PointChartExample"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:Charts="using:DevExpress.WinUI.Charts"
mc:Ignorable="d">
<Grid>
<Grid.DataContext>
<local:PointChartViewModel/>
</Grid.DataContext>
<Charts:CartesianChart x:Name="chart">
<Charts:CartesianChart.AxisX>
<Charts:AxisX ShowLine="False"
ShowLabels="False"/>
</Charts:CartesianChart.AxisX>
<Charts:CartesianChart.AxisY>
<Charts:AxisY ShowMinorGridlines="True"
Title="Worldwide Grosses, M$"
WholeRangeAutoCorrect="False"
WholeRangeStartValue="800"
WholeRangeEndValue="3100"/>
</Charts:CartesianChart.AxisY>
<Charts:CartesianChart.Series>
<Charts:Series DisplayName="Movies">
<Charts:Series.View>
<Charts:PointSeriesView MarkerSize="25"
ColorEach="True"
ShowLabels="True"
LabelPattern="{}{A}: ${V}M"
ShowLabelConnectors="False"
LabelAngle="-10"/>
</Charts:Series.View>
<Charts:Series.Data>
<Charts:DataSource PointSource="{Binding SeriesData}"
ArgumentDataMember="Name"
ArgumentScaleType="Qualitative"
ValueDataMember="Grosses"
ValueScaleType="Numerical"/>
</Charts:Series.Data>
</Charts:Series>
</Charts:CartesianChart.Series>
</Charts:CartesianChart>
</Grid>
</Window>
using DevExpress.Mvvm;
using Microsoft.UI.Xaml;
using System.Collections.Generic;
namespace PointChartExample {
public sealed partial class MainWindow : Window {
public MainWindow() {
this.InitializeComponent();
}
}
public class PointChartViewModel : ViewModelBase {
public List<Movie> SeriesData { get; }
public PointChartViewModel() {
SeriesData = new List<Movie>() {
new Movie("Avatar", 2787),
new Movie("Titanic", 2186),
new Movie("Star Wars: Episode VII", 2068),
new Movie("Jurassic World", 1670),
new Movie("The Dark Knight", 1000),
new Movie("Furious 7" , 1516),
new Movie("Avengers: Age of Ultron", 1405)
};
}
}
public class Movie {
public string Name { get; set; }
public double Grosses { get; set; }
public Movie(string name, double grosses) {
Name = name;
Grosses = grosses;
}
}
}
For step-by-step instructions on how to create a Cartesian chart, refer to the following help topic: Lesson 1 - Create a Cartesian Chart.
#Inheritance
Object
DependencyObject
UIElement
FrameworkElement
DevExpress.WinUI.Core.Internal.DXLogicalFrameworkElement
See Also