Jump to content
Software FX Community

Image map generated twice


midder

Recommended Posts

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

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 stuff

chart = 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 Data

prov.LoadXml(Utils.XmlHelper.GetXmlForReports(col, item.Text).OuterXml);

// Bind the data

// Bind the data

chart.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 bottom

chart.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 there

chart.AxisY.Gridlines = true;

// Title

true;

// Title

// Title

tit = 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 stuff

chart.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

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

Archived

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

×
×
  • Create New...