Jump to content
Software FX Community

Disable Analysis Gallery


peterz

Recommended Posts

How can I disable the analysis gallery commands for the statistical extnesion? I am using this code:

  chart1.Commands[CommandId.Gallery].SubCommands.Clear();

  chart1.Commands[CommandId.Gallery].Enabled = false;

But when I right click on a series I can still see the stats gallery types in the context menu. How can I remove or disable them?

I'm trying to lock down the gallery type and and prevet the use r from changin it.

Link to comment
Share on other sites

Here is a more compete code snippet:

  Statistics stats = new Statistics();

  stats.Chart = chart1;

  chart1.GalleryAttributes = stats.Gallery.Regression;

  stats.Studies.Add(StudyGroup.XYCorrelation);

  chart1.Commands[CommandId.Gallery].SubCommands.Clear();

  chart1.Commands[CommandId.Gallery].Enabled = false;

Link to comment
Share on other sites

You can remove the gallery command from toolbar, context menu and series context menu. Here is the code:

chart1.ToolBar.RemoveAt(4); // removes gallery command from toolbar

chart1.Commands[(int)CommandId.ContextMenuSeries].SubCommands.RemoveAt(0); // removes gallery command from series context menu

chart1.Commands[

CommandId.ContextMenuBack].SubCommands.RemoveAt(4); // removes gallery command from context menu

 

Link to comment
Share on other sites

  • 4 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...