Two birds, squared! [Silverlight/WPF Data Visualization Development Release 3 and a DataVisualizationDemos update]


This blog has moved to a new location and comments have been disabled.

All old posts, new posts, and comments can be found on The blog of dlaa.me.

See you there!

Comments (15)

  1. Siva Anand says:

    Hi

     I am getting AG_E_UNKNOWN_ERROR while loading chart series.

    Initially i have used July 2009 version of data visualization toolkit. Chart was loaded properly in my page .But Now i want to use November 2009 version . If i use that i am getting AG_E_UNKNOWN_ERROR which is pointing to my XAML file .

    Could you please help me to resolve this issue?

    Thanks In Advance,

    Siva

  2. Delay says:

    Siva,

    Please go ahead and contact me via the email link in the sidebar so we can exchange email. Without seeing any of the code involved, I’m afraid my ability to troubleshoot this is rather limited. :) That said, my guess would be that perhaps you’re using some feature that’s changed between the two releases – if I had to guess further, I’d say that maybe your code wasn’t updated to account for the name changes from Chart.StylePalette->Palette and class StylePalette->ResourceDictionaryCollection. I discuss these – and other breaking changes – in my release notes which are always available from my charting links page: http://cesso.org/r/DVLinks

    Hope this helps!

  3. kmkuntz says:

    Hi Delay -

    This is fantastic – I've been looking for your version of the stacked column series for silverlight 3 for some time.  Thanks for putting this together.  

    one thing – I noticed that the DataPointSeriesDragDropTarget is no longer part of this build.  Has that been relocated?

    Thanks

    Kevin

  4. Delay says:

    kmkuntz,

    DataPointSeriesDragDropTarget has actually never been part of my Data Visualization Development Releases because it requires additional code outside the Data Visualization assembly that isn't currently self-contained for Silverlight or tested on WPF. However, that class can still be found in its usual location in the Silverlight Toolkit's official Data Visualization assembly if you'd like to use it. :)

  5. Joe says:

    I copied the Line chart XAML into my project but have spent a full day trying to resolved this reference.  What DLL is this?

         xmlns:utility="clr-namespace:Utility;assembly=ChartBuilder"

    Without the proper "Add Reference" in the project, this line results in a 2nd error message.

           <utility:ObservableObjectCollection>

    Thanks,

    Joe

  6. Delay says:

    Joe,

    It sounds like you copied that XAML from my ChartBuilder sample (more information: blogs.msdn.com/…/click-your-way-to-great-silverlight-charts-live-chartbuilder-sample-and-source-code.aspx). In that case, the ObservableObjectCollection reference is to a class that's part of the ChartBuilder assembly and that's why it's not resolving successfully in your application. All it really is is a trivial subclass of ObservableCollection<object>, so it'll probably be easiest for you to just create a subclass of that in your project and reference that instead.

    Hope this helps!

  7. Andy says:

    Trying to use the built in 4.0 WPF charting via System.Windows.Controls.DataVisualization.Charting but cant find them except in the WPF Toolkit which is only 3.5.

  8. Delay says:

    Andy,

    Sorry, I don't think I understand the question. A pre-compiled version of the Silverlight/WPF Toolkit's DataVisualization assembly specifically targetting WPF 4 can be found inside the ZIP linked to by the post above: cesso.org/…/SilverlightWpfDataVisualization.zip. I hope that's what you're looking for!

  9. Srini says:

    I'm using the stacked bar series and I have two series definitions in that. I want to set the opacity of the first series to 0. But I'm unable to do it. Basically I want to hide one of the two series that make up my stacked bar series. How to do that?

  10. Delay says:

    Srini,

    Removing the SeriesDefinition from the StackedSeries's SeriesDefinitions collection (and adding it back when you want it to display again) is probably what you want to do here.

  11. Srini says:

    Delay,

    Thanks for the prompt reply. Let me try that and I'll let you know how it worked for me.

  12. Srini says:

    Delay,

    I tried removing the series definition, but here's the problem. There are two series definitions, sd1, sd2, one stacked on top of the other. Lets say one value of sd1 starts at 0 and ends at 100 and the sd2 at the same point starts at 100 and ends at 150. If I remove sd1, then sd2 now falls down and starts at 0. I want sd2 to stay at 100.

    Also, I used the following way to remove the sd – ((StackedBarSeries)this.chrtXXX.Series[0]).SeriesDefinitions.Remove(sd1);

    Is this the right way?

  13. Delay says:

    Srini,

    Yes, that's the way to remove a SeriesDefinition from the collection. I'm not sure I understand your scenario, but here's an alternate approach: set the DataPointStyle of the SeriesDefinition you want to hide to a custom Style that defines an empty Template. This should immediately be applied to each of the relevant DataPoints and they should disappear. When you want them to come back, just do a ClearValue on that same DataPointStyle property and the DataPoints should come back. :)

    Hope this helps!

  14. Srini says:

    Yup, that worked. Thanks for pointing in the right direction. This is what I did:

    ****

    Style style = new Style(typeof(Control));

    Setter st1 = new Setter(Control.OpacityProperty,0);            

    style.Setters.Add(st1);

    ((StackedBarSeries)this.chrtXXX.Series[0]).SeriesDefinitions[0].DataPointStyle = style;

    ****

  15. Silverlight Programmers Blog says:

    The data Visulization of silverlight post very useful for the visulizing the data from the database. i like this post.