Welcome to MSDN Blogs Sign in | Join | Help

WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

The WPF Toolkit team just published the June 2009 release of the WPF Toolkit. Those of you who know I'm on the Silverlight Toolkit team are probably wondering why this is relevant - so let's get right to the release notes for the next version of Silverlight/WPF Charting because they'll clear things up:

 

Notable Changes

WPF is now an official platform for Charting! Today's release of the June 2009 WPF Toolkit includes the binaries for WPF Charting, the associated design-time assemblies for both Visual Studio 2008 and Blend 3, and the complete source code for everything (under the usual Ms-PL license). Prior to today, WPF Charting only existed informally because of a blog post I'd written and some bits I'd shared. As of today, that "do it yourself" approach is a thing of the past - customers can get signed binaries and ready-to-build source code for Charting as part of the WPF Toolkit. And, as always, Charting exposes the same API and supports the same XAML on both platforms - making application portability trivial!

WPF Toolkit installer

Improved performance of internal data structures for many common scenarios. Charting now makes use of left-leaning red-black trees to maintain properly balanced data structures. For more detail on this change, please refer to my post about the LeftLeaningRedBlackTree implementation.

Numerous bug fixes for animation inconsistencies between Silverlight and WPF. Storyboards and Animations sometimes behave a little differently on Silverlight/WPF, and a good bit of effort was spent trying to ensure that Charting will behave the same way on both platforms. In most cases, this was a matter of finding an implementation both platforms agreed on - in some it meant resorting to small, localized #if blocks.

Fixed handling of data objects with non-unique hash codes. When each data object had a unique hash code, things already worked fine. But data sets containing items sharing the same hash code could exhibit incorrect behavior in previous releases. Most typical data sets would not have encountered this problem because hash codes are nearly always unique - but there are certain classes that report quite UNunique hash codes and could trigger the problem fairly easily. This is no longer an issue.

Corrected behavior of charts at very small sizes and during animations. Some third party controls offer so-called "fluid" layout in which size changes are all animated and elements can easily shrink to a size of 0x0. This kind of environment could previously trigger layout bugs that would result in an unhandled exception from the Chart control. These issues have been fixed and dynamic layout changes are now handled seamlessly.

Breaking Changes

IRequireGlobalSeriesIndex's GlobalSeriesIndexChanged method takes a nullable int parameter. This should affect only people who have written custom Series implementations - and the code change is a trivial.

Other Changes

Many other fixes and improvements.

  • Proper RoutedEvent support for DataPointSeries.SelectionChangedEvent
  • Better handling of non-double data by shared Series
  • Addition of StrokeMiterLimit to the Polyline used by LineSeries
  • Fixes for edge case scenarios when removing a Series
  • Ability to set Series.Title with a Binding (on Silverlight 3 and WPF)
  • Automatic inheritance of the Foreground property by the Title control
  • Visual improvements to the LegendItem DataPoint marker
  • Addition of SnapsToDevicePixels to the default Chart Template (WPF-only; unnecessary on Silverlight)

Build Notes

If you plan to recompile the WPF Toolkit from source, please be aware that two of the three Charting design-time assemblies reference Blend 3 DLLs Microsoft.Windows.Design.Extensibility.dll and Microsoft.Windows.Design.Interaction.dll. Unlike their Visual Studio counterparts, these design-time assemblies are not automatically found by the build and their absence causes 84 build errors in the Controls.DataVisualization.Toolkit.Design and Controls.DataVisualization.Toolkit.Expression.Design projects. :(

Most people won't care about building the Blend-specific design-time assemblies and can simply right-click the two failing projects in Visual Studio and choose "Unload Project". After that, everything builds successfully.

Alternatively, users with Blend installed can update these projects' references to both assemblies and then everything (including the Blend design-time assemblies!) builds successfully. The default location of the Blend assemblies is something like C:\Program Files (x86)\Microsoft Expression\Blend 3 Beta. (If you're on a 32-bit OS, remove the " x86"; once Blend releases, remove the " Beta".

Sorry for the inconvenience - we didn't want to ship pre-release Blend components with the WPF Toolkit.

 

Long-time readers know that I always include some new Charting samples with my release notes to showcase new features. The big feature here is WPF Charting, so I've put together a solution that contains almost all of the public Charting samples I've ever posted to my blog - now in one handy place! Naturally, the DataVisualizationDemos sample runs on both Silverlight (2 or 3!) and WPF with the exact same code and XAML. And it includes a brand new scenario called "Letter Frequency" that I wrote to help test some of the recent changes.

Here it is on WPF:

DataVisualizationDemos Letter Frequency sample

Click here to download the complete source code for the DataVisualizationDemos sample application.

(Note: To find the blog post associated with each sample, please refer to the "My posts" section of my Charting Links collection.)

 

Jafar and I spent most of the previous release cycle helping other teams with their deliverables, so we didn't get as nearly much time to spend on Charting as we would have liked. [Otherwise the release notes would be much longer! :) ] Fortunately, we did make the time to deliver some good fixes for this release and that should help make customers' lives a little easier. Of course, while we've done our best to make Charting as useful and problem-free as possible, there's always room for improvement...

So if you have any questions or feedback, the right places to start are the Silverlight Discussion Forum or the WPF Discussion List. Bugs and feature requests can be logged with the Silverlight Issue Tracker or the WPF Issue Tracker. Please raise issues that are clearly unique to one platform or the other in the obvious place. But for general questions and things that are common to both platforms, the Silverlight forum/list is probably a better place - just because there's more context and history there.

A big "thank you" goes out to everyone who's worked with Charting and helped to make it what it is today! Today's release and announcement are specifically directed at the WPF early-adopters who've truly gone the extra mile to use Charting. We thank you for your dedication! Also, my personal thanks go out to the WPF Toolkit team for making this possible - in particular to Samantha Durante, Vamsee Potharaju, and Alexis Roosa for their assistance and support!

 

PS - If you're a loyal Silverlight Charting user who's feeling a little left out right about now, I have some good news for you, too. :) The Silverlight Toolkit will also be releasing an update fairly soon. And when it does, Silverlight Charting will contain all the fixes described here, one or two others that came in too late to make this release, AND a nice little surprise that will make the wait worthwhile...

