WP7 – Charting with MVVM

No new content in this post, but wanted to share my findings on charting with MVVM on the phone.

image

I initially started with Visifire.  They have some really nice charts and features out of the box but I kept hitting brick walls with databinding and MVVM.  They do have some databinding but it isn’t enough, in my opinion, to use with a full fledged MVVM application.  I ended up posting in their forum for assistance and as I expected they didn’t support databinding a specific property from xaml at that time.  They were very helpful in providing alternative solutions but I wasn’t interested in binding from the code behind.  Two weeks later they had fixed this specific issue and posted a link to the latest code.  Wow, that’s service!

In the end, Visifire charts are not fully compatible with MVVM but they have a very good support/dev team and I fully expect them to catch up soon.  Also searched around for third parties that have wrapped or extended Visifire charts for MVVM and found a few posts but nothing that looked really clean.

image

Next up was the chart controls in the Silverlight Toolkit.  Most anyone who blogged about the Silverlight Toolkit charts linked to David Anson’s blog.  He has several helpful posts:

These along with a post (Databinding Multi-Series Charts) from Beat Kiener got be going quickly.  This framework just felt right.  I can’t put my finger on it but it was different than Visifire.  This is what I have settled on for my WP7 app.  I had to make no compromises to my application architecture (MVVM) or the quality of charts I use.

image

amCharts was the last option I found.  I have only reviewed the demo solution for amCharts, which did have in xaml databinding for a single data series but didn’t see it for multiple.  Can’t say for sure if they do or not without further research.  I will try if/when the toolkit stops meeting my needs.

Licensing

The Silverlight Toolkit and amCharts (Quick Charts for Windows Phone) have an open source license.  Visifire has a linkware and a commercial license.

If anyone knows of other charting frameworks that work with WP7 please leave a comment.

9 thoughts on “WP7 – Charting with MVVM

  1. Hi Rschiefer,

    This is Somnath here from the ‘Team Visifire’. Are you looking for multiple series DataBinding in chart level, in order to work with MVVM? I just want to confirm your exact requirement. Let us know whether it will satisfy your needs if Visifire implements multiple series DataBinding in chart.

      1. [“These along with a post (Databinding Multi-Series Charts) from Beat Kiener got be going quickly. This framework just felt right. I can’t put my finger on it but it was different than Visifire. This is what I have settled on for my WP7 app. I had to make no compromises to my application architecture (MVVM) or the quality of charts I use.”]

        Visifire is suitable for MVVM. Like Visifire, MS Chart also does not have direct support of multi-series binding at chart level. You can work with DataTemplate/Styling in order to achieve the same. I also like the example provided by Beat Kiener in his blog which is suitable for MVVM architecture. I will suggest you to follow the same example replacing Ms Chart by Visifire. Same code works perfectly. You can download the sample example here.
        http://cid-61995e3895be1728.office.live.com/self.aspx/.Public/Visifire%5E_MultiChartDemo.zip?sa=416896830
        Currently this is the best and easiest way to work with multi-series data-binding following MVVM pattern.

        [“In the end, Visifire charts are not fully compatible with MVVM”]

        Now Visifire chart is compatible with MVVM architecture because binding issue from XAML has been fixed. You can follow the best practices with Visifire chart as explained in Beat Kiener blog. You can download the same sample for Visifire Chart below.

        http://cid-61995e3895be1728.office.live.com/self.aspx/.Public/Visifire%5E_MultiChartDemo.zip?sa=416896830

        Let me know whether it satisfies your requirements.

  2. I have checked visiblox. My manager just threw it off. Dam I wasted lot of time with Visiblox. Such a poor quality graphics in Visiblox.

    visiblox is just tuff and difficult to code. You need to add new dataseries to create new chart type at real-time with same data. Bad. Visifire is best. Just change RenderAs property of series to get a different chart type. I like Visifire. I started using it. Thanks visifire. Happy coding.

  3. Its such as you read my thoughts! You appear to know so much approximately
    this, such as you wrote the e-book in it or something.
    I think that you simply can do with some % to power the message home a little bit, but other than that, this is fantastic blog. An excellent read. I will definitely be back.

Leave a Reply