ak1
ak1

Reputation: 379

stacked bar chart in wpf toolkit

can someone guide me on developing stacked bar chart in WPF toolkit. i tried that but didn't find a ready to go solution for this.

or is there any reference for developing a custom control to server the purpose of a stacked bar chart.

thanks

Upvotes: 2

Views: 4670

Answers (4)

Heather V.
Heather V.

Reputation: 160

For people still finding this thread: Stacked100 and Stacked Series for Area, Bar, Column, and Line are available in the 4.0 release of the WPF Toolkit.

Upvotes: 0

Noctis
Noctis

Reputation: 11763

Seems to be that the latest published version of the WPF Toolkit is 3.5 or 3.5.5, depending on where you get it from.

The stacked charts are only available in version 4 of the toolkit, which is available for Silverlight, but not officially for WPF.

If you'll head to this post, you can download the examples he uses (direct link).

Now, here's the beauty: browse to the "Toolkit -> WPF4" folder, and take the dll you'll find there. This is the version 4 toolkit for WPF, which you can then reference in your project, and have access to the stacked barcharts.

Once you got that up and running, just have a look at the code for the stacked bars examples, and work from there. (Warning: I'm rather unhappy with those examples, since they relay heavily on code behind, and are not MVVM friendly at all, so I had to work around this a bit. It can be done though)

Upvotes: 0

Alnoor
Alnoor

Reputation: 82

This was a confusing topic to me for a day or so.

David Anson created some cool stacking charts for the Silverlight Toolkit Data Visualization library. The confusing part to me (as a WPF newbie) was that they were not present in the WPF Toolkit Data Visualization library.

In general, the goal seems to be to align the Silverlight Toolkit and the WPF Toolkit. Unfortunately, the current official version of the WPF Toolkit is from early 2010. The stacking charts in the Silverlight Toolkit were released around the same time and so the toolkits have not yet been aligned..

Clear as mud? David Anson was nice enough to provide the WPF source and binaries for the developer version of this toolkit. So, while not officially released, you can still get stacking charts with little effort.

The second problem I had was that once I had this binary referenced, my code compiled correctly but XAML UI designer couldn't recognize any of the new controls and barfed constantly. I resolved this by re-building the developer version of the toolkit to generate .pdb files.

Upvotes: 0

Mathias
Mathias

Reputation: 15391

David Anson had a nice blog series on the WPF tool kit and charts, this one discusses the stack bars and should provide a good starting point.

Upvotes: 1

Related Questions