WPF-Chart-Controls
1.1.1.1
See the version list below for details.
dotnet add package WPF-Chart-Controls --version 1.1.1.1
NuGet\Install-Package WPF-Chart-Controls -Version 1.1.1.1
<PackageReference Include="WPF-Chart-Controls" Version="1.1.1.1" />
paket add WPF-Chart-Controls --version 1.1.1.1
#r "nuget: WPF-Chart-Controls, 1.1.1.1"
// Install WPF-Chart-Controls as a Cake Addin #addin nuget:?package=WPF-Chart-Controls&version=1.1.1.1 // Install WPF-Chart-Controls as a Cake Tool #tool nuget:?package=WPF-Chart-Controls&version=1.1.1.1
📈 WPF Chart Controls 📊
A WPF control library for responsive column, line, and pie charts.
🖥️ Demo
Kareem has a video demoing and explaining functionality or you can download and check out the charts in the Example project.
📊 2D Column Chart
Usage
- Import the namespace
xmlns:wpfChartControls="clr-namespace:WPFChartControls;assembly=WPFChartControls"
- Add chart
<wpfChartControls:_2DColumnChart />
- Bind data to Items property
- using code-behind
<wpfChartControls:_2DColumnChart x:Name="ColumnChart" />
ColumnChart.Items = TestColumnItems.Case4;
- using attribute binding
<wpfChartControls:_2DColumnChart Items="{Binding Items}" />
Properties
Items
- collection ofColumnItem
items to be displayed in the chartColumnBrush
- brush used for theColumnItem
itemsStroke
- brush used to draw the axis and linesStrokeThickness
- thickness of the axis and linesIntervalCount
- number of intervals to be displayed on the Y-axisInnerPadding
- inner padding of the chart area
Related Objects
ColumnItem
- an item in the column chart with aHeader
andValue
TestColumnItems
- provides test case collections ofColumnItem
instances
🥧 2D Pie Chart
Usage
- Import the namespace
xmlns:wpfChartControls="clr-namespace:WPFChartControls;assembly=WPFChartControls"
- Add chart
<wpfChartControls:_2DPieChart />
- Bind data to Items property
- using code-behind
<wpfChartControls:_2DPieChart x:Name="PieChart" />
PieChart.Categories = TestPieCategories.Case6;
- using attribute binding
<wpfChartControls:_2DPieChart Categories="{Binding Categories}" />
Properties
Categories
- collection ofPieCategory
items to be displayed in the chartStrokeBrush
- brush used to draw the strokes of the pie slicesStrokeThickness
- thickness of the strokes of the pie slicesLegendPosition
- position of the legend relative to the chart
Related Objects
PieCategory
- a category in a pie chart with aPercentage
,Title
, andColorBrush
LegendPosition
- position of the legend (values:Top
,Left
,Right
,Bottom
)TestPieCategories
- provides test case collections ofPieCategory
instances
📈 Line Chart
Usage
- Import the namespace
xmlns:wpfChartControls="clr-namespace:WPFChartControls;assembly=WPFChartControls"
- Add chart
<wpfChartControls:LineChart />
- Bind data to Items property
- using code-behind
<wpfChartControls:LineChart x:Name="LineChart" />
LineChart.Values = TestLineValues.Case3;
- using attribute binding
<wpfChartControls:LineChart Values="{Binding Values}" />
Properties
Values
- collection ofLineValue
items to be displayed in the chartAxisStrokeBrush
- brush used to draw the axis strokesAxisStrokeThickness
- thickness of the axis strokesGridLineStrokeBrush
- brush used to draw the grid linesGridLineStrokeThickness
- thickness of the grid linesGridLineOpacity
- opacity of the grid linesInnerPadding
- inner padding of the chart areaValueLineStrokeBrush
- brush used to draw the value lineValueLineStrokeThickness
- thickness of the value lineXIntervalCount
- number of intervals to be displayed on the X-axisYIntervalCount
- number of intervals to be displayed on the Y-axis
Related Objects
LineValue
- a value in a line chart withX
andY
coordinatesTestLineValues
- provides test case collections ofLineValue
instances
💪🏾 Credits
Thank you to Kareem Sulthan, who shared the code that became the foundation of WPF Chart Controls.
From there I did lots of refactoring, made each chart adjust sizing when the window height/width is changed, and added documentation comments to increase reusability.
📃 License
Copyright (c) 2024 Kareem Sulthan, Justin M Heartley
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.