Hide the legend

Oct 1, 2008 at 2:43 AM
How do I hide the legend in xaml or in code?

Thanks!
Tian
Developer
Oct 7, 2008 at 12:04 PM
Edited Oct 7, 2008 at 12:05 PM
Hello! To do this you'll need to modify source code of library. More precise legend control will be added in next release.

Now you can use following workaround. Add following property to ChartPlotter.cs

class ChartPlotter {
   ...
    public
bool LegendVisible {

      get { return legend.Visibility == Visibility.Visible; }

      set { legend.Visibility = value ? Visibility.Visible : Visibility.Hidden; }

    }

}

And use this property to show or hide legend everywhere you need in code.