This project is read-only.

MAJOR BUG - URGENT (please)!

Mar 21, 2009 at 6:15 PM

I am trying to use Dynamic Data Display in a financial application that can test automated trading systems.
Sometimes I need to plot
  •  millions of points as I am working with tick data (each transaction)
  • some Markers to visualize my entry and exit points on the market.

However if you just plot 1000 points, the chart appears to be completely random!!! For example, if I add some markers, they should always be on the curve, which is not the case (see code). The problem is not coming from the markers but from the line plot. The problem is still the same if you try to use other data sources (composite, enumerable...).
Also, if you try to drag the chart, the markers does not follow!
It should be noticed that these bugs was not present in the previous release of dynamic data display. But I need datetime support!

Please can anyone help me on this?


To test the bug, add a chart named "plotter" and copy the following code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Research.DynamicDataDisplay;
using Microsoft.Research.DynamicDataDisplay.DataSources;
using Microsoft.Research.DynamicDataDisplay.PointMarkers;

namespace ddd_test1
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
        private List<Trade> _listOfTrade;
        private List<Trade> _listMarker;

        public Window1()
            _listOfTrade = new List<Trade>();
            _listMarker = new List<Trade>();

        public void BeginSimulation()
            Random random = new Random();

            for (int counter = 1; counter < 1000; counter++)
                Trade trade = new Trade(counter, random.NextDouble());


                if (counter % 10 == 0)

        public void EditGraph()
            ObservableDataSource<Trade> source = new ObservableDataSource<Trade>(_listOfTrade);
            source.SetXMapping(c => c.Counter);
            source.SetYMapping(d => d.Price);

            ObservableDataSource<Trade> sourceMarker = new ObservableDataSource<Trade>(_listMarker);
            sourceMarker.SetXMapping(c => c.Counter);
            sourceMarker.SetYMapping(d => d.Price);

            plotter.AddLineGraph(source, new Pen(Brushes.Gold, 3), new PenDescription("chart"));

            LineAndMarker<MarkerPointsGraph> chartMarkerBuy = plotter.AddLineGraph(
                new Pen(Brushes.Red, 3),
                new TrianglePointMarker { Size = 5, Brush = Brushes.Blue },
                new PenDescription("marker"));
            chartMarkerBuy.LineGraph.DataSource = null;


    public class Trade
        public double Price { get; set; }
        public double Counter { get; set; }

        public Trade(double counter, double price)
            Price = price;
            Counter = counter;
Mar 24, 2009 at 3:07 PM
Edited Mar 24, 2009 at 3:08 PM

I've reproduced the bug you've submitted and created a fix for it. You can download archive here, extract it and replace DynamicDataDisplay.csproj with archive's contents.

Error was in wrongly added by default filter to LineGraph.

Mikhail Brinchuk.
Mar 24, 2009 at 4:44 PM

Thanks Mikhail for the great job, it works fine!!!

Mar 24, 2009 at 9:08 PM

Unfortunatly I have some problems.

1/ If I follow exactly what you said (I replace the  DynamicDataDisplay.csproj from the source code downloaded from the site by the DynamicDataDisplay.csproj downloaded from the archive you communicated me), I have multiple errors when I try to compile the code.

2/ If I replace the  DynamicDataDisplay.csproj from the the archive you communicated me by the DynamicDataDisplay.csproj downloaded from source code downloaded from the site, I still have multiple errors.

3/ If I compile directly the code from the the archive you communicated me, I have multiple warnings but it works fine. The bug doesn't exist anymore. However, the sample Tooltip doesn't work anymore!

It seems that a lot of new stuff is coming in the new version. The graggable axes are a nice feature!

Thanks again,
Mar 24, 2009 at 10:33 PM

Is there any way to apply the ToolTipTextProperty to a basic line instead of the markers?
This is not the same time to download 1M point with a simple line plot than a marker plot...

Mar 27, 2009 at 9:25 AM
Edited Mar 27, 2009 at 9:25 AM
Hi, Kamel!

You can add ToolTip to line by setting LineGraph.ToolTip property to anything you want to show as a tooltip. This works similar to standart WPF way of setting tooltips.