midder Posted May 3, 2007 Report Share Posted May 3, 2007 Hello. I'm using the latest release. I've got a place holder in which I generate my chart controls. When I turn on the tool tip on: chart.ImgMap = SoftwareFX.ChartFX.ImgMap.TitleTip; the image map is generated twice -- once at the very top of the generated HTML and once where I guess it should be. The first image map, since it's the first thing in the HTML, messes up the validation so the CSS is messed up. Is this a known issue? Is there a way to fix this behavior? Thanks. Link to comment Share on other sites More sharing options...
Frank Posted May 3, 2007 Report Share Posted May 3, 2007 How are you adding the chart on your form? It seems that it is beign added twice. Does the chart tag also appears twice? Please post a sample page that reproduces the problem. Link to comment Share on other sites More sharing options...
midder Posted May 3, 2007 Author Report Share Posted May 3, 2007 Actually it looks like it's generated lots more than twice. Here's the relevant code, where I loop through selected options from a check box list to decide which charts to show: foreach (ListItem item in this.cbListGroups.Items) { if (item.Selected == true) { // DO stuff foreach (ListItem item in this.cbListGroups.Items){ if (item.Selected == true) { // DO stuff if (item.Selected == true){ // DO stuff // DO stuffchart = new Chart(); chart.Gallery = SoftwareFX.ChartFX.Gallery.Lines; chart.ID = System.Guid.NewGuid().ToString(); chart.ImgMap = SoftwareFX.ChartFX.ImgMap.TitleTip; // Get the Xml Data new Chart();chart.Gallery = SoftwareFX.ChartFX.Gallery.Lines; chart.ID = System.Guid.NewGuid().ToString(); chart.ImgMap = SoftwareFX.ChartFX.ImgMap.TitleTip; // Get the Xml Data // Get the Xml Dataprov.LoadXml(Utils.XmlHelper.GetXmlForReports(col, item.Text).OuterXml); // Bind the data // Bind the datachart.DataSourceSettings.DataSource = prov; chart.AxisY.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Currency; chart.AxisX.LabelsFormat.Format = SoftwareFX.ChartFX.AxisFormat.Date; // Put the legend box at the bottom // Put the legend box at the bottomchart.SerLegBox = true; chart.SerLegBoxObj.Docked = SoftwareFX.ChartFX.Docked.Bottom; // Put gridlines in there true;chart.SerLegBoxObj.Docked = SoftwareFX.ChartFX.Docked.Bottom; // Put gridlines in there // Put gridlines in therechart.AxisY.Gridlines = true; // Title true;// Title // Titletit = chart.Titles[0]; tit.Text = item.Text; // Why doesn't this work? // Why doesn't this work?chart.Border = false; chart.BorderEffect = SoftwareFX.ChartFX.BorderEffect.None; // Don't want to show this stuff false;chart.BorderEffect = SoftwareFX.ChartFX.BorderEffect.None; // Don't want to show this stuff // Don't want to show this stuffchart.Chart3D = false; chart.DataEditor = false; // Background false;chart.DataEditor = false; // Background false;// Background // Background // Let's make it flash // Let's make it flash// For some reason this isn't working when we do the loop . . .? // For some reason this isn't working when we do the loop . . .?// chart.OutputWriter = new SoftwareFX.ChartFX.Flash.FlashWriter(); // chart.OutputWriter = new SoftwareFX.ChartFX.Flash.FlashWriter();x = 0; dt = DateTime.Parse(this.startDate.SelectedValue.Trim()); endDateTime = DateTime.Parse(this.endDate.SelectedValue.Trim()); for (; dt <= endDateTime; ) { chart.Legend[x] = dt.ToShortDateString(); dt = dt.AddMonths(01); x++; } this.phCharts.Controls.Add(chart); Label lineBreak = new Label(); lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. this.startDate.SelectedValue.Trim());endDateTime = DateTime.Parse(this.endDate.SelectedValue.Trim()); for (; dt <= endDateTime; ) { chart.Legend[x] = dt.ToShortDateString(); dt = dt.AddMonths(01); x++; } this.phCharts.Controls.Add(chart); Label lineBreak = new Label(); lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. this.endDate.SelectedValue.Trim());for (; dt <= endDateTime; ) { chart.Legend[x] = dt.ToShortDateString(); dt = dt.AddMonths(01); x++; } this.phCharts.Controls.Add(chart); Label lineBreak = new Label(); lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. for (; dt <= endDateTime; ){ chart.Legend[x] = dt.ToShortDateString(); dt = dt.AddMonths(01); x++; } this.phCharts.Controls.Add(chart); Label lineBreak = new Label(); lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. this.phCharts.Controls.Add(chart);Label lineBreak = new Label(); lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. new Label();lineBreak.Text = "<p>"; this.phCharts.Controls.Add(lineBreak); chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. this.phCharts.Controls.Add(lineBreak);chart.GetHtmlTag("700","500","Image"); } } And this is literally all I've got in my web form that's relevant : I guess that won't show up, but it's basically a Panel with a PlaceHolder inside of it. I add my chart controls to the PlaceHolder and show/hide the panel based on validation, etc. Looking at the resulting HTML, the image map is generated each time a chart is generated. All image maps have name="Chart1" and all charts say usemap="#Chart1" I guess it works, but there's that one image map that gets put at the top of the HTML, which screws things up. Thanks for your help. Link to comment Share on other sites More sharing options...
midder Posted May 3, 2007 Author Report Share Posted May 3, 2007 Sorry. I don't know how that got all messed up. I went and looked at it again and it looks like all of the charts do, indeed, use the same image map. So it's not working as I thought. Link to comment Share on other sites More sharing options...
Frank Posted May 4, 2007 Report Share Posted May 4, 2007 You either add the chart to the control tree or you use GetHtmlTag. You are doing both. Add the chart to the control tree if you want it to be part of ViewState. Where is this code running? The control tree can not be modified as part of an event code. Link to comment Share on other sites More sharing options...
midder Posted May 6, 2007 Author Report Share Posted May 6, 2007 Of course. My fault. Thanks for pointing out the obvious. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.