1

I have used D3 (Dynamic Data Display) to create a chart windows that displays a live-updating line chart.
I am trying to embed this into WPF MDI

I had to change my chart window type from "Window" to "UserControl" to embed it, but then, when it is loaded inside an MDI Child, chart stays empty and doesn't display a live-updating line as expected.

            D3.MyChartControl c = new  D3.MyChartControl();
            MdiChild newWindow = new MdiChild();
            newWindow.Content = c;
            Container.Children.Add(newWindow);

Chart is updated every second by adding data to it via a sendPoint() method through an ObservableDataSource wich is bound to it (works perfectly when not in a usercontrol)

List<ObservableDataSource<DatePoint>> srcListLive = new List<ObservableDataSource<DatePoint>>();
public void sendPoint(DatePoint p, int graphIndex)
{          
  srcListLive[graphIndex].AppendAsync(Dispatcher, p);
}
Jason Higgins
  • 1,516
  • 1
  • 17
  • 37
Mehdi LAMRANI
  • 11,289
  • 14
  • 88
  • 130

0 Answers0