Today we would like to highlight one exciting feature that will find its way into the new RadChart control for WPF -- the control grants you the absolute freedom to compose its layout based on your business requirements and not the other way around. This effectively means that you can add an unlimited number of chart building blocks (chart areas, legends, and titles) so we will demonstrate now how easy the layout customization can be.
Basically the control provides three options for layout customization:
Let us give this a try and try to replicate this sample layout:
Option 1: Customizing the Default Template
First we need to declare a resource for our custom template that should hold two ChartArea instances, a title and a legend. We will use the standard Grid panel to accommodate the elements. We also need to associate the chart areas with the respective legend they will use and apply the template like this:
Let's feed our control some sample data:
Here is the final result:
Note that with this approach you have a direct reference to the ChartArea instance (instead of using FindName(...) lookup) like this:
And the resultant layout is the same:
Hope this helps.