A WPF and XAML based chart

While having fun with WPF/XAML in my spare time, I came across this work by John Stevien at CodeProject. So I went out to try something fun with WPF and see if we can create something similar to the charts you see on Google finance. Since unlike Adobe Flex platform, WPF/XAML lacks any built-in support for data charts, I think this could be something helpful in real-life applications. Here is the results of this 4-hour adventure. I’ve created a WPF/XAML based 2D filled chart that supports dynamic zooming and panning, and track-ball of the current chart positions for time-series data. This chart could possibly be used in many situations where time-series data needs to be displayed.

This chart utilize the flexibility and power of the “adorner” class in WPF Visual elements. The following shows the chart in action:

[ Update: 7/20/2007]

The source code is uploaded to my Box.net share here. You can download and try the code.

[Update: 1/16/2009]

A new source code link is posted at:

new source code link

33 Responses to A WPF and XAML based chart

  1. […] you are looking for ideas, Li Gao just published another WPF charting example (no source code available […]

  2. Walt Ritscher says:

    Any thought about makig the source code available?

    http://wpfwonderland.wordpress.com/

  3. ligao101 says:

    Walt, thanks for your interests in this chart. I will clean up my code and remove some confidential info and then post the source code here. Stay tuned.

  4. ligao101 says:

    The source code is posted in my Box.Net share. The link is on the bottom of the blog entry page.
    The download link is http://www.box.net/shared/j2u1ir2nfc

  5. Walt Ritscher says:

    Thank you. I updated my post.

  6. Jiping Wang says:

    Can this wpf Chart be implemented in Silverlight ???
    Anyone has an idea ??

  7. ligao101 says:

    It will be interesting to see this implemented in Silverlight. Since it just went for RC1, I will see if I can make it work under Silverlight.

  8. […] chart in WPF A few weeks back I posted a WPF-based chart in my blog. Currently in one of my projects I need to deploy charts that support displaying […]

  9. Andy says:

    Oh, and did not know about it. Thanks for the information …

  10. Josh says:

    Dude, this is awesome!!! GREAT JOB!

  11. watson31 says:

    hi there ,if you guys are in search of silverlight then chk this out visifire its an amazing charting component under open source for free

  12. Jen says:

    I can’t download the source code from Box.net account. Could you please check? I really like your chart. Thanks!

  13. WPFNubi says:

    I think the link is still broken. I really want to download this and checked it out.

  14. Ted says:

    Looks interesting, can you please republish the code?

    Thanks

  15. Peter says:

    I cannot download the source for your graph – Could you please send it?
    Thank you!

  16. B j says:

    Looks great. Can’t download, would be nice if you can repost it. Thanks.

  17. sacha says:

    Any chance we can download the source, it looks great.

  18. VT says:

    The Box.net account does not show the file to download and displays an error. could you share the source code please?

    I am impressed and would like to try it out.

    Thanks,
    VT

  19. Chart says:

    Hi, could you post source code?

  20. boomhauer says:

    code seems to be missing

  21. Scott Green says:

    You guys should check out Visifire at http://www.visifire.com. It is open source and supports both WPF and Silverlight using a single API.

  22. Jim says:

    Any chance of making the source available again?

    Thanks!
    Jim

  23. Anonymous says:

    Could you PLEASE post the source code? Thanks!

  24. oli says:

    Hi,

    Will the source be available again ?

  25. ligao101 says:

    Hi all,

    I’ve just posted the new source code link. Check the bottom of the blog page.
    Sorry for the broken link. Haven’t updated it for quite some time.

  26. oli says:

    thanks a lot

  27. […] XAML: Gráficos desenvolvidos WPFhttps://ligao101.wordpress.com/2007/07/17/a-wpfxaml-based-chart […]

  28. Hey very nice blog!!….I’m an instant fan, I have bookmarked you and I’ll be checking back on a regular….See ya

    I’m Out! 🙂

  29. anything new on this project? really interesting

Leave a reply to Walt Ritscher Cancel reply