Mansi Shah Report post Posted April 15, 2010 Hi, I have to show no. of charts on a single page according to the user selection. For ex., if user selects 10 dates from the list, then it should show 10 different charts which will be created dynamically. For this I took one panel at client side, < asp : Panel ID="pnlCharts" runat="server">< /asp : Panel> And here is a server side code. for (int date = 0; date <= dateDiff.Days; date++) { DataSet ds1 = objClubTest.SelectDetailsForChart(); if (ds1 != null && ds1.Tables.Count >= 1 && ds1.Tables[0].Rows.Count >= 1) { //ShowChart(ds1); string strChart = GetCPMChart(ds1); if (strChart != "") { HtmlGenericControl h1 = new HtmlGenericControl(); h1.ID = "div" + date; h1.InnerHtml = strChart; pnlChart1.Controls.Add(h1); Literal lt1 = new Literal(); lt1.ID = "lt" + date; lt1.Text = " "; pnlCharts.Controls.Add(lt1); } } } But it shows only one chart, the last one, and for other charts it displays 'chart.' What could be the issue? Share this post Link to post Share on other sites
Mansi Shah Report post Posted April 16, 2010 Again got the solution before any reply from Fusion charts. I was creating charts inside for loop, so the ID of the chart was creating problem. I was giving the same ID for each chart. So solved it like this by providing dynamic IDs, FusionCharts.RenderChart("../FusionCharts/MSCombi2D.swf", "", xmlData.ToString(), "ClubTestMOI" + ChartID, "760", "350", false, false, true); Share this post Link to post Share on other sites
Guest Basundhara Ghosal Report post Posted April 16, 2010 Hi Mansi, Thanks for sharing your idea. Glad that you issue is resolved. Keep smiling and keep FusionCharting. Share this post Link to post Share on other sites