Freigeben über


Nobody likes a show-off [Today's DataVisualizationDemos release includes new demos showing off stacked series behavior]

**

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

  • Anonymous
    May 11, 2011
    Forgot to sign in last time. I was asking about editing data in charts and about source code of toolkit ported to WPF 4. thanks Boško

  • Anonymous
    May 12, 2011
    Boško Stupar, For the benefit of others, I'm including the more detailed question you emailed me: "Is there any possibility to make charts editable as is by simple data point drag? I implemented something like that with previous version of Data Visualization toolkit, but it was rather awkward, because I had to edit parent types in order to create EditableLineSeries. EditableLineSeries have mouse move and drag handlers and respond accordingly, so the series object itself alters the data source. The second problem I encountered was inability to disable animation. Transition was preventing user to drag points fast enough, so I had to disable it. I could probably solve all of this myself as I did the last time, just, it would save a lot of time for me if I had source code ported to WPF 4." The November 2009 release of the Silverlight Toolkit (blogs.msdn.com/.../silverlight-4-beta-is-out-and-the-toolkit-has-it-covered-silverlight-toolkit-november-2009-release-now-available-for-silverlight-3-and-4.aspx) opened up most of the class hierarchy to make subclassing easier and more practical. If you did your work before then, you might have an easier time on more recent releases. Performance can be challenging, but I talk about various steps you can take (including disabling transitions) in this post: blogs.msdn.com/.../i-feel-the-need-the-need-for-speed-seven-simple-performance-boosting-tweaks-for-common-silverlight-wpf-charting-scenarios.aspx For the latest version of the source code that compiles for Silverlight 3/4, WPF 3.5/4, and works on Windows Phone 7, have a look at my Data Visualization Development Release 4: blogs.msdn.com/.../phone-y-charts-silverlight-wpf-data-visualization-development-release-4-and-windows-phone-7-charting-sample.aspx And for lots more helpful links, please look here: http://cesso.org/r/DVLinks Hope this helps!

  • Anonymous
    May 18, 2011
    The comment has been removed

  • Anonymous
    May 19, 2011
    Boško Stupar, Cool!! What you've done sounds really neat - if you blog about it somewhere, please let me know and I'll add a link to my DataVis link collection. :)

  • Anonymous
    August 18, 2011
    The comment has been removed

  • Anonymous
    August 18, 2011
    Grant Peckham, Thanks! :) So I think my Data Visualization Development Release 4 does exactly what you want by bringing the latest Silverlight code to the WPF platform: blogs.msdn.com/.../phone-y-charts-silverlight-wpf-data-visualization-development-release-4-and-windows-phone-7-charting-sample.aspx Hope this helps!

  • Anonymous
    January 02, 2012
    can i show the Column of "ColumnSeries" in different color? like i have 3 options as 3 column of a column series. yes:-5 no:-2 don't know:8 can i show:  'yes' column in "Green' color 'no' column in "red' color 'don't know' column in "Amber' color Thanks in Advance!!

  • Anonymous
    January 03, 2012
    kamlendra, I think the following post shows how to do what you want using an MVVM approach: blogs.msdn.com/.../columns-of-a-different-color-customizing-the-appearance-of-silverlight-charts-with-re-templating-and-mvvm.aspx FYI that you can find more helpful posts about Data Visualization here: http://cesso.org/r/DVLinks Hope this helps!

  • Anonymous
    April 12, 2012
    The comment has been removed

  • Anonymous
    April 12, 2012
    John, I was reassigned soon after posting Development Release 4 and I don't know of any work since then for either the Silverlight or WPF Toolkits. :(

  • Anonymous
    April 12, 2012
    David, Ahh, okay. These Charting controls seem to fit our requirements for a client project, but I'm wary of using them if they're no longer supported, at least not without a copy of their souce. Thanks!

  • Anonymous
    April 12, 2012
    John, To be clear, the complete source code IS available as part of the Development Release package (as well as on CodePlex).

  • Anonymous
    April 12, 2012
    Oh, excellent, thanks!

  • Anonymous
    November 01, 2012
    The comment has been removed

  • Anonymous
    November 02, 2012
    Tabor25, Offhand, I'm not sure why that would be. :( Does anything in my demo project demonstrate this problem?

  • Anonymous
    November 04, 2012
    Hi David, i created a simple demo project showing the bug: MainWindow-XAML: <Window x:Class="ChartTest.MainWindow"        xmlns="schemas.microsoft.com/.../presentation"        xmlns:x="schemas.microsoft.com/.../xaml"        xmlns:charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"  Title="MainWindow" Height="350" Width="525">    <Grid>    <charting:Chart                x:Name="StackedColumnChart"                Title="Stacked Column"                Margin="5">      <charting:StackedColumnSeries>        <charting:SeriesDefinition                        ItemsSource="{Binding}"                        IndependentValuePath="Key"                        DependentValuePath="Value"/>      </charting:StackedColumnSeries>      <charting:StackedColumnSeries>        <charting:SeriesDefinition                        ItemsSource="{Binding}"                        IndependentValuePath="Key"                        DependentValuePath="Value"/>      </charting:StackedColumnSeries>    </charting:Chart>  </Grid> </Window> MainWindow-Implementation: namespace ChartTest {  /// <summary>  /// Interaction logic for MainWindow.xaml  /// </summary>  public partial class MainWindow : Window  {    public MainWindow()    {      InitializeComponent();      Dictionary<double, double> dict1 = new Dictionary<double, double>();      for (var i = 1; i < 10; i++) dict1[i] = i;      ((StackedColumnSeries)StackedColumnChart.Series[0]).DataContext = dict1;      Dictionary<double, double> dict2 = new Dictionary<double, double>();      for (var i = 1; i < 10; i++) dict2[i] = -i / 2.0;      ((StackedColumnSeries)StackedColumnChart.Series[1]).DataContext = dict2;    }  } } Only the last stackedcolumnseries (with the negative values) show a tooltip when the mouse moves over. If you need the project, i can send it to an email address of your choice. Best regards, Tabor25

  • Anonymous
    November 05, 2012
    Tabor25, Thanks for the sample - I see the same thing and I can't explain it offhand. :( However, the way you're using StackedSeries is a little weird - I'd expect to see both SeriesDefinitions in the same StackedColumnSeries. When I change your sample to do that, tooltips for both series work as expected. Here's what that looks like: <charting:StackedColumnSeries>    <charting:SeriesDefinition           ItemsSource="{Binding}"           IndependentValuePath="Key"           DependentValuePath="Value"/>    <charting:SeriesDefinition           ItemsSource="{Binding}"           IndependentValuePath="Key"           DependentValuePath="Value"/> </charting:StackedColumnSeries> StackedColumnSeries scs = ((StackedColumnSeries)StackedColumnChart.Series[0]); Dictionary<double, double> dict1 = new Dictionary<double, double>(); for (var i = 1; i < 10; i++) dict1[i] = i; scs.SeriesDefinitions[0].DataContext = dict1; Dictionary<double, double> dict2 = new Dictionary<double, double>(); for (var i = 1; i < 10; i++) dict2[i] = -i / 2.0; scs.SeriesDefinitions[1].DataContext = dict2; I hope this is helpful!

  • Anonymous
    November 05, 2012
    Hi David, i need more than one StackedColumnSeries because i want to group them as described under www.codeproject.com/.../Grouping-with-StackedColumnSeries-Charts . Using the authors class derived from StackedColumnSeries shows the desired results. Only the tooltip is shown for the last series. It seems to be an issue in the base class. So i created a simple project showing the bug. Maybe you have an idea how to solve this. Best regards, Tabor25

  • Anonymous
    November 06, 2012
    Tabor25, I don't have a solution, but I think I know what's going on: the ScrollViewer for the second (red) StackedColumnSeries (remember this is based on ListBox) is intercepting mouse hover events and blocking them from getting to the ScrollViewer for the first StackedColumnSeries (blue) which is "below" it. I can't tell just now if this is due to one of the Background=Transparents in the relevant templates or whether this is part of how ScrollViewer works in code. PS - When only one StackedColumnSeries is present, this is not a problem because there is no stacking.

  • Anonymous
    November 06, 2012
    Hi David, thank you for spending your time with analysing the bug. As a workaround i will use two charts for displaying the data. Best regards,, Tabor25

  • Anonymous
    March 05, 2013
    The comment has been removed