Jump to content
Software FX Community

Need Help Setting Up ContextMenu for Chart Series


Recommended Posts

ChartFX Support,

I'm trying to setup several new subcommands onto the chart, and need some assistance.

I can successfully insert my new commands into the 'Series Context Menu' for the chart, name them, and catch them with postbacks or client scripts.  But I need help to:

1) associate my own icons with my new subcommands.  I've even tried 'getting' the chartFX ImageIndex for existing well known commands, and setting my user subcommand to use that well known ImageIndex but no luck.  I just get a red x for the subcommand icon.

2) close the context menu after I catch the command with a client java script.  After I handle the subcommand event, the chart context menu lingers there on the WebForm.  How do I .close() that pesky little thing?

Environment: ChartFX 7.0 (Dev Studio 2005), Visual Studio 2005, .Net 2.0, C#, WebForms .aspx pages

 Here's my C# aspx code behind

// access the chart command collection 

CommandCollection cmds = Chart2.Commands;

string imagePath = Server.MapPath("~/Common/Images/1.bmp");

int num = cmds.AppendImage(System.Drawing.Bitmap.FromFile(imagePath ));

// create a new chart Command newCmd = new Command(2220);

newCmd.Text =

"My New Command";

newCmd.ImageIndex = num;

newCmd.GeneratePostBack = true;


// access the chart's Series Context Menu, and add the new command

Command contextMenu = Chart2.Commands[CommandId.ContextMenuSeries];



Thanks for the assist.... SkillCubes

Link to comment
Share on other sites


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

  • Create New...