Jump to content
Software FX Community

Disable Analysis Gallery


Recommended Posts

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


  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;



  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


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


Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...