My current project has taken me on an interesting journey of late and so I thought that it would be helpful to share with you some of my experiences and of course some code. I have been taking a look into charting on WP7 there is a good round up here of the different toolkits that are available. I also started out using the Visifire charts, they do pretty much everything that you need. Next, I started playing with the Data Visualisation bits from David Anson. The change over from Visifire to the new charts was rather painless, the main changes I had to make here were; the updates to the palettes used by the chart; and some differences on how the bindings work. For this first chart I was using a line series. The next chart I needed to use was chart that uses a Pie Series layout and this was surprisingly straight forward to get some instant results, but I wanted more from those pies!
So, if you have tried to make your pies more interesting then you will know that they work differently in comparison to the other charting series, its also rather tricky to get those pies looking good. So I went on a search to find out what other folks have been doing. First up I found that Pete Brown has a couple of great post on style and template pies using overlays and another interesting one about using gradients. Unfortunately it does have a number of limitations, so David came up with a yummy pie. Adding these simple gradient brushes
to your chart can really make a visual impact and make you pie look more appertising. So, those pies were good but now I have taste for them and I want more. Luckily, Bea Costa has a great custom chart control that supports labels on your pies. The Legend, can still be used if you want it, but in my current implementation it’s not being used.
With some quick tweaks to the positioning of the labels to better suit a smaller sized screen, a change to the orientation of the labels, a new chart style and template for Bea’s control. I was able to create some lovely looking pies this time around with labels. I wanted to try out the experience around the labels on 2 levels; firstly I wanted to make the values more apparent as the legend in portait mode is ok but not great; secondly I wanted to provide a level of interaction for the user so that they can select a particular segment of the pie.
Now there are a couple of caveats here and that is I am only supporting portrait orientation, there are templates for portrait and landscape however there needs to be some more work done before this is can be moved into the WP7Contrib. I am actually wondering if the label experience is in general just bad when in landscape and that this we should fall back to a simple Legend. Not sure yet, I will try out some ideas and post an update on my findings. The final caveat which applies to both charts is that the popup is not useable for touch as it is displayed under the digit. I will continue to try and improve this.
Stop talking and show me the pies!! Its Friday which is pie day
You can get a cut of the code here, interested in your thoughts and comments especially around the Ux when in landscape mode. Enjoy those pies!!