You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
2.1 KiB

2 years ago
<Window x:Class="ChartSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ChartSample"
xmlns:live="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
2 years ago
xmlns:idd="clr-namespace:InteractiveDataDisplay.WPF;assembly=InteractiveDataDisplay.WPF"
2 years ago
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
2 years ago
<RowDefinition Height="2*"/>
2 years ago
</Grid.RowDefinitions>
<!--Code-->
<live:CartesianChart x:Name="chart" Grid.Row="0"
BorderBrush="Red" BorderThickness="2" LegendLocation="Top" Margin="15"/>
2 years ago
2 years ago
<!--Xaml-->
<live:CartesianChart x:Name="xamlChart" Grid.Row="1"
BorderBrush="Red" BorderThickness="2" LegendLocation="Top" Margin="15">
<live:CartesianChart.AxisY>
<live:Axis MinValue="0" MaxValue="1000"/>
</live:CartesianChart.AxisY>
<live:CartesianChart.AxisX>
<live:Axis Labels="1, 2, 3, 4, 5, 6, 7, 8, 9, 10"/>
</live:CartesianChart.AxisX>
<live:CartesianChart.Series>
<live:LineSeries Stroke="Green" Title="Sample1" Values="100, 20, 45, 45, 12, 33, 56, 45, 83, 88"/>
2 years ago
<live:LineSeries Stroke="Red" Title="Sample2" Values="33, 34, 43, 725, 162, 233, 46, 375, 93, 128"/>
2 years ago
</live:CartesianChart.Series>
</live:CartesianChart>
2 years ago
<idd:Chart x:Name="iddChart" Grid.Row="2"
BottomTitle="Argument" LeftTitle="Function" Grid.RowSpan="2">
<idd:LineGraph x:Name="iddLineGraph" Description="Simple Linegraph" Stroke="Blue" StrokeThickness="2"/>
</idd:Chart>
2 years ago
</Grid>
</Window>