This project is read-only.

Control over what methods of interaction are available.

Dec 13, 2008 at 11:59 PM

How would I go about controlling what methods of interaction are available with a graph/chart?

For example, if I wanted to disable the right click menu, how would I go about doing this?


Dec 15, 2008 at 10:56 AM
Hi, Nick!

Any instance of Plotter (and ChartPlotter, of course, too, as it is a descendant of Plotter) has collection of its children, called Children. This is ObservableCollection<IPlotterElement>, and you can do with it everything you want and need - add new elements (eventually, AddLineGraph extension method of ChartPlotter uses certainly chartPlotter.Children.Add method to add LineGraph to plotter),
remove those elements you don't need, even clear.
As this collection implements ICollectionChangedNotify interface, you can subscribe on its CollectionChanged event, being notified about any changes made in it.

To remove context menu from plotter, you can, for example, call our extension method:

plotter.Children.RemoveAll<IPlotterElement, DefaultContextMenu>();

To use this extension method, you may need to add namespace reference into your code:
using using Microsoft.Research.DynamicDataDisplay.Common.Auxiliary;
Dec 18, 2008 at 1:35 PM

I have a question similar to Nick's. How would you go about dynamically adding/removing LineGraphs from the plotter?

I just downloaded the source of changeset 18031, but can't seem to find the above mentioned extension method. When will the described functionality become available?

Dec 19, 2008 at 12:40 PM
Edited Dec 19, 2008 at 12:43 PM

As I've already said, you can use methods of Plotter.Chidren, which is a usual ObservableCollection<IPlotterElement>, and so it has all Collection's methods, such as Add(...), Remove(...), Clear, and similar. You can use these methods to operate Plotter.Children as you want.

As you have probably noticed, changeset 18031 was added at Oct 6. But now we are speaking about more recent version of DynamicDataDisplay - 0.2.0, which you can download here -

Currently we will not update source code in "Source
Code" tab, we will upload new releases into "Releases" tab.