Arc and Pie Chart
Posted: 17 Dec 2015, 19:52
Good Afternoon,
I had the need to build an arc control and pie chart control for my current project and figured I would share.
There is a lot more that could be done and I may update in the future with a legend for the pie chart and tool-tips.
Originally I was going to have the collection be a dependency property for the pie slices but there is an issue that I was unable to resolve with the dependency property when using noesis during the build process, but it dosen't seem important.
Here are examples of both.
Thanks,
Greg
I had the need to build an arc control and pie chart control for my current project and figured I would share.
There is a lot more that could be done and I may update in the future with a legend for the pie chart and tool-tips.
Originally I was going to have the collection be a dependency property for the pie slices but there is an issue that I was unable to resolve with the dependency property when using noesis during the build process, but it dosen't seem important.
Here are examples of both.
Code: Select all
<UserControl
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:control="clr-namespace:Assets.BrightHue.Control;assembly=Nexus.Views"
mc:Ignorable="d"
Height="350" Width="525">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<control:PieChartControl Width="90" Height="90" Grid.Column="0">
<control:PieChartControl.PieSlices>
<control:PieSlice Color="Blue" Percent="60"></control:PieSlice>
<control:PieSlice Color="Red" Percent="10"></control:PieSlice>
<control:PieSlice Color="Black" Percent="40"></control:PieSlice>
</control:PieChartControl.PieSlices>
</control:PieChartControl>
<control:ArcControl Height="60" Width="60" ArcWidth="90" Fill="Aquamarine" Direction="90" Grid.Column="1"/>
</Grid>
</UserControl>
Greg