mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-12 04:06:36 +08:00
项目结构调整
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
<UserControl x:Class="Wpf.CartesianChart.Irregular_Intervals.IrregularIntervalsExample"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300">
|
||||
<Grid>
|
||||
<lvc:CartesianChart Series="{Binding SeriesCollection}"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,60 @@
|
||||
using System.Windows.Controls;
|
||||
using LiveCharts;
|
||||
using LiveCharts.Defaults;
|
||||
using LiveCharts.Wpf;
|
||||
|
||||
namespace Wpf.CartesianChart.Irregular_Intervals
|
||||
{
|
||||
|
||||
public partial class IrregularIntervalsExample : UserControl
|
||||
{
|
||||
public IrregularIntervalsExample()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
SeriesCollection = new SeriesCollection
|
||||
{
|
||||
new LineSeries
|
||||
{
|
||||
Values = new ChartValues<ObservablePoint>
|
||||
{
|
||||
new ObservablePoint(0, 10),
|
||||
new ObservablePoint(4, 7),
|
||||
new ObservablePoint(5, 3),
|
||||
new ObservablePoint(7, 6),
|
||||
new ObservablePoint(10, 8)
|
||||
},
|
||||
PointGeometrySize = 15
|
||||
},
|
||||
new LineSeries
|
||||
{
|
||||
Values = new ChartValues<ObservablePoint>
|
||||
{
|
||||
new ObservablePoint(0, 2),
|
||||
new ObservablePoint(2, 5),
|
||||
new ObservablePoint(3, 6),
|
||||
new ObservablePoint(6, 8),
|
||||
new ObservablePoint(10, 5)
|
||||
},
|
||||
PointGeometrySize = 15
|
||||
},
|
||||
new LineSeries
|
||||
{
|
||||
Values = new ChartValues<ObservablePoint>
|
||||
{
|
||||
new ObservablePoint(0, 4),
|
||||
new ObservablePoint(5, 5),
|
||||
new ObservablePoint(7, 7),
|
||||
new ObservablePoint(9, 10),
|
||||
new ObservablePoint(10, 9)
|
||||
},
|
||||
PointGeometrySize = 15
|
||||
}
|
||||
};
|
||||
|
||||
DataContext = this;
|
||||
}
|
||||
|
||||
public SeriesCollection SeriesCollection { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user