Published Thursday, June 25, 2009 11:52 AM by Delay

Comments

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Friday, June 26, 2009 9:09 AM by cplotts

In order to get the design assemblies to build ... I also had to remove the conditional compilation symbol MWD40 ... as it was complaining about ToolboxCategoryAttribute.

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Friday, June 26, 2009 9:19 AM by cplotts

By the way, nice job! I am taking a deep look at what you guys have done as I hope to use it for our WPF application. In particular, I plan on creating a custom logarithmic axes for our industry specific line charts.

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Friday, June 26, 2009 2:14 PM by Delay

cplotts,

Thanks for sharing your feedback about the MWD40 symbol! I tried the complete build steps on two different machines and did not need to make that change - but if you did, then maybe some other people will need to as well. :)

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Thursday, July 02, 2009 7:56 AM by jaison-joy@hotmail.com

how to export the chart created in wpf to excel ?

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Thursday, July 02, 2009 2:32 PM by Delay

jaison-joy,

What kind of export are you looking for? The chart is created from data the application owns, so if the application wants to export that same data to Excel (via COM/XLS/CSV/etc.), then it can do so. If an image of the chart is desired, that can be obtained via WPF's RenderTargetBitmap. I'm not sure what export functionality people are looking for from the Chart control itself, so if you have specific scenarios in mind, I'd love to hear them!

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Wednesday, August 05, 2009 1:47 AM by Rajesh A

I used un official WPF charting controls which you mentioed in previous post (http://blogs.msdn.com/delay/archive/2009/03/20/silverlight-charting-remains-just-a-click-away-and-runs-on-wpf-too-chartbuilder-sample-and-source-code-updated-for-charting-s-march-09-release.aspx).

Now i am planning to upgrade it.

Btw: Can this release supports Expression blend 2.0 ?

what is the reason for supports blend3.0 ? is it for maintain compatability btw silverlight and wpf ?

Thnaks for your work.

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Wednesday, August 05, 2009 2:00 PM by Delay

Rajesh,

Blend 3 supports Silverlight 3 and Blend 2 supports Silverlight 2. What you probably want to switch to is the official release of Charting in the June 2009 WPF Toolkit which has been specifically verified to work with Blend 3. Here's a link with more information:

http://blogs.msdn.com/delay/archive/2009/06/25/wpf-charting-it-s-official-june-2009-release-of-the-wpf-toolkit-is-now-available.aspx

Thanks!

# Cut and Paste WPF Chart to PowerPoint of Other Office App

Friday, August 07, 2009 9:49 PM by LunaWPF

How do you copy an entire WPF Chart, including the Title, Legends, Axes and DataPoints (lines, columns or AreaSeries) to the clipboard?

The motivation for this question is:

- User creats a WPF Chart

- User right-clicks anywhere on the chart to bring up a ContextMenu which says "Copy to Clipboard"

- User opens PPT (or Word) and pastes the WPF Chart into a PPT slide (or a Word document).

Thanks

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Saturday, August 08, 2009 1:59 AM by Delay

LunaWPF,

The general technique for capturing a part of a WPF application is via the RenderTargetBitmap API which is documented in MSDN here:

http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.rendertargetbitmap.aspx

This API lets you capture the visuals of any control (like Chart) as an image - which can then be put on the clipboard via the standard clipboard APIs.

Hope this helps!

# XYZ chartin support?

Thursday, August 13, 2009 1:28 PM by graham_fletcher

Is there any support planned for XYZ charting?

This could apply to any charts that currently display x/y pairs, and is a fairly common feature in advanced charting packages.

Apart from that small request, the rest looks great!

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Monday, August 17, 2009 3:12 PM by Delay

Graham,

Yes, we'd eventually like to support more chart types - including 3D, etc.. It's just that there have been enough competing priorities that we haven't been able to do so yet.

Thanks for your patience!

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Friday, November 06, 2009 4:21 PM by mks_v1

I like it, but how do you display extreme ranges on a bar chart

e.g.

January Sales are: 20,000,000

February Sales are: 50

if the value is very small, the bar rectangle may not be drawn, but the value should be displayed as a column annotation. I've seen this on on the graph controls

# re: WPF Charting: It's official! [June 2009 release of the WPF Toolkit is now available!]

Monday, November 09, 2009 11:33 AM by Delay

mks_v1,

We don't currently support what are known as "scale breaks" in the axis. However, the following post of mine shows one way to get the annotations you're asking for:

http://blogs.msdn.com/delay/archive/2009/07/27/simple-column-labels-you-can-create-at-home-re-templating-the-silverlight-wpf-data-visualization-columndatapoint-to-add-annotations.aspx

Hope this helps!

Anonymous comments are disabled
 
Page view tracker