Hide the Legend broken?

Sep 28, 2009 at 8:28 AM

How do I hide the legend?

I have tried LegendVisible="False" in XAML and code as well as Legend.Visibility = System.Windows.Visibility.Hidden in code, but neither has shown any effect.

Sep 28, 2009 at 4:21 PM

Have you tried plotter.LegendVisible = false; ?

Sep 29, 2009 at 11:16 AM

Yes. (That is what my previous post was trying to indicate: setting LegendVisible to false on the plotter object in code or XAML does not seem to have any effect, neither has Legend.Visibility = System.Windows.Visibility.Hidden in code)

Oct 6, 2009 at 9:20 AM

Any news on this item? It appears to be a pretty fundamental issue. Am I doing something wrong, or is the current version just broken?

Oct 6, 2009 at 12:50 PM

This works fine for me in the newest build (28841):

plotter.LegendVisibility = Visibility.Hidden;


Oct 6, 2009 at 2:54 PM

Ok, I just noticed, that I was using the stable version which is pretty dated. The change log says that legend visibility was fixed since then.

So I downloaded the nightly build, but this is having other issues: where did HorizontalDateTimeAxis go? What was working with stable no longer compiles with the nighly build. Any ideas?

Oct 14, 2009 at 2:38 PM


why have you decided that HorizontalDateTimeAxis moved somewhere? It is still at its place in Charts/Axes/DateTime folder and in Microsoft.Research.DynamicDataDisplay.Charts namespace. maybe you thought so because we've renamed some properties of Plotter: e.g., HorizontalAxis is now a MainHorizontalAxis, and so for vertical axis, too.




Aug 6, 2010 at 9:48 PM

Is the hide legend still broken??

I have the latest build 0.3.4703.0



Kishore Vanapalli

Aug 16, 2010 at 12:08 PM
I too am having trouble hiding the legend, though, I'm using the stable version. I've tried downloading the Nightly build to see if that would help, however, I cannot find the latest DynamicDataDisplay.dll file. I thought that's how I would have to 'get' the latest version...am I just going about implementing the newest version into my project incorrectly or what? Thanks so much! -Al
Aug 16, 2010 at 2:03 PM

The code is in a transitory state right now, but if you want to hide both the left and right legends, you need to set the LegendVisibility = Visibility.Hidden/Collapsed and the NewLegendVisible = false. You can do this in code or XAML.

As for the nightly build, I think you need to build the source projects in order to obtain the latest libraries.

Aug 27, 2013 at 2:49 PM
Even i'm in late to answer, if it could help somebody. I propose this solution:
I had the same problem, but i successed to find the solution:

In C# code, before to create the chart you write this:
       ChartPlotter m_Plotter = plotter    // creation of the chart, egal to the plotter which was create via xaml file

   __ ____    m_Plotter.Legend.Visibility=System.Windows.Visibility.Collapsed;______ 

        m_Plotter.AddLineGraph(ds, new Pen(Brushes.Red, 1), null);
As you can notice, it is not "Hidden" but "collapsed", that you must used.
legend is not displayed.

Also THANKS A LOT Mikhail! for your excellent library!

Nicolas NGHIEM