mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-07 18:20:51 +08:00
31 lines
1.6 KiB
XML
31 lines
1.6 KiB
XML
<UserControl x:Class="Wpf.CartesianChart.CustomTooltipAndLegend.CustomTooltipAndLegendExample"
|
|
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"
|
|
xmlns:local="clr-namespace:Wpf.CartesianChart.CustomTooltipAndLegend"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance local:CustomTooltipAndLegendExample}">
|
|
<Grid>
|
|
<lvc:CartesianChart LegendLocation="Right">
|
|
<lvc:CartesianChart.Series>
|
|
<lvc:ColumnSeries Title="2016 Customers" Values="{Binding Customers}"></lvc:ColumnSeries>
|
|
</lvc:CartesianChart.Series>
|
|
<lvc:CartesianChart.AxisX >
|
|
<lvc:Axis Labels="{Binding Labels}" LabelsRotation="-15">
|
|
<lvc:Axis.Separator>
|
|
<lvc:Separator Step="1"></lvc:Separator>
|
|
</lvc:Axis.Separator>
|
|
</lvc:Axis>
|
|
</lvc:CartesianChart.AxisX>
|
|
<lvc:CartesianChart.DataTooltip>
|
|
<local:CustomersTooltip/>
|
|
</lvc:CartesianChart.DataTooltip>
|
|
<lvc:CartesianChart.ChartLegend>
|
|
<local:CustomersLegend></local:CustomersLegend>
|
|
</lvc:CartesianChart.ChartLegend>
|
|
</lvc:CartesianChart>
|
|
</Grid>
|
|
</UserControl>
|