This project is read-only.

Graph load bug

Nov 25, 2010 at 11:29 AM
Edited Nov 25, 2010 at 12:45 PM


Before I create a new issue post I want to know your opinion about the following.

I made a sample project. The application has an tab control with 2 tab items.
A ChartPlotter with an InjectedPlotter and two axes is created in the constructor of the window.
The window is interested in the loaded event of the ChartPlotter. If the event occured then tabcontrol index will set to the second tab item.

Now the issue. Selecting the first tab item releases following exception.
"Cannot add item to Plotter - first it should be removed from another Plotter." in Microsoft.Research.DynamicDataDisplay.Plotter.OnChildAdded(IPlotterElement child)

In my opinion the issue is related to "Dispatcher.BeginInvoke((Action)(() => ExecuteWaitingChildrenAdditions()), DispatcherPriority.Background);" in
the "void IPlotterElement.OnPlotterAttached(Plotter plotter)" method of the InjectedPlotter class.

Please try it out and give me response what I can do or what you will do to solve the problem.

(I used the nightly build 0.3.4703.0)


Best regards,


Nov 25, 2010 at 12:54 PM

Hello, Björn,

You know, i have forgotten why did I create InjectedPlotter. If you (or somebody else) can explain me what behavior should be in TwoIndependentAxes sample, I will be very much grateful to you!

My mail is,

Skype- mikhail.brinchuk


Best regards,


Nov 25, 2010 at 1:00 PM

Hi Mikhail,

One of the things that you can do with the InjectedPlotter and Plotter is to plot two charts with different verticle axis but the same horizontal axis and be able to move the charts so that they overlay each other.


Nov 25, 2010 at 1:03 PM


Am I right that two charts should both pan while panning horizontal axis?

And only one chart should move when panning any vertical axes?



P.S. I have started a new D3 branch here -, so you are welcome to move all discussions there.

It doesn't contain any stable yet, but I'm working hard)

Nov 25, 2010 at 1:04 PM

D3 - Independent Y-Axis on ChartPlotter Jul 28  - david

Nov 25, 2010 at 1:05 PM

Yes, you are correct; however, they should zoom together.  - david

Dec 7, 2010 at 9:46 AM


I played a little bit with the source code of InjectedPlotter.
Result was that when you delete the following code, the problem was fixed.

        protected override void OnChildAdded(IPlotterElement child)

            if (plotter != null)
                plotter.PerformChildChecks = false;
                    plotter.PerformChildChecks = true;

I also deleted protected override void OnChildRemoving(IPlotterElement child)
The plotter in the method is the ChartPlotter object.
Know the question. Can someone tell me why a child is explicitly added to a ChartPlotter.
What problems could happen if i decide to remove the overridden method.

Here are the sample projects. One is working with the described changes.



Dec 20, 2010 at 12:30 PM
Hi David,
can you please take a look at TwoIndependentAxes sample in D3.Current solution in
Seems like I have implemented what you want.
Best regards,
Mikhail Brinchuk,
My freelance CV - searching for remote work
Jan 26, 2012 at 2:12 PM

This was exactly what I was looking for! The conjunction works also now for the y-axis!

Great job!