User (Legacy) Posted May 2, 2005 Report Share Posted May 2, 2005 Hi, sometime when I do right click on my Bar chart, I notice the Legend Box item is disabled. Not sure what causes this. I do have SerLeg filled with names. Thanks. Minh Link to comment Share on other sites More sharing options...
Software FX Posted May 4, 2005 Report Share Posted May 4, 2005 We will need more details on when this happens, what type of chart, legends set, etc. If you can reproduce the problem you can export the chart to a binary file and attach it to your post. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 5, 2005 Author Report Share Posted May 5, 2005 please see attachment for the binary file. It is a 3d bar chart with multiple series. Another interesting fact, if I show the "Data Editor", then the "Legend Box" item is enabled. see attachment. Thanks "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:dPkpZKNUFHA.2608@webserver3.softwarefx.com... > We will need more details on when this happens, what type of chart, legends > set, etc. > > If you can reproduce the problem you can export the chart to a binary file > and attach it to your post. > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted May 7, 2005 Report Share Posted May 7, 2005 I'm unable to reproduce the problem. When I read the binary file you sent, I get the Legend Box option enabled. I think you encounter a bug that has to do with the order in which you are doing things, I would need a little sample program that reproduces the problem. -- FP Software FX Attachments.zip Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 9, 2005 Author Report Share Posted May 9, 2005 Looks like it has something to do with removing items from the context menu. Here is my sample code: Command cmd = chart1.Commands[(int)CommandID.ContextMenuBack]; //remove separator and toolbar options cmd.RemoveSubCommand(0); //remove toolbar --- Comment out this line will enable "Legend Box" item. chart1.ClearData(ClearDataFlag.Values); chart1.SerLeg.Clear(); int series = 1; chart1.OpenData(COD.Values | COD.AllocHidden, series, (int)COD.Unknown); chart1.AxisY.DataFormat.Decimals = 2; // chart1.OpenData(COD.XValues, 1, (int)COD.Unknown); for (int i = 0; i < series; i++) { int count = series; Random rand = new Random(100); chart1.SerLeg.Add("Series " + i + 1); chart1.AxisX.Label.Add("Item " + i + 1); for (int k = 0; k < count; k += 1) { chart1.Value[i, k] = rand.NextDouble(); // chart1.XValue[0, k] = k; //chart1.Legend[k] = "Label " + k; } } chart1.CloseData(COD.Values | COD.AllocHidden); "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:RVTjvFxUFHA.2236@webserver3.softwarefx.com... > I'm unable to reproduce the problem. > > When I read the binary file you sent, I get the Legend Box option enabled. > > I think you encounter a bug that has to do with the order in which you are > doing things, I would need a little sample program that reproduces the > problem. > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted May 10, 2005 Report Share Posted May 10, 2005 I found the problem. The Add method in SerLeg is not updating the commands, replace the line: chart1.SerLeg.Add("Series " + i + 1); by chart1.SerLeg[i] = "Series " + i + 1; // Equivalent code I will log this as a bug so that it gets fixed in the next SP. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 10, 2005 Author Report Share Posted May 10, 2005 I did try that as well..It doesn't work. if I commented these 2 lines, then it works (regardless of "Add" or "=" op). Command cmd = chart1.Commands[(int)CommandID.ContextMenuBack]; cmd.RemoveSubCommand(0); //remove toolbar Please investigate further. Minh "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:GRdUMNZVFHA.204@webserver3.softwarefx.com... > I found the problem. > > The Add method in SerLeg is not updating the commands, > > replace the line: > > chart1.SerLeg.Add("Series " + i + 1); > by > > chart1.SerLeg[i] = "Series " + i + 1; // Equivalent code > > > I will log this as a bug so that it gets fixed in the next SP. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Software FX Posted May 11, 2005 Report Share Posted May 11, 2005 When I make this change in the code you sent, the legend box menu item is enabled. Are you using the latest service pack ? Did you test this change in the sample code you sent ? -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 11, 2005 Author Report Share Posted May 11, 2005 Version: 6.2.1342.0 Yes, I did. See the attached sample project. Ming "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:GRdUMNZVFHA.204@webserver3.softwarefx.com... > I found the problem. > > The Add method in SerLeg is not updating the commands, > > replace the line: > > chart1.SerLeg.Add("Series " + i + 1); > by > > chart1.SerLeg[i] = "Series " + i + 1; // Equivalent code > > > I will log this as a bug so that it gets fixed in the next SP. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Software FX Posted May 11, 2005 Report Share Posted May 11, 2005 This is not the same sample at all. In a Pie chart, the Series Legend is irrelevant, so the line you need to change is: chart1.AxisX.Label.Add("Item " + i + 1); for chart1.AxisX.Label[i] = "Item " + i + 1; -- Francisco Padron www.chartfx.com WindowsApplication6.zip Link to comment Share on other sites More sharing options...
User (Legacy) Posted May 11, 2005 Author Report Share Posted May 11, 2005 Yes, you are right! I thought, the pie chart would be the same. Since, I got the legend option on and off just based on those 2 lines... Anyway, I tried your suggestion in my real chart (3D bar), and it fixes the problem. Thanks again. Ming "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:GRdUMNZVFHA.204@webserver3.softwarefx.com... > I found the problem. > > The Add method in SerLeg is not updating the commands, > > replace the line: > > chart1.SerLeg.Add("Series " + i + 1); > by > > chart1.SerLeg[i] = "Series " + i + 1; // Equivalent code > > > I will log this as a bug so that it gets fixed in the next SP. > > -- > Francisco Padron > www.chartfx.com > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.