Tag: Charts

Adding labels to PieChart made with WPF Toolkit Charting Controls

WPF Toolkit Charting Controls is a dated assembly that allows to create line, bar, area, pie and column charts (it is possible to find an exhaustive and very tutorial on CodeProject about how to use it). It is a really ready to use tool, but sometimes it lacks some useful features.

In my case the pie chart does not allow to show labels with percentage on each pie area. It is a real pity.

Since each pie area is rendered by using a Geometry, my idea is to add something (i.e. another Geometry) to the one already computed. Areas are a handled by the PieDataPoint class. So we can get the Geometry computed by PieDataPoint, then add a new Geometry with the relative parcentage value and the use this new composition for drawing the area in the chart.

Continue reading “Adding labels to PieChart made with WPF Toolkit Charting Controls”